|
|
|
@ -76,7 +76,8 @@ |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.refreshButton }} |
|
|
|
</el-button> |
|
|
|
<el-button :disabled="dataListSelections.length <= 0" type="primary" @click="scheduleBatchDialog()" |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.scheduleBatch }} |
|
|
|
style="margin-left: 10px; margin-bottom: 5px;"> |
|
|
|
{{ buttons.scheduleBatch ? buttons.scheduleBatch : '批量排产' }} |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
@ -137,8 +138,8 @@ |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden && item.columnProp == 'resourceList'"> |
|
|
|
<el-select class="table-select-input" v-model="scope.row.resourceId"> |
|
|
|
<el-option v-for="(item,index) in scope.row.resourceList.split(';')" :key="index" |
|
|
|
:value="item.split(':')[0]" :label="item.split(':')[1]"> |
|
|
|
<el-option v-for="(item,index) in scope.row.resourceList" :key="index" |
|
|
|
:value="item.resourceId" :label="item.resourceDesc"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</span> |
|
|
|
@ -1316,46 +1317,13 @@ export default { |
|
|
|
this.scheduleVisible = false |
|
|
|
this.getShopOrderList() |
|
|
|
} else if (data.code == 201) { |
|
|
|
this.$message.warning(data.msg.substring(0,data.msg.indexOf(','))+"!") |
|
|
|
this.$message.warning(data.msg.substring(0, data.msg.indexOf(',')) + "!") |
|
|
|
} else if (data.code == 500) { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* this.$confirm(data.msg, '提示', { |
|
|
|
* confirmButtonText: this.labels.confirmLabel, |
|
|
|
* celButtonText: this.labels.cancelLabel, |
|
|
|
* type: 'warning' |
|
|
|
* }).then(() => { |
|
|
|
* newItemList = [] |
|
|
|
* for (let i = 0; i < this.dataListSelections.length; i++) { |
|
|
|
* let item = this.dataListSelections[i] |
|
|
|
* let newItem = { |
|
|
|
* checkFlag: false, |
|
|
|
* itemNo: item.itemNo, |
|
|
|
* orderNo: item.orderNo, |
|
|
|
* qtyToSchedule: item.scheduledQty, |
|
|
|
* resourceId: item.resourceId, |
|
|
|
* scheduleDate: this.scheduleDate, |
|
|
|
* scheduleTime: this.scheduleTime, |
|
|
|
* scheduledQty: item.qtyToSchedule, |
|
|
|
* site: item.site, |
|
|
|
* specifiedTime: this.specifiedTime, |
|
|
|
* username: this.$store.state.user.name, |
|
|
|
* workCenterNo: item.workCenterNo |
|
|
|
* } |
|
|
|
* newItemList.push(newItem) |
|
|
|
* } |
|
|
|
* batchScheduleOrderWithExpand(newItemList).then(({data}) => { |
|
|
|
* if (data.code == 200) { |
|
|
|
* this.$message.success(data.msg) |
|
|
|
* } else if (data.code == 500) { |
|
|
|
* this.$message.error(data.msg) |
|
|
|
* } |
|
|
|
* }) |
|
|
|
* }); |
|
|
|
*/ |
|
|
|
|
|
|
|
// scheduleBatchDialog |
|
|
|
scheduleBatchDialog() { |
|
|
|
if (this.dataListSelections.find(item => item.resourceId == '' || item.resourceId == null)) { |
|
|
|
@ -1376,7 +1344,30 @@ export default { |
|
|
|
/*获取工单信息*/ |
|
|
|
getShopOrderList() { |
|
|
|
getShopOrderList(this.pageData).then(({data}) => { |
|
|
|
this.shopOrderList = data.rows; |
|
|
|
if (this.pageData.resourceId) { |
|
|
|
this.shopOrderList = data.rows.map(item => { |
|
|
|
item.resourceId = this.pageData.resourceId |
|
|
|
item.resourceList = item.resourceList.split(';').map(resItem => { |
|
|
|
let newItem = { |
|
|
|
resourceId: resItem.split(':')[0], |
|
|
|
resourceDesc: resItem.split(':')[1] |
|
|
|
} |
|
|
|
return newItem; |
|
|
|
}) |
|
|
|
return item; |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.shopOrderList = data.rows.map(item => { |
|
|
|
item.resourceList = item.resourceList.split(';').map(resItem => { |
|
|
|
let newItem = { |
|
|
|
resourceId: resItem.split(':')[0], |
|
|
|
resourceDesc: resItem.split(':')[1] |
|
|
|
} |
|
|
|
return newItem; |
|
|
|
}) |
|
|
|
return item; |
|
|
|
}) |
|
|
|
} |
|
|
|
//清空已经选好的行数据 |
|
|
|
this.currentRoutingRow = null; |
|
|
|
}) |
|
|
|
|