报工界面-实际消耗,成品工单编辑优化

master
zhaoxiaolin 11 months ago
parent 793bda2000
commit 5528edad11

@ -24,6 +24,15 @@ export function subChangeWorkOrder(data){
}) })
} }
// 提交修改工单接口
export function subChangeWorkOrderPro(data){
return request({
url:'/plan/pro/workorder/subChangeWorkOrderPro',
method:'post',
data:data
})
}
// 通过子工单查询父工单对应的批次list // 通过子工单查询父工单对应的批次list
export function getWorkBatchList(data){ export function getWorkBatchList(data){
return request({ return request({

@ -475,6 +475,8 @@
<el-table-column width="50" align="center" type="selection"/> <el-table-column width="50" align="center" type="selection"/>
<el-table-column label="id" align="center" prop="id" v-if="false"/> <el-table-column label="id" align="center" prop="id" v-if="false"/>
<el-table-column label="工单编码" width="150" align="left" prop="workorderCode" :show-overflow-tooltip="true" /> <el-table-column label="工单编码" width="150" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="150" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
:formatter="orderCodeFormate"/>
<el-table-column label="报工单号" width="150" align="left" prop="reportCode" :show-overflow-tooltip="true" /> <el-table-column label="报工单号" width="150" align="left" prop="reportCode" :show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch" :show-overflow-tooltip="true" /> <el-table-column label="批次" width="250" align="left" prop="batch" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" prop="unit"/> <el-table-column label="单位" align="center" prop="unit"/>
@ -512,11 +514,13 @@
:label="item.title" :label="item.title"
:name="item.libId" :name="item.libId"
> >
<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList)"></el-button> <!--<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList)"></el-button>-->
<el-table v-loading="loading" :data="item.libList" ref="mypConsumeTable" @selection-change="pConsumeSelection"> <el-table v-loading="loading" :data="item.libList" ref="mypConsumeTable" @selection-change="pConsumeSelection">
<el-table-column width="50" align="center" type="selection"/> <el-table-column width="50" align="center" type="selection"/>
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/> <el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="工单编码" width="140" align="left" prop="workorderCode" :show-overflow-tooltip="true" /> <el-table-column label="工单编码" width="140" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="150" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
:formatter="orderCodeFormate"/>
<el-table-column label="物料编码" width="180" align="left" prop="materialCode" :show-overflow-tooltip="true" /> <el-table-column label="物料编码" width="180" align="left" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" /> <el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="消耗数量" width="120" align="left" prop="quantity" :show-overflow-tooltip="true" > <el-table-column label="消耗数量" width="120" align="left" prop="quantity" :show-overflow-tooltip="true" >
@ -527,13 +531,14 @@
<el-table-column label="单位" width="50" align="center" prop="unit"/> <el-table-column label="单位" width="50" align="center" prop="unit"/>
<el-table-column label="反冲标识" align="center" prop="recoil"/> <el-table-column label="反冲标识" align="center" prop="recoil"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/> <el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
<!--
<el-table-column fixed="right" label="操作" width="90"> <el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)" <el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)"
size="small" type="danger" plain> size="small" type="danger" plain>
移除</el-button> 移除</el-button>
</template> </template>
</el-table-column> </el-table-column>-->
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -1307,13 +1312,13 @@ export default {
}, },
// //
pConsumeSelection(selection) { pConsumeSelection(selection) {
this.pConsumeRows = selection this.pConsumeRows = this.pConsumeRows.concat(selection)
}, },
sConsumeSelection(selection) { sConsumeSelection(selection) {
this.sConsumeRows = selection this.sConsumeRows = selection
}, },
submitConsume() { submitConsume() {
this.consumeRows = this.pConsumeRows.concat(this.sConsumeRows) this.consumeRows = this.pConsumeRows;
if ( this.consumeRows==0) { if ( this.consumeRows==0) {
this.$modal.msgError(`请选择数据`); this.$modal.msgError(`请选择数据`);

@ -635,7 +635,7 @@ import {
downWorkorder, downWorkorder,
getOrderAndWork,getProSortNo, getOrderAndWork,getProSortNo,
getWorkBatchList, getWorkBatchList,
subChangeWorkOrder,subChangeWorkOrderM, subChangeWorkOrderPro,subChangeWorkOrderM,
checkWorkOrder checkWorkOrder
} from '@/api/plan/workorder' } from '@/api/plan/workorder'
import moment from 'moment'; import moment from 'moment';
@ -1296,7 +1296,7 @@ export default {
materialName: this.splitForm.materialName materialName: this.splitForm.materialName
} }
subChangeWorkOrder(data).then(response => { subChangeWorkOrderPro(data).then(response => {
if (response.code == 500) { if (response.code == 500) {
this.$modal.msgError(response.msg) this.$modal.msgError(response.msg)
return return

Loading…
Cancel
Save