戴艳蓉 пре 3 година
родитељ
комит
d5d2881bf8

+ 1 - 1
src/apis/service/serviceParam/storeSet/index.js

@@ -3,7 +3,7 @@ import http from "@/apis/axios";
 const api = "admin/";
 export default {
   // 添加
-  add: (data, params) => http(api + "WareHouse/add", data, "post", params),
+  add: (data, params) => http(api + "wareadd", data, "post", params),
 
   // 分页查询
   list: (data, params) => http(api + "warelist", data, "post", params),

+ 1 - 1
src/views/goodStore/goodsOnline/detail.vue

@@ -346,7 +346,7 @@ export default {
       if (!this.loading) {
         let model = {
           skuCode: this.queryId,
-          exam_status: e.state === "1" ? "5" : "4",
+          exam_status: e.state === "1" ? "5" : "7",
           remark: e.remark,
         };
         await this.setstatus("提交财务审核结果", model);

+ 4 - 1
src/views/sellOut/stockApply/components/addEdit.vue

@@ -317,6 +317,7 @@ export default {
               file_url,
               file_name,
               status,
+              remark
             } = this.sitem;
 
             this.ruleForm = {
@@ -328,6 +329,7 @@ export default {
               file_url: file_url || "",
               file_url_name: file_name || "",
               status: status || "",
+              remark:remark||""
             };
           }
         }
@@ -347,6 +349,7 @@ export default {
             // file_name,
             // stock_code,
             lasttime,
+            remark
           } = this.ruleForm;
           let model = {
             id: id,
@@ -356,6 +359,7 @@ export default {
             file_url: file_url || "",
             // file_url_name: file_name || "",
             lastime: lasttime || "",
+            remark:remark||""
           };
           let res = {};
           if (this.id === "add") {
@@ -371,7 +375,6 @@ export default {
               message: "",
             });
             this.$emit("refresh");
-            this.$emit("closeModel");
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();
           } else {

+ 12 - 9
src/views/sellOut/stockApply/detail.vue

@@ -3,7 +3,8 @@
     <div
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
     >
-      <p>{{ status }}---{{ powers }}</p>
+      <p>{{ status }}---{{ powers }}---{{queryType}}---{{activeTabs}}---{{activeNames}}</p>
+      {{sitem}}
       <!-- <div class="detail-page-title">
         <span>备货申请编号:</span><span v-if="sitem">{{ sitem.bk_code }}</span>
 
@@ -43,7 +44,7 @@
             :id="queryId"
             :newTime="newTime"
             :type="queryId"
-            @refresh="initData"
+            @refresh="routeReGoto('stockApply', {})"
             v-if="newTime != ''"
           />
         </el-tab-pane>
@@ -185,6 +186,7 @@ export default {
     const { id, type } = this.$route.query;
     this.queryId = id;
     this.queryType = type;
+    this.activeTabs = type === "add" ? "0" : "1";
     if (this.queryType === "add") {
       this.sitem = {};
       this.getNewTime();
@@ -246,17 +248,18 @@ export default {
     },
     async initData() {
       this.loading = true;
-      const res = await asyncRequest.detail({ id: this.queryId });
-      if (res && res.code === 0 && res.data) {
-        this.sitem = res.data;
-        this.status = res.data.status;
-        this.orderCode = res.data.bk_code;
+      const { code, data, message } = await asyncRequest.detail({
+        id: this.queryId,
+      });
+      if (code === 0) {
+        const { status } = data;
+        this.sitem = data;
+        this.status = status;
         this.getNewTime();
       } else if (res && res.code >= 100 && res.code <= 104) {
         await this.logout();
       } else {
-        this.sitem = {};
-        this.status = 0;
+        this.$message.warning(message);
       }
       this.loading = false;
     },

+ 1 - 1
src/views/sellOut/stockApply/index.vue

@@ -164,7 +164,7 @@
               @click="
                 routeGoto('stockApplyDetail', {
                   id: scope.row.id,
-                  type: 'veiw',
+                  type: 'view',
                 })
               "
             ></i>

+ 107 - 57
src/views/serviceParam/storeSet/addEdit.vue

@@ -32,17 +32,17 @@
             <el-row>
               <el-col :span="12"
                 ><el-form-item
-                label-width="140px"
+                  label-width="140px"
                   label="仓库所在业务公司"
-                  prop="supplierNo"
+                  prop="companyNo"
                 >
                   <search-work-company
-                    :value="ruleForm.company_id"
+                    :value="ruleForm.companyNo"
                     :placeholder="'业务公司'"
-                    :disabled="false"
+                    :disabled="isDetail"
                     :size="'mini'"
                     :isDetail="false"
-                    @searchChange="company_idsearchChange"
+                    @searchChange="companyNosearchChange"
                   />
                 </el-form-item>
               </el-col>
@@ -50,7 +50,7 @@
                 ><el-form-item
                   label="仓库所在公司"
                   prop="supplierNo"
-                   label-width="120px"
+                  label-width="120px"
                   style="width: 100%"
                 >
                   <search-supplier
@@ -79,7 +79,12 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="仓库类型" prop="wsmtype">
-                  <el-select v-model="ruleForm.wsmtype" style="width:100%"  placeholder="仓库类型">
+                  <el-select
+                    v-model="ruleForm.wsmtype"
+                    style="width: 100%"
+                    :disabled="isDetail"
+                    placeholder="仓库类型"
+                  >
                     <el-option
                       v-for="item in options"
                       :key="item.value"
@@ -93,11 +98,11 @@
               <el-col :span="12">
                 <el-form-item
                   label="仓库负责人"
-                  prop="contactor"
+                  prop="contactor_id"
                   style="width: 100%"
                 >
                   <search-account
-                    :value="ruleForm.contactor"
+                    :value="ruleForm.contactor_id"
                     :placeholder="'仓库负责人'"
                     :is-detail="id !== 'add'"
                     :disabled="isDetail"
@@ -118,7 +123,11 @@
                   </el-input> </el-form-item
               ></el-col>
               <el-col :span="12">
-                <el-form-item label="仓库所在省/市/区" prop="addr_code" label-width="140px">
+                <el-form-item
+                  label="仓库所在省/市/区"
+                  prop="addr_code"
+                  label-width="140px"
+                >
                   <select-area
                     :placeholder="'仓库所在省/市/区'"
                     :value="ruleForm.addr_code"
@@ -130,7 +139,11 @@
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="仓库所在详细地址" prop="addr" label-width="140px">
+                <el-form-item
+                  label="仓库所在详细地址"
+                  prop="addr"
+                  label-width="140px"
+                >
                   <el-input
                     placeholder="仓库所在详细地址"
                     v-model="ruleForm.addr"
@@ -146,10 +159,10 @@
               <el-divider content-position="center">收发货信息</el-divider>
             </div>
             <el-row>
-              <el-col :span="12">
-                <el-form-item label="收发货联系人" prop="wsm_name" label-width="110px">
+              <el-col :span="8">
+                <el-form-item label="联系人" prop="wsm_name" label-width="68px">
                   <el-input
-                    placeholder="收发货联系人"
+                    placeholder="联系人"
                     maxlength="20"
                     :disabled="isDetail"
                     v-model="ruleForm.wsm_name"
@@ -157,10 +170,21 @@
                   >
                   </el-input> </el-form-item
               ></el-col>
-              <el-col :span="12">
-                <el-form-item label="收发货电话" prop="wsm_mobile">
+              <el-col :span="8">
+                <el-form-item label="职位" prop="position" label-width="55px">
+                  <el-input
+                    placeholder="职位"
+                    maxlength="20"
+                    :disabled="isDetail"
+                    v-model="ruleForm.position"
+                    clearable
+                  >
+                  </el-input> </el-form-item
+              ></el-col>
+              <el-col :span="8">
+                <el-form-item label="电话" prop="wsm_mobile" label-width="55px">
                   <el-input
-                    placeholder="收发货电话"
+                    placeholder="电话"
                     v-model="ruleForm.wsm_mobile"
                     maxlength="11"
                     :disabled="isDetail"
@@ -172,7 +196,11 @@
 
             <el-row>
               <el-col :span="12">
-                <el-form-item label="收发货省/市/区" prop="addrs_code" label-width="121px">
+                <el-form-item
+                  label="收发货省/市/区"
+                  prop="addrs_code"
+                  label-width="121px"
+                >
                   <select-area
                     :is-detail="id !== 'add'"
                     :disabled="isDetail"
@@ -183,7 +211,11 @@
                   /> </el-form-item
               ></el-col>
               <el-col :span="12">
-                <el-form-item label="收发货详细地址" prop="wsm_addr" label-width="126px">
+                <el-form-item
+                  label="收发货详细地址"
+                  prop="wsm_addr"
+                  label-width="126px"
+                >
                   <el-input
                     placeholder="收发货详细地址"
                     maxlength="100"
@@ -259,26 +291,37 @@ export default {
       title: "添加仓库",
       showModelThis: this.showModel,
       options: [
+        // {
+        //   value: "1",
+        //   label: "系统仓",
+        // },
+        //   {
+        //   value: "2",
+        //   label: "虚拟仓",
+        // },
+        //     {
+        //   value: "3",
+        //   label: "自建仓",
+        // },
         {
-          value: "1",
+          value: "5",
           label: "销售仓",
         },
-          {
-          value: "0",
+        {
+          value: "4",
           label: "次品仓",
         },
       ],
       ruleForm: {
-        company_id: "",
+        companyNo: "",
         name: "", // 仓库名称
         supplierNo: [], //供应商编码
-        // wsmtype: "", //仓库类型 目前随便填
+        wsmtype: "", //仓库类型 目前随便填
         addr_code: [], //仓库省市区
         addr: "", //仓库详细地址
-        contactor: [], //仓库联系人
+        contactor_id: [], //仓库联系人
         mobile: "", //仓库联系方式
-        // position: "", //联系人职位  目前随便填
-        // wsm_type: "", //目前随便填
+        position: "", //联系人职位  目前随便填
 
         wsm_name: "", //收发货联系人
         wsm_mobile: "", //收发货联系方式
@@ -288,15 +331,15 @@ export default {
       rulesThis: this.rules,
       rules: {
         name: [
-          { required: true, message: "仓库名称", trigger: "blur" },
-          {
-            min: 1,
-            max: 20,
-            message: "长度在 1 到 20 个字符",
-            trigger: "blur",
-          },
+          { required: true, message: "仓库名称不能为空", trigger: "blur" },
+        ],
+        position: [
+          { required: true, message: "联系人职位不能为空", trigger: "blur" },
         ],
-        company_id: [
+        wsmtype: [
+          { required: true, message: "请选择仓库类型", trigger: "change" },
+        ],
+        companyNo: [
           {
             required: true,
             message: "业务公司不能为空",
@@ -329,7 +372,7 @@ export default {
           },
         ],
 
-        contactor: [
+        contactor_id: [
           {
             required: true,
             type: "array",
@@ -396,10 +439,10 @@ export default {
   },
   methods: {
     //业务公司选择
-    async company_idsearchChange(e) {
+    async companyNosearchChange(e) {
       const { id, code, label } = e;
-      this.ruleForm.company_id = code || "";
-      this.$refs.ruleForm.validateField("company_id");
+      this.ruleForm.companyNo = code || "";
+      this.$refs.ruleForm.validateField("companyNo");
     },
     //供应商公司选择
     supplierChange(e) {
@@ -423,11 +466,11 @@ export default {
     //负责人选择
     accountChange(e) {
       if (e && e.id) {
-        this.ruleForm.contactor = [e.id];
+        this.ruleForm.contactor_id = [e.id];
       } else {
-        this.ruleForm.contactor = [];
+        this.ruleForm.contactor_id = [];
       }
-      this.$refs.ruleForm.validateField("contactor");
+      this.$refs.ruleForm.validateField("contactor_id");
     },
     async initForm() {
       this.supplier_name = "";
@@ -466,22 +509,24 @@ export default {
           wsm_code,
           wsm_mobile,
           wsm_name,
-          company_id,
+          companyNo,
+          position,
+          wsm_type,
         } = res.data;
 
         this.supplier_name = supplier_name;
         this.accountNames = contactor_name;
         this.ruleForm = {
-          company_id: company_id || "",
+          companyNo: companyNo || "",
           name: name, // 仓库名称
           supplierNo: [supplierNo], //供应商编码
-          // wsmtype: "", //仓库类型 目前随便填
+          wsmtype: wsm_type || "", //仓库类型 目前随便填
           addr_code: this.getCode(addr_code), //仓库省市区
           addr: addr, //仓库详细地址
-          contactor: contactor ? [contactor] : [], //仓库联系人
+          contactor_id: contactor ? [contactor] : [], //仓库联系人
           mobile: mobile, //仓库联系方式
-          // position: "", //联系人职位  目前随便填
-          // wsm_type: "", //目前随便填
+          position: position || "", //联系人职位  目前随便填
+          wsm_type: "", //目前随便填
 
           wsm_name: wsm_name, //收发货联系人
           wsm_mobile: wsm_mobile, //收发货联系方式
@@ -507,15 +552,15 @@ export default {
           this.supplier_name = "";
           this.accountNames = "";
           this.ruleForm = {
-            company_id: "",
+            companyNo: "",
             name: "", // 仓库名称
             supplierNo: [], //供应商编码
-            // wsmtype: "", //仓库类型 目前随便填
+            wsmtype: "", //仓库类型 目前随便填
             addr_code: [], //仓库省市区
             addr: "", //仓库详细地址
-            contactor: [], //仓库联系人
+            contactor_id: [], //仓库联系人
             mobile: "", //仓库联系方式
-            // position: "", //联系人职位  目前随便填
+            position: "", //联系人职位  目前随便填
             // wsm_type: "", //目前随便填
 
             wsm_name: "", //收发货联系人
@@ -554,29 +599,34 @@ export default {
             supplierNo,
             addr_code,
             addr,
-            contactor,
+            contactor_id,
             mobile,
             wsm_name,
             wsm_mobile,
             wsm_addr,
             addrs_code,
+            companyNo,
+            position,
+            wsmtype,
           } = JSON.parse(JSON.stringify(this.ruleForm));
           const model = {
             id: this.id,
+            companyNo,
             name,
             supplierNo: this.getId(supplierNo),
             addr_code: this.setCode(addr_code),
             addr,
-            contactor: this.getId(contactor),
+            contactor_id: this.getId(contactor_id),
             mobile,
             wsm_name,
             wsm_mobile,
             wsm_addr,
             addrs_code: this.setCode(addrs_code),
-            position: "1", //暂时随便填
-            wsm_type: "1", //后台暂时不用
-            wsmtype: "1", //后台暂时不用
+            position,
+            // wsm_type: "", //目前随便填
+            wsmtype,
           };
+          console.log(model);
           let res = {};
           if (this.id === "add") {
             delete model["id"];

+ 0 - 0
src/views/serviceParam/storeSet/采购入库仓库设置 → src/views/serviceParam/storeSet/仓库设置