Browse Source

区分了森蓝九鼎

mushencc 3 years ago
parent
commit
ed1002e247

BIN
dist (2).zip


BIN
dist (3).zip


BIN
dist.zip


+ 1 - 2
src/App.vue

@@ -40,6 +40,5 @@ table-edit-set{margin-right:10px;color:#3764FF;cursor:pointer}
 .ivu-table-fixed-header{
   .ivu-table-cell-with-selection{&::after{content: '全选';}}
 }
-ul li{list-style: none;;}
-
+ul li{list-style: none;}
 </style>

+ 12 - 7
src/routerMap/index.js

@@ -183,6 +183,14 @@ const routerMap = [
     component: (resolve) => require(["@/views/PartsMannage/edit"], resolve),
   },
   {
+    path: "/cms/materialmannage/yongyouIndex",
+    name: "yongYouMaterialMannage", //新物料档案
+    meta: {
+      index: 4,
+    },
+    component: (resolve) => require(["@/views/MaterialMannage/yongyouIndex"], resolve),
+  },
+  {
     path: "/cms/materialmannage/index",
     name: "MaterialMannage", //物料管理-->部件列表
     meta: {
@@ -2435,8 +2443,7 @@ const routerMap = [
     path: "/cms/Agreement/list",
     name: "AgreementList", //合同-->合同列表
     meta: {
-      index: 3,
-      keepAlive:true
+      index: 3
     },
     component: (resolve) =>
       require(["@/views/Agreement/list"], resolve),
@@ -2454,8 +2461,7 @@ const routerMap = [
     path: "/cms/Agreement/match/list",
     name: "MatchList", //合同-->匹配-->匹配列表
     meta: {
-      index: 3,
-      keepAlive:true
+      index: 3
     },
     component: (resolve) =>
       require(["@/views/Agreement/match/list"], resolve),
@@ -2482,8 +2488,7 @@ const routerMap = [
     path: "/cms/Agreement/deepen/list",
     name: "deepenList", //合同-->合同列表-->深化单-->列表
     meta: {
-      index: 3,
-      keepAlive:true
+      index: 3
     },
     component: (resolve) =>
       require(["@/views/Agreement/deepen/list"], resolve),
@@ -2547,7 +2552,7 @@ const routerMap = [
     name: "productMessageList", //生产通知单
     meta: {
       index: 3,
-      keepAlive:true
+      // keepAlive:true
     },
     component: (resolve) =>
       require(["@/views/Agreement/productMessage/list"], resolve),

+ 0 - 10
src/views/Agreement/deepen/list.vue

@@ -114,16 +114,6 @@ export default {
             }
         }
     },
-    beforeRouteLeave(to, from, next) {
-      if (
-        to.path == "/cms/Agreement/deepen/edit"
-      ) {
-        next();
-      } else {
-        from.meta.keepAlive = false;
-        next();
-      }
-    }
 }
 </script>
 <style lang="scss" scoped>

+ 2 - 2
src/views/Agreement/edit.vue

@@ -247,7 +247,7 @@ export default {
             },
             tableData:[],
             tableColumns:[
-                {type:'selection',minWidth:40,align:'center',key:'select'},
+                {type:'selection',minWidth:80,align:'center',key:'select'},
                 {title:'序号',type:'index',align:'center',minWidth:80,key:'index'},
                 {title:'图号',align:'center',minWidth:100,key:'url_number',slot:'url_number'},
                 {title:'区域',minWidth:100,align:'center',key:'region',slot:'region'},
@@ -262,7 +262,7 @@ export default {
                 {title:'投标单价',minWidth:100,align:'center',key:'bid_price',slot:'bid_price'},
                 {title:'投标金额',minWidth:100,align:'center',key:'total_bid_price',slot:'total_bid_price'},
                 {title:'备注',minWidth:100,align:'center',key:'remark',slot:'remark'},
-                {title:'操作',minWidth:60,align:'center',key:'set',slot:'set'}
+                {title:'操作',minWidth:100,align:'center',key:'set',slot:'set'}
             ],
              editTableColumns:[
                 {title:'序号',type:'index',align:'center',minWidth:80,key:'index'},

+ 1 - 11
src/views/Agreement/list.vue

@@ -240,7 +240,7 @@ export default {
                data.start_time = data.start_time?Date.parse(data.start_time).toString().slice(0,10):'';
                data.end_time = data.end_time?Date.parse(data.end_time).toString().slice(0,10):'';
             }
-             this.axios.post('/api/contract_list',{...data}).then(res=>{
+             this.axios.post('/api/contract_list',{...data,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
                  this.tableData = res.data.data;
                  this.total = res.data.total
              })
@@ -256,16 +256,6 @@ export default {
         }
 
     },
-      beforeRouteLeave(to, from, next) {
-    if (
-      to.path == "/cms/Agreement/edit"
-    ) {
-      next();
-    } else {
-      from.meta.keepAlive = false;
-      next();
-    }
-      }
 }
 </script>
 <style lang="scss" scoped>

+ 1 - 1
src/views/Agreement/match/check.vue

@@ -29,7 +29,7 @@
         <span>项目名称:</span><span>{{ detailList.abbreviation }}</span>
       </Col>
       <Col span="4">
-        <span>项目简:</span><span>{{ detailList.project_title }}</span>
+        <span>项目简:</span><span>{{ detailList.project_title }}</span>
       </Col>
     </Row>
     <div class="context-tabs">

+ 1 - 1
src/views/Agreement/match/list.vue

@@ -100,7 +100,7 @@ export default {
                         width: 350
         },
        {
-          title: "项目简",
+          title: "项目简",
           align: "center",
           key: "project_title",
           resizable: true,

+ 12 - 1
src/views/Agreement/match/matching.vue

@@ -16,6 +16,7 @@
         style="margin-right: 10px"
         >撤销匹配</Button
       >
+      <Button type="primary" @click="handleAutoMatch" style="margin-right: 10px" v-show="currencyTag==1">自动匹配</Button>
       <Button @click="back" type="primary" ghost style="margin-right: 10px"
         >返回</Button
       >
@@ -33,7 +34,7 @@
           <span>项目名称:</span><span>{{ detailList.abbreviation }}</span>
         </Col>
         <Col style="margin-right: 20px">
-          <span>项目简:</span><span>{{ detailList.project_title }}</span>
+          <span>项目简:</span><span>{{ detailList.project_title }}</span>
         </Col>
       </Row>
     </div>
@@ -709,6 +710,7 @@ export default {
           key: "index",
         },
         { title: "序号", align: "center", type: "index" },
+        {title:'图号',align:'center',key:'url_number'},
         { title: "区域", align: "center", key: "region" },
         { title: "产品名称", align: "center", key: "product_title" },
         { title: "数量", align: "center", key: "num" },
@@ -820,6 +822,15 @@ export default {
     this.contractList();
   },
   methods: {
+    handleAutoMatch(){
+        this.axios.post('/api/contract_auto_match_save',{order_no:this.$route.query.order_no}).then(res=>{
+          if(res.code==200){
+            this.$Message.success(res.msg);
+            //跟点击匹配的tab标签一样的事件;
+           this.handleTabsClick(1);
+          }
+        })
+    },
     checkPrice(row) {
       if (row.total_price < 0) {
         row.total_price = "0.00";

+ 21 - 2
src/views/BasicSettings/ClassifyDocs/TypeDocs.vue

@@ -21,7 +21,8 @@
       <div class="content_table">
         <Table :columns="tableColumns"
                border
-               :data="tableData">
+               :data="tableData"
+               max-height='550'>
           <template slot="setSlot"
                     slot-scope="{row,index}">
             <a style="margin:0 5px"
@@ -44,6 +45,14 @@
                v-model="modalData.title"
                style="width: 220px" />
       </div>
+       <div class="modal_content">
+        <span>收发类别编码: </span>
+        <Input type="text"
+               size="small"
+               placeholder="请输入收发类别编码"
+               v-model="modalData.code"
+               style="width: 220px" />
+      </div>
       <div class="modal_content">
         <span>所属分类: </span>
         <Select v-model="modalData.basic_type_id"
@@ -75,6 +84,7 @@ export default {
     // 这里存放数据
     return {
       tableColumns: [
+        {title:'收发类别编码',key:'code',align:'center',minWidth:120},
         { title: '类型档案', key: 'title', align: 'center', minWidth: 120 },
         {
           title: '所属分类', key: 'type_id', align: 'center', minWidth: 120,
@@ -103,6 +113,7 @@ export default {
       modalData: {
         title: '',
         basic_type_id: '',
+        code:''
       },
       id: '',
     }
@@ -132,12 +143,14 @@ export default {
           this.id = ''
           this.modalData.title = ''
           this.modalData.basic_type_id = ''
+          this.modalData.code=''
           this.showModal = true
           break;
         case 2:
           this.id = row.id
           this.modalData.title = row.title
           this.modalData.basic_type_id = row.type_id
+          this.modalData.code=row.code
           this.showModal = true
           break;
         case 3:
@@ -180,7 +193,8 @@ export default {
           data: {
             id: this.id,
             basic_type_id:this.modalData.basic_type_id,
-            title: this.modalData.title
+            title: this.modalData.title,
+            code:this.modalData.code
           }
         }).then((res) => {
           this.$Message.success(res.msg)
@@ -215,5 +229,10 @@ export default {
   display: flex;
   justify-content: space-around;
   padding: 10px 0;
+  span{
+    display: inline-block;
+    width: 100px;
+    text-align: right;
+  }
 }
 </style>

+ 1 - 0
src/views/BasicSettings/SuppliersManage/SippliersList.vue

@@ -114,6 +114,7 @@
               border
               :loading="tableLoading"
               :data="tableData"
+              max-height='400'
             >
               <template slot="setSlot" slot-scope="{ row, index }">
                   <a style="margin: 0 5px" @click="handleSet(4, row, index)"

+ 22 - 0
src/views/BasicSettings/SuppliersManage/SippliersListEdit.vue

@@ -122,6 +122,26 @@
             placeholder="请输入备注"
           />
         </FormItem>
+         <FormItem label="供应商简称:">
+           <span v-if="$route.query.type == 4">{{formData.abbreviation}}</span>
+          <Input
+          v-else
+            v-model="formData.abbreviation"
+            style="width:200px"
+            clearable
+            placeholder="请输入供应商简称"
+          />
+        </FormItem>
+         <FormItem label="供应商助记码:">
+           <span v-if="$route.query.type == 4">{{formData.supply_help}}</span>
+          <Input
+          v-else
+            v-model="formData.supply_help"
+            style="width:200px"
+            clearable
+            placeholder="请输入供应商助记码"
+          />
+        </FormItem>
       </Form>
     </div>
     <Modal v-model="showModal" title="查看">
@@ -168,6 +188,8 @@ export default {
         address: "",
         basics_supply_id: "",
         remark: "",
+        abbreviation:'',
+        supply_help:'',
       },
       ruleValidate: {
         code: [

+ 1 - 1
src/views/BidSystem/DeepeningOrder/newEdit.vue

@@ -57,7 +57,7 @@
             <a style="margin-right:10px" @click='handleGoPage(row,0)'>详情</a>
              <!-- <a style="margin-right:10px" @click='handleGoPage(row,1)' v-show="type==2">编辑</a> -->
             <a @click="handleDel(row)" v-show="type!=3&&tableData.every(v=>(v.state==0))">删除</a>
-            <a v-show="type==3" @click="handleOrder(row,1)">下拆单</a>
+            <a v-show="type==3&&row.state==0" @click="handleOrder(row,1)">下拆单</a>
         </template>
      </Table>
      <div class="footerPage">

+ 173 - 22
src/views/BidSystem/ProductDeOrder/newEdit.vue

@@ -2,6 +2,20 @@
     <div>
         <Toptitle :title="type==1?'新增':type==2?'编辑':'详情'">
             <Button @click="$router.go(-1)" style="margin-right:10px">取消</Button>
+            <Button @click="handleTakeApart" style="margin-right:10px" type='primary' v-show="type==2">批量拆单</Button>
+            <Upload
+        ref="upload"
+          name="your_file"
+          :show-upload-list="false"
+          :headers="headers"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/split_import_news'"
+          :data='{list:JSON.stringify(selectData)}'
+         v-show="false"
+        >
+        </Upload>
+        <Button @click="handleExport" type="primary" v-if="type==3" style="margin-right:10px">批量下生产</Button>
             <Button type="primary" @click="handleSubmit('formValidate')" v-if="type!=3">保存</Button>
         </Toptitle>
         <Form ref="formValidate" :model="formData" :rules="ruleValidate" class="form_content" :label-width='120'>
@@ -50,6 +64,31 @@
         </Form>
         <Card style="max-height:67%;overflow:auto">
             <Form :label-width='110' class="form_content">
+                 <FormItem label='区域:'>
+                    <Select filterable clearable class="form_item" v-model="searchData.area">
+                        <Option v-for="(item,index) in TableAreaList" :key="index" :value="item" :label="item"/>
+                    </Select>
+                </FormItem>
+                         <FormItem label='楼栋:'>
+                    <Select filterable clearable class="form_item" v-model="searchData.house">
+                        <Option v-for="(item,index) in TableHouseList" :key="index" :value="item" :label="item"/>
+                    </Select>
+                </FormItem>
+                         <FormItem label='单元:'>
+                    <Select filterable clearable class="form_item" v-model="searchData.unit">
+                        <Option v-for="(item,index) in TableUnitList" :key="index" :value="item" :label="item"/>
+                    </Select>
+                </FormItem>
+                         <FormItem label='楼层:'>
+                    <Select filterable clearable class="form_item" v-model="searchData.layer">
+                        <Option v-for="(item,index) in TableLayerList" :key="index" :value="item" :label="item"/>
+                    </Select>
+                </FormItem>
+                         <FormItem label='房号:'>
+                    <Select filterable clearable class="form_item" v-model="searchData.number">
+                        <Option v-for="(item,index) in TableNumberList" :key="index" :value="item" :label="item"/>
+                    </Select>
+                </FormItem>
                 <FormItem label='产品分类:'>
                     <Select filterable clearable class="form_item" v-model="searchData.product_type">
                         <Option v-for="(item,index) in productTypeList" :key="index" :value="item" :label="item"/>
@@ -121,11 +160,21 @@
           :data="tableData"
           :column-config="{resizable: true}"
           :edit-config="{trigger: 'click', mode: 'row'}"
+          @checkbox-change='handleSelectTable'
+          @checkbox-all='handleSelectAll'
           >
-          <vxe-column field="index" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="80" title="选择"></vxe-column>
+           <vxe-column field="order_number" width="120" title="订单编号"></vxe-column>
+           <vxe-column field="area" width="60" title="区域"></vxe-column>
+          <vxe-column field="house" width="60" title="楼栋"></vxe-column>
+          <vxe-column field="unit" width="60" title="单元"></vxe-column>
+          <vxe-column field="layer" width="60" title="楼层"></vxe-column>
+          <vxe-column field="number" width="60" title="房号"></vxe-column>
             <vxe-column field="product_type" title="产品分类" :edit-render="{enabled:type==3?false:true}" min-width="100">
               <template #edit="{ row }">
-                <vxe-select v-model="row.product_type" type="text" :filterable='true' clearable></vxe-select>
+                <vxe-select v-model="row.product_type" type="text" :filterable='true' clearable transfer>
+                    <vxe-option v-for="(item,index) in productTypeList" :key="index" :value="item" :label="item"></vxe-option>
+                </vxe-select>
               </template>
             </vxe-column>
             <vxe-column field="title" title="产品名称" :edit-render="{enabled:type==3?false:true}" min-width="100">
@@ -208,7 +257,7 @@
           </vxe-column>
            <vxe-column title="操作" min-width="150">
             <template #default="{ row }">
-                 <a style="margin-right:10px" @click="handleSet(row,1)" v-show="type==2&&row.status==0&&row.split_state==1">拆单</a>
+                 <!-- <a style="margin-right:10px" @click="handleSet(row,1)" v-show="type==2&&row.status==0&&row.split_state==1">拆单</a> -->
                     <!-- <a style="margin-right:10px" @click="handleSet(row,2)" v-show="type!=3">复制</a> -->
                     <a style="margin-right:10px" @click="handleSet(row,3)">详情</a>
                     <!-- <a @click="handleSet(row,4,$rowIndex)" v-show="type!=3">删除</a> -->
@@ -305,6 +354,12 @@
 export default {
     data(){
         return{
+            selectData:[],
+            TableHouseList:[],
+            TableUnitList:[],
+            TableLayerList:[],
+            TableAreaList:[],
+            TableNumberList:[],
             codeList:[],
             titleList:[],
             houseList:[],
@@ -338,7 +393,7 @@ export default {
             numPageSize:10,
             numTotal:0,
             show_num:false,
-            exportProduct:{},
+            exportProduct:[],
             modalProductData:{
                 time:[],
                 process_man:'',
@@ -349,6 +404,11 @@ export default {
             urlNumberList:[],
             productTitleList:[],
             searchData:{
+                layer:'',
+                unit:'',
+                number:'',
+                area:'',
+                house:'',
                 product_type:'',
                 url_number:'',
                 title:'',
@@ -398,7 +458,7 @@ export default {
                 {required:true,message:'客户名称不能为空',trigger:'change',type:'number'}
             ],
              warning_state: [
-                        { required: true, message: '紧急程度不能为空', trigger: 'change',type:'number'}
+                        { required: true, message: '紧急程度不能为空', trigger:'blur',type:'number'}
                     ],
            }
         }
@@ -422,6 +482,86 @@ export default {
            this.initData();
     },
     methods:{
+        handleExport(){
+           if(this.selectData.length==0){
+            return this.$Message.warning('请选择要下生产的数据!');
+           }
+           if(!this.selectData.every(v=>(v.explode_status==1&&v.status==0))){
+            return this.$Message.warning('数据中有不能下生产的数据!');
+           }
+           this.show_product = true;
+           let data = [];
+           this.selectData.forEach(v=>{
+            data.push({
+                url_number:[v.url_number],
+                          cut_order_product_ids:v.cut_order_product_ids,
+                          measure:[v.measure],
+                          house_id:[v.house_id],
+                          order_no:v.order_no
+            })
+           })
+                    this.exportProduct=data;
+        },
+           uploadSuccess(res) {
+      if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.initData(this.proxyData);
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+          uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+        handleSelectAll(e){
+            let data = [];
+             e.records.forEach(v=>{
+                 data.push({
+                    id:v.id,
+                    order_no:v.order_no,
+                    product_name:v.title,
+                    url_number:v.url_number,
+                    cut_order_product_ids:v.cut_order_product_id,
+                          measure:v.measure,
+                          house_id:v.house_id,
+                          explode_status:v.explode_status,
+                          status:v.status,
+                 })
+             })
+           this.selectData = data;
+        },
+        // { checked, row, rowIndex, $rowIndex, column, columnIndex, $columnIndex, $event }
+        handleSelectTable(e){
+             console.log(e.records);
+             let data = [];
+             e.records.forEach(v=>{
+                 data.push({
+                    id:v.id,
+                    order_no:v.order_no,
+                    product_name:v.title,
+                    url_number:v.url_number,
+                    cut_order_product_ids:v.cut_order_product_id,
+                          measure:v.measure,
+                          house_id:v.house_id,
+                           explode_status:v.explode_status,
+                          status:v.status,
+                 })
+             })
+             this.selectData = data;
+             
+        },
+        handleTakeApart(){
+              if(this.selectData.length==0){
+                return this.$Message.warning('请选择需要拆单的数据!');
+              }
+              if(!this.selectData.every(v=>(v.url_number==this.selectData[0].url_number))){
+                return this.$Message.warning('批量拆单只能选择一个图号!')
+              }
+              if(this.selectData.every(v=>(v.status==0))){
+                return this.$Message.warning('选择的数据中有不能拆单的数据!')
+              }
+              document.getElementsByClassName('ivu-upload-input')[0].click();
+        },
         handleNumSearch(){
               let obj = JSON.parse(JSON.stringify(this.modalNumData));
               this.numProxyData = obj;
@@ -464,7 +604,11 @@ export default {
              }
              let process_start_time = Date.parse(this.modalProductData.time[0]).toString().slice(0,10);
              let process_end_time = Date.parse(this.modalProductData.time[1]).toString().slice(0,10); 
-             this.axios.post('/api/split_pull_product',{order_no:this.$route.query.order_no,...this.exportProduct,process_man:this.modalProductData.process_man,process_start_time,process_end_time}).then(res=>{
+             let data = [];
+             this.exportProduct.forEach(ele => {
+                 data.push({...ele,process_man:this.modalProductData.process_man,process_start_time,process_end_time})
+             });
+             this.axios.post('/api/split_pull_product',{list:data}).then(res=>{
                 if(res.code==200){
                     this.$Message.success(res.msg);
                     this.show_product=false;
@@ -493,6 +637,11 @@ export default {
             this.productTypeList = res.data.product_type;
             this.productTitleList = res.data.product_title;
             this.urlNumberList = res.data.url_number;
+            this.TableHouseList = res.data.house;
+            this.TableUnitList= res.data.unit;
+            this.TableAreaList = res.data.area;
+            this.TableNumberList = res.data.number;
+            this.TableLayerList = res.data.layer;
             this.tableData.forEach((v,index)=>{
                 v.index = index+1
             })
@@ -506,19 +655,19 @@ export default {
            this.formData.predict_time = this.func.replaceDateNoHMS(this.formData.predict_time);
    })
         },
-          uploadSuccess(res) {
-      if (res.code == 200) {
-           this.axios.post('/api/deep_detail',{order_no:this.recordOrderNO?this.recordOrderNO:this.formData.order_no}).then(res=>{
-                 this.tableData = res.data.data;
-                 this.total = res.data.total;
-           })
-      } else {
-        this.$Message.warning(res.msg || "上传失败");
-      }
-    },
-          uploadError(err) {
-      this.$Message.error(err.msg || "上传失败");
-    },
+    //       uploadSuccess(res) {
+    //   if (res.code == 200) {
+    //        this.axios.post('/api/deep_detail',{order_no:this.recordOrderNO?this.recordOrderNO:this.formData.order_no}).then(res=>{
+    //              this.tableData = res.data.data;
+    //              this.total = res.data.total;
+    //        })
+    //   } else {
+    //     this.$Message.warning(res.msg || "上传失败");
+    //   }
+    // },
+    //       uploadError(err) {
+    //   this.$Message.error(err.msg || "上传失败");
+    // },
 
         changeSize(e){
          this.pageSize = e;
@@ -563,11 +712,13 @@ export default {
                     break;
                 case 5:
                     this.show_product = true;
-                    this.exportProduct={
+                    this.exportProduct=[{
                         url_number:[row.url_number],
                           cut_order_product_ids:row.cut_order_product_id,
-                          measure:[row.measure]
-                    }
+                          measure:[row.measure],
+                          house_id:[row.house_id],
+                          order_no:row.order_no
+                    }]
                     break;
                 case 6:
                    let data = {};

+ 2 - 2
src/views/BidSystem/ProductDeOrder/newSplitOrder.vue

@@ -9,7 +9,7 @@
           :on-error="uploadError"
           :on-success="uploadSuccess"
           :action="$store.state.ip + '/api/split_import_news'"
-          :data='{order_no:$route.query.order_no,url_number:$route.query.url_number,num:$route.query.num,product_name:$route.query.title,measure:$route.query.measure}'
+          :data='{order_no:$route.query.order_no,url_number:$route.query.url_number,num:$route.query.num,product_name:$route.query.title,measure:$route.query.measure,id:$route.query.id}'
           v-if='$route.query.type==1'
         >
           <Button type="primary">导入</Button
@@ -256,7 +256,7 @@ KeyBoard
     },
 
       initData(){
-      this.axios.get('/api/split_details',{params:{order_no:this.$route.query.order_no,url_number:this.$route.query.url_number,measure:this.$route.query.measure}}).then(res=>{
+      this.axios.get('/api/split_details',{params:{...this.$route.query}}).then(res=>{
         this.tableData = res.data;
       })
       },

+ 2 - 1
src/views/ChipPrintScreen/list.vue

@@ -27,7 +27,8 @@ export default {
     position:fixed;
     left: 53%;
     top: 50%;
-    transform:translate(-50%,-50%);
+    transform:translate(-60%,-50%);
+    width: 740px;
     .block_item{
         border-radius: 10px;
          margin: 60px;

+ 3 - 0
src/views/Dispatching/Dispatching.vue

@@ -748,6 +748,9 @@ export default {
           element.residential_name = this.searchData.residential_name;
         });
         console.log(target);
+        if(!target.every(v=>(v.start_time&&v.end_time))){
+          return this.$Message.warning('请选择时间!')
+        }
         this.axios({
           method: "post",
           url,

+ 10 - 1
src/views/MaterialMannage/index.vue

@@ -35,7 +35,9 @@
         <Button @click="goDetial(1)"
                 type="primary"
                 ghost
-                icon='md-add'>新增物料</Button>
+                icon='md-add'
+                style="margin-right:10px">新增物料</Button>
+                <Button type="primary" @click="handleOnceTogether">一键同步</Button>
       </div>
       <div slot='navButton'>
       </div>
@@ -184,6 +186,13 @@ export default {
      }
   },
   methods: {
+    handleOnceTogether(){
+         this.axios.get('/api/change_data').then(res=>{
+          if(res.code==200){
+            this.$Message.success(res.msg);
+          }
+         })
+    },
     init (row) {
       this.pageIndex = 1
       row.type_id = this.$route.query.id;

+ 370 - 0
src/views/MaterialMannage/yongyouIndex.vue

@@ -0,0 +1,370 @@
+<template>
+  <div class="SippliersList">
+    <Toptitle title="用友物料列表">
+          <Button type="primary" @click="handleOnceTogether">一键同步</Button>
+    </Toptitle>
+    <div class="content">
+      <div class="content_left">
+      <!-- <div :class="item.is_select?'is_select':''" v-for="(item,index) in materialList" :key="index" @click="handleSelect(item,index)">{{item.title}}</div> -->
+       <Tree :data="treeData" @on-select-change='handleSelect'></Tree>
+      </div>
+      <div class="content_right">
+        <div class="content_right_topform">
+          <Form :label-width="90" :model="searchData">
+             <FormItem label="存货编码:">
+              <Input
+                type="text"
+                size="small"
+                clearable
+                v-model="searchData.code"
+                style="width: 150px"
+                placeholder="存货编码"
+              />
+            </FormItem>
+            <FormItem label="存货名称:">
+              <Input
+                type="text"
+                size="small"
+                v-model="searchData.title"
+                clearable
+                style="width: 150px"
+                placeholder="存货名称"
+              />
+            </FormItem>
+            <FormItem label="存货简称:">
+              <Input
+                type="text"
+                size="small"
+                clearable
+                v-model="searchData.abbreviation_title"
+                style="width: 150px"
+                placeholder="存货简称"
+              />
+            </FormItem>
+            
+            <FormItem label="物料分类:">
+              <Select
+                v-model="searchData.type_id"
+                size="small"
+                clearable
+                filterable
+                label-in-value
+                style="width: 150px"
+              >
+                <Option
+                  v-for="item in materialList"
+                  :key="item.id"
+                  :label="item.title"
+                  :value="item.id"
+                >
+                </Option>
+              </Select>
+            </FormItem>
+            <FormItem label="品牌:">
+              <Select
+                v-model="searchData.brand_id"
+                size="small"
+                clearable
+                style="width: 150px"
+              >
+               <Option v-for="item in brandList" :key="item.id" :label='item.title' :value="item.id"/>
+              </Select>
+            </FormItem>
+             <FormItem label="高:">
+              <Input
+                type="text"
+                size="small"
+                clearable
+                v-model="searchData.long"
+                style="width: 150px"
+                placeholder="高"
+              />
+            </FormItem>
+             <FormItem label="宽:">
+              <Input
+                type="text"
+                size="small"
+                clearable
+                v-model="searchData.width"
+                style="width: 150px"
+                placeholder="宽"
+              />
+            </FormItem>
+             <FormItem label="厚:">
+              <Input
+                type="text"
+                size="small"
+                clearable
+                v-model="searchData.high"
+                style="width: 150px"
+                placeholder="厚"
+              />
+            </FormItem>
+            <FormItem :label-width='30'>
+              <Button
+                type="primary"
+                size="small"
+                @click="handleSearch"
+                style="margin-right: 10px"
+                >搜索</Button
+              >
+            </FormItem>
+          </Form>
+          <div class="content_right_topfrom_btn"></div>
+        </div>
+        <div class="content_right_content">
+          <div class="content_right_content_table">
+            <Table
+              :columns="tableColumns"
+              border
+              :loading="tableLoading"
+              :data="tableData"
+              max-height='450'
+            >
+            <template slot="image" slot-scope="{row}">
+                <img :src="$store.state.ip+row.img_url" v-show="row.img_url">
+            </template>
+            </Table>
+            <div class="content_right_content_page">
+              <Page
+                :page-size-opts="[10, 20, 30, 40, 100,1000]"
+                @on-page-size-change="changeSize"
+                @on-change="changePage"
+                :current="pageIndex"
+                show-total
+                show-elevator
+                :total="total"
+                show-sizer
+                :page-size="pageSize"
+              />
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+
+export default {
+  name: "SippliersList",
+  components: {},
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+        treeData:[],
+        selectID:null,
+        proxyData:{},
+        materialList:[],
+      brandList:[],
+      tableColumns: [
+        { title: "存货分类", key: "type_title", align: "center", resizable: true,width: 130,fixed:'left' },
+         { title: "存货编码", key: "code", align: "center", resizable: true,width: 130,fixed:'left' },
+          { title: "存货名称", key: "title", align: "center",resizable: true,width: 200,fixed:'left' },
+           { title: "存货简称", key: "abbreviation_title", align: "center",resizable: true,width: 130 },
+          { title: "存货代码", key: "codes", align: "center",resizable: true,width: 130 }, { title: "存货助记码", key: "material_help_code", align: "center", resizable: true,minWidth: 200 },
+          { title: "品牌", key: "brand_title", align: "center", resizable: true,width: 200 },
+        { title: "规格型号", key: "measure", align: "center", resizable: true,width: 100,render:(h,params)=>{
+            const {row}=params;
+            return h('span',{},`${row.long}*${row.width}*${row.high}`)
+        } }, { title: "计量单位", key: "unit", align: "center", resizable: true,width: 200 },
+         { title: "高", key: "long", align: "center",resizable: true,width: 130 },
+          { title: "宽", key: "width", align: "center",resizable: true,width: 130 },
+           { title: "厚", key: "high", align: "center",resizable: true,width: 130},
+        { title: "主要供应商名称", key: "supply_title", align: "center", resizable: true,width: 200 },
+        
+       
+         
+           
+             { title: "默认税率", key: "fax", align: "center", resizable: true,width: 200 },
+              { title: "参考成本", key: "reference_cost", align: "center", resizable: true,width: 200 },
+               { title: "最新成本", key: "prime_cost", align: "center", resizable: true,width: 200 },
+                { title: "启用日期", key: "start_time", align: "center", resizable: true,width: 200 },
+                 { title: "停用日期", key: "end_time", align: "center", resizable: true,minWidth: 200 },
+ { title: "最高库存", key: "top_number", align: "center",resizable: true,width: 130},
+  { title: "安全库存", key: "warning_number", align: "center",resizable: true,width: 130 },
+  { title: "附件", key: "", align: "center", resizable: true,width: 200,slot:'image'},
+      ],
+      tableData: [],
+      tableLoading: false,
+      pageIndex: 1,
+      pageSize: 10,
+      total: 0,
+      searchData: {
+          code:'',
+          title:'',
+          abbreviation_title:'',
+            type_id:'',
+            brand_id:'',
+            long:'',
+            high:'',
+            width:''
+      }
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    //获取物料层级
+    this.axios.post('/api/yy_material_type_list').then(res=>{
+        this.treeData = res.data;
+    })
+  //获取品牌
+  this.axios.get('/api/brand_list').then(res=>{
+    this.brandList = res.data.data;
+  })
+    //获取物料分类
+ this.axios.get('/api/basics_material_index').then(res=>{
+      this.materialList = res.data.data;
+      this.materialList.forEach(v=>{
+        v.is_select = false;
+      })
+    })
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+  },
+  methods: {
+    handleSearch(){
+         this.proxyData = JSON.parse(JSON.stringify(this.searchData));
+         this.pageIndex=1;
+         this.initData(this.proxyData,this.selectID);
+    },
+    handleSelect(e){
+            this.pageIndex = 1;
+            this.selectID = e[0].ids;
+     this.initData(this.proxyData,e[0].ids);
+  
+    },
+    handleOnceTogether(){
+         this.axios.get('/api/change_data').then(res=>{
+          if(res.code==200){
+            this.$Message.success(res.msg);
+          }
+         })
+    },
+    initData(row,type_id) {
+      this.tableLoading = true;
+      this.axios({
+        method: "post",
+        url: "/api/yy_material_list",
+      data: {
+          ...row,
+          type_id,
+          page_index: this.pageIndex,
+          page_size: this.pageSize,
+        },
+      }).then((res) => {
+        this.tableLoading = false;
+        this.total = res.data.total;
+        this.tableData = res.data.data;
+      });
+    },
+    remove(root, node, data) {
+      if (node.children && node.children.length > 0) {
+        this.$Message.error("有子集时不可删除");
+      } else {
+        const parentKey = root.find((el) => el === node).parent;
+        const parent = root.find((el) => el.nodeKey === parentKey).node;
+        const index = parent.children.indexOf(data);
+        parent.children.splice(index, 1);
+      }
+    },
+    changeSize(e) {
+      this.pageSize = e;
+      this.pageIndex = 1;
+      this.initData(this.proxyData,this.selectID);
+    },
+    changePage(e) {
+      this.pageIndex = e;
+      this.initData(this.proxyData,this.selectID);
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang='scss' scoped>
+.is_select{
+    background-color: #2d8cf0;
+    border: 1px solid #2d8cf0!important;
+    color: #ffffff;
+}
+.content {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  padding-top: 30px;
+  .content_left {
+    width: 10%;
+    height: 70vh;
+    border-right: 1px solid #515a6e;
+    overflow: auto;
+    // div{
+    //     width: 90%;
+    //     border-radius: 4px;
+    //     box-shadow: 2px 2px 2px #969daf;
+    //     font-size:16px;
+    //     text-align: center;
+    //     margin-top: 10px;
+    //     border: 1px solid #8f9296;
+    //     cursor: pointer;
+    // }
+  }
+  .content_right {
+    width: 88%;
+    .content_right_topform {
+      /deep/.ivu-form {
+        display: flex;
+        justify-content: flex-start;
+        flex-wrap: wrap;
+      }
+      /deep/.ivu-form-item {
+        display: inline-block;
+        width: 250px;
+      }
+      .content_right_topfrom_btn {
+        display: flex;
+        justify-content: flex-end;
+      }
+    }
+    .content_right_content {
+      border-top: 1px solid #f4f4f4;
+    //   margin-top: 20px;
+      padding-top: 20px;
+      .content_right_content_btn {
+        display: flex;
+        justify-content: flex-end;
+        margin-bottom: 20px;
+      }
+      .content_right_content_table {
+      }
+      .content_right_content_page {
+        display: flex;
+        justify-content: center;
+        padding-top: 20px;
+      }
+    }
+  }
+}
+.demo-tree-render {
+  width: 100%;
+}
+/deep/ .ivu-table-fixed-body{
+    height: auto!important;;
+ }
+</style>

+ 10 - 4
src/views/PayrollRequisition/list.vue

@@ -225,6 +225,7 @@
 export default {
     data(){
         return{
+            fromType:null,
             printData:[],
             proxyData:{},
             keep:false,
@@ -313,6 +314,9 @@ export default {
     },
     mounted(){
         if(this.keep){
+            if(this.fromType==1){
+                this.page_index=1;
+            }
             this.initData(this.proxyData);
         }else{
             this.initData();
@@ -331,7 +335,7 @@ export default {
   item.upd_time =Number(item.upd_time)? this.func.replaceDate(item.upd_time):'';
             item.bigSize = this.digitUppercase(item.apply_price);
             this.printData = [item];
-            console.log(this.printData);
+            // console.log(this.printData);
      })
     await this.$print(this.$refs.print);
          }else{//批量打印
@@ -399,7 +403,7 @@ export default {
                     if(arr.length != this.selectData.length){
                         return this.$Message.warning('数据中有不能提交审批的数据!')
                     }
-                    console.log(arr);
+                    // console.log(arr);
                     let state = false;
                     arr.forEach(v=>{
                         if(v.state!=arr[0].state){
@@ -591,7 +595,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);
+            // 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;
@@ -626,6 +630,8 @@ export default {
                searchData:this.searchData
           }; 
            localStorage.setItem("requisitionData", JSON.stringify(requisitionData));   
+      }else{
+        localStorage.removeItem('requisitionData');
       }
       next();
     },
@@ -633,7 +639,7 @@ export default {
         if(from.path =="/cms/PayrollRequisition/edit"||from.path=="/cms/PayrollRequisition/detail"){
              let requisitionData = JSON.parse(localStorage.getItem('requisitionData'));
             next(vm=>{
-
+                  vm.fromType = from.query.type;
                   vm.page_index = requisitionData.page_index;
                   vm.page_size = requisitionData.page_size;
                   vm.searchData = requisitionData.searchData;

+ 14 - 9
src/views/Warehouse/Warehouse/list.vue

@@ -35,12 +35,12 @@
       </div>
       <template slot='set'
                 slot-scope='{row,index}'>
-        <div class="table-set">
-          <a style="margin:0 5px"
+       
+          <a style="margin-right:20px"
              @click="handleSet(row,index,1)">编辑</a>
-          <a style="margin:0 5px;color:red"
+          <a style="color:red"
              @click="handleSet(row,index,2)">删除</a>
-        </div>
+       
       </template>
     </FullPage>
     <Modal :title="type==3?'新增仓库':'编辑仓库'"
@@ -67,6 +67,11 @@
                   :key="item.id">{{ item.title }}</Option>
         </Select>
       </div>
+       <div class="modal_div">
+        <span>仓库编码 :</span> <Input v-model="info.code"
+               placeholder="请输入仓库编码"
+               style="width:200px" />
+      </div>
       <div class="modal-footer"
            slot="footer">
         <Button @click="showModal=false">取消</Button>
@@ -97,9 +102,10 @@ export default {
       ],
       tableColums: [
         { title: '序号', type: 'index', align: 'center', key: 'id',resizable:true, width: 150 },
+        {title:"仓库编码",align:'center',key:'code',minWidth:120},
         { title: '仓库名称', align: 'center', key: 'title', resizable:true,width: 500 },
         { title: '仓库分类', align: 'center', key: 'type_title', resizable:true,width: 500 },
-        { title: '操作', align: 'center', slot: 'set', minWidth: 150, fixed: 'right' },
+        { title: '操作', align: 'center', slot: 'set', minWidth: 120, fixed: 'right' },
       ],
       tableData: [],
       showModal: false,
@@ -111,7 +117,8 @@ export default {
       info: {
         id: '',
         title: '',
-        type_id: ''
+        type_id: '',
+        code:"",
       },
       type: null,
     }
@@ -135,9 +142,7 @@ export default {
         method: 'post',
         url: '/api/warehouse_edit',
         data: {
-          id: this.info.id,
-          title: this.info.title,
-          type_id: this.info.type_id
+          ...this.info
         }
       }).then((res) => {
         this.$Message.success(res.msg)

+ 1 - 1
vue.config.js

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