feat: 暂存

pull/1/head
douqi 2 years ago
parent 6dd00a42b1
commit 41d51e701f
  1. 134
      src/views/financialCenter/accountManagement/components/recharge.vue

@ -8,22 +8,84 @@
> >
<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="form" label-width="120px">
<el-form-item label="成本价" prop="floorPrice"> <el-row :gutter="gridNum.row.gutter">
<el-input <el-col :span="12">
maxlength="50" <el-form-item label="交易类型" prop="transactionType" @click="transactionTypeChange">
v-checkNum <el-select v-model="oilCompanyAccountReverse.transactionType">
v-model="form.floorPrice" <el-option label="充值" value="RECHARGE" />
placeholder="请输入成本价" <el-option label="销账" value="REVOKE" />
></el-input> <el-option label="赊销" value="CHARGE_SALES" />
<el-option label="消费返利" value="CONSUME_REBATE" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="企业销售价" prop="salePrice2company"> </el-col>
<el-input <el-col :span="12">
maxlength="50" <el-form-item label="交易金额" prop="transactionAmount">
v-checkNum <el-input v-model="oilCompanyAccountReverse.transactionAmount" placeholder="交易金额" clearable />
v-model="form.salePrice2company"
placeholder="请输入企业销售价"
></el-input>
</el-form-item> </el-form-item>
</el-col>
<el-col v-if="(companyFinance.settlementModes===1||companyFinance.settlementModes===3) && oilCompanyAccountReverse.transactionType === 'RECHARGE'" :span="12">
<el-form-item label="充值返利比例" prop="rechargeRebate">
<el-input v-model="oilCompanyAccountReverse.rechargeRebate" clearable />
</el-form-item>
</el-col>
<el-col v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'" :span="12">
<el-form-item label="线下汇款公司账户" prop="offlinePaymentCompany">
<el-input v-model="oilCompanyAccountReverse.offlinePaymentCompany" placeholder="线下汇款公司账户" clearable />
</el-form-item>
</el-col>
<el-col v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'" :span="12">
<el-form-item label="线下交易发起时间" prop="offlineStartTime">
<el-date-picker
v-model="oilCompanyAccountReverse.offlineStartTime"
clearable
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="线下交易发起时间"
/>
</el-form-item>
</el-col>
<el-col v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'" :span="12">
<el-form-item label="线下交易完成时间" prop="offlineCompleteTime">
<el-date-picker
v-model="oilCompanyAccountReverse.offlineCompleteTime"
clearable
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="线下交易完成时间"
/>
</el-form-item>
</el-col>
<el-col v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'" :span="12">
<el-form-item label="线下交易凭证" prop="offlineTransactionProof">
<el-upload
:action="uploadUrl"
list-type="picture-card"
:on-preview="offlineTransactionProofPreview"
:on-success="offlineTransactionProofSuccess"
:before-upload="imgCompress"
:on-remove="offlineTransactionProofRemove"
:headers="headers"
:data="{'code':'A003'}"
:limit="1"
>
<i class="el-icon-plus" />
</el-upload>
</el-form-item>
<el-dialog
v-el-drag-dialog
:visible.sync="imgeDialogVisible"
title="线下交易凭证"
:modal="false"
>
<img width="100%" :src="oilCompanyAccountReverse.offlineTransactionProofImageShow" alt="">
</el-dialog>
</el-col>
</el-row>
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -43,14 +105,50 @@ export default {
data() { data() {
return { return {
form: {}, form: {},
oilCompanyAccountReverse: {
offlineTransactionProof: undefined,
offlineTransactionProofImageShow: undefined,
companyId: this.oilCompanyAccount.companyId,
transactionType: undefined,
transactionAmount: undefined,
rechargeRebate: undefined,
offlinePaymentCompany: undefined,
offlineStartTime: undefined,
offlineCompleteTime: undefined,
transactionState: 0,
auditMark: 0,
createSource: 'WEBM'
},
gridNum: {
row: {
gutter: 2
},
cols: {
xs: 24,
sm: 24,
md: 12,
lg: 12,
xl: 6
}
},
rules: { rules: {
floorPrice: [ transactionType: [
{ required: true, message: "请输入成本价", trigger: "blur" }, { required: true, message: '请选择交易类型', trigger: 'change' }
], ],
salePrice2company: [ transactionAmount: [
{ required: true, message: "请输入企业销售价", trigger: "blur" }, { required: true, message: '请输入交易金额', trigger: 'blur' },
{ pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '金额格式有误' }
], ],
rechargeRebate: [
{ pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, message: '格式有误' }
],
offlinePaymentCompany: [
{ min: 5, max: 10, message: '长度在 5 到 10 个字符', trigger: 'blur' }
]
}, },
companyFinance: {
}//
}; };
}, },
methods: { methods: {

Loading…
Cancel
Save