Kaynağa Gözat

测试了部分功能

mao_ym 1 yıl önce
ebeveyn
işleme
ab5dd82dc8

+ 10 - 47
sa-frame/menu-list-sp.js

@@ -1,10 +1,10 @@
-// 此处定义所有有关 sa-plus 的路由菜单
-// 如需添加自定义菜单,请不要更改此文件,请在 menu-list.js 里添加 (没有这个文件就新建)
+// 此处定义所有有关 sa-plus 的路由菜单 
+// 如需添加自定义菜单,请不要更改此文件,请在 menu-list.js 里添加 (没有这个文件就新建) 
 window.menuList = window.menuList || [];
 window.menuList.unshift({
 	id: 'bas',
 	name: '身份相关',
-	isShow: false, // 隐藏显示
+	isShow: false, // 隐藏显示 
 	info: '身份相关权限,不显示在菜单上',
 	childList: [{
 			id: '1',
@@ -66,12 +66,7 @@ window.menuList.unshift({
 			name: '角色列表',
 			url: 'sa-view-sp/sp-role/role-list.html',
 			info: '管理系统各种角色',
-			childList: [{
-				id: 'role-add',
-				name: '添加角色',
-				info: '添加角色的权限',
-				isShow: false
-			}]
+			childList: [{id:'role-add',name:'添加角色',info:'添加角色的权限',isShow:false}]
 		},
 		{
 			id: 'menu-list',
@@ -269,13 +264,13 @@ window.menuList.unshift({
 		childList: [
 			{id: 'tb-goods-type-list', name: '商品分类-列表', url: 'sa-view/tb-goods-type/tb-goods-type-list.html',
 			childList:[
-			{id:'tb-goods-type-add',name:'商品分类添加',isShow:false},
-			{id:'tb-goods-type-edit',name:'商品分类更新',isShow:false},
-			{id:'tb-goods-type-del',name:'商品分类删除',isShow:false},
+			{id:'tb-goods-type-add',name:'商品分类添加',isShow:true},
+			{id:'tb-goods-type-edit',name:'商品分类更新',isShow:true},
+			{id:'tb-goods-type-del',name:'商品分类删除',isShow:true},
 			]
 			},
 		]
-},{
+	},{
 		id: 'tb-goods',
 		name: '商品',
 		icon: 'el-icon-folder-opened',
@@ -305,37 +300,5 @@ window.menuList.unshift({
 			]
 			},
 		]
-},
-{
-		id: 'app-user',
-		name: '移动端账号',
-		icon: 'el-icon-folder-opened',
-	    parent:true,
-		info: '移动端账号表数据的维护',
-		childList: [
-			{id: 'app-user-list', name: '移动端账号-列表', url: 'sa-view/app-user/app-user-list.html',
-			childList:[
-			{id:'app-user-add',name:'移动端账号添加',isShow:false},
-			{id:'app-user-edit',name:'移动端账号更新',isShow:false},
-			{id:'app-user-del',name:'移动端账号删除',isShow:false},
-			]
-			},
-		]
-	},
-	{
-		id: 'app-user-login-log',
-		name: '移动端用户登录日志',
-		icon: 'el-icon-folder-opened',
-	    parent:true,
-		info: '移动端用户登录日志表数据的维护',
-		childList: [
-			{id: 'app-user-login-log-list', name: '移动端用户登录日志-列表', url: 'sa-view/app-user-login-log/app-user-login-log-list.html',
-			childList:[
-			{id:'app-user-login-log-add',name:'移动端用户登录日志添加',isShow:false},
-			{id:'app-user-login-log-edit',name:'移动端用户登录日志更新',isShow:false},
-			{id:'app-user-login-log-del',name:'移动端用户登录日志删除',isShow:false},
-			]
-			},
-		]
-	},
- );
+}
+ );

+ 9 - 22
sa-view/tb-driver/tb-driver-add.html

@@ -60,15 +60,10 @@
 								<sa-item type="text" name="驾驶证号" v-model="m.drivingLicenseId" br></sa-item>
 							</el-col>
 							<el-col :span="12">
-								<sa-item type="datetime" name="注册时间" v-model="m.registerTime" br></sa-item>
-							</el-col>
-						</el-row>
-						
-						<el-row :gutter="50">
-							<el-col :span="12">
 								<sa-item type="text" name="车辆行驶证号" v-model="m.vehicleDrivingId" br></sa-item>
 							</el-col>
 						</el-row>
+						
 						<sa-item type="img-list" name="车辆行驶证照片" v-model="m.vehicleDrivingImg" br></sa-item>
 						<sa-item type="img-list" name="车辆前脸照" v-model="m.vehicleImg" br></sa-item>
 						<sa-item type="img-list" name="驾驶证照片" v-model="m.drivingLicenseImg" br></sa-item>
@@ -99,7 +94,6 @@
 					// 创建一个 默认Model
 					createModel: function() {
 						return {
-							// id: '',		// 主键
 							name: '',		// 姓名
 							age: '',		// 年龄
 							sex: '',		// 性别性别(1=男,2=女)
@@ -114,14 +108,8 @@
 							vehicleDrivingId: '',		// 车辆行驶证号
 							vehicleDrivingImg: '',		// 车辆行驶证照片
 							vehicleImg: '',		// 车辆前脸照
-							registerTime: '',		// 注册时间
+							// registerTime: '',		// 注册时间
 							// isLock: '',		// 是否被锁定
-							// createBy: '',		// 创建者id
-							// createName: '',		// 创建者名称
-							// createTime: '',		// 创建时间
-							// updateBy: '',		// 更新者id
-							// updateName: '',		// 更新者名称
-							// updateTime: '',		// 更新时间
 							// deleteStatus: '',		// 删除状态
 							// auditStatus: '',		// 审核状态(0=待审核,1=已通过,2=不通过)
 							// auditBy: '',		// 审核人
@@ -133,7 +121,6 @@
 					ok: function(){
 						// 表单校验
 						let m = this.m;
-						// sa.checkNull(m.id, '请输入 [主键]');
 						sa.checkNull(m.name, '请输入 [姓名]');
 						sa.checkNull(m.age, '请输入 [年龄]');
 						sa.checkNull(m.sex, '请输入 [性别性别]');
@@ -144,11 +131,11 @@
 						sa.checkNull(m.idCard, '请输入 [身份证号]');
 						// sa.checkNull(m.idCardImg, '请输入 [身份证照片]');
 						sa.checkNull(m.drivingLicenseId, '请输入 [驾驶证号]');
-						sa.checkNull(m.drivingLicenseImg, '请输入 [驾驶证照片]');
-						sa.checkNull(m.vehicleDrivingId, '请输入 [车辆行驶证号]');
-						sa.checkNull(m.vehicleDrivingImg, '请输入 [车辆行驶证照片]');
-						sa.checkNull(m.vehicleImg, '请输入 [车辆前脸照]');
-						sa.checkNull(m.registerTime, '请输入 [注册时间]');
+						// sa.checkNull(m.drivingLicenseImg, '请上传 [驾驶证照片]');
+						// sa.checkNull(m.vehicleDrivingId, '请上传 [车辆行驶证号]');
+						// sa.checkNull(m.vehicleDrivingImg, '请上传 [车辆行驶证照片]');
+						// sa.checkNull(m.vehicleImg, '请上传 [车辆前脸照]');
+						// sa.checkNull(m.registerTime, '请输入 [注册时间]');
 						// // sa.checkNull(m.deleteStatus, '请输入 [删除状态]');
 						// sa.checkNull(m.auditStatus, '请输入 [审核状态]');
 						// sa.checkNull(m.auditBy, '请输入 [审核人]');
@@ -156,8 +143,8 @@
 						// sa.checkNull(m.nopassReason, '请输入 [审核不通过原因]');
 
 						// 开始增加或修改
-						this.m.createTime = undefined;		// 不提交属性:创建时间
-						this.m.updateTime = undefined;		// 不提交属性:更新时间
+						// this.m.createTime = undefined;		// 不提交属性:创建时间
+						// this.m.updateTime = undefined;		// 不提交属性:更新时间
 						if(this.id <= 0) {	// 添加
 							sa.ajax('/transport-server/TbDriver/add', m, function(res){
 								sa.alert('增加成功', this.clean);

+ 67 - 16
sa-view/tb-driver/tb-driver-info.html

@@ -26,21 +26,72 @@
 			<div class="s-body">
 				<div class="c-panel">
 					<el-form v-if="m">
-						<sa-info name="姓名" br>{{m.name}}</sa-info>
-						<sa-info type="num" name="年龄" :value="m.age" br></sa-info>
-						<sa-info type="enum" name="性别" :value="m.sex" :jv="{1: '男', 2: '女'}" br></sa-info>
-						<sa-info name="手机号" br>{{m.phone}}</sa-info>
-						<sa-info name="联系地址" br>{{m.address}}</sa-info>
-						<sa-info name="银行卡号" br>{{m.bankCode}}</sa-info>
-						<sa-info name="银行名称" br>{{m.bankName}}</sa-info>
-						<sa-info name="身份证号" br>{{m.idCard}}</sa-info>
-						<sa-info type="img-list" name="身份证照片" :value="m.idCardImg" br></sa-info>
-						<sa-info name="驾驶证号" br>{{m.drivingLicenseId}}</sa-info>
-						<sa-info type="img-list" name="驾驶证照片" :value="m.drivingLicenseImg" br></sa-info>
-						<sa-info name="车辆行驶证号" br>{{m.vehicleDrivingId}}</sa-info>
-						<sa-info type="img-list" name="车辆行驶证照片" :value="m.vehicleDrivingImg" br></sa-info>
-						<sa-info type="img-list" name="车辆前脸照" :value="m.vehicleImg" br></sa-info>
-						<sa-info name="注册时间" br>{{m.registerTime}}</sa-info>
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="姓名" br>{{m.name}}</sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info type="num" name="年龄" :value="m.age" br></sa-info>
+							</el-col>
+						</el-row>
+
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info type="enum" name="性别" :value="m.sex" :jv="{1: '男', 2: '女'}" br></sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="手机号" br>{{m.phone}}</sa-info>
+							</el-col>
+						</el-row>
+						
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="联系地址" br>{{m.address}}</sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="银行卡号" br>{{m.bankCode}}</sa-info>
+							</el-col>
+						</el-row>
+						
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="银行名称" br>{{m.bankName}}</sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="身份证号" br>{{m.idCard}}</sa-info>
+							</el-col>
+						</el-row>
+						
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info type="img-list" name="身份证照片" :value="m.idCardImg" br></sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="驾驶证号" br>{{m.drivingLicenseId}}</sa-info>
+							</el-col>
+						</el-row>
+						
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info type="img-list" name="驾驶证照片" :value="m.drivingLicenseImg" br></sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="车辆行驶证号" br>{{m.vehicleDrivingId}}</sa-info>
+							</el-col>
+						</el-row>
+
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info type="img-list" name="车辆行驶证照片" :value="m.vehicleDrivingImg" br></sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info type="img-list" name="车辆前脸照" :value="m.vehicleImg" br></sa-info>
+							</el-col>
+						</el-row>
+						
+						
+						
+						<!-- <sa-info name="注册时间" br>{{m.registerTime}}</sa-info> -->
 						<!-- <sa-info type="enum" name="审核状态" :value="m.auditStatus" :jv="{0: '待审核,1'}" br></sa-info>
 						<sa-info name="审核人" br>{{m.auditBy}}</sa-info>
 						<sa-info name="审核时间" br>{{m.auditTime}}</sa-info>
@@ -67,7 +118,7 @@
 				methods: {
 				},
 				mounted: function() {
-					sa.ajax('/TbDriver/getById?id=' + this.id, function(res) {
+					sa.ajax('/transport-server/TbDriver/getById?id=' + this.id, function(res) {
 						this.m = res.data;
 						if(res.data == null) {
 							sa.alert('未能查找到 id=' + this.id + " 详细数据");

+ 31 - 7
sa-view/tb-driver/tb-driver-list.html

@@ -27,28 +27,32 @@
 					<sa-item type="text" name="驾驶证号" v-model="p.drivingLicenseId"></sa-item>
 					<sa-item type="text" name="车辆行驶证号" v-model="p.vehicleDrivingId"></sa-item>
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<el-button icon="el-icon-refresh" type="info" @click="sa.f5()">重置</el-button>
 				</el-form>
 				<div class="fast-btn">
 					<el-button v-if="sa.isAuth('tb-driver-add')" size="mini" type="primary" @click="add()">新增</el-button>
 					<el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
-					<el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
+					<!-- <el-button size="mini" type="info" @click="sa.f5()">重置</el-button> -->
+					<el-button size="mini" type="danger" @click="deleteByIds()">批量删除</el-button>
+					<el-button size="mini" type="primary" @click="importMsg()">导入</el-button>
+					<el-button size="mini" type="success" @click="exportFile()">导出</el-button>
 				</div>
+				
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList" >
 					<sa-td type="selection"></sa-td>
 					<sa-td name="姓名" prop="name" ></sa-td>
 					<sa-td name="年龄" prop="age" type="num"></sa-td>
 					<sa-td name="性别" prop="sex" type="enum" :jv="{1: '男', 2: '女'}"></sa-td>
-					<sa-td name="手机号" prop="phone" ></sa-td>
-					<sa-td name="联系地址" prop="address" ></sa-td>
-					<sa-td name="身份证号" prop="idCard" ></sa-td>
+					<sa-td name="手机号" width="110px" prop="phone" ></sa-td>
+					<sa-td name="联系地址" width="150px" prop="address" ></sa-td>
+					<sa-td name="身份证号" width="170px" prop="idCard" ></sa-td>
 					<!-- <sa-td name="身份证照片" prop="idCardImg" type="img-list"></sa-td> -->
 					<sa-td name="驾驶证号" prop="drivingLicenseId" ></sa-td>
 					<sa-td name="驾驶证照片" prop="drivingLicenseImg" type="img-list"></sa-td>
 					<sa-td name="车辆行驶证号" prop="vehicleDrivingId" width="120px" ></sa-td>
 					<sa-td name="车辆行驶证照片" prop="vehicleDrivingImg" type="img-list"></sa-td>
 					<sa-td name="车辆前脸照" prop="vehicleImg" type="img-list"></sa-td>
-					<sa-td name="注册时间" prop="registerTime" ></sa-td> 	
 					<el-table-column label="操作" fixed="right"  width="240px">
 						<template slot-scope="s">
 							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
@@ -60,6 +64,8 @@
 				<!-- ------------- 分页 ------------- -->
 				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
 			</div>
+			<!-- 上传文件 -->
+			<input ref="fileInput" type="file" style="display: none;" @click="handleFile(event)"></input>
 		</div>
 		<script>
 			var app = new Vue({
@@ -70,7 +76,7 @@
 				el: '.vue-box',
 				data: {
 					p: { // 查询参数
-						id: '',		// 主键
+						// id: '',		// 主键
 						name: '',		// 姓名
 						age: '',		// 年龄
 						sex: '',		// 性别性别(1=男,2=女)
@@ -81,7 +87,6 @@
 						idCard: '',		// 身份证号
 						drivingLicenseId: '',		// 驾驶证号
 						vehicleDrivingId: '',		// 车辆行驶证号
-						registerTime: '',		// 注册时间
 						pageNo: 1,		// 当前页
 						pageSize: 10,	// 页大小
 						sortType: 0		// 排序方式
@@ -145,6 +150,25 @@
 							}.bind(this))
 						}.bind(this));
 					},
+					exportFile(){
+						sa.ajax('/transport-server/TbDriver/driverOutport', {
+							// keyword: "",
+							// filepath: ""
+						}, function(res){
+						})
+					},
+					importMsg(){
+						this.$refs.fileInput.click()
+						console.log("导入")
+					},
+					handleFile(event){
+						console.log(event)
+						const file = event.target.files[0]
+						sa.ajax('/transport-server/TbDriver/driverImport', {file}, function(res){
+							// sa.ok('导入成功');
+							// sa.f5TableHeight();
+						})
+					}
 				},
 				created: function() {
 					this.f5();

+ 43 - 35
sa-view/tb-goods-type/tb-goods-type-add.html

@@ -6,15 +6,14 @@
 		<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>
+		<link rel="stylesheet" href="../../static/sa.css"> 
+		<script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
+		<script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
+		<script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
+		<script src="https://unpkg.com/jquery@3.4.1/dist/jquery.min.js"></script>
+		<script src="https://www.layuicdn.com/layer-v3.1.1/layer.js"></script>
 		<script src="../../static/sa.js"></script>
 		<script src="../../static/kj/upload-util.js"></script>
-
 		<style type="text/css">
 			.c-panel .el-form .c-label{width: 7em !important;}
 			.c-panel .el-form .el-input, .c-panel .el-form .el-textarea__inner{width: 250px;}
@@ -28,10 +27,17 @@
                     <div class="c-title" v-if="id == 0">数据添加</div>
 					<div class="c-title" v-else>数据修改</div>
 					<el-form v-if="m">
-						<sa-item type="text" name="名称" v-model="m.name" br></sa-item>
+						<sa-item type="text" name="类别名称" v-model="m.name" br></sa-item>
 						<sa-item type="text" name="排序" v-model="m.sort" br></sa-item>
 						<sa-item type="text" name="编号" v-model="m.no" br></sa-item>
-						<!-- <sa-item type="enum" name="删除状态" v-model="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" jtype="3" br></sa-item> -->
+						<sa-item type="text" name="创建时间" v-model="m.createTime" br></sa-item>
+						<sa-item type="text" name="创建人编号" v-model="m.createBy" br></sa-item>
+						<sa-item type="text" name="创建人名称" v-model="m.createName" br></sa-item>
+						<sa-item type="text" name="更新时间" v-model="m.updateTime" br></sa-item>
+						<sa-item type="text" name="更新人编号" v-model="m.updateBy" br></sa-item>
+						<sa-item type="text" name="更新人名称" v-model="m.updateName" br></sa-item>
+						<sa-item type="enum" name="删除状态" v-model="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" jtype="3" br></sa-item>
+						<sa-item type="text" name="父类型id" v-model="m.parentId" v-if="sa.p('parentId', 'nof') == 'nof'" br></sa-item>
 						<sa-item name="" class="s-ok" br>
 							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
 						</sa-item>
@@ -45,39 +51,40 @@
 			</div>
 		</div>
         <script>
-
+			
 			var app = new Vue({
 				components: {
 					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue')
 				},
 				el: '.vue-box',
 				data: {
-					id: sa.p('id', 0),		// 获取超链接中的id参数(0=添加,非0=修改)
-					m: null,		// 实体对象
+					id: sa.p('id', 0),		// 获取超链接中的id参数(0=添加,非0=修改) 
+					m: null,		// 实体对象 
 				},
 				methods: {
-					// 创建一个 默认Model
+					// 创建一个 默认Model 
 					createModel: function() {
 						return {
-							id: '',		// 主键
-							name: '',		// 名称
-							sort: '',		// 排序
-							no: '',		// 编号
-							createTime: '',		// 创建时间
-							createBy: '',		// 创建人编号
-							createName: '',		// 创建人名称
-							updateTime: '',		// 更新时间
-							updateBy: '',		// 更新人编号
-							updateName: '',		// 更新人名称
-							deleteStatus: '',		// 删除状态(0=禁用,1=启用)
+							id: '',		// 主键 
+							name: '',		// 类别名称 
+							sort: '',		// 排序 
+							no: '',		// 编号 
+							createTime: '',		// 创建时间 
+							createBy: '',		// 创建人编号 
+							createName: '',		// 创建人名称 
+							updateTime: '',		// 更新时间 
+							updateBy: '',		// 更新人编号 
+							updateName: '',		// 更新人名称 
+							deleteStatus: '',		// 删除状态(0=禁用,1=启用) 
+							parentId: sa.p('parentId', '-1'),		// 父类型id 
 						}
 					},
-					// 提交数据
+					// 提交数据 
 					ok: function(){
-						// 表单校验
+						// 表单校验 
 						let m = this.m;
 						// sa.checkNull(m.id, '请输入 [主键]');
-						sa.checkNull(m.name, '请输入 [名称]');
+						sa.checkNull(m.name, '请输入 [类别名称]');
 						sa.checkNull(m.sort, '请输入 [排序]');
 						sa.checkNull(m.no, '请输入 [编号]');
 						sa.checkNull(m.createTime, '请输入 [创建时间]');
@@ -87,11 +94,12 @@
 						sa.checkNull(m.updateBy, '请输入 [更新人编号]');
 						sa.checkNull(m.updateName, '请输入 [更新人名称]');
 						sa.checkNull(m.deleteStatus, '请输入 [删除状态]');
-
+						sa.checkNull(m.parentId, '请输入 [父类型id]');
+				
 						// 开始增加或修改
 						if(this.id <= 0) {	// 添加
 							sa.ajax('/level-one-server/TbGoodsType/add', m, function(res){
-								sa.alert('增加成功', this.clean);
+								sa.alert('增加成功', this.clean); 
 							}.bind(this));
 						} else {	// 修改
 							sa.ajax('/level-one-server/TbGoodsType/update', m, function(res){
@@ -105,15 +113,15 @@
 							this.m = this.createModel();
 						} else {
 							parent.app.f5();		// 刷新父页面列表
-							sa.closeCurrIframe();	// 关闭本页
+							sa.closeCurrIframe();	// 关闭本页 
 						}
 					}
 				},
 				mounted: function(){
-					// 初始化数据
-					if(this.id <= 0) {
+					// 初始化数据 
+					if(this.id <= 0) {	
 						this.m = this.createModel();
-					} else {
+					} else {	
 						sa.ajax('/level-one-server/TbGoodsType/getById?id=' + this.id, function(res) {
 							this.m = res.data;
 							if(res.data == null) {
@@ -123,7 +131,7 @@
 					}
 				}
 			})
-
+			
 		</script>
 	</body>
-</html>
+</html>

+ 18 - 12
sa-view/tb-goods-type/tb-goods-type-info.html

@@ -5,17 +5,15 @@
 		<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>
+		<link rel="stylesheet" href="../../static/sa.css"> 
+		<script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
+		<script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
+		<script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
+		<script src="https://unpkg.com/jquery@3.4.1/dist/jquery.min.js"></script>
+		<script src="https://www.layuicdn.com/layer-v3.1.1/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;}
 		</style>
@@ -26,10 +24,18 @@
 			<div class="s-body">
 				<div class="c-panel">
 					<el-form v-if="m">
-						<sa-info name="名称" br>{{m.name}}</sa-info>
+						<sa-info type="num" name="主键" :value="m.id" br></sa-info>
+						<sa-info name="类别名称" br>{{m.name}}</sa-info>
 						<sa-info name="排序" br>{{m.sort}}</sa-info>
 						<sa-info name="编号" br>{{m.no}}</sa-info>
-						<!-- <sa-info type="enum" name="删除状态" :value="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" br></sa-info> -->
+						<sa-info name="创建时间" br>{{m.createTime}}</sa-info>
+						<sa-info name="创建人编号" br>{{m.createBy}}</sa-info>
+						<sa-info name="创建人名称" br>{{m.createName}}</sa-info>
+						<sa-info name="更新时间" br>{{m.updateTime}}</sa-info>
+						<sa-info name="更新人编号" br>{{m.updateBy}}</sa-info>
+						<sa-info name="更新人名称" br>{{m.updateName}}</sa-info>
+						<sa-info type="enum" name="删除状态" :value="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" br></sa-info>
+						<sa-info name="父类型id" br>{{m.parentId}}</sa-info>
 					</el-form>
 				</div>
 			</div>
@@ -46,7 +52,7 @@
 				},
 				el: '.vue-box',
 				data: {
-					id: sa.p('id', 0),	// 获取数据ID
+					id: sa.p('id', 0),	// 获取数据ID 
 					m: null
 				},
 				methods: {
@@ -60,7 +66,7 @@
 					}.bind(this))
 				}
 			})
-
+			
 		</script>
 	</body>
 </html>

+ 43 - 57
sa-view/tb-goods-type/tb-goods-type-list.html

@@ -6,27 +6,24 @@
 		<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>
+		<link rel="stylesheet" href="../../static/sa.css"> 
+		<script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
+		<script src="https://unpkg.com/element-ui@2.13.0/lib/index.js"></script>
+		<script src="https://unpkg.com/http-vue-loader@1.4.2/src/httpVueLoader.js"></script>
+		<script src="https://unpkg.com/jquery@3.4.1/dist/jquery.min.js"></script>
+		<script src="https://www.layuicdn.com/layer-v3.1.1/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">
 				<!-- ------------- 检索参数 ------------- -->
-				<!-- <div class="c-title">检索参数</div> -->
+				<div class="c-title">检索参数</div>
 				<el-form ref="form" :model='p' @submit.native.prevent>
-					<sa-item type="text" name="名称" v-model="p.name"></sa-item>
+					<sa-item type="text" name="类别名称" v-model="p.name"></sa-item>
 					<sa-item type="text" name="排序" v-model="p.sort"></sa-item>
 					<sa-item type="text" name="编号" v-model="p.no"></sa-item>
-					<!-- <sa-item type="enum" name="删除状态" v-model="p.deleteStatus"
-						:jv="{0: '禁用', 1: '启用'}" jtype="2" def="不限"></sa-item> -->
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
 				</el-form>
 				<div class="fast-btn">
@@ -35,65 +32,54 @@
 					<el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
-				<el-table class="data-table" ref="data-table" :data="dataList" >
+				<el-table class="data-table" ref="data-table" :data="dataList"  row-key="id" border @expand-change="sa.f5TableHeight()">
 					<sa-td type="selection"></sa-td>
-					<sa-td name="主键" prop="id" type="num"></sa-td>
-					<sa-td name="名称" prop="name" ></sa-td>
+					<sa-td name="类别名称" prop="name" ></sa-td>
 					<sa-td name="排序" prop="sort" ></sa-td>
 					<sa-td name="编号" prop="no" ></sa-td>
-					<sa-td name="创建时间" prop="createTime" ></sa-td>
-					<sa-td name="创建人编号" prop="createBy" ></sa-td>
-					<sa-td name="创建人名称" prop="createName" ></sa-td>
-					<sa-td name="更新时间" prop="updateTime" ></sa-td>
-					<sa-td name="更新人编号" prop="updateBy" ></sa-td>
-					<sa-td name="更新人名称" prop="updateName" ></sa-td>
-					<sa-td name="删除状态" prop="deleteStatus" type="switch" :jv="{0: '禁用', 1: '启用'}" @change="s => updateDeleteStatus(s.row)"></sa-td>
-					<el-table-column label="操作" fixed="right"  width="240px">
+					<!-- <sa-td name="删除状态" prop="deleteStatus" type="switch" :jv="{0: '禁用', 1: '启用'}" @change="s => updateDeleteStatus(s.row)"></sa-td>
+					<sa-td name="父类型id" prop="parentId" ></sa-td> -->
+					<el-table-column label="操作" fixed="right"  width="320px">
 						<template slot-scope="s">
 							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
 							<el-button v-if="sa.isAuth('tb-goods-type-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
+							<el-button v-if="sa.isAuth('tb-goods-type-add')" class="c-btn" type="primary" icon="el-icon-plus" @click="addChildren(s.row)">添加子级</el-button>
 							<el-button v-if="sa.isAuth('tb-goods-type-del')" class="c-btn" type="danger" icon="el-icon-delete" @click="del(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>
+				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()" :sizes="[1000]"></sa-item>
 			</div>
 		</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'),
+					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),  
+					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),		
 				},
 				el: '.vue-box',
 				data: {
-					p: { // 查询参数
-						id: '',		// 主键
-						name: '',		// 名称
-						sort: '',		// 排序
-						no: '',		// 编号
-						createTime: '',		// 创建时间
-						createBy: '',		// 创建人编号
-						createName: '',		// 创建人名称
-						updateTime: '',		// 更新时间
-						updateBy: '',		// 更新人编号
-						updateName: '',		// 更新人名称
-						deleteStatus: '',		// 删除状态(0=禁用,1=启用)
-						pageNo: 1,		// 当前页
-						pageSize: 10,	// 页大小
-						sortType: 0		// 排序方式
+					p: { // 查询参数  
+						name: '',		// 类别名称 
+						sort: '',		// 排序 
+						no: '',		// 编号 
+						// deleteStatus: '',		// 删除状态(0=禁用,1=启用) 
+						// parentId: '',		// 父类型id 
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 0		// 排序方式 
 					},
 					dataCount: 0,
-					dataList: [], // 数据集合
+					dataList: [], // 数据集合 
 				},
 				methods: {
 					// 刷新
 					f5: function() {
-						sa.ajax('/level-one-server/TbGoodsType/getList', sa.removeNull(this.p), function(res) {
+						sa.ajax('/level-one-server/TbGoodsType/getTree', sa.removeNull(this.p), function(res) {
 							this.dataList = res.data; // 数据
-							this.dataCount = res.dataCount; // 数据总数
-							sa.f5TableHeight();		// 刷新表格高度
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight();		// 刷新表格高度 
 						}.bind(this));
 					},
 					// 查看
@@ -116,46 +102,46 @@
 					add: function(data) {
 						sa.showIframe('新增数据', 'tb-goods-type-add.html?id=-1', '1000px', '90%');
 					},
+					// 新增子级
+					addChildren: function(data) {
+						sa.showIframe('新增数据', 'tb-goods-type-add.html?id=-1&parentId=' + data.id, '1000px', '90%');
+					},
 					// 删除
 					del: function(data) {
 						sa.confirm('是否删除,此操作不可撤销', function() {
 							sa.ajax('/level-one-server/TbGoodsType/delete?id=' + data.id, function(res) {
-								sa.arrayDelete(this.dataList, data);
-								sa.ok('删除成功');
-								sa.f5TableHeight();		// 刷新表格高度
+								this.f5();
 							}.bind(this))
 						}.bind(this));
 					},
 					// 批量删除
 					deleteByIds: function() {
-						// 获取选中元素的id列表
+						// 获取选中元素的id列表 
 						let selection = this.$refs['data-table'].selection;
 						let ids = sa.getArrayField(selection, 'id');
 						if(selection.length == 0) {
 							return sa.msg('请至少选择一条数据')
 						}
-						// 提交删除
+						// 提交删除 
 						sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
-							sa.ajax('/TbGoodsType/deleteByIds', {ids: ids.join(',')}, function(res) {
-								sa.arrayDelete(this.dataList, selection);
-								sa.ok('删除成功');
-								sa.f5TableHeight();		// 刷新表格高度
+							sa.ajax('/level-one-server/TbGoodsType/deleteByIds', {ids: ids.join(',')}, function(res) {
+								this.f5();
 							}.bind(this))
 						}.bind(this));
 					},
 					// 改 - 删除状态(0=禁用,1=启用)
 					updateDeleteStatus: function(data) {
-						// 声明变量记录是否成功
-						var isOk = false;
+						// 声明变量记录是否成功 
+						var isOk = false;	
 						var oldValue = data.deleteStatus;
 						var ajax = sa.ajax('/level-one-server/TbGoodsType/updateDeleteStatus', {id: data.id, value: data.deleteStatus}, function(res) {
 							isOk = true;
 							sa.msg('修改成功');
 						}.bind(this));
-						// 如果未能修改成功, 则回滚
+						// 如果未能修改成功, 则回滚 
 						$.when(ajax).done(function() {
 							if(isOk == false) {
-								data.status = oldValue;
+								data.status = oldValue; 
 							}
 						})
 					},

+ 156 - 132
sa-view/tb-trade-area/tb-trade-area-list.html

@@ -1,142 +1,166 @@
 <!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">
-				<!-- ------------- 检索参数 ------------- -->
-				<!-- <div class="c-title">检索参数</div> -->
-				<el-form ref="form" :model='p' @submit.native.prevent>
-					<sa-item type="text" name="名称" v-model="p.name"></sa-item>
-					<sa-item type="text" name="地址" v-model="p.address"></sa-item>
-					<!-- 未识别类型:删除状态: p.deleteStatus 请检查配置 -->
-					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
-				</el-form>
-				<div class="fast-btn">
-					<el-button v-if="sa.isAuth('tb-trade-area-add')" size="mini" type="primary" @click="add()">新增</el-button>
-					<el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
-					<el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
-				</div>
-				<!-- ------------- 数据列表 ------------- -->
-				<el-table class="data-table" ref="data-table" :data="dataList" >
-					<sa-td type="selection"></sa-td>
-					<sa-td name="名称" prop="name" ></sa-td>
-					<sa-td name="地址详情" prop="detailAddress" ></sa-td>
-					<sa-td name="地址" prop="address" ></sa-td>
-					<el-table-column label="操作" fixed="right"  width="240px">
-						<template slot-scope="s">
-							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
-							<el-button v-if="sa.isAuth('tb-trade-area-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
-							<el-button v-if="sa.isAuth('tb-trade-area-del')" class="c-btn" type="danger" icon="el-icon-delete" @click="del(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>
+<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">
+			<!-- ------------- 检索参数 ------------- -->
+			<!-- <div class="c-title">检索参数</div> -->
+			<el-form ref="form" :model='p' @submit.native.prevent>
+				<sa-item type="text" name="名称" v-model="p.name"></sa-item>
+				<sa-item type="text" name="地址" v-model="p.address"></sa-item>
+				<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+				<el-button icon="el-icon-refresh" type="info" @click="sa.f5()">重置</el-button>
+			</el-form>
+			<div class="fast-btn">
+				<el-button v-if="sa.isAuth('tb-trade-area-add')" size="mini" type="primary"
+					@click="add()">新增</el-button>
+				<el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
+				<!-- <el-button size="mini" type="info" @click="sa.f5()">重置</el-button> -->
+				<el-button size="mini" type="danger" @click="deleteByIds()">批量删除</el-button>
+				<el-button size="mini" type="primary" @click="importMsg()">导入</el-button>
+				<el-button size="mini" type="success" @click="exportFile()">导出</el-button>
 			</div>
+			<!-- ------------- 数据列表 ------------- -->
+			<el-table class="data-table" ref="data-table" :data="dataList">
+				<sa-td type="selection"></sa-td>
+				<sa-td name="名称" prop="name"></sa-td>
+				<sa-td name="地址详情" prop="detailAddress"></sa-td>
+				<sa-td name="地址" prop="address"></sa-td>
+				<el-table-column label="操作" fixed="right" width="240px">
+					<template slot-scope="s">
+						<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
+						<el-button v-if="sa.isAuth('tb-trade-area-edit')" class="c-btn" type="primary"
+							icon="el-icon-edit" @click="update(s.row)">修改</el-button>
+						<el-button v-if="sa.isAuth('tb-trade-area-del')" class="c-btn" type="danger"
+							icon="el-icon-delete" @click="del(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>
-		<script>
-			var app = new Vue({
-				components: {
-					"sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
-					"sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
+		<!-- 上传文件 -->
+		<input ref="fileInput" type="file" style="display: none;" @click="handleFile(event)"></input>
+	</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: {
+				p: { // 查询参数
+					name: '',		// 名称
+					// addressIds: '',		//
+					detailAddress: '',		// 地址详情
+					address: '',		// 地址
+					pageNo: 1,		// 当前页
+					pageSize: 10,	// 页大小
+					sortType: 0		// 排序方式
+				},
+				dataCount: 0,
+				dataList: [], // 数据集合
+			},
+			methods: {
+				// 刷新
+				f5: function () {
+					sa.ajax('/level-one-server/TbTradeArea/getList', sa.removeNull(this.p), function(res) {
+						this.dataList = res.data; // 数据
+						this.dataCount = res.dataCount; // 数据总数
+						console.log(res)
+						sa.f5TableHeight();		// 刷新表格高度
+					}.bind(this));
+				},
+				// 查看
+				get: function (data) {
+					sa.showIframe('数据详情', 'tb-trade-area-info.html?id=' + data.id, '1050px', '90%');
+				},
+				// 查看 - 根据选中的
+				getBySelect: function (data) {
+					var selection = this.$refs['data-table'].selection;
+					if (selection.length == 0) {
+						return sa.msg('请选择一条数据')
+					}
+					selection.forEach(element => {
+						this.get(element)
+					});
+					// this.get(selection[0]);
+				},
+				// 修改
+				update: function (data) {
+					sa.showIframe('修改数据', 'tb-trade-area-add.html?id=' + data.id, '1000px', '90%');
 				},
-				el: '.vue-box',
-				data: {
-					p: { // 查询参数
-						id: '',		// 主键
-						name: '',		// 名称
-						addressIds: '',		//
-						detailAddress: '',		// 地址详情
-						address: '',		// 地址
-						createBy: '',		// 创建者id
-						createName: '',		// 创建者名称
-						updateBy: '',		// 更新者id
-						updateName: '',		// 更新者名称
-						pageNo: 1,		// 当前页
-						pageSize: 10,	// 页大小
-						sortType: 0		// 排序方式
-					},
-					dataCount: 0,
-					dataList: [], // 数据集合
+				// 新增
+				add: function (data) {
+					sa.showIframe('新增数据', 'tb-trade-area-add.html?id=-1', '1000px', '90%');
 				},
-				methods: {
-					// 刷新
-					f5: function() {
-						sa.ajax('/level-one-server/TbTradeArea/getList', sa.removeNull(this.p), function(res) {
-							this.dataList = res.data; // 数据
-							this.dataCount = res.dataCount; // 数据总数
+				// 删除
+				del: function (data) {
+					sa.confirm('是否删除,此操作不可撤销', function () {
+						sa.ajax('/level-one-server/TbTradeArea/delete?id=' + data.id, function (res) {
+							sa.arrayDelete(this.dataList, data);
+							sa.ok('删除成功');
 							sa.f5TableHeight();		// 刷新表格高度
-						}.bind(this));
-					},
-					// 查看
-					get: function(data) {
-						sa.showIframe('数据详情', 'tb-trade-area-info.html?id=' + data.id, '1050px', '90%');
-					},
-					// 查看 - 根据选中的
-					getBySelect: function(data) {
-						var selection = this.$refs['data-table'].selection;
-						if(selection.length == 0) {
-							return sa.msg('请选择一条数据')
-						}
-						this.get(selection[0]);
-					},
-					// 修改
-					update: function(data) {
-						sa.showIframe('修改数据', 'tb-trade-area-add.html?id=' + data.id, '1000px', '90%');
-					},
-					// 新增
-					add: function(data) {
-						sa.showIframe('新增数据', 'tb-trade-area-add.html?id=-1', '1000px', '90%');
-					},
-					// 删除
-					del: function(data) {
-						sa.confirm('是否删除,此操作不可撤销', function() {
-							sa.ajax('/level-one-server/TbTradeArea/delete?id=' + data.id, function(res) {
-								sa.arrayDelete(this.dataList, data);
-								sa.ok('删除成功');
-								sa.f5TableHeight();		// 刷新表格高度
-							}.bind(this))
-						}.bind(this));
-					},
-					// 批量删除
-					deleteByIds: function() {
-						// 获取选中元素的id列表
-						let selection = this.$refs['data-table'].selection;
-						let ids = sa.getArrayField(selection, 'id');
-						if(selection.length == 0) {
-							return sa.msg('请至少选择一条数据')
-						}
-						// 提交删除
-						sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
-							sa.ajax('/level-one-server/TbTradeArea/deleteByIds', {ids: ids.join(',')}, function(res) {
-								sa.arrayDelete(this.dataList, selection);
-								sa.ok('删除成功');
-								sa.f5TableHeight();		// 刷新表格高度
-							}.bind(this))
-						}.bind(this));
-					},
+						}.bind(this))
+					}.bind(this));
 				},
-				created: function() {
-					this.f5();
-					sa.onInputEnter();
+				// 批量删除
+				deleteByIds: function () {
+					// 获取选中元素的id列表
+					let selection = this.$refs['data-table'].selection;
+					let ids = sa.getArrayField(selection, 'id');
+					if (selection.length == 0) {
+						return sa.msg('请至少选择一条数据')
+					}
+					// 提交删除
+					sa.confirm('是否批量删除选中数据?此操作不可撤销', function () {
+						sa.ajax('/level-one-server/TbTradeArea/deleteByIds', { ids: ids.join(',') }, function (res) {
+							sa.arrayDelete(this.dataList, selection);
+							sa.ok('删除成功');
+							sa.f5TableHeight();		// 刷新表格高度
+						}.bind(this))
+					}.bind(this));
+				},
+				exportFile() {
+					sa.ajax('/transport-server/TbVehicle/vehicleOutport', {}, function (res) { })
+				},
+				importMsg() {
+					this.$refs.fileInput.click()
+					console.log("导入")
+				},
+				handleFile(event) {
+					// console.log(event)
+					const file = event.target.files[0]
+					sa.ajax('/transport-server/TbVehicle/vehicleImport', { file }, function (res) { })
 				}
-			})
-		</script>
-	</body>
-</html>
+			},
+			created: function () {
+				this.f5();
+				sa.onInputEnter();
+			}
+		})
+	</script>
+</body>
+
+</html>

+ 1 - 1
sa-view/tb-vehicle/tb-vehicle-add.html

@@ -97,7 +97,7 @@
 							vehiclePlate: '',		// 车牌
 							owner: '',		// 所有人
 							vehicleType: '',		// 车辆类型
-							parentId: '',		// 类型父id
+							// parentId: '',		// 类型父id
 							vehicleSize: '',		// 车辆尺寸
 							vehicleModel: '',		// 车辆品牌型号
 							vehicleLoad: '',		// 核定载质量

+ 37 - 9
sa-view/tb-vehicle/tb-vehicle-info.html

@@ -25,15 +25,42 @@
 			<div class="s-body">
 				<div class="c-panel">
 					<el-form v-if="m">
-						<sa-info name="车牌" br>{{m.vehiclePlate}}</sa-info>
-						<sa-info name="所有人" br>{{m.owner}}</sa-info>
-						<sa-info name="车辆类型" br>{{m.vehicleType}}</sa-info>
-						<sa-info name="类型父id" br>{{m.parentId}}</sa-info>
-						<sa-info name="车辆尺寸" br>{{m.vehicleSize}}</sa-info>
-						<sa-info name="车辆品牌型号" br>{{m.vehicleModel}}</sa-info>
-						<sa-info name="核定载质量" br>{{m.vehicleLoad}}</sa-info>
-						<sa-info name="车辆自重" br>{{m.vehicleWeight}}</sa-info>
-					
+
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="车牌" br>{{m.vehiclePlate}}</sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="所有人" br>{{m.owner}}</sa-info>
+							</el-col>
+						</el-row>
+
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="车辆类型" br>{{m.vehicleType}}</sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="车辆尺寸" br>{{m.vehicleSize}}</sa-info>
+							</el-col>
+						</el-row>
+						
+						<!-- <sa-info name="类型父id" br>{{m.parentId}}</sa-info> -->
+
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="车辆品牌型号" br>{{m.vehicleModel}}</sa-info>
+							</el-col>
+							<el-col :span="12">
+								<sa-info name="核定载质量" br>{{m.vehicleLoad}}</sa-info>
+							</el-col>
+						</el-row>
+						
+						<el-row :gutter="50">
+							<el-col :span="12">
+								<sa-info name="车辆自重" br>{{m.vehicleWeight}}</sa-info>
+							</el-col>
+						</el-row>
+						
 						<!-- <sa-info type="enum" name="审核状态" :value="m.auditStatus" :jv="{0: '待审核,1'}" br></sa-info>
 						<sa-info name="审核人" br>{{m.auditBy}}</sa-info>
 						<sa-info name="审核不通过原因" br>{{m.nopassReason}}</sa-info>
@@ -62,6 +89,7 @@
 				mounted: function() {
 					sa.ajax('/transport-server/TbVehicle/getById?id=' + this.id, function(res) {
 						this.m = res.data;
+						console.log(res.data)
 						if(res.data == null) {
 							sa.alert('未能查找到 id=' + this.id + " 详细数据");
 						}

+ 20 - 8
sa-view/tb-vehicle/tb-vehicle-list.html

@@ -25,18 +25,16 @@
 					<sa-item type="text" name="车牌" v-model="p.vehiclePlate"></sa-item>
 					<sa-item type="text" name="所有人" v-model="p.owner"></sa-item>
 					<sa-item type="text" name="车辆类型" v-model="p.vehicleType"></sa-item>
-					<!-- 未识别类型:删除状态: p.deleteStatus 请检查配置 -->
-					<!-- <sa-item type="enum" name="审核状态" v-model="p.auditStatus"
-						:jv="{0: '待审核,1'}" jtype="2" def="不限"></sa-item>
-					<sa-item type="text" name="审核人" v-model="p.auditBy"></sa-item>
-					<sa-item type="text" name="审核不通过原因" v-model="p.nopassReason"></sa-item>
-					<sa-item type="text" name="审核时间" v-model="p.auditTime"></sa-item> -->
 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
+					<el-button icon="el-icon-refresh" type="info" @click="sa.f5()">重置</el-button>
 				</el-form>
 				<div class="fast-btn">
 					<el-button v-if="sa.isAuth('tb-vehicle-add')" size="mini" type="primary" @click="add()">新增</el-button>
 					<el-button size="mini" type="success" @click="getBySelect()">查看</el-button>
-					<el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
+					<!-- <el-button size="mini" type="info" @click="sa.f5()">重置</el-button> -->
+					<el-button size="mini" type="danger" @click="deleteByIds()">批量删除</el-button>
+					<el-button size="mini" type="primary" @click="importMsg()">导入</el-button>
+					<el-button size="mini" type="success" @click="exportFile()">导出</el-button>
 				</div>
 				<!-- ------------- 数据列表 ------------- -->
 				<el-table class="data-table" ref="data-table" :data="dataList" >
@@ -44,7 +42,7 @@
 					<sa-td name="车牌" prop="vehiclePlate" ></sa-td>
 					<sa-td name="所有人" prop="owner" ></sa-td>
 					<sa-td name="车辆类型" prop="vehicleType" ></sa-td>
-					<sa-td name="类型父id" prop="parentId" ></sa-td>
+					<!-- <sa-td name="类型父id" prop="parentId" ></sa-td> -->
 					<sa-td name="车辆尺寸" prop="vehicleSize" ></sa-td>
 					<sa-td name="车辆品牌型号" prop="vehicleModel" ></sa-td>
 					<sa-td name="核定载质量" prop="vehicleLoad" ></sa-td>
@@ -64,6 +62,8 @@
 				<!-- ------------- 分页 ------------- -->
 				<sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()"></sa-item>
 			</div>
+			<!-- 上传文件 -->
+			<input ref="fileInput" type="file" style="display: none;" @click="handleFile(event)"></input>
 		</div>
 		<script>
 			var app = new Vue({
@@ -154,6 +154,18 @@
 							}.bind(this))
 						}.bind(this));
 					},
+					exportFile(){
+						sa.ajax('/transport-server/TbVehicle/vehicleOutport', {}, function(res){})
+					},
+					importMsg(){
+						this.$refs.fileInput.click()
+						console.log("导入")
+					},
+					handleFile(event){
+						// console.log(event)
+						const file = event.target.files[0]
+						sa.ajax('/transport-server/TbVehicle/vehicleImport', {file}, function(res){})
+					}
 				},
 				created: function() {
 					this.f5();