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

This commit is contained in:
KongDuo
2023-02-22 14:19:20 +08:00
18 changed files with 827 additions and 297 deletions

View File

@@ -344,9 +344,7 @@
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toUpdate(scope.row.id)">
<el-button
:size="$store.getters.size"
type="text">
<el-button :size="$store.getters.size" type="text">
<svg-icon icon-class="iconicon-" />
基础资料
</el-button>
@@ -431,11 +429,19 @@
</general-details>
</el-drawer>
<!-- 修改弹窗 -->
<el-dialog v-el-drag-dialog title="修改" :visible.sync="updateDialog" width="55%">
<OilCompanyInfoUpdate v-if="updateDialog" :oil-company-info="oilCompanyInfo" @getByPage="getByPage" @closeDialog="closeDialog" />
<el-dialog
v-el-drag-dialog
title="修改"
:visible.sync="updateDialog"
width="55%"
>
<OilCompanyInfoUpdate
v-if="updateDialog"
:oil-company-info="oilCompanyInfo"
@getByPage="getByPage"
@closeDialog="closeDialog"
/>
</el-dialog>
<!-- 添加弹窗 -->
@@ -443,7 +449,8 @@
v-el-drag-dialog
title="添加"
:visible.sync="addDialog"
width="55%">
width="55%"
>
<OilCompanyInfoAdd
v-if="addDialog"
@getByPage="getByPage"
@@ -829,14 +836,14 @@ export default {
this.addDialog = true;
},
toUpdate(id) {
console.log(id)
console.log(this.updateDialog)
console.log(id);
console.log(this.updateDialog);
// 跳转到更新
oilCompanyInfoApi.get(id).then(res => {
console.log(res)
this.oilCompanyInfo = res.data
this.updateDialog = true
console.log(this.updateDialog)
oilCompanyInfoApi.get(id).then((res) => {
console.log(res);
this.oilCompanyInfo = res.data;
this.updateDialog = true;
console.log(this.updateDialog);
});
},
toAddAuth(id) {
@@ -859,6 +866,9 @@ export default {
<style lang="scss" scoped>
.enterprise-recharge-details {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;

View File

@@ -2,28 +2,127 @@
<el-dialog
title="充值"
:visible.sync="controlWindows.recharge"
width="30%"
width="55%"
:before-close="closeWindow"
@opened="openDrawer"
>
<div class="recharge.vue">
<el-form ref="form" :rules="rules" :model="form" label-width="120px">
<el-form-item label="成本价" prop="floorPrice">
<el-input
maxlength="50"
v-checkNum
v-model="form.floorPrice"
placeholder="请输入成本价"
></el-input>
</el-form-item>
<el-form-item label="企业销售价" prop="salePrice2company">
<el-input
maxlength="50"
v-checkNum
v-model="form.salePrice2company"
placeholder="请输入企业销售价"
></el-input>
</el-form-item>
<div class="recharge">
<el-form
ref="form"
:rules="rules"
:model="oilCompanyAccountReverse"
label-width="130px"
>
<el-row :gutter="gridNum.row.gutter">
<el-col :span="12">
<el-form-item
label="交易类型"
prop="transactionType"
@click="transactionTypeChange"
>
<el-select v-model="oilCompanyAccountReverse.transactionType">
<el-option label="充值" value="RECHARGE" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="交易金额" prop="transactionAmount">
<el-input
v-model="oilCompanyAccountReverse.transactionAmount"
placeholder="交易金额"
clearable
/>
</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"
: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>
</div>
<span slot="footer" class="dialog-footer">
@@ -35,37 +134,124 @@
<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 {
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: {
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",
},
imgeDialogVisible: false, // 线下交易凭证弹窗
gridNum: {
row: {
gutter: 2,
},
cols: {
xs: 24,
sm: 24,
md: 12,
lg: 12,
xl: 6,
},
},
rules: {
floorPrice: [
{ required: true, message: "请输入成本价", trigger: "blur" },
transactionType: [
{ required: true, message: "请选择交易类型", trigger: "change" },
],
salePrice2company: [
{ required: true, message: "请输入企业销售价", trigger: "blur" },
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;
}
},
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() {
this.$refs["form"].validate((valid) => {
if (valid) {
Object.assign(this.form, this.controlWindows.addInfo);
serve.modifyPrice(this.form).then((res) => {
this.$message.success(res.msg);
this.closeWindow();
});
this.save(this.oilCompanyAccountReverse);
}
});
},
save() {
// 保存
serve.save(this.oilCompanyAccountReverse).then((res) => {
this.$message.success(res.msg);
this.$emit("closeDialog");
this.$emit("getByPage");
});
},
closeWindow() {
this.form = {};
this.$emit("closeWindow");
@@ -78,4 +264,13 @@ export default {
};
</script>
<style lang="scss" scoped>
.recharge {
.el-input,
.el-select,
.el-textarea,
.el-autocomplete {
width: 300px;
}
}
</style>

View File

@@ -65,13 +65,26 @@
>
>
<el-table-column type="selection" width="55" />
<el-table-column prop="companyName" label="公司名称" minWidth="300">
<el-table-column prop="companyName" label="企业名称" minWidth="300">
<template slot-scope="{ row }">
<span style="padding-left: 8px">{{ row.companyName }}</span>
<br />
<span style="padding-left: 8px"
>业务负责人:{{ row.businessLeader }}</span
>
<div class="companyName">
<el-tag
effect="dark"
:type="
accountStateEnum.find(
(item) => item.value === row.accountState
).type
"
>
{{
accountStateEnum.find(
(item) => item.value === row.accountState
).label
}}
</el-tag>
<p>{{ row.companyName }}</p>
<p>业务负责人:{{ row.businessLeader }}</p>
</div>
</template>
</el-table-column>
<el-table-column label="企业性质" minWidth="120">
@@ -100,11 +113,11 @@
label="充值余额"
minWidth="120"
/>
<el-table-column
<!-- <el-table-column
prop="chargeRechargeBalance"
label="赊销充值余额"
minWidth="120"
/>
/> -->
<el-table-column
prop="rechargeRebateBalance"
label="充值返利余额"
@@ -115,11 +128,11 @@
label="消费返利余额"
minWidth="120"
/>
<el-table-column
<!-- <el-table-column
prop="totalChargeAmount"
label="赊销待还"
minWidth="120"
/>
/> -->
<el-table-column prop="createTime" label="创建时间" minWidth="200" />
<el-table-column fixed="right" label="操作" width="150px">
@@ -131,7 +144,7 @@
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toRecharge(row.id)">
<el-button :size="$store.getters.size" type="text">
<el-button type="text">
<svg-icon icon-class="iconicon-" />
充值
</el-button>
@@ -144,9 +157,86 @@
<!-- 分页 -->
<pagination :parameter="parameter" @searchAgain="getByPage" />
</div>
<!-- 添加充值 -->
<recharge :controlWindows="controlWindows" @closeWindow="closeDialog" />
<recharge
:controlWindows="controlWindows"
:oil-company-account="oilCompanyAccount"
@getByPage="getByPage"
@closeWindow="closeDialog"
/>
<!-- 详情 -->
<el-drawer
title="详情"
direction="ltr"
size="60%"
:withHeader="false"
:visible.sync="controlWindows.detail"
>
<general-details
title="详情"
:isHeader="true"
v-if="controlWindows.detail"
:sourceData="oilCompanyMatch"
:mappingData="mappingData"
@close="controlWindows.detail = false"
>
<template #parentMark>
<p>
{{ oilCompanyMatch[0].parentMark === 0 ? "主体公司" : "分公司" }}
</p>
</template>
<template #companyNature>
<p v-if="oilCompanyMatch[0]">
{{
companyNatureEnum.find(
(item) => item.value === oilCompanyMatch[0].companyNature
).label
}}
</p>
</template>
<template #enableMark>
<p>
{{ oilCompanyMatch[0].enableMark === 0 ? "禁用" : "启用" }}
</p>
</template>
<template #auditMark>
<p>
{{ auditMarkEnum[oilCompanyMatch[0].enableMark] }}
</p>
</template>
<template #accountState>
<p v-if="oilCompanyMatch[1]">
{{
accountStatusEnum.find(
(item) => item.value === oilCompanyMatch[1].accountState
).label
}}
</p>
</template>
<template #accountType>
<p>
{{ oilCompanyMatch[1].accountType == 0 ? "基础账户" : "" }}
</p>
</template>
<template #businessLienceImg>
<el-image
style="width: 100px; height: 100px"
:src="oilCompanyMatch[2].businessLienceImg"
/>
</template>
<template #settlementModes>
<p>
{{ settlementModesEnum[oilCompanyMatch[3].settlementModes] }}
</p>
</template>
<template #defaultShare>
<p>
{{ oilCompanyMatch[3].defaultShare === 1 ? "共享" : "不共享" }}
</p>
</template>
</general-details>
</el-drawer>
</div>
</template>
@@ -159,6 +249,8 @@ import autocomplete from "components/autocomplete/index.vue";
import pagination from "components/pagination/index.vue";
import generalDetails from "components/generalDetails/index.vue";
import { accountStatusEnum } from "utils/dataType.js";
export default {
components: {
recharge,
@@ -168,6 +260,7 @@ export default {
},
data() {
return {
accountStatusEnum: accountStatusEnum,
oilCompanyAccount: {},
controlWindows: {
detail: false,
@@ -211,14 +304,17 @@ export default {
{
label: "禁用",
value: 0,
type: "info",
},
{
label: "启用",
value: 1,
type: "",
},
{
label: "冻结",
value: -1,
type: "info",
},
],
companyNatureEnum: [
@@ -251,6 +347,86 @@ export default {
value: 6,
},
],
oilCompanyMatch: {},
mappingData: [
{
carTitle: "基础信息",
// 标记
carItems: [
{ label: "账户ID", value: "id" },
{ label: "企业名称", value: "name" },
{ label: "企业简称", value: "abbreviaName" },
{ label: "是否为主体公司", value: "parentMark" },
// { label: "上级公司", value: "name" },
{ label: "企业性质", value: "companyNature" },
{ label: "启用标识", value: "enableMark" },
{ label: "审核标识", value: "auditMark" },
{ label: "审核说明", value: "auditRemarks" },
{ label: "创建人编码", value: "createUser" },
{ label: "创建时间", value: "createTime" },
],
},
{
carTitle: "账户信息",
carItems: [
{ label: "账户总余额", value: "balance" },
{ label: "待还总金额", value: "totalChargeAmount" },
{ label: "账户状态", value: "accountState" },
{ label: "账户类型", value: "accountType" },
{ label: "账户充值余额", value: "rechargeBalance" },
{ label: "充值返利余额", value: "rechargeRebateBalance" },
{ label: "消费返利余额", value: "consumeRebateBalance" },
{ label: "累计充值金额", value: "totalRechargeAmount" },
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
],
},
{
carTitle: "认证信息",
carItems: [
{ label: "企业名称", value: "companyName" },
{ label: "省份名称", value: "provinceName" },
{ label: "城市名称", value: "cityName" },
{ label: "区县名称", value: "areaName" },
{ label: "详细地址", value: "address" },
{ label: "法人代表", value: "companyLegalPerson" },
{ label: "注册资本", value: "registeredCapital" },
{ label: "经营范围", value: "businessScope" },
{ label: "经营资质", value: "businessQualia" },
{ label: "联系方式", value: "contactPhone" },
{ label: "企业网址", value: "website" },
{ label: "营业执照号码", value: "businessLienceId" },
{ label: "营业执照照片", value: "businessLienceImg" },
{ label: "创建人编号", value: "createUser" },
{ label: "创建时间", value: "createTime" },
],
},
{
carTitle: "财务信息",
carItems: [
{ label: "结算方式", value: "settlementModes" },
{ label: "充值返利费率", value: "rechargeRebate" },
{ label: "消费返利叠加费率", value: "consumptionRebate" },
{ label: "结账周期", value: "billingCycle" },
{ label: "是否开启企业共享额度", value: "defaultShare" },
{ label: "默认单次额度上限", value: "defaultOnceUp" },
{ label: "默认单日加油额度上限", value: "defaultDayUp" },
{ label: "创建人编号", value: "createUser" },
{ label: "创建时间", value: "createTime" },
],
},
],
auditMarkEnum: {
0: "零售客户",
1: "外请客户",
2: "渠道客户",
"-3": "存量客户",
},
settlementModesEnum: {
1: "充值返利",
2: "消费返利",
3: "充值返利+消费返利",
},
};
},
created() {
@@ -277,6 +453,7 @@ export default {
},
//table list
getByPage() {
this.parameter.params["companyType"] = "4";
serve.getByPage(this.parameter).then((res) => {
this.tableData = res.data.list;
this.parameter.total = res.data.totalCount;
@@ -302,6 +479,31 @@ export default {
},
detail(row) {
//TODO
serve.get(row.id).then((res) => {
Promise.all([
//基础信息
serve.getInfo(res.data.companyId),
// 账户信息
commonServe.getByCompanyId(res.data.companyId),
// 认证信息
serve.getByCompanyIdAuth(res.data.companyId),
// 财务信息
commonServe.getByCompanyIdFinance(res.data.companyId),
]).then(([firstRes, secondRes, thirdRes, fourthRes]) => {
this.oilCompanyMatch = [
firstRes.data,
secondRes.data,
thirdRes.data,
fourthRes.data,
];
if (firstRes.parentMark === 1) {
serve.getInfo(firstRes.parentId).then((res) => {
this.oilCompanyMatch[0] = res.data;
this.controlWindows.detail = true;
});
} else this.controlWindows.detail = true;
});
});
},
toRecharge(id) {
// 跳转到充值
@@ -339,6 +541,9 @@ export default {
<style lang="scss" scoped>
.bill-details {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;
@@ -385,11 +590,16 @@ export default {
padding: 15px;
}
.gray {
color: #999;
span {
color: #333;
.companyName {
position: relative;
.el-tag {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
p {
padding-left: 50px;
}
}
@@ -412,9 +622,5 @@ export default {
font-size: 12px;
}
}
.ft14 {
font-size: 14px;
}
}
</style>

View File

@@ -139,44 +139,59 @@
:mappingData="mappingData"
@close="controlWindows.detail = false"
>
<template #balance>
<p class="ft14">
上次:<span>{{ oilCompanyMatch.lastBalance }}</span>
<template #billType>
<p>
{{
rechargeTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].billType
).label
}}
</p>
<p class="ft14">
本次:<span>{{ oilCompanyMatch.currentBalance }}</span>
</template>
<template #balance>
<p>
上次:<span>{{ oilCompanyMatch[0].lastBalance }}</span>
</p>
<p>
本次:<span>{{ oilCompanyMatch[0].currentBalance }}</span>
</p>
</template>
<template #rechargeBalance>
<p class="ft14">
上次:<span>{{ oilCompanyMatch.lastRechargeBalance }}</span>
<p>
上次:<span>{{ oilCompanyMatch[0].lastRechargeBalance }}</span>
</p>
<p class="ft14">
本次:<span>{{ oilCompanyMatch.currentRechargeBalance }}</span>
<p>
本次:<span>{{ oilCompanyMatch[0].currentRechargeBalance }}</span>
</p>
</template>
<template #chargeRechargeBalance>
<p class="ft14">
上次:<span>{{ oilCompanyMatch.lastChargeRechargeBalance }}</span>
<p>
上次:<span>{{ oilCompanyMatch[0].lastChargeRechargeBalance }}</span>
</p>
<p class="ft14">
本次:<span>{{ oilCompanyMatch.currentChargeRechargeBalance }}</span>
<p>
本次:<span>{{
oilCompanyMatch[0].currentChargeRechargeBalance
}}</span>
</p>
</template>
<template #rechargeRebateBalance>
<p class="ft14">
上次:<span>{{ oilCompanyMatch.lastRechargeRebateBalance }}</span>
<p>
上次:<span>{{ oilCompanyMatch[0].lastRechargeRebateBalance }}</span>
</p>
<p class="ft14">
本次:<span>{{ oilCompanyMatch.currentRechargeRebateBalance }}</span>
<p>
本次:<span>{{
oilCompanyMatch[0].currentRechargeRebateBalance
}}</span>
</p>
</template>
<template #consumeRebateAmount>
<p class="ft14">
上次:<span>{{ oilCompanyMatch.lastConsumeRebateAmount }}</span>
<p>
上次:<span>{{ oilCompanyMatch[0].lastConsumeRebateAmount }}</span>
</p>
<p class="ft14">
本次:<span>{{ oilCompanyMatch.currentConsumeRebateAmount }}</span>
<p>
本次:<span>{{
oilCompanyMatch[0].currentConsumeRebateAmount
}}</span>
</p>
</template>
<template #table>
@@ -226,6 +241,8 @@ import commonServe from "api/common.js";
import autocomplete from "components/autocomplete/index.vue";
import pagination from "components/pagination/index.vue";
import generalDetails from "components/generalDetails/index.vue";
import { rechargeTypeEnum } from "utils/dataType.js";
export default {
components: {
pagination,
@@ -259,30 +276,16 @@ export default {
label: "分油",
value: "SEPARATION_OIL",
},
{
label: "充值",
value: "RECHARGE",
},
{
label: "圈回",
value: "TURN",
},
{
label: "销账",
value: "REVOKE",
},
{
label: "赊销",
value: "CHARGE_SALES",
},
...rechargeTypeEnum,
{
label: "充值返利",
value: "RECHARGE_REBETE",
},
{
label: "消费返利",
value: "CONSUME_REBATE",
},
],
oilCompanyMatch: {},
@@ -373,7 +376,7 @@ export default {
};
serve.getCompanyAccountRecord(params).then((res) => {
this.tableDataSec = [];
this.oilCompanyMatch = row;
this.oilCompanyMatch = [row];
this.controlWindows.detail = true;
});
},
@@ -404,6 +407,9 @@ export default {
<style lang="scss" scoped>
.bill-details {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;

View File

@@ -208,22 +208,6 @@
</template>
</el-table-column>
<!-- <el-table-column label="赊账还款审核">
<template slot-scope="{ row }">
<p v-if="row.transactionType && row.chargeSalesAuditMark">
{{
row.transactionType !== "CHARGE_SALES" ||
(row.transactionType === "CHARGE_SALES" &&
row.transactionState === -1)
? "无状态"
: repaymentExamineEnum.find(
(item) => item.value === row.chargeSalesAuditMark
).label
}}
</p>
</template>
</el-table-column> -->
<el-table-column
prop="createTime"
label="创建时间"
@@ -287,9 +271,54 @@
<template #offlineTransactionProof>
<el-image
style="width: 100px; height: 100px"
:src="oilCompanyMatch.offlineTransactionProof"
:src="oilCompanyMatch[0].offlineTransactionProof"
/>
</template>
<template #transactionType>
<p>
{{
oilCompanyMatch.transactionType === "TURN"
? LoopBackTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].turnType
).label
: rechargeTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].transactionType
).label
}}
</p>
</template>
<template #transactionState>
<p>
{{
rechargeStatusEnum.find(
(item) => item.value === oilCompanyMatch[0].transactionState
).label
}}
</p>
</template>
<template #auditMark>
<p>
{{
auditMarkEnum.find(
(item) => item.value === oilCompanyMatch[0].auditMark
).label
}}
</p>
</template>
<template #accountState>
<p>
{{
accountStatusEnum.find(
(item) => item.value === oilCompanyMatch[1].accountState
).label
}}
</p>
</template>
<template #accountType>
<p>
{{ oilCompanyMatch[1].accountType === "0" ? "基础账户" : "" }}
</p>
</template>
<template v-if="controlWindows.addInfo.examineMark" #footer>
<el-button type="success" @click="examineAdopt">审核通过</el-button>
<el-button type="danger" @click="examineFail">审核不通过</el-button>
@@ -317,6 +346,7 @@ import {
rechargeTypeEnum,
rechargeStatusEnum,
repaymentExamineEnum,
accountStatusEnum,
} from "utils/dataType.js";
export default {
@@ -338,6 +368,7 @@ export default {
detail: false,
examine: false,
},
accountStatusEnum: accountStatusEnum,
rechargeTypeEnum: [
{
label: "圈回",
@@ -464,10 +495,11 @@ export default {
value: -2,
},
],
oilCompanyMatch: {},
oilCompanyMatch: [],
mappingData: [
{
carTitle: "",
// 标记
carItems: [
{ label: "ID", value: "id" },
{ label: "交易类型", value: "transactionType" },
@@ -484,10 +516,6 @@ export default {
{ label: "交易说明", value: "reverseRemark" },
{ label: "审核时间", value: "auditTime" },
{ label: "审核系统来源", value: "auditSource" },
{ label: "赊销还款审核", value: "chargeSalesAuditMark" },
{ label: "赊销还款审核人", value: "chargeSalesAuditUser" },
{ label: "赊销还款审核时间", value: "chargeSalesAuditTime" },
{ label: "赊销还款审核来源", value: "chargeSalesAuditSource" },
{ label: "创建用户", value: "createUserName" },
{ label: "创建时间", value: "createTime" },
{ label: "创建数据来源", value: "createSource" },
@@ -504,11 +532,9 @@ export default {
{ label: "账户状态", value: "accountState" },
{ label: "账户类型", value: "accountType" },
{ label: "账户充值余额", value: "rechargeBalance" },
{ label: "赊销充值余额", value: "chargeRechargeBalance" },
{ label: "充值返利余额", value: "rechargeRebateBalance" },
{ label: "消费返利余额", value: "consumeRebateBalance" },
{ label: "累计充值金额", value: "totalRechargeAmount" },
{ label: "累计赊销充值金额", value: "totalChargeRechargeAmount" },
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
],
@@ -567,8 +593,7 @@ export default {
serve.get(row.id),
commonServe.getByCompanyId(row.companyId),
]).then(([firstRes, secondRes]) => {
this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
// this.controlWindows.addInfo.examineMark = row.auditMark === 0;
this.oilCompanyMatch = [firstRes.data, secondRes.data];
this.controlWindows.addInfo = {
examineMark: row.auditMark === 0,
id: row.id,
@@ -615,7 +640,7 @@ export default {
serve.get(row.id),
commonServe.getByCompanyId(row.companyId),
]).then(([firstRes, secondRes]) => {
this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
this.oilCompanyMatch = [firstRes.data, secondRes.data];
this.controlWindows.addInfo.examineMark = false;
this.controlWindows.detail = true;
});
@@ -702,6 +727,9 @@ export default {
<style lang="scss" scoped>
.enterprise-recharge {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;
@@ -765,5 +793,8 @@ export default {
font-size: 12px;
}
}
.ft14 {
font-size: 14px;
}
}
</style>

View File

@@ -188,12 +188,57 @@
:mappingData="mappingData"
@close="controlWindows.detail = false"
>
<template #transactionType>
<p>
{{
oilCompanyMatch[0].transactionType === "TURN"
? LoopBackTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].turnType
).label
: rechargeTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].transactionType
).label
}}
</p>
</template>
<template #transactionState>
<p>
{{
rechargeStatusEnum.find(
(item) => item.value === oilCompanyMatch[0].transactionState
).label
}}
</p>
</template>
<template #auditMark>
<p>
{{
auditMarkEnum.find(
(item) => item.value === oilCompanyMatch[0].auditMark
).label
}}
</p>
</template>
<template #offlineTransactionProof>
<el-image
style="width: 100px; height: 100px"
:src="oilCompanyMatch.offlineTransactionProof"
:src="oilCompanyMatch[0].offlineTransactionProof"
/>
</template>
<template #accountState>
<p>
{{
accountStatusEnum.find(
(item) => item.value === oilCompanyMatch[1].accountState
).label
}}
</p>
</template>
<template #accountType>
<p>
{{ oilCompanyMatch[1].accountType === "0" ? "基础账户" : "" }}
</p>
</template>
</general-details>
</el-drawer>
</div>
@@ -211,6 +256,7 @@ import {
rechargeTypeEnum,
rechargeStatusEnum,
repaymentExamineEnum,
accountStatusEnum,
} from "utils/dataType.js";
export default {
@@ -224,6 +270,7 @@ export default {
rechargeTypeEnum: rechargeTypeEnum,
rechargeStatusEnum: rechargeStatusEnum,
repaymentExamineEnum: repaymentExamineEnum,
accountStatusEnum: accountStatusEnum,
controlWindows: {
detail: false,
},
@@ -271,6 +318,23 @@ export default {
value: 4,
},
],
auditMarkEnum: [
{
label: "待审核",
value: 0,
type: "warning",
},
{
label: "审核通过",
value: 1,
type: "success",
},
{
label: "审核失败",
value: -1,
type: "danger",
},
],
oilCompanyMatch: {},
mappingData: [
@@ -365,7 +429,7 @@ export default {
serve.get(row.id),
commonServe.getByCompanyId(row.companyId),
]).then(([firstRes, secondRes]) => {
this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
this.oilCompanyMatch = [firstRes.data, secondRes.data];
this.controlWindows.detail = true;
});
@@ -451,6 +515,9 @@ export default {
<style lang="scss" scoped>
.enterprise-recharge-details {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;
@@ -514,5 +581,8 @@ export default {
font-size: 12px;
}
}
.ft14 {
font-size: 14px;
}
}
</style>

View File

@@ -9,7 +9,7 @@
label-position="left"
>
<div class="title-container">
<h3 class="title">Login Form</h3>
<h3 class="title">油批运营管理平台</h3>
</div>
<el-form-item prop="username">
@@ -19,7 +19,7 @@
<el-input
ref="username"
v-model="loginForm.username"
placeholder="Username"
placeholder="用户名"
name="username"
type="text"
tabindex="1"
@@ -36,7 +36,7 @@
ref="password"
v-model="loginForm.password"
:type="passwordType"
placeholder="Password"
placeholder="密码"
name="password"
tabindex="2"
auto-complete="on"
@@ -54,13 +54,8 @@
type="primary"
style="width: 100%; margin-bottom: 30px"
@click.native.prevent="handleLogin"
>Login</el-button
>登录</el-button
>
<div class="tips">
<span style="margin-right: 20px">username: admin</span>
<span> password: any</span>
</div>
</el-form>
</div>
</template>
@@ -79,7 +74,7 @@ export default {
};
return {
loading: false,
passwordType: "",
passwordType: "password",
companyList: [],
loginForm: {
username: "",

View File

@@ -180,6 +180,11 @@
:mappingData="mappingData"
@close="controlWindows.detail = false"
>
<template #enableMark>
<p>
{{ oilCompanyMatch[0].enableMark === "ENABLE" ? "启用" : "禁用" }}
</p>
</template>
</general-details>
</el-drawer>
</div>
@@ -305,7 +310,7 @@ export default {
},
//详情
detail(row) {
this.oilCompanyMatch = row;
this.oilCompanyMatch = [row];
this.controlWindows.detail = true;
},
//调价
@@ -378,6 +383,9 @@ export default {
<style lang="scss" scoped>
.order {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;

View File

@@ -8,7 +8,7 @@
:before-close="closeWindow"
>
<div class="add">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="账户名称" prop="accountName">
<el-input
maxlength="50"
@@ -27,15 +27,6 @@
</el-select>
</el-form-item>
<el-form-item label="炼厂名称" prop="refineryId">
<!-- <el-autocomplete
label
v-model="form.refineryId"
:fetch-suggestions="querySearchAsync"
value-key="refineryName"
value="id"
placeholder="请选择炼厂"
></el-autocomplete> -->
<autocomplete :params="form" :config="configAutocomplete" />
</el-form-item>
</el-form>
@@ -81,7 +72,7 @@ export default {
{ required: true, message: "请输入账户名称", trigger: "blur" },
],
accountType: [
{ required: true, message: "请输入账户名称", trigger: "blur" },
{ required: true, message: "请选择账户类型", trigger: "change" },
],
refineryId: [
{ required: true, validator: validatorRefineryId, trigger: "change" },
@@ -108,31 +99,6 @@ export default {
if (id) return serve.update(form);
else return serve.save(form);
},
// //炼厂list
// findByEntity() {
// refineryInfoServe.findByEntity().then((res) => {
// this.refineryList = res.data;
// let { id } = this.controlWindows.addInfo;
// if (id) {
// this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
// }
// });
// },
//远程搜索
// querySearchAsync(queryString, cb) {
// if (queryString) {
// refineryInfoServe
// .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 = {};

View File

@@ -1,16 +1,6 @@
<template>
<div class="order">
<div class="frame">
<!-- <el-autocomplete
class="mr20"
label
v-model="parameter.params.id"
:fetch-suggestions="querySearchAsync"
value-key="refineryName"
value="id"
placeholder="炼厂名称"
></el-autocomplete> -->
<autocomplete
class="mr20"
:params="parameter.params"
@@ -124,6 +114,7 @@
:visible.sync="controlWindows.detail"
>
<general-details
class="pft14"
title="详情"
:isHeader="true"
v-if="controlWindows.detail"
@@ -131,6 +122,22 @@
:mappingData="mappingData"
@close="controlWindows.detail = false"
>
<template #refineryType>
<p>
{{
refineryTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].accountType
).label
}}
</p>
</template>
<template #accountStatus>
<p>
{{
oilCompanyMatch[0].accountStatus === "ENABLE" ? "启用" : "禁用"
}}
</p>
</template>
</general-details>
</el-drawer>
</div>
@@ -225,27 +232,6 @@ export default {
this.parameter.total = res.data.totalCount;
});
},
//炼厂list
// findByEntity() {
// refineryInfoServe.findByEntity().then((res) => {
// this.refineryList = res.data;
// });
// },
//远程搜索
// querySearchAsync(queryString, cb) {
// if (queryString) {
// refineryInfoServe
// .findByEntity({ refineryName: queryString })
// .then((res) => {
// let timeInstance = setTimeout(() => {
// clearTimeout(timeInstance);
// if (res.data.length) {
// cb(res.data);
// } else cb([]);
// }, 1000 * Math.random());
// });
// } else cb([]);
// },
//新增
addition() {
this.controlWindows.addInfo.title = "账户新增";
@@ -261,7 +247,7 @@ export default {
},
//详情
detail(row) {
this.oilCompanyMatch = row;
this.oilCompanyMatch = [row];
this.controlWindows.detail = true;
},
//重置
@@ -290,6 +276,9 @@ export default {
<style lang="scss" scoped>
.order {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;
@@ -343,5 +332,8 @@ export default {
margin-right: 10px;
}
}
.pft14 {
font-size: 14px;
}
}
</style>

View File

@@ -1,16 +1,6 @@
<template>
<div class="order">
<div class="frame">
<!-- <el-autocomplete
class="mr20"
label
v-model="parameter.params.id"
:fetch-suggestions="querySearchAsync"
value-key="refineryName"
value="id"
placeholder="炼厂名称"
></el-autocomplete> -->
<autocomplete
class="mr20"
:params="parameter.params"
@@ -160,6 +150,20 @@
:mappingData="mappingData"
@close="controlWindows.detail = false"
>
<template #refineryType>
<p>
{{
refineryTypeEnum.find(
(item) => item.value === oilCompanyMatch[0].refineryType
).label
}}
</p>
</template>
<template #enableMark>
<p>
{{ oilCompanyMatch[0].enableMark === "ENABLE" ? "启用" : "禁用" }}
</p>
</template>
</general-details>
</el-drawer>
</div>
@@ -197,7 +201,7 @@ export default {
labelKey: "refineryName",
valueKey: "id",
placeholder: "炼厂名称",
querykey: "refineryId",
querykey: "id",
},
refineryList: [],
tableHeight: 0,
@@ -253,19 +257,6 @@ export default {
this.parameter.total = res.data.totalCount;
});
},
//远程搜索
// querySearchAsync(queryString, cb) {
// if (queryString) {
// serve.findByEntity({ refineryName: queryString }).then((res) => {
// let timeInstance = setTimeout(() => {
// clearTimeout(timeInstance);
// if (res.data.length) {
// cb(res.data);
// } else cb([]);
// }, 1000 * Math.random());
// });
// } else cb([]);
// },
//新增
addition() {
this.controlWindows.addInfo.title = "炼厂入驻";
@@ -279,7 +270,7 @@ export default {
},
//详情
detail(row) {
this.oilCompanyMatch = row;
this.oilCompanyMatch = [row];
this.controlWindows.detail = true;
},
//删除
@@ -333,6 +324,9 @@ export default {
<style lang="scss" scoped>
.order {
.pft14 {
font-size: 14px;
}
.frame {
margin: 20px;
padding: 20px;