|
|
|
@ -115,18 +115,18 @@ |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> --> |
|
|
|
</el-tabs> |
|
|
|
<el-dialog title="选择SHIPMENT" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1000px"> |
|
|
|
<el-dialog title="选择SHIPMENT" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1200px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item :label="'shipmentId'"> |
|
|
|
<el-input v-model="seqNoData.orderNo"></el-input> |
|
|
|
<el-input v-model="seqNoData.orderNo" @keyup.enter.native="searchSOSRouting()"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="searchSOSRouting()" class="">查询</el-button> |
|
|
|
|
|
|
|
<el-button type="primary" @click="searchSOSRouting()" class="" :loading="seqNoModalLoading">添加</el-button> |
|
|
|
<el-button type="danger" @click="deleteFromSeqNoList()" class="">删除</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -137,19 +137,24 @@ |
|
|
|
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<div v-if="item.columnProp === 'qtyToApply'"> |
|
|
|
<el-input class="qtyToApplyClass" v-model="scope.row.qtyToApply" style="height: 11px; width: 98%;" |
|
|
|
:step="0" :min="0"></el-input> |
|
|
|
</div> |
|
|
|
<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> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column fixed="left" header-align="center" align="center" width="80" label="操作"> |
|
|
|
<!-- <el-table-column fixed="left" header-align="center" align="center" width="80" label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading" |
|
|
|
@click="chooseSOS(scope.row)">选择</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> --> |
|
|
|
</el-table> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveNewSoIssueNotify" :loading="saveNewLoading">保存</el-button> |
|
|
|
<el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
@ -288,7 +293,7 @@ |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveMaterialDetail()">保存</el-button> |
|
|
|
<!-- <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>--> |
|
|
|
<!-- <el-button type="primary" @click="materialModalFlag=false">关闭</el-button>--> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -466,6 +471,35 @@ |
|
|
|
<el-button type="primary" @click="showAddNotifyTypeDialog=false">取消</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="下达申请单" :close-on-click-modal="false" v-drag :visible.sync="showXiadaNotifyDialog" |
|
|
|
width="400px"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="500px" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="要求发料时间"> |
|
|
|
<el-date-picker |
|
|
|
v-model="xiadaNotifyData.planIssueDate" |
|
|
|
type="datetime" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
placeholder="选择日期时间" |
|
|
|
style="width: 100%"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="备注" class="issueNotify"> |
|
|
|
<el-input type="textarea" v-model="xiadaNotifyData.remark" :rows="3" placeholder="请输入内容" |
|
|
|
style="width: 100%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:30px;text-align:center;"> |
|
|
|
<el-button type="primary" @click="confirmXiadaNotify()">下达</el-button> |
|
|
|
<el-button type="primary" @click="showXiadaNotifyDialog=false">取消</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -485,8 +519,11 @@ import { |
|
|
|
saveShipmentMaterialDetail, |
|
|
|
updateNotifyStatus, |
|
|
|
deleteUnissueNotifyHeader, |
|
|
|
getShipmentAndLineForIssure, |
|
|
|
saveNewShipmentAndLine, |
|
|
|
} from '@/api/shipment/shipmentIssue.js' |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import { get } from 'lodash' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'shipmentIssue', |
|
|
|
@ -675,7 +712,7 @@ export default { |
|
|
|
tableName: '领料申请工单子表', |
|
|
|
columnProp: 'itemNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '序号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
@ -798,10 +835,10 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2Orderno', |
|
|
|
serialNumber: '701001Table2ShipmentId', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'SHIPMENT_ID', |
|
|
|
columnProp: 'shipmentId', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: 'SHIPMENTID', |
|
|
|
@ -811,145 +848,144 @@ export default { |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120, |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
/* { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2Itemno', |
|
|
|
serialNumber: '701001Table2InventoryUom', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'itemNo', |
|
|
|
columnProp: 'inventoryUom', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '工序', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '单位', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 50, |
|
|
|
columnWidth: 60, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2ItemDesc', |
|
|
|
serialNumber: '701001Table2InventoryPartNo', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'itemDesc', |
|
|
|
columnProp: 'inventoryPartNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '工序名称', |
|
|
|
columnLabel: '库存物料号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
}, */ |
|
|
|
columnWidth: 120, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2PartNo', |
|
|
|
serialNumber: '701001Table2ShipmentLineNo', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'STATE', |
|
|
|
columnProp: 'shipmentLineNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '状态', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '行号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80, |
|
|
|
columnWidth: 60, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2PartNo', |
|
|
|
serialNumber: '701001Table2InventoryQty', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'RECEIVER_ADDRESS_NAME', |
|
|
|
columnProp: 'inventoryQty', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '客户', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '库存数量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 120, |
|
|
|
showOverflowTooltip: true, |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2Qtyrequired', |
|
|
|
serialNumber: '701001Table2QtyAssigned', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'SHIPMENT_TYPE', |
|
|
|
columnProp: 'qtyAssigned', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: 'SHIPMENT类型', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '已分配数量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80, |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2Qtyreported', |
|
|
|
serialNumber: '701001Table2QtyToApply', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'CREATED_DATE', |
|
|
|
columnProp: 'qtyToApply', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '创建时间', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '本次申请数量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80, |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2SScheduleddate', |
|
|
|
serialNumber: '701001Table2State', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询工单', |
|
|
|
columnProp: 'PLANNED_SHIP_DATE', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'state', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '计划运输时间', |
|
|
|
columnLabel: '状态', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
columnWidth: 80, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2SScheduleddate', |
|
|
|
serialNumber: '701001Table2NextStepFlow', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询工单', |
|
|
|
columnProp: 'PLANNED_DELIVERY_DATE', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'nextStepFlow', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '计划交付时间', |
|
|
|
columnLabel: '下一步流程', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -958,70 +994,71 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
/* { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2SWorkcenterno', |
|
|
|
serialNumber: '701001Table2ReceiverType', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'sWorkCenterNo', |
|
|
|
columnProp: 'receiverType', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '加工中心编码', |
|
|
|
columnLabel: '接收方类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80, |
|
|
|
columnWidth: 100, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2WorkCenterDesc', |
|
|
|
serialNumber: '701001Table2ReceiverAddressName', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询工单', |
|
|
|
columnProp: 'workCenterDesc', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'receiverAddressName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '加工中心名称', |
|
|
|
columnLabel: '接收方地址名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
columnWidth: 150, |
|
|
|
showOverflowTooltip: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2SResourceid', |
|
|
|
serialNumber: '701001Table2ShipmentType', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'sResourceID', |
|
|
|
columnProp: 'shipmentType', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '机台编码', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '运输类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 60, |
|
|
|
columnWidth: 80, |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2ResourceDesc', |
|
|
|
serialNumber: '701001Table2PlannedShipDate', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'resourceDesc', |
|
|
|
columnProp: 'plannedShipDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '机台名称', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '计划运输时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -1033,13 +1070,13 @@ export default { |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 701001, |
|
|
|
serialNumber: '701001Table2OperatorDesc', |
|
|
|
serialNumber: '701001Table2PlannedDeliveryDate', |
|
|
|
tableId: '701001Table2', |
|
|
|
tableName: '查询派工单', |
|
|
|
columnProp: 'operatorDesc', |
|
|
|
columnProp: 'plannedDeliveryDate', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'left', |
|
|
|
columnLabel: '操作员', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '计划交付时间', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
@ -1047,7 +1084,7 @@ export default { |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 100, |
|
|
|
},*/ |
|
|
|
}, |
|
|
|
], |
|
|
|
columnList3: [ |
|
|
|
{ |
|
|
|
@ -1062,7 +1099,7 @@ export default { |
|
|
|
columnLabel: '物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
columnSortable: true, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
@ -1256,13 +1293,20 @@ export default { |
|
|
|
selectedNotifyType: 'production', |
|
|
|
selectedNotifyRemark: '', |
|
|
|
chooseLoading: false, |
|
|
|
seqNoModalLoading: false, |
|
|
|
saveNewLoading: false, |
|
|
|
showXiadaNotifyDialog: false, |
|
|
|
xiadaNotifyData: { |
|
|
|
planIssueDate: '', |
|
|
|
remark: '', |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
/* this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 300 |
|
|
|
}) */ |
|
|
|
this.$nextTick(() => { |
|
|
|
this.height = window.innerHeight - 230 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
@ -1546,6 +1590,45 @@ export default { |
|
|
|
this.chooseLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveNewSoIssueNotify() { |
|
|
|
for (let i = 0; i < this.seqNoList.length; i++) { |
|
|
|
if ( |
|
|
|
this.seqNoList[i].qtyToApply === '' || |
|
|
|
this.seqNoList[i].qtyToApply == null |
|
|
|
) { |
|
|
|
this.seqNoList[i].qtyToApply = 0 |
|
|
|
} |
|
|
|
this.seqNoList[i].notifyNo = this.notifyNo |
|
|
|
this.seqNoList[i].site = this.$store.state.user.site |
|
|
|
} |
|
|
|
|
|
|
|
let materialList = this.seqNoList.filter((item) => item.qtyToApply > 0) |
|
|
|
if (materialList.length == 0) { |
|
|
|
this.$alert('没有需要保存的内容!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
console.log('this.sobomList', materialList) |
|
|
|
var savaNotify = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
notifyNo: this.notifyNo, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
materialList: materialList, |
|
|
|
} |
|
|
|
this.saveNewLoading = true |
|
|
|
saveNewShipmentAndLine(savaNotify).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.seqNoModalFlag = false |
|
|
|
this.getUserNotifyNo() |
|
|
|
this.$message.success('操作成功') |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.saveNewLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveSOS() { |
|
|
|
if ( |
|
|
|
this.notifyOrderData.needDate == null || |
|
|
|
@ -1593,8 +1676,8 @@ export default { |
|
|
|
|
|
|
|
saveShipmentOrderList(inData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.saveSeqNoModalFlag = false; |
|
|
|
(() => { |
|
|
|
this.saveSeqNoModalFlag = false |
|
|
|
;(() => { |
|
|
|
// 同步代码块:赋值操作在此完成 |
|
|
|
row.itemNo = data.itemNo |
|
|
|
})() |
|
|
|
@ -1693,14 +1776,74 @@ export default { |
|
|
|
operatorId: '', |
|
|
|
} |
|
|
|
//this.searchSOSRouting()查询工单列表 |
|
|
|
this.seqNoList = [] |
|
|
|
this.seqNoModalFlag = true |
|
|
|
}, |
|
|
|
searchSOSRouting() { |
|
|
|
getShipmentListForIssure(this.seqNoData).then(({ data }) => { |
|
|
|
if (this.seqNoData.orderNo == null || this.seqNoData.orderNo == '') { |
|
|
|
this.$message.warning('请输入shipmentid!') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (!this.seqNoList) { |
|
|
|
this.seqNoList = [] |
|
|
|
} |
|
|
|
// 调用接口前判断this.seqNoList是否存在orderNo |
|
|
|
const orderNoExists = this.seqNoList.some(row => row.shipmentId === this.seqNoData.orderNo) |
|
|
|
if (orderNoExists) { |
|
|
|
this.$message.warning('该shipmentId的数据已存在,请先删除再添加!') |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
const dataListExists = this.dataList.some(row => row.soorderNo === this.seqNoData.orderNo) |
|
|
|
if (dataListExists) { |
|
|
|
this.$message.warning('该shipmentId的数据已添加过,请先删除再添加!') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.seqNoModalLoading = true |
|
|
|
getShipmentAndLineForIssure(this.seqNoData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.seqNoList = data.rows |
|
|
|
} |
|
|
|
// 将返回的数据添加到this.seqNoList中,而不是替换 |
|
|
|
data.rows.forEach((newRow) => { |
|
|
|
// 初始化每行的需求数量(需求数量 - 已发数量 - 预留数量) |
|
|
|
const inventoryQty = parseFloat(newRow.inventoryQty) || 0 |
|
|
|
const qtyAssigned = parseFloat(newRow.qtyAssigned) || 0 |
|
|
|
const qtyToApply = inventoryQty - qtyAssigned |
|
|
|
this.$set( |
|
|
|
newRow, |
|
|
|
'qtyToApply', |
|
|
|
qtyToApply > 0 ? qtyToApply : 0 |
|
|
|
) |
|
|
|
// 添加到列表中 |
|
|
|
this.seqNoList.push(newRow) |
|
|
|
}) |
|
|
|
this.$message.success(`成功添加 ${data.rows.length} 条数据`) |
|
|
|
}else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}).catch((e) => { |
|
|
|
this.$message.error(e.msg || '查询失败') |
|
|
|
return |
|
|
|
}).finally(() => { |
|
|
|
this.seqNoModalLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteFromSeqNoList() { |
|
|
|
if (!this.seqNoData.orderNo || this.seqNoData.orderNo.trim() === '') { |
|
|
|
this.$message.warning('请输入shipmentId') |
|
|
|
return |
|
|
|
} |
|
|
|
const orderNo = this.seqNoData.orderNo.trim() |
|
|
|
const originalLength = this.seqNoList.length |
|
|
|
// 过滤掉 shipmentId 和 orderNo 相同的数据 |
|
|
|
this.seqNoList = this.seqNoList.filter((item) => { |
|
|
|
return item.shipmentId !== orderNo |
|
|
|
}) |
|
|
|
const deletedCount = originalLength - this.seqNoList.length |
|
|
|
if (deletedCount > 0) { |
|
|
|
this.$message.success(`成功删除 ${deletedCount} 条数据`) |
|
|
|
} else { |
|
|
|
this.$message.warning('未找到匹配的数据') |
|
|
|
} |
|
|
|
}, |
|
|
|
saveMaterialDetail() { |
|
|
|
for (let i = 0; i < this.sobomList.length; i++) { |
|
|
|
@ -1721,7 +1864,6 @@ export default { |
|
|
|
saveShipmentMaterialDetail(materialList).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.materialModalFlag = false |
|
|
|
this.chooseSOSModal() |
|
|
|
this.$message.success('操作成功') |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
@ -1849,38 +1991,56 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
xiadaNotifyModel() { |
|
|
|
// 检查是否有明细记录 |
|
|
|
if ( |
|
|
|
this.dataList.length == 0 && |
|
|
|
this.dataList2.length == 0 && |
|
|
|
this.dataList3.length == 0 |
|
|
|
this.dataList.length == 0 |
|
|
|
) { |
|
|
|
this.$alert('没有明细记录无法下达!!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$confirm('确定下达' + '?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
}).then(() => { |
|
|
|
updateNotifyStatus(this.notifyData) |
|
|
|
.then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.$message.success('下达成功') |
|
|
|
this.getUserNotifyNo() |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.$message.error(data.msg) |
|
|
|
}) |
|
|
|
}) |
|
|
|
/* checkPartStock(this.notifyData).then(({ data }) => { |
|
|
|
// 初始化弹框数据 |
|
|
|
this.xiadaNotifyData = { |
|
|
|
planIssueDate: this.notifyData.planIssueDate || this.dayjs().format('YYYY-MM-DD HH:mm:ss'), |
|
|
|
remark: this.notifyData.remark || '', |
|
|
|
} |
|
|
|
// 打开弹框 |
|
|
|
this.showXiadaNotifyDialog = true |
|
|
|
}, |
|
|
|
confirmXiadaNotify() { |
|
|
|
if ( |
|
|
|
this.dataList.length == 0 |
|
|
|
) { |
|
|
|
this.$alert('没有明细记录无法下达!!', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
return false |
|
|
|
} |
|
|
|
// 验证要求发料时间 |
|
|
|
if (!this.xiadaNotifyData.planIssueDate || this.xiadaNotifyData.planIssueDate === '') { |
|
|
|
this.$message.warning('请选择要求发料时间!') |
|
|
|
return false |
|
|
|
} |
|
|
|
// 准备下达数据 |
|
|
|
const notifyData = { |
|
|
|
...this.notifyData, |
|
|
|
planIssueDate: this.xiadaNotifyData.planIssueDate, |
|
|
|
remark: this.xiadaNotifyData.remark, |
|
|
|
} |
|
|
|
// 执行下达操作 |
|
|
|
updateNotifyStatus(notifyData).then(({ data }) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.xiadaList = data.rows |
|
|
|
this.showXiadaNotifyDialog = false |
|
|
|
this.xiadaModelFlag = false |
|
|
|
this.getUserNotifyNo() |
|
|
|
this.$message.success('操作成功') |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) */ |
|
|
|
//this.xiadaModelFlag = true |
|
|
|
}) |
|
|
|
}, |
|
|
|
xiadaNotify() { |
|
|
|
xiadaNotify(this.notifyData).then(({ data }) => { |
|
|
|
@ -2155,6 +2315,9 @@ export default { |
|
|
|
font-size: 12px; |
|
|
|
height: 20px; |
|
|
|
} |
|
|
|
.qtyToApplyClass /deep/.el-input__inner { |
|
|
|
height: 14px !important; |
|
|
|
} |
|
|
|
</style> |
|
|
|
<style scoped> |
|
|
|
/* 选择工单弹窗:紧凑表格与按钮样式 */ |
|
|
|
|