mushencc 3 anni fa
parent
commit
8b104658e5

+ 6 - 0
src/components/currencyPage/index.vue

@@ -52,6 +52,12 @@
           <slot name="basicTypeSet"
                 :row="row"></slot>
         </template>
+         <template slot-scope="{ row,index }"
+                  slot="urlSet">
+          <slot name="urlSet"
+                :row="row"
+                :index='index'></slot>
+        </template>
       </Table>
 
       <slot></slot>

+ 9 - 0
src/routerMap/index.js

@@ -727,6 +727,15 @@ const routerMap = [{
             require(['@/views/BidSystem/DeepeningOrder/changeRecord'], resolve),
     },
     {
+        path: '/cms/BidSystem/DeepeningOrder/changeRecordDetail',
+        name: 'BidSystemDeepeningOrderChangeRecordDetail', // 报价系统→深化详情->变更记录-->变更记录详情
+        meta: {
+            index: 3
+        },
+        component: (resolve) =>
+            require(['@/views/BidSystem/DeepeningOrder/changeRecordDetail'], resolve),
+    },
+    {
         path: '/cms/BidSystem/DeepeningOrder/edit',
         name: 'BidSystemDeepeningOrderEdit', // 报价系统→深化详情→编辑
         meta: {

+ 21 - 22
src/views/BidSystem/DeepeningOrder/changeDetail.vue

@@ -135,15 +135,15 @@
             <div><span>规格:</span>{{ formData.measure }}</div>
             <div><span>工艺属性:</span>{{ formData.process_property }}</div>
             <div><span>图号:</span>{{ formData.url_number }}</div>
-            <div style="display:flex;width:auto">
-              <span>图纸:</span>
+            <div style="display:flex;">
+              <span style="width:50px;">图纸:</span>
               <div>
                 <span
                   v-for="item in formData.url"
                   :key="item"
                   @click="checkImg(formData.url)"
                 >
-                  <img :src="$store.state.ip + item" alt="" style=" max-width: 100px; max-height: 100px;"/>
+                  <img :src="$store.state.ip + item" alt="" style=" max-width: 80px; max-height: 80px;"/>
                 </span>
               </div>
             </div>
@@ -323,7 +323,7 @@
           />
           <span v-else>{{ tableData[index].position }}</span>
         </template>
-        <template slot="urlSet" slot-scope="{ index }">
+        <template slot="urlSet" slot-scope="{ row,index }">
           <div class="product-img">
             <div class="product-add">
               <div
@@ -338,8 +338,8 @@
                   alt=""
                 />
               </div>
-              <template style="flex">
-                <div style="display: flex; justify-content: center">
+              <template style="flex" >
+                <div style="display: flex; justify-content: center" v-if="row.status ==0||row.status == 1">
                   <Icon
                     size="50"
                     @click="
@@ -386,8 +386,8 @@
           />
           <span v-else>{{ tableData[index].model }}</span>
         </template>
-         <template slot="status" slot-scope="{ index }">
-          <span>{{ tableData[index].status?'新增':'变更' }}</span>
+         <template slot="status" slot-scope="{ row }">
+          <span>{{ row.status === 0||4 ?'变更':'新增' }}</span>
         </template>
         <template slot="long" slot-scope="{ row, index }">
           <Input
@@ -421,13 +421,13 @@
         </template>
         <template slot="set" slot-scope="{ row, index }">
           <a
-            style="margin: 0 5px; color: blue"
+            style="margin: 0 5px; color: #2d8cf0;"
             @click="handleSet(row, index, 1)"
             v-show="row.change_state"
             >变更</a
           >
           <a
-            style="margin: 0 5px; color: blue"
+            style="margin: 0 5px; color: #2d8cf0;"
             @click="handleSet(row, index, 2)"
             >复制</a
           >
@@ -612,7 +612,7 @@ export default {
               title: "操作",
               key: "set",
               align: "center",
-              minWidth: 150,
+              minWidth: 160,
               fixed: "right",
               slot: "set",
               resizable: true,
@@ -738,7 +738,7 @@ export default {
         change_state: false,
         status:1,
         copy_state:true,
-        check_state: false,
+        check_state: true,
         explode_status: '',
         house: '',
         house_id: "",
@@ -756,7 +756,6 @@ export default {
         product_unit: "",
         real_price: '',
         sign_id: "",
-        status: '',
         title: "",
         type_id: '',
         type_title: "",
@@ -805,18 +804,17 @@ export default {
           this.tableData[index].status = 0;
           if (!row.check_state) {
             row.state = "变更";
-            row.status = 0;
             this.ListData.push(row);
             this.tableData[index].check_state = true;
             row.check_state = true;
-            console.log(this.tableData);
+            console.log(row);
           } else {
             this.$Message.warning("不可重复变更!");
           }
           break;
         case 2:
           this.tableData.splice(index, 0, row);
-          //  this.tableData[index+1].check_state = false
+           this.tableData[index + 1].check_state = false;
           this.tableData[index+1].status = 1;
           this.tableData[index + 1].input_state = true;
           this.tableData[index + 1].change_state = false;
@@ -829,7 +827,7 @@ export default {
         content: "确认删除么?",
         then: () => {
              let arr = this.tableData.splice(index, 1);
-          if (row.copy_state) {
+          if (row.copy_state||row.check_state) {
             return;
           } else {
             arr[0].state = "删除";
@@ -863,6 +861,7 @@ export default {
           item.long = item.measure.split("*")[0];
           item.wide = item.measure.split("*")[1];
           item.high = item.measure.split("*")[2];
+          item.status =4;
           item.input_state = false; //是否为input框
           item.check_state = false; //是否已经变更过
           item.change_state = true; //变更操作是否存在
@@ -888,6 +887,7 @@ export default {
     }
 
     .form_content_header {
+      margin-top: 20px;
       display: flex;
       flex-wrap: wrap;
     }
@@ -938,11 +938,10 @@ export default {
     }
   }
   .items {
-    width: 40px;
+    width: auto;
     height: 40px;
     margin-bottom: 10px;
-    display: flex;
-    align-items: center;
+   overflow: hidden;
     border-radius: 5px;
     position: relative;
     img {
@@ -954,7 +953,7 @@ export default {
 .List_form_content {
   margin: 30px 0;
 }
-.ivu-form-item {
-    margin-left: 10px;
+.ivu-form-item{
+  width: 250px;
 }
 </style>

+ 60 - 53
src/views/BidSystem/DeepeningOrder/changeRecord.vue

@@ -7,7 +7,6 @@
         :logList='logList'
         @searchData='init' 
         @changePage='changePage'
-        @selectTable='selectTable'
         :tableColums='tableColums'
         :tableData='tableData'
         :pageIndex='pageIndex'
@@ -21,18 +20,18 @@
                    <a style="margin:0 5px;" @click="goPage(row)">详情</a>
                 </div>
             </template>
-
-            <Modal class-name="vertical-center-modal" title='下生产' v-model="showPlan" @on-ok="sendPlanInfo">
-                <Form>
-                    <FormItem label="选择时间">
-                        <div style="display:flex;">
-                            <DatePicker v-model="planInfo.start_time" type="date" placeholder="开始时间"></DatePicker>
-                            -
-                            <DatePicker v-model="planInfo.end_time" type="date" placeholder="结束时间"></DatePicker>
-                        </div>
-                    </FormItem>
-                </Form>
-            </Modal>
+             <template slot="urlSet" slot-scope="{ index }">
+            <div>
+              <img
+                @click="looks(tableData[index].img)"
+                v-for="(el, idx) in tableData[index].img"
+                :key="idx"
+                :src="$store.state.ip + el"
+                alt=""
+                style="max-width: 40px; max-height: 40px"
+              />
+            </div>
+          </template>
         </FullPage>
     </div>
 </template>
@@ -43,12 +42,12 @@ export default {
         return {
             type:1,
             order_no:null,
-            logList:[{ key: "系统单号", value: "10998765" }],
+            log_List:[],
             list:[
-                {title:'区域编码',name:'Select',serverName:'number',placeholder:'请选择',value:'' },
-                {title:'区域名称',name:'Select',serverName:'type',placeholder:'请选择',value:''},
-                 {title:'产品名称',name:'Select',serverName:'type',placeholder:'请选择',value:''},
-                  {title:'图号',name:'Select',serverName:'type',placeholder:'请选择',value:''}
+                {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:'area_num'},
@@ -60,7 +59,7 @@ export default {
                 {title:'产品名称',align:'center',width:'200',key:'product_title'},
                 {title:'规格',align:'center',width:'200',key:'measure'},
                 {title:'工艺属性',align:'center',width:'200',key:'process_property'},
-                {title:'图纸',align:'center',width:'200',key:'img'},
+                {title:'图纸',align:'center',width:'200',key:'img', slot: "urlSet"},
                 {title:'左右式',align:'center',width:'200',key:'fashion'},
                 {title:'图号',align:'center',width:'200',key:'url_number'},
                 {title:'产品备注',align:'center',width:'200',key:'product_remark'},
@@ -70,66 +69,74 @@ export default {
             tableData:[],
             pageIndex:1,
             total:0,
-            showPlan:false,
-            planInfo:{
-                house_id:null,
-                start_time:'',
-                end_time:''
-            },
             selects:[],
         }
     },
+    computed:{
+          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 }
+                ]
+          }
+    },
     created(){
     },
     methods:{
+      looks(arr) {
+      // const array = [{ img_url: img }];
+      const array = arr.map((v) => {
+        return { img_url: v };
+      });
+      console.log("array :>> ", array);
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
         init(row){
+            console.log(row)
             row.order_no = this.$route.query.order_no
             this.getData(row)
         },
         getData(row){
-            this.axios('/api/change_area_product_list',{params:{
-                order_no:'zjw1013ceshi'
-            }}).then(res=>{
+            this.axios('/api/change_area_product_list',{params:row}).then(res=>{
                 if(res.code == 200){
                     this.tableData = res.data.data;
-                    // this.logList = res.data.detail
+                    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)
+                    })
                 }
             })
         },
         back(){
             this.$router.go(-1)
         },
-        
-        postData(){
-
-        },
         goPage(row){
             this.$router.push({
-                path:'/cms/measurementordermannage/edit',
+                path:'/cms/BidSystem/DeepeningOrder/changeRecordDetail',
                 query:{
-                    house_id:row.house_id,
-                    oa_order_no:row.oa_order_no
+                 contact_order_no:row.contact_order_no,
+                 order_no:this.$route.query.order_no
                 }
             })
         },
         changePage(e){},
-        sendPlanInfo(){
-            try{
-                this.planInfo.start_time = new Date(this.planInfo.start_time).toLocaleDateString().replace(/\//g,"-")
-                this.planInfo.end_time = new Date(this.planInfo.end_time).toLocaleDateString().replace(/\//g,"-")
-            }catch(e){
-
-            }
-            this.axios.post('/api/order_oa_people',this.planInfo).then(res=>{
-                if(res.code == 200){
-                    this.$Message.success(res.msg)
-                }
-            })
-        },
-        selectTable(e){
-            this.selects = e;
-        }
-        
     }
 }
 </script>

+ 448 - 0
src/views/BidSystem/DeepeningOrder/changeRecordDetail.vue

@@ -0,0 +1,448 @@
+<template>
+  <div class="changeDetail">
+    <Toptitle title="变更记录详情">
+      <slot name="titleButton">
+        <Button
+          type="primary"
+          style="margin-right: 10px"
+          >打印变更联系单</Button
+        >
+        <Button
+          @click="goback()"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >返回</Button
+        >
+      </slot>
+    </Toptitle>
+    <div>
+      <div class="form">
+        <div class="form_content">
+          <div class="top_search">
+            <div><span>区域编码:</span>{{ formData.area_num }}</div>
+            <div><span>区域名称:</span>{{ formData.area_title }}</div>
+            <div><span>产品名称:</span>{{ formData.product_title }}</div>
+            <div><span>数量:</span>{{ formData.product_num }}</div>
+            <div><span>规格:</span>{{ formData.measure }}</div>
+            <div><span>工艺属性:</span>{{ formData.process_property }}</div>
+            <div><span>图号:</span>{{ formData.url_number }}</div>
+            <div style="display:flex;">
+              <span style="width:50px">图纸:</span>
+              <div>
+                <span
+                  v-for="item in formData.img"
+                  :key="item"
+                  @click="checkImg(formData.img)"
+                >
+                  <img :src="$store.state.ip + item" alt="" style=" max-width: 80px; max-height: 80px;"/>
+                </span>
+              </div>
+            </div>
+            <div>
+              <span>左右式:</span
+              >{{
+                formData.fashion == 1
+                  ? "左式"
+                  : formData.fashion == 2
+                  ? "右式"
+                  : "无"
+              }}
+            </div>
+            <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
+            <div><span>备注:</span>{{ formData.remark }}</div>
+          </div>
+        </div>
+        <div class="form_middle">
+          <Form class="form_middle_content" :label-width="100">
+            <FormItem label="联系单编号:">
+              <span>{{formData.contact_order_no}}</span>
+            </FormItem>
+            <FormItem label="原生产单编号:">
+              <span
+                style="width: auto"
+              >{{this.$route.query.order_no}}</span>
+            </FormItem>
+            <FormItem label="接受部门:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.get_depart_id"
+                size="small"
+                style="width: 120px"
+                disabled
+              >
+                <Option
+                  v-for="(item,index) in depart_list"
+                  :key="index"
+                  :label="item.title"
+                  :value="item.id"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="发出部门:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.send_depart_id"
+                disabled
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(item, index) in depart_list"
+                  :key="index"
+                  :label="item.title"
+                  :value="item.id"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="更改性质:">
+              <Input placeholder="请输入..." style="width: auto" v-model="formData.type_title" disabled></Input>
+            </FormItem>
+            <FormItem label="变更原因:">
+              <Input
+                type="textarea"
+                placeholder="请输入..."
+                style="width: auto"
+                v-model="formData.reason"
+                disabled
+              ></Input>
+            </FormItem>
+          </Form>
+        </div>
+      </div>
+    </div>
+    <Card style="width: 100%">
+      <div style="margin-left: 5px">
+        <span style="font-size: 20px; font-weight: bold">变更后深化单内容</span>
+      </div>
+      <Table :columns="tableColumns" :data="tableData" border>
+        <template slot="urlSet" slot-scope="{ index }">
+          <div class="product-img">
+            <div class="product-add">
+              <div
+                class="items"
+                v-show="tableData[index].img.length !== 0 ? true : false"
+              >
+                <img
+                  @click="looks(tableData[index].img)"
+                  v-for="(el, idx) in tableData[index].img"
+                  :key="idx"
+                  :src="$store.state.ip + el"
+                  alt=""
+                />
+              </div>
+            </div>
+          </div>
+        </template>
+      </Table>
+      <div class="List_form_content">
+        <div>
+          <span style="font-size: 20px; font-weight: bold">原深化单内容</span>
+        </div>
+        <Table :columns="ListColumns" :data="ListData">
+          <template slot="urlSet" slot-scope="{ index }">
+            <div
+              class="items"
+            >
+              <img
+                @click="looks(ListData[index].img)"
+                v-for="(el, idx) in ListData[index].img"
+                :key="idx"
+                :src="$store.state.ip + el"
+                alt=""
+                style="max-width: 40px; max-height: 40px"
+              />
+            </div>
+          </template>
+        </Table>
+      </div>
+    </Card>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      formData: {
+        depart_end:'',
+        depart_start:'',
+        msg:'',
+        contact_order_no:'',
+        change_type:''
+      },
+      cascader_list: [],
+      building_list: [],
+      type: 1,
+      tableColumns: [
+        {
+          title: "楼栋",
+          key: "house",
+          align: "center",
+          width: 80,
+          resizable: true,
+        },
+        {
+          title: "楼单元",
+          key: "unit",
+          align: "center",
+          width: 80,
+          resizable: true,
+        },
+        {
+          title: "楼层",
+          key: "layer",
+          align: "center",
+          width: 80,
+          resizable: true,
+        },
+        {
+          title: "房间号",
+          key: "number",
+          align: "center",
+          width: 100,
+          resizable: true,
+        },
+        {
+          title: "产品分类",
+          key: "type_title",
+          align: "center",
+          width: 140,
+          resizable: true,
+        },
+        {
+          title: "产品",
+          key: "title",
+          align: "center",
+          width: 130,
+          resizable: true,
+        },
+        {
+          title: "计量单位",
+          key: "product_unit",
+          align: "center",
+          width: 100,
+          resizable: true,
+        },
+        {
+          title: "位置",
+          key: "position",
+          align: "center",
+          width: 100,
+          resizable: true,
+        },
+        {
+          title: "图纸",
+          key: "url",
+          align: "center",
+          width: 120,
+          slot: "urlSet",
+          resizable: true,
+        },
+        {
+          title: "图号",
+          key: "url_number",
+          align: "center",
+          width: 120,
+          resizable: true,
+        },
+        {
+          title: "型号",
+          key: "model",
+          align: "center",
+          width: 120,
+          resizable: true,
+        },
+        {
+          title: "长",
+          key: "long",
+          align: "center",
+          width: 120,
+          resizable: true,
+        },
+        {
+          title: "宽",
+          key: "wide",
+          align: "center",
+          width: 120,
+          resizable: true,
+        },
+        {
+          title: "高",
+          key: "high",
+          align: "center",
+          width: 120,
+          resizable: true,
+        }
+      ],
+      tableData: [],
+      ListColumns: [
+        { title: "序号", align: "center", minWidth: 100, type: "index" },
+        { title: "楼栋", key: "house", align: "center", minWidth: 100 },
+        { title: "楼单元", key: "unit", align: "center", minWidth: 100 },
+        { title: "楼层", key: "layer", align: "center", minWidth: 100 },
+        { title: "房价号", key: "number", align: "center", minWidth: 100 },
+        {
+          title: "产品分类",
+          key: "type_title",
+          align: "center",
+          minWidth: 100,
+        },
+        { title: "产品", key: "title", align: "center", minWidth: 100 },
+        {
+          title: "计量单位",
+          key: "product_unit",
+          align: "center",
+          minWidth: 100,
+        },
+        { title: "位置", key: "position", align: "center", minWidth: 100 },
+        {
+          title: "图纸",
+          key: "url",
+          align: "center",
+          minWidth: 100,
+          slot: "urlSet",
+        },
+        { title: "图号", key: "url_number", align: "center", minWidth: 100 },
+        { title: "型号", key: "model", align: "center", minWidth: 100 },
+        { title: "长", key: "long", align: "center", minWidth: 100 },
+        { title: "宽", key: "wide", align: "center", minWidth: 100 },
+        { title: "高", key: "high", align: "center", minWidth: 100 }
+      ],
+      ListData: [],
+      page_index: 1,
+      page_size: 10,
+    depart_list:[],
+    show:false
+    };
+  },
+  created(){
+      this.axios.get("/api/basics_product_index").then((res) => {
+      this.cascader_list = res.data.data;
+    });
+            this.axios.get('/api/employee_depart_list').then(res=>{
+                this.depart_list = res.data
+                let arr = [];
+                this.depart_list.forEach(item=>{
+                    if(item.sub.length == 0){
+                        arr.push(item)
+                    }
+                    else{
+                        item.sub.forEach(_item=>{
+                            arr.push(_item)
+                        })
+                    }
+                })
+                this.depart_list =arr
+               })
+  },
+  mounted() {
+    this.initData(
+      this.$route.query.contact_order_no
+    );
+  },
+  methods: {
+    looks(arr) {
+      // const array = [{ img_url: img }];
+      const array = arr.map((v) => {
+        return { img_url: v };
+      });
+      this.$previewImg({
+        list: array,
+        baseUrl: this.$store.state.ip,
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+    goback() {
+      this.$router.go(-1);
+    },
+    initData(contact_order_no) {
+      this.axios({
+        method: "get",
+        url: "/api/change_area_product_detail",
+        params: {
+         contact_order_no
+        },
+      }).then((res) => {
+        console.log(res);
+        this.tableData = res.data.new_list;
+        this.ListData =res.data.old_list;
+        this.formData =res.data;
+        this.tableData.forEach((item) => {
+          item.long = item.measure.split("*")[0];
+          item.wide = item.measure.split("*")[1];
+          item.high = item.measure.split("*")[2];
+        });
+        this.ListData.forEach(item=>{
+            item.long = item.measure.split("*")[0];
+          item.wide = item.measure.split("*")[1];
+          item.high = item.measure.split("*")[2];
+        })
+      });
+    },
+  },
+};
+</script>
+<style scoped lang='scss'>
+.changeDetail {
+  overflow: auto;
+  .form_content {
+    border-bottom: 1px solid #a2a6b1;
+    .top_search {
+      display: flex;
+      flex-wrap: wrap;
+      div {
+        width: 200px;
+        font-size: 14px;
+        margin: 10px;
+      }
+    }
+
+    .form_content_header {
+      display: flex;
+      flex-wrap: wrap;
+    }
+  }
+  .form_middle {
+      margin: 20px 0;
+    .form_middle_content {
+      display: flex;
+      flex-wrap: wrap;
+    }
+  }
+}
+.product-add {
+  display: flex;
+  flex-direction: column;
+  .ipt {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    cursor: pointer;
+    outline: none;
+    top: 0;
+    left: 0;
+  }
+  .items {
+    width: auto;
+    height: 40px;
+    margin-bottom: 10px;
+  overflow: hidden;
+    border-radius: 5px;
+    position: relative;
+    img {
+      max-width: 40px;
+      max-height: 40px;
+    }
+  }
+}
+.List_form_content {
+  margin: 30px 0;
+}
+.ivu-form-item{
+    width: 250px;
+}
+</style>