Browse Source

2025-12-11

生产订单列表工艺路线增加批量修改功能,增加三个字段:生产总数、总卷数、每卷总数
master
fengyuan_yang 1 month ago
parent
commit
5e3f4bd2bf
  1. 3
      src/api/shopOrder/soroutingAvailableResource.js
  2. 1
      src/views/modules/qc/inboundNotification.vue
  3. 1
      src/views/modules/qc/outboundNotification.vue
  4. 127
      src/views/modules/shopOrder/shopOrder/shopOrderList.vue

3
src/api/shopOrder/soroutingAvailableResource.js

@ -6,3 +6,6 @@ export const getSORoutingAvailableResource = data => createAPI(`/shoporder/sorou
// 修改生产订单工序可用机台 // 修改生产订单工序可用机台
export const updateSORoutingAvailableResource = data => createAPI(`/shoporder/soroutingAvailableResource/updateSORoutingAvailableResource`,'post',data) export const updateSORoutingAvailableResource = data => createAPI(`/shoporder/soroutingAvailableResource/updateSORoutingAvailableResource`,'post',data)
// 批量更新工艺路线(生产总数、总卷数、每卷总数、备注)
export const batchUpdateSORouting = data => createAPI(`/shoporder/sorouting/batchUpdateSORouting`,'post',data)

1
src/views/modules/qc/inboundNotification.vue

@ -180,6 +180,7 @@
<el-button type="primary" @click="deleteInboundDetail()" icon="el-icon-minus">删除</el-button> <el-button type="primary" @click="deleteInboundDetail()" icon="el-icon-minus">删除</el-button>
<el-button v-if="!editBatchVisible" @click="editBatchModel">批量编辑</el-button> <el-button v-if="!editBatchVisible" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button> <el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button>
<el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button>
</el-form> </el-form>
<el-table <el-table
:data="detailList" :data="detailList"

1
src/views/modules/qc/outboundNotification.vue

@ -180,6 +180,7 @@
<el-button type="primary" @click="deleteOutboundDetail()" icon="el-icon-minus">删除</el-button> <el-button type="primary" @click="deleteOutboundDetail()" icon="el-icon-minus">删除</el-button>
<el-button v-if="!editBatchVisible" @click="editBatchModel">批量编辑</el-button> <el-button v-if="!editBatchVisible" @click="editBatchModel">批量编辑</el-button>
<el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button> <el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button>
<el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button>
</el-form> </el-form>
<el-table <el-table
:data="detailList" :data="detailList"

127
src/views/modules/shopOrder/shopOrder/shopOrderList.vue

@ -330,7 +330,7 @@
</download-excel> </download-excel>
</el-form> </el-form>
<el-table <el-table
:height="height"
:height="height-30"
:data="dataList" :data="dataList"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
@ -382,12 +382,15 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </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-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-table <el-table
:height="height"
:height="height-32"
:data="dataList2" :data="dataList2"
border border
highlight-current-row highlight-current-row
@ -405,7 +408,20 @@
:width="item.columnWidth" :width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <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]" <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span> style="width: 100px; height: 80px"/></span>
</template> </template>
@ -432,7 +448,7 @@
导出 导出
</download-excel> </download-excel>
<!--2022-08-19 新增工具信息--> <!--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"> <el-button type="primary" :disabled="authEdit">
主菜单<i class="el-icon-arrow-down el-icon--right"></i> 主菜单<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
@ -444,7 +460,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
:height="height"
:height="height-33"
:data="dataList4" :data="dataList4"
border border
v-loading="dataListLoading" v-loading="dataListLoading"
@ -717,7 +733,8 @@ import {
} from "@/api/table.js" } from "@/api/table.js"
import { import {
getSORoutingAvailableResource, getSORoutingAvailableResource,
updateSORoutingAvailableResource
updateSORoutingAvailableResource,
batchUpdateSORouting
} from "@/api/shopOrder/soroutingAvailableResource.js" } from "@/api/shopOrder/soroutingAvailableResource.js"
import { import {
searchRoutingWithPartNo, searchRoutingWithPartNo,
@ -814,6 +831,9 @@ export default {
}, },
selectResourceList: [], selectResourceList: [],
resourceList: [], resourceList: [],
// 线
routingEditBatchVisible: false,
routingBatchSaveLoading: false,
// 线 // 线
changeRoutingVisible: false, changeRoutingVisible: false,
changeBomVisible: false, changeBomVisible: false,
@ -1363,6 +1383,60 @@ export default {
fixed: '', fixed: '',
columnWidth: 80 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, userId: this.$store.state.user.name,
functionId: 104001007, 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() { getRouting() {
if (!this.modelData.orderNo) { if (!this.modelData.orderNo) {
@ -3205,7 +3315,12 @@ export default {
/deep/ .customer-tab .el-tabs__content { /deep/ .customer-tab .el-tabs__content {
padding: 3px !important; padding: 3px !important;
}
/* 工艺路线表格行高样式,确保批量编辑时input框显示完全 */
.el-table /deep/ .cell {
height: auto;
line-height: 1.5;
} }
/deep/ .customer-tab .el-tabs__item { /deep/ .customer-tab .el-tabs__item {

Loading…
Cancel
Save