Browse Source

0412 新看板

master
ruanqi 4 years ago
parent
commit
22d7eac322
  1. 14
      src/api/production.js
  2. 80
      src/assets/scss/global.scss
  3. 2
      src/views/modules/pad/padPart1.vue
  4. 8
      src/views/modules/pad/padPartAttribute.vue
  5. 6
      src/views/modules/pad/padPartPhoto.vue
  6. 34
      src/views/modules/production/dailyPlan.vue
  7. 12
      src/views/modules/production/dailyPlanReport.vue
  8. 338
      src/views/modules/production/operator.vue
  9. 8
      src/views/modules/production/productionBlankingSearch.vue
  10. 547
      src/views/modules/production/scheduleForSOTask.vue
  11. 603
      src/views/modules/production/scheduleForShopOrder.vue
  12. 8
      src/views/modules/production/searchDailyPlan.vue
  13. 2
      static/config/index-prod.js

14
src/api/production.js

@ -28,6 +28,20 @@ export const dailyPlanReportSave=data => createAPI(`dailyPlan/dailyPlanReportSav
export const dailyPlanReportsSave=data => createAPI(`dailyPlan/dailyPlanReportsSave`, 'post', data);
export const productionBlankingSearch=data => createAPI(`dailyPlan/productionBlankingSearch`, 'post', data);
export const getOperatorData=data => createAPI(`dailyPlan/getOperatorData`, 'post', data);
export const getWorkCenterData=data => createAPI(`dailyPlan/getWorkCenterData`, 'post', data);
export const getWorkCenterOperatorData=data => createAPI(`dailyPlan/getWorkCenterOperatorData`, 'post', data);
export const addSkill=data => createAPI(`dailyPlan/addSkill`, 'post', data);
export const deleteSkill=data => createAPI(`dailyPlan/deleteSkill`, 'post', data);
export const getShopOrderRoutingData=data => createAPI(`dailyPlan/getShopOrderRoutingData`, 'post', data);
export const getSOTastRoutingData=data => createAPI(`dailyPlan/getSOTastRoutingData`, 'post', data);

80
src/assets/scss/global.scss

@ -128,4 +128,84 @@
flex-direction: row-reverse;
gap: 10px;
}
// 2021-12-14 13:29 sxm
.el-form-item--medium .el-form-item__label {
height: 20px;
line-height: 20px;
}
.el-input--medium .el-input__inner,.el-form-item--medium .el-form-item__content {
height: 24px;
line-height: 20px;
}
.el-input--medium .el-input__icon {
line-height: 20px;
}
.el-form-item--mini .el-form-item__content, .el-form-item--mini .el-form-item__label {
line-height: 20px;
}
.el-form-item--mini .el-form-item__label {
line-height: 20px;
}
// sxm 模态框 2021-12-22
.el-dialog__header {
padding: 5px 10px 5px;
}
.el-dialog__footer {
padding: 5px 10px 5px;
}
.el-dialog--center .el-dialog__body {
text-align: initial;
padding: 0px 10px 0px;
}
.el-dialog__headerbtn {
position: absolute;
top: 5px;
right: 10px;
padding: 0;
background: 0 0;
border: none;
outline: 0;
cursor: pointer;
font-size: 16px;
}
/*全局 el-table 下 el-input的样式 LR 2022-01-12*/
.customer-number-cell .cell{
height: 25px !important;
padding: 0px;
}
/*a标签全局无下划线 2022-01-18 LR*/
a:hover{
text-decoration: none;
}
.el-radio+.el-radio {
margin-left: 0px;
}
.inputTable input.el-input__inner {
height: 14px !important;
border: 0px !important;
}
.inputTable .el-input--medium .el-input__icon {
line-height: 14px;
}
.mainTable .el-table .customer-row-gray{
background: #7e819e;
}
/*去掉悬浮的样式*/
.mainTable tr:hover > td{
background-color: transparent !important;
}
.mainTable .hover-row > td{
background-color: transparent !important;
}

2
src/views/modules/pad/padPart1.vue

@ -11,7 +11,7 @@
<el-form-item :label="'产品编码/名称/规格型号:'" style="margin-left: 20px">
<el-input v-model="searchData.searchIn" style="width: 220px"></el-input>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 24px;height: 35px;width: 80px" type="primary">查询</el-button>
</el-form-item>
</el-form>

8
src/views/modules/pad/padPartAttribute.vue

@ -12,20 +12,20 @@
<el-input v-model="partDescription" readonly style="width: 300px"></el-input>
</el-form-item>
</el-form>
<el-form inline="true" style="margin-top: 0px;margin-left: 20px" label-position="top">
<el-form inline="true" style="margin-top: 26px;margin-left: 20px" label-position="top">
<el-form-item :label="'序号:'">
<el-input v-model="num" style="width: 120px" readonly></el-input>
</el-form-item>
<el-form-item :label="'描述:'" style="margin-left: 20px">
<el-input v-model="subCodeDesc" style="width: 200px" readonly></el-input>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="lastData()" style="margin-left: 24px;height: 35px;width: 90px" type="primary">上一条</el-button>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="nextData()" style="margin-left: 24px;height: 35px;width: 90px" type="primary">下一条</el-button>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="jump()" style="margin-left: 24px;height: 35px;width: 80px" type="primary">关闭</el-button>
</el-form-item>
</el-form>

6
src/views/modules/pad/padPartPhoto.vue

@ -21,13 +21,13 @@
</el-form-item>
</el-form>
<el-form inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="lastPicture()" style="margin-left: 10px;height: 35px;width: 90px" type="primary">上一张</el-button>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="nextPicture()" style="margin-left: 25px;height: 35px;width: 90px" type="primary">下一张</el-button>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="jump()" style="margin-left: 25px;height: 35px;width: 80px" type="primary">关闭</el-button>
</el-form-item>
</el-form>

34
src/views/modules/production/dailyPlan.vue

@ -14,10 +14,10 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate2"
@ -35,10 +35,10 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate3"
@ -48,8 +48,6 @@
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label="'状态:'">
<el-select filterable v-model="searchData.status" style="width: 120px">
@ -66,10 +64,10 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate1"
@ -84,11 +82,11 @@
<el-form-item :label="'排产情况:'">
<el-select filterable v-model="searchData.planStatus" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="未排产完" value="a.LotSize >ISNULL(so.scheduling_size,0)"></el-option>
<el-option label="已排产完" value="ISNULL(so.scheduling_size,0) >=a.LotSize"></el-option>
<el-option label="未排产完" value="ROUND(a.LotSize,3) >ROUND(ISNULL(so.scheduling_size,0),3)"></el-option>
<el-option label="已排产完" value="ROUND(ISNULL(so.scheduling_size,0),3) >=ROUND(a.LotSize,3)"></el-option>
</el-select>
</el-form-item>
<el-form-item style="margin-top: 30px">
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 24px" type="primary">查询</el-button>
</el-form-item>
</el-form>
@ -182,7 +180,7 @@
</el-table-column>
</el-table>
<el-dialog title="排产信息" :visible.sync="schedulingFlag" :close-on-click-modal="false" v-drag width="840px">
<el-dialog title="排产信息" :visible.sync="schedulingFlag" :close-on-click-modal="false" v-drag width="86 0px">
<el-form :inline="true" label-position="top">
<el-form-item :label="'订单号:'">
<el-input v-model="scheduledModelData.orderNo" readonly style="width: 130px"></el-input>
@ -199,8 +197,10 @@
<el-form-item :label="'未排产数量:'">
<el-input v-model="scheduledModelData.unSchedulingSize" readonly style="width: 100px"></el-input>
</el-form-item>
<el-button @click="schedulings()" type="primary" style="margin-top: 33px;margin-left: 0px;">批量新增</el-button>
<el-button @click="schedulingModal()" type="primary" style="margin-top: 33px;">新增</el-button>
<el-form-item :label="' '">
<el-button @click="schedulings()" type="primary" style="margin-top: 0px;margin-left: 0px;">批量新增</el-button>
<el-button @click="schedulingModal()" type="primary" style="margin-top: 0px;">新增</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
@ -297,7 +297,7 @@
<el-input v-model="scheduledingsData.qty" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'计划天数:'">
<el-input v-model="scheduledingsData.dayQty" style="width: 130px" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
<el-input v-model="scheduledingsData.dayQty" style="width: 130px;" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
@ -380,7 +380,7 @@
startDate3: '',
endDate3: '',
site: this.$store.state.user.site,
planStatus: 'a.LotSize >ISNULL(so.scheduling_size,0)'
planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(so.scheduling_size,0),3)'
},
// table
height: 200
@ -388,7 +388,7 @@
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 270
this.height = window.innerHeight - 240
})
},
methods: {

12
src/views/modules/production/dailyPlanReport.vue

@ -19,10 +19,10 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate1"
@ -38,8 +38,10 @@
<el-option label="不可报工" value="Y"></el-option>
</el-select>
</el-form-item>
<el-button @click="search()" style="margin-left: 0px;margin-top: 33px" type="primary">查询</el-button>
<el-button @click="reports()" style="margin-left: 0px;margin-top: 33px" type="primary">批量报工</el-button>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top: 0px" type="primary">查询</el-button>
<el-button @click="reports()" style="margin-left: 0px;margin-top: 0px" type="primary">批量报工</el-button>
</el-form-item>
</el-form>
<el-table
:height="height"
@ -217,7 +219,7 @@
},
mounted() {
this.$nextTick(()=>{
this.height = window.innerHeight - 210;
this.height = window.innerHeight - 180;
})
},
methods: {

338
src/views/modules/production/operator.vue

@ -0,0 +1,338 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -20px;">
<el-form-item :label="'工厂编码:'">
<el-input v-model="searchData.site" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'操作员编号:'">
<el-input v-model="searchData.operatorID" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'操作员名称:'">
<el-input v-model="searchData.operatorName" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="是否在用:" >
<el-select v-model="searchData.active" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="在用" value="Y"></el-option>
<el-option label="不在用" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item label=" " >
<el-button @click="search()" style="margin-left: 0px;margin-top: 0px" type="primary">查询</el-button>
<download-excel
:fields="exportDataStandard"
:data="tableData"
type="xlsx"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{'导出'}}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="tableData"
border
style="width: 100%">
<el-table-column
prop="site"
header-align="center"
align="left"
min-width="80"
label="工厂编码">
</el-table-column>
<el-table-column
prop="operatorID"
header-align="center"
align="left"
min-width="70"
label="操作员编码">
</el-table-column>
<el-table-column
prop="operatorName"
header-align="center"
align="left"
min-width="90"
label="操作员姓名">
</el-table-column>
<el-table-column
prop="active"
header-align="center"
align="left"
min-width="70"
label="是否在用">
</el-table-column>
<el-table-column
prop="department"
header-align="center"
align="left"
min-width="100"
label="部门">
</el-table-column>
<el-table-column
prop="createdDate"
header-align="center"
align="left"
min-width="130"
label="录入时间">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="skillMatrix(scope.row)">技能矩阵</a>
</template>
</el-table-column>
</el-table>
<el-dialog title="技能矩阵" :close-on-click-modal="false" v-drag :visible.sync="skillFlag" width="800px">
<div style="font-size: 12px">
操作员编码<el-input v-model="operatorData.operatorID" style="width: 120px"></el-input>
操作员姓名<el-input v-model="operatorData.operatorName" style="width: 120px"></el-input>
</div>
<el-container style="margin-top: -12px;">
<el-main style="width: 300px">
<span style="font-size: 12px" >可选技能</span>
<el-table
height="300px"
:data="skillList1"
border
@row-click="clickSkill1"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
prop="workCenterNo"
header-align="center"
align="left"
min-width="110"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="workCenterDesc"
header-align="center"
align="left"
min-width="170"
label="加工中心名称">
</el-table-column>
</el-table>
</el-main>
<el-main style="width: 100px">
<div style="margin-top: 100px">
<el-button type="primary" @click="addSkill()">添加技能>></el-button>
</div>
<div style="margin-top: 20px">
<el-button type="primary" @click="deleteSkill()">删除技能<<</el-button>
</div>
</el-main>
<el-main style="width: 300px">
<span style="font-size: 12px" >已选技能</span>
<el-table
height="300px"
:data="skillList2"
border
@row-click="clickSkill2"
highlight-current-row
v-loading="dataListLoading"
style="width: 100%">
<el-table-column
prop="workCenterNo"
header-align="center"
align="left"
min-width="110"
label="加工中心编码">
</el-table-column>
<el-table-column
prop="workCenterDesc"
header-align="center"
align="left"
min-width="170"
label="加工中心名称">
</el-table-column>
</el-table>
</el-main>
</el-container>
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="routingModelFlag = false">关闭</el-button>-->
<!-- </el-footer>-->
</el-dialog>
</div>
</template>
<script>
import {
getOperatorData,
getWorkCenterData,
getWorkCenterOperatorData,
addSkill,
deleteSkill
} from "@/api/production.js"
export default {
name: 'searchDailyPlan',
data () {
return {
// start
exportData: [],
exportDataStandard: {
"工厂编码": "site",
"操作员编码": "operatorID",
"操作员姓名": "operatorName",
"是否在用": "active",
"部门": "department",
"录入时间": "createdDate",
},
exportName: "操作员列表"+this.getStrDate(),
exportHeader: ["操作员列表"],
exportFooter: [],
exportDefaultValue: "这一行这一列没有数据",
dataListLoading:false,
// end
height:200,
tableData:[],
date1:'',
searchData:{
operatorID:'',
operatorName:'',
status:'all',
site:this.$store.state.user.site,
},
operatorData:{
operatorID:'',
operatorName:'',
site:'',
},
skillFlag:false,
skillList1:[],
skillList2:[],
skillRow1:null,
skillRow2:null,
}
},
mounted() {
this.$nextTick(()=>{
this.height = window.innerHeight - 210;
})
},
methods: {
search(){
getOperatorData(this.searchData).then(({data}) => {
this.tableData = data.rows;
})
},
createExportData() {
return this.tableData;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
getStrDate() {
let dd = new Date();
let Y = dd.getFullYear();
let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//100
let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//100
let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours();
let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes();
let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds();
return Y + M + D + H + MM + S;
},
clickSkill1(row){
this.skillRow1 = JSON.parse(JSON.stringify(row));
},
clickSkill2(row){
this.skillRow2 = JSON.parse(JSON.stringify(row));
},
skillMatrix(row){
let inData={
site:row.site,
operatorID:row.operatorID,
}
this.operatorData.site=row.site;
this.operatorData.operatorID=row.operatorID;
this.operatorData.operatorName=row.operatorName;
getWorkCenterData(inData).then(({data}) => {
this.skillList1 = data.rows;
})
getWorkCenterOperatorData(inData).then(({data}) => {
this.skillList2 = data.rows;
})
this.skillFlag=true;
},
addSkill(){
if(this.skillRow1==null){
this.$alert("请选择可选加工中心技能!", '错误', {
confirmButtonText: '确定'
})
return false;
}
let inSkillData={
site:this.operatorData.site,
operatorID:this.operatorData.operatorID,
workCenterNo:this.skillRow1.workCenterNo,
user:this.$store.state.user.name,
}
addSkill(inSkillData).then(({data}) => {
let inData={
site:this.operatorData.site,
operatorID:this.operatorData.operatorID,
}
getWorkCenterData(inData).then(({data}) => {
this.skillList1 = data.rows;
})
getWorkCenterOperatorData(inData).then(({data}) => {
this.skillList2 = data.rows;
})
this.skillRow1=null;
})
},
deleteSkill(){
if(this.skillRow2==null){
this.$alert("请选择已选加工中心技能!", '错误', {
confirmButtonText: '确定'
})
return false;
}
let inSkillData={
site:this.operatorData.site,
operatorID:this.operatorData.operatorID,
workCenterNo:this.skillRow2.workCenterNo,
}
deleteSkill(inSkillData).then(({data}) => {
let inData={
site:this.operatorData.site,
operatorID:this.operatorData.operatorID,
}
getWorkCenterData(inData).then(({data}) => {
this.skillList1 = data.rows;
})
getWorkCenterOperatorData(inData).then(({data}) => {
this.skillList2 = data.rows;
})
this.skillRow2=null;
})
},
},
created() {
}
}
</script>
<style scoped>
</style>

8
src/views/modules/production/productionBlankingSearch.vue

@ -7,8 +7,10 @@
<el-form-item :label="'硫化产品名称:'">
<el-input v-model="searchData.partDescSpec" style="width: 120px"></el-input>
</el-form-item>
<el-button @click="search()" style="margin-left: 0px;margin-top: 33px" type="primary">查询</el-button>
<el-button @click="getSum()" style="margin-left: 0px;margin-top: 33px" type="primary">计算选中订单合计</el-button>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top: 0px" type="primary">查询</el-button>
<el-button @click="getSum()" style="margin-left: 0px;margin-top: 0px" type="primary">计算选中订单合计</el-button>
</el-form-item>
</el-form>
<div class="search1">
<el-table
@ -143,7 +145,7 @@
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
this.height = window.innerHeight - 180
})
// this.autoRoll()
},

547
src/views/modules/production/scheduleForSOTask.vue

@ -0,0 +1,547 @@
<template>
<div class="mod-config">
<el-form inline="true" style="margin-top: -25px;" v-model="searchData">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" >
<el-form-item :label="'日计划号:'">
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'生产订单号:'">
<el-input v-model="searchData.orderRef1" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工序号:'">
<el-input v-model="searchData.itemNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'计划日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate1"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate1"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label="'状态:'">
<el-select filterable v-model="searchData.status" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="已计划" value="('已计划')"></el-option>
<el-option label="已取消" value="('已取消')"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'物料编码:'">
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'排产情况:'">
<el-select filterable v-model="searchData.planStatus" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="未派工完" value="ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)"></el-option>
<el-option label="已派工完" value="ROUND(ISNULL(SL.scheduledQty,0),3) >=ROUND(a.LotSize,3)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 24px" type="primary">查询</el-button>
<download-excel
:fields="exportDataStandard"
:data="tableData"
type="xlsx"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{'导出'}}
</download-excel>
</el-form-item>
</el-form>
</el-form>
<el-table
:height="height"
:data="tableData"
border
style="width: 100%">
<el-table-column
prop=""
fixed="left"
header-align="center"
align="center"
width="60"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="openScheduleModel(scope.row)">派工</a>
</template>
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
width="120"
label="日计划号">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
align="left"
width="60"
label="工序号">
</el-table-column>
<el-table-column
prop="operationDesc"
header-align="center"
align="left"
width="160"
label="工序名称">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
width="120"
label="物料编码">
</el-table-column>
<el-table-column
prop="partDescription"
header-align="center"
align="left"
width="200"
label="物料名称">
</el-table-column>
<el-table-column
prop="workCenterNo"
header-align="center"
align="left"
width="100"
label="加工中心">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="left"
width="60"
label="状态">
</el-table-column>
<el-table-column
prop="orderDate"
header-align="center"
align="left"
width="130"
label="计划日期">
</el-table-column>
<el-table-column
prop="orderRef1"
header-align="center"
align="left"
width="130"
label="生产订单号">
</el-table-column>
<el-table-column
prop="lotSize"
header-align="center"
align="right"
width="80"
label="订单数量">
</el-table-column>
<el-table-column
prop="scheduledQty"
header-align="center"
align="right"
width="80"
label="已派工数量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
width="80"
label="已报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
width="80"
label="已入库数量">
</el-table-column>
<el-table-column
prop="machSetupTime"
header-align="center"
align="right"
width="80"
label="调机时间">
</el-table-column>
<el-table-column
prop="machRunFactor"
header-align="center"
align="right"
width="80"
label="单位产出量">
</el-table-column>
<el-table-column
prop="factorUnit"
header-align="center"
align="left"
width="80"
label="产出单位">
</el-table-column>
</el-table>
<el-dialog title="派工" :close-on-click-modal="false" v-drag :visible.sync="scheduledModalFlag" width="720px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="订单号:">
<el-input v-model="schedulingModalData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工厂编号:">
<el-input v-model="schedulingModalData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="生产订单号:">
<el-input v-model="schedulingModalData.orderRef1" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="订单数量:">
<el-input v-model="schedulingModalData.lotSize" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="待排产数:">
<el-input v-model="schedulingModalData.qtyToSchedule" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="产品编码:">
<el-input v-model="schedulingModalData.partNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="产品名称:">
<el-input v-model="schedulingModalData.partDescription" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工序号:">
<el-input v-model="schedulingModalData.itemNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工序名称:">
<el-input v-model="schedulingModalData.operationDesc" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="加工中心:">
<el-input v-model="schedulingModalData.workCenterNo" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="排产机台:">
<el-select v-model="schedulingModalData.resourceId" style="width: 120px"
placeholder="请选择">
<el-option
v-for="(item,index) in availableResourceList"
:key="index"
:label="item.resourceID"
:value="item.resourceID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="排产班次:">
<el-select v-model="schedulingModalData.shiftNo" style="width: 120px"
placeholder="请选择">
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</el-form-item>
<el-form-item label="本次累计排产数量:">
<el-input v-model="schedulingModalData.sumQty" type="number" disabled style="width: 120px"></el-input>
<el-button type="primary" @click="addPlans()" style="margin-left: 10px;">添加</el-button>
<el-button type="primary" @click="savePlans()">保存</el-button>
<el-button type="primary" @click="scheduledModalFlag = false">关闭</el-button>
</el-form-item>
</el-form>
<div class="inputTable ">
<el-table
height="200"
:data="schedulingModalTableData"
border
style="width: 100%">
<el-table-column
prop="scheduleDate"
header-align="center"
align="left"
min-width="100"
label="排产日期">
<template slot-scope="scope">
<el-date-picker
style="width: 95%"
class="sl-input"
v-model="scope.row.scheduleDate"
type="date"
value-format="yyyy-MM-dd"
@change="getTodayShiftNo2(scope.$index)"
placeholder="选择日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
prop="scheduleQty"
header-align="center"
align="right"
min-width="80"
label="排产数量">
<template slot-scope="scope">
<el-input v-model="scope.row.scheduleQty" type="number" @change="changeSum" placeholder="请输入数量"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop="resourceId"
header-align="center"
align="left"
min-width="80"
label="排产机台">
<template slot-scope="scope">
<el-select v-model="scope.row.resourceId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in availableResourceList " :key="index" :label="item.resourceID"
:value="item.resourceID">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="shiftNo"
header-align="center"
align="left"
min-width="80"
label="排产班次">
<template slot-scope="scope">
<el-select v-model="scope.row.shiftNo" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="operatorId"
header-align="center"
align="right"
min-width="80"
label="排产人员">
<template slot-scope="scope">
<el-select v-model="scope.row.operatorId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorId">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
width="60"
label="操作">
<template slot-scope="scope" class="foo_container">
<a type="text" size="small" @click="splitScheduleTable(scope.$index)">删除</a>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="scheduledModalFlag = false">关闭</el-button>
<!-- <el-button type="primary" :disabled="bannersBut" @click="saveBanners()">确定</el-button>-->
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
getSOTastRoutingData
} from "@/api/production.js"
export default {
name: 'scheduleForSOTask',
data () {
return {
// start
exportData: [],
exportDataStandard: {
"日计划号": "orderNo",
"工序号": "itemNo",
"工序名称": "operationDesc",
"物料编码": "partNo",
"物料名称": "partDescription",
"加工中心": "workCenterNo",
"状态": "status",
"计划日期": "orderDate",
"日计划数量": "lotSize",
"已派工数量": "scheduledQty",
"已报工数量": "qtyReported",
"已入库数量": "qtyApprove",
"生产订单号": "orderRef1",
"调机时间": "machSetupTime",
"单位产出量": "machRunFactor",
"产出单位": "factorUnit",
},
exportName: "日计划工序列表"+this.getStrDate(),
exportHeader: ["日计划工序列表"],
exportFooter: [],
exportDefaultValue: "这一行这一列没有数据",
// end
height:200,
tableData:[],
date1:'',
searchData: {
orderNo: '',
startDate1: new Date(),
endDate1: '',
status: '(\'已计划\')',
partNo: '',
orderRef1:'',
site: this.$store.state.user.site,
planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)',
itemNo:'',
},
schedulingModalData: {
orderNo: '',
site: '',
orderRef1: '',
lotSize: '',
qtyToSchedule: '',
partNo: '',
partDescription: '',
itemNo: '',
operationDesc: '',
workCenterNo: '',
scheduleDate: '',
scheduleQty: '',
resourceId: '',
shiftNo: '',
sumQty: '',
},
scheduledModalFlag: false,
availableResourceList: [],
schedulingModalTableData: [],
operatorIdList:[],
}
},
mounted() {
this.$nextTick(()=>{
this.height = window.innerHeight - 220;
})
},
methods: {
search(){
getSOTastRoutingData(this.searchData).then(({data}) => {
this.tableData = data.rows;
})
},
createExportData() {
return this.tableData;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
getStrDate() {
let dd = new Date();
let Y = dd.getFullYear();
let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//100
let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//100
let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours();
let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes();
let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds();
return Y + M + D + H + MM + S;
},
openScheduleModel(row){
if (row.lotSize-row.scheduledQty == 0) {
this.$alert('该订单已派工完毕!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.schedulingModalData = {
orderNo: row.orderNo,
site: row.site,
orderRef1: row.orderRef1,
lotSize: row.lotSize,
qtyToSchedule: row.lotSize-row.scheduledQty,
partNo: row.partNo,
partDescription: row.partDescription,
itemNo: row.itemNo,
operationDesc: row.operationDesc,
workCenterNo: row.workCenterNo,
scheduleDate: '',
scheduleQty: '',
resourceId: '',
shiftNo: '',
sumQty: 0,
}
this.schedulingModalTableData = []
// this.getAvailableResourceList(row)
this.scheduledModalFlag = true
},
addPlans () {
// if (this.schedulingModalData.resourceId == '') {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
// if (this.schedulingModalData.shiftNo == '') {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
this.schedulingModalTableData.push({
scheduleQty: '',
resourceId: this.schedulingModalData.resourceId,
shiftNo: this.schedulingModalData.shiftNo,
scheduleDate: null,
operatorId:'',
selectList: []
})
this.sumQty += this.schedulingModalData.scheduleQty
},
changeSum () {
let sum = 0
if (this.schedulingModalTableData.length > 0) {
for (let i = 0; i < this.schedulingModalTableData.length; i++) {
if (this.schedulingModalTableData[i].scheduleQty != '' && this.schedulingModalTableData[i].scheduleQty != null) {
sum += Number(this.schedulingModalTableData[i].scheduleQty)
}
}
}
this.schedulingModalData.sumQty = sum
},
splitScheduleTable (index) {
this.schedulingModalTableData.splice(index, 1)
this.changeSum()
},
},
created() {
}
}
</script>
<style scoped>
</style>

603
src/views/modules/production/scheduleForShopOrder.vue

@ -0,0 +1,603 @@
<template>
<div class="mod-config">
<el-form inline="true" style="margin-top: -25px;" v-model="searchData">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;" >
<el-form-item :label="'订单号:'">
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'计划开工日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate2"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate2"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'计划完工日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate3"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate3"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'工序号:'">
<el-input v-model="searchData.itemNo" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item :label="'状态:'">
<el-select filterable v-model="searchData.status" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="可派工" value="('已下达','已发料','已入库','已开工','已排产')"></el-option>
<el-option label="不可派工" value="('已计划','已取消','已关闭')"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'录入日期:'">
<el-date-picker
style="width: 130px"
v-model="searchData.startDate1"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate1"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'物料编码:'">
<el-input v-model="searchData.partNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="'排产情况:'">
<el-select filterable v-model="searchData.planStatus" style="width: 120px">
<el-option label="全部" value=""></el-option>
<el-option label="未派工完" value="ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)"></el-option>
<el-option label="已派工完" value="ROUND(ISNULL(SL.scheduledQty,0),3) >=ROUND(a.LotSize,3)"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 24px" type="primary">查询</el-button>
<download-excel
:fields="exportDataStandard"
:data="tableData"
type="xlsx"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:defaultValue="exportDefaultValue"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{'导出'}}
</download-excel>
</el-form-item>
</el-form>
</el-form>
<el-table
:height="height"
:data="tableData"
border
style="width: 100%">
<el-table-column
prop=""
fixed="left"
header-align="center"
align="center"
width="60"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="openScheduleModel(scope.row)">派工</a>
</template>
</el-table-column>
<el-table-column
prop="orderNo"
header-align="center"
align="left"
width="120"
label="生产订单号">
</el-table-column>
<el-table-column
prop="itemNo"
header-align="center"
align="left"
width="60"
label="工序号">
</el-table-column>
<el-table-column
prop="operationDesc"
header-align="center"
align="left"
width="160"
label="工序名称">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
width="120"
label="物料编码">
</el-table-column>
<el-table-column
prop="partDescription"
header-align="center"
align="left"
width="200"
label="物料名称">
</el-table-column>
<el-table-column
prop="workCenterNo"
header-align="center"
align="left"
width="100"
label="加工中心">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="left"
width="60"
label="状态">
</el-table-column>
<el-table-column
prop="planStartDate"
header-align="center"
align="left"
width="130"
label="计划开工日期">
</el-table-column>
<el-table-column
prop="needDate"
header-align="center"
align="left"
width="130"
label="计划完工日期">
</el-table-column>
<el-table-column
prop="lotSize"
header-align="center"
align="right"
width="80"
label="订单数量">
</el-table-column>
<el-table-column
prop="scheduledQty"
header-align="center"
align="right"
width="80"
label="已派工数量">
</el-table-column>
<el-table-column
prop="qtyReported"
header-align="center"
align="right"
width="80"
label="已报工数量">
</el-table-column>
<el-table-column
prop="qtyApprove"
header-align="center"
align="right"
width="80"
label="已入库数量">
</el-table-column>
<el-table-column
prop="enterDate"
header-align="center"
align="left"
width="80"
label="录入时间">
</el-table-column>
<el-table-column
prop="userName"
header-align="center"
align="left"
width="100"
label="录入人">
</el-table-column>
<el-table-column
prop="machSetupTime"
header-align="center"
align="right"
width="80"
label="调机时间">
</el-table-column>
<el-table-column
prop="machRunFactor"
header-align="center"
align="right"
width="80"
label="单位产出量">
</el-table-column>
<el-table-column
prop="factorUnit"
header-align="center"
align="left"
width="80"
label="产出单位">
</el-table-column>
</el-table>
<el-dialog title="派工" :close-on-click-modal="false" v-drag :visible.sync="scheduledModalFlag" width="720px">
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="订单号:">
<el-input v-model="schedulingModalData.orderNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工厂编号:">
<el-input v-model="schedulingModalData.site" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="要求完工日期:">
<el-input v-model="schedulingModalData.needDate" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="订单数量:">
<el-input v-model="schedulingModalData.lotSize" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="待排产数:">
<el-input v-model="schedulingModalData.qtyToSchedule" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="产品编码:">
<el-input v-model="schedulingModalData.partNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="产品名称:">
<el-input v-model="schedulingModalData.partDescription" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工序号:">
<el-input v-model="schedulingModalData.itemNo" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="工序名称:">
<el-input v-model="schedulingModalData.operationDesc" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="加工中心:">
<el-input v-model="schedulingModalData.workCenterNo" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="排产机台:">
<el-select v-model="schedulingModalData.resourceId" style="width: 120px"
placeholder="请选择">
<el-option
v-for="(item,index) in availableResourceList"
:key="index"
:label="item.resourceID"
:value="item.resourceID"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="排产班次:">
<el-select v-model="schedulingModalData.shiftNo" style="width: 120px"
placeholder="请选择">
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</el-form-item>
<el-form-item label="本次累计排产数量:">
<el-input v-model="schedulingModalData.sumQty" type="number" disabled style="width: 120px"></el-input>
<el-button type="primary" @click="addPlans()" style="margin-left: 10px;">添加</el-button>
<el-button type="primary" @click="savePlans()">保存</el-button>
<el-button type="primary" @click="scheduledModalFlag = false">关闭</el-button>
</el-form-item>
</el-form>
<div class="inputTable ">
<el-table
height="200"
:data="schedulingModalTableData"
border
style="width: 100%">
<el-table-column
prop="scheduleDate"
header-align="center"
align="left"
min-width="100"
label="排产日期">
<template slot-scope="scope">
<el-date-picker
style="width: 95%"
class="sl-input"
v-model="scope.row.scheduleDate"
type="date"
value-format="yyyy-MM-dd"
@change="getTodayShiftNo2(scope.$index)"
placeholder="选择日期">
</el-date-picker>
</template>
</el-table-column>
<el-table-column
prop="scheduleQty"
header-align="center"
align="right"
min-width="80"
label="排产数量">
<template slot-scope="scope">
<el-input v-model="scope.row.scheduleQty" type="number" @change="changeSum" placeholder="请输入数量"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column
prop="resourceId"
header-align="center"
align="left"
min-width="80"
label="排产机台">
<template slot-scope="scope">
<el-select v-model="scope.row.resourceId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in availableResourceList " :key="index" :label="item.resourceID"
:value="item.resourceID">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="shiftNo"
header-align="center"
align="left"
min-width="80"
label="排产班次">
<template slot-scope="scope">
<el-select v-model="scope.row.shiftNo" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option label="白班" value="白班"></el-option>
<el-option label="晚班" value="晚班"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop="operatorId"
header-align="center"
align="right"
min-width="80"
label="排产人员">
<template slot-scope="scope">
<el-select v-model="scope.row.operatorId" placeholder="请选择" style="height: 12px;padding: 0px " filterable
allow-create>
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorId">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
prop=""
header-align="center"
align="center"
width="60"
label="操作">
<template slot-scope="scope" class="foo_container">
<a type="text" size="small" @click="splitScheduleTable(scope.$index)">删除</a>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="scheduledModalFlag = false">关闭</el-button>
<!-- <el-button type="primary" :disabled="bannersBut" @click="saveBanners()">确定</el-button>-->
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
getShopOrderRoutingData
} from "@/api/production.js"
export default {
name: 'searchDailyPlan',
data () {
return {
// start
exportData: [],
exportDataStandard: {
"生产订单号": "orderNo",
"工序号": "itemNo",
"工序名称": "operationDesc",
"物料编码": "partNo",
"物料名称": "partDescription",
"加工中心": "workCenterNo",
"状态": "status",
"计划开工日期": "planStartDate",
"计划完工日期": "needDate",
"订单数量": "lotSize",
"已派工数量": "scheduledQty",
"已报工数量": "qtyReported",
"已入库数量": "qtyApprove",
"录入时间": "enterDate",
"录入人": "userName",
"调机时间": "machSetupTime",
"单位产出量": "machRunFactor",
"产出单位": "factorUnit",
},
exportName: "生产订单工序列表"+this.getStrDate(),
exportHeader: ["生产订单工序列表"],
exportFooter: [],
exportDefaultValue: "这一行这一列没有数据",
// end
height:200,
tableData:[],
date1:'',
searchData: {
orderNo: '',
startDate1: new Date(),
endDate1: '',
startDate2: '',
endDate2: '',
status: '(\'已下达\',\'已发料\',\'已入库\',\'已开工\',\'已排产\')',
partNo: '',
startDate3: '',
endDate3: '',
site: this.$store.state.user.site,
planStatus: 'ROUND(a.LotSize,3) >ROUND(ISNULL(SL.scheduledQty,0),3)',
itemNo:'',
},
schedulingModalData: {
orderNo: '',
site: '',
needDate: '',
lotSize: '',
qtyToSchedule: '',
partNo: '',
partDescription: '',
itemNo: '',
operationDesc: '',
workCenterNo: '',
scheduleDate: '',
scheduleQty: '',
resourceId: '',
shiftNo: '',
sumQty: '',
},
scheduledModalFlag: false,
availableResourceList: [],
schedulingModalTableData: [],
operatorIdList:[],
}
},
mounted() {
this.$nextTick(()=>{
this.height = window.innerHeight - 220;
})
},
methods: {
search(){
getShopOrderRoutingData(this.searchData).then(({data}) => {
this.tableData = data.rows;
})
},
createExportData() {
return this.tableData;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
getStrDate() {
let dd = new Date();
let Y = dd.getFullYear();
let M = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : (dd.getMonth() + 1);//100
let D = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate();//100
let H = dd.getHours() < 10 ? "0" + dd.getHours() : dd.getHours();
let MM = dd.getMinutes() < 10 ? "0" + dd.getMinutes() : dd.getMinutes();
let S = dd.getSeconds() < 10 ? "0" + dd.getSeconds() : dd.getSeconds();
return Y + M + D + H + MM + S;
},
openScheduleModel(row){
if (row.lotSize-row.scheduledQty == 0) {
this.$alert('该订单已派工完毕!', '错误', {
confirmButtonText: '确定'
})
return false
}
this.schedulingModalData = {
orderNo: row.orderNo,
site: row.site,
needDate: row.needDate,
lotSize: row.lotSize,
qtyToSchedule: row.lotSize-row.scheduledQty,
partNo: row.partNo,
partDescription: row.partDescription,
itemNo: row.itemNo,
operationDesc: row.operationDesc,
workCenterNo: row.workCenterNo,
scheduleDate: '',
scheduleQty: '',
resourceId: '',
shiftNo: '',
sumQty: 0,
}
this.schedulingModalTableData = []
// this.getAvailableResourceList(row)
this.scheduledModalFlag = true
},
addPlans () {
// if (this.schedulingModalData.resourceId == '') {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
// if (this.schedulingModalData.shiftNo == '') {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
this.schedulingModalTableData.push({
scheduleQty: '',
resourceId: this.schedulingModalData.resourceId,
shiftNo: this.schedulingModalData.shiftNo,
scheduleDate: null,
operatorId:'',
selectList: []
})
this.sumQty += this.schedulingModalData.scheduleQty
},
changeSum () {
let sum = 0
if (this.schedulingModalTableData.length > 0) {
for (let i = 0; i < this.schedulingModalTableData.length; i++) {
if (this.schedulingModalTableData[i].scheduleQty != '' && this.schedulingModalTableData[i].scheduleQty != null) {
sum += Number(this.schedulingModalTableData[i].scheduleQty)
}
}
}
this.schedulingModalData.sumQty = sum
},
splitScheduleTable (index) {
this.schedulingModalTableData.splice(index, 1)
this.changeSum()
},
},
created() {
}
}
</script>
<style scoped>
</style>

8
src/views/modules/production/searchDailyPlan.vue

@ -19,10 +19,10 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item style="margin-top: 23px;">
<laber style="margin-left: -9px;font-size: 19px">&#10142</laber>
</el-form-item>
<el-form-item style="margin-top: 30px;">
<el-form-item :label="' '">
<el-date-picker
style="width: 130px"
v-model="searchData.endDate1"
@ -31,7 +31,8 @@
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-button @click="search()" style="margin-left: 0px;margin-top: 33px" type="primary">查询</el-button>
<el-form-item :label="' '">
<el-button @click="search()" style="margin-left: 0px;margin-top: 0px" type="primary">查询</el-button>
<download-excel
:fields="exportDataStandard"
:data="tableData"
@ -47,6 +48,7 @@
class="el-button el-button--primary el-button--medium">
{{'导出'}}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"

2
static/config/index-prod.js

@ -5,7 +5,7 @@
window.SITE_CONFIG = {};
// api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'http://127.0.0.1:9090/xujie-fast';
window.SITE_CONFIG['baseUrl'] = 'http://192.168.2.172:9090';
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './'; // 域名

Loading…
Cancel
Save