|
|
@ -2,20 +2,20 @@ |
|
|
|
<el-dialog |
|
|
|
<el-dialog |
|
|
|
title="充值" |
|
|
|
title="充值" |
|
|
|
:visible.sync="controlWindows.recharge" |
|
|
|
:visible.sync="controlWindows.recharge" |
|
|
|
width="30%" |
|
|
|
width="55%" |
|
|
|
:before-close="closeWindow" |
|
|
|
:before-close="closeWindow" |
|
|
|
@opened="openDrawer" |
|
|
|
@opened="openDrawer" |
|
|
|
> |
|
|
|
> |
|
|
|
<div class="recharge.vue"> |
|
|
|
<div class="recharge.vue"> |
|
|
|
<el-form ref="form" :rules="rules" :model="form" label-width="120px"> |
|
|
|
<el-form ref="form" :rules="rules" :model="oilCompanyAccountReverse" label-width="120px"> |
|
|
|
<el-row :gutter="gridNum.row.gutter"> |
|
|
|
<el-row :gutter="gridNum.row.gutter"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="交易类型" prop="transactionType" @click="transactionTypeChange"> |
|
|
|
<el-form-item label="交易类型" prop="transactionType" @click="transactionTypeChange"> |
|
|
|
<el-select v-model="oilCompanyAccountReverse.transactionType" > |
|
|
|
<el-select v-model="oilCompanyAccountReverse.transactionType" > |
|
|
|
<el-option label="充值" value="RECHARGE" /> |
|
|
|
<el-option label="充值" value="RECHARGE" /> |
|
|
|
<el-option label="销账" value="REVOKE" /> |
|
|
|
<!-- <el-option label="销账" value="REVOKE" />--> |
|
|
|
<el-option label="赊销" value="CHARGE_SALES" /> |
|
|
|
<!-- <el-option label="赊销" value="CHARGE_SALES" />--> |
|
|
|
<el-option label="消费返利" value="CONSUME_REBATE" /> |
|
|
|
<!-- <el-option label="消费返利" value="CONSUME_REBATE" />--> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -67,7 +67,6 @@ |
|
|
|
list-type="picture-card" |
|
|
|
list-type="picture-card" |
|
|
|
:on-preview="offlineTransactionProofPreview" |
|
|
|
:on-preview="offlineTransactionProofPreview" |
|
|
|
:on-success="offlineTransactionProofSuccess" |
|
|
|
:on-success="offlineTransactionProofSuccess" |
|
|
|
:before-upload="imgCompress" |
|
|
|
|
|
|
|
:on-remove="offlineTransactionProofRemove" |
|
|
|
:on-remove="offlineTransactionProofRemove" |
|
|
|
:headers="headers" |
|
|
|
:headers="headers" |
|
|
|
:data="{'code':'A003'}" |
|
|
|
:data="{'code':'A003'}" |
|
|
@ -97,14 +96,31 @@ |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import serve from "api/financialCenter/accountManagement.js"; |
|
|
|
import serve from "api/financialCenter/accountManagement.js"; |
|
|
|
|
|
|
|
import utils from "utils/encode"; |
|
|
|
|
|
|
|
const JSESSIONID = utils.uuid(); |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
controlWindows: Object, |
|
|
|
controlWindows: Object, |
|
|
|
|
|
|
|
oilCompanyAccount: { |
|
|
|
|
|
|
|
type: Object, |
|
|
|
|
|
|
|
default() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
form: {}, |
|
|
|
uploadUrl: |
|
|
|
|
|
|
|
process.env.VUE_APP_ENV === "development" |
|
|
|
|
|
|
|
? "/api/oil-oss/obejct/uploadFile" |
|
|
|
|
|
|
|
: "/adminapi/oil-oss/obejct/uploadFile", |
|
|
|
|
|
|
|
imgDialog: false, |
|
|
|
|
|
|
|
headers: { |
|
|
|
|
|
|
|
dataSources: "WEB", |
|
|
|
|
|
|
|
Authorization: localStorage.getItem("token"), |
|
|
|
|
|
|
|
JSESSIONID: JSESSIONID, |
|
|
|
|
|
|
|
token: utils.bcrypt(JSESSIONID), |
|
|
|
|
|
|
|
}, |
|
|
|
oilCompanyAccountReverse: { |
|
|
|
oilCompanyAccountReverse: { |
|
|
|
offlineTransactionProof: undefined, |
|
|
|
offlineTransactionProof: undefined, |
|
|
|
offlineTransactionProofImageShow: undefined, |
|
|
|
offlineTransactionProofImageShow: undefined, |
|
|
@ -119,6 +135,7 @@ export default { |
|
|
|
auditMark: 0, |
|
|
|
auditMark: 0, |
|
|
|
createSource: 'WEBM' |
|
|
|
createSource: 'WEBM' |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
imgeDialogVisible: false, // 线下交易凭证弹窗 |
|
|
|
gridNum: { |
|
|
|
gridNum: { |
|
|
|
row: { |
|
|
|
row: { |
|
|
|
gutter: 2 |
|
|
|
gutter: 2 |
|
|
@ -153,16 +170,40 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
openDrawer() {}, |
|
|
|
openDrawer() {}, |
|
|
|
|
|
|
|
transactionTypeChange(type) { // 交易类型发生改变 |
|
|
|
|
|
|
|
if (this.oilCompanyAccountReverse.transactionType === 'CHARGE_SALES' || this.oilCompanyAccountReverse.transactionType === 'REVOKE') { |
|
|
|
|
|
|
|
this.oilCompanyAccountReverse.rechargeRebate = 0 |
|
|
|
|
|
|
|
this.oilCompanyAccountReverse.rechargeRebateAmount = 0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
offlineTransactionProofRemove() { // 线下交易凭证删除 |
|
|
|
|
|
|
|
this.oilCompanyAccountReverse.offlineTransactionProofImageShow = undefined |
|
|
|
|
|
|
|
this.oilCompanyAccountReverse.offlineTransactionProof = undefined |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
offlineTransactionProofSuccess(response, file) { // 线下交易凭证上传成功 |
|
|
|
|
|
|
|
console.log('response', response) |
|
|
|
|
|
|
|
if (response.code === 20000) { |
|
|
|
|
|
|
|
this.oilCompanyAccountReverse.offlineTransactionProof = response.data.path |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
offlineTransactionProofPreview(file) { // 查询大图 |
|
|
|
|
|
|
|
this.oilCompanyAccountReverse.offlineTransactionProofImageShow = file.url |
|
|
|
|
|
|
|
this.imgeDialogVisible = true |
|
|
|
|
|
|
|
}, |
|
|
|
submit() { |
|
|
|
submit() { |
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
Object.assign(this.form, this.controlWindows.addInfo); |
|
|
|
this.save(this.oilCompanyAccountReverse) |
|
|
|
serve.modifyPrice(this.form).then((res) => { |
|
|
|
|
|
|
|
this.$message.success(res.msg); |
|
|
|
|
|
|
|
this.closeWindow(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
save() { |
|
|
|
|
|
|
|
// 保存 |
|
|
|
|
|
|
|
serve.save(this.oilCompanyAccountReverse).then(res => { |
|
|
|
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
|
|
|
this.$emit('closeDialog') |
|
|
|
|
|
|
|
this.$emit('getByPage') |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
closeWindow() { |
|
|
|
closeWindow() { |
|
|
|
this.form = {}; |
|
|
|
this.form = {}; |
|
|
@ -176,4 +217,3 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|
|
|
|