123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>预充值扣费记录-添加/修改</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!-- 所有的 css js 资源 -->
- <link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.0/lib/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="https://unpkg.com/vue@2.6.10/dist/vue.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.js"></script>
- <script src="https://www.layuicdn.com/layer-v3.1.1/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="业务id" v-model="m.businessId" br></sa-item>
- <sa-item type="text" name="业务单号" v-model="m.businessNo" br></sa-item>
- <sa-item type="text" name="车牌号" v-model="m.carNo" br></sa-item>
- <sa-item type="text" name="收费类型" v-model="m.feeType" br></sa-item>
- <sa-item type="text" name="业务类型id" v-model="m.itemTypeId" br></sa-item>
- <sa-item type="text" name="业务类型" v-model="m.itemTypeName" br></sa-item>
- <sa-item type="text" name="" v-model="m.itemId" br></sa-item>
- <sa-item type="text" name="业务项" v-model="m.itemName" br></sa-item>
- <sa-item type="text" name="项目金额" v-model="m.itemPrice" br></sa-item>
- <sa-item type="text" name="" v-model="m.unitPrice" br></sa-item>
- <sa-item type="text" name="支付日期" v-model="m.payDay" br></sa-item>
- <sa-item type="text" name="支付时间" v-model="m.payTime" br></sa-item>
- <sa-item type="enum" name="支付方式" v-model="m.payType" :jv="{3: '微信支付'}" jtype="3" br></sa-item>
- <sa-item type="text" name="" v-model="m.payMode" br></sa-item>
- <sa-item type="text" name="创建时间" v-model="m.createTime" br></sa-item>
- <sa-item type="text" name="更新时间" v-model="m.updateTime" br></sa-item>
- <sa-item type="text" name="" v-model="m.businessItemId" br></sa-item>
- <sa-item type="text" name="业务项单号" v-model="m.businessItemNo" br></sa-item>
- <sa-item type="text" name="" v-model="m.pickCustomerName" br></sa-item>
- <sa-item type="text" name="客户名称" v-model="m.customerName" br></sa-item>
- <sa-item type="text" name="主体名称" v-model="m.entityName" br></sa-item>
- <sa-item type="text" name="" v-model="m.taxRate" br></sa-item>
- <sa-item type="text" name="" v-model="m.noTaxPrice" br></sa-item>
- <sa-item type="text" name="" v-model="m.taxPrice" br></sa-item>
- <sa-item type="text" name="" v-model="m.weight" br></sa-item>
- <sa-item type="text" name="" v-model="m.num" br></sa-item>
- <sa-item type="text" name="是否结算" v-model="m.isSettle" br></sa-item>
- <sa-item type="text" name="备注" v-model="m.remark" br></sa-item>
- <sa-item type="text" name="发票" v-model="m.invoice" br></sa-item>
- <sa-item type="text" name="微信交易单号" v-model="m.transactionId" br></sa-item>
- <sa-item type="text" name="支付单号" v-model="m.outTradeNo" br></sa-item>
- <sa-item type="text" name="" v-model="m.businessCarId" br></sa-item>
- <sa-item type="text" name="" v-model="m.businessCarNo" br></sa-item>
- <sa-item type="text" name="开单员" v-model="m.kaiDanPerson" br></sa-item>
- <sa-item type="text" name="调度员" v-model="m.diaoDuPerson" br></sa-item>
- <sa-item type="text" name="稽查员" v-model="m.jiChaPerson" br></sa-item>
- <sa-item type="text" name="客户id" v-model="m.customerId" br></sa-item>
- <sa-item type="text" name="扣除金额" v-model="m.deductMoney" br></sa-item>
- <sa-item type="text" name="收费明细id" v-model="m.feeDetailsId" br></sa-item>
- <sa-item type="text" name="复核人员" v-model="m.reviewBy" br></sa-item>
- <sa-item type="text" name="复核时间" v-model="m.reviewTime" br></sa-item>
- <sa-item type="text" name="复核状态,0-未复核、1-已复核" v-model="m.reviewStatus" br></sa-item>
- <sa-item type="text" name="合作伙伴" v-model="m.partner" br></sa-item>
- <sa-item type="text" name="原金额" v-model="m.originalMoney" br></sa-item>
- <sa-item type="text" name="余额" v-model="m.totalMoney" 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: '', // 主键
- businessId: '', // 业务id
- businessNo: '', // 业务单号
- carNo: '', // 车牌号
- feeType: '', // 收费类型
- itemTypeId: '', // 业务类型id
- itemTypeName: '', // 业务类型
- itemId: '', //
- itemName: '', // 业务项
- itemPrice: '', // 项目金额(元)
- unitPrice: '', //
- payDay: '', // 支付日期
- payTime: '', // 支付时间
- payType: '', // 支付方式(3=微信支付)
- payMode: '', //
- createTime: '', // 创建时间
- updateTime: '', // 更新时间
- businessItemId: '', //
- businessItemNo: '', // 业务项单号
- pickCustomerName: '', //
- customerName: '', // 客户名称
- entityName: '', // 主体名称
- taxRate: '', //
- noTaxPrice: '', //
- taxPrice: '', //
- weight: '', //
- num: '', //
- isSettle: '', // 是否结算
- remark: '', // 备注
- invoice: '', // 发票
- transactionId: '', // 微信交易单号
- outTradeNo: '', // 支付单号
- businessCarId: '', //
- businessCarNo: '', //
- kaiDanPerson: '', // 开单员
- diaoDuPerson: '', // 调度员
- jiChaPerson: '', // 稽查员
- customerId: '', // 客户id
- deductMoney: '', // 扣除金额
- feeDetailsId: '', // 收费明细id
- reviewBy: '', // 复核人员
- reviewTime: '', // 复核时间
- reviewStatus: '', // 复核状态,0-未复核、1-已复核
- partner: '', // 合作伙伴
- originalMoney: '', // 原金额
- totalMoney: '', // 余额
- }
- },
- // 提交数据
- ok: function(){
- // 表单校验
- let m = this.m;
- sa.checkNull(m.id, '请输入 [主键]');
- sa.checkNull(m.businessId, '请输入 [业务id]');
- sa.checkNull(m.businessNo, '请输入 [业务单号]');
- sa.checkNull(m.carNo, '请输入 [车牌号]');
- sa.checkNull(m.feeType, '请输入 [收费类型]');
- sa.checkNull(m.itemTypeId, '请输入 [业务类型id]');
- sa.checkNull(m.itemTypeName, '请输入 [业务类型]');
- sa.checkNull(m.itemId, '请输入 []');
- sa.checkNull(m.itemName, '请输入 [业务项]');
- sa.checkNull(m.itemPrice, '请输入 [项目金额]');
- sa.checkNull(m.unitPrice, '请输入 []');
- sa.checkNull(m.payDay, '请输入 [支付日期]');
- sa.checkNull(m.payTime, '请输入 [支付时间]');
- sa.checkNull(m.payType, '请输入 [支付方式]');
- sa.checkNull(m.payMode, '请输入 []');
- sa.checkNull(m.createTime, '请输入 [创建时间]');
- sa.checkNull(m.updateTime, '请输入 [更新时间]');
- sa.checkNull(m.businessItemId, '请输入 []');
- sa.checkNull(m.businessItemNo, '请输入 [业务项单号]');
- sa.checkNull(m.pickCustomerName, '请输入 []');
- sa.checkNull(m.customerName, '请输入 [客户名称]');
- sa.checkNull(m.entityName, '请输入 [主体名称]');
- sa.checkNull(m.taxRate, '请输入 []');
- sa.checkNull(m.noTaxPrice, '请输入 []');
- sa.checkNull(m.taxPrice, '请输入 []');
- sa.checkNull(m.weight, '请输入 []');
- sa.checkNull(m.num, '请输入 []');
- sa.checkNull(m.isSettle, '请输入 [是否结算]');
- sa.checkNull(m.remark, '请输入 [备注]');
- sa.checkNull(m.invoice, '请输入 [发票]');
- sa.checkNull(m.transactionId, '请输入 [微信交易单号]');
- sa.checkNull(m.outTradeNo, '请输入 [支付单号]');
- sa.checkNull(m.businessCarId, '请输入 []');
- sa.checkNull(m.businessCarNo, '请输入 []');
- sa.checkNull(m.kaiDanPerson, '请输入 [开单员]');
- sa.checkNull(m.diaoDuPerson, '请输入 [调度员]');
- sa.checkNull(m.jiChaPerson, '请输入 [稽查员]');
- sa.checkNull(m.customerId, '请输入 [客户id]');
- sa.checkNull(m.deductMoney, '请输入 [扣除金额]');
- sa.checkNull(m.feeDetailsId, '请输入 [收费明细id]');
- sa.checkNull(m.reviewBy, '请输入 [复核人员]');
- sa.checkNull(m.reviewTime, '请输入 [复核时间]');
- sa.checkNull(m.reviewStatus, '请输入 [复核状态,0-未复核、1-已复核]');
- sa.checkNull(m.partner, '请输入 [合作伙伴]');
- sa.checkNull(m.originalMoney, '请输入 [原金额]');
- sa.checkNull(m.totalMoney, '请输入 [余额]');
-
- // 开始增加或修改
- if(this.id <= 0) { // 添加
- sa.ajax('/TbDeductionRecord/add', m, function(res){
- sa.alert('增加成功', this.clean);
- }.bind(this));
- } else { // 修改
- sa.ajax('/TbDeductionRecord/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('/TbDeductionRecord/getById?id=' + this.id, function(res) {
- this.m = res.data;
- if(res.data == null) {
- sa.alert('未能查找到 id=' + this.id + " 详细数据");
- }
- }.bind(this))
- }
- }
- })
-
- </script>
- </body>
- </html>
|