mushencc 4 gadi atpakaļ
vecāks
revīzija
362fc9f760

+ 12 - 12
package-lock.json

@@ -4378,11 +4378,11 @@
             }
         },
         "dom7": {
-            "version": "4.0.1",
-            "resolved": "https://registry.npmjs.org/dom7/-/dom7-4.0.1.tgz",
-            "integrity": "sha512-y/RWjw3gK3qQnZz6IqDaIoqH6+xBhcB3Wsh5HFwl0abwuO/NAgbSB31ZbxtBDcuDe8jAX5NYUNDLTx4Ul48sIw==",
+            "version": "2.1.5",
+            "resolved": "https://registry.npmmirror.com/dom7/download/dom7-2.1.5.tgz?cache=0&sync_timestamp=1635331916364&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fdom7%2Fdownload%2Fdom7-2.1.5.tgz",
+            "integrity": "sha1-p5QRAXgAsx2EAAcM2uu/ySwfY3c=",
             "requires": {
-                "ssr-window": "^4.0.0"
+                "ssr-window": "^2.0.0"
             }
         },
         "domain-browser": {
@@ -10428,9 +10428,9 @@
             }
         },
         "ssr-window": {
-            "version": "4.0.1",
-            "resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-4.0.1.tgz",
-            "integrity": "sha512-5q936lkCk5Lg5hM6tG8Nutdym4vNiuFSWorslTzOn71PWb3Wnx44q/k2Ryn1LWA1G4FtxMzjywUFOiOxPkVGrA=="
+            "version": "2.0.0",
+            "resolved": "https://registry.npmmirror.com/ssr-window/download/ssr-window-2.0.0.tgz?cache=0&sync_timestamp=1635331916644&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fssr-window%2Fdownload%2Fssr-window-2.0.0.tgz",
+            "integrity": "sha1-mMMBrvmVIzF/jWlhjwAQeRCW78Q="
         },
         "ssri": {
             "version": "6.0.1",
@@ -10682,12 +10682,12 @@
             }
         },
         "swiper": {
-            "version": "7.2.0",
-            "resolved": "https://registry.npmjs.org/swiper/-/swiper-7.2.0.tgz",
-            "integrity": "sha512-CUL6Nvzcf3fU0b8dHaraYphgBT7l44PY1B6T8b+E12pim4DEcwFZDy/KZoIKrAnn+rfbayCmcksYmSDIP5nDHg==",
+            "version": "5.4.5",
+            "resolved": "https://registry.npmmirror.com/swiper/download/swiper-5.4.5.tgz",
+            "integrity": "sha1-o1D2VL9oQm27ZReTgkklUS0iPA8=",
             "requires": {
-                "dom7": "^4.0.1",
-                "ssr-window": "^4.0.1"
+                "dom7": "^2.1.5",
+                "ssr-window": "^2.0.0"
             }
         },
         "table": {

+ 1 - 1
package.json

@@ -63,4 +63,4 @@
         "last 2 versions",
         "not dead"
     ]
-}
+}

+ 312 - 21
src/views/Dispatching/Dispatching.vue

@@ -12,13 +12,28 @@
         >派工单查询</Button
       >
       <Button
-        @click="handleDispatchAllOpen"
+        @click="handleDispatchConfirm"
         type="primary"
         style="margin-right:10px;"
-        >全部派工</Button
+        >确认派工</Button
       >
     </Toptitle>
-    <div class="body">
+    <div class="main">
+      <Form style='display:flex;margin:15px 0' :label-width='100'>
+        <FormItem label='订单编号:' >
+          <Select style="width:200px" v-model="searchData.order_no">
+            <Option value="1">1</Option>
+          </Select>
+        </FormItem>
+        <FormItem label='图号:'>
+          <Select style="width:200px" v-model="searchData.url_number">
+            <Option value="2">1</Option>
+          </Select>
+        </FormItem>
+        <FormItem>
+          <Button  type="primary">搜索</Button>
+        </FormItem>
+      </Form>
       <div class="header">
         <Tabs v-model="currencyTag" @on-click="handleProcedureChange">
           <TabPane
@@ -27,7 +42,13 @@
             :label="item.title"
             :name="item.id + ''"
           />
+           <div slot="extra" style="width:250px;line-height:40px;font-size:12px">
+         <label style="width:130px">批量设置班组:</label>
+         <Select v-model="group" size='small' style="z-index:99;position: fixed;width:150px;margin-top: 6px;margin-left:10px" @on-change='change_NK'> <Option :value="_item.id" :label="_item.nickname" v-for="_item in groupList" :key="_item.id">
+         </Option> </Select>
+        </div>
         </Tabs>
+       
       </div>
       <div class="content">
         <Table
@@ -35,7 +56,9 @@
           border
           max-height="700"
           @on-selection-change="handleSelectionChange"
+          @on-select='changeSelect'
           :data="tableData"
+          ref="y_table"
         >
           <template slot="slotGroup" slot-scope="{ row, index }">
             <Select
@@ -64,12 +87,15 @@
           </template>
           <template slot="slotSet" slot-scope="{ row, index }">
             <a style="margin:0 5px" @click="handleSet(row, index)">详情</a>
-            <a style="margin:0 5px" @click="handleDispatchConfirm(row, index)"
+            <!-- <a style="margin:0 5px" @click="handleDispatchConfirm(row, index)"
               >派工</a
-            >
+            > -->
           </template>
         </Table>
-        <!-- <div class="pageSlotStyle">
+       
+      </div>
+    </div>
+     <div class="pageSlotStyle">
           <Page :page-size-opts="[10, 20, 30, 40,100,1000]"
                 @on-page-size-change='changeSize'
                 @on-change='changePage'
@@ -78,9 +104,7 @@
                 :total="total"
                 show-sizer
                 :page-size='page_size' />
-        </div> -->
-      </div>
-    </div>
+        </div>
     <Modal v-model="showModal" title="确认派工">
       <Form :label-width="85" ref="forms" :model="dispatchInfo">
         <FormItem label="选择时间">
@@ -168,7 +192,7 @@ export default {
     // 这里存放数据
     return {
       tableColumns: [
-        // { title: '全选', type: 'selection', align: 'center', minWidth: 60 },
+        { title: '全选', type: 'selection', align: 'center', minWidth: 60 },
         { title: "工序", align: "center", key: "title", minWidth: 150 },
         { title: "部件总数", align: "center", key: "num", minWidth: 150 },
         {
@@ -202,11 +226,26 @@ export default {
       page_index: 1,
       page_size: 10,
       total: 0,
+      group:'',
       basicsProcedureList: [],
       groupList: [],
       currencyTag: "1",
       dispatchTime: [],
+      wood_select:[],
+      wood_group:'',
+      paint_select:[],
+      paint_group:'',
+      packing_select:[],
+      packing_group:'',
+      transit_select:[],
+      transit_group:'',
+      install_select:[],
+      install_group:'',
       selected: [],
+      searchData:{
+        order_no:'',
+        url_number:''
+      },
       showModal: false,
       showModalAll: false,
       options: {
@@ -230,7 +269,7 @@ export default {
       })
       .catch((err) => {});
     //获取班组列表
-    this.axios("/api/employee_list", { params: { type: 3 } }).then(
+    this.axios("/api/employee_list").then(
       (res) => (this.groupList = res.data)
     );
   },
@@ -239,6 +278,90 @@ export default {
     this.initData();
   },
   methods: {
+    changeSelect(row){
+        
+    },
+    change_NK(row){
+      if(row == null){
+        return
+      }else{
+      if(this.currencyTag == 1){
+        if(this.wood_select.length == 0){
+          this.$Message.warning('请先选择工序!')
+        }else{
+        this.tableData.forEach(item=>{
+          this.wood_select.forEach(_item=>{
+            if(_item.id == item.id){
+              item.employee_id = row;
+              item._checked = true;
+              _item.employee_id = row;
+            }
+          })
+        })
+        }
+      }
+      if(this.currencyTag == 2){
+        if(this.paint_select.length == 0){
+          this.$Message.warning('请先选择工序!')
+        }else{
+        this.tableData.forEach(item=>{
+          this.paint_select.forEach(_item=>{
+            if(_item.id == item.id){
+              item.employee_id = row;
+              item._checked = true;
+              _item.employee_id = row;
+            }
+          })
+        })
+        }
+      }
+       if(this.currencyTag == 3){
+        if(this.packing_select.length == 0){
+          this.$Message.warning('请先选择工序!')
+        }else{
+        this.tableData.forEach(item=>{
+          this.packing_select.forEach(_item=>{
+            if(_item.id == item.id){
+              item.employee_id = row;
+              item._checked = true;
+              _item.employee_id = row;
+            }
+          })
+        })
+        }
+      }
+       if(this.currencyTag == 4){
+        if(this.transit_select.length == 0){
+          this.$Message.warning('请先选择工序!')
+        }else{
+        this.tableData.forEach(item=>{
+          this.transit_select.forEach(_item=>{
+            if(_item.id == item.id){
+              item.employee_id = row;
+              item._checked = true;
+              _item.employee_id = row;
+            }
+          })
+        })
+        }
+      }
+       if(this.currencyTag == 5){
+        if(this.install_select.length == 0){
+          this.$Message.warning('请先选择工序!')
+        }else{
+        this.tableData.forEach(item=>{
+          this.install_select.forEach(_item=>{
+            if(_item.id == item.id){
+              item.employee_id = row;
+              item._checked = true;
+              _item.employee_id = row;
+            }
+          })
+        })
+        }
+      }
+      }
+    },
     initData() {
       this.axios({
         method: "get",
@@ -246,13 +369,68 @@ export default {
         params: {
           basics_procedure_id:
             localStorage.getItem("dispatchTag") || this.currencyTag,
+            page_index:this.page_index,
+            page_size:this.page_size,
         },
       })
         .then((res) => {
-          this.tableData = res.data;
+          this.group = '';
+          this.total = res.data.total;
+          this.tableData = res.data.data;
           this.tableData.forEach((element) => {
             element.produce_id = element.id;
             element.employee_id ? "" : (element.employee_id = "");
+            if(this.currencyTag == 1  ){
+                this.wood_select.forEach(_item=>{
+                  if(_item.id == element.id){
+                     element._checked = true;
+                     element.employee_id = _item.employee_id;
+                  }
+                })
+            }
+
+
+             if(this.currencyTag == 2 ){
+                this.paint_select.forEach(_item=>{
+                  if(_item.id == element.id){
+                     element._checked = true;
+                     element.employee_id = _item.employee_id;
+                  }
+                })
+            }
+
+
+
+             if(this.currencyTag == 3 ){
+                this.packing_select.forEach(_item=>{
+                  if(_item.id == element.id){
+                     element._checked = true;
+                     element.employee_id = _item.employee_id;
+                  }
+                })
+            }
+
+
+
+              if(this.currencyTag == 4 ){
+                this.transit_select.forEach(_item=>{
+                  if(_item.id == element.id){
+                     element._checked = true;
+                     element.employee_id = _item.employee_id;
+                  }
+                })
+            }
+
+
+
+            if(this.currencyTag == 5 ){
+                this.install_select.forEach(_item=>{
+                  if(_item.id == element.id){
+                     element._checked = true;
+                     element.employee_id = _item.employee_id;
+                  }
+                })
+            }
           });
           this.$forceUpdate();
         })
@@ -272,11 +450,21 @@ export default {
         },
       });
     },
-    handleDispatchConfirm(row, index) {
-      if (row.employee_id) {
-        this.selected = [row];
+    // handleDispatchConfirm(row, index) {
+    //   if (row.employee_id) {
+    //     this.selected = [row];
+    //     this.showModal = true;
+    //     this.subArr = JSON.parse(JSON.stringify(this.selected));
+    //     this.subUrl = "/api/order_produce_pull_all";
+    //   } else {
+    //     this.$Message.warning("请选择班组");
+    //   }
+    // },
+
+  handleDispatchConfirm() {
+    if (this.wood_select.length!=0||this.paint_select.length!=0||this.packing_select.length!=0||this.transit_select.length!=0||this.install_select.length!=0) {
         this.showModal = true;
-        this.subArr = JSON.parse(JSON.stringify(this.selected));
+        this.subArr =[...this.wood_select,...this.paint_select,...this.packing_select,...this.transit_select,...this.install_select]
         this.subUrl = "/api/order_produce_pull_all";
       } else {
         this.$Message.warning("请选择班组");
@@ -298,6 +486,7 @@ export default {
           element.work_type = this.dispatchInfo.work_type;
           element.user_salary = this.dispatchInfo.user_salary || "";
         });
+        console.log(target);
         this.axios({
           method: "post",
           url,
@@ -333,8 +522,6 @@ export default {
       }
     },
     handleDispatchAllOpen() {
-      console.log(localStorage.getItem("dispatchTag"));
-      console.log("this.currencyTag :>> ", this.currencyTag);
       this.axios
         .get("/api/get_all_order_produce", {
           params: {
@@ -364,10 +551,60 @@ export default {
       this.selected = [];
       this.currencyTag = val;
       localStorage.setItem("dispatchTag", val);
-      this.initData();
+      this.initData();  
+      this.page_index = 1;
+      this.page_size = 10;
     },
     handleSelectionChange(selection) {
-      this.selected = selection;
+    try{
+        if(this.currencyTag == 1){
+       this.wood_select = selection;
+       this.wood_select.forEach((item,index)=>{
+                if(this.wood_select[index].id!=this.tableData[index].id){
+                this.$Message.error('请按流程选择工序!');
+                throw new Error();
+          }
+       })
+      }
+      if(this.currencyTag == 2){
+        this.paint_select =selection;
+       this.paint_select.forEach((item,index)=>{
+                if(this.paint_select[index].id!=this.tableData[index].id){
+                this.$Message.error('请按流程选择工序!');
+                throw new Error();
+          }
+       })
+      }
+      if(this.currencyTag == 3){
+        this.packing_select =selection;
+       this.packing_select.forEach((item,index)=>{
+                if(this.packing_select[index].id!=this.tableData[index].id){
+                this.$Message.error('请按流程选择工序!');
+                throw new Error();
+          }
+       })
+      }
+      if(this.currencyTag == 4){
+        this.transit_select = selection;
+       this.transit_select.forEach((item,index)=>{
+                if(this.transit_select[index].id!=this.tableData[index].id){
+                this.$Message.error('请按流程选择工序!');
+                throw new Error();
+          }
+       })
+      }
+      if(this.currencyTag == 5){
+        this.install_select = selection;
+       this.install_select.forEach((item,index)=>{
+                if(this.install_select[index].id!=this.tableData[index].id){
+                this.$Message.error('请按流程选择工序!');
+                throw new Error();
+          }
+       })
+      }
+    }catch(e){
+           
+    }
     },
     handleGroupSelect(e, row, index, value) {
       // if (this.selected.length > 0) {
@@ -378,6 +615,56 @@ export default {
       //   });
       // }
       row.employee_id = e;
+      if(this.currencyTag == 1){
+        this.tableData.forEach(item=>{
+            this.wood_select.forEach(_item=>{
+              if(item.id == _item.id){
+                item._checked = true;
+                _item.employee_id = item.employee_id;
+              }
+            })
+        }) 
+      }
+      if(this.currencyTag == 2){
+        this.tableData.forEach(item=>{
+            this.paint_select.forEach(_item=>{
+              if(item.id == _item.id){
+                item._checked = true;
+                _item.employee_id = item.employee_id;
+              }
+            })
+        }) 
+      }
+       if(this.currencyTag == 3){
+        this.tableData.forEach(item=>{
+            this.packing_select.forEach(_item=>{
+              if(item.id == _item.id){
+                item._checked = true;
+                _item.employee_id = item.employee_id;
+              }
+            })
+        }) 
+      }
+       if(this.currencyTag == 4){
+        this.tableData.forEach(item=>{
+            this.transit_select.forEach(_item=>{
+              if(item.id == _item.id){
+                item._checked = true;
+                _item.employee_id = item.employee_id;
+              }
+            })
+        }) 
+      }
+       if(this.currencyTag == 5){
+        this.tableData.forEach(item=>{
+            this.install_select.forEach(_item=>{
+              if(item.id == _item.id){
+                item._checked = true;
+                _item.employee_id = item.employee_id;
+              }
+            })
+        }) 
+      }
     },
   },
   // 监听属性 类似于data概念
@@ -398,9 +685,13 @@ export default {
 .pageSlotStyle {
   display: flex;
   justify-content: center;
-  margin-top: 40px;
+  margin-top: 50px;
 }
 /deep/ .ivu-table-wrapper {
   overflow: visible;
 }
+.main{
+  height:600px;
+
+}
 </style>

+ 1 - 0
src/views/Dispatching/DispatchingDetail.vue

@@ -279,6 +279,7 @@ export default {
         },
          { title: "图号", align: "center", key: "url_number", minWidth: 150 },
         { title: "产品", align: "center", key: "product_title", minWidth: 150 },
+        { title: "图号", align: "center", key: "url_number", minWidth: 150 },
         { title: "部件", align: "center", key: "part_title", minWidth: 150 },
         // { title: "材质", align: "center", key: "material", minWidth: 150 },
         // { title: "颜色", align: "center", key: "color", minWidth: 150 },

+ 0 - 1
src/views/MountOrder/details.vue

@@ -166,7 +166,6 @@ export default {
         getData(row){
             this.loading = true;
             this.axios('/api/orders_list_detail',{params:row}).then(res=>{
-                console.log(res)
                 this.loading = false;
                 this.tableData = res.data.data;
                 this.logList = res.data.detail

+ 20 - 7
src/views/PartsMannage/edit.vue

@@ -10,8 +10,8 @@
     </Toptitle>
 
     <div class="page-edit">
-      <Form style="width:30%" ref="Info" :model="info" :rules="rules">
-        <FormItem label="部件分类名称" prop="p_id">
+      <Form style="display:flex;flex-wrap:wrap" ref="Info" :model="info" :rules="rules" :label-width='120'>
+        <FormItem label="部件分类名称" prop="p_id" style="width:300px">
           <Select v-if="type != 3" filterable clearable v-model="info.p_id">
             <Option
               v-for="item of partList"
@@ -32,7 +32,7 @@
             <Radio :disabled="type == 3" :label="0">否</Radio>
           </RadioGroup>
         </FormItem>
-        <FormItem label="部件名称" prop="title">
+        <FormItem label="部件名称" prop="title" style="width:300px">
           <Input
             v-if="type != 3"
             v-model="info.title"
@@ -40,7 +40,7 @@
           />
           <span v-else>{{ info.title }}</span>
         </FormItem>
-        <FormItem label="单位" prop="company">
+        <FormItem label="单位" prop="company" style="width:300px">
           <Input
             v-if="type != 3"
             v-model="info.company"
@@ -416,7 +416,7 @@ export default {
         company: "",
         p_id: "",
         bp_id: null,
-        label: null,
+        label: 1,
         title: "",
       },
       partList: [],
@@ -507,6 +507,20 @@ export default {
           slot: "paintSet",
           minWidth: 150,
         },
+         {
+          title: "是否生成芯片码",
+          align: "center",
+          key: "printNum",
+          slot: "printNum",
+          minWidth: 150,
+        },
+         {
+          title: "打印格式",
+          align: "center",
+          key: "printNum",
+          slot: "printNum",
+          minWidth: 150,
+        },
         {
           title: "打印数量",
           align: "center",
@@ -563,8 +577,7 @@ export default {
           align: "center",
           slot: "slot_metals_set",
           minWidth: 200,
-        },
-        {},
+        }
       ],
       tableData: [],
       metalsTableData: [],

+ 14 - 1
src/views/ProductionOrderList/InboundForm/details.vue

@@ -204,6 +204,14 @@ export default {
           value: "",
           option: [],
         },
+         {
+          title: "图号",
+          name: "Select",
+          serverName: "url_number",
+          placeholder: "请选择产品",
+          value: "",
+          option: [],
+        },
         {
           title: "部件",
           name: "Select",
@@ -259,6 +267,7 @@ export default {
           minWidth: 200,
           key: "product_title",
         },
+        { title: "图号", align: "center", minWidth: 200, key: "url_number" },
         { title: "部件", align: "center", minWidth: 200, key: "part_title" },
         {
           title: "零部件",
@@ -459,12 +468,16 @@ export default {
         res.data.part.map((v) => {
           (v.value = v.title), (v.label = v.title);
         });
+        res.data.url_number.map(v=>{
+          (v.value=v.url_number),(v.label = v.url_number);
+        })
         this.list[0].option = res.data.house;
         this.list[1].option = res.data.unit;
         this.list[2].option = res.data.layer;
         this.list[3].option = res.data.number_detail;
         this.list[4].option = res.data.product;
-        this.list[5].option = res.data.part;
+        this.list[5].option = res.data.url_number;
+        this.list[6].option = res.data.part;
       });
     },
     getData(row) {

+ 1 - 1
src/views/ProductionOrderList/ProductionPlanlist/BST_two.vue

@@ -21,7 +21,7 @@
           style="margin-right:10px"
           @click="handleDispatchType(selects)"
           ghost
-          >分类派工</Button
+          >批量派工</Button
         >
         <Button
           v-if="persimissionData['批量派工单'] || persimissionData.all"

+ 3 - 2
src/views/ProductionOrderList/ProductionPlanlist/list.vue

@@ -1,7 +1,8 @@
 <template>
   <div>
-    <typeOne/>
-    <BSTTwo v-if="false"/>
+    
+    <BSTTwo v-if="true"/>
+    <typeOne v-else/>
   </div>
 </template>
 <script>

+ 1 - 0
src/views/ProductionOrderList/workOver/confirm.vue

@@ -55,6 +55,7 @@ export default {
                     }
                 },
                 {title:'产品',align:'center',minWidth:150,key:'product_title'},
+                {title:'图号',align:'center',minWidth:150,key:'url_number'},
                 {title:'位置',align:'center',minWidth:150,key:'position'},
                 {title:'部件',align:'center',minWidth:150,key:'part_title'},
                 {title:'零部件',align:'center',minWidth:150,key:'part_detail_title'},