mushencc 3 yıl önce
ebeveyn
işleme
70dd8d261a

+ 9 - 3
src/components/confirm-delete/index.vue

@@ -1,9 +1,12 @@
 <template>
     <div class="confirm-d">
         <Modal class-name="vertical-center-modal" :title='title' v-model="show" :width="444">
-            <Form :label-width='80' class="confirm_form" v-if="formData">
-                <FormItem :label='item.title' v-for="(item,index) in formData" :key="index" style="display:flex;width:100%;justify-content: center;">
-                    <Input v-model="item.value"/>
+            <Form :label-width='100' class="confirm_form" v-if="formData">
+                <FormItem :label='item.title' v-for="(item,index) in formData" :key="index">
+                    <Select v-model="item.value" filterable clearable v-if="item.is_select" style="width:70%">
+                        <Option v-for="(_item,_index) in item.list" :key="_index" :label="_item"/>
+                    </Select>
+                    <Input v-model="item.value" style="width:70%" v-else/>
                 </FormItem>
             </Form>
             <div class='content-modal' v-else>{{content}}</div>
@@ -43,6 +46,9 @@ export default {
 .modal-footer{display: flex;justify-content:flex-end;}
 </style>
 <style lang="scss">
+.confirm_form{
+    
+}
 .content-modal{display: flex;justify-content: center;align-items: center;}
 .vertical-center-modal{display: flex;align-items: center;justify-content: center;
     .ivu-modal{top: 0;}

+ 47 - 0
src/routerMap/index.js

@@ -2040,6 +2040,26 @@ const routerMap = [
       require(["@/views/BidSystem/QuotaRequisitionDetail"], resolve),
   },
   {
+    path: "/cms/BidSystem/QuotaRequisition/detail",
+    name: "QuotaRequisitionDetailDetail", //业务报表-->定额领料单-->详情-->查看合计
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/QuotaRequisition/detail"], resolve),
+  },
+  {
+    path: "/cms/BidSystem/QuotaRequisition/confirm",
+    name: "QuotaRequisitionDetailConfirm", //业务报表-->定额领料单-->详情-->查看合计-->详情
+    meta: {
+      index: 3,
+      // keepAlive: true,
+    },
+    component: (resolve) =>
+      require(["@/views/BidSystem/QuotaRequisition/confirm"], resolve),
+  },
+  {
     path: "/cms/BidSystem/IncompleteStatisticsDetail",
     name: "IncompleteStatisticsDetail", //业务报表-->未完工统计表
     meta: {
@@ -2372,6 +2392,33 @@ const routerMap = [
     component: (resolve) =>
       require(["@/views/brand/list"], resolve),
   },
+  {
+    path: "/cms/stack/list",
+    name: "stackList", //垛码单
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/stack/list"], resolve),
+  },
+  {
+    path: "/cms/stack/detail",
+    name: "stackDetail", //垛码单-->详情
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/stack/detail"], resolve),
+  },
+  {
+    path: "/cms/stack/confirm",
+    name: "stackConfirm", //垛码单-->详情-->详情
+    meta: {
+      index: 3,
+    },
+    component: (resolve) =>
+      require(["@/views/stack/confirm"], resolve),
+  },
   // 测试用
   {
     path: "/cms/ordermannage/businessorderlist/editcopy",

+ 62 - 0
src/views/BidSystem/QuotaRequisition/confirm.vue

@@ -0,0 +1,62 @@
+<template>
+    <div>
+        <Toptitle title="详情">
+            <Button type="primary" style="margin-right:10px">导出</Button>
+            <Button type="primary" @click="$router.go(-1)">返回</Button> 
+        </Toptitle>
+        <Form :label-width='120' class="form_content">
+            <FormItem label='物料名称:' class="form_item">
+                <span></span>
+            </FormItem>
+            <FormItem label='原料尺寸:' class="form_item">
+                <span></span>
+            </FormItem>
+            <FormItem label='精裁面积:' class="form_item">
+                <span></span>
+            </FormItem>
+            <FormItem label='原料数量:' class="form_item">
+                <span></span> 
+            </FormItem>
+        </Form>
+        <Table :data='tableData' :columns='tableColumns' border max-height='550'></Table>
+        <Footer :pageSize='pageSize' :pageIndex='pageIndex' change changeSize :total='total'></Footer>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+          total:0,
+          pageSize:10,
+          pageIndex:1,
+          tableData:[],
+          tableColumns:[
+              {title:'原材料序号',align:'center',minWidth:100,key:''},
+          {title:'图号',align:'center',minWidth:100,key:'url_number'},
+          {title:'部件',align:'center',minWidth:100,key:''},
+          {title:'毛料尺寸',align:'center',minWidth:100,key:''},
+          {title:'精裁尺寸',align:'center',minWidth:100,key:'cut_area'}
+          ]
+        }
+    },
+    methods:{
+        change(e){
+            this.pageIndex = e;
+        },
+        changeSize(e){
+            this.pageSize=e;
+            this.pageIndex=1;
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 10px;
+    .form_item{
+        width: 25%;
+    }
+}
+</style>

+ 129 - 0
src/views/BidSystem/QuotaRequisition/detail.vue

@@ -0,0 +1,129 @@
+<template>
+    <div>
+        <Toptitle title="查看合计">
+            <Button type="primary" style="margin-right:10px">导出</Button>
+            <Button type="primary" @click="$router.go(-1)">返回</Button>
+        </Toptitle>
+        <div style="height:85%;overflow:auto">
+          <Form :label-width='100' class="modal_form">
+             <FormItem label='物料分类:'>
+                   <Input placeholder="请输入物料分类" v-model="searchData.type_title" size="small" class="modal_item" clearable/>
+             </FormItem>
+             <FormItem label='物料名称:'>
+                  <Input placeholder="请输入物料名称" v-model="searchData.material_title" size="small" class="modal_item" clearable/>
+             </FormItem>
+             <FormItem :label-width='50'>
+                 <Button type="primary" size='small' @click="checkTotal(searchData)">搜索</Button>
+             </FormItem>
+         </Form>
+         <Table :data='tableData' :columns='tableColumns' border max-height='550' show-summary :summary-method="handleSummary">
+             <template slot="set" slot-scope="{row}">
+                 <a @click="goPage(row)">详情</a>
+             </template>
+         </Table>
+         </div>
+         <div style="text-align:center;margin-top:20px">
+          <Page :page-size-opts="[10, 20, 30, 40,100]"
+                @on-page-size-change='changeSize'
+                @on-change='changePage'
+                :current='pageIndex'
+                show-total
+                :total="total"
+                show-sizer
+                :page-size='pageSize' />
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+             total:0,
+            pageSize:10,
+            pageIndex:1,
+            tableData:[],
+            tableColumns:[
+                {type:'index',title:'序号',align:'center',minWidth:80},
+                {title:'物料分类',key:'type_title',minWidth:100,align:'center'},
+                 {title:'物料名称',key:'material_title',minWidth:100,align:'center'},
+                 {title:'原材料尺寸',key:'measure',minWidth:100,align:'center'},
+                  {title:'计量单位',key:'unit',minWidth:100,align:'center'},
+                  {title:'精彩面积',key:'cut_area',minWidth:100,align:'center'},
+                  {title:'建议数量',key:'num',minWidth:100,align:'center'},
+                  {title:'排版数量',key:'num2',minWidth:100,align:'center'},
+            {title:'操作',key:'set',minWidth:100,align:'center',slot:'set'}
+            ],
+            searchData:{
+              type_title:'',
+              material_title:''
+            },
+        }
+    },
+    mounted(){
+    this.initData();
+    },
+    methods:{
+        goPage(row){
+       this.$router.push('/cms/BidSystem/QuotaRequisition/confirm')
+        },
+         handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    const key = column.key;
+                    if (index === 0) {
+                        sums[key] = {
+                            key,
+                            value: '总价'
+                        };
+                        return;
+                    }
+                    const values = data.map(item => Number(item[key]));
+                    if (key==='cut_area'||key==='num'||key==='num2') {
+                        const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return ((prev + curr)*100)/100;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v
+                        };
+                    } else {
+                        sums[key] = {
+                            key,
+                            value: ''
+                        };
+                    }
+                });
+
+                return sums;
+            },
+        checkTotal(row){
+          this.initData(row);
+        },
+        initData(data){
+            let obj = this.$route.query;
+            obj.url_number = [obj.url_number];
+            this.axios.post('/api/finance_quota_detail_material_total',{...data,...obj,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+                if(res.code == 200){
+                    this.tableData = res.data.data;
+                    this.total = res.data.total;
+                }
+                 
+            })  
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.modal_form{
+    display: flex;
+    flex-wrap: wrap;
+    .modal_item{
+        width: 200px;
+    }
+}
+</style>

+ 75 - 34
src/views/BidSystem/QuotaRequisitionDetail.vue

@@ -18,7 +18,7 @@
                     <Option v-for="(item,index) in product_list" :key="index" :value="item" :label="item"/>
                 </Select>
             </FormItem>
-            <FormItem label='派工时间'>
+            <FormItem label='码单导入时间' :label-width='120'>
                <DatePicker type="date" placeholder="年/月/日" style="width: 200px" v-model="searchData.start_time"></DatePicker>~
                 <DatePicker type="date" placeholder="年/月/日" style="width: 200px" v-model="searchData.end_time"></DatePicker>
             </FormItem>
@@ -31,7 +31,7 @@
             <Checkbox v-model="item.is_select" @on-change='itemSelect($event,item,index)'></Checkbox>
               <span>图号:{{item.url_number}}</span>
               <span>产品名称:{{item.product_title}}</span>
-              <span>派工时间:{{item.crt_time?func.replaceDateNoHMS(item.crt_time):''}}</span>
+              <span>码单导入时间:{{item.crt_time?func.replaceDateNoHMS(item.crt_time):''}}</span>
             </div>
             <div class="table_header_right">
               <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>
@@ -54,13 +54,13 @@
              <FormItem><Button type="primary" @click="initUnderData(underFormData)">搜索</Button></FormItem>
            </Form>
           </div>
-              <Table :columns="tableColumns" border :data="tableData" max-height="450">
+              <Table :columns="tableColumns" border :data="tableData" max-height="450" show-summary :summary-method="handleSummary">
               </Table>
         </div>
       </Card>
            
         </div>
-        <Modal title="详情" width='50' v-model="show_total">
+        <!-- <Modal title="详情" width='50' v-model="show_total">
          <Form :label-width='100' class="modal_form">
              <FormItem label='物料分类:'>
                    <Input placeholder="请输入物料分类" v-model="modalData.type_title" size="small" class="modal_item" clearable/>
@@ -88,7 +88,7 @@
         <div slot="footer" style="text-align:center">
             <Button type="primary" @click="modalBack" style="width:200px">返回</Button>
         </div>
-        </Modal>
+        </Modal> -->
         <Modal title="设置板材原料尺寸" v-model="show_wool" width='20' :closable='false' :mask-closable='false'>
             <Form :label-width='100' >
                 <FormItem label='高:'>
@@ -115,24 +115,24 @@ export default {
             },
             show_wool:false,
             proxyData:{},
-            total:0,
-            pageSize:10,
-            pageIndex:1,
-            modalTableData:[],
-            modalTableColumns:[
-                {type:'index',title:'序号',align:'center',minWidth:80},
-                {title:'物料分类',key:'type_title',minWidth:100,align:'center'},
-                 {title:'物料名称',key:'material_title',minWidth:100,align:'center'},
-                  {title:'计量单位',key:'unit',minWidth:100,align:'center'},
-                   {title:'数量',key:'num',minWidth:100,align:'center'},
-            ],
-            modalData:{
-              type_title:'',
-              material_title:''
-            },
+            // total:0,
+            // pageSize:10,
+            // pageIndex:1,
+            // modalTableData:[],
+            // modalTableColumns:[
+            //     {type:'index',title:'序号',align:'center',minWidth:80},
+            //     {title:'物料分类',key:'type_title',minWidth:100,align:'center'},
+            //      {title:'物料名称',key:'material_title',minWidth:100,align:'center'},
+            //       {title:'计量单位',key:'unit',minWidth:100,align:'center'},
+            //        {title:'数量',key:'num',minWidth:100,align:'center'},
+            // ],
+            // modalData:{
+            //   type_title:'',
+            //   material_title:''
+            // },
             show_total:false,
             tableColumns:[
-                {title:'序号',type:'index',align:'center',minWidth:60},
+                {title:'序号',type:'index',align:'center',minWidth:66},
                {title:'物料分类',align:'center',minWidth:100,key:'type_title'},
                  {title:'物料名称',align:'center',minWidth:150,key:'material_title'},
                 //    {title:'规格型号',align:'center',minWidth:150,key:'measure',render:(h,params)=>{
@@ -143,7 +143,8 @@ export default {
                 {title:'原料尺寸',align:'center',minWidth:150,key:'storage_size'},
                      {title:'计量单位',align:'center',minWidth:80,key:'unit'},
                      {title:'精裁面积',align:'center',minWidth:150,key:'cut_area'},
-                       {title:'数量',align:'center',minWidth:80,key:'num'},
+                       {title:'建议数量',align:'center',minWidth:80,key:'num'},
+                        {title:'排版数量',align:'center',minWidth:80,key:'num2'},
             ],
             tableData:[],
             selectData:[],
@@ -178,9 +179,48 @@ export default {
                })
     },
     mounted(){
+        this.handleWoolModal();
             this.initData();
     },
     methods:{
+        handleSummary ({ columns, data }) {
+                const sums = {};
+                columns.forEach((column, index) => {
+                    const key = column.key;
+                    if (index === 0) {
+                        sums[key] = {
+                            key,
+                            value: '总价'
+                        };
+                        return;
+                    }
+                    const values = data.map(item => Number(item[key]));
+                    
+                        //  if (!values.every(value => isNaN(value))) {
+                             if(key==='cut_area'||key==='num'||key==='num2'){
+                        const v = values.reduce((prev, curr) => {
+                            const value = Number(curr);
+                            if (!isNaN(value)) {
+                                return prev + curr;
+                            } else {
+                                return prev;
+                            }
+                        }, 0);
+                        sums[key] = {
+                            key,
+                            value: v
+                        };
+                    }else{
+                         sums[key] = {
+                             key,
+                             value:''
+                         }
+                    }
+                   
+                });
+
+                return sums;
+            },
         sureWoolSize(){
                this.show_wool = false;
                let obj = JSON.stringify(this.woolModalData);
@@ -198,11 +238,11 @@ export default {
             
            this.show_wool = true;
         },
-        modalBack(){
-              this.show_total = false;
-              this.modalData.type_title = '';
-              this.modalData.material_title = '';
-        },
+        // modalBack(){
+        //       this.show_total = false;
+        //       this.modalData.type_title = '';
+        //       this.modalData.material_title = '';
+        // },
         changePage(e){
              this.pageIndex = e;
         },
@@ -218,14 +258,15 @@ export default {
             this.selectData.forEach(v=>{
                 url_number.push(v.url_number);
             })
-            this.axios.post('/api/finance_quota_detail_material_total',{url_number,order_no:this.$route.query.order_no,...data,...this.woolModalData}).then(res=>{
-                if(res.code == 200){
-                    this.modalTableData = res.data.data;
-                    this.total = res.data.total;
-                    this.show_total = true;
-                }
+            this.$router.push({path:'/cms/BidSystem/QuotaRequisition/detail',query:{url_number,order_no:this.$route.query.order_no,...this.woolModalData}})
+            // this.axios.post('/api/finance_quota_detail_material_total',{url_number,order_no:this.$route.query.order_no,...data,...this.woolModalData}).then(res=>{
+            //     if(res.code == 200){
+            //         this.modalTableData = res.data.data;
+            //         this.total = res.data.total;
+            //         this.show_total = true;
+            //     }
                  
-            })
+            // })
            
         },
         itemSelect(e,item,index){

+ 82 - 2
src/views/BidSystem/TotalBoard/detail.vue

@@ -5,7 +5,7 @@
              <Button type="primary" style="margin-right: 10px" @click="checkTotal">查看合计</Button>
             <Button @click="AllSelect" style="margin-right: 10px" type="primary">{{state?'取消全选':'全选'}}</Button>
            <!-- <Button type="primary" ghost  @click='exportData()' style="margin-right: 10px">导出</Button> -->
-            
+            <Button style="margin-right:10px" type="primary" @click="checkSheetDrawing(null,2)">查看板材图形</Button>
             <Button type="primary" @click="$router.go(-1)">返回</Button>
         </Toptitle>
         <Form :label-width='80' style="display:flex;flex-wrap:wrap;margin-top:15px">
@@ -53,9 +53,13 @@
                  </Select>
              </FormItem>
              <FormItem><Button type="primary" @click="initUnderData(underFormData)">搜索</Button></FormItem>
+              <!-- <FormItem><Button type="primary" @click="checkSheetDrawing(1)">板材图形查看</Button></FormItem> -->
            </Form>
           </div>
               <Table :columns="tableColumns" border :data="tableData" max-height="450">
+                  <template slot="set" slot-scope="{row}">
+                      <a @click="checkSheetDrawing(row,1)">板材图形查看</a>
+                  </template>
               </Table>
         </div>
       </Card>
@@ -104,12 +108,26 @@
                 <Button type="primary" @click="sureWoolSize">确认</Button>
             </div>
         </Modal>
+        <Modal title="板材绘制" v-model="show_sheet" width='100' :mask-closable='false'>
+            <div class="sheetCanvas">
+                <div v-for="(item,index) in this.modalSheetData" :key="index" class='sheet_item' :style="{height:(item.measure[1]*1/item.measure[0]*1)*30+'vw',}">
+                <div v-for="(_item,_index) in item.list" :key="_index" class="sheet_part" :style="{
+                    left:(_item[1][0]*1/item.measure[0])*30+'vw',
+                    top:((item.measure[1]-_item[1][1])/item.measure[0])*30+'vw',
+                    width:(Math.abs(_item[3][0]-_item[0][0])/item.measure[0])*30+'vw',
+                    height:(Math.abs(_item[2][1]-_item[0][1])/item.measure[0]*30)+'vw'
+                    }"></div>
+                </div>
+            </div>
+        </Modal>
     </div>
 </template>
 <script>
 export default {
     data(){
         return{
+            modalSheetData:[],
+            // modalSheetMeasure:[],
              woolModalData:{
             high:'',
             wide:''
@@ -143,6 +161,7 @@ export default {
                 //    }},
                 {title:'原料尺寸',align:'center',minWidth:150,key:'measure'},
                        {title:'数量',align:'center',minWidth:80,key:'num'},
+                       {title:'操作',align:'center',minWidth:80,slot:'set'}
             ],
             tableData:[],
             selectData:[],
@@ -163,6 +182,7 @@ export default {
             product_list:[],
             url_number:'',
             state:false,
+            show_sheet:false
         }
     },
     created(){
@@ -180,6 +200,46 @@ export default {
             this.initData();
     },
     methods:{
+        checkSheetDrawing(row,type){
+       switch(type){
+           case 1:
+               this.modalSheetData =[];
+               row.detail.forEach(v=>{
+                   let obj = {};
+                   obj.list=v;
+                   obj.measure =row.measure.split('*');
+                   this.modalSheetData.push(obj)
+               })
+            //    this.modalSheetMeasure = row.measure.split('*');
+               this.show_sheet = true;
+               break;
+            case 2:
+                 if(this.selectData.length==0){
+                return this.$Message.warning('请先选择图号!')
+            }
+            let url_number = [];
+            this.selectData.forEach(v=>{
+                url_number.push(v.url_number);
+            })
+           this.axios.post('/api/finance_quota_detail_material_algorithm',{order_no:this.$route.query.order_no,
+	url_number,...this.woolModalData}).then(res=>{
+                  this.modalSheetData =[];
+                  res.data.forEach(v=>{
+                       v.detail.forEach(x=>{
+                   let obj = {};
+                   obj.list=x;
+                   obj.measure =v.measure.split('*');
+                   this.modalSheetData.push(obj)
+               })
+                  })
+              
+            //    this.modalSheetMeasure = row.measure.split('*');
+               this.show_sheet = true;
+    })
+                break;
+
+       }
+        },
          sureWoolSize(){
                this.show_wool = false;
                let obj = JSON.stringify(this.woolModalData);
@@ -295,7 +355,7 @@ export default {
             })
            if(item.showType){
                 document.getElementsByClassName('ico')[index].style.transform = 'rotate(90deg)';
-                this.url_number = item.url_number;
+                this.url_number = [item.url_number];
                   this.underFormData={
                 type_id:[],
                 material_title:[],
@@ -364,4 +424,24 @@ export default {
         width: 150px;
     }
 }
+.sheetCanvas{
+    width:100%;
+    max-height:70vh;
+    overflow: auto;
+    display: flex;
+    flex-wrap:wrap;
+    .sheet_item{
+        width: 30vw;
+        margin-right: 2vw;
+        margin-bottom: 2vw;
+        border: 1px solid black;
+        position:relative;
+        .sheet_part{
+            position: absolute;
+            border: 1px solid black;
+          
+        }
+    }
+      
+}
 </style>

+ 49 - 22
src/views/MaterialMannage/edit.vue

@@ -26,7 +26,7 @@
           placeholder="请输入物料名称"
         />
       </FormItem>
-      <FormItem label="物料简称" prop="title">
+      <FormItem label="物料简称">
         <Input
           :disabled="type == 3 ? true : false"
           v-model="info.abbreviation_title"
@@ -58,28 +58,28 @@
           ></Option>
         </Select>
       </FormItem>
-       <FormItem label="高" v-if="!isShowDetail" prop="long">
+       <FormItem label="高" v-if="!isShowDetail">
         <Input
           :disabled="type == 3 ? true : false"
           v-model="info.long"
-          placeholder="请输入度"
+          placeholder="请输入度"
         />
       </FormItem>
-       <FormItem label="宽" v-if="!isShowDetail" prop="width">
+       <FormItem label="宽" v-if="!isShowDetail">
         <Input
           :disabled="type == 3 ? true : false"
           v-model="info.width"
-          placeholder="请输入度"
+          placeholder="请输入度"
         />
       </FormItem>
-      <FormItem label="厚" v-show="isShowInfoHigh" prop="high">
+      <FormItem label="厚" v-show="isShowInfoHigh">
         <Input
           :disabled="type == 3 ? true : false"
           v-model="info.high"
           placeholder="请输入厚度"
         />
       </FormItem>
-      <FormItem label="单位" prop="unit">
+      <FormItem label="单位">
         <Input
           :disabled="type == 3 ? true : false"
           v-model="info.unit"
@@ -87,7 +87,7 @@
         />
       </FormItem> 
      
-      <FormItem label="损耗(%)" v-show="info.detail.length == 0" prop="scale">
+      <FormItem label="损耗(%)" v-show="info.detail.length == 0">
         <Input
           type="number"
           :disabled="type == 3 ? true : false"
@@ -186,15 +186,15 @@
       <div class="items" v-for="(rows, key) in info.detail" :key="key">
         <!-- id  1 木板   2 木皮   3 实木   4 辅料   5 五金   6 油漆  -->
         <Form ref="item_detail" inline :model="rows" :rules="itemRules">
-             <FormItem label="物料编码" v-show="isShowDetailLong" prop='code'>
+             <!-- <FormItem label="物料编码" v-show="isShowDetailLong" prop='code'>
             <Input
               :disabled="type == 3 ? true : false"
               v-model="rows.code"
               @on-change='changeSate(rows,key)'
               placeholder="请输入物料编码"
             />
-          </FormItem>
-          <FormItem label="高" prop="long" v-show="isShowDetailLong">
+          </FormItem> -->
+          <FormItem label="高" v-show="isShowDetailLong">
             <Input
               :disabled="type == 3 ? true : false"
               v-model="rows.long"
@@ -202,7 +202,7 @@
               placeholder="请输入高度"
             />
           </FormItem>
-          <FormItem label="宽" prop="width" v-show="isShowDetailWidth">
+          <FormItem label="宽" v-show="isShowDetailWidth">
             <Input
               :disabled="type == 3 ? true : false"
               v-model="rows.width"
@@ -309,7 +309,11 @@
       </div>
       <div slot="footer"></div>
     </Modal>
-    <Modal title="添加品牌" width='50' v-model="showBrand" @on-ok='sureBrand'>
+    <Modal title="添加品牌" width='50' v-model="showBrand">
+      <div slot="footer">
+         <Button @click="showBrand=false">取消</Button>
+         <Button type="primary" @click="sureBrand">确定</Button>
+      </div>
       <div class="brand_content">
           <div style="height:100%;overflow:auto">
           <!-- <Form class="table_content" :label-width='100'>
@@ -391,8 +395,8 @@ export default {
       itemRules: {
         // price: [{ required: true, message: " " }],
         code:[{ required: true, message: " ", trigger: "blur" }],
-        long: [{ required: true, message: " ", trigger: "blur" }],
-        width: [{ required: true, message: " ", trigger: "blur" }],
+        // long: [{ required: true, message: " ", trigger: "blur" }],
+        // width: [{ required: true, message: " ", trigger: "blur" }],
         stock: [{ required: true, message: " " }],
         scale: [{ required: true, message: " " }],
         warning_number: [{ required: true, message: " " }],
@@ -400,10 +404,10 @@ export default {
       rules: {
         title: [{ required: true, message: " ", trigger: "blur" }],
         m_id: [{ required: true, message: " " }],
-        high: [{ required: true, message: " ", trigger: "blur" }],
-        long:[{ required: true, message: " ", trigger: "blur" }],
-        width:[{ required: true, message: " ", trigger: "blur" }],
-        unit: [{ required: true, message: " ", trigger: "blur" }],
+        // high: [{ required: true, message: " ", trigger: "blur" }],
+        // long:[{ required: true, message: " ", trigger: "blur" }],
+        // width:[{ required: true, message: " ", trigger: "blur" }],
+        // unit: [{ required: true, message: " ", trigger: "blur" }],
       },
       basic_type_id: "",
       isShowInfoMinStock: false,
@@ -522,14 +526,16 @@ export default {
           
     },
     sureBrand(){
-      console.log(this.info.detail)
-      console.log(this.modelIndex)
+      console.log(this.modelTableData);
+     if(this.modelTableData.length!=0&&this.modelTableData.find(v=>(v.code===''))){
+      return this.$Message.warning('物料编码必须填写!')
+     }
          if(!this.isShowDetail){
            this.info.detail[0].list = this.modelTableData;
          }else{
               this.info.detail[this.modelIndex].list = this.modelTableData;
          }
-
+           this.showBrand = false;
         this.modelTableData = [];
     },
     ModelDel(index){
@@ -624,9 +630,21 @@ handleBrand(obj,key){
        if(this.isShowDetail){ //isShowDetail判断下面有没有详情的物料名称,true是有false没有,如果没有就把上面的信息放到upd_list中
        this.info.detail.forEach(v => {
          if(v.is_add){
+           if(!v.long){
+             v.long=0;
+           }
+           if(!v.width){
+             v.width=0
+           }
            add_list.push(v);
          }
          if(v.is_edit){
+            if(!v.long){
+             v.long=0;
+           }
+           if(!v.width){
+             v.width=0
+           }
            upd_list.push(v)
          }
        }); 
@@ -636,6 +654,15 @@ handleBrand(obj,key){
          let obj = JSON.parse(JSON.stringify(this.info));
          obj.id = obj.detail[0].id;
         delete obj.del_list;
+         if(!obj.long){
+             obj.long=0;
+           }
+           if(!obj.width){
+             obj.width=0
+           }
+           if(!obj.high){
+             obj.high=0
+           }
         // delete obj.detail;
     this.info.upd_list = [obj];
           // this.info.upd_list = this.info;

+ 156 - 0
src/views/PackagingStatistics/confirm.vue

@@ -0,0 +1,156 @@
+<template>
+    <div>
+        <Toptitle title="包装日期详情">
+            <Button type="primary" style="margin-right:10px">导出</Button>
+            <Button @click="$router.go(-1)" type="primary">返回</Button>
+        </Toptitle>
+       <Form :label-width='100' class="form_content">
+           <FormItem label='时间:'>
+               <DatePicker type='date' v-model="searchData.start_time" class="form_item"></DatePicker>~
+               <DatePicker type='date' v-model="searchData.end_time" class="form_item"></DatePicker>
+           </FormItem>
+            <FormItem label='包装班组:'>
+              <Select v-model="searchData.employee" filterable clearable class="form_item">
+                  <Option :value="1" :label="1"/>
+              </Select>
+           </FormItem>
+            <FormItem label='项目名称:'>
+                  <Select v-model="searchData.project_title" filterable multiple :max-tag-count='1' class="form_item">
+                      <Option :value="1" :label='1'/>
+                  </Select>
+           </FormItem>
+            <FormItem :label-width='40'>
+             <Button style="primary" type="primary">搜索</Button>
+           </FormItem>
+       </Form>
+       <Table :data='tableData' :columns='setTableColumns' border max-height='550' :span-method="handleSpan">
+       </Table>
+    </div>
+</template>
+<script>
+export default {
+          data(){
+              return{
+                  tableSlice:[],
+                  tableData:[
+                      {time:'123',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400",j:'2000',total_price:'5000'}
+                  ],
+                  tableColumns:[
+                      {title:'时间',key:'time',align:'center',minWidth:100}
+                  ],
+                  otherColumns:[],
+                   searchData:{
+                       start_time:'',
+                       end_time:'',
+                       project_title:'',
+                       employee:''
+                   }
+              }
+          },
+          computed:{
+            setTableColumns(){
+                let arr;
+                 arr = [
+                     ...this.tableColumns,...this.otherColumns,
+                     {title:'合计',align:'center',key:"total_price",minWidth:100}
+                 ] 
+                return arr     
+                }
+          },
+          mounted(){
+                 this.initData();   
+          },
+
+          methods:{
+              handleSpan({ row, column, rowIndex, columnIndex }){
+                   if (rowIndex ===this.tableData.length-2 && (columnIndex === 0||columnIndex===this.tableSlice[this.tableSlice.length-1]+1)) {
+                    return {
+                        rowspan: 2,
+                        colspan: 1
+                    };
+                } else if (rowIndex === this.tableData.length-1 && (columnIndex === 0||columnIndex===this.tableSlice[this.tableSlice.length-1]+1)) {
+                    return {
+                        rowspan: 0,
+                        colspan: 0
+                    };
+                }
+                if(rowIndex===this.tableData.length-1){
+                    return this.totalColumns(rowIndex,columnIndex)
+                }
+                
+              },
+              totalColumns(rowIndex,columnIndex){
+                  let arr = [];
+                  if(0<columnIndex<=this.tableSlice[this.tableSlice.length-1]){
+                       arr = [0,0];
+                  this.tableSlice.forEach((v,index)=>{
+                     
+                    // if(index!=this.tableSlice.length-1){
+                       
+                     
+                      if(index==0){
+                           if(columnIndex===v+1){
+                             arr = [v+1,v]
+                            
+                          }
+                      }else{
+                         if(index!=this.tableSlice.length-1&&columnIndex===v+1){
+                             arr = [v+1,this.tableSlice[index+1]-v];
+                         }
+                      }
+                  })
+                  }
+                 if(columnIndex===1){
+                              arr = [1,this.tableSlice[0]] }
+                return arr;
+              },
+               initData(){
+                   setTimeout(() => {
+                       let data=[
+                           {title:'包装一组',children:[{title:'项目A',key:'A'},{title:'项目B',key:'B'},{title:'项目C',key:'C'}],total_price:'1750'},
+                           {title:'包装二组',children:[{title:'项目D',key:'D'},{title:'项目E',key:'E'},{title:'项目F',key:'F'}],total_price:'1800'},
+                           {title:'包装三组',children:[{title:'项目G',key:'G'},{title:'项目H',key:'H'},{title:'项目I',key:'I'},{title:'项目j',key:'j'}],total_price:'1900'},
+                       ];
+                       let totalData = {time:'合计',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400",j:'2000',total_price:'5000'};
+                       let totalSure = {};
+                       let sum = 0;
+                       data.forEach(v=>{
+                           totalSure[v.children[0].key] = v.total_price;
+                           sum+=v.children.length;
+                           this.tableSlice.push(sum)
+                           let obj = {};
+                           obj.title = v.title;
+                           obj.align = 'center';
+                           v.children.forEach(val=>{
+                               val.align='center';
+                               val.minWidth=100;
+                               val.render=(h,params)=>{
+                                   const {row} = params;
+                                   return !row.time?h('span',{},row[val.key]):h('a',{on:{
+                                    'click':()=>{
+                                        this.$router.push({path:'/cms/PackagingStatistics/urlNumberDetail',query:{...row}})
+                                    }
+                                   }},row[val.key])
+                               }
+                           });
+                           obj.children = v.children
+                              this.otherColumns.push(obj);
+                       })   
+                      
+                          this.tableData.push(totalData);
+                     this.tableData.push(totalSure);
+                   });
+               }
+          }    
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 20px;
+    .form_item{
+        width: 200px;
+    }
+}
+</style>

+ 163 - 0
src/views/PackagingStatistics/detail.vue

@@ -0,0 +1,163 @@
+<template>
+    <div>
+        <Toptitle title="包装月份详情">
+            <Button type="primary" style="margin-right:10px">导出</Button>
+            <Button @click="$router.go(-1)" type="primary">返回</Button>
+        </Toptitle>
+       <Form :label-width='100' class="form_content">
+           <FormItem label='时间:'>
+               <DatePicker type='date' v-model="searchData.start_time" class="form_item"></DatePicker>~
+               <DatePicker type='date' v-model="searchData.end_time" class="form_item"></DatePicker>
+           </FormItem>
+            <FormItem label='包装班组:'>
+              <Select v-model="searchData.employee" filterable clearable class="form_item">
+                  <Option :value="1" :label="1"/>
+              </Select>
+           </FormItem>
+            <FormItem label='项目名称:'>
+                  <Select v-model="searchData.project_title" filterable multiple :max-tag-count='1' class="form_item">
+                      <Option :value="1" :label='1'/>
+                  </Select>
+           </FormItem>
+            <FormItem :label-width='40'>
+             <Button style="primary" type="primary">搜索</Button>
+           </FormItem>
+       </Form>
+       <Table :data='tableData' :columns='setTableColumns' border max-height='550' :span-method="handleSpan">
+  <template slot="set" slot-scope="{row}">
+      <a @click="goPage(row)" v-show="row.time!=='合计'">详情</a>
+  </template>
+       </Table>
+    </div>
+</template>
+<script>
+export default {
+          data(){
+              return{
+                  tableSlice:[],
+                  tableData:[
+                      {time:'123',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400",j:'2000',total_price:'5000'}
+                  ],
+                  tableColumns:[
+                      {title:'时间',key:'time',align:'center',minWidth:100}
+                  ],
+                  otherColumns:[],
+                   searchData:{
+                       start_time:'',
+                       end_time:'',
+                       project_title:'',
+                       employee:''
+                   }
+              }
+          },
+          computed:{
+            setTableColumns(){
+                let arr;
+                 arr = [
+                     ...this.tableColumns,...this.otherColumns,
+                     {title:'合计',align:'center',key:"total_price",minWidth:100},
+                     {title:'操作',align:'center',key:'set',slot:'set',minWidth:100}
+                 ] 
+                return arr     
+                }
+          },
+          mounted(){
+                 this.initData();   
+          },
+
+          methods:{
+              goPage(row){
+           this.$router.push({path:'/cms/PackagingStatistics/confirm',query:{...row}})
+              }, 
+              handleSpan({ row, column, rowIndex, columnIndex }){
+                   if (rowIndex ===this.tableData.length-2 && (columnIndex === 0||columnIndex===this.tableSlice[this.tableSlice.length-1]+1||columnIndex===this.tableSlice[this.tableSlice.length-1]+2)) {
+                    return {
+                        rowspan: 2,
+                        colspan: 1
+                    };
+                } else if (rowIndex === this.tableData.length-1 && (columnIndex === 0||columnIndex===this.tableSlice[this.tableSlice.length-1]+1||columnIndex===this.tableSlice[this.tableSlice.length-1]+2)) {
+                    return {
+                        rowspan: 0,
+                        colspan: 0
+                    };
+                }
+                if(rowIndex===this.tableData.length-1){
+                    return this.totalColumns(rowIndex,columnIndex)
+                }
+                
+              },
+              totalColumns(rowIndex,columnIndex){
+                  let arr = [];
+                  if(0<columnIndex<=this.tableSlice[this.tableSlice.length-1]){
+                       arr = [0,0];
+                  this.tableSlice.forEach((v,index)=>{
+                     
+                    // if(index!=this.tableSlice.length-1){
+                       
+                     
+                      if(index==0){
+                           if(columnIndex===v+1){
+                             arr = [v+1,v]
+                            
+                          }
+                      }else{
+                         if(index!=this.tableSlice.length-1&&columnIndex===v+1){
+                             arr = [v+1,this.tableSlice[index+1]-v];
+                         }
+                      }
+                  })
+                  }
+                 if(columnIndex===1){
+                              arr = [1,this.tableSlice[0]] }
+                return arr;
+              },
+               initData(){
+                   setTimeout(() => {
+                       let data=[
+                           {title:'包装一组',children:[{title:'项目A',key:'A'},{title:'项目B',key:'B'},{title:'项目C',key:'C'}],total_price:'1750'},
+                           {title:'包装二组',children:[{title:'项目D',key:'D'},{title:'项目E',key:'E'},{title:'项目F',key:'F'}],total_price:'1800'},
+                           {title:'包装三组',children:[{title:'项目G',key:'G'},{title:'项目H',key:'H'},{title:'项目I',key:'I'},{title:'项目j',key:'j'}],total_price:'1900'},
+                       ];
+                       let totalData = {time:'合计',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400",j:'2000',total_price:'5000'};
+                       let totalSure = {};
+                       let sum = 0;
+                       data.forEach(v=>{
+                           totalSure[v.children[0].key] = v.total_price;
+                           sum+=v.children.length;
+                           this.tableSlice.push(sum)
+                           let obj = {};
+                           obj.title = v.title;
+                           obj.align = 'center';
+                           v.children.forEach(val=>{
+                               val.align='center';
+                               val.minWidth=100;
+                               val.render=(h,params)=>{
+                                   const {row} = params;
+                                   return !row.time?h('span',{},row[val.key]):h('a',{on:{
+                                    'click':()=>{
+                                        this.$router.push({path:'/cms/PackagingStatistics/urlNumberDetail',query:{...row}})
+                                    }
+                                   }},row[val.key])
+                               }
+                           });
+                           obj.children = v.children
+                              this.otherColumns.push(obj);
+                       })   
+                      
+                          this.tableData.push(totalData);
+                     this.tableData.push(totalSure);
+                   });
+               }
+          }    
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 20px;
+    .form_item{
+        width: 200px;
+    }
+}
+</style>

+ 37 - 18
src/views/PackagingStatistics/list.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <Toptitle title="包装统计表">
-            <Button type="primary">导出</Button>
+            <Button type="primary" style="margin-right:10px">导出</Button>
         </Toptitle>
        <Form :label-width='100' class="form_content">
            <FormItem label='时间:'>
@@ -23,7 +23,9 @@
            </FormItem>
        </Form>
        <Table :data='tableData' :columns='setTableColumns' border max-height='550' :span-method="handleSpan">
-
+  <template slot="set" slot-scope="{row}">
+      <a @click="goPage(row)" v-show="row.time!=='合计'">详情</a>
+  </template>
        </Table>
     </div>
 </template>
@@ -33,7 +35,7 @@ export default {
               return{
                   tableSlice:[],
                   tableData:[
-                      {time:'123',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400"}
+                      {time:'123',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400",j:'2000',total_price:'5000'}
                   ],
                   tableColumns:[
                       {title:'时间',key:'time',align:'center',minWidth:100}
@@ -51,7 +53,9 @@ export default {
             setTableColumns(){
                 let arr;
                  arr = [
-                     ...this.tableColumns,...this.otherColumns
+                     ...this.tableColumns,...this.otherColumns,
+                     {title:'合计',align:'center',key:"total_price",minWidth:100},
+                     {title:'操作',align:'center',key:'set',slot:'set',minWidth:100}
                  ] 
                 return arr     
                 }
@@ -61,13 +65,16 @@ export default {
           },
 
           methods:{
+              goPage(row){
+           this.$router.push({path:'/cms/PackagingStatistics/detail',query:{...row}})
+              }, 
               handleSpan({ row, column, rowIndex, columnIndex }){
-                   if (rowIndex ===this.tableData.length-2 && columnIndex === 0) {
+                   if (rowIndex ===this.tableData.length-2 && (columnIndex === 0||columnIndex===this.tableSlice[this.tableSlice.length-1]+1||columnIndex===this.tableSlice[this.tableSlice.length-1]+2)) {
                     return {
                         rowspan: 2,
                         colspan: 1
                     };
-                } else if (rowIndex === this.tableData.length-1 && columnIndex === 0) {
+                } else if (rowIndex === this.tableData.length-1 && (columnIndex === 0||columnIndex===this.tableSlice[this.tableSlice.length-1]+1||columnIndex===this.tableSlice[this.tableSlice.length-1]+2)) {
                     return {
                         rowspan: 0,
                         colspan: 0
@@ -84,19 +91,23 @@ export default {
                        arr = [0,0];
                   this.tableSlice.forEach((v,index)=>{
                      
-                    if(index!=this.tableSlice.length-1){
-                         if(columnIndex===1){
-                              arr = [1,this.tableSlice[0]]
-                      }
-                      if(columnIndex===v+1){
-                          console.log(v)
-                             arr = [v+1,3]
+                    // if(index!=this.tableSlice.length-1){
+                       
+                     
+                      if(index==0){
+                           if(columnIndex===v+1){
+                             arr = [v+1,v]
                             
                           }
-                  }
+                      }else{
+                         if(index!=this.tableSlice.length-1&&columnIndex===v+1){
+                             arr = [v+1,this.tableSlice[index+1]-v];
+                         }
+                      }
                   })
                   }
-               
+                 if(columnIndex===1){
+                              arr = [1,this.tableSlice[0]] }
                 return arr;
               },
                initData(){
@@ -104,9 +115,9 @@ export default {
                        let data=[
                            {title:'包装一组',children:[{title:'项目A',key:'A'},{title:'项目B',key:'B'},{title:'项目C',key:'C'}],total_price:'1750'},
                            {title:'包装二组',children:[{title:'项目D',key:'D'},{title:'项目E',key:'E'},{title:'项目F',key:'F'}],total_price:'1800'},
-                           {title:'包装三组',children:[{title:'项目G',key:'G'},{title:'项目H',key:'H'},{title:'项目I',key:'I'}],total_price:'1900'},
+                           {title:'包装三组',children:[{title:'项目G',key:'G'},{title:'项目H',key:'H'},{title:'项目I',key:'I'},{title:'项目j',key:'j'}],total_price:'1900'},
                        ];
-                       let totalData = {time:'合计',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400"};
+                       let totalData = {time:'合计',A:"600",B:'700',C:'800',D:'900',E:'1000',F:'1100',G:"1200",H:'1300',I:"1400",j:'2000',total_price:'5000'};
                        let totalSure = {};
                        let sum = 0;
                        data.forEach(v=>{
@@ -119,7 +130,15 @@ export default {
                            v.children.forEach(val=>{
                                val.align='center';
                                val.minWidth=100;
-                           })
+                               val.render=(h,params)=>{
+                                   const {row} = params;
+                                   return !row.time?h('span',{},row[val.key]):h('a',{on:{
+                                    'click':()=>{
+                                        this.$router.push({path:'/cms/PackagingStatistics/urlNumberDetail',query:{...row}})
+                                    }
+                                   }},row[val.key])
+                               }
+                           });
                            obj.children = v.children
                               this.otherColumns.push(obj);
                        })   

+ 70 - 0
src/views/PackagingStatistics/urlNumberDetail.vue

@@ -0,0 +1,70 @@
+<template>
+    <div>
+       <Toptitle title="图号详情">
+           <Button type="primary" style="margin-right:10px">导出</Button>
+           <Button type="primary" @click="$router.go(-1)">返回</Button>
+       </Toptitle>
+       <Form class="form_content">
+           <FormItem label='时间:' style='width:25%'>
+               <span></span>
+           </FormItem>
+           <FormItem label='包装班组:' style='width:25%'>
+               <span></span>
+           </FormItem>
+           <FormItem label='项目名称:' style='width:25%'>
+               <span></span>
+           </FormItem>
+           <FormItem label='合计(包):' style='width:25%'>
+               <span></span>
+           </FormItem>
+           <FormItem label='图号:' style="width:100%">
+               <Select class="form_item">
+                   <Option/>
+               </Select>
+               <Button type="primary">搜索</Button>
+           </FormItem>
+           <FormItem :label-width='40'>
+               
+           </FormItem>
+       </Form>
+       <Table :data='tableData' :columns='tableColumns' border max-height='550'>
+
+       </Table>
+       <Footer :total='total' change changeSize :pageIndex='pageIndex' :pageSize='pageSize'></Footer>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            total:0,
+            pageIndex:1,
+            pageSize:10,
+            tableData:[],
+            tableColumns:[
+                {title:"图号",align:'center',minWidth:200,key:'url_number'},
+                {title:'包数',align:'center',minWidth:200,key:'num'}
+            ]
+        }
+    },
+    methods:{
+        change(e){
+           this.pageIndex = e;
+        },
+        changeSize(e){
+                  this.pageSize = e;
+                  this.pageIndex=1;
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    .form_item{
+        width: 200px;
+        margin-right: 1rem;
+    }
+}
+</style>

+ 73 - 3
src/views/ProductionOrderList/InboundForm/details.vue

@@ -25,6 +25,13 @@
         >
          <Button
           v-if="$route.query.type == 4"
+          @click="totalChangeStack"
+          type="primary"
+          style="margin-right:10px;"
+        >批量修改垛码</Button
+        >
+         <Button
+          v-if="$route.query.type == 4"
           @click="measureChange"
           type="primary"
           style="margin-right:10px;"
@@ -192,6 +199,15 @@
         </Form>
         </div>
     </Modal>
+    <Modal title='批量修改垛码' :closable='false' :mask-closable='false' v-model="show_stack">
+      <div style="text-align:center">
+        <label>垛码:</label><Input v-model="stackNUM" style='width:50%'/>
+      </div>
+      <div slot="footer" style="text-align:center">
+        <Button @click="cancelStack">取消</Button>
+        <Button type="primary" @click="stackSure">确认</Button> 
+      </div>
+    </Modal>
   </div>
 </template>
 
@@ -200,6 +216,8 @@ import { mapActions } from "vuex";
 export default {
   data() {
     return {
+      show_stack:false,
+      stackNUM:'',
       MeasureData:{
         // high:'',
         long:'',
@@ -320,7 +338,13 @@ export default {
           placeholder: "高度",
           value: "",
         },
-        
+         {
+          title: "垛码",
+          name: "Input",
+          serverName: "buttress_no",
+          placeholder: "请输入垛码",
+          value: "",
+        },
         {
           title: "包装完成状态",
           name: "Select",
@@ -354,7 +378,17 @@ export default {
           end_placeholder:'年/月/日',
           start_server:'st_time',
           end_server:'ed_time',
-        }
+        },
+        {
+          title: "包装班组",
+          name: "Select",
+          multiple: true,
+          filterable: true,
+          serverName: "employee",
+          placeholder: "请选择",
+          value: "",
+          option: [{ label: 1, value: 1 }],
+        },
       ],
       logList: [],
       tableColums: [
@@ -407,6 +441,7 @@ export default {
               minWidth: 200,
               key: "transport_no",
             },
+             { title: "垛码", align: "center", minWidth: 100, key: "buttress_no" },
         { title: "单位", align: "center", minWidth: 100, key: "unit" },
         {title:'完工班组',align:'center',minWidth:120,key:'employee'},
         {
@@ -461,6 +496,7 @@ export default {
               return h('span',{},this.func.replaceDateNoHMS(row.inb_time))
             }
           },
+           { title: "包装班组", align: "center", minWidth: 100, key: "employee" },
         {
           title: "操作",
           align: "center",
@@ -469,6 +505,10 @@ export default {
           slot: "set",
         },
       ],
+      modalData:[
+        {title:"选择班组:",value:'',list:[],is_select:true},
+         {title:"垛码:",value:'',is_select:false},
+      ],
       tableData: [],
       pageIndex: 1,
       showInbound:false,
@@ -542,6 +582,34 @@ export default {
   },
 
   methods: {
+    stackSure(){
+      let tags = [];
+         this.selectedReturnArr.forEach(v=>{
+         tags.push(v.chip)
+         })
+         this.axios.post('/api/api/change_buttress_no',{tags,order_no:this.$route.query.order_no,buttress_no:this.stackNUM}).then(res=>{
+           this.show_stack = false;
+           this.getData(this.proxyObj);
+           this.stackNUM = '';
+         })
+           
+           
+    },
+    cancelStack(){
+     this.stackNUM = '';
+     this.show_stack = false;
+    },
+    totalChangeStack(){
+      if(this.selectedReturnArr.length==0){
+        return this.$Message.warning('请先选择数据!')
+      }
+      if(this.selectedReturnArr.every(v=>(v.in_out_value == 0 && v.order_in_no))){
+        this.show_stack = true;
+      }else{
+        return this.$Message.warning('必须选择包装已完成但未发货的数据!')
+      }
+      
+    },
     sureMeasure(){
       let obj={
         long:this.MeasureData.long,
@@ -678,6 +746,7 @@ export default {
         this.list[4].option = res.data.product_title;
         this.list[5].option = res.data.url_number;
         this.list[6].option = res.data.part_title;
+        this.list[14].option = [];
         // this.list[7].option = arr;
         console.log(this.list[7]);
       });
@@ -698,7 +767,7 @@ export default {
     },
     changeSize(e) {
       this.pageSize = e;
-      
+      this.pageIndex=1;
       this.getData(this.proxyObj);
     },
     back() {
@@ -760,6 +829,7 @@ export default {
         title: "包装完成",
         content: "是否确认包装完成",
         type: "primary",
+        formData:this.modalData,
         then: () => {
           this.axios
             .post("/api/orders_in", { orders_procedure_id: params })

+ 12 - 8
src/views/ProductionOrderList/ProductionsOrder/BST_Decorationlist.vue

@@ -391,7 +391,7 @@
     >
       <Input type="textarea" v-model="test_content" :rows="40" />
     </Modal>
-    <Modal v-model="show_plan" title='批量下排产' :mask-closable="false" @on-ok='finishDataTrue'>
+    <Modal v-model="show_plan" :title="unPrId?'一键下排产':'批量下排产'" :mask-closable="false" @on-ok='finishDataTrue'>
       <Form  :label-width='150'>
         <FormItem v-for="item in basics_procedure_list" :key="item.id" :label='`要求${item.title}完成的时间:`' style="margin-left:60px" >
           <DatePicker type="daterange" placeholder="请选择" style="width: 200px" v-model='item.time' transfer :options='options' @on-open-change='timeFocus($event,item)'></DatePicker>
@@ -412,7 +412,7 @@ export default {
   },
   data() {
     return {
-      unPrId:[],
+      unPrId:false,
       options:{},
       finishData:[],
       basics_procedure_list:[],
@@ -1023,7 +1023,6 @@ export default {
       }
     },
     finishDataTrue(){
-      console.log(this.planInfo.pr_id);
       let arr = [];
       this.basics_procedure_list.forEach(m=>{
        let obj = {};
@@ -1032,13 +1031,21 @@ export default {
       obj.end_time =Date.parse(m.time[1]).toString().slice(0,10)||'';
       arr.push(obj);
       })
-      console.log(arr);
+        if(this.unPrId){
+          this.axios.post('/api/batch_orders_plan',{...this.proxyObj,time_list:{...arr}}).then(res=>{
+              if(res.code==200){
+             this.$Message.success(res.msg);
+             this.getData(this.proxyObj);
+           }
+          })
+        }else{
         this.axios.post('/api/orders_plan',{pr_id:this.planInfo.pr_id,time_list:{...arr}}).then(res=>{
            if(res.code==200){
              this.$Message.success(res.msg);
              this.getData(this.proxyObj);
            }
         })
+        }
     },
     totalClick(e){
 switch(e){
@@ -1136,9 +1143,6 @@ switch(e){
           this.list[3].option = res.data.number_detail;
           this.list[4].option = res.data.part;
           this.list[9].option = res.data.img_number;
-          this.axios.post('/api/batch_orders_plan',{...row}).then(res=>{
-            this.unPrId = res.data;
-          })
         }
       );
     },
@@ -1251,7 +1255,7 @@ switch(e){
         
         if(type){
 //一键下生产
-  this.planInfo.pr_id = this.unPrId; 
+  this.unPrId=true; 
         }else{
  //单个下生产
  this.planInfo.pr_id = [row.pr_id];

+ 98 - 0
src/views/stack/confirm.vue

@@ -0,0 +1,98 @@
+<template>
+    <div>
+        <Toptitle title="详情">
+            <Button @click="$router.go(-1)">返回</Button>
+        </Toptitle>
+        <Form :label-width='100' class="form_content">
+            <FormItem label='楼幢:'>
+                <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='单元:'>
+               <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='楼层:'>
+               <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='房号:'>
+                <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='产品:'>
+               <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='图号:'>
+               <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='组合名称:'>
+               <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='部件:'>
+                <Select class="form_item" filterable clearable></Select>
+            </FormItem>
+            <FormItem label='精裁尺寸:'>
+               <div style="display:flex">
+                   <span style='display:flex;margin-right:20px'><label>长:</label><Input style="width:110px" clearable placeholder="请输入长"/></span>
+                   <span style='display:flex;margin-right:20px'><label>宽:</label><Input style="width:110px" clearable placeholder="请输入宽"/></span>
+                   <span style='display:flex'><label>高:</label><Input style="width:110px" clearable placeholder="请输入高"/></span>
+               </div>
+            </FormItem>
+            <FormItem label='包装时间:'>
+                <DatePicker type='date' placeholder='年/月/日' class="form_item"></DatePicker> ~ <DatePicker type='date' placeholder='年/月/日' class="form_item"></DatePicker>
+            </FormItem>
+            <FormItem>
+                <Button type="primary">搜索</Button>
+            </FormItem>
+        </Form>
+        <Table :data='tableData' :columns='tableColumns' border max-height='550'></Table>
+        <Footer change changeSize :pageSize='pageSize' :pageIndex='pageIndex' :total='total'></Footer>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            pageIndex:1,
+            pageSize:10,
+            total:0,
+            proxyData:{},
+            tableData:[],
+            tableColumns:[
+                {type:'selection',minWidth:80,align:'center'},
+                {title:'房间号',align:'center',key:'',minWidth:120},
+                {title:'产品名称',align:'center',key:'',minWidth:120},
+                {title:'图号',align:'center',key:'',minWidth:120},
+                {title:'组合名称',align:'center',key:'',minWidth:120},
+                {title:'部件',align:'center',key:'',minWidth:120},
+                {title:'零部件',align:'center',key:'',minWidth:120},
+                {title:'精裁尺寸',align:'center',key:'',minWidth:120},
+                {title:'包装码',align:'center',key:'',minWidth:120},
+                {title:'单位',align:'center',key:'',minWidth:120},
+                {title:'包装时间',align:'center',key:'',minWidth:120}
+            ]
+        }
+    },
+    methods:{
+        initData(){
+
+        },
+        change(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        },
+        changeSize(e){
+            this.pageSize=e;
+            this.pageIndex=1;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    margin-top: 10px;
+    display: flex;
+    flex-wrap: wrap;
+    .form_item{
+        width: 200px;
+    }
+}
+</style>

+ 130 - 0
src/views/stack/detail.vue

@@ -0,0 +1,130 @@
+<template>
+    <div>
+        <Toptitle title="垛码单详情">
+        <Button type="primary" style="margin-right:10px" @click="handleOut">发货指令</Button>
+        <Button @click="$router.go(-1)">返回</Button>
+        </Toptitle> 
+        <Form :label-width='140' class="form_content">
+            <FormItem label='垛码:' :label-width='80'>
+                <Input clearable v-model="searchData.stack"></Input>
+            </FormItem>
+            <FormItem label='发货指令状态:'>
+                <Select v-model="searchData.state" filterable clearable>
+                    <Option :value="0" label="未下指令"/>
+                    <Option :value="1" label='已下指令'/>
+                </Select>
+            </FormItem>
+            <FormItem :label-width='40'>
+                <Button type="primary">搜索</Button>
+            </FormItem>
+        </Form>
+        <Table :data='tableData' :columns='tableColumns' border max-height='550' @on-selection-change='handleSelect'>
+            <template slot="set" slot-scope="{row}">
+                <a style="margin-right:10px">发货指令</a>
+                <a @click="goPage(row)">详情</a>
+            </template>
+        </Table>
+         <Footer change changeSize :pageIndex='pageIndex' :pageSize='pageSize' :total='total'></Footer>
+         <Modal v-model="show_out" width='30' :closable='false' :mask-closable="false" title="发货指令">
+             <div style="padding:auto">
+                 <div class="modal_item">
+                     <label>选择人员:</label>
+                     <Select filterable  style="width:50%;position: relative;top:-6px">
+                         <Option/>
+                     </Select>
+                 </div>
+                 <div class="modal_item">
+                     <label>出库日期:</label>
+                     <DatePicker type='date' placeholder='年/月/日' style="width:50%;position: relative;top:-6px"></DatePicker>
+                 </div>
+                 <div class="modal_item">
+                     <label>点工单形式:</label>
+                     <RadioGroup v-model="modalData.state">
+        <Radio :label="1">
+            <span>是</span>
+        </Radio>
+        <Radio :label="0">
+            <span>否</span>
+        </Radio>
+    </RadioGroup>
+                 </div>
+             </div>
+             <div slot="footer" style="text-align:center">
+                 <Button @click="show_out=false">取消</Button>
+                 <Button type="primary">确认</Button>
+             </div>
+         </Modal>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            proxyData:{},
+            searchData:{
+                order_no:'',
+                project_title:'',
+                client_name:'',
+                state:''
+            },
+            modalData:{
+             state:'',
+
+                },
+                tableData:[
+                    {}
+                ],
+                tableColumns:[
+                    {type:'selection',align:'center',minWidth:80},
+                    {title:'垛码',key:'',minWidth:120,align:'center'},
+                    {title:'发货指令状态',key:'',minWidth:120,align:'center'},
+                    {title:'下发货指令时间',key:'',minWidth:120,align:'center'},
+                    {title:'操作',align:'center',minWidth:120,key:"set",slot:'set'}
+                ],
+                pageSize:10,
+                pageIndex:1,
+                total:0,
+                selectData:[],
+                show_out:false,
+        }
+    },
+    methods:{
+        handleOut(){
+       this.show_out=true;
+        },
+        handleSelect(e){
+           this.selectData = e;
+        },
+        initData(){
+
+        },
+        goPage(row){
+        this.$router.push({path:'/cms/stack/confirm',query:{...row}})
+        },
+        change(e){
+            this.changeIndex =e;
+            this.initData(this.proxyData);
+        },
+        changeSize(e){
+            this.pageSize=e;
+            this.pageIndex=1;
+            this.initData(this.proxyData)
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 10px;
+    .form_item{
+        width:200px
+    }
+}
+.modal_item{
+    display: flex;
+    justify-content: center;
+    margin-top: 15px;
+}
+</style>

+ 114 - 0
src/views/stack/list.vue

@@ -0,0 +1,114 @@
+<template>
+    <div>
+       <Toptitle title="垛码单"></Toptitle>
+       <Form class="form_content" :label-width='100'>
+           <FormItem label='订单编码:'>
+               <Input v-model="searchData.order_no" clearable placeholder="请输入订单编码" class="form_item"/>
+           </FormItem>
+            <FormItem label='项目名称:'>
+                <Input v-model="searchData.project_title" clearable placeholder="请输入项目名称" class="form_item"/>
+            </FormItem>
+             <FormItem label='订单状态:'>
+                 <Select filterable clearable class="form_item">
+                     <Option/>
+                 </Select>
+             </FormItem>
+              <FormItem label='日期范围:'>
+                  <DatePicker type='date' v-model="searchData.start_time" class="form_item"></DatePicker> ~ 
+                  <DatePicker type='date' v-model="searchData.end_time" class="form_item"></DatePicker>
+              </FormItem>
+               <FormItem label='客户:'>
+                   <Input v-model="searchData.client_name" clearable placeholder="请输入客户名称" class="form_item"/>
+               </FormItem>
+                <FormItem label='业务员:'>
+                     <Select filterable clearable class="form_item">
+                     <Option/>
+                 </Select>
+                </FormItem>
+                 <FormItem label='紧急程度:'>
+                     <Select v-model="searchData.state" filterable clearable>
+                     <Option :value="0">不急</Option>
+                     <Option :value='1'>比较急</Option>
+                     <Option :value="2">紧急</Option>
+                     <Option :value='3'>非常急</Option>
+                     </Select>
+                 </FormItem>
+                  <FormItem :label-width='40'>
+                      <Button type="primary">搜索</Button>
+                  </FormItem>
+       </Form>
+       <div class="up_table">
+           <Button type="primary">表头设置</Button>
+       </div>
+       <Table :data='tableData' :columns='tableColumns' border max-height='500'>
+           <template slot="set" slot-scope="{row}">
+               <a @click="goPage(row)">详情</a> 
+           </template>
+       </Table>
+       <Footer change changeSize :pageIndex='pageIndex' :pageSize='pageSize' :total='total'></Footer>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            proxyData:{},
+            searchData:{
+                order_no:'',
+                project_title:'',
+                client_name:'',
+                state:''
+            },
+                tableData:[
+                    {}
+                ],
+                tableColumns:[
+                    {title:'序号',type:'index',align:'center',minWidth:80},
+                    {title:'订单编号',align:'center',minWidth:120,key:""},
+                    {title:'项目名称',align:'center',minWidth:120,key:""},
+                    {title:'紧急程度',align:'center',minWidth:120,key:""},
+                    {title:'订单开始日期',align:'center',minWidth:120,key:""},
+                    {title:'订单结束日期',align:'center',minWidth:120,key:""},
+                    {title:'业务员',align:'center',minWidth:120,key:""},
+                    {title:'订单状态',align:'center',minWidth:120,key:""},
+                    {title:'操作',align:'center',minWidth:120,key:"set",slot:'set'}
+                ],
+                pageSize:10,
+                pageIndex:1,
+                total:0
+        }
+    },
+    methods:{
+        initData(){
+
+        },
+        goPage(row){
+        this.$router.push({path:'/cms/stack/detail',query:{...row}})
+        },
+        change(e){
+            this.changeIndex =e;
+            this.initData(this.proxyData);
+        },
+        changeSize(e){
+            this.pageSize=e;
+            this.pageIndex=1;
+            this.initData(this.proxyData)
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 10px;
+    .form_item{
+        width:200px
+    }
+}
+.up_table{
+    display: flex;
+    flex-direction: row-reverse;
+    margin-bottom: 10px;
+}
+</style>