|
|
@@ -769,30 +769,33 @@
|
|
|
{
|
|
|
width: 100,
|
|
|
prop: 'notSendTotalCount',
|
|
|
- label: '未发数量',
|
|
|
+ label: '未出库数量',
|
|
|
align: 'center',
|
|
|
formatter: (row, column) => {
|
|
|
- if (row.notSendTotalCount) {
|
|
|
- return row.notSendTotalCount + ' ' + row.measuringUnit;
|
|
|
- }
|
|
|
+ // if (row.notSendTotalCount) {
|
|
|
+ return row.notSendTotalCount
|
|
|
+ // }
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- width: 120,
|
|
|
- prop: 'packingSpecification',
|
|
|
+ width: 100,
|
|
|
+ prop: 'notGenerateSendCount',
|
|
|
+ label: '未发数量',
|
|
|
align: 'center',
|
|
|
- label: '包装规格',
|
|
|
- showOverflowTooltip: true
|
|
|
+ formatter: (row, column) => {
|
|
|
+ // if (row.notGenerateSendCount) {
|
|
|
+ return row.notGenerateSendCount
|
|
|
+ // }
|
|
|
+ }
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'totalCount',
|
|
|
label: '计量数量',
|
|
|
formatter: (row, column) => {
|
|
|
- if (row.totalCount) {
|
|
|
+ // if (row.totalCount) {
|
|
|
return row.totalCount + ' ' + row.measuringUnit;
|
|
|
- }
|
|
|
+ // }
|
|
|
},
|
|
|
align: 'center'
|
|
|
},
|
|
|
@@ -807,6 +810,13 @@
|
|
|
},
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ width: 120,
|
|
|
+ prop: 'packingSpecification',
|
|
|
+ align: 'center',
|
|
|
+ label: '包装规格',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
|
|
|
// {
|
|
|
// width: 80,
|
|
|
@@ -1699,15 +1709,15 @@
|
|
|
validateForm(callback) {
|
|
|
//开始表单校验
|
|
|
this.$refs.form.validate((valid, obj) => {
|
|
|
- let is = false;
|
|
|
- this.form.datasource.forEach((item) => {
|
|
|
- if (Number(item.totalCount) > item.orderTotalCount) {
|
|
|
- is = true;
|
|
|
- }
|
|
|
- });
|
|
|
+ // 找出所有发货数量超过订单剩余数量的产品
|
|
|
+ const exceededItems = this.form.datasource.filter(
|
|
|
+ (item) => Number(item.totalCount) > item.notGenerateSendCount
|
|
|
+ );
|
|
|
// 退货单退货不校验数量,实物赔偿无法计算
|
|
|
- if (is && this.sourceType != 3 && this.needProduce != 4) {
|
|
|
- this.$message.warning('发货数量大于订单总数量');
|
|
|
+ if (exceededItems.length > 0 && this.sourceType != 3 && this.needProduce != 4) {
|
|
|
+ // 提取产品名称,生成详细提示消息
|
|
|
+ const productNames = exceededItems.map(item => item.productCode).join('、');
|
|
|
+ this.$message.warning(`${productNames} 的发货数量大于订单剩余数量`);
|
|
|
if (this.isTotalCount == 1) {
|
|
|
callback(false);
|
|
|
}
|