Parcourir la source

Merge remote-tracking branch 'origin/master'

徐滕 il y a 2 semaines
Parent
commit
57a4a679e6

+ 22 - 10
src/api/auth/loginService.js

@@ -16,6 +16,14 @@ export default {
 			data: data,
 		});
 	},
+	ddlogin: function (inputForm) {
+		return request({
+			url: prefix + "/user/sys/ddLogin",
+			method: "post",
+			data: inputForm,
+		});
+	},
+
 	logout: function () {
 		return request({
 			url: prefix + "/user/logout",
@@ -27,20 +35,24 @@ export default {
 			url: prefix + "/user/getLoginCodeNumber",
 			method: "get",
 			params: { userName: userName },
-		})
+		});
 	},
-	getPhoneCode (loginForm) {
+	getPhoneCode(loginForm) {
 		return request({
-			url: sysPrefix + '/sys/user/getPhoneCode',
-			method: 'get',
-			params: {mobile: loginForm},
-		})
+			url: sysPrefix + "/sys/user/getPhoneCode",
+			method: "get",
+			params: { mobile: loginForm },
+		});
 	},
 	savePwd: function (loginForm) {
 		return request({
-			url:sysPrefix + "/sys/user/saveNewPassword",
-			method:"get",
-			params:{mobile:loginForm.phoneNumber,code:loginForm.phoneCode,newPassword: loginForm.newPassword},
-		})
+			url: sysPrefix + "/sys/user/saveNewPassword",
+			method: "get",
+			params: {
+				mobile: loginForm.phoneNumber,
+				code: loginForm.phoneCode,
+				newPassword: loginForm.newPassword,
+			},
+		});
 	},
 };

+ 14 - 0
src/api/cw/invoice/CwFinanceInvoiceService.js

@@ -197,4 +197,18 @@ export default {
 			params: params,
 		});
 	},
+	updateDictValue(data) {
+		return request({
+			url: prefix + "/cw_finance/invoice/updateDictValue",
+			method: "post",
+			data: data,
+		});
+	},
+	getDingNoticeDictValue(data) {
+		return request({
+			url: prefix + "/cw_finance/invoice/getDingNoticeDictValue",
+			method: "post",
+			data: data,
+		});
+	},
 };

+ 71 - 43
src/api/sys/WorkContractService.js

@@ -1,48 +1,76 @@
-import request from '@/utils/httpRequest'
+import request from "@/utils/httpRequest";
 import { ASSESS_PATH as prefix } from "../AppPath";
 
 export default class WorkContractService {
-  list (param) {
-    return request({
-      url: prefix + '/workContract/workContractInfo/list',
-      method: 'get',
-      params: param
-    })
-  }
-  save (param) {
-    return request({
-      url: prefix + '/workContract/workContractInfo/save',
-      method: 'post',
-      data: param
-    })
-  }
-  remove (url) {
-    return request({
-      url: prefix + '/workContract/workContractInfo/remove',
-      method: 'get',
-      params: {id: url}
-    })
-  }
-  findById (id) {
-    return request({
-      url: prefix + '/workContract/workContractInfo/findById',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  updateStatusById (param) {
-    return request({
-      url: prefix + '/workContract/workContractInfo/updateStatusById',
-      method: 'post',
-      data: param
-    })
-  }
+	list(param) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/list",
+			method: "get",
+			params: param,
+		});
+	}
+	save(param) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/save",
+			method: "post",
+			data: param,
+		});
+	}
+	remove(url) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/remove",
+			method: "get",
+			params: { id: url },
+		});
+	}
+	findById(id) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/findById",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	updateStatusById(param) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/updateStatusById",
+			method: "post",
+			data: param,
+		});
+	}
 
-  checkName(name){
-	  return request({
-		  url: prefix + '/workContract/workContractInfo/checkName',
-		  method: 'get',
-		  params: {name: name}
-	  })
-  }
+	checkName(name) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/checkName",
+			method: "get",
+			params: { name: name },
+		});
+	}
+
+	relationProjectList(params) {
+		return request({
+			url: prefix + "/workContract/workContractInfo/relationProjectList",
+			method: "get",
+			params: params,
+		});
+	}
+
+	updatecancelStatusById(param) {
+		return request({
+			url:
+				prefix +
+				"/workContract/workContractInfo/updatecancelStatusById",
+			method: "post",
+			data: param,
+		});
+	}
+
+	getContractByProgramId(params) {
+		return request({
+			url:
+				prefix +
+				"/workContract/workContractInfo/getContractByProgramId",
+			method: "get",
+			params: params,
+		});
+	}
 }

+ 1 - 1
src/router/index.js

@@ -47,7 +47,7 @@ router.beforeEach(async (to, from, next) => {
 
 	let token = tool.data.get(config.TOKEN);
 
-	if (to.path === "/login") {
+	if (to.path === "/login" || to.path === "/ddlogin") {
 		//删除路由(替换当前layout路由)
 		router.addRoute(routes[0]);
 		//删除路由(404)

+ 37 - 5
src/router/systemRouter.js

@@ -80,10 +80,35 @@ const routes = [
 				component: () => import("@/layout/other/empty.vue"),
 				meta: { target: "iframe" },
 			},
-			{path: '/flowable/task/CenterForm', component: () => import('@/views/flowable/task/CenterForm'), name: 'center-form', meta: {title: '流程详情-其他系统'}},
-			{path: '/generateForm/GenerateForm', component: () => import('@/views/generateForm/GenerateForm.vue'), name: 'generate-form', meta: {title: '流程详情动态页面-其他系统'}},
-			{path: '/generateForm/InvoiceUpdateGenerateForm', component: () => import('@/views/generateForm/InvoiceUpdateGenerateForm.vue'), name: 'invoiceUpdateGenerate-form', meta: {title: '发票流程详情动态页面-其他系统'}},
-			{path: '/generateForm/InvoiceGenerateForm', component: () => import('@/views/generateForm/InvoiceGenerateForm.vue'), name: 'invoiceGenerate-form', meta: {title: '发票流程详情动态页面-其他系统'}},
+			{
+				path: "/flowable/task/CenterForm",
+				component: () => import("@/views/flowable/task/CenterForm"),
+				name: "center-form",
+				meta: { title: "流程详情-其他系统" },
+			},
+			{
+				path: "/generateForm/GenerateForm",
+				component: () =>
+					import("@/views/generateForm/GenerateForm.vue"),
+				name: "generate-form",
+				meta: { title: "流程详情动态页面-其他系统" },
+			},
+			{
+				path: "/generateForm/InvoiceUpdateGenerateForm",
+				component: () =>
+					import(
+						"@/views/generateForm/InvoiceUpdateGenerateForm.vue"
+					),
+				name: "invoiceUpdateGenerate-form",
+				meta: { title: "发票流程详情动态页面-其他系统" },
+			},
+			{
+				path: "/generateForm/InvoiceGenerateForm",
+				component: () =>
+					import("@/views/generateForm/InvoiceGenerateForm.vue"),
+				name: "invoiceGenerate-form",
+				meta: { title: "发票流程详情动态页面-其他系统" },
+			},
 		],
 	},
 	{
@@ -92,7 +117,14 @@ const routes = [
 		meta: {
 			title: "登录",
 		},
-	}
+	},
+	{
+		path: "/ddLogin",
+		component: () => import("@/views/sys/login/ddLogin.vue"),
+		meta: {
+			title: "钉钉免登录",
+		},
+	},
 ];
 
 export default routes;

+ 1 - 0
src/style/app.scss

@@ -36,6 +36,7 @@ a,button,input,textarea{-webkit-tap-highlight-color:rgba(0,0,0,0);box-sizing: bo
   display: flex;
   align-items: center;
   padding-left:20px;
+  overflow: hidden;
   .logo-bar{
     width: 200px;
   }

+ 42 - 34
src/views/cw/invoice/InvoiceFormTask.vue

@@ -13,33 +13,37 @@
 				<el-col :span="24">
 					<vxe-table border :footer-method="footerMethod2" show-overflow show-footer ref="baseTable"
 						:key="baseKey" class="vxe-table-element" :data="inputForm.financeInvoiceBaseDTOList"
-						style="margin-left: 5em" @cell-click="" @edit-closed="" keep-source highlight-current-row
-						:edit-rules="tableRules"
+						:style="{ marginLeft: isMobile ? '0' : '5em' }" @cell-click="" @edit-closed="" keep-source
+						highlight-current-row :edit-rules="tableRules"
 						:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-' }">
 						<vxe-table-column field="programName" align="center" title="项目名称" :edit-render="{}"
-							show-overflow="title">
+							show-overflow="title" :min-width="isMobile ? '200' : ''">
 							<template v-slot:edit="scope">
 								<el-input @focus="openProgramPageForm(scope.$rowIndex)" placeholder="请填写项目名称"
 									:readonly="true" v-model="scope.row.programName" />
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="contractName" align="center" title="合同名称" :edit-render="{}">
+						<vxe-table-column field="contractName" align="center" title="合同名称" :edit-render="{}"
+							:min-width="isMobile ? '200' : ''">
 							<template v-slot:edit="scope">
 								<el-input @focus="openContractForm()" placeholder="请填写合同名称" :readonly="true"
 									v-model="scope.row.contractName" />
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="programNo" align="center" title="项目编号" :edit-render="{}">
+						<vxe-table-column field="programNo" align="center" title="项目编号" :edit-render="{}"
+							:min-width="isMobile ? '200' : ''">
 							<template v-slot:edit="scope">
 								<el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo" />
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="reportNo" align="center" title="报告号" :edit-render="{}">
+						<vxe-table-column field="reportNo" align="center" title="报告号" :edit-render="{}"
+							:min-width="isMobile ? '200' : ''">
 							<template v-slot:edit="scope">
 								<el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.reportNo" />
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="account" align="center" title="发票金额(元)" :edit-render="{}">
+						<vxe-table-column field="account" align="center" title="发票金额(元)" :edit-render="{}"
+							:min-width="isMobile ? '200' : ''">
 							<template v-slot:edit="scope">
 								<el-input v-on:input="scope.row.account = scope.row.account.replace(/[^-0-9.]/g, '')
 									.replace(/^\./g, '')
@@ -49,7 +53,8 @@
 								</el-input>
 							</template>
 						</vxe-table-column>
-						<vxe-table-column field="isPreInvoice" align="center" title="是否预开票" :edit-render="{}">
+						<vxe-table-column field="isPreInvoice" align="center" title="是否预开票" :edit-render="{}"
+							:min-width="isMobile ? '100' : ''">
 							<template #default="scope">
 								{{ $dictUtils.getDictLabel('is_pre_invoice', scope.row.isPreInvoice, '') }}
 							</template>
@@ -64,7 +69,7 @@
 						<!--                <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>-->
 						<!--              </template>-->
 						<!--            </vxe-table-column>-->
-						<vxe-table-column title="操作" align="center" width="100">
+						<vxe-table-column title="操作" align="center" width="100" :min-width="isMobile ? '120' : ''">
 							<template v-slot="scope">
 								<el-button type="danger"
 									@click="removeEvent(scope.row, scope.$rowIndex, 'base')">删除</el-button>
@@ -676,14 +681,16 @@
 					<el-col :span="24">
 						<vxe-table border show-overflow show-footer ref="detailTable" :key="detailKey"
 							class="vxe-table-element" :data="inputForm.financeInvoiceDetailDTOList"
-							style="margin-left: 5em" highlight-current-row
+							:style="{ marginLeft: isMobile ? '0' : '5em' }" highlight-current-row
 							:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, autoClear: true }">
-							<vxe-table-column field="code" title="发票代码" :edit-render="{}">
+							<vxe-table-column field="code" title="发票代码" :edit-render="{}"
+								:min-width="isMobile ? '120' : ''">
 								<template #edit="scope">
 									<el-input :disabled="isDisabled" v-model="scope.row.code" placeholder="请填写发票代码" />
 								</template>
 							</vxe-table-column>
-							<vxe-table-column field="number" title="发票号" :edit-render="{}">
+							<vxe-table-column field="number" title="发票号" :edit-render="{}"
+								:min-width="isMobile ? '200' : ''">
 								<template #edit="scope">
 									<el-input :disabled="isDisabled" oninput="value=value.replace(/\D|^/g,'')"
 										placeholder="请填写发票号" maxlength="20"
@@ -692,7 +699,8 @@
 									</el-input>
 								</template>
 							</vxe-table-column>
-							<vxe-table-column field="account" title="开票金额(元)" :edit-render="{}">
+							<vxe-table-column field="account" title="开票金额(元)" :edit-render="{}"
+								:min-width="isMobile ? '120' : ''">
 								<template #edit="scope">
 									<el-input-number :disabled="isDisabled"
 										@blur="checkAccount(scope.row, scope.$rowIndex)" v-model="scope.row.account"
@@ -701,7 +709,8 @@
 									</el-input-number>
 								</template>
 							</vxe-table-column>
-							<vxe-table-column field="rate" title="税率(%)" :edit-render="{}">
+							<vxe-table-column field="rate" title="税率(%)" :edit-render="{}"
+								:min-width="isMobile ? '120' : ''">
 								<template #edit="scope">
 									<el-input-number :disabled="isDisabled"
 										@blur="checkRate(scope.row, scope.$rowIndex)" v-model="scope.row.rate"
@@ -710,19 +719,22 @@
 									</el-input-number>
 								</template>
 							</vxe-table-column>
-							<vxe-table-column field="amount" title="金额" :edit-render="{}">
+							<vxe-table-column field="amount" title="金额" :edit-render="{}"
+								:min-width="isMobile ? '120' : ''">
 								<template #edit="scope">
 									<el-input :disabled="isDisabled" :readonly="true" v-model="scope.row.amount"
 										placeholder="请填写金额" />
 								</template>
 							</vxe-table-column>
-							<vxe-table-column field="tax" title="税额" :edit-render="{}">
+							<vxe-table-column field="tax" title="税额" :edit-render="{}"
+								:min-width="isMobile ? '120' : ''">
 								<template #edit="scope">
 									<el-input :disabled="isDisabled" :readonly="true" v-model="scope.row.tax"
 										placeholder="请填写税额" />
 								</template>
 							</vxe-table-column>
-							<vxe-table-column field="allAmount" title="累计登记金额" :edit-render="{}">
+							<vxe-table-column field="allAmount" title="累计登记金额" :edit-render="{}"
+								:min-width="isMobile ? '120' : ''">
 								<template #edit="scope">
 									<el-input-number :disabled="isDisabled" v-model="scope.row.allAmount"
 										controls-position="right" :controls="false" style="width:100%;" :precision="2"
@@ -730,7 +742,7 @@
 									</el-input-number>
 								</template>
 							</vxe-table-column>
-							<vxe-table-column title="操作" width="100">
+							<vxe-table-column title="操作" width="100" :min-width="isMobile ? '120' : ''">
 								<template v-slot="scope">
 									<el-button :disabled="isDisabled" type="danger"
 										@click="removeEvent(scope.row, scope.$rowIndex, 'detail')">删除</el-button>
@@ -967,12 +979,15 @@ export default {
 			userEmail: '',
 			userPhone: '',
 			isPreInvoice: '',
-			isDisabled: false
+			isDisabled: false,
+			isMobile: false,
 		}
 	},
 	commonApi: null,
 	created() {
 		this.commonApi = new CommonApi()
+		this.judgmentMobile()
+		window.addEventListener('resize', this.judgmentMobile)
 	},
 	mounted() {
 	},
@@ -1022,6 +1037,14 @@ export default {
 		}
 	},
 	methods: {
+		// 是否是移动端,宽度判断
+		judgmentMobile() {
+			if (window.innerWidth <= 768) {
+				this.isMobile = true
+			} else {
+				this.isMobile = false
+			}
+		},
 		getKeyWatch(keyWatch) {
 			this.keyWatch = keyWatch
 		},
@@ -1593,21 +1616,6 @@ export default {
 								this.inputForm.title = `${this.$store.state.user.name} 发起了 ${data.no} [财务-发票申请]`
 							}
 						}
-						// // 请求开票接口
-						// if (this.inputForm.status === '12') {
-						// 	// 区分红票,蓝票
-						// 	if (this.inputForm.redInvoiceFlag === '1') {
-						// 		let params = {
-						// 			originalInvno: this.inputForm.invoiceNumberStr,
-						// 			workInvoiceId: this.inputForm.id,
-						// 			redInvoiceRelevancyId: this.inputForm.redInvoiceRelevancyId
-						// 		}
-						// 		financeInvoiceService.invoiceAllScenarioRedOMSView(params)
-						// 	}
-						// 	if (this.inputForm.redInvoiceFlag === '0') {
-						// 		financeInvoiceService.invoiceOMSView(this.inputForm.id)
-						// 	}
-						// }
 
 						this.inputForm.id = data.businessId
 						callback(data.businessTable, data.businessId, this.inputForm, data.recordType)

Fichier diff supprimé car celui-ci est trop grand
+ 1195 - 1133
src/views/cw/invoice/InvoiceList.vue


Fichier diff supprimé car celui-ci est trop grand
+ 1819 - 1760
src/views/finance/invoice/InvoiceFormTask.vue


Fichier diff supprimé car celui-ci est trop grand
+ 990 - 935
src/views/finance/invoice/InvoiceList.vue


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

@@ -1734,7 +1734,7 @@ export default {
 	flex-flow: row nowrap;
 	justify-content: center;
 	align-items: center;
-	left: 275px;
+	left: 0;
 	display: flex;
 	-webkit-transition: inline-block 0.3s, left 0.3s, width 0.3s,
 		margin-left 0.3s, font-size 0.3s;

Fichier diff supprimé car celui-ci est trop grand
+ 1005 - 960
src/views/program/registered/ProjectArchiveForm.vue


Fichier diff supprimé car celui-ci est trop grand
+ 1986 - 1963
src/views/program/registered/ProjectList.vue


+ 556 - 0
src/views/sys/login/ddLogin.vue

@@ -0,0 +1,556 @@
+<template>
+	<div class="dd-login-page">
+		<div class="dd-login-bg dd-login-bg-left"></div>
+		<div class="dd-login-bg dd-login-bg-right"></div>
+
+		<div class="dd-login-panel">
+			<div class="dd-login-brand">
+				<div class="dd-login-logo">
+					<img alt="logo" src="/img/logo.svg" />
+				</div>
+				<div class="dd-login-brand-text">
+					<h1>{{ isRebackMode ? "审批处理结果" : "钉钉快捷登录" }}</h1>
+					<p>{{ isRebackMode ? "当前审批流程已处理完成" : "正在进入系统,请稍候" }}</p>
+				</div>
+			</div>
+
+			<div class="dd-login-card" :class="{ 'dd-login-card-success': isRebackMode }">
+				<div class="dd-login-icon" :class="{ 'is-success': isRebackMode }">
+					<div class="dd-login-icon-ring"></div>
+					<div class="dd-login-icon-core">{{ isRebackMode ? "✓" : "钉" }}</div>
+				</div>
+
+				<div class="dd-login-title">{{ isRebackMode ? "审批已处理" : "企业身份校验中" }}</div>
+				<div class="dd-login-subtitle">
+					{{ isRebackMode ? "流程已完成审批处理,你可以返回钉钉继续后续操作。" : "检测到你正在钉钉中打开系统,这里可以作为免登录跳转中转页。" }}
+				</div>
+
+				<div class="dd-login-status">
+					<div class="dd-login-status-row">
+						<span class="label">{{ isRebackMode ? "审批结果" : "当前状态" }}</span>
+						<span class="value" :class="{ loading: !isRebackMode }" :style="{
+							color: isRebackMode || loginStatus.includes('成功') ? '#52c41a' : '#1890ff'
+						}">{{ loginStatus }}</span>
+					</div>
+				</div>
+			</div>
+
+			<div class="dd-login-footer">
+				安全登录 · 统一认证 · 钉钉快速进入
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+import config from "@/config";
+import loginService from "@/api/auth/loginService";
+import userService from "@/api/sys/userService";
+import tenantService from "@/api/sys/tenantService";
+import financeInvoiceService from '@/api/cw/invoice/CwFinanceInvoiceService'
+import FinanceInvoiceService from '@/api/finance/invoice/FinanceInvoiceService'
+import taskService from '@/api/flowable/TaskService'
+import pick from 'lodash.pick'
+export default {
+	name: "DdLogin",
+	data() {
+		return {
+			loginStatus: "正在校验身份...",
+			isRebackMode: false
+		};
+	},
+	pgFinanceInvoiceService: null,
+	mounted() {
+
+		this.isRebackMode = this.$route.query.reback != false && this.$route.query.reback != "false";
+
+		if (this.isRebackMode) {
+			this.loginStatus = "审批已处理";
+			return;
+		}
+		this.pgFinanceInvoiceService = new FinanceInvoiceService()
+		console.log("DdLogin mounted, starting login process...");
+		this.handleLogin()
+	},
+	methods: {
+		handleLogin() {
+			let nowToken = this.$TOOL.data.get(config.TOKEN);
+			const type = this.$route.query.type;
+
+			//从url的参数获取id,用route获取
+			let ddId = this.$route.query.ddid
+			const infoId = this.$route.query.infoId;
+			if (ddId && infoId) {
+				let params = {
+					ddId: ddId
+				}
+				loginService.ddlogin(params).then(async (res) => {
+					this.$TOOL.data.set(config.TOKEN, res.token);
+					this.$cookies.set(config.TOKEN, res.token, -1);
+					let { user } = await userService.info();
+					this.$TOOL.data.set("USER_INFO", user);
+					this.$store.commit("user/updateUser", user);
+					let isPrimaryTenant = user.tenantDTO.id === "10000";
+					this.$TOOL.data.set(
+						"IS_PRIMARY_TENANT",
+						isPrimaryTenant
+					);
+					if (isPrimaryTenant) {
+						tenantService.list().then((data) => {
+							this.$TOOL.data.set(
+								"TENANT_LIST",
+								data.records
+							);
+						});
+					}
+					let { menuList, permissions, dictList } =
+						await userService.getMenus();
+					if (menuList.length == 0) {
+						this.loading = false;
+						this.$alert(
+							"当前用户无任何菜单权限,请联系系统管理员",
+							"无权限访问",
+							{
+								type: "error",
+								center: true,
+							}
+						);
+						return false;
+					}
+					// 布局
+					this.$store.commit("SET_layout", "left");
+					this.$TOOL.data.set("APP_LAYOUT", "left");
+					this.$TOOL.data.set("MENU", menuList);
+					this.$TOOL.data.set("PERMISSIONS", permissions);
+					this.$TOOL.data.set("DICT_LIST", dictList);
+					this.$dictUtils.refreshDictList();
+
+					this.loginStatus = "身份校验成功,正在跳转...";
+					//从url的参数获取redirect
+					if (type == "cw") {
+						financeInvoiceService
+							.queryById(infoId)
+							.then((data) => {
+								this.todo(data)
+							})
+					}
+					if (type == "pg") {
+						this.pgFinanceInvoiceService.queryById(infoId).then((data) => {
+							this.todo(data)
+						})
+					}
+				})
+					.catch(err => {
+						this.loginStatus = "登录请求失败,请检查网络或稍后再试";
+					});
+			} else {
+				// 跳转登录
+				this.loginStatus = "登录失败,请联系管理员";
+			}
+		},
+		todo(row) {
+			let cUser = false
+			taskService.getTaskDefInfo({
+				taskId: row.invoiceTaskId
+			}).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: '/ddLogin' // 数据处理后需要跳转的页面路径
+					}
+				})
+			})
+
+		},
+	},
+};
+</script>
+
+<style lang="less" scoped>
+.dd-login-page {
+	position: relative;
+	display: flex;
+	align-items: flex-start;
+	justify-content: center;
+	min-height: 100vh;
+	min-height: 100dvh;
+	padding: calc(env(safe-area-inset-top, 0px) + 20px) 14px calc(env(safe-area-inset-bottom, 0px) + 20px);
+	overflow: hidden;
+	background: linear-gradient(180deg, #f2f8ff 0%, #e8f3ff 48%, #f8fbff 100%);
+}
+
+.dd-login-bg {
+	position: absolute;
+	border-radius: 50%;
+	filter: blur(2px);
+	pointer-events: none;
+
+	&.dd-login-bg-left {
+		top: -140px;
+		left: -150px;
+		width: 300px;
+		height: 300px;
+		background: radial-gradient(circle, rgba(24, 144, 255, 0.2) 0%, rgba(24, 144, 255, 0) 70%);
+	}
+
+	&.dd-login-bg-right {
+		right: -160px;
+		bottom: -180px;
+		width: 280px;
+		height: 280px;
+		background: radial-gradient(circle, rgba(64, 169, 255, 0.2) 0%, rgba(64, 169, 255, 0) 72%);
+	}
+}
+
+.dd-login-panel {
+	position: relative;
+	width: 100%;
+	max-width: 420px;
+	display: grid;
+	grid-template-columns: 1fr;
+	gap: 16px;
+	align-items: stretch;
+	z-index: 1;
+}
+
+.dd-login-brand {
+	padding: 4px 4px 0;
+	text-align: center;
+
+	.dd-login-logo {
+		width: 56px;
+		height: 56px;
+		margin: 0 auto 14px;
+		padding: 10px;
+		border-radius: 16px;
+		background: rgba(255, 255, 255, 0.72);
+		box-shadow: 0 12px 28px rgba(24, 144, 255, 0.1);
+		backdrop-filter: blur(10px);
+
+		img {
+			width: 100%;
+			height: 100%;
+			object-fit: contain;
+		}
+	}
+
+	.dd-login-brand-text {
+		h1 {
+			margin: 0 0 8px;
+			color: #1f2d3d;
+			font-size: 24px;
+			font-weight: 700;
+			line-height: 1.35;
+		}
+
+		p {
+			margin: 0;
+			max-width: 100%;
+			color: #5f6b7a;
+			font-size: 13px;
+			line-height: 1.7;
+		}
+	}
+}
+
+.dd-login-card {
+	position: relative;
+	padding: 24px 18px 20px;
+	border: 1px solid rgba(24, 144, 255, 0.12);
+	border-radius: 22px;
+	background: rgba(255, 255, 255, 0.88);
+	box-shadow: 0 16px 40px rgba(31, 45, 61, 0.1);
+	backdrop-filter: blur(14px);
+	margin-top: 10%;
+}
+
+.dd-login-card-success {
+	border-color: rgba(82, 196, 26, 0.18);
+	background: rgba(255, 255, 255, 0.92);
+	box-shadow: 0 18px 42px rgba(63, 140, 40, 0.12);
+}
+
+.dd-login-icon {
+	position: relative;
+	width: 76px;
+	height: 76px;
+	margin: 0 auto 16px;
+
+	&-ring {
+		position: absolute;
+		inset: 0;
+		border-radius: 50%;
+		background: linear-gradient(135deg, rgba(24, 144, 255, 0.14), rgba(24, 144, 255, 0.02));
+		border: 1px solid rgba(24, 144, 255, 0.2);
+	}
+
+	&-core {
+		position: absolute;
+		left: 50%;
+		top: 50%;
+		transform: translate(-50%, -50%);
+		width: 48px;
+		height: 48px;
+		border-radius: 15px;
+		background: linear-gradient(135deg, #1890ff 0%, #36c3ff 100%);
+		color: #ffffff;
+		font-size: 20px;
+		font-weight: 700;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		box-shadow: 0 14px 28px rgba(24, 144, 255, 0.3);
+	}
+}
+
+.dd-login-icon.is-success {
+	.dd-login-icon-ring {
+		background: linear-gradient(135deg, rgba(82, 196, 26, 0.16), rgba(82, 196, 26, 0.02));
+		border-color: rgba(82, 196, 26, 0.24);
+	}
+
+	.dd-login-icon-core {
+		background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
+		box-shadow: 0 14px 28px rgba(82, 196, 26, 0.28);
+		font-size: 24px;
+	}
+}
+
+.dd-login-title {
+	margin-bottom: 8px;
+	color: #1f2d3d;
+	font-size: 20px;
+	font-weight: 700;
+	text-align: center;
+}
+
+.dd-login-subtitle {
+	margin: 0 auto 18px;
+	max-width: 420px;
+	color: #6b7785;
+	font-size: 13px;
+	line-height: 1.7;
+	text-align: center;
+}
+
+.dd-login-status {
+	padding: 12px 14px;
+	border-radius: 16px;
+	background: #f6fbff;
+	border: 1px solid #e0f0ff;
+}
+
+.dd-login-status-row {
+	display: flex;
+	flex-direction: column;
+	align-items: flex-start;
+	justify-content: flex-start;
+	gap: 12px;
+	padding: 10px 0;
+	font-size: 13px;
+
+	&+.dd-login-status-row {
+		border-top: 1px solid #eaf4ff;
+	}
+
+	.label {
+		color: #7b8794;
+	}
+
+	.value {
+		color: #1f2d3d;
+		font-weight: 600;
+		word-break: break-word;
+
+		&.loading {
+			color: #1890ff;
+		}
+	}
+}
+
+.dd-login-actions {
+	display: flex;
+	flex-direction: column;
+	gap: 12px;
+	margin-top: 18px;
+
+	button {
+		width: 100%;
+		height: 44px;
+		border-radius: 14px;
+		font-size: 14px;
+		font-weight: 600;
+		cursor: pointer;
+		transition: all 0.2s ease;
+		-webkit-tap-highlight-color: transparent;
+	}
+
+	.primary-btn {
+		border: none;
+		background: linear-gradient(135deg, #1890ff 0%, #36c3ff 100%);
+		color: #ffffff;
+		box-shadow: 0 12px 24px rgba(24, 144, 255, 0.24);
+	}
+
+	.ghost-btn {
+		border: 1px solid #cfe7ff;
+		background: #ffffff;
+		color: #1890ff;
+	}
+}
+
+.dd-login-tips {
+	margin-top: 16px;
+	padding-top: 14px;
+	border-top: 1px dashed #d9ecff;
+}
+
+.tip-item {
+	display: flex;
+	align-items: flex-start;
+	gap: 8px;
+	color: #73808f;
+	font-size: 12px;
+	line-height: 1.7;
+
+	&+.tip-item {
+		margin-top: 8px;
+	}
+
+	.dot {
+		width: 6px;
+		height: 6px;
+		margin-top: 8px;
+		border-radius: 50%;
+		background: #36a3ff;
+		flex-shrink: 0;
+	}
+}
+
+.dd-login-footer {
+	margin-top: 2px;
+	color: #8d99a8;
+	font-size: 12px;
+	text-align: center;
+	line-height: 1.6;
+}
+
+@media (min-width: 768px) {
+	.dd-login-panel {
+		max-width: 960px;
+		grid-template-columns: 1.05fr 0.95fr;
+		gap: 28px;
+		align-items: center;
+	}
+
+	.dd-login-brand {
+		padding: 20px 12px;
+		text-align: left;
+
+		.dd-login-logo {
+			width: 72px;
+			height: 72px;
+			margin: 0 0 24px;
+			padding: 14px;
+			border-radius: 20px;
+		}
+
+		.dd-login-brand-text h1 {
+			margin-bottom: 14px;
+			font-size: 38px;
+		}
+
+		.dd-login-brand-text p {
+			max-width: 460px;
+			margin: 0;
+			font-size: 16px;
+		}
+	}
+
+	.dd-login-page {
+		align-items: center;
+		padding: 32px;
+	}
+
+	.dd-login-bg {
+		&.dd-login-bg-left {
+			top: -180px;
+			left: -120px;
+			width: 420px;
+			height: 420px;
+		}
+
+		&.dd-login-bg-right {
+			right: -160px;
+			bottom: -220px;
+			width: 460px;
+			height: 460px;
+		}
+	}
+
+	.dd-login-card {
+		padding: 36px 32px 28px;
+		border-radius: 28px;
+	}
+
+	.dd-login-icon {
+		width: 92px;
+		height: 92px;
+		margin-bottom: 20px;
+	}
+
+	.dd-login-actions {
+		flex-direction: row;
+		margin-top: 24px;
+
+		button {
+			width: auto;
+			flex: 1;
+			height: 46px;
+			font-size: 15px;
+		}
+	}
+
+	.dd-login-status-row {
+		flex-direction: row;
+		align-items: center;
+		justify-content: space-between;
+		font-size: 14px;
+	}
+
+	.dd-login-title {
+		font-size: 24px;
+	}
+
+	.dd-login-subtitle {
+		margin-bottom: 24px;
+		font-size: 14px;
+	}
+
+	.dd-login-footer {
+		margin-top: 18px;
+		font-size: 13px;
+	}
+}
+
+@media (max-width: 480px) {
+	.dd-login-status-row {
+		gap: 6px;
+	}
+
+	.dd-login-card {
+		padding-left: 16px;
+		padding-right: 16px;
+	}
+
+	.dd-login-brand .dd-login-brand-text h1 {
+		font-size: 22px;
+	}
+}
+</style>

+ 768 - 0
src/views/workContract/WorkContractCancelForm.vue

@@ -0,0 +1,768 @@
+<template>
+	<div>
+		<el-form size="large" :model="inputForm" ref="inputForm" v-loading="loading"
+			:class="method === 'view' ? 'readonly' : ''" :disabled="status === 'audit' || status === 'taskFormDetail'"
+			label-width="150px">
+			<el-row :gutter="0">
+				<el-col :span="12">
+					<el-form-item label="客户名称" prop="clientId" :rules="[
+						{ required: true, message: '请输入客户名称', trigger: 'blur' },
+						{ required: true, message: '请输入客户名称', trigger: 'change' }
+					]">
+						<work-client-select size="large" :value="inputForm.clientId" :disabled="true"
+							@getValue='(clientId, clientName) => { inputForm.clientId = clientId; inputForm.clientName = clientName }'>
+						</work-client-select>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="合同名称" prop="name" :rules="[
+						{ required: true, message: '请输入合同名称', trigger: 'blur' }
+					]">
+						<el-input maxlength="64" v-model="inputForm.name" placeholder="请输入合同名称" :disabled="true"
+							@change="checkName"></el-input>
+					</el-form-item>
+				</el-col>
+
+			</el-row>
+
+			<el-row :gutter="0">
+
+				<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="选择日期" :disabled="true">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="合同生效日期" prop="effectiveDate">
+						<el-date-picker placement="bottom-start" value-format="YYYY-MM-DD"
+							v-model="inputForm.effectiveDate" style="width: 100%" placeholder="选择日期" :disabled="true">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="合同终止日期" prop="closingDate">
+						<el-date-picker @change="checkData" placement="bottom-start" value-format="YYYY-MM-DD"
+							v-model="inputForm.closingDate" style="width: 100%" placeholder="选择日期" :disabled="true">
+						</el-date-picker>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="合同类型" prop="contractType" :rules="[
+						{ required: true, message: '请选择合同类型', trigger: 'blur' }
+					]">
+						<el-select v-model="inputForm.contractType" placeholder="请选择" style="width:100%;"
+							:disabled="true">
+							<el-option v-for="item in $dictUtils.getDictList('contract_type')" :key="item.value"
+								:label="item.label" :value="item.value">
+							</el-option>
+						</el-select>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="合同金额类别" prop="contractAmountType" :rules="[
+						{ required: true, message: '请选择合同金额类别', trigger: 'blur' }
+					]">
+						<el-radio-group v-model="inputForm.contractAmountType" :disabled="true">
+							<el-radio v-for="item in $dictUtils.getDictList('contract_amount_type')"
+								:label="item.value">{{ item.label }}</el-radio>
+						</el-radio-group>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="合同/预计金额(元)" prop="contractAmount" v-if="inputForm.contractAmountType === '1'"
+						:rules="[
+							{ required: true, message: '请输入合同/预计金额(元)', trigger: 'blur' }
+						]">
+						<el-input maxlength="15" v-model="inputForm.contractAmount" placeholder="请输入合同/预计金额(元)"
+							:disabled="true"
+							@keyup.native="inputForm.contractAmount = twoDecimalPlaces(inputForm.contractAmount)"></el-input>
+					</el-form-item>
+				</el-col>
+
+				<el-col :span="12">
+					<el-form-item label="对方合同编号" prop="contractOpposite">
+						<el-input maxlength="64" v-model="inputForm.contractOpposite" :disabled="true"
+							placeholder="请填写对方合同编号"></el-input>
+					</el-form-item>
+				</el-col>
+
+			</el-row>
+
+			<el-row>
+				<el-col :span="24">
+					<el-form-item label="收费标准" prop="contractFees">
+						<el-checkbox-group v-model="inputForm.contractFees">
+							<el-checkbox
+								@change="changeContractFee(item.value, $dictUtils.getDictList('contract_fee_pg'))"
+								:disabled="true" v-for="item in $dictUtils.getDictList('contract_fee_pg')"
+								:label="item.value">
+								{{ item.label }}
+							</el-checkbox>
+						</el-checkbox-group>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+			<el-row>
+				<el-col :span="24">
+					<el-form-item prop="contractFee">
+						<el-input style="width: 100%" placeholder="请选择收费标准" v-model="inputForm.contractFee"
+							:disabled="true"></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+
+			<el-row></el-row>
+
+			<el-form-item label="备注" prop="remarks">
+				<el-input v-model="inputForm.remarks" type="textarea" :rows="5" maxlength="500" placeholder="请输入合同备注"
+					:disabled="true" show-word-limit>
+				</el-input>
+			</el-form-item>
+			<el-divider content-position="left"><i class="el-icon-document"></i></el-divider>
+			<el-row :gutter="15">
+				<el-col :span="24">
+					<el-form-item label="原因" prop="reason" :rules="[{ required: true, message: '原因不能为空', trigger: 'blur' }
+					]">
+						<el-input :disabled="status === 'audit' || status === 'taskFormDetail'" type="textarea"
+							v-model="inputForm.reason" maxlength="500" placeholder="请输入原因" show-word-limit></el-input>
+					</el-form-item>
+				</el-col>
+			</el-row>
+		</el-form>
+		<!--      <el-image-viewer-->
+		<!--        v-if="showViewer"-->
+		<!--        :on-close="closeViewer"-->
+		<!--        :url-list="[url]"-->
+		<!--        zIndex="9999"/>-->
+		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
+	</div>
+</template>
+
+<script>
+import UpLoadComponent from '@/views/common/UpLoadComponent'
+import WorkContractService from '@/api/sys/WorkContractService'
+import WorkClientService from '@/api/sys/WorkClientService'
+import WorkClientSelect from '@/components/workClientInfoSelect'
+import OSSSerive, {
+	httpRequest,
+	toHref,
+	openWindowOnUrl,
+	handleRemove,
+	fileName
+} from '@/api/sys/OSSService'
+import moment from 'moment'
+import { shallowRef } from 'vue'
+// 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,
+			returnForm: {
+				clientId: '',
+				name: '',
+				contractDate: '',
+				effectiveDate: '',
+				closingDate: '',
+				contractType: '',
+				contractAmountType: '',
+				contractAmount: '',
+				contractOpposite: '',
+				contractFees: [],
+				fees: '',
+				contractFee: '',
+				describes: '',
+				contractSpecial: '',
+				remarks: '',
+				clientName: '',
+				workAttachmentList: [],
+				status: ''
+			},
+			inputForm: {
+				cancelId: '',
+				clientId: '',
+				name: '',
+				contractDate: '',
+				effectiveDate: '',
+				closingDate: '',
+				contractType: '',
+				contractAmountType: '',
+				contractAmount: '',
+				contractOpposite: '',
+				contractFees: [],
+				fees: '',
+				contractFee: '',
+				describes: '',
+				contractSpecial: '',
+				remarks: '',
+				clientName: '',
+				permissionFlag: '',
+				showVi: true,
+				workAttachmentList: [],
+				status: '',
+				reason: '',
+				cancelType: '',
+				cancelStatus: ''
+			},
+			filesArra2: [],
+			fileList: [],
+			isFlag: true,
+			showViewer: false, // 显示查看器
+			url: '',
+			rowurl: '',
+			src: '',
+			onedit: false,
+			type: '',
+			loadProgress: 0, // 动态显示进度条
+			progressFlag: false, // 关闭进度条
+			promi: null
+		}
+	},
+	props: {
+		businessId: {
+			type: String,
+			default: ''
+		},
+		formReadOnly: {
+			type: Boolean,
+			default: false
+		},
+		status: {
+			type: String,
+			default: ''
+		}
+	},
+	components: {
+		// ElImageViewer,
+		// UpLoadComponent: shallowRef(UpLoadComponent),
+		// WorkClientSelect: shallowRef(WorkClientSelect),
+		UpLoadComponent,
+		WorkClientSelect
+	},
+	ossService: null,
+	workContractService: null,
+	workClientService: null,
+	created() {
+		this.ossService = new OSSSerive()
+		this.workContractService = new WorkContractService()
+		this.workClientService = new WorkClientService()
+	},
+	mounted() {
+		window.onPreview = this.onPreview
+	},
+	watch: {
+		'businessId': {
+			handler(newVal) {
+				if (this.businessId && this.businessId !== 'false') {
+					this.ossService = new OSSSerive()
+					this.init('edit', this.businessId)
+				} else {
+					// this.$refs.inputForm.resetFields()
+					// this.visible = false
+					// this.showVi = true
+					// this.$refs.uploadComponent.clearUpload()
+					this.init('clean', '')
+				}
+			},
+			immediate: true,
+			deep: false
+		},
+		'loading': {
+			handler(newVal) {
+				this.$emit('changeLoading', newVal)
+				this.$refs.uploadComponent.changeLoading(newVal)
+			}
+		}
+	},
+	methods: {
+		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
+			this.inputForm = {
+				cancelId: '',
+				clientId: '',
+				name: '',
+				contractDate: '',
+				effectiveDate: '',
+				closingDate: '',
+				contractType: '',
+				contractAmountType: '',
+				contractAmount: '',
+				contractOpposite: '',
+				contractFees: [],
+				fees: '',
+				contractFee: '',
+				describes: '',
+				contractSpecial: '',
+				remarks: '',
+				clientName: '',
+				filesArra2: [],
+				fileList: [],
+				isFlag: true,
+				showViewer: false, // 显示查看器
+				url: '',
+				rowurl: '',
+				src: '',
+				showVi: true,
+				workAttachmentList: [],
+				status: '',
+				reason: '',
+				cancelType: '',
+				cancelStatus: ''
+			}
+			this.inputForm.id = id
+			if (method === 'add') {
+				// this.inputForm.contractAmountType = '1'
+				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()
+				if (method === 'edit' || method === 'view') { // 修改或者查看
+					this.loading = true
+					this.workContractService.findById(this.inputForm.id).then((data) => {
+						this.inputForm = this.recover(this.inputForm, data)
+						if (!this.inputForm.cancelType || this.inputForm.cancelType === null && this.inputForm.cancelType !== undefined && this.inputForm.cancelType !== '') {
+							this.inputForm.cancelType = "0"
+						}
+						const f = []
+						if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
+							data.fees.split(',').forEach(item => {
+								if (item !== null && item !== undefined && item !== '') {
+									f.push(item)
+								}
+							})
+						}
+						this.inputForm.contractFees = f
+						if (this.status === 'audit' || this.status === 'taskFormDetail') {
+							this.method = 'view'
+						}
+						this.$refs.uploadComponent.newUpload("view", this.inputForm.workAttachmentList, 'workContract', 300, '合同文本、补充协议')
+						this.loading = false
+					})
+				}
+			})
+		},
+		reapplyForm(callback) {
+
+			this.loading = true
+			this.workContractService.findById(this.inputForm.id).then((data) => {
+				if (data.cancelStatus !== '4') { // 审核状态不是“驳回”,就弹出提示
+					this.loading = false
+					this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+					throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+				} else {
+					this.startFormTrue(callback)
+				}
+			})
+		},
+		saveForm(callback) {
+			this.doSubmit('save', callback)
+		},
+		startForm(callback) {
+			this.loading = true
+			if (this.commonJS.isNotEmpty(this.inputForm.id)) {
+				this.workContractService.findById(this.inputForm.id).then((data) => {
+
+					if (this.inputForm.cancelType == "0" && this.inputForm.cancelStatus == "5") {
+						this.startFormTrue(callback)
+
+					} else {
+						if (this.commonJS.isNotEmpty(data.cancelStatus) && data.cancelStatus !== '0' && data.cancelStatus !== '1' && data.cancelStatus !== '3') { // 审核状态不是“未发起”或“暂存”或“撤回”,就弹出提示
+							this.loading = false
+							this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在1')
+							throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在1')
+						} else {
+							this.startFormTrue(callback)
+						}
+					}
+
+				})
+			} else {
+				this.startFormTrue(callback)
+			}
+		},
+		startFormTrue(callback) {
+			this.doSubmit('start', callback)
+		},
+		agreeForm(callback) {
+			this.doSubmit('agree', callback)
+		},
+		// 表单提交
+		doSubmit(status, callback) {
+			this.loading = true
+
+			if (this.inputForm.cancelStatus == '5') {
+				this.inputForm.cancelType = '1'
+			}
+			if (status === 'save') {
+				// 暂存
+				this.inputForm.cancelStatus = '1'
+				this.loading = true
+				let params = {
+					id: this.inputForm.cancelId,
+					contractInfoId: this.inputForm.id,
+					type: this.inputForm.cancelType,
+					status: this.inputForm.cancelStatus,
+					reason: this.inputForm.reason
+				}
+				this.workContractService.updatecancelStatusById(params).then((data) => {
+					callback(data.businessTable, data.businessId, this.inputForm)
+					this.loading = false
+				}).catch(() => {
+					this.loading = false
+				})
+				return
+			} else if (status === 'start') {
+				// 发起恢复
+				if (this.inputForm.cancelType == "1") {
+					if (this.inputForm.cancelStatus == "0" || this.inputForm.cancelStatus == "3") {
+						this.inputForm.cancelStatus = '2'
+						this.inputForm.cancelType = '0'
+					} else {
+						this.inputForm.cancelStatus = '6'
+					}
+				} else {
+					// 作废
+					this.inputForm.cancelStatus = '2'
+				}
+				if (this.inputForm.cancelType == "" || this.inputForm.cancelType == null || this.inputForm.cancelType == undefined) {
+					this.inputForm.cancelType = "0"
+				}
+			} else if (status === 'agree') {
+				// 恢复
+				if (this.inputForm.cancelType == "1") {
+					this.inputForm.cancelStatus = '0'
+				} else {
+					// 作废
+					this.inputForm.cancelStatus = '5'
+				}
+				// 审核同意
+				if (this.inputForm.cancelType == "" || this.inputForm.cancelType == null || this.inputForm.cancelType == undefined) {
+					this.inputForm.cancelType = "0"
+				}
+			}
+			this.$refs['inputForm'].validate((valid) => {
+				if (valid) {
+					this.loading = true
+					let params = {
+						id: this.inputForm.cancelId,
+						contractInfoId: this.inputForm.id,
+						type: this.inputForm.cancelType,
+						status: this.inputForm.cancelStatus,
+						reason: this.inputForm.reason
+					}
+					this.workContractService.updatecancelStatusById(params).then((data) => {
+						callback(data.businessTable, data.businessId, this.inputForm)
+						this.loading = false
+					}).catch(() => {
+						this.loading = false
+					})
+				} else {
+					this.loading = false
+				}
+			})
+		},
+		close() {
+			this.$refs.inputForm.resetFields()
+			this.inputForm.clientName = ''
+			this.visible = false
+			this.showVi = true
+			this.$refs.uploadComponent.clearUpload()
+		},
+		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.createDate = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+				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;'
+		},
+		async rowClick(event) {
+			let id = this.gridData[event.rowIndex].id
+			this.inputForm.clientId = id
+			await this.workClientService.findById(id).then((data) => {
+				this.inputForm.clientName = data.workClientInfo.name
+			})
+			this.visable = false
+		},
+		async getPopTable() {
+			let name = this.inputForm.clientName
+			await this.workClientService.list(name).then((data) => {
+				this.gridData = data.records
+			})
+			this.$refs.pops.updatePopper()
+		},
+		closePop() {
+			this.visable = false
+		},
+		changeContractFee(val, items) {
+			let fee = ''
+			let fees = this.inputForm.contractFees
+			if (fees.length > 0) {
+				fees.forEach(i => {
+					items.forEach(item => {
+						if (i === item.value) {
+							var label = item.label
+							fee = fee + ';' + label
+						}
+					}
+					)
+					this.inputForm.contractFee = fee.substring(1, fee.length)
+				})
+			} else {
+				this.inputForm.contractFee = ''
+			}
+		},
+		async updateStatusById(type, callback) {
+			this.loading = true
+
+			if (type === 'reject' || type === 'reback') {
+				this.workContractService.findById(this.inputForm.id).then((data) => {
+					if (data.cancelStatus !== '2' && data.cancelStatus !== '6') { // status的值不等于“审核中”或“驳回”,就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						if (type === 'reject') {
+							// 驳回
+							if (data.cancelType == '1' && data.cancelStatus == '6') {
+								this.inputForm.cancelStatus = '5'
+								this.inputForm.cancelType = '0'
+							}
+							if (data.cancelType == '0' && data.cancelStatus == '2') {
+								this.inputForm.cancelStatus = '0'
+								this.inputForm.cancelType = '1'
+							}
+						}
+						if (type === 'reback') {
+							// 撤回
+							this.inputForm.cancelStatus = '3'
+						}
+						if (type === 'reject' || type === 'reback') {
+							let param = {
+								id: data.cancelId,
+								status: this.inputForm.cancelStatus,
+								contractInfoId: data.id,
+								type: this.inputForm.cancelType
+							}
+							this.workContractService.updatecancelStatusById(param).then(() => {
+								this.loading = false
+								callback()
+							})
+						}
+					}
+				})
+			} else if (type === 'hold') {
+				this.programProjectListInfoService.queryById(this.inputForm.id).then((data) => {
+					if (data.cancelStatus !== '4') { // status的值不等于“驳回”就弹出提示
+						this.loading = false
+						this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+						throw new Error()
+					} else {
+						// 终止
+						let param = {
+							id: this.inputForm.cancelId,
+							cancelStatus: '1',
+							contractInfoId: this.inputForm.id,
+							type: this.inputForm.cancelType
+						}
+						this.workContractService.updatecancelStatusById(param).then(() => {
+							this.loading = false
+							callback()
+						})
+					}
+				})
+			}
+		},
+		checkData() {
+			let begin = this.inputForm.effectiveDate
+			let close = this.inputForm.closingDate
+			if (close < begin) {
+				this.$message.warning(`合同终止日期要大于合同开始日期`)
+				this.inputForm.closingDate = ''
+			}
+		},
+		checkName() {
+			console.log('data', this.inputForm.name)
+			this.workContractService.checkName(this.inputForm.name).then((data) => {
+				if (data === true) {
+					this.loading = false
+					this.$message.error('合同名称已存在,请重新输入')
+					this.inputForm.name = ''
+					throw new Error()
+				}
+			})
+		}
+	}
+}
+</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>

Fichier diff supprimé car celui-ci est trop grand
+ 1251 - 991
src/views/workContract/WorkContractList.vue