Commit 4f38b0a6 by 张立顺

Merge branch 'SAAS+V5.8.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-sy…

…stem into SAAS+V5.8.0
2 parents 92858cb7 e9fb1238
Showing 19 changed files with 227 additions and 105 deletions
...@@ -9,39 +9,39 @@ ...@@ -9,39 +9,39 @@
import request from "./request"; import request from "./request";
// 分页查询潜客数据 // 分页查询潜客数据
export function potentialCustomersPage(data) { export function potentialCustomersPage (data) {
data.method = "dj.api.smartcarlife.sale.potentialCustomers.page"; data.method = "dj.api.smartcarlife.sale.potentialCustomers.page";
return request(data, "post"); return request(data, "post");
} }
// 潜客详情数据 // 潜客详情数据
export function potentialCustomersDetail(data) { export function potentialCustomersDetail (data) {
data.method = "dj.api.smartcarlife.sale.potentialCustomers.detail"; data.method = "dj.api.smartcarlife.sale.potentialCustomers.detail";
return request(data, "post"); return request(data, "post");
} }
// 潜客核验详情(含 merchantInfo) // 潜客核验详情(含 merchantInfo)
export function potentialCustomersVerificationDetail(data) { export function potentialCustomersVerificationDetail (data) {
data.method = data.method =
"dj.api.smartcarlife.sale.potentialCustomers.verificationDetail"; "dj.api.smartcarlife.sale.potentialCustomers.verificationDetail";
return request(data, "post"); return request(data, "post");
} }
// 首次绑定/重新绑定4S店 // 首次绑定/重新绑定4S店
export function bind4SStore(data) { export function bind4SStore (data) {
data.method = "dj.api.smartcarlife.sale.potentialCustomers.bind"; data.method = "dj.api.smartcarlife.sale.potentialCustomers.bind";
return request(data, "post"); return request(data, "post");
} }
// 潜客信息核验提交(dj.api.smartcarlife.sale.potentialCustomers.submitVerification) // 潜客信息核验提交(dj.api.smartcarlife.sale.potentialCustomers.submitVerification)
export function potentialCustomersInfoVerify(data) { export function potentialCustomersInfoVerify (data) {
data.method = data.method =
"dj.api.smartcarlife.sale.potentialCustomers.submitVerification"; "dj.api.smartcarlife.sale.potentialCustomers.submitVerification";
return request(data, "post"); return request(data, "post");
} }
// 潜客新建商户 — 校验商户名称是否与账户中心重复 // 潜客新建商户 — 校验商户名称是否与账户中心重复
export function potentialCustomersCheckMerchantName(data) { export function potentialCustomersCheckMerchantName (data) {
data.method = data.method =
"dj.api.smartcarlife.sale.potentialCustomers.checkMerchantName"; "dj.api.smartcarlife.sale.potentialCustomers.checkMerchantName";
data.method = "dj.api.smartcarlife.sale.potentialCustomers.infoVerify"; data.method = "dj.api.smartcarlife.sale.potentialCustomers.infoVerify";
...@@ -49,52 +49,52 @@ export function potentialCustomersCheckMerchantName(data) { ...@@ -49,52 +49,52 @@ export function potentialCustomersCheckMerchantName(data) {
} }
// 分页查询大区 // 分页查询大区
export function regionPage(data) { export function regionPage (data) {
data.method = "dj.api.smartcarlife.sale.region.page"; data.method = "dj.api.smartcarlife.sale.region.page";
return request(data, "post"); return request(data, "post");
} }
// 获取大区人员 // 获取大区人员
export function regionUserList(data) { export function regionUserList (data) {
data.method = "dj.api.smartcarlife.sale.region.userList"; data.method = "dj.api.smartcarlife.sale.region.userList";
return request(data, "post"); return request(data, "post");
} }
// 更新大区人员 // 更新大区人员
export function updateRegionUser(data) { export function updateRegionUser (data) {
data.method = "dj.api.smartcarlife.sale.region.updateRegionUser"; data.method = "dj.api.smartcarlife.sale.region.updateRegionUser";
return request(data, "post"); return request(data, "post");
} }
// 区域运营模块接口 // 区域运营模块接口
// 区域运营管理人员列表 // 区域运营管理人员列表
export function organizationUserList(data) { export function organizationUserList (data) {
data.method = "dj.api.script.province.organization.list"; data.method = "dj.api.script.province.organization.list";
return request(data, "post"); return request(data, "post");
} }
// 区域运营管理编辑 // 区域运营管理编辑
export function organizationUserUpdate(data) { export function organizationUserUpdate (data) {
data.method = "dj.api.script.province.organization.upd"; data.method = "dj.api.script.province.organization.upd";
return request(data, "post"); return request(data, "post");
} }
// 关店管理列表/rop-dj-smartcarlife/router/dj.api.smartcarlife.sale.closeStore.page // 关店管理列表/rop-dj-smartcarlife/router/dj.api.smartcarlife.sale.closeStore.page
export function closeStorePage(data) { export function closeStorePage (data) {
data.method = "dj.api.smartcarlife.sale.closeStore.page"; data.method = "dj.api.smartcarlife.sale.closeStore.page";
return request(data, "post"); return request(data, "post");
} }
//是否关店 //是否关店
export function closeStoreConfirm(data) { export function closeStoreConfirm (data) {
data.method = "dj.api.smartcarlife.sale.closeStore.confirm"; data.method = "dj.api.smartcarlife.sale.closeStore.confirm";
return request(data, "post"); return request(data, "post");
} }
// 关店详情 // 关店详情
export function closeStoreDetail(data) { export function closeStoreDetail (data) {
data.method = "dj.api.smartcarlife.sale.closeStore.detail"; data.method = "dj.api.smartcarlife.sale.closeStore.detail";
return request(data, "post"); return request(data, "post");
} }
// 关店操作记录 // 关店操作记录
export function closeStoreOperateLogList(data) { export function closeStoreOperateLogList (data) {
data.method = "dj.api.smartcarlife.sale.closeStore.operateLog.list"; data.method = "dj.api.smartcarlife.sale.closeStore.operateLog.list";
return request(data, "post"); return request(data, "post");
} }
...@@ -102,7 +102,7 @@ export function closeStoreOperateLogList(data) { ...@@ -102,7 +102,7 @@ export function closeStoreOperateLogList(data) {
/** /**
* 分页查询门店上架审批单 * 分页查询门店上架审批单
*/ */
export function storeApprovePageQuery(data) { export function storeApprovePageQuery (data) {
data.method = "dj.api.oaapproval.store.approve.pageQuery"; data.method = "dj.api.oaapproval.store.approve.pageQuery";
return request(data, "post"); return request(data, "post");
} }
...@@ -111,15 +111,17 @@ export function storeApprovePageQuery(data) { ...@@ -111,15 +111,17 @@ export function storeApprovePageQuery(data) {
*创建门店上架审批单(草稿) *创建门店上架审批单(草稿)
*/ */
export function storeApproveCreateDraft(data) { export function storeApproveCreateDraft (data) {
data.method = "dj.api.oaapproval.store.approve.createDraft"; data.method = "dj.api.oaapproval.store.approve.createDraft";
return request(data, "post", ["file"]); return request(data, "post", ["file"], {
returnAll: true,
});
} }
/** /**
*查询门店上架审批单详情 *查询门店上架审批单详情
*/ */
export function storeApproveQueryDetail(data) { export function storeApproveQueryDetail (data) {
data.method = "dj.api.oaapproval.store.approve.queryDetail"; data.method = "dj.api.oaapproval.store.approve.queryDetail";
return request(data, "post"); return request(data, "post");
} }
...@@ -128,15 +130,17 @@ export function storeApproveQueryDetail(data) { ...@@ -128,15 +130,17 @@ export function storeApproveQueryDetail(data) {
* 编辑门店上架审批单 * 编辑门店上架审批单
*/ */
export function storeApproveEditDraft(data) { export function storeApproveEditDraft (data) {
data.method = "dj.api.oaapproval.store.approve.editDraft"; data.method = "dj.api.oaapproval.store.approve.editDraft";
return request(data, "post"); return request(data, "post", [], {
returnAll: true,
});
} }
/** /**
* *
* 重新发起审批单 * 重新发起审批单
*/ */
export function storeApproveReSubmit(data) { export function storeApproveReSubmit (data) {
data.method = "dj.api.oaapproval.store.approve.reSubmit"; data.method = "dj.api.oaapproval.store.approve.reSubmit";
return request(data, "post"); return request(data, "post");
} }
...@@ -144,7 +148,7 @@ export function storeApproveReSubmit(data) { ...@@ -144,7 +148,7 @@ export function storeApproveReSubmit(data) {
/** /**
* 查询销售范围类型列表 * 查询销售范围类型列表
*/ */
export function queryProductTypes(data = {}) { export function queryProductTypes (data = {}) {
data.method = "dj.api.oaapproval.store.approve.queryProductTypes"; data.method = "dj.api.oaapproval.store.approve.queryProductTypes";
return request(data, "post"); return request(data, "post");
} }
...@@ -152,7 +156,15 @@ export function queryProductTypes(data = {}) { ...@@ -152,7 +156,15 @@ export function queryProductTypes(data = {}) {
/** /**
* 查询销售品类列表 * 查询销售品类列表
*/ */
export function queryProductCategories(data = {}) { export function queryProductCategories (data = {}) {
data.method = "dj.api.oaapproval.store.approve.queryProductCategories"; data.method = "dj.api.oaapproval.store.approve.queryProductCategories";
return request(data, "post"); return request(data, "post");
} }
/**
* 查询签约主体
*/
export function qyMerchantPageList (data = {}) {
data.method = "dj.smartcarlife.api.qyMerchant.pageList";
return request(data, "post");
}
...@@ -9,13 +9,13 @@ import store from "@/store"; ...@@ -9,13 +9,13 @@ import store from "@/store";
axios.defaults.withCredentials = true; axios.defaults.withCredentials = true;
// const expiresMinute = 60 // 过期时间(分钟) // const expiresMinute = 60 // 过期时间(分钟)
// 创建一个错误 // 创建一个错误
export function errorCreate(msg) { export function errorCreate (msg) {
const error = new Error(msg); const error = new Error(msg);
errorLog(error); errorLog(error);
throw error; throw error;
} }
// 记录和显示错误 // 记录和显示错误
function errorLog(error) { function errorLog (error) {
console.log("error", error.toString(), error); console.log("error", error.toString(), error);
// 添加到日志 // 添加到日志
store.dispatch("d2admin/log/push", { store.dispatch("d2admin/log/push", {
...@@ -142,8 +142,7 @@ service.interceptors.response.use( ...@@ -142,8 +142,7 @@ service.interceptors.response.use(
return errorCreate("登录超时,请重新登录"); return errorCreate("登录超时,请重新登录");
// return Promise.reject(new Error(response.message || 'Error')) // return Promise.reject(new Error(response.message || 'Error'))
} }
if (returnAll) if (returnAll) return dataAxios;
return dataAxios;
const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode; const codeValue = dataAxios[ruleResult.code_key] || dataAxios.returnCode;
switch (+codeValue) { switch (+codeValue) {
case ruleResult.code_success_value: case ruleResult.code_success_value:
......
...@@ -1219,19 +1219,23 @@ export default { ...@@ -1219,19 +1219,23 @@ export default {
clearUpgradeGoods() { clearUpgradeGoods() {
this.formData = { this.formData = {
...this.formData, ...this.formData,
goodsAlias: '',
upgradeGoodsId: "", upgradeGoodsId: "",
goodsCode: "", position: '',
goodsType: "", goodsType: "",
productType: [], productType: [],
baseSupplyMode: "", baseSupplyMode: "",
upgradeSupplyMode: "", upgradeSupplyMode: "",
sellPrice: "", sellPrice: "",
minSellPrice: "", minSellPrice: '',
giveCostPrice: "", upgradeProductCost: '',
recoveryCostPrice: "",
reconcilyCostPrice: "",
voucherList: [],
validMinSellPriceFlag: true, validMinSellPriceFlag: true,
giftCost: '',
recoveryCost: '',
virtualAccountCost: '',
warrantyType: [],
djCost: '',
thirdPartyCost: '',
validMinSellPrice: "Y", validMinSellPrice: "Y",
sellPriceValidType: 1, sellPriceValidType: 1,
tempValidDate: [], tempValidDate: [],
......
...@@ -1117,7 +1117,6 @@ export default { ...@@ -1117,7 +1117,6 @@ export default {
return `${(Math.round(num * pow) / pow).toFixed(2)}元`; return `${(Math.round(num * pow) / pow).toFixed(2)}元`;
}, },
handleUp(e) { handleUp(e) {
console.log(this.formData);
this.$refs[this.formRef + "d2FormRuleForm"].validate((valid, options) => { this.$refs[this.formRef + "d2FormRuleForm"].validate((valid, options) => {
if (valid) { if (valid) {
this.$emit("handleAddConfirm", { ...this.formData, num: e }); this.$emit("handleAddConfirm", { ...this.formData, num: e });
......
...@@ -416,8 +416,8 @@ export default { ...@@ -416,8 +416,8 @@ export default {
return this.$message.warning("套餐总售价需大于零,请检查套餐包含产品售价"); return this.$message.warning("套餐总售价需大于零,请检查套餐包含产品售价");
if (merchantGoodsInfoList?.findIndex(v => this.membraneTypeList.includes(v.goodsType)) > -1 && !this.filterBaseSceneCodeBySceneType(1)?.includes(data?.baseSceneCode)) if (merchantGoodsInfoList?.findIndex(v => this.membraneTypeList.includes(v.goodsType)) > -1 && !this.filterBaseSceneCodeBySceneType(1)?.includes(data?.baseSceneCode))
return this.$message.warning("膜类产品仅支持上架精品升级场景"); return this.$message.warning("膜类产品仅支持上架精品升级场景");
if (this.extendedPosiType.includes(data.goodsType) && !this.filterBaseSceneCodeBySceneType(0)?.includes(data?.baseSceneCode)) if (merchantGoodsInfoList?.findIndex(v => this.extendedPosiType?.concat(this.equitySceneType)?.includes(v.goodsType)) > -1 && !this.filterBaseSceneCodeBySceneType(0)?.includes(data?.baseSceneCode))
return this.$message.warning("延保类产品仅支持上架至延保&权益业务场景 "); return this.$message.warning("延保、权益类产品仅支持上架至延保&权益业务场景");
this.editData = data; this.editData = data;
// 判断套餐的所有子产品适用车型是否存在交集(无适用车型默认为全部) // 判断套餐的所有子产品适用车型是否存在交集(无适用车型默认为全部)
let seriesIdFlag = false; let seriesIdFlag = false;
......
...@@ -208,7 +208,8 @@ export default { ...@@ -208,7 +208,8 @@ export default {
customerLabel: val?.customerLabel, customerLabel: val?.customerLabel,
supplySource: val?.supplySource ? val?.supplySource?.split(',') : [], supplySource: val?.supplySource ? val?.supplySource?.split(',') : [],
remark: val.remark, remark: val.remark,
checked: false checked: false,
merchantGoodsExist: val.merchantGoodsExist
} }
}) })
// 从产品清单上架产品带入数据 // 从产品清单上架产品带入数据
......
...@@ -1691,6 +1691,7 @@ export default { ...@@ -1691,6 +1691,7 @@ export default {
item.customerLabel = temp.customerLabel item.customerLabel = temp.customerLabel
item.supplySource = temp.supplySource item.supplySource = temp.supplySource
item.remark = temp.remark item.remark = temp.remark
item.merchantGoodsExist = temp.merchantGoodsExist
break; break;
} }
} }
......
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import dayjs from 'dayjs';
import { import {
approveStatusOpt approveStatusOpt
} from "@/common/constants.js"; } from "@/common/constants.js";
...@@ -235,7 +236,10 @@ export default { ...@@ -235,7 +236,10 @@ export default {
}, },
{ {
label: '提交时间', label: '提交时间',
prop: 'submitDate', formatter: (cellValue) => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
},
minWidth: 120,
}, },
{ {
label: '提交人', label: '提交人',
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
> >
<el-option <el-option
v-for="subItem in item.options" v-for="subItem in item.options"
:key="subItem.key" :key="`option-${subItem.key}`"
:label="subItem.value" :label="subItem.value"
:value="subItem.key" :value="subItem.key"
> >
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<div class="file-box"> <div class="file-box">
<div <div
v-for="(subItem, subIndex) in item.files" v-for="(subItem, subIndex) in item.files"
:key="subIndex" :key="`file-${subIndex}`"
> >
<div <div
v-if=" !filterEmpty(subItem.uploadProgress) || subItem.fileUrl " v-if=" !filterEmpty(subItem.uploadProgress) || subItem.fileUrl "
...@@ -149,8 +149,8 @@ ...@@ -149,8 +149,8 @@
:style="{ width: '530px' }" :style="{ width: '530px' }"
> >
<el-option <el-option
v-for="subItem in options.sceneTypeOpts" v-for="(subItem, index) in options.sceneTypeOpts"
:key="subItem.sceneType" :key="`sceneType-${index}`"
:label="subItem.name" :label="subItem.name"
:value="subItem.sceneType" :value="subItem.sceneType"
> >
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
> >
<el-radio <el-radio
v-for="(item, index) in options.shelfType" v-for="(item, index) in options.shelfType"
:key="index" :key="`shelfType-${index}`"
:label="item.confId" :label="item.confId"
> >
{{ item.confValue }} {{ item.confValue }}
...@@ -315,7 +315,21 @@ export default { ...@@ -315,7 +315,21 @@ export default {
watch: { watch: {
'infoForm.sceneType': { 'infoForm.sceneType': {
handler (val) { handler (val) {
if (this.options.sceneTypeOpts && this.options.sceneTypeOpts.length) {
this.infoForm.baseSceneCode = this.options.sceneTypeOpts.find(item => item.sceneType == val)?.baseSceneCode || '' this.infoForm.baseSceneCode = this.options.sceneTypeOpts.find(item => item.sceneType == val)?.baseSceneCode || ''
}
},
immediate: true,
deep: true,
},
show: {
handler (val) {
if (val) {
this.getStaffSceneLabelList();
this.GlOssApi = new GlOssApi({
baseConfig,
});
}
}, },
immediate: true, immediate: true,
deep: true, deep: true,
...@@ -380,14 +394,18 @@ export default { ...@@ -380,14 +394,18 @@ export default {
} }
}, },
mounted () { mounted () {
this.getStaffSceneLabelList();
this.GlOssApi = new GlOssApi({
baseConfig,
});
}, },
methods: { methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]), ...mapActions("d2admin/user", ["actionSetDownloadList"]),
...mapActions({ close: "d2admin/page/close" }), ...mapActions({ close: "d2admin/page/close" }),
init (data) {
console.log(data)
this.infoForm = {
...this.infoForm,
...data,
}
},
async getStaffSceneLabelList () { async getStaffSceneLabelList () {
const res = await getStaffSceneLabelList(); const res = await getStaffSceneLabelList();
this.options.sceneTypeOpts = res; this.options.sceneTypeOpts = res;
......
...@@ -56,10 +56,14 @@ export default { ...@@ -56,10 +56,14 @@ export default {
files = e.files files = e.files
} }
}) })
if (data) {
let name = data.fileName || ''
if (data.originalExcelUrl) name = data.originalExcelUrl.split('/').pop() || ''
files.push({ files.push({
fileName: data.fileName, fileName: name,
fileUrl: data.fileInfo fileUrl: data.fileInfo || data.originalExcelUrl
}) })
}
return files return files
} }
}, },
...@@ -70,7 +74,7 @@ export default { ...@@ -70,7 +74,7 @@ export default {
formatValue (i) { formatValue (i) {
let str = null, let str = null,
{ formList, data } = this { formList, data } = this
str = data[i.controlId] str = data[i.controlId] || i.value
if (str) { if (str) {
if (i.inputType == 4) str += '元' if (i.inputType == 4) str += '元'
if (i.inputType == 5) str = i.options.find(e => e.key == str).value if (i.inputType == 5) str = i.options.find(e => e.key == str).value
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<el-form <el-form
ref="formRef" ref="formRef"
label-width="150px" label-width="155px"
:model="componentData" :model="componentData"
:size="size" :size="size"
:rules="rules" :rules="rules"
...@@ -24,9 +24,14 @@ ...@@ -24,9 +24,14 @@
class="business-information-item" class="business-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="`businessInformation${index}`" :key="`businessInformation${index}`"
:prop="i.key" :prop="isViewMode ? '' : i.key"
> >
<template v-if="i.type == 'text' || isViewMode">{{ componentData[i.key] || '-' }}</template> <template v-if="i.type == 'text' || isViewMode">
<template v-if="componentData[i.key] != null">
{{ componentData[i.key] }}<template v-if="i.unit">{{ i.unit }}</template>
</template>
<template v-else></template>
</template>
<template v-else> <template v-else>
<el-input <el-input
v-model="componentData[i.key]" v-model="componentData[i.key]"
...@@ -45,6 +50,7 @@ ...@@ -45,6 +50,7 @@
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import { isView } from '@/views/goods/shelfManage/utils'; import { isView } from '@/views/goods/shelfManage/utils';
import componentsMixin from './mixins.js'; import componentsMixin from './mixins.js';
import NP from 'number-precision'
export default { export default {
mixins: [componentsMixin], mixins: [componentsMixin],
name: 'BusinessInformation', name: 'BusinessInformation',
...@@ -58,7 +64,7 @@ export default { ...@@ -58,7 +64,7 @@ export default {
default: false default: false
} }
}, },
inject: ['size'], inject: ['size', 'GET_PRODUCT_DETAILS'],
watch: { watch: {
data: { data: {
handler (newVal) { handler (newVal) {
...@@ -69,14 +75,65 @@ export default { ...@@ -69,14 +75,65 @@ export default {
} }
}, },
computed: { computed: {
productDetails () {
return this.GET_PRODUCT_DETAILS()
},
formRef () { formRef () {
return this.$refs.formRef return this.$refs.formRef
}, },
djGrossProfit () { djGrossProfit () {
return 123 let { productDetails, componentData } = this,
{ personnelCost, rentCost, depreciationCost, otherCost } = componentData,
sum = 0,
revenue = 0,
trafficFee = 0,
marketFee1 = 0,
marketFee2 = 0,
incentive1 = 0,
incentive2 = 0,
resourceFee = 0,
productCost = 0,
recyclingFilm = 0
productDetails.forEach(item => {
revenue = NP.plus(revenue, item.revenue || 0)
trafficFee = NP.plus(trafficFee, item.trafficFee || 0)
marketFee1 = NP.plus(marketFee1, item.marketFee1 || 0)
marketFee2 = NP.plus(marketFee2, item.marketFee2 || 0)
incentive1 = NP.plus(incentive1, item.incentive1 || 0)
incentive2 = NP.plus(incentive2, item.incentive2 || 0)
resourceFee = NP.plus(resourceFee, item.resourceFee || 0)
productCost = NP.plus(productCost, item.productCost || 0)
recyclingFilm = NP.plus(recyclingFilm, item.recyclingFilm || 0)
})
sum = NP.minus(
revenue,
NP.plus(
trafficFee,
marketFee1,
marketFee2,
incentive1,
incentive2,
resourceFee,
productCost,
recyclingFilm,
personnelCost || 0,
rentCost || 0,
depreciationCost || 0,
otherCost || 0
)
)
return Math.floor(sum * 100) / 100
}, },
djGpr () { djGpr () {
return 1 let { productDetails, djGrossProfit } = this,
revenue = 0
productDetails.forEach(item => {
revenue = NP.plus(revenue, item.revenue || 0)
})
if (revenue === 0) return '0.00%'
const gpr = NP.times(NP.divide(djGrossProfit, revenue), 100)
return NP.round(gpr, 2) + '%'
} }
}, },
data () { data () {
...@@ -88,7 +145,7 @@ export default { ...@@ -88,7 +145,7 @@ export default {
], ],
businessInformation: [ businessInformation: [
{ label: '预估交付数/月', key: 'deliveryCount', filterRule: 'integerRange', min: 0, max: 999999, maxlength: 6 }, { label: '预估交付数/月', key: 'deliveryCount', filterRule: 'integerRange', min: 0, max: 999999, maxlength: 6 },
{ label: '预估触客率', key: 'customerTouchRate', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '预估触客率', key: 'customerTouchRate', unit: '%', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '人员成本', key: 'personnelCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '人员成本', key: 'personnelCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '房租', key: 'rentCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '房租', key: 'rentCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '折旧与摊销', key: 'depreciationCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '折旧与摊销', key: 'depreciationCost', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
:placeholder="`请选择${i.label}`" :placeholder="`请选择${i.label}`"
class="select" class="select"
:disabled="setDisabled(i)" :disabled="setDisabled(i)"
@change="change(i,$event)"
> >
<el-option <el-option
v-for="option in i.options" v-for="option in i.options"
...@@ -144,15 +145,6 @@ export default { ...@@ -144,15 +145,6 @@ export default {
immediate: true, immediate: true,
deep: true deep: true
}, },
'data.productType': {
handler (val) {
if (val) {
this.queryProductCategories()
}
},
immediate: true,
deep: true
},
item: { item: {
handler (val) { handler (val) {
this.data = val this.data = val
...@@ -194,7 +186,11 @@ export default { ...@@ -194,7 +186,11 @@ export default {
if (i.key == 'productCategory') { if (i.key == 'productCategory') {
flag = !this.data.productType flag = !this.data.productType
} }
if (this.item.edit && ['productType', 'productCategory'].includes(i.key)) flag = true
return flag return flag
},
change (i, e) {
if (i.key == "productType") this.queryProductCategories()
} }
} }
} }
......
<template> <template>
<div class="sales-category-container"> <div class="sales-category-container">
<template v-if="!isViewMode">
<div class="sales-category-btns"> <div class="sales-category-btns">
<el-button <el-button
@click="editSalesCategory" @click="editSalesCategory"
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
v-if="length > 1" v-if="length > 1"
>删除</el-button> >删除</el-button>
</div> </div>
</template>
<el-form <el-form
ref="formRef" ref="formRef"
label-width="150px" label-width="150px"
...@@ -34,9 +36,11 @@ ...@@ -34,9 +36,11 @@
class="sales-category-item" class="sales-category-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="ind" :key="ind"
:prop="i.key"
> >
{{ componentData[i.key] != null ? componentData[i.key] : '-' }} <template v-if="componentData[i.key] != null">
{{ componentData[i.key] }}<template v-if="i.unit">{{ i.unit }}</template>
</template>
<template v-else>-</template>
</el-form-item> </el-form-item>
</template> </template>
...@@ -69,12 +73,15 @@ export default { ...@@ -69,12 +73,15 @@ export default {
type: Number, type: Number,
default: 0 default: 0
}, },
isViewMode: {
type: Boolean,
default: false
},
}, },
inject: ['size'], inject: ['size'],
watch: { watch: {
data: { data: {
handler (newVal) { handler (newVal) {
console.log(newVal, '===')
this.componentData = deepClone(newVal) this.componentData = deepClone(newVal)
}, },
deep: true, deep: true,
...@@ -118,18 +125,9 @@ export default { ...@@ -118,18 +125,9 @@ export default {
closeOnClickModal: false closeOnClickModal: false
}).then(async () => { }).then(async () => {
this.$emit('delete', this.data) this.$emit('delete', this.data)
// const data = await deleteStrategy({
// id: item.id
// })
// if (data) {
// this.$emit('refresh')
// this.$message.success('操作成功')
// this.close()
// } else this.$message.error('操作失败')
}) })
}, },
handleEditSalesCategory (data) { handleEditSalesCategory (data) {
console.log(data)
if (data.edit) { if (data.edit) {
delete data.edit delete data.edit
this.$emit('edit', data) this.$emit('edit', data)
......
<template> <template>
<div class="traffic-provider-information-container"> <div class="traffic-provider-information-container">
<template v-if="!isViewMode">
<div class="traffic-provider-information-btns"> <div class="traffic-provider-information-btns">
<el-button <el-button
v-if="!editStatus" v-if="!editStatus"
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,7 @@
>保存</el-button> >保存</el-button>
</template> </template>
</div> </div>
</template>
<el-form <el-form
ref="formRef" ref="formRef"
label-width="150px" label-width="150px"
...@@ -35,7 +37,7 @@ ...@@ -35,7 +37,7 @@
class="traffic-provider-information-item" class="traffic-provider-information-item"
:label="i.label + ':'" :label="i.label + ':'"
:key="`trafficProviderInformation${index}`" :key="`trafficProviderInformation${index}`"
:prop="i.key" :prop="isViewMode ? '' : i.key"
> >
<template v-if="editStatus"> <template v-if="editStatus">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
...@@ -63,7 +65,7 @@ ...@@ -63,7 +65,7 @@
</template> </template>
<template v-else> <template v-else>
<template v-if="i.type == 'select'"> <template v-if="i.type == 'select'">
{{ componentData[i.key] && getSelectText(i) }} {{ getSelectText(i) }}
</template> </template>
<template v-else> {{ componentData[i.key] || '-' }}</template> <template v-else> {{ componentData[i.key] || '-' }}</template>
</template> </template>
...@@ -113,13 +115,21 @@ import { ...@@ -113,13 +115,21 @@ import {
getServiceList, getServiceList,
getyqMerchantList, getyqMerchantList,
} from "@api/merchant"; } from "@api/merchant";
import { qyMerchantPageList } from '@/api/salesManagement.js'
export default { export default {
name: 'TrafficProviderInformation', name: 'TrafficProviderInformation',
props: { props: {
data: { data: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
} },
isViewMode: {
type: Boolean,
default: false
},
}, },
inject: ['size'], inject: ['size'],
watch: { watch: {
...@@ -147,9 +157,9 @@ export default { ...@@ -147,9 +157,9 @@ export default {
editStatus: false, editStatus: false,
trafficProviderInformation: [ trafficProviderInformation: [
{ label: '流量方信息', key: 'trafficPartyName', type: 'input', disabled: true }, { label: '流量方信息', key: 'trafficPartyName', type: 'input', disabled: true },
{ label: '集团(上级商户)', key: '', type: 'input', disabled: true }, { label: '集团(上级商户)', key: 'parentName', type: 'input', disabled: true },
{ label: '开通场景', key: 'sceneTypeName', type: 'input', disabled: true }, { label: '开通场景', key: 'sceneTypeName', type: 'input', disabled: true },
{ label: '签约主体', key: 'signingEntityId', type: 'select', options: [] }, { label: '签约主体', key: 'signingEntityId', type: 'select', viewKey: 'signingEntity', options: [] },
{ {
label: '业务模式', key: 'businessMode', type: 'select', options: [ label: '业务模式', key: 'businessMode', type: 'select', options: [
{ {
...@@ -178,10 +188,10 @@ export default { ...@@ -178,10 +188,10 @@ export default {
}, },
] ]
}, },
{ label: '服务商2/F公司', key: 'serviceMerchant2fId', type: 'select', options: [] }, { label: '服务商2/F公司', key: 'serviceMerchant2fId', type: 'select', viewKey: 'serviceMerchant2fName', options: [] },
{ label: '服务商', key: 'partnerId', type: 'select', options: [] }, { label: '服务商', key: 'partnerId', type: 'select', viewKey: 'partnerName', options: [] },
{ label: '上级服务商', key: 'parentServiceMerchantName', type: 'input', maxlength: 50 }, { label: '上级服务商', key: 'parentServiceMerchantName', type: 'input', maxlength: 50 },
{ label: '园区店', key: 'yqMerchantId', type: 'select', options: [] }, { label: '园区店', key: 'yqMerchantId', type: 'select', viewKey: 'yqMerchantName', options: [] },
], ],
customerInformation: [ customerInformation: [
{ label: '区域运营', key: 'areaOpIdList', type: 'select', options: [] }, { label: '区域运营', key: 'areaOpIdList', type: 'select', options: [] },
...@@ -201,14 +211,19 @@ export default { ...@@ -201,14 +211,19 @@ export default {
} }
}, },
mounted () { mounted () {
if (!this.isViewMode) this.init()
// 人员下拉框 // 人员下拉框
this.merchantStaffByRoleList() this.merchantStaffByRoleList()
},
methods: {
init () {
// 园区店下拉框 // 园区店下拉框
this.getyqMerchantList(); this.getyqMerchantList();
// 服务商下拉框 // 服务商下拉框
this.getServiceList(); this.getServiceList();
// 签约主体下拉框
this.qyMerchantPageList();
}, },
methods: {
edit () { edit () {
this.editStatus = true this.editStatus = true
this.$emit('edit', true) this.$emit('edit', true)
...@@ -224,12 +239,24 @@ export default { ...@@ -224,12 +239,24 @@ export default {
this.$emit('edit', false) this.$emit('edit', false)
}, },
getSelectText (i) { getSelectText (i) {
if (!i.options.length) return '-' const value = this.componentData[i.key]
return i.options.find(item => item.value == this.componentData[i.key]).label || '-' if (this.isViewMode && i.viewKey) {
return this.componentData[i.viewKey] || value || '-'
}
if (!value || !i?.options?.length) return '-'
const option = i.options.find(item => item.value === value)
return option?.label || value || '-'
}, },
getMultipleSelectText (i) { getMultipleSelectText (i) {
if (!i.options.length) return '-' const values = this.componentData[i.key]
return i.options.filter(item => this.componentData[i.key].includes(item.uuid)).map(item => item.staffName).join('/') || '-' if (!values || !Array.isArray(values) || values.length === 0 || !i?.options?.length) return '-'
const selectedNames = i.options
.filter(item => values.includes(item.uuid))
.map(item => item.staffName)
return selectedNames.length > 0 ? selectedNames.join('/') : '-'
}, },
async merchantStaffByRoleList () { async merchantStaffByRoleList () {
const [areaOpIdList, onlineOpIdList, regionSupervisorIdList] = await Promise.all([ const [areaOpIdList, onlineOpIdList, regionSupervisorIdList] = await Promise.all([
...@@ -261,6 +288,12 @@ export default { ...@@ -261,6 +288,12 @@ export default {
if (['serviceMerchant2fId', 'partnerId'].includes(item.key)) item.options = data if (['serviceMerchant2fId', 'partnerId'].includes(item.key)) item.options = data
}) })
}, },
async qyMerchantPageList () {
const { list } = await qyMerchantPageList({ currentPage: 1, pageSize: 100000 })
this.trafficProviderInformation.find(item => item.key == 'signingEntityId').options = list.map(item => {
return { label: item.merchantName, value: Number(item.merchantNo) }
})
},
} }
} }
</script> </script>
......
const { util } = require("echarts")
const SALES_CATEGORY_LIST = [ const SALES_CATEGORY_LIST = [
{ {
title: '销售范围', list: [ title: '销售范围', list: [
...@@ -14,14 +16,14 @@ const SALES_CATEGORY_LIST = [ ...@@ -14,14 +16,14 @@ const SALES_CATEGORY_LIST = [
}, },
{ {
title: '兜底要求', list: [ title: '兜底要求', list: [
{ label: '渗透率', key: 'penetrationRate', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '渗透率', key: 'penetrationRate', unit: '%', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '转化率', key: 'conversionRate', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '转化率', key: 'conversionRate', unit: '%', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '单车采购产值', key: 'revenuePerCar', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '单车采购产值', key: 'revenuePerCar', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
] ]
}, },
{ {
title: '预估经营数据', list: [ title: '预估经营数据', list: [
{ label: '转化率', key: 'conversionRate', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 }, { label: '转化率', key: 'estimatedConversionRate', unit: '%', type: 'input', filterRule: 'decimalRange', min: 0, max: 100, precision: 2 },
{ label: '升级客单价', key: 'upgradePrice', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '升级客单价', key: 'upgradePrice', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
{ label: '产值', key: 'revenue', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 }, { label: '产值', key: 'revenue', type: 'input', filterRule: 'decimalRange', min: 0, max: 999999, precision: 2 },
] ]
...@@ -61,7 +63,7 @@ const SALES_CATEGORY_RULES = { ...@@ -61,7 +63,7 @@ const SALES_CATEGORY_RULES = {
penetrationRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], penetrationRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
conversionRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], conversionRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
revenuePerCar: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], revenuePerCar: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
conversionRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], estimatedConversionRate: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
upgradePrice: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], upgradePrice: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
revenue: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], revenue: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
trafficFee: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }], trafficFee: [{ required: true, validator: VAILIDATOR_FROM, trigger: 'blur' }],
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="record-item" v-for="(item, index) in recordList" :key="index"> <div class="record-item" v-for="(item, index) in recordList" :key="index">
<div class="record-col">操作人:<span class="record-val">{{ item.operatedByName || '-' }}</span></div> <div class="record-col">操作人:<span class="record-val">{{ item.operatedByName || '-' }}</span></div>
<div class="record-col">操作时间:<span class="record-val">{{ item.operatedTime || '-' }}</span></div> <div class="record-col">操作时间:<span class="record-val">{{ item.operatedTime || '-' }}</span></div>
<div class="record-col">关店原因:<span class="record-val">{{ getReasonText(item) }}</span></div> <div class="record-col">关店原因:<span class="record-val">{{ item.confirmReason || '-' }}</span></div>
</div> </div>
</div> </div>
</div> </div>
...@@ -189,13 +189,6 @@ export default { ...@@ -189,13 +189,6 @@ export default {
} }
}) })
}, },
getReasonText(item) {
if (!item.confirmReason) return '-';
if (item.confirmReason === '其他') {
return '其他 - ' + (item.confirmRemark || '');
}
return item.confirmReason;
}
} }
} }
</script> </script>
......
...@@ -185,7 +185,8 @@ export default { ...@@ -185,7 +185,8 @@ export default {
if (this.addForm.confirmResult === 1) { if (this.addForm.confirmResult === 1) {
params.confirmReason = this.addForm.confirmReason params.confirmReason = this.addForm.confirmReason
if (this.addForm.confirmReason === '其他') { if (this.addForm.confirmReason === '其他') {
params.confirmRemark = this.addForm.confirmRemark params.confirmReason = '其他-' + this.addForm.confirmRemark
// params.confirmRemark = this.addForm.confirmRemark
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!