戴艳蓉 3 years ago
parent
commit
25487a75ac

+ 1 - 0
src/components/globalComponents/goodClass/main.vue

@@ -43,6 +43,7 @@ export default {
         label: "cat_name",
         value: "id",
         children: "child",
+        checkStrictly: true
       },
     };
   },

+ 6 - 5
src/components/globalComponents/status-bar/main.vue

@@ -1,14 +1,15 @@
 <template>
   <div class="statusBar" style="padding: 0 0 12px 0;">
     <el-steps :active="sIndex" align-center>
+      
+            <!-- : index === sIndex
+            ? 'el-icon-s-check' -->
+            
       <el-step
         :title="item.label"
         :icon="
-          index < sIndex
-            ? 'el-icon-success'
-            : index === sIndex
-            ? 'el-icon-s-check'
-            : ''
+          index <= sIndex
+            ? 'el-icon-success': ''
         "
         v-for="(item, index) in options"
         :key="item.value + index"

+ 8 - 4
src/components/search-stock-good-modal/columns.js

@@ -1,21 +1,25 @@
 export default [
-  { type: "selection", fixed: "left", _noset_: true, width: "45", },
+  { type: "selection", fixed: "left", _noset_: true, width: "45", align: "center"},
   {
     prop: "type_code",
     label: "商品编码",
-    width: "150",
-    align: "center"
+    width: "125",
   },
   {
     prop: "good_name",
     label: "商品名称",
     "min-width": "120",
   },
+  {
+    prop: "class_cat",
+    label: "分类",
+    "min-width": "100",
+  },
 
   {
     prop: "usable_stock",
     label: "可用库存",
-    width: "120",
+    width: "110",
   },
   // {
   //   prop: "gys_code",

+ 15 - 5
src/components/search-stock-good-modal/index.vue

@@ -77,7 +77,7 @@ export default {
   computed: {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
   },
-  props: ["showModel", "once", "code", "good_code"],
+  props: ["showModel", "once", "code", "good_code", "cat_id"],
 
   /**
    * 属性集合
@@ -98,7 +98,7 @@ export default {
       showModelThis: false,
       parmValue: {
         wsm_code: "", //仓库code
-        cat_id,
+        cat_id: "",
         page: 1, // 页码
         size: 10, // 每页显示条数
       },
@@ -146,7 +146,7 @@ export default {
     restSearch() {
       this.parmValue = {
         wsm_code: "", //仓库code
-        cat_id:"",
+        cat_id: "",
         page: 1, // 页码
         size: 10, // 每页显示条数
       };
@@ -159,15 +159,25 @@ export default {
       this.searchList();
     },
     async searchList() {
+      console.log(e);
       this.loading = true;
       this.parmValue.wsm_code = this.code || "";
       this.parmValue.type_code = this.good_code || "";
-      this.parmValue.stock_max="1"
-      this.parmValue.cat_id=cat_id
+      this.parmValue.stock_max = "1";
+      this.parmValue.cat_id = this.cat_id;
 
       const res = await asyncRequest.list(this.parmValue);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
+        this.tableData.forEach((v) => {
+          v.class_cat = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.class_cat += i === 0 ? x.name : "/" + x.name;
+            });
+          }
+        });
+
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();

+ 2 - 2
src/views/purchaseIn/purchaseOrder/components/columns.js

@@ -44,8 +44,8 @@ export default  [
     },
 
     {
-      prop: "send_status",
-      label: "发货状态",
+      prop: "goods_class",
+      label: "商品分类",
     },
     {
       prop: "status",

+ 6 - 2
src/views/purchaseIn/purchaseOrder/components/purchase-order-addEdit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <div class="tr" >
+    <div class="tr">
       <el-button
         type="primary"
         :size="'mini'"
@@ -122,8 +122,12 @@ export default {
       if (this.id === "add") {
         this.status = "";
       } else {
-        const { status } = this.sitem;
+        const { status, can } = this.sitem;
+        this.sitem.goods_class = "";
         this.status = status || "";
+        can.forEach((v, i) => {
+          this.sitem.goods_class += i === 0 ? v.name : "/" + v.name;
+        });
       }
       this.loading = false;
     },

+ 1 - 0
src/views/purchaseIn/purchaseOrder/detail.vue

@@ -15,6 +15,7 @@
           </el-tag>
         </span>
       </div>
+      
       <el-collapse v-model="activeNames">
         <el-collapse-item title="采购单信息" name="1">
           <purchase-order-addEdit

+ 17 - 1
src/views/purchaseIn/storeManage/components/addEdit.vue

@@ -14,6 +14,12 @@
             <good-class
               :value="ruleForm.goods_class"
               @handleChange="goods_class_change"
+              :disabled="
+                !(
+                  id === 'add' ||
+                  (status === '0' && powers.some((item) => item == '005'))
+                )
+              "
               :placeholder="'商品分类'"
             />
           </el-form-item>
@@ -117,6 +123,7 @@
     </el-form>
     <search-stock-good-modal
       :once="true"
+      :cat_id="cat_id"
       :show-model="showGoodsModel"
       @cancel="showGoodsModel = false"
       @searchChange="addGoodsRes"
@@ -172,6 +179,7 @@ export default {
         },
       },
       status: "",
+      cat_id: "",
       routerId: "",
       stockCode: "",
       companyCode: "",
@@ -257,6 +265,7 @@ export default {
     },
     goods_class_change(e) {
       this.ruleForm.goods_class = e;
+      this.cat_id = e.length > 0 ? e[e.length - 1] : "";
       this.$refs.ruleForm.validateField("goods_class");
       this.ruleForm.good_type_code = "";
       this.ruleForm.goods_name = "";
@@ -332,12 +341,19 @@ export default {
               status,
               wsm_supplier,
               wsm_supplierNo,
+              can,
               // 缺供应商
             } = this.sitem;
             this.companyCode = wsm_supplierNo;
+
+            this.cat_id = can.length > can ? e[e.length - 1] : "";
+            let goods_class = [];
+            can.forEach((v) => {
+              goods_class.push(v.id);
+            });
             this.ruleForm = {
               id,
-              goods_class: [],
+              goods_class: goods_class,
               good_code,
               good_type_code,
               goods_name: good_name,