更新
This commit is contained in:
@@ -168,25 +168,15 @@ export default {
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
}
|
||||
// 上级公司
|
||||
let configUpdata = id
|
||||
? {
|
||||
echoId: this.form.parentId,
|
||||
echoName: this.form.name,
|
||||
}
|
||||
: {
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
};
|
||||
let configUpdata = {
|
||||
echoId: this.form.parentId || "",
|
||||
echoName: this.form.name || "",
|
||||
};
|
||||
// 企业负责人
|
||||
let configUpdataLeader = id
|
||||
? {
|
||||
echoId: this.form.businessLeader,
|
||||
echoName: this.form.businessLeader,
|
||||
}
|
||||
: {
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
};
|
||||
let configUpdataLeader = {
|
||||
echoId: this.form.businessLeader || "",
|
||||
echoName: this.form.businessLeader || "",
|
||||
};
|
||||
Object.assign(this.configAutocomplete, configUpdata);
|
||||
Object.assign(this.configAutocompleteLeader, configUpdataLeader);
|
||||
},
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
:title="controlWindows.addInfo.title"
|
||||
direction="ltr"
|
||||
size="50%"
|
||||
:visible.sync="controlWindows.attestation"
|
||||
@opened="openDrawer"
|
||||
:before-close="closeWindow"
|
||||
>
|
||||
<div class="attestation">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业名称" prop="companyName">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="form.companyName"
|
||||
placeholder="企业名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册省市区" prop="abbreviaName">
|
||||
<el-cascader
|
||||
placeholder="注册省市区"
|
||||
:options="areaTree"
|
||||
:props="{
|
||||
value: 'id',
|
||||
label: 'areaName',
|
||||
children: 'childList',
|
||||
}"
|
||||
filterable
|
||||
clearable
|
||||
@change="changeAddress"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input
|
||||
v-model="form.address"
|
||||
clearable
|
||||
placeholder="不包含省市区"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册资本" prop="registeredCapital">
|
||||
<el-input
|
||||
v-model="form.registeredCapital"
|
||||
clearable
|
||||
placeholder="小写数字"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="经营资质" prop="businessQualia">
|
||||
<el-input
|
||||
v-model="form.businessQualia"
|
||||
clearable
|
||||
placeholder="企业经营资质"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式" prop="contactPhone">
|
||||
<el-input
|
||||
v-model="form.contactPhone"
|
||||
clearable
|
||||
placeholder="联系方式"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业网址" prop="website">
|
||||
<el-input
|
||||
v-model="form.website"
|
||||
clearable
|
||||
placeholder="企业网址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="营业执照号码" prop="businessLienceId">
|
||||
<el-input
|
||||
v-model="form.businessLienceId"
|
||||
clearable
|
||||
placeholder="营业执照号码"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="营业执照照片" prop="businessLienceImg">
|
||||
<el-input
|
||||
v-model="form.businessLienceId"
|
||||
clearable
|
||||
placeholder="营业执照号码"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="经营范围" prop="businessScope">
|
||||
<el-input
|
||||
v-model="form.businessScope"
|
||||
type="textarea"
|
||||
clearable
|
||||
placeholder="经营范围"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="营业执照照片" prop="businessLienceImg">
|
||||
<el-upload
|
||||
:action="uploadUrl"
|
||||
:data="{
|
||||
ossKey: 'xingyou',
|
||||
pathKey: 'other',
|
||||
encrypt: 'PUBLIC',
|
||||
code: 'A003',
|
||||
}"
|
||||
list-type="picture-card"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
:on-success="handleSuccess"
|
||||
:before-upload="beforeHandle"
|
||||
:limit="1"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<i class="el-icon-plus" />
|
||||
</el-upload>
|
||||
<el-dialog :visible.sync="imgDialog" :modal="false">
|
||||
<img width="100%" :src="form.businessLienceImg" alt="" />
|
||||
</el-dialog>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<el-button @click="closeWindow">取消 </el-button>
|
||||
<el-button @click="submit">提交</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import serve from "api/customerManagement/companyManagement.js";
|
||||
import commonServe from "api/common.js";
|
||||
|
||||
import autocomplete from "components/autocomplete/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
autocomplete,
|
||||
},
|
||||
props: {
|
||||
controlWindows: Object,
|
||||
},
|
||||
data() {
|
||||
let validatorParentId = (rule, value, callback) => {
|
||||
if (this.form.parentId) callback();
|
||||
else callback("请选择企业");
|
||||
};
|
||||
return {
|
||||
uploadUrl:
|
||||
process.env.VUE_APP_ENV === "development"
|
||||
? "/api/lsm/ocr/business"
|
||||
: "/adminapi/oil-oss/obejct/uploadFile",
|
||||
fileList: [],
|
||||
imgDialog: false,
|
||||
areaTree: [],
|
||||
form: {},
|
||||
rules: {
|
||||
parentMark: [
|
||||
{ required: true, message: "请选择是否主体公司", trigger: "change" },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getTree();
|
||||
},
|
||||
methods: {
|
||||
changeAddress(val) {
|
||||
this.form.provinceCode = val[0] || "";
|
||||
this.form.cityCode = val[1] || "";
|
||||
this.form.areaCode = val[2] || "";
|
||||
},
|
||||
openDrawer() {
|
||||
// this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
let { auditMark, title, companyId } = this.controlWindows.addInfo;
|
||||
if (auditMark != 0) {
|
||||
//回显
|
||||
} else {
|
||||
this.form = { auditMark, title, companyId };
|
||||
}
|
||||
},
|
||||
|
||||
getTree() {
|
||||
serve.getTree().then((res) => {
|
||||
this.areaTree = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
let params = {
|
||||
auditMark: this.form.auth ? 1 : 2,
|
||||
...this.form,
|
||||
};
|
||||
|
||||
this.judgeInterface(params).then((res) => {
|
||||
this.$message.success(res.msg);
|
||||
this.closeWindow();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
judgeInterface(form) {
|
||||
let { auditMark } = this.controlWindows.addInfo;
|
||||
if (auditMark != 0) return serve.updateAttestation(form);
|
||||
else return serve.saveAttestation(form);
|
||||
},
|
||||
beforeHandle(file) {
|
||||
if (file.type.indexOf("image/") === -1) {
|
||||
this.$message.error("上传的文件不是图片格式!");
|
||||
return false;
|
||||
} else if (file.size / 1024 / 1024 > 5) {
|
||||
this.$message.error("上传图片大小不能超过 5MB!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
//img大图
|
||||
handlePictureCardPreview(file) {
|
||||
this.form.businessLienceImg = file.url;
|
||||
this.imgDialog = true;
|
||||
},
|
||||
// img remove
|
||||
handleRemove(file, fileList) {
|
||||
this.form.businessLienceImg = "";
|
||||
},
|
||||
// 上传成功
|
||||
handleSuccess(response, file, fileList) {
|
||||
if (response.code !== 20000) {
|
||||
this.$message.error(response.msg);
|
||||
this.fileList = [];
|
||||
return;
|
||||
}
|
||||
console.log("response", response);
|
||||
this.form.businessLienceImg = response.data.publicUrl;
|
||||
},
|
||||
closeWindow() {
|
||||
this.$emit("closeWindow");
|
||||
this.form = {};
|
||||
this.fileList = [];
|
||||
this.controlWindows.addInfo = {};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.clearValidate();
|
||||
this.controlWindows.attestation = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.attestation {
|
||||
padding: 20px;
|
||||
.el-input,
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-autocomplete {
|
||||
width: 230px;
|
||||
}
|
||||
// .el-textarea {
|
||||
// width: 100%;
|
||||
// }
|
||||
}
|
||||
.buttons {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding-right: 40px;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #f2f3f5;
|
||||
.el-button {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,273 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
:title="controlWindows.addInfo.title"
|
||||
direction="ltr"
|
||||
size="50%"
|
||||
:visible.sync="controlWindows.finance"
|
||||
@opened="openDrawer"
|
||||
:before-close="closeWindow"
|
||||
>
|
||||
<div class="finance">
|
||||
<el-form ref="form" :rules="rules" :model="form" label-width="160px">
|
||||
<el-row :gutter="2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结算方式" prop="settlementModes">
|
||||
<el-select
|
||||
v-model="form.settlementModes"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
>
|
||||
<el-option label="消费返利" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="消费返利叠加费率" prop="consumptionRebate">
|
||||
<el-input
|
||||
v-model="form.consumptionRebate"
|
||||
placeholder="基于油站返利基础之上的返利金额"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结账周期" prop="billingCycle">
|
||||
<el-input v-model="form.billingCycle" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业共享额度" prop="defaultShare">
|
||||
<el-select v-model="form.defaultShare" clearable>
|
||||
<el-option label="共享" :value="1" />
|
||||
<el-option label="不共享" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认单次额度上限" prop="defaultOnceUp">
|
||||
<el-input v-model="form.defaultOnceUp" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="默认单日加油额度上限" prop="defaultDayUp">
|
||||
<el-input v-model="form.defaultDayUp" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="折返策略" prop="consumRebateStrategy">
|
||||
<el-select v-model="form.consumRebateStrategy" clearable>
|
||||
<el-option value="TYFL" label="统一费率" />
|
||||
<el-option value="TYSSFL" label="统一升数" />
|
||||
<el-option value="SITE_lEVEL" label="油站等级" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="折返比例" prop="contactPhone">
|
||||
<el-input
|
||||
v-if="
|
||||
form.consumRebateStrategy == 'TYFL' ||
|
||||
form.consumRebateStrategy == 'TYSSFL'
|
||||
"
|
||||
v-model="form.consumRebateScale"
|
||||
clearable
|
||||
><template slot="append">
|
||||
{{
|
||||
form.consumRebateStrategy == "TYFL"
|
||||
? "%"
|
||||
: form.consumRebateStrategy == "TYSSFL"
|
||||
? "元/L"
|
||||
: ""
|
||||
}}
|
||||
</template></el-input
|
||||
>
|
||||
<template v-if="form.consumRebateStrategy === 'SITE_lEVEL'">
|
||||
<el-input v-checkNum v-model="siteConsumRebateScales[0]">
|
||||
<template slot="prepend">A:</template>
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
<el-input v-checkNum v-model="siteConsumRebateScales[1]">
|
||||
<template slot="prepend">B:</template>
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
<el-input v-checkNum v-model="siteConsumRebateScales[2]">
|
||||
<template slot="prepend">C:</template>
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
<el-input v-checkNum v-model="siteConsumRebateScales[3]">
|
||||
<template slot="prepend">D:</template>
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col v-if="form.consumRebateStrategy === 'SITE_lEVEL'" :span="12">
|
||||
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<el-button @click="closeWindow">取消 </el-button>
|
||||
<el-button @click="submit">提交</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import serve from "api/customerManagement/companyManagement.js";
|
||||
import commonServe from "api/common.js";
|
||||
|
||||
import autocomplete from "components/autocomplete/index.vue";
|
||||
export default {
|
||||
components: {
|
||||
autocomplete,
|
||||
},
|
||||
props: {
|
||||
controlWindows: Object,
|
||||
},
|
||||
data() {
|
||||
let validatorParentId = (rule, value, callback) => {
|
||||
if (this.form.parentId) callback();
|
||||
else callback("请选择企业");
|
||||
};
|
||||
return {
|
||||
uploadUrl:
|
||||
process.env.VUE_APP_ENV === "development"
|
||||
? "/api/oil-oss/obejct/uploadFile"
|
||||
: "/adminapi/oil-oss/obejct/uploadFile",
|
||||
fileList: [],
|
||||
imgDialog: false,
|
||||
areaTree: [],
|
||||
form: {},
|
||||
rules: {
|
||||
parentMark: [
|
||||
{ required: true, message: "请选择是否主体公司", trigger: "change" },
|
||||
],
|
||||
},
|
||||
siteConsumRebateScales: [3, 2, 1, 0],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getTree();
|
||||
},
|
||||
methods: {
|
||||
changeAddress(val) {
|
||||
this.form.provinceCode = val[0] || "";
|
||||
this.form.cityCode = val[1] || "";
|
||||
this.form.areaCode = val[2] || "";
|
||||
},
|
||||
openDrawer() {
|
||||
console.log("this.controlWindows.addInfo", this.controlWindows.addInfo);
|
||||
let { currentType, companyId, id } = this.controlWindows.addInfo;
|
||||
if (currentType === "update") {
|
||||
//回显
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
} else {
|
||||
this.form = { companyId: companyId || id };
|
||||
console.log(" this.form", this.form);
|
||||
}
|
||||
},
|
||||
|
||||
getTree() {
|
||||
serve.getTree().then((res) => {
|
||||
this.areaTree = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.consumRebateStrategy === "SITE_lEVEL") {
|
||||
this.form.siteConsumRebateScales = [
|
||||
`A: ${this.siteConsumRebateScales[0]}`,
|
||||
`B: ${this.siteConsumRebateScales[1]}`,
|
||||
`C: ${this.siteConsumRebateScales[2]}`,
|
||||
`D: ${this.siteConsumRebateScales[3]}`,
|
||||
];
|
||||
}
|
||||
this.judgeInterface(this.form).then((res) => {
|
||||
this.$message.success(res.msg);
|
||||
this.closeWindow();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
judgeInterface(form) {
|
||||
let { currentType } = this.controlWindows.addInfo;
|
||||
if (currentType === "update") return serve.updateFinance(form);
|
||||
else return serve.saveFinance(form);
|
||||
},
|
||||
beforeHandle(file) {
|
||||
if (file.type.indexOf("image/") === -1) {
|
||||
this.$message.error("上传的文件不是图片格式!");
|
||||
return false;
|
||||
} else if (file.size / 1024 / 1024 > 5) {
|
||||
this.$message.error("上传图片大小不能超过 5MB!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
//img大图
|
||||
handlePictureCardPreview(file) {
|
||||
this.form.businessLienceImg = file.url;
|
||||
this.imgDialog = true;
|
||||
},
|
||||
// img remove
|
||||
handleRemove(file, fileList) {
|
||||
this.form.businessLienceImg = "";
|
||||
},
|
||||
// 上传成功
|
||||
handleSuccess(response, file, fileList) {
|
||||
if (response.code !== 20000) {
|
||||
this.$message.error(response.msg);
|
||||
this.fileList = [];
|
||||
return;
|
||||
}
|
||||
console.log("response", response);
|
||||
this.form.businessLienceImg = response.data.publicUrl;
|
||||
},
|
||||
closeWindow() {
|
||||
this.$emit("closeWindow");
|
||||
this.form = {};
|
||||
this.fileList = [];
|
||||
this.controlWindows.addInfo = {};
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.clearValidate();
|
||||
this.controlWindows.finance = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.finance {
|
||||
padding: 20px;
|
||||
.el-input,
|
||||
.el-select,
|
||||
.el-cascader,
|
||||
.el-autocomplete {
|
||||
width: 230px;
|
||||
}
|
||||
// .el-textarea {
|
||||
// width: 100%;
|
||||
// }
|
||||
}
|
||||
.buttons {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
padding-right: 40px;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #f2f3f5;
|
||||
.el-button {
|
||||
text-align: right;
|
||||
font-size: 14px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -275,7 +275,7 @@
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<span class="el-dropdown-link">详情</span>
|
||||
<span class="el-dropdown-link" @click="detail(row)">详情</span>
|
||||
<el-dropdown
|
||||
@command="
|
||||
(val) => {
|
||||
@@ -314,6 +314,11 @@
|
||||
:companyNatureTypeEnum="companyNatureTypeEnum"
|
||||
@closeWindow="search"
|
||||
/>
|
||||
<!-- 认证 -->
|
||||
<attestation :controlWindows="controlWindows" @closeWindow="search" />
|
||||
<!-- 财务 -->
|
||||
<finance :controlWindows="controlWindows" @closeWindow="search" />
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-drawer
|
||||
title="详情"
|
||||
@@ -330,12 +335,77 @@
|
||||
:mappingData="mappingData"
|
||||
@close="controlWindows.detail = false"
|
||||
>
|
||||
<template #offlineTransactionProof>
|
||||
<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 #companyDockType>
|
||||
<p>
|
||||
{{
|
||||
oilCompanyMatch[0].companyDockType == 0 ? "对接客户" : "平台客户"
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
<template #enableMark>
|
||||
<p>
|
||||
{{ oilCompanyMatch[0].enableMark == 0 ? "禁用" : "启用" }}
|
||||
</p>
|
||||
</template>
|
||||
<template #auditMark>
|
||||
<p>
|
||||
{{
|
||||
auditMarkEnum.find(
|
||||
(item) => item.value == oilCompanyMatch[0].enableMark
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
<template #getInfoName>
|
||||
<p>
|
||||
{{ oilCompanyMatch[0].name }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #businessLienceImg>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="oilCompanyMatch.offlineTransactionProof"
|
||||
:src="oilCompanyMatch[1].businessLienceImg"
|
||||
/>
|
||||
</template>
|
||||
<template #settlementModes>
|
||||
<p v-if="oilCompanyMatch[2]">
|
||||
{{ settlementModesEnum[oilCompanyMatch[2].settlementModes] }}
|
||||
</p>
|
||||
</template>
|
||||
<template #defaultShare>
|
||||
<p v-if="oilCompanyMatch[2]">
|
||||
{{ oilCompanyMatch[2].defaultShare === 1 ? "共享" : "不共享" }}
|
||||
</p>
|
||||
</template>
|
||||
<template #accountState>
|
||||
<p v-if="oilCompanyMatch[3]">
|
||||
{{
|
||||
accountStatusEnum.find(
|
||||
(item) => item.value === oilCompanyMatch[3].accountState
|
||||
).label
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
<template #accountType>
|
||||
<p v-if="oilCompanyMatch[3]">
|
||||
{{ oilCompanyMatch[3].accountType == 0 ? "基础账户" : "" }}
|
||||
</p>
|
||||
</template>
|
||||
</general-details>
|
||||
</el-drawer>
|
||||
|
||||
@@ -393,6 +463,8 @@ import pagination from "components/pagination/index.vue";
|
||||
import generalDetails from "components/generalDetails/index.vue";
|
||||
|
||||
import add from "./components/add.vue";
|
||||
import attestation from "./components/attestation.vue";
|
||||
import finance from "./components/finance.vue";
|
||||
|
||||
import { rechargeTypeEnum, rechargeStatusEnum } from "utils/dataType.js";
|
||||
|
||||
@@ -401,6 +473,8 @@ export default {
|
||||
// OilCompanyInfoUpdate,
|
||||
// OilCompanyInfoAdd,
|
||||
add,
|
||||
attestation,
|
||||
finance,
|
||||
|
||||
pagination,
|
||||
autocomplete,
|
||||
@@ -412,6 +486,8 @@ export default {
|
||||
add: false,
|
||||
addInfo: {},
|
||||
detail: false,
|
||||
attestation: false,
|
||||
finance: false,
|
||||
},
|
||||
tableData: [],
|
||||
userList: [],
|
||||
@@ -502,53 +578,79 @@ export default {
|
||||
value: "6",
|
||||
},
|
||||
],
|
||||
settlementModesEnum: {
|
||||
1: "充值返利",
|
||||
2: "消费返利",
|
||||
3: "充值返利+消费返利",
|
||||
},
|
||||
oilCompanyMatch: {},
|
||||
mappingData: [
|
||||
{
|
||||
carTitle: "",
|
||||
carTitle: "基础信息",
|
||||
// 标记
|
||||
carItems: [
|
||||
{ label: "ID", value: "id" },
|
||||
{ label: "交易类型", value: "transactionType" },
|
||||
{ label: "交易状态", value: "transactionState" },
|
||||
{ label: "交易金额", value: "transactionAmount" },
|
||||
{ label: "充值返利比例", value: "rechargeRebate" },
|
||||
{ label: "充值返利金额", value: "rechargeRebateAmount" },
|
||||
{ label: "线下汇款公司账户", value: "offlinePaymentCompany" },
|
||||
{ label: "线下交易发起时间", value: "offlineStartTime" },
|
||||
{ label: "线下交易完成时间", value: "offlineCompleteTime" },
|
||||
{ label: "线下交易凭证", value: "offlineTransactionProof" },
|
||||
{ label: "交易审核标识", value: "auditMark" },
|
||||
{ label: "审核人", value: "auditUserName" },
|
||||
{ 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: "账户ID", value: "id" },
|
||||
{ label: "企业名称", value: "name" },
|
||||
{ label: "企业简称", value: "abbreviaName" },
|
||||
// { label: "是否为主体公司", value: "parentMark" },
|
||||
// { label: "上级公司", value: "name" },
|
||||
{ label: "公司性质", value: "parentMark" },
|
||||
{ label: "企业性质", value: "companyNature" },
|
||||
{ label: "公司对接类型", value: "companyDockType" },
|
||||
{ label: "启用标识", value: "enableMark" },
|
||||
{ label: "审核标识", value: "auditMark" },
|
||||
{ label: "审核说明", value: "auditRemarks" },
|
||||
],
|
||||
},
|
||||
{
|
||||
carTitle: "认证信息",
|
||||
carItems: [
|
||||
{ label: "公司名称", value: "getInfoName" },
|
||||
{ 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: "GScode", value: "gsCode" },
|
||||
],
|
||||
},
|
||||
{
|
||||
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" },
|
||||
{ label: "创建数据来源", value: "createSource" },
|
||||
{ label: "企业收款账户", value: "internalCompanyName" },
|
||||
{ label: "开户行", value: "bankDeposit" },
|
||||
{ label: "银行卡号", value: "bankCardNo" },
|
||||
],
|
||||
},
|
||||
{
|
||||
carTitle: "账户信息",
|
||||
carItems: [
|
||||
{ label: "账户总余额", value: "balance" },
|
||||
{ label: "待还总金额", value: "totalChargeAmount" },
|
||||
{ label: "账户状态", value: "accountState" },
|
||||
{ label: "账户类型", value: "accountType" },
|
||||
{ label: "账户总余额", value: "balance" },
|
||||
{ label: "待还总金额", value: "totalChargeAmount" },
|
||||
{ label: "账户充值余额", value: "rechargeBalance" },
|
||||
{ label: "赊销充值余额", value: "chargeRechargeBalance" },
|
||||
{ label: "充值返利余额", value: "rechargeRebateBalance" },
|
||||
{ label: "消费返利余额", value: "consumeRebateBalance" },
|
||||
{ label: "累计充值金额", value: "totalRechargeAmount" },
|
||||
{ label: "累计赊销充值金额", value: "totalChargeRechargeAmount" },
|
||||
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
|
||||
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
|
||||
{ label: "累计开票金额", value: "totalInvoiceAmount" },
|
||||
{ label: "创建人编号", value: "createUser" },
|
||||
{ label: "创建时间", value: "createTime" },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -623,7 +725,7 @@ export default {
|
||||
//更多
|
||||
commandMore(val, row) {
|
||||
if (val === "base") {
|
||||
serve.getInfo(row.id).then((res) => {
|
||||
commonServe.getInfo(row.id).then((res) => {
|
||||
this.controlWindows.addInfo = {
|
||||
title: "修改",
|
||||
...res.data,
|
||||
@@ -631,18 +733,61 @@ export default {
|
||||
this.controlWindows.add = true;
|
||||
});
|
||||
}
|
||||
if (val === "attestation") {
|
||||
commonServe.getByCompanyIdAuth(row.id).then((res) => {
|
||||
this.controlWindows.addInfo = {
|
||||
...res.data,
|
||||
// 由于该接口没有查询auditmark 而旧逻辑是通过auditmark来区分对认证信息是新增还是修改
|
||||
// 因此此处使用列表接口返回的auditmark覆盖掉该接口返回的auditmark
|
||||
auditMark: row.auditMark,
|
||||
title: row.auditMark == 0 ? "新增认证信息" : "修改认证信息",
|
||||
};
|
||||
this.controlWindows.attestation = true;
|
||||
console.log(this.controlWindows.attestation);
|
||||
});
|
||||
}
|
||||
if (val === "finance") {
|
||||
commonServe.getByCompanyIdFinance(row.id).then((res) => {
|
||||
if (res.data) {
|
||||
this.controlWindows.addInfo = {
|
||||
currentType: "update",
|
||||
title: "修改财务信息",
|
||||
...res.data,
|
||||
};
|
||||
} else {
|
||||
commonServe.getInfo(row.id).then((res) => {
|
||||
this.controlWindows.addInfo = {
|
||||
currentType: "add",
|
||||
title: "新增财务信息",
|
||||
...res.data,
|
||||
};
|
||||
});
|
||||
}
|
||||
this.controlWindows.finance = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
detail(row) {
|
||||
// commonServe.getInfo(row.id).then((res) => {
|
||||
Promise.allSettled([
|
||||
commonServe.getInfo(row.id),
|
||||
commonServe.getByCompanyIdAuth(row.id),
|
||||
commonServe.getByCompanyIdFinance(row.id),
|
||||
commonServe.getByCompanyIdAccount(row.id),
|
||||
]).then((res) => {
|
||||
// console.log("res", res);
|
||||
// return;
|
||||
this.oilCompanyMatch = [];
|
||||
res.forEach((item) => {
|
||||
let result = item.status === "fulfilled" ? item.value.data : null;
|
||||
this.oilCompanyMatch.push(result);
|
||||
});
|
||||
// this.oilCompanyMatch = [infoRes, financeRes, authRes, accountRes];
|
||||
console.log("this.oilCompanyMatch", this.oilCompanyMatch);
|
||||
this.controlWindows.detail = true;
|
||||
});
|
||||
// });
|
||||
},
|
||||
// detail(row) {
|
||||
// Promise.all([
|
||||
// serve.get(row.id),
|
||||
// serve.getByCompanyId(row.companyId),
|
||||
// ]).then(([firstRes, secondRes]) => {
|
||||
// this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
|
||||
|
||||
// console.log("this.oilCompanyMatch", this.oilCompanyMatch);
|
||||
// this.controlWindows.detail = true;
|
||||
// });
|
||||
// },
|
||||
// 启用禁用点击
|
||||
enableMark(val, row) {
|
||||
row.enableMark = val == 1 ? 0 : 1;
|
||||
|
||||
@@ -469,9 +469,9 @@ export default {
|
||||
serve.get(row.id).then((res) => {
|
||||
Promise.all([
|
||||
//基础信息
|
||||
serve.getInfo(res.data.companyId),
|
||||
commonServe.getInfo(res.data.companyId),
|
||||
// 账户信息
|
||||
commonServe.getByCompanyId(res.data.companyId),
|
||||
commonServe.getByCompanyIdAccount(res.data.companyId),
|
||||
// 认证信息
|
||||
commonServe.getByCompanyIdAuth(res.data.companyId),
|
||||
// 财务信息
|
||||
@@ -484,7 +484,7 @@ export default {
|
||||
fourthRes.data,
|
||||
];
|
||||
if (firstRes.parentMark === 1) {
|
||||
serve.getInfo(firstRes.parentId).then((res) => {
|
||||
commonServe.getInfo(firstRes.parentId).then((res) => {
|
||||
this.oilCompanyMatch[0] = res.data;
|
||||
this.controlWindows.detail = true;
|
||||
});
|
||||
|
||||
@@ -265,13 +265,17 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
let configUpdata = id
|
||||
? { echoId: id, echoName: this.form.refineryName, isDisabled: true }
|
||||
: {
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
isDisabled: false,
|
||||
};
|
||||
let configUpdata = {
|
||||
echoId: id || "",
|
||||
echoName: this.form.refineryName || "",
|
||||
isDisabled: !!id,
|
||||
};
|
||||
// ? { echoId: id || '', echoName: this.form.refineryName || '', isDisabled: !!id }
|
||||
// : {
|
||||
// echoId: "",
|
||||
// echoName: "",
|
||||
// isDisabled: false,
|
||||
// };
|
||||
Object.assign(this.configAutocomplete, configUpdata);
|
||||
},
|
||||
// 公司change
|
||||
|
||||
@@ -187,13 +187,17 @@ export default {
|
||||
this.form.transactionAmount = Math.abs(this.form.transactionAmount);
|
||||
this.companyChange(this.form.companyId);
|
||||
}
|
||||
let configUpdata = id
|
||||
? { echoId: id, echoName: this.form.refineryName, isDisabled: true }
|
||||
: {
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
isDisabled: false,
|
||||
};
|
||||
let configUpdata = {
|
||||
echoId: id || "",
|
||||
echoName: this.form.refineryName || "",
|
||||
isDisabled: !!id,
|
||||
};
|
||||
// ? { echoId: id || '', echoName: this.form.refineryName || '', isDisabled: !!id }
|
||||
// : {
|
||||
// echoId: "",
|
||||
// echoName: "",
|
||||
// isDisabled: false,
|
||||
// };
|
||||
Object.assign(this.configAutocomplete, configUpdata);
|
||||
},
|
||||
// 公司财务信息
|
||||
@@ -207,7 +211,7 @@ export default {
|
||||
},
|
||||
//
|
||||
getByCompanyId(id) {
|
||||
commonServe.getByCompanyId(id).then((res) => {
|
||||
commonServe.getByCompanyIdAccount(id).then((res) => {
|
||||
this.companyInfo = res.data;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -520,7 +520,7 @@ export default {
|
||||
examine(row) {
|
||||
Promise.all([
|
||||
serve.get(row.id),
|
||||
commonServe.getByCompanyId(row.companyId),
|
||||
commonServe.getByCompanyIdAccount(row.companyId),
|
||||
]).then(([firstRes, secondRes]) => {
|
||||
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
||||
this.controlWindows.addInfo = {
|
||||
@@ -567,7 +567,7 @@ export default {
|
||||
detail(row) {
|
||||
Promise.all([
|
||||
serve.get(row.id),
|
||||
commonServe.getByCompanyId(row.companyId),
|
||||
commonServe.getByCompanyIdAccount(row.companyId),
|
||||
]).then(([firstRes, secondRes]) => {
|
||||
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
||||
this.controlWindows.addInfo.examineMark = false;
|
||||
|
||||
@@ -396,7 +396,7 @@ export default {
|
||||
detail(row) {
|
||||
Promise.all([
|
||||
serve.get(row.id),
|
||||
commonServe.getByCompanyId(row.companyId),
|
||||
commonServe.getByCompanyIdAccount(row.companyId),
|
||||
]).then(([firstRes, secondRes]) => {
|
||||
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user