pull/1/head^2
xiaozhiyong 2 years ago
parent 2594c97ec2
commit 70d54bcfa5
  1. 4
      src/api/common.js
  2. 33
      src/api/customerManagement/companyManagement.js
  3. 30
      src/components/autocomplete/index.vue
  4. 2
      src/layout/components/Navbar.vue
  5. 2
      src/permission.js
  6. 20
      src/utils/dataType.js
  7. 4
      src/utils/request.js
  8. 209
      src/views/customerManagement/companyManagement/components/add.vue
  9. 604
      src/views/customerManagement/companyManagement/index.vue
  10. 2
      src/views/financialCenter/accountManagement/components/recharge.vue
  11. 2
      src/views/financialCenter/enterpriseRecharge/components/add.vue
  12. 13
      src/views/financialCenter/enterpriseRecharge/index.vue
  13. 31
      src/views/financialCenter/enterpriseRechargeDetails/index.vue
  14. 2
      src/views/login/index.vue

@ -8,9 +8,7 @@ const getRefineryCompanyList = (params) => {
};
// 远程搜索用户
const liekQuery = (query) => {
return request.get(
`oil-user/sysCustomerInfo/liekQuery/${query.queryTypeGet}`
);
return request.get(`oil-user/sysCustomerInfo/liekQuery/${query}`);
};
//公司账户信息

@ -0,0 +1,33 @@
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 update = (params) => {
return request.postJson("oil-user/oilCompanyInfo/update", params);
};
//企业负责人 远程搜索
const liekQuery = (query) => {
return request.get(`/oil-user/sysCustomerInfo/liekQuery/${query}`);
};
//保存
const save = (params) => {
return request.postJson("/oil-user/oilCompanyInfo/save", params);
};
export default {
getByPage,
getCompanyAccountRecord,
update,
liekQuery,
save,
};

@ -58,27 +58,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 = [
{

@ -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,209 @@
<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: "id",
placeholder: "企业名称",
querykey: "parentId",
},
configAutocompleteLeader: {
serveTarget: serve.liekQuery,
labelKey: "nickName",
valueKey: "id",
placeholder: "企业负责人",
querykey: "businessLeader",
},
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));
}
},
submit() {
this.$refs["form"].validate((valid) => {
if (valid) {
this.judgeInterface(this.form).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>

@ -2,95 +2,75 @@
<div class="enterprise-recharge-details">
<div class="frame">
<el-form :model="parameter.params" :inline="true">
<!-- 公司名称 -->
<!-- 企业名称 -->
<autocomplete
class="mr20"
:params="parameter.params"
:config="configAutocomplete"
/>
<el-form-item>
<el-autocomplete
v-model="parameter.params.name"
placeholder="总公司名称"
:fetch-suggestions="querySearch"
:trigger-on-focus="false"
clearable
filterable
remote
reserve-keyword
@keyup.enter.native="getByPage"
<!-- 总公司名称 -->
<autocomplete
:params="parameter.params"
:config="configAutocompleteHead"
/>
<el-select
v-model="parameter.params.parentMark"
placeholder="是否为主体公司"
clearable
>
<el-option label="主体公司" value="0" />
<el-option label="分公司" value="1" />
</el-select>
<el-select
v-model="parameter.params.companyNature"
placeholder="企业性质"
clearable
>
<el-option
v-for="(item, index) in companyNatureTypeEnum"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-form-item>
<el-form-item>
<el-select
v-model="parameter.params.parentMark"
placeholder="是否为主体公司"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="主体公司" value="0" />
<el-option label="分公司" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model="parameter.params.companyNature"
placeholder="企业性质"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="零售客户" value="0" />
<el-option label="外请客户" value="1" />
<el-option label="渠道客户" value="2" />
<el-option label="存量客户" value="3" />
<el-option label="批发客户" value="4" />
<el-option label="LNG客户" value="5" />
<el-option label="推广业务" value="6" />
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model="parameter.params.enableMark"
placeholder="启用标识"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="禁用" value="0" />
<el-option label="启用" value="1" />
</el-select>
</el-form-item>
</el-select>
<el-select
v-model="parameter.params.enableMark"
placeholder="启用标识"
clearable
>
<el-option label="禁用" value="0" />
<el-option label="启用" value="1" />
</el-select>
<el-form-item>
<el-select
v-model="parameter.params.auditMark"
placeholder="审核标识"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="未提交" value="0" />
<el-option label="审核通过" value="1" />
<el-option label="提交待审核" value="2" />
<el-option label="审核不通过" value="-1" />
</el-select>
</el-form-item>
<el-select
v-model="parameter.params.auditMark"
placeholder="审核标识"
clearable
>
<el-option
v-for="(item, index) in auditMarkEnum"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-form-item>
<el-select
v-model="parameter.params.companyType"
placeholder="账户类型"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="柴油账户" value="0" />
<el-option label="LNG账户" value="2" />
<el-option label="汽油账户" value="1" />
<el-option label="尿素账户" value="3" />
<el-option label="油批账户" value="4" />
</el-select>
</el-form-item>
<el-select
v-model="parameter.params.companyType"
placeholder="账户类型"
clearable
>
<el-option
v-for="(item, index) in companyNatureTypeEnum"
:key="index"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-form-item>
<el-select
<!-- <el-select
v-model="parameter.params.businessLeader"
clearable
filterable
@ -112,47 +92,37 @@
"
:value="item.id"
/>
</el-select>
</el-select> -->
</el-form-item>
<el-form-item>
<el-select
v-model="parameter.params.companyDockType"
placeholder="公司对接类型"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="对接客户" :value="0" />
<el-option label="平台客户" :value="1" />
</el-select>
</el-form-item>
<el-select
v-model="parameter.params.companyDockType"
placeholder="公司对接类型"
clearable
@keyup.enter.native="getByPage"
>
<el-option label="对接客户" :value="0" />
<el-option label="平台客户" :value="1" />
</el-select>
</el-form>
<div class="buttons">
<el-button
v-permission="['company:info:add']"
class="group-item"
type="primary"
:size="$store.getters.size"
@click="toAdd"
>
<svg-icon icon-class="iconxinzeng" />
<span class="padding-left-xs">添加</span>
</el-button>
<el-button icon="el-icon-search" @click="search">查询</el-button>
<el-button icon="el-icon-refresh" @click="reset">重置</el-button>
<el-button @click="search">查询</el-button>
<el-button @click="reset">重置</el-button>
</div>
</div>
<div class="table">
<div class="operation"></div>
<div class="operation">
<el-button @click="addition">添加</el-button>
</div>
<!-- 列表开始 -->
<el-table
:max-height="tableHeight"
stripe
:data="dataPage.list"
:data="tableData"
fit
style="width: 100%"
:size="$store.getters.size"
@sort-change="sortHandler"
@selection-change="handleSelectionChange"
>
@ -193,9 +163,7 @@
<span>{{
row.consumRebateStrategy == "TYFL" ? "统一费率" : "油站等级"
}}</span>
<span>{{
row.consumRebateScale ? row.consumRebateScale : "0"
}}</span>
<span>{{ row.consumRebateScale || "0" }}</span>
</p>
<p v-if="row.consumRebateStrategy == 'TYSSFL'">
{{ row.consumRebateStrategy == "TYSSFL" ? "统一升数" : "未知" }}
@ -205,9 +173,9 @@
</p>
<p
v-if="
row.consumRebateStrategy != 'TYFL' &&
row.consumRebateStrategy != 'SITE_lEVEL' &&
row.consumRebateStrategy != 'TYSSFL'
!['TYFL', 'SITE_lEVEL', 'TYSSFL'].includes(
row.consumRebateStrategy
)
"
>
暂无
@ -217,19 +185,9 @@
<el-table-column label="企业性质">
<template slot-scope="{ row }">
{{
row.companyNature === 0
? "零售客户"
: row.companyNature === 1
? "外请客户"
: row.companyNature === 2
? "渠道客户"
: row.companyNature === 3
? "存量客户"
: row.companyNature === 4
? "批发客户"
: row.companyNature === 5
? "LNG客户"
: "推广业务"
companyNatureTypeEnum.find(
(item) => item.value == row.companyNature
).label
}}
</template>
</el-table-column>
@ -265,11 +223,15 @@
v-model="row.enableMark"
:active-value="1"
:inactive-value="0"
@change="enableMarkClike(row)"
@change="
(val) => {
enableMark(val, row);
}
"
></el-switch>
</template>
</el-table-column>
<el-table-column label="联动分油">
<!-- <el-table-column label="联动分油">
<template slot-scope="{ row }">
<el-switch
v-model="row.shareDistribute"
@ -281,39 +243,30 @@
@change="enableMarkOpem(row)"
></el-switch>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="审核标识">
<template slot-scope="{ row }">
<el-tag v-if="row.auditMark === 0" type="info" effect="dark"
>未提交</el-tag
>
<el-tag v-if="row.auditMark === 1" type="success" effect="dark"
>审核通过</el-tag
>
<el-tag v-if="row.auditMark === 2" type="warning"
>提交待审核</el-tag
>
<el-tag v-if="row.auditMark > 2 && row.auditMark < 0" type="danger"
>审核不通过</el-tag
<el-tag
:type="
auditMarkEnum.find((item) => item.value == row.auditMark).type
"
effect="dark"
>{{
auditMarkEnum.find((item) => item.value == row.auditMark).label
}}</el-tag
>
</template>
</el-table-column>
<el-table-column label="企业负责人">
<template slot-scope="{ row }">
{{ row.userName ? row.userName : "企业负责人" }} <br />
{{ row.phone ? row.phone : "暂无电话" }}
</template>
</el-table-column>
<el-table-column label="企业负责人">
<template slot-scope="{ row }">
{{ row.userName ? row.userName : "企业负责人" }} <br />
{{ row.phone ? row.phone : "暂无电话" }}
{{ row.userName || "企业负责人" }} <br />
{{ row.phone || "暂无电话" }}
</template>
</el-table-column>
<el-table-column label="创建信息">
<template slot-scope="{ row }">
{{ row.createUserName ? row.createUserName : "创建人" }} <br />
{{ row.createTime ? row.createTime : "创建时间" }}
{{ row.createUserName || "创建人" }} <br />
{{ row.createTime || "创建时间" }}
</template>
</el-table-column>
<el-table-column
@ -323,19 +276,8 @@
align="center"
>
<template slot-scope="scope">
<el-button
:size="$store.getters.size"
type="text"
@click="handleDetail(scope.row.id)"
>
<svg-icon icon-class="iconxiangqing1" />
</el-button>
<el-button
@click="codeFn(scope.row)"
:size="$store.getters.size"
type="text"
icon="el-icon-oilEwm"
>
<el-button type="text" @click="handleDetail(scope.row.id)">
详情
</el-button>
<el-dropdown>
<el-button type="text">
@ -344,18 +286,15 @@
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toUpdate(scope.row.id)">
<el-button :size="$store.getters.size" type="text">
<svg-icon icon-class="iconicon-" />
基础资料
</el-button>
基础资料
</el-dropdown-item>
<el-dropdown-item
v-if="scope.row.auditMark === 0"
@click.native="toAddAuth(scope.row.id)"
>
<el-button
v-permission="['company:info:auth']"
:size="$store.getters.size"
type="text"
>
<svg-icon icon-class="iconicon-" />
@ -366,9 +305,8 @@
v-if="scope.row.auditMark !== 0"
@click.native="toUpdateAuth(scope.row.id)"
>
<el-button
v-permission="['company:info:auth']"
:size="$store.getters.size"
type="text"
>
<svg-icon icon-class="iconicon-" />
@ -377,8 +315,8 @@
</el-dropdown-item>
<el-dropdown-item @click.native="toBankAuth(scope.row)">
<el-button
v-permission="['company:info:auth']"
:size="$store.getters.size"
type="text"
>
<svg-icon icon-class="iconicon-" />
@ -387,8 +325,8 @@
</el-dropdown-item>
<el-dropdown-item @click.native="toFinance(scope.row.id)">
<el-button
v-permission="['company:info:finance']"
:size="$store.getters.size"
type="text"
>
<svg-icon icon-class="iconicon-" />
@ -404,6 +342,13 @@
<!-- 分页 -->
<pagination :parameter="parameter" @searchAgain="getByPage" />
</div>
<!-- 新增 -->
<add
:controlWindows="controlWindows"
:companyNatureTypeEnum="companyNatureTypeEnum"
@closeWindow="search"
/>
<!-- 详情 -->
<el-drawer
title="详情"
@ -430,7 +375,7 @@
</el-drawer>
<!-- 修改弹窗 -->
<el-dialog
<!-- <el-dialog
v-el-drag-dialog
title="修改"
:visible.sync="updateDialog"
@ -442,10 +387,10 @@
@getByPage="getByPage"
@closeDialog="closeDialog"
/>
</el-dialog>
</el-dialog> -->
<!-- 添加弹窗 -->
<el-dialog
<!-- <el-dialog
v-el-drag-dialog
title="添加"
:visible.sync="addDialog"
@ -456,24 +401,25 @@
@getByPage="getByPage"
@closeDialog="closeDialog"
/>
</el-dialog>
</el-dialog> -->
<!-- 添加认证信息弹窗 -->
<el-drawer :visible.sync="addAuthDialog" size="70%">
<!-- <el-drawer :visible.sync="addAuthDialog" size="70%">
<OilCompanyAuthAdd
v-if="addAuthDialog"
:oil-company-info="oilCompanyInfo"
@getByPage="getByPage"
@closeDialog="closeDialog"
/>
</el-drawer>
</el-drawer> -->
</div>
</template>
<script>
import OilCompanyInfoAdd from "@/views/customerManagement/companyManagement/OilCompanyInfoAdd";
import serve from "api/financialCenter/enterpriseRechargeDetails.js";
import serve from "api/customerManagement/companyManagement.js";
import commonServe from "api/common.js";
import OilCompanyInfoAdd from "@/views/customerManagement/companyManagement/OilCompanyInfoAdd";
import OilCompanyInfoUpdate from "@/views/customerManagement/companyManagement/OilCompanyInfoUpdate";
import oilCompanyInfoApi from "@/api/customerManagement/oilCompanyInfo";
@ -481,120 +427,42 @@ import autocomplete from "components/autocomplete/index.vue";
import pagination from "components/pagination/index.vue";
import generalDetails from "components/generalDetails/index.vue";
import {
rechargeTypeEnum,
rechargeStatusEnum,
repaymentExamineEnum,
} from "utils/dataType.js";
import add from "./components/add.vue";
import { rechargeTypeEnum, rechargeStatusEnum } from "utils/dataType.js";
export default {
components: {
OilCompanyInfoUpdate,
OilCompanyInfoAdd,
// OilCompanyInfoUpdate,
// OilCompanyInfoAdd,
add,
pagination,
autocomplete,
generalDetails,
},
data() {
return {
//
deptOptions: [],
deptDataList: {
companyIds: [],
},
rowData: null,
showCode: false,
bankFinanceDialog: false,
syncDialog: false,
output: {
outputType: 4, // 1234
startPage: 1, //
endPage: 1, //
pageSize: 20, //
controlWindows: {
add: false,
addInfo: {},
detail: false,
},
queryCompanyList: [],
tableData: [],
userList: [],
piliangDialog: false,
updateFinanceDialog: false, //
BatchModifyingDialog: false, //
oilCompanyAuth: {},
oilCompanyFinance: {},
addFinanceDialog: false, //
updateAuthDialog: false, //
addAuthDialog: false, //
multipleSelection: [], //
outPutDialog: false, //
showTableDrawer: false,
page: {
pageSize: 20, //
currentPage: 1, //
params: {}, //
sorted: {
createTime: "desc",
},
columns: [],
},
tableHeight: document.documentElement.clientHeight - 300 - 60,
filters: this.$options.filters,
dataPage: {
// page
pageSize: 20, //
currentPage: 1, //
params: {
//
},
sorted: {},
list: [],
},
tableColumns: [],
tableHeight: 0,
//
queryParams: {},
addDialog: false, //
updateDialog: false, //
oilCompanyInfo: {},
oilCompanyInfoId: {
id: "",
list: [],
},
restaurants: [], //
valColumn: [
"name",
"abbreviaName",
"companyNature",
"parentMark",
"enableMark",
"auditMark",
"userName",
"createUserName",
"createTime",
"auditUserName",
"auditTime",
"updateUserName",
"updateTime",
],
headers: [
"企业名称",
"企业简称",
"企业性质",
"公司性质",
"启用状态",
"审核标识",
"企业负责人",
"创建人",
"创建时间",
"审核人",
"审核时间",
"修改人",
"修改时间",
],
rechargeTypeEnum: rechargeTypeEnum,
rechargeStatusEnum: rechargeStatusEnum,
repaymentExamineEnum: repaymentExamineEnum,
controlWindows: {
detail: false,
},
datetime: [],
// datetime: [],
tableData: [],
configAutocomplete: {
serveTarget: commonServe.getRefineryCompanyList,
@ -604,13 +472,12 @@ export default {
placeholder: "企业名称",
querykey: "companyId",
},
configAutocompleteSec: {
configAutocompleteHead: {
serveTarget: commonServe.liekQuery,
autocompleteKey: "",
labelKey: "nickName",
valueKey: "id",
placeholder: "业务负责人",
querykey: "businessLeader",
labelKey: "name",
valueKey: "name",
placeholder: "总公司名称",
querykey: "name",
},
parameter: {
currentPage: 1,
@ -618,22 +485,56 @@ export default {
total: 0,
params: {},
},
LoopBackTypeEnum: [
auditMarkEnum: [
{
label: "未提交",
value: "0",
type: "dark",
},
{
label: "审核通过",
value: "1",
type: "dark",
},
{
label: "待审核",
value: "2",
type: "warning",
},
{
label: "审核不通过",
value: "-1",
type: "danger",
},
],
companyNatureTypeEnum: [
{
label: "零售客户",
value: "0",
},
{
label: "充值圈回",
value: 1,
label: "外请客户",
value: "1",
},
{
label: "赊销圈回",
value: 2,
label: "渠道客户",
value: "2",
},
{
label: "充值返利圈回",
value: 3,
label: "存量客户",
value: "3",
},
{
label: "消费返利圈回",
value: 4,
label: "批发客户",
value: "4",
},
{
label: "LNG客户",
value: "5",
},
{
label: "推广业务",
value: "6",
},
],
oilCompanyMatch: {},
@ -689,7 +590,7 @@ export default {
};
},
created() {
this.initDateTime();
// this.initDateTime();
this.getByPage();
},
updated() {
@ -711,43 +612,46 @@ export default {
this.parameter.currentPage = 1;
this.getByPage();
},
closeDialog() {
this.addDialog = false;
this.updateDialog = false;
this.addAuthDialog = false;
this.updateAuthDialog = false;
this.addFinanceDialog = false;
this.updateFinanceDialog = false;
this.piliangDialog = false;
this.BatchModifyingDialog = false;
this.showTableDrawer = false;
this.bankFinanceDialog = false;
this.syncDialog = false;
},
enableMarkOpem(row) {
//
const data = {
id: row.id,
shareDistribute: row.shareDistribute,
};
oilCompanyInfoApi.openShareDistribute(data).then((res) => {
if (res.code === 20000) {
this.$message.success(res.msg);
}
this.getByPage();
});
},
getByPage() {
this.parameter.params.companyType = "4";
oilCompanyInfoApi.getByPage(this.parameter).then((res) => {
this.dataPage.list = res.data.list;
serve.getByPage(this.parameter).then((res) => {
this.tableData = res.data.list;
this.parameter.total = res.data.totalCount;
});
console.log(this.tableData);
// console.log(this.tableData);
},
// closeDialog() {
// this.addDialog = false;
// this.updateDialog = false;
// this.addAuthDialog = false;
// this.updateAuthDialog = false;
// this.addFinanceDialog = false;
// this.updateFinanceDialog = false;
// this.piliangDialog = false;
// this.BatchModifyingDialog = false;
// this.showTableDrawer = false;
// this.bankFinanceDialog = false;
// this.syncDialog = false;
// },
enableMarkOpem(row) {
//
// const data = {
// id: row.id,
// shareDistribute: row.shareDistribute,
// };
// oilCompanyInfoApi.openShareDistribute(data).then((res) => {
// if (res.code === 20000) {
// this.$message.success(res.msg);
// }
// this.getByPage();
// });
},
//
addition() {
this.controlWindows.addInfo.title = "产品新增";
this.controlWindows.addInfo = {
title: "添加",
};
this.controlWindows.add = true;
},
// detail(row) {
@ -762,11 +666,12 @@ export default {
// });
// },
//
enableMarkClike(row) {
const data = [row];
oilCompanyInfoApi.updateBatchEnable(data).then((res) => {
if (res.code === 20000) {
this.$message.success(res.msg);
enableMark(val, row) {
row.enableMark = val == 1 ? 0 : 1;
update.updateBatchEnable([row]).then((res) => {
if (!res.code === 20000) {
this.$message.error(res.msg);
return;
}
this.getByPage();
});
@ -778,28 +683,6 @@ export default {
pageSize: 10,
params: {},
});
this.initDateTime();
},
// init
initDateTime() {
let now = new Date().getTime();
let beforeDay30 = now - 1000 * 60 * 60 * 24 * 30;
let nowRes = this.$utils.parseTime(now);
let beforeDay30Res = this.$utils.parseTime(beforeDay30);
let { y, M, d } = nowRes;
let { y: beforey, M: beforeM, d: befored } = beforeDay30Res;
this.datetime = [
`${beforey}-${beforeM}-${befored} 00:00:00`,
`${y}-${M}-${d} 23:59:59`,
];
this.changeDateTime(this.datetime);
},
changeDateTime(val) {
if (val) {
this.parameter.params.createTimeStart = val[0];
this.parameter.params.createTimeEnd = val[1];
}
console.log(val);
},
// table height
heightHandle() {
@ -819,21 +702,22 @@ export default {
this.getByPage();
},
indexMethod(index) {
return (index + 1) * 1;
return index + 1;
},
sortHandler(column) {
//
console.log(column.column.sortable);
const key = column.column.sortable;
const value = column.order;
this.page.sorted = {};
this.page.sorted[key] = value;
this.getByPage();
// console.log(column.column.sortable);
// const key = column.column.sortable;
// const value = column.order;
// this.page.sorted = {};
// this.page.sorted[key] = value;
// this.getByPage();
},
toAdd() {
addition() {
//
this.oilCompanyInfo = {};
this.addDialog = true;
// this.oilCompanyInfo = {};
// this.addDialog = true;
this.controlWindows.add = true;
},
toUpdate(id) {
console.log(id);

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

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

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

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

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