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

pull/1/head
lixuan 2 years ago
commit d55d7562b6
  1. 14
      src/api/common.js
  2. 58
      src/api/customerManagement/companyManagement.js
  3. 8
      src/api/financialCenter/accountManagement.js
  4. 2
      src/api/financialCenter/enterpriseRecharge.js
  5. 37
      src/components/autocomplete/index.vue
  6. 2
      src/layout/components/Navbar.vue
  7. 2
      src/permission.js
  8. 20
      src/utils/dataType.js
  9. 6
      src/utils/index.js
  10. 4
      src/utils/request.js
  11. 231
      src/views/customerManagement/companyManagement/components/add.vue
  12. 297
      src/views/customerManagement/companyManagement/components/attestation.vue
  13. 273
      src/views/customerManagement/companyManagement/components/finance.vue
  14. 893
      src/views/customerManagement/companyManagement/index.vue
  15. 2
      src/views/financialCenter/accountManagement/components/recharge.vue
  16. 6
      src/views/financialCenter/accountManagement/index.vue
  17. 20
      src/views/financialCenter/enterpriseRecharge/components/add.vue
  18. 20
      src/views/financialCenter/enterpriseRecharge/components/addTurn.vue
  19. 17
      src/views/financialCenter/enterpriseRecharge/index.vue
  20. 33
      src/views/financialCenter/enterpriseRechargeDetails/index.vue
  21. 2
      src/views/login/index.vue

@ -8,13 +8,14 @@ const getRefineryCompanyList = (params) => {
};
// 远程搜索用户
const liekQuery = (query) => {
return request.get(
`oil-user/sysCustomerInfo/liekQuery/${query.queryTypeGet}`
);
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}`);
};
//公司财务信息
@ -29,7 +30,8 @@ const getByCompanyIdAuth = (id) => {
export default {
getRefineryCompanyList,
liekQuery,
getByCompanyId,
getInfo,
getByCompanyIdAccount,
getByCompanyIdFinance,
getByCompanyIdAuth,
};

@ -0,0 +1,58 @@
import request from "utils/axios.js";
// table
const getByPage = (params) => {
return request.postJson("/oil-user/oilCompanyInfo/getByPage", params);
};
//详情
const getCompanyAccountRecord = (params) => {
return request.postJson(
"oil-finance/oilCompanyAccountRecord/getCompanyAccountRecord",
params
);
};
//保存
const save = (params) => {
return request.postJson("/oil-user/oilCompanyInfo/save", params);
};
//修改
const 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) => {
return request.get(`/oil-user/sysCustomerInfo/liekQuery/${query}`);
};
// 级联
const getTree = () => {
return request.get("/oil-dict/areaCode/getTree");
};
export default {
getByPage,
getCompanyAccountRecord,
update,
liekQuery,
save,
getTree,
saveAttestation,
updateAttestation,
saveFinance,
updateFinance,
// getInfo,
};

@ -20,9 +20,9 @@ const save = (params) => {
return request.postJson("/oil-finance/oilCompanyAccountReverse/save", params);
};
const getInfo = (id) => {
return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
};
// const getInfo = (id) => {
// return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
// };
// //详情
// const getCompanyAccountRecord = (params) => {
@ -37,5 +37,5 @@ export default {
get,
save,
// getByCompanyIdAuth,
getInfo,
// getInfo,
};

@ -26,7 +26,7 @@ const update = (params) => {
params
);
};
// 企业收款账户
// 级联
const getCascaderList = () => {
return request.get("/oil-finance/internalCompany/getCascaderList");
};

@ -44,10 +44,13 @@ export default {
watch: {
"config.echoId": {
handler(nval, oval) {
this.list = [];
this.isDisabled = !!this.config.isDisabled;
if (nval) {
this.remoteMethod(this.config.echoName);
let resultName = this.config.echoName.replace(/\s*/g, "");
if (!resultName) return;
this.remoteMethod(resultName);
}
this.isDisabled = !!this.config.isDisabled;
},
deep: true,
immediate: true,
@ -58,27 +61,33 @@ export default {
remoteMethod(query) {
if (query !== "") {
this.loading = true;
let params = {};
let type = this.$utils.typeJudgment(this.config.autocompleteKey);
if (!type.includes("Object") && !type.includes("String")) return;
// if (!type.includes("Object") && !type.includes("String")) {
// this.loading = false;
// this.$message.warning("config.autocompleteKey");
// return;
// }
let params = {};
if (type.includes("Object")) {
params[this.config.autocompleteKey.key] = query;
params["enableMark"] = this.config.autocompleteKey.enableMark;
}
if (type.includes("String")) {
if (
type.includes("String") ||
type.includes("Undefined") ||
type.includes("Null")
) {
// getautocompleteKey
console.log();
this.config.autocompleteKey
? (params[this.config.autocompleteKey] = query)
: (params["queryTypeGet"] = query);
: (params = query);
}
this.config.serveTarget(params).then((res) => {
let timeInstance = setTimeout(() => {
this.loading = false;
clearTimeout(timeInstance);
if (res.data.length) {
this.list = res.data;
} else this.list = [];
}, 1000 * Math.random());
this.loading = false;
if (res.data.length) {
this.list = res.data;
} else this.list = [];
});
} else {
this.list = [];

@ -46,7 +46,7 @@ export default {
logout() {
serve.loginOut().then((res) => {
if (res.code === 20000) {
localStorage.removeItem("token");
localStorage.removeItem("businessToken");
this.$router.push("/login");
}
});

@ -15,7 +15,7 @@ const whiteList = ["/login"]; // no redirect whitelist
router.beforeEach(async (to, from, next) => {
NProgress.start();
document.title = getPageTitle(to.meta.title);
const hasToken = localStorage.getItem("token");
const hasToken = localStorage.getItem("businessToken");
if (hasToken) {
if (to.path === "/login") {
next({ path: "/" });

@ -70,25 +70,7 @@ export const rechargeStatusEnum = [
value: -1,
},
];
// 赊销还款审核
export const repaymentExamineEnum = [
{
label: "还款待审核",
value: 0,
},
{
label: "还款成功",
value: 1,
},
{
label: "还款失败",
value: -1,
},
{
label: "待还款",
value: -2,
},
];
// 账户状态
export const accountStatusEnum = [
{

@ -32,6 +32,7 @@ export function parseTime(time) {
return formatRes;
}
// 防抖
export function debounce(fn, delay) {
let timer = null;
return function () {
@ -39,7 +40,6 @@ export function debounce(fn, delay) {
let _this = this;
let _arguments = arguments;
timer = setTimeout(function () {
// 在执行时,通过apply来使用_this和_arguments
fn.apply(_this, _arguments);
}, delay);
};
@ -55,8 +55,8 @@ export function isLicensePlate(no) {
export function cellStyle() {
return "text-align:center";
}
// 类型判断
export function typeJudgment(object) {
let res = {}.__proto__.toString.call(object);
return res ? res : "";
return res || "";
}

@ -12,7 +12,7 @@ const service = axios.create({
// 请求拦截
service.interceptors.request.use(
(config) => {
let token = localStorage.getItem("token");
let token = localStorage.getItem("businessToken");
if (token) {
config.headers["Authorization"] = token;
@ -63,7 +63,7 @@ service.interceptors.response.use(
if (res && res.code) {
if (res.code === 42011) {
Vue.prototype.$message.error(res.msg || "您的登录已失效,请重新登录");
localStorage.removeItem("token");
localStorage.removeItem("businessToken");
setTimeout(() => {
window.location.reload();
}, 1000);

@ -0,0 +1,231 @@
<template>
<el-dialog
:title="controlWindows.addInfo.title"
width="50%"
:visible.sync="controlWindows.add"
@opened="openDrawer"
:before-close="closeWindow"
>
<div class="add">
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-row :gutter="2">
<el-col :span="12">
<el-form-item label="企业名称" prop="name">
<el-input v-model="form.name" placeholder="企业名称" clearable />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业简称" prop="abbreviaName">
<el-input
v-model="form.abbreviaName"
placeholder="企业简称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公司级别" prop="parentMark">
<el-select v-model="form.parentMark" placeholder="请选择">
<el-option label="主体公司" :value="0" />
<el-option label="分公司" :value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col v-if="form.parentMark === 1" :span="12">
<el-form-item label="上级公司" prop="parentId">
<!-- 企业名称 -->
<autocomplete
class="mr20"
:params="form"
:config="configAutocomplete"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质" prop="companyNature">
<el-select v-model="form.companyNature" placeholder="请选择">
<el-option
v-for="(item, index) in companyNatureTypeEnum"
:key="index"
:label="item.label"
:value="+item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="账户类型" prop="companyType">
<el-select v-model="form.companyType" placeholder="请选择">
<el-option label="油批账户" value="4" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业负责人" prop="businessLeader">
<!-- 企业名称 -->
<autocomplete
class="mr20"
:params="form"
:config="configAutocompleteLeader"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公司对接类型" prop="companyDockType">
<el-select v-model="form.companyDockType" placeholder="请选择">
<el-option label="对接客户" :value="0" />
<el-option label="平台客户" :value="1" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24" style="text-align: right">
<el-button @click="closeWindow">取消</el-button>
<el-button type="primary" @click="submit">提交</el-button>
</el-col>
</el-form>
</div>
</el-dialog>
</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,
companyNatureTypeEnum: Array,
},
data() {
let validatorParentId = (rule, value, callback) => {
if (this.form.parentId) callback();
else callback("请选择企业");
};
return {
configAutocomplete: {
serveTarget: commonServe.getRefineryCompanyList,
autocompleteKey: "name",
labelKey: "name",
valueKey: "parentId",
placeholder: "上级公司",
querykey: "parentId",
echoId: "",
echoName: "",
},
configAutocompleteLeader: {
serveTarget: serve.liekQuery,
labelKey: "nickName",
valueKey: "id",
placeholder: "企业负责人",
querykey: "businessLeader",
echoId: "",
echoName: "",
},
form: {},
rules: {
name: [
{ required: true, message: "请输入企业名称", trigger: "blur" },
{
min: 3,
max: 50,
message: "长度在 3 到 50 个字符",
trigger: "blur",
},
],
abbreviaName: [
{
min: 1,
max: 50,
message: "长度在 1 到 50 个字符",
trigger: "blur",
},
],
parentMark: [
{ required: true, message: "请选择是否主体公司", trigger: "change" },
],
parentId: [
{ required: true, validator: validatorParentId, trigger: "change" },
],
companyNature: [
{ required: true, message: "请选择企业性质", trigger: "change" },
],
companyType: [
{ required: true, message: "请选择账户类型", trigger: "change" },
],
},
};
},
created() {},
methods: {
openDrawer() {
let { id } = this.controlWindows.addInfo;
if (id) {
//
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
}
//
let configUpdata = {
echoId: this.form.parentId || "",
echoName: this.form.name || "",
};
//
let configUpdataLeader = {
echoId: this.form.businessLeader || "",
echoName: this.form.businessLeader || "",
};
Object.assign(this.configAutocomplete, configUpdata);
Object.assign(this.configAutocompleteLeader, configUpdataLeader);
},
submit() {
this.$refs["form"].validate((valid) => {
if (valid) {
let params = {
enableMark: 1,
auditMark: 0,
createSource: "REFINERY_OMS_WEB",
...this.form,
};
this.judgeInterface(params).then((res) => {
if (res.code === 20000) {
this.$message.success(res.msg);
this.closeWindow();
}
});
}
});
},
judgeInterface(form) {
let { id } = this.controlWindows.addInfo;
if (id) return serve.update(form);
else return serve.save(form);
},
closeWindow() {
this.$emit("closeWindow");
this.form = {};
this.controlWindows.addInfo = {};
this.$nextTick(() => {
this.$refs.form.clearValidate();
this.controlWindows.add = false;
});
},
},
};
</script>
<style lang="scss" scoped>
.add {
padding: 20px;
.el-input,
.el-select,
.el-textarea,
.el-autocomplete {
width: 230px;
}
}
</style>

@ -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>

File diff suppressed because it is too large Load Diff

@ -127,7 +127,7 @@ export default {
imgDialog: false,
headers: {
dataSources: "WEB",
Authorization: localStorage.getItem("token"),
Authorization: localStorage.getItem("businessToken"),
JSESSIONID: JSESSIONID,
token: utils.bcrypt(JSESSIONID),
},

@ -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;
});

@ -177,7 +177,7 @@ export default {
imgDialog: false,
headers: {
dataSources: "WEB",
Authorization: localStorage.getItem("token"),
Authorization: localStorage.getItem("businessToken"),
JSESSIONID: JSESSIONID,
token: utils.bcrypt(JSESSIONID),
},
@ -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;
});
},

@ -51,19 +51,6 @@
>
</el-option>
</el-select>
<!-- <el-select
v-model="parameter.params.chargeSalesAuditMark"
placeholder="赊账还款审核"
clearable
>
<el-option
v-for="(item, index) in repaymentExamineEnum"
:key="index"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> -->
<el-date-picker
v-model="datetime"
type="datetimerange"
@ -533,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 = {
@ -580,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;

@ -38,19 +38,6 @@
>
</el-option>
</el-select>
<!-- <el-select
v-model="parameter.params.enableMark"
placeholder="赊账还款审核"
clearable
>
<el-option
v-for="(item, index) in repaymentExamineEnum"
:key="index"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select> -->
<el-date-picker
v-model="datetime"
type="datetimerange"
@ -135,22 +122,6 @@
>
</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="businessLeader"
label="业务负责人"
@ -255,7 +226,6 @@ import generalDetails from "components/generalDetails/index.vue";
import {
rechargeTypeEnum,
rechargeStatusEnum,
repaymentExamineEnum,
accountStatusEnum,
} from "utils/dataType.js";
@ -269,7 +239,6 @@ export default {
return {
rechargeTypeEnum: rechargeTypeEnum,
rechargeStatusEnum: rechargeStatusEnum,
repaymentExamineEnum: repaymentExamineEnum,
accountStatusEnum: accountStatusEnum,
controlWindows: {
detail: false,
@ -427,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];

@ -113,7 +113,7 @@ export default {
})
.then((res) => {
if (res.data.accessToken) {
localStorage.setItem("token", res.data.accessToken);
localStorage.setItem("businessToken", res.data.accessToken);
this.$router.replace("/");
}
})

Loading…
Cancel
Save