Andy %!s(int64=4) %!d(string=hai) anos
pai
achega
b781dfe2fb

+ 9 - 9
src/axios/index.js

@@ -1,6 +1,6 @@
-import axios from 'axios';
+import axios from "axios";
 
-import Vue from 'vue';
+import Vue from "vue";
 
 const instance = axios.create(config);
 
@@ -18,14 +18,14 @@ let config = {
 instance.interceptors.request.use(
   function(config) {
     Vue.prototype.$loading.show();
-    let token = localStorage.getItem('token');
+    let token = localStorage.getItem("token");
     // let proxy_url = 'http://121.37.173.82:82'; //打包上线时请改用此处
-    let proxy_url = process.env.VUE_APP_BASE_URL//打包上线时请改用此处
+    let proxy_url = process.env.VUE_APP_BASE_URL; //打包上线时请改用此处
     // let proxy_url = '/proxy'//打包上线时此处请注释掉
 
     config.url = proxy_url + config.url;
     // 在发送请求之前做些什么,例如加入token
-    config.headers['Authorization'] = token;
+    config.headers["Authorization"] = token;
     return config;
   },
   function(error) {
@@ -44,19 +44,19 @@ instance.interceptors.response.use(
       } else {
         //若code 非 200
         if (res.data.code == 401) {
-          localStorage.removeItem('token');
+          localStorage.removeItem("token");
           return location.reload();
         }
-        Vue.prototype.$Message.error(res.data.msg || '未知错误');
+        Vue.prototype.$Message.error(res.data.msg || "未知错误");
         return res.data || res;
       }
     } else {
-      return Vue.prototype.$Message.error('请求超时');
+      return Vue.prototype.$Message.error("请求超时");
     }
   },
   // 对于错误响应的处理
   (err) => {
-    Vue.prototype.$Notice.error({ title: '请求失败', desc: err });
+    Vue.prototype.$Notice.error({ title: "请求失败", desc: err });
     Vue.prototype.$loading.hide();
     return err;
   }

+ 15 - 6
src/views/BasicSettings/PartSettings/detail.vue

@@ -32,9 +32,10 @@
             <Select
               filterable
               filter-by-label
+              clearable
               v-model="formData.process_id"
               style="width: 100px;margin-right:5px"
-              @on-change="handleProcessSelected"
+              @on-change="(e)=>handleProcessSelected(e,1)"
             >
               <Option
                 v-for="(item, index) in basic_process_list"
@@ -48,7 +49,8 @@
             <Select
               filterable
               filter-by-label
-              @on-change="(e) => handleGetProcessIds(formData.process_id, e)"
+              clearable
+              @on-change="(e) => handleGetProcessIds(formData.process_id, e,1)"
               v-model="formData.type_title"
               style="width: 100px;margin-right:5px"
             >
@@ -374,19 +376,26 @@ export default {
           this.handlePartSelected(this.formData.part_id, 2);
         });
     },
-    handleProcessSelected(p_id) {
+    handleProcessSelected(p_id, tag) {
       p_id &&
         this.axios.post("/api/process_sub_title", { p_id }).then((res) => {
           this.type_title_list = res.data;
+          if (tag) {
+            this.formData.type_title = "";
+            this.formData.process_ids = [];
+          }
         });
     },
-    handleGetProcessIds(p_id, type_title) {
+    handleGetProcessIds(p_id, type_title,tag) {
       this.axios
         .get("/api/properties_index", { params: { p_id, type_title } })
         .then((res) => {
           this.process_list = res.data.data;
-          if (this.formData.process_ids.length==this.process_list.length) {
-            this.formData.process_ids.unshift('全选')
+          if (this.formData.process_ids.length == this.process_list.length) {
+            this.formData.process_ids.unshift("全选");
+          }
+          if (tag) {
+            this.formData.process_ids = [];
           }
         });
     },

+ 13 - 36
src/views/OrderMannage/BusinessOrderlist/edit.vue

@@ -451,13 +451,13 @@
             <div class="content_header">
               <h2>产品信息</h2>
               <div>
-                <Button
+                <!-- <Button
                   type="primary"
                   style="margin-right: 10px"
                   v-show="type != 3"
                   @click="handleMetalAdd"
                   >新增五金</Button
-                >
+                > -->
                 <Button
                   type="primary"
                   style="margin-right: 10px"
@@ -465,20 +465,20 @@
                   @click="handleShowMaterial"
                   >{{ is_material_show ? "收起" : "查看" }}原材料</Button
                 >
-                <Button
+                <!-- <Button
                   type="primary"
                   style="margin-right: 10px"
                   v-show="type != 3"
                   @click="handleTableAdd"
                   >新增产品(简)</Button
-                >
-                <Button
+                > -->
+                <!-- <Button
                   type="primary"
                   style="margin-right: 10px"
                   v-show="type != 3"
                   @click="handleSet({}, null, 1)"
                   >新增产品(详)</Button
-                >
+                > -->
               </div>
             </div>
           </template>
@@ -2581,25 +2581,12 @@ export default {
       let sendData = JSON.parse(JSON.stringify(this.info));
       // sendData.custom_detail_id = sendData.custom_id
       // let sendList = JSON.parse(JSON.stringify(this.tableData));
-      let sendList = this.tableData.filter((v) => !v.is_metal);
+      let sendList = this.tableData.filter((v) => !v.is_metal && v.product_id);
       let _save_metal = this.tableData.filter((v) => v.is_metal && v.id);
       _save_metal.map((v) => {
         v.type = 1;
         v.material_id = v.product_id;
       });
-      // this.tableData.map((item, index) => {
-      //   if (!item.is_metal) {
-      //     item.part.map((it, idx) => {
-      //       if (!it.is_metal) {
-      //         if (!sendList[index].part) {
-      //           sendList[index].part = [];
-      //         }
-      //         sendList[index].part[idx] = it;
-      //       }
-      //     });
-      //   }
-      // });
-      // sendList= this.tableData.filter(item)
       sendList.map((element, index) => {
         element.part.map((elem) => {
           if (!elem.is_metal) {
@@ -2671,7 +2658,7 @@ export default {
           this.tableData.forEach((element) => {
             //表格编辑用数据
             element.num_temp_save = element.num || 1;
-            if (element.length > 0) {
+            if (element.ext.length > 0) {
               element.ext.map((v, k) => {
                 if (v.type == 2) {
                   v.id = v.ext_id;
@@ -3243,6 +3230,7 @@ export default {
           this.info.custom_detail_id = this.clientDetailList_respon[0].id || 0;
           this.info.service_id = res.data.detail.service_id;
           this.fax = res.data.detail.fax;
+          this.HandleAutoCreateNewLine();
           this.$forceUpdate();
         });
       } else {
@@ -3699,19 +3687,6 @@ export default {
           measure: this._measure, //测量字段数组
           support_remark: this.support_remark, //备注列表
           is_metal: false,
-          ext: [],
-          extArray: [
-            {
-              num: 0,
-              price: 0,
-              total_price: 0,
-              type: 2,
-              remark: "",
-              title: "",
-              id: "",
-              is_metal: true,
-            },
-          ],
           process_obj: JSON.parse(JSON.stringify(this.process_obj)), //工艺属性含选项对象
         };
         obj.process_obj.map(
@@ -3811,7 +3786,9 @@ export default {
           if (!row.is_metal) {
             this.route_id_at_copy = row.route_id;
           }
-          this.pre_process_obj = JSON.parse(JSON.stringify(row.procedure_properties))
+          this.pre_process_obj = JSON.parse(
+            JSON.stringify(row.procedure_properties)
+          );
           this.tableData.splice(index + 1, 0, obj);
           this.handleCalcCount();
           break;
@@ -4238,7 +4215,7 @@ export default {
               } else {
                 for (const key in this.pre_process_obj) {
                   const item = this.pre_process_obj[key];
-                  row[key] = item*1;
+                  row[key] = item * 1;
                 }
                 element.change_id = element.change[0].id;
               }

+ 16 - 2
src/views/leadMatch/MatchList/matchCheck.vue

@@ -35,6 +35,7 @@
               filterable
               multiple
               filter-by-label
+              clearable
               transfer
               v-model="matchedInfo.image_number"
               :max-tag-count="2"
@@ -57,6 +58,7 @@
               filterable
               multiple
               filter-by-label
+              clearable
               transfer
               v-model="matchedInfo.product_name"
               :max-tag-count="2"
@@ -150,6 +152,7 @@
                 filterable
                 multiple
                 transfer
+                clearable
                 filter-by-label
                 v-model="matchedInfo.region"
                 :max-tag-count="2"
@@ -172,6 +175,7 @@
                 filterable
                 multiple
                 transfer
+                clearable
                 filter-by-label
                 v-model="matchedInfo.number"
                 :max-tag-count="2"
@@ -194,6 +198,7 @@
                 filterable
                 multiple
                 transfer
+                clearable
                 filter-by-label
                 v-model="matchedInfo.part_name"
                 :max-tag-count="2"
@@ -261,7 +266,13 @@
       <div>
         <div class="process_modal">
           <span>生产人员:</span>
-          <Select v-model="process_man" style="width: 150px">
+          <Select
+            v-model="process_man"
+            filterable
+            filter-by-label
+            clearable
+            style="width: 150px"
+          >
             <Option
               v-for="item in processManList"
               :key="item.id"
@@ -422,7 +433,9 @@ export default {
       this.$router.go(-1);
     },
     handleGoProduction(type, row) {
-      console.log(row);
+      if (this.matchedSelectedList.length == 0) {
+        return this.$Message.warning("请选择");
+      }
       if (type === 2) {
         this.cut_order_product_ids = [row.id];
       } else {
@@ -448,6 +461,7 @@ export default {
         if (res.code == 200) {
           this.$Message.success(res.msg);
           this.processModal = false;
+          this.matchedSelectedList = [];
           this.initData();
         }
         setTimeout(() => {

+ 32 - 34
vue.config.js

@@ -1,43 +1,41 @@
 const axios_default_ip =
-    process.env.NODE_ENV == 'dev' ?
-    'http://121.37.173.82:82' :
-    process.env.NODE_ENV == 'test-prd' ?
-    'http://121.41.102.225:82' //测试服
-    :
-    process.env.NODE_ENV == 'prd_other' ?
-    'http://121.37.173.82:82' //贝斯特
-    :
-    'http://124.71.176.88:82';
+  process.env.NODE_ENV == "dev"
+    ? "http://121.41.102.225:82"
+    : process.env.NODE_ENV == "test-prd"
+    ? "http://121.41.102.225:82" //测试服
+    : process.env.NODE_ENV == "prd_other"
+    ? "http://121.37.173.82:82" //贝斯特
+    : "http://124.71.176.88:82";
 //  http://124.71.176.88:882  //江山
 // 'http://121.41.102.225:82' :测试
 
 process.env.VUE_APP_BASE_URL = axios_default_ip;
 module.exports = {
-    publicPath: './',
-    outputDir: 'dist',
-    assetsDir: 'static',
-    indexPath: 'index.html',
-    productionSourceMap: process.env.NODE_ENV === 'development',
-    devServer: {
-        proxy: {
-            '/proxy': {
-                target: axios_default_ip,
-                ws: true, // proxy websockets
-                changeOrigin: true,
-                pathRewrite: {
-                    '^/proxy': '', // rewrite path
-                },
-            },
-            '/postek/print': {
-                target: 'http://192.168.1.110:888',
-                ws: true, // proxy websockets
-                changeOrigin: true,
-                // pathRewrite: {
-                //     '^/postek': '', // rewrite path
-                // },
-            }
+  publicPath: "./",
+  outputDir: "dist",
+  assetsDir: "static",
+  indexPath: "index.html",
+  productionSourceMap: process.env.NODE_ENV === "development",
+  devServer: {
+    proxy: {
+      "/proxy": {
+        target: axios_default_ip,
+        ws: true, // proxy websockets
+        changeOrigin: true,
+        pathRewrite: {
+          "^/proxy": "", // rewrite path
         },
+      },
+      "/postek/print": {
+        target: "http://192.168.1.110:888",
+        ws: true, // proxy websockets
+        changeOrigin: true,
+        // pathRewrite: {
+        //     '^/postek': '', // rewrite path
+        // },
+      },
     },
+  },
 
-    lintOnSave: false, //禁用eslint  便于开发
-};
+  lintOnSave: false, //禁用eslint  便于开发
+};