diff --git a/oms_web/oms_vue/src/views/inventory/execution/index.vue b/oms_web/oms_vue/src/views/inventory/execution/index.vue
index 6318b329..7eac2f21 100644
--- a/oms_web/oms_vue/src/views/inventory/execution/index.vue
+++ b/oms_web/oms_vue/src/views/inventory/execution/index.vue
@@ -274,8 +274,9 @@
已备货:
{{ item.bhNum !== undefined && item.bhNum !== null ? item.bhNum : '-' }}
- 缺货: {{ item.orderNum !== undefined && item.orderNum !== null ? item.orderNum-(item.bhNum||0): '-'}}
- 备货完成
+ 缺货: {{ Number(item.orderNum) - Number(item.bhNum || 0) }}
+ 超配: {{ Number(item.bhNum) - Number(item.orderNum) }}
+ 备货完成
@@ -755,21 +756,15 @@ export default {
this.stockingDetailLoading = true;
productMatchList(row.orderCode).then(response => {
const list = response.data || [];
- return Promise.all(list.map(item => this.loadAllBindData(row.orderCode, item).then(allBindList => {
- const bindPageNum = 1;
- const bindPageSize = this.stockingBindPageSize;
- const startIndex = (bindPageNum - 1) * bindPageSize;
- const endIndex = startIndex + bindPageSize;
- const bindList = allBindList.slice(startIndex, endIndex);
-
+ return Promise.all(list.map(item => this.loadBindData(row.orderCode, item, 1, this.stockingBindPageSize).then(bindData => {
return {
...item,
originalTotalPhNum: item.phNum,
- allBindList: allBindList,
- bindList: bindList,
- bindTotal: allBindList.length,
- bindPageNum: bindPageNum,
- bindPageSize: bindPageSize
+ allBindList: bindData.rows,
+ bindList: bindData.rows,
+ bindTotal: bindData.total,
+ bindPageNum: 1,
+ bindPageSize: this.stockingBindPageSize
};
})));
}).then(list => {
@@ -819,36 +814,46 @@ export default {
return Math.min(maxPhysical, maxAllowedByOrder);
},
- loadAllBindData(orderCode, item) {
+ loadBindData(orderCode, item, pageNum, pageSize) {
return productMatchBindList(orderCode, item.productCode, {
- pageNum: 1,
- pageSize: 9999,
+ pageNum: pageNum,
+ pageSize: pageSize,
orderByColumn: 't5.bindNum desc,t6.createTime',
isAsc: 'desc'
}).then(bindResponse => {
- return (bindResponse.rows || []).map(bindItem => ({
- ...bindItem,
- phNum: this.getDraftBindNum(item.productCode, bindItem.purchaseId, bindItem.phNum),
- originalPhNum: bindItem.originalPhNum !== undefined ? bindItem.originalPhNum : bindItem.phNum,
- originalKyNum: bindItem.originalKyNum !== undefined ? bindItem.originalKyNum : bindItem.kyNum
- }));
+ return {
+ rows: (bindResponse.rows || []).map(bindItem => ({
+ ...bindItem,
+ phNum: this.getDraftBindNum(item.productCode, bindItem.purchaseId, bindItem.phNum),
+ originalPhNum: bindItem.originalPhNum !== undefined ? bindItem.originalPhNum : bindItem.phNum,
+ originalKyNum: bindItem.originalKyNum !== undefined ? bindItem.originalKyNum : bindItem.kyNum
+ })),
+ total: bindResponse.total || 0
+ };
}).catch(() => {
- return [];
+ return { rows: [], total: 0 };
});
},
handleBindPageChange(item) {
- const startIndex = (item.bindPageNum - 1) * item.bindPageSize;
- const endIndex = startIndex + item.bindPageSize;
- const bindList = (item.allBindList || []).slice(startIndex, endIndex);
-
- this.stockingDetailList = this.stockingDetailList.map(currentItem => {
- if (currentItem.productCode === item.productCode) {
- return {
- ...currentItem,
- bindList: bindList
- };
- }
- return currentItem;
+ this.loadBindData(this.stockingDetailRow.orderCode, item, item.bindPageNum, item.bindPageSize).then(bindData => {
+ this.stockingDetailList = this.stockingDetailList.map(currentItem => {
+ if (currentItem.productCode === item.productCode) {
+ const loadedBindMap = {};
+ (currentItem.allBindList || []).forEach(bindItem => {
+ loadedBindMap[String(bindItem.purchaseId)] = bindItem;
+ });
+ bindData.rows.forEach(bindItem => {
+ loadedBindMap[String(bindItem.purchaseId)] = bindItem;
+ });
+ return {
+ ...currentItem,
+ allBindList: Object.values(loadedBindMap),
+ bindList: bindData.rows,
+ bindTotal: bindData.total
+ };
+ }
+ return currentItem;
+ });
});
},
handleBindNumChange(row, item) {
@@ -871,20 +876,20 @@ export default {
this.updateItemTotalPhNum(item);
},
calculateCurrentTotalPhNum(item) {
- if (!item || !item.productCode || !item.allBindList) return 0;
+ if (!item || !item.productCode) return 0;
- let total = 0;
- item.allBindList.forEach(bindItem => {
+ const baseTotal = item.originalTotalPhNum === '' || item.originalTotalPhNum === null || item.originalTotalPhNum === undefined ? 0 : Number(item.originalTotalPhNum);
+ const changedDiff = (item.allBindList || []).reduce((total, bindItem) => {
const key = this.getBindDraftKey(item.productCode, bindItem.purchaseId);
- if (this.stockingBindDraftMap && this.stockingBindDraftMap[key] !== undefined) {
- total += Number(this.stockingBindDraftMap[key]);
- } else {
- const phNum = bindItem.phNum === '' || bindItem.phNum === null || bindItem.phNum === undefined ? 0 : Number(bindItem.phNum);
- total += phNum;
+ if (!this.stockingBindDraftMap || this.stockingBindDraftMap[key] === undefined) {
+ return total;
}
- });
+ const currentPhNum = Number(this.stockingBindDraftMap[key]);
+ const originalPhNum = bindItem.originalPhNum === '' || bindItem.originalPhNum === null || bindItem.originalPhNum === undefined ? 0 : Number(bindItem.originalPhNum);
+ return total + currentPhNum - originalPhNum;
+ }, 0);
- return total;
+ return baseTotal + changedDiff;
},
findBindItemByPurchaseId(productCode, purchaseId) {
const product = this.stockingDetailList.find(item => item.productCode === productCode);
@@ -1132,19 +1137,23 @@ export default {
if (!targetItem) {
return;
}
- this.loadAllBindData(this.stockingDetailRow.orderCode, targetItem).then(allBindList => {
- const bindPageNum = targetItem.bindPageNum || 1;
- const bindPageSize = targetItem.bindPageSize || this.stockingBindPageSize;
- const startIndex = (bindPageNum - 1) * bindPageSize;
- const endIndex = startIndex + bindPageSize;
- const bindList = allBindList.slice(startIndex, endIndex);
+ const bindPageNum = targetItem.bindPageNum || 1;
+ const bindPageSize = targetItem.bindPageSize || this.stockingBindPageSize;
+ this.loadBindData(this.stockingDetailRow.orderCode, targetItem, bindPageNum, bindPageSize).then(bindData => {
this.stockingDetailList = this.stockingDetailList.map(item => {
if (item.productCode === productCode) {
+ const loadedBindMap = {};
+ (item.allBindList || []).forEach(bindItem => {
+ loadedBindMap[String(bindItem.purchaseId)] = bindItem;
+ });
+ bindData.rows.forEach(bindItem => {
+ loadedBindMap[String(bindItem.purchaseId)] = bindItem;
+ });
return {
...item,
- allBindList: allBindList,
- bindList: bindList,
- bindTotal: allBindList.length
+ allBindList: Object.values(loadedBindMap),
+ bindList: bindData.rows,
+ bindTotal: bindData.total
};
}
return item;
diff --git a/oms_web/oms_vue/src/views/login.vue b/oms_web/oms_vue/src/views/login.vue
index a01e94f0..dcb2a68b 100644
--- a/oms_web/oms_vue/src/views/login.vue
+++ b/oms_web/oms_vue/src/views/login.vue
@@ -66,8 +66,8 @@
append-to-body
>
-
-
+
+
@@ -124,7 +124,7 @@ export default {
emailCodeTimer: null,
resetPwdRules: {
username: [
- { required: true, trigger: "blur", message: "请输入用户名" }
+ { required: true, trigger: "blur", message: "请输入账号" }
],
newPassword: [
{ required: true, trigger: "blur", message: "请输入新密码" },
diff --git a/oms_web/oms_vue/src/views/monitor/logininfor/index.vue b/oms_web/oms_vue/src/views/monitor/logininfor/index.vue
index bbec8739..539a8c4e 100644
--- a/oms_web/oms_vue/src/views/monitor/logininfor/index.vue
+++ b/oms_web/oms_vue/src/views/monitor/logininfor/index.vue
@@ -10,10 +10,10 @@
@keyup.enter.native="handleQuery"
/>
-
+
-
+
@@ -145,7 +145,7 @@ export default {
single: true,
// 非多个禁用
multiple: true,
- // 选择用户名
+ // 选择账号
selectName: "",
// 显示搜索条件
showSearch: true,
diff --git a/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderSelectDialog.vue b/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderSelectDialog.vue
index 2bd624e1..28a437d5 100644
--- a/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderSelectDialog.vue
+++ b/oms_web/oms_vue/src/views/purchaseorder/components/PurchaseOrderSelectDialog.vue
@@ -2,7 +2,7 @@
-
+
UserConstants.USERNAME_MAX_LENGTH)
{