mushencc 3 سال پیش
والد
کامیت
8138224c81

+ 90 - 27
src/views/BidSystem/DeepeningOrder/changeDetail.vue

@@ -2,18 +2,17 @@
   <div class="changeDetail">
     <Toptitle title="变更">
       <slot name="titleButton">
-        <Button
-          @click="handleFinish()"
-          type="primary"
-          style="margin-right: 10px"
-          >变更保存</Button
-        >
-        <Button
+         <Button
           @click="goback()"
           type="primary"
           ghost
           style="margin-right: 10px"
-          >取消</Button
+          >取消</Button>
+         <Button
+          @click="handleFinish()"
+          type="primary"
+          style="margin-right: 10px"
+          >变更保存</Button
         >
       </slot>
     </Toptitle>
@@ -175,7 +174,7 @@
                 style="width: auto"
               >{{this.$route.query.order_no}}</span>
             </FormItem>
-            <FormItem label="接部门:">
+            <FormItem label="接部门:">
               <Select
                 filterable
                 clearable
@@ -339,7 +338,7 @@
                 />
               </div>
               <template style="flex" >
-                <div style="display: flex; justify-content: center" v-if="row.status ==0||row.status == 1">
+                <div style="display: flex; justify-content: center" v-if="row.input_state">
                   <Icon
                     size="50"
                     @click="
@@ -387,7 +386,7 @@
           <span v-else>{{ tableData[index].model }}</span>
         </template>
          <template slot="status" slot-scope="{ row }">
-          <span>{{ row.status === 0||row.status === 4 ?'变更':'新增' }}</span>
+          <span>{{ row.status === 5 ||row.status === 0||row.status === 2?'':row.status === 4?'变更':'新增' }}</span>
         </template>
         <template slot="long" slot-scope="{ row, index }">
           <Input
@@ -423,21 +422,22 @@
             <a
             style="margin: 0 5px; color: #2d8cf0;"
             @click="handleSet(row, index, 4)"
-            v-show="row.status == 4"
-            >更</a
+            v-show="row.status == 5 ||row.status == 0 && row.del "
+            >更</a
           >
           <a
-            style="margin: 0 5px; color: #2d8cf0;"
+            style="margin: 0 5px; color: rgb(58 199 101);"
             @click="handleSet(row, index, 1)"
-            v-show="row.status == 0"
-            >保存</a
+            v-show="row.status == 4 && row.del "
+            >确认</a
           >
           <a
             style="margin: 0 5px; color: #2d8cf0;"
             @click="handleSet(row, index, 2)"
+            v-show="row.del"
             >复制</a
           >
-          <a style="margin: 0 5px; color: red" @click="handleSet(row, index, 3)"
+          <a style="margin: 0 5px; color: red" @click="handleSet(row, index, 3)" v-show="row.del"
             >删除</a
           >
         </template>
@@ -477,6 +477,7 @@ export default {
         room_number: "",
         floor: "",
         product_title: "",
+        copy_data:[],
         pic_number: "",
         depart_end:'',
         depart_start:'',
@@ -493,6 +494,7 @@ export default {
       product_title_list: [],
       pic_number_list: [],
       tableColumns: [
+        { title: "序号", align: "center", width: 100, key: "table_id" },
         {
           title: "楼栋",
           key: "house",
@@ -627,7 +629,7 @@ export default {
       ],
       tableData: [],
       ListColumns: [
-        { title: "序号", align: "center", minWidth: 100, type: "index" },
+        { title: "序号", align: "center", minWidth: 100, key: "table_id" },
         { title: "楼栋", key: "house", align: "center", minWidth: 100 },
         { title: "楼单元", key: "unit", align: "center", minWidth: 100 },
         { title: "楼层", key: "layer", align: "center", minWidth: 100 },
@@ -732,6 +734,7 @@ export default {
           }).then(res=>{
               if(res.code == 200){
                   this.$Message.success(res.msg)
+                  this.goback()
               }
           })
          }
@@ -751,6 +754,8 @@ export default {
         id: '',
         input_state: true,
         layer: '',
+        del:true,
+        table_id:null,
         model: "",
         number: '',
         order_area_id: '',
@@ -805,14 +810,23 @@ export default {
     handleSet(row, index, type) {
       switch (type) {
         case 1:
+          
           if (!row.check_state) {
-            row.state = "变更";
-            this.ListData.push(row);
-            this.tableData[index].check_state = true;
+            this.copy_data[row.table_id-1].state = '变更';
+            this.ListData.push(this.copy_data[row.table_id-1]);
+            this.tableData[index].check_state = true;  //已经更改过
             row.check_state = true;
+            this.tableData[index].input_state = false;
+            row.input_state = false;
+            this.tableData[index].status = 0;
+            row.status = 0;
             console.log(row);
           } else {
-            this.$Message.warning("不可重复变更!");
+            row.state = '变更'
+            this.tableData[index].input_state = false;
+            row.input_state =false;
+            this.tableData[index].status = 0;
+            row.status =0;
           }
           break;
         case 2:
@@ -821,6 +835,7 @@ export default {
           this.tableData[index+1].status = 1;
           this.tableData[index + 1].input_state = true;
           this.tableData[index + 1].change_state = false;
+          this.tableData[index+1].table_id = null;
           //标记是复制的数据
           this.tableData[index + 1].copy_state = true;
           console.log(row);
@@ -829,10 +844,54 @@ export default {
             this.confirmDelete({
         content: "确认删除么?",
         then: () => {
-             let arr = this.tableData.splice(index, 1);
+               let airArr ={
+             long: "",
+        high: "",
+        wide: "",
+        change_state: false,
+        status:2,
+        copy_state:true,
+        check_state: true,
+        explode_status: '',
+        house: '',
+        house_id: "",
+        id: '',
+        input_state: false,
+        layer: '',
+        model: "",
+        table_id:null,
+        number: '',
+        order_area_id: '',
+        order_area_product_id: '',
+        order_no: "",
+        position: "",
+        price: null,
+        product_id: '',
+        product_unit: "",
+        real_price: '',
+        sign_id: "",
+        title: "",
+        type_id: '',
+        type_title: "",
+        del:false,
+        unit: '',
+        url: [],
+        url_number: "",
+        _index: '',
+        _rowKey: '',
+             };
+          this.tableData.splice(index, 1);
           if (row.copy_state||row.check_state) {
-            return;
+             this.ListData.forEach(_item=>{
+               if(_item.table_id === row.table_id){
+                  this.tableData.splice(index,0,airArr);
+                   _item.state = '删除';
+                   _item.status = 2;
+               }
+             })
           } else {
+             this.tableData.splice(index,0,airArr);
+            let arr = this.copy_data.slice(row.table_id-1,row.table_id)
             arr[0].state = "删除";
             arr[0].status =2;
             this.ListData = [...this.ListData, ...arr];
@@ -844,7 +903,8 @@ export default {
          case 4:
             this.tableData[index].input_state = true;
             row.input_state = true;
-            this.tableData[index].status = 0;
+            this.tableData[index].status = 4;
+            row.status = 4;
            break;
       }
     },
@@ -865,15 +925,18 @@ export default {
         console.log(res);
         this.tableData = res.data.detail;
         this.formData =res.data;
-        this.tableData.forEach((item) => {
+        this.tableData.forEach((item,index) => {
           item.long = item.measure.split("*")[0];
           item.wide = item.measure.split("*")[1];
           item.high = item.measure.split("*")[2];
-          item.status =4;
+          item.del = true;
+          item.table_id = index+1;
+          item.status =5;
           item.input_state = false; //是否为input框
           item.check_state = false; //是否已经变更过
           item.change_state = true; //变更操作是否存在
         });
+         this.copy_data =JSON.parse(JSON.stringify(this.tableData));
       });
     },
   },

+ 58 - 19
src/views/BidSystem/DeepeningOrder/changeRecord.vue

@@ -5,7 +5,7 @@
         :list='list' 
         @init='init' 
         :logList='logList'
-        @searchData='init' 
+        @searchData='search' 
         @changePage='changePage'
         :tableColums='tableColums'
         :tableData='tableData'
@@ -43,13 +43,12 @@ export default {
             type:1,
             order_no:null,
             log_List:[],
-            list:[
-                {title:'区域编码',name:'Input',serverName:'area_num',placeholder:'请输入区域编码',value:'' },
-                {title:'区域名称',name:'Input',serverName:'area_title',placeholder:'请输入区域名称',value:''},
-                 {title:'产品名称',name:'Input',serverName:'product_title',placeholder:'请输入产品名称',value:''},
-                  {title:'图号',name:'Input',serverName:'url_number',placeholder:'请输入图号',value:''}
-            ],
             tableColums:[
+                {title:'联系单编号',align:'center',width:'200',key:'contact_order_no'},
+                {title:'接收部门',align:'center',width:'200',key:'get_depart_title'},
+                {title:'发出部门',align:'center',width:'200',key:'send_depart_title'},
+                {title:'变更性质',align:'center',width:'200',key:'type_title'},
+                {title:'变更原因',align:'center',width:'200',key:'reason'},
                 {title:'区域编码',align:'center',width:'200',key:'area_num'},
                 {title:'区域名称',align:'center',width:'200',key:'area_title'},
                 {title:'单位',align:'center',width:'200',key:'area_unit'},
@@ -70,29 +69,68 @@ export default {
             pageIndex:1,
             total:0,
             selects:[],
+            copy_list:[],
         }
     },
     computed:{
+         list(){
+            return  [
+                {title:'联系单编号',name:'Input',serverName:'contact_order_no',placeholder:'请输联系单编号',value:'' },
+                {title:'接收部门',name:'Select',serverName:'get_depart_id',placeholder:'请选择接收部门',value:'',
+                option:this.log_List.get_part},
+                {title:'发出部门',name:'Select',serverName:'send_depart_id',placeholder:'请选择发出部门',value:'',
+                option:this.log_List.send_part },
+                {title:'区域编码',name:'Input',serverName:'area_num',placeholder:'请输入区域编码',value:'' },
+                {title:'区域名称',name:'Input',serverName:'area_title',placeholder:'请输入区域名称',value:''},
+                 {title:'产品名称',name:'Input',serverName:'product_title',placeholder:'请输入产品名称',value:''},
+                  {title:'图号',name:'Input',serverName:'url_number',placeholder:'请输入图号',value:''}
+            ]
+            },
           logList(){
               return [
-                { key: "订单号:", value: this.log_List.order_no },
-                { key: "小区名称:", value: this.log_List.residential_name },
-                { key: "客户姓名:", value:this.log_List.client_name },
-                { key: "紧急程度:", value: this.log_List.warning_name },
-                { key: "收款:", value: this.log_List.pay_state==0?'未收款':'已收款' },
-                { key: "详细地址:", value: this.log_List.address },
-                { key: "手机号:", value: this.log_List.mobile },
-                { key: "开始日期:", value:this.log_List.start_time },
-                { key: "交付日期:", value: this.log_List.end_time },
-                { key: "业务员:", value: this.log_List.salesman_name },
-                { key: "订单类型:", value: "工装" },
-                { key: "备注:", value: this.log_List.remark }
+                { key: "订单号", value: this.log_List.order_no },
+                { key: "小区名称", value: this.log_List.residential_name },
+                { key: "客户姓名", value:this.log_List.client_name },
+                { key: "紧急程度", value: this.log_List.warning_name },
+                { key: "收款", value: this.log_List.pay_state==0?'未收款':'已收款' },
+                { key: "详细地址", value: this.log_List.address },
+                { key: "手机号", value: this.log_List.mobile },
+                { key: "开始日期", value:this.log_List.start_time },
+                { key: "交付日期", value: this.log_List.end_time },
+                { key: "业务员", value: this.log_List.salesman_name },
+                { key: "订单类型", value: "工装" },
+                { key: "备注", value: this.log_List.remark }
                 ]
           }
     },
     created(){
     },
     methods:{
+        search(row){
+            console.log(row)
+             row.page_index = 1;
+             row.page_size = 10;
+             row.order_no= this.$route.query.order_no;
+             this.axios('/api/change_area_product_list',{params:row}).then(res=>{
+                if(res.code == 200){
+                    console.log(res)
+                    this.tableData = res.data.data;
+                    this.log_List = res.data.detail
+                    this.log_List.start_time = this.func.replaceDateNoHMS(this.log_List.start_time)
+                    this.log_List.end_time = this.func.replaceDateNoHMS(this.log_List.end_time)
+                    this.tableData.forEach(item=>{
+                        item.crt_time = this.func.replaceDateNoHMS(item.crt_time)
+                    })
+                    this.list[0].value = row.contact_order_no;
+                    this.list[1].value = row.get_depart_id
+                    this.list[2].value = row.send_depart_id
+                    this.list[3].value = row.area_num
+                    this.list[4].value = row.area_title
+                    this.list[5].value = row.product_title
+                    this.list[6].value = row.url_number
+                }
+            })
+        },
       looks(arr) {
       // const array = [{ img_url: img }];
       const array = arr.map((v) => {
@@ -114,6 +152,7 @@ export default {
         getData(row){
             this.axios('/api/change_area_product_list',{params:row}).then(res=>{
                 if(res.code == 200){
+                    console.log(res)
                     this.tableData = res.data.data;
                     this.log_List = res.data.detail
                     this.log_List.start_time = this.func.replaceDateNoHMS(this.log_List.start_time)

+ 18 - 31
src/views/BidSystem/DeepeningOrder/changeRecordDetail.vue

@@ -63,7 +63,7 @@
                 style="width: auto"
               >{{this.$route.query.order_no}}</span>
             </FormItem>
-            <FormItem label="接部门:">
+            <FormItem label="接部门:">
               <Select
                 filterable
                 clearable
@@ -141,7 +141,7 @@
         <div>
           <span style="font-size: 20px; font-weight: bold">原深化单内容</span>
         </div>
-        <Table :columns="ListColumns" :data="ListData">
+        <Table :columns="ListColumns" :data="ListData" border>
           <template slot="urlSet" slot-scope="{ index }">
             <div
               class="items"
@@ -176,104 +176,91 @@ export default {
       building_list: [],
       type: 1,
       tableColumns: [
+          { title: "序号", align: "center", minWidth: 100, type: "index" },
         {
           title: "楼栋",
           key: "house",
           align: "center",
-          width: 80,
-          resizable: true,
+           minWidth: 100
         },
         {
           title: "楼单元",
           key: "unit",
           align: "center",
-          width: 80,
-          resizable: true,
+          minWidth: 100
         },
         {
           title: "楼层",
           key: "layer",
           align: "center",
-          width: 80,
-          resizable: true,
+          minWidth: 100
         },
         {
           title: "房间号",
           key: "number",
           align: "center",
-          width: 100,
-          resizable: true,
+          minWidth: 100
         },
         {
           title: "产品分类",
           key: "type_title",
           align: "center",
-          width: 140,
-          resizable: true,
+          minWidth: 100
         },
         {
           title: "产品",
           key: "title",
           align: "center",
-          width: 130,
-          resizable: true,
+          minWidth: 100
         },
         {
           title: "计量单位",
           key: "product_unit",
           align: "center",
-          width: 100,
-          resizable: true,
+         minWidth: 100
         },
         {
           title: "位置",
           key: "position",
           align: "center",
-          width: 100,
-          resizable: true,
+         minWidth: 100
         },
         {
           title: "图纸",
           key: "url",
           align: "center",
-          width: 120,
-          slot: "urlSet",
-          resizable: true,
+         minWidth: 100,
+          slot: "urlSet"
         },
         {
           title: "图号",
           key: "url_number",
           align: "center",
-          width: 120,
-          resizable: true,
+         minWidth: 100
         },
         {
           title: "型号",
           key: "model",
           align: "center",
-          width: 120,
-          resizable: true,
+         minWidth: 100
         },
         {
           title: "长",
           key: "long",
           align: "center",
-          width: 120,
-          resizable: true,
+          minWidth: 100
         },
         {
           title: "宽",
           key: "wide",
           align: "center",
-          width: 120,
-          resizable: true,
+         minWidth: 100
         },
         {
           title: "高",
           key: "high",
           align: "center",
-          width: 120,
-          resizable: true,
+         minWidth: 100
         }
       ],
       tableData: [],

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

@@ -198,6 +198,7 @@ export default {
   },
   methods: {
     search(row){
+      console.log(row)
        row.start_time = row.start_time?new Date(row.start_time).getTime().toString().split('').splice(0,10).join(''):'';
       row.end_time =row.end_time? new Date(row.end_time).getTime().toString().split('').splice(0,10).join(''):'';
        Object.assign(row, this.$route.query);