mushencc vor 3 Jahren
Ursprung
Commit
72e4cd9652

+ 19 - 1
src/routerMap/index.js

@@ -407,6 +407,24 @@ const routerMap = [
       require(["@/views/ProductionOrderList/Dispatchlist/details"], resolve),
   },
   {
+    path: "/cms/productionorderlist/ProductCheck/list",
+    name: "ProductCheckList", //生产清点单
+    meta: {
+      index: 4,
+    },
+    component: (resolve) =>
+      require(["@/views/ProductionOrderList/ProductCheck/list"], resolve),
+  },
+  {
+    path: "/cms/productionorderlist/ProductCheck/detail",
+    name: "ProductCheckDetail", //生产清点单-->详情
+    meta: {
+      index: 4,
+    },
+    component: (resolve) =>
+      require(["@/views/ProductionOrderList/ProductCheck/detail"], resolve),
+  },
+  {
     path: "/cms/productionorderlist/productionplanlist/list",
     name: "ProductionPlanlistList", //生产订单列表-->生产计划列表
     meta: {
@@ -2278,7 +2296,7 @@ const routerMap = [
   },
   {
     path: "/cms/ProductValue/detail",
-    name: "productMessageDetail", //产值表-->详情
+    name: "productValueDetail", //产值表-->详情
     meta: {
       index: 3,
     },

+ 10 - 3
src/views/Agreement/edit.vue

@@ -145,7 +145,7 @@
             <div>
                
               <Upload
-              v-if="!row.product_img&&($route.query.type!=3||$route.query.type!=4)"
+              v-if="!row.product_img&&($route.query.type!=3&&$route.query.type!=4)"
               :headers="headers"
               :show-upload-list="false"
               :on-success="handleTableSuccess"
@@ -219,29 +219,36 @@ export default {
             tableColumns:[
                 {type:'selection',minWidth:40,align:'center',key:'select'},
                 {title:'序号',type:'index',align:'center',minWidth:80,key:'index'},
+                {title:'图号',align:'center',minWidth:80,key:'url_number'},
                 {title:'区域',minWidth:100,align:'center',key:'region'},
                 {title:'产品分类',minWidth:100,align:'center',key:'bp_id',slot:'bp_id'},
                 {title:'产品名称',minWidth:100,align:'center',key:'product_title'},
+                {title:'产品规格',minWidth:100,align:'center',key:'measure'},
+                {title:'件数',minWidth:100,align:'center',key:'count'},
                 {title:'产品图片',minWidth:100,align:'center',key:'product_img',slot:'product_img'},
                 {title:'产品特征',minWidth:200,align:'center',key:'product_feature'},
                 {title:'计量单位',minWidth:60,align:'center',key:'unit'},
                 {title:'工程量',minWidth:80,align:'center',key:'num'},
                 {title:'投标单价',minWidth:100,align:'center',key:'bid_price'},
                 {title:'投标金额',minWidth:100,align:'center',key:'total_bid_price',slot:'total_bid_price'},
+                {title:'备注',minWidth:100,align:'center',key:'remark'},
                 {title:'操作',minWidth:60,align:'center',key:'set',slot:'set'}
             ],
              editTableColumns:[
                 {title:'序号',type:'index',align:'center',minWidth:80,key:'index'},
+                 {title:'图号',align:'center',minWidth:80,key:'url_number'},
                 {title:'区域',minWidth:100,align:'center',key:'region'},
                 {title:'产品分类',minWidth:100,align:'center',key:'product_type_title'},
                 {title:'产品名称',minWidth:100,align:'center',key:'product_title'},
+                {title:'产品规格',minWidth:100,align:'center',key:'measure'},
+                {title:'件数',minWidth:100,align:'center',key:'count'},
                 {title:'产品图片',minWidth:100,align:'center',key:'product_img',slot:'product_img'},
                 {title:'产品特征',minWidth:100,align:'center',key:'product_feature'},
                 {title:'计量单位',minWidth:100,align:'center',key:'unit'},
                 {title:'工程量',minWidth:100,align:'center',key:'num'},
                 {title:'投标单价',minWidth:100,align:'center',key:'bid_price'},
-                {title:'投标金额',minWidth:100,align:'center',key:'total_bid_price'}
-              
+                {title:'投标金额',minWidth:100,align:'center',key:'total_bid_price'},
+              {title:'备注',minWidth:100,align:'center',key:'remark'},
             ]
         }
     },

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

@@ -38,7 +38,7 @@
             <a @click="goAdd(2,row)">编辑</a>
             <a style="margin-left:10px" @click="goAdd(3,row)">变更</a>
             <a style="margin-left:10px" @click="goAdd(4,row)">详情</a>
-            <a style="margin-left:10px">下计划</a>
+            <a style="margin-left:10px" @click="goPlan(row)">下计划</a>
             <a style="margin-left:10px" @click='goAdd(5,row)'>删除</a>
         </template>
       </Table>
@@ -56,12 +56,28 @@
           :page-size="pageSize"
         />
       </div>
+      <Modal title="下计划" v-model="showPlan" width='30' @on-ok='postPlanData'>
+           <Form style="margin-top:20px">
+            <FormItem label='码单时间:' style="width:100%;">
+                <DatePicker type='date' v-model="plan_weight_data.start_time" placeholder='年/月/日' style="width:30%"/>
+                ~
+                <DatePicker type="date" v-model="plan_weight_data.end_time" placeholder='年/月/日' style="width:30%" />
+            </FormItem>
+            <FormItem :label='`${item.title}时间:`' style="width:100%;" v-for="item in planData" :key="item.id"><DatePicker type="date" placeholder='年/月/日' v-model="item.start_time" style="width:30%"/>
+            ~
+            <DatePicker type="date" v-model="item.end_time" placeholder='年/月/日' style="width:30%"/></FormItem>
+        </Form>
+      </Modal>
     </div>
 </template>
 <script>
 export default {
     data(){
         return{
+            planData:[],
+            showPlan:false,
+            order_no:'',
+            plan_weight_data:{},
             proxyData:{},
             pageSize:10,
             pageIndex:1,
@@ -117,6 +133,71 @@ export default {
         this.initData();
     },
     methods:{
+         goPlan(row){
+            //  if(this.selectData.length==0){
+            //      return this.$Message.warning('请先选择图号!')
+            //  }
+            return alert('暂未开发!')
+          this.order_no = row.order_no;
+             this.axios.get('/api/basics_procedure_index').then(res=>{
+              this.planData = res.data.data;
+              this.planData.forEach(v=>{
+                  v.basic_procedure_id = v.id
+                  v.start_time='';
+                  v.end_time='';
+              })
+              this.axios.get('/api/bst_order_pic_number_list',{params:{order_no:row.order_no,page_size:1,page_index:1}}).then(resp=>{
+                  this.planData.forEach(v=>{
+                     resp.data.plan.forEach(m=>{
+                         if(v.basic_procedure_id==m.basic_procedure_id){
+                             v.start_time = m.start_time==0?'':new Date(m.start_time*1000);
+                             v.end_time = m.end_time==0?'':new Date(m.end_time*1000);
+                         }
+                     })
+                  })
+                  let arr;
+                resp.data.plan.forEach(v=>{
+           if(v.basic_procedure_id==-1){
+               arr =v;
+           }
+                })
+                if(arr){
+                    arr.start_time = arr.start_time==0?'':new Date(arr.start_time*1000);
+                    arr.end_time = arr.end_time==0?'':new Date(arr.end_time*1000);
+                    this.plan_weight_data = arr
+                }
+                  this.showPlan=true
+              })
+              
+             })
+        },
+       postPlanData(){
+            let time = JSON.parse(JSON.stringify(this.planData));
+            let weight_time = JSON.parse(JSON.stringify(this.plan_weight_data));
+            time.forEach(v=>{
+                v.start_time = v.start_time?Date.parse(v.start_time).toString().slice(0,10):'';
+            v.end_time = v.end_time?Date.parse(v.end_time).toString().slice(0,10):'';
+            })
+            weight_time.start_time = weight_time.start_time?Date.parse(weight_time.start_time).toString().slice(0,10):'';
+            weight_time.end_time = weight_time.end_time?Date.parse(weight_time.end_time).toString().slice(0,10):'';
+            weight_time.basic_procedure_id = -1;
+            weight_time.type=-1;
+            time.push(weight_time);
+            let obj = {};
+            obj.order_no =this.order_no;
+            obj.procedure_list = time;
+            //  obj.pic_number = [];
+            // this.selectData.forEach(v=>{
+            //          obj.pic_number.push(v.id)
+            // })
+           
+
+          this.axios.post('/api/bst_order_pic_number_detail_edit',obj).then(res=>{
+                     if(res.code==200){
+                         this.initData(this.proxyData);
+                     }
+          })
+        },
         search(row){
                this.proxyData = row;
                this.initData(row);
@@ -189,6 +270,7 @@ export default {
 </script>
 <style lang="scss" scoped>
 .search_form{
+    margin-top:15px;
     display: flex;
     flex-wrap: wrap;
 }

+ 1 - 0
src/views/ChipPrintScreen/ChipPrintScreenCheck.vue

@@ -570,6 +570,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      wxsoect:'',
       chooseSelectChip:{},
       chipData:{
         title: "芯片选择",

+ 2 - 1
src/views/Home/index.vue

@@ -105,7 +105,8 @@ export default {
             this.axios('/api/line_chart',{params:row}).then(res=>{
                 if(res.code == 200){
                     let result=[],columns=[];
-                    res.data[0].map(v=>{
+
+                    res.data.map(v=>{
                         result.push(v.time)
                         columns.push(v.price)
                     })

+ 43 - 26
src/views/OrderMannage/BusinessOrderlist/confirmNew.vue

@@ -775,18 +775,13 @@
           </vxe-column>
           <vxe-column title="门头板" min-width="100" :edit-render="{}">
             <template #default="{row,rowIndex}">
-             
+             <div v-if="!row.is_metal">
              <span v-if="row.hasOwnProperty('addMTB')&&tableData[rowIndex].addMTB">是</span>
              <span v-else>否</span>
-              <!-- <span v-show="!tableData[rowIndex].addMTB||!tableData[rowIndex].hasOwnProperty('addMTB')">否</span> -->
-              <!-- {{
-                scope.row.part.filter(
-                  (v) => v.part_title && v.part_title.indexOf("门头板")
-                )[0].part_title
-              }} -->
+           </div>
             </template>
             <template #edit="scope">
-              <div>
+              <div v-if="!scope.row.is_metal">
                 <a v-if="!scope.row.addMTB" @click="handleMTBClick(scope.row)"
                   >添加</a
                 >
@@ -798,7 +793,6 @@
                   >
                 </div>
               </div>
-              <div></div>
             </template>
           </vxe-column>
       
@@ -4033,10 +4027,17 @@ export default {
     },
     HandleAutoCreateNewLine() {
       let flag = false;
-      this.tableData.map((v) => {
-        if (!v.position && !v.product_id) {
+      this.tableData.map((v,index) => {
+        if(index==this.tableData.length-1){
+          console.log(v,111111111);
+          if(!v.is_metal){
+               if (!v.position && !v.product_id) {
+
           flag = true;
         }
+          }
+        }
+       
       });
       !flag && this.handleTableAdd();
     },
@@ -4369,7 +4370,11 @@ export default {
           sum2 += element.total_price * 1 || 0;
         });
         this.ext_sum = sum2*1
-      item.ext_price = this.ext_sum +this.MTBtotal*1;
+        if(item.addMTB){
+           item.ext_price = this.ext_sum +item.MTBtotal*1;
+        }else{
+             item.ext_price = this.ext_sum;
+        }
       item.price =
         (item.unit_price * 1 || 0) * (item.num * 1 || 1) +
         (item.over_price_total * 1 || 0) +
@@ -4505,11 +4510,13 @@ export default {
       const match_id = $event.value.split("_")[0];
       row.title = this.metalList.filter((v) => v.id == match_id)[0].title;
       row.unit = this.metalList.filter((v) => v.id == match_id)[0].unit;
+        this.tableData.splice(rowIndex, 1, row);
+      this.$forceUpdate();
     },
-    changeEditMetalNum(e, row) {
-      row.price = (1 * e.target.value * row.single_price).toFixed(2);
-      this.handleCalcCount();
-    },
+    // changeEditMetalNum(e, row) {
+    //   row.price = (1 * e.target.value * row.single_price).toFixed(2);
+    //   this.handleCalcCount();
+    // },
     handleMetailPriceChange(e, row) {
       row.isEdit = true;
       row.price = 1 * e.target.value * row.num;
@@ -4518,7 +4525,17 @@ export default {
     changeEditTotalNum(e, row) {
 
       row.isEdit = true;
-      this.handleProductNumChange(e, row);
+     console.log(row.is_metal);
+     if(row.is_metal){
+         row.total_num = e.target.value;
+         row.num = row.total_num;
+         row.price = (row.total_num*1*row.single_price).toFixed(2);
+         this.handleCalcCount();
+         this.$forceUpdate();
+       }else{
+        this.handleProductNumChange(e, row);
+     }
+      
     },
     changeEditDetailNum(row) {
       row.isEdit = true;
@@ -4565,7 +4582,7 @@ export default {
       if ($event) {
      
         const arr = $event.tag.split("_");
-   
+   console.log(arr);
         let obj = {};
         // 分类   1产品   2五金
         if (arr[1] == "1") {
@@ -4624,25 +4641,25 @@ export default {
             price: 0,
             single_price: 0,
             num: 0,
+            total_num:0,
             unit: "",
           };
         }
         this.$nextTick(()=>{
           this.tableData.splice(rowIndex, 1, obj);
         })
-<<<<<<< HEAD
         
         // this.handleTableAdd();
-=======
-        this.handleTableAdd();
->>>>>>> dd611122695ec252473efba7dca3ccccf9dabde0
         if (arr[1] === "1") {
           this.changeEditTableData(obj, rowIndex, $event, scope);
+ this.HandleAutoCreateNewLine();
         } else {
-          this.changeEditMetal(obj, rowIndex, $event, scope);
+          this.$nextTick(()=>{
+             this.changeEditMetal(obj, rowIndex, $event, scope);
+              this.HandleAutoCreateNewLine();
+          })
+         
         }
-        console.log(row)
-        this.HandleAutoCreateNewLine();
       }
     },
     changeEditTableData(row, rowIndex, $event, scope) {
@@ -4734,7 +4751,7 @@ export default {
                 }
                 element.change_id = element.change[0].id;
               }
-              if(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(!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){

+ 19 - 23
src/views/ProductValue/detail.vue

@@ -10,7 +10,7 @@
                <span class="form_item">{{formData.order_no}}</span>
             </FormItem>
             <FormItem label='项目名称:'>
-                <span class="form_item">{{formData.project_title}}</span>
+                <span class="form_item">{{formData.residential_name}}</span>
             </FormItem>
             <FormItem label='项目简称:'>
                <span class="form_item">{{formData.abbreviation}}</span>
@@ -18,17 +18,17 @@
         </Form>
         <Form class="form_content" :label-width='100'>
               <FormItem label='图号:'>
-                 <Select clearable v-model="searchData.url_number" filterable class="form_item">
-                    <Option />
+                 <Select clearable v-model="searchData.url_number" filterable class="form_item" filter-by-label>
+                    <Option v-for="(item,index) in urlList" :key="index" :value="item" :label="item"/>
                 </Select>
             </FormItem>
             <FormItem label='产品:'>
-                 <Select clearable v-model="searchData.url_number" filterable class="form_item">
-                    <Option/>
+                 <Select clearable v-model="searchData.title" filterable class="form_item">
+                    <Option v-for="(item,index) in productList" :key="index" :value="item" :label="item"/>
                 </Select>
             </FormItem>
             <FormItem>
-                <Button type="primary">搜索</Button>
+                <Button type="primary" @click="initData(searchData)">搜索</Button>
             </FormItem>
         </Form>
            <Table :data='tableData' :columns='SetTableColumns' border max-height='550'></Table>
@@ -39,9 +39,12 @@
 export default {
     data(){
         return{
+            urlList:[],
+           productList:[],
             formData:{},
             searchData:{
-                url_number:''
+                url_number:'',
+               title:''
             },
             tableData:[
                 // {url_number:'1',region:1,product_title:'1',num:'1',price:'1',total_price:'1',technology:'1',south_1:'1',south_2:'1',south_3:'1',south_4:'1',north_1:'1',north_2:'1',north_3:'1',north_4:'1',east_1:'1',east_2:'1',east_3:'1',east_4:'1'},
@@ -50,11 +53,14 @@ export default {
             ],
            tableColumns:[
                {title:'图号',align:'center',minWidth:100,key:'url_number'},
-               {title:'区域',align:'center',minWidth:100,key:'region'},
+               {title:'区域',align:'center',minWidth:100,key:'layer'},
                {title:'产品名称',align:'center',minWidth:100,key:'title'},
                {title:'数量',align:'center',minWidth:100,key:'num'},
                {title:'单价',align:'center',minWidth:100,key:'price'},
-               {title:'金额',align:'center',minWidth:100,key:'total_price'},
+               {title:'金额',align:'center',minWidth:100,key:'total_price',render:(h,params)=>{
+                   const {row} = params;
+                   return h('span',{},row.num*1*row.price)
+               }},
                {title:'工艺',align:'center',minWidth:100,key:'technology'},
            ],
            setColumns:[
@@ -93,8 +99,10 @@ export default {
      this.initData();
     },
     methods:{
-        initData(){
-               this.axios.post('/api/output_value_statement',{order_no:this.$route.query.order_no}).then(res=>{
+        initData(row){
+               this.axios.post('/api/output_value_statement',{order_no:this.$route.query.order_no,...row}).then(res=>{
+                   this.urlList = res.data.url_number_list;
+                   this.productList = res.data.product_list;
                             res.data.head.forEach(ele => {
                                 ele.align = 'center'
                                  ele.children.forEach(v=>{
@@ -130,18 +138,6 @@ export default {
                                   v[ele+'_time'] = v.procedure_list[ele][e].value;
                               })
                             })
-                            // console.log(v.procedure_list)
-                            // for(key in v.procedure_list){
-                            //     console.log(key)
-                            //    for(k in v.procedure_list[key]){
-                            //        v[key+''+k] = v.procedure_list[key][k].value
-                            //    } 
-                            // }
-                        //      v.procedure_list.each(data,(key,value)=>{
-                        //          value.each(val,(k,v)=>{
-                        //              v[key+''+k] = v.value
-                        //          })
-                        // })
                         }
                         }else{
                              

+ 626 - 0
src/views/ProductionOrderList/ProductCheck/detail.vue

@@ -0,0 +1,626 @@
+<template>
+  <div>
+    <Toptitle title="生产清点单详情">
+     <Dropdown trigger="click" @on-click='print($event,null,1)'>
+       <Button type="primary">批量补打 <Icon type="ios-apps" /></Button>
+      
+        <DropdownMenu slot="list">
+            <DropdownItem v-for="item in printData" :key="item.id" :name='item.id'>{{item.title}}</DropdownItem>
+        </DropdownMenu>
+    </Dropdown>
+    <Button @click="$router.go(-1)" style="margin-left:20px">返回</Button>
+    </Toptitle>
+    <div class="weight_memo_info_content">
+      <div class="form_content">
+        <Form :label-width="105" :model="formData">
+          <FormItem label="项目编码:">
+               <span >{{formData.order_no}}</span>
+          </FormItem>
+          <FormItem label="项目名称:">
+           <span>{{formData.residential_name}}</span>
+          </FormItem>
+        </Form>
+        <Form :label-width="105">
+           <FormItem label='图号:'>
+             <Select filterable multiple v-model="searchData.url_number">
+               <Option v-for="(item,index) in urlList" :key="index" :value="item" :label="item"/>
+             </Select>
+           </FormItem>
+          <FormItem label='产品名称:'>
+             <Select filterable multiple v-model="searchData.product_title">
+               <Option v-for="(item,index) in productList" :key="index" :value="item" :label="item"/>
+             </Select>
+          </FormItem>
+          <FormItem :label-width='40'>
+            <Button type="primary" @click="initData(searchData)">搜索</Button>
+          </FormItem>
+        </Form>
+        
+      </div>
+      <Card v-for="(item,index) in infoNumber" :key="index">
+          <div class="table_header">
+            <div class="table_header_left">
+                <Checkbox v-model="item.is_select" @on-change='handleCheckSelect'></Checkbox>
+              <span>图号:{{item.url_number}}</span>
+              <span>产品名称:{{item.product_title}}</span>
+              <span>总计:{{item.total}}</span>
+              <span>已清点:{{item.complete}}</span>
+              <span>未清点:{{item.un_complete}}</span>
+            </div>
+            <div class="table_header_right">
+
+              <Dropdown trigger="click" @on-click='print($event,item,2)'>
+       <Button type="primary">批量补打 <Icon type="ios-apps" /></Button>
+        <DropdownMenu slot="list">
+           <DropdownItem v-for="item in printData" :key="item.id" :name='item.id'>{{item.title}}</DropdownItem>
+        </DropdownMenu>
+    </Dropdown>
+              <div @click="show(item,index)" style="cursor: pointer;"><span style="font-size:16px;">{{item.showType?'收缩':'展开'}}</span><Icon type="md-arrow-dropright"  ref="ico" class="ico"/></div>
+              <span>总计{{item.total}}条数据</span>
+            </div>
+          </div>
+          <div v-if="item.showType" class="demo-tabs-style1">
+<Tabs type="card" :value='tabIndex' :capture-focus='true' @on-click='handleTabClick($event,item)'>
+                <TabPane label="已清点" name='1'>
+       <Form :label-width='120' style="display:flex;flex-wrap:wrap;margin-top:15px">
+           <FormItem label='房号:'>
+               <Select style="width:200px" size="small" filter-by-label filterable clearable v-model="leftSearchData.house_id">
+                     <Option v-for="item in leftHouseNumber" :key="item.id" :value="item.id" :label='item.title'></Option>
+                 </Select>
+           </FormItem>
+           <FormItem label='组件/部件:'>
+           <Select style="width:200px" size="small" filter-by-label filterable clearable v-model="leftSearchData.part_title">
+                     <Option v-for="(item,index) in leftPartList" :key="index" :value="item" :label="item"></Option>
+                 </Select></FormItem>
+           <FormItem label='清点方式:' filter-by-label>
+               <Select style="width:200px" size="small" v-model="leftSearchData.is_check" clearable>
+                     <Option value='1'>系统清点</Option>
+                     <Option value="2">手动清点</Option>
+                 </Select>
+           </FormItem>
+           <FormItem :label-width='40'>
+               <Button type="primary" size='small' @click="search(item)">搜索</Button>
+           </FormItem>
+       </Form>
+       <Table :data='leftTableData' :columns='leftTableColumns' border max-height='400'>
+           <template slot="set" slot-scope="{row}">
+                
+                 <Dropdown trigger="click" transfer @on-click='print($event,row,3)'>
+        <Button type="success" ghost>补打 <Icon type="ios-apps" /></Button>
+        <DropdownMenu slot="list">
+            <DropdownItem v-for="item in printData" :key="item.id" :name='item.id'>{{item.title}}</DropdownItem>
+        </DropdownMenu>
+    </Dropdown>
+             </template>
+       </Table>
+        <div class="content_body_page">
+        <Page
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeLeftSize($event,item)"
+          @on-change="changeLeftPage($event,item)"
+          :current="leftPageIndex"
+          show-total
+          show-elevator
+          :total="leftTotal"
+          show-sizer
+          :page-size="leftPageSize"
+        />
+          </div>
+                </TabPane>
+                <TabPane label="未清点" name='0'>
+<Form :label-width='120' style="display:flex;flex-wrap:wrap;margin-top:15px">
+           <FormItem label='房号:'>
+                 <Select style="width:200px" size="small" filter-by-label filterable clearable v-model="rightSearchData.house_id" >
+                     <Option v-for="item in rightHouseNumber" :key="item.id" :value="item.id" :label='item.title'></Option>
+                 </Select>
+           </FormItem>
+           <FormItem label='组件/部件:'>
+           <Select style="width:200px" size="small" filter-by-label filterable clearable v-model="rightSearchData.part_title" >
+                     <Option v-for="(item,index) in rightPartList" :key="index" :value="item" :label="item"></Option>
+                 </Select>
+                 </FormItem>
+           <FormItem :label-width='40'>
+               <Button type="primary" size='small' @click="search(item)">搜索</Button>
+           </FormItem>
+           
+       </Form>
+         <Table :data='rightTableData' :columns='rightTableColumns' border max-height='400'>
+         </Table>
+          <div class="content_body_page">
+        <Page
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeRightSize($event,item)"
+          @on-change="changeRightPage($event,item)"
+          :current="rightPageIndex"
+          show-total
+          show-elevator
+          :total="rightTotal"
+          show-sizer
+          :page-size="rightPageSize"
+        />
+          </div>
+                </TabPane>
+            </Tabs>
+        </div>
+      </Card>
+    </div>
+  </div>
+</template>
+<script>
+import $ from "jquery";
+export default {
+  data() {
+    return {
+        wxsoect:'',
+        state:false,
+        ////////////
+        selectData:[],
+        printData:[],//打印格式
+        ////////////////
+        tabIndex:'',
+        //////////////////////
+     leftSearchData:{
+         house_id:[],
+         part_title:[],
+         is_check:'',
+     },
+     rightSearchData:{
+        house_id:[],
+         part_title:[], 
+     },
+     ////////////////////////////
+     leftPageIndex:1,
+     leftPageSize:10,
+     rightPageIndex:1,
+     rightPageSize:10,
+     leftTotal:0,
+     rightTotal:0,
+     /////////////////////////
+     leftHouseNumber:[],
+     leftPartList:[],
+     ///////////////////
+ rightHouseNumber:[],
+     rightPartList:[],
+     //////////////////
+      urlList:[],
+      productList:[],
+      formData: {
+        order_no:'',
+        residential_name:'',
+      },
+      leftTableData:[],
+      rightTableData:[],
+      searchData: {
+        url_number:[],
+        product_title:[],
+      },
+      leftTableColumns:[
+          {title:'序号',type:'index',minWidth:80,key:'',align:'center'},
+          {title:'房号',key:'house_number',minWidth:120,align:'center',render:(h,params)=>{
+              const {row} = params;
+              return h('span',{},`${row.house?`${row.house}-`:''}${row.unit?`${row.unit}-`:''}${row.layer?`${row.layer}-`:''}${row.number}`)
+          }},
+          {title:'组合/部件',key:'part_title',minWidth:120,align:'center'},
+          {title:'精裁尺寸',key:'measure',minWidth:120,align:'center'},
+          {title:'清点方式',key:'is_check',minWidth:120,align:'center',render:(h,params)=>{
+              const {row} = params;
+              return h('span',{},row.is_check == 1?'系统清点':'人工清点')
+          }},
+          {title:'操作',key:'set',minWidth:120,align:'center',slot:'set'},
+      ],
+      rightTableColumns:[
+             {title:'序号',type:'index',minWidth:80,key:'',align:'center'},
+          {title:'房号',key:'house_number',minWidth:120,align:'center',render:(h,params)=>{
+              const {row} = params;
+              return h('span',{},`${row.house?`${row.house}-`:''}${row.unit?`${row.unit}-`:''}${row.layer?`${row.layer}-`:''}${row.number}`)
+          }},
+          {title:'组合/部件',key:'part_title',minWidth:120,align:'center'},
+          {title:'精裁尺寸',key:'measure',minWidth:120,align:'center'},
+      ],
+      //进入页面需要获取的数值
+      infoNumber:[],
+    };
+  },
+  created(){
+           //获取打印格式
+           this.axios.get('/api/ext_print_format_list').then(res=>{
+           this.printData = res.data.data;
+           })
+  },
+  mounted(){ 
+          this.initData();
+  },
+  methods: {
+      handleCheckSelect(){
+       
+        let selectProduct = [];
+        this.infoNumber.forEach(v=>{
+            if(v.is_select){
+                let obj = {};
+                obj.product_id = v.product_id;
+                obj.id = v.id;
+                selectProduct.push(obj);
+            }
+        })
+        this.selectData = selectProduct;
+        console.log(this.selectData);
+      },
+      handleTabClick(e,item){
+     this.tabIndex = e;
+     this.search(item);
+      },
+      changeRightSize(e,item){
+         this.rightPageSize = e;
+         this.rightPageIndex = 1;
+         this.search(item);
+      },
+      changeRightPage(e,item){
+        this.rightPageIndex = e;
+        this.search(item);
+      },
+      changeLeftSize(e,item){
+      this.leftPageSize = e;
+      this.leftPageIndex =1;
+      this.search(item);
+      },
+      changeLeftPage(e,item){
+         this.leftPageIndex =e;
+         this.search(item);
+      },
+      print(e,row,type){
+    //type==1 顶部大打印 2 每条的批量补打 3 表格里面的小打印
+    //e 是 number;
+    let printStyle = this.printData.find(v=>(v.id == e));
+    console.log(printStyle);
+    let printerUsbPort = printStyle.printerUsbPort;
+    let sub_type = printStyle.sub_type;
+    let printer_brand = printStyle.printer_brand;
+  let data = {};
+  data.order_no = this.$route.query.order_no;
+  data.rows=[];
+  data.type=3;
+  data.num =1;
+    switch(type){
+        case 1:
+            if(this.selectData.length==0){
+                return this.$Message.warning('请先选择要打印的数据!')
+            }
+           this.selectData.forEach(val=>{
+               data.product_id = val.product_id;
+               val.id.forEach(e=>{
+                  data.id = e;
+                  this.printDetail(printerUsbPort,sub_type,printer_brand,data)
+               })
+           })
+            break;
+        case 2:
+            if(!row.complete){
+                return this.$Message.warning('无可打印的数据!')
+            }
+            data.product_id = row.product_id;
+            row.id&&row.id.forEach(v=>{
+                data.id = v;
+                this.printDetail(printerUsbPort,sub_type,printer_brand,data)
+            })
+            
+            break;
+        case 3:
+            data.product_id = row.product_id;
+            data.id = row.id;
+          this.printDetail(printerUsbPort,sub_type,printer_brand,data)
+            break;
+    }
+    if(type==3){
+           this.state&&this.search(row);
+    }else{
+       this.state&&this.initData(this.searchData);
+         this.selectData = [];
+    }
+    
+    this.state = false;
+      },
+      printDetail(printerUsbPort,sub_type,printer_brand,data){
+   if(printer_brand === '灵天智能'){
+              const wxsoect = new WebSocket(`ws://localhost:${printerUsbPort?printerUsbPort:'1808'}`);
+          this.wxsoect = wxsoect;
+           console.log("this.wxsoect :>> ", this.wxsoect);
+           wxsoect.onopen = function(evt) {
+              console.log(`已成功打开`);
+                 };
+          };
+     this.axios({
+        method: "post",
+        url: "/api/station_print",
+        data,
+      }).then((resp) => {
+        if (resp.code == 200) {
+          if(printer_brand === '灵天智能'){
+               resp.data.map(ele=>{
+                 this.printDemo(ele)
+               })
+          }else if(printer_brand === 'POSTEK'){      
+           this.handlePrintChipsUsb(resp.data,printerUsbPort,sub_type);
+          }else{
+           return this.$Message.error('该格式未设置打印机')
+          }
+    }
+    })
+      },
+    initData(row) {
+             this.axios.post('/api/artificial_count_detail',{order_no:this.$route.query.order_no,...row}).then(res=>{
+             this.formData.order_no = res.data.order_no;
+             this.formData.residential_name = res.data.residential_name;
+            this.productList = res.data.product_title;
+             this.urlList = res.data.url_number;
+             this.infoNumber = res.data.data;
+          })
+    },
+     handlePrintChipsUsb(contents,printerUsbPort,sub_type) {
+      this.axios.get("/api/get_print_url").then((res) => {
+        // let data = {};
+        // let url = "http://192.168.0.145:888/postek/print"; //request_url
+        let url = `http://${res.data.request_url}:888/postek/print`; //request_url
+        let _this = this;
+        $.ajax({
+          type: "post",
+          url,
+          data:  _this.func.PrintChipsUsb(contents,2,printerUsbPort,sub_type),
+          dataType: "json",
+          timeout: 5000,
+          success: function(result) {
+            
+            if (result.retval == "0") {
+              _this.$Message.success("发送成功");
+              _this.state = true;
+            } else {
+              _this.$Message.error("发送失败,返回结果:" + result.msg);
+            }
+          },
+          error: function() {
+            _this.state = false;
+          },
+        });
+      });
+    },
+     printDemo(data) {
+      setTimeout(()=>{
+          if (!data) return (this.state=false&&0);
+      const st = this.wxsoect;
+      const {
+        client_name,
+        product_title,
+        part_title,
+        measure,
+        process,
+        url_number,
+        color_title,
+        chip,
+        chip_bin,
+        house,
+        unit,
+        layer,
+        number_detail,
+        position,
+      } = data;
+      st.send("OpenPort|255");
+      st.send("ZM_ClearBuffer");
+      st.send("ZM_SetPrintSpeed|4");
+      st.send("ZM_SetDarkness|12");
+
+      if (location.origin.indexOf("121.37.173.82") > -1) {
+        st.send("ZM_SetLabelHeight|136|32");
+      } else {
+        st.send("ZM_SetLabelHeight|160|16");
+      }
+
+      st.send("ZM_SetLabelWidth|664");
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|20|24|0|Arial|1|600|0|0|0|A1| 项目:${client_name ||
+          ""}`
+      );
+        st.send(
+        `ZM_DrawTextTrueTypeW|280|20|24|0|Arial|1|600|0|0|0|A1|  区域: ${layer||''}`
+      );
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|55|24|0|Arial|1|600|0|0|0|A2|  房号:${number_detail||''}`
+      );
+       st.send(
+        `ZM_DrawTextTrueTypeW|280|55|24|0|Arial|1|600|0|0|0|A2| 产品:${product_title ||
+          ""} `
+      );
+       st.send(
+        `ZM_DrawTextTrueTypeW|70|90|24|0|Arial|1|600|0|0|0|A3| 部件:${part_title || ""} `
+      );
+      st.send(
+        `ZM_DrawTextTrueTypeW|280|90|24|0|Arial|1|600|0|0|0|A3| 图号: ${url_number ||
+          ""} `
+      );
+      st.send(
+        `ZM_DrawTextTrueTypeW|70|125|24|0|Arial|1|600|0|0|0|A4| 尺寸: ${measure ||
+          ""} `
+      );
+  st.send(
+        `ZM_DrawTextTrueTypeW|280|125|24|0|Arial|1|600|0|0|0|A4| 木皮:${color_title || ""}`
+      );
+       st.send(
+        `ZM_DrawTextTrueTypeW|520|90|12|0|Arial|1|600|0|0|0|A4| ${chip_bin || ""}`
+      );
+      st.send(`ZM_RW_RfidFormat|1|0|0|${chip.length}|1|${chip}`);
+      st.send("ZM_PrintLabel_R|1|1");
+      st.send("ClosePort");
+      },1000)
+         this.state = true;
+    },
+    show(item,index) {
+        this.infoNumber[index].showType = !this.infoNumber[index].showType
+        if(item.showType){           //全部未展开
+            this.infoNumber.forEach(_item=>{
+           _item.showType = false;
+        })
+             document.getElementsByClassName('ico')[index].style.transform = 'rotate(90deg)'
+             item.showType = true;
+              this.leftPageIndex=1;
+     this.leftPageSize=10;
+     this.rightPageIndex=1;
+     this.rightPageSize=10;
+     this.leftSearchData = {house_id:[],part_title:[],is_check:''};
+     this.rightSearchData={house_id:[],part_title:[]};
+             this.tabIndex = '1';
+             this.$forceUpdate();
+            this.search(item)
+        }else{    //展开其中一项
+             this.infoNumber.forEach(_item=>{
+           _item.showType = false;
+        })
+            document.getElementsByClassName('ico')[index].style.transform = 'rotate(0deg)'
+            this.$forceUpdate();
+        }
+    },
+    search(item){
+        let page_size,page_index,obj;
+        if(this.tabIndex==='1'){
+            page_size = this.leftPageSize;
+            page_index = this.leftPageIndex;
+            obj = this.leftSearchData;
+        }else{
+            page_size = this.rightPageSize;
+            page_index = this.rightPageIndex;
+            obj = this.rightSearchData;
+        }
+        this.axios.post('/api/artificial_count_detail_open',{...obj,page_size,page_index,url_number:item.url_number,state:this.tabIndex,order_no:this.$route.query.order_no}).then(res=>{
+            let house_list = [];
+                  res.data.house.forEach(v=>{
+                  let obj = {};
+                  obj.id = v.house_id;
+                  obj.title = `${v.house?`${v.house}-`:''}${v.unit?`${v.unit}-`:''}${v.layer?`${v.layer}-`:''}${v.number}`;
+                  house_list.push(obj);
+                  })
+                if(this.tabIndex==='1'){
+                    this.leftPartList = res.data.part_title;
+                    this.leftHouseNumber =house_list;
+                    this.leftTableData = res.data.data.data;
+                    this.leftTotal = res.data.data.total;
+                }else{
+                    this.rightPartList = res.data.part_title;
+               this.rightHouseNumber = house_list;
+               this.rightTableData = res.data.data.data;
+               this.rightTotal = res.data.data.total;
+                }
+        })
+    }
+  },
+};
+</script>
+<style scoped lang='scss'>
+.weight_memo_info_content{
+    height: 700px;
+    overflow: auto;
+}
+.form_content {
+  margin-top: 10px;
+  /deep/.ivu-form {
+    display: flex;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+  }
+  /deep/.ivu-form-item {
+    display: inline-block;
+    width: 300px;
+  }
+}
+.table_header {
+  display: flex;
+  justify-content: space-between;
+  .table_header_left{
+      display: flex;
+      flex-wrap: wrap;
+      span{
+          margin: 0 20px;
+      }
+  }
+  .table_header_right {
+      width: 400px;
+    display: flex;
+    justify-content: space-around;
+  }
+}
+.mate_info{
+    display: flex;
+    justify-content: space-between;
+    margin: 20px 0;
+}
+.ico{
+   height:14px;
+   transition: all 0.4s;
+   vertical-align: middle;
+}
+/deep/ .ivu-card{
+    border-radius: 15px;
+    margin: 15px 0;
+    background: rgb(236, 236, 236);
+}
+.inputWrap {
+  position: relative;
+  display: inline-block;
+}
+#inputmultiple {
+  width: 100%;
+  height: 100%;
+  display: none;
+  user-select: none;
+}
+.inputWrapButton {
+    margin-left:10px;
+  height: 32px;
+  line-height: 32px;
+  padding: 0 15px;
+  user-select: none;
+  border-radius: 4px;
+  font-size: 14px;
+  display: inline-block;
+  color: #fff;
+  background-color: #2d8cf0;
+  border-color: #2d8cf0;
+  outline: 0;
+  border: none;
+  cursor: pointer;
+  transition: color 0.2s linear, background-color 0.2s linear,
+    border 0.2s linear, box-shadow 0.2s linear;
+  &:hover {
+    background-color: #70b1f7;
+  }
+}
+/deep/.ivu-tabs-nav{
+    display: inline-block;
+    width: 100%;
+    
+}
+/deep/.ivu-tabs-nav-scroll{
+    text-align: center;
+
+}
+/deep/.demo-tabs-style1 > .ivu-tabs-card > .ivu-tabs-content {
+       height: auto;
+        margin-top: -18px;
+    }
+
+  /deep/.demo-tabs-style1 > .ivu-tabs-card > .ivu-tabs-content > .ivu-tabs-tabpane {
+        background: #fff;
+        padding: 10px;
+        height: auto;
+    }
+
+  /deep/.demo-tabs-style1 > .ivu-tabs.ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-tab {
+        border-color: transparent;
+    }
+
+    /deep/.demo-tabs-style1 > .ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-tab-active {
+        border-color: #fff;
+        color: white;
+        background: #2d8cf0;
+    }
+    .content_body_page{
+        text-align: center;
+        margin: 15px 0;
+    }
+</style>

+ 114 - 0
src/views/ProductionOrderList/ProductCheck/list.vue

@@ -0,0 +1,114 @@
+<template>
+    <div>
+           <Toptitle title="生产清代单"></Toptitle>
+           <div class="content">
+               <Form :label-width='100' class="form_content">
+                    <FormItem label='项目编码:'>
+                        <Input clearable v-model="searchData.order_no" placeholder="请输入项目编码" class="form_item"/>
+                    </FormItem>
+                    <FormItem label='项目名称:'>
+                        <Input clearable v-model="searchData.residential_name" placeholder="请输入项目名称" class="form_item"/>
+                    </FormItem>
+                    <FormItem label='紧急程度:'>
+                        <Select filterable clearable class="form_item" v-model="searchData.warning_state">
+                            <Option v-for="item in warning" :key="item.value" :value="item.value" :label="item.label"/>
+                        </Select>
+                    </FormItem>
+                    <FormItem :label-width='40'>
+                        <Button type="primary" @click="initData(searchData)">搜索</Button>
+                    </FormItem>
+               </Form>
+               <Table :data='tableData' :columns='tableColumns' max-height='550' border>
+            <template slot="set" slot-scope="{row}">
+                   <a @click="goPage(row)">详情</a>
+            </template>
+               </Table>
+           </div>
+            <div class="content_body_page">
+        <Page
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+          </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            warning:[
+                {label:'不急',value:'0'},
+                {label:'比较急',value:'1'},
+                {label:'紧急',value:'2'},
+                {label:'非常急',value:'3'}
+            ],
+            searchData:{
+                order_no:'',
+                residential_name:'',
+                warning_state:''
+            },
+            pageSize:10,
+            pageIndex:1,
+            total:10,
+            tableData:[],
+            tableColumns:[
+                {title:'项目编码',minWidth:120,align:'center',key:'order_no'},
+                {title:'项目名称',minWidth:120,align:'center',key:'residential_name'},
+                {title:'紧急程度',minWidth:120,align:'center',key:'warning_state',render:(h,params)=>{
+                    const {row} = params;
+                    return h('span',{},row.warning_state==0?'不急':row.warning_state==1?'比较急':row.warning_state==2?'紧急':'非常急')
+                }},
+                {title:'操作',minWidth:120,align:'center',key:'set',slot:'set'}
+            ],
+        }
+    },
+    mounted(){
+       this.initData();
+    },
+    methods:{
+        goPage(row){
+         this.$router.push({path:'/cms/productionorderlist/ProductCheck/detail',query:{order_no:row.order_no}});
+        },
+        changeSize(e){
+            this.pageSize = e;
+            this.pageIndex=1;
+            this.initData(this.searchData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.searchData);
+        },
+        initData(row){
+           this.axios.post('/api/artificial_count_list',{page_size:this.pageSize,page_index:this.pageIndex,...row}).then(res=>{
+                    this.tableData = res.data.data;
+                    this.total = res.data.total;
+           })
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.content_body_page{
+    text-align: center;
+    margin-top:15px;
+}
+.form_content{
+    margin-top: 15px;
+    display: flex;
+    flex-wrap: wrap;
+    .form_item{
+        width:200px
+    }
+}
+.content{
+   height:85%;
+   overflow: auto;
+}
+</style>

+ 2 - 2
vue.config.js

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