Browse Source

0412 新看板

master
ruanqi 4 years ago
parent
commit
6bf15db7b7
  1. 2
      src/api/production.js
  2. 4
      src/views/modules/production/scheduleForSOTask.vue
  3. 53
      src/views/modules/production/scheduleForShopOrder.vue

2
src/api/production.js

@ -46,6 +46,8 @@ export const getWorkCenterOperatorList=data => createAPI(`dailyPlan/getWorkCente
export const getAvailableResourceList=data => createAPI(`dailyPlan/getAvailableResourceList`, 'post', data);
export const scheduleForShopOrder=data => createAPI(`dailyPlan/scheduleForShopOrder`, 'post', data);

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

@ -257,7 +257,7 @@
<el-select v-model="schedulingModalData.operatorId" style="width: 120px"
placeholder="请选择">
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorId">
:value="item.operatorID">
</el-option>
</el-select>
@ -343,7 +343,7 @@
<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">
:value="item.operatorID">
</el-option>
</el-select>

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

@ -311,7 +311,7 @@
<el-select v-model="schedulingModalData.operatorId" style="width: 120px"
placeholder="请选择">
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName"
:value="item.operatorId">
:value="item.operatorID">
</el-option>
</el-select>
@ -341,7 +341,6 @@
v-model="scope.row.scheduleDate"
type="date"
value-format="yyyy-MM-dd"
@change="getTodayShiftNo2(scope.$index)"
placeholder="选择日期">
</el-date-picker>
</template>
@ -397,7 +396,7 @@
<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">
:value="item.operatorID">
</el-option>
</el-select>
@ -428,7 +427,7 @@
getShopOrderRoutingData,
getWorkCenterOperatorList,
getAvailableResourceList,
scheduleForShopOrder,
} from "@/api/production.js"
export default {
@ -496,6 +495,7 @@
shiftNo: '',
sumQty: '',
operatorId:'',
efficiency:'',
},
scheduledModalFlag: false,
availableResourceList: [],
@ -554,6 +554,7 @@
itemNo: row.itemNo,
operationDesc: row.operationDesc,
workCenterNo: row.workCenterNo,
efficiency:row.efficiency,
scheduleDate: '',
scheduleQty: '',
resourceId: '',
@ -637,6 +638,7 @@
})
return false
}
let flag=false;
for (let i = 0; i <this.schedulingModalTableData.length; i++) {
if(''==this.schedulingModalTableData[i].scheduleQty||this.schedulingModalTableData[i].scheduleQty==null){
this.$alert('存在派工记录没有填写派工数量!', '错误', {
@ -668,23 +670,56 @@
})
return false
}
if(this.schedulingModalTableData[i].scheduleDate>this.schedulingModalData.needDate){
flag=true;
}
}
if(flag){
this.$confirm(`派工日期大于需求完成日期,是否继续`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.doSchedule();
})
}else {
this.doSchedule();
}
this.doSchedule();
},
doSchedule(){
let indata={
orderNo: this.schedulingModalData.orderNo,
site: this.schedulingModalData.site,
needDate: this.schedulingModalData.needDate,
lotSize: this.schedulingModalData.lotSize,
qtyToSchedule: this.schedulingModalData.qtyToSchedule,
partNo: this.schedulingModalData.partNo,
partDescription: this.schedulingModalData.partDescription,
itemNo: this.schedulingModalData.itemNo,
operationDesc: this.schedulingModalData.operationDesc,
workCenterNo: this.schedulingModalData.workCenterNo,
sumQty: this.schedulingModalData.sumQty,
scheduleDetail:this.schedulingModalTableData,
efficiency:this.schedulingModalData.efficiency,
}
scheduleForShopOrder(indata).then(({data}) => {
if (data && data.code === 0) {
this.scheduledModalFlag = false
for (let i = 0; i <this.tableData.length ; i++) {
if(this.tableData[i].orderNo==indata.orderNo &&this.tableData[i].itemNo==indata.itemNo){
this.tableData[i].scheduledQty=data.qty;
}
}
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},

Loading…
Cancel
Save