Browse Source

订单商品表与进口申报表

linbl 1 year ago
parent
commit
e7425edd90

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

@@ -535,6 +535,38 @@ window.menuList.unshift({
 				]
 			},
 			{
+				id: 'tb-order-goods',
+				name: '订单商品管理',
+				icon: 'el-icon-folder-opened',
+				parent:true,
+				info: '订单商品表表数据的维护',
+				childList: [
+					{id: 'tb-order-goods-list', name: '订单商品表-列表', url: 'sa-view/tb-order-goods/tb-order-goods-list.html',
+					childList:[
+					{id:'tb-order-goods-add',name:'订单商品表添加',isShow:false},
+					{id:'tb-order-goods-edit',name:'订单商品表更新',isShow:false},
+					{id:'tb-order-goods-del',name:'订单商品表删除',isShow:false},
+					]
+					},
+				]
+			},
+			{
+					id: 'tb-iport-order',
+					name: '进口申报单',
+					icon: 'el-icon-folder-opened',
+				    parent:true,
+					info: '进口申报单表数据的维护',
+					childList: [
+						{id: 'tb-iport-order-list', name: '进口申报单-列表', url: 'sa-view/tb-iport-order/tb-iport-order-list.html',
+						childList:[
+						{id:'tb-iport-order-add',name:'进口申报单添加',isShow:false},
+						{id:'tb-iport-order-edit',name:'进口申报单更新',isShow:false},
+						{id:'tb-iport-order-del',name:'进口申报单删除',isShow:false},
+						]
+						},
+					]
+				},
+			{
 				id: 'tb-order-after-sale-list',
 				name: '售后管理',
 				url: 'sa-view/tb-order-after-sale/tb-order-after-sale-list.html',

+ 137 - 0
sa-view/tb-iport-order/tb-iport-order-add.html

@@ -0,0 +1,137 @@
+<!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="../../static/kj/element-ui/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>
+		<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;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+                    <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.id" br></sa-item>
+						<sa-item type="text" name="身份证号" v-model="m.idno" br></sa-item>
+						<sa-item type="text" name="边民备案编号" v-model="m.borderPutrecNo" br></sa-item>
+						<sa-item type="text" name="边民姓名不能为空" v-model="m.borderName" br></sa-item>
+						<sa-item type="text" name="结算单号" v-model="m.settleBillNo" br></sa-item>
+						<sa-item type="text" name="进出口预申报单号" v-model="m.preIeportNo" br></sa-item>
+						<sa-item type="text" name="购买申报确认状态:Y->确认购买申报,N->不购买申报" v-model="m.buyConfirmStatus" br></sa-item>
+						<sa-item type="text" name="支付状态:01->未支付,02->已支付" v-model="m.payStatus" br></sa-item>
+						<sa-item type="text" name="互助委托申报确认状态" v-model="m.cooperEntrustStatus" br></sa-item>
+						<sa-item type="text" name="互助委托申报确认时间" v-model="m.cooperEntrustTime" br></sa-item>
+						<sa-item type="text" name="边民进口申报确认状态" v-model="m.applyConfirmStatus" br></sa-item>
+						<sa-item type="text" name="边民进口申报确认时间" v-model="m.applyConfirmTime" br></sa-item>
+						<sa-item name="" class="s-ok" br>
+							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
+						</sa-item>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="primary" @click="ok()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</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,		// 实体对象 
+				},
+				methods: {
+					// 创建一个 默认Model 
+					createModel: function() {
+						return {
+							id: '',		// 主键 
+							idno: '',		// 身份证号 
+							borderPutrecNo: '',		// 边民备案编号(可选) 
+							borderName: '',		// 边民姓名不能为空 
+							settleBillNo: '',		// 结算单号 
+							preIeportNo: '',		// 进出口预申报单号 
+							buyConfirmStatus: '',		// 购买申报确认状态:Y->确认购买申报,N->不购买申报 
+							payStatus: '',		// 支付状态:01->未支付,02->已支付 
+							cooperEntrustStatus: '',		// 互助委托申报确认状态 
+							cooperEntrustTime: '',		// 互助委托申报确认时间 
+							applyConfirmStatus: '',		// 边民进口申报确认状态 
+							applyConfirmTime: '',		// 边民进口申报确认时间 
+						}
+					},
+					// 提交数据 
+					ok: function(){
+						// 表单校验 
+						let m = this.m;
+						sa.checkNull(m.id, '请输入 [主键]');
+						sa.checkNull(m.idno, '请输入 [身份证号]');
+						sa.checkNull(m.borderPutrecNo, '请输入 [边民备案编号]');
+						sa.checkNull(m.borderName, '请输入 [边民姓名不能为空]');
+						sa.checkNull(m.settleBillNo, '请输入 [结算单号]');
+						sa.checkNull(m.preIeportNo, '请输入 [进出口预申报单号]');
+						sa.checkNull(m.buyConfirmStatus, '请输入 [购买申报确认状态:Y->确认购买申报,N->不购买申报]');
+						sa.checkNull(m.payStatus, '请输入 [支付状态:01->未支付,02->已支付]');
+						sa.checkNull(m.cooperEntrustStatus, '请输入 [互助委托申报确认状态]');
+						sa.checkNull(m.cooperEntrustTime, '请输入 [互助委托申报确认时间]');
+						sa.checkNull(m.applyConfirmStatus, '请输入 [边民进口申报确认状态]');
+						sa.checkNull(m.applyConfirmTime, '请输入 [边民进口申报确认时间]');
+				
+						// 开始增加或修改
+						if(this.id <= 0) {	// 添加
+							sa.ajax('/TbIportOrder/add', m, function(res){
+								sa.alert('增加成功', this.clean); 
+							}.bind(this));
+						} else {	// 修改
+							sa.ajax('/TbIportOrder/update', m, function(res){
+								sa.alert('修改成功', this.clean);
+							}.bind(this));
+						}
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						if(this.id == 0) {
+							this.m = this.createModel();
+						} else {
+							parent.app.f5();		// 刷新父页面列表
+							sa.closeCurrIframe();	// 关闭本页 
+						}
+					}
+				},
+				mounted: function(){
+					// 初始化数据 
+					if(this.id <= 0) {	
+						this.m = this.createModel();
+					} else {	
+						sa.ajax('/TbIportOrder/getById?id=' + this.id, function(res) {
+							this.m = res.data;
+							if(res.data == null) {
+								sa.alert('未能查找到 id=' + this.id + " 详细数据");
+							}
+						}.bind(this))
+					}
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 71 - 0
sa-view/tb-iport-order/tb-iport-order-info.html

@@ -0,0 +1,71 @@
+<!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="../../static/kj/element-ui/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>
+		<style type="text/css">
+			.c-panel .c-label{width: 8em;}
+		</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">
+						<sa-info name="主键" br>{{m.id}}</sa-info>
+						<sa-info name="身份证号" br>{{m.idno}}</sa-info>
+						<sa-info name="边民备案编号" br>{{m.borderPutrecNo}}</sa-info>
+						<sa-info name="边民姓名不能为空" br>{{m.borderName}}</sa-info>
+						<sa-info name="结算单号" br>{{m.settleBillNo}}</sa-info>
+						<sa-info name="进出口预申报单号" br>{{m.preIeportNo}}</sa-info>
+						<sa-info name="购买申报确认状态:Y->确认购买申报,N->不购买申报" br>{{m.buyConfirmStatus}}</sa-info>
+						<sa-info name="支付状态:01->未支付,02->已支付" br>{{m.payStatus}}</sa-info>
+						<sa-info name="互助委托申报确认状态" br>{{m.cooperEntrustStatus}}</sa-info>
+						<sa-info name="互助委托申报确认时间" br>{{m.cooperEntrustTime}}</sa-info>
+						<sa-info name="边民进口申报确认状态" br>{{m.applyConfirmStatus}}</sa-info>
+						<sa-info name="边民进口申报确认时间" br>{{m.applyConfirmTime}}</sa-info>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="success" @click="sa.closeCurrIframe()">确定</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: {
+				},
+				mounted: function() {
+					sa.ajax('/TbIportOrder/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if(res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 161 - 0
sa-view/tb-iport-order/tb-iport-order-list.html

@@ -0,0 +1,161 @@
+<!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="../../static/kj/element-ui/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>
+	</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.id"></sa-item>
+					<sa-item type="text" name="身份证号" v-model="p.idno"></sa-item>
+					<sa-item type="text" name="边民备案编号" v-model="p.borderPutrecNo"></sa-item>
+					<sa-item type="text" name="边民姓名不能为空" v-model="p.borderName"></sa-item>
+					<sa-item type="text" name="结算单号" v-model="p.settleBillNo"></sa-item>
+					<sa-item type="text" name="进出口预申报单号" v-model="p.preIeportNo"></sa-item>
+					<sa-item type="text" name="购买申报确认状态:Y->确认购买申报,N->不购买申报" v-model="p.buyConfirmStatus"></sa-item>
+					<sa-item type="text" name="支付状态:01->未支付,02->已支付" v-model="p.payStatus"></sa-item>
+					<sa-item type="text" name="互助委托申报确认状态" v-model="p.cooperEntrustStatus"></sa-item>
+					<sa-item type="text" name="互助委托申报确认时间" v-model="p.cooperEntrustTime"></sa-item>
+					<sa-item type="text" name="边民进口申报确认状态" v-model="p.applyConfirmStatus"></sa-item>
+					<sa-item type="text" name="边民进口申报确认时间" v-model="p.applyConfirmTime"></sa-item>
+					<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-iport-order-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="id" ></sa-td>
+					<sa-td name="身份证号" prop="idno" ></sa-td>
+					<sa-td name="边民备案编号" prop="borderPutrecNo" ></sa-td>
+					<sa-td name="边民姓名不能为空" prop="borderName" ></sa-td>
+					<sa-td name="结算单号" prop="settleBillNo" ></sa-td>
+					<sa-td name="进出口预申报单号" prop="preIeportNo" ></sa-td>
+					<sa-td name="购买申报确认状态:Y->确认购买申报,N->不购买申报" prop="buyConfirmStatus" ></sa-td>
+					<sa-td name="支付状态:01->未支付,02->已支付" prop="payStatus" ></sa-td>
+					<sa-td name="互助委托申报确认状态" prop="cooperEntrustStatus" ></sa-td>
+					<sa-td name="互助委托申报确认时间" prop="cooperEntrustTime" ></sa-td>
+					<sa-td name="边民进口申报确认状态" prop="applyConfirmStatus" ></sa-td>
+					<sa-td name="边民进口申报确认时间" prop="applyConfirmTime" ></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-iport-order-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
+							<el-button v-if="sa.isAuth('tb-iport-order-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>
+		</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: { // 查询参数  
+						id: '',		// 主键 
+						idno: '',		// 身份证号 
+						borderPutrecNo: '',		// 边民备案编号(可选) 
+						borderName: '',		// 边民姓名不能为空 
+						settleBillNo: '',		// 结算单号 
+						preIeportNo: '',		// 进出口预申报单号 
+						buyConfirmStatus: '',		// 购买申报确认状态:Y->确认购买申报,N->不购买申报 
+						payStatus: '',		// 支付状态:01->未支付,02->已支付 
+						cooperEntrustStatus: '',		// 互助委托申报确认状态 
+						cooperEntrustTime: '',		// 互助委托申报确认时间 
+						applyConfirmStatus: '',		// 边民进口申报确认状态 
+						applyConfirmTime: '',		// 边民进口申报确认时间 
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 0		// 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/TbIportOrder/getList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight();		// 刷新表格高度 
+						}.bind(this));
+					},
+					// 查看
+					get: function(data) {
+						sa.showIframe('数据详情', 'tb-iport-order-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-iport-order-add.html?id=' + data.id, '1000px', '90%');
+					},
+					// 新增
+					add: function(data) {
+						sa.showIframe('新增数据', 'tb-iport-order-add.html?id=-1', '1000px', '90%');
+					},
+					// 删除
+					del: function(data) {
+						sa.confirm('是否删除,此操作不可撤销', function() {
+							sa.ajax('/TbIportOrder/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('/TbIportOrder/deleteByIds', {ids: ids.join(',')}, function(res) {
+								sa.arrayDelete(this.dataList, selection);
+								sa.ok('删除成功');
+								sa.f5TableHeight();		// 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>

+ 171 - 0
sa-view/tb-order-goods/tb-order-goods-add.html

@@ -0,0 +1,171 @@
+<!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="../../static/kj/element-ui/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>
+		<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;}
+		</style>
+	</head>
+	<body>
+		<div class="vue-box" :class="{sbot: id}" style="display: none;" :style="'display: block;'">
+			<!-- ------- 内容部分 ------- -->
+			<div class="s-body">
+				<div class="c-panel">
+                    <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.platSeqNo" br></sa-item>
+						<sa-item type="text" name="边民备案号" v-model="m.borderPutrecNo" br></sa-item>
+						<sa-item type="text" name="身份证号" v-model="m.idno" br></sa-item>
+						<sa-item type="text" name="订单ID" v-model="m.orderId" br></sa-item>
+						<sa-item type="text" name="商品编号" v-model="m.goodsCode" br></sa-item>
+						<sa-item type="text" name="商品名称" v-model="m.goodsName" br></sa-item>
+						<sa-item type="text" name="商品图片" v-model="m.avatar" br></sa-item>
+						<sa-item type="text" name="购买金额" v-model="m.buyAmount" br></sa-item>
+						<sa-item type="text" name="净重" v-model="m.netWt" br></sa-item>
+						<sa-item type="text" name="毛重" v-model="m.grossWt" br></sa-item>
+						<sa-item type="text" name="购买数量" v-model="m.buyQty" br></sa-item>
+						<sa-item type="text" name="第一数量" v-model="m.buyQty1" br></sa-item>
+						<sa-item type="text" name="第二数量" v-model="m.buyQty2" br></sa-item>
+						<sa-item type="text" name="计价单位,如元、万等" v-model="m.buyUnit" br></sa-item>
+						<sa-item type="text" name="数量单位,如kg、吨等" v-model="m.numUnit" 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.createTime" 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="text" name="更新时间" v-model="m.updateTime" br></sa-item>
+						<sa-item type="enum" name="删除状态" v-model="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" jtype="3" br></sa-item>
+						<sa-item name="" class="s-ok" br>
+							<el-button type="primary" icon="el-icon-plus" @click="ok()">保存</el-button>
+						</sa-item>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="primary" @click="ok()">确定</el-button>
+				<el-button @click="sa.closeCurrIframe()">取消</el-button>
+			</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,		// 实体对象 
+				},
+				methods: {
+					// 创建一个 默认Model 
+					createModel: function() {
+						return {
+							id: '',		// 主键 
+							platSeqNo: '',		// 预申报编号 
+							borderPutrecNo: '',		// 边民备案号 
+							idno: '',		// 身份证号 
+							orderId: '',		// 订单ID 
+							goodsId: '',		// 商品ID 
+							goodsCode: '',		// 商品编号 
+							goodsName: '',		// 商品名称 
+							avatar: '',		// 商品图片 
+							buyAmount: '',		// 购买金额 
+							netWt: '',		// 净重 
+							grossWt: '',		// 毛重 
+							buyQty: '',		// 购买数量 
+							buyQty1: '',		// 第一数量 
+							buyQty2: '',		// 第二数量 
+							buyUnit: '',		// 计价单位,如元、万等 
+							numUnit: '',		// 数量单位,如kg、吨等 
+							createBy: '',		// 创建人编号 
+							createName: '',		// 创建人名称 
+							createTime: '',		// 创建时间 
+							updateBy: '',		// 更新人编号 
+							updateName: '',		// 更新人名称 
+							updateTime: '',		// 更新时间 
+							deleteStatus: '',		// 删除状态(0=禁用,1=启用) 
+						}
+					},
+					// 提交数据 
+					ok: function(){
+						// 表单校验 
+						let m = this.m;
+						// sa.checkNull(m.id, '请输入 [主键]');
+						sa.checkNull(m.platSeqNo, '请输入 [预申报编号]');
+						sa.checkNull(m.borderPutrecNo, '请输入 [边民备案号]');
+						sa.checkNull(m.idno, '请输入 [身份证号]');
+						sa.checkNull(m.orderId, '请输入 [订单ID]');
+						// sa.checkNull(m.goodsId, '请输入 [商品ID]');
+						sa.checkNull(m.goodsCode, '请输入 [商品编号]');
+						sa.checkNull(m.goodsName, '请输入 [商品名称]');
+						sa.checkNull(m.avatar, '请输入 [商品图片]');
+						sa.checkNull(m.buyAmount, '请输入 [购买金额]');
+						sa.checkNull(m.netWt, '请输入 [净重]');
+						sa.checkNull(m.grossWt, '请输入 [毛重]');
+						sa.checkNull(m.buyQty, '请输入 [购买数量]');
+						sa.checkNull(m.buyQty1, '请输入 [第一数量]');
+						sa.checkNull(m.buyQty2, '请输入 [第二数量]');
+						sa.checkNull(m.buyUnit, '请输入 [计价单位,如元、万等]');
+						sa.checkNull(m.numUnit, '请输入 [数量单位,如kg、吨等]');
+						sa.checkNull(m.createBy, '请输入 [创建人编号]');
+						sa.checkNull(m.createName, '请输入 [创建人名称]');
+						sa.checkNull(m.createTime, '请输入 [创建时间]');
+						sa.checkNull(m.updateBy, '请输入 [更新人编号]');
+						sa.checkNull(m.updateName, '请输入 [更新人名称]');
+						sa.checkNull(m.updateTime, '请输入 [更新时间]');
+						sa.checkNull(m.deleteStatus, '请输入 [删除状态]');
+				
+						// 开始增加或修改
+						if(this.id <= 0) {	// 添加
+							sa.ajax('/TbOrderGoods/add', m, function(res){
+								sa.alert('增加成功', this.clean); 
+							}.bind(this));
+						} else {	// 修改
+							sa.ajax('/TbOrderGoods/update', m, function(res){
+								sa.alert('修改成功', this.clean);
+							}.bind(this));
+						}
+					},
+					// 添加/修改 完成后的动作
+					clean: function() {
+						if(this.id == 0) {
+							this.m = this.createModel();
+						} else {
+							parent.app.f5();		// 刷新父页面列表
+							sa.closeCurrIframe();	// 关闭本页 
+						}
+					}
+				},
+				mounted: function(){
+					// 初始化数据 
+					if(this.id <= 0) {	
+						this.m = this.createModel();
+					} else {	
+						sa.ajax('/TbOrderGoods/getById?id=' + this.id, function(res) {
+							this.m = res.data;
+							if(res.data == null) {
+								sa.alert('未能查找到 id=' + this.id + " 详细数据");
+							}
+						}.bind(this))
+					}
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 83 - 0
sa-view/tb-order-goods/tb-order-goods-info.html

@@ -0,0 +1,83 @@
+<!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="../../static/kj/element-ui/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>
+		<style type="text/css">
+			.c-panel .c-label{width: 8em;}
+		</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">
+						<sa-info type="num" name="主键" :value="m.id" br></sa-info>
+						<sa-info name="预申报编号" br>{{m.platSeqNo}}</sa-info>
+						<sa-info name="边民备案号" br>{{m.borderPutrecNo}}</sa-info>
+						<sa-info name="身份证号" br>{{m.idno}}</sa-info>
+						<sa-info name="订单ID" br>{{m.orderId}}</sa-info>
+						<sa-info type="num" name="商品ID" :value="m.goodsId" br></sa-info>
+						<sa-info name="商品编号" br>{{m.goodsCode}}</sa-info>
+						<sa-info name="商品名称" br>{{m.goodsName}}</sa-info>
+						<sa-info name="商品图片" br>{{m.avatar}}</sa-info>
+						<sa-info name="购买金额" br>{{m.buyAmount}}</sa-info>
+						<sa-info name="净重" br>{{m.netWt}}</sa-info>
+						<sa-info name="毛重" br>{{m.grossWt}}</sa-info>
+						<sa-info name="购买数量" br>{{m.buyQty}}</sa-info>
+						<sa-info name="第一数量" br>{{m.buyQty1}}</sa-info>
+						<sa-info name="第二数量" br>{{m.buyQty2}}</sa-info>
+						<sa-info name="计价单位,如元、万等" br>{{m.buyUnit}}</sa-info>
+						<sa-info name="数量单位,如kg、吨等" br>{{m.numUnit}}</sa-info>
+						<sa-info name="创建人编号" br>{{m.createBy}}</sa-info>
+						<sa-info name="创建人名称" br>{{m.createName}}</sa-info>
+						<sa-info name="创建时间" br>{{m.createTime}}</sa-info>
+						<sa-info name="更新人编号" br>{{m.updateBy}}</sa-info>
+						<sa-info name="更新人名称" br>{{m.updateName}}</sa-info>
+						<sa-info name="更新时间" br>{{m.updateTime}}</sa-info>
+						<sa-info type="enum" name="删除状态" :value="m.deleteStatus" :jv="{0: '禁用', 1: '启用'}" br></sa-info>
+					</el-form>
+				</div>
+			</div>
+			<!-- ------- 底部按钮 ------- -->
+			<div class="s-foot">
+				<el-button type="success" @click="sa.closeCurrIframe()">确定</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: {
+				},
+				mounted: function() {
+					sa.ajax('/TbOrderGoods/getById?id=' + this.id, function(res) {
+						this.m = res.data;
+						if(res.data == null) {
+							sa.alert('未能查找到 id=' + this.id + " 详细数据");
+						}
+					}.bind(this))
+				}
+			})
+			
+		</script>
+	</body>
+</html>

+ 214 - 0
sa-view/tb-order-goods/tb-order-goods-list.html

@@ -0,0 +1,214 @@
+<!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="../../static/kj/element-ui/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>
+	</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="num" name="主键" v-model="p.id"></sa-item>
+					<sa-item type="text" name="预申报编号" v-model="p.platSeqNo"></sa-item>
+					<sa-item type="text" name="边民备案号" v-model="p.borderPutrecNo"></sa-item>
+					<sa-item type="text" name="身份证号" v-model="p.idno"></sa-item>
+					<sa-item type="text" name="订单ID" v-model="p.orderId"></sa-item>
+					<sa-item type="num" name="商品ID" v-model="p.goodsId"></sa-item>
+					<sa-item type="text" name="商品编号" v-model="p.goodsCode"></sa-item>
+					<sa-item type="text" name="商品名称" v-model="p.goodsName"></sa-item>
+					<sa-item type="text" name="商品图片" v-model="p.avatar"></sa-item>
+					<sa-item type="text" name="购买金额" v-model="p.buyAmount"></sa-item>
+					<sa-item type="text" name="净重" v-model="p.netWt"></sa-item>
+					<sa-item type="text" name="毛重" v-model="p.grossWt"></sa-item>
+					<sa-item type="text" name="购买数量" v-model="p.buyQty"></sa-item>
+					<sa-item type="text" name="第一数量" v-model="p.buyQty1"></sa-item>
+					<sa-item type="text" name="第二数量" v-model="p.buyQty2"></sa-item>
+					<sa-item type="text" name="计价单位,如元、万等" v-model="p.buyUnit"></sa-item>
+					<sa-item type="text" name="数量单位,如kg、吨等" v-model="p.numUnit"></sa-item>
+					<sa-item type="text" name="创建人编号" v-model="p.createBy"></sa-item>
+					<sa-item type="text" name="创建人名称" v-model="p.createName"></sa-item>
+					<sa-item type="text" name="创建时间" v-model="p.createTime"></sa-item>
+					<sa-item type="text" name="更新人编号" v-model="p.updateBy"></sa-item>
+					<sa-item type="text" name="更新人名称" v-model="p.updateName"></sa-item>
+					<sa-item type="text" name="更新时间" v-model="p.updateTime"></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">
+					<el-button v-if="sa.isAuth('tb-order-goods-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="id" type="num"></sa-td>
+					<sa-td name="预申报编号" prop="platSeqNo" ></sa-td>
+					<sa-td name="边民备案号" prop="borderPutrecNo" ></sa-td>
+					<sa-td name="身份证号" prop="idno" ></sa-td>
+					<sa-td name="订单ID" prop="orderId" ></sa-td>
+					<sa-td name="商品ID" prop="goodsId" type="num"></sa-td>
+					<sa-td name="商品编号" prop="goodsCode" ></sa-td>
+					<sa-td name="商品名称" prop="goodsName" ></sa-td>
+					<sa-td name="商品图片" prop="avatar" ></sa-td>
+					<sa-td name="购买金额" prop="buyAmount" ></sa-td>
+					<sa-td name="净重" prop="netWt" ></sa-td>
+					<sa-td name="毛重" prop="grossWt" ></sa-td>
+					<sa-td name="购买数量" prop="buyQty" ></sa-td>
+					<sa-td name="第一数量" prop="buyQty1" ></sa-td>
+					<sa-td name="第二数量" prop="buyQty2" ></sa-td>
+					<sa-td name="计价单位,如元、万等" prop="buyUnit" ></sa-td>
+					<sa-td name="数量单位,如kg、吨等" prop="numUnit" ></sa-td>
+					<sa-td name="创建人编号" prop="createBy" ></sa-td>
+					<sa-td name="创建人名称" prop="createName" ></sa-td>
+					<sa-td name="创建时间" prop="createTime" ></sa-td>
+					<sa-td name="更新人编号" prop="updateBy" ></sa-td>
+					<sa-td name="更新人名称" prop="updateName" ></sa-td>
+					<sa-td name="更新时间" prop="updateTime" ></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">
+						<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-order-goods-edit')" class="c-btn" type="primary" icon="el-icon-edit" @click="update(s.row)">修改</el-button>
+							<el-button v-if="sa.isAuth('tb-order-goods-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>
+		</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: { // 查询参数  
+						id: '',		// 主键 
+						platSeqNo: '',		// 预申报编号 
+						borderPutrecNo: '',		// 边民备案号 
+						idno: '',		// 身份证号 
+						orderId: '',		// 订单ID 
+						goodsId: '',		// 商品ID 
+						goodsCode: '',		// 商品编号 
+						goodsName: '',		// 商品名称 
+						avatar: '',		// 商品图片 
+						buyAmount: '',		// 购买金额 
+						netWt: '',		// 净重 
+						grossWt: '',		// 毛重 
+						buyQty: '',		// 购买数量 
+						buyQty1: '',		// 第一数量 
+						buyQty2: '',		// 第二数量 
+						buyUnit: '',		// 计价单位,如元、万等 
+						numUnit: '',		// 数量单位,如kg、吨等 
+						createBy: '',		// 创建人编号 
+						createName: '',		// 创建人名称 
+						createTime: '',		// 创建时间 
+						updateBy: '',		// 更新人编号 
+						updateName: '',		// 更新人名称 
+						updateTime: '',		// 更新时间 
+						deleteStatus: '',		// 删除状态(0=禁用,1=启用) 
+						pageNo: 1,		// 当前页 
+						pageSize: 10,	// 页大小 
+						sortType: 0		// 排序方式 
+					},
+					dataCount: 0,
+					dataList: [], // 数据集合 
+				},
+				methods: {
+					// 刷新
+					f5: function() {
+						sa.ajax('/TbOrderGoods/getList', sa.removeNull(this.p), function(res) {
+							this.dataList = res.data; // 数据
+							this.dataCount = res.dataCount; // 数据总数 
+							sa.f5TableHeight();		// 刷新表格高度 
+						}.bind(this));
+					},
+					// 查看
+					get: function(data) {
+						sa.showIframe('数据详情', 'tb-order-goods-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-order-goods-add.html?id=' + data.id, '1000px', '90%');
+					},
+					// 新增
+					add: function(data) {
+						sa.showIframe('新增数据', 'tb-order-goods-add.html?id=-1', '1000px', '90%');
+					},
+					// 删除
+					del: function(data) {
+						sa.confirm('是否删除,此操作不可撤销', function() {
+							sa.ajax('/TbOrderGoods/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('/TbOrderGoods/deleteByIds', {ids: ids.join(',')}, function(res) {
+								sa.arrayDelete(this.dataList, selection);
+								sa.ok('删除成功');
+								sa.f5TableHeight();		// 刷新表格高度 
+							}.bind(this))
+						}.bind(this));
+					},
+					// 改 - 删除状态(0=禁用,1=启用)
+					updateDeleteStatus: function(data) {
+						// 声明变量记录是否成功 
+						var isOk = false;	
+						var oldValue = data.deleteStatus;
+						var ajax = sa.ajax('/TbOrderGoods/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; 
+							}
+						})
+					},
+				},
+				created: function() {
+					this.f5();
+					sa.onInputEnter();
+				}
+			})
+		</script>
+	</body>
+</html>