mushencc 3 年之前
父節點
當前提交
2940af096f

二進制
dist.zip


+ 5 - 5
src/views/BasicSettings/rootManage.vue

@@ -84,7 +84,7 @@
       <div>
         <span>工序:</span>
         
-          <Select style="width:50%" v-model="currencyRow.produce_ids" filterable multiple v-if="modal_title !== '查看'">
+          <Select style="width:50%" v-model="currencyRow.produce_ids" filterable v-if="modal_title !== '查看'">
               <Option v-for="(item,index) in process_list" :key="index" :label="item.title" :value="item.id">
               </Option>
           </Select>
@@ -93,8 +93,8 @@
       <div>
         <span>班组:</span>
         
-          <Select style="width:50%" v-model="currencyRow.employee_ids" filterable multiple v-if="modal_title !== '查看'">
-              <Option v-for="(item,index) in band_list" :key="index" :label="item.nickname" :value="item.id">
+          <Select style="width:50%" v-model="currencyRow.employee_ids" filterable multiple v-if="modal_title !== '查看'" class="select_band">
+              <Option v-for="(item,index) in band_list" :key="index" :label="item.nickname" :value="item.id" style="width:100%">
               </Option>
           </Select>
            <span v-else>{{currencyRow.band.toString()}}</span>
@@ -313,8 +313,8 @@ export default {
     }
   }
 }
-/deep/ .ivu-select-selection{
-   
+/deep/.select_band .ivu-select-selection{
+   width: 500px;
   
 }
 </style>

+ 19 - 5
src/views/ChipPrintScreen/ChipPrintScreen.vue

@@ -646,7 +646,7 @@
                    </div>
                 </div>
                 <div style="display:flex">
-                    <span  style="width:3.4rem;font-size: 0.4rem;margin: 0.6em;">班组</span>
+                    <span  style="width:1.5rem;font-size: 0.4rem;margin: 0.6em;">班组</span>
                     <div style="display:flex;flex-wrap:wrap">
                         <span v-for="_item in employeeList" :key="_item.id" @click="changeChooseEmployeeList(_item)" :style="_item.isChoosed?{border: '2px solid #2D8CF0',fontSize: '0.4rem',padding: '0.1em 0.2rem',borderRadius: '5px',margin: '0.6em',color:'#ffffff',backgroundColor:'#2D8CF0',cursor: 'pointer'}:{border: '2px solid #2D8CF0',fontSize: '0.4rem',padding: '0.1em 0.2rem',borderRadius: '5px',margin: '0.6em',color:'#2D8CF0',cursor: 'pointer'}" >
                             {{_item.nickname}}
@@ -723,6 +723,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      rule_data:[],
       selectTrue:false,
       cancelData:[],
       tagPrintList:[],
@@ -993,9 +994,21 @@ handleSelectionAll(){
                     this.rownoList.map(v=>{
                       v.val = v.num;
                     })
+              this.rule_data.forEach(element => {
+              if(element.id == item.id){
+                this.employeeList = element.employee_list;
+                 this.employeeList.map(item=>{
+                          item.isChoosed = false;
+                  })
+                console.log(1)
+              }
+            });
+            
+            console.log(this.employeeList)
                 }
             })
           }else{
+            this.employeeList=[];
               this.rownoList= [];
               this.produceID = null;
           }   
@@ -1270,10 +1283,11 @@ handleSelectionAll(){
     handleGetType(row){
   this.axios.post('/api/station_get_type',{order_no:row}).then(res=>{
               if(res.code == 200){
-                  this.employeeList = res.data.employee_list;
-                  this.employeeList.map(item=>{
-                          item.isChoosed = false;
-                  })
+                  // this.employeeList = res.data.employee_list;
+                  // this.employeeList.map(item=>{
+                  //         item.isChoosed = false;
+                  // })
+                  this.rule_data = res.data.rule_data;
                   this.produceList = res.data.produce_list;
                   this.produceList.map(item=>{
                       item.isChoosed = false;

+ 11 - 9
src/views/Dispatching/Dispatching.vue

@@ -81,7 +81,7 @@
               style="width: 150px"
             >
               <Option
-                v-for="sitem in groupList"
+                v-for="sitem in row.employee_list"
                 :key="sitem.id"
                 :label="sitem.nickname"
                 :value="sitem.id"
@@ -166,7 +166,7 @@
             style="width: 120px"
           >
             <Option
-              v-for="sitem in groupList"
+              v-for="sitem in row.employee_list"
               :key="sitem.id"
               :label="sitem.nickname"
               :value="sitem.id"
@@ -299,7 +299,6 @@ export default {
         },
       }).then(res=>{
         this.orderList = res.data.order_no;
-        this.urlNumberList = res.data.url_number;
         this.projectList = res.data.residential_name;
       })
   },
@@ -320,9 +319,9 @@ export default {
            if(this.searchData.residential_name&&this.searchData.order_no){
 
               this.show = false;
-              this.axios.get('/api/order_produce_url_number',{params:{...this.searchData}}).then(res=>{
+              this.axios.get('/api/order_produce_url_number',{params:{...this.searchData,type_id:this.currencyTag}}).then(res=>{
                 this.urlNumberList = res.data;
-                this.searchData.url_number = '';
+                this.searchData.url_number = [];
                    this.wood_select=[]
                  this.paint_select=[]
      this.packing_select=[]
@@ -332,7 +331,7 @@ export default {
            }else{
              this.show = true;
              if(this.show){
-               this.searchData.url_number = '';
+               this.searchData.url_number = []
              }
            }
          
@@ -343,9 +342,9 @@ export default {
            })
            if(this.searchData.residential_name&&this.searchData.order_no){
               this.show = false;
-              this.axios.get('/api/order_produce_url_number',{params:{...this.searchData}}).then(res=>{
+              this.axios.get('/api/order_produce_url_number',{params:{...this.searchData,type_id:this.currencyTag}}).then(res=>{
                 this.urlNumberList = res.data;
-                this.searchData.url_number = '';
+                this.searchData.url_number = [];
                 this.wood_select=[]
                  this.paint_select=[]
      this.packing_select=[]
@@ -355,7 +354,7 @@ export default {
            }else{
              this.show =true;
               if(this.show){
-              this.searchData.url_number = '';
+              this.searchData.url_number = [];
              }
            }
     },
@@ -663,6 +662,9 @@ export default {
       this.selected = [];
       this.currencyTag = val;
       localStorage.setItem("dispatchTag", val);
+       this.axios.get('/api/order_produce_url_number',{params:{...this.searchData,type_id:this.currencyTag}}).then(res=>{
+                  this.searchData.url_number =[];
+                this.urlNumberList = res.data;});
       this.initData();  
       this.page_index = 1;
       this.page_size = 10;

+ 91 - 9
src/views/PurchasingManage/PurchasingOrder/edit.vue

@@ -1,7 +1,19 @@
 <template>
   <div>
-    <Toptitle :title="$route.query.type==1?'新增采购订单':$route.query.type==2?'查看采购单':'编辑采购单'">
+    <Toptitle :title="$route.query.type==1?'新增采购订单':$route.query.type==2?'查看采购单':$route.query.type==3?'编辑采购订单':'复制采购订单'">
       <slot name="titleButton">
+         <Button type="primary" ghost style="margin-right: 10px" v-if="$route.query.type==2" @click="examine"
+          >{{searchData.state==0?'审批':'弃审'}}</Button
+        >
+         <Button type="primary" ghost style="margin-right: 10px" v-if="$route.query.type==2" @click="typeChange(1)"
+          >打开</Button
+        >
+         <Button type="primary" ghost style="margin-right: 10px" v-if="$route.query.type==2" @click="typeChange(0)"
+          >关闭</Button
+        >
+         <Button type="primary" ghost style="margin-right: 10px"
+          >栏目设置</Button
+        >
         <Button @click="handleReference(1)"
                 type="primary"
                 v-show="!isCheck"
@@ -19,10 +31,11 @@
                 style="margin-right:10px;">确定</Button>
       </slot>
     </Toptitle>
+    <div style="height:90%;overflow:auto">
     <div class="content_topform">
       <Form :label-width="120"
             :model="searchData">
-             <FormItem label="订单号:" :label-width='80'>
+             <FormItem label="订单号:" :label-width="$route.query.type!=2?80:NaN">
           <Input type="text"
                  size="small"
                  v-show="!isCheck"
@@ -31,7 +44,7 @@
                  style="width: 200px;margin-top:6px"
                  placeholder="自动生成订单号">
           </Input>
-          <span v-show="isCheck">{{searchData.order_no}}</span>
+          <span v-show="isCheck">{{order_no}}</span>
         </FormItem>
         <!-- <FormItem label="项目名称:">
           <Input type="text"
@@ -59,7 +72,7 @@
           </Input>
           <span v-show="isCheck">{{searchData.supply_title}}</span>
         </FormItem>
-        <FormItem label="采购订单类型:" style="margin-left:100px">
+        <FormItem label="采购订单类型:" :style="$route.query.type!=2?{marginLeft:'150px'}:{}">
           <Select v-model="searchData.basics_purchase_id"
                   size="small"
                   v-show="!isCheck"
@@ -111,7 +124,7 @@
                       v-model="searchData.order_time"></DatePicker>
           <span v-show="isCheck">{{searchData.order_time?func.replaceDate(searchData.order_time).split(' ')[0]:''}}</span>
         </FormItem>
-        <FormItem label="预计到货日期:" style="margin-left:30px">
+        <FormItem label="预计到货日期:" :style="$route.query.type!=2?{marginLeft:'30px'}:{}">
           <DatePicker type="date"
                       v-show="!isCheck"
                       size="small"
@@ -120,7 +133,19 @@
                       v-model="searchData.arrive_time"></DatePicker>
           <span v-show="isCheck">{{searchData.arrive_time?func.replaceDate(searchData.arrive_time).split(' ')[0]:''}}</span>
         </FormItem>
-        <FormItem label="备注:" :label-width='80'>
+       <FormItem label='制单人:' v-if="$route.query.type==2">
+          <span>{{searchData.user_name}}</span>
+        </FormItem>
+          <FormItem label='审批人:' v-if="$route.query.type==2">
+          <span>{{searchData.check_name?searchData.check_name:''}}</span>
+        </FormItem>
+        <FormItem label='审批状态:' v-if="$route.query.type==2">
+          <span>{{searchData.state==0?'未审批':'已审批'}}</span>
+        </FormItem>
+          <FormItem label='订单创建时间:' v-if="$route.query.type==2">
+          <span>{{searchData.crt_time?func.replaceDate(searchData.crt_time):''}}</span>
+        </FormItem>
+        <FormItem label="备注:" :label-width="$route.query.type!=2?80:NaN">
           <Input type="textarea"
                  v-show="!isCheck"
                  size="small"
@@ -141,7 +166,7 @@
                   size="small"
                   style="margin-left:10px;"
                   :disabled="$route.query.is_refer == 0?true:btn_disable">选择物料</Button> -->
-          <div ><span>参照计划单号:</span><span v-for="(item,index) in plan_no" :key="index" style="margin-right:10px">{{item}}{{index+1==plan_no.length?'':','}}</span></div>
+          <div style="display:flex"><span style="width:100px">参照计划单号:</span><span v-if="$route.query.type!=1">{{searchData.plan_no}}</span><div v-else><span v-for="(item,index) in plan_no" :key="index" style="margin-right:10px">{{item}}{{index+1==plan_no.length?'':','}}</span></div></div>
         </div>
         <div class="content_table_btn_right"
              v-show="!isCheck">
@@ -280,6 +305,7 @@
         </template>
       </Table>
     </div>
+  </div>
     <Modal v-model="showModal"
            title="选择物料"
            width='80'
@@ -935,6 +961,7 @@ export default {
       purchase_data:[],
       purchase_tableData:[],
       plan_no:[],
+      order_no:'',
     }
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -969,11 +996,63 @@ export default {
   },
   // 生命周期 - 挂载完成(可以访问DOM元素)
   mounted () {
+     if(this.$route.query.type == 6){
+      this.order_no = '';
+    }else{
+      this.order_no = this.$route.query.order_no;
+    }
     if (this.$route.query.order_no != '') {
       this.initData(this.$route.query.order_no)
+    };
+     if(this.$route.query.type == 2){
+      this.tableColumns.pop();
+      this.tableColumns.push({
+          title: "状态",
+          key: "lock",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params
+            let text = row.lock==1?'打开':'关闭'
+            return h('span', {
+            }, text)
+          },
+        })
     }
   },
   methods: {
+     examine(){
+      
+      let state='';
+     
+       if(this.searchData.state == 0){
+            state = 1;
+       }else{
+         state = 0;
+       }
+       this.axios.get('/api/purchase_check',{params:{state,order_no:this.$route.query.order_no}}).then((res)=>{
+          if(res.code==200){
+             this.$Message.success(res.msg);
+             this.initData(this.$route.query.order_no)
+           }
+       })
+    },
+    typeChange(val){ 
+      if(this.selectChoose.length==0){
+        return this.$Message.warning("请先选择物料")
+      }
+      let id=[];
+      this.selectChoose.forEach(v=>{
+        id.push(v.id);
+      })
+      let state = val;
+     this.axios.post('/api/purchase_switch',{id,state}).then((res)=>{
+           if(res.code==200){
+             this.$Message.success(res.msg);
+             this.initData(this.$route.query.order_no);
+           }
+     })
+    },
     selectChange(row,index){
       if(!row.copy&&!row.edit){
         this.tableData[index].change = true;
@@ -1144,11 +1223,14 @@ if(this.selectChoose.length == 0){
          if(this.$route.query.type==2){
               this.tableData = []
           }
-          
+          console.log(this.tableData);
           this.tableData=res.data.list;
         const data = JSON.parse(JSON.stringify(res.data))
         delete data.list
         this.searchData = data
+        if(this.$route.query.type==6){
+          this.searchData.order_no = '';
+        }
         this.searchData.crt_time = this.func.replaceDate(this.searchData.crt_time)
         this.searchData.arrive_time = this.func.replaceDate(this.searchData.arrive_time)
         this.searchData.order_time = this.func.replaceDate(this.searchData.order_time)
@@ -1165,7 +1247,7 @@ if(this.selectChoose.length == 0){
           element.total_price = (1 * element.price * element.num).toFixed(2)
           element.tax_amount = (1 * element.total_price - 1 * element.no_tax_amount).toFixed(2)
         });
-        if(this.$route.query.type!==2){
+        if(this.$route.query.type!=2){
           this.tableData.push({material_title:'选择物料',_disabled:true})
         }
         console.log(this.tableData)

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

@@ -160,10 +160,10 @@
             <a style="margin:0 5px"
                @click="handleSet(2,row,index)">详情</a>
             <a style="margin:0 5px"
-               :disabled="row.state==1||row.state==2"
+               v-if="row.state==1||row.state==2"
                @click="handleSet(3,row,index)">编辑</a>
             <a style="margin:0 5px"
-               :disabled="row.state==1||row.state==2"
+               v-if="row.state==1||row.state==2"
                @click="handleSet(4,row,index)">删除</a>
           <a style="margin:0 5px"
                @click="handleSet(5,row,index)">{{row.state==0?'审批':'弃审'}}</a>

+ 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://121.41.102.225:82" //测试服
+    ? "http://121.37.173.82:82" //测试服
     : process.env.NODE_ENV == "prd_other"
     ? "http://121.37.173.82:82" //贝斯特
     : "http://124.71.176.88:882";