Browse Source

会计签字注师签章数量表获取

user5 7 months ago
parent
commit
6c06549639

+ 8 - 0
src/api/cw/projectRecords/ProjectRecordsService.js

@@ -24,6 +24,14 @@ export default {
 		});
 	},
 
+	getSignatureScribeList: function (params) {
+		return request({
+			url: prefix + "/cwProjectReport/getSignatureScribeList",
+			method: "get",
+			params: params,
+		});
+	},
+
 	preInvoiceList: function (params) {
 		return request({
 			url: prefix + "/cwProjectRecords/preInvoiceList",

+ 2 - 2
src/api/sys/OSSService.js

@@ -75,8 +75,8 @@ export const client = new OSS({
   region: 'oss-cn-hangzhou', // oss地址
   accessKeyId: 'LTAI5tKa6kzGr5EyPWJB4EcD', // 通过阿里云控制台创建的AccessKey ID。
   accessKeySecret: 'arHxB7ZPhizrBYf4844TtyaRctPMgW', // 通过阿里云控制台创建的AccessKey Secret。
-	// bucket: 'xgxm-test', // 仓库名字
-	bucket: 'xg-pg', // 仓库名字
+	bucket: 'xgxm-test', // 仓库名字
+	// bucket: 'xg-pg', // 仓库名字
   useFetch: true, // 支持上传大于100KB的文件
   secure: false // 返回的url为https
 })

+ 6 - 0
src/api/sys/officeService.js

@@ -81,4 +81,10 @@ export default {
 			method: "get",
 		});
 	},
+	treeDataByUser() {
+		return request({
+			url: prefix + "/sys/office/treeDataByUser",
+			method: "get",
+		});
+	},
 };

+ 9 - 0
src/api/sys/userService.js

@@ -119,6 +119,15 @@ export default {
 		});
 	},
 
+	exportSignatureScribeFile: function (params) {
+		return request({
+			url: prefix + "/sys/user/exportSignatureScribeFile",
+			method: "get",
+			params: params,
+			responseType: "blob",
+		});
+	},
+
 	importExcel: function (data) {
 		return request({
 			url: prefix + "/sys/user/import",

+ 194 - 0
src/views/cw/reportManagement/SignatureScribeForm.vue

@@ -0,0 +1,194 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+	  draggable
+      width="90%"
+      height="500px"
+      @close="close"
+      append-to-body
+      v-model="visible">
+		<!--报告        -->
+		<div>
+			<el-form size="large" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+					 @submit.native.prevent>
+				<!-- 搜索框-->
+				<el-form-item label="项目名称" prop="projectName">
+					<el-input size="large" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告号" prop="reportNo">
+					<el-input size="large" v-model="searchForm.reportNo" placeholder="请输入报告号" clearable></el-input>
+				</el-form-item>
+				<el-form-item label="报告创建时间" prop="createDates">
+					<el-date-picker
+						placement="bottom-start"
+						format="YYYY-MM-DD HH:mm:ss"
+						value-format="YYYY-MM-DD HH:mm:ss"
+						v-model="searchForm.createDates"
+						type="datetimerange"
+						range-separator="至"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期">
+					</el-date-picker>
+				</el-form-item>
+
+				<el-form-item>
+					<el-button type="primary" @click="list()" size="large" icon="el-icon-search">查询</el-button>
+					<el-button @click="resetSearch1()" size="large" icon="el-icon-refresh-right">重置</el-button>
+				</el-form-item>
+			</el-form>
+
+			<vxe-table
+				border="inner"
+				auto-resize
+				resizable
+				height="550px"
+				:loading="loading"
+				size="large"
+				ref="projectTable1"
+				show-header-overflow
+				show-overflow
+				highlight-hover-row
+				:menu-config="{}"
+				:print-config="{}"
+				@sort-change=""
+				:sort-config="{remote:true}"
+				:data="dataList1"
+				:row-config="{isCurrent: true}"
+				:checkbox-config="{trigger: 'row'}"
+			>
+				<vxe-column type="seq" width="60" title="序号"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目名称" field="projectName" show-overflow="title"></vxe-column>
+				<vxe-column min-width="230" align="center" title="项目编号" field="projectNumber"></vxe-column>
+				<vxe-column min-width="230" align="center" title="报告文号" field="reportNo">
+					<template #default="scope">
+						<el-link  type="primary" :underline="false"  @click="view(scope.row.id)">{{scope.row.documentNo}}</el-link>
+					</template>
+				</vxe-column>
+				<vxe-column min-width="230" align="center" title="审定金额(含税/元)" field="approvedIncludingTax"></vxe-column>
+				<vxe-column min-width="230" align="center" title="审定金额(不含税/元)" field="approvedNoIncludingTax"></vxe-column>
+				<vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
+				<vxe-column min-width="160" align="center" title="报告创建时间" field="createTime"></vxe-column>
+
+			</vxe-table>
+			<vxe-pager
+				background
+				size="large"
+				:current-page="tablePage1.currentPage"
+				:page-size="tablePage1.pageSize"
+				:total="tablePage1.total"
+				:page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+				:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+				@page-change="currentChangeHandle1">
+			</vxe-pager>
+		</div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import projectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visible: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+	    tablePage1: {
+		  total: 0,
+		  currentPage: 1,
+		  pageSize: 10,
+		  orders: []
+	    },
+		  tablePage2: {
+			  total: 0,
+			  currentPage: 1,
+			  pageSize: 10,
+			  orders: []
+		  },
+        dataList: [],
+        dataList1: [],
+        dataList2: [],
+        searchForm: {
+          name: '',
+          no: '',
+          createBy: '',
+		  signatureAnnotator1: '',
+          projectMasterName: '',
+          projectNumber: '',
+          projectName: '',
+          createDates: [],
+		  reportNo: '',
+          status: ''
+        },
+        detail: '',
+		reportType:''
+      }
+    },
+    created () {
+    },
+    components: {
+    },
+    methods: {
+      init (userId) {
+      	this.searchForm.signatureAnnotator1 = userId
+        this.visible = true
+        this.list()
+      },
+      list () {
+        this.loading = true
+        projectRecordsService.getSignatureScribeList({
+          'current': this.tablePage1.currentPage,
+          'size': this.tablePage1.pageSize,
+          'orders': this.tablePage1.orders,
+          ...this.searchForm
+        }).then((data) => {
+          this.dataList1 = data.records
+          this.tablePage1.total = data.total
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage1.currentPage = currentPage
+        this.tablePage1.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+	  currentChangeHandle1 ({currentPage, pageSize}) {
+		this.tablePage1.currentPage = currentPage
+		this.tablePage1.pageSize = pageSize
+		this.list()
+	  },
+		// 查看
+		view (id) {
+			this.$refs.reportManagementForm.init('view', id, '报告审核单下载')
+		},
+	  resetSearch1 () {
+		this.$refs.searchForm.resetFields()
+		this.list()
+	  },
+      close () {
+        this.detail = ''
+        this.visible = false
+      }
+    }
+  }
+</script>
+<style>
+  .messageZindex {
+    z-index:9999 !important;
+  }
+</style>

+ 508 - 0
src/views/cw/reportManagement/SignatureScribeSignatureCountList.vue

@@ -0,0 +1,508 @@
+<template>
+	<splitpanes class="default-theme">
+		<pane size="20">
+			<el-container class="jp-container">
+				<el-header class="m-p-13-15">
+					<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"
+					>
+						<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>
+									</el-icon>
+									{{ node.label }}
+								</span>
+							</span>
+						</template>
+					</el-tree>
+				</el-main>
+			</el-container>
+		</pane>
+		<pane size="80">
+			<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-item prop="name" label="姓名:">
+								<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
+						>
+					</div>
+				</el-header>
+				<el-main class="nopadding page2">
+					<div class="jp-table">
+						<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>
+							</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="{
+									importMethod: importMethod,
+									types: ['csv', 'xls', 'xlsx'],
+									remote: true,
+								}"
+								:export-config="{
+									remote: true,
+									filename: `用户数据${moment(
+										new Date()
+									).format('YYYY-MM-DD')}`,
+									sheetName: '用户数据',
+									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"
+								>
+									<template #default="{ row }">
+										<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 title="姓名" field="name" sortable>
+								</vxe-column>
+								<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>
+								<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
+										>
+									</template>
+								</vxe-column>
+
+							</vxe-table>
+							<vxe-pager
+								background
+								size="small"
+								:current-page="tablePage.currentPage"
+								:page-size="tablePage.pageSize"
+								:total="tablePage.total"
+								:page-sizes="[
+									10,
+									20,
+									100,
+									1000,
+									{ label: '全量数据', value: 1000000 },
+								]"
+								:layouts="[
+									'PrevPage',
+									'JumpNumber',
+									'NextPage',
+									'FullJump',
+									'Sizes',
+									'Total',
+								]"
+								@page-change="currentChangeHandle"
+							>
+							</vxe-pager>
+						</div>
+					</div>
+				</el-main>
+			</el-container>
+		</pane>
+	</splitpanes>
+	<user-form ref="userForm" @refreshDataList="refreshList"></user-form>
+	<SignatureScribeForm ref="signatureScribeForm" @getProgram="getProgram"></SignatureScribeForm>
+</template>
+
+<script>
+import { Splitpanes, Pane } from "splitpanes";
+import "splitpanes/dist/splitpanes.css";
+import UserForm from "../../sys/user/UserForm";
+import { mapState } from "vuex";
+import userService from "@/api/sys/userService";
+import officeService from "@/api/sys/officeService";
+import SignatureScribeForm from './SignatureScribeForm'
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
+
+export default {
+	data() {
+		return {
+			searchForm: {
+				loginName: "",
+				certType: "6",
+				selectAll: "true",
+				name: "",
+				companyDTO: {
+					id: "",
+				},
+				officeDTO: {
+					id: "",
+				},
+			},
+			searchVisible: true,
+			filterText: "",
+			dataList: [],
+			officeTreeData: [],
+			tablePage: {
+				total: 0,
+				currentPage: 1,
+				pageSize: 10,
+				orders: [{ column: "a.create_time", asc: false }],
+			},
+			loading: false,
+		};
+	},
+	components: { Splitpanes, Pane, UserForm, SignatureScribeForm },
+	mounted() {
+		this.$nextTick(() => {
+			// 将表格和工具栏进行关联
+			const $table = this.$refs.userTable;
+			const $toolbar = this.$refs.userToolbar;
+			$table.connect($toolbar);
+		});
+		this.refreshTree();
+		this.refreshList();
+	},
+	watch: {
+		filterText(val) {
+			this.$refs.officeTree.filter(val);
+		},
+	},
+	computed: {
+		...mapState({
+			currentTenantId: (state) => state.user.tenantId,
+		}),
+	},
+	methods: {
+		filterNode(value, data) {
+			if (!value) return true;
+			return data.name.indexOf(value) !== -1;
+		},
+		// 获取数据列表
+		refreshList() {
+			this.loading = true;
+			userService
+				.list({
+					current: this.tablePage.currentPage,
+					size: this.tablePage.pageSize,
+					orders: this.tablePage.orders,
+					...this.searchForm,
+				})
+				.then((data) => {
+					this.dataList = data.records;
+					this.tablePage.total = data.total;
+					this.loading = false;
+				});
+		},
+		refreshTree() {
+			officeService.treeDataByUser().then((data) => {
+				this.officeTreeData = data;
+			});
+		},
+		getSignatureScribeList(userId) {
+			this.$refs.signatureScribeForm.init(userId)
+		},
+		// 当前页
+		currentChangeHandle({ currentPage, pageSize }) {
+			this.tablePage.currentPage = currentPage;
+			this.tablePage.pageSize = pageSize;
+			this.refreshList();
+		},
+		// 排序
+		sortChangeHandle(obj) {
+			this.tablePage.orders = [];
+
+			if (obj.order != null) {
+				this.tablePage.orders = [
+					{
+						column:
+							obj.column.sortBy ||
+							this.$utils.toLine(obj.property),
+						asc: obj.order === "asc",
+					},
+				];
+			} else {
+				this.tablePage.orders = [
+					{ column: "a.create_time", asc: false },
+				];
+			}
+			this.refreshList();
+		},
+		// 新增
+		add() {
+			this.$refs.userForm.init("add", "");
+		},
+		// 修改
+		edit(id, tenantId) {
+			id =
+				id ||
+				this.$refs.userTable.getCheckboxRecords().map((item) => {
+					return item.id;
+				})[0];
+			tenantId =
+				tenantId ||
+				this.$refs.userTable.getCheckboxRecords().map((item) => {
+					return item.tenantDTO?.id;
+				})[0];
+			this.$refs.userForm.init("edit", id, tenantId);
+		},
+		// 查看
+		view(id, tenantId) {
+			this.$refs.userForm.init("view", id, tenantId);
+		},
+		// 删除
+		del(id) {
+			let ids =
+				id ||
+				this.$refs.userTable
+					.getCheckboxRecords()
+					.map((item) => {
+						return item.id;
+					})
+					.join(",");
+			this.$confirm(`确定删除所选项吗?`, "提示", {
+				confirmButtonText: "确定",
+				cancelButtonText: "取消",
+				type: "warning",
+			}).then(() => {
+				this.loading = true;
+				userService
+					.delete(ids)
+					.then((data) => {
+						this.loading = false;
+						this.$message.success({
+							dangerouslyUseHTMLString: true,
+							message: data,
+						});
+						this.refreshList();
+						enrollmentRegistrationService.delByUserId(ids);
+					})
+					.catch(() => {
+						this.loading = false;
+					});
+			});
+		},
+		// 下载模板
+		downloadTpl() {
+			// this.$utils.downloadExcel('/sys/user/import/template')
+			userService
+				.exportTemplate()
+				.then((data) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(data, "用户导入模板");
+				})
+				.catch(function (err) {
+					if (err.response) {
+						console.log(err.response);
+					}
+				});
+		},
+		handleNodeClick(data) {
+			if (data.type === "1") {
+				this.searchForm.companyDTO.id = data.id;
+				this.searchForm.officeDTO.id = "";
+			} else {
+				this.searchForm.companyDTO.id = "";
+				this.searchForm.officeDTO.id = data.id;
+			}
+			this.refreshList();
+		},
+		// 自定义服务端导入
+		importMethod({ file }) {
+			// 处理表单
+			const formBody = new FormData();
+			formBody.append("file", file);
+			userService.importExcel(formBody).then((result) => {
+				this.$message.success({
+					dangerouslyUseHTMLString: true,
+					message: result,
+				});
+				this.refreshList();
+			});
+		},
+		// 自定义服务端导出
+		exportMethod({ options }) {
+			// 传给服务端的参数
+			const params = {
+				current: this.tablePage.currentPage,
+				size: this.tablePage.pageSize,
+				orders: this.tablePage.orders,
+				...this.searchForm,
+				filename: options.filename,
+				sheetName: options.sheetName,
+				isHeader: options.isHeader,
+				original: options.original,
+				mode: options.mode,
+				selectIds:
+					options.mode === "selected"
+						? options.data.map((item) => item.id)
+						: [],
+				exportFields: options.columns.map(
+					(column) => column.property && column.property.split(".")[0]
+				),
+			};
+			this.loading = true;
+			return userService
+				.exportSignatureScribeFile(params)
+				.then((data) => {
+					// 将二进制流文件写入excel表,以下为重要步骤
+					this.$utils.downloadExcel(data, options.filename);
+					this.loading = false;
+				})
+				.catch(function (err) {
+					if (err.response) {
+						console.log(err.response);
+					}
+				});
+		},
+		resetSearch() {
+			this.searchForm.companyDTO.id = "";
+			this.searchForm.officeDTO.id = "";
+			this.filterText = "";
+			this.$refs.officeTree.setCurrentKey(null);
+			this.$refs.searchForm.resetFields();
+			this.refreshList();
+		},
+	},
+};
+</script>
+<style scoped>
+.disabled-user {
+	text-decoration: line-through;
+	color: #999;
+}
+</style>