mushencc 3 éve
szülő
commit
35c52275c3

+ 21 - 0
src/views/Agreement/match/check.vue

@@ -304,6 +304,27 @@ export default {
           width: 180,
         },
         {
+          title: "单位",
+          align: "center",
+          key: "unit",
+          resizable: true,
+          width: 180,
+        },
+        {
+          title: "饰面",
+          align: "center",
+          key: "finish",
+          resizable: true,
+          width: 180,
+        },
+        {
+          title: "备注",
+          align: "center",
+          key: "remark",
+          resizable: true,
+          width: 180,
+        },
+        {
           title: "金额",
           align: "center",
           key: "total_price",

+ 5 - 2
src/views/Agreement/match/list.vue

@@ -30,7 +30,7 @@
         </span>
       </Col>
       <Col span="2" offset="2">
-        <Button @click="initData" type="primary" style="margin-right: 10px" size='small'
+        <Button @click="initData(1)" type="primary" style="margin-right: 10px" size='small'
           >搜索</Button
         >
       </Col>
@@ -121,7 +121,10 @@ export default {
     this.initData();
   },
   methods: {
-    initData() {
+    initData(page) {
+      if(page){
+        this.page_index = 1
+      }
       this.axios({
         method: "post",
         url: "/api/contract_match_list",

+ 113 - 42
src/views/Agreement/match/matching.vue

@@ -277,7 +277,7 @@
                           transfer
                           clearable
                           filter-by-label
-                          v-model="matchedInfo.product_title	"
+                          v-model="matchedInfo.product_title"
                           :max-tag-count="2"
                           size="small"
                           style="width: 100px"
@@ -293,7 +293,7 @@
                     </Col>
                     <Col span="2">
                       <Button
-                        @click="getMatchedDetailList(matched_info)"
+                        @click="getMatchedDetailList(matched_info,1)"
                         size="small"
                         type="primary"
                       >
@@ -302,7 +302,6 @@
                     </Col>
                   </Row>
                   <div v-if="matched_info.isCurrenct">
-                    <keep-alive>
                       <Table
                         ref="selection"
                         @on-selection-change="checkedDeepen"
@@ -331,7 +330,6 @@
                           </div>
                         </template>
                       </Table>
-                    </keep-alive>
                   </div>
                 </div>
               </div>
@@ -371,13 +369,12 @@
                   style="display: flex; justify-content: space-between"
                   span="6"
                 >
-                  <span v-if="matched_info.matching_status == 2">
+                  <span>
                     <Button
-                      @click="handleGoProduction(2, matched_info)"
+                      @click="handleMatchedSet(matched_info,1)"
                       type="primary"
                       size="small"
-                      :disabled="matched_info.product_state != 0"
-                      >下生产通知</Button
+                      >撤销匹配</Button
                     >
                   </span>
 
@@ -649,6 +646,24 @@ export default {
           resizable: true,
         },
         {
+          title: "单位",
+          align: "center",
+          key: "unit",
+          resizable: true,
+        },
+        {
+          title: "饰面",
+          align: "center",
+          key: "finish",
+          resizable: true,
+        },
+        {
+          title: "备注",
+          align: "center",
+          key: "remark",
+          resizable: true,
+        },
+        {
           title: "金额",
           align: "center",
           key: "total_price",
@@ -731,6 +746,24 @@ export default {
           resizable: true,
         },
         {
+          title: "单位",
+          align: "center",
+          key: "unit",
+          resizable: true,
+        },
+        {
+          title: "饰面",
+          align: "center",
+          key: "finish",
+          resizable: true,
+        },
+        {
+          title: "备注",
+          align: "center",
+          key: "remark",
+          resizable: true,
+        },
+        {
           title: "金额",
           align: "center",
           key: "total_price",
@@ -751,12 +784,12 @@ export default {
       checkedContractList: [], //合同选择的数据
       checkedDeepenList: [], //深化信息选择的
       revocationList: [], //撤销匹配选中的列表
-      search:{
-        product_title_list:[],
-        region_list:[]
+      search: {
+        product_title_list: [],
+        region_list: [],
       },
-      searchRegionList:[],
-      searchProductTitleList:[]
+      searchRegionList: [],
+      searchProductTitleList: [],
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -778,13 +811,14 @@ export default {
         this.matched_detail[row._index].total_price = Number(
           this.matched_detail[row._index].total_price
         ).toFixed(2);
-        if (row.total_price > 0) {
-          this.matched_detail.forEach((e) => {
-            if (e.id == row.id) {
-              e.total_price = row.total_price;
-            }
-          });
+          if (row.total_price > 0) {
+            this.matched_detail.forEach((e) => {
+              if (e.id == row.id) {
+               e.total_price = row.total_price;
+             }
+            });
         }
+        
         return;
       }
     },
@@ -893,23 +927,34 @@ export default {
 
       return sums;
     },
-    handleMatchedSet(row, index, type) {
+    handleMatchedSet(row, type) {
       console.log(this.matchedSelectedList);
-      if (this.matchedSelectedList.length == 0) {
+      if (this.matchedSelectedList.length == 0 && type !=1) {
         return this.$Message.warning("请选择");
       }
-      this.axios
-        .post("/api/contract_match_revoke", {
-          id: [],
+      let params= {}
+      if(type == 1){
+         params = {
+            id: [],
+          order_no: row.order_no,
+          time: [row.crt_time],
+         }
+      }else{
+        params = {
+            id: [],
           order_no: this.matchedSelectedList,
           time: this.matchedTimeList,
-        })
+         }
+      }
+      console.log(params);
+      this.axios
+        .post("/api/contract_match_revoke", params)
         .then((res) => {
           if (res.code == 200) {
             this.matchedSelectedList = "";
             this.matchedTimeList = [];
             this.handleMatchedListInit();
-            this.isMatchedSelectAll = false
+            this.isMatchedSelectAll = false;
           }
         });
     },
@@ -963,10 +1008,11 @@ export default {
         })
         .then((res) => {
           if (res.code == 200) {
+            console.log(res.data);
             this.contractData = res.data.data;
             this.contractTotal = res.data.total;
             this.searchRegionList = res.data.region_list;
-            this.searchProductTitleList = res.data.product_title_list
+            this.searchProductTitleList = res.data.product_title_list;
           }
         });
     },
@@ -975,11 +1021,13 @@ export default {
       if (e == false) {
         this.isMatchedSelectAll = e;
       }
-      this.matchedSelectedList = [];
+      // this.matchedSelectedList = [];
+      this.matchedSelectedList = "";
       this.matchedTimeList = [];
       this.matchedDetailList.forEach((v) => {
         if (v.del_isSelect) {
-          this.matchedSelectedList.push(v.order_no);
+          // this.matchedSelectedList.push(v.order_no);
+          this.matchedSelectedList = v.order_no;
           this.matchedTimeList.push(v.crt_time);
         }
       });
@@ -1007,8 +1055,21 @@ export default {
       );
     },
     handleTabsClick(name) {
-      name == 2 && this.handleMatchedListInit();
-      name == 1 && this.contractList();
+      if(name ==2 ){
+        this.isMatchedSelectAll = false
+        this.handleMatchedListInit()
+      }else{
+        this.checkedDeepenList=[]
+        this.matched_detail = []
+        // this.getMatchedDetailList("",1)
+        this.detail();
+        this.deepenList();
+        this.contractList();
+        this.ifMatching = true;
+
+      }
+      // name == 2 && this.handleMatchedListInit();
+      // name == 1 && this.contractList();
     },
     deepenList() {
       //深化信息接口
@@ -1220,7 +1281,7 @@ export default {
     checkedDeepen(se) {
       this.checkedDeepenList = se;
     },
-    getMatchedDetailList(row) {
+    getMatchedDetailList(row,type) {
       this.matched_detail.forEach((e) => {
         if (e.total_price > 0) {
           this.checkedDeepenList.push(e);
@@ -1241,14 +1302,18 @@ export default {
               this.$set(item, "total_price", 0);
             });
             this.matched_detail = res.data.data;
-            this.matched_detail.forEach((e) => {
-              this.checkedDeepenList.forEach((l) => {
-                if (e.id == l.id) {
-                  e._checked = true;
-                  e.total_price = l.total_price;
-                }
+            // type != 1
+            if(this.checkedDeepenList.length>0 || type!=1){
+               this.matched_detail.forEach((e) => {
+                  this.checkedDeepenList.forEach((l) => {
+                    if (e.id == l.id) {
+                      e._checked = true;
+                      e.total_price = l.total_price;
+                  }
+                });
               });
-            });
+            }
+           
             this.regionMatchedList = res.data.region_list; //区域
             this.urlMatchedList = res.data.url_number_list; //图号
             this.productList = res.data.product_title_list;
@@ -1334,6 +1399,9 @@ export default {
       if (this.checkedDeepenList.length < 1) {
         return this.$Message.warning("请选择深化信息中的内容");
       }
+      if(this.checkedDeepenList.length > 1 && this.checkedContractList.length > 1 ){
+        return this.$Message.warning("多个产品不能对应多个图号");
+      }
       let priceValue = 0;
       this.checkedContractList.forEach((e) => {
         priceValue += e.total_price; //这是合同选择的价格的和
@@ -1386,6 +1454,9 @@ export default {
             this.contractList();
             this.deepenList();
             this.handleShowCurrencyMatched1(false);
+            this.ifMatching = true;
+            this.checkedContractList = [];
+            this.checkedDeepenList=[];
           }
         });
     },
@@ -1421,14 +1492,14 @@ export default {
     },
     handleMatchedSelectAll() {
       this.isMatchedSelectAll = !this.isMatchedSelectAll;
-      this.matchedSelectedList = [];
+      this.matchedSelectedList = "";
       this.matchedTimeList = [];
       this.matchedDetailList.forEach((e) => {
         if (this.isMatchedSelectAll) {
           e.del_isSelect = true;
           e.isSelect = true;
           // this.matchedSelectedList.push(e.order_no);
-          this.matchedSelectedList = e.order_no
+          this.matchedSelectedList = e.order_no;
           this.matchedTimeList.push(e.crt_time);
         } else {
           e.del_isSelect = false;
@@ -1444,7 +1515,7 @@ export default {
         if (v.product_state == 0) {
           if (v.isSelect) {
             // this.matchedSelectedList.push(v.id);
-            this.matchedSelectedList = v.id
+            this.matchedSelectedList = v.id;
           } else {
             flag = false;
           }

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 617 - 374
src/views/PurchasingManage/InstockOrder/edit.vue


+ 21 - 5
src/views/PurchasingManage/extraCosts/edit.vue

@@ -15,7 +15,7 @@
              <Select v-model="formData.order_no" filterable clearable style="width:200px" >
                <Option v-for="(item,index) in projectTitleList" :key="index" :value="item.project_number" :label="item.project_name"></Option>
                </Select>
-               <Button type="primary" @click="showProjectModal=true">选择项目</Button>
+               <Button style="margin-left:20px" type="primary" @click="showProjectModal=true">选择项目</Button>
                </div>
                </FormItem>
             <FormItem label='供应商:' style="width:400px">
@@ -23,7 +23,7 @@
          <div v-else style='display:flex;width:300px'>
          <Select filterable clearable v-model="formData.supply_id" >
              <Option v-for="(item,index) in suppliersList" :key="index" :value="item.id" :label="item.title"></Option>
-             </Select><Button type="primary" @click="showSupplierModal=true">选择供应商</Button>
+             </Select><Button type="primary"  style="margin-left:20px" @click="showSupplierModal=true">选择供应商</Button>
          </div>
             </FormItem>
          <FormItem label="制单日期:" style="width:400px">
@@ -46,10 +46,10 @@
             <Input v-model="tableData[index].name" placeholder="请输入费用内容" @on-focus='handleFocusName(index)'/>
         </template>
         <template slot="price" slot-scope="{index}">
-             <Input v-model="tableData[index].price" @on-change='changePrice($event,index)' @on-blur='priceBlur(index)' type="number"/>
+             <Input v-model="tableData[index].price" @on-change='changePrice($event,index)' @on-focus="priceFocus(index)" @on-blur='priceBlur(index)' type="number"/>
         </template>
         <template slot="total_price" slot-scope="{index}">
-             <Input v-model="tableData[index].total_price" @on-change='changeTotalPrice($event,index)' @on-blur='priceBlur(index)' type="number"/>
+             <Input v-model="tableData[index].total_price" @on-change='changeTotalPrice($event,index)' @on-focus="totalPriceFocus(index)" @on-blur='totalPriceBlur(index)' type="number"/>
         </template>
         <template slot="num" slot-scope="{index}">
              <Input v-model="tableData[index].num" @on-change='changeNum($event,index)' @on-blur='priceBlurNum(index)' @on-focus='handleFocusNum(index)' type="number"/>
@@ -505,6 +505,13 @@ export default {
             }
            
         },
+        // totalPriceBlur(index),
+        priceFocus(index){
+            this.tableData[index].price = ''
+        },
+        totalPriceFocus(index){
+          this.tableData[index].total_price = ''
+        },
         priceBlurNum(index){
   if(this.tableData[index].num<0||this.tableData[index].num===''){
                this.tableData[index].num = 0;
@@ -515,7 +522,16 @@ export default {
             }
         },
         back(){
-            this.$router.go(-1);
+           this.$Modal.confirm({
+                    title: '是否确认取消',
+    
+                    onOk: () => {
+                        this.$router.go(-1);
+                    },
+                    onCancel: () => {
+                    }
+                });
+            
         },
         postData(){
             let obj =JSON.parse(JSON.stringify(this.formData));

+ 2 - 2
src/views/PurchasingManage/extraCosts/list.vue

@@ -26,7 +26,7 @@
                </Select>
            </FormItem>
            <FormItem label='审批状态:'>
-                  <Select class="form_item" v-model="searchData.state">
+                  <Select class="form_item" v-model="searchData.state" clearable>
                       <Option :value="0" label="未审批"/>
                         <Option :value="1" label='已审批'/>
                   </Select>
@@ -37,7 +37,7 @@
                </Select>
            </FormItem>
            <FormItem label='供应商'>
-               <Select filterable clearable v-model="searchData.supply_id" >
+               <Select filterable clearable v-model="searchData.supply_id" clearable >
                    <Option v-for="(item,index) in suppliersList" :key="index" :value="item.id" :label="item.title"></Option>
                </Select>
            </FormItem>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott