更新
This commit is contained in:
@@ -23,11 +23,15 @@ const liekQuery = (query) => {
|
||||
const save = (params) => {
|
||||
return request.postJson("/oil-user/oilCompanyInfo/save", params);
|
||||
};
|
||||
|
||||
// 用户详情
|
||||
const getInfo = (id) => {
|
||||
return request.get(`/oil-user/oilCompanyInfo/get/${id}`);
|
||||
};
|
||||
export default {
|
||||
getByPage,
|
||||
getCompanyAccountRecord,
|
||||
update,
|
||||
liekQuery,
|
||||
save,
|
||||
getInfo,
|
||||
};
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
v-for="(item, index) in companyNatureTypeEnum"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:value="+item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -56,7 +56,7 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账户类型" prop="companyType">
|
||||
<el-select v-model="form.companyType" placeholder="请选择">
|
||||
<el-option label="油批账户" :value="4" />
|
||||
<el-option label="油批账户" value="4" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -110,9 +110,11 @@ export default {
|
||||
serveTarget: commonServe.getRefineryCompanyList,
|
||||
autocompleteKey: "name",
|
||||
labelKey: "name",
|
||||
valueKey: "id",
|
||||
placeholder: "企业名称",
|
||||
valueKey: "parentId",
|
||||
placeholder: "上级公司",
|
||||
querykey: "parentId",
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
},
|
||||
configAutocompleteLeader: {
|
||||
serveTarget: serve.liekQuery,
|
||||
@@ -120,6 +122,8 @@ export default {
|
||||
valueKey: "id",
|
||||
placeholder: "企业负责人",
|
||||
querykey: "businessLeader",
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
},
|
||||
form: {},
|
||||
rules: {
|
||||
@@ -163,12 +167,40 @@ export default {
|
||||
//回显
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
}
|
||||
// 上级公司
|
||||
let configUpdata = id
|
||||
? {
|
||||
echoId: this.form.parentId,
|
||||
echoName: this.form.name,
|
||||
}
|
||||
: {
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
};
|
||||
// 企业负责人
|
||||
let configUpdataLeader = id
|
||||
? {
|
||||
echoId: this.form.businessLeader,
|
||||
echoName: this.form.businessLeader,
|
||||
}
|
||||
: {
|
||||
echoId: "",
|
||||
echoName: "",
|
||||
};
|
||||
Object.assign(this.configAutocomplete, configUpdata);
|
||||
Object.assign(this.configAutocompleteLeader, configUpdataLeader);
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.judgeInterface(this.form).then((res) => {
|
||||
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();
|
||||
|
||||
@@ -122,7 +122,6 @@
|
||||
:data="tableData"
|
||||
fit
|
||||
style="width: 100%"
|
||||
|
||||
@sort-change="sortHandler"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
@@ -275,63 +274,29 @@
|
||||
width="180px"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDetail(scope.row.id)">
|
||||
详情
|
||||
</el-button>
|
||||
<el-dropdown>
|
||||
<el-button type="text">
|
||||
更多
|
||||
<i class="el-icon-arrow-down el-icon--right" />
|
||||
</el-button>
|
||||
<template slot-scope="{ row }">
|
||||
<span class="el-dropdown-link">详情</span>
|
||||
<el-dropdown
|
||||
@command="
|
||||
(val) => {
|
||||
commandMore(val, row);
|
||||
}
|
||||
"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
更多<i class="el-icon-arrow-down el-icon--right"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="toUpdate(scope.row.id)">
|
||||
基础资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="base"> 基础资料 </el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="scope.row.auditMark === 0"
|
||||
@click.native="toAddAuth(scope.row.id)"
|
||||
command="attestation"
|
||||
v-if="row.auditMark === 0"
|
||||
>
|
||||
<el-button
|
||||
|
||||
|
||||
type="text"
|
||||
>
|
||||
<svg-icon icon-class="iconicon-" />
|
||||
认证信息
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="scope.row.auditMark !== 0"
|
||||
@click.native="toUpdateAuth(scope.row.id)"
|
||||
>
|
||||
|
||||
|
||||
type="text"
|
||||
>
|
||||
<svg-icon icon-class="iconicon-" />
|
||||
认证信息
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="toBankAuth(scope.row)">
|
||||
<el-button
|
||||
|
||||
|
||||
type="text"
|
||||
>
|
||||
<svg-icon icon-class="iconicon-" />
|
||||
银行信息
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="toFinance(scope.row.id)">
|
||||
<el-button
|
||||
|
||||
|
||||
type="text"
|
||||
>
|
||||
<svg-icon icon-class="iconicon-" />
|
||||
<el-dropdown-item command="bank"> 银行信息 </el-dropdown-item>
|
||||
<el-dropdown-item command="finance">
|
||||
财务信息
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -654,6 +619,19 @@ export default {
|
||||
};
|
||||
this.controlWindows.add = true;
|
||||
},
|
||||
|
||||
//更多
|
||||
commandMore(val, row) {
|
||||
if (val === "base") {
|
||||
serve.getInfo(row.id).then((res) => {
|
||||
this.controlWindows.addInfo = {
|
||||
title: "修改",
|
||||
...res.data,
|
||||
};
|
||||
this.controlWindows.add = true;
|
||||
});
|
||||
}
|
||||
},
|
||||
// detail(row) {
|
||||
// Promise.all([
|
||||
// serve.get(row.id),
|
||||
|
||||
Reference in New Issue
Block a user