Browse Source

Merge branch 'sit'

戴艳蓉 3 years ago
parent
commit
a381fb55d4

File diff suppressed because it is too large
+ 119 - 0
dist/static/js/0.js


File diff suppressed because it is too large
+ 9 - 0
dist/static/js/app.js


+ 6 - 0
src/components/globalComponents/file-upload-pdf/main.vue

@@ -7,6 +7,7 @@
       class="fileUp"
       type="file"
       name="file"
+      :disabled="disabled"
       @change="handleChange($event)"
     />
   </div>
@@ -30,6 +31,11 @@ export default {
       default: false,
     },
     size: "mini",
+    disabled: {
+      //是否禁用
+      type: Boolean,
+      default: false,
+    },
     uploadcondition: {
       type: Function,
       default: null,

+ 1 - 1
src/components/globalComponents/file-upload/main.vue

@@ -31,7 +31,7 @@ export default {
       default: false,
     },
     disabled: {
-      //是否可以上传多张图片
+      //是否禁用
       type: Boolean,
       default: false,
     },

+ 14 - 0
src/views/purchaseIn/workbench/detail.vue

@@ -165,6 +165,20 @@
               width="110"
               show-overflow-tooltip
             />
+            <el-table-column
+              prop="bargain_status"
+              label="采返信息状态"
+              width="100"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <el-tag type="''" :size="'mini'" v-if="scope.row.bargain_status === '0'"
+                  >新建信息</el-tag
+                >
+                <el-tag type="danger" :size="'mini'" v-else>历史信息,需确认</el-tag>
+              </template></el-table-column
+            >
+
             <el-table-column
               prop="specinfo"
               label="规格"

+ 93 - 72
src/views/sellOut/stockApply/components/addEdit.vue

@@ -11,7 +11,7 @@
     >
       <el-row>
         <el-col :span="12">
-          <el-form-item label="商品名称" prop="goods_name">
+          <el-form-item label="商品名称" prop="good_name">
             <el-input
               :disabled="
                 !(
@@ -19,7 +19,7 @@
                   (status === '0' && powers.some((item) => item == '005'))
                 )
               "
-              v-model="ruleForm.goods_name"
+              v-model="ruleForm.good_name"
               readonly="true"
               :placeholder="'商品名称'"
               @focus="showGoodsModel = true"
@@ -29,16 +29,25 @@
         <!-- 采购数量 -->
         <el-col :span="5">
           <el-form-item label="采购数量" prop="goods_num">
-            <el-input
+            <digital-input
+              :values="ruleForm.goods_num"
+              :name="'ruleForm.goods_num'"
+              :placeholder="'采购数量'"
+              :min="0"
               :disabled="
                 !(
                   id === 'add' ||
                   (status === '0' && powers.some((item) => item == '005'))
                 )
               "
-              v-model="ruleForm.goods_num"
-              placeholder="采购数量"
-            ></el-input>
+              :max="100000000000"
+              :position="'right'"
+              :precision="0"
+              :size="'mini'"
+              :controls="false"
+              :append="''"
+              @reschange="number_change($event, 'goods_num')"
+            />
           </el-form-item>
         </el-col>
         <!-- 最晚入库时间 -->
@@ -50,9 +59,9 @@
           >
             <el-date-picker
               v-model="ruleForm.lasttime"
-              type="datetime"
+              type="date"
               style="width: 100%"
-              value-format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd"
               placeholder="最晚入库时间"
               :picker-options="pickerOptions"
               :disabled="
@@ -77,24 +86,32 @@
               }"
             >
               <p v-if="ruleForm.file_url">
-                {{ ruleForm.file_url_name }}
+                <el-link :underline="false" :href="ruleForm.file_url" target="_blank">{{
+                  ruleForm.file_url_name
+                }}</el-link>
+                <el-link class="fr" type="info" :underline="false"
+                  ><i
+                    class="el-icon-circle-close"
+                    @click="close_url"
+                    :size="'mini'"
+                  ></i
+                ></el-link>
               </p>
               <p v-else class="no">附件</p>
-              <file-upload-pdf
-                v-if="
-                  id === 'add' ||
-                  (status === '0' && powers.some((item) => item == '005'))
-                "
-                class="Upload"
-                :accept="'.pdf'"
-                :multiple="false"
-                :size="'mini'"
-                :uploadcondition="beforeAvatarUpload"
-                @UploadErrorEvent="UploadErrorEvent"
-                @UploadSuccessEvent="UploadSuccessEvent"
-              />
-              <div class="yulan" v-if="ruleForm.file_url" @click="PDFModelShow">
-                查看
+              <div v-if="ruleForm.file_url === ''">
+                <file-upload-pdf
+                  v-if="
+                    id === 'add' ||
+                    (status === '0' && powers.some((item) => item == '005'))
+                  "
+                  class="Upload"
+                  :accept="'.pdf'"
+                  :multiple="false"
+                  :size="'mini'"
+                  :uploadcondition="beforeAvatarUpload"
+                  @UploadErrorEvent="UploadErrorEvent"
+                  @UploadSuccessEvent="UploadSuccessEvent"
+                />
               </div>
             </div>
           </el-form-item>
@@ -105,7 +122,7 @@
               type="textarea"
               :rows="2"
               placeholder="备注"
-              v-model="remark"
+              v-model="ruleForm.remark"
             >
             </el-input>
           </el-form-item>
@@ -130,14 +147,13 @@
       :cat_id="cat_id"
       :show-model="showGoodsModel"
       @cancel="showGoodsModel = false"
-      @searchChange="addGoodsRes"
+      @resultList="addGoodsRes"
     />
   </div>
 </template>
    <script>
 import resToken from "@/mixins/resToken";
 import asyncRequest from "@/apis/service/sellOut/stockApply";
-import { isnumber } from "@/utils/validate";
 import searchGoodModal from "@/components/search-good-modal";
 export default {
   name: "stockApply",
@@ -167,15 +183,21 @@ export default {
     },
   },
   data() {
-    const validateWeight = (rule, value, callback) => {
-      if (value === "") {
-        callback(new Error("不能为空!"));
+    const validate_num_0 = (rule, value, callback) => {
+      const { required } = rule;
+      if (required && value === "") {
+        callback(new Error("不能为空!"));
+      } else if (
+        required &&
+        (value === "0" ||
+          value === "0." ||
+          value === "0.0" ||
+          value === "0.00" ||
+          value === "0.000")
+      ) {
+        callback(new Error("不能为零!"));
       } else {
-        if (!isnumber(value)) {
-          callback(new Error("仅支持整数!"));
-        } else {
-          callback();
-        }
+        callback();
       }
     };
     return {
@@ -194,8 +216,7 @@ export default {
       ruleForm: {
         id: "",
         good_code: "",
-        good_type_code: "",
-        goods_name: "",
+        good_name: "",
         goods_num: "",
         file_url: "",
         file_url_name: "",
@@ -207,7 +228,7 @@ export default {
       },
       rulesThis: this.rules,
       rules: {
-        goods_name: [
+        good_name: [
           {
             required: true,
             message: "商品名称不能为空!",
@@ -217,14 +238,14 @@ export default {
         goods_num: [
           {
             required: true,
-            validator: validateWeight,
+            validator: validate_num_0,
             trigger: "blur",
           },
         ],
         lasttime: [
           {
             required: true,
-            message: "请输入入库最晚时间!",
+            message: "请输入最晚入库时间!",
             trigger: "change",
           },
         ],
@@ -261,16 +282,24 @@ export default {
 
     // 执行点击商品名称的抛出事件
     addGoodsRes(e) {
-      let { spuCode, type_code, good_name } = e[0];
-      this.ruleForm.goods_name = good_name;
-      this.ruleForm.good_type_code = type_code;
+      console.log(e);
+      let { spuCode, good_name } = e[0];
+      this.ruleForm.good_name = good_name;
       this.ruleForm.good_code = spuCode;
-      this.$refs.ruleForm.validateField("goods_name");
+      this.$refs.ruleForm.validateField("good_name");
+    },
+    number_change(e, key) {
+      this.ruleForm[key] = e + "" || "0";
+      this.$refs.ruleForm.validateField(key);
     },
-
     closeModel() {
       this.$emit("closeModel");
     },
+    close_url() {
+      this.ruleForm.file_url_name = "";
+      this.ruleForm.file_url = "";
+      this.$refs.ruleForm.validateField("file_url");
+    },
     // 重置
     async resetForm() {
       // 重置
@@ -282,28 +311,23 @@ export default {
             const {
               id,
               good_code,
-              good_type_code,
               good_name, //商品名
               good_num, //采购数量
               lasttime, //最晚入库时间
               file_url,
               file_name,
-              // wsm_code, //仓库名
               status,
-              // 缺供应商
             } = this.sitem;
 
             this.ruleForm = {
-              id,
-              good_code,
-              good_type_code,
-              goods_name: good_name,
-              goods_num: good_num,
-              lasttime: lasttime,
+              id: id || "",
+              good_code: good_code || "",
+              good_name: good_name || "",
+              goods_num: good_num || "0",
+              lasttime: lasttime || "",
               file_url: file_url || "",
               file_url_name: file_name || "",
-
-              status,
+              status: status || "",
             };
           }
         }
@@ -320,7 +344,7 @@ export default {
             good_type_code,
             goods_num,
             file_url,
-            file_name,
+            // file_name,
             // stock_code,
             lasttime,
           } = this.ruleForm;
@@ -330,10 +354,7 @@ export default {
             good_type_code,
             good_num: goods_num || "",
             file_url: file_url || "",
-            file_url_name: file_name || "",
-            // wsm_code:
-            //   this.id == "add" ? stock_code.toString() : stock_code.toString(),
-
+            // file_url_name: file_name || "",
             lastime: lasttime || "",
           };
           let res = {};
@@ -363,26 +384,26 @@ export default {
         }
       });
     },
-    //图片上传失败
+    //附件上传失败
     async UploadErrorEvent(e) {
-      if (e) {
+      if (e !== "break") {
         this.$message.error("附件上传失败!");
         this.$refs.ruleForm.validateField("file_url");
-      } else {
-        await this.logout();
       }
     },
-    //图片上传成功
-    UploadSuccessEvent(data) {
-      if (data && data.url && data.url !== "break") {
-        const { url, name } = data.url;
+    //附件上传成功
+    async UploadSuccessEvent(data) {
+      const { url, name } = data;
+      if (url === "noToken") {
+        await this.logout();
+      } else {
         this.ruleForm.file_url_name = name;
         this.ruleForm.file_url = url;
         this.$message.success("附件上传成功!");
         this.$refs.ruleForm.validateField("file_url");
       }
     },
-    //判断图片规格
+    //判断附件规格
     beforeAvatarUpload(file) {
       let isJPG = false,
         isLt2M = false;
@@ -392,10 +413,10 @@ export default {
         }
         isLt2M = file.size / 1024 / 1024 < 1;
         if (!isJPG) {
-          this.$message.error("图片格式不正确!");
+          this.$message.error("附件格式不正确!");
         }
         if (!isLt2M) {
-          this.$message.error("图片大小不能超过 1MB!");
+          this.$message.error("附件大小不能超过 1MB!");
         }
       }
 

+ 27 - 22
src/views/sellOut/zixunOrder/columns.js

@@ -23,29 +23,31 @@ const validate_num = (rule, value, callback) => {
   }
 };
 const validate_total_weight = (rule, value, callback) => {
-  if (value === "") {
+  const { required } = rule
+  if (required && value === "") {
     callback(new Error("商品重量不能为空!"));
-  } else if (
+  } else if (required && (
     value === "0" ||
     value === "0." ||
     value === "0.0" ||
     value === "0.00" ||
     value === "0.000"
-  ) {
+  )) {
     callback(new Error("商品重量不能为零!"));
   } else {
     callback();
   }
 };
 const validate_specs_weight = (rule, value, callback) => {
-  if (value === "") {
+  const { required } = rule
+  if (required && value === "") {
     callback(new Error("金属克重不能为空!"));
-  } else if (
+  } else if (required && (
     value === "0" ||
     value === "0." ||
     value === "0.0" ||
     value === "0.00" ||
-    value === "0.000") {
+    value === "0.000")) {
     callback(new Error("金属克重不能为零!"));
   } else {
     callback();
@@ -498,22 +500,18 @@ const listCol = [
     label: "咨询编号",
     width: "160"
   },
-  {
-    prop: "creater",
-    label: "申请人",
-    width: "60"
-  },
-  {
-    prop: "good_name",
-    label: "商品名称",
-    "width": "100"
-  },
   {
     prop: "good_img",
     label: "图片",
     _slot_: "good_img",
     "width": "50"
   },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    "min-width": "120"
+  },
+
   {
     prop: "status",
     label: "状态",
@@ -524,22 +522,29 @@ const listCol = [
   {
     prop: "khNo",
     label: "客户编号",
-    "width": "125"
+    "width": "160"
   },
   {
     prop: "khname",
     label: "客户名称",
-    "width": "135"
+    "min-width": "135"
   },
 
   {
-    prop: "except_code",
+    prop: "budget_price",
     label: "预算单价",
-    _slot_: "except_code",
     width: 110,
-
   },
-
+  {
+    prop: "num",
+    label: "咨询数量",
+    width: 110,
+  },
+  {
+    prop: "creater",
+    label: "申请人",
+    width: "60"
+  },
 
 
   {

+ 33 - 23
src/views/sellOut/zixunOrder/components/editForm.vue

@@ -97,10 +97,7 @@
       </el-col>
 
       <el-col :span="8" v-show="ruleForm.is_project === '1'">
-        <el-form-item
-          label="项目名称"
-          :prop="ruleForm.is_project === '1' ? 'projectNo' : ''"
-        >
+        <el-form-item label="项目名称" prop="projectNo">
           <el-select
             v-model="ruleForm.projectNo"
             multiple
@@ -473,7 +470,7 @@
           <el-col :span="24">
             <el-row>
               <el-col :span="12" v-show="is_noble">
-                <el-form-item label="配置要求" :prop="is_noble ? 'config' : ''">
+                <el-form-item label="配置要求" prop="config">
                   <el-select
                     v-model="ruleForm.config"
                     multiple
@@ -492,10 +489,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6" v-show="is_noble">
-                <el-form-item
-                  label="金属克重"
-                  :prop="is_noble ? 'specs_weight' : ''"
-                >
+                <el-form-item label="金属克重" prop="specs_weight">
                   <digital-input
                     :values="ruleForm.specs_weight"
                     :placeholder="'金属克重'"
@@ -512,10 +506,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="6" v-show="is_noble">
-                <el-form-item
-                  label="启用金价"
-                  :prop="is_noble ? 'is_gold_price' : ''"
-                >
+                <el-form-item label="启用金价" prop="is_gold_price">
                   <el-select
                     v-model="ruleForm.is_gold_price"
                     placeholder="启用金价"
@@ -572,10 +563,7 @@
                     </el-form-item>
                   </el-col>
                   <el-col :span="8" v-show="is_noble">
-                    <el-form-item
-                      label="金属种类"
-                      :prop="is_noble ? 'metal_id' : ''"
-                    >
+                    <el-form-item label="金属种类" prop="metal_id">
                       <search-metal-kind
                         :value="ruleForm.metal_id"
                         :size="'mini'"
@@ -586,9 +574,8 @@
                       />
                     </el-form-item>
                     <el-form-item
-                      v-show="ruleForm.is_gold_price === '1'"
+                      v-if="ruleForm.is_gold_price === '1'"
                       label="当前金价"
-                      :prop="ruleForm.is_gold_price === '1' ? 'gold_price' : ''"
                       style="margin: 0 0 0 0"
                     >
                       <el-input
@@ -601,9 +588,8 @@
                       >
                     </el-form-item>
                   </el-col>
-                  <el-col :span="8" class="fr tr">
+                  <el-col :span="8" class="fr tr" v-show="is_noble">
                     <el-form-item
-                      v-show="is_noble"
                       label="其他配置要求"
                       prop="other_config"
                       label-width="120px"
@@ -617,6 +603,8 @@
                         maxlength="200"
                       />
                     </el-form-item>
+                  </el-col>
+                  <el-col :span="8" class="fr tr">
                     <el-button
                       v-if="type !== 'view'"
                       type="primary"
@@ -634,7 +622,6 @@
           </el-col>
         </el-row>
       </el-col>
-      
     </el-row>
   </el-form>
 </template>
@@ -785,6 +772,7 @@ export default {
       this.rulesThis = this.rules;
       this.disabled = false;
       await this.resetForm();
+      this.sch_is_noble();
       this.loading = false;
     },
 
@@ -792,6 +780,28 @@ export default {
       this.multipleSelection = val;
     },
 
+    sch_is_noble() {
+      this.rulesThis["projectNo"][0].required =
+        this.ruleForm.is_project === "1";
+      this.$refs.ruleForm.validateField("projectNo");
+      let list = [
+        "config",
+        "specs_weight",
+        "is_gold_price",
+        "metal_id",
+        "other_config",
+        "gold_price"
+      ];
+
+      for (let i = 0; i < list.length; i++) {
+        if (this.rulesThis[list[i]]) {
+          this.rulesThis[list[i]][0].required = this.is_noble;
+          console.log(list[i] + "===" + this.rulesThis[list[i]][0].required);
+          this.$refs.ruleForm.validateField(list[i]);
+        }
+      }
+    },
+
     //咨询类型选择
     is_project_change() {
       const { is_project } = this.ruleForm;
@@ -946,7 +956,7 @@ export default {
       this.showOtherModel = false;
     },
     async submitForm() {
-      console.log(this.ruleForm);
+      this.sch_is_noble();
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.loading = true;

+ 39 - 185
src/views/sellOut/zixunOrder/index.vue

@@ -39,38 +39,17 @@
                   "
                 >
                   <el-option
-                    v-for="item in expectOptions"
-                    :key="item.value"
+                    v-for="item in options"
+                    :key="item.id"
                     :label="item.label"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-              </el-col>
-              <el-col :span="4" style="width: 155px; padding-left: 10px">
-                <el-select
-                  :size="searchSize"
-                  v-model="parmValue.status"
-                  clearable
-                  placeholder="售后申请状态"
-                  @change="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                  <el-option
-                    v-for="item in serviceOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
+                    :value="item.id"
                   >
                   </el-option>
                 </el-select>
               </el-col>
               <el-col :span="4" style="width: 380px; padding: 0px 0 0 10px">
                 <search-customer
-                  :value="customerCode"
+                  :value="parmValue.khNo"
                   :size="searchSize"
                   :placeholder="'企业客户'"
                   @searchChange="customerChange"
@@ -127,22 +106,10 @@
                     slot="prepend"
                     placeholder="请选择"
                   >
-                    <el-option label="售后申请编号" value="1" />
-                    <el-option label="销售订单编号" value="2" />
-                    <el-option label="销售出库单编号" value="3" />
-                    <el-option label="商品编号" value="4" />
-                    <el-option label="商品名称" value="5" />
-                    <el-option label="申请人" value="6" />
+                    <el-option label="咨询单编号" value="1" />
+                    <el-option label="商品名称" value="2" />
+                    <el-option label="申请人" value="3" />
                   </el-select>
-                  <el-button
-                    slot="append"
-                    icon="el-icon-search"
-                    @click="
-                      pageInfo.curr = 1;
-                      parmValue.page = 1;
-                      searchList();
-                    "
-                  ></el-button>
                 </el-input>
               </el-col>
 
@@ -183,9 +150,15 @@
         <template #status="{ scope }">
           <el-tag
             :size="tablebtnSize"
-            :type="scope.row.status == '0' ? 'warning' : ''"
+            :type="
+              scope.row.status == '5'
+                ? ''
+                : scope.row.status == '6' || scope.row.status == '7'
+                ? 'info'
+                : 'warning'
+            "
             v-text="
-              (statusOptions.find((item) => item.id == scope.row.status) || {})
+              (options.find((item) => item.id == scope.row.status) || {})
                 .label || '--'
             "
           ></el-tag>
@@ -224,7 +197,10 @@
             <i
               class="el-icon-view tb-icon"
               @click="
-                routeGoto('zixunOrderDetail', { id: scope.row.infoNo, type: 'view' })
+                routeGoto('zixunOrderDetail', {
+                  id: scope.row.infoNo,
+                  type: 'view',
+                })
               "
             ></i>
           </el-tooltip>
@@ -265,7 +241,6 @@ export default {
     return {
       select: "1",
       s_input: "",
-      customerCode: [], //客户公司code
       options: [
         { id: "0", label: "待发布竞标" },
         { id: "1", label: "招标进行中" },
@@ -296,18 +271,13 @@ export default {
       isDetail: false,
       modelId: 0,
       parmValue: {
-        order_type: "2",
-        returnCode: "", //售后单号
-        outCode: "", //销售出库单号,
+        khNo: [],
+        zxNo: "",
+        salesman: "",
+        cpName: "",
         status: "", //售后申请单处理状态
-        orderCode: "", //销售单号
-        good_code: "", //商品编号
-        except_code: "", //期望意愿
-        apply_name: "", //申请人名称
         start: "",
         end: "",
-        customer_code: "", //客户公司code
-        good_name: "", //商品名称
         page: 1, // 页码
         size: 15, // 每页显示条数
       },
@@ -327,55 +297,6 @@ export default {
       },
       // 表格 - 列参数
       columns: listCol,
-      serviceOptions: [
-        {
-          value: "0",
-          label: "待审核",
-        },
-        {
-          value: "1",
-          label: "待物流反馈",
-        },
-        {
-          value: "2",
-          label: "待退货",
-        },
-        {
-          value: "3",
-          label: "已退货",
-        },
-      ],
-      serviceValue: "", //售后申请处理状态
-      expectOptions: [
-        {
-          value: "1",
-          label: "退货",
-        },
-        {
-          value: "2",
-          label: "换货",
-        },
-        {
-          value: "3",
-          label: "改变售价",
-        },
-      ],
-      expectValue: "", //期望意愿
-      resultOptions: [
-        {
-          value: "ad",
-          label: "处理中",
-        },
-        {
-          value: "选项2",
-          label: "已同意",
-        },
-        {
-          value: "选项2",
-          label: "已驳回",
-        },
-      ],
-      resultValue: "", //处理结果
     };
   },
   mounted() {
@@ -384,22 +305,16 @@ export default {
 
   methods: {
     restSearch() {
-      this.customerCode = [];
       this.select = "1";
       this.s_input = "";
       this.parmValue = {
-        order_type: "2",
-        returnCode: "", //售后单号
-        outCode: "", //销售出库单号,
+        khNo: [],
+        zxNo: "",
+        salesman: "",
+        cpName: "",
         status: "", //售后申请单处理状态
-        orderCode: "", //销售单号
-        good_code: "", //商品编号
-        except_code: "", //期望意愿
-        apply_name: "", //申请人名称
         start: "",
         end: "",
-        customer_code: "", //客户公司code
-        good_name: "", //商品名称
         page: 1, // 页码
         size: 15, // 每页显示条数
       };
@@ -418,34 +333,7 @@ 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() {
       if (this.parmValue.start !== "" && this.parmValue.end === "") {
@@ -457,13 +345,14 @@ export default {
         return;
       }
       this.loading = true;
-      this.parmValue.returnCode = this.select === "1" ? this.s_input : "";
-      this.parmValue.orderCode = this.select === "2" ? this.s_input : "";
-      this.parmValue.outCode = this.select === "3" ? this.s_input : "";
-      this.parmValue.good_code = this.select === "4" ? this.s_input : "";
-      this.parmValue.good_name = this.select === "5" ? this.s_input : "";
-      this.parmValue.apply_name = this.select === "6" ? this.s_input : "";
-      const res = await asyncRequest.list(this.parmValue);
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.khNo =
+        model.khNo.length > 0 ? model.khNo[model.khNo.length - 1] : "";
+      model.zxNo = this.select === "1" ? this.s_input : "";
+      model.cpName = this.select === "2" ? this.s_input : "";
+      model.salesman = this.select === "3" ? this.s_input : "";
+
+      const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);
@@ -476,37 +365,7 @@ 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 handleTime(e) {
       if (e.startTime !== "") {
@@ -526,13 +385,8 @@ export default {
       }
     },
     async customerChange(e) {
-      if (e && e.id) {
-        this.customerCode = [e.code];
-        this.parmValue.customer_code = e.code;
-      } else {
-        this.customerCode = [];
-        this.parmValue.customer_code = "";
-      }
+      const { code } = e;
+      this.parmValue.khNo = code ? [code] : [];
       this.pageInfo.curr = 1;
       this.parmValue.page = 1;
       await this.searchList();

+ 1 - 1
src/views/serviceParam/business/addEdit.vue

@@ -30,7 +30,7 @@
                   <el-select
                     v-model="ruleForm.region"
                     style="width: 100%"
-                    :disabled="isDetail == '007'"
+                    :disabled="isDetail !== '003'"
                     placeholder="请选择组织/企业"
                   >
                     <el-option label="组织" value="0"></el-option>

Some files were not shown because too many files changed in this diff