mushencc il y a 3 ans
Parent
commit
6b80149d3c

+ 0 - 1
src/routerMap/index.js

@@ -2234,7 +2234,6 @@ const routerMap = [
     name: "PayrollRequisitionList", //采购请款单-->列表
     meta: {
       index: 3,
-      keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/PayrollRequisition/list"], resolve),

+ 6 - 3
src/views/BasicSettings/MaterialCalculationFormula.vue

@@ -144,9 +144,12 @@ export default {
     },
     mounted(){
 setTimeout(()=>{
-      this.measureList=[{ e_title: "高",is_show:true},
-{ e_title: "宽", is_show:true},
-{ e_title: "厚", is_show:true},
+      this.measureList=[{ e_title: "原料高",is_show:true},
+{ e_title: "原料宽", is_show:true},
+{ e_title: "原料厚", is_show:true},
+{ e_title: "精裁高", is_show:true},
+{ e_title: "精裁宽", is_show:true},
+{ e_title: "精裁厚", is_show:true},
 {e_title:'数量',is_show:true}]
 })
 this.initData();

+ 77 - 14
src/views/OrderMannage/BusinessOrderlist/confirmNew.vue

@@ -4031,7 +4031,7 @@ export default {
         if(index==this.tableData.length-1){
           console.log(v,111111111);
           if(!v.is_metal){
-               if (!v.position && !v.product_id) {
+               if (!v.position || !v.product_id) {
 
           flag = true;
         }
@@ -4216,7 +4216,7 @@ export default {
               if (v.title.indexOf("线条") != -1||(v.part_title?v.part_title.indexOf("线条") != -1:false)) {
                 this.copiedLinePart = this.deepClone(v);
               }else{
-                if(v.addMTB){
+                if(v.addMTB){ //部件存在门头板的给他删了,不给他带过去
                     obj.part.splice(idx,1);
                 }
                 v.change_id ='';
@@ -4730,7 +4730,7 @@ export default {
                       element.procedure_properties = {};
                     }
                     //tower #2056
-                    if (key == 2 && row.isCopied) {
+                    if (key == 2 && isCopied) {
                       element.procedure_properties[key] =
                         this.pre_process_obj[key] * 1;
                       // element.procedure_properties[key] = "";
@@ -4751,21 +4751,23 @@ export default {
                 }
                 element.change_id = element.change[0].id;
               }
-              if(!this.tableData[rowIndex-1].is_metal&&isCopied&&this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条')!=-1)).length==res.data.part.filter(c=>(c.part_title.indexOf('线条')!=-1)).length&&this.bpp_list.filter(v=>(v.name=='颜色'))[0].cld.filter(e=>(e.id==row.procedure_properties[2])).length!=0){
-                
-                 if (element.title.indexOf("线条") != -1) {
-                   if(res.data.part[eleIndex].change.filter(x=>(x.id==element.change_id)).length!=0){
-                      element = Object.assign(element, this.copiedLinePart);
-                   }
-                //2020.3.15 有线条的产品线条需要保留
-                // delete this.copiedLinePart.change;
-                // delete this.copiedLinePart.change_id;
+              // if(isCopied&&!this.tableData[rowIndex-1].is_metal&&this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条')!=-1)).length==res.data.part.filter(c=>(c.part_title.indexOf('线条')!=-1)).length&&this.bpp_list.filter(v=>(v.name=='颜色'))[0].cld.filter(e=>(e.id==row.procedure_properties[2])).length!=0){
                 
+              //    if (element.title.indexOf("线条") != -1) {
+                 
+
+              //   /////////////////////////////////////
+              //   // this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条'))!=-1).forEach((r)=>{
+              //   //                   if(res.data.part[eleIndex].change.filter(x=>(x.id==r.change_id)).length!=0){
+              //   //                         element.change_id = r.change_id;
+              //   //                   }
+              //   // })
                
-              }
-              }
+              // }
+              // }
              
               element.part_detail = element.sub_part;
+
               //展示非拆分部件
               // 默认替换部件
               //存计算公式
@@ -4803,17 +4805,75 @@ export default {
               });
             }
           });
+          if(isCopied&&!this.tableData[rowIndex-1].is_metal&&this.tableData[rowIndex-1].part.filter(v=>(v.title.indexOf('线条')!=-1)).length==res.data.part.filter(c=>(c.part_title.indexOf('线条')!=-1)).length&&this.bpp_list.filter(v=>(v.name=='颜色'))[0].cld.filter(e=>(e.id==row.procedure_properties[2])).length!=0){
+           
+            let arr = JSON.parse(JSON.stringify(this.tableData[rowIndex-1].part.filter(x=>(x.title.indexOf('线条')!=-1))));
+// this.tableData[rowIndex-1].part.filter(x=>(x.title.indexOf('线条')!=-1))
+            arr.forEach(s=>{
+                res.data.part.forEach((b,bIndex)=>{
+                  if(b.part_title.indexOf('线条')!=-1){
+                    
+                     if(b.change.filter(v=>(s.part_id==v.part_id)).length!=0){
+                               
+                                 b.change_id = b.change.find(c=>(c.part_id==s.part_id)).id;
+                                 b.part_title = b.change.find(c=>(c.part_id==s.part_id)).part_title;
+                                 b.part_id = b.change.find(c=>(c.part_id==s.part_id)).part_id;
+                                 
+                                 b.change.find(c=>(c.part_id==s.part_id)).sub_part.forEach((r,rIndex)=>{
+                                   b.sub_part[rIndex].part_detail_id = r.part_detail_id;
+                                   b.sub_part[rIndex].part_detail_option = [];
+                                   b.sub_part[rIndex].material_detail_id =r.material_detail_list[0].material_detail_id;
+                                   b.sub_part[rIndex].material_detail_title = r.material_detail_list[0].title;
+                                  
+                                   r.material_detail_list.forEach(m=>{
+                                     let ob = {};
+                                     ob.label =`${m.long}*${m.wide}*${m.high}`;
+                                     ob.value=m.material_detail_id;
+                                     b.sub_part[rIndex].part_detail_option.push(ob);
+                                   })
+                                     b.sub_part[rIndex].material_detail_list = r.material_detail_list;
+                                 })
+                                //  b.sub_part = this.deepClone(b.change.find(c=>(c.part_id==s.part_id)).sub_part);
+                                //  b.sub_part.forEach(n=>{
+                                //    n.material_detail_id = n.material_detail_list[0].material_detail_id;
+                                //  })
+                                //  b.part_detail = b.sub_part;
+                                 
+                          } 
+                  }
+                         
+                })
+            })
+              
+          }
+          console.log(res.data.part,'xxxxxxxx');
           row.part = JSON.parse(JSON.stringify(res.data.part));
           // //测量字段
+          let keys = Object.keys(res.data.process.title);
+          if(isCopied){
+            keys.forEach(v=>{
+              if(v==2){
+                row[v] = this.tableData[rowIndex-1][v]
+              }
+            
+          })
+          }
+          
           row.measure = res.data.measure;
           row.measure.forEach((element) => {
             element.value = "";
             element.measureCalc = element.e_title;
           });
           res.data.title.indexOf('门头板')!=-1&&(row.surePrice=true);
+      
+            this.handleIsSpecialPart(row);
+      
+          
           this.tableData.splice(rowIndex, 1, row);
+          console.log(this.tableData);
           this.handleClearExtInfo(row, this.pre_bp_id, res.data.bp_id);
           row.get_first_data = false;
+
           this.handleCalcCount();
           // this.$forceUpdate();
         });
@@ -5456,6 +5516,7 @@ export default {
       return part_detail._longCalc;
     },
     handleIsSpecialPart(product, element) {
+      console.log(product,'wudiii')
       let line = [];
       let flag = false;
       product.part.map((part) => {
@@ -5474,6 +5535,7 @@ export default {
     },
     handleCalcLines(product, line, isSpecialPart) {
       console.log(product,'hw');
+      
       const process_ids = product.process_obj.map((v) => {
         return v.value;
       });
@@ -5496,6 +5558,7 @@ export default {
                 part_arr = v;
               }
             });
+            console.log(3333333333)
             for (const k in element) {
               const elem = element[k];
               // 找到零部件

+ 35 - 18
src/views/PayrollRequisition/detail.vue

@@ -63,22 +63,27 @@
     </Row>
     <br>
     <Row class="row_item">
+       <Col span="6" class="item">
+        <label>项目名称:</label>
+         <span v-if="type==3||state==2||state==1">{{formData.project_title}}</span>
+        <Input class="content" v-model="formData.project_title" type="number" v-else/>
+        </Col>
         <Col span="6" class="item">
         <label>申请金额:</label>
          <span v-if="type==3||state==2||state==1">{{formData.apply_price}}</span>
         <Input class="content" v-model="formData.apply_price" type="number" @on-blur='digitUppercase(formData.apply_price)' v-else/>
         </Col>
         <Col span="6" class="item">
-        <label style="margin-left:0px;">大写金额:</label>
-        <span v-if="type==3||state==2||state==1" style="width:400px">{{big_price}}</span>
-         <Tooltip :content="big_price" style="width:280px" v-else>
+        <label>大写金额:</label>
+        <span v-if="type==3||state==2||state==1" >{{big_price}}</span>
+         <Tooltip :content="big_price"  style="width:100%;" v-else>
         <Input disabled placeholder="自动生成" v-model="big_price"/>
          </Tooltip>
         </Col>
-        <Col span="12" class="item">
+        <Col span="6" class="item">
         <label>费用明细:</label>
-        <span v-if="type==3||state==2||state==1" style="width:1200px">{{formData.price_detail}}</span>
-        <Input clearable style="width:1200px" v-model="formData.price_detail" v-else/>
+        <span v-if="type==3||state==2||state==1">{{formData.price_detail}}</span>
+        <Input clearable  v-model="formData.price_detail" v-else/>
         </Col>
     </Row>
      <br>
@@ -92,17 +97,17 @@
      <br>
     <Row class="row_item">
         <Col span="18" class="item">
-        <label style="margin-left:0px;width:110px">发票情况:</label>
-       <CheckboxGroup class="check_group" v-model="formData.invoice_type">
-        <Checkbox :label="1" class="check_item" :disabled='type==3'>专票</Checkbox>
-        <Checkbox :label="2" class="check_item" :disabled='type==3'>普票</Checkbox>
-        <Checkbox :label="3" class="check_item" :disabled='type==3'>无票</Checkbox>
-    </CheckboxGroup>
+        <label style="width:110px">发票情况:</label>
+       <RadioGroup class="check_group" v-model="formData.invoice_type">
+        <Radio :label="1" class="check_item" :value='1' :disabled='type==3'>专票</Radio>
+        <Radio :label="2" class="check_item" :value='2' :disabled='type==3'>普票</Radio>
+        <Radio :label="3" class="check_item" :value='3' :disabled='type==3'>无票</Radio>
+    </RadioGroup>
     <RadioGroup v-model="formData.invoice_state">
         <Radio :label="1" class="check_item" :value='1' :disabled='type==3'>已到</Radio>
         <Radio :label="2" class="check_item" :value='2' :disabled='type==3'>未到</Radio>
     </RadioGroup>
-        </Col>
+    </Col>
         <Col span="6" class="item">
         
         <label>回票时间:</label> 
@@ -113,7 +118,7 @@
      <br>
     <Row class="row_item">
         <Col span="24" class="item">
-        <label style='margin-left:0px;width:118px'>备注:</label>
+        <label style='width:100px'>备注:</label>
          <span v-if="type==3">{{formData.remark}}</span>
         <Input clearable v-model="formData.remark" v-else/>
         </Col>
@@ -135,7 +140,7 @@
     <br>
     <Row class="row_item" v-if="type==3">
         <Col span="24" class="item">
-        <label style="margin-left:0px;width:112px">审批记录:</label>
+        <label style="width:112px">审批记录:</label>
          <Table :data='tableData' :columns='tableColumns' width='420' border></Table>
         </Col>
     </Row>
@@ -310,7 +315,7 @@ export default {
                 information:'',//汇款信息
                 apply_price:'',//申请金额
                 price_detail:'',//费用明细
-                invoice_type:[],//发票种类
+                invoice_type:'',//发票种类
                 invoice_state:'',//发票状态
                 invoice_time:'',//回票时间
                 remark:''//备注
@@ -406,14 +411,14 @@ initData(){
             this.formData.payment_time = this.func.replaceDateNoHMS(this.formData.payment_time);
  this.formData.crt_time =Number(this.formData.crt_time)? this.func.replaceDate(this.formData.crt_time):'';
   this.formData.upd_time =Number(this.formData.upd_time)? this.func.replaceDate(this.formData.upd_time):'';
-            this.formData.invoice_type = [this.formData.invoice_type];
+            // this.formData.invoice_type = [this.formData.invoice_type];
             this.digitUppercase(this.formData.apply_price);
             delete this.formData.children;
      })
 },
         postData(){
             let obj = JSON.parse(JSON.stringify(this.formData));
-            obj.invoice_type = obj.invoice_type.toString();
+            // obj.invoice_type = obj.invoice_type.toString();
             obj.invoice_time = obj.invoice_time?Date.parse(obj.invoice_time).toString().slice(0,10):'';
              obj.payment_time = obj.payment_time?Date.parse(obj.payment_time).toString().slice(0,10):'';
             if(this.type==1){   
@@ -560,4 +565,16 @@ span{
     line-height: 250%;
     width: 500px;
 }
+.total_img{
+    display: flex;
+    flex-wrap:wrap;
+    .img_item{
+        margin-right: 40px;
+        position: relative;
+         .img_title{
+        text-align: center;
+    }
+    }
+   
+}
 </style>

+ 137 - 6
src/views/PayrollRequisition/edit.vue

@@ -63,22 +63,27 @@
     </Row>
     <br>
     <Row class="row_item">
+       <Col span="6" class="item">
+        <label>项目名称:</label>
+         <span v-if="type==3||state==2||state==1">{{formData.project_title}}</span>
+        <Input class="content" v-model="formData.project_title" type="number" v-else/>
+        </Col>
         <Col span="6" class="item">
         <label>申请金额:</label>
          <span v-if="type==3||state==2||state==1">{{formData.apply_price}}</span>
         <Input class="content" v-model="formData.apply_price" type="number" @on-blur='digitUppercase(formData.apply_price)' v-else/>
         </Col>
         <Col span="6" class="item">
-        <label style="margin-left:0px;">大写金额:</label>
-        <span v-if="type==3||state==2||state==1" style="width:400px">{{big_price}}</span>
-         <Tooltip :content="big_price" style="width:280px" v-else>
+        <label>大写金额:</label>
+        <span v-if="type==3||state==2||state==1" >{{big_price}}</span>
+         <Tooltip :content="big_price"  style="width:100%;" v-else>
         <Input disabled placeholder="自动生成" v-model="big_price"/>
          </Tooltip>
         </Col>
-        <Col span="12" class="item">
+        <Col span="6" class="item">
         <label>费用明细:</label>
-        <span v-if="type==3||state==2||state==1" style="width:1200px">{{formData.price_detail}}</span>
-        <Input clearable style="width:1200px" v-model="formData.price_detail" v-else/>
+        <span v-if="type==3||state==2||state==1">{{formData.price_detail}}</span>
+        <Input clearable  v-model="formData.price_detail" v-else/>
         </Col>
     </Row>
      <br>
@@ -119,6 +124,34 @@
         </Col>
     </Row>
     <br>
+    <Row class="row_item">
+        <Col span="24" class="item">
+        <label style='margin-left:0px;width:118px'>附件:</label>
+              <div class="total_img">
+              <div v-for="(_item,_index) in formData.url" :key="_index" class="img_item">
+              <img @click="looks(_item.url,_item.is_pic)" :src="_item.is_pic?$store.state.ip + _item.url:require('./../../assets/imgs/file.jpg')" alt="" class="img_content"/>
+              <Icon
+              size="20"
+              @click="delItems(_index, formData.url)"
+              class="delete-img"
+              type="ios-close-circle"
+            />
+              <div class="img_title"><a @click="exportData(`${$store.state.ip}${_item.url}`,_item.is_pic,_item.name)">{{_item.name}}</a></div>
+              </div>
+              <Upload
+               multiple
+              :headers="headers"
+              :show-upload-list="false"
+              :on-success="handleSuccess"
+             :action="$store.state.ip+'/api/upload_file'">
+           <div class="upd_file">
+               <Icon type="ios-cloud-upload-outline" class="ico" size='50'/>
+           </div>
+             </Upload>
+             </div>
+        </Col>
+    </Row>
+    <br>
     <Row class="row_item" v-if="type==3">
          <Col span="6" class="item">
         <label>制单人:</label><span>{{formData.crt_name}}</span> 
@@ -201,6 +234,7 @@
 export default {
     data(){
          return{ 
+                headers: { 'Authorization': localStorage.getItem('token') },
              show_submit:false,
              check_id:'',
              state:'',
@@ -294,6 +328,8 @@ export default {
               ],
              type:'',
              formData:{
+               url:[],//文件地址
+               project_title:'',//项目名称
                 payment_no:'',//请款单号
                 section_id:"",//部门id
                 payment_id:'',//请款人
@@ -337,6 +373,68 @@ export default {
       
     },
     methods:{
+         handleSuccess(res,file){
+            if(res.code==200){
+                let obj = {};
+                obj.url = res.data.url;
+                let config = ['jpg', 'png', 'gif', "jpeg"];
+                let text = file.name.split('.');
+                if(config.indexOf(text[text.length-1])>=0){
+                    obj.is_pic = true;
+                }else{
+                    obj.is_pic = false;
+                }
+                obj.name=file.name;
+                  this.formData.url.push(obj);
+                
+            }
+        
+        },
+       looks(img,type) {
+            if(!type){
+                return
+            }
+      const array = [{ img_url: img }];
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+     delItems(n, arr) {
+      arr.splice(n, 1);
+    },
+      exportData(url,type,name) {
+       
+        // window.open(url)
+        if(type){
+            this.downloadIamge(url,name)
+        }else{
+             location.href = url;
+        }
+        
+    },
+    downloadIamge(imgsrc, name) {
+      //下载图片地址和图片名
+      var image = new Image()
+      // 解决跨域 Canvas 污染问题
+      image.setAttribute('crossOrigin', 'anonymous')
+      image.onload = function () {
+        var canvas = document.createElement('canvas')
+        canvas.width = image.width
+        canvas.height = image.height
+        var context = canvas.getContext('2d')
+        context.drawImage(image, 0, 0, image.width, image.height)
+        var url = canvas.toDataURL('image/png') //得到图片的base64编码数据
+        var a = document.createElement('a') // 生成一个a元素
+        var event = new MouseEvent('click') // 创建一个单击事件
+        a.download = name || 'photo' // 设置图片名称
+        a.href = url // 将生成的URL设置为a.href属性
+        a.dispatchEvent(event) // 触发a的单击事件
+      }
+      image.src = imgsrc
+    },
         showSubmit(){
         if(this.state==0||this.state==2){
           this.show_submit = true;
@@ -550,4 +648,37 @@ span{
     line-height: 250%;
     width: 500px;
 }
+.total_img{
+    display: flex;
+    flex-wrap:wrap;
+    .img_item{
+        margin-right: 40px;
+        position: relative;
+         .img_title{
+        text-align: center;
+    }
+    }
+   
+}
+.img_content{
+    width: 150px;
+    height: 150px;
+}
+  .delete-img {
+  position: absolute;
+  right: 0px;
+  top: 0px;
+  color: red;
+  cursor: pointer;
+}  
+.upd_file{
+    background: rgb(242, 242, 242);
+    width: 200px;
+    height: 160px;
+    cursor: pointer;
+    .ico{
+        width: 100%;
+       line-height: 300%;
+    }
+}
 </style>

+ 44 - 14
src/views/PayrollRequisition/list.vue

@@ -122,6 +122,8 @@
 export default {
     data(){
         return{
+            proxyData:{},
+            keep:false,
             linkList:[],
             suppliersList:[],
             sectionList:[],
@@ -206,7 +208,12 @@ export default {
     this.axios({ method: 'get', url: '/api/supply_list', }).then((res) => { this.suppliersList = res.data.data }).catch((err) => { });
     },
     mounted(){
-     this.initData();
+        if(this.keep){
+            this.initData(this.proxyData);
+        }else{
+            this.initData();
+        }
+     
     },
     methods:{
         handleTotalAll(name){
@@ -258,7 +265,7 @@ export default {
                        this.axios.post('/api/payment_check',{payment_no,id:JSON.parse(localStorage.getItem('user_info')).id,state:1}).then(res=>{
                               if(res.code==200){
                         this.$Message.success(res.msg);
-                        this.initData(this.searchData);
+                        this.initData(this.proxyData);
                     }
                         })
         }
@@ -289,7 +296,7 @@ export default {
                         this.page_index--;
                 }
                 this.$Message.success(res.msg);
-                this.initData(this.searchData);
+                this.initData(this.proxyData);
               }
             });
         },
@@ -314,7 +321,7 @@ export default {
                 if(this.page_index!=1||this.tableData.length==1){
                         this.page_index--;
                 }
-                this.initData(this.searchData);
+                this.initData(this.proxyData);
               }
             });
         },
@@ -322,12 +329,12 @@ export default {
         },
         changePage(e){
             this.page_index = e;
-            this.initData(this.searchData);
+            this.initData(this.proxyData);
         },
         changeSize(e){
           this.page_size = e;
           this.page_index =1;
-          this.initData(this.searchData);
+          this.initData(this.proxyData);
         },
         submit(){
                 if(!this.check_id){
@@ -341,7 +348,7 @@ export default {
                       this.axios.post('/api/payment_check',{id:this.check_id,payment_no,state:this.selectData[0].state}).then(res=>{
                     if(res.code==200){
                         this.$Message.success(res.msg);
-                        this.initData(this.searchData);
+                        this.initData(this.proxyData);
                         this.check_id = '';
                         this.show_submit = false;
                         this.submit_state = false;
@@ -351,7 +358,7 @@ export default {
                     this.axios.post('/api/payment_check',{id:this.check_id,payment_no:[this.chooseData.payment_no],state:this.chooseData.state}).then(res=>{
                     if(res.code==200){
                         this.$Message.success(res.msg);
-                        this.initData(this.searchData);
+                        this.initData(this.proxyData);
                         this.check_id = '';
                         this.show_submit = false;
                     }
@@ -373,7 +380,7 @@ export default {
                         this.axios.post('/api/payment_check',{payment_no:[row.payment_no],id:JSON.parse(localStorage.getItem('user_info')).id,state:row.state}).then(res=>{
                               if(res.code==200){
                         this.$Message.success(res.msg);
-                        this.initData(this.searchData);
+                        this.initData(this.proxyData);
                     }
                         })
         }
@@ -390,7 +397,7 @@ export default {
             .then((res) => {
               if (res.code == 200) {
                 this.$Message.success(res.msg);
-                this.initData(this.searchData);
+                this.initData(this.proxyData);
                 // this.undata_navData();
               }
             });
@@ -401,6 +408,7 @@ export default {
         },
         initData(row){
             let obj = {};
+            this.proxyData = row;
             if(row){
                 obj = JSON.parse(JSON.stringify(row));
                 obj.crt_start_time = obj.crt_start_time?Date.parse(obj.crt_start_time).toString().slice(0,10):'';
@@ -412,6 +420,7 @@ export default {
                  obj.check_start_time = obj.check_start_time?Date.parse(obj.check_start_time).toString().slice(0,10):'';
                 obj.check_end_time = obj.check_end_time?Date.parse(obj.check_end_time).toString().slice(0,10):'';
             }
+            console.log(row);
             this.loading = true;
           this.axios.post('/api/payment_list',{...obj,page_index:this.page_index,page_size:this.page_size}).then(res=>{
               this.tableData = res.data.data;
@@ -439,12 +448,33 @@ export default {
       if (
         to.path == "/cms/PayrollRequisition/edit" || to.path == "/cms/PayrollRequisition/detail"
       ) {
-        next();
-      } else {
-        from.meta.keepAlive = false;
-        next();
+          let requisitionData = {
+               page_index:this.page_index,
+               page_size:this.page_size,
+               obj:this.proxyData,
+          }; 
+           localStorage.setItem("requisitionData", JSON.stringify(requisitionData));   
       }
+      next();
     },
+    beforeRouteEnter(to,from,next){
+        if(from.path =="/cms/PayrollRequisition/edit"||from.path=="/cms/PayrollRequisition/detail"){
+             let requisitionData = JSON.parse(localStorage.getItem('requisitionData'));
+            next(vm=>{
+
+                  vm.page_index = requisitionData.page_index;
+                  vm.page_size = requisitionData.page_size;
+                  vm.searchData = requisitionData.obj;
+                  vm.proxyData = requisitionData.obj;
+                  vm.keep = true;
+                  localStorage.removeItem('requisitionData')
+            })
+            
+             
+        }else{
+             next();
+        }
+    }
 }
 </script>
 <style lang="scss" scoped>

+ 2 - 2
src/views/Warehouse/Warehouse/inoutTotalList.vue

@@ -31,7 +31,6 @@
         </FormItem>
         <FormItem label="物料分类">
           <Select v-model="searchData.material_type_id"
-                  clearable
                   multiple
                   filterable
                   style="width:200px">
@@ -44,9 +43,10 @@
         </FormItem>
         <FormItem label="物料名称">
           <Select v-model="searchData.material_id"
-                  clearable
                   multiple
                   filterable
+                  filter-by-label
+                  :max-tag-count='1'
                   style="width:200px">
             <Option v-for="item in materialNameList"
                     :key="item.id"

+ 8 - 7
src/views/Warehouse/Warehouse/stockingList.vue

@@ -27,12 +27,12 @@
           </Select>
         </FormItem>
   <FormItem label='仓库名称' v-show="show">
-          <Select v-model="warehouse_id">
+          <Select v-model="warehouse_id" clearable>
             <Option v-for="item in warehouseNameList" :key="item.id" :value="item.id" :label="item.title"/>
           </Select>
         </FormItem>
    <FormItem label='物料分类'  v-show="up_show">
-          <Select v-model="up_searchData.material_type_id" filterable clearable @on-change='material_select'>
+          <Select v-model="up_searchData.material_type_id" filterable clearable @on-change='material_select' filter-by-label>
             <Option v-for="item in materialTypeList" :key="item.id" :value="item.id" :label="item.title"/>
           </Select>
         </FormItem>
@@ -42,6 +42,7 @@
                   @on-change='material_select_name'
                   multiple
                   filterable
+                  filter-by-label
                   style="width:200px">
             <Option v-for="item in materialNameList"
                     :key="item.id"
@@ -51,27 +52,27 @@
           </Select>
         </FormItem>
          <FormItem label='规格型号'  v-show="up_show_material_size">
-          <Select v-model="up_searchData.material_detail_id" filterable multiple>
+          <Select v-model="up_searchData.material_detail_id" filterable multiple filter-by-label>
             <Option v-for="item in material_size_list" :key="item.id" :value="item.id" :label="item.label"/>
           </Select>
         </FormItem>
 <FormItem label='项目名称:' v-show="down_show">
-          <Select filterable multiple v-model="down_searchData.project_title">
+          <Select filterable multiple v-model="down_searchData.project_title" filter-by-label>
             <Option v-for="(item,index) in project_title_list" :key="index" :value="item.value" :label="item.label"/>
           </Select>
         </FormItem>
        <FormItem label='图号:' v-show="down_show">
-          <Select filterable multiple v-model="down_searchData.url_number">
+          <Select filterable multiple v-model="down_searchData.url_number" filter-by-label>
             <Option v-for="(item,index) in url_number_list" :key="index" :value="item.url_number" :label="item.url_number"/>
           </Select>
         </FormItem>
          <FormItem label='产品名称' v-show="down_show">
-          <Select filterable multiple v-model="down_searchData.product_title">
+          <Select filterable multiple v-model="down_searchData.product_title" filter-by-label>
             <Option v-for="(item,index) in product_list" :key="index" :value="item.title" :label="item.title"/>
           </Select>
         </FormItem>
         <FormItem label='房间号:' v-show="down_show">
-          <Select filterable multiple v-model="down_searchData.house_id" >
+          <Select filterable multiple v-model="down_searchData.house_id" filter-by-label>
             <Option v-for="(item,index) in house_list" :key="index" :value="item.house_id" :label="item.label"/>
           </Select>
         </FormItem>

+ 8 - 8
src/views/brand/list.vue

@@ -15,7 +15,7 @@
         <Button type="primary"
                 ghost
                 icon='md-add'
-                @click="addItems()">新增品牌</Button>
+                @click="addItems(1)">新增品牌</Button>
       </div>
       <div slot='navButton'>
       </div>
@@ -24,7 +24,7 @@
         <div class="table-set">
           <svg style="font-size:20px"
                color='#3764FF'
-               @click="addItems(row)"
+               @click="addItems(row,2)"
                class="icon icon-nav"
                aria-hidden="true">
             <use xlink:href="#iconbianji"></use>
@@ -126,18 +126,18 @@ export default {
       this.proxyObj.page_size = this.pageSize;
       this.getData(this.proxyObj)
     },
-    addItems (obj) {
-      this.showModal = true;
-      if (obj.id) {
+    addItems (obj,type) {
+      
+      //type 1新增 2编辑
+      if (type==2) {
         this.showType = 2
         this.classInfo.title = obj.title;
-    
+       this.classInfo.id = obj.id;
       } else {
         //新增
         this.showType = 1
-        this.classInfo.title = obj.title;
-
       }
+      this.showModal = true;
     },
     delItems (row) {
       this.confirmDelete({