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 2432 additions and 364 deletions
......@@ -68,7 +68,8 @@ export function batchUpdateStatus(data) {
// 批量复制
export function batchUpdateBatchCopy(data) {
data.method = `${path}merchantGoodsInfo.updateBatchCopy`
// data.method = `${path}merchantGoodsInfo.updateBatchCopy`
data.method = `${path}merchantGoodsInfo.addBatchCopy`
return request(data, "post")
}
......
......@@ -105,3 +105,9 @@ export function pointStaffQuery(data) {
data.method = `${path}resident.point.staff.query`
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
......@@ -78,4 +78,25 @@ export function deductOrderPage(data) {
export function cancelDeduct(data) {
data.method = `dj.api.smartcarlife.staff.score.cancel.deduct`
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
......@@ -42,3 +42,15 @@ export function getExtendServiceItemsParts(data) {
data.method = `${path}vd.item.getExtendUnitList`
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')
}
......@@ -439,4 +439,46 @@ export function getIncomePage(data) {
export function listGoodsType(data = {}) {
data.method = 'dj.api.smartcarlife.staff.incomeCalculation.listGoodsType'
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
......@@ -46,3 +46,9 @@ export function getMerchantLevelApi(data) {
data.method = `dj.api.smartcarlife.get.merchantLevel`
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 = [
{ confId: 1, confValue: "成功" }
]
// 财资数据 回单状态
export const receiptStatusOpt = [
{ confId: 0, confValue: "否" },
{ confId: 1, confValue: "是" }
]
// 财资数据 操作项
export const operationTypeOpt = [
{ confId: 1, confValue: "重推财资数据" },
......
......@@ -440,11 +440,29 @@ export default {
v.goodsInfo = {}
shopPriceArr.push(v.upgradePrice)
v.listShowShopPrice = v.upgradePrice
v.listShowSpecificationData =
val.goodsSpecificationNameList?.length > 1
? v.specificationData &&
v.specificationData?.replace(/;~;/g, " ")
: "-"
let specificationTypeSequenceArr = v.specificationTypeSequence?.split(';~;')
let specificationValueSequenceArr = v?.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}`
}
})
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.goodsTypeName = val.goodsInfo?.goodsTypeName
v.goodsInfo.goodsTypeName = types
......
......@@ -175,7 +175,7 @@ export const routerName = {
{
authId: "9120510",
parentId: "91205",
label: "工资明细",
label: "提成构成",
handle: "handleSalaryDetail"
}
],
......@@ -708,6 +708,14 @@ export const routerName = {
type: "primary",
handle: "handleImport"
},
{
authId: "9121211",
parentId: "91212",
label: "复制绩效方案",
category: "Button",
type: "primary",
handle: "handleCopyConfig"
}
],
component: _import("residentManage/salaryPerformance/index")
},
......@@ -826,7 +834,31 @@ export const routerName = {
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")
},
......
......@@ -32,7 +32,9 @@ export default {
goodsSpecificationSingleList: [],
specificationSingleDetailList: [],
selectedSceneCode: '',
goodsType: ''
goodsType: '',
baseGoodsNameEmpty: false,
scrmFlag: 'N'
}
},
mutations: {
......
......@@ -84,7 +84,7 @@
import { Util, deepClone } from '@/common/util'
// import { rangePickerOptions } from '@/common/format'
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 inputRange from './components/inputRange'
import refetchDialog from './components/refetchDialog'
......@@ -115,7 +115,8 @@ export default {
cdSign: '',
postScript: '',
jdSync: '',
transactionTime: ''
transactionTime: '',
receiptStatus: ''
},
searchFormSearch: {},
showFormData: [{
......@@ -212,6 +213,15 @@ export default {
type: 'datePicker',
isClear: true,
pickerOptions: 'rangePickerOptions'
}, {
label: '回单状态',
name: 'receiptStatus',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'receiptStatusOpt'
}],
getListApi: nbcbAccDetailPage,
tableParams: {
......@@ -282,6 +292,13 @@ export default {
width: '200px',
addHtml: "postScriptHtml"
}, {
label: '回单状态',
prop: 'receiptStatus',
width: '100px',
formatter: (cellValue) => {
return this.baseData.receiptStatusOpt.find(item => item.confId === cellValue.receiptStatus)?.confValue
}
}, {
label: '同步状态',
prop: 'jdSync',
width: '100px',
......@@ -304,7 +321,8 @@ export default {
bankNameList: [],
curCodeList: [],
cdSignOpt: deepClone(cdSignOpt),
jdSyncOpt: deepClone(jdSyncOpt)
jdSyncOpt: deepClone(jdSyncOpt),
receiptStatusOpt: deepClone(receiptStatusOpt),
},
recordInfo: null,
......@@ -398,7 +416,8 @@ export default {
cdSign: '',
postScript: '',
jdSync: '',
transactionTime: ''
transactionTime: '',
receiptStatus: ''
}
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
<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
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
......@@ -11,7 +11,7 @@
<el-input style="width: 370px;" v-model="sceneList[selectedScene]" disabled></el-input>
</el-form-item>
<el-form-item label="复制门店:" prop="selectMerchantObj">
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword
<el-select v-model="selectData.selectMerchantObj" remote reserve-keyword multiple collapse-tags
placeholder="请选择复制门店" @visible-change="visibleChange" :remote-method="remoteMethod"
v-el-select-loadmore="interestsLoadmore" style="width: 370px;" value-key="merchantId" filterable>
<el-option v-for="subItem in storeData" :key="subItem.merchantId"
......@@ -121,7 +121,6 @@ export default {
},
handleBatchCopyConfirm() {
this.$refs.batchCopyForm.validate((valid) => {
console.log(valid)
if (valid) {
this.$emit('handleBatchCopyConfirm', this.selectData?.selectMerchantObj)
}
......
......@@ -26,50 +26,42 @@
<div class="incid_box">
<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="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>
<!-- 权益/延保非第三方展示 -->
<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太阳膜/延保类 -->
<!-- 商品分类 1太阳膜 -->
<div class="item" v-if="formData[item.key] == '1'">
<div class="label">部位:</div>
<div class="value">{{ formData['positionNames'] }}</div>
</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ formData['warrantyPeriod'] }}</div>
<div class="value">
<ellipsis-popover :content="formData.upgradeGoods['positionNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<!-- 商品分类 权益服务 非第三方 -->
<div class="item" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务时间/年:</div>
<div class="value">{{ formData['serviceYears'] }}</div>
<div class="label">服务项目:</div>
<div class="value">
<ellipsis-popover :content="formData.upgradeGoods['serviceItemNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<!-- 商品分类 权益服务 -->
<div class="item" v-if="equitySceneType.includes(formData[item.key])">
<div class="label">实体卡:</div>
<div class="value">{{ formData['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 class="value">{{ formData.upgradeGoods['entityCardFlag'] == 'Y' ? '是' : '否' }}</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item flex_1" v-if="equitySceneType.includes(formData[item.key]) && !baseConfig.supplierCode.includes(`${formData.supplierCode}`)">
<div class="label">服务项目:</div>
<div class="value">{{ 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 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 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 class="item" v-if="membraneTypeList.includes(formData[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">
<ellipsis-popover :content="`${formData.upgradeGoods['warrantyPeriod']}年` || ''"></ellipsis-popover>
</div>
</div>
</div>
</el-form-item>
......@@ -161,11 +153,13 @@ import { deepClone } from '@/common/util'
import { mapActions } from 'vuex'
import { baseConfig } from "@/main"
import relateStoreTable from "./relateStoreTable.vue"
import ellipsisPopover from '../../components/ellipsisPopover.vue'
export default {
name: 'GroundingForm',
components: {
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() {
return {
......@@ -338,7 +332,7 @@ export default {
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
return `${(Math.round(num * pow) / pow).toFixed(2)}元`
},
handleClose() {
this.$emit('handleClose')
......@@ -395,6 +389,9 @@ export default {
width: 150px;
text-align: right;
}
.value {
width: calc(100% - 150px);
}
.text-hide {
width: calc(100% - 150px);
overflow: hidden;
......
......@@ -56,6 +56,9 @@ export const packageGoodsForm = [{
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
......@@ -70,6 +73,9 @@ export const packageGoodsForm = [{
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
......@@ -152,6 +158,7 @@ export const packageGoodsForm = [{
type: 'input',
width: '432px',
unit: true,
isDisabled: false,
handleInput: true
}, {
name: 'thirdPartyCost',
......@@ -173,6 +180,9 @@ export const packageGoodsDetail = [
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
......@@ -187,6 +197,9 @@ export const packageGoodsDetail = [
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
......
......@@ -16,6 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util'
import { productList, baseSupplyModeList, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from './constants/data'
import { baseConfig } from "@/main"
import { filterSpecsStr } from '../filterOption'
export default {
name: 'GroundingDetail',
components: {
......@@ -53,6 +54,9 @@ export default {
label: '商品名称',
value: 'upgradeGoodsName'
}, {
label: '规格',
value: 'specificationData'
}, {
label: '商品编码',
value: 'type'
}, {
......@@ -67,6 +71,9 @@ export default {
value: 'upgradePrice',
unit: true
}, {
label: '适用车型',
value: 'carTypeConfigName'
}, {
label: '所属系列',
value: 'goodsName'
}, {
......@@ -159,7 +166,8 @@ export default {
1: '质保权益卡'
},
detailId: '',
productServiceItemList: []
productServiceItemList: [],
filterSpecsStr
}
},
mounted() {
......@@ -183,7 +191,7 @@ export default {
const productType = []
if (res?.upgradeProductFlag == 'Y') productType.push(2)
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 result = types.filter(type => type).join('-')
const productTypeTextArr = []
......@@ -203,29 +211,27 @@ export default {
if (res.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList
}
res.tempGoodsTypeName = result // 所属分类
res.productTypeStr = productTypeTextArr?.length ? productTypeTextArr.join(';') : '-'
res.warrantyTypeStr = this.warrantyTypeShow[res?.warrantyType] || '-'
res.baseSupplyModeStr = baseSupplyModeList?.filter(v => v.confId == res.baseSupplyMode)[0]?.confName || ''
res.upgradeSupplyModeStr = arr?.filter(v => v.confId == res.upgradeSupplyMode)[0]?.confName || ''
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.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.thirdPartyCode = res?.upgradeGoods?.thirdPartyCode || ''
res.entityCardFlag = res?.upgradeGoods?.entityCardFlag
res.voucherList = res?.voucherList || []
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.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.$nextTick(() => {
this.show = true
......
......@@ -471,7 +471,7 @@ export default {
parentProp: 'goodsInfo',
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
......@@ -977,11 +977,16 @@ export default {
},
// 批量复制弹窗确定
handleBatchCopyConfirm(data) {
let merchantGoodsRefList = []
data?.forEach(v => {
merchantGoodsRefList.push({
merchantId: v.merchantId,
merchantName: v.merchantName
})
})
const params = {
ids: this.batchCopySelectData.map(v => { return v.id }) || [], // 商品id
sceneType: this.batchCopySelectScene, // 业务场景
merchantId: data?.merchantId,
merchantName: data?.merchantName
merchantGoodsRefList
}
batchUpdateBatchCopy(params).then(() => {
this.notice.okTips()
......
......@@ -27,50 +27,44 @@
<div class="item" v-for="(subItem, subIndex) in item.detailInfo" :key="subIndex">
<div class="label">{{ subItem.unit ? (membraneTypeList.includes(ele[item.key]) ? subItem.label +
`(元)/${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 class="item" v-if="ele[item.key] == 1">
<div class="label">部位:</div>
<div class="value">{{ ele['positionNames'] }}</div>
</div>
<!-- 质保年限 膜类展示-->
<div class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">{{ ele['warrantyPeriod'] }}</div>
<div class="value">
<ellipsis-popover :content="ele.upgradeGoods['positionNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务时间/年:</div>
<div class="value">{{ ele['serviceYears'] }}</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="ele.upgradeGoods['serviceItemNames'] || ''"></ellipsis-popover>
</div>
</div>
<!-- 商品分类 权益升级 (线上126) -->
<!-- 商品分类 权益服务 -->
<div class="item" v-if="equitySceneType.includes(ele[item.key])">
<div class="label">实体卡:</div>
<div class="value">{{ ele['entityCardFlag'] == 'Y' ? '是' : '否' }}</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>
<!-- 商品分类 权益升级 (线上126) -->
<div class="item flex_1" v-if="equitySceneType.includes(ele[item.key]) && !baseConfig.supplierCode.includes(`${ele['supplierCode']}`)">
<div class="label">服务项目:</div>
<div class="value">{{ 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 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 class="value">
<ellipsis-popover :content="ele.upgradeGoods['entityCardFlag'] == 'Y' ? '是' : '否'"></ellipsis-popover>
</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 class="item" v-if="membraneTypeList.includes(ele[item.key])">
<div class="label">质保年限/年:</div>
<div class="value">
<ellipsis-popover :content="`${ele.upgradeGoods['warrantyPeriod']}年` || ''"></ellipsis-popover>
</div>
</div>
</div>
</el-form-item>
......@@ -180,11 +174,13 @@ import { deepClone } from '@/common/util'
import { mapActions } from 'vuex'
import { baseConfig } from "@/main"
import relateStoreTable from "../../grounding/components/relateStoreTable.vue"
import ellipsisPopover from '../../components/ellipsisPopover.vue'
export default {
name: 'GroundingForm',
components: {
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() {
return {
......@@ -331,7 +327,7 @@ export default {
priceFilter(num) {
var pow = Math.pow(10, 2)
if (this.filterEmpty(num)) return '-'
return (Math.round(num * pow) / pow).toFixed(2)
return `${(Math.round(num * pow) / pow).toFixed(2)}元`
},
// 返回
handleClose() {
......@@ -400,6 +396,9 @@ export default {
width: 150px;
text-align: right;
}
.value{
width: calc(100% - 150px);
}
.text-hide {
width: calc(100% - 150px);
overflow: hidden;
......
......@@ -16,6 +16,7 @@ import { mapActions } from 'vuex'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from "@/main"
import { packageGoodsDetail, upgradeSupplyModeList, crowdUpgradeSupplyModeList } from '../grounding/constants/data'
import { filterSpecsStr } from "../filterOption"
export default {
name: 'PackageDetail',
components: {
......@@ -118,6 +119,7 @@ export default {
0: '质保卡',
1: '质保权益卡'
},
filterSpecsStr
}
},
mounted() {
......@@ -150,7 +152,7 @@ export default {
if (val.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList
}
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
this.editForm[1].formBlock.push(packageGoodsDetail)
......@@ -159,25 +161,8 @@ export default {
res.groundingGoodsList.push({
goodsType: val?.goodsType, // 类目值
upgradeGoodsId: val?.upgradeGoodsId, // 升级商品Id
upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称
goodsAlias: val?.goodsAlias || '-', // 商品别名
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result, // 商品所属类目
// upgradePrice: val?.upgradePrice, // 参考售价
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, // 售价
minSellPrice: val?.minSellPrice, // 最低售价
validMinSellPrice: val?.validMinSellPrice, // 是否校验最低价
......@@ -191,7 +176,19 @@ export default {
virtualAccountCost: val?.virtualAccountCost, // 虚拟对账成本
recoveryCost: val?.recoveryCost, // 回收成本
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] || '-'
......
<!-- 适用车型弹窗 -->
<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 @@
</p>
<div class="flex_box">
<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="编码:">
<span>{{ item.type }}</span>
<ellipsis-popover :content="item.type"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
label="第三方编码:">
<span>{{ item.thirdPartyCode }}</span>
<ellipsis-popover :content="item.thirdPartyCode"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<span>{{ !filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '-' }}</span>
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<ellipsis-popover :content="!filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item"
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '采购价(元)/卷:' : '采购价(元)/件:'">
<span>{{ !filterEmpty(item.purchasePrice) ? priceFilter(item.purchasePrice) : '-' }}</span>
:label="membraneTypeList.includes(commodityInfo.goodsInfo.goodsType) ? '参考售价(元)/车:' : '参考售价(元)/件:'">
<ellipsis-popover :content="!filterEmpty(item.upgradePrice) ? priceFilter(item.upgradePrice) : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<span>{{ !filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '-' }}</span>
<el-form-item v-if="(equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) || extendedPosiType.includes($$(commodityInfo.goodsInfo, 'goodsType'))) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))" class="d2-drawer-item"
:label="'嘀加成本(元)/件:'">
<ellipsis-popover :content="!filterEmpty(item.djCost) ? priceFilter(item.djCost) : '-'"></ellipsis-popover>
</el-form-item>
<el-form-item class="d2-drawer-item" label="适用车型:">
<ellipsis-popover :content="item.carSeriesName"></ellipsis-popover>
</el-form-item>
<el-form-item
class="d2-drawer-item"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务时间:">
<span>{{ !filterEmpty(item.serviceYears) ? (item.serviceYears + '年') : '-' }}</span>
label="服务项目:">
<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
class="d2-drawer-item"
......@@ -78,38 +88,11 @@
label="实体卡:">
<span>{{ item.entityCardFlag == 'Y' ? '是' : '否' }}</span>
</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
class="d2-drawer-item flex_1"
v-if="equitySceneType.includes($$(commodityInfo.goodsInfo,'goodsType')) && !supplierCode.includes($$(commodityInfo.goodsInfo, 'supplierCode'))"
label="服务项目:">
<span>{{ !filterEmpty(item.serviceItemNames) ? item.serviceItemNames : '-' }}</span>
</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>
class="d2-drawer-item"
v-if="membraneTypeList.includes($$(commodityInfo.goodsInfo,'goodsType'))"
label="质保年限:">
<ellipsis-popover :content="!filterEmpty(item.warrantyPeriod) ? (item.warrantyPeriod + '年') : '-'"></ellipsis-popover>
</el-form-item>
</div>
</el-form>
......@@ -137,8 +120,11 @@
import { getGoodsInfoById } from '@/api/commodity'
import { deepClone, Util } from '@/common/util'
import { baseConfig } from '@/main'
import ellipsisPopover from '../../components/ellipsisPopover.vue'
import { filterSpecsStr } from '../../filterOption'
export default {
name: 'DrawerDetail',
components: {ellipsisPopover},
data() {
return {
equitySceneType: baseConfig.equitySceneType || [], // 权益类目
......@@ -147,7 +133,8 @@ export default {
commodityInfo: {},
membraneTypeList: baseConfig.membraneTypeList,
supplierCode: baseConfig.supplierCode, // 供应方
operationLogList: [] // 操作信息
operationLogList: [], // 操作信息
filterSpecsStr
}
},
......@@ -185,10 +172,16 @@ export default {
getInfo(id) {
getGoodsInfoById({ id: id }).then(res => {
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 + '')) || []
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.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 => {
val.updatedDateStr = val.updatedDate ? Util.dateFormate(val.updatedDate, 'YYYY-MM-DD HH:mm:ss') : ''
......@@ -266,6 +259,10 @@ export default {
.el-form-item__label{
flex-shrink: 0;
}
.el-form-item__content {
width: 100%;
height: 36px;
}
}
.flex_1{
width: 100%;
......
......@@ -34,7 +34,7 @@
:placeholder="item.label"
:maxlength="item.maxlength"
:style="{ width: item.width || formItemWidth }"
:disabled="item.isDisabled"
:disabled="item.isDisabled || pageData.pageDisabled"
clearable
@input="input($event, item)"
@blur="blur(item)"
......@@ -50,13 +50,14 @@
@change="selectAddAttr($event, item)"
:style="{ width: item.width || formItemWidth }"
filterable
:disabled="item.isDisabled"
:disabled="item.isDisabled || pageData.pageDisabled"
>
<el-option
v-for="subItem in item.optionList"
:key="subItem[item.optionId]"
:label="subItem[item.optionLabel]"
:value="subItem[item.optionId]"
:disabled="subItem.isDisabled"
/>
</el-select>
<!-- 可添加选项选择框 -->
......@@ -70,7 +71,7 @@
@blur="selectBlur"
@focus="selectFocus"
filterable
:disabled="item.isDisabled"
:disabled="item.isDisabled || pageData.pageDisabled"
>
<el-option
v-for="(subItem, subIndex) in item.optionList"
......@@ -176,7 +177,7 @@
<!-- 级联选择器 -->
<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
@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 }">
</el-cascader>
</el-form-item>
......@@ -611,10 +612,13 @@ import { baseConfig } from "@/main"
const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_APP_VERSION}-info`
export default {
name: "ProductForm",
inject: ['pageData'],
data() {
return {
equitySceneType: baseConfig.equitySceneType || [],
membraneTypeList: baseConfig.membraneTypeList || [],
extendedPosiType: baseConfig.extendedPosiType || [], // 延保类
supplierCode: baseConfig.supplierCode || [],
solarFilmArr: baseConfig.solarFilmArr || [1, 111, 112],
userInfo: this.$store.state.d2admin.user.info,
lookImgVisible: false,
......@@ -790,6 +794,20 @@ export default {
this.selectedPositionIds = arr
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 {
get: "d2admin/base/get"
}),
...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() {
this.editOptionIndex = -1
this.showOptionInput = false
......@@ -1006,7 +1065,7 @@ export default {
if (!fileInfo) return
if (fileInfo?.size / 1024 / 1024 > 10) {
document.getElementById(`${targetItem.name}file`).value = ""
return this.$message("请上传10M以内图片")
return this.$message.warning("请上传10M以内图片")
}
reader.readAsDataURL(fileInfo)
reader.onload = (e) => {
......@@ -1057,7 +1116,7 @@ export default {
if (e.total / 1024 / 1024 > 20) {
return this.$message({
message: "视频内容大于20M",
type: "error"
type: "warning"
})
}
const imgFile = e.target.result
......@@ -1139,7 +1198,7 @@ export default {
this.solarFilmArr?.includes(this.formData?.goodsType)
) {
// 太阳膜类目 产品名称关键字与类目不匹配
this.$message.error(
this.$message.warning(
"产品名称必须包含“太阳膜”字样才可将产品挂在太阳膜类目下"
)
}
......
......@@ -54,7 +54,8 @@ export default {
label: '产品名称',
type: 'input',
maxlength: 20,
width: '432px'
width: '432px',
isDisabled: false
},
{
name: 'tempGoodsType',
......@@ -94,7 +95,8 @@ export default {
optionId: 'id',
optionLabel: 'relatedPartyName',
partitionFlag: 2,
width: '432px'
width: '432px',
isDisabled: false
}, {
name: 'thumbUrl',
label: '缩略图',
......@@ -179,7 +181,8 @@ export default {
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')]
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 => {
if (item.categoryType != this.editData.goodsType) {
item.disabled = true
......@@ -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 {
if (num == 1) {
this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'brandMerchantCode')].optionList = res
} 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 @@
<div class="content-box">
<div class="sync_type_class">
<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="'0'">仅分发至单店</el-radio>
</el-radio-group>
</div>
<div style="margin-left: 120px;">
<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>
<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">
<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="'2'">多规格</el-radio>
</el-radio-group>
......@@ -47,6 +52,7 @@ export default {
singleSpecificationForm,
multipleSpecificationForm
},
inject: ['pageData'],
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
......@@ -85,6 +91,10 @@ export default {
handleSpecsEdit(num) {
this.$refs.multipleSpecificationFormRef.handleSpecsEdit(num)
},
// 规格管理
handleSpecsManage() {
this.$refs.multipleSpecificationFormRef.handleSpecsManage()
},
// 新增商品
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
......@@ -33,7 +33,7 @@
<auth-button category="Button" :show-btn-ids="['9030701']" />
</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>
<!-- 导出 -->
<auth-button category="Button" style="display: inline-block" :show-btn-ids="['9030702']" />
......@@ -66,7 +66,7 @@
<span style="margin-right: 10px;">
<auth-button :data="scope.scope" :show-btn-ids="['9030703']" />
</span>
<auth-button :data="scope.scope"
<auth-button :data="scope.scope" v-if="scope.scope.goodsInfo.scrmFlag != 'Y'"
:show-btn-ids="['9030706']" />
</div>
</d2-table>
......@@ -210,7 +210,7 @@ export default {
parentProp: 'goodsInfo',
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo || {}
const types = [goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName]
const result = types.filter(type => type).join('-')
return result
......
......@@ -15,6 +15,7 @@
placeholder="请输入套餐名称"
maxlength="50"
class="sortInput"
@blur="checkName"
show-word-limit />
</el-form-item>
</el-col>
......@@ -239,6 +240,7 @@ export default {
name: "PackageTab",
data() {
return {
timeId: new Date().getTime() + parseInt(Math.random() * 1000),
businessNature: businessNature,
loading: false,
packageForm: {
......@@ -301,6 +303,17 @@ export default {
}),
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() {
this.goodsList.push({
val1: "",
......
......@@ -148,7 +148,6 @@ export default {
this.financialObj.goodsTypeGroupRules[this.editableTabsValue]
.expenseCategoryRules
)
console.log(filterObj)
const obj = {
trafficSide: filterObj
}
......@@ -315,9 +314,8 @@ export default {
item.expenseCategoryTypeRules
)
})
this.financialObj = data
this.initSettleTimeObj()
console.log(this.financialObj, 76666)
console.log(this.financialObj, 555555555)
},
initSettleTimeObj() {
const { settleTimeType, settleTime } = this.financialObj
......
......@@ -4,8 +4,21 @@
<div class="title">
<span>基础信息</span>
</div>
<div style="padding: 20px;">
<div>啦啦啦</div>
<div style="padding: 20px 20px 0;">
<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>
</template>
......@@ -13,15 +26,85 @@
<script>
export default {
name: 'BaseInfo',
props: {},
props: {
basicInfo: {
type: Object,
default: () => { }
}
},
watch: {
basicInfo(val) {
if (val?.basicApproveInfo) {
this.dealFormData()
}
}
},
data() {
//这里存放数据
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>
<style lang="scss" scoped>
<style lang="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>
......@@ -490,11 +490,16 @@ export default {
Promise.all(eventArr).then(() => {
this.checkSelectEmpty()
})
//平台方
this.$EventBus.$on('shelfUpdateConstractMer',(obj)=>{
console.log(obj)
this.financialObj.realityPlatformMerchantId=obj.merchantId
this.financialObj.realityPlatformMerchantName=obj.merchantName
})
//服务商
this.$EventBus.$on('shelfUpdateParMer', (obj)=>{
})
},
methods: {
...mapActions("FinancialRules", ["reset"]),
......@@ -864,7 +869,8 @@ export default {
this.editableTabs
)
if (!this.checkParamsType(res, goodsTypeGroupRules)) {
return this.$message.warning("请完善分账规则")
this.$message.warning("请完善分账规则")
return false
}
try {
this.submitParams = {
......@@ -874,6 +880,7 @@ export default {
this.checkCalculateType()
this.verificationCodeVisible = true
console.log(this.submitParams, "this.submitParams ")
return true
} catch (error) {}
// if (!res || !goodsTypeGroupRules) return false // 没有通过检验
},
......
......@@ -892,7 +892,8 @@ export default {
async submit() {
let res = await this.verifyFormData()
if (!this.checkParamsType(res)) {
return this.$message.error("请完善对账规则")
this.$message.error("请完善对账规则")
return false
}
// 检验已经通过了
this.errorIndex = -1
......@@ -914,7 +915,7 @@ export default {
partnerMerchantExpenseCategoryValue
}
this.submitParams=params
console.log( this.submitParams)
return true
},
// 校验所有form数据
async verifyFormData() {
......
......@@ -35,7 +35,7 @@
v-if="item.valiadError == 'Y'" />{{ item.title }}
</span>
<span>
<package-tab />
<package-tab @packageEditInfo="getPackageEditInfo" />
</span>
</el-tab-pane>
<el-tab-pane key="add"
......@@ -67,6 +67,7 @@
</template>
<script>
import { get } from "sortablejs"
import goodTab from "../common/goodTab.vue"
import packageTab from "../common/packageTab.vue"
export default {
......@@ -146,7 +147,8 @@ export default {
const newTabIndex = ++this.tabIndex + ""
this.goodTabs.push({
title: "商品名称" + this.addIndex++,
name: 'good_' + newTabIndex
name: 'good_' + newTabIndex,
info: {}
})
this.tabsValue = 'good_' + newTabIndex
this.currentIndex = 'good_' + newTabIndex
......@@ -158,7 +160,8 @@ export default {
const newTabIndex = ++this.tabIndex + ""
this.packageTabs.push({
title: "套餐名称" + this.addIndex++,
name: 'package_' + newTabIndex
name: 'package_' + newTabIndex,
info: {}
})
this.tabsValue = 'package_' + newTabIndex
this.currentIndex = 'package_' + newTabIndex
......@@ -198,6 +201,7 @@ export default {
} else {
tabs = self.packageTabs
}
console.log('tabs', tabs)
if (activeName === targetName) {
tabs.forEach((tab, index) => {
if (tab.name === targetName) {
......@@ -214,7 +218,13 @@ export default {
})
}
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)
// // currentTabIndex <= parseInt(self.goodTabsValue)
......@@ -292,6 +302,10 @@ export default {
// message: "删除成功!"
// })
// })
},
getPackageEditInfo(info) {
console.log('info', info)
}
}
}
......
......@@ -1044,7 +1044,6 @@ export default {
},
// 查询4s店及上级列表 参数 channelType=1(流量方对象)
async getMerchantLevelList() {
console.log( this.merchantRow)
return new Promise(async (resolve, reject) => {
const that = this
const localRes = localStorage.getItem("getMerchantLevelList")
......@@ -1072,7 +1071,7 @@ export default {
merchantName: val.merchantName
})
})
that.flowList = listArr
that.flowList = listArr
resolve()
}
})
......@@ -1364,13 +1363,14 @@ export default {
},
// 对账item的详情 更新和初始化 classificationObj
getEffectRule() {
let promiseArr = [
this.getListPartnerMerchant(),
this.getMerchantLevelList(),
this.getListPlatformMerchant()
]
Promise.all(promiseArr).then(() => {
const res = deepClone(this.goodsTypeGroupReconciliationRules)
// let promiseArr = [
// this.getListPartnerMerchant(),
// // this.getMerchantLevelList(),
// // this.getListPlatformMerchant()
// ]
// Promise.all(promiseArr).then(() => {
this.$nextTick(()=>{
const res = deepClone(this.goodsTypeGroupReconciliationRules)
const that = this
// 赋值
const checkRecordItem = res && res[+that.tabindex]
......@@ -1406,7 +1406,9 @@ export default {
)
}
this.forceUpdate()
})
})
// })
},
// 换成后端数据结构
getBackendFormat() {
......
......@@ -2,7 +2,7 @@
<template>
<d2-container class="edit-contract" v-loading="isLoad">
<!-- 基础信息 -->
<base-info></base-info>
<base-info :basicInfo="basicInfo"></base-info>
<!-- 流量方信息 -->
<shop-merchant-info></shop-merchant-info>
<!-- 上架商品及测算 -->
......@@ -20,22 +20,23 @@
</template>
<script>
import { mapActions } from "vuex"
import BaseInfo from "./components/detailCon/BaseInfo.vue"
import ShopMerchantInfo from "./components/detailCon/ShopMerchantInfo"
import GoodsInfo from "./components/detailCon/GoodsInfo.vue"
import DivisionConfig from "./components/detailCon/DivisionConfig.vue"
import FinanceConfig from "./components/detailCon/FinanceConfig.vue"
import { merchantSettleDistributeRuleLastRule } from "@api/shelfManage"
import { mapActions } from 'vuex'
import BaseInfo from './components/editCon/BaseInfo.vue'
import ShopMerchantInfo from './components/detailCon/ShopMerchantInfo'
import GoodsInfo from './components/detailCon/GoodsInfo.vue'
import DivisionConfig from './components/detailCon/DivisionConfig.vue'
import FinanceConfig from './components/detailCon/FinanceConfig.vue'
import { merchantSettleDistributeRuleLastRule, getBusisDetailBasic } from "@api/shelfManage"
export default {
name: "contractDetail",
data() {
return {
isLoad: true,
editData: {},
basicInfo: {},
divisiObj: {},
financialObj: {}
}
};
},
components: {
......@@ -54,6 +55,7 @@ export default {
},
mounted() {
this.getDetail()
this.getBasicDetail()
this.getFinaceObj()
},
//方法集合
......@@ -61,6 +63,12 @@ export default {
...mapActions({
close: "d2admin/page/close"
}),
getBasicDetail() {
getBusisDetailBasic({ id: 1 }).then(res => {
this.basicInfo = res.basicInfo || {}
this.merchantEditData = res.createBusinessApproveMerchant || {}
})
},
getDetail() {
this.isLoad = false
},
......
......@@ -2,7 +2,7 @@
* @Author: 'wangzhihui' '1733904062@qq.com'
* @Date: 2025-02-24 21:48:44
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -10,9 +10,9 @@
<template>
<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>
<!-- 上架商品及测算 -->
......@@ -22,11 +22,11 @@
<!-- 对账配置 -->
<finance-config ref="financeConfig"></finance-config>
<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 type="primary" plain @click="handleConfirm(2)">
<el-button type="primary" plain @click="handleConfirm('draft')">
暂存
</el-button>
<el-button class="cancel-btn" @click="handleCancel">
......@@ -44,12 +44,18 @@ import AddMerchant from './components/editCon/AddMerchant'
import GoodsInfo from './components/editCon/GoodsInfo.vue'
import DivisionConfig from './components/editCon/DivisionConfig.vue'
import FinanceConfig from './components/editCon/FinanceConfig.vue'
import {
getBusisDetailBasic
} from "@api/shelfManage"
export default {
name: 'EditContract',
data() {
return {
routeObj: {},
isLoad: true,
addMerVisible: false,
basicInfo: {},
merchantEditData: {},
editData: {
merchantName: '',
},
......@@ -65,6 +71,8 @@ export default {
FinanceConfig
},
mounted() {
this.routeObj = this.$route.params
this.getBasicDetail()
this.getDetail()
},
//方法集合
......@@ -72,6 +80,13 @@ export default {
...mapActions({
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() {
this.isLoad = false
},
......@@ -79,9 +94,20 @@ export default {
console.log('新建---')
this.addMerVisible = !this.addMerVisible
},
handleConfirm() {
this.$refs.divisionConfig.submit()
this.$refs.financeConfig.submit()
handleConfirm(confirmType) {
if (confirmType == 'save') {
// 各模块校验
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() {
this.close({ tagName: '/shelfManage' })
......
......@@ -300,7 +300,8 @@ export default {
this.$router.push({
name: 'editContract',
params: {
id: row.id
id: row.id,
businessCode: row.businessCode
}
})
},
......
......@@ -448,7 +448,8 @@ export default {
9: "已撤销",
// 10: "已关闭",
11: "错误订单",
12: "已退款"
12: "已退款",
13: "待上传"
},
upgradeOpts: {
Y: "已升级",
......@@ -734,6 +735,10 @@ export default {
{
confId: 12,
confLabel: "已退款"
},
{
confId: 13,
confLabel: '待上传'
}
],
upgradeList: [
......
......@@ -547,7 +547,8 @@ export default {
9: "已撤销",
10: "已关闭",
11: "错误订单",
12: "已退款"
12: "已退款",
13: "待上传"
},
upgradeOpts: {
Y: "已升级",
......
......@@ -175,7 +175,8 @@ export default {
9: "已撤销",
10: "已关闭",
11: "错误订单",
12: "已退款"
12: "已退款",
13: "待上传"
},
baseData: {
orderStatusList: [
......@@ -198,23 +199,23 @@ export default {
/* {
confId: 5,
confLabel: '已退款'
}, */
// {
// confId: 6,
// confLabel: "已评价"
// },
// {
// confId: 9,
// confLabel: "已撤销"
// },
// {
// confId: 10,
// confLabel: "已关闭"
// },
// {
// confId: 11,
// confLabel: "错误订单"
// },
}, */
// {
// confId: 6,
// confLabel: "已评价"
// },
// {
// confId: 9,
// confLabel: "已撤销"
// },
// {
// confId: 10,
// confLabel: "已关闭"
// },
// {
// confId: 11,
// confLabel: "错误订单"
// },
{
confId: 12,
confLabel: "已退款"
......
......@@ -127,16 +127,17 @@
>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="退款类型:" class="halfItem">
{{ detailInfo.status }}
{{ detailInfo.refundType?detailInfo.refundType==1?'全部退款':'部分退款':'-' }}
</el-form-item></el-col
>
<el-col :span="8">
<el-col :span="8" v-if="detailInfo.status == '已审核'">
<el-form-item label="订单总积分:" class="halfItem">
{{ detailInfo.status }}
</el-form-item></el-col
{{ detailInfo.addScore? detailInfo.addScore:'-' }}
</el-form-item>
</el-col
>
</el-row>
</el-form>
......@@ -165,15 +166,15 @@
</div>
<div v-else class="empty">暂无记录</div>
</div>
<div class="examine-record">
<div class="examine-record" v-if="detailInfo.status == '已审核'">
<div class="title">操作记录</div>
<div
class="record-div"
v-if="detailInfo.operationList && detailInfo.operationList.length > 0"
v-if="operationList && operationList.length > 0"
>
<div
class="record-div-d"
v-for="(item, index) in detailInfo.operationList"
v-for="(item, index) in operationList"
:key="index"
>
<div class="div-operator">操作人:{{ item.operator }}</div>
......@@ -209,7 +210,7 @@
<script>
import { Util, deepClone } from "@/common/util"
import { getPointDetail } from "@api/point"
import { getPointDetail ,getOperationRecord,getOrderByScore} from "@api/point"
export default {
name: "DetailDialog",
props: {
......@@ -255,6 +256,7 @@ export default {
},
detailInfo: {},
operationList:[],
loading: false,
imgVisible: false,
photoList: [],
......@@ -284,11 +286,32 @@ export default {
: "错单"
: "--"
this.detailInfo = res
this.getScore()
this.getOrderOperateData()
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) {
this.imgVisible = !this.imgVisible
this.imgList = url
......
......@@ -27,9 +27,6 @@
>
</el-tab-pane>
</el-tabs>
<!-- <el-button type="primary" size="mini" @click="handleExport">
导出
</el-button> -->
<div>
<span style="margin-right: 10px"
><auth-button category="Button" :show-btn-ids="['9140105']"
......@@ -67,11 +64,14 @@
:show-btn-ids="['9140101']"
v-if="scope.scope.status == 0 && scope.scope.supervisorAudit == 1"
/>
<!-- v-if="
<auth-button
v-if="
scope.scope.status == 1 &&
scope.scope.pointsRefundAvailable == 'Y'
" -->
<auth-button :data="scope.scope" :show-btn-ids="['9140104']" />
"
:data="scope.scope"
:show-btn-ids="['9140104']"
/>
</span>
</div>
</d2-table>
......@@ -116,7 +116,10 @@ import {
getShopMerchantList,
pointCheck,
exportFile,
markAsRefunded
markAsRefunded,
refreshData,
getOrderByScore,
getOperationRecord
} from "@api/point"
export default {
name: "PointList",
......@@ -140,7 +143,7 @@ export default {
}
return {
show: true,
handleFormRef: 'handleFormRef',
handleFormRef: "handleFormRef",
refundVisible: false,
activeName: "4",
tabPaneList: [
......@@ -162,7 +165,7 @@ export default {
},
{
label: "未兑换",
name: "3"
name: "-1"
}
],
statusEnum: {
......@@ -610,16 +613,32 @@ export default {
//标记退款
handleRefund(data) {
this.refundVisible = true
this.refundForm.id = data.id
this.refundForm.orderCode = data.orderCode
this.refundForm.refundType = 1 //退款类型(1:全退,2:部分退),
this.refundForm.refundPoints = 10000
this.refundForm.maXPoints =10000
if(data.operator==true){
//对应订单若操作过一次部分退款,则后续进来后只能选择“部分退款”,全部退款默认置灰不可选
this.refundFormData[0].optionList[0].isDisabled=true
}
this.updateDisable()
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:部分退),
} else {
this.refundForm.refundType = 2
this.refundFormData[0].optionList[0].isDisabled = true
}
this.updateDisable()
})
},
updateDisable() {
let disabled = this.refundForm.refundType == 2 ? false : true
......@@ -637,8 +656,8 @@ export default {
if (valid) {
markAsRefunded({
orderCode: this.refundForm.orderCode,
refundType:this.refundForm.refundType,
refundPoints:this.refundForm.refundPoints
refundType: this.refundForm.refundType,
refundPoints: this.refundForm.refundPoints
}).then((res) => {
if (res) {
this.$message.success("退款成功!")
......@@ -652,21 +671,23 @@ export default {
},
//刷新
handleRefresh() {
let params = {
...this.searchFormSearch,
...this.$refs.pointTable.page
}
this.$confirm("确定需要刷新并同步订单信息", "", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
// if (action == "confirm") {
// markAsRefunded({
// orderCode: data.orderCode
// }).then((res) => {
// if (res) {
// this.$message.success("订单信息已同步完成!")
// this.handleSearch()
// }
// })
// }
if (action == "confirm") {
refreshData(params).then((res) => {
if (res) {
this.$message.success("订单信息已同步完成!")
this.handleSearch()
}
})
}
}
})
},
......
......@@ -50,8 +50,9 @@ export default {
staffName: "",
staffPhone: "",
merchantId: "",
withdrawalTime:[],
rewardTime:[]
rewardTime:[],
reviewTime:[],
successTime:[]
},
searchFormSearch:{
......@@ -95,14 +96,14 @@ export default {
// },
{
label: "积分付款时间",
name: "rewardTime",
name: "reviewTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "积分到账时间",
name: "withdrawalTime",
name: "successTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
......@@ -212,20 +213,33 @@ export default {
"YYYY-MM-DD"
) + " 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 =
Util.dateFormate(
this.searchFormSearch.withdrawalTime[0],
this.searchFormSearch.successBeginTime[0],
"YYYY-MM-DD"
) + " 00:00:00"
this.searchFormSearch.withdrawalEndTime =
Util.dateFormate(
this.searchFormSearch.withdrawalTime[1],
this.searchFormSearch.successEndTime[1],
"YYYY-MM-DD"
) + " 23:59:59"
}
delete this.searchFormSearch.rewardTime
delete this.searchFormSearch.withdrawalTime
delete this.searchFormSearch.successTime
delete this.searchFormSearch.reviewTime
resolve()
})
},
......@@ -237,8 +251,9 @@ export default {
staffName: "",
staffPhone: "",
merchantId: "",
withdrawalTime:[],
rewardTime:[]
rewardTime:[],
reviewTime:[],
successTime:[]
}
this.searchFormSearch={}
this.$refs.pointTable.refreshTable(true, true)
......
......@@ -6,11 +6,14 @@
<el-tabs v-model="activeName">
<el-tab-pane label="成长等级记录"
name="record" />
<el-tab-pane label="卡券发放记录"
name="issue" />
<el-tab-pane label="成长等级管理"
name="manage" />
</el-tabs>
<div>
<record v-if="activeName === 'record'" />
<issue v-if="activeName === 'issue'" />
<manage v-if="activeName === 'manage'" />
</div>
</div>
......@@ -20,20 +23,22 @@
<script>
import record from './record'
import manage from './manage'
import issue from './issue'
// import { deepClone } from '@/common/util'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'record',
activeName: 'issue',
recordInfo: {}
}
},
components: {
record,
manage
manage,
issue
},
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
......@@ -144,7 +144,7 @@ export default {
suffixSlot: 'syncUnit'
},
{
label: '适配业务',
label: '业务标签',
name: 'staffSceneLabel',
addHtml: 'staffSceneLabel'
},
......
......@@ -129,7 +129,7 @@ export default {
],
customDeduction: [
{ required: false, message: '', trigger: 'blur' },
{ validator: validateCustomDeduction, trigger: ['blur', 'change']}
{ validator: validateCustomDeduction, trigger: ['blur']}
],
remark: [
{ required: true, message: '请输入备注', trigger: 'blur' }
......@@ -170,6 +170,24 @@ export default {
this.$set(this.infoForm, key, limitPrice(e, oldValue, maxlength, 2))
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) {
// 用来检索整数且不超过6位数
......@@ -217,6 +235,7 @@ export default {
remark: this.infoForm.remark
}
if (this.computedValue - 0 < 0) return this.$message.warning('实发工资不能小于0')
if (isNaN(params.customDeduction)) return this.$message.warning('正负冲减值需为数字')
reviseSalaryApi(params).then(res => {
this.$message.success('修订成功')
this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' })
......
......@@ -3,7 +3,7 @@
<baseDialog :dialog-config="dialogConfig" :is-show.sync="visible"
@handleClick="handleAddConfirm">
<div class="dialog-content">
<d2-table :hasPage="false" :hasNum="false"
<!-- <d2-table :hasPage="false" :hasNum="false"
:tableData="salaryList"
:table-params="salaryTableParams">
<template slot="deferredIncluded" slot-scope="scope">
......@@ -15,7 +15,7 @@
<span>{{ `¥${scope.scope.deferIncome}` }}</span>
</el-tooltip>
</template>
</d2-table>
</d2-table> -->
<div class="header" v-if="detailInfo.clockingInOpenFlag == 'Y'">
员工本月应出勤天数{{ detailInfo.shouldWorkDay }}天,实际出勤天数{{ detailInfo.actualWorkDay }}天,基本工资收入=&nbsp;
<span>{{ detailInfo.basicSalary }}元</span>&nbsp;÷&nbsp;
......@@ -35,7 +35,7 @@
<span>{{ subItem.merchantId }}</span>
<span class="car-text" v-if="subItem.configCarType">{{ subItem.configCarType ==1 ? '单问界' : '其他车系' }}</span>
</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 class="content-item-body">
<div class="left-line" :style="{ 'height': subItem.allocationDetailList.length ? (48 * (subItem.allocationDetailList.length) + 63) + 'px' : '117px'}">
......@@ -195,8 +195,8 @@ export default {
prop: '',
width: 100,
formatter: (row) => {
// allocationType:5售后 6非售后 售后比例为calculateValue系数默认为1
return row.allocationType == 6 ? `${!isEmpty(row.outputCommissionRatio) ? row.outputCommissionRatio : '-'}%×${row.calculateValue}` : row.allocationType == 5 ? `${row.calculateValue}%×1` : '-'
// allocationType:(5售后 新类型社招轻改7 比例取值calculateValue 无系数) (6非售后 比例取值outputCommissionRatio 系数取值calculateValue)
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 {
data: res?.detailList[key]
}
})
const { actualBasicSalary, minimumSalary, mentorCommission, merchantCommission, padDeductMoney, dailyDeductMoney, refundOffset, deferExpenses, deferIncome, correctSalary } = res || {}
this.salaryList = [{
actualBasicSalary,
minimumSalary,
mentorCommission,
merchantCommission,
padDeductMoney,
dailyDeductMoney,
refundOffset,
deferExpenses,
deferIncome,
correctSalary
}]
// const { actualBasicSalary, minimumSalary, mentorCommission, merchantCommission, padDeductMoney, dailyDeductMoney, refundOffset, deferExpenses, deferIncome, correctSalary } = res || {}
// this.salaryList = [{
// actualBasicSalary,
// minimumSalary,
// mentorCommission,
// merchantCommission,
// padDeductMoney,
// dailyDeductMoney,
// refundOffset,
// deferExpenses,
// deferIncome,
// correctSalary
// }]
for (var j = 0; j < detailArray?.length; j++) {
const seen = new Set()
detailArray[j].data = detailArray[j]?.data?.map(item => {
......
......@@ -35,7 +35,7 @@
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120502']" />
</span>
<auth-button category="Button" :show-btn-ids="['9120507']" />
<!-- <auth-button category="Button" :show-btn-ids="['9120507']" /> -->
</d2-table-header>
<d2-table ref="recordTable"
:get-list-api="getListApi"
......@@ -177,8 +177,8 @@ export default {
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
// tableOption: { width: '200px' },
tableOption: true,
tableOption: { width: '130px' },
// tableOption: true,
tableColumns: [
{
label: "姓名",
......@@ -255,6 +255,13 @@ export default {
}
},
{
label: "更新时间",
prop: "updatedDate",
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD') : '-'
}
},
{
label: "状态",
prop: "workingStatus",
width: "120px",
......@@ -271,7 +278,16 @@ export default {
]
},
baseData: {
staffSceneLabelList: deepClone(staffSceneLabelList),
staffSceneLabelList: [{
confId: 1,
confValue: '轻改'
}, {
confId: 2,
confValue: '权益'
}, {
confId: 3,
confValue: '延保'
}],
shopMerchantIdList: [],
hireTypeList: [
{ confId: '1', confValue: '校招管培生' },
......
......@@ -189,9 +189,16 @@ export default {
})
},
del(index) {
this.infoData.campusList.splice(index, 1)
this.$nextTick(() => {
this.$refs['configForm'].clearValidate()
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.infoData.campusList.splice(index, 1)
this.$nextTick(() => {
this.$refs['configForm'].clearValidate()
})
}).catch(() => {
})
},
handleInput(e, key, scope) {
......
<!-- 复制绩效方案弹窗 -->
<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 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<span style="display: inline-block">
<!-- <span style="display: inline-block">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121210']" />
......@@ -32,6 +32,11 @@
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121205']" />
</span> -->
<span style="display: inline-block;">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121211']" />
</span>
</d2-table-header>
<d2-table ref="performanceTable"
......@@ -39,7 +44,8 @@
:search-form="searchForm"
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
:before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn">
<template slot="brand" slot-scope="scope">
<template v-if="scope.scope.brand && scope.scope.brand.length > 20">
<el-popover placement="top" width="300" trigger="hover">
......@@ -68,15 +74,41 @@
</div>
</d2-table>
</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>
</template>
<script>
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 { deepClone } from '@/common/util'
import copyPerformanceDialog from './copyPerformanceDialog.vue'
export default {
name: "PerformanceList",
components: {
copyPerformanceDialog
},
data() {
return {
getListApi: getStoreSalaryListApi,
......@@ -120,7 +152,8 @@ export default {
// 表格参数
tableParams: {
needUnique: true,
mutiSelectUniqueKey: 'uniqueVal',
mutiSelectUniqueKey: 'id',
mutiSelectName: 'performanceIndex',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: {
......@@ -206,7 +239,13 @@ export default {
confLabel: '社会招聘'
}],
brandList: []
}
},
performanceMerchantSearchForm: {
merchantName: '',
maerchantId: ''
},
copyPerformanceVisible: false,
copySelectedData: {}
}
},
computed: {
......@@ -235,6 +274,13 @@ export default {
resolve()
})
},
selectableFn(row) {
var isSelect = true
if (row.minPerformConfigStatus == 2 || !row.minPerformConfigStatus) { // 无配置方案或已禁用的不可勾选
isSelect = false
}
return isSelect
},
brandFilter(ele, lenght) {
if (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 {
}
})
},
// 复制绩效方案
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() {
this.$alert('敬请期待', '提示', {
......
......@@ -4,19 +4,20 @@
<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">
<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-item :prop="`campusList`" label-width="0" >
<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>
<el-table :data="subItem.configInfo.campusList" :header-cell-style="rowClass">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column prop="productType" label="产品名称" min-width="175">
<template slot-scope="scope">
<el-form-item :prop="`campusList[${scope.$index}].productType`" :rules="rules.productType" label-width="0">
<el-cascader style="width: 160px" :options="productGoodsTypeList" filterable
v-model="scope.row['productType']"
<el-cascader style="width: 160px" :options="scope.row.productTypeFocus ? productGoodsTypeList : baseData.goodsTypeList" filterable
v-model="scope.row['productType']"
@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">
</el-cascader>
</el-form-item>
......@@ -67,8 +68,9 @@
<template slot-scope="scope" v-if="scope.row['conditionFlag']">
且
<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"
@visible-change="handleVisibleChange($event, subIndex, scope.$index, 'conditionProductType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader>
</el-form-item>
......@@ -108,9 +110,9 @@
<template slot-scope="scope">
产品名称为
<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"
@focus="handleFocus('customer')"
@visible-change="handleVisibleChange($event, subIndex, scope.$index, 'cusProductType')"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader>
</el-form-item>
......@@ -258,6 +260,13 @@ export default {
isEmpty(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() {
let goodsTypeList = deepClone(this.baseData.goodsTypeList)
// 初始化disabled值
......@@ -316,9 +325,6 @@ export default {
rowClass({ row, rowIndex }) {
return 'background:#F2F4F7;color:#333333;font-size:14px;font-weight:600;'
},
handleFocus(key) {
this.foucsGoodsType = key
},
addRow(subIndex) {
if (this.levelData[subIndex].configInfo.campusList.length >= 50) return
let obj = {
......@@ -425,7 +431,7 @@ export default {
if (this.defaultActiveName == 4) {
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.$refs[`configForm_${_index}`]?.[0]?.clearValidate()
this.$refs[`configForm_${0}`]?.[0]?.clearValidate()
} else {
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))
......@@ -561,12 +567,12 @@ export default {
.add_btn{
margin-top: 10px;
}
.copy_btn{
position: absolute;
top: 10px;
right: 20px;
z-index: 2;
}
}
.copy_btn{
position: absolute;
transform: translate(0, -55px);
right: 0;
z-index: 2;
}
::v-deep.config-table {
.el-table .cell {
......@@ -597,4 +603,7 @@ export default {
}
}
}
::v-deep .el-tabs__content{
overflow: visible;
}
</style>
\ No newline at end of file
......@@ -341,7 +341,16 @@
/>&nbsp;%
</span>
</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>
<span class="rateInput_s">精品升级</span>
<el-input
......@@ -380,7 +389,7 @@
placeholder="请输入比例"
/>&nbsp;%
</div>
</el-form-item>
</el-form-item> -->
<el-form-item>
<div class="btnCon">
<el-button
......@@ -551,6 +560,7 @@ export default {
this.directorList[item.directorType].push(item.directorUserId)
}
})
res.costPrivacyShowFlag = res?.shopMerchantConfig?.costPrivacyShowFlag || ''
this.form = deepClone(res)
if (!this.form.serviceMerchantServiceChargeConfig) {
// 未设置过时,手续费默认为打开并且费率为2
......@@ -918,14 +928,14 @@ export default {
})
}
_params.directorList = directorList
_params.boutiqueSunshineInspiration =
shopMerchantConfig.boutiqueSunshineInspiration
_params.quotationSunshineInspiration =
shopMerchantConfig.quotationSunshineInspiration
_params.boutiqueMarketInspiration =
shopMerchantConfig.boutiqueMarketInspiration
_params.quotationMarketInspiration =
shopMerchantConfig.quotationMarketInspiration
// _params.boutiqueSunshineInspiration =
// shopMerchantConfig.boutiqueSunshineInspiration
// _params.quotationSunshineInspiration =
// shopMerchantConfig.quotationSunshineInspiration
// _params.boutiqueMarketInspiration =
// shopMerchantConfig.boutiqueMarketInspiration
// _params.quotationMarketInspiration =
// shopMerchantConfig.quotationMarketInspiration
console.log(_params)
shopSetting({ dataString: JSON.stringify(_params) }).then((res) => {
this.notice.okTips()
......@@ -1311,4 +1321,8 @@ export default {
.rateInput_d {
margin-top: 20px;
}
.flag-text{
color: #333333;
margin-left: 10px;
}
</style>
......@@ -152,6 +152,13 @@ export default {
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "支付时间",
name: "payTime",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
}
],
getListApi: getList,
......@@ -166,6 +173,16 @@ export default {
width: "160px"
},
{
label: "创建时间",
prop: "createdTime",
width: '150px'
},
{
label: "支付时间",
prop: "payTime",
width: '150px'
},
{
label: "客户姓名",
prop: "customerName",
width: "250px"
......@@ -337,7 +354,8 @@ export default {
{ severName: "已完成", severType: 5 },
{ severName: "已退款", severType: 6 },
{ severName: "已撤销", severType: 9 },
{ severName: "错误订单", severType: 11 }
{ severName: "错误订单", severType: 11 },
{ severName: "待上传", severType: 7 }
]
},
previewVisible: false,
......@@ -430,12 +448,24 @@ export default {
.replace(/\//g, "-") + " 23:59:59"
}
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
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = this.getParams()
delete this.searchFormSearch.createTime
delete this.searchFormSearch.payTime
resolve()
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!