Jelajahi Sumber

Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder

linbl 7 bulan lalu
induk
melakukan
75dac0b989

+ 32 - 18
login.html

@@ -191,7 +191,7 @@
 			// 所有参考属性
 			var page_title = '你好,欢迎登录系统'; // 页面标题
 			var key = 'admin'; // 默认的账号
-			var password = '123456'; // 默认的password   fdsg@3,;27Rf
+			var password = 'admin123'; // 默认的password   fdsg@3,;27Rf
 			var logo = 'sa-frame/admin-logo.png'; // logo地址,为空字符串则不显示
 			var codeKey = '';
 			var pKey = '';
@@ -232,27 +232,41 @@
 				let res = encrypt.encrypt(p.password);
 				let s = encrypt.decrypt(res);
 				p.password = res;
-				// 3、请求后台
-				sa.ajax('/sp-admin/AccAdmin/doLogin', p, function(res) {
-					// 写入token
-					if (res.data.tokenInfo) {
-						localStorage.tokenName = res.data.tokenInfo.tokenName;
-						localStorage.tokenValue = res.data.tokenInfo.tokenValue;
-					}
-					// 写入权限码
-					sa.setAuth(res.data.per_list);
-					// 打个招呼,进入 index.html
-					sa.msg('登录成功,欢迎你:' + p.key);
-					setTimeout(function() {
-						if (parent == window) {
-							location.href = "index.html";
+				$.ajax({
+					url: sa.cfg.api_url + '/sp-admin/AccAdmin/doLogin',
+					data: p,
+					method: 'post',
+					success: function(res) {
+						let code = res.code;
+						if (code == 200) {
+							successLogin(res)
 						} else {
-							sa.closeCurrIframe();
-							parent.location.reload();
+							let msg=res.msg;
+							sa.error(msg)
+							getCaptcha();
 						}
-					}, 500);
+					}
 				})
 			}
+			function successLogin(res){
+				// 写入token
+				if (res.data.tokenInfo) {
+					localStorage.tokenName = res.data.tokenInfo.tokenName;
+					localStorage.tokenValue = res.data.tokenInfo.tokenValue;
+				}
+				// 写入权限码
+				sa.setAuth(res.data.per_list);
+				// 打个招呼,进入 index.html
+				sa.msg('登录成功');
+				setTimeout(function() {
+					if (parent == window) {
+						location.href = "index.html";
+					} else {
+						sa.closeCurrIframe();
+						parent.location.reload();
+					}
+				}, 500);
+			}
 			// 你所有要改的代码全在这里   ↑↑↑↑↑
 		</script>
 		<script type="text/javascript">

+ 111 - 45
sa-frame/menu-list-sp.js

@@ -61,13 +61,12 @@ window.menuList.unshift({
 		parent: true,
 		icon: 'el-icon-unlock',
 		info: '对系统角色权限的分配等设计,敏感度较高,请谨慎授权',
-		childList: [
-			{
+		childList: [{
 				id: 'admin-list',
 				name: '用户列表',
 				url: 'sa-view-sp/sp-admin/admin-list.html',
 				info: '所有管理员账号'
-			},{
+			}, {
 				id: 'role-list',
 				name: '角色列表',
 				url: 'sa-view-sp/sp-role/role-list.html',
@@ -95,7 +94,27 @@ window.menuList.unshift({
 		icon: 'el-icon-setting',
 		parent: true,
 		info: '有关系统的一些配置',
-		childList: [
+		childList: [{
+				id: 'tb-app',
+				name: 'APK管理',
+				url: 'sa-view/tb-app/tb-app-list.html',
+				childList: [{
+						id: 'tb-app-add',
+						name: 'APK管理添加',
+						isShow: false
+					},
+					{
+						id: 'tb-app-edit',
+						name: 'APK管理更新',
+						isShow: false
+					},
+					{
+						id: 'tb-app-del',
+						name: 'APK管理删除',
+						isShow: false
+					},
+				]
+			},
 			{
 				id: 'sp-cfg-app',
 				name: '系统对公配置',
@@ -234,8 +253,7 @@ window.menuList.unshift({
 				icon: 'el-icon-user',
 				name: '边民管理',
 				url: 'sa-view/tb-people/tb-people-list.html',
-				childList: [
-					{
+				childList: [{
 						id: 'tb-people-add',
 						name: '边民添加',
 						isShow: false
@@ -262,10 +280,21 @@ window.menuList.unshift({
 				icon: 'el-icon-folder-opened',
 				name: '个体户(开票)',
 				url: 'sa-view/tb-people-tax-account/tb-people-tax-account-list.html',
-				childList: [
-					{id:'tb-people-tax-account-add',name:'个体户(开票)添加',isShow:false},
-					{id:'tb-people-tax-account-edit',name:'个体户(开票)更新',isShow:false},
-					{id:'tb-people-tax-account-del',name:'个体户(开票)删除',isShow:false},
+				childList: [{
+						id: 'tb-people-tax-account-add',
+						name: '个体户(开票)添加',
+						isShow: false
+					},
+					{
+						id: 'tb-people-tax-account-edit',
+						name: '个体户(开票)更新',
+						isShow: false
+					},
+					{
+						id: 'tb-people-tax-account-del',
+						name: '个体户(开票)删除',
+						isShow: false
+					},
 				]
 			},
 
@@ -375,10 +404,10 @@ window.menuList.unshift({
 				name: '个人收购商',
 				url: 'sa-view/tb-purchaser-personal/tb-purchaser-personal-list.html',
 				childList: [{
-					id: 'tb-purchaser-add',
-					name: '收购商添加',
-					isShow: false
-				},
+						id: 'tb-purchaser-add',
+						name: '收购商添加',
+						isShow: false
+					},
 					{
 						id: 'tb-purchaser-edit',
 						name: '收购商更新',
@@ -398,10 +427,10 @@ window.menuList.unshift({
 				name: '合作社列表',
 				url: 'sa-view/tb-cooperative/tb-cooperative-list.html',
 				childList: [{
-					id: 'tb-cooperative-add',
-					name: '添加合作社',
-					isShow: false
-				},
+						id: 'tb-cooperative-add',
+						name: '添加合作社',
+						isShow: false
+					},
 					{
 						id: 'tb-cooperative-edit',
 						name: '更新合作社',
@@ -504,8 +533,7 @@ window.menuList.unshift({
 				icon: 'el-icon-user-solid',
 				name: '账号管理',
 				url: 'sa-view/app-user/app-user-list.html',
-				childList: [
-					{
+				childList: [{
 						id: 'app-user-add',
 						name: '添加',
 						isShow: false
@@ -597,19 +625,34 @@ window.menuList.unshift({
 				id: 'listing-manage',
 				name: '上架管理',
 				parent: true,
+				childList: [{
+					id: 'listing-management',
+					name: '商品整车列表',
+					url: 'sa-view/listing-management/listing-management.html',
+					childList: [{
+						id: 'tb-order-edit-price',
+						name: '修改上架金额',
+						isShow: false
+					}]
+				}]
+			},
+			{
+				id: 'returns-chargebacks-list',
+				name: '退运/单管理',
+				parent: true,
+				//icon: 'el-icon-s-grid',
 				childList: [
 					{
-						id: 'listing-management',
-						name: '商品整车列表',
-						url: 'sa-view/listing-management/listing-management.html',
-						childList: [
-							{
-								id: 'tb-order-edit-price',
-								name: '修改上架金额',
-								isShow: false
-							}
-						]
-					}
+						id: 'ht-returns-settlement',
+						name: '退运订单',
+						url: 'sa-view/ht-settlement-error/ht-trade-returns-list.html'
+					},
+					{
+						id: 'ht-chargebacks-settlement',
+						name: '退单订单',
+						url: 'sa-view/ht-settlement-error/ht-trade-chargebacks-list.html'
+					},
+
 				]
 			},
 			{
@@ -617,8 +660,7 @@ window.menuList.unshift({
 				name: '订单管理',
 				parent: true,
 				//icon: 'el-icon-s-grid',
-				childList: [
-					{
+				childList: [{
 						id: 'ht-trade-settlement',
 						name: '进境结算单',
 						url: 'sa-view/ht-trade-settlement/ht-trade-settlement-list.html',
@@ -695,28 +737,52 @@ window.menuList.unshift({
 						id: 'tb-import-order',
 						name: '进口申报单',
 						url: 'sa-view/tb-import-order/tb-import-order-list.html',
-						childList: [
-							{id:'tb-import-order-add',name:'订单添加',isShow:false},
-							{id:'tb-import-order-edit',name:'订单更新',isShow:false},
-							{id:'tb-import-order-del',name:'订单删除',isShow:false},
+						childList: [{
+								id: 'tb-import-order-add',
+								name: '订单添加',
+								isShow: false
+							},
+							{
+								id: 'tb-import-order-edit',
+								name: '订单更新',
+								isShow: false
+							},
+							{
+								id: 'tb-import-order-del',
+								name: '订单删除',
+								isShow: false
+							},
 						]
 					},
 					{
 						id: 'tb-import-order-judge',
 						name: '互助委托协议审核',
 						url: 'sa-view/tb-import-order/tb-import-order-judge.html',
-						childList: [
-							{id:'tb-import-order-do-judge',name:'审核',isShow:false},
-						]
+						childList: [{
+							id: 'tb-import-order-do-judge',
+							name: '审核',
+							isShow: false
+						}, ]
 					},
 					{
 						id: 'tb-import-goods',
 						name: '进口申报单商品管理',
 						url: 'sa-view/tb-import-goods/tb-import-goods-list.html',
-						childList: [
-							{id:'tb-import-goods-add',name:'订单添加',isShow:false},
-							{id:'tb-import-goods-edit',name:'订单更新',isShow:false},
-							{id:'tb-import-goods-del',name:'订单删除',isShow:false},
+						childList: [{
+								id: 'tb-import-goods-add',
+								name: '订单添加',
+								isShow: false
+							},
+							{
+								id: 'tb-import-goods-edit',
+								name: '订单更新',
+								isShow: false
+							},
+							{
+								id: 'tb-import-goods-del',
+								name: '订单删除',
+								isShow: false
+							},
 						]
 					},
 					{
@@ -878,4 +944,4 @@ window.menuList.unshift({
 		]
 	}
 
-);
+);

+ 1 - 1
sa-frame/menu-list.js

@@ -16,5 +16,5 @@
 
 // 定义菜单列表 
 var menuList =	[
-	
+
 ]

+ 5 - 36
sa-view/ht-trade-settlement/ht-trade-settlement-list.html

@@ -69,9 +69,12 @@
 						platSeqNo: '',		// 预申报编号
 						declareId: '',		// 申报单编号
 						goodsNames: '',		// 商品名称
+						returns:0,
+						chargebacks:0,
 						pageNo: 1,		// 当前页
 						pageSize: 10,	// 页大小
 						sortType: 0		// 排序方式
+						
 					},
 					dataCount: 0,
 					dataList: [], // 数据集合
@@ -90,43 +93,9 @@
 						sa.showIframe('数据详情', 'ht-trade-settlement-info.html?id=' + data.id, '1050px', '90%');
 					},
 					getOrder(data){
-						sa.showIframe('边民订单', 'ht-trade-settlement-order.html?platSeqNo='+data.platSeqNo, '90%', '94%');
-					},
-					// 修改
-					update: function(data) {
-						sa.showIframe('修改数据', 'ht-trade-settlement-add.html?id=' + data.id, '1000px', '90%');
-					},
-					// 新增
-					add: function(data) {
-						sa.showIframe('新增数据', 'ht-trade-settlement-add.html?id=-1', '1000px', '90%');
-					},
-					// 删除
-					del: function(data) {
-						sa.confirm('是否删除,此操作不可撤销', function() {
-							sa.ajax('/HtTradeSettlement/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('/HtTradeSettlement/deleteByIds', {ids: ids.join(',')}, function(res) {
-								sa.arrayDelete(this.dataList, selection);
-								sa.ok('删除成功');
-								sa.f5TableHeight();		// 刷新表格高度
-							}.bind(this))
-						}.bind(this));
+						sa.showIframe('边民订单', 'ht-trade-settlement-order.html?mainId='+data.id, '90%', '94%');
 					},
+				
 				},
 				created: function() {
 					this.f5();

+ 1 - 1
sa-view/ht-trade-settlement/ht-trade-settlement-order.html

@@ -100,7 +100,7 @@
 						tradeNo: '',		    // 订单号
 						buyUserName: '',		// 买家
 						enterpriseName: '',		// 商家名称
-						platSeqNo: sa.p('platSeqNo', 0),
+						saleMainId: sa.p('mainId', 0),
 						pageNo: 1,		// 当前页
 						pageSize: 20,	// 页大小
 						sortType: 0		// 排序方式

+ 2 - 0
sa-view/listing-management/listing-management.html

@@ -72,6 +72,8 @@
 						platSeqNo: '',		// 预申报编号
 						declareId: '',		// 申报单编号
 						goodsNames: '',		// 商品名称
+						returns:0,
+						chargebacks:0,
 						pageNo: 1,		// 当前页
 						pageSize: 10,	// 页大小
 						sortType: 0		// 排序方式

+ 2 - 0
sa-view/tb-order/tb-order-list.html

@@ -115,6 +115,8 @@
 						tradeNo: '',		    // 订单号
 						buyUserName: '',		// 买家
 						enterpriseName: '',		// 商家名称
+						returns:0,
+						chargebacks:0,
 						pageNo: 1,		// 当前页
 						pageSize: 20,	// 页大小
 						sortType: 0		// 排序方式

+ 1 - 1
sa-view/tb-port-news/tb-port-news-add.html

@@ -101,7 +101,7 @@
     						// 开始增加或修改
     						this.m.createTime = undefined;		// 不提交属性:创建时间
     						this.m.updateTime = undefined;		// 不提交属性:更新时间
-							console.log("m",m)
+							this.m.status=1;
     						if(this.id <= 0) {	// 添加
     							sa.ajax('/level-one-server/TbPortNews/add', m, function(res){
     								sa.alert('增加成功', this.clean);

+ 1 - 0
sa-view/tb-purchaser/tb-purchaser-list.html

@@ -39,6 +39,7 @@
 					<sa-td name="邮箱" prop="email" ></sa-td>
 					<sa-td name="审核状态" prop="judgeStatus">
 						<template slot-scope="scope">
+							{{scope.row.judgeStatus}}
 							<el-tag type="danger" v-if="scope.row.judgeStatus==0">未审核</el-tag>
 							<el-tag type="primary" v-if="scope.row.judgeStatus==1">审核通过</el-tag>
 							<el-tag type="danger" v-if="scope.row.judgeStatus==2">审核驳回</el-tag>

+ 1 - 1
static/sa.js

@@ -11,7 +11,7 @@ var sa = {
 	let app_url= host.indexOf('40')!==-1?'http://172.17.11.40:8018':'http://hs-server.tbgjhc.top:8018';
 	// 公司开发环境
 	var cfg_dev = {
-		api_url: 'http://192.168.3.15:8080', // 所有ajax请求接口父地址
+		api_url: 'http://127.0.0.1:8080', // 所有ajax请求接口父地址
 		web_url: 'http://www.baidu.com' // 此项目前台地址 (此配置项非必须)
 	}
 	// 服务器测试环境