Bläddra i källkod

客户登记,合同登记

sangwenwei 1 år sedan
förälder
incheckning
2c2a853ba2

+ 2 - 0
src/api/AppPath.js

@@ -11,3 +11,5 @@ export const FINANCE_PATH = "/finance-server";
 export const PUBLIC_MODULES_PATH = "/public-modules-server";
 //中审
 export const CENTRECAREFUL_PATH = "/centrecareful-server";
+//嘉溢
+export const BUSINESS_PATH = "/business-server";

+ 96 - 0
src/api/jy/WorkClientService.js

@@ -0,0 +1,96 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class WorkClientService {
+  list (param) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/list',
+      method: 'get',
+      params: param
+    })
+  }
+  componentList (param) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/componentList',
+      method: 'get',
+      params: param
+    })
+  }
+  componentById (id) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/componentById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  save (param) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/save',
+      method: 'post',
+      data: param
+    })
+  }
+  remove (url) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/remove',
+      method: 'get',
+      params: {id: url}
+    })
+  }
+  findById (id) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  update (param) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/update',
+      method: 'post',
+      data: param
+    })
+  }
+  findListByName (name) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/findListByName',
+      method: 'get',
+      params: {name: name}
+    })
+  }
+  enterpriseSearchByName (name) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/enterpriseSearchByName',
+      method: 'post',
+      params: {keyword: name}
+    })
+  }
+  enterpriseTicketInfo (name) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/enterpriseTicketInfo',
+      method: 'post',
+      params: {id: name}
+    })
+  }
+  isExist (param) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/isExist',
+      method: 'get',
+      params: {param: param}
+    })
+  }
+  haveUscCode (id, uscCode) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/haveUscCode',
+      method: 'get',
+      params: {id: id, uscCode: uscCode}
+    })
+  }
+  haveWorkClient (id, name) {
+    return request({
+      url: prefix + '/JyWorkClientInfo/workClientInfo/haveWorkClient',
+      method: 'get',
+      params: {id: id, name: name}
+    })
+  }
+}

+ 33 - 0
src/api/jy/WorkContractFileService.js

@@ -0,0 +1,33 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class WorkContractService {
+  save (param) {
+    return request({
+      url: prefix + '/jy/workContract/workContractFile/save',
+      method: 'post',
+      data: param
+    })
+  }
+  updateStatusById (param) {
+    return request({
+      url: prefix + '/jy/workContract/workContractFile/updateStatusById',
+      method: 'post',
+      data: param
+    })
+  }
+  findById (id) {
+    return request({
+      url: prefix + '/jy/workContract/workContractFile/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  findByContractInfoId (id) {
+    return request({
+      url: prefix + '/jy/workContract/workContractFile/findByContractInfoId',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+}

+ 47 - 0
src/api/jy/WorkContractService.js

@@ -0,0 +1,47 @@
+import request from '@/utils/httpRequest'
+import { BUSINESS_PATH as prefix } from "../AppPath";
+
+export default class WorkContractService {
+  list (param) {
+    return request({
+      url: prefix + '/jy/workContract/workContractInfo/list',
+      method: 'get',
+      params: param
+    })
+  }
+  save (param) {
+    return request({
+      url: prefix + '/jy/workContract/workContractInfo/save',
+      method: 'post',
+      data: param
+    })
+  }
+  remove (url) {
+    return request({
+      url: prefix + '/jy/workContract/workContractInfo/remove',
+      method: 'get',
+      params: {id: url}
+    })
+  }
+  findContractById (id) {
+    return request({
+      url: prefix + '/jy/workContract/workContractInfo/findById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  updateStatusById (param) {
+    return request({
+      url: prefix + '/jy/workContract/workContractInfo/updateStatusById',
+      method: 'post',
+      data: param
+    })
+  }
+	saveContract (param) {
+		return request({
+			url: prefix + '/jy/workContract/workContractInfo/saveContract',
+			method: 'post',
+			data: param
+		})
+	}
+}

+ 15 - 0
src/api/sys/dictService.js

@@ -78,4 +78,19 @@ export default {
 			params: { ids: ids },
 		});
 	},
+	getList: function (value) {
+		return request({
+			url: prefix + "/sys/dict/type/getList",
+			method: "get",
+			params: {
+				value: value,
+			},
+		});
+	},
+	getListData: function () {
+		return request({
+			url: prefix + "/sys/dict/type/getList",
+			method: "get",
+		});
+	},
 };

+ 3 - 3
src/views/common/UpLoadComponent.vue

@@ -13,10 +13,10 @@
                :on-progress="uploadVideoProcess"
                :file-list="fileList">
 		<template v-if="auth==='view'&&uploadFlag===false" #tip>
-			<el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+			<el-button  :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
 		</template>
 		<template v-else #trigger>
-			<el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+			<el-button  :loading="loading" type="primary" size="default"> 点击上传 </el-button>
 		</template>
     </el-upload>
     <div style="height: calc(100% - 80px);margin-top: 10px">
@@ -52,7 +52,7 @@
         </el-table-column>
         <el-table-column label="操作" width="200px" fixed="right" align="center">
           <template  #default="scope">
-            <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
+            <el-button :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name" text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
             <el-button text type="primary" key="02" icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
 <!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
           </template>

+ 3 - 1
src/views/flowable/task/TaskForm.vue

@@ -690,6 +690,7 @@ export default {
 		// Process_1678692643340 会计-项目报告归档-苏州分部
 		// Process_1683767097901 物资管理-领用退回申请
 		// Process_1694762268070 报告-修改签字注师
+		// Process_1695863980264 嘉溢-合同归档
 
 		// 驳回
 		reject(vars) {
@@ -728,7 +729,8 @@ export default {
 				this.procDefId.includes('Process_1667894339167') ||
 				this.procDefId.includes('Process_1678692643340') ||
 				this.procDefId.includes('Process_1683767097901') ||
-				this.procDefId.includes('Process_1694762268070')
+				this.procDefId.includes('Process_1694762268070') ||
+				this.procDefId.includes('Process_1695863980264')
 			) {
 				console.log('进入新版驳回')
 				this.$confirm(`确定驳回流程吗?`, '提示', {

+ 199 - 0
src/views/jy/workClientInfo/WorkClientChooseForm.vue

@@ -0,0 +1,199 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1400px"
+      append-to-body
+      height="500px"
+      @close="close"
+      @keyup.enter.native="getWorkClient"
+      v-model="visibleChoose">
+      <div style="height: calc(100%);">
+        <el-form size="small" :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="客户名称" prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="客户名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户编号" prop="no">
+            <el-input size="small" v-model="searchForm.no" placeholder="客户编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户类型" prop="clientType">
+            <el-select v-model="searchForm.clientType" placeholder="请选择" style="width:100%" clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('customer_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="所属行业" prop="companyIndustry">
+            <el-select v-model="searchForm.companyIndustry" placeholder="请选择" style="width:100%" clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('industry')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          size="small"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'oneUpCompany'}"
+          :checkbox-config="{trigger: 'row', checkStrictly: true}">
+          <vxe-column type="seq" width="40"></vxe-column>
+          <vxe-column type="checkbox" width="60px"></vxe-column>
+          <vxe-column width="" title="客户名称" align="center" field="name" tree-node></vxe-column>
+          <vxe-column width="" title="客户编号" align="center" field="no"></vxe-column>
+          <vxe-column width="" title="客户类型" align="center" field="clientType">
+            <template #default="scope">
+              {{$dictUtils.getDictLabel('customer_type', scope.row.clientType, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column width="" title="所属行业" align="center" field="companyIndustry">
+            <template #default="scope">
+              {{$dictUtils.getDictLabel('industry', scope.row.companyIndustry, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column width="" title="联系电话" align="center" field="mobile"></vxe-column>
+          <vxe-column width="" title="公司级次" align="center" field="companyLevel"></vxe-column>
+        </vxe-table>
+      </div>
+<!--      <span slot="footer" class="dialog-footer">-->
+<!--      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>-->
+<!--      <el-button size="small" type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>-->
+<!--    </span>-->
+		<template #footer>
+			<span class="dialog-footer">
+				<el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			<el-button size="small" type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import WorkClientService from '@/api/jy/WorkClientService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visibleChoose: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          name: '',
+          no: '',
+			clientType: '',
+			companyIndustry: ''
+        }
+      }
+    },
+	  workClientService: null,
+    created () {
+		this.workClientService = new WorkClientService()
+    },
+    components: {
+    },
+    methods: {
+      init (deputy) {
+        this.title = '客户选择'
+        this.visibleChoose = true
+        this.list()
+      },
+      // 表单提交
+      getWorkClient () {
+        let rows = this.$refs.clientTable.getCheckboxRecords()
+        if (this.commonJS.isEmpty(rows)) {
+          this.$message.error('请至少选择一条数据')
+          return
+        }
+        let list = []
+        if (!this.commonJS.isEmpty(rows)) {
+          rows.forEach(item => {
+            let p = {
+              id: item.id,
+              name: item.name,
+              no: item.no,
+              type: item.type,
+              industry: item.industry,
+              companyLevel: item.companyLevel
+            }
+            list.push(p)
+          })
+        }
+        this.close()
+        this.$emit('getWorkClientChoose', list)
+      },
+      list () {
+        this.dataList = []
+        this.loading = true
+        this.searchForm.isTrue = '1'
+        this.workClientService.list({
+          'current': 1,
+          'size': -1,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visibleChoose = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0;
+  }
+  /deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+    margin-bottom: 0px;
+  }
+</style>

+ 190 - 0
src/views/jy/workClientInfo/WorkClientChooseRadio.vue

@@ -0,0 +1,190 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="1400px"
+      append-to-body
+      height="500px"
+      @close="close"
+      @keyup.enter.native="getWorkClient"
+	  v-model="visibleChoose">
+      <div style="height: calc(100%);">
+		<el-form size="large" :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="客户名称" prop="name">
+            <el-input size="large" v-model="searchForm.name" placeholder="客户名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户编号" prop="no">
+            <el-input size="large" v-model="searchForm.no" placeholder="客户编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="客户类型" prop="clientType">
+            <el-select v-model="searchForm.clientType" placeholder="请选择" style="width:100%" clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('customer_type')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="所属行业" prop="companyIndustry">
+            <el-select v-model="searchForm.companyIndustry" placeholder="请选择" style="width:100%;" clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('industry')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="large" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="large" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          height="480px"
+          :loading="loading"
+          size="small"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :tree-config="{transform: true, rowField: 'id', parentField: 'oneUpCompany'}"
+          :radio-config="{trigger: 'row'}">
+          <vxe-column type="seq" width="40"></vxe-column>
+          <vxe-column type="radio" width="60px"></vxe-column>
+          <vxe-column width="230px" title="客户名称" align="center" field="name" tree-node show-overflow="title"></vxe-column>
+          <vxe-column width="200px" title="客户编号" align="center" field="number"></vxe-column>
+          <vxe-column width="200px" title="客户类型" align="center" field="clientType">
+            <template #default="scope">
+              {{$dictUtils.getDictLabel('customer_type', scope.row.clientType, '-')}}
+            </template>
+          </vxe-column>
+          <vxe-column width="230px" title="所属行业" align="center" field="companyIndustry">
+            <template #default="scope">
+              {{$dictUtils.getDictLabel('industry', scope.row.companyIndustry, '-')}}
+            </template>
+          </vxe-column>
+        </vxe-table>
+		  <vxe-pager
+			  background
+			  :current-page="tablePage.currentPage"
+			  :page-size="tablePage.pageSize"
+			  :total="tablePage.total"
+			  :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+			  :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+			  @page-change="currentChangeHandle">
+		  </vxe-pager>
+      </div>
+<!--      <span slot="footer" class="dialog-footer">-->
+<!--      <el-button size="small" @click="close()" icon="circle-close">关闭</el-button>-->
+<!--      <el-button size="small" type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="circle-check" v-noMoreClick>确定</el-button>-->
+<!--    </span>-->
+		<template #footer>
+			<span class="dialog-footer">
+				<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+			<el-button type="primary" v-if="method != 'view'" @click="getWorkClient()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+	import WorkClientService from '@/api/jy/WorkClientService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visibleChoose: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          name: '',
+          no: '',
+			clientType: '',
+			companyIndustry: ''
+        }
+      }
+    },
+	  workClientService: null,
+    created () {
+		this.workClientService = new WorkClientService()
+    },
+    components: {
+    },
+    methods: {
+      init (deputy) {
+        this.title = '客户选择'
+        this.visibleChoose = true
+        this.list()
+      },
+      // 表单提交
+      getWorkClient () {
+        let row = this.$refs.clientTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请至少选择一条数据')
+        } else {
+          this.close()
+          this.$emit('getWorkClientRadioChoose', row)
+        }
+      },
+      list () {
+        this.dataList = []
+        this.loading = true
+        this.searchForm.isTrue = '1'
+		  this.workClientService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visibleChoose = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0;
+  }
+  /deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+    margin-bottom: 0px;
+  }
+</style>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1063 - 0
src/views/jy/workClientInfo/WorkClientForm.vue


+ 335 - 0
src/views/jy/workClientInfo/WorkClientList.vue

@@ -0,0 +1,335 @@
+<template>
+  <div class="page">
+      <el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+            <!-- 搜索框-->
+         <el-form-item label="客户名称" prop="name">
+                <el-input v-model="searchForm.name" placeholder="请输入客户名称" clearable></el-input>
+         </el-form-item>
+
+        <el-form-item  label="客户性质" prop="companyType">
+          <el-select v-model="searchForm.companyType" placeholder="请选择" style="width:100%;">
+            <el-option
+              v-for="item in $dictUtils.getDictList('customer_nature')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item v-if="showHideItem" label="所在地区" prop="areaId">
+          <SelectTree
+            ref="area"
+            :props="{
+                      value: 'id',             // ID字段名
+                      label: 'name',         // 显示名称
+                      children: 'children'    // 子级字段名
+                    }"
+            placeholder="请选择所在区域"
+            url="/system-server/sys/area/treeData"
+            :value="searchForm.areaId"
+            :clearable="true"
+            :accordion="true"
+			size="default"
+            @getValue="(value) => {searchForm.areaId=value}"/>
+        </el-form-item>
+
+        <el-form-item v-if="showHideItem" label="创建时间" prop="createDates">
+          <el-date-picker
+            placement="bottom-start"
+            v-model="searchForm.createDates"
+            type="datetimerange"
+			value-format="YYYY-MM-DD HH:mm:ss"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+
+        <el-form-item v-if="showHideItem" label="客户行业" prop="companyIndustry">
+          <el-select v-model="searchForm.companyIndustry" placeholder="请选择" style="width:100%;">
+            <el-option
+              v-for="item in $dictUtils.getDictList('industry')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item v-if="showHideItem" label="客户类型" prop="clientType">
+          <el-select v-model="searchForm.clientType" placeholder="请选择" style="width:100%;">
+            <el-option
+              v-for="item in $dictUtils.getDictList('customer_type')"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+            </el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item v-if="showHideItem" label="统一社会信用代码" prop="uscCode">
+          <el-input v-model="searchForm.uscCode" placeholder="请输入统一社会信用代码" clearable></el-input>
+        </el-form-item>
+
+        <el-form-item v-if="showHideItem" label="创建人" prop="createById">
+          <UserSelect :limit='1' :readonly="true" :modelValue="searchForm.createById" @update:modelValue='(value, label) => {searchForm.createById = value}'></UserSelect>
+        </el-form-item>
+
+<!--        <el-form-item label="代表方" prop="deputy">-->
+<!--          <el-select v-model="searchForm.deputy" placeholder="请选择" style="width:100%;">-->
+<!--            <el-option-->
+<!--              v-for="item in $dictUtils.getDictList('representative')"-->
+<!--              :key="item.value"-->
+<!--              :label="item.label"-->
+<!--              :value="item.value">-->
+<!--            </el-option>-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
+
+          <el-form-item>
+            <el-button type="default" @click="showHide"  :icon="showHideIcon">{{showHideName}}</el-button>
+            <el-button type="primary" @click="refreshList()"  icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()"  icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+      </el-form>
+
+     <div class="jp-table">
+        <vxe-toolbar ref="toolbarRef" :refresh="{query: refreshList}" custom>
+          <template #buttons>
+            <el-button v-if="hasPermission('jy_work_client:info:add')" type="primary"  icon="el-icon-plus" @click="add()">新建</el-button>
+            <el-button v-if="hasPermission('jy_work_client:info:del')" type="danger"   icon="el-icon-delete" @click="del()" :disabled="$refs.workClientTable && $refs.workClientTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+          </template>
+        </vxe-toolbar>
+        <div class="jp-table-body">
+            <vxe-table
+                border="inner"
+                auto-resize
+                resizable
+                height="auto"
+                :loading="loading"
+                size="small"
+                ref="workClientTable"
+                show-header-overflow
+                show-overflow
+                highlight-hover-row
+                :menu-config="{}"
+                :print-config="{}"
+                @sort-change="sortChangeHandle"
+                :sort-config="{remote:true}"
+                :data="dataList"
+                :checkbox-config="{}">
+                <vxe-column type="seq" width="60" title="序号"></vxe-column>
+                <vxe-column type="checkbox"  width="50px"></vxe-column>
+                <vxe-column min-width="200" title="客户名称" field="name" align="center">
+                    <template #default="scope">
+                        <el-link  type="primary" :underline="false" v-if="hasPermission('jy_work_client:info:edit')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+                        <el-link  type="primary" :underline="false" v-else-if="hasPermission('jy_work_client:info:view')"  @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+                        <span v-else>{{scope.row.name}}</span>
+                    </template>
+                </vxe-column>
+				<vxe-column min-width="100px" title="客户编号" field="number" align="center"></vxe-column>
+<!--                <vxe-column width="200px"  title="代表方" field="deputy" ></vxe-column>-->
+                <vxe-column min-width="100px"  title="客户性质" field="companyType" align="center">
+                  <template #default="scope">
+                    {{ $dictUtils.getDictLabel("customer_nature", scope.row.companyType, '-') }}
+                  </template>
+                </vxe-column>
+                <vxe-column min-width="100px"  title="客户行业" field="companyIndustry" align="center">
+                  <template #default="scope">
+                    {{ $dictUtils.getDictLabel("industry", scope.row.companyIndustry, '-') }}
+                  </template>
+                </vxe-column>
+                <vxe-column min-width="100px" title="所在地区" field="areaId" align="center"></vxe-column>
+                <vxe-column min-width="100px" title="客户类型" field="clientType" align="center">
+					<template #default="scope">
+						{{ $dictUtils.getDictLabel("customer_type", scope.row.clientType, '-') }}
+					</template>
+				</vxe-column>
+                <vxe-column min-width="150px" title="统一社会信用代码" field="uscCode" align="center"> </vxe-column>
+                <vxe-column min-width="80px" title="创建人" field="createById" align="center"> </vxe-column>
+                <vxe-column min-width="100px" title="创建时间" field="createTime" align="center" fixed="right"> </vxe-column>
+
+                <vxe-column title="操作" width="120px" fixed="right" align="center">
+                    <template  #default="scope">
+<!--                      <el-button v-if="hasPermission('sys:work_client:view')" text type="primary" icon="el-icon-view" @click="view(scope.row.id)">查看</el-button>-->
+                      <el-button v-if="hasPermission('jy_work_client:info:edit') && scope.row.createFlag === '1'" text type="primary"   @click="edit(scope.row.id)">修改</el-button>
+                      <el-button v-if="hasPermission('jy_work_client:info:edit')  && scope.row.createFlag === '1'" text type="primary"    @click="del(scope.row.id)">删除</el-button>
+                    </template>
+                </vxe-column>
+            </vxe-table>
+          <vxe-pager
+            background
+            size="small"
+            :current-page="tablePage.currentPage"
+            :page-size="tablePage.pageSize"
+            :total="tablePage.total"
+            :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+            :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+            @page-change="currentChangeHandle">
+          </vxe-pager>
+        </div>
+     </div>
+        <!-- 弹窗, 新增 / 修改 -->
+    <WorkClientForm  ref="workClientForm" @refreshDataList="refreshList"></WorkClientForm>
+  </div>
+</template>
+
+<script>
+  import WorkClientForm from './WorkClientForm'
+  import WorkClientService from '@/api/jy/WorkClientService'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import SelectUserTree from '@/views/utils/treeUserSelect'
+  import UserSelect from '@/components/userSelect'
+  export default {
+    data () {
+      return {
+        applyUserName: '',
+        showHideItem: false,
+        showHideIcon: 'el-icon-arrow-down',
+        showHideName: '展示',
+        visible: false,
+        searchForm: {
+          name: '',
+          areaId: '',
+          createDates: [],
+          companyType: '',
+          companyIndustry: '',
+          clientType: '',
+          uscCode: '',
+          createById: '',
+          deputy: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        loading: false
+      }
+    },
+    workClientService: null,
+    created () {
+      this.workClientService = new WorkClientService()
+    },
+    components: {
+      WorkClientForm,
+      SelectTree,
+      SelectUserTree,
+      UserSelect,
+    },
+    activated () {
+      this.refreshList()
+    },
+	  mounted() {
+		  this.$nextTick(() => {
+			  // 将表格和工具栏进行关联
+			  const $table = this.$refs.workClientTable;
+			  const $toolbar = this.$refs.toolbarRef;
+			  $table.connect($toolbar);
+		  });
+		  this.refreshList();
+	  },
+    methods: {
+      showHide () {
+        if (this.showHideItem === false) {
+          this.showHideItem = true
+          this.showHideIcon = 'el-icon-arrow-up'
+          this.showHideName = '隐藏'
+        } else {
+          this.showHideItem = false
+          this.showHideIcon = 'el-icon-arrow-down'
+          this.showHideName = '展示'
+        }
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.workClientService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          'itemType': '1',
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      // 新增
+      add () {
+        this.$refs.workClientForm.init('add', '')
+      },
+      // 修改
+      edit (id) {
+        id = id || this.$refs.workClientTable.getCheckboxRecords().map(item => {
+          return item.id
+        })[0]
+        this.$refs.workClientForm.init('edit', id)
+      },
+      // 查看
+      view (id) {
+        this.$refs.workClientForm.init('view', id)
+      },
+      // 删除
+      del (id) {
+        let ids = id || this.$refs.workClientTable.getCheckboxRecords().map(item => {
+          return item.id
+        }).join(',')
+        this.$confirm(`确定删除所选项吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.workClientService.remove(ids).then((data) => {
+            if (data.success) {
+              this.$message.success(data.message)
+              this.refreshList()
+              this.loading = false
+            } else {
+              this.$message.error(data.message)
+              this.refreshList()
+              this.loading = false
+            }
+          })
+        })
+      },
+      importMethod ({file}) {
+        // 处理表单
+        const formBody = new FormData()
+        formBody.append('file', file)
+        this.loading = true
+        this.workClientService.importExcel(formBody).then(result => {
+          this.$message.success(result)
+          this.refreshList()
+        }).catch(() => {
+          this.refreshList()
+          this.loading = false
+        })
+      },
+      resetSearch () {
+        this.applyUserName = ''
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>

+ 870 - 0
src/views/jy/workContractInfo/ContractAddForm.vue

@@ -0,0 +1,870 @@
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      :append-to-body="true"
+      width="1200px"
+      height="500px"
+      @close="close"
+      v-model="visible">
+    <el-form size="default" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'"
+             label-width="150px">
+
+      <el-divider v-if="(status === 'audit' || status === 'taskFormDetail'|| method==='view') && commonJS.isNotEmpty(inputForm.customerId)" content-position="left">
+        <el-link  type="primary" :underline="false" icon="el-icon-document" @click="viewClient(inputForm.customerId)"><b>查看客户详情</b></el-link>
+      </el-divider>
+      <el-divider  content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
+      <el-row  :gutter="0">
+        <el-col :span="12">
+          <el-form-item label="主委托方" prop="primaryLinkman"
+                        :rules="[
+                           {required: true, message: '请选择委托方', trigger: 'change'}
+                 ]">
+            <el-input :readonly="true" maxlength="100" @focus="openWorkClient2()" v-model="inputForm.primaryLinkman" placeholder="请选择委托方">
+<!--              <el-button slot="append" icon="el-icon-search" @click="openWorkClient2()"></el-button>-->
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="客户编号" prop="customerNo"
+                        :rules="[
+                   ]">
+            <el-input :readonly="true" v-model="inputForm.customerNo" placeholder="请填写客户编号" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="统一社会信用代码" prop="uscCode"
+                        :rules="[
+                   ]">
+            <el-input :readonly="true" v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="委托方电话" prop="clientContactsPhone"
+                        :rules="[
+                          // {required: true, message: '委托方电话', trigger: 'blur'}
+                 ]">
+            <el-input maxlength="15" :readonly="true" v-model="inputForm.clientContactsPhone" placeholder="请输入委托方电话"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="地址" prop="address"
+                        :rules="[
+                   ]">
+            <el-input :readonly="true" v-model="inputForm.address" placeholder="地址" clearable></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-divider content-position="left"><i class="el-icon-document"></i> 基本信息</el-divider>
+      <el-row  :gutter="0">
+        <el-col :span="12">
+          <el-form-item label="合同名称" prop="contractName"
+                        :rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
+                 ]">
+            <el-input v-model="inputForm.contractName"  placeholder="请输入合同名称"     clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同编号" prop="contractNo">
+            <el-input maxlength="64" :readonly="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同类型" prop="contractTypes"
+                        :rules="[{required: true, message: '合同类型不能为空', trigger: 'blur'}
+                 ]" >
+			  <div style="width: 100%;" v-if="method !=='view'">
+				  <el-cascader v-model="inputForm.contractTypes" :options="typeData" @change="handleChange"  clearable  :props="{
+				checkStrictly: true,
+				value: 'value',
+				label: 'label', // 显示名称
+				children: 'children', // 子级字段名
+				multiple: true
+			}"
+			   />
+			  </div>
+			  <div v-else-if="method ==='view'">
+				  <el-input maxlength="64" :readonly="true" v-model="inputForm.contractTypes" placeholder="请输入合同类型"></el-input>
+			  </div>
+
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="12">
+          <el-form-item label="签订日期" prop="contractDate"
+                        :rules="[
+                {required: true, message:'请输入签约日期', trigger:'blur'}
+               ]">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.contractDate"
+              style="width: 100%"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+		  <el-col :span="12">
+			  <el-form-item label="合同生效日期" prop="effectiveDate">
+				  <el-date-picker
+					  v-model="inputForm.effectiveDate"
+					  value-format="YYYY-MM-DD"
+					  style="width: 418px"
+					  placeholder="选择日期">
+				  </el-date-picker>
+			  </el-form-item>
+		  </el-col>
+
+		  <el-col :span="12">
+			  <el-form-item label="合同终止日期" prop="closingDate">
+				  <el-date-picker
+					  @change="checkData"
+					  value-format="YYYY-MM-DD"
+					  v-model="inputForm.closingDate"
+					  style="width: 418px"
+					  placeholder="选择日期">
+				  </el-date-picker>
+			  </el-form-item>
+		  </el-col>
+
+
+        <el-col :span="12">
+          <el-form-item label="对方合同编号" prop="contractOpposite">
+            <el-input maxlength="64" v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
+          </el-form-item>
+        </el-col>
+
+
+        <el-col :span="12">
+          <el-form-item  prop="department" label="所属部门"
+						 :rules="[
+                {required: true, message:'请选择所属部门', trigger:'blur'}
+               ]">
+            <SelectTree
+              ref="officeTree"
+              :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+              :url="`/system-server/sys/office/treeData?type=2`"
+              :value="inputForm.department"
+              :accordion="true"
+			  size="default"
+			  v-if="method!=='view'"
+              @getValue="(value) => {inputForm.department=value}"/>
+			  <el-input v-else-if="method==='view'" maxlength="64" :readonly="true" v-model="inputForm.department" placeholder="请填写所属部门"></el-input>
+		  </el-form-item>
+        </el-col>
+
+
+        <el-col :span="12">
+          <el-form-item label="创建时间" prop="createTime">
+            <el-date-picker
+              placement="bottom-start"
+              value-format="YYYY-MM-DD"
+              v-model="inputForm.createTime"
+              style="width: 100%"
+              :disabled="true"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+
+        <el-col :span="12" v-if="inputForm.contractAmountType === '1'">
+          <el-form-item label="合同金额(元)" prop="contractAmount"
+                        :rules="[
+                  {required: true, message:'请输入合同金额(元)', trigger:'blur'}
+               ]">
+            <el-input maxlength="15" v-model="inputForm.contractAmount" placeholder="请输入合同金额(元)"
+                      @keyup.native="inputForm.contractAmount = twoDecimalPlaces(inputForm.contractAmount)"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+		  <el-col>
+			  <el-form-item label="付款摘要" prop="paymentDescribe"
+							:rules="[
+							 {required: true, message:'请输入付款摘要', trigger:'blur'}
+               ]">
+				  <el-input type="textarea" v-model="inputForm.paymentDescribe" placeholder="请输入付款摘要"
+				  ></el-input>
+			  </el-form-item>
+		  </el-col>
+
+		  <el-col>
+			  <el-form-item label="合同特别条款" prop="contractSpecial"
+							:rules="[
+               ]">
+				  <el-input type="textarea" v-model="inputForm.contractSpecial" placeholder="请输入合同特别条款"
+				  ></el-input>
+			  </el-form-item>
+		  </el-col>
+
+		  <el-col>
+			  <el-form-item label="备注" prop="remarks"
+							:rules="[
+               ]">
+				  <el-input type="textarea" v-model="inputForm.remarks" placeholder="请输入备注"
+				  ></el-input>
+			  </el-form-item>
+		  </el-col>
+      </el-row>
+
+		<el-tabs v-model="activeName" type="border-card">
+			<el-tab-pane name="contactParty">
+				<template v-slot:label>
+					<span><span style="color: red;border-top: 20px">*</span> 委托方列表</span>
+				</template>
+				<el-row :gutter="15">
+					<el-button type="primary" style="margin-bottom: 15px" size="small" :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'" @click="openWorkClient">
+						新增委托方
+					</el-button>
+				</el-row>
+				<el-row :gutter="15">
+					<el-form style="width: 100%;">
+						<vxe-table
+							border
+							show-overflow
+							show-footer
+							:column-config="{resizable: true}"
+							ref="contactTable"
+							:key="tableKeyClient"
+							class="vxe-table-element"
+							:data="inputForm.cwWorkClientContactDTOList"
+							style=""
+							highlight-current-row
+							:edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+						>
+							<vxe-table-column align="center" field="no" title="客户编号" :edit-render="{}">
+								<template v-slot:edit="scope">
+									<el-input :readonly="true" v-model="scope.row.no" placeholder="客户编号" clearable></el-input>
+								</template>
+							</vxe-table-column>
+							<vxe-table-column align="center" field="name" title="客户名称" :edit-render="{}">
+								<template v-slot:edit="scope">
+									<el-input :readonly="true" v-model="scope.row.name" placeholder="客户名称" clearable></el-input>
+								</template>
+							</vxe-table-column>
+							<vxe-table-column align="center" title="操作" width="220px">
+								<template v-slot="scope">
+									<el-button size="small" :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+								</template>
+							</vxe-table-column>
+						</vxe-table>
+					</el-form>
+				</el-row>
+			</el-tab-pane>
+		</el-tabs>
+
+      <el-tabs v-model="activeName1" type="border-card">
+        <el-tab-pane name="contractProper">
+			<template v-slot:label>
+				<span><span style="color: red;border-top: 20px">*</span> 合同附件信息</span>
+			</template>
+          <!--        合同文件-->
+          <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+        </el-tab-pane>
+      </el-tabs>
+
+    </el-form>
+    <el-image-viewer
+      v-if="showViewer"
+      :on-close="closeViewer"
+      :url-list="[url]"
+      zIndex="9999"/>
+    <WorkClientChooseForm ref="workClientChooseForm" @getWorkClientChoose="getWorkClientChoose"></WorkClientChooseForm>
+    <WorkClientChooseRadio ref="workClientChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></WorkClientChooseRadio>
+    <WorkClientForm ref="workClientForm"></WorkClientForm>
+		<template #footer>
+			<span class="dialog-footer">
+				<el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      			<el-button v-if="method !== 'view'" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+			</span>
+		</template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import WorkContractService from '@/api/jy/WorkContractService'
+  import UpLoadComponent from '@/views/common/UpLoadComponent'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import WorkClientForm from '../workClientInfo/WorkClientForm'
+  import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
+  import WorkClientChooseRadio from '../workClientInfo/WorkClientChooseRadio'
+  import dictService from "@/api/sys/dictService";
+  import OSSSerive, {
+    httpRequest,
+    toHref,
+    openWindowOnUrl,
+    handleRemove,
+    fileName
+  } from '@/api/sys/OSSService'
+  import moment from 'moment'
+  // import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  export default {
+    data () {
+      return {
+        visable: false,
+        gridData: [],
+        radio: 0,
+        tableData: [],
+        dataList: [],
+        dataListNew: [],
+        title: '',
+        method: '',
+        isSubmit: false,
+        visible: false,
+        loading: false,
+        contractNoFlag: false,
+		  typeData:[],
+        returnForm: {
+          customerId: '',  // 客户id
+          address: '',
+          uscCode: '',
+          clientId: '',
+          name: '',
+          contractDate: '',
+          effectiveDate: '',
+          closingDate: '',
+          contractType: '',
+          contractAmountType: '',
+          contractAmount: '',
+          predictAmount: '',
+          contractOpposite: '',
+          contractFees: [],
+          fees: '',
+          contractFee: '',
+          describes: '',
+          contractSpecial: '',
+          remarks: '',
+          clientName: '',
+          contractProperList: [],
+          status: '',
+          customerNo: '',
+          customerName: '',
+			primaryLinkman:'',
+        },
+        inputForm: {
+          customerId: '',  // 客户id
+          address: '',
+          uscCode: '',
+          customerNo: '',
+          contractFees: [],
+          contractFee: '',
+          contractNo: '',
+          contractType: '',
+          contractName: '',
+          payerSubject: '',
+          paymentMethod: '',
+          paymentDescribe: '',
+          contractAmount: '',
+          predictAmount: '',
+          actualContractAmount: '',
+          contractNum: '2',
+          contractStatus: '新创建',
+          paymentAgreement: '',
+          changeNum: '0',
+          department: '',
+          clientContacts: '',
+          clientContactsPhone: '',
+          createBy: this.$store.state.user.name,
+          createId: this.$store.state.user.id,
+			createTime: '',
+          contractProperList: [],
+          cwWorkClientContactDTOList: [],
+          contractAmountType: '',
+          contractOpposite: '',
+          fees: '',
+			contractTypes:[],
+			primaryLinkman:'',
+			contractSpecial: '',
+			remarks: '',
+			contractDate:'',
+			effectiveDate: '',
+			closingDate: '',
+        },
+        activeName1: 'contractProper',
+		  activeName:'contactParty',
+        filesArra2: [],
+        fileList: [],
+        isFlag: true,
+        showViewer: false, // 显示查看器
+        url: '',
+        rowurl: '',
+        src: '',
+        onedit: false,
+        type: '',
+        loadProgress: 0, // 动态显示进度条
+        progressFlag: false, // 关闭进度条
+        promi: null,
+        tableKeyClient: '1',
+        keyWatch: ''
+      }
+    },
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      },
+      formReadOnly: {
+        type: Boolean,
+        default: false
+      },
+      status: {
+        type: String,
+        default: ''
+      }
+    },
+	  activated () {
+		  this.getTypeList()
+	  },
+    components: {
+      // ElImageViewer,
+      UpLoadComponent,
+      SelectTree,
+      WorkClientForm,
+      WorkClientChooseForm,
+      WorkClientChooseRadio
+    },
+    ossService: null,
+	  contractService:null,
+    created () {
+      this.ossService = new OSSSerive()
+		this.contractService=new WorkContractService()
+    },
+    mounted () {
+      window.onPreview = this.onPreview
+    },
+    computed: {
+      officeName () {
+        return this.$store.state.user.office.name
+      },
+      bus: {
+        get () {
+          // this.$refs.archiveFile.setDividerName('附件', false)
+          this.$refs.uploadComponent.setDividerName('附件', false)
+          return this.businessId
+        },
+        set (val) {
+          this.businessId = val
+        }
+      }
+    },
+    watch: {
+      'keyWatch': {
+        handler (newVal) {
+          if (this.commonJS.isNotEmpty(this.bus)) {
+            this.init('', this.bus)
+          } else {
+            this.$nextTick(() => {
+              this.$refs.inputForm.resetFields()
+            })
+          }
+        }
+      }
+    },
+    methods: {
+      getKeyWatch (keyWatch) {
+        this.keyWatch = keyWatch
+      },
+      uploadVideoProcess (event, file, fileList) {
+        this.progressFlag = true // 显示进度条
+        this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+        if (this.loadProgress >= 100) {
+          this.loadProgress = 100
+          setTimeout(() => { this.progressFlag = false }, 1000) // 一秒后关闭进度条
+        }
+      },
+      async toHref (row) {
+        toHref(row)
+      },
+      onPreview (url) {
+        this.url = url
+        this.showViewer = true
+      },
+      // 关闭查看器
+      closeViewer () {
+        this.url = ''
+        this.showViewer = false
+      },
+      init (method, id) {
+        this.dataList = []
+        this.dataListNew = []
+        this.method = method
+        // console.log('method', method)
+        this.inputForm = {
+          customerId: '',  // 客户id
+          address: '',
+          uscCode: '',
+          customerNo: '',
+          contractFees: [],
+          contractFee: '',
+          contractNo: '',
+          contractType: '',
+          contractName: '',
+          payerSubject: '',
+          paymentMethod: '',
+          paymentDescribe: '',
+          signingDate: '',
+          fees: '',
+          contractAmount: '',
+          predictAmount: '',
+          actualContractAmount: '',
+          contractNum: '',
+          contractStatus: '',
+          paymentAgreement: '',
+          changeNum: '',
+          department: '',
+          clientContacts: '',
+          clientContactsPhone: '',
+          createBy: this.$store.state.user.name,
+          createId: this.$store.state.user.id,
+			createTime: '',
+          contractProperList: [],
+          cwWorkClientContactDTOList: [],
+          contractAmountType: '',
+          contractOpposite: '',
+			contractTypes:[],
+			primaryLinkman:'',
+        }
+        this.inputForm.id = id
+        if (method === 'add') {
+          // this.inputForm.id = 'add'
+          this.title = `新建合同`
+        } else if (method === 'edit') {
+          this.title = '修改合同'
+        } else if (method === 'view') {
+          this.inputForm.showVi = false
+          this.title = '查看合同详情'
+        }
+        this.visible = true
+        this.loading = false
+        this.$nextTick(() => {
+          this.$refs.inputForm.resetFields()
+          this.loading = true
+          this.$refs.uploadComponent.clearUpload()
+          // this.$refs.archiveFile.clearUpload()
+			if (this.commonJS.isNotEmpty(this.inputForm.id)){
+				this.contractService.findContractById(this.inputForm.id).then((data) => {
+					this.inputForm = this.recover(this.inputForm, data)
+					this.inputForm.contractNo=data.no
+					this.inputForm.contractTypes=data.contractTypes[0][1].split(data.contractTypes[0][1].lastIndexOf(","))
+					this.inputForm.department=data.department
+					// this.inputForm.cwWorkClientContactDTOList=data.cwWorkClientContactDTOList
+					console.log('data',data)
+					if (this.commonJS.isEmpty(this.inputForm.department)) {
+						this.inputForm.department = this.$store.state.user.office.id
+					}
+					if (this.status === 'audit' || this.status === 'taskFormDetail') {
+						method = 'view'
+					}
+					this.$refs.uploadComponent.newUpload(method, this.inputForm.contractProperList, 'jyWorkContract', null, null, null, null, false)
+					// this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
+					this.loading = false
+				})
+			}else {
+				this.loading = false
+			}
+
+        })
+      },
+      // 查看
+      view (id) {
+        this.$refs.workClientForm.init('view', id)
+      },
+      // 新增
+      // eslint-disable-next-line no-dupe-keys
+      async insertEvent (type) {
+        if (type === 'client') {
+          let d = {
+            no: '',
+            name: ''
+          }
+          if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+            this.inputForm.cwWorkClientContactDTOList = []
+          }
+          this.$refs.contactTable.insertAt(d)
+          this.inputForm.cwWorkClientContactDTOList.push(d)
+          this.tableKeyClient = Math.random()
+        }
+      },
+
+      // 删除
+      removeEvent (row, rowIndex, type) {
+        if (type === 'client') {
+          this.$refs.contactTable.remove(row)
+          this.inputForm.cwWorkClientContactDTOList.splice(rowIndex, 1)
+        }
+      },
+      openWorkClient () {
+        this.$refs.workClientChooseForm.init()
+      },
+      openWorkClient2 () {
+        this.$refs.workClientChooseRadio.init()
+      },
+      getWorkClientChoose (list) {
+
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.inputForm.cwWorkClientContactDTOList = []
+        }
+        let _this = this
+        let _list = list
+        const waitForEach = function () {
+          return new Promise(function (resolve, reject) {
+            _list.forEach((item) => {
+              _this.inputForm.cwWorkClientContactDTOList.forEach(client => {
+                if (item.no === client.no) {
+                  _this.$message.error('已存在客户 “' + client.name + '”,请重新选择')
+                  throw new Error('已存在客户 “' + client.name + '”,请重新选择')
+                }
+              })
+            })
+            resolve()
+          })
+        }
+        waitForEach().then(() => {
+          list.forEach(item => {
+            this.$refs.contactTable.insertAt(item)
+            this.inputForm.cwWorkClientContactDTOList.push(item)
+            this.tableKeyClient = Math.random()
+			  console.log('list', this.inputForm.cwWorkClientContactDTOList)
+          })
+        })
+      },
+       getWorkClientChoose2 (list) {
+	      this.inputForm.primaryLinkman = list.name
+          this.inputForm.customerNo = list.no
+          this.inputForm.uscCode = list.uscCode
+          this.inputForm.address = list.address
+          this.inputForm.customerId = list.id
+          this.inputForm.clientContactsPhone = list.mobile
+		   const wait = function () {
+			   return new Promise(function (resolve, reject) {
+				   setTimeout(() => {
+					   resolve()
+				   }, 100)
+			   })
+		   }
+		   wait().then(() => {
+		   })
+		  console.log('1231312',this.inputForm.primaryLinkman)
+      },
+      // 表单提交
+      // 暂存
+      doSubmit () {
+        this.loading = true
+        if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+          this.loading = false
+          this.$message.error('“委托方”中至少有一条数据')
+          throw new Error('“委托方”中至少有一条数据')
+        }
+        if (this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          this.$refs['inputForm'].validate((valid) => {
+            if (valid) {
+              this.loading = true
+              this.inputForm.filedType = '0'
+              this.inputForm.contractProperList = this.$refs.uploadComponent.getDataList()
+              if (this.commonJS.isEmpty(this.inputForm.contractProperList)) {
+                // 附件至少上传一条
+                this.$message.error('至少上传一个附件信息')
+                this.loading = false
+                throw new Error('至少上传一个附件信息')
+              }
+				this.contractService.save(this.inputForm).then((data) => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+                this.close()
+                this.$emit('refreshDataList')
+              }).catch(() => {
+                this.$refs.inputForm.resetFields()
+                this.loading = false
+              })
+            } else {
+              this.loading = false
+            }
+          })
+        }
+      },
+      close () {
+        this.$refs.inputForm.resetFields()
+        this.inputForm.clientName = ''
+        this.inputForm.cwWorkClientContactDTOList = []
+        this.visible = false
+        this.showVi = true
+        this.$refs.uploadComponent.clearUpload()
+      },
+      tabHandleClick (event) {
+        // console.log(event)
+      },
+      httpRequest (file) {
+        httpRequest(file, fileName(file), 'workContract')
+      },
+      handleRemove () {
+        this.fileList = handleRemove()
+      },
+      changes (file, fileList) {
+        this.dataListNew = []
+        this.dataList.forEach((item) => {
+          this.dataListNew.push(item)
+        })
+        fileList.forEach((item) => {
+          item.createTime = moment(new Date()).format('YYYY-MM-DD')
+          item.createBy = this.$store.state.user.name
+          this.dataListNew.push(item)
+        })
+        const isLt2M = file.size / 1024 / 1024 < 300
+        if (isLt2M === false) {
+          this.$message.error('文件大小不能超过 ' + 300 + 'M !')
+          this.fileList = []
+          this.filesArra2 = []
+        }
+      },
+      async showFile (row) {
+        await openWindowOnUrl(row)
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.orders = []
+        if (column.order != null) {
+          this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        }
+        this.refreshList()
+      },
+      deleteMsgById (row, index) {
+        this.dataListNew.splice(index, 1)
+        if (row.id !== null && row.id !== '' && row.id !== undefined) {
+          this.ossService.deleteMsgById(row.id)
+        }
+      },
+      twoDecimalPlaces (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
+      },
+      positiveInteger (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^]+/g, '') // 保留数字
+        return str
+      },
+      tableRowClassName ({row, rowIndex}) {
+        row.index = rowIndex
+      },
+      handleRadioChange (val) {
+        if (val) {
+          this.radio = val.index
+        }
+      },
+      // 关闭窗口时调用
+      closeXTable () {
+        this.closePop()
+      },
+      rowStyle (event) {
+        return 'cursor:pointer;'
+      },
+      closePop () {
+        this.visable = false
+      },
+      checkData () {
+        let begin = this.inputForm.effectiveDate
+        let close = this.inputForm.closingDate
+        if (close < begin) {
+          this.$message.warning(`合同终止日期要大于合同开始日期`)
+          this.inputForm.closingDate = ''
+        }
+      },
+      // 查看客户信息详情
+      viewClient (id) {
+        this.$refs.workClientForm.init('view', id)
+      },
+
+		//获取合同类型
+		getTypeList(){
+			dictService.getListData().then((data)=>{
+				this.typeData=data
+			})
+		},
+		//将合同类型进行绑定
+		handleChange(value){
+			this.inputForm.contractTypes=value
+			this.inputForm.contractTypes.forEach((item)=>{
+				if (this.inputForm.contractTypes[0][0]!==item[0]){
+					this.$message.warning(`一级合同类型只能选择一个`)
+					this.inputForm.contractTypes=[]
+				}
+			})
+			this.inputForm.contractTypes = JSON.parse(JSON.stringify(value))
+			console.log('value',this.inputForm.contractTypes)
+		}
+    }
+  }
+</script>
+
+<style>
+  .tid_40 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_40 .vxe-header--row .col--last{
+    text-align: center;
+  }
+  .tid_45 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_45 .vxe-header--row .col--last{
+    text-align: center;
+  }
+</style>
+
+<style scoped>
+  .avatar{
+    height: 100px;
+  }
+  .el-divider__text {
+    font-weight: bold;
+    font-size: 16px;
+  }
+</style>

+ 202 - 0
src/views/jy/workContractInfo/InputNumber.vue

@@ -0,0 +1,202 @@
+<template>
+  <div>
+    <div class="input-number-range" :class="{ 'is-disabled': disabled }">
+      <div class="flex">
+        <div class="from">
+          <el-input
+            ref="input_from"
+            oninput="value=value.replace(/[^\d]/g,'')"
+            v-model="userInputForm"
+            :disabled="disabled"
+            placeholder="最小值"
+            @blur="handleBlurFrom"
+            @focus="handleFocusFrom"
+            @input="handleInputFrom"
+            @change="handleInputChangeFrom"
+          ></el-input>
+        </div>
+        <div class="center">
+          <span>至</span>
+        </div>
+        <div class="to">
+          <el-input
+            ref="input_to"
+            oninput="value=value.replace(/[^\d]/g,'')"
+            v-model="userInputTo"
+            :disabled="disabled"
+            placeholder="最大值"
+            @blur="handleBlurTo"
+            @focus="handleFocusTo"
+            @input="handleInputTo"
+            @change="handleInputChangeTo"
+          ></el-input>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'InputNumber',
+
+    props: {
+      // 初始化范围
+      value: { required: true },
+
+      // 是否禁用
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+
+      // 精度参数
+      precision: {
+        type: Number,
+        default: 0,
+        validator (val) {
+          return val >= 0 && val === parseInt(val, 10)
+        }
+      }
+    },
+
+    data () {
+      return {
+        userInputForm: null,
+        userInputTo: null
+      }
+    },
+
+    watch: {
+      value: {
+        immediate: true,
+        handler (value) {
+          /** 初始化范围 */
+          if (value instanceof Array && this.precision !== undefined) {
+            this.userInputForm = typeof value[0] === 'number' ? value[0] : null
+            this.userInputTo = typeof value[1] === 'number' ? value[1] : null
+          }
+        }
+      }
+    },
+
+    methods: {
+      // 根据精度保留数字
+      toPrecision (num, precision) {
+        if (precision === undefined) precision = 0
+        return parseFloat(
+          Math.round(num * Math.pow(10, precision)) / Math.pow(10, precision)
+        )
+      },
+
+      handleBlurFrom (event) {
+        this.$emit('blurfrom', event)
+      },
+
+      handleFocusFrom (event) {
+        this.$emit('focusfrom', event)
+      },
+
+      handleBlurTo (event) {
+        this.$emit('blurto', event)
+      },
+
+      handleFocusTo (event) {
+        this.$emit('focusto', event)
+      },
+
+      handleInputFrom (value) {
+        this.$emit('inputfrom', value)
+      },
+
+      handleInputTo (value) {
+        this.$emit('inputto', value)
+      },
+
+      // from输入框change事件
+      handleInputChangeFrom (value) {
+        // 如果是非数字空返回null
+        if (isNaN(value) || value === '') {
+          this.$emit('input', [null, this.userInputTo])
+          this.$emit('changefrom', this.userInputForm)
+          return
+        }
+
+        // 初始化数字精度
+        this.userInputForm = this.setPrecisionValue(value)
+
+        // 如果from > to 将from值替换成to
+        if (typeof this.userInputTo === 'number') {
+          this.userInputForm =
+            parseFloat(this.userInputForm) <= parseFloat(this.userInputTo)
+              ? this.userInputForm
+              : this.userInputTo
+        }
+        this.$emit('input', [this.userInputForm, this.userInputTo])
+        this.$emit('changefrom', this.userInputForm)
+      },
+
+      // to输入框change事件
+      handleInputChangeTo (value) {
+        // 如果是非数字空返回null
+        if (isNaN(value) || value === '') {
+          this.$emit('input', [this.userInputForm, null])
+          this.$emit('changefrom', this.userInputTo)
+          return
+        }
+
+        // 初始化数字精度
+        this.userInputTo = this.setPrecisionValue(value)
+
+        // 如果to < tfrom 将to值替换成from
+        if (typeof this.userInputForm === 'number') {
+          this.userInputTo =
+            parseFloat(this.userInputTo) >= parseFloat(this.userInputForm)
+              ? this.userInputTo
+              : this.userInputForm
+        }
+        this.$emit('input', [this.userInputForm, this.userInputTo])
+        this.$emit('changeto', this.userInputTo)
+      },
+
+      // 设置成精度数字
+      setPrecisionValue (value) {
+        if (this.precision !== undefined) {
+          const val = this.toPrecision(value, this.precision)
+          return val
+        }
+        return null
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  /*// 取消element原有的input框样式*/
+  ::v-deep .el-input--mini .el-input__inner {
+    border: 0px;
+    margin: 0;
+    padding: 0 15px;
+    background-color: transparent;
+  }
+  .input-number-range {
+    background-color: #fff;
+    /*border: 1px solid #dcdfe6;*/
+    border-radius: 4px;
+  }
+  .flex {
+    display: flex;
+    flex-direction: row;
+    width: 100%;
+    justify-content: center;
+    align-items: center;
+    .center {
+      margin-top: 1px;
+    }
+  }
+  .is-disabled {
+    background-color: #eef0f6;
+    border-color: #e4e7ed;
+    color: #c0c4cc;
+    cursor: not-allowed;
+  }
+</style>

+ 576 - 0
src/views/jy/workContractInfo/JyWorkContractList.vue

@@ -0,0 +1,576 @@
+<template>
+	<div class="page">
+		<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+			<!-- 搜索框-->
+			<el-form-item label="客户名称" prop="primaryLinkman">
+				<el-input v-model="searchForm.primaryLinkman" placeholder="请输入客户名称" clearable></el-input>
+			</el-form-item>
+
+			<el-form-item label="合同名称" prop="name">
+				<el-input  v-model="searchForm.name" placeholder="请输入合同名称" clearable></el-input>
+			</el-form-item>
+
+			<el-form-item label="合同编号" prop="name">
+				<el-input  v-model="searchForm.no" placeholder="请输入合同编号" clearable></el-input>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="签订日期" prop="contractDates">
+				<el-date-picker
+					placement="bottom-start"
+					v-model="searchForm.contractDates"
+					type="datetimerange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="归档状态" prop="filedType">
+				<el-select v-model="searchForm.filedType" placeholder="请选择" style="width:100%;">
+					<el-option
+						v-for="item in $dictUtils.getDictList('filed_type')"
+						:key="item.value"
+						:label="item.label"
+						:value="item.value">
+					</el-option>
+				</el-select>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="合同金额" prop="contractAmount">
+				<el-input  v-model="searchForm.contractAmount" placeholder="请输入合同金额" clearable></el-input>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="创建人" prop="createById">
+				<UserSelect :limit='1' :readonly="true" :modelValue="searchForm.createById" @update:modelValue='(value, label) => {searchForm.createById = value}'></UserSelect>
+			</el-form-item>
+
+			<el-form-item v-if="showHideItem" label="登记时间" prop="createDates">
+				<el-date-picker
+					placement="bottom-start"
+					v-model="searchForm.createDates"
+					type="datetimerange"
+					range-separator="至"
+					start-placeholder="开始日期"
+					end-placeholder="结束日期">
+				</el-date-picker>
+			</el-form-item>
+
+			<el-form-item>
+				<el-button type="default" @click="showHide" :icon="showHideIcon">{{showHideName}}</el-button>
+				<el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
+				<el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
+			</el-form-item>
+		</el-form>
+
+		<div class="jp-table">
+			<vxe-toolbar ref="toolbarRef" :refresh="{query: refreshList}" custom>
+				<template #buttons>
+					<el-button v-if="hasPermission('jy_work_contract:info:add')" type="primary" icon="el-icon-plus" @click="add()">新建</el-button>
+					<el-button v-if="hasPermission('jy_work_contract:info:del')" type="danger"   icon="el-icon-delete" @click="del()" :disabled="$refs.workContractTable && $refs.workContractTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+				</template>
+			</vxe-toolbar>
+			<div class="jp-table-body">
+				<vxe-table
+					border="inner"
+					auto-resize
+					resizable
+					height="auto"
+					:loading="loading"
+					size="small"
+					ref="workContractTable"
+					show-header-overflow
+					show-overflow
+					highlight-hover-row
+					:menu-config="{}"
+					:print-config="{}"
+					@sort-change="sortChangeHandle"
+					:sort-config="{remote:true}"
+					:data="dataList"
+					:checkbox-config="{}">
+					<vxe-column type="seq" width="60" title="序号"></vxe-column>
+					<vxe-column type="checkbox" width="50px"></vxe-column>
+
+					<vxe-column min-width="200px" title="合同编号" field="no" align="center"></vxe-column>
+					<vxe-column min-width="200px" title="合同类型" field="contractType" align="center"></vxe-column>
+					<vxe-column min-width="200px" title="合同名称" field="name" align="center">
+						<template #default="scope">
+							<el-link  type="primary" :underline="false" v-if="hasPermission('jy_work_contract:info:edit')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+							<el-link  type="primary" :underline="false" v-else-if="hasPermission('jy_work_contract:info:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+							<span v-else>{{scope.row.name}}</span>
+						</template>
+					</vxe-column>
+					<vxe-column min-width="200px" title="客户名称" field="primaryLinkman" align="center"></vxe-column>
+					<vxe-column min-width="100px" title="合同金额(元)" field="contractAmount" align="center"></vxe-column>
+					<vxe-column min-width="100px" title="创建人" field="createById" align="center"></vxe-column>
+					<vxe-column min-width="150px" title="创建时间" field="createTime" align="center"></vxe-column>
+					<vxe-column min-width="100px"  title="归档状态" field="filedType" fixed="right" align="center">
+						<template #default="scope">
+							<el-button  @click="detailFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedType, '')" effect="dark">{{$dictUtils.getDictLabel("filed_type", scope.row.filedType, '未归档')}} </el-button>
+						</template>
+					</vxe-column>
+					<!--                <vxe-column width="100px"  title="借用状态" field="borrowType" >-->
+					<!--                  <template slot-scope="scope">-->
+					<!--                    <el-button @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="small">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>-->
+					<!--                  </template>-->
+					<!--                </vxe-column>-->
+
+					<vxe-column title="操作" width="200px" fixed="right" align="center">
+						<template  #default="scope">
+							<el-button v-if="hasPermission('jy_work_contract:info:field') && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" text type="primary"  @click="filed(scope.row.id)">归档</el-button>
+							<!--归档暂存修改-->
+							<el-button v-if="hasPermission('jy_work_contract:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" text type="primary"  @click="updateFiled(scope.row.id)">修改</el-button>
+							<!--归档撤回-->
+							<el-button v-if="hasPermission('jy_work_contract:info:back') && scope.row.filedType === '2'  && scope.row.createId === $store.state.user.id" text type="primary"   @click="rebackFiled(scope.row)">撤回</el-button>
+							<!--              合同归档  审核-->
+							<el-button v-if="scope.row.filedType==='2' && checkIsAuditFiled(scope.row)" text type="primary"   @click="examineFiled(scope.row)">归档审核</el-button>
+							<!--              合同归档  被驳回后当前申请人重新调整-->
+							<el-button v-if="hasPermission('jy_work_contract:info:edit')&&scope.row.createId === $store.state.user.id&&scope.row.filedType === '4'" text type="primary"   @click="adjustFiled(scope.row)">驳回调整</el-button>
+							</template>
+					</vxe-column>
+				</vxe-table>
+				<vxe-pager
+					background
+					size="small"
+					:current-page="tablePage.currentPage"
+					:page-size="tablePage.pageSize"
+					:total="tablePage.total"
+					:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+					:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+					@page-change="currentChangeHandle">
+				</vxe-pager>
+			</div>
+		</div>
+		<!-- 弹窗, 新增 / 修改 -->
+		<ContractAddForm ref="contractAddForm" @refreshDataList="refreshList"></ContractAddForm>
+		<WorkClientForm ref="workClientForm" @refreshDataList="refreshList"></WorkClientForm>
+	</div>
+</template>
+
+<script>
+	import InputNumber from './InputNumber.vue'
+	import WorkClientForm from '@/views/workClient/WorkClientForm'
+	import WorkContractService from '@/api/jy/WorkContractService'
+	import WorkContractFileService from '@/api/sys/WorkContractFileService'
+	import SelectUserTree from '@/views/utils/treeUserSelect'
+	import taskService from '@/api/flowable/taskService'
+	import processService from '@/api/flowable/processService'
+	import pick from 'lodash.pick'
+	import userService from '@/api/sys/userService'
+	import UserSelect from '@/components/userSelect'
+	import ContractAddForm from './ContractAddForm'
+	export default {
+		data () {
+			return {
+				showHideItem: false,
+				showHideIcon: 'el-icon-arrow-down',
+				showHideName: '展示',
+				visible: false,
+				num: 0,
+				searchForm: {
+					primaryLinkman: '',
+					name: '',
+					contractDates: [],
+					filedType: '',
+					contractAmount: '',
+					createById: '',
+					procInsId: '',
+					processDefinitionId: '',
+					no:'',
+					createDates:[]
+				},
+				dataList: [],
+				tablePage: {
+					total: 0,
+					currentPage: 1,
+					pageSize: 10,
+					orders: []
+				},
+				processDefinitionId: '',
+				procDefKey: '',
+				loading: false,
+				create: '',
+				isAdmin: false,
+				applyUserName: '',
+				taskId:''
+			}
+		},
+		workContractService: null,
+		workContractFileService: null,
+		// taskService: null,
+		// processService: null,
+		// userService: null,
+		created () {
+			this.workContractService = new WorkContractService()
+			this.workContractFileService = new WorkContractFileService()
+			// this.taskService = new TaskService()
+			// this.processService = new ProcessService()
+			// this.userService = new UserService()
+		},
+		components: {
+			InputNumber,
+			WorkClientForm,
+			SelectUserTree,
+			UserSelect,
+			ContractAddForm
+		},
+		activated () {
+			this.is()
+			this.refreshList()
+		},
+		computed: {
+			userName () {
+				return this.$store.state.user.name
+			},
+			user () {
+				this.create = this.$store.state.user.id
+				return this.$store.state.user
+			}
+		},
+
+		methods: {
+			showHide () {
+				if (this.showHideItem === false) {
+					this.showHideItem = true
+					this.showHideIcon = 'el-icon-arrow-up'
+					this.showHideName = '隐藏'
+				} else {
+					this.showHideItem = false
+					this.showHideIcon = 'el-icon-arrow-down'
+					this.showHideName = '展示'
+				}
+			},
+			// 获取数据列表
+			refreshList () {
+				this.loading = true
+				this.workContractService.list({
+					'current': this.tablePage.currentPage,
+					'size': this.tablePage.pageSize,
+					'orders': this.tablePage.orders,
+					'itemType': '1',
+					...this.searchForm
+				}).then((data) => {
+					this.dataList = data.records
+					console.log('list',this.dataList)
+					this.tablePage.total = data.total
+					this.loading = false
+				})
+				processService.getByName('评估-合同登记').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						this.processDefinitionId = data.id
+						this.procDefKey = data.key
+					}
+				})
+			},
+			// 当前页
+			currentChangeHandle ({currentPage, pageSize}) {
+				this.tablePage.currentPage = currentPage
+				this.tablePage.pageSize = pageSize
+				this.refreshList()
+			},
+			// 排序
+			sortChangeHandle (column) {
+				this.tablePage.orders = []
+				if (column.order != null) {
+					this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+				}
+				this.refreshList()
+			},
+			// 新增
+			add () {
+				this.$refs.contractAddForm.init('add', '')
+			},
+			// 管理员修改
+			editForm (id) {
+				id = id || this.$refs.workClientTable.getCheckboxRecords().map(item => {
+					return item.id
+				})[0]
+				this.$refs.workContractForm2.init('edit', id)
+			},
+			// 查看
+			view (id) {
+				this.$refs.contractAddForm.init('view', id)
+			},
+			// 客户信息查看
+			viewInfo (id) {
+				this.$refs.workClientForm.init('view', id)
+			},
+			// 删除
+			del (id) {
+				let ids = id || this.$refs.workContractTable.getCheckboxRecords().map(item => {
+					return item.id
+				}).join(',')
+				this.$confirm(`确定删除所选项吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(() => {
+					this.loading = true
+					this.workContractService.remove(ids).then((data) => {
+						this.$message.success(data)
+						this.refreshList()
+						this.loading = false
+					})
+				})
+			},
+			resetSearch () {
+				this.applyUserName = ''
+				this.searchForm.createById = ''
+				this.$refs.searchForm.resetFields()
+				this.refreshList()
+			},
+			// 归档撤回
+			rebackFiled (row) {
+				this.$confirm(`确定要撤回该申请吗?`, '提示', {
+					confirmButtonText: '确定',
+					cancelButtonText: '取消',
+					type: 'warning'
+				}).then(async () => {
+					await this.workContractService.findContractById(row.id).then((data) => {
+						if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+							this.$message.error('数据已发生改变或不存在,请刷新数据')
+							this.refreshList()
+						} else {
+							processService.revokeProcIns(data.procInsId).then(async (data) => {
+								let form = {filedType: '3', id: row.id}
+								await this.workContractService.updateStatusById(form)
+								this.$message.success(data)
+								this.refreshList()
+							})
+						}
+					})
+					// this.$confirm(`确定撤回流程吗?`, '提示', {
+					//   confirmButtonText: '确定',
+					//   cancelButtonText: '取消',
+					//   taskId: row.taskFiledId,
+					//   type: 'warning'
+					// }).then(() => {
+					//   console.log('datas', row.taskFiledId)
+					//   this.taskService.backNodes(row.taskFiledId).then(({data}) => {
+					//     let backNodes = data
+					//     if (backNodes.length > 0) {
+					//       let backTaskDefKey = backNodes[0].taskDefKey
+					//       this.taskService.back({
+					//         taskId: row.taskFiledId,
+					//         backTaskDefKey: backTaskDefKey,
+					//         isShow: false,
+					//         ...this.auditForm
+					//       }).then(({data}) => {
+					//         this.updateStatusById(row, 'rebackFiled')
+					//         this.$message.success('回退成功')
+					//       })
+					//     }
+					//   })
+				})
+			},
+			updateStatusById (row, type) {
+				if (type === 'agree') {
+					row.status = '5'
+					this.workContractService.updateStatusById(row)
+				}
+				if (type === 'reject') {
+					row.status = '4'
+					this.workContractService.updateStatusById(row)
+				}
+				if (type === 'reback') {
+					row.status = '3'
+					this.workContractService.updateStatusById(row)
+				}
+				if (type === 'rebackFiled') {
+					row.filedType = '3'
+					this.workContractFileService.updateStatusById(row)
+				}
+				if (type === 'rebackBorrow') {
+					row.borrowType = '0'
+					this.workContractBorrowService.updateStatusByContractInfoId(row).then(() => {
+						this.workContractBorrowService.deleteById(row.id)
+					})
+				}
+				if (type === 'retureBorrow') {
+					row.borrowType = '0'
+					this.workContractBorrowService.updateStatusByContractInfoId(row).then(() => {
+						row.type = 'reture'
+						row.borrowType = '5'
+						this.workContractBorrowService.updateMessageStatusById(row)
+					})
+				}
+			},
+			is () {
+				userService.is().then((data) => {
+					this.isAdmin = data
+				})
+			},
+			// 归档
+			filed (id) {
+				processService.getByName('嘉溢-合同归档').then((data) => {
+					if (!this.commonJS.isEmpty(data.id)) {
+						// 读取流程表单
+						let tabTitle = `发起流程【嘉溢-合同归档】`
+						let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [嘉溢-合同归档]`
+						taskService.getTaskDef({ procDefId: data.id,
+							businessId: id,
+							businessTable: 'jy_work_contract_info',
+							status: 'audit',
+							method:'views'}).then((reture) => {
+							this.$router.push({
+								path: '/flowable/task/TaskForm',
+								query: {
+									...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+									procDefId: data.id,
+									procDefKey: data.key,
+									status: 'startAndHoldFiled',
+									title: tabTitle,
+									formType: reture.formType,
+									formUrl: reture.formUrl,
+									formTitle: processTitle,
+									businessTable: 'jy_work_contract_info',
+									businessId: id,
+									isShow: false,
+									routePath: '/jy/workContractInfo/JyWorkContractList'
+								}
+							})
+						})
+						// 读取流程表单
+						// let tabTitle = `发起流程【合同登记归档】`
+						// let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记归档]`
+						// this.taskService.getTaskDef({ procDefId: data.id,
+						//   businessId: id,
+						//   businessTable: 'work_contract_file',
+						//   status: 'startAndHoldFiled'}).then((reture) => {
+						//     this.$router.push({
+						//       path: '/flowable/task/TaskForm',
+						//       query: {
+						//         procDefId: data.id,
+						//         procDefKey: data.key,
+						//         status: 'startAndHoldFiled',
+						//         title: tabTitle,
+						//         formType: reture.data.formType,
+						//         formUrl: reture.data.formUrl,
+						//         formTitle: processTitle,
+						//         businessTable: 'work_contract_file',
+						//         businessId: id,
+						//         isShow: false,
+						//         routePath: '/workContract/WorkContractList'
+						//       }
+						//     })
+						//   })
+					}
+				})
+			},
+			//修改
+			updateFiled(id){
+				this.$refs.contractAddForm.init('edit', id)
+			},
+			// 归档详情
+			detailFiled (row) {
+				if (row.filedType !== '4') {
+					this.workContractService.findContractById(row.id).then((data) => {
+						if (!this.commonJS.isEmpty(data.id)) {
+							taskService.getTaskDef({
+								procInsId: data.procInsId,
+								procDefId: data.processDefinitionId
+							}).then((data) => {
+								this.$router.push({
+									path: '/flowable/task/TaskFormDetail',
+									query: {
+										...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+										readOnly: true,
+										title: '归档流程详情',
+										formTitle: '归档流程详情',
+										businessId: row.id
+									}
+								})
+							})
+						}
+					})
+				}
+			},
+			// 审核或重新调整跳转
+			todo (row) {
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/workContractInfo/JyWorkContractList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAudit (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+					for (const userId of row.auditUserIds) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			},
+			// 驳回后调整
+			adjustFiled (row) {
+				this.workContractService.findContractById(row.id).then((data) => {
+					if (data.filedType !== '4') { // status的值不等于“驳回”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todoFiled(row)
+					}
+				})
+			},
+			// 审核
+			examineFiled (row) {
+				this.workContractService.findContractById(row.id).then((data) => {
+					if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+						this.$message.error('数据已发生改变或不存在,请刷新数据')
+						this.refreshList()
+					} else {
+						this.todoFiled(data)
+					}
+				})
+			},
+			// 审核或重新调整跳转
+			todoFiled (row) {
+				console.log('row',row)
+				let cUser = false
+				taskService.getTaskDefInfo({
+					taskId: row.taskId
+				}).then((data) => {
+					this.$router.push({
+						path: '/flowable/task/TaskForm',
+						query: {
+							...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
+							isShow: false,
+							formReadOnly: true,
+							formTitle: `${data.taskName}`,
+							cUser: cUser,
+							title: `审批【${data.taskName || ''}】`,
+							routePath: '/jy/workContractInfo/JyWorkContractList'   // 数据处理后需要跳转的页面路径
+						}
+					})
+				})
+			},
+			// 查询当前登录人是否是数据的审核人
+			checkIsAuditFiled (row) {
+				let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+				if (this.commonJS.isNotEmpty(row.auditUserIdsFiled)) {
+					for (const userId of row.auditUserIdsFiled) {
+						if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+							return true
+						}
+					}
+				}
+				return false
+			}
+		}
+	}
+</script>

+ 173 - 0
src/views/jy/workContractInfo/WorkContractChooseCom.vue

@@ -0,0 +1,173 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择合同"
+      :close-on-click-modal="false"
+	  draggable
+      width="1300px"
+      height="500px"
+      @close="close"
+      append-to-body
+      @keyup.enter.native=""
+      v-model="visible">
+      <div style="height: calc(100% - 80px);">
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="客户名称" prop="clientName">
+            <el-input size="small" v-model="searchForm.clientName" placeholder="请输入客户名称" clearable></el-input>
+          </el-form-item>
+
+          <el-form-item label="合同名称" prop="name">
+            <el-input size="small" v-model="searchForm.name" placeholder="请输入合同名称" clearable></el-input>
+          </el-form-item>
+
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          size="small"
+          ref="workContractTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :radio-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="radio" width="40px"></vxe-column>
+          <vxe-column min-width="200px" title="合同编号" field="no" align="center"></vxe-column>
+          <vxe-column min-width="200px" title="合同名称" field="name" align="center"></vxe-column>
+          <vxe-column min-width="100px" title="案卷号" field="filedNo" align="center"></vxe-column>
+          <vxe-column min-width="200px" title="客户名称" field="clientName" align="center"></vxe-column>
+          <vxe-column min-width="100px" title="合同金额(元)" field="contractAmount" align="center"></vxe-column>
+          <vxe-column min-width="100px" title="创建人" field="createBy" align="center"></vxe-column>
+          <vxe-column min-width="150px" title="签订日期" field="contractDate" align="center"></vxe-column>
+
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" @click="getContract()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import InputNumber from '@/views/workContract/InputNumber.vue'
+  import SelectUserTree from '@/views/utils/treeUserSelect'
+  import ContractInfoService from '@/api/sys/WorkContractService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          clientName: '',
+          name: '',
+          contractDates: [],
+          type: '',
+          filedType: '',
+          contractAmounts: [],
+          createBy: '',
+          procInsId: '',
+          processDefinitionId: ''
+        }
+      }
+    },
+    contractInfoService: null,
+    created () {
+      this.contractInfoService = new ContractInfoService()
+    },
+    components: {
+      SelectUserTree,
+      InputNumber
+    },
+    methods: {
+      init (rowIndex) {
+        // if (!this.commonJS.isEmpty(id)) {
+        //   this.$refs.workContractTable.setCurrentRow(id)
+        // }
+        this.visible = true
+        this.rowIndex = rowIndex
+        this.list()
+      },
+      projectInit (rowIndex) {
+        this.visible = true
+        this.rowIndex = rowIndex
+        this.projectList()
+      },
+      // 表单提交
+      getContract () {
+        let row = this.$refs.workContractTable.getRadioRecord()
+        if (this.commonJS.isEmpty(row)) {
+          this.$message.error('请选择一条数据')
+          return
+        }
+        this.close()
+        this.$emit('getContract', row, this.rowIndex)
+      },
+      list () {
+        this.loading = true
+        this.searchForm.statusList = '2,3,4,5'
+        this.contractInfoService.list({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visible = false
+      }
+    }
+  }
+</script>

+ 996 - 0
src/views/jy/workContractInfo/WorkContractForm.vue

@@ -0,0 +1,996 @@
+<template>
+  <div>
+	  <el-form size="default" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"
+			   label-width="150px">
+
+		  <el-divider v-if="(status === 'audit' || status === 'taskFormDetail'|| method==='view') && commonJS.isNotEmpty(inputForm.customerId)" content-position="left">
+			  <el-link  type="primary" :underline="false" icon="el-icon-document" @click="viewClient(inputForm.customerId)"><b>查看客户详情</b></el-link>
+		  </el-divider>
+		  <el-divider  content-position="left"><i class="el-icon-document"></i> 客户信息</el-divider>
+		  <el-row  :gutter="0">
+			  <el-col :span="12">
+				  <el-form-item label="主委托方" prop="primaryLinkman"
+								:rules="[
+                           {required: true, message: '请选择委托方', trigger: 'blur'}
+                 ]">
+					  <el-input :readonly="true" maxlength="100" @focus="openWorkClient2()" v-model="inputForm.primaryLinkman" placeholder="请选择委托方">
+						  <!--              <el-button slot="append" icon="el-icon-search" @click="openWorkClient2()"></el-button>-->
+					  </el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="客户编号" prop="customerNo"
+								:rules="[
+                   ]">
+					  <el-input :readonly="true" v-model="inputForm.customerNo" placeholder="请填写客户编号" clearable></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="统一社会信用代码" prop="uscCode"
+								:rules="[
+                   ]">
+					  <el-input :readonly="true" v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="委托方电话" prop="clientContactsPhone"
+								:rules="[
+                          // {required: true, message: '委托方电话', trigger: 'blur'}
+                 ]">
+					  <el-input  maxlength="15" :readonly="true" v-model="inputForm.clientContactsPhone" placeholder="请输入委托方电话"
+					  ></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="地址" prop="address"
+								:rules="[
+                   ]">
+					  <el-input :readonly="true" v-model="inputForm.address" placeholder="地址" clearable></el-input>
+				  </el-form-item>
+			  </el-col>
+		  </el-row>
+		  <el-divider content-position="left"><i class="el-icon-document"></i> 基本信息</el-divider>
+		  <el-row  :gutter="0">
+			  <el-col :span="12">
+				  <el-form-item label="合同名称" prop="contractName"
+								:rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
+                 ]">
+					  <el-input :readonly="true" v-model="inputForm.contractName" placeholder="请输入合同名称"     clearable></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="合同编号" prop="contractNo">
+					  <el-input maxlength="64" :readonly="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="合同类型" prop="contractTypes"
+								:rules="[{required: true, message: '合同类型不能为空', trigger: 'blur'}
+                 ]" >
+					  <div style="width: 100%;" v-if="status==='edit'">
+						  <el-cascader v-model="inputForm.contractTypes" :options="typeData" @change="handleChange" :props="{
+				checkStrictly: true,
+				value: 'value',
+				label: 'label', // 显示名称
+				children: 'children', // 子级字段名
+			}" />
+					  </div>
+					  <div v-else>
+						  <el-input maxlength="64" :readonly="true" v-model="inputForm.contractTypes" placeholder="请输入合同类型"></el-input>
+					  </div>
+
+
+				  </el-form-item>
+			  </el-col>
+
+			  <el-col :span="12">
+				  <el-form-item label="签订日期" prop="contractDate"
+								:rules="[
+                {required: true, message:'请输入签约日期', trigger:'blur'}
+               ]">
+					  <el-date-picker
+						  placement="bottom-start"
+						  value-format="YYYY-MM-DD"
+						  v-model="inputForm.contractDate"
+						  style="width: 100%"
+						  v-if="status==='edit'"
+						  placeholder="选择日期">
+					  </el-date-picker>
+						  <el-input maxlength="64" :readonly="true" v-model="inputForm.contractDate" placeholder="请输入签约日期"></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12">
+				  <el-form-item label="合同生效日期" prop="effectiveDate">
+					  <el-date-picker
+						  v-model="inputForm.effectiveDate"
+						  value-format="YYYY-MM-DD"
+						  style="width: 418px"
+						  v-if="status==='edit'"
+						  placeholder="选择日期">
+					  </el-date-picker>
+						  <el-input v-else maxlength="64" :readonly="true" v-model="inputForm.contractDate" placeholder="请输入合同生效日期"></el-input>
+				  </el-form-item>
+			  </el-col>
+
+			  <el-col :span="12">
+				  <el-form-item label="合同终止日期" prop="closingDate">
+					  <el-date-picker
+						  @change="checkData"
+						  value-format="YYYY-MM-DD"
+						  v-model="inputForm.closingDate"
+						  style="width: 418px"
+						  v-if="status==='edit'"
+						  placeholder="选择日期">
+					  </el-date-picker>
+						  <el-input v-else maxlength="64" :readonly="true" v-model="inputForm.contractDate" placeholder="请输入合同生效日期"></el-input>
+				  </el-form-item>
+			  </el-col>
+
+
+			  <el-col :span="12">
+				  <el-form-item label="对方合同编号" prop="contractOpposite">
+					  <el-input maxlength="64" :readonly="true" v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
+				  </el-form-item>
+			  </el-col>
+
+
+			  <el-col :span="12">
+				  <el-form-item  prop="department" label="所属部门"
+								 :rules="[
+                {required: true, message:'请选择所属部门', trigger:'blur'}
+               ]">
+					  <SelectTree
+						  ref="officeTree"
+						  :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+						  :url="`/system-server/sys/office/treeData?type=2`"
+						  :value="inputForm.department"
+						  :accordion="true"
+						  size="default"
+						  v-if="status==='edit'"
+						  @getValue="(value) => {inputForm.department=value}"/>
+					  <el-input v-else maxlength="64" :readonly="true" v-model="inputForm.department" placeholder="请填写所属部门"></el-input>
+				  </el-form-item>
+			  </el-col>
+
+
+			  <el-col :span="12">
+				  <el-form-item label="创建时间" prop="createTime">
+					  <el-date-picker
+						  placement="bottom-start"
+						  value-format="YYYY-MM-DD"
+						  v-model="inputForm.createTime"
+						  style="width: 100%"
+						  :disabled="true"
+						  v-if="status==='edit'"
+						  placeholder="选择日期">
+					  </el-date-picker>
+					  <el-input v-else maxlength="64" :readonly="true" v-model="inputForm.contractDate" placeholder="请输入合同生效日期"></el-input>
+				  </el-form-item>
+			  </el-col>
+
+
+			  <el-col :span="12" v-if="inputForm.contractAmountType === '1'">
+				  <el-form-item label="合同金额(元)" prop="contractAmount"
+								:rules="[
+                  {required: true, message:'请输入合同金额(元)', trigger:'blur'}
+               ]">
+					  <el-input maxlength="15" v-model="inputForm.contractAmount" placeholder="请输入合同金额(元)" :readonly="true"
+								@keyup.native="inputForm.contractAmount = twoDecimalPlaces(inputForm.contractAmount)"
+					  ></el-input>
+				  </el-form-item>
+			  </el-col>
+			  <el-col :span="12" v-if="$store.state.user.office.name ==='办公室'">
+				  <el-form-item label="盒号" prop="filedNo"
+								:rules="[
+                  {required: true, message:'请输入盒号', trigger:'blur'}
+               ]">
+					  <el-input :disabled="false" :readonly="false" maxlength="15" v-model="inputForm.filedNo"  placeholder="请输入盒号"
+					  ></el-input>
+				  </el-form-item>
+			  </el-col>
+
+			  <el-col>
+				  <el-form-item label="付款摘要" prop="paymentDescribe"
+								:rules="[
+							 {required: true, message:'请输入付款摘要', trigger:'blur'}
+               ]">
+					  <el-input type="textarea" :readonly="true" v-model="inputForm.paymentDescribe" placeholder="请输入付款摘要"
+					  ></el-input>
+				  </el-form-item>
+			  </el-col>
+
+			  <el-col>
+				  <el-form-item label="合同特别条款" prop="contractSpecial"
+								:rules="[
+               ]">
+					  <el-input type="textarea" :readonly="true" v-model="inputForm.contractSpecial" placeholder="请输入合同特别条款"
+					  ></el-input>
+				  </el-form-item>
+			  </el-col>
+
+			  <el-col>
+				  <el-form-item label="备注" prop="remarks"
+								:rules="[
+               ]">
+					  <el-input type="textarea" :readonly="true" v-model="inputForm.remarks" placeholder="请输入备注"
+					  ></el-input>
+				  </el-form-item>
+			  </el-col>
+		  </el-row>
+
+		  <el-tabs v-model="activeName" type="border-card">
+			  <el-tab-pane name="contactParty">
+				  <template v-slot:label>
+					  <span><span style="color: red;border-top: 20px">*</span> 委托方列表</span>
+				  </template>
+				  <el-row :gutter="15">
+					  <el-button type="primary" style="margin-bottom: 15px" size="small" :disabled="true" @click="openWorkClient">
+						  新增委托方
+					  </el-button>
+				  </el-row>
+				  <el-row :gutter="15">
+					  <el-form style="width: 100%;">
+						  <vxe-table
+							  border
+							  show-overflow
+							  show-footer
+							  :column-config="{resizable: true}"
+							  ref="contactTable"
+							  :key="tableKeyClient"
+							  class="vxe-table-element"
+							  :data="inputForm.cwWorkClientContactDTOList"
+							  style=""
+							  highlight-current-row
+							  :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: false}"
+						  >
+							  <vxe-table-column align="center" field="no" title="客户编号" :edit-render="{}">
+								  <template v-slot:edit="scope">
+									  <el-input :readonly="true" v-model="scope.row.no" placeholder="客户编号" clearable></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column align="center" field="name" title="客户名称" :edit-render="{}">
+								  <template v-slot:edit="scope">
+									  <el-input :readonly="true" v-model="scope.row.name" placeholder="客户名称" clearable></el-input>
+								  </template>
+							  </vxe-table-column>
+							  <vxe-table-column align="center" title="操作" width="220px">
+								  <template v-slot="scope">
+									  <el-button size="small" :disabled="status === 'audit' || status === 'taskFormDetail'|| method==='view'" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+								  </template>
+							  </vxe-table-column>
+						  </vxe-table>
+					  </el-form>
+				  </el-row>
+			  </el-tab-pane>
+		  </el-tabs>
+
+<!--		  <el-tabs v-model="activeName1" type="border-card">-->
+<!--			  <el-tab-pane name="contractProper">-->
+<!--				  <template v-slot:label>-->
+<!--					  <span><span style="color: red;border-top: 20px">*</span> 合同附件信息</span>-->
+<!--				  </template>-->
+<!--				  &lt;!&ndash;        合同文件&ndash;&gt;-->
+<!--				  <UpLoadComponent ref="uploadComponent"></UpLoadComponent>-->
+<!--			  </el-tab-pane>-->
+<!--		  </el-tabs>-->
+
+	  </el-form>
+<!--	  <el-image-viewer-->
+<!--		  v-if="showViewer"-->
+<!--		  :on-close="closeViewer"-->
+<!--		  :url-list="[url]"-->
+<!--		  zIndex="9999"/>-->
+    <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+  </div>
+</template>
+
+<script>
+	import WorkContractService from '@/api/jy/WorkContractService'
+	import WorkContractFileService from '@/api/jy/WorkContractFileService'
+	import UpLoadComponent from '@/views/common/UpLoadComponent'
+	import SelectTree from '@/components/treeSelect/treeSelect.vue'
+	import WorkClientForm from '../workClientInfo/WorkClientForm'
+	import WorkClientChooseForm from '../workClientInfo/WorkClientChooseForm'
+	import WorkClientChooseRadio from '../workClientInfo/WorkClientChooseRadio'
+	import dictService from "@/api/sys/dictService";
+	import OSSSerive, {
+		httpRequest,
+		toHref,
+		openWindowOnUrl,
+		handleRemove,
+		fileName
+	} from '@/api/sys/OSSService'
+	import moment from 'moment'
+  // import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+  export default {
+	  data () {
+		  return {
+			  visable: false,
+			  gridData: [],
+			  radio: 0,
+			  tableData: [],
+			  dataList: [],
+			  dataListNew: [],
+			  title: '',
+			  method: '',
+			  isSubmit: false,
+			  visible: false,
+			  loading: false,
+			  contractNoFlag: false,
+			  typeData:[],
+			  returnForm: {
+				  customerId: '',  // 客户id
+				  address: '',
+				  uscCode: '',
+				  clientId: '',
+				  name: '',
+				  contractDate: '',
+				  effectiveDate: '',
+				  closingDate: '',
+				  contractType: '',
+				  contractAmountType: '',
+				  contractAmount: '',
+				  predictAmount: '',
+				  contractOpposite: '',
+				  contractFees: [],
+				  fees: '',
+				  contractFee: '',
+				  describes: '',
+				  contractSpecial: '',
+				  remarks: '',
+				  clientName: '',
+				  workAttachmentList: [],
+				  status: '',
+				  customerNo: '',
+				  customerName: '',
+			  },
+			  inputForm: {
+				  customerId: '',  // 客户id
+				  address: '',
+				  uscCode: '',
+				  customerNo: '',
+				  contractFees: [],
+				  contractFee: '',
+				  contractNo: '',
+				  contractType: '',
+				  contractName: '',
+				  payerSubject: '',
+				  paymentMethod: '',
+				  paymentDescribe: '',
+				  contractAmount: '',
+				  predictAmount: '',
+				  actualContractAmount: '',
+				  contractNum: '2',
+				  contractStatus: '新创建',
+				  paymentAgreement: '',
+				  changeNum: '0',
+				  department: '',
+				  clientContacts: '',
+				  clientContactsPhone: '',
+				  createBy: this.$store.state.user.name,
+				  createId: this.$store.state.user.id,
+				  createTime: '',
+				  workAttachmentList: [],
+				  cwWorkClientContactDTOList: [],
+				  contractAmountType: '',
+				  contractOpposite: '',
+				  fees: '',
+				  contractTypes:[],
+				  primaryLinkman:'',
+				  contractSpecial: '',
+				  remarks: '',
+				  contractDate:'',
+				  effectiveDate: '',
+				  closingDate: '',
+				  filedNo:''
+			  },
+			  filesArra2: [],
+			  fileList: [],
+			  isFlag: true,
+			  showViewer: false, // 显示查看器
+			  url: '',
+			  rowurl: '',
+			  src: '',
+			  onedit: false,
+			  type: '',
+			  loadProgress: 0, // 动态显示进度条
+			  progressFlag: false, // 关闭进度条
+			  promi: null,
+			  tableKeyClient: '1',
+			  keyWatch: ''
+		  }
+	  },
+	  props: {
+		  businessId: {
+			  type: String,
+			  default: ''
+		  },
+		  formReadOnly: {
+			  type: Boolean,
+			  default: false
+		  },
+		  status: {
+			  type: String,
+			  default: ''
+		  }
+	  },
+	  activated () {
+		  this.getTypeList()
+	  },
+	  components: {
+		  // ElImageViewer,
+		  UpLoadComponent,
+		  SelectTree,
+		  WorkClientForm,
+		  WorkClientChooseForm,
+		  WorkClientChooseRadio
+	  },
+	  ossService: null,
+	  contractService:null,
+	  WorkContractFileService:null,
+	  created () {
+		  this.ossService = new OSSSerive()
+		  this.contractService=new WorkContractService()
+		  this.workContractFileService=new WorkContractFileService()
+	  },
+	  mounted () {
+		  window.onPreview = this.onPreview
+	  },
+	  computed: {
+		  officeName () {
+			  return this.$store.state.user.office.name
+		  },
+		  bus: {
+			  get () {
+				  // this.$refs.archiveFile.setDividerName('附件', false)
+				  this.$refs.uploadComponent.setDividerName('附件', false)
+				  return this.businessId
+			  },
+			  set (val) {
+				  this.businessId = val
+			  }
+		  }
+	  },
+	  watch: {
+		  'keyWatch': {
+			  handler (newVal) {
+				  if (this.commonJS.isNotEmpty(this.bus)) {
+					  this.init('', this.bus)
+				  } else {
+					  this.$nextTick(() => {
+						  this.$refs.inputForm.resetFields()
+					  })
+				  }
+			  }
+		  }
+	  },
+	  methods: {
+		  getKeyWatch (keyWatch) {
+			  this.keyWatch = keyWatch
+		  },
+		  uploadVideoProcess (event, file, fileList) {
+			  this.progressFlag = true // 显示进度条
+			  this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+			  if (this.loadProgress >= 100) {
+				  this.loadProgress = 100
+				  setTimeout(() => { this.progressFlag = false }, 1000) // 一秒后关闭进度条
+			  }
+		  },
+		  async toHref (row) {
+			  toHref(row)
+		  },
+		  onPreview (url) {
+			  this.url = url
+			  this.showViewer = true
+		  },
+		  // 关闭查看器
+		  closeViewer () {
+			  this.url = ''
+			  this.showViewer = false
+		  },
+		  init (method, id) {
+			  this.dataList = []
+			  this.dataListNew = []
+			  this.method = method
+			  // console.log('method', method)
+			  this.inputForm = {
+				  customerId: '',  // 客户id
+				  address: '',
+				  uscCode: '',
+				  customerNo: '',
+				  contractFees: [],
+				  contractFee: '',
+				  contractNo: '',
+				  contractType: '',
+				  contractName: '',
+				  payerSubject: '',
+				  paymentMethod: '',
+				  paymentDescribe: '',
+				  signingDate: '',
+				  fees: '',
+				  contractAmount: '',
+				  predictAmount: '',
+				  actualContractAmount: '',
+				  contractNum: '',
+				  contractStatus: '',
+				  paymentAgreement: '',
+				  changeNum: '',
+				  department: '',
+				  clientContacts: '',
+				  clientContactsPhone: '',
+				  createBy: this.$store.state.user.name,
+				  createId: this.$store.state.user.id,
+				  createTime: '',
+				  workAttachmentList: [],
+				  cwWorkClientContactDTOList: [],
+				  contractAmountType: '',
+				  contractOpposite: '',
+				  contractTypes:[],
+				  primaryLinkman:'',
+				  filedNo:''
+			  }
+			  this.inputForm.id = id
+			  if (method === 'add') {
+				  // this.inputForm.id = 'add'
+				  this.title = `新建合同`
+			  } else if (method === 'edit') {
+				  this.title = '修改合同'
+			  } else if (method === 'view') {
+				  this.inputForm.showVi = false
+				  this.title = '查看合同详情'
+			  }
+			  this.visible = true
+			  this.loading = false
+			  this.$nextTick(() => {
+				  this.$refs.inputForm.resetFields()
+					  this.loading = true
+					  this.$refs.uploadComponent.clearUpload()
+					  // this.$refs.archiveFile.clearUpload()
+					  if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+						  this.contractService.findContractById(this.inputForm.id).then((data) => {
+							  this.inputForm = this.recover(this.inputForm, data)
+							  // this.inputForm.cwWorkClientContactDTOList=data.cwWorkClientContactDTOList
+							  console.log('data', data)
+								this.inputForm.contractNo=data.no
+								this.inputForm.contractTypes=data.contractType
+								this.inputForm.contractDate=data.contractDate
+							  if (this.formReadOnly) {
+								  method = 'view'
+							  }
+							  this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentList, 'workContract', null, null, null, null, false)
+							  // this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
+							  this.loading = false
+						  })
+					  }
+			  })
+		  },
+		  // 查看
+		  view (id) {
+			  this.$refs.workClientForm.init('view', id)
+		  },
+		  // 新增
+		  // eslint-disable-next-line no-dupe-keys
+		  async insertEvent (type) {
+			  if (type === 'client') {
+				  let d = {
+					  no: '',
+					  name: ''
+				  }
+				  if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+					  this.inputForm.cwWorkClientContactDTOList = []
+				  }
+				  this.$refs.contactTable.insertAt(d)
+				  this.inputForm.cwWorkClientContactDTOList.push(d)
+				  this.tableKeyClient = Math.random()
+			  }
+		  },
+
+		  // 删除
+		  removeEvent (row, rowIndex, type) {
+			  if (type === 'client') {
+				  this.$refs.contactTable.remove(row)
+				  this.inputForm.cwWorkClientContactDTOList.splice(rowIndex, 1)
+			  }
+		  },
+		  openWorkClient () {
+			  this.$refs.workClientChooseForm.init()
+		  },
+		  openWorkClient2 () {
+			  this.$refs.workClientChooseRadio.init()
+		  },
+		  getWorkClientChoose (list) {
+
+			  if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+				  this.inputForm.cwWorkClientContactDTOList = []
+			  }
+			  let _this = this
+			  let _list = list
+			  const waitForEach = function () {
+				  return new Promise(function (resolve, reject) {
+					  _list.forEach((item) => {
+						  _this.inputForm.cwWorkClientContactDTOList.forEach(client => {
+							  if (item.no === client.no) {
+								  _this.$message.error('已存在客户 “' + client.name + '”,请重新选择')
+								  throw new Error('已存在客户 “' + client.name + '”,请重新选择')
+							  }
+						  })
+					  })
+					  resolve()
+				  })
+			  }
+			  waitForEach().then(() => {
+				  list.forEach(item => {
+					  this.$refs.contactTable.insertAt(item)
+					  this.inputForm.cwWorkClientContactDTOList.push(item)
+					  this.tableKeyClient = Math.random()
+					  console.log('list', this.inputForm.cwWorkClientContactDTOList)
+				  })
+			  })
+		  },
+		  getWorkClientChoose2 (list) {
+			  this.inputForm.customerNo = list.no
+			  this.inputForm.uscCode = list.uscCode
+			  this.inputForm.address = list.address
+			  this.inputForm.customerId = list.id
+			  this.inputForm.primaryLinkman = list.name
+			  this.inputForm.clientContactsPhone = list.mobile
+			  console.log('1231312',list)
+		  },
+		  // 表单提交
+		  // 暂存
+		  doSubmit () {
+			  this.loading = true
+			  if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
+				  this.loading = false
+				  this.$message.error('“委托方”中至少有一条数据')
+				  throw new Error('“委托方”中至少有一条数据')
+			  }
+			  if (this.$refs.uploadComponent.checkProgress()) {
+				  this.loading = false
+				  throw new Error()
+			  } else {
+				  this.$refs['inputForm'].validate((valid) => {
+					  if (valid) {
+						  this.loading = true
+						  this.inputForm.filedType = '0'
+						  this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+						  if (this.commonJS.isEmpty(this.inputForm.workAttachmentList)) {
+							  // 附件至少上传一条
+							  this.$message.error('至少上传一个附件信息')
+							  this.loading = false
+							  throw new Error('至少上传一个附件信息')
+						  }
+						  this.inputForm.fees = this.inputForm.contractFees.join(',')
+						  this.contractService.save(this.inputForm).then((data) => {
+							  this.$refs.inputForm.resetFields()
+							  this.loading = false
+							  this.close()
+							  this.$emit('refreshDataList')
+						  }).catch(() => {
+							  this.$refs.inputForm.resetFields()
+							  this.loading = false
+						  })
+					  } else {
+						  this.loading = false
+					  }
+				  })
+			  }
+		  },
+		  startForm (callback) {
+			  this.loading = true
+			  if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+			  	console.log('id',this.inputForm.id)
+				  this.contractService.findContractById(this.inputForm.id).then((data) => {
+					  if (this.commonJS.isNotEmpty(data.filedType) && data.filedType !== '0' && data.filedType !== '1' && data.filedType !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+						  this.loading = false
+						  this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						  throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					  } else {
+						  this.startFormTrue(callback)
+					  }
+				  })
+			  } else {
+				  this.startFormTrue(callback)
+			  }
+		  },
+		  // 送审
+		  startFormTrue (callback) {
+			  this.$refs['inputForm'].validate(async (valid) => {
+				  if (valid) {
+					  this.loading = true
+					  this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+					  this.inputForm.filedType = '2'
+					  this.inputForm.contractTypes=[]
+					  await this.contractService.saveContract(this.inputForm).then((data) => {
+						  this.inputForm.id = data.businessId
+						  callback(data.businessTable, data.businessId, this.inputForm)
+						  this.$refs.inputForm.resetFields()
+						  this.loading = false
+					  }).catch(() => {
+						  this.$refs.inputForm.resetFields()
+						  this.loading = false
+					  })
+				  } else {
+					  this.loading = false
+				  }
+			  })
+		  },
+		  reapplyForm (callback) {
+			  this.loading = true
+			  this.contractService.findContractById(this.inputForm.id).then((data) => {
+				  if (data.filedType !== '4') { // 审核状态不是“驳回”,就弹出提示
+					  this.loading = false
+					  this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					  throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				  } else {
+					  this.startFormTrue(callback)
+				  }
+			  })
+		  },
+		  // 通过
+		  agreeForm (callback) {
+			  this.loading = true
+			  this.$refs['inputForm'].validate(async (valid) => {
+				  if (valid) {
+					  await this.contractService.findContractById(this.inputForm.id).then((data) => {
+						  if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+							  this.loading = false
+							  this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							  throw new Error()
+						  } else {
+							  this.loading = true
+							  this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+							  if (this.$store.state.user.office.name ==='办公室'){
+								  if (this.commonJS.isEmpty(this.inputForm.filedNo)) {
+									  this.loading = false
+									  this.$message.error('请输入盒号')
+									  throw new Error('请输入盒号')
+								  }
+								  this.inputForm.filedType = '5'
+							  }else {
+								  this.inputForm.filedType = '2'
+							  }
+							  this.inputForm.contractTypes=[]
+							  this.contractService.saveContract(this.inputForm).then((data) => {
+								  callback(data.businessTable, data.businessId, this.inputForm)
+								  this.$refs.inputForm.resetFields()
+								  this.loading = false
+							  }).catch(() => {
+								  this.$refs.inputForm.resetFields()
+								  this.loading = false
+							  })
+						  }
+					  })
+				  } else {
+					  this.loading = false
+				  }
+			  })
+		  },
+		  async updateStatusById (type, callback) {
+			  this.loading = true
+			  if (await this.$refs.uploadComponent.checkProgress()) {
+				  this.loading = false
+				  throw new Error()
+			  } else {
+				  if (type === 'reject' || type === 'reback') {
+					  this.contractService.findContractById(this.inputForm.id).then((data) => {
+						  if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+							  this.loading = false
+							  this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							  throw new Error()
+						  } else {
+							  // if (type === 'agree') {
+							  //   // 同意
+							  //   this.inputForm.status = '5'
+							  // }
+							  if (type === 'reject') {
+								  // 驳回
+								  this.inputForm.filedType = '4'
+							  }
+							  if (type === 'reback') {
+								  // 撤回
+								  this.inputForm.filedType = '3'
+							  }
+							  if (type === 'reject' || type === 'reback') {
+								  let param = {filedType: this.inputForm.filedType, id: this.inputForm.id}
+								  this.contractService.updateStatusById(param).then(() => {
+									  callback()
+									  this.loading = false
+
+								  })
+							  }
+						  }
+					  })
+				  } else if (type === 'hold') {
+					  this.contractService.findContractById(this.inputForm.id).then((data) => {
+						  if (data.filedType !== '4') { // status的值不等于“驳回”就弹出提示
+							  this.loading = false
+							  this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+							  throw new Error()
+						  } else {
+							  // 终止
+							  let param = {filedType: '1', id: this.inputForm.id}
+							  this.contractService.updateStatusById(param).then(() => {
+								  this.loading = false
+								  callback()
+							  })
+						  }
+					  })
+				  }
+			  }
+		  },
+
+		  close () {
+			  this.$refs.inputForm.resetFields()
+			  this.inputForm.clientName = ''
+			  this.inputForm.cwWorkClientContactDTOList = []
+			  this.visible = false
+			  this.showVi = true
+			  this.$refs.uploadComponent.clearUpload()
+		  },
+		  tabHandleClick (event) {
+			  // console.log(event)
+		  },
+		  httpRequest (file) {
+			  httpRequest(file, fileName(file), 'workContract')
+		  },
+		  handleRemove () {
+			  this.fileList = handleRemove()
+		  },
+		  changes (file, fileList) {
+			  this.dataListNew = []
+			  this.dataList.forEach((item) => {
+				  this.dataListNew.push(item)
+			  })
+			  fileList.forEach((item) => {
+				  item.createTime = moment(new Date()).format('YYYY-MM-DD')
+				  item.createBy = this.$store.state.user.name
+				  this.dataListNew.push(item)
+			  })
+			  const isLt2M = file.size / 1024 / 1024 < 300
+			  if (isLt2M === false) {
+				  this.$message.error('文件大小不能超过 ' + 300 + 'M !')
+				  this.fileList = []
+				  this.filesArra2 = []
+			  }
+		  },
+		  async showFile (row) {
+			  await openWindowOnUrl(row)
+		  },
+		  // 排序
+		  sortChangeHandle (column) {
+			  this.orders = []
+			  if (column.order != null) {
+				  this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+			  }
+			  this.refreshList()
+		  },
+		  deleteMsgById (row, index) {
+			  this.dataListNew.splice(index, 1)
+			  if (row.id !== null && row.id !== '' && row.id !== undefined) {
+				  this.ossService.deleteMsgById(row.id)
+			  }
+		  },
+		  twoDecimalPlaces (num) {
+			  let str = num.toString()
+			  var len1 = str.substr(0, 1)
+			  var len2 = str.substr(1, 1)
+			  // eslint-disable-next-line eqeqeq
+			  if (str.length > 1 && len1 == 0 && len2 != '.') {
+				  str = str.substr(1, 1)
+			  }
+			  // eslint-disable-next-line eqeqeq
+			  if (len1 == '.') {
+				  str = ''
+			  }
+			  // eslint-disable-next-line eqeqeq
+			  if (str.indexOf('.') != -1) {
+				  var str_ = str.substr(str.indexOf('.') + 1)
+				  // eslint-disable-next-line eqeqeq
+				  if (str_.indexOf('.') != -1) {
+					  str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+				  }
+				  if (str_.length > 2) {
+					  this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+					  return (str = '')
+				  }
+			  }
+			  // eslint-disable-next-line no-useless-escape
+			  str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+			  return str
+		  },
+		  positiveInteger (num) {
+			  let str = num.toString()
+			  var len1 = str.substr(0, 1)
+			  var len2 = str.substr(1, 1)
+			  // eslint-disable-next-line eqeqeq
+			  if (str.length > 1 && len1 == 0 && len2 != '.') {
+				  str = str.substr(1, 1)
+			  }
+			  // eslint-disable-next-line eqeqeq
+			  if (len1 == '.') {
+				  str = ''
+			  }
+			  // eslint-disable-next-line no-useless-escape
+			  str = str.replace(/[^\d^]+/g, '') // 保留数字
+			  return str
+		  },
+		  tableRowClassName ({row, rowIndex}) {
+			  row.index = rowIndex
+		  },
+		  handleRadioChange (val) {
+			  if (val) {
+				  this.radio = val.index
+			  }
+		  },
+		  // 关闭窗口时调用
+		  closeXTable () {
+			  this.closePop()
+		  },
+		  rowStyle (event) {
+			  return 'cursor:pointer;'
+		  },
+		  closePop () {
+			  this.visable = false
+		  },
+		  checkData () {
+			  let begin = this.inputForm.effectiveDate
+			  let close = this.inputForm.closingDate
+			  if (close < begin) {
+				  this.$message.warning(`合同终止日期要大于合同开始日期`)
+				  this.inputForm.closingDate = ''
+			  }
+		  },
+		  // 查看客户信息详情
+		  viewClient (id) {
+			  this.$refs.workClientForm.init('view', id)
+		  },
+
+		  //获取合同类型
+		  getTypeList(){
+			  dictService.getListData().then((data)=>{
+				  this.typeData=data
+			  })
+		  },
+		  //将合同类型进行绑定
+		  handleChange(value){
+
+			  // console.log('label',label)
+			  this.inputForm.contractTypes=value
+			  console.log('value',this.inputForm.contractTypes)
+		  }
+	  }
+  }
+</script>
+
+<style>
+  .tid_40 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_40 .vxe-header--row .col--last{
+    text-align: center;
+  }
+  .tid_45 .vxe-body--column .vxe-cell{
+    padding: 1px;
+    text-align: center;
+  }
+  .tid_45 .vxe-header--row .col--last{
+    text-align: center;
+  }
+</style>
+
+<style scoped>
+  .avatar{
+    height: 100px;
+  }
+  .el-divider__text {
+    font-weight: bold;
+    font-size: 16px;
+  }
+</style>

+ 3 - 0
src/views/sys/mould/SerialnumTplForm.vue

@@ -108,6 +108,7 @@
           :data="mouldList"
           :disabled="method==='view'"
           style="margin-left: 5em"
+		  :key="tableKey"
           :edit-config="{trigger: 'click', mode: 'row', showStatus: false, autoClear: true, icon: '#'}"
         >
 
@@ -186,6 +187,7 @@
           serialTplEx: ''
         },
         mouldList: [],
+		  tableKey: '',
         mould: {
           type: '',
           value: '',
@@ -296,6 +298,7 @@
         } else {
           await this.$refs.xTable.insert().then((data) => {
             this.mouldList.push(data)
+			  this.tableKey = Math.random()
           })
         }
       },