lixuan #1
@@ -10,9 +10,12 @@ const getRefineryCompanyList = (params) => {
|
|||||||
const liekQuery = (query) => {
|
const liekQuery = (query) => {
|
||||||
return request.get(`oil-user/sysCustomerInfo/liekQuery/${query}`);
|
return request.get(`oil-user/sysCustomerInfo/liekQuery/${query}`);
|
||||||
};
|
};
|
||||||
|
// 用户详情
|
||||||
|
const getInfo = (id) => {
|
||||||
|
return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
|
||||||
|
};
|
||||||
//公司账户信息
|
//公司账户信息
|
||||||
const getByCompanyId = (query) => {
|
const getByCompanyIdAccount = (query) => {
|
||||||
return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`);
|
return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`);
|
||||||
};
|
};
|
||||||
//公司财务信息
|
//公司财务信息
|
||||||
@@ -27,7 +30,8 @@ const getByCompanyIdAuth = (id) => {
|
|||||||
export default {
|
export default {
|
||||||
getRefineryCompanyList,
|
getRefineryCompanyList,
|
||||||
liekQuery,
|
liekQuery,
|
||||||
getByCompanyId,
|
getInfo,
|
||||||
|
getByCompanyIdAccount,
|
||||||
getByCompanyIdFinance,
|
getByCompanyIdFinance,
|
||||||
getByCompanyIdAuth,
|
getByCompanyIdAuth,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,21 +11,37 @@ const getCompanyAccountRecord = (params) => {
|
|||||||
params
|
params
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
//启禁用
|
//保存
|
||||||
|
const save = (params) => {
|
||||||
|
return request.postJson("/oil-user/oilCompanyInfo/save", params);
|
||||||
|
};
|
||||||
|
//修改
|
||||||
const update = (params) => {
|
const update = (params) => {
|
||||||
return request.postJson("oil-user/oilCompanyInfo/update", params);
|
return request.postPut("oil-user/oilCompanyInfo/update", params);
|
||||||
|
};
|
||||||
|
//认证信息保存
|
||||||
|
const saveAttestation = (params) => {
|
||||||
|
return request.postJson("/oil-user/oilCompanyAuth/save", params);
|
||||||
|
};
|
||||||
|
//认证信息修改
|
||||||
|
const updateAttestation = (params) => {
|
||||||
|
return request.postPut("oil-user/oilCompanyAuth/update", params);
|
||||||
|
};
|
||||||
|
//财务信息保存
|
||||||
|
const saveFinance = (params) => {
|
||||||
|
return request.postJson("/oil-user/oilCompanyFinance/save", params);
|
||||||
|
};
|
||||||
|
//财务信息修改
|
||||||
|
const updateFinance = (params) => {
|
||||||
|
return request.postPut("oil-user/oilCompanyFinance/update", params);
|
||||||
};
|
};
|
||||||
//企业负责人 远程搜索
|
//企业负责人 远程搜索
|
||||||
const liekQuery = (query) => {
|
const liekQuery = (query) => {
|
||||||
return request.get(`/oil-user/sysCustomerInfo/liekQuery/${query}`);
|
return request.get(`/oil-user/sysCustomerInfo/liekQuery/${query}`);
|
||||||
};
|
};
|
||||||
//保存
|
// 级联
|
||||||
const save = (params) => {
|
const getTree = () => {
|
||||||
return request.postJson("/oil-user/oilCompanyInfo/save", params);
|
return request.get("/oil-dict/areaCode/getTree");
|
||||||
};
|
|
||||||
// 用户详情
|
|
||||||
const getInfo = (id) => {
|
|
||||||
return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
|
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
getByPage,
|
getByPage,
|
||||||
@@ -33,5 +49,10 @@ export default {
|
|||||||
update,
|
update,
|
||||||
liekQuery,
|
liekQuery,
|
||||||
save,
|
save,
|
||||||
getInfo,
|
getTree,
|
||||||
|
saveAttestation,
|
||||||
|
updateAttestation,
|
||||||
|
saveFinance,
|
||||||
|
updateFinance,
|
||||||
|
// getInfo,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ const save = (params) => {
|
|||||||
return request.postJson("/oil-finance/oilCompanyAccountReverse/save", params);
|
return request.postJson("/oil-finance/oilCompanyAccountReverse/save", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getInfo = (id) => {
|
// const getInfo = (id) => {
|
||||||
return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
|
// return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
|
||||||
};
|
// };
|
||||||
|
|
||||||
// //详情
|
// //详情
|
||||||
// const getCompanyAccountRecord = (params) => {
|
// const getCompanyAccountRecord = (params) => {
|
||||||
@@ -37,5 +37,5 @@ export default {
|
|||||||
get,
|
get,
|
||||||
save,
|
save,
|
||||||
// getByCompanyIdAuth,
|
// getByCompanyIdAuth,
|
||||||
getInfo,
|
// getInfo,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const update = (params) => {
|
|||||||
params
|
params
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
// 企业收款账户
|
// 级联
|
||||||
const getCascaderList = () => {
|
const getCascaderList = () => {
|
||||||
return request.get("/oil-finance/internalCompany/getCascaderList");
|
return request.get("/oil-finance/internalCompany/getCascaderList");
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,10 +44,13 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
"config.echoId": {
|
"config.echoId": {
|
||||||
handler(nval, oval) {
|
handler(nval, oval) {
|
||||||
if (nval) {
|
this.list = [];
|
||||||
this.remoteMethod(this.config.echoName);
|
|
||||||
}
|
|
||||||
this.isDisabled = !!this.config.isDisabled;
|
this.isDisabled = !!this.config.isDisabled;
|
||||||
|
if (nval) {
|
||||||
|
let resultName = this.config.echoName.replace(/\s*/g, "");
|
||||||
|
if (!resultName) return;
|
||||||
|
this.remoteMethod(resultName);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true,
|
immediate: true,
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export function parseTime(time) {
|
|||||||
return formatRes;
|
return formatRes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 防抖
|
||||||
export function debounce(fn, delay) {
|
export function debounce(fn, delay) {
|
||||||
let timer = null;
|
let timer = null;
|
||||||
return function () {
|
return function () {
|
||||||
@@ -39,7 +40,6 @@ export function debounce(fn, delay) {
|
|||||||
let _this = this;
|
let _this = this;
|
||||||
let _arguments = arguments;
|
let _arguments = arguments;
|
||||||
timer = setTimeout(function () {
|
timer = setTimeout(function () {
|
||||||
// 在执行时,通过apply来使用_this和_arguments
|
|
||||||
fn.apply(_this, _arguments);
|
fn.apply(_this, _arguments);
|
||||||
}, delay);
|
}, delay);
|
||||||
};
|
};
|
||||||
@@ -55,8 +55,8 @@ export function isLicensePlate(no) {
|
|||||||
export function cellStyle() {
|
export function cellStyle() {
|
||||||
return "text-align:center";
|
return "text-align:center";
|
||||||
}
|
}
|
||||||
|
// 类型判断
|
||||||
export function typeJudgment(object) {
|
export function typeJudgment(object) {
|
||||||
let res = {}.__proto__.toString.call(object);
|
let res = {}.__proto__.toString.call(object);
|
||||||
return res ? res : "";
|
return res || "";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,24 +168,14 @@ export default {
|
|||||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||||
}
|
}
|
||||||
// 上级公司
|
// 上级公司
|
||||||
let configUpdata = id
|
let configUpdata = {
|
||||||
? {
|
echoId: this.form.parentId || "",
|
||||||
echoId: this.form.parentId,
|
echoName: this.form.name || "",
|
||||||
echoName: this.form.name,
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
echoId: "",
|
|
||||||
echoName: "",
|
|
||||||
};
|
};
|
||||||
// 企业负责人
|
// 企业负责人
|
||||||
let configUpdataLeader = id
|
let configUpdataLeader = {
|
||||||
? {
|
echoId: this.form.businessLeader || "",
|
||||||
echoId: this.form.businessLeader,
|
echoName: this.form.businessLeader || "",
|
||||||
echoName: this.form.businessLeader,
|
|
||||||
}
|
|
||||||
: {
|
|
||||||
echoId: "",
|
|
||||||
echoName: "",
|
|
||||||
};
|
};
|
||||||
Object.assign(this.configAutocomplete, configUpdata);
|
Object.assign(this.configAutocomplete, configUpdata);
|
||||||
Object.assign(this.configAutocompleteLeader, configUpdataLeader);
|
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"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<span class="el-dropdown-link">详情</span>
|
<span class="el-dropdown-link" @click="detail(row)">详情</span>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
@command="
|
@command="
|
||||||
(val) => {
|
(val) => {
|
||||||
@@ -314,6 +314,11 @@
|
|||||||
:companyNatureTypeEnum="companyNatureTypeEnum"
|
:companyNatureTypeEnum="companyNatureTypeEnum"
|
||||||
@closeWindow="search"
|
@closeWindow="search"
|
||||||
/>
|
/>
|
||||||
|
<!-- 认证 -->
|
||||||
|
<attestation :controlWindows="controlWindows" @closeWindow="search" />
|
||||||
|
<!-- 财务 -->
|
||||||
|
<finance :controlWindows="controlWindows" @closeWindow="search" />
|
||||||
|
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
title="详情"
|
title="详情"
|
||||||
@@ -330,12 +335,77 @@
|
|||||||
:mappingData="mappingData"
|
:mappingData="mappingData"
|
||||||
@close="controlWindows.detail = false"
|
@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
|
<el-image
|
||||||
style="width: 100px; height: 100px"
|
style="width: 100px; height: 100px"
|
||||||
:src="oilCompanyMatch.offlineTransactionProof"
|
:src="oilCompanyMatch[1].businessLienceImg"
|
||||||
/>
|
/>
|
||||||
</template>
|
</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>
|
</general-details>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
@@ -393,6 +463,8 @@ import pagination from "components/pagination/index.vue";
|
|||||||
import generalDetails from "components/generalDetails/index.vue";
|
import generalDetails from "components/generalDetails/index.vue";
|
||||||
|
|
||||||
import add from "./components/add.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";
|
import { rechargeTypeEnum, rechargeStatusEnum } from "utils/dataType.js";
|
||||||
|
|
||||||
@@ -401,6 +473,8 @@ export default {
|
|||||||
// OilCompanyInfoUpdate,
|
// OilCompanyInfoUpdate,
|
||||||
// OilCompanyInfoAdd,
|
// OilCompanyInfoAdd,
|
||||||
add,
|
add,
|
||||||
|
attestation,
|
||||||
|
finance,
|
||||||
|
|
||||||
pagination,
|
pagination,
|
||||||
autocomplete,
|
autocomplete,
|
||||||
@@ -412,6 +486,8 @@ export default {
|
|||||||
add: false,
|
add: false,
|
||||||
addInfo: {},
|
addInfo: {},
|
||||||
detail: false,
|
detail: false,
|
||||||
|
attestation: false,
|
||||||
|
finance: false,
|
||||||
},
|
},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
userList: [],
|
userList: [],
|
||||||
@@ -502,53 +578,79 @@ export default {
|
|||||||
value: "6",
|
value: "6",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
settlementModesEnum: {
|
||||||
|
1: "充值返利",
|
||||||
|
2: "消费返利",
|
||||||
|
3: "充值返利+消费返利",
|
||||||
|
},
|
||||||
oilCompanyMatch: {},
|
oilCompanyMatch: {},
|
||||||
mappingData: [
|
mappingData: [
|
||||||
{
|
{
|
||||||
carTitle: "",
|
carTitle: "基础信息",
|
||||||
|
// 标记
|
||||||
carItems: [
|
carItems: [
|
||||||
{ label: "ID", value: "id" },
|
// { label: "账户ID", value: "id" },
|
||||||
{ label: "交易类型", value: "transactionType" },
|
{ label: "企业名称", value: "name" },
|
||||||
{ label: "交易状态", value: "transactionState" },
|
{ label: "企业简称", value: "abbreviaName" },
|
||||||
{ label: "交易金额", value: "transactionAmount" },
|
// { label: "是否为主体公司", value: "parentMark" },
|
||||||
{ label: "充值返利比例", value: "rechargeRebate" },
|
// { label: "上级公司", value: "name" },
|
||||||
{ label: "充值返利金额", value: "rechargeRebateAmount" },
|
{ label: "公司性质", value: "parentMark" },
|
||||||
{ label: "线下汇款公司账户", value: "offlinePaymentCompany" },
|
{ label: "企业性质", value: "companyNature" },
|
||||||
{ label: "线下交易发起时间", value: "offlineStartTime" },
|
{ label: "公司对接类型", value: "companyDockType" },
|
||||||
{ label: "线下交易完成时间", value: "offlineCompleteTime" },
|
{ label: "启用标识", value: "enableMark" },
|
||||||
{ label: "线下交易凭证", value: "offlineTransactionProof" },
|
{ label: "审核标识", value: "auditMark" },
|
||||||
{ label: "交易审核标识", value: "auditMark" },
|
{ label: "审核说明", value: "auditRemarks" },
|
||||||
{ label: "审核人", value: "auditUserName" },
|
],
|
||||||
{ label: "交易说明", value: "reverseRemark" },
|
},
|
||||||
{ label: "审核时间", value: "auditTime" },
|
{
|
||||||
{ label: "审核系统来源", value: "auditSource" },
|
carTitle: "认证信息",
|
||||||
{ label: "赊销还款审核", value: "chargeSalesAuditMark" },
|
carItems: [
|
||||||
{ label: "赊销还款审核人", value: "chargeSalesAuditUser" },
|
{ label: "公司名称", value: "getInfoName" },
|
||||||
{ label: "赊销还款审核时间", value: "chargeSalesAuditTime" },
|
{ label: "省份名称", value: "provinceName" },
|
||||||
{ label: "赊销还款审核来源", value: "chargeSalesAuditSource" },
|
{ label: "城市名称", value: "cityName" },
|
||||||
{ label: "创建用户", value: "createUserName" },
|
{ 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: "createTime" },
|
||||||
{ label: "创建数据来源", value: "createSource" },
|
|
||||||
{ label: "企业收款账户", value: "internalCompanyName" },
|
|
||||||
{ label: "开户行", value: "bankDeposit" },
|
|
||||||
{ label: "银行卡号", value: "bankCardNo" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
carTitle: "账户信息",
|
carTitle: "账户信息",
|
||||||
carItems: [
|
carItems: [
|
||||||
{ label: "账户总余额", value: "balance" },
|
|
||||||
{ label: "待还总金额", value: "totalChargeAmount" },
|
|
||||||
{ label: "账户状态", value: "accountState" },
|
{ label: "账户状态", value: "accountState" },
|
||||||
{ label: "账户类型", value: "accountType" },
|
{ label: "账户类型", value: "accountType" },
|
||||||
|
{ label: "账户总余额", value: "balance" },
|
||||||
|
{ label: "待还总金额", value: "totalChargeAmount" },
|
||||||
{ label: "账户充值余额", value: "rechargeBalance" },
|
{ label: "账户充值余额", value: "rechargeBalance" },
|
||||||
{ label: "赊销充值余额", value: "chargeRechargeBalance" },
|
|
||||||
{ label: "充值返利余额", value: "rechargeRebateBalance" },
|
{ label: "充值返利余额", value: "rechargeRebateBalance" },
|
||||||
{ label: "消费返利余额", value: "consumeRebateBalance" },
|
{ label: "消费返利余额", value: "consumeRebateBalance" },
|
||||||
{ label: "累计充值金额", value: "totalRechargeAmount" },
|
{ label: "累计充值金额", value: "totalRechargeAmount" },
|
||||||
{ label: "累计赊销充值金额", value: "totalChargeRechargeAmount" },
|
|
||||||
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
|
{ label: "累计充值返利金额", value: "totalRechargeRebateAmount" },
|
||||||
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
|
{ label: "累计消费返利金额", value: "totalConsumeRebateAmount" },
|
||||||
|
{ label: "累计开票金额", value: "totalInvoiceAmount" },
|
||||||
|
{ label: "创建人编号", value: "createUser" },
|
||||||
|
{ label: "创建时间", value: "createTime" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -623,7 +725,7 @@ export default {
|
|||||||
//更多
|
//更多
|
||||||
commandMore(val, row) {
|
commandMore(val, row) {
|
||||||
if (val === "base") {
|
if (val === "base") {
|
||||||
serve.getInfo(row.id).then((res) => {
|
commonServe.getInfo(row.id).then((res) => {
|
||||||
this.controlWindows.addInfo = {
|
this.controlWindows.addInfo = {
|
||||||
title: "修改",
|
title: "修改",
|
||||||
...res.data,
|
...res.data,
|
||||||
@@ -631,18 +733,61 @@ export default {
|
|||||||
this.controlWindows.add = true;
|
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) {
|
detail(row) {
|
||||||
// Promise.all([
|
// commonServe.getInfo(row.id).then((res) => {
|
||||||
// serve.get(row.id),
|
Promise.allSettled([
|
||||||
// serve.getByCompanyId(row.companyId),
|
commonServe.getInfo(row.id),
|
||||||
// ]).then(([firstRes, secondRes]) => {
|
commonServe.getByCompanyIdAuth(row.id),
|
||||||
// this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data };
|
commonServe.getByCompanyIdFinance(row.id),
|
||||||
|
commonServe.getByCompanyIdAccount(row.id),
|
||||||
// console.log("this.oilCompanyMatch", this.oilCompanyMatch);
|
]).then((res) => {
|
||||||
// this.controlWindows.detail = true;
|
// 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;
|
||||||
|
});
|
||||||
// });
|
// });
|
||||||
// },
|
},
|
||||||
// 启用禁用点击
|
// 启用禁用点击
|
||||||
enableMark(val, row) {
|
enableMark(val, row) {
|
||||||
row.enableMark = val == 1 ? 0 : 1;
|
row.enableMark = val == 1 ? 0 : 1;
|
||||||
|
|||||||
@@ -469,9 +469,9 @@ export default {
|
|||||||
serve.get(row.id).then((res) => {
|
serve.get(row.id).then((res) => {
|
||||||
Promise.all([
|
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),
|
commonServe.getByCompanyIdAuth(res.data.companyId),
|
||||||
// 财务信息
|
// 财务信息
|
||||||
@@ -484,7 +484,7 @@ export default {
|
|||||||
fourthRes.data,
|
fourthRes.data,
|
||||||
];
|
];
|
||||||
if (firstRes.parentMark === 1) {
|
if (firstRes.parentMark === 1) {
|
||||||
serve.getInfo(firstRes.parentId).then((res) => {
|
commonServe.getInfo(firstRes.parentId).then((res) => {
|
||||||
this.oilCompanyMatch[0] = res.data;
|
this.oilCompanyMatch[0] = res.data;
|
||||||
this.controlWindows.detail = true;
|
this.controlWindows.detail = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -265,13 +265,17 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let configUpdata = id
|
let configUpdata = {
|
||||||
? { echoId: id, echoName: this.form.refineryName, isDisabled: true }
|
echoId: id || "",
|
||||||
: {
|
echoName: this.form.refineryName || "",
|
||||||
echoId: "",
|
isDisabled: !!id,
|
||||||
echoName: "",
|
|
||||||
isDisabled: false,
|
|
||||||
};
|
};
|
||||||
|
// ? { echoId: id || '', echoName: this.form.refineryName || '', isDisabled: !!id }
|
||||||
|
// : {
|
||||||
|
// echoId: "",
|
||||||
|
// echoName: "",
|
||||||
|
// isDisabled: false,
|
||||||
|
// };
|
||||||
Object.assign(this.configAutocomplete, configUpdata);
|
Object.assign(this.configAutocomplete, configUpdata);
|
||||||
},
|
},
|
||||||
// 公司change
|
// 公司change
|
||||||
|
|||||||
@@ -187,13 +187,17 @@ export default {
|
|||||||
this.form.transactionAmount = Math.abs(this.form.transactionAmount);
|
this.form.transactionAmount = Math.abs(this.form.transactionAmount);
|
||||||
this.companyChange(this.form.companyId);
|
this.companyChange(this.form.companyId);
|
||||||
}
|
}
|
||||||
let configUpdata = id
|
let configUpdata = {
|
||||||
? { echoId: id, echoName: this.form.refineryName, isDisabled: true }
|
echoId: id || "",
|
||||||
: {
|
echoName: this.form.refineryName || "",
|
||||||
echoId: "",
|
isDisabled: !!id,
|
||||||
echoName: "",
|
|
||||||
isDisabled: false,
|
|
||||||
};
|
};
|
||||||
|
// ? { echoId: id || '', echoName: this.form.refineryName || '', isDisabled: !!id }
|
||||||
|
// : {
|
||||||
|
// echoId: "",
|
||||||
|
// echoName: "",
|
||||||
|
// isDisabled: false,
|
||||||
|
// };
|
||||||
Object.assign(this.configAutocomplete, configUpdata);
|
Object.assign(this.configAutocomplete, configUpdata);
|
||||||
},
|
},
|
||||||
// 公司财务信息
|
// 公司财务信息
|
||||||
@@ -207,7 +211,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//
|
//
|
||||||
getByCompanyId(id) {
|
getByCompanyId(id) {
|
||||||
commonServe.getByCompanyId(id).then((res) => {
|
commonServe.getByCompanyIdAccount(id).then((res) => {
|
||||||
this.companyInfo = res.data;
|
this.companyInfo = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ export default {
|
|||||||
examine(row) {
|
examine(row) {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
serve.get(row.id),
|
serve.get(row.id),
|
||||||
commonServe.getByCompanyId(row.companyId),
|
commonServe.getByCompanyIdAccount(row.companyId),
|
||||||
]).then(([firstRes, secondRes]) => {
|
]).then(([firstRes, secondRes]) => {
|
||||||
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
||||||
this.controlWindows.addInfo = {
|
this.controlWindows.addInfo = {
|
||||||
@@ -567,7 +567,7 @@ export default {
|
|||||||
detail(row) {
|
detail(row) {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
serve.get(row.id),
|
serve.get(row.id),
|
||||||
commonServe.getByCompanyId(row.companyId),
|
commonServe.getByCompanyIdAccount(row.companyId),
|
||||||
]).then(([firstRes, secondRes]) => {
|
]).then(([firstRes, secondRes]) => {
|
||||||
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
||||||
this.controlWindows.addInfo.examineMark = false;
|
this.controlWindows.addInfo.examineMark = false;
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ export default {
|
|||||||
detail(row) {
|
detail(row) {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
serve.get(row.id),
|
serve.get(row.id),
|
||||||
commonServe.getByCompanyId(row.companyId),
|
commonServe.getByCompanyIdAccount(row.companyId),
|
||||||
]).then(([firstRes, secondRes]) => {
|
]).then(([firstRes, secondRes]) => {
|
||||||
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
this.oilCompanyMatch = [firstRes.data, secondRes.data];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user