瀏覽代碼

Merge branch 'hw' of http://121.41.102.225:8099/Nidong/jiufang

Andy 3 年之前
父節點
當前提交
31efa48225

+ 27 - 0
src/routerMap/index.js

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

+ 1022 - 0
src/views/BidSystem/DeepeningOrder/change.vue

@@ -0,0 +1,1022 @@
+<template>
+  <div class="BidSystemDeepeningOrderDetail">
+    <Toptitle title="变更">
+      <slot name="titleButton">
+        <!-- <Button
+          @click="handleFinish()"
+          type="primary"
+          style="margin-right: 10px"
+          >完成</Button
+        > -->
+        <!-- <Upload
+          style="display: inline"
+          name="your_file"
+          :show-upload-list="false"
+          :headers="headers"
+          :on-error="uploadError"
+          :on-success="uploadSuccess"
+          :action="$store.state.ip + '/api/order_area_product_import'"
+        >
+          <Button type="primary" style="margin-right: 10px">导入1</Button>
+        </Upload> -->
+        <Button
+          @click="goback()"
+          type="primary"
+          ghost
+          style="margin-right: 10px"
+          >返回</Button
+        >
+      </slot>
+    </Toptitle>
+      <div >
+        <div class="top_search">
+          <div class="top_search_content">
+            <Form
+              :model="searchData"
+              :label-width="100"
+              class="top_search_form"
+            >
+              <FormItem label="区域编码:">
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.area_no"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in area_no_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem label="区域名称:">
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.area_title"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in area_title_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem label="产品名称:">
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.product_title"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in product_title_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem label="图号:">
+                <Select
+                  filterable
+                  clearable
+                  v-model="searchData.url_number"
+                  size="small"
+                  style="width:120px"
+                >
+                  <Option
+                    v-for="(_item, _index) in url_number_list"
+                    :key="_index"
+                    :label="_item"
+                    :value="_item"
+                  ></Option>
+                </Select>
+              </FormItem>
+              <FormItem>
+                <Button @click="getListData" type="primary" size="small"
+                  >搜索</Button
+                >
+              </FormItem>
+            </Form>
+          </div>
+          <Form :model="formData" :label-width="100" class="top_search_form">
+            <FormItem label="订单号:">
+              {{ formData.order_no }}
+            </FormItem>
+            <FormItem label="小区名称:">
+              {{ formData.residential_name }}
+            </FormItem>
+            <FormItem label="客户姓名:">
+              {{ formData.client_name }}
+            </FormItem>
+            <FormItem label="紧急程度:">
+              <span
+                v-for="_item in warningList"
+                :key="_item.id"
+                v-show="_item.id == formData.warning_state"
+                :style="{ color: _item.color }"
+                >{{ _item.title }}
+              </span>
+            </FormItem>
+            <FormItem label="收款:">
+              {{ formData.front_money }}
+              <!-- <RadioGroup v-model="formData.pay_state"
+                      size="small">
+            <Radio :label=0
+                   :disabled="isChecked">未收款</Radio>
+            <Radio :label=1
+                   :disabled="isChecked">已收款</Radio>
+          </RadioGroup> -->
+            </FormItem>
+            <FormItem label="详细地址:">
+              {{ formData.address }}
+            </FormItem>
+            <FormItem label="手机号:">
+              {{ formData.mobile }}
+            </FormItem>
+            <FormItem label="开始日期:">
+              {{
+                formData.start_time
+                  ? func.replaceDateNoHMS(formData.start_time)
+                  : ""
+              }}
+            </FormItem>
+            <FormItem label="交付日期:">
+              {{
+                formData.end_time
+                  ? func.replaceDateNoHMS(formData.end_time)
+                  : ""
+              }}
+            </FormItem>
+            <FormItem label="业务员:">
+              <span
+                v-for="_item in salesmanList"
+                :key="_item.id"
+                v-show="_item.id == formData.salesman"
+                :style="{ color: _item.color }"
+                >{{ _item.nickname }}
+              </span>
+            </FormItem>
+            <FormItem label="订单类型:">
+          <Select v-model="formData.type"
+                  :disabled="isChecked"
+                  size="small"
+                  style="width:200px">
+            <Option label='工装'
+                    :value=1></Option>
+            <Option label='家装'
+                    :value=2></Option>
+          </Select>
+        </FormItem>
+            <FormItem
+              v-for="item in formData.special"
+              :key="item.id"
+              :label="item.key + ':'"
+            >
+              {{ item.value }}
+            </FormItem>
+            <FormItem label="备注:">
+              {{ formData.remark }}
+            </FormItem>
+          </Form>
+        </div>
+        <div>
+          <Table
+            :columns="listTableColumns"
+            :data="listTableData"
+            @on-selection-change="handleSelection"
+            :max-height="500"
+            border
+          >
+            <template slot="statusSlot" slot-scope="{ row }">
+              {{ row.status == 1 ? "已完成" : "未完成" }}
+            </template>
+            <template slot="set" slot-scope="{ row, index }">
+              <a
+                style="margin: 0 5px"
+                @click="handleSet(row, index, 2, formData)"
+                >变更</a
+              >
+                <a
+                style="margin: 0 5px"
+                @click="handleSet(row, index, 4, formData)"
+                >详情</a
+              >
+                <a
+                style="margin: 0 5px"
+                @click="handleSet(row, index, 3, formData)"
+                >删除</a
+              >
+                <!-- <a
+                style="margin: 0 5px"
+                @click="handleSet(row, index, 1, formData)"
+                >变更记录</a
+              > -->
+            </template>
+          </Table>
+        </div>
+        <div ref="footercenter" class="footer-center">
+          <Page
+            :total="total"
+            :current.sync="page_index"
+            :show-total="true"
+            :page-size="page_size"
+            :show-sizer="true"
+            :show-elevator="true"
+            @on-change="changePage"
+            @on-page-size-change="changeSize"
+          >
+          </Page>
+        </div>
+      </div>
+  </div>
+</template>
+
+<script>
+// 这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
+// 例如:import 《组件名称》 from '《组件路径》';
+import UploadImg from "./uploadImg/index.vue";
+export default {
+  name: "",
+  components: {
+    UploadImg,
+  },
+  props: {},
+  // import引入的组件需要注入到对象中才能使用
+  data() {
+    // 这里存放数据
+    return {
+      headers: { Authorization: localStorage.getItem("token") },
+      salesmanList: [],
+      combineList: [],
+      supTableData: [],
+      showPDTModal: false,
+      showSupModal: false,
+      formData: {
+        order_no: "",
+        residential_name: "",
+        client_name: "",
+        address: "",
+        mobile: "",
+        pay_state: "",
+        warning_state: "",
+        salesman: "",
+        remark: "",
+        start_time: "",
+        end_time: "",
+        type: "",
+        //区域列表
+        list: [
+          {
+            areaIndex: 1,
+            num: "",
+            title: "",
+            unit: "",
+            quantity: "",
+            house_type: "",
+            remark: "",
+            order_no: "",
+            product: [
+              // {
+              //   title:'',
+              //   num:'',
+              //   measure:'',
+              //   process_property:'',
+              //   url:'',
+              //   url_number:'',
+              //   remark:''
+              // }
+            ],
+          },
+          // {
+          //   areaIndex: 2,
+          //   num: '',
+          //   title: '',
+          //   unit: '',
+          //   quantity: '',
+          //   house_type: '',
+          //   remark: '',
+          //   order_no: '',
+          //   product: []
+          // },
+        ],
+      },
+      productDetail: {},
+      listTableColumns: [
+        { title: "区域编码", key: "area_num", align: "center", minWidth: 100 },
+        {
+          title: "区域名称",
+          key: "area_title",
+          align: "center",
+          minWidth: 100,
+        },
+        { title: "单位", key: "area_unit", align: "center", minWidth: 100 },
+        {
+          title: "工程量",
+          key: "area_quantity",
+          align: "center",
+          minWidth: 100,
+        },
+        { title: "户型", key: "house_type", align: "center", minWidth: 100 },
+        { title: "备注", key: "remark", align: "center", minWidth: 100 },
+        { title: "产品名称", key: "title", align: "center", minWidth: 100 },
+        { title: "数量", key: "num", align: "center", minWidth: 100 },
+        { title: "规格", key: "measure", align: "center", minWidth: 100 },
+        {
+          title: "工艺属性",
+          key: "process_property",
+          align: "center",
+          minWidth: 100,
+        },
+        {
+          title: "图纸",
+          key: "url",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) => {
+            const { row } = params;
+            let url = row.url ? row.url : [];
+            return h("img", {
+              attrs: {
+                src: this.$store.state.ip + url[0],
+                style:
+                  "max-width:50px;max-height:50px;position:relative;top:3px;",
+              },
+              on: {
+                click: (e) => {
+                  // this.axios('/api/orders_img', { params: { id: row.id, type: 1 } }).then(res => {
+                  // row.imgs = res.data
+                  let list = [];
+                  row.url.forEach((el) => {
+                    list.push({ img_url: el });
+                  });
+                  this.$previewImg({
+                    list,
+                    baseUrl: this.$store.state.ip,
+                    baseImgField: "img_url",
+                    baseTitleField: "",
+                  });
+                  // })
+                },
+              },
+            });
+          },
+        },
+        {
+          title: "左右式",
+          key: "left_right_mode",
+          align: "center",
+          minWidth: 100,
+          render: (h, params) => {
+            return h(
+              "span",
+              {},
+              params.row.left_right_mode == 1
+                ? "左式"
+                : params.row.left_right_mode == 2
+                ? "右式"
+                : "无"
+            );
+          },
+        },
+        { title: "图号", key: "url_number", align: "center", minWidth: 100 },
+        { title: "备注", key: "remark", align: "center", minWidth: 100 },
+        {
+          title: "操作",
+          key: "remark",
+          align: "center",
+          width: "220",
+          slot: "set",
+        },
+      ],
+      listTableData: [],
+      //是否查看
+      isChecked: false,
+      PDTProcessAttrList: [],
+      // 测量字段列表
+      measureList: [],
+      order_area_id: "",
+      uploadData: {
+        order_no: this.$route.query.order_no,
+        title: "",
+      },
+      contactSpecValueList: [{ key: "", value: "" }],
+      areaSpecValueList: [{ key: "", value: "" }],
+      productSpecValueList: [{ key: "", value: "" }],
+      process_man: "",
+      process_start_time: "",
+      process_end_time: "",
+      warningList: [],
+      selected: [],
+      currencyTab: "",
+      type: this.$route.query.type,
+      page_index: 1,
+      page_size: 10,
+      total: 0,
+      searchData: {},
+      area_no_list: [],
+      area_title_list: [],
+      product_title_list: [],
+      url_number_list: [],
+      oa_id: this.$route.query.oa_id || "",
+    };
+  },
+  // 生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    //2编辑 3详情 4变更 5变更记录
+    this.$route.query.type == 3 ? (this.isChecked = true) : "";
+    this.$route.query.order_no
+      ? (this.formData.order_no = this.$route.query.order_no)
+      : "";
+    // 获取工艺属性
+    this.axios("/api/basics_properties_index").then((res) => {
+      this.PDTProcessAttrList = res.data.data;
+    });
+    // 获取组合管理
+    this.axios("/api/material_combination").then((res) => {
+      this.combineList = res.data.data;
+    });
+    // 获取紧急程度
+    this.axios.get("/api/warning_list").then((res) => {
+      this.warningList = res.data.data;
+    });
+  },
+  // 生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    this.axios("/api/user").then(
+      (res) => (
+        (this.salesmanList = res.data.data)
+      )
+    );
+    //获取基础测量字段列表
+    this.axios("/api/basics_measure_index").then((res) => {
+      this.measureList = res.data.data;
+    });
+    this.getListData(this.formData.order_no, this.oa_id);
+     this.axios({
+        method: "get",
+        url: "/api/order_area_list",
+        params: {
+          order_no:this.$route.query.order_no,
+          oa_id:this.$route.query.oa_id
+        },
+      }).then((res) => {
+        this.formData = res.data;})
+  },
+  methods: {
+    async handleBeforeUpload(row) {
+      // row.name
+      console.log("row :>> ", row);
+      this.uploadData.title = row.name.substring(0, row.name.indexOf("."));
+      return true;
+    },
+    onProgress(e) {
+      console.log(e);
+    },
+    goback() {
+      this.$router.go(-1);
+    },
+    handleSelection(selection) {
+      this.selected = selection;
+    },
+    // 1拆单 2详情
+    handleSet(row, index, type, item) {
+      switch (type) {
+        case 1:
+          break;
+        case 2:
+          this.$router.push({
+            path: "/cms/BidSystem/DeepeningOrder/changeDetail",
+            query: {
+              type,
+              order_no: this.formData.order_no,
+              order_area_id: item.id,
+              order_area_product_id: row.id,
+            },
+          });
+          break;
+        case 3:
+          this.$Modal.confirm({
+            title: "确认删除?",
+            content: "此操作确认后不可恢复,请确认!",
+            onOk: () => {
+              this.axios({
+                method: "post",
+                url: "/api/order_area_deep_del",
+                data: {
+                  id: row.id,
+                },
+              }).then((res) => {
+                if (res.doce == 200) {
+                  this.$Message.success(res.msg);
+                }
+              });
+            },
+            onCancel: () => {},
+          });
+          break;
+        case 4:
+          this.$router.push({
+            path: "/cms/BidSystem/DeepeningOrder/edit",
+            query: {
+              type,
+              order_no: this.formData.order_no,
+              order_area_id: item.id,
+              order_area_product_id: row.order_area_product_id,
+            },
+          });
+          break;
+      }
+    },
+    // 删除工艺属性
+    handleAddPDTDetailDele(arr, index) {
+      arr.splice(index, 1);
+    },
+    //新增产品复制
+    handleAddPDTCopy(item, index) {
+      const temp = JSON.parse(JSON.stringify(item));
+      this.tempPDTList.splice(index + 1, 0, temp);
+    },
+    //新增产品添加
+    handleAddPDTAdd(index) {
+      this.tempPDTList.splice(index + 1, 0, { addPDTProcessAttrList: [] });
+    },
+    //新增产品删除
+    handleAddPDTDele(index) {
+      this.tempPDTList.splice(index, 1);
+    },
+    //项目辅料新增
+    handleAddSup() {
+      this.supTableData.push({ index: "", title: "" });
+      // this.supTableData.forEach((element, index) => {
+      //   element.index = index + 1;
+      // });
+    },
+    //项目辅料删除
+    handleSupSet(row, index) {
+      this.supTableData.splice(index, 1);
+    },
+    //添加工艺属性
+    handleProcessAdd(item, index) {
+      this.tempPDTList[index].addPDTProcessAttrList.push({
+        PDTProcessAttrDetailList: [],
+      });
+    },
+    //选择工艺属性
+    handleAddPDTAttrChange(item, index, value) {
+      this.axios("/api/properties_index", { params: { id: value } }).then(
+        (res) => {
+          item.PDTProcessAttrDetailList = res.data.data;
+        }
+      );
+    },
+    //选择工艺属性细节
+    handleAddPDTAttrDetailChange(item, index, value) {
+      item.showValue = value.label;
+      item.showId = value.value;
+    },
+    // handleFinish() {
+    //   if (this.selected.length < 1) {
+    //     this.$Message.warning("请选择数据");
+    //   } else {
+    //     const order_area_product_id = this.selected.map(
+    //       (item) => item.order_area_product_id || item.id
+    //     );
+    //     this.$Modal.confirm({
+    //       title: "确认完成?",
+    //       // content: "此操作确认后不可恢复,请确认!",
+    //       onOk: () => {
+    //         this.axios({
+    //           method: "post",
+    //           url: "/api/order_area_product_status",
+    //           data: {
+    //             order_area_product_id,
+    //           },
+    //         }).then((res) => {
+    //           if (res.code == 200) {
+    //             this.$Message.success(res.msg);
+    //             this.initData(this.formData.order_no, this.oa_id);
+    //             this.handleShowCurrencyArea(item,index)
+    //             this.getListData()
+    //           }
+    //         });
+    //       },
+    //       onCancel: () => {},
+    //     });
+    //   }
+    // },
+    delItems(n, arr) {
+      arr.splice(n, 1);
+    },
+    changeIpt(e, row) {
+      let file = e.target.files[0];
+      this.postImg(file, row);
+      e.target.value = null;
+    },
+    postImg(file, row) {
+      let formData = new FormData();
+      formData.append("file", file);
+      this.axios.post("/api/upload_pic", formData).then((res) => {
+        row.push(res.data.url);
+      });
+    },
+    // 产品分类选择→对应不同测量字段
+    hanndleAddPDTTypeChange(item, e) {
+      this.axios("/api/basics_product_index", {
+        params: { title: e.label },
+      }).then((res) => {
+        item.tempPDTTypeList = res.data.data[0].measure_id.split(",");
+        item.tempMeasureList = this.measureList;
+        this.measureList.forEach((el) => {
+          item[el.e_title] = "";
+        });
+      });
+      // basics_measure_index
+    },
+    handleImgClick(e, row) {
+      const list = [{ img_url: e.target.src }];
+      this.$previewImg({
+        list,
+        baseUrl: "",
+        baseImgField: "img_url",
+        baseTitleField: "",
+      });
+    },
+    uploadError(err) {
+      this.$Message.error(err.msg || "上传失败");
+    },
+    //导入成功
+    uploadSuccess(res) {
+      if (res.code == 200) {
+        this.$Message.success(res.msg || "上传成功");
+        // const temp = res.data;
+        // let list = [...this.postInfo.children, ...temp];
+      } else {
+        this.$Message.warning(res.msg || "上传失败");
+      }
+    },
+    getListData() {
+      this.axios
+        .get("/api/order_area_detail_list", {
+          params: {
+            order_no: this.$route.query.order_no,
+            ...this.searchData,
+            page_index: this.page_index,
+            page_size: this.page_size,
+            oa_id: this.oa_id,
+          },
+        })
+        .then((res) => {
+          this.area_no_list = res.data.area_no;
+          this.area_title_list = res.data.area_title;
+          this.product_title_list = res.data.product_title;
+          this.url_number_list = res.data.url_number;
+          this.listTableData = res.data.data;
+          this.listTableData.map((item) => {
+            !item.url && (item.url = []);
+            res.data.imgs.map((element) => {
+              if (item.sign_id == element.sign_id) {
+                item.url.push({ img_url: element.img_url });
+              }
+            });
+          });
+          this.total = res.data.total;
+          this.$forceUpdate();
+        });
+    },
+    changePage(e) {
+      this.page_index = e;
+      this.getListData();
+    },
+    changeSize(e) {
+      this.page_size = e;
+      this.getListData();
+    },
+    // 展示区域产品
+    handleShowCurrencyArea(item, index) {
+      const preObj = this.formData.list.filter((item) => item.isCurrencyArea);
+      // 判断当前打开是否与上一个是否一致
+      if (preObj.length > 0) {
+        // 1.1移除上一个展开区域及产品
+        this.formData.list.forEach((element) => {
+          element.product = [];
+          if (element.id == preObj[0].id) {
+            element.isCurrencyArea = false;
+          }
+        });
+        // 2.获取当前展开区域及产品
+        item.isCurrencyArea = true;
+        this.axios
+          .get("/api/order_area_list_product", {
+            params: {
+              order_no: this.$route.query.order_no,
+              oa_id: this.$route.query.oa_id,
+              area_id: item.id,
+              type: 2,
+            },
+          })
+          .then((res) => {
+            if (res.code == 200) {
+              if (!item.product) {
+                item.product = [];
+              }
+              item.product = res.data;
+              item.product.forEach((pdt, index) => {
+                pdt.index = index + 1;
+                pdt.special &&
+                  pdt.special.length > 0 &&
+                  pdt.special.forEach((element) => {
+                    this.formData.head[3].forEach((item) => {
+                      if (element.head_id == item.id) {
+                        element = Object.assign(element, item);
+                        pdt[element.key] = element.value;
+                        this.productSpecValueList.push(element);
+                      }
+                    });
+                  });
+              });
+              this.$forceUpdate();
+            }
+          });
+      } else {
+        // 2.获取当前展开区域及产品
+        item.isCurrencyArea = true;
+        this.axios
+          .get("/api/order_area_list_product", {
+            params: {
+              order_no: this.$route.query.order_no,
+              oa_id: this.$route.query.oa_id,
+              area_id: item.id,
+              type: 2,
+            },
+          })
+          .then((res) => {
+            if (res.code == 200) {
+              if (!item.product) {
+                item.product = [];
+              }
+              item.product = res.data;
+              item.product.forEach((pdt, index) => {
+                pdt.index = index + 1;
+                pdt.special &&
+                  pdt.special.length > 0 &&
+                  pdt.special.forEach((element) => {
+                    this.formData.head[3].forEach((item) => {
+                      if (element.head_id == item.id) {
+                        element = Object.assign(element, item);
+                        pdt[element.key] = element.value;
+                        this.productSpecValueList.push(element);
+                      }
+                    });
+                  });
+              });
+              this.$forceUpdate();
+            }
+          });
+      }
+    },
+  },
+  // 监听属性 类似于data概念
+  computed: {},
+  // 监控data中的数据变化
+  watch: {},
+  beforeCreate() {}, // 生命周期 - 创建之前
+  beforeMount() {}, // 生命周期 - 挂载之前
+  beforeUpdate() {}, // 生命周期 - 更新之前
+  updated() {}, // 生命周期 - 更新之后
+  beforeDestroy() {}, // 生命周期 - 销毁之前
+  destroyed() {}, // 生命周期 - 销毁完成
+  activated() {}, // 如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+
+<style lang="scss" scoped>
+.BidSystemDeepeningOrderDetail {
+  overflow: hidden;
+  overflow-y: auto;
+  position: relative;
+  top: 20px;
+  height: 85%;
+  padding-bottom: 20px;
+  .top_search_name1 {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    flex-wrap: wrap;
+    width: 100%;
+    padding: 10px 0;
+    font-size: 14px;
+    div {
+      width: 220px;
+      padding: 5px;
+      span {
+        display: inline-block;
+        min-width: 40px;
+        max-width: 150px;
+        text-align: justify;
+        text-justify: newspaper;
+        word-break: break-all;
+        vertical-align: middle;
+      }
+    }
+    .top_search_content {
+      display: flex;
+      justify-content: space-between;
+    }
+    .top_search_form {
+      // width: 800px;
+      // display: flex;
+      // justify-content: space-around;
+      /deep/ .ivu-form-item {
+        display: inline-block;
+        width: 300px;
+      }
+    }
+  }
+  .top_search {
+    padding: 20px 0;
+    width: 100%;
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    flex-wrap: wrap;
+    width: 100%;
+    padding: 10px 0;
+    font-size: 14px;
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    flex-wrap: wrap;
+    width: 100%;
+    padding: 10px 0;
+    font-size: 14px;
+    .top_search_form {
+      // width: 800px;
+      // display: flex;
+      // justify-content: space-around;
+      /deep/ .ivu-form-item {
+        display: inline-block;
+        width: 300px;
+      }
+    }
+  }
+  .addAreaForm {
+    font-size: 14px;
+    .addFormInfo {
+      width: 80%;
+      display: flex;
+      justify-content: flex-start;
+      align-items: center;
+      flex-wrap: wrap;
+      padding: 10px 0;
+      div {
+        width: 200px;
+        padding: 10px;
+      }
+    }
+  }
+  .table-data {
+    position: relative;
+    padding: 15px;
+    margin: 10px;
+    margin-bottom: 30px;
+    border-radius: 5px;
+    box-shadow: 1px 1px 5px 1px #999;
+    .addBtn {
+      position: absolute;
+      right: 20px;
+      top: 20px;
+    }
+    /deep/ .ivu-form-item {
+      display: inline-block;
+      width: 220px;
+    }
+  }
+}
+.footer-center {
+  display: flex;
+  justify-content: center;
+  padding: 10px 0;
+}
+.addPDTFormModal {
+  /deep/ .ivu-modal-body {
+    height: 400px;
+    overflow: hidden;
+    overflow-y: auto;
+  }
+}
+.addPDTForm {
+  position: relative;
+  border-bottom: 1px solid #e8eaec;
+  padding-bottom: 30px;
+  /deep/ .ivu-form-item {
+    display: inline-block;
+    width: 300px;
+  }
+  .addPDTBtn {
+    position: absolute;
+    right: 10px;
+    bottom: 25px;
+  }
+}
+.addPDTProcess {
+  width: 300px;
+  padding-bottom: 15px;
+  div {
+    display: flex;
+    justify-content: space-around;
+    padding: 5px 0;
+    span {
+      padding-top: 6px;
+    }
+  }
+}
+.product-img {
+  padding-top: 10px;
+}
+.process_modal {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: 10px;
+}
+.product-add {
+  display: flex;
+  flex-wrap: wrap;
+  .ipt {
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    cursor: pointer;
+    outline: none;
+    top: 0;
+    left: 0;
+  }
+  .add-items {
+    width: 40px;
+    height: 40px;
+    border: 1px dotted #e7e7e7;
+    border-radius: 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    overflow: hidden;
+    position: relative;
+    flex-direction: column;
+    background: #f4f5f7;
+    .item {
+      width: 46px;
+      height: 46px;
+      background: #3764ff;
+      opacity: 0.6;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      border-radius: 50%;
+      color: #fff;
+    }
+  }
+  .items {
+    width: 40px;
+    height: 40px;
+    margin-bottom: 10px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    background: #e7e7e7;
+    margin-right: 10px;
+    border-radius: 5px;
+    position: relative;
+    img {
+      max-width: 40px;
+      max-height: 40px;
+    }
+  }
+}
+.supModalBtn {
+  display: flex;
+  justify-content: flex-end;
+  margin-bottom: 10px;
+}
+.urlSetStyle {
+  img {
+    max-width: 100px;
+  }
+}
+/deep/ .ivu-table-wrapper {
+  overflow: visible;
+} //穿透iview
+/deep/.ivu-tabs-nav-scroll {
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 960 - 0
src/views/BidSystem/DeepeningOrder/changeDetail.vue

@@ -0,0 +1,960 @@
+<template>
+  <div class="changeDetail">
+    <Toptitle title="变更">
+      <slot name="titleButton">
+        <Button
+          @click="handleFinish()"
+          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">
+          <Form
+            :model="formData"
+            :label-width="100"
+            class="form_content_header"
+          >
+            <FormItem label="楼幢:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.building"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(_item, _index) in building_list"
+                  :key="_index"
+                  :label="_item"
+                  :value="_item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="单元:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.unit"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(_item, _index) in unit_list"
+                  :key="_index"
+                  :label="_item"
+                  :value="_item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="楼层:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.floor"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(_item, _index) in floor_list"
+                  :key="_index"
+                  :label="_item"
+                  :value="_item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="房号:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.room_number"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(_item, _index) in room_number_list"
+                  :key="_index"
+                  :label="_item"
+                  :value="_item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="产品名称:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.product_title"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(_item, _index) in product_title_list"
+                  :key="_index"
+                  :label="_item"
+                  :value="_item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem label="图号:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.pic_number"
+                size="small"
+                style="width: 120px"
+              >
+                <Option
+                  v-for="(_item, _index) in pic_number_list"
+                  :key="_index"
+                  :label="_item"
+                  :value="_item"
+                ></Option>
+              </Select>
+            </FormItem>
+            <FormItem>
+              <Button @click="getListData" type="primary" size="small"
+                >搜索</Button
+              >
+            </FormItem>
+          </Form>
+          <div class="top_search">
+            <div><span>区域编码:</span>{{ formData.area_num }}</div>
+            <div><span>区域名称:</span>{{ formData.area_title }}</div>
+            <div><span>产品名称:</span>{{ formData.title }}</div>
+            <div><span>数量:</span>{{ formData.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;width:auto">
+              <span>图纸:</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;"/>
+                </span>
+              </div>
+            </div>
+            <div>
+              <span>左右式:</span
+              >{{
+                formData.left_right_mode == 1
+                  ? "左式"
+                  : formData.left_right_mode == 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="联系单编号:">
+              <Input
+                placeholder="请输入单号"
+                style="width: auto"
+                v-model="formData.contact_order_no"
+              ></Input>
+            </FormItem>
+            <FormItem label="原生产单编号:">
+              <span
+                style="width: auto"
+              >{{this.$route.query.order_no}}</span>
+            </FormItem>
+            <FormItem label="接受部门:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.depart_end"
+                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="发出部门:">
+              <Select
+                filterable
+                clearable
+                v-model="formData.depart_start"
+                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.change_type"></Input>
+            </FormItem>
+            <FormItem label="变更原因:">
+              <Input
+                type="textarea"
+                placeholder="请输入..."
+                style="width: auto"
+                v-model="formData.msg"
+              ></Input>
+            </FormItem>
+          </Form>
+        </div>
+      </div>
+    </div>
+    <Card style="width: 100%">
+      <div style="margin-left: 5px">
+        <Button
+          type="primary"
+          size="small"
+          style="width: 70px"
+          @click="add_line"
+          >增行</Button
+        >
+      </div>
+      <Table :columns="tableColumns" :data="tableData" border>
+        <template slot="houseSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].house"
+            placeholder="楼栋"
+          />
+          <span v-else>{{ tableData[index].house }}</span>
+        </template>
+        <template slot="unitSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].unit"
+            placeholder="单元"
+          />
+          <span v-else>{{ tableData[index].unit }}</span>
+        </template>
+        <template slot="layerSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].layer"
+            placeholder="楼层"
+          />
+          <span v-else>{{ tableData[index].layer }}</span>
+        </template>
+        <template slot="numberSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].number"
+            placeholder="房间号"
+          />
+          <span v-else>{{ tableData[index].number }}</span>
+        </template>
+        <template slot="type_titleSet" slot-scope="{ row, index }">
+          <el-cascader
+            v-if="row.input_state"
+            v-model="tableData[index].type_id"
+            size="small"
+            :show-all-levels="false"
+            :options="cascader_list"
+            :props="{
+              expandTrigger: 'hover',
+              children: 'child',
+              value: 'id',
+              label: 'title',
+              emitPath: false,
+              checkStrictly: true,
+            }"
+            @change="handleTypeTitleChange"
+          ></el-cascader>
+          <!-- @change="changeProduct(tableData[index], index)" -->
+          <span v-else>{{ tableData[index].type_title }}</span>
+        </template>
+        <template slot="titleSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].title"
+            placeholder="产品"
+          />
+          <span v-else>{{ tableData[index].title }}</span>
+        </template>
+        <template slot="product_unitSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].product_unit"
+            placeholder="单位"
+          />
+          <span v-else>{{ tableData[index].product_unit }}</span>
+        </template>
+        <template slot="positionSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].position"
+            placeholder="位置"
+          />
+          <span v-else>{{ tableData[index].position }}</span>
+        </template>
+        <template slot="urlSet" slot-scope="{ index }">
+          <div class="product-img">
+            <div class="product-add">
+              <div
+                class="items"
+                v-show="tableData[index].url.length !== 0 ? true : false"
+              >
+                <img
+                  @click="looks(tableData[index].url)"
+                  v-for="(el, idx) in tableData[index].url"
+                  :key="idx"
+                  :src="$store.state.ip + el"
+                  alt=""
+                />
+              </div>
+              <template style="flex">
+                <div style="display: flex; justify-content: center">
+                  <Icon
+                    size="50"
+                    @click="
+                      delItems(
+                        tableData[index].url.length - 1,
+                        tableData[index].url
+                      )
+                    "
+                    class="add-items"
+                    type="ios-remove"
+                  />
+                  <div class="add-items">
+                    <div class="_item">
+                      <Icon size="50" type="ios-add" />
+                    </div>
+                    <input
+                      @change="changeIpt($event, tableData[index])"
+                      type="file"
+                      class="ipt"
+                    />
+                  </div>
+                </div>
+              </template>
+            </div>
+          </div>
+        </template>
+        <template slot="url_numberSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].url_number"
+            placeholder="图号"
+          />
+          <span v-else>{{ tableData[index].url_number }}</span>
+        </template>
+        <template slot="modelSet" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].model"
+            placeholder="型号"
+          />
+          <span v-else>{{ tableData[index].model }}</span>
+        </template>
+         <template slot="status" slot-scope="{ index }">
+          <span>{{ tableData[index].status?'新增':'变更' }}</span>
+        </template>
+        <template slot="long" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].long"
+            placeholder="长"
+          />
+          <span v-else>{{ row.long }}</span>
+        </template>
+        <template slot="width" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].wide"
+            placeholder="宽"
+          />
+          <span v-else>{{ tableData[index].wide }}</span>
+        </template>
+        <template slot="heigh" slot-scope="{ row, index }">
+          <Input
+            type="text"
+            size="small"
+            v-if="row.input_state"
+            v-model="tableData[index].high"
+            placeholder="高"
+          />
+          <span v-else>{{ tableData[index].high }}</span>
+        </template>
+        <template slot="set" slot-scope="{ row, index }">
+          <a
+            style="margin: 0 5px; color: blue"
+            @click="handleSet(row, index, 1)"
+            v-show="row.change_state"
+            >变更</a
+          >
+          <a
+            style="margin: 0 5px; color: blue"
+            @click="handleSet(row, index, 2)"
+            >复制</a
+          >
+          <a style="margin: 0 5px; color: red" @click="handleSet(row, index, 3)"
+            >删除</a
+          >
+        </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"
+              v-show="ListData[index].url.length !== 0 ? true : false"
+            >
+              <img
+                @click="looks(ListData[index].url)"
+                v-for="(el, idx) in ListData[index].url"
+                :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: {
+        building: "",
+        unit: "",
+        room_number: "",
+        floor: "",
+        product_title: "",
+        pic_number: "",
+        depart_end:'',
+        depart_start:'',
+        msg:'',
+        contact_order_no:'',
+        change_type:''
+      },
+      cascader_list: [],
+      building_list: [],
+      type: 1,
+      unit_list: [],
+      floor_list: [],
+      room_number_list: [],
+      product_title_list: [],
+      pic_number_list: [],
+      tableColumns: [
+        {
+          title: "楼栋",
+          key: "house",
+          align: "center",
+          width: 80,
+          slot: "houseSet",
+          resizable: true,
+        },
+        {
+          title: "楼单元",
+          key: "unit",
+          align: "center",
+          width: 80,
+          slot: "unitSet",
+          resizable: true,
+        },
+        {
+          title: "楼层",
+          key: "layer",
+          align: "center",
+          width: 80,
+          slot: "layerSet",
+          resizable: true,
+        },
+        {
+          title: "房间号",
+          key: "number",
+          align: "center",
+          width: 100,
+          slot: "numberSet",
+          resizable: true,
+        },
+        {
+          title: "产品分类",
+          key: "title",
+          align: "center",
+          width: 140,
+          slot: "type_titleSet",
+          resizable: true,
+        },
+        {
+          title: "产品",
+          key: "title",
+          align: "center",
+          width: 130,
+          slot: "titleSet",
+          resizable: true,
+        },
+        {
+          title: "计量单位",
+          key: "product_unit",
+          align: "center",
+          width: 100,
+          slot: "product_unitSet",
+          resizable: true,
+        },
+        {
+          title: "位置",
+          key: "position",
+          align: "center",
+          width: 100,
+          slot: "positionSet",
+          resizable: true,
+        },
+        {
+          title: "图纸",
+          key: "url",
+          align: "center",
+          width: 120,
+          slot: "urlSet",
+          resizable: true,
+        },
+        {
+          title: "图号",
+          key: "url_number",
+          align: "center",
+          width: 120,
+          slot: "url_numberSet",
+          resizable: true,
+        },
+        {
+          title: "型号",
+          key: "model",
+          align: "center",
+          width: 120,
+          slot: "modelSet",
+          resizable: true,
+        },
+        {
+          title: "长",
+          key: "H",
+          align: "center",
+          width: 120,
+          resizable: true,
+          slot: "long",
+        },
+        {
+          title: "宽",
+          key: "W",
+          align: "center",
+          width: 120,
+           slot: "width",
+          resizable: true,
+        },
+        {
+          title: "高",
+          key: "T",
+          align: "center",
+          width: 120,
+         slot: "heigh",
+          resizable: true,
+        },
+        {
+          title: "变更类型",
+          key: "status",
+          align: "center",
+          width: 120,
+          slot: "status",
+          resizable: true,
+        },
+        this.$route.query.type == 2
+          ? {
+              title: "操作",
+              key: "set",
+              align: "center",
+              minWidth: 150,
+              fixed: "right",
+              slot: "set",
+              resizable: true,
+            }
+          : { width: 1 },
+      ],
+      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 },
+        { title: "变更类型", key: "state", 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.order_no,
+      this.$route.query.order_area_id,
+      this.$route.query.order_area_product_id
+    );
+  },
+  methods: {
+      handleFinish(){
+         if(this.formData.depart_end ==null||
+       this.formData.depart_start == null||
+       this.formData.change_type == null||
+       this.formData.msg == null||
+       this.formData.contact_order_no == null){
+             this.$Message.error('请填写完整信息');
+         }else{
+          let arr = [];
+          let arr1 = [];
+          this.tableData.forEach(item=>{
+              item.product_title = item.title
+              if(item.status ==1||item.status ==0){
+                  arr.push(item)
+              }
+          })
+          this.ListData.forEach(item=>{
+              item.product_title = item.title
+              if(item.status ==2){
+                  arr1.push(item)
+              }
+          })
+          this.axios({
+              method:'post',
+              url:'/api/change_area_product_save',
+              data:{
+                  order_area_product_id:this.$route.query.order_area_product_id,
+                  get_depart_id:this.formData.depart_end,
+                  send_depart_id:this.formData.depart_start,
+                  change_type:this.formData.change_type,
+                  reason:this.formData.msg,
+                  change_list:[...arr1,...arr],
+                  contact_order_no:this.formData.contact_order_no
+              }
+          }).then(res=>{
+              if(res.code == 200){
+                  this.$Message.success(res.msg)
+              }
+          })
+         }
+      },
+    add_line() {
+      let arr = {
+        long: "",
+        high: "",
+        wide: "",
+        change_state: false,
+        status:1,
+        copy_state:true,
+        check_state: false,
+        explode_status: '',
+        house: '',
+        house_id: "",
+        id: '',
+        input_state: true,
+        layer: '',
+        model: "",
+        number: '',
+        order_area_id: '',
+        order_area_product_id: '',
+        order_no: "",
+        position: "",
+        price: null,
+        product_id: '',
+        product_unit: "",
+        real_price: '',
+        sign_id: "",
+        status: '',
+        title: "",
+        type_id: '',
+        type_title: "",
+        unit: '',
+        url: [],
+        url_number: "",
+        _index: '',
+        _rowKey: '',
+      };
+      this.tableData.unshift(arr);
+    },
+    handleTypeTitleChange(e) {},
+    changeIpt(e, row) {
+      let file = e.target.files[0];
+      this.postImg(file, row);
+      e.target.value = null;
+    },
+    postImg(file, row) {
+      let formData = new FormData();
+      formData.append("file", file);
+      this.axios.post("/api/upload_pic", formData).then((res) => {
+        row.url.push(res.data.url);
+      });
+    },
+    delItems(n, arr) {
+      arr.splice(n, 1);
+    },
+    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: "",
+      });
+    },
+    handleSet(row, index, type) {
+      switch (type) {
+        case 1:
+          this.tableData[index].input_state = true;
+          row.input_state = true;
+          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);
+          } else {
+            this.$Message.warning("不可重复变更!");
+          }
+          break;
+        case 2:
+          this.tableData.splice(index, 0, row);
+          //  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;
+          //标记是复制的数据
+          this.tableData[index + 1].copy_state = true;
+          console.log(row);
+          break;
+        case 3:
+            this.confirmDelete({
+        content: "确认删除么?",
+        then: () => {
+             let arr = this.tableData.splice(index, 1);
+          if (row.copy_state) {
+            return;
+          } else {
+            arr[0].state = "删除";
+            arr[0].status =2;
+            this.ListData = [...this.ListData, ...arr];
+            console.log(arr);
+          }
+        }
+            });
+         
+      }
+    },
+    getListData() {},
+    goback() {
+      this.$router.go(-1);
+    },
+    initData(order_no, order_area_id, order_area_product_id) {
+      this.axios({
+        method: "get",
+        url: "/api/order_area_product_list",
+        params: {
+          order_no,
+          order_area_id,
+          order_area_product_id,
+        },
+      }).then((res) => {
+        console.log(res);
+        this.tableData = res.data.detail;
+        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];
+          item.input_state = false; //是否为input框
+          item.check_state = false; //是否已经变更过
+          item.change_state = true; //变更操作是否存在
+        });
+      });
+    },
+  },
+};
+</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;
+  }
+  .add-items {
+    width: 40px;
+    height: 40px;
+    border: 1px dotted #e7e7e7;
+    border-radius: 5px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    overflow: hidden;
+    position: relative;
+    flex-direction: column;
+    background: #f4f5f7;
+    ._item {
+      width: 46px;
+      height: 46px;
+      background: #3764ff;
+      opacity: 0.6;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      border-radius: 50%;
+      color: #fff;
+    }
+  }
+  .items {
+    width: 40px;
+    height: 40px;
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+    border-radius: 5px;
+    position: relative;
+    img {
+      max-width: 40px;
+      max-height: 40px;
+    }
+  }
+}
+.List_form_content {
+  margin: 30px 0;
+}
+.ivu-form-item {
+    margin-left: 10px;
+}
+</style>

+ 139 - 0
src/views/BidSystem/DeepeningOrder/changeRecord.vue

@@ -0,0 +1,139 @@
+<template>
+    <div>
+        <FullPage 
+        title='变更记录' 
+        :list='list' 
+        @init='init' 
+        :logList='logList'
+        @searchData='init' 
+        @changePage='changePage'
+        @selectTable='selectTable'
+        :tableColums='tableColums'
+        :tableData='tableData'
+        :pageIndex='pageIndex'
+        :total='total'
+        >   
+            <div slot='titleButton'>
+                <Button @click="back" type='primary' ghost style="margin-right:10px;">返回</Button>
+            </div>
+            <template slot='set' slot-scope='{row}'>
+                <div>
+                   <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>
+        </FullPage>
+    </div>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            type:1,
+            order_no:null,
+            logList:[{ key: "系统单号", value: "10998765" }],
+            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:''}
+            ],
+            tableColums:[
+                {title:'区域编码',align:'center',width:'200',key:'area_num'},
+                {title:'区域名称',align:'center',width:'200',key:'area_title'},
+                {title:'单位',align:'center',width:'200',key:'area_unit'},
+                {title:'工程量',align:'center',width:'200',key:'quantity'},
+                {title:'户型',align:'center',width:'200',key:'house_type'},
+                {title:'区域备注',align:'center',width:'200',key:'area_remark'},
+                {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:'fashion'},
+                {title:'图号',align:'center',width:'200',key:'url_number'},
+                {title:'产品备注',align:'center',width:'200',key:'product_remark'},
+                {title:'变更时间',align:'center',width:'200',key:'crt_time'},
+                {title:'操作',align:'center',width:'200',key:'plan_start_time',slot:'set'}
+            ],
+            tableData:[],
+            pageIndex:1,
+            total:0,
+            showPlan:false,
+            planInfo:{
+                house_id:null,
+                start_time:'',
+                end_time:''
+            },
+            selects:[],
+        }
+    },
+    created(){
+    },
+    methods:{
+        init(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=>{
+                if(res.code == 200){
+                    this.tableData = res.data.data;
+                    // this.logList = res.data.detail
+                }
+            })
+        },
+        back(){
+            this.$router.go(-1)
+        },
+        
+        postData(){
+
+        },
+        goPage(row){
+            this.$router.push({
+                path:'/cms/measurementordermannage/edit',
+                query:{
+                    house_id:row.house_id,
+                    oa_order_no:row.oa_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>
+
+<style lang="scss" scoped>
+.log-list{display: flex;flex-wrap:wrap;padding:10px 0;}
+</style>

+ 19 - 2
src/views/BidSystem/DeepeningOrder/list.vue

@@ -71,7 +71,7 @@
             >编辑</a
           >
           <a style="margin: 0 5px" @click="handleSet(row, index, 3)">详情</a>
-          <!-- <a
+          <a
             style="margin: 0 5px"
             :disabled="row.deep_status == 1"
             @click="handleSet(row, index, 4)"
@@ -81,10 +81,11 @@
             style="margin: 0 5px; color: orange"
             @click="handleSet(row, index, 5)"
             >变更记录</a
-          > -->
+          >
           <a style="margin: 0 5px" @click="handleSet(row, index, 6)"
             >数据对比</a
           >
+
         </div>
       </template>
       <template slot="pageSlot">
@@ -366,8 +367,24 @@ export default {
           });
           break;
         case 4:
+           this.$router.push({
+            path: "/cms/BidSystem/DeepeningOrder/change",
+            query: {
+              type,
+              order_no: row.order_no,
+              oa_id: row.oa_id,
+            },
+          });
           break;
         case 5:
+           this.$router.push({
+            path: "/cms/BidSystem/DeepeningOrder/changeRecord",
+            query: {
+              type,
+              order_no: row.order_no,
+              oa_id: row.oa_id,
+            },
+          });
           break;
         case 6:
           this.$router.push({

+ 7 - 0
src/views/ProductionOrderList/ProductionPlanlist/list.vue

@@ -473,6 +473,13 @@ export default {
             .then((res) => {
               if (res.code == 200) {
                 this.$Message.success(res.msg);
+                // let data =[];
+                // for(let i = 0 ; i++ ; i<this.tableColums){
+                //   if(this.tableColums[i].title.indexOf(result)>=0){
+                //              data.push(this.tableColums[i])
+                //   }
+                // }
+                // this.computedTable = data
               }
             });
         },