diff --git a/src/api/orderIssure/soIssueNotify.js b/src/api/orderIssure/soIssueNotify.js index 81c8c07..b41b2d6 100644 --- a/src/api/orderIssure/soIssueNotify.js +++ b/src/api/orderIssure/soIssueNotify.js @@ -45,4 +45,12 @@ export const updateNotifyBatchConfirmStatus= data => createAPI(`/orderIssure/iss export const getSiteAndBuByUserName = data => createAPI(`/orderIssure/issureNotify/getSiteAndBuByUserName`,'post',data) export const getEamWorkShop = data => createAPI(`/orderIssure/issureNotify/getEamWorkShop`,'post',data) -export const getIFSShopOrderByOrderNo = data => createAPI(`/orderIssure/issureNotify/getIFSShopOrderByOrderNo`,'post',data) \ No newline at end of file +export const getIFSShopOrderByOrderNo = data => createAPI(`/orderIssure/issureNotify/getIFSShopOrderByOrderNo`,'post',data) + +export const getShopOrderFromIFSWithOrderNo = data => createAPI(`/orderIssure/newIssure/getShopOrderFromIFSWithOrderNo`,'post',data) + + +export const getSOSBOMForIssureNew = data => createAPI(`/orderIssure/newIssure/getSOSBOMForIssureNew`,'post',data) + + + diff --git a/src/views/modules/orderIssure/newSoIssueNotify.vue b/src/views/modules/orderIssure/newSoIssueNotify.vue index c93bc2a..6aa5700 100644 --- a/src/views/modules/orderIssure/newSoIssueNotify.vue +++ b/src/views/modules/orderIssure/newSoIssueNotify.vue @@ -3,27 +3,15 @@ - + 新建申请单 选择工单 下达申请单 删除申请单 - 非BOM物料 - 不管控物料 + {{'导入'}} - @@ -31,11 +19,6 @@ - @@ -51,38 +34,6 @@ - - - @@ -92,38 +43,8 @@ - - - - @@ -155,85 +76,23 @@ - - - - - - - - - - - - - - - - - - - - - + - - - - - 加工中心 - - - - - - + + - - - + + @@ -271,20 +130,20 @@ - + - - + @@ -297,9 +156,9 @@ - + - + @@ -316,13 +175,13 @@ --> - - - - - - + + + + + + + 全数领料 @@ -335,47 +194,14 @@ 关闭 - - - - - - - - - - - - - - - - - - - - - - - - - 保存 - 关闭 - - - + - @@ -417,90 +243,6 @@ 关闭 - - - - - - - - - - - - - - - - - - - - - - {{'查询'}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{'查询'}} - - - - - - - - - - - - - - - - - -
@@ -605,7 +347,6 @@ import { getAllNotifyStatus, getNotifyNoDetail, saveSOIssueNotifyOrderList, - getSOSBOMForIssure, saveMaterialDetail, deleteNotifySOS, getIFSShopOrderByOrderNo, @@ -613,6 +354,13 @@ import { } from '@/api/orderIssure/soIssueNotify.js' import Chooselist from '@/views/modules/common/Chooselist_eam' import walUploadExcel from './walmart_upload_excel.vue' +import { + getShopOrderFromIFSWithOrderNo, + getSOSBOMForIssureNew, + searchOtherPart, + xiadaNotify +} from '../../../api/orderIssure/soIssueNotify' +import {getTableUserListLanguage} from '../../../api/table' export default { name: 'newSoIssueNotify', @@ -673,7 +421,7 @@ export default { limit: 10, }, sobomData: { - orderno: '', + orderNo: '', seqno: '', partNo: '', }, @@ -683,17 +431,18 @@ export default { partNo: '', orderNo: '', itemNo: '', - seqNo: '', + releaseNo: '', + sequenceNo: '', partDesc: '', qtyrequired: '', - sResourceID: '', issureQty: '', - locationNo: '', needDate: '', }, seqNoData: { site: this.$store.state.user.site, seqno: '', + releaseNo: '', + sequenceNo: '', sResourceID: '', sWorkcenterno: '', operatorId: '', @@ -731,7 +480,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 100, }, { @@ -749,7 +498,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 130, }, { @@ -767,7 +516,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 80, }, { @@ -785,7 +534,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 200, }, ], @@ -816,7 +565,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 50, }, /* { @@ -834,7 +583,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 150, }, */ { @@ -852,61 +601,61 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table1OpsItemNo', + serialNumber: '701001Table1ReleaseNo', tableId: '701001Table1', tableName: '领料申请工单子表', - columnProp: 'opsItemNo', + columnProp: 'releaseNo', headerAlign: 'center', - align: 'right', - columnLabel: '工序', + align: 'center', + columnLabel: 'ReleaseNo', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 80, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table1ItemDesc', + serialNumber: '701001Table1SequenceNo', tableId: '701001Table1', tableName: '领料申请工单子表', - columnProp: 'itemDesc', + columnProp: 'sequenceNo', headerAlign: 'center', - align: 'left', - columnLabel: '工序名称', + align: 'center', + columnLabel: 'SequenceNo', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 100, + fixed: false, + columnWidth: 80, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table1LocationNo', + serialNumber: '701001Table1FgPartNo', tableId: '701001Table1', tableName: '领料申请工单子表', - columnProp: 'locationNo', + columnProp: 'fgPartNo', headerAlign: 'center', - align: 'left', - columnLabel: '机台编码', + align: 'center', + columnLabel: '产成品编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 80, }, { @@ -924,7 +673,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 80, }, { @@ -942,7 +691,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 80, }, ], @@ -950,327 +699,327 @@ export default { { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2Orderno', + serialNumber: '701001Table2OrderNo', tableId: '701001Table2', tableName: '查询派工单', columnProp: 'orderNo', headerAlign: 'center', align: 'center', - columnLabel: '生产订单', + columnLabel: 'OrderNo', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 120, + fixed: false, + columnWidth: 130, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2Itemno', + serialNumber: '701001Table2ReleaseNo', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'itemNo', + columnProp: 'releaseNo', headerAlign: 'center', - align: 'right', - columnLabel: '工序', + align: 'center', + columnLabel: 'ReleaseNo', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 50, + fixed: false, + columnWidth: 80, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2ItemDesc', + serialNumber: '701001Table2SequenceNo', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'itemDesc', + columnProp: 'sequenceNo', headerAlign: 'center', - align: 'left', - columnLabel: '工序名称', + align: 'center', + columnLabel: 'SequenceNo', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 100, + fixed: false, + columnWidth: 80, }, - /* { + { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2Seqno', + serialNumber: '701001Table2Status', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'seqno', + columnProp: 'status', headerAlign: 'center', align: 'center', - columnLabel: '派工单号', + columnLabel: '状态', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 150, - }, */ + fixed: false, + columnWidth: 70, + }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2PartNo', + serialNumber: '701001Table2LotSize', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'partNo', + columnProp: 'lotSize', headerAlign: 'center', - align: 'left', - columnLabel: '物料编码', + align: 'right', + columnLabel: '订单数量', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 80, + fixed: false, + columnWidth: 100, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2Qtyrequired', + serialNumber: '701001Table2QtyComplete', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'qtyRequired', + columnProp: 'qtyComplete', headerAlign: 'center', - align: 'right', - columnLabel: '工单数量', + align: 'center', + columnLabel: '完成数量', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 80, + fixed: false, + columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2Qtyreported', + serialNumber: '701001Table2PartNo', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'qtyReported', + columnProp: 'partNo', headerAlign: 'center', - align: 'right', - columnLabel: '报工数量', + align: 'center', + columnLabel: '物料编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 100, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2SScheduleddate', + serialNumber: '701001Table2PartDesc', tableId: '701001Table2', - tableName: '查询工单', - columnProp: 'sScheduledDate', + tableName: '查询派工单', + columnProp: 'partDesc', headerAlign: 'center', - align: 'left', - columnLabel: '工单日期', + align: 'center', + columnLabel: '物料描述', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 100, + fixed: false, + columnWidth: 200, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2SWorkcenterno', + serialNumber: '701001Table2Uom', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'sWorkCenterNo', + columnProp: 'uom', headerAlign: 'center', - align: 'left', - columnLabel: '加工中心编码', + align: 'center', + columnLabel: '单位', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 80, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2WorkCenterDesc', + serialNumber: '701001Table2StartDate', tableId: '701001Table2', - tableName: '查询工单', - columnProp: 'workCenterDesc', + tableName: '查询派工单', + columnProp: 'startDate', headerAlign: 'center', - align: 'left', - columnLabel: '加工中心名称', + align: 'center', + columnLabel: '开始生产日期', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 100, + fixed: false, + columnWidth: 110, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2SResourceid', + serialNumber: '701001Table2FinishDate', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'sResourceID', + columnProp: 'finishDate', headerAlign: 'center', - align: 'left', - columnLabel: '机台编码', + align: 'center', + columnLabel: '结束生产日期', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 60, + fixed: false, + columnWidth: 110, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2ResourceDesc', + serialNumber: '701001Table2NeedDate', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'resourceDesc', + columnProp: 'needDate', headerAlign: 'center', - align: 'left', - columnLabel: '机台名称', + align: 'center', + columnLabel: '需求日期', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 100, + fixed: false, + columnWidth: 110, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table2OperatorDesc', + serialNumber: '701001Table2Contract', tableId: '701001Table2', tableName: '查询派工单', - columnProp: 'operatorDesc', + columnProp: 'contract', headerAlign: 'center', - align: 'left', - columnLabel: '操作员', + align: 'center', + columnLabel: '合同号', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 100, }, - ], - columnList3: [ { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table3ComponentPartNo', - tableId: '701001Table3', - tableName: '领料申请BOM子表', - columnProp: 'componentPartNo', + serialNumber: '701001Table2CloseCode', + tableId: '701001Table2', + tableName: '查询派工单', + columnProp: 'closeCode', headerAlign: 'center', - align: 'left', - columnLabel: '物料编码', + align: 'center', + columnLabel: '关闭代码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 80, + fixed: false, + columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table3PartDesc', - tableId: '701001Table3', - tableName: '领料申请BOM子表', - columnProp: 'componentPartDesc', + serialNumber: '701001Table2Objstate', + tableId: '701001Table2', + tableName: '查询派工单', + columnProp: 'objstate', headerAlign: 'center', - align: 'left', - columnLabel: '物料描述', + align: 'center', + columnLabel: 'objstate', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 120, - }, + fixed: false, + columnWidth: 100, + } + ], + columnList3: [ { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table3QtyRequired', + serialNumber: '701001Table3ComponentPartNo', tableId: '701001Table3', tableName: '领料申请BOM子表', - columnProp: 'qtyRequired', + columnProp: 'componentPartNo', headerAlign: 'center', - align: 'right', - columnLabel: '需求数量', + align: 'left', + columnLabel: '物料编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 50, + fixed: false, + columnWidth: 80, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table3QtyOnHand', + serialNumber: '701001Table3PartDesc', tableId: '701001Table3', tableName: '领料申请BOM子表', - columnProp: 'qtyOnHand', + columnProp: 'componentPartDesc', headerAlign: 'center', - align: 'right', - columnLabel: '现场库存', + align: 'left', + columnLabel: '物料描述', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', - columnWidth: 50, + fixed: false, + columnWidth: 120, }, { userId: this.$store.state.user.name, functionId: 701001, - serialNumber: '701001Table3StockQty', + serialNumber: '701001Table3QtyRequired', tableId: '701001Table3', tableName: '领料申请BOM子表', - columnProp: 'stockQty', + columnProp: 'qtyRequired', headerAlign: 'center', align: 'right', - columnLabel: 'ERP库存', + columnLabel: '需求数量', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 50, }, { @@ -1288,7 +1037,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 60, }, { @@ -1306,7 +1055,7 @@ export default { columnSortable: false, sortLv: 0, status: true, - fixed: '', + fixed: false, columnWidth: 150, }, ], @@ -1375,56 +1124,19 @@ export default { }, mounted() { - /* this.$nextTick(() => { + this.$nextTick(() => { this.height = window.innerHeight - 300 - }) */ + }) }, created() { // 按钮控制 - this.getButtonAuthData() - // 获取用户的 site 和 bu - //this.getSiteAndBuByUserName() - // 校验用户是否收藏 - /* this.favoriteIsOk()*/ + // this.getButtonAuthData() this.getUserNotifyNo() - // 动态列 - /* this.getTableUserColumn(this.$route.meta.menuId+'table1',1) - this.getTableUserColumn(this.$route.meta.menuId+'table2',2) - this.getTableUserColumn(this.$route.meta.menuId+'table3',3) - this.getTableUserColumn(this.$route.meta.menuId+'table4',4) */ - // if (!this.authSearch) { - // // 获取数据列表 - // this.getDataList() - // } }, methods: { - deleteNotifyMaterial(row) { - this.$confirm('确认删除?', '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - }).then(() => { - deleteNotifyMaterialWithOutLog(row).then(({ data }) => { - if (data && data.code === 0) { - this.searchOtherPart('非BOM物料') - this.searchOtherPart('不管控物料') - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {}, - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定', - }) - } - }) - }) - }, getBaseList(val, type) { this.tagNo = val let conSql = '' @@ -1459,36 +1171,6 @@ export default { } }) }, - chooseNoBomPartNo(row) { - this.otherPartData = { - site: this.notifyData.site, - notifyNo: this.notifyData.notifyNo, - itemNo: 998, - bOMItemNo: '', - componentPartNo: row.partNo, - qtyToIssue: '', - issueType: '非BOM物料', - partDesc: row.partDesc, - umid: row.umid, - remark: '', - } - this.saveOtherPartModalFlag = true - }, - chooseNoControlPartNo(row) { - this.otherPartData = { - site: this.notifyData.site, - notifyNo: this.notifyData.notifyNo, - itemNo: 999, - bOMItemNo: '', - componentPartNo: row.partNo, - qtyToIssue: '', - issueType: '不管控物料', - partDesc: row.partDesc, - umid: row.umid, - remark: '', - } - this.saveOtherPartModalFlag = true - }, tableRowClassName({ row, rowIndex }) { if (row.qtyToIssue > row.qtyAvailable) { return 'error-row' @@ -1624,7 +1306,9 @@ export default { //这边是有个判断的,判断派工单号不能重复 let stop = false for (let i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].seqNo == row.seqno) { + if (this.dataList[i].orderNo == row.orderNo&& + this.dataList[i].releaseNo == row.releaseNo&& + this.dataList[i].sequenceNo == row.sequenceNo) { stop = true } } @@ -1636,33 +1320,34 @@ export default { } } let inData = { - site: '55', - orderNo: '3039496', + site: this.$store.state.user.site, + orderNo: row.orderNo, + releaseNo: row.releaseNo, + sequenceNo: row.sequenceNo, } this.chooseLoading = true - getIFSShopOrderByOrderNo(inData).then(({ data }) => { + getShopOrderFromIFSWithOrderNo(inData).then(({ data }) => { if (data.code === 0) { console.log("data",data); - this.notifyOrderData.partNo = data.shopOrderVo[0].partNo - this.notifyOrderData.orderNo = data.shopOrderVo[0].orderNo - this.notifyOrderData.itemNo = data.shopOrderVo[0].itemNo - this.notifyOrderData.seqNo = data.shopOrderVo[0].seqNo - this.notifyOrderData.partDesc = data.shopOrderVo[0].partDesc - this.notifyOrderData.qtyRequired = data.shopOrderVo[0].lotSize - this.notifyOrderData.sResourceID = row.sResourceID + this.notifyOrderData.partNo = data.rows[0].partNo + this.notifyOrderData.orderNo = data.rows[0].orderNo + this.notifyOrderData.site = this.$store.state.user.site + this.notifyOrderData.partDesc = data.rows[0].partDesc + this.notifyOrderData.qtyRequired = data.rows[0].lotSize + this.notifyOrderData.releaseNo = data.rows[0].releaseNo this.notifyOrderData.issureQty = '' this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm') - this.notifyOrderData.locationNo = row.sResourceID + this.notifyOrderData.sequenceNo = data.rows[0].sequenceNo this.saveSeqNoModalFlag = true }else { this.$meassage.error(data.msg) return; - } + } }).finally(() => { this.chooseLoading = false }) - - + + }, saveSOS() { if ( @@ -1672,24 +1357,23 @@ export default { this.$message.warning('请选择时间!') return false } - // if(this.notifyOrderData.locationNo==null||this.notifyOrderData.locationNo==''){ - // this.$message.warning('请输入机台!') + + // if ( + // this.notifyOrderData.issureQty == null || + // this.notifyOrderData.issureQty == '' || + // this.notifyOrderData.issureQty < 0 + // ) { + // this.$message.warning('请填写领取数量!') // return false // } - if ( - this.notifyOrderData.issureQty == null || - this.notifyOrderData.issureQty == '' || - this.notifyOrderData.issureQty <= 0 - ) { - this.$message.warning('请填写领取数量!') - return false - } let row = this.notifyOrderData console.log("row",row); if (this.dataList.length > 0) { let stop = false for (let i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].seqNo == row.seqno) { + if (this.dataList[i].orderNo == row.orderNo&& + this.dataList[i].releaseNo == row.releaseNo&& + this.dataList[i].sequenceNo == row.sequenceNo) { stop = true } } @@ -1711,12 +1395,12 @@ export default { fgPartNo: row.partNo, soorderNo: row.orderNo, opsItemNo: row.itemNo, - seqNo: row.seqNo, - locationNo: row.locationNo, + sequenceNo: row.sequenceNo, + releaseNo: row.releaseNo, needDate: row.needDate, issureQty: row.issureQty, } - + saveSOIssueNotifyOrderList(inData).then(({ data }) => { if (data.code === 0) { this.saveSeqNoModalFlag = false @@ -1745,27 +1429,17 @@ export default { seqNo: row.seqNo, partNo: row.fgPartNo, itemNo: row.itemNo, + releaseNo: row.releaseNo, + sequenceNo: row.sequenceNo, } //this.searchNotifyMaterialList(rows) this.enterSOS(rows) }, - searchNotifyMaterialList(row){ - this.bomLoadFlag = true - this.materialModalFlag = true - searchNotifyMaterialList(row).then(({ data }) => { - if (data.code === 0) { - this.sobomList = data.rows - this.bomLoadFlag = false - } - }).catch(()=>{ - this.bomLoadFlag = false - }) - }, enterSOS(row) { console.log("row",row); - + this.seqNoModalFlag = false this.materialModalFlag = true this.sobomList = [] @@ -1779,11 +1453,12 @@ export default { site: this.$store.state.user.site, notifyNo: this.notifyNo, orderNo: row.orderNo, - seqNo: row.seqNo, + releaseNo: row.releaseNo, + sequenceNo: row.sequenceNo, partNo: row.partNo, itemNo: row.itemNo, } - getSOSBOMForIssure(inData).then(({ data }) => { + getSOSBOMForIssureNew(inData).then(({ data }) => { this.bomLoadFlag = false if (data.code === 0) { this.sobomList = data.rows @@ -1793,14 +1468,13 @@ export default { } }) }, - ToSOS() { - this.seqNoModalFlag = true - this.materialModalFlag = false - }, + chooseSOSModal() { this.seqNoData = { site: this.$store.state.user.site, - orderno: '', + orderNo: '', + releaseNo: '*', + sequenceNo: '*', seqno: '', sResourceid: '', sWorkcenterno: '', @@ -1809,18 +1483,30 @@ export default { startDate: this.dayjs().format('YYYY-MM-DD'), endDate: this.dayjs().format('YYYY-MM-DD'), } - this.searchSOSRouting() + this.seqNoModalFlag = true }, searchSOSRouting() { - getSOScheduledRoutingListForIssure(this.seqNoData).then(({ data }) => { + if (this.seqNoData.orderNo == null || this.seqNoData.orderNo == '') { + this.$message.warning('请输入OrderNo!') + return false + } + if (this.seqNoData.releaseNo == null || this.seqNoData.releaseNo == '') { + this.$message.warning('请输入ReleaseNo!') + return false + } + if (this.seqNoData.sequenceNo == null || this.seqNoData.sequenceNo == '') { + this.$message.warning('请输入SequenceNo!') + return false + } + getShopOrderFromIFSWithOrderNo(this.seqNoData).then(({ data }) => { if (data.code === 0) { this.seqNoList = data.rows } }) }, saveMaterialDetail() { - + for (let i = 0; i < this.sobomList.length; i++) { if ( this.sobomList[i].applyQty === '' || @@ -1831,7 +1517,7 @@ export default { this.sobomList[i].notifyNo = this.notifyNo this.sobomList[i].site = this.$store.state.user.site } - + let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0) if (materialList.length == 0) { this.$alert('没有需要保存的内容!', '提示', { @@ -1852,51 +1538,6 @@ export default { } }) }, - //获取用户的bu - getSiteAndBuByUserName() { - let tempData = { - username: this.$store.state.user.name, - } - getSiteAndBuByUserName(tempData).then(({ data }) => { - if (data.code === 0 && data.row != null) { - this.userBuList = data.rows - } - }) - }, - // 校验用户是否收藏 - favoriteIsOk() { - let userFavorite = { - userId: this.$store.state.user.id, - languageCode: this.$i18n.locale, - } - userFavoriteList(userFavorite).then(({ data }) => { - for (let i = 0; i < data.list.length; i++) { - if (this.$route.meta.menuId === data.list[i].menuId) { - this.favorite = true - } - } - }) - }, - - // 收藏 OR 取消收藏 - favoriteFunction() { - let userFavorite = { - userId: this.$store.state.user.id, - functionId: this.$route.meta.menuId, - } - if (this.favorite) { - removeUserFavorite(userFavorite).then(({ data }) => { - this.$message.success(data.msg) - this.favorite = false - }) - } else { - // 收藏 - saveUserFavorite(userFavorite).then(({ data }) => { - this.$message.success(data.msg) - this.favorite = true - }) - } - }, //导出excel async createExportData() { @@ -1934,42 +1575,6 @@ export default { let s = eval('(' + json + ')') return s }, - noBomModel() { - this.partSearch = { - site: this.notifyData.site, - sourceBu: this.notifyData.bu, - partNo: '', - partDesc: '', - spec: '', - } - this.partModelFlag = true - this.searchPartModel() - }, - noControlModel() { - this.partSearch = { - site: this.notifyData.site, - sourceBu: this.notifyData.bu, - partNo: '', - partDesc: '', - spec: '', - } - this.noControlPartModelFlag = true - this.searchNoControlPartModel() - }, - searchPartModel() { - getPartList(this.partSearch).then(({ data }) => { - if (data.code === 0) { - this.partList = data.rows - } - }) - }, - searchNoControlPartModel() { - getNoControlPartList(this.partSearch).then(({ data }) => { - if (data.code === 0) { - this.partList2 = data.rows - } - }) - }, xiadaNotifyModel() { if ( this.dataList.length == 0 && @@ -1981,11 +1586,6 @@ export default { }) return false } - /* checkPartStock(this.notifyData).then(({ data }) => { - if (data.code === 0) { - this.xiadaList = data.rows - } - }) */ this.xiadaModelFlag = true }, xiadaNotify() { @@ -2002,14 +1602,14 @@ export default { }) }, saveOtherPart() { - if ( - this.otherPartData.qtyToIssue == null || - this.otherPartData.qtyToIssue == '' || - this.otherPartData.qtyToIssue <= 0 - ) { - this.$message.warning('请填写领取数量!') - return false - } + // if ( + // this.otherPartData.qtyToIssue == null || + // this.otherPartData.qtyToIssue == '' || + // this.otherPartData.qtyToIssue <= 0 + // ) { + // this.$message.warning('请填写领取数量!') + // return false + // } this.$confirm('确定保存' + '?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -2055,51 +1655,6 @@ export default { } }) }, - updateBuModel() { - if (this.dataList.length > 0) { - this.$alert( - '已经选择了工单,无法切换BU,请删除已选工单!', - '错误', - { - confirmButtonText: '确定', - } - ) - } - let inData = { - site: this.notifyData.site, - username: this.$store.state.user.name, - } - getBuByUserNameSite(inData).then(({ data }) => { - if (data && data.code === 0) { - this.buList = data.rows - } - }) - this.newBu = this.notifyData.bu - this.changeBuFlag = true - }, - saveNewBu() { - let inData = { - bu: this.newBu, - site: this.notifyData.site, - notifyNo: this.notifyData.notifyNo, - } - updateNotifyBu(inData).then(({ data }) => { - if (data && data.code === 0) { - this.notifyData.bu = this.newBu - this.changeBuFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => {}, - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定', - }) - } - }) - }, searchOtherPart(type) { let inData = { site: this.notifyData.site, @@ -2144,66 +1699,6 @@ export default { .catch(() => {}) }, - // 动态列开始 获取 用户保存的 格式列 - async getTableUserColumn(tableId, columnId) { - let queryTableUser = { - userId: this.$store.state.user.name, - functionId: this.$route.meta.menuId, - tableId: tableId, - status: true, - languageCode: this.$i18n.locale, - } - await getTableUserListLanguage(queryTableUser).then(({ data }) => { - if (data.rows.length > 0) { - //this.columnList1 = [] - switch (columnId) { - case 1: - this.columnList = data.rows - break - case 2: - this.columnList2 = data.rows - break - case 3: - this.columnList3 = data.rows - break - case 4: - this.columnList4 = data.rows - break - } - } else { - this.getColumnList(tableId, columnId) - } - }) - }, - - // 获取 tableDefault 列 - async getColumnList(tableId, columnId) { - let queryTable = { - functionId: this.$route.meta.menuId, - tableId: tableId, - languageCode: this.$i18n.locale, - } - await getTableDefaultListLanguage(queryTable).then(({ data }) => { - if (!data.rows.length == 0) { - switch (columnId) { - case 1: - this.columnList = data.rows - break - case 2: - this.columnList2 = data.rows - break - case 3: - this.columnList3 = data.rows - break - case 4: - this.columnList4 = data.rows - break - } - } else { - // this.showDefault = true. - } - }) - }, //获取按钮的权限数据 getButtonAuthData() { let searchFlag = this.isAuth(this.menuId + ':search') @@ -2217,12 +1712,7 @@ export default { this.authDelete = !deleteFlag }, - //动态列结束 - importModel() { - this.$nextTick(() => { - this.$refs.walUploadExcel.init() - }) - }, + searchTable() {}, getAllNotifyStatus() { let inData = { diff --git a/src/views/modules/orderIssure/newSoIssueNotify_old.vue b/src/views/modules/orderIssure/newSoIssueNotify_old.vue new file mode 100644 index 0000000..cceb88f --- /dev/null +++ b/src/views/modules/orderIssure/newSoIssueNotify_old.vue @@ -0,0 +1,2304 @@ + + + + + +