瀏覽代碼

签字注师添加可签章次数

huangguoce 3 天之前
父節點
當前提交
923ca2f890

+ 6 - 19
src/views/cw/reportManagement/ReportManagementForm.vue

@@ -1306,25 +1306,12 @@ export default {
               this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
               this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
               this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
-              //根据签字注师1的人员id去查是否超过了100次
-              userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
-                if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
-                  if (data.name === '王真' && data.accountantUserCount <= 120) {
 
-                    this.reportReviewService.save(this.inputForm).then(() => {
-                      projectReportService.saveForm(this.inputForm).then(() => {
-                        this.$emit('refreshList')
-                        this.close()
-                        this.loading = false
-                      }).catch(() => {
-                        this.loading = false
-                      })
-                    })
-                  } else {
-                    this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-                    this.loading = false
-                    throw new Error()
-                  }
+              //根据签字注师1的人员id去查是否超过了可选次数
+              userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
+                if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
+                  this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
+                  this.loading = false
                 } else {
                   this.reportReviewService.save(this.inputForm).then(() => {
                     projectReportService.saveForm(this.inputForm).then(() => {
@@ -1336,7 +1323,7 @@ export default {
                     })
                   })
                 }
-              });
+              })
             }
           })
           return

File diff suppressed because it is too large
+ 1213 - 1296
src/views/cw/reportManagement/ReportManagementSignatureForm.vue


+ 11 - 56
src/views/cw/reportManagement/ReportReviewTakeNumberForm.vue

@@ -214,7 +214,7 @@
 								</el-select>
 							</el-form-item>
 						</el-col>
-<!--						<el-col :span="12" v-if="inputForm.reportType === '1'">
+						<!--						<el-col :span="12" v-if="inputForm.reportType === '1'">
 							<el-form-item label="审定金额(不含税/元)" prop="approvedNoIncludingTax" :rules="[
 
 							]">
@@ -1120,33 +1120,11 @@ export default {
 				this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
 				this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
 				this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
-				//根据签字注师1的人员id去查是否超过了100次
-				userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
-					if (data.name === '庞广新' && data.accountantUserCount >= 99) {
-						this.$message.error(`庞广新签字注师被选次数不可超过99次`)
+				//根据签字注师1的人员id去查是否超过了可选次数
+				userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
+					if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
+						this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
 						this.loading = false
-						return
-					}
-
-					if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
-						if (data.name === '王真' && data.accountantUserCount <= 120) {
-
-							this.ReportNumberApplyService.save(this.inputForm).then((data) => {
-								this.inputForm.cwFileInfoList3 = this.$refs.enclosure.getDataList()
-								projectReportService.saveForm2(this.inputForm).then((da) => {
-									callback(data.businessTable, data.businessId, this.inputForm)
-									this.loading = false
-								}).catch(() => {
-									this.loading = false
-								})
-							}).catch(() => {
-								this.loading = false
-							})
-						} else {
-							this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-							this.loading = false
-							throw new Error()
-						}
 					} else {
 						this.ReportNumberApplyService.save(this.inputForm).then((data) => {
 							this.inputForm.cwFileInfoList3 = this.$refs.enclosure.getDataList()
@@ -1160,7 +1138,7 @@ export default {
 							this.loading = false
 						})
 					}
-				});
+				})
 				return
 			} else if (status === 'start') {
 				if (this.visible === false) {
@@ -1202,34 +1180,11 @@ export default {
 							this.loading = false
 						})
 					} else {
-						//根据签字注师1的人员id去查是否超过了100次
-						userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
-
-							if (data.name === '庞广新' && data.accountantUserCount >= 99) {
-								this.$message.error(`庞广新签字注师被选次数不可超过99次`)
+						//根据签字注师1的人员id去查是否超过了可选次数
+						userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
+							if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
+								this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
 								this.loading = false
-								return
-							}
-							if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
-								if (data.name === '王真' && data.accountantUserCount <= 120) {
-
-									this.ReportNumberApplyService.save(this.inputForm).then((data) => {
-										this.inputForm.cwFileInfoList3 = this.$refs.enclosure.getDataList()
-										console.log('this.inputForm', this.inputForm)
-										projectReportService.saveForm2(this.inputForm).then((da) => {
-											callback(data.businessTable, data.businessId, this.inputForm)
-											this.loading = false
-										}).catch(() => {
-											this.loading = false
-										})
-									}).catch(() => {
-										this.loading = false
-									})
-								} else {
-									this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-									this.loading = false
-									throw new Error()
-								}
 							} else {
 								this.ReportNumberApplyService.save(this.inputForm).then((data) => {
 									this.inputForm.cwFileInfoList3 = this.$refs.enclosure.getDataList()
@@ -1244,7 +1199,7 @@ export default {
 									this.loading = false
 								})
 							}
-						});
+						})
 					}
 				} else {
 					this.loading = false

File diff suppressed because it is too large
+ 838 - 909
src/views/cw/reportManagement/ReportReviewTakeNumberReviewForm.vue


File diff suppressed because it is too large
+ 1006 - 1120
src/views/cw/reportManagement/ReportSignatureForm.vue


+ 78 - 161
src/views/cw/reportManagement/SignatureScribeSignatureCountList.vue

@@ -3,60 +3,40 @@
 		<pane size="20">
 			<el-container class="jp-container">
 				<el-header class="m-p-13-15">
-					<el-input
-						placeholder="请输入关键字过滤"
-						clearable
-						v-model="filterText"
-					>
+					<el-input placeholder="请输入关键字过滤" clearable v-model="filterText">
 					</el-input>
 				</el-header>
 				<el-main class="nopadding">
-					<el-tree
-						class="filter-tree"
-						:data="officeTreeData"
-						:props="{
-							value: 'id', // ID字段名
-							label: 'name', // 显示名称
-							children: 'children', // 子级字段名
-						}"
-						node-key="id"
-						default-expand-all
-						:filter-node-method="filterNode"
-						:expand-on-click-node="false"
-						highlight-current
-						@node-click="handleNodeClick"
-						ref="officeTree"
-					>
+					<el-tree class="filter-tree" :data="officeTreeData" :props="{
+						value: 'id', // ID字段名
+						label: 'name', // 显示名称
+						children: 'children', // 子级字段名
+					}" node-key="id" default-expand-all :filter-node-method="filterNode" :expand-on-click-node="false"
+						highlight-current @node-click="handleNodeClick" ref="officeTree">
 						<template #default="{ node, data }">
 							<span class="custom-tree-node el-tree-node__label">
 								<span class="label">
 									<el-icon class="m-r-5">
-										<qiye
-											v-if="data.type === '1'"
-											:style="{
-												color:
-													$TOOL.data.get(
-														'IS_PRIMARY_TENANT'
-													) &&
-													data.tenantDTO &&
-													$utils.getTenantColorById(
-														data.tenantDTO.id
-													),
-											}"
-										></qiye>
-										<bumen
-											v-else
-											:style="{
-												color:
-													$TOOL.data.get(
-														'IS_PRIMARY_TENANT'
-													) &&
-													data.tenantDTO &&
-													$utils.getTenantColorById(
-														data.tenantDTO.id
-													),
-											}"
-										></bumen>
+										<qiye v-if="data.type === '1'" :style="{
+											color:
+												$TOOL.data.get(
+													'IS_PRIMARY_TENANT'
+												) &&
+												data.tenantDTO &&
+												$utils.getTenantColorById(
+													data.tenantDTO.id
+												),
+										}"></qiye>
+										<bumen v-else :style="{
+											color:
+												$TOOL.data.get(
+													'IS_PRIMARY_TENANT'
+												) &&
+												data.tenantDTO &&
+												$utils.getTenantColorById(
+													data.tenantDTO.id
+												),
+										}"></bumen>
 									</el-icon>
 									{{ node.label }}
 								</span>
@@ -70,78 +50,35 @@
 			<el-container class="jp-container">
 				<el-header v-if="searchVisible">
 					<div class="left-panel">
-						<el-form
-							:inline="true"
-							class="query-form"
-							ref="searchForm"
-							:model="searchForm"
-							@keyup.enter="refreshList()"
-							@submit.prevent
-						>
+						<el-form :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+							@keyup.enter="refreshList()" @submit.prevent>
 							<el-form-item prop="name" label="姓名:">
-								<el-input
-									v-model="searchForm.name"
-									placeholder="请输入姓名"
-									clearable
-								></el-input>
+								<el-input v-model="searchForm.name" placeholder="请输入姓名" clearable></el-input>
 							</el-form-item>
 						</el-form>
 					</div>
 					<div class="right-panel">
-						<el-button
-							type="primary"
-							class="round"
-							@click="refreshList()"
-							icon="search"
-						>
-							查询</el-button
-						>
-						<el-button
-							type="default"
-							@click="resetSearch()"
-							icon="refresh-right"
-							>重置</el-button
-						>
+						<el-button type="primary" class="round" @click="refreshList()" icon="search">
+							查询</el-button>
+						<el-button type="default" @click="resetSearch()" icon="refresh-right">重置</el-button>
 					</div>
 				</el-header>
 				<el-main class="nopadding page2">
 					<div class="jp-table">
-						<vxe-toolbar
-							ref="userToolbar"
-							:refresh="{ query: refreshList }"
-							export
-						>
+						<vxe-toolbar ref="userToolbar" :refresh="{ query: refreshList }" export>
 							<template #tools>
-								<vxe-button
-									type="text"
-									:title="
-										searchVisible ? '收起检索' : '展开检索'
-									"
-									icon="vxe-icon-search"
-									class="tool-btn"
-									@click="searchVisible = !searchVisible"
-								></vxe-button>
+								<vxe-button type="text" :title="searchVisible ? '收起检索' : '展开检索'
+									" icon="vxe-icon-search" class="tool-btn" @click="searchVisible = !searchVisible"></vxe-button>
 							</template>
 						</vxe-toolbar>
 						<div class="jp-table-body">
-							<vxe-table
-								border="inner"
-								auto-resize
-								resizable
-								height="auto"
-								:loading="loading"
-								size="small"
-								ref="userTable"
-								show-header-overflow
-								show-overflow
-								highlight-hover-row
-								:print-config="{}"
-								:import-config="{
+							<vxe-table border="inner" auto-resize resizable height="auto" :loading="loading"
+								size="small" ref="userTable" show-header-overflow show-overflow highlight-hover-row
+								:print-config="{}" :import-config="{
 									importMethod: importMethod,
 									types: ['csv', 'xls', 'xlsx'],
 									remote: true,
-								}"
-								:export-config="{
+								}" :export-config="{
 									remote: true,
 									filename: `用户数据${moment(
 										new Date()
@@ -150,93 +87,68 @@
 									exportMethod: exportMethod,
 									types: ['xlsx'],
 									modes: ['current', 'selected', 'all'],
-								}"
-								@sort-change="sortChangeHandle"
-								:sort-config="{ remote: true }"
-								:data="dataList"
-							>
-								<vxe-table-column
-									v-if="$TOOL.data.get('IS_PRIMARY_TENANT')"
-									width="60"
-								>
+								}" @sort-change="sortChangeHandle" :sort-config="{ remote: true }" :data="dataList">
+								<vxe-table-column v-if="$TOOL.data.get('IS_PRIMARY_TENANT')" width="60">
 									<template #default="{ row }">
-										<el-avatar
-											:size="30"
-											:style="{
-												background:
-													row.tenantDTO &&
-													$utils.getTenantColorById(
-														row.tenantDTO.id
-													),
-											}"
-										>
+										<el-avatar :size="30" :style="{
+											background:
+												row.tenantDTO &&
+												$utils.getTenantColorById(
+													row.tenantDTO.id
+												),
+										}">
 											{{ row.name.substring(0, 1) }}
 										</el-avatar>
 									</template>
 								</vxe-table-column>
-								<vxe-column
-									width="10px"
-								></vxe-column>
+								<vxe-column width="10px"></vxe-column>
 
 								<vxe-column title="姓名" field="name" sortable>
 								</vxe-column>
-								<vxe-column
-									title="部门"
-									sort-by="o.name"
-									field="officeDTO.name"
-								>
+								<vxe-column title="部门" sort-by="o.name" field="officeDTO.name">
 									<template #default="{ row }">
 										{{
 											row.officeDTO && row.officeDTO.name
 										}}
 									</template>
 								</vxe-column>
-
-								<vxe-column title="签章份数" field="accountantUserCount" >
+								<vxe-column title="是否为签字注师2" field="post">
+									<template #default="{ row }">
+										<el-tag v-if="row.post === '签字注师2'" type="success">是</el-tag>
+										<el-tag v-else type="info">否</el-tag>
+									</template>
 								</vxe-column>
-								<vxe-column
-									title="操作"
-									width="200px"
-									fixed="right"
-									align="center"
-								>
+								<vxe-column title="可签章份数" field="signatureCount">
+								</vxe-column>
+								<vxe-column title="签章份数" field="accountantUserCount">
+								</vxe-column>
+								<vxe-column title="操作" width="200px" fixed="right" align="center">
 									<template #default="{ row }">
-										<el-button
-											type="primary"
-											text
-											icon="view-filled"
-											@click="
-												getSignatureScribeList(row.id, row.tenantDTO?.id)
-											"
-										>查看</el-button
-										>
+										<el-button type="primary" text icon="view-filled" @click="
+											getSignatureScribeList(row.id, row.tenantDTO?.id)
+											">查看</el-button>
+										<el-button type="primary" text icon="edit" @click="
+											updateSignatureCount(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="[
+							<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="[
+								]" :layouts="[
 									'PrevPage',
 									'JumpNumber',
 									'NextPage',
 									'FullJump',
 									'Sizes',
 									'Total',
-								]"
-								@page-change="currentChangeHandle"
-							>
+								]" @page-change="currentChangeHandle">
 							</vxe-pager>
 						</div>
 					</div>
@@ -245,6 +157,7 @@
 		</pane>
 	</splitpanes>
 	<user-form ref="userForm" @refreshDataList="refreshList"></user-form>
+	<UpdateSignatureCount ref="updateSignatureCount" @refreshDataList="refreshList"></UpdateSignatureCount>
 	<SignatureScribeForm ref="signatureScribeForm" @getProgram="getProgram"></SignatureScribeForm>
 </template>
 
@@ -256,6 +169,7 @@ import { mapState } from "vuex";
 import userService from "@/api/sys/userService";
 import officeService from "@/api/sys/officeService";
 import SignatureScribeForm from './SignatureScribeForm'
+import UpdateSignatureCount from './UpdateSignatureCount'
 import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
 
 export default {
@@ -286,7 +200,7 @@ export default {
 			loading: false,
 		};
 	},
-	components: { Splitpanes, Pane, UserForm, SignatureScribeForm },
+	components: { Splitpanes, Pane, UserForm, SignatureScribeForm, UpdateSignatureCount },
 	mounted() {
 		this.$nextTick(() => {
 			// 将表格和工具栏进行关联
@@ -316,7 +230,7 @@ export default {
 		refreshList() {
 			this.loading = true;
 			userService
-				.list({
+				.findUserList({
 					current: this.tablePage.currentPage,
 					size: this.tablePage.pageSize,
 					orders: this.tablePage.orders,
@@ -497,6 +411,9 @@ export default {
 			this.$refs.searchForm.resetFields();
 			this.refreshList();
 		},
+		updateSignatureCount(row) {
+			this.$refs.updateSignatureCount.init(row);
+		},
 	},
 };
 </script>

+ 82 - 0
src/views/cw/reportManagement/UpdateSignatureCount.vue

@@ -0,0 +1,82 @@
+<template>
+  <el-dialog title="修改可签章份数" top="30vh" :close-on-click-modal="true" draggable width="400px" height="500px"
+    @close="close" @keyup.enter.native="" v-model="visible">
+    <div style="height: calc(100% - 80px);">
+      <el-form size="small" class="query-form" label-width="100px" ref="inputForm" :model="inputForm"
+        @keyup.enter.native="refreshList()" @submit.native.prevent>
+        <!-- 搜索框-->
+        <el-form-item label="姓名" prop="name">
+          <el-input class="form-input" disabled size="small" v-model="inputForm.name" placeholder="请输入姓名"
+            clearable></el-input>
+        </el-form-item>
+        <el-form-item label="可签章份数" prop="signatureCount"
+          :rules="[{ required: true, message: '请输入可签章份数', trigger: 'blur' }]">
+          <el-input-number class="form-input" v-model="inputForm.signatureCount" :min="1" :max="9999" />
+        </el-form-item>
+      </el-form>
+    </div>
+    <template #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="submit()" icon="el-icon-circle-check"
+        v-noMoreClick>确定</el-button>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import userService from "@/api/sys/userService";
+export default {
+  data() {
+    return {
+      title: '',
+      method: '',
+      visible: false,
+      loading: false,
+      inputForm: {
+        id: '',
+        name: '',
+        signatureCount: ''
+
+      },
+      rowId: ''
+    }
+  },
+  created() {
+  },
+  components: {
+  },
+  methods: {
+    init(row) {
+      this.inputForm = {
+        id: row.id,
+        name: row.name,
+        signatureCount: row.signatureCount
+      }
+      this.visible = true
+    },
+    // 表单提交
+    submit() {
+      userService.updateSignatureCount(this.inputForm).then(res => {
+        this.$message.success('操作成功')
+        this.$emit('refreshDataList', this.inputForm)
+        this.close()
+      })
+    },
+    close() {
+      this.inputForm = {
+        id: '',
+        name: '',
+        signatureCount: ''
+      }
+      this.$refs.inputForm.resetFields()
+      this.visible = false
+    }
+  }
+}
+</script>
+
+<style scoped>
+.form-input {
+  width: 200px;
+}
+</style>

File diff suppressed because it is too large
+ 967 - 1099
src/views/cw/reportManagement/reportReview/ReportReviewForm.vue


+ 11 - 49
src/views/cw/reportManagement/reportReviewNew/ReportReviewFormNew.vue

@@ -1218,27 +1218,11 @@ export default {
         this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
         this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
         this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
-        //根据签字注师1的人员id去查是否超过了100次
-        userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
-          if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
-            if (data.name === '王真' && data.accountantUserCount <= 120) {
-
-              this.reportReviewService.save(this.inputForm).then((data) => {
-                this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
-                projectReportService.saveForm(this.inputForm).then((da) => {
-                  callback(data.businessTable, data.businessId, this.inputForm)
-                  this.loading = false
-                }).catch(() => {
-                  this.loading = false
-                })
-              }).catch(() => {
-                this.loading = false
-              })
-            } else {
-              this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-              this.loading = false
-              throw new Error()
-            }
+        //根据签字注师1的人员id去查是否超过了可选次数
+        userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
+          if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
+            this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
+            this.loading = false
           } else {
             this.reportReviewService.save(this.inputForm).then((data) => {
               this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
@@ -1252,7 +1236,7 @@ export default {
               this.loading = false
             })
           }
-        });
+        })
         return
       } else if (status === 'start') {
         // 送审  待审核
@@ -1330,33 +1314,11 @@ export default {
                 this.loading = false
               })
             } else {
-              //根据签字注师1的人员id去查是否超过了100次
-              userService.getCount(this.inputForm.signatureAnnotator1).then((data) => {
-                if (data.name === '庞广新' && data.accountantUserCount >= 99) {
-                  this.$message.error(`庞广新签字注师被选次数不可超过99次`)
+              //根据签字注师1的人员id去查是否超过了可选次数
+              userService.findCountById(this.inputForm.signatureAnnotator1).then(res => {
+                if (Number(res.accountantUserCount) >= Number(res.signatureCount)) {
+                  this.$message.error(`签字注师1被选次数不可超过可选次数(${res.signatureCount}次)`)
                   this.loading = false
-                  return
-                }
-                if (data.accountantUserCount >= 100 && data.accountantUserFlag === 1) {
-                  if (data.name === '王真' && data.accountantUserCount <= 120) {
-
-                    this.reportReviewService.save(this.inputForm).then((data) => {
-                      this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
-                      console.log('this.inputForm', this.inputForm)
-                      projectReportService.saveForm(this.inputForm).then((da) => {
-                        callback(data.businessTable, data.businessId, this.inputForm)
-                        this.loading = false
-                      }).catch(() => {
-                        this.loading = false
-                      })
-                    }).catch(() => {
-                      this.loading = false
-                    })
-                  } else {
-                    this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-                    this.loading = false
-                    throw new Error()
-                  }
                 } else {
                   this.reportReviewService.save(this.inputForm).then((data) => {
                     this.inputForm.cwFileInfoList2 = this.$refs.enclosure.getDataList()
@@ -1371,7 +1333,7 @@ export default {
                     this.loading = false
                   })
                 }
-              });
+              })
             }
           })
         } else {

+ 24 - 33
src/views/cw/workClientInfo/clientUserSelect/AccountantUserSelectDialog.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-dialog title="用户选择" width="1000px" :close-on-click-modal="false" :append-to-body="true" draggable
+    <el-dialog title="用户选择" width="1200px" :close-on-click-modal="false" :append-to-body="true" draggable
       class="userDialog" v-model="visible">
       <el-container style="height: 500px">
         <el-aside width="200px">
@@ -63,14 +63,14 @@
                   <img :src="scope.row.photo === '' ? '/static/img/avatar.png' : scope.row.photo" style="height:35px" />
                 </template>
               </el-table-column>
-              <el-table-column prop="loginName" header-align="center" align="center" sortable="custom" min-width="90"
-                label="登录名">
+              <el-table-column prop="loginName" header-align="center" align="center" min-width="90" label="登录名">
               </el-table-column>
-              <el-table-column prop="name" header-align="center" align="真实姓名" sortable="custom" min-width="90"
-                label="用户名">
+              <el-table-column prop="name" header-align="center" align="真实姓名" min-width="90" label="用户名">
               </el-table-column>
-              <el-table-column prop="accountantUserCount" header-align="center" align="center" sortable="custom"
-                min-width="110" label="被选次数">
+              <el-table-column prop="signatureCount" header-align="center" align="center" min-width="120" label="可签章份数">
+              </el-table-column>
+              <el-table-column prop="accountantUserCount" header-align="center" align="center" min-width="110"
+                label="被选次数">
 
                 <!--用插槽的方法来改变颜色!-->
                 <template #default="scope">
@@ -82,11 +82,9 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column prop="companyDTO.name" header-align="center" align="center" sortable="custom"
-                min-width="110" label="所属机构">
+              <el-table-column prop="companyDTO.name" header-align="center" align="center" min-width="110" label="所属机构">
               </el-table-column>
-              <el-table-column prop="officeDTO.name" header-align="center" align="center" sortable="custom"
-                min-width="110" label="所属部门">
+              <el-table-column prop="officeDTO.name" header-align="center" align="center" min-width="110" label="所属部门">
               </el-table-column>
               <el-table-column prop="loginFlag" header-align="center" align="center" min-width="100" label="状态">
                 <template #default="scope">
@@ -121,6 +119,8 @@
 </template>
 
 <script>
+import userService from '../../../../api/sys/userService'
+
 export default {
   data() {
     return {
@@ -293,19 +293,6 @@ export default {
           ...this.searchForm
         }
       }).then((data) => {
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-        console.log(data);
-
         this.dataList = data.records
         this.total = data.total
         this.pageNo = data.current
@@ -388,17 +375,21 @@ export default {
         this.$message.error(`你最多只能选择${this.limit}个用户`)
         return
       }
-      if (this.dataListAllSelections[0].accountantUserCount >= 100 && this.dataListAllSelections[0].accountantUserFlag === 1) {
-        if (this.dataListAllSelections[0].name === '王真' && this.dataListAllSelections[0].accountantUserCount <= 120) {
+      // if (this.dataListAllSelections[0].accountantUserCount >= 100 && this.dataListAllSelections[0].accountantUserFlag === 1) {
+      //   if (this.dataListAllSelections[0].name === '王真' && this.dataListAllSelections[0].accountantUserCount <= 120) {
 
-        } else {
-          this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-          return
-        }
-      }
+      //   } else {
+      //     this.$message.error(`请选择被选次数小于100次的签字注师人员`)
+      //     return
+      //   }
+      // }
 
-      if (this.dataListAllSelections[0].name === '庞广新' && this.dataListAllSelections[0].accountantUserCount >= 99) {
-        this.$message.error(`庞广新签字注师被选次数不可超过99次`)
+      // if (this.dataListAllSelections[0].name === '庞广新' && this.dataListAllSelections[0].accountantUserCount >= 99) {
+      //   this.$message.error(`庞广新签字注师被选次数不可超过99次`)
+      //   return
+      // }
+      if (this.dataListAllSelections[0].accountantUserCount >= this.dataListAllSelections[0].signatureCount) {
+        this.$message.error(`被选次数不能超过可签章份数`)
         return
       }
       this.visible = false

+ 97 - 159
src/views/cw/workClientInfo/clientUserSelect/AccountantUserSelectDialog2.vue

@@ -1,38 +1,21 @@
 <template>
   <div>
-    <el-dialog
-      title="用户选择"
-      width="1000px"
-      :close-on-click-modal="false"
-      :append-to-body="true"
-	  draggable
-      class="userDialog"
-      v-model="visible">
+    <el-dialog title="用户选择" width="1000px" :close-on-click-modal="false" :append-to-body="true" draggable
+      class="userDialog" v-model="visible">
       <el-container style="height: 500px">
         <el-aside width="200px">
 
           <el-card class="org">
             <div slot="header" class="clearfix">
-              <el-input
-                placeholder="请输入组织机构过滤"
-                size="small"
-                v-model="filterText">
+              <el-input placeholder="请输入组织机构过滤" size="small" v-model="filterText">
               </el-input>
             </div>
-            <el-tree
-              :data="officeTreeData"
-              :props="{
-                  value: 'id',             // ID字段名
-                  label: 'name',         // 显示名称
-                  children: 'children'    // 子级字段名
-                }"
-              default-expand-all
-              highlight-current
-              node-key="id"
-              :render-content="renderContent"
-              :filter-node-method="filterNode"
-              :expand-on-click-node="false"
-              @node-click="handleNodeClick"
+            <el-tree :data="officeTreeData" :props="{
+              value: 'id',             // ID字段名
+              label: 'name',         // 显示名称
+              children: 'children'    // 子级字段名
+            }" default-expand-all highlight-current node-key="id" :render-content="renderContent"
+              :filter-node-method="filterNode" :expand-on-click-node="false" @node-click="handleNodeClick"
               ref="officeTree">
             </el-tree>
           </el-card>
@@ -40,86 +23,51 @@
 
         <el-container>
           <el-header style="text-align: left; font-size: 12px;height:30px">
-            <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
+            <el-form size="small" :inline="true" ref="searchForm" :model="searchForm"
+              @keyup.enter.native="refreshList()" @submit.native.prevent>
               <el-form-item prop="loginName">
                 <el-input size="small" v-model="searchForm.loginName" placeholder="登录名" clearable></el-input>
               </el-form-item>
 
               <el-form-item>
-                <el-button  type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button type="primary" @click="refreshList()" 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>
           </el-header>
 
           <el-main>
-            <el-table
-              :data="dataList"
-              v-loading="loading"
-              size="small"
-              border
-              ref="userTable"
-              @selection-change="selectionChangeHandle"
-              @sort-change="sortChangeHandle"
-              height="calc(100% - 40px)"
+            <el-table :data="dataList" v-loading="loading" size="small" border ref="userTable"
+              @selection-change="selectionChangeHandle" @sort-change="sortChangeHandle" height="calc(100% - 40px)"
               style="width: 100%;">
-              <el-table-column
-                header-align="center"
-                align="center"
-                v-if="limit <= 1"
-                width="50">
-<!--                <template #default="scope">-->
-<!--                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>-->
-<!--                </template>-->
-				  <template #default="scope">
-					  <el-radio-group v-model="dataListAllSelections[0]" @change.native="getTemplateRow(scope.$index, scope.row)">
-						  <el-radio :label="scope.row">
-							  <template #default="{ label }">
-								  <!-- 将label文本设置为空 -->
-								  <span></span>
-							  </template>
-						  </el-radio>
-					  </el-radio-group>
-				  </template>
+              <el-table-column header-align="center" align="center" v-if="limit <= 1" width="50">
+                <!--                <template #default="scope">-->
+                <!--                  <el-radio :label="scope.row.id" :value="dataListAllSelections[0]&&dataListAllSelections[0].id" @change.native="getTemplateRow(scope.$index,scope.row)"><span></span></el-radio>-->
+                <!--                </template>-->
+                <template #default="scope">
+                  <el-radio-group v-model="dataListAllSelections[0]"
+                    @change.native="getTemplateRow(scope.$index, scope.row)">
+                    <el-radio :label="scope.row">
+                      <template #default="{ label }">
+                        <!-- 将label文本设置为空 -->
+                        <span></span>
+                      </template>
+                    </el-radio>
+                  </el-radio-group>
+                </template>
               </el-table-column>
-              <el-table-column
-                type="selection"
-                header-align="center"
-                v-if="limit > 1"
-                align="center"
-                width="50">
+              <el-table-column type="selection" header-align="center" v-if="limit > 1" align="center" width="50">
               </el-table-column>
-              <el-table-column
-                prop="photo"
-                header-align="center"
-                align="center"
-                label="头像">
+              <el-table-column prop="photo" header-align="center" align="center" label="头像">
                 <template #default="scope">
-                  <img :src="scope.row.photo === ''?'/static/img/avatar.png':scope.row.photo" style="height:35px"/>
+                  <img :src="scope.row.photo === '' ? '/static/img/avatar.png' : scope.row.photo" style="height:35px" />
                 </template>
               </el-table-column>
-              <el-table-column
-                prop="loginName"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="90"
-                label="登录名">
+              <el-table-column prop="loginName" header-align="center" align="center" min-width="90" label="登录名">
               </el-table-column>
-              <el-table-column
-                prop="name"
-                header-align="center"
-                align="真实姓名"
-                sortable="custom"
-                min-width="90"
-                label="用户名">
+              <el-table-column prop="name" header-align="center" align="真实姓名" min-width="90" label="用户名">
               </el-table-column>
-              <el-table-column
-                prop="accountantUserCount"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
+              <el-table-column prop="accountantUserCount" header-align="center" align="center" min-width="110"
                 label="被选次数">
 
                 <!--用插槽的方法来改变颜色!-->
@@ -127,68 +75,42 @@
                   <div v-if="scope.row.accountantUserFlag === 0">
                     {{ scope.row.accountantUserCount }}
                   </div>
-                  <div v-else :style="{ color: scope.row.accountantUserCount>100 ? 'red' : 'black' }">
+                  <div v-else :style="{ color: scope.row.accountantUserCount > 100 ? 'red' : 'black' }">
                     {{ scope.row.accountantUserCount }}
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                prop="companyDTO.name"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="所属机构">
+              <el-table-column prop="companyDTO.name" header-align="center" align="center" min-width="110" label="所属机构">
               </el-table-column>
-              <el-table-column
-                prop="officeDTO.name"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="110"
-                label="所属部门">
+              <el-table-column prop="officeDTO.name" header-align="center" align="center" min-width="110" label="所属部门">
               </el-table-column>
-              <el-table-column
-                prop="loginFlag"
-                header-align="center"
-                align="center"
-                min-width="100"
-                label="状态">
+              <el-table-column prop="loginFlag" header-align="center" align="center" min-width="100" label="状态">
                 <template #default="scope">
                   <el-tag v-if="scope.row.loginFlag === '1'" size="small" type="success">正常</el-tag>
                   <el-tag v-else-if="scope.row.loginFlag === '0'" size="small" type="danger">禁用</el-tag>
                 </template>
               </el-table-column>
             </el-table>
-            <el-pagination
-              @size-change="sizeChangeHandle"
-              @current-change="currentChangeHandle"
-              :current-page="pageNo"
-              :page-sizes="[5, 10, 50, 100]"
-              :page-size="pageSize"
-              :total="total"
+            <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageNo"
+              :page-sizes="[5, 10, 50, 100]" :page-size="pageSize" :total="total"
               layout="total, sizes, prev, pager, next, jumper">
             </el-pagination>
           </el-main>
         </el-container>
 
         <el-aside width="200px">
-          <el-tag
-            :key="tag.id"
-            v-for="tag in dataListAllSelections"
-            closable
-            :disable-transitions="false"
+          <el-tag :key="tag.id" v-for="tag in dataListAllSelections" closable :disable-transitions="false"
             @close="del(tag)">
-            {{tag.name}}
+            {{ tag.name }}
           </el-tag>
         </el-aside>
       </el-container>
-		<template #footer>
-			<span class="dialog-footer">
-			  <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
-			  <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
-			</span>
-		</template>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+          <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+        </span>
+      </template>
     </el-dialog>
 
   </div>
@@ -196,7 +118,7 @@
 
 <script>
 export default {
-  data () {
+  data() {
     return {
       searchForm: {
         loginName: '',
@@ -236,12 +158,12 @@ export default {
     }
   },
   watch: {
-    filterText (val) {
+    filterText(val) {
       this.$refs.officeTree.filter(val)
     }
   },
   methods: {
-    init () {
+    init() {
       this.visible = true
       this.$nextTick(() => {
         this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData))
@@ -249,11 +171,11 @@ export default {
         this.resetSearch()
       })
     },
-    renderContent (h, { node, data, store }) {
-		return h('span', { class: 'custom-tree-node' }, [
-			data.type === '1' ? h('i', { class: 'fa fa-sitemap' }) : h('i', { class: 'fa fa-users' }),
-			h('span', { class: 'text' }, node.label),
-		]);
+    renderContent(h, { node, data, store }) {
+      return h('span', { class: 'custom-tree-node' }, [
+        data.type === '1' ? h('i', { class: 'fa fa-sitemap' }) : h('i', { class: 'fa fa-users' }),
+        h('span', { class: 'text' }, node.label),
+      ]);
       // return (
       //   <span class="custom-tree-node">
       //           {
@@ -263,14 +185,14 @@ export default {
       //         </span>
       // )
     },
-    getTemplateRow (index, row) {                                 // 获取选中数据
+    getTemplateRow(index, row) {                                 // 获取选中数据
       this.dataListSelections = [row]
       this.$nextTick(() => {
         this.changePageCoreRecordData()
       })
     },
     // 设置选中的方法
-    setSelectRow () {
+    setSelectRow() {
       console.log('设置选中的方法')
       if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
         this.$refs.userTable.clearSelection()
@@ -291,7 +213,7 @@ export default {
       }
     },
     // 记忆选择核心方法
-    changePageCoreRecordData () {
+    changePageCoreRecordData() {
       // 标识当前行的唯一键的名称
       let idKey = this.idKey
       let that = this
@@ -336,22 +258,22 @@ export default {
       })
     },
     // 得到选中的所有数据
-    getAllSelectionData () {
+    getAllSelectionData() {
       // 再执行一次记忆勾选数据匹配,目的是为了在当前页操作勾选后直接获取选中数据
       this.changePageCoreRecordData()
     },
-    filterNode (value, data) {
+    filterNode(value, data) {
       if (!value) return true
       return data.name.indexOf(value) !== -1
     },
-    del (tag) {
+    del(tag) {
       this.dataListAllSelections.splice(this.dataListAllSelections.indexOf(tag), 1)
       this.$nextTick(() => {
         this.setSelectRow()
       })
     },
     // 获取数据列表
-    refreshList () {
+    refreshList() {
       this.loading = true
       this.searchForm.certType = '6'
       if (this.commonJS.isEmpty(this.searchForm.officeDTO.id) && this.commonJS.isEmpty(this.searchForm.companyDTO.id)) {
@@ -367,6 +289,13 @@ export default {
           ...this.searchForm
         }
       }).then((data) => {
+        console.log(data);
+        console.log(data);
+        console.log(data);
+        console.log(data);
+        console.log(data);
+        console.log(data);
+
         this.dataList = data.records
         this.total = data.total
         this.pageNo = data.current
@@ -376,7 +305,7 @@ export default {
         })
       })
     },
-    refreshTree () {
+    refreshTree() {
       this.$http({
         url: `/system-server/sys/office/accessTreeData`,
         method: 'get'
@@ -385,7 +314,7 @@ export default {
       })
     },
     // 每页数
-    sizeChangeHandle (val) {
+    sizeChangeHandle(val) {
       this.pageSize = val
       this.pageNo = 1
       this.refreshList()
@@ -394,7 +323,7 @@ export default {
       })
     },
     // 当前页
-    currentChangeHandle (val) {
+    currentChangeHandle(val) {
       this.pageNo = val
       this.refreshList()
       this.$nextTick(() => {
@@ -402,14 +331,14 @@ export default {
       })
     },
     // 多选
-    selectionChangeHandle (val) {
+    selectionChangeHandle(val) {
       this.dataListSelections = val
       this.$nextTick(() => {
         this.changePageCoreRecordData()
       })
     },
     // 排序
-    sortChangeHandle (column) {
+    sortChangeHandle(column) {
       if (column.prop === 'officeDTO.name') {
         column.prop = 'o.name'
       }
@@ -418,11 +347,11 @@ export default {
       }
       this.orders = []
       if (column.order != null) {
-        this.orders.push({column: this.$utils.toLine(column.prop), asc: column.order === 'ascending'})
+        this.orders.push({ column: this.$utils.toLine(column.prop), asc: column.order === 'ascending' })
       }
       this.refreshList()
     },
-    handleNodeClick (data) {
+    handleNodeClick(data) {
       if (data.type === '1') {
         this.searchForm.companyDTO.id = data.id
         this.searchForm.officeDTO.id = ''
@@ -432,14 +361,14 @@ export default {
       }
       this.refreshList()
     },
-    resetSearch () {
+    resetSearch() {
       this.searchForm.companyDTO.id = ''
       this.searchForm.officeDTO.id = ''
       this.$refs.officeTree.setCurrentKey(null)
       this.$refs.searchForm.resetFields()
       this.refreshList()
     },
-    doSubmit () {
+    doSubmit() {
       console.log('doSubmit')
       if (this.dataListAllSelections.length === 0) {
         this.$message.error(`请选择用户`)
@@ -449,13 +378,17 @@ export default {
         this.$message.error(`你最多只能选择${this.limit}个用户`)
         return
       }
-      if (this.dataListAllSelections[0].accountantUserCount >= 100 && this.dataListAllSelections[0].accountantUserFlag === 1) {
-		  if(this.dataListAllSelections[0].name === '王真' && this.dataListAllSelections[0].accountantUserCount <= 120){
+      // if (this.dataListAllSelections[0].accountantUserCount >= 100 && this.dataListAllSelections[0].accountantUserFlag === 1) {
+      //   if (this.dataListAllSelections[0].name === '王真' && this.dataListAllSelections[0].accountantUserCount <= 120) {
 
-		  }else{
-			  this.$message.error(`请选择被选次数小于100次的签字注师人员`)
-			  return
-		  }
+      //   } else {
+      //     this.$message.error(`请选择被选次数小于100次的签字注师人员`)
+      //     return
+      //   }
+      // }
+      if (this.dataListAllSelections[0].accountantUserCount >= this.dataListAllSelections[0].signatureCount) {
+        this.$message.error(`被选次数不能超过可签章份数`)
+        return
       }
       this.visible = false
       this.$emit('doSubmit', this.dataListAllSelections)
@@ -466,25 +399,30 @@ export default {
 <style lang="scss">
 .org {
   height: 100%;
+
   .el-card__header {
     padding: 10px;
   }
+
   .el-card__body {
     padding: 10px;
     max-height: 520px;
     overflow: auto;
   }
 }
-.userDialog{
+
+.userDialog {
   .el-dialog__body {
     padding: 10px 0px 0px 10px;
     color: #606266;
     font-size: 14px;
     word-break: break-all;
   }
+
   .el-main {
     padding: 20px 20px 5px 20px;
-    .el-pagination{
+
+    .el-pagination {
       margin-top: 5px;
     }
   }