Browse Source

【修改】 零售发货申请 工程发货申请

howie 2 years ago
parent
commit
90ccfbc8b0

+ 19 - 0
src/views/supply/apply/components/apply_form.vue

@@ -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;

+ 12 - 0
src/views/supply/apply/components/engin_form.vue

@@ -260,6 +260,11 @@
       <div class="table">
         <el-table :data="tableGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="tableSelectionChange">
           <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
+          <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="orderType" min-width="180" show-overflow-tooltip>
             <template slot-scope="scope">
               {{scope.row.orderType | orderTypeFilter}}
@@ -662,6 +667,13 @@ export default {
       }
 
       for(let i=0; i<this.tableSelection.length; i++) {
+        for (let j = i+1; j < this.tableSelection.length; j++) {
+
+if (this.tableSelection[i].orderBase !== this.tableSelection[j].orderBase) {
+  return this.$errorMsg('只能选择新单货旧单');
+}
+}
+
         if(this.tableSelection[i].invoiceNum === '') {
           this.$errorMsg('请输入申请数量');
           return;