Преглед изворни кода

Merge branch 'hotfix/Hotfix-zh-309' into develop

howie пре 2 година
родитељ
комит
4de00b170a
1 измењених фајлова са 13 додато и 2 уклоњено
  1. 13 2
      src/views/supply/retail/components/retail_form.vue

+ 13 - 2
src/views/supply/retail/components/retail_form.vue

@@ -260,7 +260,7 @@
         </el-table-column>
         <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100">
           <template slot-scope="scope">
-            <el-checkbox v-model="scope.row.isDirectTransfer"></el-checkbox>
+            <el-checkbox v-model="scope.row.isDirectTransfer" @change="hasRak($event, scope.row)"></el-checkbox>
           </template>
         </el-table-column>
         <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="100"></el-table-column>
@@ -511,6 +511,7 @@ import {
 } from '@/api/supply/retail'
 import { getDictList, getSalesmanList } from '@/api/common'
 import { findElem } from '@/utils/util'
+import { hasRak } from '@/api/supply/policy'
 
 let that
 export default {
@@ -733,7 +734,17 @@ export default {
         this.warehouseList = res.data.records
       })
     },
-
+    hasRak(e, row) {
+      if (e) {
+        hasRak({ id: row.materialId }).then(res => {
+          if (res.data) {
+            this.goodsList.forEach(k => {
+              this.$set(k, 'isDirectTransfer', true)
+            })
+          }
+        })
+      }
+    },
     // 获取销售类型列表
     getSalesTypeList() {
       getSalesTypeList({