diff --git a/src/api/orderIssure/soIssueNotify.js b/src/api/orderIssure/soIssueNotify.js index 2ed4da4..f621448 100644 --- a/src/api/orderIssure/soIssueNotify.js +++ b/src/api/orderIssure/soIssueNotify.js @@ -29,3 +29,9 @@ export const searchSumNotifyMaterialList= data => createAPI(`/orderIssure/issure export const updateNotifyBu= data => createAPI(`/orderIssure/issureNotify/updateNotifyBu`,'post',data) export const getBuByUserNameSite= data => createAPI(`/pms/eam/getBuByUserNameSite`,'post',data) + +export const getPartList= data => createAPI(`/orderIssure/issureNotify/getPartList`,'post',data) +export const checkPartStock= data => createAPI(`/orderIssure/issureNotify/checkPartStock`,'post',data) +export const deleteNotifySOSPlus= data => createAPI(`/orderIssure/issureNotify/deleteNotifySOSPlus`,'post',data) +export const updateNotifyStatus= data => createAPI(`/orderIssure/issureNotify/updateNotifyStatus`,'post',data) +export const deleteNotifyMaterial= data => createAPI(`/orderIssure/issureNotify/deleteNotifyMaterial`,'post',data) diff --git a/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue b/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue index a30299d..7ec5810 100644 --- a/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue +++ b/src/views/modules/orderIssure/soIssueNotify/newSoIssueNotify.vue @@ -5,7 +5,7 @@ 新建申请单 选择派工单 - 下达申请单 + 下达申请单 删除申请单 修改BU @@ -300,7 +300,7 @@ - + @@ -334,7 +334,18 @@ - + + + + + + + + + + + 非BOM物料 + @@ -386,6 +397,142 @@ 关闭 + + + + + + + + + + + + + + + + + + + + + + {{'查询'}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 确定下达 + + 取消 + + @@ -413,6 +560,8 @@ xiadaNotify, updateNotifyBu, getBuByUserNameSite, + getPartList, + checkPartStock, }from "@/api/orderIssure/soIssueNotify.js" import Chooselist from '@/views/modules/common/Chooselist_eam' export default { @@ -430,6 +579,7 @@ data () { return { buList:[], + partList:[], notifyNo:'', notifyData:{ site:'', @@ -445,6 +595,7 @@ // 是否收藏 favorite: false, changeBuFlag: false, + partModelFlag: false, newBu:'', // 导出 start exportData: [], @@ -466,7 +617,10 @@ sobomData:{ orderno:'', seqno:'', + partNo:'', }, + //申请单序号 + itemNo:'', notifyOrderData:{ partNo:'', orderno:'', @@ -504,6 +658,7 @@ modalDisableFlag:false, saveSeqNoModalFlag:false, bomLoadFlag:false, + xiadaList:[], modalData:{ flag:'', bu: '', @@ -928,7 +1083,7 @@ columnProp: 'partDesc', headerAlign: "center", align: "left", - columnLabel: '物料编码', + columnLabel: '物料描述', columnHidden: false, columnImage: false, columnSortable: false, @@ -1028,6 +1183,14 @@ authUpdate: false, authDelete: false, menuId: this.$route.meta.menuId, + partSearch:{ + site:'', + sourceBu:'', + partNo:'', + partDesc:'', + spec:'', + }, + xiadaModelFlag:false, } }, @@ -1078,7 +1241,57 @@ }) }, + choosePartNo(row){ + let index=0 + // console.log('1:'+this.sobomList.length) + // console.log('2:循环开始') + for (let i = 0; i < this.sobomList.length; i++) { + if(this.sobomList[i].componentPartNo===row.partNo){ + this.$alert('该物料已经在清单中!', '提示', { + confirmButtonText: '确定' + }) + return false + } + // console.log('3:'+this.sobomList[i].bOMItemNo) + // console.log('4:'+this.sobomData.seqno+'-') + if(this.sobomList[i].bOMItemNo.startsWith(this.sobomData.seqno+'-')){ + // console.log('4.9:'+this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length)) + // console.log('5:'+Number(this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length))) + + if(Number(this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length))>index){ + index=Number(this.sobomList[i].bOMItemNo.substring((this.sobomData.seqno+'-').length)) + // console.log('6:'+index) + // console.log('替换结束') + } + } + + } + // console.log('循环结束') + index=index+1 + let inData={ + site:this.notifyData.site, + bOMItemNo:this.sobomData.seqno+'-'+index, + componentPartNo:row.partNo, + notifyNo:this.notifyData.notifyNo, + partDesc:row.partDesc, + itemNo:this.itemNo, + qtyIssue:'', + qtyOnHand:'', + qtyRequired:'', + qtyToIssue:0, + } + this.sobomList.push(inData) + this.partModelFlag=false + }, + tableRowClassName ({row, rowIndex}) { + if(row.qtyToIssue>row.qtyAvailable){ + return 'error-row' + + } + + return '' + }, // 列表方法的回调 getBaseData (val) { if (this.tagNo === 515) { @@ -1104,7 +1317,6 @@ this.notifyData=data.row this.getNotifyNoDetail(); }else { - console.log('!!') this.notifyNo ='' this.notifyData={ site:'', @@ -1241,6 +1453,7 @@ this.saveSeqNoModalFlag=false this.getNotifyNoDetail() this.enterSOS(row); + this.itemNo=data.itemNo }else { this.$alert(data.msg, '错误', { confirmButtonText: '确定' @@ -1264,6 +1477,7 @@ partNo:row.fGPartNo, itemno:row.opsItemNo, } + this.itemNo=row.itemNo this.enterSOS(rows) }, enterSOS(row){ @@ -1273,6 +1487,7 @@ this.sobomData={ orderno:row.orderno, seqno:row.seqno, + partNo:row.partNo, } this.bomLoadFlag=true let inData={ @@ -1437,15 +1652,40 @@ // this.pageIndex = val // this.getDataList() // }, - - - xiadaNotify() { + noBomModel(){ + this.partSearch={ + site:this.notifyData.site, + sourceBu:this.notifyData.bu, + partNo:'', + partDesc:'', + spec:'', + } + this.partModelFlag=true + this. searchPartModel() + }, + searchPartModel(){ + getPartList(this.partSearch).then(({data})=>{ + if (data.code === 0) { + this.partList=data.rows + } + }) + }, + xiadaNotifyModel(){ if(this.dataList.length==0){ this.$alert('没有明细记录无法下达!!', '提示', { confirmButtonText: '确定' }) return false } + checkPartStock(this.notifyData).then(({data})=>{ + if (data.code === 0) { + this.xiadaList=data.rows + } + }) + this.xiadaModelFlag=true + }, + xiadaNotify() { + // if(this.notifyData.planIssueDate==null||this.notifyData.planIssueDate==''){ // this.$alert('请选择要求发料时间!!', '提示', { // confirmButtonText: '确定' @@ -1626,7 +1866,9 @@ } } - diff --git a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue index 1c7bc79..2c5834a 100644 --- a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue +++ b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotify.vue @@ -29,6 +29,20 @@ placeholder="选择日期"> + + + + + + + + + + + + + + 查询 - - - - - - - - - - - - + + + 结束 + 打开 + + + + + 删除 + + + @@ -157,6 +181,17 @@ style="width: 100px; height: 80px"/> + + + 删除 + + + @@ -207,7 +242,9 @@ ,searchNotifyOrderList ,searchNotifyMaterialList ,searchSumNotifyMaterialList - + ,deleteNotifySOSPlus + ,updateNotifyStatus + ,deleteNotifyMaterial }from "@/api/orderIssure/soIssueNotify.js" import Chooselist from '@/views/modules/common/Chooselist' export default { @@ -230,9 +267,11 @@ site:this.$store.state.user.site, userName: '', notifyNo: '', + issueFlag: '', + issueResult: '', startDate: this.dayjs().format("YYYY-MM-DD"), endDate: this.dayjs().format("YYYY-MM-DD"), - + sql: " and a.status!='已计划' ", }, exportList:[], pageIndex: 1, @@ -729,6 +768,23 @@ status: true, fixed: '', columnWidth: 80 + },{ + userId: this.$store.state.user.name, + functionId: 701002, + serialNumber: '701002Table3QtyToIssueOriginal', + tableId: "701002Table3", + tableName: "申请单材料明细表", + columnProp: "qtyToIssueOriginal", + headerAlign: "center", + align: "right", + columnLabel: "已发数量", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 }, ], columnList4:[ @@ -942,7 +998,108 @@ } }); }, - + closeNotify(row){ + this.$confirm('确认关闭?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let inData={ + site:row.site, + notifyNo:row.notifyNo, + status:'已关闭', + } + updateNotifyStatus(inData).then(({data}) => { + if (data && data.code === 0) { + this.searchTable() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + openNotify(row){ + this.$confirm('确认打开?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let inData={ + site:row.site, + notifyNo:row.notifyNo, + status:'已下达', + } + updateNotifyStatus(inData).then(({data}) => { + if (data && data.code === 0) { + this.searchTable() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + deleteNotifyMaterial(row){ + this.$confirm('确认删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteNotifyMaterial(row).then(({data}) => { + if (data && data.code === 0) { + this.refreshCurrentTabTable() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, + deleteNotifySOSPlus(row){ + this.$confirm('确认删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteNotifySOSPlus(row).then(({data}) => { + if (data && data.code === 0) { + this.refreshCurrentTabTable() + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => {} + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + }) + }, //导出excel //导出excel async createExportData() { diff --git a/src/views/modules/orderIssure/soIssueNotify/searchIssureNotifyForCK.vue b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotifyForCK.vue new file mode 100644 index 0000000..6b9571f --- /dev/null +++ b/src/views/modules/orderIssure/soIssueNotify/searchIssureNotifyForCK.vue @@ -0,0 +1,1126 @@ + + + + + + + + + + + + + + + + ➞ + + + + + + + 查询 + + {{ '导出' }} + + + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + +