文件

136 行
5.0 KiB
HTML
可执行文件

<!--打款审核-->
<!--[1.5.37]-->
<style>
#makeMoney .title {
padding: 0 0 10px;
font-size: 15px;
color: #333;
}
#makeMoney .price {
font-size: 20px !important;
font-weight: bold;
color: #67c23a;
}
</style>
<div id="makeMoney" style="padding: 20px">
<div class="title">{{store_name}} - {{franchisee_time}}</div>
<div style="margin-top: 40px">
<el-form label-width="136px" size="small">
<el-form-item label="结算账户类型:">
<span v-if="clearing_form==1">银行卡</span>
<span v-if="clearing_form==2">支付宝</span>
</el-form-item>
<el-form-item label="账号:">{{account_number}}</el-form-item>
<el-form-item v-if="clearing_form==1" label="开户行信息:">{{opening_bank}}</el-form-item>
<el-form-item label="姓名:">{{name}}</el-form-item>
<el-form-item label="打款金额:">
<span class="price">{{money}}</span>
</el-form-item>
<el-form-item label="">
<el-button type="primary" size="small" @click="settlement">确定打款</el-button>
</el-form-item>
</el-form>
</div>
</div>
<script type="text/javascript">
var makeMoney = new Vue({
el: '#makeMoney',
data: function () {
return {
clearing_form: "",//结算类型 1银行卡 2支付宝
account_number: "",//结算账号
opening_bank: "",//开户行
name: "",//用户姓名
money: '',//打款金额
store_id: '',
id: '',
store_name: '',
franchisee_time: '',
}
},
methods: {
//确认打款
settlement() {
$.ajax({
url: "{:U('toMakeMoney')}",
type: 'post',
data: {
id: this.id,
clearing_form: this.clearing_form,//结算类型 1银行卡 2支付宝
account_number: this.account_number,//结算账号
opening_bank: this.opening_bank,//开户行
name: this.name,//用户姓名
money: this.money,//打款金额
},
dataType: 'json',
success: res => {
if (res.status == 1) {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: function () {
MenuApp.backPreview();
}
})
} else {
this.$confirm(res.msg, "错误提示", {
confirmButtonText: '确定',
showCancelButton: false,
type: 'error'
}).then(() => {
}).catch(() => {
})
}
},
error: res => {
this.requestError(res);
}
})
},
//获取门店结算信息
getPayInfo() {
$.ajax({
url: "{:U('getPayInfo')}",
type: 'post',
data: {
store_id: this.store_id,
},
dataType: 'json',
success: res => {
console.log(res);
this.clearing_form = res.data.clearing_form;
this.account_number = res.data.account_number;
this.opening_bank = res.data.opening_bank;
this.name = res.data.name;
},
error: res => {
this.requestError(res);
}
})
},
//错误提示
requestError(res) {
console.log(res);
this.$confirm("请求发生错误", "错误提示", {
confirmButtonText: '确定',
showCancelButton: false,
type: 'error'
}).then(() => {
}).catch(() => {
})
},
},
mounted() {
var data = JSON.parse(sessionStorage.getItem("operatingReceipt"));
this.money = data.money;
this.id = data.id;
this.store_name = data.store_name;
this.store_id = data.store_id;
this.franchisee_time = data.franchisee_time;
this.getPayInfo();
},
});
</script>