Quellcode durchsuchen

合同变更 (未完成)

yusheng vor 1 Jahr
Ursprung
Commit
790d33ff4f

+ 58 - 0
src/api/contractManage/contractChange.js

@@ -0,0 +1,58 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+/**
+ * 获取信息列表
+ */
+export async function getTableList(params) {
+  const res = await request.get(`/eom/contractchangerecord/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取信息详情
+ */
+export async function getDetail(id) {
+  const res = await request.get(`/eom/contractchangerecord/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新信息
+ */
+export async function UpdateInformation(data) {
+  const res = await request.put(`/eom/contractchangerecord/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增信息
+ */
+export async function addInformation(data) {
+  const res = await request.post(`/eom/contractchangerecord/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteInformation(data) {
+  const res = await request.delete('/eom/contractchangerecord/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+

+ 5 - 4
src/views/contractManage/contractBook/components/addDialog.vue

@@ -1206,8 +1206,8 @@
             } else {
               this.$set(
                 this.$refs.inventoryTable?.form?.datasource[index],
-                'supplierMark',
-                item.supplierMark || this.form.customerMark
+                'customerMark',
+                item.customerMark || this.form.customerMark
               );
             }
           });
@@ -1267,13 +1267,14 @@
             this.$nextTick(async () => {
               this.setValue(row);
               if (source == 'inquiryManage') {
+                console.log(row,'row')
                 //核价单是否生成过合同
                 this.$nextTick(() => {
                   this.$refs.rawDetailListRef &&
-                    this.$refs.rawDetailListRef.putTableValueNew(row.rawList); //原料
+                    this.$refs.rawDetailListRef.putTableValueNew(row.contractVO?.rawList); //原料
                   this.$refs.outputDetailListRef &&
                     this.$refs.outputDetailListRef.putTableValueNew(
-                      row.outputList
+                      row.contractVO?.outputList
                     );
                 });
                 let res = await isHasGeneratedContractPI({

+ 1 - 6
src/views/contractManage/contractBook/index.vue

@@ -508,12 +508,7 @@ export default {
             businessType: res.type,
             businessCode:res.contractNo
           },
-          // callBackMethodType : '1',
-          // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-          // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-          // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-          // miniHandle : '',
-          // miniView : '',
+    
         }
         this.$refs.processSubmitDialogRef.init(params)
       })

+ 113 - 341
src/views/contractManage/contractChange/components/addOrEditDialog.vue

@@ -18,378 +18,150 @@
     >
       <headerTitle title="基本信息"></headerTitle>
       <el-row>
-        <el-col :span="8">
+        <el-col :span="12" v-if="dialogType != 'add'">
           <el-form-item label="编码" prop="code">
             <el-input v-model="form.code" disabled></el-input>
           </el-form-item>
         </el-col>
 
-        <el-col :span="8">
+        <!-- <el-col :span="12">
           <el-form-item label="名称" prop="name">
             <el-input v-model="form.name"></el-input>
           </el-form-item>
+        </el-col> -->
+        <el-col :span="12">
+          <el-form-item label="变更合同" prop="contractName">
+            <el-input
+              v-model="form.contractName"
+              @click.native="selectContract"
+              readonly
+            ></el-input>
+          </el-form-item>
         </el-col>
-        <el-col :span="8">
-          <el-form-item label="考核指标" prop="assessmentIndicators">
-            <el-select
-              @change="salesChange"
-              v-model="form.assessmentIndicators"
-              placeholder="请选择"
-              style="width: 100%"
-            >
-              <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              >
-              </el-option>
-            </el-select>
+        <el-col :span="12">
+          <el-form-item label="附件" prop="files">
+            <fileMain v-model="form.files"></fileMain>
           </el-form-item>
         </el-col>
-
         <el-col :span="24">
-          <el-form-item label="描述" prop="describes">
-            <el-input v-model="form.describes" type="textarea"></el-input>
+          <el-form-item label="变更原因" prop="reason">
+            <el-input v-model="form.reason" type="textarea"></el-input>
           </el-form-item>
         </el-col>
-      </el-row>
-
-      <headerTitle title="考核指标限制条件"></headerTitle>
-      <el-row>
-        <el-col
-          :span="24"
-          v-for="(item, i) in tableList"
-          :key="i"
-          style="margin-top: 15px"
-        >
-          <div class="itemDiv">
-            <div class="left">
-              <span
-                >且(AND)
-                <i
-                  v-show="i == 0"
-                  style="color: #fff; font-size: 16px; margin-bottom: 5px"
-                  class="el-icon-circle-close"
-                ></i>
-                <i
-                  v-show="i != 0"
-                  style="color: red; font-size: 16px; margin-bottom: 5px"
-                  class="el-icon-circle-close"
-                  @click="del(i)"
-                ></i
-              ></span>
-              <i class="leftLine"></i>
-              <div class="rightLine">
-                <i v-for="(val, index) in item" :key="index"></i>
-                <i></i>
-                <!-- <i></i> -->
-              </div>
-            </div>
-            <div class="right">
-              <div
-                class="rightItem"
-                v-for="(val, index) in item"
-                :key="index"
-                :style="{ marginTop: index == 0 ? '' : '20px' }"
-              >
-                <el-select
-                  v-model="val.value"
-                  placeholder="请选择"
-                  style="width: 100%"
-                >
-                  <el-option
-                    v-for="item in valueOptions"
-                    :key="item.value"
-                    :label="item.name"
-                    :value="item.value"
-                    @click.native="valChange(item, val)"
-                  >
-                  </el-option>
-                </el-select>
-                <el-select
-                  v-model="val.operator"
-                  placeholder="请选择"
-                  style="width: 100%; margin-left: 8px"
-                >
-                  <el-option
-                    v-for="item in operatorOptions"
-                    :key="item.value"
-                    :label="item.name"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-
-                <el-select
-                  v-model="val.status"
-                  multiple
-                  placeholder="请选择"
-                  style="width: 100%; margin-left: 8px"
-                >
-                  <el-option
-                    v-for="item in val.statusOptions"
-                    :key="item.value"
-                    :label="item.name"
-                    :value="item.value"
-                  >
-                  </el-option>
-                </el-select>
-                <i
-                  v-show="index == 0"
-                  style="color: #fff; font-size: 16px; margin-left: 5px"
-                  class="el-icon-circle-close"
-                ></i>
-                <i
-                  v-show="index != 0"
-                  style="color: red; font-size: 16px; margin-left: 5px"
-                  class="el-icon-circle-close"
-                  @click="delItem(item, index)"
-                ></i>
-              </div>
-              <div style="margin-top: 20px" class="rightItem">
-                <i
-                  @click="addItem(item)"
-                  class="el-icon-circle-plus-outline"
-                ></i>
-              </div>
-              <!-- <div style="margin-top: 20px" class="rightItem">
-                <el-input v-model="form.branchName"></el-input
-              ></div> -->
-            </div>
-          </div>
-          <el-divider>或</el-divider>
-        </el-col>
         <el-col :span="24">
-          <el-form-item
-            label-width="50px"
-            prop="branchName"
-            style="margin-top: 15px"
-          >
-            <el-button
-              size="small"
-              type="primary"
-              icon="el-icon-plus"
-              class="ele-btn-icon"
-              @click="add()"
-            >
-              继续添加筛选器
-            </el-button>
+          <el-form-item label="变更描述" prop="remark">
+            <el-input v-model="form.remark" type="remark"></el-input>
           </el-form-item>
         </el-col>
       </el-row>
     </el-form>
     <div slot="footer">
-      <el-button type="primary" @click="handleSave(0)" v-click-once>保存</el-button>
+      <el-button type="primary" @click="handleSave()" v-click-once
+        >保存</el-button
+      >
       <el-button @click="cancel">返回</el-button>
     </div>
+    <contractListDialog
+      ref="selectContractRef"
+      @changeParent="changeContract"
+      :type="0"
+      :isChange="true"
+    ></contractListDialog>
   </ele-modal>
 </template>
 <script>
-import { mapGetters } from 'vuex';
-import { targetDefinitionSave } from '@/api/targetManage/index.js';
-import {
-  salesRegulationOption,
-  assessmentIndicatorsOptions
-} from '@/views/targetManage/util.js';
-
-const defForm = {
-  name: '',
-  assessmentIndicators: '',
-  assessmentCriteria: [], //条件
-  status: '',
-  type: '',
-  describes: ''
-};
-export default {
-  components: {},
-
-  computed: {
-    ...mapGetters(['user'])
-  },
-  data() {
-    return {
-      addOrEditDialogFlag: false,
-      dialogType: '',
-      title: '',
-      form: {
-        ...defForm
-      },
-      tableList: [],
-      valueOptions: [],
-      operatorOptions: [
-        {
-          name: '属于',
-          value: '1'
-        },
-        {
-          name: '不属于',
-          value: '2'
-        }
-      ],
-      options: assessmentIndicatorsOptions,
-      rules: {
-        name: { required: true, message: '请输入', trigger: 'change' },
-        assessmentIndicators: {
-          required: true,
-          message: '请选择',
-          trigger: 'change'
-        }
-      }
-    };
-  },
-  created() {},
-  methods: {
-    //初始化
-    async open(row = {}, type) {
-      this.addOrEditDialogFlag = true;
-      this.title = type == 'add' ? '新增' : '修改';
-      this.dialogType = type;
-      if (type !== 'add') {
-        this.form = JSON.parse(JSON.stringify(row));
-        this.tableList = this.form.assessmentCriteria;
-        const { valueOption } = salesRegulationOption(
-          this.form.assessmentIndicators
-        );
-        this.valueOptions = valueOption;
-      } else {
-        this.add();
-      }
-    },
-    addItem(item) {
-      item.push({
-        value: '',
-        operator: '1',
-        status: [],
-        statusOptions: []
-      });
-    },
-    delItem(item, i) {
-      item.splice(i, 1);
-    },
-    del(i) {
-      this.tableList.splice(i, 1);
+  import { mapGetters } from 'vuex';
+  import {
+    addInformation,
+    UpdateInformation,getDetail
+  } from '@/api/contractManage/contractChange.js';
+  import fileMain from '@/components/addDoc/index.vue';
+  import contractListDialog from '@/views/saleManage/saleOrder/components/contractListDialog.vue';
+  const defForm = {
+    name: '',
+    code: '',
+    files: [], //条件
+    remark: '',
+    type: '',
+    describes: '',
+    contractName: '',
+    contractId: ''
+  };
+  export default {
+    components: { fileMain, contractListDialog },
+    computed: {
+      ...mapGetters(['user'])
     },
+    data() {
+      return {
+        addOrEditDialogFlag: false,
+        dialogType: '',
+        title: '',
+        form: {
+          ...defForm
+        },
 
-    add() {
-      this.tableList.push([
-        {
-          value: '',
-          operator: '1',
-          status: [],
-          statusOptions: []
+        rules: {
+          name: { required: true, message: '请输入', trigger: 'change' }
         }
-      ]);
+      };
     },
-
-    salesChange(val) {
-      const { valueOption, statusOption } = salesRegulationOption(val);
-      this.valueOptions = valueOption;
-      this.statusOptions = statusOption;
-      this.tableList.forEach((item) => {
-        item.forEach((_item) => {
-          _item.status = [];
-          _item.statusOptions = [];
-          _item.value = '';
+    created() {},
+    methods: {
+      //初始化
+      async open(row = {}, type) {
+        this.addOrEditDialogFlag = true;
+        this.title = type == 'add' ? '新增' : '修改';
+        this.dialogType = type;
+        if (type !== 'add') {
+          this.getInfo(row.id)
+        }
+      },
+      selectContract() {
+        this.$nextTick(() => {
+          this.$refs.selectContractRef.open();
         });
-      });
-    },
-    valChange(item, val) {
-      const { statusOption } = salesRegulationOption(
-        this.form.assessmentIndicators,
-        item.value
-      );
-      val.statusOptions = statusOption;
-      val.status = [];
-    },
-    //获取详情
-    async getFeeApplyInfoInfo(id) {
-      this.form = await getSettlementAccountInfoAPI(id);
-    },
-    handleSave(flag) {
-      this.$refs.form.validate(async (valid) => {
-        if (!valid) return this.$message.warning('有必填项未填,请检查');
-        let isTrue = true;
-        this.tableList.forEach((item) => {
-          item.forEach((val) => {
-            if (!val.value || val.status.length == 0) {
-              isTrue = false;
-            }
-          });
+      },
+      changeContract(data) {
+        this.$set(this.form, 'contractName', data.contractName);
+        this.$set(this.form, 'contractId', data.id);
+        console.log(this.form);
+      },
+      //获取详情
+      async getInfo(id) {
+        this.form = await getDetail(id);
+      },
+      handleSave(type) {
+        this.$refs.form.validate((valid) => {
+          if (!valid) return this.$message.warning('有必填项未填,请检查');
+          let api =
+            this.dialogType == 'add' ? addInformation : UpdateInformation;
+          api(this.form)
+            .then((res) => {
+              this.$message.success('操作成功');
+              if (type === 'sub') {
+                this.sendSubmit(res);
+                return;
+              }
+              this.done();
+              this.cancel();
+            })
+            .catch((e) => {});
         });
-        if (!isTrue) {
-          return this.$message.warning('请完善考核指标限制条件');
-        }
-        this.form.assessmentCriteria = this.tableList;
-        const id = await targetDefinitionSave(this.form);
-        if (flag) {
-          await this.handleSub(id);
-        }
-        this.$message.success('操作成功');
-        this.done();
-        this.cancel();
-      });
-    },
-
-    //刷新主列表数据
-    done() {
-      this.$emit('reload');
-    },
-    //关闭弹窗
-    cancel() {
-      this.form = {
-        ...defForm
-      };
-      this.tableList = [];
-      this.addOrEditDialogFlag = false;
-    }
-  }
-};
-</script>
-<style scoped lang="scss">
-.itemDiv {
-  display: flex;
-  .left {
-    display: flex;
-    align-items: center;
-    span {
-      height: 100%;
-      display: flex;
-      align-items: center;
-    }
-    .leftLine {
-      height: calc(100% - 30px);
-      width: 1px;
-      background: #dddddd;
-      margin-left: 10px;
-    }
-    .rightLine {
-      display: flex;
-      flex-direction: column;
-      justify-content: space-between;
-      height: calc(100% - 30px);
+      },
 
-      i {
-        height: 1px;
-        width: 20px;
-        background: #dddddd;
+      //刷新主列表数据
+      done() {
+        this.$emit('reload');
+      },
+      //关闭弹窗
+      cancel() {
+        this.form = {
+          ...defForm
+        };
+        this.addOrEditDialogFlag = false;
       }
     }
-  }
-  .right {
-    display: flex;
-    flex-direction: column;
-    width: calc(100% - 150px);
-  }
-  .rightItem {
-    height: 45px;
-    display: flex;
-    align-items: center;
-    i {
-      font-size: 28px;
-      color: #ddd;
-      cursor: pointer;
-    }
-  }
-}
-</style>
+  };
+</script>
+<style scoped lang="scss"></style>

+ 0 - 147
src/views/contractManage/contractChange/components/orgTree.vue

@@ -1,147 +0,0 @@
-<template>
-    <ele-modal
-      custom-class="ele-dialog-form long-dialog-form"
-      :centered="true"
-      :visible.sync="addOrEditDialogFlag"
-      :title="title"
-      :append-to-body="false"
-      :close-on-click-modal="false"
-      width="60%"
-      :before-close="cancel"
-    >
-      <vue2-org-tree
-        name="test"
-        :data="data"
-        :collapsable="true"
-        horizontal="horizontal"
-        :render-content="renderContent"
-        @on-expand="onExpand"
-        @on-node-click="onNodeClick"
-      />
-    </ele-modal>
-  </template>
-  <script>
-  import { mapGetters } from 'vuex';
-
-  
-  export default {
-    name: 'add-or-edit-dialog',
-    components: {},
-    props: {
-      addOrEditDialogFlag: {
-        type: Boolean,
-        default: false
-      }
-    },
-    computed: {
-      ...mapGetters(['user'])
-    },
-    data() {
-      return {
-        data: {
-       
-        },
-  
-        dialogType: '',
-        title: '',
-        form: {
-          account: '',
-          bankName: '',
-          branchName: '',
-          createTime: '',
-          enabled: 1,
-          id: '',
-          remark: '',
-          type: undefined
-        },
-        feeTypeList: [],
-        accountingSubjectList: [],
-        deptList: [],
-        deptTreeList: [],
-        rules: {
-          type: { required: true, message: '请选择', trigger: 'change' },
-          enabled: { required: true, message: '请选择', trigger: 'change' }
-        }
-      };
-    },
-    created() {},
-    methods: {
-      renderContent(h, data) {
-        return (
-        
-          <div class="sss">
-             <span class={data.type==1?'zaz':'ddd'}>{data.type==1?'公司':'部门'}</span>
-            {data.label}</div>
-        );
-      },
-      //初始化
-      async init(row = {}, type) {
-        this.title = type == 'add' ? '新增' : '修改';
-        this.dialogType = type;
-        if (type !== 'add') {
-          await this.getFeeApplyInfoInfo(row.id);
-        }
-      },
-      //获取详情
-      async getFeeApplyInfoInfo(id) {
-        this.form = await getSettlementAccountInfoAPI(id);
-      },
-      onExpand(e, data) {
-        if ('expand' in data) {
-          data.expand = !data.expand;
-          if (!data.expand && data.children) {
-            this.collapse(data.children);
-          }
-        } else {
-          this.$set(data, 'expand', true);
-        }
-      },
-      //点击选项执行的方法,可以用于跳转到其他链接,注意一定要写协议头
-      onNodeClick(e, data) {
-        //console.log(data.label);
-        if (data.url == null) {
-          return false;
-        } else {
-          window.open(data.url);
-        }
-      },
-  
-      handleSave(flag) {
-        this.$refs.form.validate(async (valid) => {
-          if (!valid) return this.$message.warning('有必填项未填,请检查');
-          const API =
-            this.dialogType == 'add'
-              ? settlementAccountSaveAPI
-              : settlementAccountUpdateAPI;
-          const id = await API(this.form);
-          if (flag) {
-            await this.handleSub(id);
-          }
-          this.$message.success('操作成功');
-          this.done();
-          this.cancel();
-        });
-      },
-      //提交-开启流程
-      async handleSub(id) {
-        try {
-          await settlementAccountSubmit({ businessId: id });
-        } catch (e) {
-          this.$message.error(e.message);
-        }
-      },
-      //刷新主列表数据
-      done() {
-        this.$emit('reload');
-      },
-      //关闭弹窗
-      cancel() {
-        this.$emit('update:addOrEditDialogFlag', false);
-      }
-    }
-  };
-  </script>
-  <style scoped lang="scss">
-  @import '~vue2-org-tree/dist/style.css';
-  </style>
-  

+ 182 - 194
src/views/contractManage/contractChange/index.vue

@@ -13,7 +13,6 @@
         :selection.sync="selection"
         cache-key="eomContactPageTable"
         :page-size="20"
-
       >
         <!-- 表头工具栏 -->
         <template v-slot:toolbar>
@@ -26,16 +25,6 @@
           >
             新建
           </el-button>
-          <el-button
-            size="small"
-            type="danger"
-            el-icon-delete
-            class="ele-btn-icon"
-            @click="allDelBtn"
-            :disabled="selection?.length === 0"
-          >
-            批量删除
-          </el-button>
         </template>
         <!-- 操作 -->
         <template v-slot:action="{ row }">
@@ -44,13 +33,24 @@
             :underline="false"
             icon="el-icon-edit"
             @click="handleAddOrEdit(row, 'update')"
+            v-if="[0, 3].includes(row.approvalStatus)"
           >
             修改
           </el-link>
+          <el-link
+            type="primary"
+            v-if="[0, 3].includes(row.approvalStatus)"
+            :underline="false"
+            icon="el-icon-plus"
+            @click="sub(row)"
+          >
+            提交
+          </el-link>
           <el-popconfirm
             class="ele-action"
             title="确定要删除此信息吗?"
             @confirm="remove([row.id])"
+            v-if="[0, 3].includes(row.approvalStatus)"
           >
             <template v-slot:reference>
               <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -71,215 +71,203 @@
       </ele-pro-table>
     </el-card>
 
-    <!-- 多选删除弹窗 -->
-    <pop-modal
-      :visible.sync="delVisible"
-      content="是否确定删除?"
-      @done="commitBtn"
-    />
     <add-or-edit-dialog
       ref="addOrEditDialogRef"
       @reload="reload"
     ></add-or-edit-dialog>
+    <process-submit-dialog
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
   </div>
 </template>
 
 <script>
-import addOrEditDialog from './components/addOrEditDialog.vue';
-import searchTable from './components/searchTable.vue';
-import { assessmentIndicatorsOptions } from '@/views/targetManage/util.js';
-
-import {
-  targetDefinitionPage,
-  targetDefinitionDel
-} from '@/api/targetManage/index.js';
-
-export default {
-  components: {
-    addOrEditDialog,
-    searchTable
-  },
-  data() {
-    return {
-      // 加载状态
-      loading: false,
-      delVisible: false,
-      addOrEditDialogFlag: false,
-      selection: []
-    };
-  },
-  computed: {
-    columns() {
-      return [
-        {
-          width: 45,
-          type: 'selection',
-          columnKey: 'selection',
-          align: 'center'
-        },
-        {
-          width: 60,
-          label: '序号',
-          type: 'index',
-          columnKey: 'index',
-          align: 'center'
-        },
-        {
-          minWidth: 200,
-          prop: 'code',
-          label: '编码',
-          align: 'center',
-          slot: 'code',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 200,
-          prop: 'name',
-          label: '名称',
-          slot: 'name',
-          align: 'center',
-          showOverflowTooltip: true
-        },
+  import addOrEditDialog from './components/addOrEditDialog.vue';
+  import searchTable from './components/searchTable.vue';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import { reviewStatus } from '@/enum/dict';
 
-        {
-          minWidth: 200,
-          prop: 'assessmentIndicators',
-          label: '考核指标',
-          align: 'center',
-          showOverflowTooltip: true,
-          formatter: (row, column, val) => {
-            return assessmentIndicatorsOptions.find((item) => item.value == val)
-              ?.label;
-          }
-        },
+  import {
+    getTableList,
+    deleteInformation
+  } from '@/api/contractManage/contractChange.js';
 
-        // {
-        //   minWidth: 80,
-        //   prop: 'status',
-        //   label: '状态',
-        //   align: 'center',
-        //   slot: 'modelType',
-        //   showOverflowTooltip: true,
-        //   formatter: (row, column) => {
-        //     return row.status ? '启用' : '停用';
-        //   }
-        // },
-        {
-          minWidth: 100,
-          prop: 'createTime',
-          label: '创建人',
-          align: 'center',
-          slot: 'createTime',
-          showOverflowTooltip: true
-        },
-        {
-          minWidth: 100,
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          slot: 'createTime',
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 120,
-          align: 'center',
-          resizable: false,
-          slot: 'action',
-          showOverflowTooltip: true,
-          fixed: 'right'
-        }
-      ];
-    }
-  },
-  created() {},
-  methods: {
-    //新增、修改
-    handleAddOrEdit(row = {}, type) {
-      this.$refs.addOrEditDialogRef.open(row, type);
+  export default {
+    components: {
+      addOrEditDialog,
+      searchTable,
+      processSubmitDialog
     },
-    //新增、修改
-    handleDetail(row = {}, type) {
-      this.detailDialogFlag = true;
-      this.$nextTick(() => {
-        this.$refs.detailDialogRef.init(row, type);
-      });
+    data() {
+      return {
+        // 加载状态
+        loading: false,
+        delVisible: false,
+        addOrEditDialogFlag: false,
+        processSubmitDialogFlag: false,
+        selection: []
+      };
     },
+    computed: {
+      columns() {
+        return [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          },
+          {
+            width: 60,
+            label: '序号',
+            type: 'index',
+            columnKey: 'index',
+            align: 'center'
+          },
+          {
+            minWidth: 200,
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            slot: 'code',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 200,
+            prop: 'contractName',
+            label: '变更合同',
+            slot: 'contractName',
+            align: 'center',
+            showOverflowTooltip: true
+          },
 
-    /* 表格数据源 */
-    datasource({ page, limit, where, order }) {
-      return targetDefinitionPage({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
+          {
+            minWidth: 200,
+            prop: 'reason',
+            label: '变更原因',
+            align: 'center',
+            showOverflowTooltip: true
+          },
 
-    /* 刷新表格 */
-    reload(where = {}) {
-      this.$refs.table.reload({ page: 1, where });
+          {
+            minWidth: 80,
+            prop: 'remark',
+            label: '变更描述',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'approvalStatus',
+            label: '审核状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.approvalStatus];
+            }
+          },
+          {
+            minWidth: 100,
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 180,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ];
+      }
     },
+    created() {},
+    methods: {
+      //新增、修改
+      handleAddOrEdit(row = {}, type) {
+        this.$refs.addOrEditDialogRef.open(row, type);
+      },
+      //新增、修改
+      handleDetail(row = {}, type) {
+        this.detailDialogFlag = true;
+        this.$nextTick(() => {
+          this.$refs.detailDialogRef.init(row, type);
+        });
+      },
 
-    //批量删除
-    allDelBtn() {
-      if (this.selection.length === 0) return;
-      let flag = this.selection.some((item) =>
-        [1, 2].includes(item.approvalStatus)
-      );
-      if (flag)
-        return this.$message.warning('抱歉已审核、审核中的数据不能删除,请检查');
-      this.delVisible = true;
-    },
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return getTableList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
 
-    commitBtn() {
-      const dataId = this.selection.map((v) => v.id);
-      settlementAccountRemoveAPI(dataId).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
-    remove(row) {
-      targetDefinitionDel(row).then((res) => {
-        this.$message.success('删除成功!');
-        this.reload();
-      });
-    },
+      /* 刷新表格 */
+      reload(where = {}) {
+        this.$refs.table.reload({ page: 1, where });
+      },
 
-    sub(res) {
-      settlementAccountSubmit({
-        businessId: res.id
-      })
-        .then((res) => {
-          this.$message.success('提交成功');
+      remove(row) {
+        deleteInformation([row.id]).then((res) => {
+          this.$message.success('删除成功!');
           this.reload();
-        })
-        .catch((e) => {
-          this.$message.error(e.message);
         });
+      },
+
+      sub(res) {
+        this.processSubmitDialogFlag = true;
+        let key = 'eom_contract_change_approve';
+        this.$nextTick(() => {
+          let params = {
+            businessId: res.id,
+            businessKey: key,
+            formCreateUserId: res.createUserId,
+            variables: {
+              businessCode: res.code
+            }
+          };
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-:deep(.el-link--inner) {
-  margin-left: 0px !important;
-}
+  :deep(.el-link--inner) {
+    margin-left: 0px !important;
+  }
 
-.sys-organization-list {
-  height: calc(100vh - 264px);
-  box-sizing: border-box;
-  border-width: 1px;
-  border-style: solid;
-  overflow: auto;
-}
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
 
-.sys-organization-list :deep(.el-tree-node__content) {
-  height: 40px;
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
 
-  & > .el-tree-node__expand-icon {
-    margin-left: 10px;
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
   }
-}
 </style>