Commit 2321a4c3 by wangzhihui

```

refactor(api): 统一grounding.js文件代码风格并修复语法错误

- 修复了多个API函数中的分号缺失问题
- 统一了代码缩进格式
- 修正了downloadExcellentCaseAudio函数名拼写错误
- 新增了批量修改库存模式和查询相关门店的API函数

refactor(util): 优化util.js工具函数代码结构

- 重新排列了import语句顺序
- 将function声明改为更简洁的ES6方法简写形式
- 更新了手机号验证正则表达式
- 优化了validateNumber函数实现
- 添加了防抖函数功能
```
1 parent 93c8ea3e
import request from "./request"
const path = "dj.api.smartcarlife."
import request from "./request";
const path = "dj.api.smartcarlife.";
// 获取上架管理 列表数据
export function getGroundingManageList(data) {
data.method = `${path}merchantGoodsInfo.page`
return request(data)
data.method = `${path}merchantGoodsInfo.page`;
return request(data);
}
// 获取上架商品详情
export function getMerchantGoodsInfo(data) {
data.method = `${path}merchantGoodsInfo.getById`
return request(data)
data.method = `${path}merchantGoodsInfo.getById`;
return request(data);
}
// 删除
export function delGroundingById(data) {
data.method = `${path}merchantGoodsInfo.deleteById`
return request(data)
data.method = `${path}merchantGoodsInfo.deleteById`;
return request(data);
}
// 批量审核
export function batchReviewAPI(data) {
data.method = `${path}merchantGoodsInfo.updateBatchWaitAudit`
return request(data, "post")
data.method = `${path}merchantGoodsInfo.updateBatchWaitAudit`;
return request(data, "post");
}
// 上下架
export function updateGoodsStatus(data) {
data.method = `${path}merchantGoodsInfo.updateStatus`
return request(data)
data.method = `${path}merchantGoodsInfo.updateStatus`;
return request(data);
}
// 添加编辑上架信息
export function addOrUpdateAPI(data) {
data.method = `${path}merchantGoodsInfo.insertOrUpdate`
return request(data, "post")
data.method = `${path}merchantGoodsInfo.insertOrUpdate`;
return request(data, "post");
}
// 获取门店开通的场景
export function getSceneTypeListByMerchantId(data) {
data.method = `${path}scenemerchantref.listScene`
return request(data)
data.method = `${path}scenemerchantref.listScene`;
return request(data);
}
// 获取类目商品两级选择框数据
export function getAllGroupByCategory(data) {
data.method = `${path}productManager.getAllGroupByCategory`
return request(data)
data.method = `${path}productManager.getAllGroupByCategory`;
return request(data);
}
// 获取所有上架商品
export function getAllGoodsList(data) {
data.method = `${path}productManager.search`
return request(data, "post")
data.method = `${path}productManager.search`;
return request(data, "post");
}
// 获取所有上架商品 替换新接口
// export function getAllGoodsListPage(data) {
......@@ -60,104 +61,116 @@ export function getAllGoodsList(data) {
// return request(data, "post")
// }
export function getAllGoodsListPage(data) {
data.method = `${path}productManager.search`
return request(data, "post")
data.method = `${path}productManager.search`;
return request(data, "post");
}
// 批量下架
export function batchUpdateStatus(data) {
data.method = `${path}merchantGoodsInfo.updateBatchOffShelf`
return request(data, "post")
data.method = `${path}merchantGoodsInfo.updateBatchOffShelf`;
return request(data, "post");
}
// 批量复制
export function batchUpdateBatchCopy(data) {
// data.method = `${path}merchantGoodsInfo.updateBatchCopy`
data.method = `${path}merchantGoodsInfo.addBatchCopy`
return request(data, "post")
// data.method = `${path}merchantGoodsInfo.updateBatchCopy`
data.method = `${path}merchantGoodsInfo.addBatchCopy`;
return request(data, "post");
}
// 校验上架记录中是否已存在
export function checkGroundingLog(data) {
data.method = `${path}merchantGoodsInfo.existsCount`
return request(data, "post")
data.method = `${path}merchantGoodsInfo.existsCount`;
return request(data, "post");
}
// 分页查询套餐管理记录
export function merchantPackageGoodsInfoPage(data) {
data.method = `${path}merchantPackageGoodsInfo.page`
return request(data, "post")
data.method = `${path}merchantPackageGoodsInfo.page`;
return request(data, "post");
}
// return request(data, 'post')
// }
// 批量设置是否校验最低价
export function batchSetValidMinSellPrice(data) {
data.method = `${path}merchantGoodsInfo.updateBatchValidMinSellPrice`
return request(data, "post")
data.method = `${path}merchantGoodsInfo.updateBatchValidMinSellPrice`;
return request(data, "post");
}
// 批量修改库存模式
export function batchModifyInventoryType(data) {
data.method = `${path}merchantGoodsInfo.update.inventory.type`;
return request(data, "post");
}
// 查询批量勾选的上架商品关联的门店
export function queryRelatedMerchant(data) {
data.method = `${path}merchantGoodsInfo.query.related.merchant`;
return request(data, "post");
}
// 批量导入
export function groundingImport(data) {
data.method = `${path}merchantGoodsInfo.import`
return request(data, "post", ["file"])
data.method = `${path}merchantGoodsInfo.import`;
return request(data, "post", ["file"]);
}
// 采购上架 添加/修改记录
export function purchaseGoodsInfoInsertOrUpdate(data) {
data.method = `${path}purchaseGoodsInfo.insertOrUpdate`
return request(data, "post", ["file"])
data.method = `${path}purchaseGoodsInfo.insertOrUpdate`;
return request(data, "post", ["file"]);
}
// 删除记录
export function purchaseGoodsInfoDeleteById(data) {
data.method = `${path}purchaseGoodsInfo.deleteById`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.deleteById`;
return request(data, "post");
}
// 导出列表(异步)
export function purchaseGoodsInfoExportAsync(data) {
data.method = `${path}purchaseGoodsInfo.export.async`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.export.async`;
return request(data, "post");
}
// 根据ID查询详细信息
export function purchaseGoodsInfoGetById(data) {
data.method = `${path}purchaseGoodsInfo.getById`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.getById`;
return request(data, "post");
}
// 采购上架导入
export function purchaseGoodsInfoImport(data) {
data.method = `${path}purchaseGoodsInfo.import`
return request(data, "post", ["file"])
data.method = `${path}purchaseGoodsInfo.import`;
return request(data, "post", ["file"]);
}
// 分页查询上架管理记录
export function purchaseGoodsInfoPage(data) {
data.method = `${path}purchaseGoodsInfo.page`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.page`;
return request(data, "post");
}
// 采购上架导入模版
export function purchaseGoodsInfoTemplateExport(data) {
data.method = `${path}purchaseGoodsInfo.template.export`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.template.export`;
return request(data, "post");
}
// 批量下架操作
export function purchaseGoodsInfoUpdateBatchOffShelf(data) {
data.method = `${path}purchaseGoodsInfo.updateBatchOffShelf`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.updateBatchOffShelf`;
return request(data, "post");
}
// 批量审核
export function purchaseGoodsInfoUpdateBatchWaitAudit(data) {
data.method = `${path}purchaseGoodsInfo.updateBatchWaitAudit`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.updateBatchWaitAudit`;
return request(data, "post");
}
// 上下架操作
export function purchaseGoodsInfoUpdateStatus(data) {
data.method = `${path}purchaseGoodsInfo.updateStatus`
return request(data, "post")
data.method = `${path}purchaseGoodsInfo.updateStatus`;
return request(data, "post");
}
......@@ -753,7 +753,6 @@ export function listExcellentCase(data = {}) {
return request(data, "post");
}
// 审核驳回优秀案例
export function rejectExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.reject";
......@@ -761,7 +760,7 @@ export function rejectExcellentCase(data = {}) {
}
// 下载优秀案例录音
export function downloadExcellentCaseAudio(data = {}) {
export function downlpoadExcellentCaseAudio(data = {}) {
data.method = "dj.api.supervisor.excellent.case.download";
return request(data, "post");
}
......@@ -771,3 +770,9 @@ export function approveExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.approve";
return request(data, "post");
}
// 查询客户类别列表
export function listExcellentCaseCategories(data = {}) {
data.method = "dj.api.supervisor.excellent.case.categories";
return request(data, "post");
}
<template>
<d2-dialog title="批量复制"
:is-visible.sync="batchCopyVisible"
width="600px"
btn-ok-label="确定"
@confirmDialog="handleBatchCopyConfirm"
@closeDialog="handleBatchCopyClose"
class="relateStore">
<el-form label-width="120px" :rules="rules" :model="selectData" ref="batchCopyForm">
<el-form-item label="业务场景:">
<el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input>
</el-form-item>
<el-form-item label="复制门店:" prop="selectMerchantObj">
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword multiple collapse-tags
placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable>
<el-option v-for="subItem in storeData" :key="subItem.merchantId"
:label="subItem.merchantName" :value="subItem" />
</el-select>
</el-form-item>
</el-form>
<div class="tips">
说明:批量复制至新门店后,系统自动按操作商品,自动更新补充商品对应的上架门店
</div>
</d2-dialog>
<d2-dialog btn-ok-label="确定"
class="relateStore"
:is-visible.sync="batchCopyVisible"
title="批量复制"
width="600px"
@closeDialog="handleBatchCopyClose"
@confirmDialog="handleBatchCopyConfirm">
<el-form ref="batchCopyForm"
label-width="120px"
:model="selectData"
:rules="rules">
<el-form-item label="业务场景:">
<el-input v-model="sceneList[selectedScene]"
disabled
style="width: 370px;">
</el-input>
</el-form-item>
<el-form-item label="复制门店:" prop="selectMerchantObj">
<el-select v-model="selectData.selectMerchantObj"
v-el-select-loadmore="interestsLoadmore"
collapse-tags
filterable
multiple
placeholder="请选择复制门店"
remote
:remote-method="remoteMethod"
reserve-keyword
style="width: 370px;"
value-key="merchantId"
@visible-change="visibleChange">
<el-option v-for="subItem in storeData"
:key="subItem.merchantId"
:label="subItem.merchantName"
:value="subItem" />
</el-select>
</el-form-item>
</el-form>
<div class="tips">
说明:批量复制至新门店后,系统自动按操作商品,自动更新补充商品对应的上架门店
</div>
</d2-dialog>
</template>
<script>
import { getList, getAccountMerchantList } from '@/api/merchant'
import { sceneList } from '@/common/constants.js'
import { getAccountMerchantList, getList } from "@/api/merchant";
import { sceneList } from "@/common/constants.js";
export default {
name: 'RelateStoreDialog',
data() {
return {
storeData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20,
searchMerchantName: '',
sceneList,
selectData: {},
rules: { selectMerchantObj: [{ required: true, message: '请选择复制门店', trigger: 'blur' }] }
}
},
directives: {
'el-select-loadmore': {
bind(el, binding) {
setTimeout(() => {
const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}, 100)
}
}
},
props: {
batchCopyVisible: {
type: Boolean,
default: false
},
selectedScene: {
type: Number
}
},
name: "RelateStoreDialog",
directives: {
"el-select-loadmore": {
bind(el, binding) {
setTimeout(() => {
const SELECTWRAP_DOM = el.querySelector(
".el-select-dropdown .el-select-dropdown__wrap",
);
SELECTWRAP_DOM.addEventListener("scroll", function () {
const condition
= this.scrollHeight - this.scrollTop <= this.clientHeight;
if (condition) {
binding.value();
}
});
}, 100);
},
},
},
props: {
batchCopyVisible: {
type: Boolean,
default: false,
},
selectedScene: {
type: Number,
},
},
data() {
return {
storeData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 20,
searchMerchantName: "",
sceneList,
selectData: {},
rules: { selectMerchantObj: [{ required: true, message: "请选择复制门店", trigger: "blur" }] },
};
},
mounted() {
this.getList()
},
methods: {
getList() {
const storeApi = [1, 2, 3].includes(this.selectedScene) ? getList : getAccountMerchantList // 会员权益/积分商城场景 上架门店是账户中心所有门店
storeApi({
// merchantIdName: ![1, 2, 3].includes(this.selectedScene) ? this.searchMerchantName : '',
merchantName: this.searchMerchantName,
currentPage: this.currentPage,
pageSize: this.pageSize,
scene: this.selectedScene
}).then(res => {
res?.list?.forEach(val => { // 账户中心门店返回商户号字段是merchantNo
if (val.merchantNo) val.merchantId = val.merchantNo
})
this.storeData = this.storeData.concat(res.list)
})
},
// 获取上架门店
remoteMethod(query) {
this.searchMerchantName = query
this.currentPage = 1
this.storeData = []
this.getList() // 请求接口
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
if (this.searchMerchantName) {
this.searchMerchantName = ''
this.currentPage = 1
this.storeData = []
this.getList()
}
}
},
// 获取更多上架门店
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages
return
}
this.getList()
}, 10)
},
handleBatchCopyConfirm() {
this.$refs.batchCopyForm.validate((valid) => {
if (valid) {
this.$emit('handleBatchCopyConfirm', this.selectData?.selectMerchantObj)
}
})
},
handleBatchCopyClose() {
this.$emit('handleBatchCopyClose')
}
}
}
mounted() {
this.getList();
},
methods: {
getList() {
const storeApi = [1, 2, 3].includes(this.selectedScene) ? getList : getAccountMerchantList; // 会员权益/积分商城场景 上架门店是账户中心所有门店
storeApi({
// merchantIdName: ![1, 2, 3].includes(this.selectedScene) ? this.searchMerchantName : '',
merchantName: this.searchMerchantName,
currentPage: this.currentPage,
pageSize: this.pageSize,
scene: this.selectedScene,
}).then((res) => {
res?.list?.forEach((val) => { // 账户中心门店返回商户号字段是merchantNo
if (val.merchantNo)
val.merchantId = val.merchantNo;
});
this.storeData = this.storeData.concat(res.list);
});
},
// 获取上架门店
remoteMethod(query) {
this.searchMerchantName = query;
this.currentPage = 1;
this.storeData = [];
this.getList(); // 请求接口
},
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
if (this.searchMerchantName) {
this.searchMerchantName = "";
this.currentPage = 1;
this.storeData = [];
this.getList();
}
}
},
// 获取更多上架门店
interestsLoadmore() {
setTimeout(() => {
this.currentPage = this.currentPage + 1;
if (this.allPages < this.currentPage) {
this.currentPage = this.allPages;
return;
}
this.getList();
}, 10);
},
handleBatchCopyConfirm() {
this.$refs.batchCopyForm.validate((valid) => {
if (valid) {
this.$emit("handleBatchCopyConfirm", this.selectData?.selectMerchantObj);
}
});
},
handleBatchCopyClose() {
this.$emit("handleBatchCopyClose");
},
},
};
</script>
<style lang="scss">
.tips{
font-size: 14px;
color: #999;
.tips {
font-size: 14px;
color: #999;
}
</style>
<template>
<d2-dialog btn-ok-label="确认"
class="batch-modify-inventory-dialog"
:is-visible.sync="dialogVisible"
title="批量修改库存模式"
width="600px"
@closeDialog="handleClose"
@confirmDialog="handleConfirm">
<div class="tip-text">
已选择{{ selectedGoodsCount }}个商品,涉及{{ relatedStoreCount }}家门店
</div>
<div class="tip-sub-text">
统一设置所有商品的门店管控模式
</div>
<el-form ref="formRef"
class="form-container"
label-width="120px"
:model="form"
:rules="rules">
<el-form-item label="管控模式:" prop="inventoryType">
<el-radio-group v-model="form.inventoryType">
<el-radio :label="2">
实物管控
</el-radio>
<el-radio :label="1">
虚拟管控
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="应用范围:" prop="bindAllMerchant">
<el-radio-group v-model="form.bindAllMerchant" @change="handleScopeChange">
<el-radio :label="true">
所有门店
</el-radio>
<el-radio :label="false">
指定门店
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="!form.bindAllMerchant"
label="门店选择框:"
prop="merchantIdList">
<el-select v-model="form.merchantIdList"
collapse-tags
filterable
multiple
placeholder="请选择门店"
style="width: 100%">
<el-option v-for="merchant in merchantList"
:key="merchant.merchantId"
:label="merchant.merchantName"
:value="merchant.merchantId">
</el-option>
</el-select>
</el-form-item>
</el-form>
</d2-dialog>
</template>
<script>
import { batchModifyInventoryType, queryRelatedMerchant } from "@/api/grounding";
export default {
name: "BatchModifyInventoryDialog",
props: {
visible: {
type: Boolean,
default: false,
},
selectedData: {
type: Array,
default: () => [],
},
},
data() {
return {
dialogVisible: false,
form: {
inventoryType: 2, // 1-虚拟 2-实物
bindAllMerchant: true,
merchantIdList: [],
},
merchantList: [],
rules: {
inventoryType: [
{ required: true, message: "请选择管控模式", trigger: "change" },
],
bindAllMerchant: [
{ required: true, message: "请选择应用范围", trigger: "change" },
],
merchantIdList: [
{ required: true, message: "请选择指定门店", trigger: "change" },
],
},
};
},
computed: {
selectedGoodsCount() {
return this.selectedData.length;
},
relatedStoreCount() {
return this.merchantList.length;
},
},
watch: {
visible(val) {
this.dialogVisible = val;
if (val) {
// Reset form when dialog opens
this.form = {
inventoryType: 2,
bindAllMerchant: true,
merchantIdList: [],
};
if (this.$refs.formRef) {
this.$refs.formRef.clearValidate();
}
this.getInvolvedMerchants();
}
},
dialogVisible(val) {
this.$emit("update:visible", val);
},
},
mounted() {
},
methods: {
handleScopeChange(val) {
if (val) {
this.form.merchantIdList = [];
this.$refs.formRef.clearValidate(["merchantIdList"]);
}
},
getInvolvedMerchants() {
const idList = this.selectedData.map(item => item.id);
if (idList.length === 0) {
this.merchantList = [];
return;
}
queryRelatedMerchant({ idList }).then((res) => {
console.log(res, "99");
this.merchantList = res.merchantList ? res.merchantList : [];
}).catch(() => {
this.merchantList = [];
});
},
handleClose() {
this.dialogVisible = false;
this.$emit("close");
},
handleConfirm() {
this.$refs.formRef.validate((valid) => {
if (valid) {
const idList = this.selectedData.map(item => item.id);
const params = {
idList,
inventoryType: this.form.inventoryType,
bindAllMerchant: this.form.bindAllMerchant,
};
if (!this.form.bindAllMerchant) {
params.merchantIdList = this.form.merchantIdList;
}
batchModifyInventoryType(params).then((res) => {
if (res) {
this.$message.success("批量修改库存模式成功");
this.dialogVisible = false;
this.$emit("confirm");
}
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.batch-modify-inventory-dialog {
.tip-text {
font-size: 14px;
color: #333;
margin-bottom: 8px;
padding-left: 10px;
border-left: 3px solid #1890ff;
}
.tip-sub-text {
font-size: 14px;
color: #666;
margin-bottom: 20px;
margin-left: 13px;
}
.form-container {
margin-top: 20px;
padding: 0 20px;
}
}
</style>
This diff could not be displayed because it is too large.
<!--
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2024-06-12 15:21:09
* @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2026-03-19 11:44:04
* @FilePath: \dj-car-life-system\src\views\goods\grounding\components\relateStoreTable.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="store-table">
<el-table
:data="merchantGoodsRefList"
style="width: 100%"
:header-row-style="headerRowStyle"
header-cell-class-name="header-cell-class-name"
border>
<el-table-column
align="center"
width="60px"
label="序号"
type="index" />
<el-table-column
prop="merchantName"
label="门店名称"
align="center" />
<el-table-column
prop="merchantId"
label="门店商户号"
align="center" />
<el-table-column
label="操作"
align="center"
v-if="!isDetail"
width="90">
<template slot-scope="scope">
<el-button
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="store-table">
<el-table border
:data="merchantGoodsRefList"
header-cell-class-name="header-cell-class-name"
:header-row-style="headerRowStyle"
style="width: 100%">
<el-table-column align="center"
label="序号"
type="index"
width="60px" />
<el-table-column align="center"
label="门店名称"
prop="merchantName" />
<el-table-column align="center"
label="门店商户号"
prop="merchantId" />
<el-table-column align="center"
label="库存管控">
<template #default="scope">
<span v-if="isDetail">{{ scope.row.inventoryType == 1 ? '虚拟管控' : '实物管控' }}</span>
<el-select v-else
v-model="scope.row.inventoryType"
placeholder="请选择">
<el-option label="虚拟管控" :value="1"></el-option>
<el-option label="实物管控" :value="2"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column v-if="!isDetail"
align="center"
label="操作"
width="90">
<template #default="scope">
<el-button type="text"
@click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: 'RelateProTable',
props: {
merchantGoodsRefList: {
type: Array,
default: () => {}
},
isDetail: {
type: Boolean,
default: false
}
},
data() {
return {
}
},
methods: {
handleDelete(item) {
this.$emit('handleDelete', item)
},
headerRowStyle() {
return {
height: '40px',
background: '#F2F4F7'
}
}
}
}
name: "RelateProTable",
props: {
merchantGoodsRefList: {
type: Array,
default: () => {},
},
isDetail: {
type: Boolean,
default: false,
},
},
data() {
return {
};
},
methods: {
handleDelete(item) {
this.$emit("handleDelete", item);
},
headerRowStyle() {
return {
height: "40px",
background: "#F2F4F7",
};
},
},
};
</script>
<style lang="scss" scoped>
.store-table{
margin-top: 15px;
.store-table {
margin-top: 15px;
}
::v-deep .header-cell-class-name{
height: 30px;
background: #F2F4F7;
::v-deep .header-cell-class-name {
height: 30px;
background: #f2f4f7;
}
::v-deep .el-table th{
padding: 0;
::v-deep .el-table th {
padding: 0;
}
::v-deep .el-table__body-wrapper tr td{
padding: 8px 0 !important;
::v-deep .el-table__body-wrapper tr td {
padding: 8px 0 !important;
}
</style>
......@@ -78,7 +78,7 @@
</template>
<script>
import { approveExcellentCase, downloadExcellentCaseAudio, listExcellentCase, rejectExcellentCase } from "@/api/resident";
import { approveExcellentCase, downloadExcellentCaseAudio, listExcellentCase, listExcellentCaseCategories, rejectExcellentCase } from "@/api/resident";
import { reviewCaseStatusOpt, reviewCaseStatusOptMap } from "@/common/constants.js";
import { deepClone, downLoadFile, Util } from "@/common/util";
......@@ -111,13 +111,14 @@ export default {
tableColumns: [
{
label: "驻店销售",
prop: "staffName",
prop: "salesName",
width: "200px",
},
{
label: "接待日期",
prop: "receptionDate",
prop: "receptionTime",
width: "100px",
},
{
label: "接待门店",
......@@ -133,15 +134,15 @@ export default {
},
{
label: "攻防评分",
prop: "defencePoint",
prop: "gfScroe",
formatter(row) {
return row.defencePoint != null ? row.defencePoint : "-";
return row.gfScroe != null ? row.gfScroe : "-";
},
},
{
label: "客户类型",
prop: "customerCategory",
prop: "customerType",
width: 160,
},
{
......@@ -190,13 +191,13 @@ export default {
},
{
label: "客户类型",
name: "customerCategory",
name: "customerType",
type: "select",
isClear: true,
optionList: [],
optionId: "itemValue",
optionLabel: "itemName",
optionsName: "bussinessTypeOpt",
optionsName: "customerCategoryOpt",
},
{
label: "提交人",
......@@ -208,7 +209,7 @@ export default {
baseData: {
reviewCaseStatusOpt: deepClone(reviewCaseStatusOpt),
reviewCaseStatusOptMap: deepClone(reviewCaseStatusOptMap),
clientTypeOpt: deepClone([]),
customerCategoryOpt: [],
},
};
},
......@@ -306,19 +307,12 @@ export default {
},
async fetchOnboardingPlans() {
try {
const [recruitmentTypeOpt, bussinessTypeOpt] = await Promise.all([
getDictList({
businessCode: "recruitment",
typeCode: "recruitment_type",
}),
getDictList({
businessCode: "recruitment",
typeCode: "business_type",
}),
const [customerCategoryOpt] = await Promise.all([
listExcellentCaseCategories(),
]);
// 处理返回的数据
this.baseData.recruitmentTypeOpt = recruitmentTypeOpt.list;
this.baseData.bussinessTypeOpt = bussinessTypeOpt.list;
this.baseData.customerCategoryOpt = customerCategoryOpt;
this.getOptionsList(this, "showFormData", true);
} catch (error) {
console.error(error);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!