diff --git a/src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue b/src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue
index 8710e62..0a555cc 100644
--- a/src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue
+++ b/src/views/modules/haianWarehouse/noOrderIssue/noOrderNotification54.vue
@@ -396,7 +396,8 @@
- 指定物料
+
+ 指定物料
@@ -2031,6 +2032,11 @@ export default {
this.$alert('未下达申请单不允许指定物料', '提示', { confirmButtonText: '确定' })
return
}
+ // 已申请物料行已推送WCS时,物料弹框内不能再指定 - rqrq
+ if (this.clickrow && this.clickrow.pushWmsFlag === 'Y') {
+ this.$alert('该订单行已推送WCS,不允许指定物料', '提示', { confirmButtonText: '确定' })
+ return
+ }
const parentItemNo = (this.clickrow && this.clickrow.itemNo) || row.itemNo
const bomItemNo = row.bOMItemNo || row.bomItemNo || '*'
this.noOrderAllocForm = {
diff --git a/src/views/modules/haianWarehouse/poOrder/newPoIssueNotify54.vue b/src/views/modules/haianWarehouse/poOrder/newPoIssueNotify54.vue
index 71dfcf7..83ffed1 100644
--- a/src/views/modules/haianWarehouse/poOrder/newPoIssueNotify54.vue
+++ b/src/views/modules/haianWarehouse/poOrder/newPoIssueNotify54.vue
@@ -84,7 +84,7 @@
-
+
@@ -681,7 +681,7 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
+ columnWidth: 70,
},
/* {
userId: this.$store.state.user.name,
@@ -735,7 +735,7 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 70,
+ columnWidth: 40,
},
/* {
userId: this.$store.state.user.name,
@@ -782,34 +782,16 @@ export default {
columnProp: 'isInWh',
headerAlign: 'center',
align: 'left',
- columnLabel: '是否在立库',
- columnHidden: false,
- columnImage: false,
- columnSortable: false,
- sortLv: 0,
- status: true,
- fixed: false,
- columnWidth: 100,
- },
- {
- userId: this.$store.state.user.name,
- functionId: 555001,
- serialNumber: '555001Table2ComponentPartDesc',
- tableId: '555001Table2',
- tableName: '查询工单及物料',
- columnProp: 'componentPartDescription',
- headerAlign: 'center',
- align: 'left',
- columnLabel: '物料描述',
+ columnLabel: '在立库',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 180,
- showOverflowTooltip: true,
+ columnWidth: 50,
},
+
{
userId: this.$store.state.user.name,
functionId: 555001,
@@ -826,7 +808,7 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
+ columnWidth: 80,
},
{
@@ -845,7 +827,7 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@@ -863,7 +845,7 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@@ -881,7 +863,26 @@ export default {
sortLv: 0,
status: true,
fixed: false,
- columnWidth: 100,
+ columnWidth: 80,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 555001,
+ serialNumber: '555001Table2ComponentPartDesc',
+ tableId: '555001Table2',
+ tableName: '查询工单及物料',
+ columnProp: 'componentPartDescription',
+ headerAlign: 'center',
+ align: 'left',
+ columnLabel: '物料描述',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: false,
+ columnWidth: 180,
+ showOverflowTooltip: true,
},
{
userId: this.$store.state.user.name,
@@ -1815,7 +1816,7 @@ export default {
}
if (this.seqNoModalLoading) {
console.log("正在加载中,防重复提交");
-
+
return;
}
this.seqNoModalLoading = true
@@ -1824,7 +1825,7 @@ export default {
outsourcingNo: this.seqNoData.orderNo,
}
console.log("params", params);
-
+
getShopOrderAndMaterialByShoporder(params)
.then(({ data }) => {
if (data.code === 0) {
diff --git a/src/views/modules/haianWarehouse/poOrder/searchPoIssureNotify54.vue b/src/views/modules/haianWarehouse/poOrder/searchPoIssureNotify54.vue
index b0bcbab..33a3f3d 100644
--- a/src/views/modules/haianWarehouse/poOrder/searchPoIssureNotify54.vue
+++ b/src/views/modules/haianWarehouse/poOrder/searchPoIssureNotify54.vue
@@ -220,7 +220,8 @@
width="110"
label="操作">
- 指定物料
+
+ 指定物料
@@ -2344,9 +2345,8 @@ export default {
this.dataList2 = data && data.code === 0 ? (data.rows || []) : []
})
} else if (this.activeName === 'sub') {
- haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
- this.dataList3 = data && data.code === 0 ? (data.rows || []) : []
- })
+ // 材料明细指定权限要看本行订单是否已推送,订单行和材料行一起取 - rqrq
+ this.loadMaterialListWithOrderPushFlag(queryData)
} else if (this.activeName === 'change') {
haiAnSearchNotifyLogNew(queryData).then(({ data }) => {
this.dataList5 = data && data.code === 0 ? (data.rows || []) : []
@@ -2654,6 +2654,66 @@ export default {
}).finally(() => {
this.allocDetailLoading = false
})
+ },
+ /**
+ * 材料明细和订单行一起查询。按订单序号把本行是否已推送WCS写回材料行,已推送的行不能指定物料。- rqrq
+ * @param queryData 当前申请单查询条件,必须带登录site和申请单号
+ */
+ loadMaterialListWithOrderPushFlag (queryData) {
+ const materialRequest = haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
+ return data && data.code === 0 ? (data.rows || []) : []
+ }).catch(() => [])
+ const orderRequest = haiAnSearchNotifyOrderListNew(queryData).then(({ data }) => {
+ return data && data.code === 0 ? (data.rows || []) : []
+ }).catch(() => [])
+ Promise.all([materialRequest, orderRequest]).then(([materialRows, orderRows]) => {
+ const pushFlagByItemNo = {}
+ orderRows.forEach(orderRow => {
+ pushFlagByItemNo[this.normalizeNotifyItemNo(orderRow.itemNo)] = orderRow.pushWmsFlag
+ })
+ materialRows.forEach(materialRow => {
+ const orderPushFlag = pushFlagByItemNo[this.normalizeNotifyItemNo(materialRow.itemNo)]
+ if (orderPushFlag) {
+ materialRow.pushWmsFlag = orderPushFlag
+ }
+ })
+ this.dataList2 = orderRows
+ this.dataList3 = materialRows
+ })
+ },
+ /**
+ * 订单序号统一成可比较文本,避免 1 和 1.0 对不上导致已推送行仍能指定。- rqrq
+ */
+ normalizeNotifyItemNo (value) {
+ if (value === null || value === undefined || value === '') {
+ return ''
+ }
+ const text = String(value).trim()
+ if (text === '') {
+ return ''
+ }
+ const numberValue = Number(text)
+ return Number.isNaN(numberValue) ? text : String(numberValue)
+ },
+ /**
+ * 取材料行所属订单的推送标记。同一申请单下按订单序号匹配申请单明细,匹配不到再用材料行自带标记。- rqrq
+ */
+ resolveMaterialOrderPushFlag (row) {
+ if (!row) {
+ return ''
+ }
+ const itemKey = this.normalizeNotifyItemNo(row.itemNo)
+ const orderRow = (this.dataList2 || []).find(item => this.normalizeNotifyItemNo(item.itemNo) === itemKey)
+ if (orderRow && orderRow.pushWmsFlag) {
+ return orderRow.pushWmsFlag
+ }
+ return row.pushWmsFlag || ''
+ },
+ /**
+ * 材料行能否指定物料:申请单已下达,且本行订单未推送WCS。- rqrq
+ */
+ canSpecifyMaterial (row) {
+ return !!(this.currentRow && this.currentRow.status === 'ISSUE' && this.resolveMaterialOrderPushFlag(row) !== 'Y')
},
/**
* 打开指定物料策略弹窗:以订单行itemNo+BOM行号隔离当前物料;未下达不允许指定 - rqrq
@@ -2664,6 +2724,11 @@ export default {
this.$alert('未下达申请单不允许指定物料', '提示', { confirmButtonText: '确定' })
return
}
+ // 本行订单已推送WCS时拒绝打开指定弹框,避免立库已接单后改分配 - rqrq
+ if (this.resolveMaterialOrderPushFlag(row) === 'Y') {
+ this.$alert('该订单行已推送WCS,不允许指定物料', '提示', { confirmButtonText: '确定' })
+ return
+ }
const parentItemNo = row.itemNo
const bomItemNo = row.bOMItemNo || row.BOMItemNo || row.bomItemNo || row.bomitemNo
if (parentItemNo == null || parentItemNo === '') {
diff --git a/src/views/modules/haianWarehouse/shipment/shipmentNotification54.vue b/src/views/modules/haianWarehouse/shipment/shipmentNotification54.vue
index aa4fe4b..389d99c 100644
--- a/src/views/modules/haianWarehouse/shipment/shipmentNotification54.vue
+++ b/src/views/modules/haianWarehouse/shipment/shipmentNotification54.vue
@@ -220,7 +220,8 @@
width="110"
label="操作">
- 指定物料
+
+ 指定物料
@@ -2344,9 +2345,8 @@ export default {
this.dataList2 = data && data.code === 0 ? (data.rows || []) : []
})
} else if (this.activeName === 'sub') {
- haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
- this.dataList3 = data && data.code === 0 ? (data.rows || []) : []
- })
+ // 材料明细指定权限要看本行订单是否已推送,订单行和材料行一起取 - rqrq
+ this.loadMaterialListWithOrderPushFlag(queryData)
} else if (this.activeName === 'change') {
haiAnSearchNotifyLogNew(queryData).then(({ data }) => {
this.dataList5 = data && data.code === 0 ? (data.rows || []) : []
@@ -2654,6 +2654,66 @@ export default {
}).finally(() => {
this.allocDetailLoading = false
})
+ },
+ /**
+ * 材料明细和订单行一起查询。按订单序号把本行是否已推送WCS写回材料行,已推送的行不能指定物料。- rqrq
+ * @param queryData 当前申请单查询条件,必须带登录site和申请单号
+ */
+ loadMaterialListWithOrderPushFlag (queryData) {
+ const materialRequest = haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
+ return data && data.code === 0 ? (data.rows || []) : []
+ }).catch(() => [])
+ const orderRequest = haiAnSearchNotifyOrderListNew(queryData).then(({ data }) => {
+ return data && data.code === 0 ? (data.rows || []) : []
+ }).catch(() => [])
+ Promise.all([materialRequest, orderRequest]).then(([materialRows, orderRows]) => {
+ const pushFlagByItemNo = {}
+ orderRows.forEach(orderRow => {
+ pushFlagByItemNo[this.normalizeNotifyItemNo(orderRow.itemNo)] = orderRow.pushWmsFlag
+ })
+ materialRows.forEach(materialRow => {
+ const orderPushFlag = pushFlagByItemNo[this.normalizeNotifyItemNo(materialRow.itemNo)]
+ if (orderPushFlag) {
+ materialRow.pushWmsFlag = orderPushFlag
+ }
+ })
+ this.dataList2 = orderRows
+ this.dataList3 = materialRows
+ })
+ },
+ /**
+ * 订单序号统一成可比较文本,避免 1 和 1.0 对不上导致已推送行仍能指定。- rqrq
+ */
+ normalizeNotifyItemNo (value) {
+ if (value === null || value === undefined || value === '') {
+ return ''
+ }
+ const text = String(value).trim()
+ if (text === '') {
+ return ''
+ }
+ const numberValue = Number(text)
+ return Number.isNaN(numberValue) ? text : String(numberValue)
+ },
+ /**
+ * 取材料行所属订单的推送标记。同一申请单下按订单序号匹配申请单明细,匹配不到再用材料行自带标记。- rqrq
+ */
+ resolveMaterialOrderPushFlag (row) {
+ if (!row) {
+ return ''
+ }
+ const itemKey = this.normalizeNotifyItemNo(row.itemNo)
+ const orderRow = (this.dataList2 || []).find(item => this.normalizeNotifyItemNo(item.itemNo) === itemKey)
+ if (orderRow && orderRow.pushWmsFlag) {
+ return orderRow.pushWmsFlag
+ }
+ return row.pushWmsFlag || ''
+ },
+ /**
+ * 材料行能否指定物料:申请单已下达,且本行订单未推送WCS。- rqrq
+ */
+ canSpecifyMaterial (row) {
+ return !!(this.currentRow && this.currentRow.status === 'ISSUE' && this.resolveMaterialOrderPushFlag(row) !== 'Y')
},
/**
* 打开指定物料策略弹窗:以订单行itemNo+BOM行号隔离当前物料;未下达不允许指定 - rqrq
@@ -2664,6 +2724,11 @@ export default {
this.$alert('未下达申请单不允许指定物料', '提示', { confirmButtonText: '确定' })
return
}
+ // 本行订单已推送WCS时拒绝打开指定弹框,避免立库已接单后改分配 - rqrq
+ if (this.resolveMaterialOrderPushFlag(row) === 'Y') {
+ this.$alert('该订单行已推送WCS,不允许指定物料', '提示', { confirmButtonText: '确定' })
+ return
+ }
const parentItemNo = row.itemNo
const bomItemNo = row.bOMItemNo || row.BOMItemNo || row.bomItemNo || row.bomitemNo
if (parentItemNo == null || parentItemNo === '') {
diff --git a/src/views/modules/haianWarehouse/shopOrderIssueNotify/ShopOrderIssueNotify54.vue b/src/views/modules/haianWarehouse/shopOrderIssueNotify/ShopOrderIssueNotify54.vue
index 6809a97..7b68feb 100644
--- a/src/views/modules/haianWarehouse/shopOrderIssueNotify/ShopOrderIssueNotify54.vue
+++ b/src/views/modules/haianWarehouse/shopOrderIssueNotify/ShopOrderIssueNotify54.vue
@@ -135,7 +135,7 @@
-
- 指定物料
+
+ 指定物料
@@ -2344,9 +2345,8 @@ export default {
this.dataList2 = data && data.code === 0 ? (data.rows || []) : []
})
} else if (this.activeName === 'sub') {
- haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
- this.dataList3 = data && data.code === 0 ? (data.rows || []) : []
- })
+ // 材料明细指定权限要看本行订单是否已推送,订单行和材料行一起取 - rqrq
+ this.loadMaterialListWithOrderPushFlag(queryData)
} else if (this.activeName === 'change') {
haiAnSearchNotifyLogNew(queryData).then(({ data }) => {
this.dataList5 = data && data.code === 0 ? (data.rows || []) : []
@@ -2654,6 +2654,66 @@ export default {
}).finally(() => {
this.allocDetailLoading = false
})
+ },
+ /**
+ * 材料明细和订单行一起查询。按订单序号把本行是否已推送WCS写回材料行,已推送的行不能指定物料。- rqrq
+ * @param queryData 当前申请单查询条件,必须带登录site和申请单号
+ */
+ loadMaterialListWithOrderPushFlag (queryData) {
+ const materialRequest = haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
+ return data && data.code === 0 ? (data.rows || []) : []
+ }).catch(() => [])
+ const orderRequest = haiAnSearchNotifyOrderListNew(queryData).then(({ data }) => {
+ return data && data.code === 0 ? (data.rows || []) : []
+ }).catch(() => [])
+ Promise.all([materialRequest, orderRequest]).then(([materialRows, orderRows]) => {
+ const pushFlagByItemNo = {}
+ orderRows.forEach(orderRow => {
+ pushFlagByItemNo[this.normalizeNotifyItemNo(orderRow.itemNo)] = orderRow.pushWmsFlag
+ })
+ materialRows.forEach(materialRow => {
+ const orderPushFlag = pushFlagByItemNo[this.normalizeNotifyItemNo(materialRow.itemNo)]
+ if (orderPushFlag) {
+ materialRow.pushWmsFlag = orderPushFlag
+ }
+ })
+ this.dataList2 = orderRows
+ this.dataList3 = materialRows
+ })
+ },
+ /**
+ * 订单序号统一成可比较文本,避免 1 和 1.0 对不上导致已推送行仍能指定。- rqrq
+ */
+ normalizeNotifyItemNo (value) {
+ if (value === null || value === undefined || value === '') {
+ return ''
+ }
+ const text = String(value).trim()
+ if (text === '') {
+ return ''
+ }
+ const numberValue = Number(text)
+ return Number.isNaN(numberValue) ? text : String(numberValue)
+ },
+ /**
+ * 取材料行所属订单的推送标记。同一申请单下按订单序号匹配申请单明细,匹配不到再用材料行自带标记。- rqrq
+ */
+ resolveMaterialOrderPushFlag (row) {
+ if (!row) {
+ return ''
+ }
+ const itemKey = this.normalizeNotifyItemNo(row.itemNo)
+ const orderRow = (this.dataList2 || []).find(item => this.normalizeNotifyItemNo(item.itemNo) === itemKey)
+ if (orderRow && orderRow.pushWmsFlag) {
+ return orderRow.pushWmsFlag
+ }
+ return row.pushWmsFlag || ''
+ },
+ /**
+ * 材料行能否指定物料:申请单已下达,且本行订单未推送WCS。- rqrq
+ */
+ canSpecifyMaterial (row) {
+ return !!(this.currentRow && this.currentRow.status === 'ISSUE' && this.resolveMaterialOrderPushFlag(row) !== 'Y')
},
/**
* 打开指定物料策略弹窗:以订单行itemNo+BOM行号隔离当前物料;未下达不允许指定 - rqrq
@@ -2664,6 +2724,11 @@ export default {
this.$alert('未下达申请单不允许指定物料', '提示', { confirmButtonText: '确定' })
return
}
+ // 本行订单已推送WCS时拒绝打开指定弹框,避免立库已接单后改分配 - rqrq
+ if (this.resolveMaterialOrderPushFlag(row) === 'Y') {
+ this.$alert('该订单行已推送WCS,不允许指定物料', '提示', { confirmButtonText: '确定' })
+ return
+ }
const parentItemNo = row.itemNo
const bomItemNo = row.bOMItemNo || row.BOMItemNo || row.bomItemNo || row.bomitemNo
if (parentItemNo == null || parentItemNo === '') {