Merge branch 'xiaozy_产品列表' of http://121.196.213.68:3000/xiaozhiyong/refinery-admin into lixuan

pull/1/head
lixuan 2 years ago
commit 12d6fb072f
  1. 40
      src/utils/dataType.js
  2. 177
      src/views/financialCenter/accountManagement/components/recharge.vue
  3. 5
      src/views/financialCenter/accountManagement/index.vue
  4. 1
      src/views/financialCenter/enterpriseRecharge/components/add.vue
  5. 60
      src/views/financialCenter/enterpriseRecharge/components/addTurn.vue
  6. 6
      src/views/financialCenter/enterpriseRecharge/components/examine.vue
  7. 2
      src/views/financialCenter/enterpriseRecharge/index.vue
  8. 21
      src/views/product/components/create.vue
  9. 3
      src/views/product/index.vue

@ -18,18 +18,42 @@ export const rechargeTypeEnum = [
label: "充值",
value: "RECHARGE",
},
// {
// label: "销账",
// value: "REVOKE",
// },
// {
// label: "赊销",
// value: "CHARGE_SALES",
// },
{
label: "销账",
value: "REVOKE",
},
{
label: "赊销",
value: "CHARGE_SALES",
},
{
label: "转账",
value: "TRANSFER",
},
{
label: "圈回",
value: "TURN",
},
{
label: "消费返利",
value: "CONSUME_REBATE",
},
{
label: "修正平账",
value: "CORRECTION",
},
{
label: "订单支付",
value: "PAYMENT",
},
{
label: "订单回退",
value: "RETURN",
},
{
label: "订单退款",
value: "REFUND",
},
];
// 交易状态
export const rechargeStatusEnum = [

@ -2,25 +2,16 @@
<el-dialog
title="充值"
:visible.sync="controlWindows.recharge"
width="55%"
width="45%"
:before-close="closeWindow"
@opened="openDrawer"
>
<div class="recharge">
<el-form
ref="form"
:rules="rules"
:model="oilCompanyAccountReverse"
label-width="130px"
>
<el-row :gutter="gridNum.row.gutter">
<el-form ref="form" :rules="rules" :model="form" label-width="130px">
<el-row :gutter="2">
<el-col :span="12">
<el-form-item
label="交易类型"
prop="transactionType"
@click="transactionTypeChange"
>
<el-select v-model="oilCompanyAccountReverse.transactionType">
<el-form-item label="交易类型" prop="transactionType">
<el-select v-model="form.transactionType">
<el-option label="充值" value="RECHARGE" />
</el-select>
</el-form-item>
@ -28,7 +19,7 @@
<el-col :span="12">
<el-form-item label="交易金额" prop="transactionAmount">
<el-input
v-model="oilCompanyAccountReverse.transactionAmount"
v-model="form.transactionAmount"
placeholder="交易金额"
clearable
/>
@ -36,91 +27,74 @@
</el-col>
<el-col
v-if="
(companyFinance.settlementModes === 1 ||
companyFinance.settlementModes === 3) &&
oilCompanyAccountReverse.transactionType === 'RECHARGE'
companyFinance.settlementModes === 1 ||
companyFinance.settlementModes === 3
"
:span="12"
>
<el-form-item label="充值返利比例" prop="rechargeRebate">
<el-input
v-model="oilCompanyAccountReverse.rechargeRebate"
clearable
/>
<el-input v-model="form.rechargeRebate" clearable />
</el-form-item>
</el-col>
<el-col
v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'"
:span="12"
>
<el-col :span="12">
<el-form-item label="线下汇款公司账户" prop="offlinePaymentCompany">
<el-input
v-model="oilCompanyAccountReverse.offlinePaymentCompany"
v-model="form.offlinePaymentCompany"
placeholder="线下汇款公司账户"
clearable
/>
</el-form-item>
</el-col>
<el-col
v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'"
:span="12"
>
<el-col :span="12">
<el-form-item label="线下交易发起时间" prop="offlineStartTime">
<el-date-picker
v-model="oilCompanyAccountReverse.offlineStartTime"
v-model="form.offlineStartTime"
clearable
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="00:00:00"
type="datetime"
placeholder="线下交易发起时间"
/>
</el-form-item>
</el-col>
<el-col
v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'"
:span="12"
>
<el-col :span="12">
<el-form-item label="线下交易完成时间" prop="offlineCompleteTime">
<el-date-picker
v-model="oilCompanyAccountReverse.offlineCompleteTime"
v-model="form.offlineCompleteTime"
clearable
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
type="datetime"
placeholder="线下交易完成时间"
/>
</el-form-item>
</el-col>
<el-col
v-if="oilCompanyAccountReverse.transactionType !== 'REVOKE'"
:span="12"
>
<el-col :span="12">
<el-form-item label="线下交易凭证" prop="offlineTransactionProof">
<el-upload
:action="uploadUrl"
list-type="picture-card"
:on-preview="offlineTransactionProofPreview"
:on-success="offlineTransactionProofSuccess"
:on-remove="offlineTransactionProofRemove"
:headers="headers"
:data="{ code: 'A003' }"
:limit="1"
:file-list="fileList"
:data="{
ossKey: 'xingyou',
pathKey: 'other',
encrypt: 'PUBLIC',
code: 'A003',
}"
list-type="picture-card"
>
<i class="el-icon-plus" />
</el-upload>
<el-dialog :visible.sync="imgeDialogVisible" :modal="false">
<img width="100%" :src="form.offlineTransactionProof" />
</el-dialog>
</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>
@ -134,15 +108,13 @@
<script>
import serve from "api/financialCenter/accountManagement.js";
import utils from "utils/encode";
const JSESSIONID = utils.uuid();
export default {
props: {
controlWindows: Object,
oilCompanyAccount: {
type: Object,
default() {},
},
},
data() {
return {
@ -157,33 +129,9 @@ export default {
JSESSIONID: JSESSIONID,
token: utils.bcrypt(JSESSIONID),
},
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",
},
fileList: [],
form: {},
imgeDialogVisible: false, // 线
gridNum: {
row: {
gutter: 2,
},
cols: {
xs: 24,
sm: 24,
md: 12,
lg: 12,
xl: 6,
},
},
rules: {
transactionType: [
{ required: true, message: "请选择交易类型", trigger: "change" },
@ -191,67 +139,44 @@ export default {
transactionAmount: [
{ required: true, message: "请输入交易金额", trigger: "blur" },
],
rechargeRebate: [
{ required: true, message: "请输入交易金额", trigger: "blur" },
],
offlinePaymentCompany: [
{
min: 5,
max: 10,
message: "长度在 5 到 10 个字符",
trigger: "blur",
},
],
},
companyFinance: {}, //
};
},
methods: {
openDrawer() {},
transactionTypeChange(type) {
//
if (
this.oilCompanyAccountReverse.transactionType === "CHARGE_SALES" ||
this.oilCompanyAccountReverse.transactionType === "REVOKE"
) {
this.oilCompanyAccountReverse.rechargeRebate = 0;
this.oilCompanyAccountReverse.rechargeRebateAmount = 0;
openDrawer() {
let { id } = this.controlWindows.addInfo;
if (id) {
}
},
offlineTransactionProofRemove() {
// 线
this.oilCompanyAccountReverse.offlineTransactionProofImageShow =
undefined;
this.oilCompanyAccountReverse.offlineTransactionProof = undefined;
this.form.offlineTransactionProof = "";
},
offlineTransactionProofSuccess(response, file) {
// 线
console.log("response", response);
if (response.code === 20000) {
this.oilCompanyAccountReverse.offlineTransactionProof =
response.data.path;
if (response.code !== 20000) {
this.$message.error(response.msg);
this.fileList = [];
return;
}
this.form.offlineTransactionProof = response.data.path;
},
offlineTransactionProofPreview(file) {
//
this.oilCompanyAccountReverse.offlineTransactionProofImageShow = file.url;
if (!this.form.offlineTransactionProof) return;
this.imgeDialogVisible = true;
},
submit() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.save(this.oilCompanyAccountReverse);
serve.save(this.form).then((res) => {
this.$message.success(res.msg);
this.$emit("closeDialog");
this.$emit("getByPage");
});
}
});
},
save() {
//
serve.save(this.oilCompanyAccountReverse).then((res) => {
this.$message.success(res.msg);
this.$emit("closeDialog");
this.$emit("getByPage");
});
},
closeWindow() {
this.form = {};
this.$emit("closeWindow");
@ -270,7 +195,7 @@ export default {
.el-select,
.el-textarea,
.el-autocomplete {
width: 300px;
width: 200px;
}
}
</style>

@ -144,10 +144,7 @@
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toRecharge(row.id)">
<el-button type="text">
<svg-icon icon-class="iconicon-" />
充值
</el-button>
<el-button type="text"> 充值 </el-button>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>

@ -343,6 +343,7 @@ export default {
closeWindow() {
this.$emit("closeWindow");
this.form = {};
this.fileList = [];
this.controlWindows.addInfo = {};
this.$nextTick(() => {
this.$refs.form.clearValidate();

@ -104,11 +104,21 @@ export default {
controlWindows: Object,
},
data() {
let validatorcompanyId = (rule, value, callback) => {
if (this.form.companyId) callback();
else callback("请选择公司");
// let validatorcompanyId = (rule, value, callback) => {
// if (this.form.companyId) callback();
// else callback("");
// };
let validatortransactionAmount = (rule, value, callback) => {
let typeTarget = this.correspondTypeEnum.find(
(item) => item.value === this.form.turnType
);
let superiorLimit = this.companyInfo[typeTarget.valueKey];
if (value == "") callback("请输入圈回金额");
if (value > superiorLimit) {
callback(`圈回金额不可超过${typeTarget.label}`);
}
callback();
};
return {
companyFinance: {},
companyInfo: {},
@ -124,14 +134,18 @@ export default {
echoName: "",
},
rules: {
companyId: [
{ required: true, validator: validatorcompanyId, trigger: "change" },
],
// companyId: [
// { required: true, validator: validatorcompanyId, trigger: "change" },
// ],
turnType: [
{ required: true, message: "请选择交易类型", trigger: "change" },
],
transactionAmount: [
{ required: true, message: "请输入圈回金额", trigger: "blur" },
{
required: true,
validator: validatortransactionAmount,
trigger: "change",
},
],
reverseRemark: [
{ required: true, message: "请输入圈回说明", trigger: "blur" },
@ -143,21 +157,21 @@ export default {
label: "充值余额",
valueKey: "rechargeBalance",
},
{
value: 2,
label: "赊销余额",
valueKey: "chargeRechargeBalance",
},
{
value: 3,
label: "充值返利余额",
valueKey: "rechargeRebateBalance",
},
{
value: 4,
label: "消费返利余额",
valueKey: "consumeRebateBalance",
},
// {
// value: 2,
// label: "",
// valueKey: "chargeRechargeBalance",
// },
// {
// value: 3,
// label: "",
// valueKey: "rechargeRebateBalance",
// },
// {
// value: 4,
// label: "",
// valueKey: "consumeRebateBalance",
// },
],
};
},

@ -31,9 +31,9 @@ export default {
},
methods: {
closeWindow() {
this.auditRemark = "";
this.controlWindows.addInfo = {};
this.$emit("closeWindow");
// this.auditRemark = "";
// this.controlWindows.addInfo = {};
// this.$emit("closeWindow");
this.controlWindows.examine = false;
},
submit() {

@ -331,7 +331,7 @@
</template>
<script>
import serve from "api/financialCenter/enterpriseRechargeDetails.js";
import serve from "api/financialCenter/enterpriseRecharge.js";
import commonServe from "api/common.js";
import add from "./components/add.vue";

@ -258,27 +258,6 @@ export default {
// else
return serve.orderSave(form);
},
//list
// findByEntity() {
// refineryServe.findByEntity().then((res) => {
// this.refineryList = res.data;
// });
// },
//
// querySearchAsync(queryString, cb) {
// if (queryString) {
// refineryServe
// .findByEntity({ refineryName: queryString })
// .then((res) => {
// let timeInstance = setTimeout(() => {
// clearTimeout(timeInstance);
// if (res.data.length) {
// cb(res.data);
// } else cb([]);
// }, 1000 * Math.random());
// });
// } else cb([]);
// },
closeWindow() {
this.$emit("closeWindow");
this.form = {};

@ -65,6 +65,9 @@
show-overflow-tooltip
>
</el-table-column>
<el-table-column prop="productType" label="产品类型"> </el-table-column>
<el-table-column
prop="refineryName"
label="炼厂名称"

Loading…
Cancel
Save