|
|
|
@ -330,7 +330,7 @@ |
|
|
|
</download-excel> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:height="height-30" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@ -382,12 +382,15 @@ |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
<el-button v-if="!routingEditBatchVisible" @click="routingEditBatchModel" type="primary" style="margin-left: 2px;">批量编辑</el-button> |
|
|
|
<el-button v-if="routingEditBatchVisible" @click="routingBatchSave" :loading="routingBatchSaveLoading" type="primary" style="margin-left: 2px;">批量保存</el-button> |
|
|
|
<el-button v-if="routingEditBatchVisible" @click="routingEditBatchVisible = false" type="info" style="margin-left: 2px;">取消编辑</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:height="height-32" |
|
|
|
:data="dataList2" |
|
|
|
border |
|
|
|
highlight-current-row |
|
|
|
@ -405,7 +408,20 @@ |
|
|
|
:width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<!-- 批量编辑模式下,可编辑的字段 --> |
|
|
|
<span v-if="routingEditBatchVisible && item.columnProp === 'productionQty'"> |
|
|
|
<el-input-number :controls="false" v-model="scope.row.productionQty" :min="0" size="mini" style="width: 100%;"></el-input-number> |
|
|
|
</span> |
|
|
|
<span v-else-if="routingEditBatchVisible && item.columnProp === 'totalRollQty'"> |
|
|
|
<el-input-number :controls="false" v-model="scope.row.totalRollQty" :min="0" size="mini" style="width: 100%;"></el-input-number> |
|
|
|
</span> |
|
|
|
<span v-else-if="routingEditBatchVisible && item.columnProp === 'totalPerVolume'"> |
|
|
|
<el-input-number :controls="false" v-model="scope.row.totalPerVolume" :min="0" size="mini" style="width: 100%;"></el-input-number> |
|
|
|
</span> |
|
|
|
<span v-else-if="routingEditBatchVisible && item.columnProp === 'remark'"> |
|
|
|
<el-input v-model="scope.row.remark" size="mini" style="width: 100%;"></el-input> |
|
|
|
</span> |
|
|
|
<span v-else-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
@ -432,7 +448,7 @@ |
|
|
|
导出 |
|
|
|
</download-excel> |
|
|
|
<!--2022-08-19 新增工具信息--> |
|
|
|
<el-dropdown trigger="click" style="margin-top: 3px" class="customer-dropdown" @command="handleCommand"> |
|
|
|
<el-dropdown trigger="click" class="customer-dropdown" @command="handleCommand"> |
|
|
|
<el-button type="primary" :disabled="authEdit"> |
|
|
|
主菜单<i class="el-icon-arrow-down el-icon--right"></i> |
|
|
|
</el-button> |
|
|
|
@ -444,7 +460,7 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-table |
|
|
|
:height="height" |
|
|
|
:height="height-33" |
|
|
|
:data="dataList4" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
@ -717,7 +733,8 @@ import { |
|
|
|
} from "@/api/table.js" |
|
|
|
import { |
|
|
|
getSORoutingAvailableResource, |
|
|
|
updateSORoutingAvailableResource |
|
|
|
updateSORoutingAvailableResource, |
|
|
|
batchUpdateSORouting |
|
|
|
} from "@/api/shopOrder/soroutingAvailableResource.js" |
|
|
|
import { |
|
|
|
searchRoutingWithPartNo, |
|
|
|
@ -814,6 +831,9 @@ export default { |
|
|
|
}, |
|
|
|
selectResourceList: [], |
|
|
|
resourceList: [], |
|
|
|
// 工艺路线批量编辑 |
|
|
|
routingEditBatchVisible: false, |
|
|
|
routingBatchSaveLoading: false, |
|
|
|
// 工艺路线变更 |
|
|
|
changeRoutingVisible: false, |
|
|
|
changeBomVisible: false, |
|
|
|
@ -1363,6 +1383,60 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001007, |
|
|
|
serialNumber: '104001007Table2ProductionQty', |
|
|
|
tableId: "104001007Table2", |
|
|
|
tableName: "生产订单工艺路线表", |
|
|
|
columnProp: "productionQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "生产总数", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001007, |
|
|
|
serialNumber: '104001007Table2TotalRollQty', |
|
|
|
tableId: "104001007Table2", |
|
|
|
tableName: "生产订单工艺路线表", |
|
|
|
columnProp: "totalRollQty", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "总卷数", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001007, |
|
|
|
serialNumber: '104001007Table2TotalPerVolume', |
|
|
|
tableId: "104001007Table2", |
|
|
|
tableName: "生产订单工艺路线表", |
|
|
|
columnProp: "totalPerVolume", |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: "每卷总数", |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 104001007, |
|
|
|
@ -2797,6 +2871,42 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 工艺路线批量编辑 |
|
|
|
routingEditBatchModel() { |
|
|
|
if (!this.modelData.orderNo) { |
|
|
|
this.$message.warning('请先选择生产订单!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.routingEditBatchVisible = true |
|
|
|
}, |
|
|
|
// 工艺路线批量保存 |
|
|
|
routingBatchSave() { |
|
|
|
if (this.dataList2.length === 0) { |
|
|
|
this.$message.warning('没有可保存的数据!') |
|
|
|
return |
|
|
|
} |
|
|
|
let params = this.dataList2.map(item => ({ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
orderNo: this.modelData.orderNo, |
|
|
|
itemNo: item.itemNo, |
|
|
|
productionQty: item.productionQty || 0, |
|
|
|
totalRollQty: item.totalRollQty || 0, |
|
|
|
totalPerVolume: item.totalPerVolume || 0, |
|
|
|
remark: item.remark || '' |
|
|
|
})) |
|
|
|
this.routingBatchSaveLoading = true |
|
|
|
batchUpdateSORouting(params).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success('保存成功') |
|
|
|
this.routingEditBatchVisible = false |
|
|
|
this.getShopOrderDetail() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg || '保存失败') |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.routingBatchSaveLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 工艺路线管理 |
|
|
|
getRouting() { |
|
|
|
if (!this.modelData.orderNo) { |
|
|
|
@ -3205,7 +3315,12 @@ export default { |
|
|
|
|
|
|
|
/deep/ .customer-tab .el-tabs__content { |
|
|
|
padding: 3px !important; |
|
|
|
} |
|
|
|
|
|
|
|
/* 工艺路线表格行高样式,确保批量编辑时input框显示完全 */ |
|
|
|
.el-table /deep/ .cell { |
|
|
|
height: auto; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .customer-tab .el-tabs__item { |
|
|
|
|