增加审核原因,线索小计,佣金显示,配置角色id

This commit is contained in:
lcc
2025-06-28 12:43:59 +08:00
parent 33c4a29bd6
commit f496d98f34
6 changed files with 117 additions and 29 deletions
@@ -34,6 +34,9 @@
<el-form-item label="来源:" prop="cfId" v-if="form.level < 2">
<el-input clearable v-model="form.cfId" />
</el-form-item>
<el-form-item label="角色id:" prop="roleId" v-if="form.level > 1">
<el-input clearable v-model="form.roleId" />
</el-form-item>
<el-form-item label="备注:" prop="meta">
<el-input
:rows="4"
@@ -80,7 +83,8 @@
logo: [],
remark: '',
cfId: '',
level: 0
level: 0,
roleId: ''
};
return {
defaultForm,
@@ -25,6 +25,9 @@
<el-form-item label="提交时间:" prop="title">
{{ form.cTime }}
</el-form-item>
<el-form-item label="未通过原因:" v-if="form.ifcheck === 2">
{{ form.reason }}
</el-form-item>
<el-form-item label="发票:">
<el-image
style="width: 200px; height: 200px"
@@ -64,7 +67,9 @@
statusCn: '',
billImg: '',
businessImg: '',
cTime: ''
cTime: '',
reason: '',
ifcheck: 0
};
return {
editVersion: false,
+49 -22
View File
@@ -46,17 +46,13 @@
查看
</el-link>
<template v-if="0 === row.ifcheck">
<el-link
type="primary"
:underline="false"
@click="check(row, true)"
>
<el-link type="primary" :underline="false" @click="checkPass(row)">
审核通过
</el-link>
<el-link
type="primary"
:underline="false"
@click="check(row, false)"
@click="showCheckFail(row)"
>
不通过
</el-link>
@@ -66,6 +62,26 @@
</el-card>
<!-- 编辑弹窗 -->
<edit :data="current" :visible.sync="showEdit" @done="reload" />
<!-- 审核不通过 -->
<el-dialog title="审核不通过原因" :visible.sync="reasonVisible" width="30%">
<el-form ref="form" label-width="90px">
<el-form-item label="不通过原因:">
<el-input
clearable
v-model="reason"
placeholder="请输入不通过原因"
:rows="4"
type="textarea"
/>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="reasonVisible = false">取消</el-button>
<el-button type="primary" @click="saveCheckFail">确定</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
@@ -194,7 +210,9 @@
}
}
]
}
},
reasonVisible: false,
reason: ''
};
},
created() {},
@@ -226,11 +244,6 @@
goDetail(row) {
this.current = row;
this.showEdit = true;
// const path = '/receiver/customer/detail';
// this.$router.push({
// path,
// query: row ? { id: row.id, title: row.title } : undefined
// });
},
/* 表格数据源 */
datasource({ page, limit, where, order }) {
@@ -244,16 +257,8 @@
reset() {
this.where = {};
},
check(row, status = false) {
console.log(row);
console.log(status);
let msg;
if (status) {
msg = '确定审核通过【' + row.sid + '】订单吗?';
} else {
msg = '确定审核不通过【' + row.sid + '】订单吗?';
}
this.$confirm(msg, '提示', {
checkPass(row) {
this.$confirm('确定审核通过【' + row.sid + '】订单吗?', '提示', {
type: 'warning'
})
.then(() => {
@@ -270,6 +275,28 @@
});
})
.catch(() => {});
},
showCheckFail(row) {
this.reasonVisible = true;
this.current = row;
},
saveCheckFail() {
const loading = this.$loading({ lock: true });
checkSubsidy({
id: this.current.id,
status: status,
reason: this.reason
})
.then((msg) => {
this.reasonVisible = false;
loading.close();
this.$message.success(msg);
this.reload();
})
.catch((e) => {
loading.close();
this.$message.error(e.message);
});
}
}
};
+8
View File
@@ -33,3 +33,11 @@ export async function pageCluesOptLog(params) {
}
return Promise.reject(new Error(res.data.message));
}
export async function addCluesOptLog(data) {
const res = await request.post('/receiver/clues/addLog', data);
if (res.data.code === 0) {
return res.data.message;
}
return Promise.reject(new Error(res.data.message));
}
+45 -3
View File
@@ -71,7 +71,10 @@
cache-key="receiverCustomerOptTables"
>
<!-- 表头工具栏 -->
<template v-slot:toolbar>跟进记录</template>
<template v-slot:toolbar>
<el-link>跟进记录</el-link>
<el-link type="primary" @click="showAddLog">新增小记</el-link>
</template>
<!-- 操作列 -->
<template v-slot:content="{ row }">
<template v-if="row.rec_url">
@@ -86,12 +89,31 @@
</template>
</ele-pro-table>
</el-card>
<el-dialog title="新增小记" :visible.sync="addLogVisible" width="30%">
<el-form ref="form" label-width="50px">
<el-form-item label="内容:">
<el-input
clearable
v-model="addForm.content"
placeholder="请输入内容"
:rows="4"
type="textarea"
/>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="addLogVisible = false">取消</el-button>
<el-button type="primary" @click="addLog">确定</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
import { setPageTabTitle } from '@/utils/page-tab-util';
import { getClues, pageCluesOptLog } from '@/api/receiver/clues';
import { getClues, pageCluesOptLog,addCluesOptLog } from '@/api/receiver/clues';
import CarModelSelector from '@/components/CarSelector/index.vue';
import RegionsSelect from '@/components/RegionsSelect/index.vue';
const ROUTE_PATH = '/receiver/clues/detail';
@@ -111,6 +133,10 @@
wxgr: 0,
provinceCity: []
},
addForm: {
id: '',
content: ''
},
title: '',
// 表格列配置
columns: [
@@ -144,7 +170,8 @@
resizable: false,
showOverflowTooltip: true
}
]
],
addLogVisible: false
};
},
created() {},
@@ -176,6 +203,20 @@
},
handleCarChange(carInfo) {
this.form.selectedCar = carInfo;
},
showAddLog() {
this.addLogVisible = true;
},
addLog() {
addCluesOptLog(this.addForm)
.then((msg) => {
this.addLogVisible = false;
this.$message.success(msg);
this.reload();
})
.catch((e) => {
this.$message.error(e.message);
});
}
},
watch: {
@@ -189,6 +230,7 @@
? this.$route.query.title
: '线索详情';
this.form.id = this.$route.query.id;
this.addForm.id = this.$route.query.id;
setPageTabTitle(this.title);
this.query();
this.reload();
+4 -2
View File
@@ -1,7 +1,7 @@
<template>
<div class="ele-body">
<el-card shadow="never">
<el-row class="ele-text-center">
<el-row class="ele-text-center" v-if="showTeam">
<el-radio-group v-model="tabPosition" @change="handleOptionChange">
<el-radio-button label="1">我的收入</el-radio-button>
<el-radio-button label="2">团队收入</el-radio-button>
@@ -74,7 +74,8 @@
}
],
tabPosition: '1',
money: 0
money: 0,
showTeam: 0
};
},
methods: {
@@ -83,6 +84,7 @@
where.type = this.tabPosition;
const result = await pageCmmssn({ ...where, ...order, page, limit });
this.money = result.money;
this.showTeam = result.showTeam;
return result;
},
/* 刷新表格 */