Commit 63aca36e by 李伟康

Merge branch 'SAAS+V4.50.0-0311' of http://192.168.3.233:8090/saas_plus/dj-car-l…

…ife-system into SAAS+V4.50.0-0311
2 parents 5edd32dc 8be4aa87
Showing 72 changed files with 2458 additions and 348 deletions
...@@ -68,7 +68,8 @@ export function batchUpdateStatus(data) { ...@@ -68,7 +68,8 @@ export function batchUpdateStatus(data) {
// 批量复制 // 批量复制
export function batchUpdateBatchCopy(data) { export function batchUpdateBatchCopy(data) {
data.method = `${path}merchantGoodsInfo.updateBatchCopy` // data.method = `${path}merchantGoodsInfo.updateBatchCopy`
data.method = `${path}merchantGoodsInfo.addBatchCopy`
return request(data, "post") return request(data, "post")
} }
......
...@@ -105,3 +105,9 @@ export function pointStaffQuery(data) { ...@@ -105,3 +105,9 @@ export function pointStaffQuery(data) {
data.method = `${path}resident.point.staff.query` data.method = `${path}resident.point.staff.query`
return request(data, RequestMethods.POST) return request(data, RequestMethods.POST)
} }
// 驻店人员卡券发发放记录
export function getCouponRecord(data) {
data.method = 'dj.api.smartcarlife.resident.coupon.grant.record'
return request(data, RequestMethods.POST)
}
\ No newline at end of file \ No newline at end of file
...@@ -79,3 +79,24 @@ export function cancelDeduct(data) { ...@@ -79,3 +79,24 @@ export function cancelDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct` data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`
return request(data) return request(data)
} }
// 积分审批列表同步
export function refreshData(data) {
data.method = `dj.api.smartcarlife.staff.motivation.page.sync`
return request(data)
}
//查询指定订单的操作记录
export function getOperationRecord(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.operation`
return request(data)
}
//根据订单号查询剩余积分
// export function getScoreByscore(data) {
// data.method = `dj.api.smartcarlife.staff.motivation.order.score`
// return request(data)
// }
//获取到总积分
export function getOrderByScore(data) {
data.method = `dj.api.smartcarlife.staff.motivation.order.score`
return request(data)
}
\ No newline at end of file \ No newline at end of file
...@@ -42,3 +42,15 @@ export function getExtendServiceItemsParts(data) { ...@@ -42,3 +42,15 @@ export function getExtendServiceItemsParts(data) {
data.method = `${path}vd.item.getExtendUnitList` data.method = `${path}vd.item.getExtendUnitList`
return request(data, 'post') return request(data, 'post')
} }
// 获取适用车系列表
export function getCarSeriesList(data) {
data.method = `${path}common.car.series.page`
return request(data, 'post')
}
// 分页获取上架商品所需的升级商品信息
export function getUpgradeProductList(data) {
data.method = `${path}productManager.listUpgradeGoodsWithPage`
return request(data, 'post')
}
...@@ -440,3 +440,45 @@ export function listGoodsType(data = {}) { ...@@ -440,3 +440,45 @@ export function listGoodsType(data = {}) {
data.method = 'dj.api.smartcarlife.staff.incomeCalculation.listGoodsType' data.method = 'dj.api.smartcarlife.staff.incomeCalculation.listGoodsType'
return request(data, 'post') return request(data, 'post')
} }
// 复制绩效方案
export function copyPerformanceApi(data) {
data.method = `${path2}merchantPerformanceConfig.copyConfig`
return request(data, 'post')
}
// 获取员工是否是可查看工资白名单
export function staffWhiteListFlagApi(data) {
data.method = `${path2}staffBaseInfo.whiteList.select`
return request(data, 'post')
}
// 根据员工手机号获取员工所在园区店
export function yqMerchantListByStaffPhoneApi(data) {
data.method = `${path2}staffBaseInfo.yqMerchantInfo.list`
return request(data, 'post')
}
// 根据园区店商户号获取1.1和2.1场景下4S店列表
export function merchantListByYqMerchantApi(data) {
data.method = `${path2}scene.shopMerchant.list`
return request(data, 'post')
}
// 员工调店分配新增
export function addStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.add`
return request(data, 'post')
}
// 员工调店分配配置修改
export function updateStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.update`
return request(data, 'post')
}
// 员工调店分配配置删除
export function deleteStaffDailyReportConfigApi(data) {
data.method = `${path2}staffDailyReportConfig.delete`
return request(data, 'post')
}
\ No newline at end of file \ No newline at end of file
...@@ -46,3 +46,9 @@ export function getMerchantLevelApi(data) { ...@@ -46,3 +46,9 @@ export function getMerchantLevelApi(data) {
data.method = `dj.api.smartcarlife.get.merchantLevel` data.method = `dj.api.smartcarlife.get.merchantLevel`
return request(data, "post") return request(data, "post")
} }
// 嘀加上架 - 基本信息
export function getBusisDetailBasic(data) {
data.method = `dj.api.create.business.approve.detail.basic`
return request(data)
}
...@@ -1050,6 +1050,12 @@ export const jdSyncOpt = [ ...@@ -1050,6 +1050,12 @@ export const jdSyncOpt = [
{ confId: 1, confValue: "成功" } { confId: 1, confValue: "成功" }
] ]
// 财资数据 回单状态
export const receiptStatusOpt = [
{ confId: 0, confValue: "否" },
{ confId: 1, confValue: "是" }
]
// 财资数据 操作项 // 财资数据 操作项
export const operationTypeOpt = [ export const operationTypeOpt = [
{ confId: 1, confValue: "重推财资数据" }, { confId: 1, confValue: "重推财资数据" },
......
...@@ -440,11 +440,29 @@ export default { ...@@ -440,11 +440,29 @@ export default {
v.goodsInfo = {} v.goodsInfo = {}
shopPriceArr.push(v.upgradePrice) shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice v.listShowShopPrice = v.upgradePrice
v.listShowSpecificationData = let specificationTypeSequenceArr = v.specificationTypeSequence?.split(';~;')
val.goodsSpecificationNameList?.length > 1 let specificationValueSequenceArr = v?.specificationData?.split(';~;')
? v.specificationData && const suffixMapping = {
v.specificationData?.replace(/;~;/g, " ") 1: '年',
: "-" 2: '(km/万)',
3: '万'
}
if (specificationTypeSequenceArr?.length) {
specificationValueSequenceArr?.forEach((val, index) => {
const suffix = suffixMapping[specificationTypeSequenceArr[index]]
if (suffix) {
specificationValueSequenceArr[index] = `${val}${suffix}`
}
})
v.listShowSpecificationData = specificationValueSequenceArr?.join('/')
} else {
v.listShowSpecificationData = v?.specificationData?.replace(RegExp(';~;', 'g'), '/')
}
// v.listShowSpecificationData =
// val.goodsSpecificationNameList?.length > 1
// ? v.specificationData &&
// v.specificationData?.replace(/;~;/g, " ")
// : "-"
v.goodsInfo.goodsName = v.upgradeGoodsName v.goodsInfo.goodsName = v.upgradeGoodsName
// v.goodsInfo.goodsTypeName = val.goodsInfo?.goodsTypeName // v.goodsInfo.goodsTypeName = val.goodsInfo?.goodsTypeName
v.goodsInfo.goodsTypeName = types v.goodsInfo.goodsTypeName = types
......
...@@ -175,7 +175,7 @@ export const routerName = { ...@@ -175,7 +175,7 @@ export const routerName = {
{ {
authId: "9120510", authId: "9120510",
parentId: "91205", parentId: "91205",
label: "工资明细", label: "提成构成",
handle: "handleSalaryDetail" handle: "handleSalaryDetail"
} }
], ],
...@@ -708,6 +708,14 @@ export const routerName = { ...@@ -708,6 +708,14 @@ export const routerName = {
type: "primary", type: "primary",
handle: "handleImport" handle: "handleImport"
}, },
{
authId: "9121211",
parentId: "91212",
label: "复制绩效方案",
category: "Button",
type: "primary",
handle: "handleCopyConfig"
}
], ],
component: _import("residentManage/salaryPerformance/index") component: _import("residentManage/salaryPerformance/index")
}, },
...@@ -826,7 +834,31 @@ export const routerName = { ...@@ -826,7 +834,31 @@ export const routerName = {
false: "启用" false: "启用"
} }
} }
} },
{
authId: "9121406",
parentId: "91214",
label: "启用",
handle: "handleUp"
},
{
authId: "9121407",
parentId: "91214",
label: "禁用",
handle: "handleDown"
},
{
authId: "9121408",
parentId: "91214",
label: "查看",
handle: "handleView"
},
{
authId: "9121409",
parentId: "91214",
label: "删除",
handle: "handleDelete"
},
], ],
component: _import("residentManage/growUpGrade/indexControl") component: _import("residentManage/growUpGrade/indexControl")
}, },
......
...@@ -32,7 +32,9 @@ export default { ...@@ -32,7 +32,9 @@ export default {
goodsSpecificationSingleList: [], goodsSpecificationSingleList: [],
specificationSingleDetailList: [], specificationSingleDetailList: [],
selectedSceneCode: '', selectedSceneCode: '',
goodsType: '' goodsType: '',
baseGoodsNameEmpty: false,
scrmFlag: 'N'
} }
}, },
mutations: { mutations: {
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
// import { rangePickerOptions } from '@/common/format' // import { rangePickerOptions } from '@/common/format'
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { cdSignOpt, jdSyncOpt } from '@/common/constants.js' import { cdSignOpt, jdSyncOpt, receiptStatusOpt } from '@/common/constants.js'
import { nbcbAccDetailPage, nbcbAccDetailConfig, nbcbAccDetailBatchSync, nbcbReceiptPdfUrl } from '@api/theAssetData' import { nbcbAccDetailPage, nbcbAccDetailConfig, nbcbAccDetailBatchSync, nbcbReceiptPdfUrl } from '@api/theAssetData'
import inputRange from './components/inputRange' import inputRange from './components/inputRange'
import refetchDialog from './components/refetchDialog' import refetchDialog from './components/refetchDialog'
...@@ -115,7 +115,8 @@ export default { ...@@ -115,7 +115,8 @@ export default {
cdSign: '', cdSign: '',
postScript: '', postScript: '',
jdSync: '', jdSync: '',
transactionTime: '' transactionTime: '',
receiptStatus: ''
}, },
searchFormSearch: {}, searchFormSearch: {},
showFormData: [{ showFormData: [{
...@@ -212,6 +213,15 @@ export default { ...@@ -212,6 +213,15 @@ export default {
type: 'datePicker', type: 'datePicker',
isClear: true, isClear: true,
pickerOptions: 'rangePickerOptions' pickerOptions: 'rangePickerOptions'
}, {
label: '回单状态',
name: 'receiptStatus',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'receiptStatusOpt'
}], }],
getListApi: nbcbAccDetailPage, getListApi: nbcbAccDetailPage,
tableParams: { tableParams: {
...@@ -282,6 +292,13 @@ export default { ...@@ -282,6 +292,13 @@ export default {
width: '200px', width: '200px',
addHtml: "postScriptHtml" addHtml: "postScriptHtml"
}, { }, {
label: '回单状态',
prop: 'receiptStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.receiptStatusOpt.find(item => item.confId === cellValue.receiptStatus)?.confValue
}
}, {
label: '同步状态', label: '同步状态',
prop: 'jdSync', prop: 'jdSync',
width: '100px', width: '100px',
...@@ -304,7 +321,8 @@ export default { ...@@ -304,7 +321,8 @@ export default {
bankNameList: [], bankNameList: [],
curCodeList: [], curCodeList: [],
cdSignOpt: deepClone(cdSignOpt), cdSignOpt: deepClone(cdSignOpt),
jdSyncOpt: deepClone(jdSyncOpt) jdSyncOpt: deepClone(jdSyncOpt),
receiptStatusOpt: deepClone(receiptStatusOpt),
}, },
recordInfo: null, recordInfo: null,
...@@ -398,7 +416,8 @@ export default { ...@@ -398,7 +416,8 @@ export default {
cdSign: '', cdSign: '',
postScript: '', postScript: '',
jdSync: '', jdSync: '',
transactionTime: '' transactionTime: '',
receiptStatus: ''
} }
this.$refs.recordTable.refreshTable(false, true) this.$refs.recordTable.refreshTable(false, true)
}, },
......
<template>
<el-popover
v-if="isTextLong"
placement="top"
popper-class="base-popper"
trigger="hover"
:content="content"
>
<span ref="textRef" slot="reference" class="line-ellipsis">{{ truncatedText }}</span>
</el-popover>
<span v-else>{{ content || '-' }}</span>
</template>
<script>
export default {
name: 'EllipsisPopover',
props: {
content: {}
},
data() {
return {
maxWidth: 0
}
},
computed: {
truncatedText() {
const maxLength = Math.ceil(this.maxWidth / 12);
return this.content?.length > maxLength ? this.content.slice(0, maxLength) + '...' : this.content;
},
isTextLong() {
const maxLength = Math.ceil(this.maxWidth / 12);
return this.content?.length >= maxLength;
},
},
mounted() {
this.$nextTick(() => {
this.maxWidth = this.$refs.textRef?.getBoundingClientRect().width - 30 // 获取元素宽度
})
}
}
</script>
<style scoped>
.line-ellipsis {
display: inline-block;
width: 100%;
white-space: nowrap; /* 不换行 */
overflow: hidden; /* 隐藏超出部分 */
text-overflow: ellipsis; /* 显示省略号 */
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<d2-dialog
:title="title"
:is-visible.sync="selectGoodsVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleSelectGoodsConfirm"
@closeDialog="handleSelectGoodsClose"
class="selectGoods">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
<template slot="commodityCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入商品ID"
v-model.trim="searchForm['commodityCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'commodityCode')" />
</template>
<template slot="type">
<el-input :style="{ width: '100%'}"
placeholder="请输入商品编码"
v-model.trim="searchForm['type']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'type')" />
</template>
<template slot="thirdPartyCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入第三方编码"
v-model.trim="searchForm['thirdPartyCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'thirdPartyCode')" />
</template>
<template slot="baseGoodsCommodityCode">
<el-input :style="{ width: '100%'}"
placeholder="请输入系列ID"
v-model.trim="searchForm['baseGoodsCommodityCode']"
:clearable="true"
:maxlength="50"
@input="event => searchInput(event, 'baseGoodsCommodityCode')" />
</template>
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'" filterable
@change="selectAddAttr($event)" clearable
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }">
</el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
</div>
<d2-table ref="groundingIndexTable"
:has-num="false"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun">
<template slot="select_btn" slot-scope="scope">
<el-radio v-model="selectedRowId" :label="scope.scope.id" :disabled="packageSelectIds && packageSelectIds.includes(scope.scope.id)">{{ '' }}</el-radio>
</template>
</d2-table>
</d2-dialog>
</template>
<script>
import { getUpgradeProductList } from '@api/productManage'
import { getAllCategory } from '@api/product'
import { filterSpecsStr } from '../filterOption'
export default {
name: 'SelectGoodsDialog',
props: {
title: {
type: String,
default: "选择商品"
},
selectGoodsVisible: {
type: Boolean,
default: false
},
upgradeGoodsId: {},
packageSelectIds: {}
},
data() {
return {
getListApi: getUpgradeProductList,
showFormData: [{
label: '商品名称',
name: 'upgradeGoodsName',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商品ID',
name: 'commodityCode',
addHtml: 'commodityCode'
}, {
label: '规格',
name: 'specificationData',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '商品编码',
name: 'type',
addHtml: 'type'
}, {
label: '第三方编码',
name: 'thirdPartyCode',
addHtml: 'thirdPartyCode'
}, {
label: '适用车型',
name: 'carTypeSearch',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '所属系列',
name: 'goodsName',
type: 'input',
maxlength: 50,
isClear: true,
keyFn: this.keyDowmGetList
}, {
label: '系列ID',
name: 'baseGoodsCommodityCode',
addHtml: 'baseGoodsCommodityCode'
}, {
label: '所属分类',
name: 'goodsType',
addHtml: 'goodsCascader'
}],
searchForm: {
upgradeGoodsName: '',
commodityCode: '',
specificationData: '',
type: '',
thirdPartyCode: '',
carTypeSearch: '',
goodsName: '',
baseGoodsCommodityCode: ''
},
tempGoodsType: [],
baseData: {
productTypeList: [],
productList: []
},
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableColumns: [{
label: '',
width: '60',
addHtml: 'select_btn'
}, {
label: '序号',
prop: 'ownSerialNum',
type: 'ownSerialNum',
width: '60'
}, {
label: '商品名称',
prop: 'upgradeGoodsName',
width: 150,
formatter: (cellValue) => {
return cellValue.upgradeGoodsName || '-'
}
}, {
label: '商品ID',
prop: 'commodityCode',
width: 180,
formatter: (cellValue) => {
return cellValue.commodityCode || '-'
}
}, {
label: '规格',
prop: 'specificationData',
formatter: (cellValue) => {
return this.filterSpecsStr(cellValue)
}
}, {
label: '商品编码',
prop: 'type',
formatter: (cellValue) => {
return cellValue.type || '-'
}
}, {
label: '第三方编码',
prop: 'thirdPartyCode',
width: 100,
formatter: (cellValue) => {
return cellValue?.thirdPartyCode || '-'
}
}, {
label: '适用车型',
prop: '',
formatter: (cellValue) => {
return cellValue?.carTypeConfigList?.length ? cellValue.carTypeConfigList.map(item => item.seriesName).join('/') : '-'
}
}, {
label: '所属系列',
prop: 'goodsName',
formatter: (cellValue) => {
return cellValue?.goodsInfo?.goodsName || '-'
},
width: 140
}, {
label: '系列ID',
prop: 'baseGoodsCommodityCode',
width: 170
}, {
label: '所属分类',
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
},
width: 170
}]
},
selectedRowId: '',
filterSpecsStr // 处理规格单位
}
},
mounted() {
this.selectedRowId = this.upgradeGoodsId
// 获取全部类目 屏蔽服务商自建类目
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
},
methods: {
searchInput(e, key) {
if (!/^[a-zA-Z0-9]*$/.test(e)) {
this.searchForm[key] = e.replace(/[^a-zA-Z0-9]/g, '')
}
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
const temp = {}
temp[this.showFormData[index].optionId] = ''
temp[this.showFormData[index].optionLabel] = '全部'
this.baseData[item.optionsName].unshift(temp)
}
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
}
})
},
setTableFinishFun(data) {
this.tableData = data
},
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
},
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
handleSelectGoodsConfirm() {
let selectData = this.tableData?.find(v => v.id == this.selectedRowId)
if (!selectData) return this.$message.warning('请选择商品')
this.$emit('handleSelectGoodsConfirm', selectData)
},
handleSelectGoodsClose() {
this.$emit('handleSelectGoodsClose')
},
handleReset() {
this.searchForm = {
upgradeGoodsName: '',
commodityCode: '',
specificationData: '',
type: '',
thirdPartyCode: '',
carTypeSearch: '',
goodsName: '',
baseGoodsCommodityCode: ''
}
this.tempGoodsType = []
// 重新查询
this.$refs.groundingIndexTable.refreshTable(true, true)
},
}
}
</script>
<style lang="scss" scoped>
.show-search {
::v-deep .d2-search-block {
padding: 0;
}
}
</style>
\ No newline at end of file \ No newline at end of file
export function filterSpecsStr(data) {
let specificationTypeSequenceArr = (data?.specificationTypeSequence && data?.specificationTypeSequence?.split(';~;')) || []
let specificationValueSequenceArr = data?.specificationData?.split(';~;')
const suffixMapping = {
1: '年',
2: '(km/万)',
3: '万'
}
if (specificationTypeSequenceArr?.length) {
specificationValueSequenceArr?.forEach((val, index) => {
const suffix = suffixMapping[specificationTypeSequenceArr[index]]
if (suffix) {
specificationValueSequenceArr[index] = `${val}${suffix}`
}
})
return specificationValueSequenceArr?.join('/')
} else if (data?.specificationData?.includes(';~;')) {
return data?.specificationData?.replace(RegExp(';~;', 'g'), '/')
} else {
return '-'
}
}
\ No newline at end of file \ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input> <el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="复制门店:" prop="selectMerchantObj"> <el-form-item label="复制门店:" prop="selectMerchantObj">
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword <el-select v-model="selectData.selectMerchantObj" remote reserve-keyword multiple collapse-tags
placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod" placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable> v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable>
<el-option v-for="subItem in storeData" :key="subItem.merchantId" <el-option v-for="subItem in storeData" :key="subItem.merchantId"
...@@ -121,7 +121,6 @@ export default { ...@@ -121,7 +121,6 @@ export default {
}, },
handleBatchCopyConfirm() { handleBatchCopyConfirm() {
this.$refs.batchCopyForm.validate((valid) => { this.$refs.batchCopyForm.validate((valid) => {
console.log(valid)
if (valid) { if (valid) {
this.$emit('handleBatchCopyConfirm', this.selectData?.selectMerchantObj) this.$emit('handleBatchCopyConfirm', this.selectData?.selectMerchantObj)
} }
......
...@@ -26,50 +26,42 @@ ...@@ -26,50 +26,42 @@
<div class="incid_box"> <div class="incid_box">
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex"> <div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(formData[item.key]) ? subItem.label + `(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div> <div class="label">{{ subItem.unit ? (membraneTypeList.includes(formData[item.key]) ? subItem.label + `(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value text-hide">{{ subItem.unit ? priceFilter(formData[subItem.value]) : formData[subItem.value] }}</div> <div class="value">
<ellipsis-popover :content="subItem.unit ? priceFilter(formData.upgradeGoods[subItem.value]) : formData.upgradeGoods[subItem.value] || ''"></ellipsis-popover>
</div> </div>
<!-- 商品分类 1太阳膜/延保类 --> </div>
<!-- 权益/延保非第三方展示 -->
<div class="item" v-if="(equitySceneType.includes(formData[item.key]) || extendedPosiType.includes(formData[item.key])) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">嘀加成本元/件:</div>
<div class="value">
<ellipsis-popover :content="priceFilter(formData.upgradeGoods['djCost']) || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 1太阳膜 -->
<div class="item" v-if="formData[item.key] == '1'"> <div class="item" v-if="formData[item.key] == '1'">
<div class="label">部位:</div> <div class="label">部位:</div>
<div class="value">{{ formData['positionNames'] }}</div> <div class="value">
<ellipsis-popover :content="formData.upgradeGoods['positionNames'] || ''"></ellipsis-popover>
</div> </div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ formData['warrantyPeriod'] }}</div>
</div> </div>
<!-- 商品分类 权益升级 (线上126) --> <!-- 商品分类 权益服务 非第三方 -->
<div class="item" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)"> <div class="item" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务时间/年:</div> <div class="label">服务项目:</div>
<div class="value">{{ formData['serviceYears'] }}</div> <div class="value">
<ellipsis-popover :content="formData.upgradeGoods['serviceItemNames'] || ''"></ellipsis-popover>
</div> </div>
<!-- 商品分类 权益升级 (线上126) --> </div>
<!-- 商品分类 权益服务 -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])"> <div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">实体卡:</div> <div class="label">实体卡:</div>
<div class="value">{{ formData['entityCardFlag'] == 'Y' ? '是' : '否' }}</div> <div class="value">{{ formData.upgradeGoods['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<div class="item" v-if="equitySceneType.includes(formData[item.key]) || extendedPosiType.includes(formData[item.key])">
<div class="label">适用车价:</div>
<div v-if="!filterEmpty(formData['minSuitCarPrice']) && !filterEmpty(formData['maxSuitCarPrice'])">{{ formData['minSuitCarPrice'] }} - {{ formData['maxSuitCarPrice'] }}万</div>
<div v-else>-</div>
</div> </div>
<!-- 商品分类 权益升级 (线上126) --> <!-- 质保年限 膜类展示-->
<div class="item flex_1" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)"> <div class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">服务项目:</div> <div class="label">质保年限/年:</div>
<div class="value">{{ formData['serviceItemNames'] }}</div> <div class="value">
</div> <ellipsis-popover :content="`${formData.upgradeGoods['warrantyPeriod']}年` || ''"></ellipsis-popover>
<!-- 延保类非第三方供应 -->
<div class="item" v-if="extendedPosiType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务项目:</div>
<div class="value text-hide">{{ formData['serviceItemNames'] || '-' }}</div>
</div>
<div class="item" v-if="extendedPosiType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务年限:</div>
<div class="value">{{ !filterEmpty(formData.serviceYears) ? (formData.serviceYears + '年') : '-' }}</div>
</div> </div>
<div class="item" v-if="extendedPosiType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">公里数:</div>
<div class="value">{{ !filterEmpty(formData.kilometers) ? (formData.kilometers + '万公里') : '-' }}</div>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -161,11 +153,13 @@ import { deepClone } from '@/common/util' ...@@ -161,11 +153,13 @@ import { deepClone } from '@/common/util'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import relateStoreTable from "./relateStoreTable.vue" import relateStoreTable from "./relateStoreTable.vue"
import ellipsisPopover from '../../components/ellipsisPopover.vue'
export default { export default {
name: 'GroundingForm', name: 'GroundingForm',
components: { components: {
relateStoreTable, relateStoreTable,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer') 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
ellipsisPopover
}, },
data() { data() {
return { return {
...@@ -338,7 +332,7 @@ export default { ...@@ -338,7 +332,7 @@ export default {
priceFilter(num) { priceFilter(num) {
var pow = Math.pow(10, 2) var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-' if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2) return `${(Math.round(num * pow) / pow).toFixed(2)}元`
}, },
handleClose() { handleClose() {
this.$emit('handleClose') this.$emit('handleClose')
...@@ -395,6 +389,9 @@ export default { ...@@ -395,6 +389,9 @@ export default {
width: 150px; width: 150px;
text-align: right; text-align: right;
} }
.value {
width: calc(100% - 150px);
}
.text-hide { .text-hide {
width: calc(100% - 150px); width: calc(100% - 150px);
overflow: hidden; overflow: hidden;
......
...@@ -56,6 +56,9 @@ export const packageGoodsForm = [{ ...@@ -56,6 +56,9 @@ export const packageGoodsForm = [{
label: '商品名称', label: '商品名称',
value: 'upgradeGoodsName' value: 'upgradeGoodsName'
}, { }, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码', label: '商品编码',
value: 'type' value: 'type'
}, { }, {
...@@ -70,6 +73,9 @@ export const packageGoodsForm = [{ ...@@ -70,6 +73,9 @@ export const packageGoodsForm = [{
value: 'upgradePrice', value: 'upgradePrice',
unit: true unit: true
}, { }, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列', label: '所属系列',
value: 'goodsName' value: 'goodsName'
}, { }, {
...@@ -152,6 +158,7 @@ export const packageGoodsForm = [{ ...@@ -152,6 +158,7 @@ export const packageGoodsForm = [{
type: 'input', type: 'input',
width: '432px', width: '432px',
unit: true, unit: true,
isDisabled: false,
handleInput: true handleInput: true
}, { }, {
name: 'thirdPartyCost', name: 'thirdPartyCost',
...@@ -173,6 +180,9 @@ export const packageGoodsDetail = [ ...@@ -173,6 +180,9 @@ export const packageGoodsDetail = [
label: '商品名称', label: '商品名称',
value: 'upgradeGoodsName' value: 'upgradeGoodsName'
}, { }, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码', label: '商品编码',
value: 'type' value: 'type'
}, { }, {
...@@ -187,6 +197,9 @@ export const packageGoodsDetail = [ ...@@ -187,6 +197,9 @@ export const packageGoodsDetail = [
value: 'upgradePrice', value: 'upgradePrice',
unit: true unit: true
}, { }, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列', label: '所属系列',
value: 'goodsName' value: 'goodsName'
}, { }, {
......
...@@ -16,6 +16,7 @@ import { mapActions } from 'vuex' ...@@ -16,6 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data' import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { filterSpecsStr } from '../filterOption'
export default { export default {
name: 'GroundingDetail', name: 'GroundingDetail',
components: { components: {
...@@ -53,6 +54,9 @@ export default { ...@@ -53,6 +54,9 @@ export default {
label: '商品名称', label: '商品名称',
value: 'upgradeGoodsName' value: 'upgradeGoodsName'
}, { }, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码', label: '商品编码',
value: 'type' value: 'type'
}, { }, {
...@@ -67,6 +71,9 @@ export default { ...@@ -67,6 +71,9 @@ export default {
value: 'upgradePrice', value: 'upgradePrice',
unit: true unit: true
}, { }, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列', label: '所属系列',
value: 'goodsName' value: 'goodsName'
}, { }, {
...@@ -159,7 +166,8 @@ export default { ...@@ -159,7 +166,8 @@ export default {
1: '质保权益卡' 1: '质保权益卡'
}, },
detailId: '', detailId: '',
productServiceItemList: [] productServiceItemList: [],
filterSpecsStr
} }
}, },
mounted() { mounted() {
...@@ -183,7 +191,7 @@ export default { ...@@ -183,7 +191,7 @@ export default {
const productType = [] const productType = []
if (res?.upgradeProductFlag == 'Y') productType.push(2) if (res?.upgradeProductFlag == 'Y') productType.push(2)
if (res?.baseProductFlag == 'Y') productType.push(1) if (res?.baseProductFlag == 'Y') productType.push(1)
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = res.goodsInfo const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = res.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName] const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-') const result = types.filter(type => type).join('-')
const productTypeTextArr = [] const productTypeTextArr = []
...@@ -203,29 +211,27 @@ export default { ...@@ -203,29 +211,27 @@ export default {
if (res.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高) if (res.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList arr = upgradeSupplyModeList
} }
res.tempGoodsTypeName = result // 所属分类
res.productTypeStr = productTypeTextArr?.length ? productTypeTextArr.join(';') : '-' res.productTypeStr = productTypeTextArr?.length ? productTypeTextArr.join(';') : '-'
res.warrantyTypeStr = this.warrantyTypeShow[res?.warrantyType] || '-' res.warrantyTypeStr = this.warrantyTypeShow[res?.warrantyType] || '-'
res.baseSupplyModeStr = baseSupplyModeList?.filter(v => v.confId == res.baseSupplyMode)[0]?.confName || '' res.baseSupplyModeStr = baseSupplyModeList?.filter(v => v.confId == res.baseSupplyMode)[0]?.confName || ''
res.upgradeSupplyModeStr = arr?.filter(v => v.confId == res.upgradeSupplyMode)[0]?.confName || '' res.upgradeSupplyModeStr = arr?.filter(v => v.confId == res.upgradeSupplyMode)[0]?.confName || ''
res.sceneName = sceneList[res.sceneType] || '-' res.sceneName = sceneList[res.sceneType] || '-'
res.upgradePrice = res.upgradeGoods?.upgradePrice
res.purchasePrice = res.upgradeGoods?.purchasePrice
res.positionNames = positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '' // 部位
res.productType = productType res.productType = productType
res.serviceItemNames = res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return this.extendedPosiType.includes(res?.goodsType) ? item.serviceName : `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(',') // 服务项目
res.warrantyPeriod = res.upgradeGoods?.warrantyPeriod
res.serviceYears = res.upgradeGoods?.serviceYears
res.merchantGoodsRefList = res.merchantGoodsRefList || [] res.merchantGoodsRefList = res.merchantGoodsRefList || []
res.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || ''
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
res.voucherList = res?.voucherList || [] res.voucherList = res?.voucherList || []
res.positionStr = deepClone(this.positionTypeList)?.filter(val => res?.position == val.position)[0]?.confName || '' res.positionStr = deepClone(this.positionTypeList)?.filter(val => res?.position == val.position)[0]?.confName || ''
res.minSuitCarPrice = res?.upgradeGoods?.minSuitCarPrice
res.maxSuitCarPrice = res?.upgradeGoods?.maxSuitCarPrice
res.supplierCode = res?.goodsInfo?.supplierCode res.supplierCode = res?.goodsInfo?.supplierCode
res.financeCheckFlagStr = res?.financeCheckFlag == 'Y' ? '开启' : res?.financeCheckFlag == 'N' ? '关闭' : '-' res.financeCheckFlagStr = res?.financeCheckFlag == 'Y' ? '开启' : res?.financeCheckFlag == 'N' ? '关闭' : '-'
res.kilometers = res?.upgradeGoods?.kilometers res.upgradeGoods = {
...res.upgradeGoods,
goodsName: res.goodsInfo.goodsName,
tempGoodsTypeName: result,
serviceItemNames: res?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(res?.upgradeGoods),
carTypeConfigName: res?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
upgradeCommodityCode: res?.upgradeGoods?.commodityCode
}
this.editData = res || {} this.editData = res || {}
this.$nextTick(() => { this.$nextTick(() => {
this.show = true this.show = true
......
...@@ -471,7 +471,7 @@ export default { ...@@ -471,7 +471,7 @@ export default {
parentProp: 'goodsInfo', parentProp: 'goodsInfo',
prop: 'goodsTypeName', prop: 'goodsTypeName',
formatter: (cellValue) => { formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName] const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-') const result = types.filter(type => type).join('-')
return result return result
...@@ -977,11 +977,16 @@ export default { ...@@ -977,11 +977,16 @@ export default {
}, },
// 批量复制弹窗确定 // 批量复制弹窗确定
handleBatchCopyConfirm(data) { handleBatchCopyConfirm(data) {
let merchantGoodsRefList = []
data?.forEach(v => {
merchantGoodsRefList.push({
merchantId: v.merchantId,
merchantName: v.merchantName
})
})
const params = { const params = {
ids: this.batchCopySelectData.map(v => { return v.id }) || [], // 商品id ids: this.batchCopySelectData.map(v => { return v.id }) || [], // 商品id
sceneType: this.batchCopySelectScene, // 业务场景 merchantGoodsRefList
merchantId: data?.merchantId,
merchantName: data?.merchantName
} }
batchUpdateBatchCopy(params).then(() => { batchUpdateBatchCopy(params).then(() => {
this.notice.okTips() this.notice.okTips()
......
...@@ -27,50 +27,44 @@ ...@@ -27,50 +27,44 @@
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex"> <div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(ele[item.key]) ? subItem.label + <div class="label">{{ subItem.unit ? (membraneTypeList.includes(ele[item.key]) ? subItem.label +
`(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div> `(元)/${subItem.value == 'purchasePrice' ? '卷' : '车'}` : (subItem.label + '(元)/件')) : subItem.label }}:</div>
<div class="value text-hide">{{ subItem.unit ? priceFilter(ele[subItem.value]) : ele[subItem.value] }}</div> <div class="value">
<ellipsis-popover :content="subItem.unit ? priceFilter(ele.upgradeGoods[subItem.value]) : ele.upgradeGoods[subItem.value] || ''"></ellipsis-popover>
</div>
</div>
<!-- 权益/延保非第三方展示 -->
<div class="item" v-if="(equitySceneType.includes(ele[item.key]) || extendedPosiType.includes(ele[item.key])) && !baseConfig.supplierCode.includes(`${ele.supplierCode}`)">
<div class="label">嘀加成本元/件:</div>
<div class="value">
<ellipsis-popover :content="priceFilter(ele.upgradeGoods['djCost'])"></ellipsis-popover>
</div>
</div> </div>
<!-- 商品分类 延保类 --> <!-- 商品分类 延保类 -->
<div class="item" v-if="ele[item.key] == 1"> <div class="item" v-if="ele[item.key] == 1">
<div class="label">部位:</div> <div class="label">部位:</div>
<div class="value">{{ ele['positionNames'] }}</div> <div class="value">
<ellipsis-popover :content="ele.upgradeGoods['positionNames'] || ''"></ellipsis-popover>
</div> </div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ ele['warrantyPeriod'] }}</div>
</div> </div>
<!-- 商品分类 权益升级 (线上126) --> <!-- 商品分类 权益升级 -->
<div class="item" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)"> <div class="item" v-if="(equitySceneType.includes(ele[item.key]) || extendedPosiType.includes(ele[item.key])) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务时间/年:</div> <div class="label">服务项目:</div>
<div class="value">{{ ele['serviceYears'] }}</div> <div class="value">
<ellipsis-popover :content="ele.upgradeGoods['serviceItemNames'] || ''"></ellipsis-popover>
</div>
</div> </div>
<!-- 商品分类 权益升级 (线上126) --> <!-- 商品分类 权益服务 -->
<div class="item" v-if="equitySceneType.includes(ele[item.key])"> <div class="item" v-if="equitySceneType.includes(ele[item.key])">
<div class="label">实体卡:</div> <div class="label">实体卡:</div>
<div class="value">{{ ele['entityCardFlag'] == 'Y' ? '是' : '否' }}</div> <div class="value">
<ellipsis-popover :content="ele.upgradeGoods['entityCardFlag'] == 'Y' ? '是' : '否'"></ellipsis-popover>
</div> </div>
<div class="item" v-if="equitySceneType.includes(ele[item.key]) || extendedPosiType.includes(ele[item.key])">
<div class="label">适用车价:</div>
<div v-if="!filterEmpty(ele['minSuitCarPrice']) && !filterEmpty(ele['maxSuitCarPrice'])">{{ ele['minSuitCarPrice'] }} - {{ ele['maxSuitCarPrice'] }}万</div>
<div v-else>-</div>
</div> </div>
<!-- 商品分类 权益升级 (线上126) --> <!-- 质保年限 膜类展示-->
<div class="item flex_1" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)"> <div class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">服务项目:</div> <div class="label">质保年限/年:</div>
<div class="value">{{ ele['serviceItemNames'] }}</div> <div class="value">
</div> <ellipsis-popover :content="`${ele.upgradeGoods['warrantyPeriod']}年` || ''"></ellipsis-popover>
<!-- 延保类非第三方 -->
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务项目:</div>
<div class="value text-hide">{{ ele['serviceItemNames'] || '-' }}</div>
</div>
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务年限:</div>
<div class="value">{{ !filterEmpty(ele['serviceYears']) ? ele['serviceYears'] + '年' : '-' }}</div>
</div> </div>
<div class="item" v-if="extendedPosiType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">公里数:</div>
<div class="value">{{ !filterEmpty(ele['kilometers']) ? ele['kilometers'] + '万公里' : '-' }}</div>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -180,11 +174,13 @@ import { deepClone } from '@/common/util' ...@@ -180,11 +174,13 @@ import { deepClone } from '@/common/util'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import relateStoreTable from "../../grounding/components/relateStoreTable.vue" import relateStoreTable from "../../grounding/components/relateStoreTable.vue"
import ellipsisPopover from '../../components/ellipsisPopover.vue'
export default { export default {
name: 'GroundingForm', name: 'GroundingForm',
components: { components: {
relateStoreTable, relateStoreTable,
'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer') 'el-image-viewer': () => import('element-ui/packages/image/src/image-viewer'),
ellipsisPopover
}, },
data() { data() {
return { return {
...@@ -331,7 +327,7 @@ export default { ...@@ -331,7 +327,7 @@ export default {
priceFilter(num) { priceFilter(num) {
var pow = Math.pow(10, 2) var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-' if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2) return `${(Math.round(num * pow) / pow).toFixed(2)}元`
}, },
// 返回 // 返回
handleClose() { handleClose() {
...@@ -400,6 +396,9 @@ export default { ...@@ -400,6 +396,9 @@ export default {
width: 150px; width: 150px;
text-align: right; text-align: right;
} }
.value{
width: calc(100% - 150px);
}
.text-hide { .text-hide {
width: calc(100% - 150px); width: calc(100% - 150px);
overflow: hidden; overflow: hidden;
......
...@@ -16,6 +16,7 @@ import { mapActions } from 'vuex' ...@@ -16,6 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main" import { baseConfig } from "@/main"
import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data' import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data'
import { filterSpecsStr } from "../filterOption"
export default { export default {
name: 'PackageDetail', name: 'PackageDetail',
components: { components: {
...@@ -118,6 +119,7 @@ export default { ...@@ -118,6 +119,7 @@ export default {
0: '质保卡', 0: '质保卡',
1: '质保权益卡' 1: '质保权益卡'
}, },
filterSpecsStr
} }
}, },
mounted() { mounted() {
...@@ -150,7 +152,7 @@ export default { ...@@ -150,7 +152,7 @@ export default {
if (val.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高) if (val.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList arr = upgradeSupplyModeList
} }
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName] const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-') const result = types.filter(type => type).join('-')
this.editForm[1].formBlock.push(packageGoodsDetail) this.editForm[1].formBlock.push(packageGoodsDetail)
...@@ -159,25 +161,8 @@ export default { ...@@ -159,25 +161,8 @@ export default {
res.groundingGoodsList.push({ res.groundingGoodsList.push({
goodsType: val?.goodsType, // 类目值 goodsType: val?.goodsType, // 类目值
upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id
upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称
goodsAlias: val?.goodsAlias || '-', // 商品别名 goodsAlias: val?.goodsAlias || '-', // 商品别名
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result, // 商品所属类目
// upgradePrice: val?.upgradePrice, // 参考售价
positionStr: deepClone(this.positionTypeList)?.filter(subVal => val?.position == subVal.position)[0]?.confName || '', // 上架部位 positionStr: deepClone(this.positionTypeList)?.filter(subVal => val?.position == subVal.position)[0]?.confName || '', // 上架部位
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // 部位名称
positionNamesArr: positionNamesArr, // 多部位数组
purchasePrice: val?.upgradeGoods?.purchasePrice, // 采购价
upgradeCommodityCode: val?.upgradeCommodityCode, // 商品ID
serviceYears: val?.upgradeGoods?.serviceYears, // 服务时间
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return this.extendedPosiType.includes(val?.goodsType) ? item.serviceName : `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
kilometers: val?.upgradeGoods?.kilometers, // 公里数
type: val?.upgradeGoods?.type, // 编码
thirdPartyCode: val?.upgradeGoods?.thirdPartyCode, // 第三方编码
entityCardFlag: val?.upgradeGoods?.entityCardFlag, // 是否实体卡
goodsName: val?.goodsName, // 素材名称(所属系列)
minSuitCarPrice: val?.upgradeGoods?.minSuitCarPrice, // 适用车价最低价
maxSuitCarPrice: val?.upgradeGoods?.maxSuitCarPrice, // 适用车价最高价
sellPrice: val?.sellPrice, // 售价 sellPrice: val?.sellPrice, // 售价
minSellPrice: val?.minSellPrice, // 最低售价 minSellPrice: val?.minSellPrice, // 最低售价
validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价 validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价
...@@ -191,7 +176,19 @@ export default { ...@@ -191,7 +176,19 @@ export default {
virtualAccountCost: val?.virtualAccountCost, // 虚拟对账成本 virtualAccountCost: val?.virtualAccountCost, // 虚拟对账成本
recoveryCost: val?.recoveryCost, // 回收成本 recoveryCost: val?.recoveryCost, // 回收成本
warrantyPeriod: val?.upgradeGoods?.warrantyPeriod, // 质保年限 warrantyPeriod: val?.upgradeGoods?.warrantyPeriod, // 质保年限
upgradePrice: val?.upgradeGoods?.upgradePrice // 参考售价 upgradePrice: val?.upgradeGoods?.upgradePrice, // 参考售价
upgradeGoods: {
...val?.upgradeGoods,
goodsName: val.goodsName,
upgradeGoodsName: val?.upgradeGoodsName,
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result,
serviceItemNames: val?.upgradeGoods?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
specificationData: this.filterSpecsStr(val?.upgradeGoods),
carTypeConfigName: val?.upgradeGoods?.carTypeConfigList?.map(item => item.seriesName).join('/'),
upgradeCommodityCode: val?.upgradeCommodityCode
}
}) })
}) })
res.sceneName = sceneList[res.sceneType] || '-' res.sceneName = sceneList[res.sceneType] || '-'
......
<!-- 适用车型弹窗 -->
<template>
<div>
<d2-dialog title="选择适用车型"
:is-visible.sync="carSeriesVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleCarSeriesConfirm"
@closeDialog="handleCarSeriesClose"
class="carSeries">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable"
:data="selectingData"
height="320px"
class="table"
border
@select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号"
align="center"
type="index"
width="55" />
<el-table-column
prop="seriesName"
label="车系"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="childName"
label="所属子品牌"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="brandName"
label="所属品牌"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
</el-table>
<el-pagination small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<div class="selectedBox">
<div class="title">
<div class="title_txt">已选</div>
<div class="title_btn" @click="clearSelect">清空</div>
</div>
<div class="content">
<div class="item" v-for="(subItem, subIdx) in selectedData" :key="subIdx">
<div class="item_txt"><span>{{ subItem.seriesName }}</span></div>
<div class="del_item" @click="delItem(subItem)"><i class="el-icon-error"></i></div>
</div>
</div>
</div>
</el-row>
</d2-dialog>
</div>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'CarSeriesDialog',
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 10,
curId: '',
isVisible: false
}
},
props: {
carSeriesVisible: {
type: Boolean,
default: false
},
carSeriesApi: {
type: Function,
default: () => { }
},
carSeriesSelected: {
type: Array,
default: () => []
},
carSeriesSearchForm: {
type: Object,
default: () => { }
},
extendServicePartList: {
type: Array,
default: () => []
}
},
mounted() {
this.selectedData = deepClone(this.carSeriesSelected)
this.curId = deepClone(this.carSeriesSelected)[0]?.gradeId || deepClone(this.carSeriesSelected)[0]?.id
this.getSelectingList()
},
methods: {
getSelectingList() {
let params = deepClone(this.carSeriesSearchForm)
this.carSeriesApi({
...params,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list || []
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.seriesId)
this.selectingData.forEach((item) => {
exitIds.includes(item.seriesId) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.seriesId === row.seriesId
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.seriesId !== row.seriesId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.seriesId === item.seriesId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
clearSelect() {
this.selectedData = []
this.$refs.seletingTable.clearSelection()
},
delItem(row) {
this.selectedData = this.selectedData.filter(item => item.seriesId !== row.seriesId)
const obj = this.selectingData.find(v => v.seriesId == row.seriesId)
if (obj) this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleCarSeriesConfirm() {
if (!this.selectedData?.length) return this.$message.warning('请选择适用车型')
this.$emit('handleCarSeriesConfirm', this.selectedData)
},
handleCarSeriesClose() {
this.$emit('handleCarSeriesClose')
}
}
}
</script>
<style lang="scss" scoped>
.carSeries .table {
margin: 0 auto 20px !important;
width: 100%;
}
.carSeries .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 2;
}
.selectedBox{
flex: 1;
height: 320px;
border: 1px solid #E5E5E5;
margin-left: 10px;
.title{
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px 0 16px;
border-bottom: 1px solid #E5E5E5;
.title_txt{
font-size: 16px;
font-weight: 600;
color: #333333;
}
.title_btn{
cursor: pointer;
font-size: 14px;
color: #185EFE;
}
}
.content{
padding: 16px 10px;
height: calc(100% - 75px);
overflow-y: scroll;
.item{
display: flex;
align-items: center;
justify-content: space-between;
height: 32px;
color: #666666;
padding: 0 8px;
.del_item{
cursor: pointer;
}
}
.item:hover{
background: #F6F9FF;
}
}
}
}
.service-service .carSeries .el-table .cell,
.d2-form .carSeries .el-table .cell {
line-height: 26px !important;
}
.service-service .carSeries .el-table--medium td,
.d2-form .carSeries .el-table--medium td {
padding: 6px 8px !important;
}
.carSeries .red {
color: red;
}
.carSeries .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.text_hide{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .text_hide p{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
}
::v-deep .el-radio__original {
display: none !important;
}
::v-deep .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
.pdfDialog{
::v-deep .el-dialog__header {
padding: 10px 16px 4px;
background-color: #141516;
.el-dialog__title {
color: #fff;
font-size: 16px;
}
}
::v-deep .el-dialog__body {
padding: 0;
background-color: #202223;
}
}
</style>
...@@ -45,32 +45,42 @@ ...@@ -45,32 +45,42 @@
</p> </p>
<div class="flex_box"> <div class="flex_box">
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="规格:">
<ellipsis-popover :content="item.specificationName"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="编码:"> label="编码:">
<span>{{ item.type }}</span> <ellipsis-popover :content="item.type"></ellipsis-popover>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
label="第三方编码:"> label="第三方编码:">
<span>{{ item.thirdPartyCode }}</span> <ellipsis-popover :content="item.thirdPartyCode"></ellipsis-popover>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'"> :label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<span>{{ !filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '-' }}</span> <ellipsis-popover :content="!filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '-'"></ellipsis-popover>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item" <el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'"> :label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<span>{{ !filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '-' }}</span> <ellipsis-popover :content="!filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '-'"></ellipsis-popover>
</el-form-item> </el-form-item>
<el-form-item <el-form-item v-if="(equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) || extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType'))) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))" class="d2-drawer-item"
class="d2-drawer-item" :label="'嘀加成本(元)/件:'">
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))" <ellipsis-popover :content="!filterEmpty(item.djCost) ? priceFilter(item.djCost) : '-'"></ellipsis-popover>
label="质保年限:"> </el-form-item>
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '-' }}</span> <el-form-item class="d2-drawer-item" label="适用车型:">
<ellipsis-popover :content="item.carSeriesName"></ellipsis-popover>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
class="d2-drawer-item" class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))" v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务时间:"> label="服务项目:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '-' }}</span> <ellipsis-popover :content="!filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<ellipsis-popover :content="item.positionNames || '-'"></ellipsis-popover>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
class="d2-drawer-item" class="d2-drawer-item"
...@@ -78,38 +88,11 @@ ...@@ -78,38 +88,11 @@
label="实体卡:"> label="实体卡:">
<span>{{ item.entityCardFlag == 'Y' ? '是' : '否' }}</span> <span>{{ item.entityCardFlag == 'Y' ? '是' : '否' }}</span>
</el-form-item> </el-form-item>
<el-form-item class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) || extendedPosiType.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="适用车价:">
<span v-if="!filterEmpty(item.minSuitCarPrice) && !filterEmpty(item.maxSuitCarPrice)">{{ item.minSuitCarPrice }} - {{ item.maxSuitCarPrice }}万</span>
<span v-else>-</span>
</el-form-item>
<el-form-item <el-form-item
class="d2-drawer-item flex_1" class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))" v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="服务项目:"> label="质保年限:">
<span>{{ !filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '-' }}</span> <ellipsis-popover :content="!filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item flex_1"
v-if="$$(commodityInfo.goodsInfo,'goodsType') == 1"
label="部位:">
<span>{{ item.positionNames || '-' }}</span>
</el-form-item>
<!-- 延保类非第三方 -->
<el-form-item class="d2-drawer-item"
v-if="extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务项目:">
<span style="display: inline-block;width: 210px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap">{{ !filterEmpty(item.extendServiceItemNames) ? item.extendServiceItemNames : '-' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务年限:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '-' }}</span>
</el-form-item>
<el-form-item class="d2-drawer-item"
v-if="extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="公里数:">
<span>{{ !filterEmpty(item.kilometers) ? (item.kilometers + '万公里') : '-' }}</span>
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -137,8 +120,11 @@ ...@@ -137,8 +120,11 @@
import { getGoodsInfoById } from '@/api/commodity' import { getGoodsInfoById } from '@/api/commodity'
import { deepClone, Util } from '@/common/util' import { deepClone, Util } from '@/common/util'
import { baseConfig } from '@/main' import { baseConfig } from '@/main'
import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption'
export default { export default {
name: 'DrawerDetail', name: 'DrawerDetail',
components: {ellipsisPopover},
data() { data() {
return { return {
equitySceneType: baseConfig.equitySceneType || [], // 权益类目 equitySceneType: baseConfig.equitySceneType || [], // 权益类目
...@@ -147,7 +133,8 @@ export default { ...@@ -147,7 +133,8 @@ export default {
commodityInfo: {}, commodityInfo: {},
membraneTypeList: baseConfig.membraneTypeList, membraneTypeList: baseConfig.membraneTypeList,
supplierCode: baseConfig.supplierCode, // 供应方 supplierCode: baseConfig.supplierCode, // 供应方
operationLogList: [] // 操作信息 operationLogList: [], // 操作信息
filterSpecsStr
} }
}, },
...@@ -185,10 +172,16 @@ export default { ...@@ -185,10 +172,16 @@ export default {
getInfo(id) { getInfo(id) {
getGoodsInfoById({ id: id }).then(res => { getGoodsInfoById({ id: id }).then(res => {
res?.upgradeGoodsList?.forEach(item => { res?.upgradeGoodsList?.forEach(item => {
let obj = {
...item,
specificationTypeSequence: res?.specificationPermutationList?.find(v => v.specificationValueSequence == item.specificationData)?.specificationTypeSequence
}
const positionNamesArr = deepClone(this.positionTypeList).filter(val => item.position?.split(',')?.includes(val.position + '')) || [] const positionNamesArr = deepClone(this.positionTypeList).filter(val => item.position?.split(',')?.includes(val.position + '')) || []
item.positionNames = positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '' item.positionNames = positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : ''
item.serviceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',') item.serviceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}-${v.serviceGrade}/${v.servicePeriod}` })?.join(',')
item.extendServiceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}` })?.join(',') item.extendServiceItemNames = item?.upgradeGoodsServiceItemsList?.map(v => { return `${v.serviceName}` })?.join(',')
item.specificationName = this.filterSpecsStr(obj)
item.carSeriesName = item?.carTypeConfigList?.map(v => { return v.seriesName })?.join('/')
}) })
res?.operationLogList?.forEach(val => { res?.operationLogList?.forEach(val => {
val.updatedDateStr = val.updatedDate ? Util.dateFormate(val.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '' val.updatedDateStr = val.updatedDate ? Util.dateFormate(val.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
...@@ -266,6 +259,10 @@ export default { ...@@ -266,6 +259,10 @@ export default {
.el-form-item__label{ .el-form-item__label{
flex-shrink: 0; flex-shrink: 0;
} }
.el-form-item__content {
width: 100%;
height: 36px;
}
} }
.flex_1{ .flex_1{
width: 100%; width: 100%;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
:placeholder="item.label" :placeholder="item.label"
:maxlength="item.maxlength" :maxlength="item.maxlength"
:style="{ width: item.width || formItemWidth }" :style="{ width: item.width || formItemWidth }"
:disabled="item.isDisabled" :disabled="item.isDisabled || pageData.pageDisabled"
clearable clearable
@input="input($event, item)" @input="input($event, item)"
@blur="blur(item)" @blur="blur(item)"
...@@ -50,13 +50,14 @@ ...@@ -50,13 +50,14 @@
@change="selectAddAttr($event, item)" @change="selectAddAttr($event, item)"
:style="{ width: item.width || formItemWidth }" :style="{ width: item.width || formItemWidth }"
filterable filterable
:disabled="item.isDisabled" :disabled="item.isDisabled || pageData.pageDisabled"
> >
<el-option <el-option
v-for="subItem in item.optionList" v-for="subItem in item.optionList"
:key="subItem[item.optionId]" :key="subItem[item.optionId]"
:label="subItem[item.optionLabel]" :label="subItem[item.optionLabel]"
:value="subItem[item.optionId]" :value="subItem[item.optionId]"
:disabled="subItem.isDisabled"
/> />
</el-select> </el-select>
<!-- 可添加选项选择框 --> <!-- 可添加选项选择框 -->
...@@ -70,7 +71,7 @@ ...@@ -70,7 +71,7 @@
@blur="selectBlur" @blur="selectBlur"
@focus="selectFocus" @focus="selectFocus"
filterable filterable
:disabled="item.isDisabled" :disabled="item.isDisabled || pageData.pageDisabled"
> >
<el-option <el-option
v-for="(subItem, subIndex) in item.optionList" v-for="(subItem, subIndex) in item.optionList"
...@@ -176,7 +177,7 @@ ...@@ -176,7 +177,7 @@
<!-- 级联选择器 --> <!-- 级联选择器 -->
<el-cascader v-else-if="item.type === 'cascader'" :style="{ width: item.width || formItemWidth }" :options="item.optionList" <el-cascader v-else-if="item.type === 'cascader'" :style="{ width: item.width || formItemWidth }" :options="item.optionList"
v-model="formData[item.name]" :placeholder="'请选择' + item.label" filterable v-model="formData[item.name]" :placeholder="'请选择' + item.label" filterable
@change="selectAddAttr($event, item)" aria-hidden="false" @change="selectAddAttr($event, item)" aria-hidden="false" :disabled="pageData.pageDisabled"
:props="{ checkStrictly: true, label: item.optionLabel, value: item.optionId }"> :props="{ checkStrictly: true, label: item.optionLabel, value: item.optionId }">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -611,10 +612,13 @@ import { baseConfig } from "@/main" ...@@ -611,10 +612,13 @@ import { baseConfig } from "@/main"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info` const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default { export default {
name: "ProductForm", name: "ProductForm",
inject: ['pageData'],
data() { data() {
return { return {
equitySceneType: baseConfig.equitySceneType || [], equitySceneType: baseConfig.equitySceneType || [],
membraneTypeList: baseConfig.membraneTypeList || [], membraneTypeList: baseConfig.membraneTypeList || [],
extendedPosiType: baseConfig.extendedPosiType || [], // 延保类
supplierCode: baseConfig.supplierCode || [],
solarFilmArr: baseConfig.solarFilmArr || [1, 111, 112], solarFilmArr: baseConfig.solarFilmArr || [1, 111, 112],
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
lookImgVisible: false, lookImgVisible: false,
...@@ -790,6 +794,20 @@ export default { ...@@ -790,6 +794,20 @@ export default {
this.selectedPositionIds = arr this.selectedPositionIds = arr
this.setUpdateGoodsInfo({ goodsPositionList: newVal }) this.setUpdateGoodsInfo({ goodsPositionList: newVal })
} }
},
'formData.goodsType': {
handler() {
if (this.addOrEdit === 'edit' && (this.formData?.status != 3 || this.formData?.scrmFlag == 'Y')) return
this.setFormItemStatus()
},
deep: true
},
'formData.supplierCode': {
handler() {
if (this.addOrEdit === 'edit' && (this.formData?.status != 3 || this.formData?.scrmFlag == 'Y')) return
this.setFormItemStatus()
},
deep: true
} }
}, },
...@@ -822,6 +840,47 @@ export default { ...@@ -822,6 +840,47 @@ export default {
get: "d2admin/base/get" get: "d2admin/base/get"
}), }),
...mapMutations("goodsInfoData", ["setUpdateGoodsInfo"]), ...mapMutations("goodsInfoData", ["setUpdateGoodsInfo"]),
setFormItemStatus() {
// 获取供应方和延保类目的选项列表
const supplierIndex = this.formList[0]?.formBlock.findIndex(val => val.name === "supplierCode")
const goodsTypeIndex = this.formList[0]?.formBlock.findIndex(val => val.name === 'tempGoodsType')
const suppOptionList = this.formList[0]?.formBlock[supplierIndex]?.optionList
const goodsTypeOptionList = this.formList[0]?.formBlock[goodsTypeIndex]?.optionList
// 更新供应方选项的 disabled 状态
const updateSupplierOptions = (isDisabled) => {
suppOptionList?.forEach(item => {
item.isDisabled = isDisabled && !this.supplierCode?.includes(`${item.id}`)
})
this.$set(this.formList[0].formBlock[supplierIndex], 'optionList', suppOptionList)
}
// 更新延保类目选项的 disabled 状态
const updateGoodsTypeOptions = (isDisabled) => {
const updatedGoodsTypeOptionList = goodsTypeOptionList.map(item => {
const newItem = { ...item, disabled: isDisabled && this.extendedPosiType?.includes(item.categoryType) };
if (newItem.children) {
newItem.children = newItem.children.map(i => ({
...i,
disabled: newItem.disabled,
children: i.children ? i.children.map(j => ({ ...j, disabled: newItem.disabled })) : undefined
}))
}
return newItem
})
this.$set(this.formList[0].formBlock[goodsTypeIndex], 'optionList', updatedGoodsTypeOptionList)
}
// 根据 goodsType 更新供应方选项
if (this.extendedPosiType?.includes(this.formData?.goodsType)) {
updateSupplierOptions(true)
} else {
updateSupplierOptions(false)
}
// 根据 supplierCode 更新延保类目选项
if (this.formData?.supplierCode && !this.supplierCode?.includes(`${this.formData?.supplierCode}`)) {
updateGoodsTypeOptions(true)
} else {
updateGoodsTypeOptions(false)
}
},
selectBlur() { selectBlur() {
this.editOptionIndex = -1 this.editOptionIndex = -1
this.showOptionInput = false this.showOptionInput = false
...@@ -1006,7 +1065,7 @@ export default { ...@@ -1006,7 +1065,7 @@ export default {
if (!fileInfo) return if (!fileInfo) return
if (fileInfo?.size / 1024 / 1024 > 10) { if (fileInfo?.size / 1024 / 1024 > 10) {
document.getElementById(`${targetItem.name}file`).value = "" document.getElementById(`${targetItem.name}file`).value = ""
return this.$message("请上传10M以内图片") return this.$message.warning("请上传10M以内图片")
} }
reader.readAsDataURL(fileInfo) reader.readAsDataURL(fileInfo)
reader.onload = (e) => { reader.onload = (e) => {
...@@ -1057,7 +1116,7 @@ export default { ...@@ -1057,7 +1116,7 @@ export default {
if (e.total / 1024 / 1024 > 20) { if (e.total / 1024 / 1024 > 20) {
return this.$message({ return this.$message({
message: "视频内容大于20M", message: "视频内容大于20M",
type: "error" type: "warning"
}) })
} }
const imgFile = e.target.result const imgFile = e.target.result
...@@ -1139,7 +1198,7 @@ export default { ...@@ -1139,7 +1198,7 @@ export default {
this.solarFilmArr?.includes(this.formData?.goodsType) this.solarFilmArr?.includes(this.formData?.goodsType)
) { ) {
// 太阳膜类目 产品名称关键字与类目不匹配 // 太阳膜类目 产品名称关键字与类目不匹配
this.$message.error( this.$message.warning(
"产品名称必须包含“太阳膜”字样才可将产品挂在太阳膜类目下" "产品名称必须包含“太阳膜”字样才可将产品挂在太阳膜类目下"
) )
} }
......
...@@ -54,7 +54,8 @@ export default { ...@@ -54,7 +54,8 @@ export default {
label: '产品名称', label: '产品名称',
type: 'input', type: 'input',
maxlength: 20, maxlength: 20,
width: '432px' width: '432px',
isDisabled: false
}, },
{ {
name: 'tempGoodsType', name: 'tempGoodsType',
...@@ -94,7 +95,8 @@ export default { ...@@ -94,7 +95,8 @@ export default {
optionId: 'id', optionId: 'id',
optionLabel: 'relatedPartyName', optionLabel: 'relatedPartyName',
partitionFlag: 2, partitionFlag: 2,
width: '432px' width: '432px',
isDisabled: false
}, { }, {
name: 'thumbUrl', name: 'thumbUrl',
label: '缩略图', label: '缩略图',
...@@ -179,7 +181,8 @@ export default { ...@@ -179,7 +181,8 @@ export default {
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => { getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
const obj = this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'tempGoodsType')] const obj = this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'tempGoodsType')]
obj.optionList = res?.list || [] obj.optionList = res?.list || []
if (this.addOrEdit === 'edit' && this.formData?.status != 3) { // SCRM同步过来商品 或者非草稿支持在当前类目下变更1.2.3级类目,不允许更换一级类目
if (this.addOrEdit === 'edit' && (this.formData?.status != 3 || this.formData?.scrmFlag == 'Y')) {
obj.optionList.forEach(item => { obj.optionList.forEach(item => {
if (item.categoryType != this.editData.goodsType) { if (item.categoryType != this.editData.goodsType) {
item.disabled = true item.disabled = true
...@@ -191,6 +194,37 @@ export default { ...@@ -191,6 +194,37 @@ export default {
}) })
} }
}) })
} else {
const goodsTypeIndex = this.editForm[0]?.formBlock.findIndex(val => val.name === 'tempGoodsType')
const goodsTypeOptionList = this.editForm[0]?.formBlock[goodsTypeIndex]?.optionList
// 更新延保类目选项的 disabled 状态
const updateGoodsTypeOptions = (isDisabled) => {
const updatedGoodsTypeOptionList = goodsTypeOptionList.map(item => {
const newItem = { ...item, disabled: isDisabled && this.baseConfig?.extendedPosiType?.includes(item.categoryType) };
if (newItem.children) {
newItem.children = newItem.children.map(i => ({
...i,
disabled: newItem.disabled,
children: i.children ? i.children.map(j => ({ ...j, disabled: newItem.disabled })) : undefined
}))
}
return newItem
})
this.$set(this.editForm[0].formBlock[goodsTypeIndex], 'optionList', updatedGoodsTypeOptionList)
}
// 根据 supplierCode 更新延保类目选项
if (this.formData?.supplierCode && !this.baseConfig?.supplierCode?.includes(`${this.formData?.supplierCode}`)) {
updateGoodsTypeOptions(true)
} else {
updateGoodsTypeOptions(false)
}
}
// SCRM同步过来商品字段不可编辑
if (this.formData?.scrmFlag == 'Y') {
let disabledLabel = ['goodsName', 'supplierCode']
for (var i = 0; i < disabledLabel.length; i++) {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == disabledLabel[i])].isDisabled = true
}
} }
}) })
}, },
...@@ -202,7 +236,22 @@ export default { ...@@ -202,7 +236,22 @@ export default {
if (num == 1) { if (num == 1) {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'brandMerchantCode')].optionList = res this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'brandMerchantCode')].optionList = res
} else { } else {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'supplierCode')].optionList = res const supplierIndex = this.editForm[0]?.formBlock.findIndex(val => val.name === "supplierCode")
this.editForm[0].formBlock[supplierIndex].optionList = res
const suppOptionList = this.editForm[0]?.formBlock[supplierIndex]?.optionList
// 更新供应方选项的 disabled 状态
const updateSupplierOptions = (isDisabled) => {
suppOptionList?.forEach(item => {
item.isDisabled = isDisabled && !this.baseConfig?.supplierCode?.includes(`${item.id}`)
})
this.$set(this.editForm[0].formBlock[supplierIndex], 'optionList', suppOptionList)
}
// 根据 goodsType 更新供应方选项
if (this.baseConfig?.extendedPosiType?.includes(this.formData?.goodsType)) {
updateSupplierOptions(true)
} else {
updateSupplierOptions(false)
}
} }
}) })
}, },
......
...@@ -4,19 +4,24 @@ ...@@ -4,19 +4,24 @@
<div class="content-box"> <div class="content-box">
<div class="sync_type_class"> <div class="sync_type_class">
<span class="label"><span class="color-red">*</span>使用模式:</span> <span class="label"><span class="color-red">*</span>使用模式:</span>
<el-radio-group v-model="goodsInfoData.shoppingMallFlag"> <el-radio-group v-model="goodsInfoData.shoppingMallFlag" :disabled="pageData.pageDisabled">
<el-radio :label="'1'">采购上架及分发至单店</el-radio> <el-radio :label="'1'">采购上架及分发至单店</el-radio>
<el-radio :label="'0'">仅分发至单店</el-radio> <el-radio :label="'0'">仅分发至单店</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div style="margin-left: 120px;"> <div style="margin-left: 120px;">
<div class="add-btns"> <div class="add-btns">
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '2'" <div v-if="goodsInfoData.specificationType == '2'">
<el-button icon="el-icon-plus"
type="primary" plain
:disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled"
@click="handleSpecsEdit(1)">新增规格</el-button> @click="handleSpecsEdit(1)">新增规格</el-button>
<el-button icon="el-icon-plus" v-if="goodsInfoData.specificationType == '1'" @click="addShop">新增商品</el-button> <el-button :disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled" type="primary" plain @click="handleSpecsManage">规格组合管理</el-button>
</div>
<el-button icon="el-icon-plus" :disabled="pageData.pageDisabled" v-if="goodsInfoData.specificationType == '1'" type="primary" plain @click="addShop">新增商品</el-button>
<div class="assi_type"> <div class="assi_type">
<span>规格:</span> <span>规格:</span>
<el-radio-group v-model="goodsInfoData.specificationType" @change="changeRadio"> <el-radio-group v-model="goodsInfoData.specificationType" :disabled="goodsInfoData.scrmFlag == 'Y' || pageData.pageDisabled" @change="changeRadio">
<el-radio :label="'1'">单规格</el-radio> <el-radio :label="'1'">单规格</el-radio>
<el-radio :label="'2'">多规格</el-radio> <el-radio :label="'2'">多规格</el-radio>
</el-radio-group> </el-radio-group>
...@@ -47,6 +52,7 @@ export default { ...@@ -47,6 +52,7 @@ export default {
singleSpecificationForm, singleSpecificationForm,
multipleSpecificationForm multipleSpecificationForm
}, },
inject: ['pageData'],
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
...@@ -85,6 +91,10 @@ export default { ...@@ -85,6 +91,10 @@ export default {
handleSpecsEdit(num) { handleSpecsEdit(num) {
this.$refs.multipleSpecificationFormRef.handleSpecsEdit(num) this.$refs.multipleSpecificationFormRef.handleSpecsEdit(num)
}, },
// 规格管理
handleSpecsManage() {
this.$refs.multipleSpecificationFormRef.handleSpecsManage()
},
// 新增商品 // 新增商品
addShop() { addShop() {
this.$refs.singleSpecificationFormRef.addShop() this.$refs.singleSpecificationFormRef.addShop()
......
<template>
<d2-dialog
title="规格组合管理"
:is-visible.sync="specsManageVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleSpecsManageConfirm"
@closeDialog="handleSpecsManageClose"
class="specsManage">
<div class="serach-item" v-for="(item, index) in specificationData" :key="index">
<span class="label">{{ `${item.specificationName}:` }}</span>
<el-select v-model="item.selected" collapse-tags multiple placeholder="请选择">
<el-option v-for="(subItem, subIndex) in item.specificationValueList"
:key="subIndex"
:label="subItem.specificationValue"
:value="subItem.specificationValue"></el-option>
</el-select>
</div>
<el-button type="primary" @click="handleSearch">搜索</el-button>
<div class="btn_content">
<el-button type="primary" plain @click="handleBatchUpdateStatus(1)">批量启用</el-button>
<el-button type="primary" plain @click="handleBatchUpdateStatus(2)">批量禁用</el-button>
</div>
<el-table ref="seletingTable"
:data="tableData"
height="380px"
class="table"
@select="handleChange"
@select-all="handleAll"
border>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号"
align="center"
type="index"
width="55" />
<el-table-column
v-for="(item, index) in specificationData"
:key="index"
:label="item.specificationName"
:show-overflow-tooltip="true"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.specsValueList[index] }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center">
<template slot-scope="scope">
<span :class="{ 'greenSpot': scope.row.statusFlag != 2, 'redSpot': scope.row.statusFlag == 2 }"></span>
<span>{{ scope.row.statusFlag == 2 ? '禁用中' : '启用中' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button
@click="handleUpdateStatus(scope.row)"
type="text">{{ scope.row.statusFlag != 2 ? '禁用' : '启用' }}</el-button>
</template>
</el-table-column>
</el-table>
</d2-dialog>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'SpecsManage',
props: {
specsManageVisible: {
type: Boolean
},
specificationDetailList: {
type: Array
},
goodsList: {
type: Array
}
},
data () {
return {
carSeriesSearchForm: {},
specificationData: [],
tableData: [],
selectedData: []
}
},
mounted () {
this.specificationData = deepClone(this.specificationDetailList)
this.specificationData.forEach(item => {
this.$set(item, 'selected', [])
})
this.initTableData(true)
},
methods: {
handleSearch() {
this.selectedData = []
this.tableData = []
this.initTableData()
const spliceIndex = this.tableData.reduce((indices, item, index) => {
this.specificationData.forEach((spec) => {
if (spec.selected?.length > 0 && !spec.selected.includes(item.specsValueList[this.specificationData.indexOf(spec)])) {
indices.push(index)
}
})
return indices
}, [])
this.tableData = this.tableData.filter((_, index) => !spliceIndex.includes(index))
},
initTableData(loadFlag) {
this.tableData = deepClone(this.goodsList)
this.tableData = this.specificationData.reduce((acc, spec, i) => {
const values = spec.specificationValueList.map(v => v.specificationValue)
if (i === 0) {
return values.map(value => ({ specsValueList: [value], statusFlag: 1 }))
}
const newAcc = []
acc.forEach(item => {
values.forEach(value => {
newAcc.push({ ...item, specsValueList: [...item.specsValueList, value] })
})
})
return newAcc
}, [])
if (loadFlag) {
this.tableData?.forEach(v => {
this.goodsList?.forEach(item => {
if (v?.specsValueList?.join(';~;') == item?.specsValueList?.join(';~;')) v.statusFlag = item.statusFlag || 1
})
})
}
this.updateTableDataStatus()
this.copyTableData = deepClone(this.tableData)
},
updateTableDataStatus() {
this.copyTableData?.forEach(copyItem => {
this.tableData.forEach(item => {
if (copyItem.specsValueList.join(';~;') === item.specsValueList.join(';~;')) {
item.statusFlag = copyItem.statusFlag
}
})
})
},
handleAll(selection) {
this.selectedData = selection.length ? [...this.tableData] : []
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.specsValueList?.join(';~;') == row.specsValueList?.join(';~;')
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.specsValueList?.join(';~;') != row.specsValueList?.join(';~;')
))
},
handleUpdateStatus(item) {
const toggleStatus = (v) => {
if (v.specsValueList.join(';~;') === item.specsValueList.join(';~;')) {
v.statusFlag = v.statusFlag != 2 ? 2 : 1
}
}
this.tableData.forEach(toggleStatus)
this.copyTableData.forEach(toggleStatus)
},
handleBatchUpdateStatus(statusFlag) {
if (!this.selectedData.length) {
return this.$message({
message: '请选择要操作的数据',
type: 'warning',
customClass: 'message-Z-zinde'
})
}
if (this.selectedData.some(v => v.statusFlag == statusFlag)) {
return this.$message({
message: `请勾选${statusFlag != 2 ? '禁用中' : '启用中'}的规格组合结果`,
type: 'warning',
customClass: 'message-Z-zinde'
})
}
const updateStatus = (v) => {
this.selectedData.forEach(item => {
if (v.specsValueList.join(';~;') === item.specsValueList.join(';~;')) {
v.statusFlag = statusFlag
}
})
}
this.tableData.forEach(updateStatus)
this.copyTableData.forEach(updateStatus)
},
handleSpecsManageConfirm() {
this.$emit('handleSpecsManageConfirm', this.copyTableData)
},
handleSpecsManageClose () {
this.$emit('handleSpecsManageClose')
}
}
}
</script>
<style lang="scss" scoped>
.specsManage{
.serach-item{
display: inline-block;
margin-right: 10px;
margin-bottom: 15px;
}
.label{
display: inline-block;
}
.btn_content{
margin: 20px 0;
}
.greenSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #2cca74;
margin-right: 5px;
display: inline-block;
}
.redSpot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #eb4e4e;
margin-right: 5px;
display: inline-block;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<auth-button category="Button" :show-btn-ids="['9030701']" /> <auth-button category="Button" :show-btn-ids="['9030701']" />
</span> </span>
<!-- 批量导入 --> <!-- 批量导入 -->
<auth-button category="Button" style="display: inline-block;" :show-btn-ids="['9030707']" /> <!-- <auth-button category="Button" style="display: inline-block;" :show-btn-ids="['9030707']" /> -->
</span> </span>
<!-- 导出 --> <!-- 导出 -->
<auth-button category="Button" style="display: inline-block" :show-btn-ids="['9030702']" /> <auth-button category="Button" style="display: inline-block" :show-btn-ids="['9030702']" />
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<span style="margin-right: 10px;"> <span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9030703']" /> <auth-button :data="scope.scope" :show-btn-ids="['9030703']" />
</span> </span>
<auth-button :data="scope.scope" <auth-button :data="scope.scope" v-if="scope.scope.goodsInfo.scrmFlag != 'Y'"
:show-btn-ids="['9030706']" /> :show-btn-ids="['9030706']" />
</div> </div>
</d2-table> </d2-table>
...@@ -210,7 +210,7 @@ export default { ...@@ -210,7 +210,7 @@ export default {
parentProp: 'goodsInfo', parentProp: 'goodsInfo',
prop: 'goodsTypeName', prop: 'goodsTypeName',
formatter: (cellValue) => { formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName] const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-') const result = types.filter(type => type).join('-')
return result return result
......
<!-- 商品tab组件 --> <!-- 商品tab组件 -->
<template> <template>
<!-- <d2-container> --> <div>
<el-form ref="goodFrom" <el-form ref="goodFrom"
class="goodFrom d2-container-content" class="goodFrom d2-container-content"
:model="form" :model="formData"
:rules="formRules" :rules="formRules"
label-width="130px"> label-width="130px">
<el-form-item label="上架商品:" <el-form-item label="上架商品:"
prop="val1"> prop="upgradeGoodsId">
<el-select v-model="form.val1" <!-- <el-select v-model="form.val1"
placeholder="我是已选商品" placeholder="我是已选商品"
clearable clearable
class="el_select"> class="el_select">
...@@ -16,7 +16,9 @@ ...@@ -16,7 +16,9 @@
:key="item.confId" :key="item.confId"
:value="item.confId" :value="item.confId"
:label="item.confName" /> :label="item.confName" />
</el-select> </el-select> -->
<el-button icon="el-icon-plus"
@click="handleSelectGoods">选择商品</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div class="info_div"> <div class="info_div">
...@@ -61,7 +63,7 @@ ...@@ -61,7 +63,7 @@
</el-form-item> </el-form-item>
<el-form-item label="商品别名:" <el-form-item label="商品别名:"
prop="val2"> prop="val2">
<el-input v-model="form.val2" <el-input v-model="formData.val2"
placeholder="请输入商品别名" placeholder="请输入商品别名"
maxlength="50" maxlength="50"
show-word-limit /> show-word-limit />
...@@ -70,7 +72,7 @@ ...@@ -70,7 +72,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="售价/件:" <el-form-item label="售价/件:"
prop="val3"> prop="val3">
<el-input v-model="form.val3" <el-input v-model="formData.val3"
@input="val3_handleInput" @input="val3_handleInput"
placeholder="自动带入产品对应的参考售价" placeholder="自动带入产品对应的参考售价"
class="sortInput" />元 class="sortInput" />元
...@@ -79,7 +81,7 @@ ...@@ -79,7 +81,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="最低售价/件:" <el-form-item label="最低售价/件:"
prop="val4"> prop="val4">
<el-input v-model="form.val4" <el-input v-model="formData.val4"
@input="val4_handleInput" @input="val4_handleInput"
placeholder="自动带入产品对应的参考售价" placeholder="自动带入产品对应的参考售价"
class="sortInput" />元 class="sortInput" />元
...@@ -90,7 +92,7 @@ ...@@ -90,7 +92,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="嘀加成本/件:" <el-form-item label="嘀加成本/件:"
prop="val5"> prop="val5">
<el-input v-model="form.val5" <el-input v-model="formData.val5"
@input="val5_handleInput" @input="val5_handleInput"
placeholder="自动带入产品对应的参考售价" placeholder="自动带入产品对应的参考售价"
class="sortInput" class="sortInput"
...@@ -100,7 +102,7 @@ ...@@ -100,7 +102,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="第三方成本/件:" <el-form-item label="第三方成本/件:"
prop="val6"> prop="val6">
<el-input v-model="form.val6" <el-input v-model="formData.val6"
@input="val6_handleInput" @input="val6_handleInput"
placeholder="自动带入产品对应的参考售价" placeholder="自动带入产品对应的参考售价"
class="sortInput" />元 class="sortInput" />元
...@@ -152,7 +154,12 @@ ...@@ -152,7 +154,12 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- </d2-container> --> <select-goods-dialog v-if="selectGoodsVisible"
:select-goods-visible="selectGoodsVisible"
@handleSelectGoodsConfirm="handleSelectGoodsConfirm"
@handleSelectGoodsClose="handleSelectGoodsClose"
:upgrade-goods-id="formData.upgradeGoodsId"></select-goods-dialog>
</div>
</template> </template>
<script> <script>
...@@ -160,14 +167,15 @@ import { deepClone } from "@/common/util" ...@@ -160,14 +167,15 @@ import { deepClone } from "@/common/util"
import { businessNature } from "@/common/constants.js" import { businessNature } from "@/common/constants.js"
import { mapActions } from "vuex" import { mapActions } from "vuex"
import { limitPrice } from "@/common/format" import { limitPrice } from "@/common/format"
import selectGoodsDialog from '../../../components/selectGoodsDialog.vue'
export default { export default {
name: "GoodTab", name: "GoodTab",
data() { data() {
return { return {
businessNature: businessNature, businessNature: businessNature,
loading: false, loading: false,
form: { formData: {
val1: "", upgradeGoodsId: "",
val2: "", val2: "",
val3: "", val3: "",
val4: "", val4: "",
...@@ -175,11 +183,7 @@ export default { ...@@ -175,11 +183,7 @@ export default {
val6: "" val6: ""
}, },
formRules: { formRules: {
val1: [{ upgradeGoodsId: [{ required: true, message: '请选择上架商品', trigger: 'change' }],
required: true,
message: '请选择商品',
trigger: 'change'
}],
val3: [{ val3: [{
required: true, required: true,
message: '请输入售价', message: '请输入售价',
...@@ -207,13 +211,16 @@ export default { ...@@ -207,13 +211,16 @@ export default {
val5: "", val5: "",
val6: "" val6: ""
}, },
selectGoodsVisible: false,
sellerMerchantStaffList: [], sellerMerchantStaffList: [],
serviceBossList: [], serviceBossList: [],
storePersonList: [] // 盯防负责人列表 storePersonList: [] // 盯防负责人列表
} }
}, },
components: {}, components: {
selectGoodsDialog
},
computed: {}, computed: {},
...@@ -228,6 +235,41 @@ export default { ...@@ -228,6 +235,41 @@ export default {
}), }),
async getBaseData() { }, async getBaseData() { },
handleSelectGoods() {
this.selectGoodsVisible = true
},
handleSelectGoodsConfirm(selectedData) {
const _formData = this.formData
const _valueObj = selectedData
// const _positionNamesArr = deepClone(this.positionTypeList).filter(val => (_valueObj?.position?.split(','))?.includes(val.position + '')) || []
// const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = _valueObj?.goodsInfo || {}
// const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
// const result = types.filter(type => type).join('-')
// _formData.upgradeGoods = {
// ..._valueObj,
// goodsName: _valueObj.goodsInfo.goodsName,
// tempGoodsTypeName: result,
// serviceItemNames: _valueObj?.upgradeGoodsServiceItemsList?.map(item => { return `${item.serviceName}-${item.serviceGrade}/${item.servicePeriod}` })?.join(','), // 服务项目
// positionNames: _positionNamesArr.length ? _positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '',
// specificationData: this.filterSpecsStr(_valueObj),
// djCost: _valueObj?.djCost,
// carTypeConfigName: _valueObj?.carTypeConfigList?.map(item => item.seriesName).join('/'),
// upgradeCommodityCode: _valueObj?.commodityCode
// }
// _formData.goodsType = _valueObj?.goodsInfo?.goodsType
// _formData.upgradeGoodsId = _valueObj.id
// _formData.positionNamesArr = _positionNamesArr
// _formData.productType = [] // 切换上架商品 将服务类型清空
// _formData.baseSupplyMode = '' // 切换上架商品 将基础供货模式清空
// _formData.upgradeSupplyMode = '' // 切换上架商品 将升级/产品供货模式清空
// _formData.supplierCode = _valueObj?.goodsInfo?.supplierCode // 供应方 判断是否需要走审核流程
if (!this.filterEmpty(_valueObj?.djCost)) _formData.djCost = _valueObj?.djCost // 嘀加成本 商品信息自带数据
this.handleSelectGoodsClose()
},
handleSelectGoodsClose() {
this.selectGoodsVisible = false
},
val3_handleInput(newVal) { val3_handleInput(newVal) {
this.form.val3 = limitPrice( this.form.val3 = limitPrice(
newVal, newVal,
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
placeholder="请输入套餐名称" placeholder="请输入套餐名称"
maxlength="50" maxlength="50"
class="sortInput" class="sortInput"
@blur="checkName"
show-word-limit /> show-word-limit />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -239,6 +240,7 @@ export default { ...@@ -239,6 +240,7 @@ export default {
name: "PackageTab", name: "PackageTab",
data() { data() {
return { return {
timeId: new Date().getTime() + parseInt(Math.random() * 1000),
businessNature: businessNature, businessNature: businessNature,
loading: false, loading: false,
packageForm: { packageForm: {
...@@ -301,6 +303,17 @@ export default { ...@@ -301,6 +303,17 @@ export default {
}), }),
async getBaseData() { }, async getBaseData() { },
checkName(e) {
console.log('e.target.value', e.target.value)
if (e.target.value) {
const obj = {
name: e.target.value,
timeId: this.timeId
}
this.$emit('packageEditInfo', obj)
}
},
addGoodsItem() { addGoodsItem() {
this.goodsList.push({ this.goodsList.push({
val1: "", val1: "",
......
...@@ -148,7 +148,6 @@ export default { ...@@ -148,7 +148,6 @@ export default {
this.financialObj.goodsTypeGroupRules[this.editableTabsValue] this.financialObj.goodsTypeGroupRules[this.editableTabsValue]
.expenseCategoryRules .expenseCategoryRules
) )
console.log(filterObj)
const obj = { const obj = {
trafficSide: filterObj trafficSide: filterObj
} }
...@@ -315,9 +314,8 @@ export default { ...@@ -315,9 +314,8 @@ export default {
item.expenseCategoryTypeRules item.expenseCategoryTypeRules
) )
}) })
this.financialObj = data
this.initSettleTimeObj() this.initSettleTimeObj()
console.log(this.financialObj, 76666) console.log(this.financialObj, 555555555)
}, },
initSettleTimeObj() { initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj const { settleTimeType, settleTime } = this.financialObj
......
...@@ -4,8 +4,21 @@ ...@@ -4,8 +4,21 @@
<div class="title"> <div class="title">
<span>基础信息</span> <span>基础信息</span>
</div> </div>
<div style="padding: 20px;"> <div style="padding: 20px 20px 0;">
<div>啦啦啦</div> <el-form :model="basicInfo" label-width="150px">
<el-form-item v-for="(item, index) in editFormData" :key="index" class="form-item" :style="{ 'width': [2,7].includes(item.inputType) ? '100%' : '48%'}">
<span slot="label" class="label">{{item.title}}:</span>
<div v-if="item.inputType == 7">
<div v-for="(k, kIdx) in item.fileList" :key="kIdx">
<span>{{k.fileName}}</span>
<el-link type="primary" class="download" :href="k.url">
下载
</el-link>
</div>
</div>
<span v-else>{{item.showValue}}</span>
</el-form-item>
</el-form>
</div> </div>
</div> </div>
</template> </template>
...@@ -13,15 +26,85 @@ ...@@ -13,15 +26,85 @@
<script> <script>
export default { export default {
name: 'BaseInfo', name: 'BaseInfo',
props: {}, props: {
basicInfo: {
type: Object,
default: () => { }
}
},
watch: {
basicInfo(val) {
if (val?.basicApproveInfo) {
this.dealFormData()
}
}
},
data() { data() {
//这里存放数据 //这里存放数据
return { return {
/** 动态表单
* inputType 输入类型,1.文本;2.多行文本;3.数字;4.金额;5.单选;6.多选;7.附件;
*/
editFormData: []
}
},
mounted() {
},
methods: {
dealFormData() {
this.editFormData = JSON.parse(this.basicInfo.basicApproveInfo)
// console.log(this.editFormData, 'this.editFormData---')
this.editFormData.forEach(item => {
// 直接展示
if ([1, 2, 3, 4].includes(item.inputType)) {
item.showValue = item.value
} else if (item.inputType == 5) {
// 单选
item.showValue = item.options.find(k => k.key == item.value)?.value || ''
} else if (item.inputType == 6) {
// 多选
const list = item.value.split(',')
item.showValue = ''
list.forEach((m, idx) => {
let label = item.options.find(k => k.key == m)?.value || ''
item.showValue = item.showValue + (idx != 0 ? (',' + label) : label)
})
} else if (item.inputType == 7) {
// 附件
item.fileList = []
const valueList = item.value.split(',')
valueList.forEach(k => {
item.fileList.push({
url: k,
fileName: k.split('/')[k.split('/').length - 1]
})
})
}
})
} }
}, },
methods: {},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss">
@import "../../style/editdetailCon.scss"; @import "../../style/editdetailCon.scss";
.base-info {
.el-form-item__label {
padding-right: 0;
}
.el-form-item__label,
.el-form-item__content {
line-height: 20px !important;
}
.form-item {
display: inline-block;
line-height: 20px;
margin-bottom: 20px;
}
.download {
margin-left: 8px;
}
}
</style> </style>
...@@ -490,11 +490,16 @@ export default { ...@@ -490,11 +490,16 @@ export default {
Promise.all(eventArr).then(() => { Promise.all(eventArr).then(() => {
this.checkSelectEmpty() this.checkSelectEmpty()
}) })
//平台方
this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{ this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{
console.log(obj)
this.financialObj.realityPlatformMerchantId=obj.merchantId this.financialObj.realityPlatformMerchantId=obj.merchantId
this.financialObj.realityPlatformMerchantName=obj.merchantName this.financialObj.realityPlatformMerchantName=obj.merchantName
}) })
//服务商
this.$EventBus.$on('shelfUpdateParMer', (obj)=>{
})
}, },
methods: { methods: {
...mapActions("FinancialRules", ["reset"]), ...mapActions("FinancialRules", ["reset"]),
...@@ -864,7 +869,8 @@ export default { ...@@ -864,7 +869,8 @@ export default {
this.editableTabs this.editableTabs
) )
if (!this.checkParamsType(res, goodsTypeGroupRules)) { if (!this.checkParamsType(res, goodsTypeGroupRules)) {
return this.$message.warning("请完善分账规则") this.$message.warning("请完善分账规则")
return false
} }
try { try {
this.submitParams = { this.submitParams = {
...@@ -874,6 +880,7 @@ export default { ...@@ -874,6 +880,7 @@ export default {
this.checkCalculateType() this.checkCalculateType()
this.verificationCodeVisible = true this.verificationCodeVisible = true
console.log(this.submitParams, "this.submitParams ") console.log(this.submitParams, "this.submitParams ")
return true
} catch (error) {} } catch (error) {}
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验 // if (!res || !goodsTypeGroupRules) return false // 没有通过检验
}, },
......
...@@ -892,7 +892,8 @@ export default { ...@@ -892,7 +892,8 @@ export default {
async submit() { async submit() {
let res = await this.verifyFormData() let res = await this.verifyFormData()
if (!this.checkParamsType(res)) { if (!this.checkParamsType(res)) {
return this.$message.error("请完善对账规则") this.$message.error("请完善对账规则")
return false
} }
// 检验已经通过了 // 检验已经通过了
this.errorIndex = -1 this.errorIndex = -1
...@@ -914,7 +915,7 @@ export default { ...@@ -914,7 +915,7 @@ export default {
partnerMerchantExpenseCategoryValue partnerMerchantExpenseCategoryValue
} }
this.submitParams=params this.submitParams=params
console.log( this.submitParams) return true
}, },
// 校验所有form数据 // 校验所有form数据
async verifyFormData() { async verifyFormData() {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
v-if="item.valiadError == 'Y'" />{{ item.title }} v-if="item.valiadError == 'Y'" />{{ item.title }}
</span> </span>
<span> <span>
<package-tab /> <package-tab @packageEditInfo="getPackageEditInfo" />
</span> </span>
</el-tab-pane> </el-tab-pane>
<el-tab-pane key="add" <el-tab-pane key="add"
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
</template> </template>
<script> <script>
import { get } from "sortablejs"
import goodTab from "../common/goodTab.vue" import goodTab from "../common/goodTab.vue"
import packageTab from "../common/packageTab.vue" import packageTab from "../common/packageTab.vue"
export default { export default {
...@@ -146,7 +147,8 @@ export default { ...@@ -146,7 +147,8 @@ export default {
const newTabIndex = ++this.tabIndex + "" const newTabIndex = ++this.tabIndex + ""
this.goodTabs.push({ this.goodTabs.push({
title: "商品名称" + this.addIndex++, title: "商品名称" + this.addIndex++,
name: 'good_' + newTabIndex name: 'good_' + newTabIndex,
info: {}
}) })
this.tabsValue = 'good_' + newTabIndex this.tabsValue = 'good_' + newTabIndex
this.currentIndex = 'good_' + newTabIndex this.currentIndex = 'good_' + newTabIndex
...@@ -158,7 +160,8 @@ export default { ...@@ -158,7 +160,8 @@ export default {
const newTabIndex = ++this.tabIndex + "" const newTabIndex = ++this.tabIndex + ""
this.packageTabs.push({ this.packageTabs.push({
title: "套餐名称" + this.addIndex++, title: "套餐名称" + this.addIndex++,
name: 'package_' + newTabIndex name: 'package_' + newTabIndex,
info: {}
}) })
this.tabsValue = 'package_' + newTabIndex this.tabsValue = 'package_' + newTabIndex
this.currentIndex = 'package_' + newTabIndex this.currentIndex = 'package_' + newTabIndex
...@@ -198,6 +201,7 @@ export default { ...@@ -198,6 +201,7 @@ export default {
} else { } else {
tabs = self.packageTabs tabs = self.packageTabs
} }
console.log('tabs', tabs)
if (activeName === targetName) { if (activeName === targetName) {
tabs.forEach((tab, index) => { tabs.forEach((tab, index) => {
if (tab.name === targetName) { if (tab.name === targetName) {
...@@ -214,7 +218,13 @@ export default { ...@@ -214,7 +218,13 @@ export default {
}) })
} }
this.tabsValue = activeName this.tabsValue = activeName
this.goodTabs = tabs.filter(tab => tab.name !== targetName) tabs = tabs.filter(tab => tab.name !== targetName)
// if (targetName.split("_")[0] == 'good') {
// this.goodTabs = tabs.filter(tab => tab.name !== targetName)
// } else {
// this.goodTabs = tabs.filter(tab => tab.name !== targetName)
// }
// const currentTabIndex = this.goodTabs.findIndex(item => item.name == targetName) // const currentTabIndex = this.goodTabs.findIndex(item => item.name == targetName)
// // currentTabIndex <= parseInt(self.goodTabsValue) // // currentTabIndex <= parseInt(self.goodTabsValue)
...@@ -292,6 +302,10 @@ export default { ...@@ -292,6 +302,10 @@ export default {
// message: "删除成功!" // message: "删除成功!"
// }) // })
// }) // })
},
getPackageEditInfo(info) {
console.log('info', info)
} }
} }
} }
......
...@@ -1044,7 +1044,6 @@ export default { ...@@ -1044,7 +1044,6 @@ export default {
}, },
// 查询4s店及上级列表 参数 channelType=1(流量方对象) // 查询4s店及上级列表 参数 channelType=1(流量方对象)
async getMerchantLevelList() { async getMerchantLevelList() {
console.log( this.merchantRow)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
const that = this const that = this
const localRes = localStorage.getItem("getMerchantLevelList") const localRes = localStorage.getItem("getMerchantLevelList")
...@@ -1364,12 +1363,13 @@ export default { ...@@ -1364,12 +1363,13 @@ export default {
}, },
// 对账item的详情 更新和初始化 classificationObj // 对账item的详情 更新和初始化 classificationObj
getEffectRule() { getEffectRule() {
let promiseArr = [ // let promiseArr = [
this.getListPartnerMerchant(), // this.getListPartnerMerchant(),
this.getMerchantLevelList(), // // this.getMerchantLevelList(),
this.getListPlatformMerchant() // // this.getListPlatformMerchant()
] // ]
Promise.all(promiseArr).then(() => { // Promise.all(promiseArr).then(() => {
this.$nextTick(()=>{
const res = deepClone(this.goodsTypeGroupReconciliationRules) const res = deepClone(this.goodsTypeGroupReconciliationRules)
const that = this const that = this
// 赋值 // 赋值
...@@ -1407,6 +1407,8 @@ export default { ...@@ -1407,6 +1407,8 @@ export default {
} }
this.forceUpdate() this.forceUpdate()
}) })
// })
}, },
// 换成后端数据结构 // 换成后端数据结构
getBackendFormat() { getBackendFormat() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<d2-container class="edit-contract" v-loading="isLoad"> <d2-container class="edit-contract" v-loading="isLoad">
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info></base-info> <base-info :basicInfo="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info></shop-merchant-info> <shop-merchant-info></shop-merchant-info>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
...@@ -20,22 +20,23 @@ ...@@ -20,22 +20,23 @@
</template> </template>
<script> <script>
import { mapActions } from "vuex" import { mapActions } from 'vuex'
import BaseInfo from "./components/detailCon/BaseInfo.vue" import BaseInfo from './components/editCon/BaseInfo.vue'
import ShopMerchantInfo from "./components/detailCon/ShopMerchantInfo" import ShopMerchantInfo from './components/detailCon/ShopMerchantInfo'
import GoodsInfo from "./components/detailCon/GoodsInfo.vue" import GoodsInfo from './components/detailCon/GoodsInfo.vue'
import DivisionConfig from "./components/detailCon/DivisionConfig.vue" import DivisionConfig from './components/detailCon/DivisionConfig.vue'
import FinanceConfig from "./components/detailCon/FinanceConfig.vue" import FinanceConfig from './components/detailCon/FinanceConfig.vue'
import { merchantSettleDistributeRuleLastRule } from "@api/shelfManage" import { merchantSettleDistributeRuleLastRule, getBusisDetailBasic } from "@api/shelfManage"
export default { export default {
name: "contractDetail", name: "contractDetail",
data() { data() {
return { return {
isLoad: true, isLoad: true,
editData: {}, editData: {},
basicInfo: {},
divisiObj: {}, divisiObj: {},
financialObj: {} financialObj: {}
} };
}, },
components: { components: {
...@@ -54,6 +55,7 @@ export default { ...@@ -54,6 +55,7 @@ export default {
}, },
mounted() { mounted() {
this.getDetail() this.getDetail()
this.getBasicDetail()
this.getFinaceObj() this.getFinaceObj()
}, },
//方法集合 //方法集合
...@@ -61,6 +63,12 @@ export default { ...@@ -61,6 +63,12 @@ export default {
...mapActions({ ...mapActions({
close: "d2admin/page/close" close: "d2admin/page/close"
}), }),
getBasicDetail() {
getBusisDetailBasic({ id: 1 }).then(res => {
this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {}
})
},
getDetail() { getDetail() {
this.isLoad = false this.isLoad = false
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com' * @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44 * @Date: 2025-02-24 21:48:44
* @LastEditors: 'wangzhihui' '1733904062@qq.com' * @LastEditors: 'wangzhihui' '1733904062@qq.com'
* @LastEditTime: 2025-02-25 17:57:05 * @LastEditTime: 2025-02-27 17:02:40
* @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue * @FilePath: \dj-car-life-system\src\views\goods\shelfManage\editContract.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
<template> <template>
<d2-container class="edit-contract" v-loading="isLoad"> <d2-container class="edit-contract" v-loading="isLoad">
<!-- 基础信息 --> <!-- 基础信息 -->
<base-info></base-info> <base-info :basicInfo="basicInfo"></base-info>
<!-- 流量方信息 --> <!-- 流量方信息 -->
<shop-merchant-info :edit-data="editData" @addMerchant="handleAddMerchant"></shop-merchant-info> <shop-merchant-info ref="shopMerchant" :editData="merchantEditData" @addMerchant="handleAddMerchant"></shop-merchant-info>
<!-- 流量方信息 - 新增 - 新增商户 --> <!-- 流量方信息 - 新增 - 新增商户 -->
<add-merchant :addMerVisible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant> <add-merchant :addMerVisible="addMerVisible" @handleClose="handleAddMerchant"></add-merchant>
<!-- 上架商品及测算 --> <!-- 上架商品及测算 -->
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
<!-- 对账配置 --> <!-- 对账配置 -->
<finance-config ref="financeConfig"></finance-config> <finance-config ref="financeConfig"></finance-config>
<div style="margin-top: 40px;text-align: center;"> <div style="margin-top: 40px;text-align: center;">
<el-button type="primary" @click="handleConfirm(1)"> <el-button type="primary" @click="handleConfirm('save')">
提交 提交
</el-button> </el-button>
<!-- 草稿状态/已下架/新增显示 --> <!-- 草稿状态/已下架/新增显示 -->
<el-button type="primary" plain @click="handleConfirm(2)"> <el-button type="primary" plain @click="handleConfirm('draft')">
暂存 暂存
</el-button> </el-button>
<el-button class="cancel-btn" @click="handleCancel"> <el-button class="cancel-btn" @click="handleCancel">
...@@ -44,12 +44,18 @@ import AddMerchant from './components/editCon/AddMerchant' ...@@ -44,12 +44,18 @@ import AddMerchant from './components/editCon/AddMerchant'
import GoodsInfo from './components/editCon/GoodsInfo.vue' import GoodsInfo from './components/editCon/GoodsInfo.vue'
import DivisionConfig from './components/editCon/DivisionConfig.vue' import DivisionConfig from './components/editCon/DivisionConfig.vue'
import FinanceConfig from './components/editCon/FinanceConfig.vue' import FinanceConfig from './components/editCon/FinanceConfig.vue'
import {
getBusisDetailBasic
} from "@api/shelfManage"
export default { export default {
name: 'EditContract', name: 'EditContract',
data() { data() {
return { return {
routeObj: {},
isLoad: true, isLoad: true,
addMerVisible: false, addMerVisible: false,
basicInfo: {},
merchantEditData: {},
editData: { editData: {
merchantName: '', merchantName: '',
}, },
...@@ -65,6 +71,8 @@ export default { ...@@ -65,6 +71,8 @@ export default {
FinanceConfig FinanceConfig
}, },
mounted() { mounted() {
this.routeObj = this.$route.params
this.getBasicDetail()
this.getDetail() this.getDetail()
}, },
//方法集合 //方法集合
...@@ -72,6 +80,13 @@ export default { ...@@ -72,6 +80,13 @@ export default {
...mapActions({ ...mapActions({
close: 'd2admin/page/close' close: 'd2admin/page/close'
}), }),
getBasicDetail() {
getBusisDetailBasic({ id: this.routeObj.id }).then(res => {
console.log(res, 'res----')
this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {}
})
},
getDetail() { getDetail() {
this.isLoad = false this.isLoad = false
}, },
...@@ -79,9 +94,20 @@ export default { ...@@ -79,9 +94,20 @@ export default {
console.log('新建---') console.log('新建---')
this.addMerVisible = !this.addMerVisible this.addMerVisible = !this.addMerVisible
}, },
handleConfirm() { handleConfirm(confirmType) {
this.$refs.divisionConfig.submit() if (confirmType == 'save') {
this.$refs.financeConfig.submit() // 各模块校验
if (!this.$refs.shopMerchant.submit() || !this.$refs.divisionConfig.submit() || !this.$refs.financeConfig.submit()) {
return true
}
}
var params = {
saveDraft: confirmType == 'draft',
businessCode: this.routeObj.businessCode,
merchant: this.$refs.editData,
settleDistributeRule: this.$refs.divisionConfig.submitParams,
reconciliationRule: this.$refs.financeConfig.submitParams,
}
}, },
handleCancel() { handleCancel() {
this.close({ tagName: '/shelfManage' }) this.close({ tagName: '/shelfManage' })
......
...@@ -300,7 +300,8 @@ export default { ...@@ -300,7 +300,8 @@ export default {
this.$router.push({ this.$router.push({
name: 'editContract', name: 'editContract',
params: { params: {
id: row.id id: row.id,
businessCode: row.businessCode
} }
}) })
}, },
......
...@@ -448,7 +448,8 @@ export default { ...@@ -448,7 +448,8 @@ export default {
9: "已撤销", 9: "已撤销",
// 10: "已关闭", // 10: "已关闭",
11: "错误订单", 11: "错误订单",
12: "已退款" 12: "已退款",
13: "待上传"
}, },
upgradeOpts: { upgradeOpts: {
Y: "已升级", Y: "已升级",
...@@ -734,6 +735,10 @@ export default { ...@@ -734,6 +735,10 @@ export default {
{ {
confId: 12, confId: 12,
confLabel: "已退款" confLabel: "已退款"
},
{
confId: 13,
confLabel: '待上传'
} }
], ],
upgradeList: [ upgradeList: [
......
...@@ -547,7 +547,8 @@ export default { ...@@ -547,7 +547,8 @@ export default {
9: "已撤销", 9: "已撤销",
10: "已关闭", 10: "已关闭",
11: "错误订单", 11: "错误订单",
12: "已退款" 12: "已退款",
13: "待上传"
}, },
upgradeOpts: { upgradeOpts: {
Y: "已升级", Y: "已升级",
......
...@@ -175,7 +175,8 @@ export default { ...@@ -175,7 +175,8 @@ export default {
9: "已撤销", 9: "已撤销",
10: "已关闭", 10: "已关闭",
11: "错误订单", 11: "错误订单",
12: "已退款" 12: "已退款",
13: "待上传"
}, },
baseData: { baseData: {
orderStatusList: [ orderStatusList: [
......
...@@ -127,16 +127,17 @@ ...@@ -127,16 +127,17 @@
> >
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="退款类型:" class="halfItem"> <el-form-item label="退款类型:" class="halfItem">
{{ detailInfo.status }} {{ detailInfo.refundType?detailInfo.refundType==1?'全部退款':'部分退款':'-' }}
</el-form-item></el-col </el-form-item></el-col
> >
<el-col :span="8"> <el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="订单总积分:" class="halfItem"> <el-form-item label="订单总积分:" class="halfItem">
{{ detailInfo.status }} {{ detailInfo.addScore? detailInfo.addScore:'-' }}
</el-form-item></el-col </el-form-item>
</el-col
> >
</el-row> </el-row>
</el-form> </el-form>
...@@ -165,15 +166,15 @@ ...@@ -165,15 +166,15 @@
</div> </div>
<div v-else class="empty">暂无记录</div> <div v-else class="empty">暂无记录</div>
</div> </div>
<div class="examine-record"> <div class="examine-record" v-if="detailInfo.status == '已审核'">
<div class="title">操作记录</div> <div class="title">操作记录</div>
<div <div
class="record-div" class="record-div"
v-if="detailInfo.operationList && detailInfo.operationList.length > 0" v-if="operationList && operationList.length > 0"
> >
<div <div
class="record-div-d" class="record-div-d"
v-for="(item, index) in detailInfo.operationList" v-for="(item, index) in operationList"
:key="index" :key="index"
> >
<div class="div-operator">操作人:{{ item.operator }}</div> <div class="div-operator">操作人:{{ item.operator }}</div>
...@@ -209,7 +210,7 @@ ...@@ -209,7 +210,7 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { getPointDetail } from "@api/point" import { getPointDetail ,getOperationRecord,getOrderByScore} from "@api/point"
export default { export default {
name: "DetailDialog", name: "DetailDialog",
props: { props: {
...@@ -255,6 +256,7 @@ export default { ...@@ -255,6 +256,7 @@ export default {
}, },
detailInfo: {}, detailInfo: {},
operationList:[],
loading: false, loading: false,
imgVisible: false, imgVisible: false,
photoList: [], photoList: [],
...@@ -284,11 +286,32 @@ export default { ...@@ -284,11 +286,32 @@ export default {
: "错单" : "错单"
: "--" : "--"
this.detailInfo = res this.detailInfo = res
this.getScore()
this.getOrderOperateData()
this.photoList = res.attachments ? res.attachments.split(",") : [] this.photoList = res.attachments ? res.attachments.split(",") : []
} }
}) })
}, },
getScore() {
getOrderByScore({
orderCode: this.detailInfo.orderCode
}).then((res) => {
console.log(res)
this.detailInfo.addScore = res.addScore
this.$set(this.detailInfo,'addScore',res.addScore)
console.log(this.detailInfo)
})
},
getOrderOperateData(){
let params={
orderCode:this.detailInfo.orderCode,
operationType:1
}
getOperationRecord(params).then(res=>{
console.log(res)
this.operationList=res
})
},
handleEnlargeImg(url) { handleEnlargeImg(url) {
this.imgVisible = !this.imgVisible this.imgVisible = !this.imgVisible
this.imgList = url this.imgList = url
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
> >
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- <el-button type="primary" size="mini" @click="handleExport">
导出
</el-button> -->
<div> <div>
<span style="margin-right: 10px" <span style="margin-right: 10px"
><auth-button category="Button" :show-btn-ids="['9140105']" ><auth-button category="Button" :show-btn-ids="['9140105']"
...@@ -67,11 +64,14 @@ ...@@ -67,11 +64,14 @@
:show-btn-ids="['9140101']" :show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1" v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/> />
<!-- v-if=" <auth-button
v-if="
scope.scope.status == 1 && scope.scope.status == 1 &&
scope.scope.pointsRefundAvailable == 'Y' scope.scope.pointsRefundAvailable == 'Y'
" --> "
<auth-button :data="scope.scope" :show-btn-ids="['9140104']" /> :data="scope.scope"
:show-btn-ids="['9140104']"
/>
</span> </span>
</div> </div>
</d2-table> </d2-table>
...@@ -116,7 +116,10 @@ import { ...@@ -116,7 +116,10 @@ import {
getShopMerchantList, getShopMerchantList,
pointCheck, pointCheck,
exportFile, exportFile,
markAsRefunded markAsRefunded,
refreshData,
getOrderByScore,
getOperationRecord
} from "@api/point" } from "@api/point"
export default { export default {
name: "PointList", name: "PointList",
...@@ -140,7 +143,7 @@ export default { ...@@ -140,7 +143,7 @@ export default {
} }
return { return {
show: true, show: true,
handleFormRef: 'handleFormRef', handleFormRef: "handleFormRef",
refundVisible: false, refundVisible: false,
activeName: "4", activeName: "4",
tabPaneList: [ tabPaneList: [
...@@ -162,7 +165,7 @@ export default { ...@@ -162,7 +165,7 @@ export default {
}, },
{ {
label: "未兑换", label: "未兑换",
name: "3" name: "-1"
} }
], ],
statusEnum: { statusEnum: {
...@@ -610,16 +613,32 @@ export default { ...@@ -610,16 +613,32 @@ export default {
//标记退款 //标记退款
handleRefund(data) { handleRefund(data) {
this.refundVisible = true this.refundVisible = true
this.refundForm.id = data.id
this.refundForm.orderCode = data.orderCode this.refundForm.orderCode = data.orderCode
this.refundForm.integralIncome = data.integralIncome //当前积分能抵扣的最大值
this.getScore()
//
// this.refundForm.refundPoints = 10000
//
// if(data.operator==true){
// //对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
// this.refundFormData[0].optionList[0].isDisabled=true
// }
// this.updateDisable()
},
getScore() {
getOrderByScore({
orderCode: this.refundForm.orderCode
}).then((res) => {
this.refundForm.refundPoints = res.addScore //最大积分
this.refundForm.maXPoints = res.addScore //最大积分
if (this.refundForm.refundPoints == this.refundForm.integralIncome) {
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退), this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundForm.refundPoints = 10000 } else {
this.refundForm.maXPoints =10000 this.refundForm.refundType = 2
if(data.operator==true){ this.refundFormData[0].optionList[0].isDisabled = true
//对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
this.refundFormData[0].optionList[0].isDisabled=true
} }
this.updateDisable() this.updateDisable()
})
}, },
updateDisable() { updateDisable() {
let disabled = this.refundForm.refundType == 2 ? false : true let disabled = this.refundForm.refundType == 2 ? false : true
...@@ -637,8 +656,8 @@ export default { ...@@ -637,8 +656,8 @@ export default {
if (valid) { if (valid) {
markAsRefunded({ markAsRefunded({
orderCode: this.refundForm.orderCode, orderCode: this.refundForm.orderCode,
refundType:this.refundForm.refundType, refundType: this.refundForm.refundType,
refundPoints:this.refundForm.refundPoints refundPoints: this.refundForm.refundPoints
}).then((res) => { }).then((res) => {
if (res) { if (res) {
this.$message.success("退款成功!") this.$message.success("退款成功!")
...@@ -652,21 +671,23 @@ export default { ...@@ -652,21 +671,23 @@ export default {
}, },
//刷新 //刷新
handleRefresh() { handleRefresh() {
let params = {
...this.searchFormSearch,
...this.$refs.pointTable.page
}
this.$confirm("确定需要刷新并同步订单信息", "", { this.$confirm("确定需要刷新并同步订单信息", "", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
callback: (action) => { callback: (action) => {
// if (action == "confirm") { if (action == "confirm") {
// markAsRefunded({ refreshData(params).then((res) => {
// orderCode: data.orderCode if (res) {
// }).then((res) => { this.$message.success("订单信息已同步完成!")
// if (res) { this.handleSearch()
// this.$message.success("订单信息已同步完成!") }
// this.handleSearch() })
// } }
// })
// }
} }
}) })
}, },
......
...@@ -50,8 +50,9 @@ export default { ...@@ -50,8 +50,9 @@ export default {
staffName: "", staffName: "",
staffPhone: "", staffPhone: "",
merchantId: "", merchantId: "",
withdrawalTime:[], rewardTime:[],
rewardTime:[] reviewTime:[],
successTime:[]
}, },
searchFormSearch:{ searchFormSearch:{
...@@ -95,14 +96,14 @@ export default { ...@@ -95,14 +96,14 @@ export default {
// }, // },
{ {
label: "积分付款时间", label: "积分付款时间",
name: "rewardTime", name: "reviewTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
}, },
{ {
label: "积分到账时间", label: "积分到账时间",
name: "withdrawalTime", name: "successTime",
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
...@@ -212,20 +213,33 @@ export default { ...@@ -212,20 +213,33 @@ export default {
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 23:59:59" ) + " 23:59:59"
} }
if (this.searchFormSearch.withdrawalTime&&this.searchFormSearch.withdrawalTime.length) { if (this.searchFormSearch.reviewTime&&this.searchFormSearch.reviewTime.length) {
this.searchFormSearch.reviewBeginTime =
Util.dateFormate(
this.searchFormSearch.reviewTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.reviewEndTime =
Util.dateFormate(
this.searchFormSearch.reviewTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
if (this.searchFormSearch.successTime&&this.searchFormSearch.successTime.length) {
this.searchFormSearch.withdrawalBeginTime = this.searchFormSearch.withdrawalBeginTime =
Util.dateFormate( Util.dateFormate(
this.searchFormSearch.withdrawalTime[0], this.searchFormSearch.successBeginTime[0],
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 00:00:00" ) + " 00:00:00"
this.searchFormSearch.withdrawalEndTime = this.searchFormSearch.withdrawalEndTime =
Util.dateFormate( Util.dateFormate(
this.searchFormSearch.withdrawalTime[1], this.searchFormSearch.successEndTime[1],
"YYYY-MM-DD" "YYYY-MM-DD"
) + " 23:59:59" ) + " 23:59:59"
} }
delete this.searchFormSearch.rewardTime delete this.searchFormSearch.rewardTime
delete this.searchFormSearch.withdrawalTime delete this.searchFormSearch.successTime
delete this.searchFormSearch.reviewTime
resolve() resolve()
}) })
}, },
...@@ -237,8 +251,9 @@ export default { ...@@ -237,8 +251,9 @@ export default {
staffName: "", staffName: "",
staffPhone: "", staffPhone: "",
merchantId: "", merchantId: "",
withdrawalTime:[], rewardTime:[],
rewardTime:[] reviewTime:[],
successTime:[]
} }
this.searchFormSearch={} this.searchFormSearch={}
this.$refs.pointTable.refreshTable(true, true) this.$refs.pointTable.refreshTable(true, true)
......
...@@ -6,11 +6,14 @@ ...@@ -6,11 +6,14 @@
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane label="成长等级记录" <el-tab-pane label="成长等级记录"
name="record" /> name="record" />
<el-tab-pane label="卡券发放记录"
name="issue" />
<el-tab-pane label="成长等级管理" <el-tab-pane label="成长等级管理"
name="manage" /> name="manage" />
</el-tabs> </el-tabs>
<div> <div>
<record v-if="activeName === 'record'" /> <record v-if="activeName === 'record'" />
<issue v-if="activeName === 'issue'" />
<manage v-if="activeName === 'manage'" /> <manage v-if="activeName === 'manage'" />
</div> </div>
</div> </div>
...@@ -20,20 +23,22 @@ ...@@ -20,20 +23,22 @@
<script> <script>
import record from './record' import record from './record'
import manage from './manage' import manage from './manage'
import issue from './issue'
// import { deepClone } from '@/common/util' // import { deepClone } from '@/common/util'
export default { export default {
name: 'StaffIndex', name: 'StaffIndex',
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
activeName: 'record', activeName: 'issue',
recordInfo: {} recordInfo: {}
} }
}, },
components: { components: {
record, record,
manage manage,
issue
}, },
mounted() { mounted() {
......
<template>
<d2-container class="points-config">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="searchForm"
:form-data="showFormData"
label-width="100px" />
<div class="up-btns">
<el-button :id="tableParams.btnId"
size="small"
type="primary">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
</div>
</div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">
<span class="table-title">发放记录列表</span>
</span>
<span style="display: inline-block;margin-left: 10px;">
<el-button type="primary" size="mini">导出</el-button>
</span>
</d2-table-header>
<d2-table ref="detailListTable"
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<div slot="auth-button"
slot-scope="scope">
<!-- 查看 -->
<span style="margin-right: 10px;">
<el-button type="text" size="mini">查看</el-button>
</span>
<!-- 启用/停用 -->
<span style="margin-right: 10px;">
<el-button type="text" size="mini">启用</el-button>
</span>
<span style="margin-right: 10px;">
<el-button type="text" size="mini">禁用</el-button>
</span>
<!-- 删除 -->
<span style="margin-right: 10px;">
<el-button type="text" size="mini">删除</el-button>
</span>
</div>
</d2-table>
</div>
</d2-container>
</template>
<script>
import { getCouponRecord } from '@api/inStorePoints'
export default {
data() {
return {
searchForm: {
levelName: '',
staffPhone: '',
openState: ''
},
showFormData: [{
label: '员工姓名',
name: 'staffName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '电话号码',
name: 'staffPhone',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '等级名称',
name: 'levelType',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'levelTypeOpt'
}, {
label: '卡券名称',
name: 'levelName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '使用状态',
name: 'openState',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'openStateOpt'
}, {
label: "发放时间",
name: "searchdate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions"
}, {
label: "领取时间",
name: "searchdate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions"
}, {
label: "有效时间",
name: "searchdate",
type: "datePicker",
isClear: false,
pickerOptions: "rangePickerOptions"
}],
getListApi: getCouponRecord,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
// tableOption: true,
tableOption: { width: '150px' },
tableColumns: [
{
label: '姓名',
prop: 'levelType',
width: '150'
}, {
label: '电话号码',
prop: 'levelName'
}, {
label: '等级名称',
prop: "ratingProjectType"
}, {
label: '卡券名称',
prop: 'minRanking',
width: '150'
}, {
label: '价值',
prop: 'highRanking',
width: '150'
}, {
label: '发放时间',
prop: 'ratingCycle',
width: '150',
formatter: (cellValue) => {
return cellValue.ratingCycle ? cellValue.ratingCycle + '个月' : '--'
}
}, {
label: '有效期',
prop: 'highRanking',
width: '150'
}, {
label: '状态',
prop: 'openState',
width: '150',
className: (cellValue) => {
return {
true: 'greenSpot',
false: 'redSpot'
}[cellValue.openState]
}
}, {
label: '领取时间',
prop: 'updatedDate',
width: '150',
}
]
},
}
},
methods: {
beforeSearchFn() {
return new Promise((resolve, reject) => {
resolve()
})
},
handleReset() {
this.searchForm = {
levelName: '',
staffPhone: '',
openState: ''
}
this.$refs.detailListTable.refreshTable()
},
}
}
</script>
<style lang="scss" scoped>
.points-config {
margin-top: 40px;
.m-l-md {
margin-left: 20px;
}
}
.table-title {
color: #1D1D1D;
font-size: 16px;
font-weight: 500;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
suffixSlot: 'syncUnit' suffixSlot: 'syncUnit'
}, },
{ {
label: '适配业务', label: '业务标签',
name: 'staffSceneLabel', name: 'staffSceneLabel',
addHtml: 'staffSceneLabel' addHtml: 'staffSceneLabel'
}, },
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
], ],
customDeduction: [ customDeduction: [
{ required: false, message: '', trigger: 'blur' }, { required: false, message: '', trigger: 'blur' },
{ validator: validateCustomDeduction, trigger: ['blur', 'change']} { validator: validateCustomDeduction, trigger: ['blur']}
], ],
remark: [ remark: [
{ required: true, message: '请输入备注', trigger: 'blur' } { required: true, message: '请输入备注', trigger: 'blur' }
...@@ -170,6 +170,24 @@ export default { ...@@ -170,6 +170,24 @@ export default {
this.$set(this.infoForm, key, limitPrice(e, oldValue, maxlength, 2)) this.$set(this.infoForm, key, limitPrice(e, oldValue, maxlength, 2))
this.$set(this.infoForm, 'old' + key, this.infoForm[key]) this.$set(this.infoForm, 'old' + key, this.infoForm[key])
} }
// 清除与输入框1和输入框2相关的内容
const refundOffsetText = !this.isEmpty(this.infoForm['refundOffset']) && !isNaN(this.infoForm['refundOffset']) ? `退单冲减${this.infoForm['refundOffset']},` : ''
const customDeductionText = !this.isEmpty(this.infoForm['customDeduction']) && !isNaN(this.infoForm['customDeduction']) ? `正负冲减${this.infoForm['customDeduction']},` : ''
let existingText = this.infoForm.remark
.replace(/退单冲减[^,]*/g, '')
.replace(/正负冲减[^,]*/g, '')
.trim()
// 添加新的输入框内容
if (refundOffsetText) {
existingText += refundOffsetText
}
if (customDeductionText) {
existingText += customDeductionText
}
// 更新备注的内容
this.infoForm.remark = existingText
}, },
limitPriceForNegative(newValue) { limitPriceForNegative(newValue) {
// 用来检索整数且不超过6位数 // 用来检索整数且不超过6位数
...@@ -217,6 +235,7 @@ export default { ...@@ -217,6 +235,7 @@ export default {
remark: this.infoForm.remark remark: this.infoForm.remark
} }
if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0') if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0')
if (isNaN(params.customDeduction)) return this.$message.warning('正负冲减值需为数字')
reviseSalaryApi(params).then(res => { reviseSalaryApi(params).then(res => {
this.$message.success('修订成功') this.$message.success('修订成功')
this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' }) this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' })
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible" <baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm"> @handleClick="handleAddConfirm">
<div class="dialog-content"> <div class="dialog-content">
<d2-table :hasPage="false" :hasNum="false" <!-- <d2-table :hasPage="false" :hasNum="false"
:tableData="salaryList" :tableData="salaryList"
:table-params="salaryTableParams"> :table-params="salaryTableParams">
<template slot="deferredIncluded" slot-scope="scope"> <template slot="deferredIncluded" slot-scope="scope">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span>{{ `¥${scope.scope.deferIncome}` }}</span> <span>{{ `¥${scope.scope.deferIncome}` }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
</d2-table> </d2-table> -->
<div class="header" v-if="detailInfo.clockingInOpenFlag == 'Y'"> <div class="header" v-if="detailInfo.clockingInOpenFlag == 'Y'">
员工本月应出勤天数{{ detailInfo.shouldWorkDay }}天,实际出勤天数{{ detailInfo.actualWorkDay }}天,基本工资收入=&nbsp; 员工本月应出勤天数{{ detailInfo.shouldWorkDay }}天,实际出勤天数{{ detailInfo.actualWorkDay }}天,基本工资收入=&nbsp;
<span>{{ detailInfo.basicSalary }}元</span>&nbsp;÷&nbsp; <span>{{ detailInfo.basicSalary }}元</span>&nbsp;÷&nbsp;
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<span>{{ subItem.merchantId }}</span> <span>{{ subItem.merchantId }}</span>
<span class="car-text" v-if="subItem.configCarType">{{ subItem.configCarType ==1 ? '单问界' : '其他车系' }}</span> <span class="car-text" v-if="subItem.configCarType">{{ subItem.configCarType ==1 ? '单问界' : '其他车系' }}</span>
</div> </div>
<div>门店总提成金额<span class="price-text">{{ (commissionPrice = [1, 2].includes(subItem.configType) ? subItem.grCommissionPrice : subItem.goodsCommissionPrice) || '-' }}元</span></div> <div>门店总提成金额<span class="price-text">{{ (commissionPrice = [2].includes(subItem.configType) ? subItem.grCommissionPrice : subItem.goodsCommissionPrice) || '-' }}元</span></div>
</div> </div>
<div class="content-item-body"> <div class="content-item-body">
<div class="left-line" :style="{ 'height': subItem.allocationDetailList.length ? (48 * (subItem.allocationDetailList.length) + 63) + 'px' : '117px'}"> <div class="left-line" :style="{ 'height': subItem.allocationDetailList.length ? (48 * (subItem.allocationDetailList.length) + 63) + 'px' : '117px'}">
...@@ -195,8 +195,8 @@ export default { ...@@ -195,8 +195,8 @@ export default {
prop: '', prop: '',
width: 100, width: 100,
formatter: (row) => { formatter: (row) => {
// allocationType:5售后 6非售后 售后比例为calculateValue系数默认为1 // allocationType:(5售后 新类型社招轻改7 比例取值calculateValue 无系数) (6非售后 比例取值outputCommissionRatio 系数取值calculateValue)
return row.allocationType == 6 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 5 ? `${row.calculateValue}%×1` : '-' return row.allocationType == 6 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 5 || row.allocationType == 7 ? `${row.calculateValue}%` : '-'
} }
}, },
{ {
...@@ -256,19 +256,19 @@ export default { ...@@ -256,19 +256,19 @@ export default {
data: res?.detailList[key] data: res?.detailList[key]
} }
}) })
const { actualBasicSalary, minimumSalary, mentorCommission, merchantCommission, padDeductMoney, dailyDeductMoney, refundOffset, deferExpenses, deferIncome, correctSalary } = res || {} // const { actualBasicSalary, minimumSalary, mentorCommission, merchantCommission, padDeductMoney, dailyDeductMoney, refundOffset, deferExpenses, deferIncome, correctSalary } = res || {}
this.salaryList = [{ // this.salaryList = [{
actualBasicSalary, // actualBasicSalary,
minimumSalary, // minimumSalary,
mentorCommission, // mentorCommission,
merchantCommission, // merchantCommission,
padDeductMoney, // padDeductMoney,
dailyDeductMoney, // dailyDeductMoney,
refundOffset, // refundOffset,
deferExpenses, // deferExpenses,
deferIncome, // deferIncome,
correctSalary // correctSalary
}] // }]
for (var j = 0; j < detailArray?.length; j++) { for (var j = 0; j < detailArray?.length; j++) {
const seen = new Set() const seen = new Set()
detailArray[j].data = detailArray[j]?.data?.map(item => { detailArray[j].data = detailArray[j]?.data?.map(item => {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<span style="display: inline-block;margin-right: 10px;"> <span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120502']" /> <auth-button category="Button" :show-btn-ids="['9120502']" />
</span> </span>
<auth-button category="Button" :show-btn-ids="['9120507']" /> <!-- <auth-button category="Button" :show-btn-ids="['9120507']" /> -->
</d2-table-header> </d2-table-header>
<d2-table ref="recordTable" <d2-table ref="recordTable"
:get-list-api="getListApi" :get-list-api="getListApi"
...@@ -177,8 +177,8 @@ export default { ...@@ -177,8 +177,8 @@ export default {
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
// tableOption: { width: '200px' }, tableOption: { width: '130px' },
tableOption: true, // tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: "姓名", label: "姓名",
...@@ -255,6 +255,13 @@ export default { ...@@ -255,6 +255,13 @@ export default {
} }
}, },
{ {
label: "更新时间",
prop: "updatedDate",
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD') : '-'
}
},
{
label: "状态", label: "状态",
prop: "workingStatus", prop: "workingStatus",
width: "120px", width: "120px",
...@@ -271,7 +278,16 @@ export default { ...@@ -271,7 +278,16 @@ export default {
] ]
}, },
baseData: { baseData: {
staffSceneLabelList: deepClone(staffSceneLabelList), staffSceneLabelList: [{
confId: 1,
confValue: '轻改'
}, {
confId: 2,
confValue: '权益'
}, {
confId: 3,
confValue: '延保'
}],
shopMerchantIdList: [], shopMerchantIdList: [],
hireTypeList: [ hireTypeList: [
{ confId: '1', confValue: '校招管培生' }, { confId: '1', confValue: '校招管培生' },
......
...@@ -189,10 +189,17 @@ export default { ...@@ -189,10 +189,17 @@ export default {
}) })
}, },
del(index) { del(index) {
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.infoData.campusList.splice(index, 1) this.infoData.campusList.splice(index, 1)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['configForm'].clearValidate() this.$refs['configForm'].clearValidate()
}) })
}).catch(() => {
})
}, },
handleInput(e, key, scope) { handleInput(e, key, scope) {
e = e.replace(/[^\d.]/g, '') e = e.replace(/[^\d.]/g, '')
......
<!-- 复制绩效方案弹窗 -->
<template>
<div>
<d2-dialog title="复制绩效方案"
:is-visible.sync="copyPerformanceVisible"
width="70%"
btn-ok-label="确定"
@confirmDialog="handleConfirm"
@closeDialog="handleCancel"
class="carSeries">
<slot />
<el-row class="tableCon">
<div class="tableBox">
<el-table ref="seletingTable"
:data="selectingData"
height="320px"
class="table"
border
@select="handleChange"
@select-all="handleAll">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号"
align="center"
type="index"
width="55" />
<el-table-column
prop="merchantName"
label="门店名称"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
<el-table-column
prop="merchantId"
label="商户号"
:show-overflow-tooltip="true"
align="center">
</el-table-column>
</el-table>
<el-pagination small
background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
:page-size="pageSize"
layout="total, prev, pager, next"
:total="total" />
</div>
<div class="selectedBox">
<div class="title">
<div class="title_txt">已选</div>
<div class="title_btn" @click="clearSelect">清空</div>
</div>
<div class="content">
<div class="item" v-for="(subItem, subIdx) in selectedData" :key="subIdx">
<div class="item_txt"><span>{{ `${subItem.merchantName}${subItem.merchantId}` }}</span></div>
<div class="del_item" @click="delItem(subItem)"><i class="el-icon-error"></i></div>
</div>
</div>
</div>
</el-row>
</d2-dialog>
</div>
</template>
<script>
import { deepClone } from '@/common/util'
export default {
name: 'CarSeriesDialog',
data() {
return {
selectedData: [],
selectingData: [],
// 分页
total: 0,
currentPage: 1,
pageSize: 10,
curId: '',
isVisible: false
}
},
props: {
copyPerformanceVisible: {
type: Boolean,
default: false
},
performanceMerchantApi: {
type: Function,
default: () => { }
},
performanceMerchantSearchForm: {
type: Object,
default: () => { }
}
},
mounted() {
this.getSelectingList()
},
methods: {
getSelectingList() {
let params = deepClone(this.performanceMerchantSearchForm)
this.performanceMerchantApi({
...params,
currentPage: this.currentPage,
pageSize: this.pageSize
}).then(res => {
this.selectingData = res.list || []
this.total = res.total
this.$nextTick(() => {
this.recoverySelection()
})
})
},
recoverySelection() {
var exitIds = this.selectedData.map((item) => item.merchantId)
this.selectingData.forEach((item) => {
exitIds.includes(item.merchantId) &&
this.$refs.seletingTable.toggleRowSelection(item, true)
})
},
handleChange(selection, row) {
var addOrDelete = !!selection.find(
(item) => item.merchantId === row.merchantId
)
addOrDelete
? this.selectedData.push(row)
: (this.selectedData = this.selectedData.filter(
(item) => item.merchantId !== row.merchantId
))
},
handleAll(selection) {
this.selectingData.forEach((item) => {
var isExit = this.selectedData.findIndex(
(subItem) => subItem.merchantId === item.merchantId
)
if (selection.length && isExit === -1) {
this.selectedData.push(item)
} else if (!selection.length && isExit !== -1) {
this.selectedData.splice(isExit, 1)
}
})
},
clearSelect() {
this.selectedData = []
this.$refs.seletingTable.clearSelection()
},
delItem(row) {
this.selectedData = this.selectedData.filter(item => item.merchantId !== row.merchantId)
const obj = this.selectingData.find(v => v.merchantId == row.merchantId)
if (obj) this.$refs.seletingTable.toggleRowSelection(obj)
},
handleCurrentChange(val) {
this.currentPage = val
this.getSelectingList()
},
handleConfirm() {
if (!this.selectedData?.length) return this.$message.warning('请选择门店')
if (this.selectedData?.length > 10) return this.$message.warning('最多选择十家门店')
this.$emit('handleConfirm', this.selectedData)
},
handleCancel() {
this.$emit('handleCancel')
}
}
}
</script>
<style lang="scss" scoped>
.carSeries .table {
margin: 0 auto 20px !important;
width: 100%;
}
.carSeries .tableCon {
margin-top: 20px;
display: flex;
.tableBox {
flex: 2;
}
.selectedBox{
flex: 1;
height: 320px;
border: 1px solid #E5E5E5;
margin-left: 10px;
.title{
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 8px 0 16px;
border-bottom: 1px solid #E5E5E5;
.title_txt{
font-size: 16px;
font-weight: 600;
color: #333333;
}
.title_btn{
cursor: pointer;
font-size: 14px;
color: #185EFE;
}
}
.content{
padding: 16px 10px;
height: calc(100% - 75px);
overflow-y: scroll;
.item{
display: flex;
align-items: center;
justify-content: space-between;
height: 32px;
color: #666666;
padding: 0 8px;
.del_item{
cursor: pointer;
}
}
.item:hover{
background: #F6F9FF;
}
}
}
}
.service-service .carSeries .el-table .cell,
.d2-form .carSeries .el-table .cell {
line-height: 26px !important;
}
.service-service .carSeries .el-table--medium td,
.d2-form .carSeries .el-table--medium td {
padding: 6px 8px !important;
}
.carSeries .red {
color: red;
}
.carSeries .tip-icon {
position: absolute;
display: inline-block;
height: 10px;
width: 10px;
line-height: 10px;
color: #ffffff;
background-color: red;
border: 1px solid red;
border-radius: 50%;
cursor: pointer;
font-size: 6px;
margin-left: 2px;
}
.text_hide{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .text_hide p{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
}
::v-deep .el-radio__original {
display: none !important;
}
::v-deep .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
.el-radio__inner {
box-shadow: none !important;
}
</style>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
<div class="d2-container-content"> <div class="d2-container-content">
<d2-table-header> <d2-table-header>
<span style="display: inline-block"> <!-- <span style="display: inline-block">
<auth-button category="Button" <auth-button category="Button"
style="display: inline-block" style="display: inline-block"
:show-btn-ids="['9121210']" /> :show-btn-ids="['9121210']" />
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
<auth-button category="Button" <auth-button category="Button"
style="display: inline-block" style="display: inline-block"
:show-btn-ids="['9121205']" /> :show-btn-ids="['9121205']" />
</span> -->
<span style="display: inline-block;">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121211']" />
</span> </span>
</d2-table-header> </d2-table-header>
<d2-table ref="performanceTable" <d2-table ref="performanceTable"
...@@ -39,7 +44,8 @@ ...@@ -39,7 +44,8 @@
:search-form="searchForm" :search-form="searchForm"
:table-params="tableParams" :table-params="tableParams"
:get-list-api="getListApi" :get-list-api="getListApi"
:before-search-fn="beforeSearchFn"> :before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn">
<template slot="brand" slot-scope="scope"> <template slot="brand" slot-scope="scope">
<template v-if="scope.scope.brand && scope.scope.brand.length > 20"> <template v-if="scope.scope.brand && scope.scope.brand.length > 20">
<el-popover placement="top" width="300" trigger="hover"> <el-popover placement="top" width="300" trigger="hover">
...@@ -68,15 +74,41 @@ ...@@ -68,15 +74,41 @@
</div> </div>
</d2-table> </d2-table>
</div> </div>
<copy-performance-dialog
ref="copyPerformance"
v-if="copyPerformanceVisible"
:copy-performance-visible="copyPerformanceVisible"
:performance-merchant-api="getListApi"
:performance-merchant-search-form="performanceMerchantSearchForm"
@handleConfirm="handleConfirm"
@handleCancel="handleCancel">
<el-row slot>
<el-form :model="performanceMerchantSearchForm" ref="relate" :inline="true">
<el-form-item label="门店名称:">
<el-input v-model.trim="performanceMerchantSearchForm.merchantName" placeholder="门店名称"
clearable />
</el-form-item>
<el-form-item label="商户号:">
<el-input v-model.trim="performanceMerchantSearchForm.merchantId" placeholder="商户号"
clearable />
</el-form-item>
<el-button type="primary" @click="handleDialogSearch">搜索</el-button>
</el-form>
</el-row>
</copy-performance-dialog>
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { mapActions, mapState } from 'vuex' import { mapActions, mapState } from 'vuex'
import { getStoreSalaryListApi, editStoreSalaryStatusApi, deleteStoreSalaryApi } from '@api/resident' import { getStoreSalaryListApi, editStoreSalaryStatusApi, deleteStoreSalaryApi, copyPerformanceApi } from '@api/resident'
import { getCarBrandList } from "@api/commodity.js" import { getCarBrandList } from "@api/commodity.js"
import { deepClone } from '@/common/util' import { deepClone } from '@/common/util'
import copyPerformanceDialog from './copyPerformanceDialog.vue'
export default { export default {
name: "PerformanceList", name: "PerformanceList",
components: {
copyPerformanceDialog
},
data() { data() {
return { return {
getListApi: getStoreSalaryListApi, getListApi: getStoreSalaryListApi,
...@@ -120,7 +152,8 @@ export default { ...@@ -120,7 +152,8 @@ export default {
// 表格参数 // 表格参数
tableParams: { tableParams: {
needUnique: true, needUnique: true,
mutiSelectUniqueKey: 'uniqueVal', mutiSelectUniqueKey: 'id',
mutiSelectName: 'performanceIndex',
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list', listName: 'list',
tableOption: { tableOption: {
...@@ -206,7 +239,13 @@ export default { ...@@ -206,7 +239,13 @@ export default {
confLabel: '社会招聘' confLabel: '社会招聘'
}], }],
brandList: [] brandList: []
} },
performanceMerchantSearchForm: {
merchantName: '',
maerchantId: ''
},
copyPerformanceVisible: false,
copySelectedData: {}
} }
}, },
computed: { computed: {
...@@ -235,6 +274,13 @@ export default { ...@@ -235,6 +274,13 @@ export default {
resolve() resolve()
}) })
}, },
selectableFn(row) {
var isSelect = true
if (row.minPerformConfigStatus == 2 || !row.minPerformConfigStatus) { // 无配置方案或已禁用的不可勾选
isSelect = false
}
return isSelect
},
brandFilter(ele, lenght) { brandFilter(ele, lenght) {
if (ele.brand) { if (ele.brand) {
return lenght ? (ele.brand?.length > lenght ? ele.brand.substring(0, lenght) + '\u2026' : ele.brand.substring(0, lenght)) : ele.brand return lenght ? (ele.brand?.length > lenght ? ele.brand.substring(0, lenght) + '\u2026' : ele.brand.substring(0, lenght)) : ele.brand
...@@ -269,6 +315,33 @@ export default { ...@@ -269,6 +315,33 @@ export default {
} }
}) })
}, },
// 复制绩效方案
handleCopyConfig() {
var selectedData = []
if (this.$refs.performanceTable.mutiSelectArr.performanceIndex) {
selectedData = this.$refs.performanceTable.mutiSelectArr.performanceIndex
}
if (!selectedData?.length) return this.$message.warning('请选择要复制绩效方案的门店')
if (selectedData?.length > 1) return this.$message.warning('仅支持选择一个门店')
this.copyPerformanceVisible = true
this.copySelectedData = selectedData[0]
},
handleDialogSearch() {
this.$refs.copyPerformance.handleCurrentChange(1)
},
handleConfirm(data) {
copyPerformanceApi({
merchantId: this.copySelectedData?.merchantId,
targetMerchantList: data?.map(v => v.merchantId)
}).then(res => {
this.notice.okTips()
this.handleCancel()
this.$refs.performanceTable.refreshTable()
})
},
handleCancel() {
this.copyPerformanceVisible = false
},
// 导入绩效 // 导入绩效
handleImport() { handleImport() {
this.$alert('敬请期待', '提示', { this.$alert('敬请期待', '提示', {
......
...@@ -4,19 +4,20 @@ ...@@ -4,19 +4,20 @@
<el-tabs type="card" class="tabs_content" v-model="defaultActiveName"> <el-tabs type="card" class="tabs_content" v-model="defaultActiveName">
<el-tab-pane v-for="(subItem, subIndex) in levelData" :key="subItem.jobType" :name="subItem.jobType"> <el-tab-pane v-for="(subItem, subIndex) in levelData" :key="subItem.jobType" :name="subItem.jobType">
<span slot="label"><i v-if="subItem.validateErrFlag" class="el-icon-warning car-error-txt"></i>{{ subItem.jobTypeName }}</span> <span slot="label"><i v-if="subItem.validateErrFlag" class="el-icon-warning car-error-txt"></i>{{ subItem.jobTypeName }}</span>
<el-button class="copy_btn" type="primary" size="small" plain @click="copyConfig">复制该配置到{{ defaultActiveName == 4 ? '初级驻店' : jobTypeList[Number(defaultActiveName) + 1] }}</el-button>
<el-form :model="subItem.configInfo" :rules="rules" :ref="`configForm_${subIndex}`"> <el-form :model="subItem.configInfo" :rules="rules" :ref="`configForm_${subIndex}`">
<el-form-item :prop="`campusList`" label-width="0" > <el-form-item :prop="`campusList`" label-width="0" >
<div class="config-table"> <div class="config-table">
<el-button class="copy_btn" type="primary" size="small" plain @click="copyConfig">复制该配置到{{ defaultActiveName == 4 ? '初级驻店' : jobTypeList[Number(defaultActiveName) + 1] }}</el-button>
<template> <template>
<el-table :data="subItem.configInfo.campusList" :header-cell-style="rowClass"> <el-table :data="subItem.configInfo.campusList" :header-cell-style="rowClass">
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column prop="productType" label="产品名称" min-width="175"> <el-table-column prop="productType" label="产品名称" min-width="175">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form-item :prop="`campusList[${scope.$index}].productType`" :rules="rules.productType" label-width="0"> <el-form-item :prop="`campusList[${scope.$index}].productType`" :rules="rules.productType" label-width="0">
<el-cascader style="width: 160px" :options="productGoodsTypeList" filterable <el-cascader style="width: 160px" :options="scope.row.productTypeFocus ? productGoodsTypeList : baseData.goodsTypeList" filterable
v-model="scope.row['productType']" v-model="scope.row['productType']"
@change="changeGoodsType($event, subIndex, scope.$index, 'productType')" aria-hidden="false" @change="changeGoodsType($event, subIndex, scope.$index, 'productType')" aria-hidden="false"
@visible-change="handleVisibleChange($event, subIndex, scope.$index, 'productType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -67,8 +68,9 @@ ...@@ -67,8 +68,9 @@
<template slot-scope="scope" v-if="scope.row['conditionFlag']"> <template slot-scope="scope" v-if="scope.row['conditionFlag']">
且 且
<el-form-item :prop="`campusList[${scope.$index}].conditionProductType`" :rules="rules.conditionProductType" label-width="0"> <el-form-item :prop="`campusList[${scope.$index}].conditionProductType`" :rules="rules.conditionProductType" label-width="0">
<el-cascader style="width: 160px" :options="conditionProductGoodsTypeList" filterable v-model="scope.row['conditionProductType']" <el-cascader style="width: 160px" :options="scope.row.conditionProductTypeFocus ? conditionProductGoodsTypeList : baseData.goodsTypeList" filterable v-model="scope.row['conditionProductType']"
@change="changeGoodsType($event, subIndex, scope.$index, 'conditionProductType')" aria-hidden="false" @change="changeGoodsType($event, subIndex, scope.$index, 'conditionProductType')" aria-hidden="false"
@visible-change="handleVisibleChange($event, subIndex, scope.$index, 'conditionProductType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -108,9 +110,9 @@ ...@@ -108,9 +110,9 @@
<template slot-scope="scope"> <template slot-scope="scope">
产品名称为 产品名称为
<el-form-item :prop="`customerList[${scope.$index}].productType`" :rules="rules.productType" label-width="0"> <el-form-item :prop="`customerList[${scope.$index}].productType`" :rules="rules.productType" label-width="0">
<el-cascader style="width: 160px" :options="customerGoodsTypeList" filterable v-model="scope.row['productType']" <el-cascader style="width: 160px" :options="scope.row.focusFlag ? customerGoodsTypeList : baseData.goodsTypeList" filterable v-model="scope.row['productType']"
@change="changeGoodsType($event, subIndex, scope.$index, 'productType', 'customerList')" aria-hidden="false" @change="changeGoodsType($event, subIndex, scope.$index, 'productType', 'customerList')" aria-hidden="false"
@focus="handleFocus('customer')" @visible-change="handleVisibleChange($event, subIndex, scope.$index, 'cusProductType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false"> :props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
...@@ -258,6 +260,13 @@ export default { ...@@ -258,6 +260,13 @@ export default {
isEmpty(data) { isEmpty(data) {
return (data ?? '') === '' return (data ?? '') === ''
}, },
handleVisibleChange(e, index, subIdx, key) {
if (key == 'productType' || key == 'conditionProductType') {
this.$set(this.levelData[index]?.configInfo?.campusList[subIdx], `${key}Focus`, e)
} else {
this.$set(this.levelData[index]?.configInfo?.customerList[subIdx], 'focusFlag', e)
}
},
initGoodsTypeList() { initGoodsTypeList() {
let goodsTypeList = deepClone(this.baseData.goodsTypeList) let goodsTypeList = deepClone(this.baseData.goodsTypeList)
// 初始化disabled值 // 初始化disabled值
...@@ -316,9 +325,6 @@ export default { ...@@ -316,9 +325,6 @@ export default {
rowClass({ row, rowIndex }) { rowClass({ row, rowIndex }) {
return 'background:#F2F4F7;color:#333333;font-size:14px;font-weight:600;' return 'background:#F2F4F7;color:#333333;font-size:14px;font-weight:600;'
}, },
handleFocus(key) {
this.foucsGoodsType = key
},
addRow(subIndex) { addRow(subIndex) {
if (this.levelData[subIndex].configInfo.campusList.length >= 50) return if (this.levelData[subIndex].configInfo.campusList.length >= 50) return
let obj = { let obj = {
...@@ -425,7 +431,7 @@ export default { ...@@ -425,7 +431,7 @@ export default {
if (this.defaultActiveName == 4) { if (this.defaultActiveName == 4) {
this.$set(this.levelData[0].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList)) this.$set(this.levelData[0].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList))
this.$set(this.levelData[0].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList)) this.$set(this.levelData[0].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList))
this.$refs[`configForm_${_index}`]?.[0]?.clearValidate() this.$refs[`configForm_${0}`]?.[0]?.clearValidate()
} else { } else {
this.$set(this.levelData[_index + 1].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList)) this.$set(this.levelData[_index + 1].configInfo, 'campusList', deepClone(this.levelData[_index].configInfo.campusList))
this.$set(this.levelData[_index + 1].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList)) this.$set(this.levelData[_index + 1].configInfo, 'customerList', deepClone(this.levelData[_index].configInfo.customerList))
...@@ -561,13 +567,13 @@ export default { ...@@ -561,13 +567,13 @@ export default {
.add_btn{ .add_btn{
margin-top: 10px; margin-top: 10px;
} }
}
.copy_btn{ .copy_btn{
position: absolute; position: absolute;
top: 10px; transform: translate(0, -55px);
right: 20px; right: 0;
z-index: 2; z-index: 2;
} }
}
::v-deep.config-table { ::v-deep.config-table {
.el-table .cell { .el-table .cell {
padding: 0 10px; padding: 0 10px;
...@@ -597,4 +603,7 @@ export default { ...@@ -597,4 +603,7 @@ export default {
} }
} }
} }
::v-deep .el-tabs__content{
overflow: visible;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -341,7 +341,16 @@ ...@@ -341,7 +341,16 @@
/>&nbsp;% />&nbsp;%
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="阳光激励费:" prop="sunlightIncentiveCost"> <el-form-item label="隐私设置:">
<el-switch
v-model="form.costPrivacyShowFlag"
class="switchStyle" active-color="#2a58ad"
active-value="Y"
inactive-value="N">
</el-switch>
<span class="flag-text">查看订单商品成本</span>
</el-form-item>
<!-- <el-form-item label="阳光激励费:" prop="sunlightIncentiveCost">
<div> <div>
<span class="rateInput_s">精品升级</span> <span class="rateInput_s">精品升级</span>
<el-input <el-input
...@@ -380,7 +389,7 @@ ...@@ -380,7 +389,7 @@
placeholder="请输入比例" placeholder="请输入比例"
/>&nbsp;% />&nbsp;%
</div> </div>
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<div class="btnCon"> <div class="btnCon">
<el-button <el-button
...@@ -551,6 +560,7 @@ export default { ...@@ -551,6 +560,7 @@ export default {
this.directorList[item.directorType].push(item.directorUserId) this.directorList[item.directorType].push(item.directorUserId)
} }
}) })
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || ''
this.form = deepClone(res) this.form = deepClone(res)
if (!this.form.serviceMerchantServiceChargeConfig) { if (!this.form.serviceMerchantServiceChargeConfig) {
// 未设置过时,手续费默认为打开并且费率为2 // 未设置过时,手续费默认为打开并且费率为2
...@@ -918,14 +928,14 @@ export default { ...@@ -918,14 +928,14 @@ export default {
}) })
} }
_params.directorList = directorList _params.directorList = directorList
_params.boutiqueSunshineInspiration = // _params.boutiqueSunshineInspiration =
shopMerchantConfig.boutiqueSunshineInspiration // shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration = // _params.quotationSunshineInspiration =
shopMerchantConfig.quotationSunshineInspiration // shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration = // _params.boutiqueMarketInspiration =
shopMerchantConfig.boutiqueMarketInspiration // shopMerchantConfig.boutiqueMarketInspiration
_params.quotationMarketInspiration = // _params.quotationMarketInspiration =
shopMerchantConfig.quotationMarketInspiration // shopMerchantConfig.quotationMarketInspiration
console.log(_params) console.log(_params)
shopSetting({ dataString: JSON.stringify(_params) }).then((res) => { shopSetting({ dataString: JSON.stringify(_params) }).then((res) => {
this.notice.okTips() this.notice.okTips()
...@@ -1311,4 +1321,8 @@ export default { ...@@ -1311,4 +1321,8 @@ export default {
.rateInput_d { .rateInput_d {
margin-top: 20px; margin-top: 20px;
} }
.flag-text{
color: #333333;
margin-left: 10px;
}
</style> </style>
...@@ -152,6 +152,13 @@ export default { ...@@ -152,6 +152,13 @@ export default {
type: "datePicker", type: "datePicker",
isClear: true, isClear: true,
pickerOptions: "rangePickerOptions" pickerOptions: "rangePickerOptions"
},
{
label: "支付时间",
name: "payTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
} }
], ],
getListApi: getList, getListApi: getList,
...@@ -166,6 +173,16 @@ export default { ...@@ -166,6 +173,16 @@ export default {
width: "160px" width: "160px"
}, },
{ {
label: "创建时间",
prop: "createdTime",
width: '150px'
},
{
label: "支付时间",
prop: "payTime",
width: '150px'
},
{
label: "客户姓名", label: "客户姓名",
prop: "customerName", prop: "customerName",
width: "250px" width: "250px"
...@@ -337,7 +354,8 @@ export default { ...@@ -337,7 +354,8 @@ export default {
{ severName: "已完成", severType: 5 }, { severName: "已完成", severType: 5 },
{ severName: "已退款", severType: 6 }, { severName: "已退款", severType: 6 },
{ severName: "已撤销", severType: 9 }, { severName: "已撤销", severType: 9 },
{ severName: "错误订单", severType: 11 } { severName: "错误订单", severType: 11 },
{ severName: "待上传", severType: 7 }
] ]
}, },
previewVisible: false, previewVisible: false,
...@@ -430,12 +448,24 @@ export default { ...@@ -430,12 +448,24 @@ export default {
.replace(/\//g, "-") + " 23:59:59" .replace(/\//g, "-") + " 23:59:59"
} }
delete params.createTime delete params.createTime
if (this.searchForm.payTime?.length) {
params.minPayTime =
new Date(this.searchForm.payTime[0])
.toLocaleDateString()
.replace(/\//g, "-") + " 00:00:00"
params.maxPayTime =
new Date(this.searchForm.payTime[1])
.toLocaleDateString()
.replace(/\//g, "-") + " 23:59:59"
}
delete params.payTime
return params return params
}, },
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = this.getParams() this.searchFormSearch = this.getParams()
delete this.searchFormSearch.createTime delete this.searchFormSearch.createTime
delete this.searchFormSearch.payTime
resolve() resolve()
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!