|
@@ -158,6 +158,12 @@
|
|
|
|
|
|
<div class="table">
|
|
|
<el-table :data="tableGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400">
|
|
|
+ <el-table-column align="center" label="新旧单标识" prop="mainOrderId" min-width="140" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{scope.row.orderBase==1?"新单":"旧单"}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column align="center" label="订单号" prop="mainOrderId" min-width="140" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column align="center" label="存货类别" prop="categoryName" min-width="100" show-overflow-tooltip></el-table-column>
|
|
@@ -442,13 +448,26 @@ export default {
|
|
|
// 确定 添加产品
|
|
|
submitAddGoods() {
|
|
|
let tableSelection = [];
|
|
|
+
|
|
|
this.tableGoodsList.forEach(item => {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if((item.invoiceNum || item.invoiceNum === 0) && !item.selected) {
|
|
|
tableSelection.push(item);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
for(let i=0; i<tableSelection.length; i++) {
|
|
|
+
|
|
|
+ for (let j = i+1; j < tableSelection.length; j++) {
|
|
|
+
|
|
|
+ if (tableSelection[i].orderBase !== tableSelection[j].orderBase) {
|
|
|
+ return this.$errorMsg('只能选择新单货旧单');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if(tableSelection[i].invoiceNum < 1) {
|
|
|
this.$errorMsg('申请数量要大于0');
|
|
|
return;
|