mushencc 3 gadi atpakaļ
vecāks
revīzija
a25bfd0dc7

+ 2 - 2
src/components/confirm-delete/index.vue

@@ -3,8 +3,8 @@
         <Modal class-name="vertical-center-modal" :title='title' v-model="show" :width="444">
             <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 v-model="item.value" filterable clearable v-if="item.is_select" style="width:70%" filter-by-label>
+                        <Option v-for="(_item,_index) in item.list" :key="_index" :label="_item.title" :value='_item.id'/>
                     </Select>
                     <Input v-model="item.value" style="width:70%" v-else/>
                 </FormItem>

+ 14 - 2
src/views/BasicSettings/PartSettings/detail.vue

@@ -32,6 +32,7 @@
             <Select
               filterable
               filter-by-label
+              :disabled='type==3'
               clearable
               v-model="formData.process_id"
               style="width: 100px; margin-right: 5px"
@@ -49,6 +50,7 @@
             <Select
               filterable
               filter-by-label
+              :disabled='type==3'
               clearable
               @on-change="(e) => handleGetProcessIds(formData.process_id, e, 1)"
               v-model="formData.type_title"
@@ -82,6 +84,7 @@
               multiple
               collapse-tags
               filterable
+              :disabled='type==3'
               v-model="formData.process_ids"
               @change="changeProvinceSelect"
               style="width: 300px; height: 32px"
@@ -109,6 +112,7 @@
           <span>
             <Select
               filterable
+              :disabled='type==3'
               filter-by-label
               v-model="formData.part_id"
               @on-change="initData(id)"
@@ -134,6 +138,7 @@
         <Col>
           <Button
             size="small"
+            :disabled='type==3'
             type="primary"
             @click="handleSet({}, tableData.length, 1)"
             >新增规则</Button
@@ -153,6 +158,7 @@
               v-model="newTable[index].product_id"
               transfer
               filterable
+              :disabled='type==3'
               clearable
               @on-change="(e) => handleProduct(newTable[index], index, e)"
               placeholder="全部"
@@ -169,6 +175,7 @@
             <Select
               v-model="newTable[index].parts_detail_id"
               transfer
+              :disabled='type==3'
               @on-change="
                 (e) => handlePartDetailSelected(newTable[index], index, e, 1)
               "
@@ -182,7 +189,7 @@
             </Select>
           </template>
           <template slot="measureSlot" slot-scope="{ index }">
-            <Select v-model="newTable[index].basics_measure_id" transfer>
+            <Select v-model="newTable[index].basics_measure_id" transfer :disabled='type==3'>
               <Option
                 v-for="(item, index) in measure_list"
                 :key="index"
@@ -194,6 +201,7 @@
           <template slot="numSlot" slot-scope="{ index }">
             <Input
               type="text"
+              :disabled='type==3'
               style="width: 80px"
               v-model.lazy="newTable[index].num"
             />
@@ -201,6 +209,7 @@
           <template slot="minSlot" slot-scope="{ index }">
             <Input
               type="text"
+              :disabled='type==3'
               style="width: 80px"
               v-model="newTable[index].min"
             />
@@ -208,12 +217,13 @@
           <template slot="maxSlot" slot-scope="{ index }">
             <Input
               type="text"
+              :disabled='type==3'
               style="width: 80px"
               v-model="newTable[index].max"
             />
           </template>
           <template slot="materialDetailSlot" slot-scope="{ index }">
-            <Select v-model="newTable[index].material_detail_id" transfer>
+            <Select v-model="newTable[index].material_detail_id" transfer :disabled='type==3'>
               <Option
                 v-for="(item, index) in material"
                 :key="index"
@@ -226,11 +236,13 @@
             <div>
               <a
                 style="margin: 0 5px"
+                :disabled='type==3'
                 @click="handleSet(newTable[index], index, 2)"
                 >复制</a
               >
               <a
                 style="margin: 0 5px"
+                 :disabled='type==3'
                 @click="handleSet(newTable[index], index, 3)"
                 >删除</a
               >

+ 2 - 1
src/views/BasicSettings/rootManage.vue

@@ -256,7 +256,8 @@ export default {
     },
     handleColorConfirm () {
       let obj = JSON.parse(JSON.stringify(this.currencyRow));
-      obj.produce_ids = [obj.produce_ids];
+      console.log(obj);
+       obj.produce_ids = [Number(obj.produce_ids.toString())];
       this.axios({
         method: 'post',
         url: '/api/ext_user_permission_edit',

+ 53 - 37
src/views/OrderMannage/BusinessOrderlist/confirmNew.vue

@@ -3018,9 +3018,18 @@ export default {
                 elem.isBP = true;
                 elem.process_str = elem.process;
                 elem.process = JSON.parse(JSON.stringify(this.process_obj));
-                elem.process.map((v) => {
+                if(elem.addMTB){
+                  
+                      elem.process.map(v=>{
+                        v.value = Number(elem.procedure_properties[v.id]);
+                      })
+                      console.log(elem.process,'6565');
+                }else{
+                   elem.process.map((v) => {
                   v.value = element[v.id];
                 });
+                }
+               
                 elem.measurement = elem.measure;
                 elem.longCalc = elem.long;
                 elem.wideCalc = elem.wide;
@@ -3074,6 +3083,7 @@ export default {
               }
             }
           });
+          console.log(this.tableData,'111');
           this.forms_list = res.tableSet || [];
           // 查看详情时获取原材料信息
           this.originalData = res.data.material_list;
@@ -3132,7 +3142,7 @@ export default {
             });
         }
       );
-
+  //  console.log(this.tableData,'111')
     },
     addHours(row) {
       row.push({
@@ -4178,28 +4188,28 @@ export default {
           if (row.is_metal) {
          
           } else {
-            obj.addMTB = false;
-            obj.position = "";
-            obj.measure.map((v) => {
-              v.value = "";
-              obj[v.e_title] = "";
-            });
+            // obj.addMTB = false;
+            // obj.position = "";
+            // obj.measure.map((v) => {
+            //   v.value = "";
+            //   obj[v.e_title] = "";
+            // });
             // console.log(row.process_obj)
             // console.log(row);
-            let arr =  row.process_obj.filter(v=>(v.name!=='颜色'))
-            let process =JSON.parse(JSON.stringify(obj.process)).split('/');
-           arr.forEach(v=>{
-             obj[v.id] = '';
-             obj.procedure_properties[v.id]='';
-           })
-         for(let key in obj.procedure_properties){
-            if(!obj.procedure_properties[key]){
-              process[Number(key)-1]='';
-            }
-         }
-         obj.process = process.join('/').toString();
-         obj.process_str = obj.process;
-         console.log(obj);
+          //   let arr =  row.process_obj.filter(v=>(v.name!=='颜色'))
+          //   let process =JSON.parse(JSON.stringify(obj.process)).split('/');
+          //  arr.forEach(v=>{
+          //    obj[v.id] = '';
+          //    obj.procedure_properties[v.id]='';
+          //  })
+        //  for(let key in obj.procedure_properties){
+        //     if(!obj.procedure_properties[key]){
+        //       process[Number(key)-1]='';
+        //     }
+        //  }
+        //  obj.process = process.join('/').toString();
+        //  obj.process_str = obj.process;
+        //  console.log(obj);
             if (!row.is_metal) {
               this.route_id_at_copy = row.route_id;
             }
@@ -4211,18 +4221,18 @@ export default {
           //复制一条数据,更换了产品之后,
           //线条的内容要保留(不管更换的这个产品的默认线条是什么,都是只展示复制下来的)
           //摘自Tower #2004
-          obj.part &&
-            obj.part.map((v,idx) => {
-              if (v.title.indexOf("线条") != -1||(v.part_title?v.part_title.indexOf("线条") != -1:false)) {
-                this.copiedLinePart = this.deepClone(v);
-              }else{
-                if(v.addMTB){ //部件存在门头板的给他删了,不给他带过去
-                    obj.part.splice(idx,1);
-                }
-                v.change_id ='';
+          // obj.part &&
+          //   obj.part.map((v,idx) => {
+          //     if (v.title.indexOf("线条") != -1||(v.part_title?v.part_title.indexOf("线条") != -1:false)) {
+          //       this.copiedLinePart = this.deepClone(v);
+          //     }else{
+          //       if(v.addMTB){ //部件存在门头板的给他删了,不给他带过去
+          //           obj.part.splice(idx,1);
+          //       }
+          //       v.change_id ='';
 
-              }
-            });
+          //     }
+          //   });
           //因为是复制,插件id为_XID会相同导致bug,置空后会自动生成
           obj._XID = "";
           this.tableData.splice(index + 1, 0, obj);
@@ -4307,7 +4317,7 @@ export default {
       const element = this.extList.filter((item) => item.id == e.value);
       row.num = element[0].num;
       row.price = element[0].price;
-      row.total_price = (row.num * row.price).toFixed(2);
+      row.total_price = (row.num * row.price*1).toFixed(2);
  }
     
       this.handleTotalPriceCalc(row, item);
@@ -4371,7 +4381,8 @@ export default {
         });
         this.ext_sum = sum2*1
         if(item.addMTB){
-           item.ext_price = this.ext_sum +item.MTBtotal*1;
+          console.log(item);
+           item.ext_price = this.ext_sum*1 +item.part.find(v=>(v.addMTB)).MTBtotal*1;
         }else{
              item.ext_price = this.ext_sum;
         }
@@ -4814,9 +4825,9 @@ export default {
                 res.data.part.forEach((b,bIndex)=>{
                   if(b.part_title.indexOf('线条')!=-1){
                    
-                     if(b.change.filter(v=>(s.part_id==v.part_id)).length!=0){
+                     if(b.change.filter(v=>(s.part_id==v.part_id)).length!=0){ //如果在接口data里找得到相同线条部件名称的
                                
-                                 b.change_id = b.change.find(c=>(c.part_id==s.part_id)).id||100;
+                                 b.change_id = b.change.find(c=>(c.part_id==s.part_id)).id;
                                  b.part_title = b.change.find(c=>(c.part_id==s.part_id)).part_title;
                                  b.part_id = b.change.find(c=>(c.part_id==s.part_id)).part_id;
                                  
@@ -4824,6 +4835,8 @@ export default {
                                    b.sub_part[rIndex].part_detail_id = r.part_detail_id;
                                    b.sub_part[rIndex].part_detail_option = [];
                                    b.sub_part[rIndex].material_detail_id =r.material_detail_list[0].material_detail_id;
+                                   b.sub_part[rIndex].material_id = r.material_id;
+                                   b.sub_part[rIndex].title = r.title;
                                    b.sub_part[rIndex].material_detail_title = r.material_detail_list[0].title;
                                   
                                    r.material_detail_list.forEach(m=>{
@@ -4834,6 +4847,9 @@ export default {
                                    })
                                      b.sub_part[rIndex].material_detail_list = r.material_detail_list;
                                  })
+                                // console.log(b.sub_part);
+                                 b.part_detail = JSON.parse(JSON.stringify(b.sub_part));
+                                b.title=b.part_title; 
                                 //  b.sub_part = this.deepClone(b.change.find(c=>(c.part_id==s.part_id)).sub_part);
                                 //  b.sub_part.forEach(n=>{
                                 //    n.material_detail_id = n.material_detail_list[0].material_detail_id;

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

@@ -587,10 +587,14 @@ export default {
          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.axios.post('/api/change_buttress_no',{tags,order_no:this.$route.query.order_no,buttress_no:this.stackNUM}).then(res=>{
+           if(res.code==200){
+             this.$Message.success(res.msg)
+             this.show_stack = false;
            this.getData(this.proxyObj);
            this.stackNUM = '';
+           }
+           
          })
            
            
@@ -824,6 +828,9 @@ export default {
       if (!row || row.length < 1) {
         return this.$Message.error("请至少选择一项");
       }
+      this.axios.post('/api/orders_in_employee',{title:'包装'}).then(res=>{
+        this.modalData[0].list = res.data;
+      })
       params = Array.isArray(row) ? row.join(",") : row.orders_procedure_id;
       this.confirmDelete({
         title: "包装完成",
@@ -832,7 +839,7 @@ export default {
         formData:this.modalData,
         then: () => {
           this.axios
-            .post("/api/orders_in", { orders_procedure_id: params })
+            .post("/api/orders_in", { orders_procedure_id: params,employee:this.modalData[0].value,buttress_no:this.modalData[1].value})
             .then((res) => {
               if (res.code == 200) {
                 this.$Message.success(res.msg);

+ 5 - 0
src/views/PurchasingManage/InstockOrder/edit.vue

@@ -674,6 +674,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      modalMID:'',
       routerState:true,
       shareFreightModal: false,
       shareFreightValue: "按数量分摊",
@@ -2672,8 +2673,10 @@ export default {
         v.indexSort = index;
       });
       this.is_refer = 0;
+      this.modalMID = '';
     },
     handleTreeSlect(array, row) {
+      this.modalMID = row.id;
       row.id &&
         this.axios({
           method: "get",
@@ -2725,6 +2728,7 @@ export default {
     },
     changeModalSize(e) {
       this.modal_page_size = e;
+      this.modal_page_index=1;
       this.initModal();
     },
     changeModalPage(e) {
@@ -2739,6 +2743,7 @@ export default {
           page_index: this.modal_page_index,
           page_size: this.modal_page_size,
           title: this.modalData.title,
+          m_id:this.modalMID
         },
       })
         .then((res) => {

+ 4 - 1
src/views/PurchasingManage/OutstockOrder/edit.vue

@@ -364,6 +364,7 @@ export default {
   data() {
     // 这里存放数据
     return {
+      modalMID:"",
       routerState:true,
       modelSearchData:{
         order_in_no:'',
@@ -1362,7 +1363,7 @@ currentRow.total = (currentRow.num*currentRow.price*1).toFixed(2)
       })
       this.tableData = [...this.modalData.selectedData,...this.tableData];
       this.is_refer = 0
-      
+      this.modalMID = '';
     },
     changeModalSize(e) {
       this.modal_page_size = e;
@@ -1380,6 +1381,7 @@ currentRow.total = (currentRow.num*currentRow.price*1).toFixed(2)
           page_index: this.modal_page_index,
           page_size: this.modal_page_size,
           title: this.modalData.title,
+          m_id:this.modalMID
         },
       })
         .then((res) => {
@@ -1425,6 +1427,7 @@ currentRow.total = (currentRow.num*currentRow.price*1).toFixed(2)
       });
     },
     handleTreeSlect(array, row) {
+      this.modalMID = row.id;
       row.id &&
         this.axios({
           method: "get",

+ 56 - 22
src/views/stack/confirm.vue

@@ -5,41 +5,48 @@
         </Toptitle>
         <Form :label-width='100' class="form_content">
             <FormItem label='楼幢:'>
-                <Select class="form_item" filterable clearable></Select>
+                <Select class="form_item" filterable clearable v-model="searchData.house"></Select>
             </FormItem>
             <FormItem label='单元:'>
-               <Select class="form_item" filterable clearable></Select>
+               <Select class="form_item" filterable clearable v-model="searchData.unit"></Select>
             </FormItem>
             <FormItem label='楼层:'>
-               <Select class="form_item" filterable clearable></Select>
+               <Select class="form_item" filterable clearable v-model="searchData.layer"></Select>
             </FormItem>
             <FormItem label='房号:'>
-                <Select class="form_item" filterable clearable></Select>
+                <Select class="form_item" filterable clearable v-model="searchData.house_number"></Select>
             </FormItem>
             <FormItem label='产品:'>
-               <Select class="form_item" filterable clearable></Select>
+               <Select class="form_item" filterable clearable v-model="searchData.product_title"></Select>
             </FormItem>
             <FormItem label='图号:'>
-               <Select class="form_item" filterable clearable></Select>
+               <Select class="form_item" filterable clearable v-model="searchData.url_number"></Select>
             </FormItem>
             <FormItem label='组合名称:'>
-               <Select class="form_item" filterable clearable></Select>
+               <Select class="form_item" filterable clearable v-model="searchData.compose_name"></Select>
             </FormItem>
             <FormItem label='部件:'>
-                <Select class="form_item" filterable clearable></Select>
+                <Select class="form_item" filterable clearable v-model="searchData.part_title"></Select>
             </FormItem>
-            <FormItem label='精裁尺寸:'>
+            <!-- <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> -->
             <FormItem label='包装时间:'>
-                <DatePicker type='date' placeholder='年/月/日' class="form_item"></DatePicker> ~ <DatePicker type='date' placeholder='年/月/日' class="form_item"></DatePicker>
+                <DatePicker type='date' placeholder='年/月/日' class="form_item" v-model="searchData.start_time"></DatePicker> ~ <DatePicker type='date' placeholder='年/月/日' class="form_item" v-model="searchData.end_time"></DatePicker>
+            </FormItem>
+            <FormItem label='发货指令状态'>
+                   <Select clearable v-model="searchData.state" class="form_item">
+                       <Option :value="0">未下指令</Option>
+                       <Option :value="1">部分未下发货指令</Option>
+                       <Option :value="2">已下指令</Option>
+                   </Select>
             </FormItem>
             <FormItem>
-                <Button type="primary">搜索</Button>
+                <Button type="primary" @click="search">搜索</Button>
             </FormItem>
         </Form>
         <Table :data='tableData' :columns='tableColumns' border max-height='550'></Table>
@@ -50,6 +57,18 @@
 export default {
     data(){
         return{
+            searchData:{
+                    house:'',
+                    unit:'',
+                    layer:'',
+                    house_number:'',
+                    product_title:'',
+                    url_number:'',
+                    compose_name:'',
+                    state:'',
+                    start_time:'',
+                    end_time:''
+            },
             pageIndex:1,
             pageSize:10,
             total:0,
@@ -57,22 +76,37 @@ export default {
             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:'house_number',minWidth:120},
+                {title:'产品名称',align:'center',key:'product_title',minWidth:120},
+                {title:'图号',align:'center',key:'url_number',minWidth:120},
+                {title:'组合名称',align:'center',key:'compose_name',minWidth:120},
+                {title:'部件',align:'center',key:'part_title',minWidth:120},
                 {title:'包装码',align:'center',key:'',minWidth:120},
                 {title:'单位',align:'center',key:'',minWidth:120},
-                {title:'包装时间',align:'center',key:'',minWidth:120}
+                {title:'包装时间',align:'center',key:'crt_time',minWidth:120,render:(h,params)=>{
+                    const {row} = params;
+                    return h('span',{},this.func.replaceDateNoHMS(row.crt_time))
+                }},
+                {title:'发货指令时间',align:'center',key:'state',minWidth:120}
             ]
         }
     },
+    mounted(){
+       this.initData();
+    },
     methods:{
-        initData(){
-
+        search(){
+         let obj = JSON.parse(JSON.stringify(this.searchData));
+         obj.start_time = obj.start_time?Date.parse(obj.start_time).toString().slice(0,10):'';
+           obj.end_time = obj.end_time?Date.parse(obj.end_time).toString().slice(0,10):'';
+           this.proxyData = obj;
+           this.initData(obj);
+        },
+        initData(row){
+         this.axios.post('/api/buttress_part_detail',{order_no:this.$route.query.order_no,buttress_no:this.$route.query.buttress_no,page_index:this.pageIndex,page_size:this.pageSize,...row}).then(res=>{
+                this.total = res.data.total;
+                this.tableData = res.data.data;
+         })
         },
         change(e){
             this.pageIndex = e;

+ 105 - 23
src/views/stack/detail.vue

@@ -6,21 +6,26 @@
         </Toptitle> 
         <Form :label-width='140' class="form_content">
             <FormItem label='垛码:' :label-width='80'>
-                <Input clearable v-model="searchData.stack"></Input>
+                <Input clearable v-model="searchData.buttress_no"></Input>
             </FormItem>
             <FormItem label='发货指令状态:'>
                 <Select v-model="searchData.state" filterable clearable>
                     <Option :value="0" label="未下指令"/>
-                    <Option :value="1" label='已下指令'/>
+                    <Option :value="1" label="部分未下发货指令"/>
+                    <Option :value="2" label='已下指令'/>
                 </Select>
             </FormItem>
+             <FormItem label='下发货指令时间:'>
+               <DatePicker type='date' v-model="searchData.start_time" placeholder='年/月/日'></DatePicker>~
+               <DatePicker type='date' v-model="searchData.end_time" placeholder='年/月/日'></DatePicker>
+            </FormItem>
             <FormItem :label-width='40'>
-                <Button type="primary">搜索</Button>
+                <Button type="primary" @click="search">搜索</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 style="margin-right:10px" @click="handleTableOut(row)">发货指令</a>
                 <a @click="goPage(row)">详情</a>
             </template>
         </Table>
@@ -29,17 +34,20 @@
              <div style="padding:auto">
                  <div class="modal_item">
                      <label>选择人员:</label>
-                     <Select filterable  style="width:50%;position: relative;top:-6px">
-                         <Option/>
+                     <Select filterable  style="width:50%;position: relative;top:-6px" v-model="modalData.nickname">
+                         <Option  v-for="item of users"
+                :key="item.id"
+                :value="item.id"
+                :label="item.nickname"/>
                      </Select>
                  </div>
                  <div class="modal_item">
                      <label>出库日期:</label>
-                     <DatePicker type='date' placeholder='年/月/日' style="width:50%;position: relative;top:-6px"></DatePicker>
+                     <DatePicker type='date' placeholder='年/月/日' style="width:50%;position: relative;top:-6px" v-model="time"></DatePicker>
                  </div>
                  <div class="modal_item">
                      <label>点工单形式:</label>
-                     <RadioGroup v-model="modalData.state">
+                     <RadioGroup v-model="modalData.work_type">
         <Radio :label="1">
             <span>是</span>
         </Radio>
@@ -51,7 +59,7 @@
              </div>
              <div slot="footer" style="text-align:center">
                  <Button @click="show_out=false">取消</Button>
-                 <Button type="primary">确认</Button>
+                 <Button type="primary" @click="outPost">确认</Button>
              </div>
          </Modal>
     </div>
@@ -60,25 +68,33 @@
 export default {
     data(){
         return{
+            time:'',
             proxyData:{},
             searchData:{
-                order_no:'',
-                project_title:'',
-                client_name:'',
-                state:''
-            },
+               buttress_no:'',
+                state:'',
+                start_time:'',
+                end_time:''
+                },
             modalData:{
-             state:'',
-
+             work_type:'',
+            nickname:'',
+            start_time:'',
+            end_time:''
                 },
                 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:'垛码',key:'buttress_no',minWidth:120,align:'center'},
+                    {title:'发货指令状态',key:'state',minWidth:120,align:'center',render:(h,params)=>{
+                        const {row} = params;
+                        return h('span',{},row.state==0?'未下指令':row.state==1?'部分未下发货指令':'已下指令')
+                    }},
+                    {title:'下发货指令时间',key:'send_time',minWidth:120,align:'center',render:(h,params)=>{
+                        const {row} = params;
+                        return h('span',{},this.func.replaceDateNoHMS(row.send_time))
+                    }},
                     {title:'操作',align:'center',minWidth:120,key:"set",slot:'set'}
                 ],
                 pageSize:10,
@@ -86,20 +102,86 @@ export default {
                 total:0,
                 selectData:[],
                 show_out:false,
+                users:[],
+                buttress_nos:[],
         }
     },
+    mounted(){
+    this.initData();
+    },
+    created(){
+        //获取人员
+        this.axios.get('/api/user').then(res=>{
+            this.users = res.data.data;
+        })
+    },
     methods:{
+        outPost(){
+             if (this.time) {
+        this.modalData.start_time = new Date(this.time)
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        this.modalData.end_time = new Date(this.time)
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+      }
+   
+      this.axios.post("/api/orders_out", {order_in_no:this.$route.query.order_no,buttress_nos:this.buttress_nos,...this.modalData}).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.initData(this.proxyData);
+          this.show_out = false;
+          // setTimeout(()=>this.back(),500)
+        }
+      });
+        },
+        handleTableOut(row){
+             this.buttress_nos = [];
+             this.buttress_nos.push(row.buttress_no);
+             this.modalData = {
+                 work_type:'',
+            nickname:'',
+            start_time:'',
+            end_time:''
+            }
+            this.time='';
+       this.show_out=true;
+        },
+         search(){
+           let obj = JSON.parse(JSON.stringify(this.searchData));
+           obj.start_time = obj.start_time?Date.parse(obj.start_time).toString().slice(0,10):'';
+           obj.end_time = obj.end_time?Date.parse(obj.end_time).toString().slice(0,10):'';
+           this.proxyData = obj;
+           this.initData(obj);
+        },
         handleOut(){
+            if(this.selectData.length==0){
+                return this.$Message.warning('请先选择数据!')
+            }
+            this.buttress_nos = [];
+            this.selectData.forEach(v=>{
+                this.buttress_nos.push(v.buttress_no);
+            })
+            this.modalData = {
+                 work_type:'',
+            nickname:'',
+            start_time:'',
+            end_time:''
+            }
+            this.time='';
        this.show_out=true;
         },
         handleSelect(e){
            this.selectData = e;
         },
-        initData(){
-
+        initData(row){
+          this.axios.post('/api/buttress_detail',{order_no:this.$route.query.order_no,page_size:this.pageSize,page_index:this.pageIndex,...row}).then(res=>{
+                this.tableData = res.data.data;
+                this.total = res.data.total;
+          })
         },
         goPage(row){
-        this.$router.push({path:'/cms/stack/confirm',query:{...row}})
+        this.$router.push({path:'/cms/stack/confirm',query:{order_no:this.$route.query.order_no,buttress_no:row.buttress_no}})
         },
         change(e){
             this.changeIndex =e;

+ 51 - 44
src/views/stack/list.vue

@@ -6,41 +6,26 @@
                <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"/>
+                <Input v-model="searchData.residential_name" 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/>
+ <FormItem label='业务员:'>
+                     <Select filterable clearable class="form_item" v-model="searchData.nickname">
+                     <Option v-for="item in users" :key="item.id" :label="item.nickname" :value="item.id"/>
                  </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='包装日期:'>
+                  <DatePicker type='date' v-model="searchData.start_time" class="form_item" placeholder='年/月/日'></DatePicker> ~ 
+                  <DatePicker type='date' v-model="searchData.end_time" class="form_item" placeholder='年/月/日'></DatePicker>
+              </FormItem>
+              
                   <FormItem :label-width='40'>
-                      <Button type="primary">搜索</Button>
+                      <Button type="primary" @click="search">搜索</Button>
                   </FormItem>
        </Form>
        <div class="up_table">
            <Button type="primary">表头设置</Button>
        </div>
-       <Table :data='tableData' :columns='tableColumns' border max-height='500'>
+       <Table :data='tableData' :columns='tableColumns' border max-height='500' :loading='loading'>
            <template slot="set" slot-scope="{row}">
                <a @click="goPage(row)">详情</a> 
            </template>
@@ -52,38 +37,60 @@
 export default {
     data(){
         return{
+            loading:false,
             proxyData:{},
             searchData:{
                 order_no:'',
-                project_title:'',
-                client_name:'',
-                state:''
-            },
-                tableData:[
-                    {}
-                ],
+                residential_name:'',
+                nickname:'',
+                start_time:'',
+                end_time:''
+                    },
+                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:"order_no"},
+                    {title:'项目名称',align:'center',minWidth:120,key:"residential_name"},
+                    {title:'包装日期',align:'center',minWidth:120,key:"crt_time",render:(h,params)=>{
+                        const {row} = params;
+                        return h('span',{},this.func.replaceDateNoHMS(row.crt_time))
+                    }},
+                    {title:'业务员',align:'center',minWidth:120,key:"nickname"},
                     {title:'操作',align:'center',minWidth:120,key:"set",slot:'set'}
                 ],
                 pageSize:10,
                 pageIndex:1,
-                total:0
+                total:0,
+                users:[],
         }
     },
+    mounted(){
+       this.initData();
+    },
+    created(){
+        //获取业务员
+        this.axios.get('/api/user').then(res=>{
+            this.users = res.data.data
+        })
+    },
     methods:{
-        initData(){
-
+        search(){
+           let obj = JSON.parse(JSON.stringify(this.searchData));
+           obj.start_time = obj.start_time?Date.parse(obj.start_time).toString().slice(0,10):'';
+           obj.end_time = obj.end_time?Date.parse(obj.end_time).toString().slice(0,10):'';
+           this.proxyData = obj;
+           this.initData(obj);
+        },
+        initData(row){
+            this.loading = true;
+             this.axios.post('/api/buttress_list',{page_size:this.pageSize,page_index:this.pageIndex,...row}).then((res)=>{
+                 this.loading = false;
+                 this.tableData = res.data.data;
+                 this.total = res.data.total;
+             })
         },
         goPage(row){
-        this.$router.push({path:'/cms/stack/detail',query:{...row}})
+        this.$router.push({path:'/cms/stack/detail',query:{order_no:row.order_no}})
         },
         change(e){
             this.changeIndex =e;

+ 1 - 1
vue.config.js

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