Browse Source

【修改】bug

howie 3 năm trước cách đây
mục cha
commit
bd2c533b13

+ 4 - 3
src/views/supply/deliver/components/sum_print.vue

@@ -106,10 +106,11 @@ export default {
       const ids = this.listItem.map(item => {
         return item.invoiceOrderId
       })
-      addPrint({ ids: ids.join(',') }).then(res => {
-        // this.$successMsg('提交成功');
         this.$parent.getList()
-      })
+      // addPrint({ ids: ids.join(',') }).then(res => {
+      //   // this.$successMsg('提交成功');
+
+      // })
     }
   }
 }

+ 6 - 6
src/views/supply/pickup/pickup_list.vue

@@ -33,7 +33,7 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
-            
+
             <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
@@ -136,11 +136,11 @@
             <el-table-column align="center" label="操作" width="100" fixed="right">
               <template slot-scope="scope">
                 <el-button type="text" @click="toForm(scope.row)" v-if="$checkBtnRole('edit', $route.meta.roles)">编辑</el-button>
-                <el-popconfirm 
-                  style="margin-left: 10px;" 
-                  :title="'确定' + (scope.row.printNum ? '作废' : '取消') +'吗?'" 
-                  @onConfirm="handleCancel(scope.row.id)" 
-                  v-if="$checkBtnRole('del', $route.meta.roles)" >
+                <el-popconfirm
+                  style="margin-left: 10px;"
+                  :title="'确定' + (scope.row.printNum ? '作废' : '取消') +'吗?'"
+                  @onConfirm="handleCancel(scope.row.id)"
+                  v-if="$checkBtnRole('refund', $route.meta.roles)" >
                   <el-button slot="reference" type="text">{{scope.row.printNum ? '作废' : '取消'}}</el-button>
                 </el-popconfirm>
               </template>

+ 58 - 8
src/views/supply/reserve/components/reserve_form.vue

@@ -75,7 +75,31 @@
               filterable
               remote
               clearable
-              :remote-method="checkDealerList"
+              :remote-method="(e)=>checkDealerList(e,1)"
+              @change="changeDealer(scope.$index)">
+              <el-option
+                v-for="item in dealerList"
+                :key="item.number"
+                :label="item.number"
+                :value="item.number">
+                <span>{{ item.number }}</span>
+                <span style="color: #8492a6; font-size: 13px; margin-left: 6px">{{ item.name }}</span>
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip>
+             <template slot-scope="scope">
+            <div v-if="scope.row.orderId || listItem">{{scope.row.customerName}}</div>
+            <el-select
+              v-else
+              v-model="scope.row.customerName"
+              placeholder="选择经销商"
+              size="small"
+              filterable
+              remote
+              clearable
+              :remote-method="(e)=>checkDealerList(e,2)"
               @change="changeDealer(scope.$index)">
               <el-option
                 v-for="item in dealerList"
@@ -88,7 +112,6 @@
             </el-select>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="物料编码" prop="materialCode" min-width="140" show-overflow-tooltip>
           <template slot-scope="scope">
             <div v-if="scope.row.orderId || listItem">{{scope.row.materialCode}}</div>
@@ -100,7 +123,7 @@
               filterable
               remote
               clearable
-              :remote-method="checkMaterialList"
+                :remote-method="(e)=>checkMaterialList(e,1)"
               @change="changeMaterial(scope.$index)">
               <el-option
                 v-for="item in materialList"
@@ -115,7 +138,30 @@
         </el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialOldNumber" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip>
+           <template slot-scope="scope">
+            <div v-if="scope.row.orderId || listItem">{{scope.row.specification}}</div>
+            <el-select
+              v-else
+              v-model="scope.row.specification"
+              placeholder="选择规格型号"
+              size="small"
+              filterable
+              remote
+              clearable
+              :remote-method="(e)=>checkMaterialList(e,2)"
+              @change="changeDealer(scope.$index)">
+              <el-option
+                v-for="item in dealerList"
+                :key="item.number"
+                :label="item.number"
+                :value="item.number">
+                <span>{{ item.number }}</span>
+                <span style="color: #8492a6; font-size: 13px; margin-left: 6px">{{ item.name }}</span>
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <!-- <el-table-column align="center" label="原预留数量" prop="oldNum" min-width="100" show-overflow-tooltip></el-table-column> -->
         <el-table-column align="center" label="预留数量" prop="reservedNum" min-width="100" show-overflow-tooltip>
@@ -548,9 +594,12 @@ export default {
     },
 
     // 查询经销商列表
-    checkDealerList(query) {
+    checkDealerList(query,type) {
+
       checkDealerList({
-        number: query,
+        number:type==1 ? query :'',
+        name:type ==2 ? query :'',
+
       }).then(res => {
         this.dealerList = res.data || [];
       })
@@ -569,9 +618,10 @@ export default {
     },
 
     // 查询产品
-    checkMaterialList(query) {
+    checkMaterialList(query,type) {
       checkMaterialList({
-        number: query,
+        number: type ==1 ?query:'',
+         specification:type ==2 ?query:''
       }).then(res => {
         this.materialList = res.data || [];
       })