lixuan #1
@@ -13,17 +13,23 @@ const liekQuery = (query) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
//公司账户详情
|
//公司账户信息
|
||||||
const getByCompanyId = (query) => {
|
const getByCompanyId = (query) => {
|
||||||
return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`);
|
return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`);
|
||||||
};
|
};
|
||||||
//公司财务详情
|
//公司财务信息
|
||||||
const getByCompanyIdFinance = (query) => {
|
const getByCompanyIdFinance = (query) => {
|
||||||
return request.get(`/oil-user/oilCompanyFinance/getByCompanyId/${query}`);
|
return request.get(`/oil-user/oilCompanyFinance/getByCompanyId/${query}`);
|
||||||
};
|
};
|
||||||
|
// 公司认证信息
|
||||||
|
const getByCompanyIdAuth = (id) => {
|
||||||
|
return request.get(`/oil-user/oilCompanyAuth/getByCompanyId/${id}`);
|
||||||
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getRefineryCompanyList,
|
getRefineryCompanyList,
|
||||||
liekQuery,
|
liekQuery,
|
||||||
getByCompanyId,
|
getByCompanyId,
|
||||||
getByCompanyIdFinance,
|
getByCompanyIdFinance,
|
||||||
|
getByCompanyIdAuth,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,22 +3,21 @@ import request from "utils/axios.js";
|
|||||||
const getByPage = (params) => {
|
const getByPage = (params) => {
|
||||||
return request.postJson("/oil-finance/oilCompanyAccount/getByPage", params);
|
return request.postJson("/oil-finance/oilCompanyAccount/getByPage", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
//修改账户状态
|
//修改账户状态
|
||||||
const updateAccountState = (params) => {
|
const updateAccountState = (params) => {
|
||||||
return request.postJson("/oil-finance/oilCompanyAccount/getByPage", params);
|
return request.postJson(
|
||||||
};
|
"/oil-finance/oilCompanyAccount/updateAccountState",
|
||||||
|
params
|
||||||
//保存
|
);
|
||||||
const save = (params) => {
|
|
||||||
return request.postJson("/oil-finance/oilCompanyAccountReverse/save", params);
|
|
||||||
};
|
};
|
||||||
//详情
|
//详情
|
||||||
const get = (id) => {
|
const get = (id) => {
|
||||||
return request.get(`/oil-finance/oilCompanyAccount/get/${id}`);
|
return request.get(`/oil-finance/oilCompanyAccount/get/${id}`);
|
||||||
};
|
};
|
||||||
|
//保存
|
||||||
const getByCompanyIdAuth = (id) => {
|
const save = (params) => {
|
||||||
return request.get(`/oil-user/oilCompanyAuth/getByCompanyId/${id}`);
|
return request.postJson("/oil-finance/oilCompanyAccountReverse/save", params);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getInfo = (id) => {
|
const getInfo = (id) => {
|
||||||
@@ -37,6 +36,6 @@ export default {
|
|||||||
updateAccountState,
|
updateAccountState,
|
||||||
get,
|
get,
|
||||||
save,
|
save,
|
||||||
getByCompanyIdAuth,
|
// getByCompanyIdAuth,
|
||||||
getInfo,
|
getInfo,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="交易金额" prop="transactionAmount">
|
<el-form-item label="交易金额" prop="transactionAmount">
|
||||||
<el-input
|
<el-input
|
||||||
|
v-checkNum
|
||||||
v-model="form.transactionAmount"
|
v-model="form.transactionAmount"
|
||||||
placeholder="交易金额"
|
placeholder="交易金额"
|
||||||
clearable
|
clearable
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
:span="12"
|
:span="12"
|
||||||
>
|
>
|
||||||
<el-form-item label="充值返利比例" prop="rechargeRebate">
|
<el-form-item label="充值返利比例" prop="rechargeRebate">
|
||||||
<el-input v-model="form.rechargeRebate" clearable />
|
<el-input v-checkNum v-model="form.rechargeRebate" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -108,6 +109,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import serve from "api/financialCenter/accountManagement.js";
|
import serve from "api/financialCenter/accountManagement.js";
|
||||||
|
import commonServe from "api/common.js";
|
||||||
|
|
||||||
import utils from "utils/encode";
|
import utils from "utils/encode";
|
||||||
|
|
||||||
@@ -136,6 +138,9 @@ export default {
|
|||||||
transactionType: [
|
transactionType: [
|
||||||
{ required: true, message: "请选择交易类型", trigger: "change" },
|
{ required: true, message: "请选择交易类型", trigger: "change" },
|
||||||
],
|
],
|
||||||
|
rechargeRebate: [
|
||||||
|
{ required: true, message: "请输入充值返利比例", trigger: "blur" },
|
||||||
|
],
|
||||||
transactionAmount: [
|
transactionAmount: [
|
||||||
{ required: true, message: "请输入交易金额", trigger: "blur" },
|
{ required: true, message: "请输入交易金额", trigger: "blur" },
|
||||||
],
|
],
|
||||||
@@ -145,8 +150,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openDrawer() {
|
openDrawer() {
|
||||||
|
console.log("this.controlWindows.addInfo", this.controlWindows.addInfo);
|
||||||
let { id } = this.controlWindows.addInfo;
|
let { id } = this.controlWindows.addInfo;
|
||||||
if (id) {
|
if (id) {
|
||||||
|
commonServe.getByCompanyIdFinance(id).then((res) => {
|
||||||
|
this.companyFinance = res.data || {};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -159,7 +168,11 @@ export default {
|
|||||||
this.fileList = [];
|
this.fileList = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.form.offlineTransactionProof = response.data.path;
|
this.form.offlineTransactionProof = response.data.publicUrl;
|
||||||
|
console.log(
|
||||||
|
"this.form.offlineTransactionProof",
|
||||||
|
this.form.offlineTransactionProof
|
||||||
|
);
|
||||||
},
|
},
|
||||||
offlineTransactionProofPreview(file) {
|
offlineTransactionProofPreview(file) {
|
||||||
if (!this.form.offlineTransactionProof) return;
|
if (!this.form.offlineTransactionProof) return;
|
||||||
@@ -168,17 +181,25 @@ export default {
|
|||||||
submit() {
|
submit() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
serve.save(this.form).then((res) => {
|
serve
|
||||||
this.$message.success(res.msg);
|
.save({
|
||||||
this.$emit("closeDialog");
|
companyId: this.controlWindows.addInfo.id,
|
||||||
this.$emit("getByPage");
|
transactionState: 0,
|
||||||
});
|
auditMark: 0,
|
||||||
|
...this.form,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success(res.msg);
|
||||||
|
this.$emit("closeDialog");
|
||||||
|
this.closeWindow();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
closeWindow() {
|
closeWindow() {
|
||||||
this.form = {};
|
this.form = {};
|
||||||
|
this.fileList = [];
|
||||||
this.$emit("closeWindow");
|
this.$emit("closeWindow");
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.form.clearValidate();
|
this.$refs.form.clearValidate();
|
||||||
|
|||||||
@@ -57,11 +57,11 @@
|
|||||||
<el-button @click="accountTypeHandler(-1)">冻结</el-button>
|
<el-button @click="accountTypeHandler(-1)">冻结</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-if="tableHeight"
|
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
@@ -113,11 +113,6 @@
|
|||||||
label="充值余额"
|
label="充值余额"
|
||||||
minWidth="120"
|
minWidth="120"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column
|
|
||||||
prop="chargeRechargeBalance"
|
|
||||||
label="赊销充值余额"
|
|
||||||
minWidth="120"
|
|
||||||
/> -->
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="rechargeRebateBalance"
|
prop="rechargeRebateBalance"
|
||||||
label="充值返利余额"
|
label="充值返利余额"
|
||||||
@@ -128,11 +123,6 @@
|
|||||||
label="消费返利余额"
|
label="消费返利余额"
|
||||||
minWidth="120"
|
minWidth="120"
|
||||||
/>
|
/>
|
||||||
<!-- <el-table-column
|
|
||||||
prop="totalChargeAmount"
|
|
||||||
label="赊销待还"
|
|
||||||
minWidth="120"
|
|
||||||
/> -->
|
|
||||||
<el-table-column prop="createTime" label="创建时间" minWidth="200" />
|
<el-table-column prop="createTime" label="创建时间" minWidth="200" />
|
||||||
|
|
||||||
<el-table-column fixed="right" label="操作" width="150px">
|
<el-table-column fixed="right" label="操作" width="150px">
|
||||||
@@ -143,7 +133,7 @@
|
|||||||
更多<i class="el-icon-arrow-down el-icon--right" />
|
更多<i class="el-icon-arrow-down el-icon--right" />
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item @click.native="toRecharge(row.id)">
|
<el-dropdown-item @click.native="toRecharge(row)">
|
||||||
<el-button type="text"> 充值 </el-button>
|
<el-button type="text"> 充值 </el-button>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
@@ -157,7 +147,6 @@
|
|||||||
<!-- 添加充值 -->
|
<!-- 添加充值 -->
|
||||||
<recharge
|
<recharge
|
||||||
:controlWindows="controlWindows"
|
:controlWindows="controlWindows"
|
||||||
:oil-company-account="oilCompanyAccount"
|
|
||||||
@getByPage="getByPage"
|
@getByPage="getByPage"
|
||||||
@closeWindow="closeDialog"
|
@closeWindow="closeDialog"
|
||||||
/>
|
/>
|
||||||
@@ -258,7 +247,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
accountStatusEnum: accountStatusEnum,
|
accountStatusEnum: accountStatusEnum,
|
||||||
oilCompanyAccount: {},
|
// oilCompanyAccount: {},
|
||||||
controlWindows: {
|
controlWindows: {
|
||||||
detail: false,
|
detail: false,
|
||||||
recharge: false, // 充值弹窗
|
recharge: false, // 充值弹窗
|
||||||
@@ -457,25 +446,26 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//修改账户状态
|
//禁启用
|
||||||
accountTypeHandler(type) {
|
accountTypeHandler(type) {
|
||||||
//0:禁用 1:启用 -1:冻结
|
//0:禁用 1:启用 -1:冻结
|
||||||
if (!this.multipleSelection || this.multipleSelection.length < 1) {
|
if (!this.multipleSelection.length) {
|
||||||
this.$message.error("请选择需要操作的数据");
|
this.$message.warning("请选择需要操作的数据");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.multipleSelection.forEach((item) => {
|
this.multipleSelection.map((item) => {
|
||||||
item.accountState = type;
|
return (item.accountState = type);
|
||||||
});
|
});
|
||||||
serve.updateAccountState(this.multipleSelection).then((res) => {
|
serve.updateAccountState(this.multipleSelection).then((res) => {
|
||||||
if (res.code === 20000) {
|
if (res.code === 20000) {
|
||||||
this.$message.success(res.msg);
|
this.$message.success(res.msg);
|
||||||
|
this.getByPage();
|
||||||
}
|
}
|
||||||
this.getByPage();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 详情
|
||||||
detail(row) {
|
detail(row) {
|
||||||
//TODO
|
|
||||||
serve.get(row.id).then((res) => {
|
serve.get(row.id).then((res) => {
|
||||||
Promise.all([
|
Promise.all([
|
||||||
//基础信息
|
//基础信息
|
||||||
@@ -483,7 +473,7 @@ export default {
|
|||||||
// 账户信息
|
// 账户信息
|
||||||
commonServe.getByCompanyId(res.data.companyId),
|
commonServe.getByCompanyId(res.data.companyId),
|
||||||
// 认证信息
|
// 认证信息
|
||||||
serve.getByCompanyIdAuth(res.data.companyId),
|
commonServe.getByCompanyIdAuth(res.data.companyId),
|
||||||
// 财务信息
|
// 财务信息
|
||||||
commonServe.getByCompanyIdFinance(res.data.companyId),
|
commonServe.getByCompanyIdFinance(res.data.companyId),
|
||||||
]).then(([firstRes, secondRes, thirdRes, fourthRes]) => {
|
]).then(([firstRes, secondRes, thirdRes, fourthRes]) => {
|
||||||
@@ -502,12 +492,20 @@ export default {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
toRecharge(id) {
|
// 充值
|
||||||
// 跳转到充值
|
toRecharge(row) {
|
||||||
serve.get(id).then((res) => {
|
serve.get(row.id).then((res) => {
|
||||||
this.oilCompanyAccount = res.data;
|
this.controlWindows.addInfo = {
|
||||||
|
id: res.data.companyId,
|
||||||
|
};
|
||||||
this.controlWindows.recharge = true;
|
this.controlWindows.recharge = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
// 跳转到充值
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
this.multipleSelection = val;
|
||||||
},
|
},
|
||||||
//重置
|
//重置
|
||||||
reset() {
|
reset() {
|
||||||
|
|||||||
Reference in New Issue
Block a user