zhangjinxing 3 years ago
parent
commit
4502fd231a

+ 2 - 2
src/apis/service/stock/stockWarning/index.js

@@ -7,11 +7,11 @@ export default {
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
-  list: (data, params) => http(api + "list", data, "post", params),
+  list: (data, params) => http(api + "checkflist", data, "post", params),
   // 详情
   detail: (data, params) => http(api + "detail", data, "post", params),
   // 更新
-  update: (data, params) => http(api + "update", data, "post", params),
+  update: (data, params) => http(api + "goodwarn", data, "post", params),
   // 修改状态
   status: (data, params) => http(api + "accountstatus", data, "post", params),
 };

+ 1 - 1
src/apis/service/stock/survey/index.js

@@ -7,7 +7,7 @@ export default {
   // 删除
   delete: (data, params) => http(api + "delete", data, "post", params),
   // 分页查询
-  list: (data, params) => http(api + "list", data, "post", params),
+  list: (data, params) => http(api + "goodstock", data, "post", params),
   // 详情
   detail: (data, params) => http(api + "detail", data, "post", params),
   // 更新

+ 0 - 11
src/views/purchaseIn/storeManage/components/addEdit.vue

@@ -251,17 +251,6 @@ export default {
       }
       this.loading = false;
     },
-    async initData() {
-      // const res = await asyncRequest.detail({ id: this.id });
-      // if (res && res.code === 0 && res.data) {
-      //   this.ruleForm = res.data;
-      //   this.ruleForm.role_id = this.ruleForm.role;
-      // } else if (res && res.code >= 100 && res.code <= 104) {
-      //   await this.logout();
-      // } else {
-      //   this.$message.warning(res.message);
-      // }
-    },
     async resetForm() {
       // 重置
       await this.$nextTick(() => {

+ 0 - 4
src/views/stock/allot/components/addForm.vue

@@ -13,7 +13,6 @@
           <!-- 出库供应商 -->
           <el-form-item label="出库供应商名称" prop="supplier_code">
             <search-supplier
-              style="width: calc(100% - 150px)"
               :value="ruleForm.supplier_code"
               :placeholder="'请选择供应商'"
               @searchChange="selectSupplier"
@@ -22,7 +21,6 @@
           <!-- 出库仓库 -->
           <el-form-item label="出库仓库名称" prop="stock_code">
             <search-stock
-              style="width: calc(100% - 150px)"
               :value="ruleForm.stock_code"
               :isDetail="true"
               :disabled="isDisabled"
@@ -36,7 +34,6 @@
           <!-- 入库供应商 -->
           <el-form-item label="入库供应商名称" prop="supplier_in_code">
             <search-supplier
-              style="width: calc(100% - 150px)"
               :value="ruleForm.supplier_in_code"
               :placeholder="'请选择供应商'"
               @searchChange="selectSupplierIn"
@@ -45,7 +42,6 @@
           <!-- 入库仓库 -->
           <el-form-item label="入库仓库名称" prop="stock_in_code">
             <search-stock
-              style="width: calc(100% - 150px)"
               :value="ruleForm.stock_in_code"
               :isDetail="true"
               :disabled="isDisabledIn"

+ 0 - 3
src/views/stock/allot/components/goStock-audit.vue

@@ -14,7 +14,6 @@
           <el-col :span="24"
             ><el-form-item label="发货物流公司" prop="expressage_company">
               <el-input
-                style="width: calc(100% - 150px)"
                 placeholder="请输入物流公司"
                 v-model="ruleForm.expressage_company"
               /> </el-form-item
@@ -23,7 +22,6 @@
             ><el-form-item label="发货物流编号" prop="expressage_sn">
               <el-input
                 :rows="2"
-                style="width: calc(100% - 150px)"
                 placeholder="请输入物流单号"
                 v-model="ruleForm.expressage_sn"
                 clearable
@@ -34,7 +32,6 @@
             ><el-form-item label="发货物流费用" prop="expressage_cost">
               <el-input
                 type="number"
-                style="width: calc(100% - 150px)"
                 placeholder="请输入物流费用"
                 v-model="ruleForm.expressage_cost"
                 clearable

+ 85 - 253
src/views/stock/stockWarning/addEdit.vue

@@ -13,7 +13,7 @@
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(0, 0, 0, 0.8)"
   >
-    <el-card>
+    <el-card style="margin-top: -20px">
       <el-row :gutter="10">
         <el-col :span="24">
           <el-form
@@ -24,57 +24,28 @@
             label-width="110px"
             class="demo-ruleForm"
           >
-            <!-- <el-form-item
-              label="登录名"
-              prop="loginName"
-              v-if="id === 'add' || isDetail"
-            >
-              <el-input
-                v-model="ruleForm.loginName"
-                :disabled="isDetail"
-              ></el-input>
-            </el-form-item> -->
-            <el-form-item label="仓库" prop="row">
-              <!-- <el-input
-                v-model="ruleForm.stock"
-                :disabled="isDetail"
-              ></el-input> -->
-              <el-cascader
-                :options="options"
-                v-model="value"
-                :disabled="true"
-                placeholder="请输入仓库名称"
-                clearable
-                filterable
-                style="width: 70%"
-              ></el-cascader>
+            <el-form-item label="供应商名称" prop="supplier_code">
+              <search-supplier
+                :value="ruleForm.supplier_code"
+                :placeholder="'请选择供应商'"
+                @searchChange="selectSupplier"
+              />
             </el-form-item>
-            <el-form-item label="商品名称" prop="row">
-              <!-- <el-input v-model="ruleForm.product_name"></el-input> -->
-              <el-cascader
-                :options="options"
-                v-model="value"
-                disabled="true"
-                :placeholder="row.goods"
-                clearable
-                filterable
-                style="width: 70%"
-              ></el-cascader>
+            <el-form-item label="仓库名称" prop="stock_code">
+              <search-stock
+                :value="ruleForm.stock_code"
+                :isDetail="true"
+                :placeholder="'请选择备库仓库'"
+                :isRelation="true"
+                :companyCode="companyCode"
+                @searchChange="selectStock"
+              />
             </el-form-item>
-            <el-form-item label="商品属性" prop="row">
-              <!-- <el-input v-model="ruleForm.product_attr"></el-input> -->
-              <el-cascader
-                :options="options"
-                disabled="true"
-                v-model="row.attribute"
-                :placeholder="row.attribute"
-                clearable
-                filterable
-                style="width: 70%"
-              ></el-cascader>
+            <el-form-item label="商品名称" prop="good_name">
+              <el-input v-model="ruleForm.good_name"></el-input>
             </el-form-item>
-            <el-form-item label="预警数量" prop="row">
-              <el-input v-model="row.warnNumber" style="width: 70%"></el-input>
+            <el-form-item label="预警数量" prop="warn_num">
+              <el-input v-model="ruleForm.warn_num"></el-input>
             </el-form-item>
           </el-form>
         </el-col>
@@ -93,193 +64,52 @@
    <script>
 import asyncRequest from "@/apis/service/stock/stockWarning";
 import resToken from "@/mixins/resToken";
-import {
-  isnumber,
-  isMobile,
-  validEmail,
-  isAlphanumeric,
-  isChinese,
-  isEmoticon,
-  validAlphabets,
-} from "@/utils/validate";
 export default {
   name: "stockWarning",
   props: ["showModel", "row", "isDetail", "sitem"],
   mixins: [resToken],
   data() {
-    const validateusername = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("账号不能为空!"));
-      } else {
-        if (value.length < 6 || value.length > 18) {
-          callback(new Error("账号规则为6~18位数字与字母组合!"));
-        } else {
-          if (isnumber(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (validAlphabets(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else if (!isAlphanumeric(value)) {
-            callback(new Error("账号规则为6~18位数字与字母组合!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatename = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("真实姓名不能为空!"));
-      } else {
-        if (value.length < 2 || value.length > 12) {
-          callback(new Error("真实姓名规则为2~12位汉字!"));
-        } else {
-          if (!isChinese(value)) {
-            console.log(9999);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else if (isEmoticon(value)) {
-            console.log(2345);
-            callback(new Error("真实姓名规则为2~12位汉字!"));
-          } else {
-            callback();
-          }
-        }
-      }
-    };
-    const validatemobile = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("手机号不能为空!"));
-      } else {
-        if (!isMobile(value)) {
-          callback(new Error("手机号格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
-
-    const validateEmail = (rule, value, callback) => {
-      if (value === "") {
-        callback();
-      } else {
-        if (!validEmail(value)) {
-          callback(new Error("邮箱格式不正确!"));
-        } else {
-          callback();
-        }
-      }
-    };
     return {
-      goods: "",
+      input: "",
+      select: "1",
+      companyCode: "", //选择公司
       loading: false,
-      title: "添加账号",
       showModelThis: this.showModel,
       ruleForm: {
-        username: "", // 账号
-        name: "", // 真实姓名
-        mobile: "",
-        email: "",
-        role_id: "",
-        status: "1",
-        item: [],
-        stock: "", //仓库
-        product_name: "", //商品名称
-        product_attr: "", //商品属性
-        warning_number: this.row, //预警数量
-        isDisabled: true,
-        options: [
-          //   {
-          //     value: "",
-          //     label: "A公司",
-          //     children: [
-          //       {
-          //         value: "",
-          //         label: "A公司仓库1",
-          //       },
-          //       {
-          //         value: "",
-          //         label: "A公司仓库2",
-          //       },
-          //     ],
-          //   },
-          //   {
-          //     value: "",
-          //     label: "B公司",
-          //     children: [
-          //       {
-          //         value: "",
-          //         label: "B公司仓库1",
-          //       },
-          //       {
-          //         value: "",
-          //         label: "B公司仓库2",
-          //       },
-          //     ],
-          //   },
-          //   {
-          //     value: "",
-          //     label: "C公司",
-          //     children: [
-          //       {
-          //         value: "",
-          //         label: "C公司仓库1",
-          //       },
-          //       {
-          //         value: "",
-          //         label: "C公司仓库2",
-          //       },
-          //     ],
-          //   },
-        ],
+        supplier_code: [], //供应商名称
+        stock_code: [], //仓库名称
+        good_name: "", //产品名称
+        warn_num: "", //预警数量
       },
       rulesThis: this.rules,
       rules: {
-        name: [
-          {
-            required: true,
-            validator: validatename,
-            trigger: "blur",
-          },
-        ],
-        username: [
+        warn_num: [
           {
             required: true,
-            validator: validateusername,
+            message: "预计数量不能为空",
             trigger: "blur",
           },
         ],
-        mobile: [
+        good_name: [
           {
+            message: "产品名称不能为空",
             required: true,
-            validator: validatemobile,
-            trigger: "blur",
-          },
-        ],
-        email: [
-          {
-            required: false,
-            validator: validateEmail,
             trigger: "blur",
           },
         ],
-        role_id: [
-          {
-            required: true,
-            message: "请选择角色",
-            trigger: "change",
-          },
-        ],
-        item: [
+        supplier_code: [
           {
             type: "array",
             required: true,
-            message: "请选择所在部门",
+            message: "请选择供应商",
             trigger: "change",
           },
         ],
-        status: [
+        stock_code: [
           {
+            type: "array",
             required: true,
-            message: "请选择状态",
+            message: "请选择仓库",
             trigger: "change",
           },
         ],
@@ -307,41 +137,24 @@ export default {
     async initForm() {
       this.loading = true;
       // await this.getRole();
-      // if (this.id === "warningChange") {
-      //   this.title = "库存预警修改";
-      //   this.rulesThis = this.rules;
-      //   await this.resetForm();
-      // } else {
-      //   if (this.isDetail) {
-      //     this.title = "库存详情";
-      //     this.rulesThis = {};
-      //   } else {
-
-      //   }
-
-      //   // await this.initData()
-      // }
+      if (this.id === "add") {
+        this.title = "库存预警修改";
+        this.rulesThis = this.rules;
+        await this.resetForm();
+      } else {
+        if (this.isDetail) {
+          this.title = "库存详情";
+          this.rulesThis = {};
+        } else {
+          this.rulesThis = this.rules;
+        }
+        // await this.initData()
+      }
       this.title = "库存预警修改";
       this.rulesThis = this.rules;
       // await this.resetForm(this.sitem);
       this.loading = false;
     },
-    // async getRole() {
-    //   const model = {
-    //     status: "", // 状态
-    //     level: "", // 姓名
-    //     role_name: "",
-    //   };
-    //   const res = await asyncRequest.getRole(model);
-    //   if (res && res.code === 0 && res.data) {
-    //     this.roleList = res.data;
-    //     this.roleList.map((v1) => {
-    //       v1.id += "";
-    //       v1.status += "";
-    //       return v1;
-    //     });
-    //   }
-    // },
     async initData() {
       const res = await asyncRequest.detail({ id: this.id });
       if (res && res.code === 0 && res.data) {
@@ -353,33 +166,32 @@ export default {
         this.$message.warning(res.message);
       }
     },
-    async resetForm(sitem) {
+    async resetForm() {
       // 重置
       await this.$nextTick(() => {
         if (this.$refs.ruleForm) {
           this.$refs.ruleForm.resetFields();
           this.$refs.ruleForm.clearValidate();
-          // const { mobile, email, roleid, status, item } = sitem;
           this.ruleForm = {
-            // username: username || "", // 账号
-            // name: nickname || "", // 真实姓名
-            // mobile: mobile || "",
-            // email: email || "",
-            // role_id: roleid || "",
-            // status: status || "",
-            item: item || [],
+            stock_code: [],
+            supplier_code: [],
+            good_name: "", //产品名称
+            warn_num: "", //预警数量
           };
           if (this.id === "add" || this.isDetail) {
             // this.rules.username[0].required = false;
+            console.log("当前是add或者 this.isDetail是true");
           }
         }
       });
     },
-
+    // if
     async submitForm() {
+      console.log(this.id);
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;
+          console.log(this.ruleForm);
           // const { name, mobile, email, role_id, status } = JSON.parse(
           //   JSON.stringify(this.ruleForm)
           // );
@@ -420,12 +232,32 @@ export default {
         }
       });
     },
+    // 选择仓库
+    selectStock(e) {
+      console.log(e);
+      if (e && e.id) {
+        this.ruleForm.stock_code = [e.code];
+        this.stockCode = e.code;
+      } else {
+        this.ruleForm.stockCode = [];
+        this.stockCode = "";
+      }
+      console.log(this.ruleForm);
+      this.$refs.ruleForm.validateField("stock_code");
+    },
+    // 选择供应商
+    selectSupplier(e) {
+      console.log(e);
+      console.log(this.ruleForm);
+      if (e && e.id) {
+        this.ruleForm.supplier_code = [e.code];
+        this.companyCode = e.code;
+      } else {
+        this.ruleForm.supplier_code = [];
+        this.companyCode = "";
+      }
+      this.$refs.ruleForm.validateField("supplier_code");
+    },
   },
 };
-</script>
-
-   <style lang="scss" scoped>
-.stockWarning {
-}
-</style>
-   
+</script>

+ 80 - 0
src/views/stock/stockWarning/colums.js

@@ -0,0 +1,80 @@
+export default [
+        {
+          prop: "good_code",
+          label: "产品编码",
+          width:"150"
+        },
+        {
+          prop: "gys_code",
+          label: "供应商编码",
+          width:"150"
+        },
+        {
+          prop: "brand",
+          label: "品牌",
+          width:"70"
+        },
+        {
+          prop: "good_name",
+          label: "产品名称",
+        },
+        {
+          prop: "attribute",
+          label: "产品型号",
+        },
+        {
+          prop: "bstatus",
+          label: "状态",
+          width:"60"
+        },
+        {
+          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: "is_main",
+          label: "是否主推",
+        },
+        
+        {
+          prop: "addtime",
+          label: "添加时间",
+        },
+        {
+          prop: "usable_stock",
+          label: "可用库存",
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+          width:"50"
+        },
+]

+ 36 - 170
src/views/stock/stockWarning/index.vue

@@ -29,26 +29,26 @@
             <el-row style="padding: 0 0 0 80px">
               <el-col :span="24">
                 <!-- 库存量/仓库搜索二合一 -->
-                <el-col :span="8" style="width: 500px">
+                <el-col :span="18" style="width: 500px; padding: 0">
                   <el-input
+                    placeholder="关键字"
+                    v-model="input"
                     :size="searchSize"
-                    placeholder="请输入内容"
-                    v-model="content"
                     class="input-with-select"
                   >
                     <el-select
-                      style="width: 100px"
                       v-model="select"
                       slot="prepend"
-                      placeholder="请选择"
+                      style="width: 125px"
+                      placeholder="请选择类型"
                     >
-                      <el-option label="库存量" value="product"></el-option>
-                      <el-option label="仓库" value="stock"></el-option>
+                      <el-option label="仓库编码" value="1"></el-option>
+                      <el-option label="库存量" value="2"></el-option>
                     </el-select>
                     <el-button
                       slot="append"
                       icon="el-icon-search"
-                      type="primary"
+                      @click="searchList"
                     ></el-button>
                   </el-input>
                 </el-col>
@@ -87,7 +87,7 @@
                     :size="searchSize"
                     class="fr"
                     type="warning"
-                    @click="searchList"
+                    @click="restSearch"
                     >重置</el-button
                   >
                 </el-col>
@@ -114,7 +114,7 @@
           >
             <i
               class="el-icon-edit tb-icon"
-              @click="openModal(scope.row, false, scope.row)"
+              @click="openModal(scope.row.id, false, scope.row)"
             ></i>
           </el-tooltip>
           <el-tooltip
@@ -163,9 +163,9 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 import statusList from "@/assets/js/statusList";
-// import asyncRequest from "@/apis/service/stock/survey";
-import asyncRequest from "@/mock/service/stock/stockWarning";
-
+import asyncRequest from "@/apis/service/stock/stockWarning";
+// import asyncRequest from "@/mock/service/stock/stockWarning";
+import colums from "./colums";
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
 export default {
@@ -232,43 +232,7 @@ export default {
         total: 0,
       },
       // 表格 - 列参数
-      columns: [
-        {
-          prop: "orderNo",
-          label: "商品编码",
-        },
-        {
-          prop: "goods",
-          label: "商品名称",
-        },
-        {
-          prop: "attribute",
-          label: "属性名称",
-        },
-        {
-          prop: "type",
-          label: "分类",
-        },
-        {
-          prop: "unit",
-          label: "单位",
-        },
-        {
-          prop: "number",
-          label: "可用库存",
-        },
-        {
-          prop: "warnNumber",
-          label: "预警库存",
-        },
-        {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
-        },
-      ],
+      columns: colums,
       // 状态
       // statusOptions: [
       //   { id: "0", label: "禁用" },
@@ -281,23 +245,24 @@ export default {
   },
   mounted() {
     this.searchList();
-    this.stockName();
+    // this.stockName();
   },
 
   methods: {
     restSearch() {
-        // 表格 - 分页
+      // 表格 - 分页
       this.pageInfo = {
         size: 15,
         curr: 1,
         total: 0,
       };
-      this.parmValue = {
-        // name: "", // 业务员名字
-        // username: "", // 账号
-        // status: "", //
-        // page: 1, // 页码
-        // size: 10, // 每页显示条数
+      this.input = "";
+      this.select = "1";
+      this.ruleForm = {
+        supplier_code: [], //供应商名称
+        stock_code: [], //仓库名称
+        good_name: "", //产品名称
+        warn_num: "", //预警数量
       };
       this.searchList();
     },
@@ -310,39 +275,23 @@ export default {
       this.isDetail = isDetail;
       this.sitem = sitem;
     },
-    async deleteById(id, status) {
-      // await this.$confirm("确定要删除?", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(async () => {
-      //     const model = {
-      //       id: id,
-      //       status: status === "1" ? "0" : "1",
-      //     };
-      //     const res = await asyncRequest.status(model);
-      //     if (res && res.code === 0) {
-      //       this.$notify.success({
-      //         title: "删除成功",
-      //         message: "",
-      //       });
-      //       this.searchList();
-      //     } else if (res && res.code >= 100 && res.code <= 104) {
-      //       await this.logout();
-      //     } else {
-      //       this.$message.warning(res.message);
-      //     }
-      //   })
-      //   .catch(() => {
-      //     console.log("取消");
-      //   });
-    },
+
     async searchList() {
       this.loading = true;
-      const res = await asyncRequest.list(this.parmValue);
+      let model = {
+        wsm_code: "WSMdr4w211019095958",
+      };
+      console.log(this.ruleForm);
+      const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         // console.log(res.data.list);
+        res.data.list.forEach((element) => {
+          if (element.sort_s != "" && element.sort_t != "") {
+            element.classArr = `${element.sort_f}/${element.sort_s}/${element.sort_t}`;
+          } else {
+            element.classArr = element.sort_f;
+          }
+        });
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
       } else if (res && res.code >= 100 && res.code <= 104) {
@@ -353,89 +302,6 @@ export default {
       }
       this.loading = false;
     },
-
-    async statusConfirm(id, status) {
-      // let str = status === "1" ? "禁用" : "启用";
-      // await this.$confirm("确定要改为" + str + "?", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      //   .then(async () => {
-      //     this.loading = true;
-      //     const model = {
-      //       id: id,
-      //       status: status === "1" ? "0" : "1",
-      //     };
-      //     const res = await asyncRequest.status(model);
-      //     if (res && res.code === 0) {
-      //       this.loading = false;
-      //       this.$notify.success({
-      //         title: "状态修改成功!",
-      //         message: "",
-      //       });
-      //       await this.searchList();
-      //     } else if (res && res.code >= 100 && res.code <= 104) {
-      //       await this.logout();
-      //     } else {
-      //       this.$message.warning(res.message);
-      //     }
-      //   })
-      //   .catch(() => {
-      //     console.log("取消");
-      //   });
-    },
-    async stockName() {
-      //获取多级仓库名称的方法
-      const res = await asyncRequest.listAll(this.parmValue);
-      // console.log(res.data);
-      // this.options = res.data;
-      // console.log(this.options);
-      let arr = res.data;
-      // console.log(arr);
-      arr.forEach((ele) => {
-        let item = {
-          value: ele.id,
-          label: ele.name,
-          children: [],
-        };
-        ele.child.forEach((elem) => {
-          let model = {
-            value: elem.id,
-            label: elem.name,
-          };
-          item.children.push(model);
-        });
-        this.options.push(item);
-      });
-      // console.log(this.options);
-      // console.log(this.pageInfo.total);
-    },
   },
 };
 </script>
-<style lang="scss" scoped>
-.mr10 {
-  margin-left: 10px;
-}
-@media screen and (max-width: 1476px) {
-  .mr5 {
-    // margin-left: 0px !important;
-    margin-top: 10px;
-  }
-}
-@media screen and (max-width: 1422px) {
-  .mr10 {
-    margin-top: 10px;
-  }
-}
-.to {
-  float: left;
-  height: 32px;
-  line-height: 32px;
-  padding-left: 6px;
-}
-.min {
-  min-width: 1050px;
-}
-</style>

+ 11 - 8
src/views/stock/survey/index.vue

@@ -83,8 +83,8 @@
 import mixinPage from "@/mixins/elPaginationHandle";
 import resToken from "@/mixins/resToken";
 // import statusList from "@/assets/js/statusList";
-// import asyncRequest from "@/apis/service/stock/stockWarning";
-import asyncRequest from "@/mock/service/stock/survey";
+import asyncRequest from "@/apis/service/stock/stockWarning";
+// import asyncRequest from "@/mock/service/stock/survey";
 import countTo from "vue-count-to";
 import addEdit from "./addEdit";
 import { mapGetters } from "vuex";
@@ -246,7 +246,7 @@ export default {
       console.log(e);
     },
     restSearch() {
-        // 表格 - 分页
+      // 表格 - 分页
       this.pageInfo = {
         size: 15,
         curr: 1,
@@ -305,15 +305,15 @@ export default {
       console.log(val);
       this.isDesabled = val;
       console.log(this.isDesabled);
-      this.stockList();
+      // this.stockList();
     },
     async stockList() {
       //获取表格上方的卡片数据
       // console.log(this.stock_list);
-      const res1 = await asyncRequest.statistics(this.parmValue);
+      const res1 = await asyncRequest.list(this.parmValue);
       // console.log(res1.data);
-      const { value1, value2, value3, value4, value5 } = res1.data;
-      this.stock.push(value1, value2, value3, value4, value5);
+      // const { value1, value2, value3, value4, value5 } = res1.data;
+      // this.stock.push(value1, value2, value3, value4, value5);
       // this.endVal = value1;
       // console.log(this.stock);
       // console.log(this.stock_list[5].num);
@@ -352,8 +352,11 @@ export default {
     async searchList() {
       //获取表格数据
       this.loading = true;
+      let model = {
+        type_code: "WSMcmpk211008104949",
+      };
       // const res = await asyncRequest.list(this.parmValue);
-      const res = await asyncRequest.log(this.parmValue);
+      const res = await asyncRequest.list(model);
       // console.log(res);
       if (res && res.code === 0 && res.data) {
         // this.tableData = res.data;