123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- <!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.tradeAreaId" br></sa-item>
- <sa-item type="text" name="" v-model="m.tradeAreaName" br></sa-item>
- <sa-item type="text" name="" v-model="m.addressIds" br></sa-item>
- <sa-item type="text" name="" v-model="m.saleMainId" br></sa-item> -->
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="订单号" v-model="m.tradeNo" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="买家" v-model="m.buyUserName" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="num" name="购买用户类型" v-model="m.buyUserType" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="商家名称" v-model="m.enterpriseName" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="总重量" v-model="m.totalWeight" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="总金额" v-model="m.totalPrice" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="datetime" name="交易时间" v-model="m.tradeTime" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="enum" name="交易状态" v-model="m.tradeStatus" :jv="{0: '未支付', 1: '已支付'}" jtype="3" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="支付方式" v-model="m.payType" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="结算时间" v-model="m.settleTime" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="当前结算金额" v-model="m.realPrice" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="应结金额" v-model="m.shouldPrice" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="对账人" v-model="m.settleUserId" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="对账人员" v-model="m.recordUserId" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="对账时间" v-model="m.recordTime" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="是否对账" v-model="m.record" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="退款原因" v-model="m.refundReason" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="退款时间" v-model="m.refundTime" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="出互市区时间" v-model="m.outTime" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="商品名称" v-model="m.goodsNames" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="是否申报" v-model="m.apply" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="申报时间" v-model="m.applyTime" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="申报结果" v-model="m.applyResult" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="enum" name="分配方式" v-model="m.distribution" :jv="{0: '均分', 1: '自选数量'}" jtype="3" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="enum" name="是否确认" v-model="m.confirm" :jv="{0: '否', 1: '是'}" jtype="3" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="是否接单" v-model="m.pick" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="接单时间" v-model="m.pickTime" br></sa-item>
- </el-col>
- <el-col :span="12">
- <sa-item type="text" name="是否发货" v-model="m.send" br></sa-item>
- </el-col>
- </el-row>
- <el-row :gutter="50">
- <el-col :span="12">
- <sa-item type="text" name="发货时间" v-model="m.sendTime" br></sa-item>
- </el-col>
- </el-row>
- <!-- <sa-item type="text" name="" v-model="m.receiveName" br></sa-item>
- <sa-item type="text" name="" v-model="m.receivePhone" br></sa-item>
- <sa-item type="text" name="" v-model="m.receiveAddress" br></sa-item> -->
- <!-- <sa-item type="text" name="" v-model="m.applyFailReason" br></sa-item> -->
- <!-- <sa-item type="text" name="" v-model="m.shopId" br></sa-item>
- <sa-item type="text" name="" v-model="m.shopName" br></sa-item> -->
- <!-- <sa-item type="text" name="对应二级市场中的收购单ID" v-model="m.levelTwoOrderId" 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: '', // 主键
- tradeAreaId: '', //
- tradeAreaName: '', //
- addressIds: '', //
- saleMainId: '', //
- tradeNo: '', // 订单号
- buyUserId: '', // 买家ID
- buyUserName: '', // 买家
- buyUserType: '', // 购买用户类型(3=边民,2=组长)
- enterpriseId: '', // 商家ID
- enterpriseName: '', // 商家名称
- totalWeight: '', // 总重量
- totalPrice: '', // 总金额
- tradeTime: '', // 交易时间
- tradeStatus: '', // 交易状态(0=未支付,1=已支付)
- payType: '', // 支付方式(0=金融互助,1=现金刷卡)
- settleTime: '', // 结算时间
- realPrice: '', // 当前结算金额
- shouldPrice: '', // 应结金额
- settleUserId: '', // 对账人
- recordUserId: '', // 对账人员
- recordTime: '', // 对账时间
- record: '', // 是否对账(0=否,)
- refundReason: '', // 退款原因
- refundTime: '', // 退款时间
- receiveName: '', //
- receivePhone: '', //
- receiveAddress: '', //
- outTime: '', // 出互市区时间
- goodsNames: '', // 商品名称字符串
- apply: '', // 是否申报
- applyTime: '', // 申报时间
- applyResult: '', // 申报结果
- applyFailReason: '', //
- distribution: '', // 分配方式(0=均分,1=自选数量)
- confirm: '', // 是否确认(0=否,1=是)
- pick: '', // 是否接单
- pickTime: '', // 接单时间
- shopId: '', //
- shopName: '', //
- send: '', // 是否发货
- sendTime: '', // 发货时间
- levelTwoOrderId: '', // 对应二级市场中的收购单ID
- createTime: '', // 创建时间
- createBy: '', // 创建人编号
- createName: '', // 创建人名称
- updateTime: '', // 更新时间
- updateBy: '', // 更新人编号
- updateName: '', // 更新人名称
- deleteStatus: '', // 删除状态(0=禁用,1=启用)
- }
- },
- // 提交数据
- ok: function(){
- // 表单校验
- let m = this.m;
- // sa.checkNull(m.id, '请输入 [主键]');
- sa.checkNull(m.tradeAreaId, '请输入 []');
- sa.checkNull(m.tradeAreaName, '请输入 []');
- sa.checkNull(m.addressIds, '请输入 []');
- sa.checkNull(m.saleMainId, '请输入 []');
- sa.checkNull(m.tradeNo, '请输入 [订单号]');
- // sa.checkNull(m.buyUserId, '请输入 [买家ID]');
- sa.checkNull(m.buyUserName, '请输入 [买家]');
- sa.checkNull(m.buyUserType, '请输入 [购买用户类型]');
- // sa.checkNull(m.enterpriseId, '请输入 [商家ID]');
- sa.checkNull(m.enterpriseName, '请输入 [商家名称]');
- sa.checkNull(m.totalWeight, '请输入 [总重量]');
- sa.checkNull(m.totalPrice, '请输入 [总金额]');
- sa.checkNull(m.tradeTime, '请输入 [交易时间]');
- sa.checkNull(m.tradeStatus, '请输入 [交易状态]');
- sa.checkNull(m.payType, '请输入 [支付方式]');
- sa.checkNull(m.settleTime, '请输入 [结算时间]');
- sa.checkNull(m.realPrice, '请输入 [当前结算金额]');
- sa.checkNull(m.shouldPrice, '请输入 [应结金额]');
- sa.checkNull(m.settleUserId, '请输入 [对账人]');
- sa.checkNull(m.recordUserId, '请输入 [对账人员]');
- sa.checkNull(m.recordTime, '请输入 [对账时间]');
- sa.checkNull(m.record, '请输入 [是否对账]');
- sa.checkNull(m.refundReason, '请输入 [退款原因]');
- sa.checkNull(m.refundTime, '请输入 [退款时间]');
- sa.checkNull(m.receiveName, '请输入 []');
- sa.checkNull(m.receivePhone, '请输入 []');
- sa.checkNull(m.receiveAddress, '请输入 []');
- sa.checkNull(m.outTime, '请输入 [出互市区时间]');
- sa.checkNull(m.goodsNames, '请输入 [商品名称字符串]');
- sa.checkNull(m.apply, '请输入 [是否申报]');
- sa.checkNull(m.applyTime, '请输入 [申报时间]');
- sa.checkNull(m.applyResult, '请输入 [申报结果]');
- sa.checkNull(m.applyFailReason, '请输入 []');
- sa.checkNull(m.distribution, '请输入 [分配方式]');
- sa.checkNull(m.confirm, '请输入 [是否确认]');
- sa.checkNull(m.pick, '请输入 [是否接单]');
- sa.checkNull(m.pickTime, '请输入 [接单时间]');
- sa.checkNull(m.shopId, '请输入 []');
- sa.checkNull(m.shopName, '请输入 []');
- sa.checkNull(m.send, '请输入 [是否发货]');
- sa.checkNull(m.sendTime, '请输入 [发货时间]');
- sa.checkNull(m.levelTwoOrderId, '请输入 [对应二级市场中的收购单ID]');
- sa.checkNull(m.createTime, '请输入 [创建时间]');
- sa.checkNull(m.createBy, '请输入 [创建人编号]');
- sa.checkNull(m.createName, '请输入 [创建人名称]');
- sa.checkNull(m.updateTime, '请输入 [更新时间]');
- sa.checkNull(m.updateBy, '请输入 [更新人编号]');
- sa.checkNull(m.updateName, '请输入 [更新人名称]');
- sa.checkNull(m.deleteStatus, '请输入 [删除状态]');
-
- // 开始增加或修改
- if(this.id <= 0) { // 添加
- sa.ajax('/level-one-server/TbOrder/add', m, function(res){
- sa.alert('增加成功', this.clean);
- }.bind(this));
- } else { // 修改
- sa.ajax('/level-one-server/TbOrder/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('/level-one-server/TbOrder/getById?id=' + this.id, function(res) {
- this.m = res.data;
- if(res.data == null) {
- sa.alert('未能查找到 id=' + this.id + " 详细数据");
- }
- }.bind(this))
- }
- }
- })
-
- </script>
- </body>
- </html>
|