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