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" import request from "./request";
const path = "dj.api.smartcarlife."
const path = "dj.api.smartcarlife.";
// 获取上架管理 列表数据 // 获取上架管理 列表数据
export function getGroundingManageList(data) { export function getGroundingManageList(data) {
data.method = `${path}merchantGoodsInfo.page` data.method = `${path}merchantGoodsInfo.page`;
return request(data) return request(data);
} }
// 获取上架商品详情 // 获取上架商品详情
export function getMerchantGoodsInfo(data) { export function getMerchantGoodsInfo(data) {
data.method = `${path}merchantGoodsInfo.getById` data.method = `${path}merchantGoodsInfo.getById`;
return request(data) return request(data);
} }
// 删除 // 删除
export function delGroundingById(data) { export function delGroundingById(data) {
data.method = `${path}merchantGoodsInfo.deleteById` data.method = `${path}merchantGoodsInfo.deleteById`;
return request(data) return request(data);
} }
// 批量审核 // 批量审核
export function batchReviewAPI(data) { export function batchReviewAPI(data) {
data.method = `${path}merchantGoodsInfo.updateBatchWaitAudit` data.method = `${path}merchantGoodsInfo.updateBatchWaitAudit`;
return request(data, "post") return request(data, "post");
} }
// 上下架 // 上下架
export function updateGoodsStatus(data) { export function updateGoodsStatus(data) {
data.method = `${path}merchantGoodsInfo.updateStatus` data.method = `${path}merchantGoodsInfo.updateStatus`;
return request(data) return request(data);
} }
// 添加编辑上架信息 // 添加编辑上架信息
export function addOrUpdateAPI(data) { export function addOrUpdateAPI(data) {
data.method = `${path}merchantGoodsInfo.insertOrUpdate` data.method = `${path}merchantGoodsInfo.insertOrUpdate`;
return request(data, "post") return request(data, "post");
} }
// 获取门店开通的场景 // 获取门店开通的场景
export function getSceneTypeListByMerchantId(data) { export function getSceneTypeListByMerchantId(data) {
data.method = `${path}scenemerchantref.listScene` data.method = `${path}scenemerchantref.listScene`;
return request(data) return request(data);
} }
// 获取类目商品两级选择框数据 // 获取类目商品两级选择框数据
export function getAllGroupByCategory(data) { export function getAllGroupByCategory(data) {
data.method = `${path}productManager.getAllGroupByCategory` data.method = `${path}productManager.getAllGroupByCategory`;
return request(data) return request(data);
} }
// 获取所有上架商品 // 获取所有上架商品
export function getAllGoodsList(data) { export function getAllGoodsList(data) {
data.method = `${path}productManager.search` data.method = `${path}productManager.search`;
return request(data, "post") return request(data, "post");
} }
// 获取所有上架商品 替换新接口 // 获取所有上架商品 替换新接口
// export function getAllGoodsListPage(data) { // export function getAllGoodsListPage(data) {
...@@ -60,104 +61,116 @@ export function getAllGoodsList(data) { ...@@ -60,104 +61,116 @@ export function getAllGoodsList(data) {
// return request(data, "post") // return request(data, "post")
// } // }
export function getAllGoodsListPage(data) { export function getAllGoodsListPage(data) {
data.method = `${path}productManager.search` data.method = `${path}productManager.search`;
return request(data, "post") return request(data, "post");
} }
// 批量下架 // 批量下架
export function batchUpdateStatus(data) { export function batchUpdateStatus(data) {
data.method = `${path}merchantGoodsInfo.updateBatchOffShelf` data.method = `${path}merchantGoodsInfo.updateBatchOffShelf`;
return request(data, "post") return request(data, "post");
} }
// 批量复制 // 批量复制
export function batchUpdateBatchCopy(data) { export function batchUpdateBatchCopy(data) {
// data.method = `${path}merchantGoodsInfo.updateBatchCopy` // data.method = `${path}merchantGoodsInfo.updateBatchCopy`
data.method = `${path}merchantGoodsInfo.addBatchCopy` data.method = `${path}merchantGoodsInfo.addBatchCopy`;
return request(data, "post") return request(data, "post");
} }
// 校验上架记录中是否已存在 // 校验上架记录中是否已存在
export function checkGroundingLog(data) { export function checkGroundingLog(data) {
data.method = `${path}merchantGoodsInfo.existsCount` data.method = `${path}merchantGoodsInfo.existsCount`;
return request(data, "post") return request(data, "post");
} }
// 分页查询套餐管理记录 // 分页查询套餐管理记录
export function merchantPackageGoodsInfoPage(data) { export function merchantPackageGoodsInfoPage(data) {
data.method = `${path}merchantPackageGoodsInfo.page` data.method = `${path}merchantPackageGoodsInfo.page`;
return request(data, "post") return request(data, "post");
} }
// return request(data, 'post') // return request(data, 'post')
// } // }
// 批量设置是否校验最低价 // 批量设置是否校验最低价
export function batchSetValidMinSellPrice(data) { export function batchSetValidMinSellPrice(data) {
data.method = `${path}merchantGoodsInfo.updateBatchValidMinSellPrice` data.method = `${path}merchantGoodsInfo.updateBatchValidMinSellPrice`;
return request(data, "post") 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) { export function groundingImport(data) {
data.method = `${path}merchantGoodsInfo.import` data.method = `${path}merchantGoodsInfo.import`;
return request(data, "post", ["file"]) return request(data, "post", ["file"]);
} }
// 采购上架 添加/修改记录 // 采购上架 添加/修改记录
export function purchaseGoodsInfoInsertOrUpdate(data) { export function purchaseGoodsInfoInsertOrUpdate(data) {
data.method = `${path}purchaseGoodsInfo.insertOrUpdate` data.method = `${path}purchaseGoodsInfo.insertOrUpdate`;
return request(data, "post", ["file"]) return request(data, "post", ["file"]);
} }
// 删除记录 // 删除记录
export function purchaseGoodsInfoDeleteById(data) { export function purchaseGoodsInfoDeleteById(data) {
data.method = `${path}purchaseGoodsInfo.deleteById` data.method = `${path}purchaseGoodsInfo.deleteById`;
return request(data, "post") return request(data, "post");
} }
// 导出列表(异步) // 导出列表(异步)
export function purchaseGoodsInfoExportAsync(data) { export function purchaseGoodsInfoExportAsync(data) {
data.method = `${path}purchaseGoodsInfo.export.async` data.method = `${path}purchaseGoodsInfo.export.async`;
return request(data, "post") return request(data, "post");
} }
// 根据ID查询详细信息 // 根据ID查询详细信息
export function purchaseGoodsInfoGetById(data) { export function purchaseGoodsInfoGetById(data) {
data.method = `${path}purchaseGoodsInfo.getById` data.method = `${path}purchaseGoodsInfo.getById`;
return request(data, "post") return request(data, "post");
} }
// 采购上架导入 // 采购上架导入
export function purchaseGoodsInfoImport(data) { export function purchaseGoodsInfoImport(data) {
data.method = `${path}purchaseGoodsInfo.import` data.method = `${path}purchaseGoodsInfo.import`;
return request(data, "post", ["file"]) return request(data, "post", ["file"]);
} }
// 分页查询上架管理记录 // 分页查询上架管理记录
export function purchaseGoodsInfoPage(data) { export function purchaseGoodsInfoPage(data) {
data.method = `${path}purchaseGoodsInfo.page` data.method = `${path}purchaseGoodsInfo.page`;
return request(data, "post") return request(data, "post");
} }
// 采购上架导入模版 // 采购上架导入模版
export function purchaseGoodsInfoTemplateExport(data) { export function purchaseGoodsInfoTemplateExport(data) {
data.method = `${path}purchaseGoodsInfo.template.export` data.method = `${path}purchaseGoodsInfo.template.export`;
return request(data, "post") return request(data, "post");
} }
// 批量下架操作 // 批量下架操作
export function purchaseGoodsInfoUpdateBatchOffShelf(data) { export function purchaseGoodsInfoUpdateBatchOffShelf(data) {
data.method = `${path}purchaseGoodsInfo.updateBatchOffShelf` data.method = `${path}purchaseGoodsInfo.updateBatchOffShelf`;
return request(data, "post") return request(data, "post");
} }
// 批量审核 // 批量审核
export function purchaseGoodsInfoUpdateBatchWaitAudit(data) { export function purchaseGoodsInfoUpdateBatchWaitAudit(data) {
data.method = `${path}purchaseGoodsInfo.updateBatchWaitAudit` data.method = `${path}purchaseGoodsInfo.updateBatchWaitAudit`;
return request(data, "post") return request(data, "post");
} }
// 上下架操作 // 上下架操作
export function purchaseGoodsInfoUpdateStatus(data) { export function purchaseGoodsInfoUpdateStatus(data) {
data.method = `${path}purchaseGoodsInfo.updateStatus` data.method = `${path}purchaseGoodsInfo.updateStatus`;
return request(data, "post") return request(data, "post");
} }
...@@ -753,7 +753,6 @@ export function listExcellentCase(data = {}) { ...@@ -753,7 +753,6 @@ export function listExcellentCase(data = {}) {
return request(data, "post"); return request(data, "post");
} }
// 审核驳回优秀案例 // 审核驳回优秀案例
export function rejectExcellentCase(data = {}) { export function rejectExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.reject"; data.method = "dj.api.supervisor.excellent.case.reject";
...@@ -761,7 +760,7 @@ export function rejectExcellentCase(data = {}) { ...@@ -761,7 +760,7 @@ export function rejectExcellentCase(data = {}) {
} }
// 下载优秀案例录音 // 下载优秀案例录音
export function downloadExcellentCaseAudio(data = {}) { export function downlpoadExcellentCaseAudio(data = {}) {
data.method = "dj.api.supervisor.excellent.case.download"; data.method = "dj.api.supervisor.excellent.case.download";
return request(data, "post"); return request(data, "post");
} }
...@@ -771,3 +770,9 @@ export function approveExcellentCase(data = {}) { ...@@ -771,3 +770,9 @@ export function approveExcellentCase(data = {}) {
data.method = "dj.api.supervisor.excellent.case.approve"; data.method = "dj.api.supervisor.excellent.case.approve";
return request(data, "post"); return request(data, "post");
} }
// 查询客户类别列表
export function listExcellentCaseCategories(data = {}) {
data.method = "dj.api.supervisor.excellent.case.categories";
return request(data, "post");
}
<template> <template>
<d2-dialog title="批量复制" <d2-dialog btn-ok-label="确定"
:is-visible.sync="batchCopyVisible" class="relateStore"
width="600px" :is-visible.sync="batchCopyVisible"
btn-ok-label="确定" title="批量复制"
@confirmDialog="handleBatchCopyConfirm" width="600px"
@closeDialog="handleBatchCopyClose" @closeDialog="handleBatchCopyClose"
class="relateStore"> @confirmDialog="handleBatchCopyConfirm">
<el-form label-width="120px" :rules="rules" :model="selectData" ref="batchCopyForm"> <el-form ref="batchCopyForm"
<el-form-item label="业务场景:"> label-width="120px"
<el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input> :model="selectData"
</el-form-item> :rules="rules">
<el-form-item label="复制门店:" prop="selectMerchantObj"> <el-form-item label="业务场景:">
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword multiple collapse-tags <el-input v-model="sceneList[selectedScene]"
placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod" disabled
v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable> style="width: 370px;">
<el-option v-for="subItem in storeData" :key="subItem.merchantId" </el-input>
:label="subItem.merchantName" :value="subItem" /> </el-form-item>
</el-select> <el-form-item label="复制门店:" prop="selectMerchantObj">
</el-form-item> <el-select v-model="selectData.selectMerchantObj"
</el-form> v-el-select-loadmore="interestsLoadmore"
<div class="tips"> collapse-tags
说明:批量复制至新门店后,系统自动按操作商品,自动更新补充商品对应的上架门店 filterable
</div> multiple
</d2-dialog> 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> </template>
<script> <script>
import { getList, getAccountMerchantList } from '@/api/merchant' import { getAccountMerchantList, getList } from "@/api/merchant";
import { sceneList } from '@/common/constants.js' import { sceneList } from "@/common/constants.js";
export default { export default {
name: 'RelateStoreDialog', name: "RelateStoreDialog",
data() { directives: {
return { "el-select-loadmore": {
storeData: [], bind(el, binding) {
// 分页 setTimeout(() => {
total: 0, const SELECTWRAP_DOM = el.querySelector(
currentPage: 1, ".el-select-dropdown .el-select-dropdown__wrap",
pageSize: 20, );
searchMerchantName: '', SELECTWRAP_DOM.addEventListener("scroll", function () {
sceneList, const condition
selectData: {}, = this.scrollHeight - this.scrollTop <= this.clientHeight;
rules: { selectMerchantObj: [{ required: true, message: '请选择复制门店', trigger: 'blur' }] } if (condition) {
} binding.value();
}, }
directives: { });
'el-select-loadmore': { }, 100);
bind(el, binding) { },
setTimeout(() => { },
const SELECTWRAP_DOM = el.querySelector( },
'.el-select-dropdown .el-select-dropdown__wrap' props: {
) batchCopyVisible: {
SELECTWRAP_DOM.addEventListener('scroll', function () { type: Boolean,
const condition = default: false,
this.scrollHeight - this.scrollTop <= this.clientHeight },
if (condition) { selectedScene: {
binding.value() type: Number,
} },
}) },
}, 100) data() {
} return {
} storeData: [],
}, // 分页
props: { total: 0,
batchCopyVisible: { currentPage: 1,
type: Boolean, pageSize: 20,
default: false searchMerchantName: "",
}, sceneList,
selectedScene: { selectData: {},
type: Number rules: { selectMerchantObj: [{ required: true, message: "请选择复制门店", trigger: "blur" }] },
} };
}, },
mounted() { mounted() {
this.getList() 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')
}
}
}
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> </script>
<style lang="scss"> <style lang="scss">
.tips{ .tips {
font-size: 14px; font-size: 14px;
color: #999; color: #999;
} }
</style> </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> <template>
<div class="store-table"> <div class="store-table">
<el-table <el-table border
:data="merchantGoodsRefList" :data="merchantGoodsRefList"
style="width: 100%" header-cell-class-name="header-cell-class-name"
:header-row-style="headerRowStyle" :header-row-style="headerRowStyle"
header-cell-class-name="header-cell-class-name" style="width: 100%">
border> <el-table-column align="center"
<el-table-column label="序号"
align="center" type="index"
width="60px" width="60px" />
label="序号" <el-table-column align="center"
type="index" /> label="门店名称"
<el-table-column prop="merchantName" />
prop="merchantName" <el-table-column align="center"
label="门店名称" label="门店商户号"
align="center" /> prop="merchantId" />
<el-table-column <el-table-column align="center"
prop="merchantId" label="库存管控">
label="门店商户号" <template #default="scope">
align="center" /> <span v-if="isDetail">{{ scope.row.inventoryType == 1 ? '虚拟管控' : '实物管控' }}</span>
<el-table-column <el-select v-else
label="操作" v-model="scope.row.inventoryType"
align="center" placeholder="请选择">
v-if="!isDetail" <el-option label="虚拟管控" :value="1"></el-option>
width="90"> <el-option label="实物管控" :value="2"></el-option>
<template slot-scope="scope"> </el-select>
<el-button </template>
type="text" </el-table-column>
@click="handleDelete(scope.row)">删除</el-button> <el-table-column v-if="!isDetail"
</template> align="center"
</el-table-column> label="操作"
</el-table> width="90">
</div> <template #default="scope">
<el-button type="text"
@click="handleDelete(scope.row)">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'RelateProTable', name: "RelateProTable",
props: { props: {
merchantGoodsRefList: { merchantGoodsRefList: {
type: Array, type: Array,
default: () => {} default: () => {},
}, },
isDetail: { isDetail: {
type: Boolean, type: Boolean,
default: false default: false,
} },
}, },
data() { data() {
return { return {
} };
}, },
methods: { methods: {
handleDelete(item) { handleDelete(item) {
this.$emit('handleDelete', item) this.$emit("handleDelete", item);
}, },
headerRowStyle() { headerRowStyle() {
return { return {
height: '40px', height: "40px",
background: '#F2F4F7' background: "#F2F4F7",
} };
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.store-table{ .store-table {
margin-top: 15px; margin-top: 15px;
} }
::v-deep .header-cell-class-name{ ::v-deep .header-cell-class-name {
height: 30px; height: 30px;
background: #F2F4F7; background: #f2f4f7;
} }
::v-deep .el-table th{ ::v-deep .el-table th {
padding: 0; padding: 0;
} }
::v-deep .el-table__body-wrapper tr td{ ::v-deep .el-table__body-wrapper tr td {
padding: 8px 0 !important; padding: 8px 0 !important;
} }
</style> </style>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</template> </template>
<script> <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 { reviewCaseStatusOpt, reviewCaseStatusOptMap } from "@/common/constants.js";
import { deepClone, downLoadFile, Util } from "@/common/util"; import { deepClone, downLoadFile, Util } from "@/common/util";
...@@ -111,13 +111,14 @@ export default { ...@@ -111,13 +111,14 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "驻店销售", label: "驻店销售",
prop: "staffName", prop: "salesName",
width: "200px", width: "200px",
}, },
{ {
label: "接待日期", label: "接待日期",
prop: "receptionDate", prop: "receptionTime",
width: "100px", width: "100px",
}, },
{ {
label: "接待门店", label: "接待门店",
...@@ -133,15 +134,15 @@ export default { ...@@ -133,15 +134,15 @@ export default {
}, },
{ {
label: "攻防评分", label: "攻防评分",
prop: "defencePoint", prop: "gfScroe",
formatter(row) { formatter(row) {
return row.defencePoint != null ? row.defencePoint : "-"; return row.gfScroe != null ? row.gfScroe : "-";
}, },
}, },
{ {
label: "客户类型", label: "客户类型",
prop: "customerCategory", prop: "customerType",
width: 160, width: 160,
}, },
{ {
...@@ -190,13 +191,13 @@ export default { ...@@ -190,13 +191,13 @@ export default {
}, },
{ {
label: "客户类型", label: "客户类型",
name: "customerCategory", name: "customerType",
type: "select", type: "select",
isClear: true, isClear: true,
optionList: [], optionList: [],
optionId: "itemValue", optionId: "itemValue",
optionLabel: "itemName", optionLabel: "itemName",
optionsName: "bussinessTypeOpt", optionsName: "customerCategoryOpt",
}, },
{ {
label: "提交人", label: "提交人",
...@@ -208,7 +209,7 @@ export default { ...@@ -208,7 +209,7 @@ export default {
baseData: { baseData: {
reviewCaseStatusOpt: deepClone(reviewCaseStatusOpt), reviewCaseStatusOpt: deepClone(reviewCaseStatusOpt),
reviewCaseStatusOptMap: deepClone(reviewCaseStatusOptMap), reviewCaseStatusOptMap: deepClone(reviewCaseStatusOptMap),
clientTypeOpt: deepClone([]), customerCategoryOpt: [],
}, },
}; };
}, },
...@@ -306,19 +307,12 @@ export default { ...@@ -306,19 +307,12 @@ export default {
}, },
async fetchOnboardingPlans() { async fetchOnboardingPlans() {
try { try {
const [recruitmentTypeOpt, bussinessTypeOpt] = await Promise.all([ const [customerCategoryOpt] = await Promise.all([
getDictList({ listExcellentCaseCategories(),
businessCode: "recruitment",
typeCode: "recruitment_type",
}),
getDictList({
businessCode: "recruitment",
typeCode: "business_type",
}),
]); ]);
// 处理返回的数据 // 处理返回的数据
this.baseData.recruitmentTypeOpt = recruitmentTypeOpt.list; this.baseData.customerCategoryOpt = customerCategoryOpt;
this.baseData.bussinessTypeOpt = bussinessTypeOpt.list;
this.getOptionsList(this, "showFormData", true); this.getOptionsList(this, "showFormData", true);
} catch (error) { } catch (error) {
console.error(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!