Explorar o código

pc修改-收购商审核

linbl %!s(int64=2) %!d(string=hai) anos
pai
achega
0675a62eaf

+ 36 - 0
sa-frame/menu-list-sp.js

@@ -305,6 +305,42 @@ window.menuList.unshift({
 				},
 			]
 		},
+		
+		{
+			id: 'tb-purchaser-judge',
+			icon: 'el-icon-s-check',
+			name: '收购商审核',
+			url: 'sa-view/tb-purchaser/tb-purchaser-judge.html',
+			childList: [{
+				id: 'tb-purchaser-judge',
+				name: '收购商审核',
+				isShow: false
+			}, ]
+		},
+		{
+			id: 'tb-purchaser',
+			icon: 'el-icon-film',
+			name: '收购商列表',
+			url: 'sa-view/tb-purchaser/tb-purchaser-list.html',
+			childList: [{
+					id: 'tb-purchaser-add',
+					name: '收购商添加',
+					isShow: false
+				},
+				{
+					id: 'tb-purchaser-edit',
+					name: '收购商更新',
+					isShow: false
+				},
+				{
+					id: 'tb-purchaser-del',
+					name: '收购商删除',
+					isShow: false
+				},
+			]
+		},
+		
+		
 		{
 			id: 'tb-message',
 			name: '通知消息',

+ 135 - 0
sa-view/tb-purchaser/tb-purchaser-do-judge.html

@@ -0,0 +1,135 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>收购商-详情</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css js 资源 -->
+		<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<script src="../../static/kj/upload-util.js"></script>
+
+		<style type="text/css">
+			.c-panel .c-label {
+				width: 8em;
+			}
+			.c-item .image-box-2 {
+				height: 90px;
+			}
+			.el-row{
+				border-bottom: 1px solid #eeeeee;
+			}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box sbot" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+					<el-form v-if="m">
+						 <el-alert show-icon title="审核驳回" :description="m.judgeContent" type="error" v-if="m.judgeStatus==2"></el-alert>
+						<el-row>
+							<el-col span="12">
+								<sa-info name="收购商名称" br>{{m.name}}</sa-info>
+							</el-col>
+							<el-col span="12">
+								<sa-info name="纳税人识别号" br>{{m.dutyParagraph}}</sa-info>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col span="12">
+								<sa-info name="法人姓名" br>{{m.legalPerson}}</sa-info>
+							</el-col>
+							<el-col span="12">
+								<sa-info name="身份证号" br>{{m.idCard}}</sa-info>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col span="12">
+								<sa-info name="银行名称" br>{{m.bankName}}</sa-info>
+							</el-col>
+							<el-col span="12">
+								<sa-info name="银行账号" br>{{m.bankAccount}}</sa-info>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col span="12">
+								<sa-info name="联系号码" br>{{m.legalPerson}}</sa-info>
+							</el-col>
+							<el-col span="12">
+								<sa-info name="营业执照" br>{{m.idCard}}</sa-info>
+							</el-col>
+						</el-row>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot" v-if="sa.isAuth('tb-purchaser-judge')">
+				<el-button type="warning" @click="judgeBack">审核驳回</el-button>
+				<el-button type="success" @click="judgePass">审核通过</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</div>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue')
+				},
+				el: '.vue-box',
+				data: {
+					id: sa.p('id', 0), // 获取数据ID
+					m: null
+				},
+				methods: {
+					judgeBack() {
+						let id = this.m.id;
+						layer.prompt({
+							title: '输入审核意见'
+						}, function(content, index) {
+							layer.close(index);
+							sa.ajax('/level-two-server/TbPurchaser/audit', {
+								id: id,
+								judgeContent: content,
+								judgeStatus: 2
+							}, function(res) {
+								layer.msg('审核已驳回');
+								setTimeout(() => {
+									parent.app.f5(); // 刷新父页面列表
+									sa.closeCurrIframe(); // 关闭本页
+								}, 800)
+							})
+						});
+					},
+					judgePass() {
+						sa.ajax('/level-two-server/TbPurchaser/audit', {
+							id: this.m.id,
+							judgeContent: '审核通过',
+							judgeStatus: 1
+						}, function(res) {
+							layer.msg('审核通过');
+							setTimeout(() => {
+								parent.app.f5(); // 刷新父页面列表
+								sa.closeCurrIframe(); // 关闭本页
+							}, 800)
+						})
+					},
+				},
+				mounted: function() {
+					sa.ajax('/level-two-server/TbPurchaser/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if (res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+		</script>
+	</body>
+</html>

+ 145 - 0
sa-view/tb-purchaser/tb-purchaser-judge.html

@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<title>收购商-列表</title>
+		<meta charset="utf-8">
+		<meta name="viewport"
+			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+		<!-- 所有的 css & js 资源 -->
+		<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
+		<link rel="stylesheet" href="../../static/sa.css">
+		<script src="../../static/kj/vue.min.js"></script>
+		<script src="../../static/kj/element-ui/index.js"></script>
+		<script src="../../static/kj/httpVueLoader.js"></script>
+		<script src="../../static/kj/jquery.min.js"></script>
+		<script src="../../static/kj/layer/layer.js"></script>
+		<script src="../../static/sa.js"></script>
+		<script src="../../static/kj/upload-util.js"></script>
+	</head>
+	<body>
+		<div class="vue-box" style="display: none;" :style="'display: block;'">
+			<div class="c-panel">
+				<!-- ------------- 检索参数 ------------- -->
+				<el-form ref="form" :model='p' @submit.native.prevent>
+					<sa-item type="text" name="企业名称" v-model="p.name" :need="false"></sa-item>
+					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
+					<el-button v-if="sa.isAuth('tb-purchaser-judge')" class="c-btn" type="success"
+						icon="el-icon-s-check" @click="judgeBySelect">批量审核</el-button>
+				</el-form>
+				<!-- ------------- 数据列表 ------------- -->
+				<el-table class="data-table" ref="data-table" :data="dataList">
+					<sa-td type="selection" name="序号"></sa-td>
+					<sa-td name="企业名称" prop="name">
+						<template slot-scope="scope">
+							<div class="omit">{{scope.row.name}}</div>
+						</template>
+					</sa-td>
+					<sa-td name="税号" prop="dutyParagraph"></sa-td>
+					<sa-td name="法人姓名" prop="legalPerson"></sa-td>
+					<sa-td name="手机号码" width="100px" prop="contact"></sa-td>
+					<sa-td name="营业执照" prop="businessLicense" type="img-list"></sa-td>
+					<sa-td name="审核状态" prop="judgeStatus">
+						<template slot-scope="scope">
+							<el-tag type="danger" v-if="scope.row.judgeStatus==0">未审核</el-tag>
+							<el-tag type="danger" v-if="scope.row.judgeStatus==2">审核驳回</el-tag>
+						</template>
+					</sa-td>
+					<sa-td name="提交时间" width="160px" prop="createTime"></sa-td>
+					<el-table-column label="操作" fixed="right" width="100px">
+						<template slot-scope="s">
+							<el-button v-if="sa.isAuth('tb-purchaser-judge')" class="c-btn" type="success"
+								icon="el-icon-s-check" @click="get(s.row)">审核</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+				<!-- ------------- 分页 ------------- -->
+				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount"
+					@change="f5()"></sa-item>
+			</div>
+			<el-dialog title="批量审核" :visible.sync="modal.visible" width="400px">
+				<el-form>
+					<sa-item type="text" name="审核意见" v-model="modal.form.judgeContent" br></sa-item>
+					<sa-item type="enum" name="审核结果" v-model="modal.form.judgeStatus" :jv="{1: '通过', 2: '驳回'}" jtype="3"
+						br></sa-item>
+				</el-form>
+				<span slot="footer" class="dialog-footer">
+					<el-button @click="modal.visible = false">取 消</el-button>
+					<el-button type="primary" @click="doJudge">确 定</el-button>
+				</span>
+			</el-dialog>
+		</div>
+		<script>
+			var app = new Vue({
+				components: {
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
+				},
+				el: '.vue-box',
+				data: {
+					modal: {
+						visible: false,
+						form: {
+							ids: '',
+							judgeStatus: 1,
+							judgeContent: '',
+						}
+					},
+					p: { // 查询参数
+						id: '', //
+						name: '', // 名称
+						nationality: '', // 国别
+						judgeList: 1,
+						pageNo: 1, // 当前页
+						pageSize: 20, // 页大小
+						sortType: 0 // 排序方式
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合
+				},
+				methods: {
+					doJudge() {
+						let form = this.modal.form;
+						if (!form.judgeContent) {
+							return sa.msg('请输入审核意见');
+						}
+						sa.ajax('/level-two-server/TbPurchaser/auditBatch', form, function(res) {
+							sa.alert('审核成功');
+							this.modal.visible = false;
+							this.f5()
+						}.bind(this));
+					},
+					// 刷新
+					f5: function() {
+						sa.ajax('/level-two-server/TbPurchaser/getList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数
+							sa.f5TableHeight(); // 刷新表格高度
+						}.bind(this));
+					},
+					judgeBySelect: function(data) {
+						var selection = this.$refs['data-table'].selection;
+						if (selection.length == 0) {
+							return sa.msg('请选择一条数据')
+						}
+						this.modal.form.ids = selection.map(obj => obj.id).join(',');
+						this.modal.visible = true;
+					},
+					// 查看
+					get: function(data) {
+						sa.showIframe('商户资料审核', 'tb-purchaser-do-judge.html?id=' + data.id, '850px', '80%');
+					},
+					// 修改
+					update: function(data) {
+						sa.showIframe('修改数据', 'tb-purchaser-add.html?id=' + data.id, '1000px', '90%');
+					},
+
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>