소스 검색

库存预警修改 添加展示业务公司字段 库存预警 列表页 展示字段修改 库存预警筛选条件改变

lucky 2 년 전
부모
커밋
0366c9417e
3개의 변경된 파일145개의 추가작업 그리고 111개의 파일을 삭제
  1. 18 0
      src/views/stock/stockWarning/addEdit.vue
  2. 93 87
      src/views/stock/stockWarning/colums.js
  3. 34 24
      src/views/stock/stockWarning/index.vue

+ 18 - 0
src/views/stock/stockWarning/addEdit.vue

@@ -24,6 +24,14 @@
             label-width="110px"
             class="demo-ruleForm"
           >
+            <el-form-item label="业务公司名称" prop="companyName">
+              <el-input
+                v-model="ruleForm.companyName"
+                disabled
+                maxlength="1000"
+                placeholder="请选择业务公司"
+              />
+            </el-form-item>
             <el-form-item label="供应商名称" prop="wsm_supplier">
               <el-input
                 v-model="ruleForm.wsm_supplier"
@@ -98,6 +106,7 @@ export default {
         wsm_name: "",
         good_name: "",
         warn_stock: "",
+        companyName:"",
       },
       rulesThis: this.rules,
       rules: {
@@ -108,6 +117,13 @@ export default {
             trigger: "blur",
           },
         ],
+        companyName: [
+          {
+            message: "业务公司名称不能为空",
+            required: true,
+            trigger: "blur",
+          },
+        ],
         good_name: [
           {
             message: "产品名称不能为空",
@@ -152,6 +168,7 @@ export default {
         wsm_supplier,
         wsm_code,
         type_code,
+        companyName
       } = val;
       this.ruleForm = {
         wsm_supplier,
@@ -160,6 +177,7 @@ export default {
         warn_stock,
         wsm_code,
         good_code: type_code,
+        companyName
       };
     },
   },

+ 93 - 87
src/views/stock/stockWarning/colums.js

@@ -1,88 +1,94 @@
-export default [
-        {
-          prop: "good_code",
-          label: "产品编码",
-          width:"150"
-        },
-        {
-          prop: "good_name",
-          label: "产品名称",
-          width:"100"
-        },
-        {
-          prop: "type_code",
-          label: "产品属性编码",
-          width:"130"
-        },
-        {
-          prop:"wsm_supplier",
-          label:"供应商名称",
-          width:"180"
-        },
-        {
-          prop:"wsm_name",
-          label:"仓库名称",
-          width:"80"
-        },
-        {
-          prop:"wsm_code",
-          label:"仓库编码",
-          width:"180"
-        },
-        {
-          prop: "usable_stock",
-          label: "可用库存",
-        },
-        {
-          prop: "warn_stock", 
-          label: "预警库存",
-        },
-        {
-          prop: "brand",
-          label: "品牌",
-          width:"70"
-        },
-        
-        {
-          prop: "attribute",
-          label: "产品型号",
-        },
-        {
-          prop: "good_desc",
-          label: "工艺说明",
-        },
-        {
-          prop: "cg_saler",
-          label: "采购人",
-        },
-        {
-          prop: "good_type",
-          label: "产品类型",
-        },
-        
-        {
-          prop: "unit",
-          label: "单位",
-          width:"50"
-        },
-        {
-          prop: "color",
-          label: "颜色",
-        },
-        {
-          prop: "material",
-          label: "材质",
-        },
-        {
-          prop: "specs",
-          label: "规格",
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
-          width:"50"
-        },
+export default [{
+    prop: "spuCode",
+    label: "产品编码",
+    width: "150"
+  },
+  {
+    prop: "good_name",
+    label: "产品名称",
+    width: "100"
+  },
+  // {
+  //   prop: "type_code",
+  //   label: "产品属性编码",
+  //   width:"130"
+  // },
+  {
+    prop: "wsm_supplier",
+    label: "供应商名称",
+    width: "180"
+  },
+  {
+    prop: "wsm_name",
+    label: "仓库名称",
+    width: "80"
+  },
+  {
+    prop: "companyName",
+    label: "业务公司名称",
+    width: "180"
+  },
+  {
+    prop: "wsm_code",
+    label: "仓库编码",
+    width: "180"
+  },
+  {
+    prop: "usable_stock",
+    label: "可用库存",
+  },
+  {
+    prop: "warn_stock",
+    label: "预警库存",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+    width: "70"
+  },
+
+  // {
+  //   prop: "attribute",
+  //   label: "产品型号",
+  // },
+  // {
+  //   prop: "good_desc",
+  //   label: "工艺说明",
+  // },
+  {
+    prop: "cgder",
+    label: "采购人",
+  },
+  {
+    prop: "good_type",
+    label: "产品类型",
+  },
+
+  {
+    prop: "unit",
+    label: "单位",
+    width: "50"
+  },
+  // {
+  //   prop: "color",
+  //   label: "颜色",
+  // },
+  // {
+  //   prop: "material",
+  //   label: "材质",
+  // },
+  {
+    prop: "specinfo",
+    label: "规格",
+    "min-width": "150",
+    _slot_: 'specinfo'
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    _slot_: "operation",
+    width: "50"
+  },
 ]

+ 34 - 24
src/views/stock/stockWarning/index.vue

@@ -39,8 +39,8 @@
               </el-col>
               <el-col :span="6" style="width: 273px; padding: 0 0 0 10px">
                 <number-range
-                  :lower="parmValue.stock_num_low"
-                  :online="parmValue.stock_num_up"
+                  :lower="parmValue.stock_low"
+                  :online="parmValue.stock_up"
                   :title="'库存量'"
                   :width="'120px'"
                   :size="searchSize"
@@ -49,8 +49,8 @@
               </el-col>
               <el-col :span="6" style="width: 273px; padding: 0 0 0 10px">
                 <number-range
-                  :lower="parmValue.warn_num_low"
-                  :online="parmValue.warn_num_up"
+                  :lower="parmValue.warn_low"
+                  :online="parmValue.warn_up"
                   :width="'120px'"
                   :title="'预警量'"
                   :size="searchSize"
@@ -153,6 +153,15 @@
             ></i>
           </el-tooltip>
         </template>
+        <template #specinfo="{ scope }">
+          <span
+            v-for="(si, sii) in scope.row.specinfo"
+            :key="sii + si.spec_value_id"
+            >{{ sii === 0 ? "" : "-" }}{{ si.spec_name }}[{{
+              si.spec_value
+            }}]</span
+          >
+        </template>
       </ex-table>
       <add-edit
         :id="modelId"
@@ -211,10 +220,10 @@ export default {
         goods_sn: "",
         supplier_code: [],
         stock_code: [],
-        warn_num_low: "",
-        warn_num_up: "",
-        stock_num_low: "",
-        stock_num_up: "",
+        warn_low: "",
+        warn_up: "",
+        stock_low: "",
+        stock_up: "",
         page: 1,
         size: 15,
       },
@@ -243,6 +252,7 @@ export default {
   methods: {
     //业务公司选择
     async supplierChange(e) {
+      console.log(e)
       const { code } = e;
       this.parmValue.companyNo = code || ""; //业务公司编码
       this.parmValue.supplier_code = [];
@@ -278,15 +288,15 @@ export default {
     // 预警量范围框
     async numReturned1(e) {
       if (e && e.lower != "" && e.online != "") {
-        this.parmValue.warn_num_low = e.lower;
-        this.parmValue.warn_num_up = e.online;
+        this.parmValue.warn_low = e.lower;
+        this.parmValue.warn_up = e.online;
       } else {
-        this.parmValue.warn_num_low = "";
-        this.parmValue.warn_num_up = "";
+        this.parmValue.warn_low = "";
+        this.parmValue.warn_up = "";
       }
       if (
-        this.parmValue.warn_num_low != "" &&
-        this.parmValue.warn_num_up != ""
+        this.parmValue.warn_low != "" &&
+        this.parmValue.warn_up != ""
       ) {
         await this.searchList();
       }
@@ -294,15 +304,15 @@ export default {
     // 库存量范围框
     async numReturned(e) {
       if (e && e.lower != "" && e.online != "") {
-        this.parmValue.stock_num_low = e.lower;
-        this.parmValue.stock_num_up = e.online;
+        this.parmValue.stock_low = e.lower;
+        this.parmValue.stock_up = e.online;
       } else {
-        this.parmValue.stock_num_low = "";
-        this.parmValue.stock_num_up = "";
+        this.parmValue.stock_low = "";
+        this.parmValue.stock_up = "";
       }
       if (
-        this.parmValue.stock_num_low != "" &&
-        this.parmValue.stock_num_up != ""
+        this.parmValue.stock_low != "" &&
+        this.parmValue.stock_up != ""
       ) {
         await this.searchList();
       }
@@ -320,10 +330,10 @@ export default {
         goods_sn: "",
         supplier_code: [],
         stock_code: [],
-        warn_num_low: "",
-        warn_num_up: "",
-        stock_num_low: "",
-        stock_num_up: "",
+        warn_low: "",
+        warn_up: "",
+        stock_low: "",
+        stock_up: "",
         page: 1,
         size: 15,
       };