mushencc hace 3 años
padre
commit
179442c061

+ 92 - 0
src/routerMap/index.js

@@ -106,6 +106,24 @@ const routerMap = [
       require(["@/views/PersonnelManagement/userEdit"], resolve),
   },
   {
+    path: "/cms/basicsettings/OriginalUrlNumber/index",
+    name: "OriginalUrlNumberIndex", //基础设置-->原图号列表
+    meta: {
+      index: 4,
+    },
+    component: (resolve) =>
+      require(["@/views/BasicSettings/OriginalUrlNumber/index"], resolve),
+  },
+  // {
+  //   path: "/cms/basicsettings/OriginalUrlNumber/detail",
+  //   name: "OriginalUrlNumberDetail", //基础设置-->原图号列表详情
+  //   meta: {
+  //     index: 4,
+  //   },
+  //   component: (resolve) =>
+  //     require(["@/views/BasicSettings/OriginalUrlNumber/detail"], resolve),
+  // },
+  {
     path: "/cms/basicsettings/materialfield",
     name: "Materialfield", //基础设置-->物料分类字段
     meta: {
@@ -207,6 +225,30 @@ const routerMap = [
     component: (resolve) => require(["@/views/MaterialMannage/edit"], resolve),
   },
   {
+    path:'/cms/WorkTime/list',
+    name:'workTimeList',//工时工价列表
+meta:{
+  index:4
+},
+component:(resolve)=>require(['@/views/WorkTime/list'],resolve),
+},
+{
+  path:'/cms/WorkTime/confirm',
+  name:'workTimeConfirm',//工时工价产品列表
+meta:{
+index:4
+},
+component:(resolve)=>require(['@/views/WorkTime/confirm'],resolve),
+},
+{
+  path:'/cms/WorkTime/detail',
+  name:'workTimeDetail',//工时工价详情
+meta:{
+index:4
+},
+component:(resolve)=>require(['@/views/WorkTime/detail'],resolve),
+},
+  {
     path: "/cms/processroute/index",
     name: "ProcessRoute", //工艺列表-->工艺列表
     meta: {
@@ -216,6 +258,15 @@ const routerMap = [
     component: (resolve) => require(["@/views/ProcessRoute/index"], resolve),
   },
   {
+    path: "/cms/processroute/newIndex",
+    name: "ProcessRouteNewIndex", //工艺列表-->工艺列表
+    meta: {
+      index: 4,
+      // keepAlive: true,
+    },
+    component: (resolve) => require(["@/views/ProcessRoute/newIndex"], resolve),
+  },
+  {
     path: "/cms/processroute/edit",
     name: "ProcessRouteEdit", //工艺列表-->工艺列表-->新增编辑工艺
     meta: {
@@ -301,6 +352,15 @@ const routerMap = [
       require(["@/views/ProductionOrderList/InboundForm/details"], resolve),
   },
   {
+    path: "/cms/productionorderlist/inboundform/confirm",
+    name: "InboundFormConfirm", //生产订单列表-->入库表组件展示
+    meta: {
+      index: 4,
+    },
+    component: (resolve) =>
+      require(["@/views/ProductionOrderList/InboundForm/confirm"], resolve),
+  },
+  {
     path: "/cms/productionorderlist/deliverylist/deliverylist",
     name: "DeliveryList", //生产订单列表-->出库表
     meta: {
@@ -312,6 +372,17 @@ const routerMap = [
       ], resolve),
   },
   {
+    path: "/cms/productionorderlist/deliverylist/confirm",
+    name: "DeliveryConfirm", //生产订单列表-->发货单组件展示
+    meta: {
+      index: 4
+    },
+    component: (resolve) =>
+      require([
+        "@/views/ProductionOrderList/Deliverylist/confirm",
+      ], resolve),
+  },
+  {
     path: "/cms/productionorderlist/deliverylist/deliverylistDetail",
     name: "DeliveryListDetail", //生产订单列表-->出库表详情
     meta: {
@@ -442,6 +513,16 @@ const routerMap = [
       require(["@/views/ProductionOrderList/ProductionPlanlist/BST_two"], resolve),
   },
   {
+    path: "/cms/productionorderlist/productionplanlist/confirm",
+    name: "ProductionPlanlistConfirm", //生产排产组件列表
+    meta: {
+      index: 4,
+      // keepAlive:true
+    },
+    component: (resolve) =>
+      require(["@/views/ProductionOrderList/ProductionPlanlist/confirm"], resolve),
+  },
+  {
     path: "/cms/productionorderlist/productionplanlist/details",
     name: "ProductionPlanlistDetails", //生产订单列表-->生产计划列表-->生产计划订单详情
     meta: {
@@ -483,6 +564,17 @@ const routerMap = [
       ], resolve),
   },
   {
+    path: "/cms/productionorderlist/productionsorder/confirm",
+    name: "bstProductionOrderDecorationconfirm", //生产订单列表-->组件展示
+    meta: {
+      index: 4,
+    },
+    component: (resolve) =>
+      require([
+        "@/views/ProductionOrderList/ProductionsOrder/confirm",
+      ], resolve),
+  },
+  {
     path: "/cms/productionorderlist/productionsorder/Decorationlist",
     name: "ProductionOrderDecorationlist", //生产订单列表-->生产订单列表-->生产计划订单详情
     meta: {

+ 143 - 0
src/views/BasicSettings/OriginalUrlNumber/detail.vue

@@ -0,0 +1,143 @@
+<template>
+    <div>
+        <Toptitle title="内部图号详情">
+            <Button @click="$router.go(-1)">返回</Button>
+        </Toptitle>
+        <Form :label-width='100' style="display:flex;flex-wrap:wrap;margin-top:10px">
+            <FormItem label='内部图号:'>
+                <Input v-model="searchData.url_number" clearable placeholder="请输入内部图号" style="width:200px"/>
+            </FormItem>
+            <FormItem :label-width='50'>
+                <Button type="primary">搜索</Button>
+            </FormItem>
+        </Form>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
+            <template slot="set" slot-scope="{row}">
+              <a @click="initModalData(row)">查看</a>
+            </template>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+        <Modal title="查看" :closable='false' :mask-closable='false' v-model="show_modal" width='50'>
+            <Table border :data='modalTableData' :columns='modalTableColumns' max-height='550'></Table>
+        <Page
+         style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="modalChangeSize"
+          @on-change="modalChangePage"
+          :current="modalPageIndex"
+          show-total
+          show-elevator
+          :total="modalTotal"
+          show-sizer
+          :page-size="modalPageSize"
+        />
+        <div slot="footer">
+            <Button @click="show_modal=false">取消</Button>
+        </div>
+        </Modal>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            selectData:{},
+            show_modal:false,
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[],
+         modalTableData:[
+            {sort:1,part_title:'部件名称',texture:'材质',finishing:'饰面',num:'数量',long:'长H',width:'宽W',high:'厚D',technologyBeg:'工艺要求',technologyRoute:'工艺路线',state:0,rate:'产值比例',wainscot_num:"贴面数",UV_num:'UV数',banding:'封边数'}
+         ],
+         modalTableColumns:[
+            {title:'层级',align:'center',key:'sort',minWidth:120},
+            {title:'部件名称',align:'center',key:'part_title',minWidth:120},
+            {title:'材质',align:'center',key:'texture',minWidth:120},
+            {title:'饰面',align:'center',key:'finishing',minWidth:120},
+            {title:'数量',align:'center',key:'num',minWidth:120},
+            {title:'长H',align:'center',key:'long',minWidth:120},
+            {title:'宽W',align:'center',key:'width',minWidth:120},
+            {title:'厚D',align:'center',key:'high',minWidth:120},
+            {title:'工艺要求',align:'center',key:'technologyBeg',minWidth:120},
+            {title:'工艺路线',align:'center',key:'technologyRoute',minWidth:120},
+            {title:'是否打码',align:'center',key:'state',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.state==0?'否':'是')
+            }},
+            {title:'产值比例',align:'center',key:'rate',minWidth:120},
+            {title:'贴面数',align:'center',key:'wainscot_num',minWidth:120},
+            {title:'UV数',align:'center',key:'UV_num',minWidth:120},
+            {title:'封边',align:'center',key:'banding',minWidth:120}
+         ],
+         modalTotal:0,
+         modalPageSize:10,
+         modalPageIndex:1,
+         tableColumns:[
+            {title:'内部图号',minWidth:120,key:'url_number',align:'center'},
+            {title:'操作',minWidth:120,key:'set',slot:'set',align:'center'}
+         ],
+         searchData:{
+             url_number:''
+         },
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        initData(obj){
+            this.axios.post('/api/consult_number_list',{order_no:this.$route.query.order_no,page_size:this.pageSize,page_index:this.pageIndex,...obj}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+            })
+        },
+        initModalData(row){
+            this.selectData = row;
+            this.modalPageSize = 10;
+            this.modalPageIndex =1;
+            this.axios.post('/api/consult_detail',{id:row.id}).then(res=>{
+                if(res.code==200){
+                    this.modalTableData = res.data.data;
+                    this.modalTotal = res.data.total;
+                     this.show_modal = true;
+                }      
+            })
+            
+        },
+        modalChangeSize(e){
+          this.modalPageSize = e;
+          this.modalPageIndex = 1;
+          this.initModalData(this.selectData);
+        },
+        modalChangePage(e){
+          this.modalPageIndex = e;
+          this.initModalData(this.selectData);
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 164 - 0
src/views/BasicSettings/OriginalUrlNumber/index.vue

@@ -0,0 +1,164 @@
+<template>
+    <div>
+        <Toptitle title="内部图号列表">
+            <!-- <Button @click="$router.go(-1)">返回</Button> -->
+        </Toptitle>
+        <Form :label-width='100' style="display:flex;flex-wrap:wrap;margin-top:10px">
+            <FormItem label='内部图号:'>
+                <Input v-model="searchData.url_number" clearable placeholder="请输入内部图号" style="width:200px"/>
+            </FormItem>
+            <FormItem :label-width='50'>
+                <Button type="primary">搜索</Button>
+            </FormItem>
+        </Form>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
+            <template slot="set" slot-scope="{row}">
+              <a @click="initModalData(row)" style="margin-right:10px">查看</a>
+                <a @click="handleDel(row)">删除</a>
+            </template>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+        <Modal title="查看" :closable='false' :mask-closable='false' v-model="show_modal" width='50'>
+            <Table border :data='modalTableData' :columns='modalTableColumns' max-height='550'></Table>
+        <Page
+         style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="modalChangeSize"
+          @on-change="modalChangePage"
+          :current="modalPageIndex"
+          show-total
+          show-elevator
+          :total="modalTotal"
+          show-sizer
+          :page-size="modalPageSize"
+        />
+        <div slot="footer">
+            <Button @click="show_modal=false">取消</Button>
+        </div>
+        </Modal>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            selectData:{},
+            show_modal:false,
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[],
+         modalTableData:[
+            {sort:1,part_title:'部件名称',texture:'材质',finishing:'饰面',num:'数量',long:'长H',width:'宽W',high:'厚D',technologyBeg:'工艺要求',technologyRoute:'工艺路线',state:0,rate:'产值比例',wainscot_num:"贴面数",UV_num:'UV数',banding:'封边数'}
+         ],
+         modalTableColumns:[
+            {title:'层级',align:'center',key:'sort',minWidth:120},
+            {title:'部件名称',align:'center',key:'title',minWidth:120},
+            {title:'材质',align:'center',key:'material',minWidth:120},
+            {title:'饰面',align:'center',key:'finishing',minWidth:120},
+            {title:'数量',align:'center',key:'num',minWidth:120},
+            {title:'长H',align:'center',key:'long',minWidth:120},
+            {title:'宽W',align:'center',key:'wide',minWidth:120},
+            {title:'厚D',align:'center',key:'high',minWidth:120},
+            {title:'工艺要求',align:'center',key:'requrement',minWidth:120},
+            {title:'工艺路线',align:'center',key:'route',minWidth:120},
+            {title:'是否打码',align:'center',key:'label',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.label==0?'否':'是')
+            }},
+            {title:'产值比例',align:'center',key:'rate',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},`${row.rete}%`)
+            }},
+            {title:'贴面数',align:'center',key:'cut_num',minWidth:120},
+            {title:'UV数',align:'center',key:'uv_num',minWidth:120},
+            {title:'封边',align:'center',key:'banding',minWidth:120}
+         ],
+         modalTotal:0,
+         modalPageSize:10,
+         modalPageIndex:1,
+         tableColumns:[
+            {title:'内部图号',minWidth:120,key:'url_number',align:'center'},
+            {title:'操作',minWidth:120,key:'set',slot:'set',align:'center'}
+         ],
+         searchData:{
+             url_number:''
+         },
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        handleDel(row){
+            this.confirmDelete({
+                title:'确认',
+                content:'删除此内部图号?',
+                then:()=>{
+                    this.axios.post('/api/consult_detail_del',{id:row.id})
+.then(res=>{
+    if(res.code==200){
+        this.$Message.success(res.msg);
+        if(this.tableData.length==1&&this.pageIndex!=1){
+           this.pageIndex--; 
+        }
+        this.initData(this.proxyData);
+    }
+})                }
+            })
+        },
+        initData(obj){
+            this.axios.post('/api/consult_number_list',{page_size:this.pageSize,page_index:this.pageIndex,...obj}).then(res=>{
+              this.tableData = res.data.data;
+              this.total = res.data.total;
+            })
+        },
+        initModalData(row){
+            this.selectData = row;
+            this.modalPageSize = 10;
+            this.modalPageIndex =1;
+            this.axios.post('/api/consult_detail',{id:row.id}).then(res=>{
+                if(res.code==200){
+                    this.modalTableData = res.data.data;
+                    this.modalTotal = res.data.total;
+                     this.show_modal = true;
+                }      
+            })
+            
+        },
+        modalChangeSize(e){
+          this.modalPageSize = e;
+          this.modalPageIndex = 1;
+          this.initModalData(this.selectData);
+        },
+        modalChangePage(e){
+          this.modalPageIndex = e;
+          this.initModalData(this.selectData);
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 7 - 3
src/views/BidSystem/DeepeningOrder/newDetail.vue

@@ -3,6 +3,7 @@
         <Toptitle :title="types==0?'详情':'编辑'">
             <Button @click="$router.go(-1)">返回</Button>
               <Upload
+              multiple
         :disabled='selectData.length==0'
           style="display: inline"
           name="your_file"
@@ -82,8 +83,7 @@
                     <a @click="handleDel(row)">删除</a>
                 </template>
                 <template slot="img_url" slot-scope="{row}">
-                    <img v-show="row.img_url" @click="looks(row.img_url)" :src="$store.state.ip + row.img_url" alt="" class="img_content"/>
-                    <span v-show="!row.img_url"></span>
+                    <img v-for="(item,index) in row.img_url" :key="index" @click="looks(row.img_url)" :src="$store.state.ip + item" alt="" class="img_content"/>
                 </template>
             </Table>
             <div class="footerPage">
@@ -178,7 +178,11 @@ export default {
     },
     methods:{
         looks(img) {
-      const array = [{ img_url: img }];
+        let data = [];
+        img.forEach(v=>{
+            data.push({img_url:v})
+        })
+      const array = data;
       this.$previewImg({
         list: array,
         baseUrl: this.$store.state.ip,

+ 295 - 32
src/views/BidSystem/ProductDeOrder/newEdit.vue

@@ -2,8 +2,23 @@
     <div>
         <Toptitle :title="type==1?'新增':type==2?'编辑':'详情'">
             <Button @click="$router.go(-1)" style="margin-right:10px">取消</Button>
-            <Button type='error' style="margin-right:10px" @click="handleDel">强制删除</Button>
-            <Button @click="handleTakeApart" style="margin-right:10px" type='primary' v-show="type==2">批量拆单</Button>
+            <Dropdown style="margin-right: 10px" @on-click='handleBtn'>
+        <Button type="primary">
+            全选
+            <Icon type="ios-arrow-down"></Icon>
+        </Button>
+        <DropdownMenu slot="list" >
+            <DropdownItem :name='1' v-show="type==2">全选可拆单数据</DropdownItem>
+            <DropdownItem :name='2' v-show="type==2">全选可修改内部图号数据</DropdownItem>
+            <DropdownItem :name='3'>全选可强制删除数据</DropdownItem>
+            <DropdownItem :name='4' v-show="type==3">全选可下生产数据</DropdownItem>
+            <DropdownItem :name='5' v-show="type==3" >全选可用料统计数据</DropdownItem>
+        </DropdownMenu>
+    </Dropdown>
+            <Button type="warning" style="margin-right:10px" @click="cancelTotalChoose">取消全选</Button>
+            <Button type='error' style="margin-right:10px" @click="handleDel" :disabled='delState'>强制删除</Button>
+            <Button @click="handleTakeApart(1)" style="margin-right:10px" type='primary' v-show="type==2" :disabled='takeApartState'>批量拆单</Button>
+             <Button @click="handleTakeApart(2)" style="margin-right:10px" type='primary' v-show="type==2" :disabled='takeApartState'>批量修改内部图号</Button>
             <Upload
         ref="upload"
           name="your_file"
@@ -16,7 +31,8 @@
          v-show="false"
         >
         </Upload>
-        <Button @click="handleExport" type="primary" v-if="type==3" style="margin-right:10px">批量下生产</Button>
+        <Button @click="handleExport" type="primary" v-if="type==3" style="margin-right:10px" :disabled='exportState'>批量下生产</Button>
+         <Button @click="handleTotal" type="primary" v-if="type==3" style="margin-right:10px" :disabled='totalState'>用料统计</Button>
             <Button type="primary" @click="handleSubmit('formValidate')" v-if="type!=3">保存</Button>
         </Toptitle>
         <Form ref="formValidate" :model="formData" :rules="ruleValidate" class="form_content" :label-width='120'>
@@ -26,10 +42,10 @@
                 <FormItem label='项目名称:' prop='residential_name'>
                     <Input v-model="formData.residential_name" clearable class="form_item" placeholder="请输入项目名称" :disabled='type==3'/>
                 </FormItem>
-                <FormItem label="项目简称:" prop='abbreviation'>
+                <FormItem label="项目简称:">
                     <Input v-model="formData.abbreviation" clearable class="form_item" placeholder="请输入项目简称" :disabled='type==3'/>
                 </FormItem>
-                <FormItem label="客户:" prop='custom_id'>
+                <FormItem label="客户:">
                     <Select v-model="formData.custom_id" clearable class="form_item" :disabled='type==3'>
                         <Option v-for="item in customList" :key="item.id" :value="item.id" :label="item.nickname" :disabled='type==3'/>
                     </Select>
@@ -81,12 +97,12 @@
                     </Select>
                 </FormItem>
                          <FormItem label='楼层:'>
-                    <Select filterable clearable class="form_item" v-model="searchData.layer">
+                    <Select filterable class="form_item" v-model="searchData.layer" multiple>
                         <Option v-for="(item,index) in TableLayerList" :key="index" :value="item" :label="item"/>
                     </Select>
                 </FormItem>
                          <FormItem label='房号:'>
-                    <Select filterable clearable class="form_item" v-model="searchData.number">
+                    <Select filterable multiple class="form_item" v-model="searchData.number">
                         <Option v-for="(item,index) in TableNumberList" :key="index" :value="item" :label="item"/>
                     </Select>
                 </FormItem>
@@ -95,13 +111,13 @@
                         <Option v-for="(item,index) in productTypeList" :key="index" :value="item" :label="item"/>
                     </Select>
                 </FormItem>
-                 <FormItem label='图号:'>
-                    <Select filterable clearable class="form_item" v-model="searchData.url_number">
+                 <FormItem label='产品名称:'>
+                    <Select filterable clearable class="form_item" v-model="searchData.title">
                         <Option v-for="(item,index) in productTitleList" :key="index" :value="item" :label="item"/>
                     </Select>
                 </FormItem>
-                 <FormItem label='产品名称:'>
-                    <Select filterable clearable class="form_item" v-model="searchData.title">
+                 <FormItem label='图号:'>
+                    <Select filterable class="form_item" v-model="searchData.url_number" multiple>
                         <Option v-for="(item,index) in urlNumberList" :key="index" :value="item" :label="item"/>
                     </Select>
                 </FormItem>
@@ -161,10 +177,20 @@
           :data="tableData"
           :column-config="{resizable: true}"
           :edit-config="{trigger: 'click', mode: 'row'}"
-          @checkbox-change='handleSelectTable'
-          @checkbox-all='handleSelectAll'
+         
           >
-          <vxe-column type="checkbox" width="80" title="选择"></vxe-column>
+           <!-- @checkbox-change='handleSelectTable'
+          @checkbox-all='handleSelectAll'
+          :checkbox-config="{checkMethod: ({row})=>(row.status==0), highlight: true}" -->
+          <!-- <vxe-column type="checkbox" width="80" title="选择"></vxe-column> -->
+           <vxe-column field="checkBox" width="80" title="选择">
+            <!-- <template #header>
+                <vxe-checkbox v-model="selectTrue" content="用料统计选择" @change='handleTotalChange'></vxe-checkbox>
+            </template> -->
+             <template #default="{row,rowIndex}">
+                      <vxe-checkbox v-model="row.checked" @change="handleSingleCheck(row,rowIndex)"></vxe-checkbox>
+                </template>
+           </vxe-column>
            <vxe-column field="order_number" width="120" title="订单编号"></vxe-column>
            <vxe-column field="area" width="60" title="区域"></vxe-column>
           <vxe-column field="house" width="60" title="楼栋"></vxe-column>
@@ -194,6 +220,16 @@
                <vxe-input v-model="row.url_number" type="text"></vxe-input>
               </template>
             </vxe-column>
+            <vxe-column field="in_url_number" title="内部图号" min-width="80">
+              <!-- <template #default="{ row }"> -->
+               <!-- <span>{{row.in_url_number?inUrlNumber.find(v=>(v.id==row.in_url_number)).url_number:''}}</span>
+              </template> -->
+              <!-- <template #edit="{ row }">
+               <vxe-select v-model="row.in_url_number" :filterable='true' clearable transfer @change="handleInUrlNumber">
+                 <vxe-option v-for="(item,index) in inUrlNumber" :key="index" :value="item.id" :label="item.url_number"></vxe-option>
+               </vxe-select> -->
+              <!-- </template> -->
+            </vxe-column>
             <!-- <vxe-column field="measure" title="型号" :edit-render="{enabled:type==3?false:true}" min-width="80">
               <template #edit="{ row }">
                 <vxe-input v-model="row.measure" type="text" placeholder="请输入型号"></vxe-input>
@@ -219,16 +255,18 @@
               <vxe-input v-model="row.high" type="text" placeholder="请输入高" transfer></vxe-input>
             </template>
             </vxe-column> -->
-              <!-- <vxe-column field="url" title="图纸" min-width="80">
+              <vxe-column field="url" title="图纸" min-width="80">
               <template #default="{ row }">
                 <img
+                v-for="(item,index) in row.url"
+                :key="index"
                   @click="looks(row.url)"
-                  :src="$store.state.ip + row.url"
+                  :src="$store.state.ip + item"
                   alt=""
                   style="width:40px;height:auto"
                 />
             </template>
-            </vxe-column> -->
+            </vxe-column>
               <!-- <vxe-column field="fashion" title="左右式" min-width="80">
             <template #default='{row}'>
                 <span>{{row.fashion==1?'左':row.fashion==2?'右':''}}</span>
@@ -260,9 +298,9 @@
             <template #default="{ row }">
                  <!-- <a style="margin-right:10px" @click="handleSet(row,1)" v-show="type==2&&row.status==0&&row.split_state==1">拆单</a> -->
                     <!-- <a style="margin-right:10px" @click="handleSet(row,2)" v-show="type!=3">复制</a> -->
-                    <a style="margin-right:10px" @click="handleSet(row,3)">详情</a>
+                    <a style="margin-right:10px" @click="handleSet(row,3)" :disabled='row.explode_status==0'>详情</a>
                     <!-- <a @click="handleSet(row,4,$rowIndex)" v-show="type!=3">删除</a> -->
-                    <a @click="handleSet(row,5)" v-show="type==3&&row.explode_status==1&&row.status==0">下生产</a>
+                    <a @click="handleSet(row,5)" v-show="type==3&&row.explode_status==1" :disabled='row.status==1'>下生产</a>
               </template>
           </vxe-column>
         </vxe-table>
@@ -361,12 +399,61 @@
                 <Button type="primary" @click="handleDelSure">确认</Button>
             </div>
         </Modal>
+        <Modal title="批量修改内部图号" width='30' :closable='false' :mask-closable='false' v-model="showChangeUrlNumber">
+                <Select v-model="urlModalData.id" filterable clearable transfer>
+                 <Option v-for="(item,index) in inUrlNumber" :key="index" :value="item.id" :label="item.url_number"></Option>
+               </Select>
+               <div slot="footer">
+                <Button @click="showChangeUrlNumber=false">取消</Button>
+                <Button type="primary" @click="handleUrlSure">确认</Button>
+               </div>
+        </Modal>
+        <Modal title="用料统计" width='50' v-model="show_total" :closable='false' :mask-closable='false'>
+            <Table :data='totalData' :columns='totalColumns' border max-height='550'></Table>
+            <Page
+            style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="TotalChangeSize"
+          @on-change="TotalChangePage"
+          :current="TotalPageIndex"
+          show-total
+          :total="TotalTotal"
+          show-sizer
+          :page-size="TotalPageSize"
+          transfer
+        />
+        <div slot="footer" style="text-align:center">
+            <Button @click="show_total=false" style="width:200px" type="primary">取消</Button>
+        </div>
+        </Modal>
     </div>
 </template>
 <script>
 export default {
     data(){
         return{
+            delState:true,
+            totalState:true,
+            exportState:true,
+            takeApartState:true,
+            chooseData:[],
+            TotalPageSize:10,
+            TotalTotal:0,
+            TotalPageIndex:1,
+            totalData:[],
+            totalColumns:[
+                {title:'物料名称',align:'center',minWidth:120,key:'title'},
+                {title:'尺寸',align:'center',minWidth:120,key:'measure'},
+                {title:'面积',align:'center',minWidth:120,key:'area'},
+                {title:'长度',align:'center',minWidth:120,key:'long'},
+                {title:'数量',align:'center',minWidth:120,key:'num'}
+            ],
+            show_total:false,
+            urlModalData:{
+                   id:''
+            },
+            showChangeUrlNumber:false,
+            inUrlNumber:[],
             delData:{
                  user_name:'',
                  password:''
@@ -422,13 +509,13 @@ export default {
             urlNumberList:[],
             productTitleList:[],
             searchData:{
-                layer:'',
+                layer:[],
                 unit:'',
-                number:'',
+                number:[],
                 area:'',
                 house:'',
                 product_type:'',
-                url_number:'',
+                url_number:[],
                 title:'',
                 fashion:'',
                 explode_status:'',
@@ -500,6 +587,163 @@ export default {
            this.initData();
     },
     methods:{
+        handleBtn(e){
+        switch(e){
+            case 1:
+            case 2:
+                    this.handleChangeTakeApart()
+                  break;  
+            case 3:
+                this.handleChangeDel()
+                break;
+            case 4:
+                this.handleChangeExport()
+                break;
+            case 5:
+                this.handleChangeTotal()
+                break;
+        }
+        
+        },
+        handleSureState(){
+            let arr = this.tableData.filter(v=>(v.checked));
+this.takeApartState = false;
+this.delState = false;
+this.totalState = false;
+this.exportState = false;
+if(arr.length==0){
+    this.takeApartState = true;
+this.delState = true;
+this.totalState = true;
+this.exportState = true;
+    return;
+}
+    if(arr.find(v=>(v.status==0))){
+                this.delState = true;
+    }
+    if(arr.find(v=>(v.explode_status==0))){
+              this.totalState = true;        
+    }
+     if(arr.find(v=>(v.status==1||v.explode_status==0))){
+          this.exportState=true;
+    }
+            if(arr.find(v=>(v.status==1))){
+                this.takeApartState=true;
+            }  
+            
+            this.$forceUpdate();
+        },
+        cancelTotalChoose(){
+              this.tableData.forEach((v,index)=>{
+                v.checked = false;
+                this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)));
+              })
+              this.handleSureState();
+        },
+        handleChangeTotal(){
+            this.tableData.forEach((v,index)=>{
+                  if(v.explode_status==1){
+                    v.checked = true;
+                    }else{
+                        v.checked = false;
+                    }
+                   this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)));
+             })
+             this.handleSureState();
+        },
+        handleChangeExport(){
+             this.tableData.forEach((v,index)=>{
+                  if(v.status==0&&v.explode_status==1){
+                    v.checked = true;
+                    }else{
+                        v.checked = false;
+                    }
+                   this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)));
+             })
+             this.handleSureState();
+        },
+        handleChangeTakeApart(){
+            this.tableData.forEach((v,index)=>{
+                  if(v.status==0){
+                    v.checked = true;
+                    }else{
+                        v.checked = false;
+                    }
+                   this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)));
+             })
+             this.handleSureState();
+        },
+        handleChangeDel(){
+             this.tableData.forEach((v,index)=>{
+                  if(v.status==1){
+                    v.checked = true;
+                    }else{
+                        v.checked = false;
+                    }
+                     this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)));
+             })
+             this.handleSureState();
+        },
+        handleSingleCheck(row,index){
+             this.tableData.splice(index,1,row);
+             this.handleSureState();
+        },
+        handleTotalChange(e){
+            if(this.selectTrue){
+                this.tableData.forEach((v,index)=>{
+                    v.checked = true;
+                    this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)))
+                })
+                this.chooseData = JSON.parse(JSON.stringify(this.tableData));
+            }else{
+                this.tableData.forEach((v,index)=>{
+                   v.checked = false; 
+                   this.tableData.splice(index,1,JSON.parse(JSON.stringify(v)))
+                })
+                this.chooseData = [];
+            }
+        },
+        totalInitData(){
+            let id =[];
+            this.selectData.forEach(v=>{
+                id.push(v.id);
+            })
+            this.axios.post('/api/report_product_detail',{page_size:this.TotalPageSize,page_index:this.TotalPageIndex,id}).then(res=>{
+                   this.totalData = res.data.data;
+                   this.TotalTotal = res.data.total;
+            })
+        },
+        TotalChangePage(e){
+             this.TotalPageIndex = e;
+             this.totalInitData();
+        },
+        TotalChangeSize(e){
+             this.TotalPageSize = e;
+             this.TotalPageIndex = 1;
+             this.totalInitData();
+        },
+        handleTotal(){
+            // if(this.chooseData.length==0){
+            //     return this.$Message.warning('请先选择数据!')
+            // }
+            this.selectData = this.tableData.filter(v=>(v.checked));
+            this.totalInitData();
+            this.TotalPageSize=10;
+            this.TotalPageIndex=1;
+               this.show_total=true;
+        },
+        handleUrlSure(){
+            if(!this.urlModalData.id){
+                return this.$Message.warning('请选择内部图号!');
+            }
+          this.axios.post('/api/split_import_news',{list:this.selectData,consult_detail_id:this.urlModalData.id}).then(res=>{
+            if(res.code==200){
+                this.$Message.success(res.msg);
+                this.showChangeUrlNumber=false;
+                this.initData(this.proxyData);
+            }
+          })
+        },
         handleDelSure(){
            if(!this.delData.password||!this.delData.user_name){
             return this.$Message.warning('请输入完整信息!')
@@ -519,6 +763,7 @@ export default {
            })
         },
         handleDel(){
+            this.selectData = this.tableData.filter(v=>(v.checked));
               if(this.selectData.length==0){
             return this.$Message.warning('请选择要强制删除的数据!');
            }
@@ -529,6 +774,7 @@ export default {
               this.show_del=true;
         },
         handleExport(){
+            this.selectData = this.tableData.filter(v=>(v.checked));
            if(this.selectData.length==0){
             return this.$Message.warning('请选择要下生产的数据!');
            }
@@ -540,7 +786,7 @@ export default {
            this.selectData.forEach(v=>{
             data.push({
                 url_number:[v.url_number],
-                          cut_order_product_ids:v.cut_order_product_ids,
+                          cut_order_product_ids:v.cut_order_product_id,
                           measure:[v.measure],
                           house_id:[v.house_id],
                           order_no:v.order_no
@@ -596,17 +842,29 @@ export default {
              this.selectData = data;
              
         },
-        handleTakeApart(){
+        handleTakeApart(type){
+            this.selectData = this.tableData.filter(v=>(v.checked));
               if(this.selectData.length==0){
                 return this.$Message.warning('请选择需要拆单的数据!');
               }
-              if(!this.selectData.every(v=>(v.url_number==this.selectData[0].url_number))){
-                return this.$Message.warning('批量拆单只能选择一个图号!')
-              }
-              if(!this.selectData.every(v=>(v.status==0))){
-                return this.$Message.warning('选择的数据中有不能拆单的数据!')
+            //   if(!this.selectData.every(v=>(v.url_number==this.selectData[0].url_number))){
+            //     return this.$Message.warning('批量拆单只能选择一种图号!')
+            //   }
+            //   if(!this.selectData.every(v=>(v.status==0))){
+            //     return this.$Message.warning('选择的数据中有不能拆单的数据!')
+            //   }
+              if(type==1){
+                document.getElementsByClassName('ivu-upload-input')[0].click();
+              }else{
+                this.urlModalData.id='';
+                 //获取内部图号
+   this.axios.post('/api/consult_number_list',{order_no:this.$route.query}).then(res=>{
+    this.inUrlNumber = res.data.data;
+    this.showChangeUrlNumber = true; 
+   })
+                
               }
-              document.getElementsByClassName('ivu-upload-input')[0].click();
+              
         },
         handleNumSearch(){
               let obj = JSON.parse(JSON.stringify(this.modalNumData));
@@ -668,12 +926,16 @@ export default {
                this.initData(obj);
         },
           looks(img) {
-      const array = [{ img_url: img }];
+      const array = [];
+      img.forEach(v=>{
+        array.push({img_url:v})
+      })
       this.$previewImg({
         list: array,
         baseUrl: this.$store.state.ip,
         baseImgField: "img_url",
         baseTitleField: "",
+        showPrint:true
       });
     },
         initData(row){
@@ -689,7 +951,8 @@ export default {
             this.TableNumberList = res.data.number;
             this.TableLayerList = res.data.layer;
             this.tableData.forEach((v,index)=>{
-                v.index = index+1
+                v.index = index+1;
+                v.checked = false;
             })
            this.formData = JSON.parse(JSON.stringify(res.data));
            delete this.formData.detail;

+ 28 - 12
src/views/ProcessRoute/edit.vue

@@ -85,7 +85,17 @@
         {{ process_name }}
       </div>
 
-      <Table border :columns="tableColumns" :data="tableData"></Table>
+      <Table border :columns="tableColumns" :data="tableData">
+        <template slot="time" slot-scope="{row,index}">
+          <Input clearable placeholder="请输入" v-model="row.time" @on-change='handleChange(row,index)'/>
+        </template>
+        <template slot="wages" slot-scope="{row,index}">
+ <Input clearable placeholder="请输入" v-model="row.wages" @on-change='handleChange(row,index)'/>
+        </template>
+        <template slot="capacity" slot-scope="{row,index}">
+ <Input clearable placeholder="请输入" v-model="row.capacity" @on-change='handleChange(row,index)'/>
+        </template>
+      </Table>
     </div>
     <Modal
       class-name="vertical-center-modal"
@@ -354,9 +364,9 @@ export default {
         { title: "序号", type: "index", align: "center", key: "" ,resizable:true,width:200},
         // { title: 'ID', align: 'center', key: 'id' },
         { title: "工序名称", align: "center", key: "title" ,resizable:true,width:340},
-        { title: "工时", align: "center", key: "time" ,resizable:true,width:340},
-        { title: "工价", align: "center", key: "wages" ,resizable:true,width:340},
-        { title: "产能", align: "center", key: "capacity",minWidth:150 },
+        { title: "工时", align: "center", key: "time" ,resizable:true,width:340,slot:'time'},
+        { title: "工价", align: "center", key: "wages" ,resizable:true,width:340,slot:'wages'},
+        { title: "产能", align: "center", key: "capacity",minWidth:150,slot:'capacity' },
       ],
       tableData: [],
       processRouteId: "",
@@ -409,8 +419,11 @@ export default {
     this.getParts();
   },
   methods: {
+    handleChange(row,index){
+       this.tableData.splice(index,1,row);
+    },
     handleProcessLineSet(row, index) {
-      this.info.id = row.id;
+      // this.info.id = row.id;
       this.info.process_route_title = row.title;
       this.info.procedure_id = row.procedure_id;
       this.isNewProcess = false;
@@ -472,11 +485,12 @@ export default {
     postData() {
       const { type } = this.$route.query;
       this.info.op = type == 1 || type == 4 ? "add" : "edit";
+      console.log(this.info);
       let data = JSON.parse(JSON.stringify(this.info));
       data.technological_route_id = data.id;
       type == 4 ? (data.id = "") : "";
-      let properties = [],
-        procedure = [];
+      let properties=[],procedure=[],procedure_list = [];
+      procedure_list = this.tableData;
       data.list.forEach((element) => {
         element.cld.forEach((elem) => {
           elem.list.forEach((el) => {
@@ -494,6 +508,7 @@ export default {
       this.type == 1 ? delete data.id : "";
       data.properties = properties;
       data.procedure = procedure.join(",");
+      data.procedure_list = procedure_list;
       this.axios.post("/api/process_route_save", data).then((res) => {
         if (res.code == 200) {
           this.$Message.success(res.msg);
@@ -623,11 +638,12 @@ export default {
       }
     },
     handleSubmit(name) {
-      this.$refs[name].validate((valid) => {
-        if (valid) {
-          this.postData();
-        }
-      });
+      // this.$refs[name].validate((valid) => {
+      //   if (valid) {
+      //     this.postData();
+      //   }
+      // });
+      this.postData();
     },
     changeRadio(e) {},
     setBoxChange(parent, child) {

+ 516 - 0
src/views/ProcessRoute/newIndex.vue

@@ -0,0 +1,516 @@
+<template>
+    <div>
+        <Toptitle title="工艺组合">
+            <Button type="primary" @click="handleSet(0,null)">新增</Button>
+        </Toptitle>
+        <div style="height:85%;overflow:auto">
+        <Form :label-width='120' class='form_content'>
+            <FormItem :label='`${setHeaderList.find(v=>(v.sort==1)).title}分类`'>
+                <Input clearable v-model="searchData.title_1" placeholder="请输入" class="form_item"/>
+            </FormItem>
+           <FormItem label='部件'>
+ <Input clearable v-model="searchData.part_title" class="form_item" placeholder="请输入部件名称"/>
+           </FormItem>
+           <FormItem :label='`${setHeaderList.find(v=>(v.sort==2)).title}`'>
+             <Input clearable v-model="searchData.title_2" placeholder="请输入" class="form_item"/>
+           </FormItem>
+           <FormItem :label-width='40'>
+            <Button type="primary" @click="handleSearch">搜索</Button>
+            </FormItem> 
+        </Form>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
+            <template slot="set" slot-scope="{row}">
+                <a style="margin-right:10px" @click="handleSet(1,row)">复制</a>
+                <a style="margin-right:10px" @click="handleSet(2,row)">编辑</a>
+                <a style="margin-right:10px" @click="handleSet(3,row)">详情</a>
+                <a @click="handleSet(4,row)">删除</a>
+            </template>
+        </Table>
+        </div>
+         <div class="content_right_content_page">
+              <Page
+                :page-size-opts="[10, 20, 30, 40, 100,1000]"
+                @on-page-size-change="changeSize"
+                @on-change="changePage"
+                :current="pageIndex"
+                show-total
+                show-elevator
+                :total="total"
+                show-sizer
+                :page-size="pageSize"
+              />
+            </div>
+            <vxe-modal v-model="show_modal" width='1000' :showFooter='true'>
+              <div slot="header" class="head_modal">
+                <span style="font-size:20px">{{showType==0?'新增':showType==1?'复制':showType==2?'编辑':'详情'}}</span>
+                <Button type="primary" @click="handleAddLine" v-show="showType!=3">增行</Button>
+              </div>
+              <div slot="footer">
+                <Button @click="show_modal=false" style="margin-right:10px">取消</Button>
+                <Button type="primary" @click="handleSureModal">确认</Button>
+              </div>
+              <Form :label-width='120' style="display:flex;flex-wrap:wrap">
+                <FormItem label='工艺组合名称:'>
+                  <Input clearable filterable v-model="modalData.title" style="width:200px" :disabled='showType==3' placeholder="工艺组合名称"/>
+                </FormItem>
+                <FormItem :label='`${setHeaderList.find(v=>(v.sort==1)).title}分类`'>
+                  <Select v-model="modalData.process_1" clearable style="width:200px" filterable transfer :disabled='showType==3'>
+                  <Option v-for="item in paintList" :key="item.id" :value="item.id" :label='item.title'/>
+                  </Select>
+                </FormItem>
+                <FormItem label='部件'>
+                <Select style="width:200px" v-model="modalData.part_id" filterable multiple transfer :max-tag-count='2' :disabled='showType==3'>
+                  <Option v-for="item in partList" :key="item.id" :value="item.id" :label='item.title'/>
+                </Select>
+                </FormItem>
+                <FormItem :label='`${setHeaderList.find(v=>(v.sort==2)).title}分类`'>
+                <Select v-model="modalData.process_2" filterable clearable transfer style="width:200px" :disabled='showType==3'>
+                  <Option v-for="item in processList" :key="item.id" :value="item.id" :label='item.title'/>
+                </Select>
+                </FormItem>
+              </Form>
+          <vxe-table
+          v-show="showType==3"
+     max-height='500px'
+          border
+          :auto-resize='true'
+          show-overflow
+          show-footer
+          :footer-method="footerMethod"
+          :data="modalTableData"
+          :edit-config="{trigger: 'click', mode: 'row'}">
+          <vxe-column type="seq"  title="序号" width="60"></vxe-column>
+            <vxe-column field="procedure_title" title="工序" >
+              <template #default="{row}">
+                   <span>{{procedureList.find(v=>(v.id==row.procedure_id.split('_')[0]))&&procedureList.find(v=>(v.id==row.procedure_id.split('_')[0]*1)).title}}</span>
+              </template>
+            </vxe-column>
+            <vxe-column field="team_title" title="班组">
+              <template #default="{row}">
+                <span>{{employeeList.find(v=>(v.id==row.team_id))&&employeeList.find(v=>(v.id==row.team_id)).nickname}}</span>
+              </template>
+            </vxe-column>
+            <vxe-column field="price" title="工价" >
+            </vxe-column>
+            <vxe-column field="time" title="工时">
+            </vxe-column>
+        </vxe-table>      
+     <vxe-table
+     max-height='500px'
+     ref="vTable"
+      v-show="showType!=3"
+          border
+          show-footer
+          :auto-resize='true'
+          show-overflow
+          row-key
+          :data="modalTableData"
+          :footer-method="footerMethod"
+          :edit-config="{trigger: 'click', mode: 'row'}">
+          <vxe-column type="seq"  title="序号" width="60"></vxe-column>
+            <vxe-column field="procedure_title" title="工序" :edit-render="{}" >
+              <template #edit="{ row }">
+                 <Select v-model="row.procedure_id" placeholder="选择工序" transfer @on-change='(e)=>handleSelect(e,row)' filterable clearable>
+            <Option v-for="item in procedureList" :key="item.id" :value="`${item.id}_${item.employee_id}`" :label="item.title"></Option>
+          </Select>
+              </template>
+              <template #default="{row}">
+                    <span>{{procedureList.find(v=>(v.id==row.procedure_id.split('_')[0]))&&procedureList.find(v=>(v.id==row.procedure_id.split('_')[0]*1)).title}}</span>
+              </template>
+            </vxe-column>
+            <vxe-column field="team_title" title="班组" :edit-render="{}" >
+              <template #edit="{ row }">
+                <vxe-select v-model="row.team_id" placeholder="选择班组" :filterable='true' :transfer='true'>
+            <vxe-option v-for="item in employeeList" :key="item.id" :value="item.id" :label="item.nickname"></vxe-option>
+          </vxe-select>
+              </template>
+              <template #default="{row}">
+                <span>{{employeeList.find(v=>(v.id==row.team_id))&&employeeList.find(v=>(v.id==row.team_id)).nickname}}</span>
+              </template>
+            </vxe-column>
+            <vxe-column field="price" title="工价" :edit-render="{}" >
+              <template #edit="{ row }">
+                <vxe-input v-model="row.price" type="number" placeholder="请输入工价"></vxe-input>
+              </template>
+            </vxe-column>
+            <vxe-column field="time" title="工时" :edit-render="{}" >
+              <template #edit="{ row }">
+             <vxe-input v-model="row.time" type="number" placeholder="请输入工时"></vxe-input>
+            </template>
+            </vxe-column>
+            <vxe-column field="set" title="操作" align='center'>
+              <template #default="{row,rowIndex}">
+              <a style="margin-right:10px" @click="handleModalSet(0,row,rowIndex)">复制</a>
+              <a @click="handleModalSet(1,row,rowIndex)">删除</a>
+              </template>
+            </vxe-column>
+        </vxe-table>
+            </vxe-modal>
+    </div>
+</template>
+<script>
+import Sortable from 'sortablejs';
+export default {
+    data(){
+        return{
+          headerList:[
+            {sort:1,title:''},
+             {sort:2,title:''},
+          ],
+          employeeList:[],
+          procedureList:[],
+          partList:[],
+          processList:[],
+          paintList:[],
+            modalTableData: [],
+            modalData:{
+              process_1:'',
+              process_2:'',
+              part_id:[],
+              title:'',
+            },
+            showType:null,
+            proxyData:{},
+            pageSize:10,
+            pageIndex:1,
+            total:0,
+            show_modal:false,
+            modal_id:null,
+  searchData:{
+    title_1:'',
+    part_title:'',
+    title_2:''
+  },
+  tableData:[],
+  tableColumns:[
+    {title:'工艺组合名称',align:'center',minWidth:120,key:'title',sort:1},
+    {title:'部件',align:'center',minWidth:120,key:'part',sort:3,tooltip:true,ellipsis:true},
+    {title:'操作',align:'center',minWidth:120,key:'set',slot:'set',sort:5},
+  ]
+        }
+    },
+    computed:{
+       setHeaderList(){
+           return this.headerList;
+       },
+    },
+    created(){
+       //获取油漆分类
+  //      this.axios.get('/api/basics_properties_index').then(res=>{
+  //         this.headerList=res.data.data;
+  //         res.data.data.forEach(e => {
+  //           if(e.sort==1){//油漆
+  //           this.tableColumns.push({title:e.title,align:'center',key:e.sort,minWidth:120,sort:2})
+  //            this.axios.post('/api/properties_index',{id:e.id}).then(res=>{
+  //             this.paintList = res.data.data;
+  //            })
+  //           }else if(e.sort==2){//工艺
+  //            this.tableColumns.push({title:e.title,align:'center',key:e.sort,minWidth:120,sort:4})
+  // this.axios.post('/api/properties_index',{id:e.id}).then(res=>{
+  //             this.processList = res.data.data;
+  //            })
+  //           }
+  //         });
+  //         this.tableColumns.sort((a,b)=>(a.sort-b.sort))
+  //      })
+       //获取部件
+       this.axios.get('/api/parts_index').then(res=>{
+        this.partList = res.data.data;
+       })
+       //获取工序
+       this.axios.get('/api/procedure_index').then(res=>{
+        this.procedureList = res.data.data;
+       })
+       //获取班组
+    this.axios("/api/employee_list").then(
+      (res) => (this.employeeList = res.data.data)
+    );
+   
+    },
+    mounted(){   
+         this.getData();
+    },
+    methods:{
+       footerMethod ({ columns, data }) {
+              return [
+                columns.map((column, columnIndex) => {
+                  if (columnIndex === 0) {
+                    return '合计'
+                  }
+                  if (['price'].includes(column.property)) {
+                    return this.sumNum(data, column.property)
+                  }
+                  return null
+                })
+              ]
+            },
+             sumNum (list, field) {
+              let count = 0
+              list.forEach(item => {
+                count += Number(item[field])
+              })
+              return count.toFixed(2)
+            },
+     async getData(){
+  await this.axios.get('/api/basics_properties_index').then(res=>{
+          this.headerList=res.data.data;
+          res.data.data.forEach(e => {
+            if(e.sort==1){//油漆
+            this.tableColumns.push({title:e.title,align:'center',key:e.sort,minWidth:120,sort:2})
+             this.axios.post('/api/properties_index',{id:e.id}).then(res=>{
+              this.paintList = res.data.data;
+             })
+            }else if(e.sort==2){//工艺
+             this.tableColumns.push({title:e.title,align:'center',key:e.sort,minWidth:120,sort:4})
+  this.axios.post('/api/properties_index',{id:e.id}).then(res=>{
+              this.processList = res.data.data;
+             })
+            }
+          });
+          this.tableColumns.sort((a,b)=>(a.sort-b.sort))
+       })  
+      await this.initData(); 
+      },
+              //行拖拽
+        rowDrop() {
+            this.$nextTick(() => {
+                let xTable = this.$refs.vTable;
+               Sortable.create(xTable.$el.querySelector('.body--wrapper>.vxe-table--body tbody'), {
+                    handle: 'td',
+                    onEnd: ({
+                        newIndex,
+                        oldIndex
+                    }) => {
+                        // 换序操作
+                        let currRow = JSON.parse(JSON.stringify(this.modalTableData[oldIndex]));
+                        this.modalTableData.splice(oldIndex, 1);
+                        this.modalTableData.splice(newIndex, 0, currRow);
+                    }
+                })
+            })
+        },
+      handleSelect(e,row){
+         let str = e.split('_');
+         if(str[1]){
+             row.team_id = str[1]*1;
+         }else{
+          return
+         }
+      },
+      handleSureModal(){
+        if(!this.modalData.title||!this.modalData.process_1||!this.modalData.process_2||this.modalData.part_id.length==0){
+       return this.$Message.warning('请选择完整信息!')
+        }
+        if(!this.modalTableData.every(v=>(v.team_id))){
+          console.log(this.modalTableData);
+          return this.$Message.warning('请填写完整信息!')
+        }
+        let data = {};
+        if(this.showType==2){
+            data.id = this.modal_id
+        }
+        let procedure_list = [];
+      if(this.modalTableData.length!=0){
+        procedure_list = JSON.parse(JSON.stringify(this.modalTableData));
+        procedure_list.forEach(v=>{
+          v.procedure_id = v.procedure_id.split('_')[0]*1;
+        })
+      }
+       this.axios.post('/api/new_process_route_save',{process_list:[this.modalData.process_1,this.modalData.process_2],part_list:this.modalData.part_id,title:this.modalData.title,procedure_list,...data}).then(res=>{
+        if(res.code==200){
+          this.$Message.success(res.msg);
+          this.show_modal = false;
+          this.initData(this.proxyData);
+        }
+       })
+      },
+      handleModalSet(type,row,index){
+       
+            if(type){//删除
+       this.modalTableData.splice(index,1)
+          
+            }else{//复制
+ let obj = {
+             procedure_id:row.procedure_id,
+             time:row.time,
+             price:row.price,
+             team_id:row.team_id,
+             capacity:row.capacity||0,
+
+        }
+               this.modalTableData.splice(index,0,obj);
+            }
+            
+      },
+      handleAddLine(){
+        let obj = {
+             procedure_id:'',
+             time:'',
+             price:'',
+             team_id:'',
+             capacity:0
+        }
+               this.modalTableData.push(obj);
+      },
+        changeSize(e){
+this.pageSize = e;
+this.pageIndex=1;
+this.initData(this.proxyData);
+        },
+        changePage(e){
+this.pageIndex=e;
+this.initData(this.proxyData);
+        },
+        initData(row){
+          this.axios.get('/api/new_process_route_index',{params:{...row,page_size:this.pageSize,page_index:this.pageIndex}}).then(res=>{
+            console.log(this.setHeaderList);
+               res.data.data.forEach(v=>{
+                 v.part='';
+                 this.$nextTick(()=>{
+                     v.process_list.forEach(item=>{
+                          v[this.setHeaderList.find(m=>(m.id==item.basics_process_properties_id)).sort]=item.title
+                });
+                 })
+             
+                v.part_list.forEach((m,i)=>{
+                  if(i==v.part_list.length-1){
+                     v.part = v.part+m
+                  }else{
+                    v.part = v.part+m+','
+                  }
+                  
+                })
+               })
+               this.tableData = res.data.data;
+               this.total = res.data.total;
+          })
+        },
+        handleSearch(){
+          this.proxyData = JSON.parse(JSON.stringify(this.searchData));
+          this.pageIndex = 1;
+          this.initData(this.proxyData);
+        },
+        handleSet(type,row){
+              // 0 新增 1复制 2编辑 3详情 4删除
+              switch(type){
+                    case 0:
+                        this.showType=type;
+                         this.modalData={
+              process_1:'',
+              process_2:'',
+              part_id:[],
+              title:'',
+            };
+            this.modalTableData = [];
+                        this.show_modal = true;
+                         this.rowDrop()
+                    break;
+                    case 1:
+                      this.axios.get('/api/new_process_route_detail',{params:{id:row.id}}).then(res=>{
+                        this.modalData.part_id = res.data.part_list;
+                        this.modalData.title = res.data.title;
+                        res.data.procedure_list.forEach(v=>{
+                          v.procedure_id = `${v.procedure_id}_${v.team_id}`
+                        })
+                        this.modalTableData = res.data.procedure_list;
+                        res.data.process.forEach(v=>{
+                          if(this.headerList.find(m=>(m.sort==1)).id==v.basics_process_properties_id){
+                            this.modalData.process_1=v.process_properties_id
+                          }else if(this.headerList.find(m=>(m.sort==2)).id==v.basics_process_properties_id){
+                           this.modalData.process_2=v.process_properties_id
+                          }
+                        })
+                      
+                         this.showType=type;
+                        
+                        this.show_modal = true;
+                         this.rowDrop()
+                      })
+                       
+                    break;
+                    case 2:
+                       this.axios.get('/api/new_process_route_detail',{params:{id:row.id}}).then(res=>{
+                        this.modalData.part_id = res.data.part_list;
+                         this.modalData.title = res.data.title;
+                           res.data.procedure_list.forEach(v=>{
+                          v.procedure_id = `${v.procedure_id}_${v.team_id}`
+                        })
+                        this.modalTableData = res.data.procedure_list;
+                        res.data.process.forEach(v=>{
+                          if(this.headerList.find(m=>(m.sort==1)).id==v.basics_process_properties_id){
+                            this.modalData.process_1=v.process_properties_id
+                          }else if(this.headerList.find(m=>(m.sort==2)).id==v.basics_process_properties_id){
+                           this.modalData.process_2=v.process_properties_id
+                          }
+                        })
+                      this.modal_id = row.id;
+                         this.showType=type;
+                        
+                        this.show_modal = true;
+                         this.rowDrop()
+                      })
+                    break;
+                    case 3:
+                       this.axios.get('/api/new_process_route_detail',{params:{id:row.id}}).then(res=>{
+                        this.modalData.part_id = res.data.part_list;
+                         this.modalData.title = res.data.title;
+                           res.data.procedure_list.forEach(v=>{
+                          v.procedure_id = `${v.procedure_id}_${v.team_id}`
+                        })
+                        this.modalTableData = res.data.procedure_list;
+                        res.data.process.forEach(v=>{
+                          if(this.headerList.find(m=>(m.sort==1)).id==v.basics_process_properties_id){
+                            this.modalData.process_1=v.process_properties_id
+                          }else if(this.headerList.find(m=>(m.sort==2)).id==v.basics_process_properties_id){
+                           this.modalData.process_2=v.process_properties_id
+                          }
+                        })
+                      
+                         this.showType=type;
+                        
+                        this.show_modal = true;
+                         this.rowDrop()
+                      })
+                    break;
+                    case 4:
+                      this.confirmDelete({
+                        content:'确认删除?',
+                        title:'删除',
+                        then:()=>{
+                           this.axios.post('/api/new_process_route_del',{id:row.id}).then(res=>{
+                        if(res.code==200){
+                           this.$Message.success(res.msg);
+                           if(this.pageIndex!=1&&this.tableData.length==1){
+                            this.pageIndex--;
+                           }
+                           this.initData(this.proxyData);
+                        }
+                      })
+                        }
+                      })
+                    break;
+              };
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+.form_item{
+    width:200px
+}
+.form_content{
+    display: flex;
+    flex-wrap: wrap;
+    margin-top: 10px;
+}
+.content_right_content_page{
+    text-align: center;
+}
+.head_modal{
+  padding: 10px;
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+</style>

+ 172 - 0
src/views/ProductionOrderList/Deliverylist/confirm.vue

@@ -0,0 +1,172 @@
+
+<template>
+    <div>
+        <Toptitle title="发货单详情">
+            <Button @click="$router.go(-1)" style="margin-right:10px">返回</Button>
+             <Button
+          @click="outShip(selects, 1)"
+          type="warning"
+          ghost
+          style="margin-right:10px;"
+          >批量发货完成</Button
+        >
+        <Button
+          @click="outShip(selects, 2)"
+          type="success"
+          ghost
+          style="margin-right:10px;"
+          >批量收货完成</Button
+        >
+        </Toptitle>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550' @on-selection-change='handleSelect'>
+            <template slot="img" slot-scope="{row}">
+                <img v-for="(item,index) in row.url_img" :key="index" :src="$store.state.ip+item" alt="">
+            </template>
+            <template slot="set" slot-scope="{row}">
+                <a @click="goPage(row)" style="margin-right:10px">详情</a>
+                 <a
+          @click="outShip([row.orders_procedure_id], 1)"
+          v-show="row.in_out_value==0"
+          > 发货完成 </a
+        ><a
+          v-show='row.transportation_value==0&&row.in_out_value==1'
+          @click="row.in_out_value == 1?outShip([row.orders_procedure_id], 2):$Message.warning('请先确认发货')"
+          >收货完成</a
+        >
+            </template>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            selectedReturnArr:[],
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[{
+            order_no:'订单',
+            url_number:'01',
+            assembly:'产品组件',
+            house_number:'房号',
+            url_img:[],
+         }],
+         tableColumns:[
+            {type:'selection',align:'center',minWidth:100},
+            {title:'订单',key:'order_no',align:'center',minWidth:120},
+            {title:'图号',key:'url_number',align:'center',minWidth:120},
+            {title:'产品名称',key:'product_title',align:'center',minWidth:120},
+            {title:'产品组件',key:'compose_name',align:'center',minWidth:120},
+            {title:'房号',key:'house_title',align:'center',minWidth:120},
+            {title:'图纸',key:'url_img',align:'center',minWidth:120,slot:'img'},
+            {title:'发货状态',key:'out_confirm',align:'center',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.out_confirm==0?'未下指令':'已下指令')
+            }},
+             {title:'收货状态',key:'transport_confirm',align:'center',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.transport_confirm==0?'未收货':'已收货')
+             }},
+            {title:'操作',key:'set',align:'center',minWidth:120,slot:'set'},
+         ],
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        handleSelect(row){
+this.selectedReturnArr = row;
+        },
+         outShip(row, type) {
+      //type 1出库  2运输
+      if (type == 3) {
+        this.confirmDelete({
+          title: "包装完成",
+          content: "是否确认包装完成",
+          type: "primary",
+          then: () => {
+            console.log(row)
+            this.axios
+              .post("/api/orders_in", { orders_procedure_id: row.orders_procedure_id })
+              .then((res) => {
+                if (res.code == 200) {
+                  this.$Message.success(res.msg);
+                  this.getData(this.proxyObj);
+                }
+              });
+          },
+          cancel: (e) => {},
+        });
+      } else {
+        if (!row || row.length < 1) {
+          return this.$Message.error("请至少选择一项");
+        }
+        if(type == 2){
+          let arr = this.selectedReturnArr.filter(v=>{
+            return v.in_out_value==0
+          });
+          if(arr.length>0){
+            return this.$Message.warning('有未发货的数据不能收货')
+          }
+        }
+        let id = Array.isArray(row) ? row.join(",") : row.id;
+        let post_url =
+          type == 1 ? "/api/orders_transport" : '/api/orders_transport_confirm';
+        let params = {};
+        params.id = id;
+        this.confirmDelete({
+          title: type == 1 ? "发货完成" : "收获完成",
+          content: type == 1 ? "是否确认发货完成" : "是否确认收获完成",
+          type: "primary",
+          then: (e) => {
+            this.axios.post(post_url, params).then((res) => {
+              if (res.code == 200) {
+                this.$Message.success(res.msg);
+                this.selects = [];
+                this.getData(this.proxyObj);
+              }
+            });
+          },
+          cancel: (e) => {},
+        });
+      }
+    },
+        goPage(row){
+         this.$router.push({path:'/cms/productionorderlist/deliverylist/deliverylistDetail',query:{...this.$route.query,house_id:row.house_id,url_number:row.url_number,compose_name:row.compose_name}})
+        },
+        initData(obj){
+           this.axios.post('/api/new_product_transport_list',{order_no:this.$route.query.order_no,page_size:this.pageSize,page_index:this.pageIndex,...obj}).then(res=>{
+                   this.tableData = res.data.data;
+                   this.total = res.data.total;
+           })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 12 - 6
src/views/ProductionOrderList/Dispatchlist/confirm.vue

@@ -93,14 +93,15 @@ export default {
           title: "工序分类",
           align: "center",
           minWidth: 150,
-          key: "basic_title",
+          key: "basic_procedure",
         },
         {
           title: "工序",
           align: "center",
           minWidth: 150,
-          key: "procedure_title",
+          key: "procedure",
         },
+        {title:'组件',align:'center',minWidth:120,key:'compose_name'},
         {
           title: "工序状态",
           align: "center",
@@ -108,6 +109,7 @@ export default {
           render: (h, params) =>
             h("span", {}, params.row.rework_state == 1 ? "返工" : "正常"),
         },
+        {title:'产品名称',minWidth:120,align:'center',key:''},
         {
           title: "图号",
           align: "center",
@@ -116,7 +118,10 @@ export default {
           ellipsis: "true",
           tooltip: "true",
         },
-        { title: "班组信息", align: "center", minWidth: 150, key: "username" },
+        { title: "班组信息", align: "center", minWidth: 150, key: "username",render:(h,params)=>{
+          const {row} = params;
+          return h('span',{},row.team_id?row.team_id:row.user_id)
+        } },
         {
           title: "完工状态",
           align: "center",
@@ -132,7 +137,7 @@ export default {
             return h(
               "span",
               {},
-              parseInt(params.row.complete_rate * 100) + "%"
+              parseInt(params.row.complete_rate*1) + "%"
             );
           },
         },
@@ -332,7 +337,7 @@ export default {
     },
     getData(row) {
       this.loading = true;
-      this.axios("/api/orders_dispatch_produce_list", { params: {...row,order_no:this.$route.query.order_no,page_index:this.pageIndex,page_size:this.pageSize} }).then(
+      this.axios("/api/new_product_dispatch_list", { params: {...row,order_no:this.$route.query.order_no,page_index:this.pageIndex,page_size:this.pageSize} }).then(
         (res) => {
           if (res.code == 200) {
             this.loading = false;
@@ -414,8 +419,9 @@ export default {
         path: "/cms/productionorderlist/dispatchlist/details",
         query: {
           order_no: this.$route.query.order_no,
-          produce_id: row.produce_id,
+           produce_id: row.procedure_id,
           produce_time: row.produce_time,
+          compose_name:row.compose_name,
           // url_number: row.url_number,
           // procedure_title: row.procedure_title,
         },

+ 3 - 3
src/views/ProductionOrderList/Dispatchlist/details.vue

@@ -237,7 +237,7 @@ export default {
         },
         { title: "产品", align: "center", minWidth: 150, key: "product_title" },
         { title: "图号", align: "center", minWidth: 150, key: "url_number" },
-        { title: "位置", align: "center", minWidth: 150, key: "position" },
+        // { title: "位置", align: "center", minWidth: 150, key: "position" },
         { title: "部件", align: "center", minWidth: 150, key: "part_title" },
         {
           title: "零部件",
@@ -472,7 +472,7 @@ export default {
     },
   },
   mounted() {
-      this.axios.post("/api/orders_dispatch_detail", 
+      this.axios.post("/api/new_product_dispatch_detail", 
       {page_size:this.pageSize,page_index:this.pageIndex,...this.$route.query}).then((res) => {
         if (res.code == 200) {
           console.log(res);
@@ -660,7 +660,7 @@ export default {
     getData(row) {
       // row.page_size = this.pageSize;
       // row.page_index = this.pageIndex;
-      this.axios("/api/orders_dispatch_detail", { params:{...row,page_size:this.pageSize,page_index:this.pageIndex,...this.$route.query} }).then((res) => {
+      this.axios("/api/new_product_dispatch_detail", { params:{...row,page_size:this.pageSize,page_index:this.pageIndex,...this.$route.query} }).then((res) => {
         if (res.code == 200) {
           console.log(res);
           this.tableData = res.data.list;

+ 10 - 10
src/views/ProductionOrderList/Dispatchlist/list.vue

@@ -42,12 +42,12 @@
       </template>
       <template slot="set" slot-scope="{ row }">
         <div>
-          <a
+          <!-- <a
             v-if="persimissionData['原材料预算'] || persimissionData.all"
             class="map-margin"
             @click="goOriginalPage(row)"
             >原材料预算</a
-          >
+          > -->
           <!-- <a v-if='persimissionData["打印派工单"]||persimissionData.all'
              class="map-margin">打印派工单</a> -->
           <a
@@ -100,14 +100,14 @@ export default {
           key: "residential_name",
           minWidth: 200,
         },
-        {
-          title: "图号",
-          align: "center",
-          key: "url_number",
-          minWidth: 200,
-          ellipsis: "true",
-          tooltip: "true",
-        },
+        // {
+        //   title: "图号",
+        //   align: "center",
+        //   key: "url_number",
+        //   minWidth: 200,
+        //   ellipsis: "true",
+        //   tooltip: "true",
+        // },
         {
           title: "紧急程度",
           align: "center",

+ 246 - 0
src/views/ProductionOrderList/InboundForm/confirm.vue

@@ -0,0 +1,246 @@
+
+<template>
+    <div>
+        <Toptitle title="包装单详情">
+            <Button style="margin-right:10px" @click="$router.go(-1)">返回</Button>
+            <Button style="margin-right:10px" type="primary">批量包装完成</Button>
+            <Button type="primary">批量发货指令</Button>
+        </Toptitle>
+        <Form style="display:flex;flex-wrap:wrap;margin-top:10px" :label-width='100'>
+            <FormItem label='图号:'>
+                <Input clearable placeholder="请输入图号" style="width:200px"/>
+            </FormItem>
+            <FormItem label='产品名称:'>
+                <Input clearable placeholder="请输入产品名称" style="width:200px"/>
+            </FormItem>
+            <FormItem label='产品组件:'>
+                <Input clearable placeholder="请输入产品组件" style="width:200px"/>
+            </FormItem>
+            <FormItem label='房号:'>
+                <Input clearable placeholder="请输入房号" style="width:200px"/>
+            </FormItem>
+            <FormItem label='包装状态:'>
+                <Select filterable clearable style="width:200px">
+                    <Option label='未包装完成' :value="0"/>
+                    <Option label='已包装完成' :value="1"/>
+                </Select>
+            </FormItem>
+            <FormItem label='发货指令状态'>
+                <Select filterable clearable style="width:200px">
+                    <Option label='未下发货指令' :value="0"/>
+                    <Option label='已下发货指令' :value="1"/>
+                </Select>
+            </FormItem>
+            <FormItem label='包装日期:'>
+                <DatePicker type='daterange' placeholder='选择日期'></DatePicker>
+            </FormItem>
+            <FormItem :label-width='40'>
+                <Button type="primary" @click="handleSearch">搜索</Button> 
+            </FormItem>
+        </Form>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550' @on-selection-change='handleSelect'>
+            <template slot="img" slot-scope="{row}">
+                <img v-for="(item,index) in row.url_img" :key="index" :src="$store.state.ip+item" alt="">
+            </template>
+            <template slot="set" slot-scope="{row}">
+                <a @click="goPage(row)" style="margin-right:10px">详情</a>
+                <a @click="handleIn(row)" v-show="row.sub_state==2">包装完成</a>
+                <a @click="handleOut(row)" v-show="row.sub_state!=2&&row.overdue_state==0">发货指令</a>
+            </template>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+         <Modal
+        class-name="vertical-center-modal"
+        width="400"
+        title="发货指令"
+        v-model="showStock"
+        @on-ok="confirmOutStock"
+      >
+        <Form :label-width="100">
+          <FormItem label="选择班组">
+            <Select clearable v-model="info.user_id">
+              <Option
+                v-for="item of band_list"
+                :key="item.id"
+                :value="item.id"
+                :label="item.nickname"
+              ></Option>
+            </Select>
+          </FormItem>
+
+          <FormItem label="发货日期">
+            <DatePicker
+              v-model="time"
+              clearable
+              type="daterange"
+              placeholder="请选择日期"
+            ></DatePicker>
+          </FormItem>
+          <FormItem label="点工单形式">
+            <RadioGroup v-model="info.work_type">
+              <Radio :label="1">是</Radio>
+              <Radio :label="2">否</Radio>
+            </RadioGroup>
+          </FormItem>
+          <FormItem label="日薪" v-if="info.work_type == 1">
+            <Input v-model="info.user_salary">
+              <span slot="append">元</span>
+            </Input>
+          </FormItem>
+        </Form>
+      </Modal>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            searchData:{
+                
+            },
+            time:[],
+      band_list:[],
+            outData:[],
+            showStock:false,
+             info: {
+        user_id: "",
+        work_type: 2,
+        order_in_no: "",
+        start_time: "",
+        end_time: "",
+        user_salary: "",
+      },
+             modalData:[
+        {title:"选择班组:",value:'',list:[],is_select:true}
+        //  {title:"垛码:",value:'',is_select:false},
+      ],
+            selectData:[],
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[{
+            order_no:'订单',
+            url_number:'01',
+            assembly:'产品组件',
+            house_number:'房号',
+            url_img:[],
+         }],
+         tableColumns:[
+            {type:'selection',align:'center',minWidth:100},
+            {title:'订单号',key:'order_no',align:'center',minWidth:120},
+            {title:'图号',key:'url_number',align:'center',minWidth:120},
+            {title:'产品名称',key:'product_title',align:'center',minWidth:120},
+            {title:'产品组件',key:'compose_name',align:'center',minWidth:120},
+            {title:'房号',key:'house_title',align:'center',minWidth:120},
+            {title:'包装日期',key:'',align:'center',minWidth:120},
+            {title:'图纸',key:'url_img',align:'center',minWidth:120,slot:'img'},
+            {title:'包装状态',align:'center',minWidth:120,key:'sub_state',render:(h,params)=>{
+                const {row} = params;
+                return h('span',{}, row.sub_state==2?"未包装完成":'已包装完成')
+            }},
+            {title:"发货状态",align:'center',minWidth:120,key:'overdue_state',render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.overdue_state==0?'未下指令':'已下指令')
+            }},
+            {title:'操作',key:'set',align:'center',minWidth:150,slot:'set'},
+         ],
+         proxyData:{}
+        }
+    },
+    created(){
+         this.axios("/api/employee_list").then((res) => (this.band_list = res.data.data));
+//获取包装班组
+       this.axios.post('/api/orders_in_employee',{title:'包装'}).then(res=>{
+        this.modalData[0].list = res.data;
+       });
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        handleSearch(){
+          this.proxyData = JSON.parse(JSON.stringify(this.searchData));
+          this.pageIndex = 1;
+          this.initData(this.proxyData)
+        },
+        confirmOutStock(){
+             if (this.time) {
+        this.info.start_time = new Date(this.time[0])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+        this.info.end_time = new Date(this.time[1])
+          .toLocaleDateString()
+          .replace(/\//g, "-");
+      }
+      this.axios.post("/api/orders_out", {...this.info,...this.outData}).then((res) => {
+        if (res.code == 200) {
+          this.$Message.success(res.msg);
+          this.initData(this.proxyObj);
+          // setTimeout(()=>this.back(),500)
+        }
+      });
+        },
+        handleOut(row){
+       this.showStock = true;
+       this.outData = JSON.parse(JSON.stringify(row));
+        },
+        handleIn(row){
+ this.confirmDelete({
+        title: "包装完成",
+        content: "是否确认包装完成",
+        type: "primary",
+        formData:this.modalData,
+        then: () => {
+          this.axios
+            .post("/api/orders_in", { ...row,team_id:this.modalData[0].value})
+            .then((res) => {
+              if (res.code == 200) {
+                this.modalData[0].value = '';
+                this.$Message.success(res.msg);
+                this.initData(this.proxyObj);
+              }
+            });
+        },
+        cancel: () => {
+          this.$Message.warning("您取消了包装完成操作");
+        },
+      });
+        },
+        handleSelect(e){
+        this.selectData = e;
+        },
+        goPage(row){
+         this.$router.push({path:'/cms/productionorderlist/inboundform/details',query:{...this.$route.query,house_id:row.house_id,url_number:row.url_number,compose_name:row.compose_name}})
+        },
+        initData(obj){
+               this.axios.post('/api/new_product_box_list',{order_no:this.$route.query.order_no,...obj,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+this.tableData = res.data.data;
+this.total = res.data.total;
+               })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 25 - 25
src/views/ProductionOrderList/InboundForm/index.vue

@@ -78,13 +78,13 @@ export default {
           minWidth: 200,
         },
         // { title: "手机号", align: "center", key: "mobile", minWidth: 200 },
-        {
-          title: "紧急程度",
-          align: "center",
-          key: "warning_state",
-          minWidth: 100,
-          slot: "basicTypeSet",
-        },
+        // {
+        //   title: "紧急程度",
+        //   align: "center",
+        //   key: "warning_state",
+        //   minWidth: 100,
+        //   slot: "basicTypeSet",
+        // },
         {
           title: "包装进度",
           align: "center",
@@ -98,23 +98,23 @@ export default {
             );
           },
         },
-        {
-          title: "订单开始日期",
-          align: "center",
-          key: "start_time",
-          minWidth: 180,
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDate(params.row.start_time * 1, 1)),
-        },
-        {
-          title: "订单结束时间",
-          align: "center",
-          key: "end_time",
-          minWidth: 200,
-          render: (h, params) =>
-            h("span", {}, this.func.replaceDate(params.row.end_time * 1, 1)),
-        },
-        { title: "包装员", align: "center", key: "nickname", minWidth: 150 },
+        // {
+        //   title: "订单开始日期",
+        //   align: "center",
+        //   key: "start_time",
+        //   minWidth: 180,
+        //   render: (h, params) =>
+        //     h("span", {}, this.func.replaceDate(params.row.start_time * 1, 1)),
+        // },
+        // {
+        //   title: "订单结束时间",
+        //   align: "center",
+        //   key: "end_time",
+        //   minWidth: 200,
+        //   render: (h, params) =>
+        //     h("span", {}, this.func.replaceDate(params.row.end_time * 1, 1)),
+        // },
+        // { title: "包装员", align: "center", key: "nickname", minWidth: 150 },
         {
           title: "包装状态",
           align: "center",
@@ -293,7 +293,7 @@ export default {
     },
     goPage(row) {
       this.$router.push({
-        path: "/cms/productionorderlist/inboundform/details",
+        path: "/cms/productionorderlist/inboundform/confirm",
         query: {
           order_no: row.order_no,
           type: 4,

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

@@ -380,9 +380,9 @@ export default {
           key: "residential_name",
           minWidth: 200,
         },
-         { title: "图号", align: "center", key: "url_number", minWidth: 200,ellipsis:'true',tooltip:'true'
-          },
-        { title: "计划单号", align: "center", key: "plan_no", minWidth: 200 },
+        //  { title: "图号", align: "center", key: "url_number", minWidth: 200,ellipsis:'true',tooltip:'true'
+        //   },
+        // { title: "计划单号", align: "center", key: "plan_no", minWidth: 200 },
         // {
         //   title: "订单类型",
         //   align: "center",
@@ -742,7 +742,7 @@ export default {
     },
     goDetail(row) {
       this.$router.push({
-        path: "/cms/productionorderlist/productionplanlist/details",
+        path: "/cms/productionorderlist/productionplanlist/confirm",
         query: {
           order_no: row.order_no,
           plan_no: row.plan_no,

+ 114 - 0
src/views/ProductionOrderList/ProductionPlanlist/confirm.vue

@@ -0,0 +1,114 @@
+
+<template>
+    <div>
+        <Toptitle title="生产排产详情">
+            <Button @click="$router.go(-1)">返回</Button>
+        </Toptitle>
+         <Form :label-width='100' style="margin-top:10px;display:flex;flex-wrap:wrap">
+            <FormItem label='图号:'>
+                <Input clearable style="width:200px" placeholder="请输入图号"/>
+            </FormItem>
+            <FormItem label='组件:'>
+                <Input clearable style="width:200px" placeholder="请输入组件"/>
+            </FormItem>
+            <FormItem label='房号:'>
+                <Input clearable style="width:200px" placeholder="请输入房号"/>
+            </FormItem>
+             <FormItem label='派工状态:'>
+               <Select filterable clearable v-model="searchData.state" style="width:200px">
+                <Option label="未派工" :value="0"></Option>
+                <Option label="已派工" :value="1"></Option>
+               </Select>
+            </FormItem>
+            <FormItem :label-width='30'>
+                <Button type="primary" @click="handleSearch">搜索</Button>
+            </FormItem>
+        </Form>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
+            <template slot="img" slot-scope="{row}">
+                <img v-for="(item,index) in row.url_img" :key="index" :src="$store.state.ip+item" alt="">
+            </template>
+            <template slot="set" slot-scope="{row}">
+                <a @click="goPage(row)">详情</a>
+            </template>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            searchData:{},
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[{
+            order_no:'订单',
+            url_number:'01',
+            assembly:'产品组件',
+            house_number:'房号',
+            url_img:[],
+         }],
+         tableColumns:[
+            {title:'订单号',key:'order_no',align:'center',minWidth:120},
+            {title:'图号',key:'url_number',align:'center',minWidth:120},
+            {title:'产品名称',key:'product_title',align:'center',minWidth:120},
+            {title:'产品组件',key:'compose_name',align:'center',minWidth:120},
+            {title:'房号',key:'house_title',align:'center',minWidth:120},
+            {title:'图纸',key:'url_img',align:'center',minWidth:120,slot:'img'},
+            {title:'派工状态',key:'state',align:'center',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.state==0?'未派工':'已派工')
+            }},
+            {title:'操作',key:'set',align:'center',minWidth:120,slot:'set'},
+         ],
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        handleSearch(){
+         this.proxyData = JSON.parse(JSON.stringify(this.searchData));
+             this.pageIndex=1;
+             this.initData(this.proxyData); 
+        },
+        goPage(row){
+         this.$router.push({path:'/cms/productionorderlist/productionplanlist/details',query:{...this.$route.query,house_id:row.house_id,
+compose_name:row.compose_name,
+url_number:row.url_number}})
+        },
+        initData(obj){
+              this.axios.post('/api/new_product_scheduling_list',{order_no:this.$route.query.order_no,...obj,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+                this.tableData = res.data.data;
+                this.total = res.data.total;
+            })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 2 - 2
src/views/ProductionOrderList/ProductionPlanlist/details.vue

@@ -213,7 +213,7 @@ export default {
           key: "url_number",
           minWidth: 100,
         },
-        { title: "位置", align: "center", key: "position", minWidth: 100 },
+        // { title: "位置", align: "center", key: "position", minWidth: 100 },
         // {
         //   title: "位置",
         //   align: "center",
@@ -394,7 +394,7 @@ export default {
     },
     getData(row) {
       this.axios
-        .get("/api/orders_procedure_list", { params: row })
+        .get("/api/new_product_scheduling_detail", { params: row })
         .then((res) => {
           this.logList = res.data.detail;
           this.tableData = res.data.list;

+ 19 - 19
src/views/ProductionOrderList/ProductionsOrder/BST_Decorationlist.vue

@@ -17,7 +17,7 @@
       :total="total"
     >
       <div slot="titleButton">
-        <Button type="primary" @click="handleTotalPost"  style="margin-right: 30px">一键下排产</Button>
+        <!-- <Button type="primary" @click="handleTotalPost"  style="margin-right: 30px">一键下排产</Button> -->
          <Dropdown trigger="click" transfer style="margin-right: 30px;
     border: 1px solid rgb(45, 140, 240);
     width: 75px;
@@ -36,7 +36,7 @@
             <DropdownItem name='1'>修改尺寸</DropdownItem>
             <DropdownItem name='2'>批量打印芯片</DropdownItem>
             <DropdownItem name='3'>批量修改工艺路线</DropdownItem>
-            <DropdownItem name='4'>批量下生产排产</DropdownItem>
+            <!-- <DropdownItem name='4'>批量下生产排产</DropdownItem> -->
             <DropdownItem name='5'>批量打印订单</DropdownItem>
             <!-- <DropdownItem name='6'>下计划</DropdownItem> -->
         </DropdownMenu>
@@ -81,9 +81,9 @@
           <a @click="printChip(row)">打印芯片</a>
           <!-- <a @click="bingChip(row)">绑定芯片</a> -->
           <!-- <a @click="bingChip(row)" v-if="row.tagnum&&row.part_tag">更换芯片</a> -->
-          <a @click="openModal(row)" :disabled="row.part_state != 0"
+          <!-- <a @click="openModal(row)" :disabled="row.part_state != 0"
             >下生产排产</a
-          >
+          > -->
           <!-- <a @click="downImg(row.url,row.product_title)">下载图纸</a> -->
         </div>
       </template>
@@ -660,7 +660,7 @@ export default {
           },
         },
 
-        { title: "单价", align: "center", key: "price", minWidth: 100 },
+        // { title: "单价", align: "center", key: "price", minWidth: 100 },
         { title: "产品", align: "center", key: "product_title", minWidth: 150 },
         {
           title: "图纸",
@@ -697,12 +697,12 @@ export default {
           key: "url_number",
           minWidth: 100,
         },
-        {
-          title: "位置",
-          align: "center",
-          key: "position",
-          minWidth: 100,
-        },
+        // {
+        //   title: "位置",
+        //   align: "center",
+        //   key: "position",
+        //   minWidth: 100,
+        // },
         { title: "部件名", align: "center", key: "part_title", minWidth: 200 },
         {
           title: "部件测量数据",
@@ -777,13 +777,13 @@ export default {
         //   render: (h, params) =>
         //     h("span", {}, params.row.sub_is_tag == 0 ? "否" : "是"),
         // },
-        {
-          title: "排产状态",
-          align: "center",
-          minWidth: 120,
-          render: (h, params) =>
-            h("span", {}, params.row.part_state == 0 ? "未下排产" : "已下排产"),
-        },
+        // {
+        //   title: "排产状态",
+        //   align: "center",
+        //   minWidth: 120,
+        //   render: (h, params) =>
+        //     h("span", {}, params.row.part_state == 0 ? "未下排产" : "已下排产"),
+        // },
           {
           title: "计划状态",
           align: "center",
@@ -1118,7 +1118,7 @@ switch(e){
     },
     getData(row) {
       this.loading = true;
-      this.axios("/api/orders_produce_parts_list", { params: row }).then(
+      this.axios("/api/new_product_detail", { params: row }).then(
         (res) => {
           this.loading = false;
           this.order_no = res.data.order_no;

+ 1 - 1
src/views/ProductionOrderList/ProductionsOrder/BST_list.vue

@@ -505,7 +505,7 @@ export default {
     },
     goDetial(row) {
       this.$router.push({
-        path: "/cms/productionorderlist/productionsorder/bst_Decorationlist",
+        path: "/cms/productionorderlist/productionsorder/confirm",
         query: {
           order_no: row.order_no,
           type: "produce",

+ 219 - 0
src/views/ProductionOrderList/ProductionsOrder/confirm.vue

@@ -0,0 +1,219 @@
+
+<template>
+    <div>
+        <Toptitle title="生产订单详情">
+            <!-- <Button type="primary" style="margin-right:10px" @click="handlePlan(1)">一键下排产</Button> -->
+            <Button type="primary" style="margin-right:10px" @click="handlePlan(2)">批量下排产</Button>
+            <Button @click="$router.go(-1)">返回</Button>
+        </Toptitle>
+        <Form :label-width='100' style="margin-top:10px;display:flex;flex-wrap:wrap">
+            <FormItem label='图号:'>
+                <Input clearable style="width:200px" placeholder="请输入图号" v-model="searchData.url_number"/>
+            </FormItem>
+            <FormItem label='组件:'>
+                <Input clearable style="width:200px" placeholder="请输入组件" v-model="searchData.compose_name"/>
+            </FormItem>
+            <FormItem label='房号:'>
+                <Input clearable style="width:200px" placeholder="请输入房号" v-model="searchData.house_title"/>
+            </FormItem>
+            <FormItem label='排产状态:'>
+                <Select clearable style="width:200px" v-model="searchData.state">
+                    <Option label='已下排产' :value="1"/>
+                    <Option label="未下排产" :value="0"/>
+                </Select>
+            </FormItem>
+            <FormItem :label-width='30'>
+                <Button type="primary" @click="handleSearch">搜索</Button>
+            </FormItem>
+        </Form>
+        <div style="height:75%;overflow:auto">
+        <Table border :data='tableData' :columns='tableColumns' max-height='550' @on-selection-change='handleSelect'>
+            <template slot="img" slot-scope="{row}">
+                <img v-for="(item,index) in row.url_img" :key="index" :src="$store.state.ip+item" alt="">
+            </template>
+            <template slot="set" slot-scope="{row}">
+                <a @click="goPage(row)" style="margin-right:10px">详情</a>
+                <a @click="handlePlan(3,row)" v-show="row.state==0">下排产</a>
+            </template>
+        </Table>
+        </div>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+        <Modal v-model="show_plan" title="下排产" :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>
+        </FormItem>
+      </Form>
+    </Modal>
+    </div>
+</template>
+<script>
+import { isArray } from 'xe-utils';
+export default {
+    data(){
+        return{
+          searchData:{
+              url_number:'',
+compose_name:'',
+house_title:'',
+state:''
+          },
+            prId:[],
+            unPrId:false,
+            basics_procedure_list:[],
+            selects:[],
+            show_plan:false,
+            options:{},
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[],
+         tableColumns:[
+            {type:'selection',align:'center',minWidth:100},
+            {title:'订单号',key:'order_no',align:'center',minWidth:120},
+            {title:'图号',key:'url_number',align:'center',minWidth:120},
+            {title:'产品名称',key:'product_title',align:'center',minWidth:120},
+            {title:'产品组件',key:'compose_name',align:'center',minWidth:120},
+            {title:'房号',key:'house_title',align:'center',minWidth:120},
+            {title:'图纸',key:'url_img',align:'center',minWidth:120,slot:'img'},
+            {title:'排产状态',key:'state',align:'center',minWidth:120,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},row.state==0?'未下排产':'已下排产')
+            }},
+            {title:'操作',key:'set',align:'center',minWidth:120,slot:'set'},
+         ],
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        handleSelect(e){
+           this.selects = e;
+           console.log(this.selects)
+        },
+        handlePlan(type,row){
+           //type 1一键下排产 2批量下排产 3下排产
+           if(type==2&&this.selects.length==0){
+            return this.$Message.warning('请选择数据!');
+           }
+            if(this.selects.find((v)=>(v.state==1))&&type==2){
+                return this.$Message.warning('选择的数据中有不能下排产的数据!')
+              }
+           switch(type){
+            case 1:
+                this.unPrId = true;
+                break;
+            case 2:
+                 this.unPrId = false;
+                 this.prId = [];
+                 this.selects.forEach(v=>{
+                    this.prId.push(v);
+                 })
+                break;
+            case 3:
+                this.unPrId = false;
+                this.prId = [row];
+                break;
+           }
+           this.axios.get('/api/basics_procedure_index').then(res=>{
+         this.basics_procedure_list = res.data.data.filter(v=>{
+           return v.type==1||v.type==4
+         })
+      })
+           this.show_plan = true;
+        },
+        handleSearch(){
+             this.proxyData = JSON.parse(JSON.stringify(this.searchData));
+             this.pageIndex=1;
+             this.initData(this.proxyData); 
+        },
+        finishDataTrue(){
+ let arr = [];
+      this.basics_procedure_list.forEach(m=>{
+       let obj = {};
+       obj.id = m.id;
+       obj.start_time =m.time[0]?Date.parse(m.time[0]).toString().slice(0,10):'';
+      obj.end_time =m.time[1]?Date.parse(m.time[1]).toString().slice(0,10):'';
+      arr.push(obj);
+      })
+        if(this.unPrId){
+          this.axios.post('/api/batch_orders_plan',{order_no:this.$route.query.order_no,...this.proxyObj,time_list:{...arr}}).then(res=>{
+              if(res.code==200){
+             this.$Message.success(res.msg);
+             this.initData(this.proxyObj);
+           }
+          })
+        }else{
+           this.prId.forEach(v=>{
+            setTimeout(()=>{
+this.axios.post('/api/orders_plan',{...v,time_list:{...arr}}).then(res=>{
+           if(res.code==200){
+             this.$Message.success(res.msg);
+             this.initData(this.proxyObj);
+           }
+        })
+            },1000)
+          })
+        }
+        },
+        timeFocus(e,row){
+           if(e){
+          let ids = [];
+          this.selects.forEach(v=>{
+            ids.push(v.id)
+          })
+           this.axios.post('/api/bst_get_plan_time',{type:0,id:[row.id],ids,order_no:this.$route.query.order_no}).then(res=>{
+          if(res.code == 200){
+             let time = [];
+             res.data.forEach(v=>{
+                 time.push(v*1000);
+             })
+            //  console.log(Date.parse(new Date()))
+              this.options = {
+        disabledDate(date) {
+          return date && (date.valueOf() < time[0]||date.valueOf()>time[1]);
+        }
+      }
+          }
+        })
+      }
+        },
+        goPage(row){
+         this.$router.push({path:'/cms/productionorderlist/productionsorder/BST_Decorationlist',query:{...this.$route.query,house_id:row.house_id,
+compose_name:row.compose_name,
+url_number:row.url_number}})
+        },
+        initData(obj){
+            this.axios.post('/api/new_product_list',{order_no:this.$route.query.order_no,...obj,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+                this.tableData = res.data.data;
+                this.total = res.data.total;
+            })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 68 - 0
src/views/WorkTime/confirm.vue

@@ -0,0 +1,68 @@
+<template>
+    <div>
+        <Toptitle title="项目详情">
+            <Button @click="$router.go(-1)">返回</Button>
+        </Toptitle>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
+            <template slot="set" slot-scope="{row}">
+                <a @click="goDetail(row)">详情</a>
+            </template>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[],
+         tableColumns:[
+            {title:'产品名称',align:'center',minWidth:120,key:'product_title'},
+            {title:'图号',align:'center',minWidth:120,key:'url_number'},
+            {title:'操作',align:'center',minWidth:120,slot:'set'}
+         ],
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        goDetail(row){
+          this.$router.push({path:'/cms/WorkTime/detail',query:{...this.$route.query,product_title:row.product_title,url_number:row.url_number}});
+        },
+        initData(obj){
+          this.axios.post('/api/report_product_list',{order_no:this.$route.query.order_no,...obj,page_size:this.pageSize,page_index:this.pageIndex}).then(res=>{
+             this.tableData = res.data.data;
+             this.total = res.data.total;
+          })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 182 - 0
src/views/WorkTime/detail.vue

@@ -0,0 +1,182 @@
+<template>
+    <div>
+        <Toptitle title="详情">
+            <Button @click="$router.go(-1)" style="margin-right:10px">返回</Button>
+            <Button type="primary" @click="handleChangeWork">修改工时工价</Button>
+        </Toptitle>
+        <Table border :data='tableData' :columns='SureColumns' max-height='550'>
+        </Table>
+        <Page
+        style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+        <Modal title="修改工时工价" v-model="show_work" :closeable='false' :mask-closeable='false'>
+             <Table :data='modalTableData' :columns='modalTableColumns' border max-height='550'>
+                 <template slot="time" slot-scope="{row,index}">
+          <Input clearable placeholder="请输入" v-model="row.time" @on-change='handleChange(row,index)'/>
+        </template>
+        <template slot="price" slot-scope="{row,index}">
+ <Input clearable placeholder="请输入" v-model="row.price" @on-change='handleChange(row,index)'/>
+        </template>
+        <template slot="capacity" slot-scope="{row,index}">
+ <Input clearable placeholder="请输入" v-model="row.capacity" @on-change='handleChange(row,index)'/>
+        </template>
+             </Table>
+             <div slot="footer">
+                <Button style="margin-right:10px" @click="show_work=false">取消</Button>
+                <Button type="primary" @click="handleSure">确认</Button>
+             </div>
+        </Modal>
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+            modalTableData:[],
+            modalTableColumns:[
+                {title:'工序',align:'center',minWidth:120,key:'title'},
+               {title:'工价',align:'center',minWidth:120,key:'time',slot:'time'},
+               {title:'工时',align:'center',minWidth:120,key:'price',slot:'price'},
+               {title:'产能',align:'center',minWidth:120,key:'capacity',slot:'capacity'},
+            ],
+         show_work:false,
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[],
+         tableColumns:[
+            // {title:'项目名称',align:'center',minWidth:120,key:'residential_name'},
+            {title:'楼层',align:'center',minWidth:120,key:'layer'},
+            {title:'房间号',align:'center',minWidth:120,key:'number'},
+            {title:'名称',align:'center',minWidth:120,key:'title'},
+            {title:'图号',align:'center',minWidth:120,key:'url_number'},
+            {title:'饰面',align:'center',minWidth:120,key:'finishing'},
+            {title:'规格',align:'center',minWidth:120,key:'measure'},
+            {title:'数量',align:'center',minWidth:120,key:'num'},
+            {title:'单位',align:'center',minWidth:120,key:'unit'},
+            {title:'备注',align:'center',minWidth:120,key:'remark'},
+            {title:'下单日期',align:'center',minWidth:120,key:'push_date',render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},this.func.replaceDateNoHMS(row.push_date))
+            }},
+            {title:'计划投产日期',align:'center',minWidth:120,key:''},
+            {title:'单价',align:'center',minWidth:120,key:'unit_price'},
+            {title:'金额',align:'center',minWidth:120,key:'total_price'},
+            {title:'整体完成情况',align:'center',minWidth:120,children:[
+                {title:'计划交货日期',align:'center',minWidth:100,key:'plan_date'},
+                {title:'实际交货日期',align:'center',minWidth:100,key:'actual_date'}
+            ]},
+            {title:'材料到货',align:'center',minWidth:120,key:'material_arrive'},
+            {title:'生产编码',align:'center',minWidth:120,key:'product_code'},
+            {title:'单价',align:'center',minWidth:120,key:'material_unit_price'},
+            {title:'金额',align:'center',minWidth:120,key:'material_total_price'},
+            {title:'计划达成识别',align:'center',minWidth:120,key:''},
+            // {title:'饰面加工',align:'center',minWidth:120,children:[
+            //     {title:'饰面工(3天)',minWidth:120,key:'',align:'center'},
+            //     {title:'工价',minWidth:120,key:'',align:'center'},
+            //     {title:'裁皮',minWidth:120,align:'center',children:[
+            //         {title:'计划',key:'',align:'center',minWidth:100},
+            //         {title:'实际',key:'',align:'center',minWidth:100},
+            //     ]},
+            //      {title:'裁皮',minWidth:120,align:'center',children:[
+            //         {title:'计划',key:'',align:'center',minWidth:100},
+            //         {title:'实际',key:'',align:'center',minWidth:100},
+            //     ]},
+            //      {title:'裁皮',minWidth:120,align:'center',children:[
+            //         {title:'计划',key:'',align:'center',minWidth:100},
+            //         {title:'实际',key:'',align:'center',minWidth:100},
+            //     ]},
+            //      {title:'裁皮',minWidth:120,align:'center',children:[
+            //         {title:'计划',key:'',align:'center',minWidth:100},
+            //         {title:'实际',key:'',align:'center',minWidth:100},
+            //     ]},
+            //      {title:'裁皮',minWidth:120,align:'center',children:[
+            //         {title:'计划',key:'',align:'center',minWidth:100},
+            //         {title:'实际',key:'',align:'center',minWidth:100},
+            //     ]},
+            // ]}
+         ],
+         setColumns:[],
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    computed:{
+         SureColumns(){
+            return [...this.tableColumns,...this.setColumns,
+            {title:'软包工',key:'',align:'center',minWidth:120},
+             {title:'软包工价',key:'',align:'center',minWidth:120},
+              {title:'软包计划',key:'',align:'center',minWidth:120},
+               {title:'软包完工',key:'',align:'center',minWidth:120},
+                {title:'备注',key:'',align:'center',minWidth:120},
+                 {title:'物流',align:'center',minWidth:120,children:[
+                    {title:'搬运日期',key:'',minWidth:120,align:'center'},
+                    {title:'发货日期',key:'',minWidth:120,align:'center'},
+                 ]}
+            ]
+         }
+    },
+    methods:{
+        handleChange(row,index){
+                this.modalTableData.splice(index,1,row);
+        },
+        handleSure(){
+               this.initData({procedure_list:this.modalTableData})
+               this.show_work = false;
+        },
+        handleChangeWork(){
+         this.show_work = true;
+        },
+        initData(obj){
+              this.axios.post('/api/report_plan_detail',{...this.$route.query,page_size:this.pageSize,page_index:this.pageIndex,...obj}).then(res=>{
+                  this.setColumns = [];
+                  res.data.basic_procedure.forEach(ele => {
+                    let obj = {title:ele.title,align:'center',children:[]};
+                    ele.list.forEach(v=>{
+                        obj.children.push({title:v.title,align:'center',children:[{title:"计划时间",minWidth:120,align:'center',key:`${v.id}_plan_date`,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},this.func.replaceDateNoHMS(row[`${v.id}_plan_date`]))
+            }},{title:'实际时间',align:'center',minWidth:120,key:`${v.id}_actual_date`,render:(h,params)=>{
+                const {row} = params;
+                return h('span',{},this.func.replaceDateNoHMS(row[`${v.id}_actual_date`]))
+            }}]});
+
+                    })
+                    this.setColumns.push(obj);
+                  });
+                  res.data.list.forEach(v=>{
+                    v.procedure_list.forEach(e=>{
+                        v[`${e.id}_plan_date`] = e.plan_date;
+                         v[`${e.id}_actual_date`] = e.actual_date;
+                    })
+                  })
+                  this.tableData = res.data.list;
+                  this.modalTableData = res.data.procedure_list;
+              })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 70 - 0
src/views/WorkTime/list.vue

@@ -0,0 +1,70 @@
+<template>
+    <div>
+        <Toptitle title="工价工时表"></Toptitle>
+        <div style="height:85%;overflow:auto">
+        <Form>
+        </Form>
+        <Table border :data='tableData' :columns='tableColumns' max-height='550'>
+            <template slot-scope="{row}" slot="set">
+                <a @click="goDetail(row)">详情</a>
+            </template>
+        </Table>
+        </div>
+        <Page
+      style="text-align:center;margin-top:10px"
+          :page-size-opts="[10, 20, 30, 40, 100]"
+          @on-page-size-change="changeSize"
+          @on-change="changePage"
+          :current="pageIndex"
+          show-total
+          show-elevator
+          :total="total"
+          show-sizer
+          :page-size="pageSize"
+        />
+    </div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+         total:0,
+         pageSize:10,
+         pageIndex:1,
+         tableData:[],
+         tableColumns:[
+            {title:'项目编号',align:'center',key:'order_no',minWidth:120},
+            {title:'项目名称',align:'center',key:'residential_name',minWidth:120},
+            {title:'操作',key:'set',slot:'set',align:'center',minWidth:120}
+         ],
+         proxyData:{}
+        }
+    },
+    mounted(){
+      this.initData();
+    },
+    methods:{
+        goDetail(row){
+           this.$router.push({path:'/cms/WorkTime/confirm',query:{order_no:row.order_no}});
+        },
+        initData(obj){
+             this.axios.post('/api/orders_produce_order_list',{page_size:this.pageSize,page_index:this.pageIndex,...obj}).then(res=>{
+                this.tableData = res.data.data;
+                this.total = res.data.total;
+             })
+        },
+        changeSize(e){
+             this.pageSize = e;
+             this.pageIndex = 1;
+             this.initData(this.proxyData);
+        },
+        changePage(e){
+            this.pageIndex = e;
+            this.initData(this.proxyData);
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+
+</style>