mushencc vor 3 Jahren
Ursprung
Commit
592d61b2c1

+ 43 - 66
src/views/MaterialMannage/edit.vue

@@ -105,7 +105,7 @@
       <FormItem label="上传附件:">
           <div class="product-img">
             <div class="product-add">
-              <div class="img_items" v-if="this.info.img_url !== ''">
+              <div class="img_items" v-if="this.info.img_url">
                 <img
                   @click="looks(info.img_url)"
                   :src="$store.state.ip + this.info.img_url"
@@ -142,7 +142,7 @@
                   multiple
                   :data="uploadData"
                   :on-error="uploadError"
-                  :on-progress="onProgress"
+                  :on-progress="onProgress"info
                   :on-success="uploadSuccess"
                   :action="$store.state.ip + '/api/deep_img_import'">
             <Button type="primary"
@@ -170,23 +170,8 @@
           type="success"
           ghost
           style="margin-right:10px;margin-top:35px"
-          @click="handleBrand(null,1)"
-          :disabled="type == 3 ? true : false"
-        >添加品牌</Button>
-         <Button
-         ghost
-          type="success"
-          style="margin-right:10px;margin-top:35px"
-          :disabled="type == 3 ? true : false"
-            @click="handleBrand(null,2)"
-        >编辑品牌</Button>
-          <Button
-          ghost
-          type="success"
-          style="margin-right:10px;margin-top:35px"
-            @click="handleBrand(null,3)"
-          :disabled="type == 3 ? true : false"
-        >删除品牌</Button>
+          @click="handleBrand(null)"
+        >{{type==3?'查看品牌':'编辑品牌'}}</Button>
       </FormItem>
       <!-- <FormItem label="单价(元)" v-show="isShowInfoPrice" prop="price">
         <Input
@@ -301,25 +286,8 @@
                 type="success"
                 ghost
                 style="margin-left:10px;"
-                :disabled="type == 3 ? true : false"
-                @click="handleBrand(info.detail,1,key)"
-                >添加品牌</Button
-              >
-               <Button
-                type="success"
-                ghost
-                style="margin-left:10px;"
-                :disabled="type == 3 ? true : false"
-                @click="addMaterrial(info.detail,2)"
-                >编辑品牌</Button
-              >
-               <Button
-                type="success"
-                ghost
-                style="margin-left:10px;"
-                :disabled="type == 3 ? true : false"
-                @click="addMaterrial(info.detail,3)"
-                >删除品牌</Button
+                @click="handleBrand(info.detail,key)"
+                >{{type==3?'查看品牌':'编辑品牌'}}</Button
               >
             </div>
           </FormItem>
@@ -349,17 +317,19 @@
              <Button type="primary">搜索</Button>
             </FormItem>
           </Form> -->
-          <div class="add_btn">
-           <Button type="primary" @click="addItem">增行</Button>
+          <div class="add_btn" v-if="type!=3">
+           <Button type="primary" @click="addItem" >增行</Button>
           </div>
-          <Table :data='modelTableData' :columns='modelTableColumns' border max-height='500' @on-selection-change='modelSelectData'>
-            <template slot="title" slot-scope="{index}">
-              <Select clearable v-model="modelTableData[index].brand_id" placeholder="请输入品牌名称" transfer>
+          <Table :data='modelTableData' :columns='type==3?detailModelTableColumns:modelTableColumns' border max-height='500'>
+            <template slot="title" slot-scope="{index,row}">
+              <Select v-if="type!=3" clearable v-model="modelTableData[index].brand_id" placeholder="请输入品牌名称" transfer @on-change='modelChange'>
                 <Option v-for="item in brandList" :key="item.id" :value="item.id" :label="item.title"/>
               </Select>
+              <span v-else>{{row.brand_title}}</span>
             </template>
-            <template slot="product_code" slot-scope="{index}">
-              <Input clearable v-model="modelTableData[index].code" placeholder="请输入物料编码"/>
+            <template slot="product_code" slot-scope="{index,row}">
+              <Input clearable v-model="modelTableData[index].code" placeholder="请输入物料编码" @on-change='modelChange' v-if="type!=3"/>
+              <span v-else>{{row.code}}</span>
             </template>
             <template slot="set" slot-scope="{index}">
               <a @click="ModelDel(index)">删除</a>
@@ -377,16 +347,17 @@ export default {
   data() {
     return {
       modelIndex:'',
-      modelData:[],
       brandList:[],
       modelTableData:[],
       modelTableColumns:[
-        {type:'selection',align:'center',minWidth:60},
         {title:'品牌名称',key:'title',align:'center',minWidth:120,slot:'title'},
         {title:'物料编码',key:'code',align:'center',minWidth:120,slot:'product_code'},
         {title:'操作',key:'set',slot:'set',minWidth:120,align:'center'}
       ],
-      modelBrandTitle:'',
+      detailModelTableColumns:[
+  {title:'品牌名称',key:'title',align:'center',minWidth:120,slot:'title'},
+        {title:'物料编码',key:'code',align:'center',minWidth:120,slot:'product_code'},
+      ],
       showBrand:false,
       del_list:[],
       type: 1,
@@ -458,7 +429,6 @@ export default {
       : this.info.m_id;
     this.axios("/api/basics_material_index").then((res) => {
       this.materialList = res.data.data;
-      console.log(res)
     });
     if (this.id) {
       this.getData(this.id);
@@ -523,16 +493,26 @@ export default {
     },
   },
   methods: {
+    modelChange(){
+      if(!this.isShowDetail){
+           this.info.detail[0].is_edit = true;
+      }else{
+         if(!this.info.detail[this.modelIndex].is_add){
+             this.info.detail[this.modelIndex].is_edit = true;
+           }
+      }
+          
+    },
     sureBrand(){
+      console.log(this.info.detail)
+      console.log(this.modelIndex)
          if(!this.isShowDetail){
-           this.info.detail[0].list = this.modelData;
+           this.info.detail[0].list = this.modelTableData;
          }else{
-              this.info.detail[this.modelIndex].list = this.modelData;
+              this.info.detail[this.modelIndex].list = this.modelTableData;
          }
-         console.log(this.info.detail)
-    },
-    modelSelectData(e){
-          this.modelData = e;
+
+        this.modelTableData = [];
     },
     ModelDel(index){
     this.modelTableData.splice(index,1)
@@ -544,23 +524,20 @@ export default {
       }
     this.modelTableData.push(obj)
     },
-handleBrand(obj,type,key){
+handleBrand(obj,key){
  //type ==1 添加 2 编辑 3删除;
- switch(type){
-   case 1:
-     case 2:
-       if(key){
+       if(key===0||key){
          this.modelIndex = key;
+         console.log(this.modelIndex)
          this.modelTableData = this.info.detail[key].list?this.info.detail[key].list:[];
+         console.log(this.modelTableData)
        }else{
          this.modelTableData = this.info.detail[0].list?this.info.detail[0].list:[];
        }
-       
+       this.modelTableData.forEach(element => {
+         element.brand_id = Number(element.brand_id)
+       });
        this.showBrand = true;
-       break
-       case 3:
-         break;
- }
 },
     changeSate(rows,index){
           if(!rows.is_add){
@@ -599,7 +576,7 @@ handleBrand(obj,type,key){
     getData(id) {
       this.axios("/api/material", { params: { id: id } }).then((res) => {
         console.log(res)
-        let data = res.data.shift();
+        let data = res.data[0];
         this.info = data;
         if (this.info.detail.length < 1) {
           this.info.detail = [

+ 3 - 1
src/views/leadMatch/MatchList/HXYMatchList.vue

@@ -186,7 +186,9 @@ export default {
         case 1:
           this.$router.push({
             path: "/cms/leadMatch/MatchList/NewHXYMatchPage",
-            // /cms/leadMatch/MatchList/HXYMatchPage  华信源之前的逻辑,后来改成跟倍思特一样的逻辑,表格字段换一下,接口新的
+            // /cms/leadMatch/MatchList/HXYMatchPage
+            // /cms/leadMatch/MatchList/NewHXYMatchPage
+            //华信源之前的逻辑,后来改成跟倍思特一样的逻辑,表格字段换一下,接口新的
             query: {
               type,
               id: row.id,

+ 1 - 0
src/views/leadMatch/MatchList/HXYMatchPage.vue

@@ -971,6 +971,7 @@ export default {
         { title: "序号", align: "center", type: "index", minWidth: 60 },
           { title: "组合名称", align: "center", key: "compose_name", minWidth: 100 },
         { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },
+        { title: "行号", align: "center", key: "line_number", minWidth: 100 },
         {
           title: "产品材料",
           align: "center",

+ 94 - 66
src/views/leadMatch/MatchList/NewHXYMatchPage.vue

@@ -127,15 +127,19 @@
                         <span>产品名称:</span>
                         <span>{{ url_info.product_name }}</span>
                       </Col>
-                      <Col span="4">
+                      <Col span="3">
                         <span>批量数:</span>
                         <span>{{ url_info.number }}</span>
                       </Col>
-                      <Col span="2">
+                      <Col span="3">
                         <span>区域:</span>
                         <span>{{ url_info.region }}</span>
                       </Col>
-                      <Col span="2" offset="4">
+                       <Col span="4">
+                        <span>生产通知单号:</span>
+                        <span>{{ url_info.product_no }}</span>
+                      </Col>
+                      <Col span="2" offset="1">
                         <span>
                           总计
                           <span style="color:red">{{
@@ -144,7 +148,7 @@
                           条数据
                         </span>
                       </Col>
-                      <Col span="4">
+                      <Col span="3">
                         <Button
                           @click="handleShowCurrencySheet(url_info, 1)"
                           size="small"
@@ -263,7 +267,6 @@
                               >
                                 {{ match_info.key }}={{ match_info.value }}
                               </span>
-                              <span>{{ table_info.key.num }}组</span>
                             </Col>
                             <Col span="3" offset="8">
                               总计{{ table_info.part_list.length }}条数据
@@ -343,7 +346,7 @@
                       </Col>
                     </Row>
                     <Row>
-                      <Col span="4">
+                      <Col span="7">
                         <span>批量数:</span>
                         <span>{{ url_info.number }}</span>
                       </Col>
@@ -531,6 +534,10 @@
               <Col span="2">
                 <span>区域:{{ matched_info.region }}</span>
               </Col>
+               <Col span="4">
+                        <span>生产通知单号:</span>
+                        <span>{{ url_info.number }}</span>
+                      </Col>
               <Col span="2" offset="8">
                 <Button
                   @click="handleMatchedSet(matched_info, -1, 5)"
@@ -658,7 +665,6 @@
                     >
                       {{ matched_info.key }}={{ matched_info.value }}
                     </span>
-                    <span>{{ matched_detail.num }}组</span>
                   </Col>
                   <Col span="2" offset="12" style="padding:10px 0">
                     <Button
@@ -818,86 +824,109 @@ export default {
         { title: "序号", align: "center", type: "index", minWidth: 60 },
           { title: "组合名称", align: "center", key: "compose_name", minWidth: 100 },
         { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },
-        { title: "行号", align: "center", key: "line", minWidth: 70 },
-        { title: "木皮1", align: "center", key: "skin1", minWidth: 60 },
+        { title: "行号", align: "center", key: "line_number", minWidth: 100 },
         {
-          title: "材料",
+          title: "产品材料",
           align: "center",
           minWidth: 80,
-          render: (h, params) => {
-            return h("span", {}, params.row.board1 + (params.row.board2?(';'+params.row.board2):''));
-          },
+          key:'material_remark'
         },
-        { title: "木皮2", align: "center", key: "skin2", minWidth: 60 },
+        { title: "饰面名称", align: "center", key: "finish_remark", minWidth: 60 },
         { title: "毛料尺寸", align: "center", key: "wool_size", minWidth: 80 },
+        
+        { title: "精裁尺寸", align: "center", key: "cut_size", minWidth: 80 },
         {
-          title: "原料数量",
+          title: "数量",
           align: "center",
-          key: "wool_number",
+          key: "cut_number",
           minWidth: 80,
         },
-        { title: "精裁尺寸", align: "center", key: "cut_size", minWidth: 80 },
         {
-          title: "零部件数量",
+          title: "贴皮方式",
           align: "center",
-          key: "cut_number",
+          key: "skin",
           minWidth: 90,
+          render:(h,params)=>{
+            return h('span',{},params.row.skin==1?'单':params.row.skin ==2?'双':'素板')
+          }
         },
         {
-          title: "未匹配数量",
+          title: "封边",
           align: "center",
-          key: "unbind_number",
+          key: "band",
           minWidth: 90,
         },
-        { title: "贴皮面积", align: "center", key: "stick", minWidth: 80 },
-        { title: "精裁面积", align: "center", key: "cut", minWidth: 80 },
-        { title: "工艺要求", align: "center", key: "remark", minWidth: 80 },
+        { title: "贴皮面积", align: "center", key: "skin_area", minWidth: 80 },
+        { title: "精裁面积", align: "center", key: "cut_area", minWidth: 80 },
+       { title: "备注", align: "center", key: "remark", minWidth: 80 },
+ { title: "打印芯片", align: "center", key: "chip_state", minWidth: 80,render:(h,params)=>{
+   const {row} = params;
+   return h('span',{},row.chip_state==1?'是':'否')
+   } },
       ], //未匹配码单表头
       unmatchedRoomTableColumns: [
         { title: "全选", align: "center", minWidth: 60, type: "selection" },
         { title: "序号", align: "center", type: "index", minWidth: 60 },
-        { title: "区域", align: "center", key: "region", minWidth: 60 },
         { title: "楼栋", align: "center", key: "house", minWidth: 60 },
         { title: "单元", align: "center", key: "unit", minWidth: 60 },
         { title: "楼层", align: "center", key: "layer", minWidth: 60 },
+         { title: "区域", align: "center", key: "region", minWidth: 60 },
+         { title: "户型", align: "center", key: "household", minWidth: 60 },
         { title: "房号", align: "center", key: "number", minWidth: 60 },
+        { title: "生产数量", align: "center", key: "num", minWidth: 60 },
+        { title: "备注", align: "center", key: "remark", minWidth: 60 },
       ], //未匹配房间表头
       unmatchedRoomTableColumnsUsed: [],
       matchedSheetTableColumns: [
         // { title: "全选", align: "center", minWidth: 60, type: "selection" },
-        { title: "序号", align: "center", type: "index", minWidth: 60 },
-         { title: "组合名称", align: "center", key:'compose_name', minWidth: 100 },
-        { title: "区域名称", align: "center", key: "region", minWidth: 100 },
-        { title: "房号", align: "center", key: "house_number", minWidth: 100 },
+           { title: "序号", align: "center", type: "index", minWidth: 60 },
+        { title: "楼栋", align: "center",minWidth: 100,key:'house' },
+        { title: "单元", align: "center",minWidth: 100,key:'unit' },
+        { title: "楼层", align: "center", minWidth: 100,key:'layer'},
+         { title: "区域", align: "center", minWidth: 100,key:'region'},
+          { title: "户型", align: "center", minWidth: 100,key:'household'},
+          { title: "房号", align: "center", minWidth: 100,key:'house_number'},
+           { title: "生产数量", align: "center", minWidth: 100,key:'product_num'},
+          { title: "组合名称", align: "center", key: "compose_name", minWidth: 100 },
         { title: "部件名称", align: "center", key: "part_name", minWidth: 100 },
-        { title: "行号", align: "center", key: "line", minWidth: 80 },
-        { title: "木皮1", align: "center", key: "skin1", minWidth: 100 },
         {
-          title: "原材料",
+          title: "产品材料",
           align: "center",
-          minWidth: 100,
-          render: (h, params) => {
-            return h("span", {}, params.row.board1 + (params.row.board2?(';'+params.row.board2):''));
-          },
+          minWidth: 80,
+         key:'material_remark'
         },
-        { title: "木皮2", align: "center", key: "skin2", minWidth: 100 },
-        { title: "毛料尺寸", align: "center", key: "wool_size", minWidth: 100 },
+        { title: "饰面名称", align: "center", key: "finish_remark", minWidth: 60 },
+        { title: "毛料尺寸", align: "center", key: "wool_size", minWidth: 80 },
+        
+        { title: "精裁尺寸", align: "center", key: "cut_size", minWidth: 80 },
         {
-          title: "原料数量",
+          title: "数量",
           align: "center",
-          key: "wool_number",
+          key: "num",
           minWidth: 80,
         },
-        { title: "精裁尺寸", align: "center", key: "cut_size", minWidth: 100 },
+         {
+          title: "贴皮方式",
+          align: "center",
+          key: "skin",
+          minWidth: 90,
+          render:(h,params)=>{
+            return h('span',{},params.row.skin==1?'单':params.row.skin ==2?'双':'素板')
+          }
+        },
         {
-          title: "零部件数量",
+          title: "封边",
           align: "center",
-          key: "num",
-          minWidth: 80,
+          key: "band",
+          minWidth: 90,
         },
-        { title: "贴皮面积", align: "center", key: "stick", minWidth: 100 },
-        { title: "精裁面积", align: "center", key: "cut", minWidth: 100 },
-        { title: "工艺要求", align: "center", key: "remark", minWidth: 60 },
+        { title: "贴皮面积", align: "center", key: "skin_area", minWidth: 80 },
+        { title: "精裁面积", align: "center", key: "cut_area", minWidth: 80 },
+       { title: "备注", align: "center", key: "remark", minWidth: 80 },
+ { title: "打印芯片", align: "center", key: "", minWidth: 80,render:(h,params)=>{
+   const {row} = params;
+   return h('span',{},row.chip_state==1?'是':'否')
+   } },
         // {
         //   title: "操作",
         //   align: "center",
@@ -943,13 +972,13 @@ export default {
     },
     handleMatchedListInit() {
       this.axios
-        .get("/api/bst_matching_on_product_list", {
-          params: {
+        .post("/api/bst_matching_on_product_list_2", 
+          {
             id: this.info.id,
             image_number: this.matchedInfo.image_number,
             product_name: this.matchedInfo.product_name,
           },
-        })
+        )
         .then((res) => {
           res.data.list.map((v) => {
             v.isCurrenct = false;
@@ -1012,7 +1041,7 @@ export default {
         case 1:
           row.isCurrenct &&
             this.axios
-              .post("/api/bst_matching_un_product_detail", {
+              .post("/api/bst_matching_un_product_detail_2", {
                 cut_order_product_id: row.id,
                 id: this.info.id,
                 cut_size: this.info.cut_size,
@@ -1023,7 +1052,6 @@ export default {
                 key: this.matchedReopenList,
               })
               .then((res) => {
-                console.log(`123`, 123);
                 this.unmatchedObj.part_list = [];
                 this.unmatchedObj.part_list = res.data.part_list;
                 this.unmatchedObj.part_list = res.data.part_list;
@@ -1033,11 +1061,11 @@ export default {
                 console.log(res.data.house_list);
                 this.unmatchedRoomList.house_list = [];
                 this.unmatchedRoomList.house_list = res.data.house_list;
-                this.unmatchedRoomList.house_list.forEach((v,index) => {
-                  this.unmatchedObj.part_list[index].key.list.forEach((item) => {
-                    v[item.key] = item.value;
-                  });
-                });
+                // this.unmatchedRoomList.house_list.forEach((v,index) => {
+                //   this.unmatchedObj.part_list[index].key.list.forEach((item) => {
+                //     v[item.key] = item.value;
+                //   });
+                // });
 
                 this.unmatchedRoomTableColumnsUsed = this.unmatchedRoomTableColumns.concat(
                   res.data.head_word.map((v) => {
@@ -1072,7 +1100,7 @@ export default {
         case 2:
           row.isCurrenct &&
             this.axios
-              .post("/api/bst_matching_un_product_detail", {
+              .post("/api/bst_matching_un_product_detail_2", {
                 cut_order_product_id: row.id,
                 id: this.info.id,
                 cut_size: this.info.cut_size,
@@ -1119,15 +1147,15 @@ export default {
     getMatchedDetailList(row) {
       row.isCurrenct &&
         this.axios
-          .get("/api/bst_matching_on_product_detail", {
-            params: {
+          .post("/api/bst_matching_on_product_detail_2", 
+             {
               cut_order_product_id: row.id || 14,
               id: this.matchedInfo.id,
               number: this.matchedInfo.number,
               part_name: this.matchedInfo.part_name,
               region: this.matchedInfo.region,
             },
-          })
+          )
           .then((res) => {
             this.regionMatchedList = res.data.region;
             this.numberMatchedList = res.data.number;
@@ -1137,9 +1165,9 @@ export default {
     },
     handleSearchUnmatchedInfo() {
       this.axios({
-        method: "get",
-        url: "/api/bst_matching_un_product_list",
-        params: {
+        method: "post",
+        url: "/api/bst_matching_un_product_list_2",
+        data:{
           id: this.info.id,
           image_number: this.info.image_number,
           product_name: this.info.product_name,
@@ -1199,7 +1227,7 @@ export default {
     },
     handleAutoMatching() {
       this.axios
-        .post("/api/matching_product_house", {
+        .post("/api/matching_product_house_2", {
           id: this.info.id,
           image_number: this.info.image_number,
           product_title: this.info.product_name,
@@ -1216,7 +1244,7 @@ export default {
         return { cut_order_product_room_id: v.id, num: v.num };
       });
       this.axios
-        .post("/api/bst_hand_matching", {
+        .post("/api/bst_hand_matching_2", {
           cut_order_product_detail_id: this.currentChooseId,
           house,
         })

+ 1 - 1
vue.config.js

@@ -2,7 +2,7 @@ const axios_default_ip =
   process.env.NODE_ENV == "dev"
     ? "http://121.41.102.225:82"
     : process.env.NODE_ENV == "test-prd"
-    ? "http://hxy_api.qingyaokeji.com" //测试服
+    ? "http://121.41.102.225:82" //测试服
     : process.env.NODE_ENV == "prd_other"
     ? "http://121.37.173.82:82" //贝斯特
     : "http://124.71.176.88:882";