Commit 36b391cb by huyue

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

…ife-system into SAAS+V4.49.0-0121
2 parents 0fad4d33 675ef96f
Showing 44 changed files with 1123 additions and 183 deletions
......@@ -87,3 +87,15 @@ export function levelManageExport(data) {
data.method = `${path}resident.level.manage.export`
return request(data, RequestMethods.POST)
}
// 根据奖励类型查询奖励名称
export function levelNameList(data) {
data.method = `${path}resident.level.name.list`
return request(data, RequestMethods.POST)
}
// 根据手机号获取员工信息
export function pointStaffQuery(data) {
data.method = `${path}resident.point.staff.query`
return request(data, RequestMethods.POST)
}
......@@ -71,3 +71,9 @@ export function getProductInfo(data) {
data.method = `${path}goodsinfo.get.byId`
return request(data, "post")
}
// 获取三级全部类目
export function getAllCategory(data) {
data.method = `${path}goodsCategoryConfiguration.page.new`
return request(data, "post")
}
......@@ -127,13 +127,21 @@ export function reportTrack(data) {
// 获取门店工资绩效列表
export function getStoreSalaryListApi(data) {
data.method = `${path2}merchantPerformanceConfig.page`
data.method = `${path2}merchantPerformanceConfig.pageByMerchant`
// data.method = `${path2}merchantPerformanceConfig.page`
return request(data, "post")
}
// 编辑进入页面获取最新配置的绩效数据
export function getStoreLastDetailApi(data) {
data.method = `${path2}merchantPerformanceConfig.getLatestConfigDetailByMerchantId`
return request(data, "post")
}
// 禁用/启用门店工资绩效
export function editStoreSalaryStatusApi(data) {
data.method = `${path2}merchantPerformanceConfig.updateStatus`
// data.method = `${path2}merchantPerformanceConfig.updateStatus`
data.method = `${path2}merchantPerformanceConfig.updateStatusByMerchant`
return request(data, "post")
}
......@@ -257,6 +265,12 @@ export function editStaffApi(data) {
return request(data, "post")
}
// 编辑员工扣款项配置数据
export function editStaffDeductionApi(data) {
data.method = `${path2}staffConfig.update`
return request(data, "post")
}
// 员工分配门店账号
export function assignStoreAccountApi(data) {
data.method = `${path2}staffBaseInfo.account.other.add`
......
......@@ -38,3 +38,33 @@ export function queryGoodsCategoryBySceneId(data) {
data.method = `${path}queryGoodsCategoryBySceneId`
return request(data, RequestMethods.POST)
}
// 查询商品类目列表(新)
export function getCategoryList_new(data) {
data.method = `${path}page.new`
return request(data, RequestMethods.POST)
}
// 新增商品类目(新)
export function addGoodsCategory_new(data) {
data.method = `${path}addGoodsCategory.new`
return request(data, RequestMethods.POST)
}
// 编辑类目
export function updateGoodsCategory(data) {
data.method = `${path}updateGoodsCategory`
return request(data, RequestMethods.POST)
}
// 删除类目
export function deleteGoodsCategory(data) {
data.method = `${path}deleteGoodsCategory`
return request(data, RequestMethods.POST)
}
// 查询类目所属的一级类目及其子类目
export function queryParent(data) {
data.method = `${path}query.parent`
return request(data, RequestMethods.POST)
}
......@@ -21,7 +21,8 @@ export function getProductType(data) {
export function getGoodsCategoryConfiguration(data) {
data.currentPage = 1
data.pageSize = 999999
data.method = `${path}goodsCategoryConfiguration.page`
// data.method = `${path}goodsCategoryConfiguration.page`
data.method = `${path}goodsCategoryConfiguration.page.new`
return request(data)
}
......
......@@ -990,9 +990,9 @@ export const pointValueSignOpt = [
{ confId: -1, confValue: "积分扣减" }
]
// 成长等级 等级类型
// 成长等级 奖励类型
export const levelTypeOpt = [
{ confId: 1, confValue: "成长等级" },
{ confId: 1, confValue: "积分区间" },
{ confId: 2, confValue: "勋章" }
]
......
......@@ -427,7 +427,7 @@ export const routerName = {
{
authId: "9061202",
parentId: "90612",
label: "新增类目",
label: "新增一级类目",
icon: "plus",
category: "Button",
type: "primary",
......@@ -444,6 +444,12 @@ export const routerName = {
parentId: "90612",
label: "删除",
handle: "deleteCategory"
},
{
authId: "9061205",
parentId: "90612",
label: "添加子类目",
handle: "addChildCategory"
}
],
component: _import("systemConfig/sceneCategoryManage/index")
......@@ -798,8 +804,7 @@ export const routerName = {
parentId: "90619",
label: "阳光激励配置",
handle: "markRefundHandle"
},
}
],
component: _import("systemConfig/ShopConfig/index")
},
......
......@@ -637,9 +637,9 @@ export const routerName = {
handle: "handleToEdit",
addRoutePath: [
{
authId: "912070101",
authId: "912120101",
name: "编辑",
parentId: "91207"
parentId: "91212"
}
]
},
......@@ -655,11 +655,13 @@ export const routerName = {
label: "启用",
handle: "handleEnableOrDisable",
ruleObj: {
attr: "status",
attr: "minPerformConfigStatus",
rule: {
null: '启用',
2: "启用",
1: "禁用"
}
},
disabledStatusList: [null]
}
},
{
......@@ -697,7 +699,15 @@ export const routerName = {
parentId: "91212",
label: "明细",
handle: "handleDetail"
}
},
{
authId: "9121210",
parentId: "91212",
label: "导入绩效方案",
category: "Button",
type: "primary",
handle: "handleImport"
},
],
component: _import("residentManage/salaryPerformance/index")
},
......
......@@ -40,16 +40,18 @@
<td class="lb">
商品类别
</td>
<td>{{ $$(detail.subOrder,'upgradeGoodsTypeName') }}</td>
<td>{{ $$(detail.subOrder,'goodsTypeNameStr') }}</td>
<td class="lb">
数量
</td>
<td>{{ $$(detail.subOrder,'number') }}件</td>
<td rowspan="2" colspan="2"
<td rowspan="2"
colspan="2"
class="lb">
支付金额
</td>
<td rowspan="2" colspan="2">
<td rowspan="2"
colspan="2">
{{ detail.totalPrice ? '¥ ' + detail.totalPrice : '' }}
</td>
</tr>
......@@ -219,7 +221,9 @@
商品成本
</td>
<!-- 子订单有嘀加成本或第三方成本 商品成本显示- -->
<td v-if="isSubOrder">{{ !filterEmpty(detail.djCost) || !filterEmpty(detail.thirdPartyCost) ? '-' : (detail.goodsCost?('¥ '+detail.goodsCost):'¥0') }}</td>
<td v-if="isSubOrder">
{{ !filterEmpty(detail.djCost) || !filterEmpty(detail.thirdPartyCost) ? '-' : (detail.goodsCost?('¥ '+detail.goodsCost):'¥0') }}
</td>
<td v-else>{{ detail.goodsCostForShow?('¥ '+detail.goodsCostForShow):'-' }}</td>
<td class="lb">
回收成本
......@@ -312,7 +316,9 @@
<td v-else>
{{ proportionTypeOpts[item.expenseCategoryCalculateType]?(proportionTypeOpts[item.expenseCategoryCalculateType]+item.expenseCategoryValue+(item.expenseCategoryCalculateType == 3 ? '元' : '%') ):'-' }}
</td>
<td>{{ !item.noData ? (item.expenseCategoryResult?('¥ '+item.expenseCategoryResult):'¥0') : '-' }}</td>
<td>
{{ !item.noData ? (item.expenseCategoryResult?('¥ '+item.expenseCategoryResult):'¥0') : '-' }}
</td>
</tr>
</table>
<!-- 审计需求先屏蔽 -->
......@@ -454,7 +460,12 @@ export default {
if (res.goodsOrder?.payOrder?.successDate) {
res.goodsOrder.payOrder.successDate = Util.dateFormate(res.goodsOrder.payOrder.successDate, 'YYYY-MM-DD HH:mm:ss')
}
if (res.subOrder) res.subOrder.positionStr = this.positionTypeList?.filter(val => val.position == res.subOrder?.upgradeGoodsPosition)[0]?.confName || '-'
if (res.subOrder) {
res.subOrder.positionStr = this.positionTypeList?.filter(val => val.position == res.subOrder?.upgradeGoodsPosition)[0]?.confName || '-'
res.subOrder.goodsTypeNameStr = res.subOrder.upgradeGoodsTypeName || '-'
res.subOrder.goodsTypeNameStr += res.subOrder.upgradeSecondaryGoodsTypeName ? ' - ' + res.subOrder.upgradeSecondaryGoodsTypeName : ''
res.subOrder.goodsTypeNameStr += res.subOrder.upgradeThirdLevelGoodsTypeName ? ' - ' + res.subOrder.upgradeThirdLevelGoodsTypeName : ''
}
this.detail = res
const calculateds = res.expenseCategoryCalculateds
if (calculateds && calculateds.length > 0) {
......@@ -470,8 +481,8 @@ export default {
}
// 未匹配到流量费规则,默认展示一条空数据
if (!this.ledgerData?.length) {
let _data = {
expenseCategoryName: '流量费',
const _data = {
expenseCategoryName: '流量费',
targetType: 1,
targetMerchantName: res?.orderDivision?.realityShopMerchantName,
targetMerchantId: res?.orderDivision?.realityShopMerchantId,
......@@ -536,7 +547,7 @@ export default {
text-align: center;
// padding: 10px;
padding: 6px;
.text-hide{
.text-hide {
display: inline-block;
width: 19.5em;
overflow: hidden;
......
......@@ -674,6 +674,7 @@ export default {
_formData.positionNamesArr = _positionNamesArr
_formData.goodsName = _valueObj?.goodsName
_formData.goodsTypeName = _valueObj?.goodsTypeName
_formData.tempGoodsTypeName = _valueObj?.tempGoodsTypeName
_formData.goodsType = _valueObj?.goodsType
_formData.serviceItemNames = _valueObj?.serviceItemNames
_formData.productType = [] // 切换上架商品 将服务类型清空
......
......@@ -74,7 +74,7 @@ export const packageGoodsForm = [{
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
value: 'tempGoodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
......
......@@ -66,7 +66,7 @@ export default {
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
value: 'tempGoodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
......@@ -292,6 +292,10 @@ export default {
this.allPages = res.pages
const resArr = []
res.list && res.list.forEach(val => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
val.upgradeGoodsList.forEach(v => {
resArr.push({
confId: v.id,
......@@ -301,6 +305,7 @@ export default {
upgradeGoodsName: v?.upgradeGoodsName,
goodsName: val?.goodsInfo?.goodsName,
goodsTypeName: val?.goodsInfo?.goodsTypeName,
tempGoodsTypeName: result,
upgradePrice: v?.upgradePrice,
purchasePrice: v?.purchasePrice,
type: v?.type,
......@@ -363,10 +368,15 @@ export default {
const positionNamesArr = deepClone(this.positionTypeList)?.filter(val => (res?.upgradeGoods.position?.split(','))?.includes(val.position + '')) || []
if (res?.upgradeProductFlag == 'Y') productType.push(2)
if (res?.baseProductFlag == 'Y') productType.push(1)
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = res.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
res.productType = productType // 产品类型
res.upgradePrice = res.upgradeGoods?.upgradePrice // 参考售价
res.positionNames = positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '' // 部位
res.positionNamesArr = positionNamesArr
res.tempGoodsTypeName = result // 所属分类
res.purchasePrice = res.upgradeGoods?.purchasePrice // 采购价价
res.upgradeCommodityCode = res?.upgradeCommodityCode // 商品ID
res.warrantyPeriod = res?.upgradeGoods?.warrantyPeriod // 质保年限
......
......@@ -71,7 +71,7 @@ export default {
value: 'goodsName'
}, {
label: '所属分类',
value: 'goodsTypeName'
value: 'tempGoodsTypeName'
}, {
label: '商品ID',
value: 'upgradeCommodityCode'
......@@ -183,6 +183,10 @@ 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 result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
const productTypeTextArr = []
// 太阳膜/延保类回显部位
const positionNamesArr = deepClone(this.positionTypeList).filter(val => (res?.upgradeGoods.position?.split(','))?.includes(val.position + '')) || []
......@@ -200,6 +204,7 @@ 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 || ''
......
......@@ -9,6 +9,13 @@
:label-width="'100px'"
:form-data="showFormData"
@handleChangeSelect="handleChangeSelect">
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'"
@change="selectAddAttr($event)"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId"
......@@ -188,7 +195,7 @@
</d2-container>
</template>
<script>
import { getProductTypeBySceneId, getList } from '@api/product'
import { getList, getAllCategory } from '@api/product'
import { getGroundingManageList, updateGoodsStatus, batchReviewAPI, delGroundingById, batchUpdateStatus, batchUpdateBatchCopy, batchSetValidMinSellPrice, groundingImport } from '@api/grounding'
import { deepClone, Util } from '@/common/util'
import { sceneCodeList, sceneList, BaseData } from '@/common/constants.js'
......@@ -212,12 +219,15 @@ export default {
sceneType: '',
goodsCode: '',
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
goodsAlias: '',
status: '',
yqMerchantId: '',
goodsSource: 0,
financeCheckFlag: ''
},
tempGoodsType: [],
getListApi: getGroundingManageList,
drawerDetailVisible: false,
showFormData: [{
......@@ -251,11 +261,7 @@ export default {
}, {
label: '所属分类',
name: 'goodsType',
type: 'select',
optionList: [],
optionId: 'categoryType',
optionLabel: 'categoryName',
optionsName: 'productTypeList'
addHtml: 'goodsCascader'
}, {
label: '所属系列',
name: 'goodsCode',
......@@ -464,7 +470,14 @@ export default {
label: '所属分类',
parentProp: 'goodsInfo',
prop: 'goodsTypeName',
width: 140
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
return result
},
width: 170
}, {
label: '上架部位',
parentProp: 'goodsInfo',
......@@ -594,9 +607,8 @@ export default {
this.getOptionsList()
})
// 获取全部类目 屏蔽服务商自建类目
getProductTypeBySceneId({ categoryTypeList: this.selfBuildGoodsType }).then(res => {
this.baseData.productTypeList = res
this.getOptionsList()
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
// 获取全部素材 素材商品来源(0嘀加,1自建商品)
getList({ currentPage: 1, pageSize: 9999, goodsSource: 0 }).then(res => {
......@@ -626,6 +638,11 @@ export default {
}),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions('d2admin/user', ['actionSetDownloadList']),
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
},
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
},
......@@ -784,12 +801,15 @@ export default {
sceneType: '',
goodsCode: '',
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
goodsAlias: '',
status: '',
yqMerchantId: '',
goodsSource: 0,
financeCheckFlag: ''
}
this.tempGoodsType = []
// 重新查询
this.$refs.groundingIndexTable.refreshTable(true, true)
},
......
......@@ -725,6 +725,7 @@ export default {
_formData.positionNamesArr = _positionNamesArr
_formData.goodsName = _valueObj?.goodsName
_formData.goodsTypeName = _valueObj?.goodsTypeName
_formData.tempGoodsTypeName = _valueObj?.tempGoodsTypeName
_formData.goodsType = _valueObj?.goodsType
_formData.serviceItemNames = _valueObj?.serviceItemNames
_formData.upgradeSupplyMode = '' // 切换上架商品 将升级/产品供货模式清空
......
......@@ -248,6 +248,10 @@ export default {
this.allPages = res.pages
const resArr = []
res.list && res.list.forEach(val => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
val.upgradeGoodsList.forEach(v => {
resArr.push({
confId: v.id,
......@@ -257,6 +261,7 @@ export default {
upgradeGoodsName: v?.upgradeGoodsName,
goodsName: val?.goodsInfo?.goodsName,
goodsTypeName: val?.goodsInfo?.goodsTypeName,
tempGoodsTypeName: result,
upgradePrice: v?.upgradePrice,
purchasePrice: v?.purchasePrice,
type: v?.type,
......@@ -307,6 +312,10 @@ export default {
res.groundingGoodsList = []
const defaultSelect = [] // 上架商品 默认选中项
res?.merchantGoodsInfoList?.forEach(val => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
const positionNamesArr = deepClone(this.positionTypeList)?.filter(subVal => (val?.upgradeGoods?.position?.split(','))?.includes(subVal.position + '')) || []
res.groundingGoodsList.push({
id: val.id,
......@@ -315,6 +324,7 @@ export default {
upgradeGoodsName: val?.upgradeGoodsName, // 升级商品名称
goodsAlias: val?.goodsAlias, // 商品别名
goodsTypeName: val?.goodsTypeName, // 升级商品所属类目
tempGoodsTypeName: result, // 商品所属类目
upgradePrice: val?.upgradeGoods?.upgradePrice, // 参考售价
position: val?.position, // 上架部位
positionNames: positionNamesArr.length ? positionNamesArr.map(subItem => { return subItem?.confName }).join('/') : '', // 部位名称
......
......@@ -150,6 +150,10 @@ export default {
if (val.goodsType == 1) { // 太阳膜类 升级产品供货模式(优先级高)
arr = upgradeSupplyModeList
}
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = val.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
this.editForm[1].formBlock.push(packageGoodsDetail)
// 太阳膜类回显部位
const positionNamesArr = deepClone(this.positionTypeList).filter(subVal => (val?.upgradeGoods?.position?.split(','))?.includes(subVal.position + '')) || []
......@@ -159,6 +163,7 @@ export default {
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('/') : '', // 部位名称
......
......@@ -22,6 +22,8 @@
<p class="item_class">
<span class="label">类目:</span>
<span class="value">{{ $$(commodityInfo.goodsInfo,'goodsTypeName') }}</span>
<span class="value" v-if="$$(commodityInfo.goodsInfo,'secondaryGoodsTypeName')">-{{ $$(commodityInfo.goodsInfo,'secondaryGoodsTypeName') }}</span>
<span class="value" v-if="$$(commodityInfo.goodsInfo,'thirdLevelGoodsTypeName')">-{{ $$(commodityInfo.goodsInfo,'thirdLevelGoodsTypeName') }}</span>
</p>
<p class="item_class">
<span class="label">品牌方:</span>
......
......@@ -24,7 +24,8 @@
v-if="
item.type === 'input' ||
item.type === 'select' ||
item.type === 'special-select'
item.type === 'special-select' ||
item.type === 'cascader'
"
>
<el-input
......@@ -172,6 +173,12 @@
</div>
</div>
</el-select>
<!-- 级联选择器 -->
<el-cascader v-else-if="item.type === 'cascader'" :style="{ width: item.width || formItemWidth }" :options="item.optionList"
v-model="formData[item.name]" :placeholder="'请选择' + item.label"
@change="selectAddAttr($event, item)" aria-hidden="false"
:props="{ checkStrictly: true, label: item.optionLabel, value: item.optionId }" :show-all-levels="false">
</el-cascader>
</el-form-item>
</div>
<!-- 膜类配置字段 1太阳膜 14改色膜 6改色膜(众筹)12车衣 4车衣(众筹)-->
......@@ -607,6 +614,7 @@ export default {
data() {
return {
equitySceneType: baseConfig.equitySceneType || [],
membraneTypeList: baseConfig.membraneTypeList || [],
solarFilmArr: baseConfig.solarFilmArr || [1, 111, 112],
userInfo: this.$store.state.d2admin.user.info,
lookImgVisible: false,
......@@ -642,7 +650,7 @@ export default {
trigger: "blur"
}
],
goodsType: [
tempGoodsType: [
{ required: true, message: "请选择类目", trigger: "change" }
],
supplierCode: [
......@@ -915,11 +923,30 @@ export default {
selectAddAttr(value, targetItem) {
this.selectedValue = value
this.editOptionIndex = -1
if (targetItem.name == "goodsType") {
if (targetItem.name == "tempGoodsType") {
var tempVal = targetItem.optionList.find(
(item) => item.categoryType === value
(item) => item.categoryType === value?.[0]
)
this.formData.goodsTypeName = tempVal.categoryName
let secondGoodsObj
let thirdGoodsObj
targetItem.optionList?.forEach(val => {
val.children?.find(item => {
if (item.categoryType === value?.[1]) {
secondGoodsObj = item
}
item.children?.find(val => {
if (val.categoryType === value?.[2]) {
thirdGoodsObj = val
}
})
})
})
this.formData.goodsType = value?.[0] // 一级类目
this.formData.secondaryGoodsType = value?.[1] || '' // 二级类目
this.formData.thirdLevelGoodsType = value?.[2] || '' // 三级类目
this.formData.goodsTypeName = tempVal.categoryName // 一级类目名
this.formData.secondaryGoodsTypeName = secondGoodsObj?.categoryName || '' // 二级类目名
this.formData.thirdLevelGoodsTypeName = thirdGoodsObj?.categoryName || '' // 三级类目名
const copyMembranesFormBlock = deepClone(this.copyMembranesFormBlock)
// 太阳膜类 部位下拉框数据
copyMembranesFormBlock[
......@@ -929,15 +956,10 @@ export default {
this.membranesFormBlock = []
if (this.formData.goodsType == 1) {
this.membranesFormBlock = copyMembranesFormBlock
} else if (
this.formData.goodsType == 12 ||
this.formData.goodsType == 14 ||
this.formData.goodsType == 4 ||
this.formData.goodsType == 6
) {
} else if (this.membraneTypeList?.includes(this.formData.goodsType)) { // 膜类配置比例换算
this.membranesFormBlock = [copyMembranesFormBlock[1]]
}
this.setUpdateGoodsInfo({ goodsType: value })
this.setUpdateGoodsInfo({ goodsType: value?.[0] })
}
// 修改供应方
if (targetItem.name == "supplierCode") {
......@@ -1338,5 +1360,13 @@ export default {
.add_icon {
color: #3fcf77;
}
::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>
......@@ -17,7 +17,7 @@
<script>
import { deepClone } from '@/common/util'
import { mapActions } from 'vuex'
import { getBrandSupplyMerchant, addBrandSupplyMerchant, editBrandSupplyMerchant, getProductTypeBySceneId } from '@/api/product'
import { getBrandSupplyMerchant, addBrandSupplyMerchant, editBrandSupplyMerchant, getProductTypeBySceneId, getAllCategory } from '@/api/product'
import productForm from './productForm.vue'
import { baseConfig } from '@/main'
export default {
......@@ -29,6 +29,7 @@ export default {
editData: {
goodsName: '',
goodsType: '',
tempGoodsType: [],
goodsTypeName: '',
sapCode: '',
brandMerchantCode: '',
......@@ -56,10 +57,10 @@ export default {
width: '432px'
},
{
name: 'goodsType',
name: 'tempGoodsType',
label: '类目',
isRequired: true,
type: 'select',
type: 'cascader',
isClear: false,
isDisabled: false,
optionList: [],
......@@ -175,10 +176,22 @@ export default {
}),
// 获取全部类目 屏蔽服务商自建类目
getGoodTypeList() {
getProductTypeBySceneId({ categoryTypeList: this.selfBuildGoodsType }).then(res => {
const obj = this.editForm[0].formBlock[this.editForm[0].formBlock.findIndex(val => val.name == 'goodsType')]
obj.optionList = res
if (this.addOrEdit === 'edit' && this.formData?.status != 3) obj.isDisabled = true
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) {
obj.optionList.forEach(item => {
if (item.categoryType != this.editData.goodsType) {
item.disabled = true
item?.children?.forEach(i => {
i.disabled = true
i?.children?.forEach(j => {
j.disabled = true
})
})
}
})
}
})
},
// 获取品牌/供应方
......
......@@ -8,6 +8,13 @@
:search-form="searchForm"
:label-width="'100px'"
:form-data="showFormData">
<template slot="goodsCascader">
<el-cascader :options="baseData.productTypeList" style="width: 100%;"
v-model="tempGoodsType" :placeholder="'请选择'"
@change="selectAddAttr($event)"
:props="{ checkStrictly: true, label: 'categoryName', value: 'categoryType' }" :show-all-levels="false">
</el-cascader>
</template>
</d2-search>
<div class="up-btns">
<el-button :id="tableParams.btnId" size="small" type="primary">
......@@ -112,7 +119,7 @@
<script>
import { Util } from '@/common/util'
import { getProductManageList, productImport } from '@api/productManage'
import { getProductTypeBySceneId } from '@api/product'
import { getAllCategory } from '@api/product'
import { mapActions, mapState, mapMutations } from 'vuex'
import { baseGoodsDelete } from '@api/commodity'
import drawerDetail from './components/drawerDetail.vue'
......@@ -127,9 +134,12 @@ export default {
commodityCode: '',
baseGoodsName: '',
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
baseGoodsStatus: '',
type: ''
},
tempGoodsType: [],
showFormData: [{
label: 'ID',
name: 'commodityCode',
......@@ -151,11 +161,7 @@ export default {
}, {
label: '类目',
name: 'goodsType',
type: 'select',
optionList: [],
optionId: 'categoryType',
optionLabel: 'categoryName',
optionsName: 'productTypeList'
addHtml: 'goodsCascader'
}, {
label: '商品状态',
name: 'baseGoodsStatus',
......@@ -202,7 +208,14 @@ export default {
}, {
label: '类目',
parentProp: 'goodsInfo',
prop: 'goodsTypeName'
prop: 'goodsTypeName',
formatter: (cellValue) => {
const { goodsTypeName, secondaryGoodsTypeName, thirdLevelGoodsTypeName } = cellValue.goodsInfo
const result = [secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)
? `${goodsTypeName}-${[secondaryGoodsTypeName, thirdLevelGoodsTypeName].find(type => type)}`
: goodsTypeName
return result
}
}, {
label: '规格',
prop: 'listShowSpecificationData',
......@@ -302,9 +315,8 @@ export default {
var allOpt = { confId: '', confValue: '全部' }
this.baseData.statusList.unshift(allOpt)
// 获取全部类目 屏蔽服务商自建类目
getProductTypeBySceneId({ categoryTypeList: this.selfBuildGoodsType }).then(res => {
this.baseData.productTypeList = res
this.getBaseData()
getAllCategory({ categoryTypeList: this.selfBuildGoodsType, pageSize: 9999, currentPage: 1 }).then(res => {
this.baseData.productTypeList = res?.list || []
})
},
......@@ -315,12 +327,13 @@ export default {
}),
...mapMutations('d2admin/user', ['setUpdateRefesh']),
...mapActions('d2admin/user', ['actionSetDownloadList']),
selectAddAttr(value) {
this.searchForm.goodsType = value?.[0]
this.searchForm.secondaryGoodsType = value?.[1]
this.searchForm.thirdLevelGoodsType = value?.[2]
},
async getBaseData() {
this.positionTypeList = await this.get(BaseData.positionTypeList)
this.baseData.productTypeList.unshift({
categoryType: '',
categoryName: '全部'
})
this.showFormData.forEach((item, index) => {
if (item.type === 'select') {
this.$set(this.showFormData[index], 'optionList', this.baseData[item.optionsName])
......@@ -406,9 +419,12 @@ export default {
commodityCode: '',
baseGoodsName: '',
goodsType: '',
secondaryGoodsType: '',
thirdLevelGoodsType: '',
baseGoodsStatus: '',
type: ''
}
this.tempGoodsType = []
this.$refs.productManageTable.refreshTable(true, true)
},
handleAdd(form) {
......
......@@ -163,9 +163,14 @@ export default {
specificationDetailList.push(val)
})
const selectedPositions = res.goodsInfo?.goodsPositionList?.map((val) => { return val.position }) || []
const { goodsType, secondaryGoodsType, thirdLevelGoodsType } = res.goodsInfo || {}
const tempGoodsType = [goodsType, secondaryGoodsType, thirdLevelGoodsType].filter(item => item != -1 && Boolean(item)) // 未设置时后端会返回默认值-1
objData = {
status: res.status,
goodsType: res.goodsInfo.goodsType,
tempGoodsType: tempGoodsType,
secondaryGoodsType: res.goodsInfo.secondaryGoodsType,
thirdLevelGoodsType: res.goodsInfo.thirdLevelGoodsType,
goodsCode: res.goodsInfo.goodsCode,
goodsSpecificationNameList: res.goodsSpecificationNameList,
specificationDetailList: specificationDetailList, // 多规格数据
......@@ -185,7 +190,9 @@ export default {
supplierCode: res.goodsInfo.supplierCode,
merchantGoodsInfos: res?.merchantGoodsInfos
}
this.productFormData = deepClone({ ...res.goodsInfo, status: res?.status, oldconvertedValue: res.goodsInfo?.convertedValue }) || {}
this.productFormData = deepClone({ ...res.goodsInfo, status: res?.status, oldconvertedValue: res.goodsInfo?.convertedValue, tempGoodsType: tempGoodsType,
secondaryGoodsType: res.goodsInfo.secondaryGoodsType,
thirdLevelGoodsType: res.goodsInfo.thirdLevelGoodsType }) || {}
this.setUpdateGoodsInfo(objData)
this.show = true
// this.$nextTick(() => {
......
......@@ -71,13 +71,13 @@ export default {
openState: ''
},
showFormData: [{
label: '等级名称',
label: '奖励名称',
name: 'levelName',
type: 'input',
maxlength: '20',
isClear: true
}, {
label: '等级类型',
label: '奖励类型',
name: 'levelType',
type: 'select',
isClear: true,
......@@ -104,25 +104,25 @@ export default {
tableOption: { width: '150px' },
tableColumns: [
{
label: '等级名称',
prop: 'levelName'
}, {
label: '等级类型',
label: '奖励类型',
prop: 'levelType',
width: '150',
formatter: (cellValue) => {
return cellValue.levelType ? this.baseData.levelTypeOpt.find(item => item.confId === cellValue.levelType).confValue : '--'
}
}, {
label: '奖励名称',
prop: 'levelName'
}, {
label: '评级项目',
prop: "ratingProjectType"
}, {
label: '最高排名',
prop: 'highRanking',
label: '最低积分/排名',
prop: 'minRanking',
width: '150'
}, {
label: '最低排名',
prop: 'minRanking',
label: '最高积分',
prop: 'highRanking',
width: '150'
}, {
label: '等级结算周期',
......
......@@ -45,7 +45,7 @@
<script>
import { mapActions, mapState } from 'vuex'
import { Util, deepClone, downLoadFile } from '@/common/util'
import { levelManagePage, levelManageDelete, levelManageExport } from '@api/inStorePoints'
import { levelManagePage, levelManageDelete, levelManageExport, levelNameList } from '@api/inStorePoints'
import { levelTypeOpt, levelNameOpt } from '@/common/constants.js'
export default {
name: 'Record',
......@@ -74,7 +74,7 @@ export default {
maxlength: '11',
isClear: true
}, {
label: '等级类型',
label: '奖励类型',
name: 'levelType',
type: 'select',
isClear: true,
......@@ -83,24 +83,25 @@ export default {
optionLabel: 'confValue',
optionsName: 'levelTypeOpt',
changeAttr: (value, targetItem) => {
this.baseData.levelNameOpt = []
const nameOpt = deepClone(levelNameOpt)
if (value) {
if (value == 1) {
this.baseData.levelNameOpt = nameOpt.slice(0, 4)
} else if (value == 2) {
this.baseData.levelNameOpt = nameOpt.slice(4, 8)
}
}
this.searchForm.levelName = ""
this.getOptionsList()
this.getLevelNameList(value)
// this.baseData.levelNameOpt = []
// const nameOpt = deepClone(levelNameOpt)
// if (value) {
// if (value == 1) {
// this.baseData.levelNameOpt = nameOpt.slice(0, 4)
// } else if (value == 2) {
// this.baseData.levelNameOpt = nameOpt.slice(4, 8)
// }
// }
// this.searchForm.levelName = ""
// this.getOptionsList()
}
}, {
label: '等级名称',
label: '奖励名称',
name: 'levelName',
type: 'select',
isClear: true,
noDataText: "请先选择等级类型",
noDataText: "请先选择奖励类型",
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
......@@ -134,14 +135,14 @@ export default {
return Util.dateFormate(cellValue.distributionTime, 'YYYY年MM月')
}
}, {
label: '等级类型',
label: '奖励类型',
prop: 'levelType',
width: '150',
formatter: (cellValue) => {
return cellValue.levelType ? this.baseData.levelTypeOpt.find(item => item.confId === cellValue.levelType).confValue : '--'
}
}, {
label: '等级名称',
label: '奖励名称',
prop: 'levelName'
}, {
label: '发放时间',
......@@ -252,6 +253,25 @@ export default {
}).catch(err => {
console.log(err)
})
},
getLevelNameList(type) {
this.baseData.levelNameOpt = []
this.searchForm.levelName = ""
if (type) {
levelNameList({ levelType: type }).then(res => {
const list = deepClone(res)
this.baseData.levelNameOpt = list.map(item => {
return {
confId: item,
confValue: item
}
})
this.getOptionsList()
})
} else {
this.getOptionsList()
}
}
}
......
......@@ -21,6 +21,9 @@
<el-select v-model="infoForm.merchantId" placeholder="请选择归属门店" :disabled="isDisabled"
style="width: 432px" remote reserve-keyword @visible-change="visibleChange"
:remote-method="remoteMethod" @change="changeMerchant" v-el-select-loadmore="interestsLoadmore" filterable>
<template v-if="baseData.merchantList && !baseData.merchantList.length && loadedFlag">
<el-option :label="'暂无数据'" :value="null" disabled></el-option>
</template>
<el-option v-for="(item, index) in baseData.merchantList" :key="index" :label="`${item.shopMerchantName}${item.shopMerchantId == -1 ? '' : item.shopMerchantId}`" :value="item.shopMerchantId"></el-option>
</el-select>
</template>
......@@ -118,7 +121,8 @@ export default {
},
currentPage: 1,
pageSize: 50,
merchantIdName: ''
merchantIdName: '',
loadedFlag: false
}
},
props: {
......@@ -240,6 +244,9 @@ export default {
if (![0, 7, 8, 9].includes(this.infoForm.jobType)) {
this.$set(this.infoForm, 'merchantId', '')
this.$set(this.infoForm, 'yqMerchantId', '')
this.baseData.merchantList = []
this.baseData.yqMerchantList = []
this.getOptions()
this.clearValidate()
}
},
......@@ -283,6 +290,7 @@ export default {
getStoreListBySceneApi(params).then(res => {
this.baseData.merchantList = this.baseData.merchantList.concat(res.list)
this.allPages = res.total
this.loadedFlag = true
})
},
changeMerchant(val) {
......
......@@ -22,6 +22,9 @@
style="width: 432px" remote reserve-keyword @visible-change="visibleChange"
@change="changeMerchant"
:remote-method="remoteMethod" v-el-select-loadmore="interestsLoadmore" filterable>
<template v-if="baseData.merchantList && !baseData.merchantList.length && loadedFlag">
<el-option :label="'暂无数据'" :value="null" disabled></el-option>
</template>
<el-option v-for="(item, index) in baseData.merchantList" :key="index" :label="`${item.shopMerchantName}${item.shopMerchantId == -1 ? '' : item.shopMerchantId}`" :value="item.shopMerchantId"></el-option>
</el-select>
</template>
......@@ -82,8 +85,7 @@ export default {
optionLabel: 'confValue',
optionsName: 'channelList',
changeAttr: (val) => {
this.getOptions('hireType', val)
this.resetForm()
this.resetForm(val)
}
},
{
......@@ -231,7 +233,8 @@ export default {
isDisabled: false,
currentPage: 1,
pageSize: 50,
merchantIdName: ''
merchantIdName: '',
loadedFlag: false
}
},
......@@ -286,7 +289,7 @@ export default {
this.getOptions()
})
},
resetForm() {
resetForm(val) {
let obj = {
jobType: '',
mentorPhone: '',
......@@ -303,6 +306,9 @@ export default {
this.staffFormData?.forEach(v => {
v.isDisabled = false
})
this.baseData.merchantList = []
this.baseData.yqMerchantList = []
this.getOptions('hireType', val)
this.clearValidate()
},
clearValidate() {
......@@ -314,6 +320,9 @@ export default {
if (![0, 7, 8, 9].includes(this.infoForm.jobType)) {
this.$set(this.infoForm, 'merchantId', '')
this.$set(this.infoForm, 'yqMerchantId', '')
this.baseData.merchantList = []
this.baseData.yqMerchantList = []
this.getOptions()
this.clearValidate()
}
},
......@@ -416,6 +425,7 @@ export default {
getStoreListBySceneApi(params).then(res => {
this.baseData.merchantList = this.baseData.merchantList.concat(res.list)
this.allPages = res.total
this.loadedFlag = true
})
},
......
......@@ -12,6 +12,18 @@
:form-data="formData"
:form-rules="formRules">
<template slot="syncUnit"><span class="unit">元</span></template>
<template slot="refundOffset">
<el-input style="width: 136px;" prefix-icon="el-icon-minus" @input="handleInput($event, 'refundOffset')" placeholder="请输入" v-model="infoForm.refundOffset"></el-input>
<span class="unit">元</span>
</template>
<template slot="customDeduction">
<el-input style="width: 136px;" @input="handleInput($event, 'customDeduction')" placeholder="输入正负值" v-model="infoForm.customDeduction"></el-input>
<span class="unit">元</span>
</template>
<template slot="correctSalary">
<el-input style="width: 136px;" placeholder="" disabled v-model="computedValue"></el-input>
<span class="unit">元</span>
</template>
</glsx-combi-form>
<div class="history-box" v-if="infoForm['historyRemark'].length">
<div class="line">
......@@ -32,7 +44,8 @@
<script>
import { reviseSalaryApi, getSalaryRecordApi } from '@api/resident'
import { Util,} from '@/common/util'
import { limitPrice } from '@/common/format'
import { limitPrice, limitPriceForNegative } from '@/common/format'
import BigNumber from 'bignumber.js'
export default {
name: 'RevisedSalaryDialog',
props: {
......@@ -46,6 +59,20 @@ export default {
}
},
data() {
var validateRefundOffset = (rule, value, callback) => {
if (Number(value) <= 0) {
callback(new Error('输入值必须大于0'))
} else {
callback()
}
}
var validateCustomDeduction = (rule, value, callback) => {
if (Number(value) == 0) {
callback(new Error('输入值不能为0'))
} else {
callback()
}
}
return {
dialogConfig: {
title: '修订合计应发工资',
......@@ -59,17 +86,19 @@ export default {
isDisabled: true
},
{
label: '修订为',
label: '退单冲减',
name: 'refundOffset',
addHtml: 'refundOffset'
},
{
label: '正负冲减',
name: 'customDeduction',
addHtml: 'customDeduction'
},
{
label: '实发工资',
name: 'correctSalary',
type: 'input',
width: '136px',
inputFn: (e) => {
e = e.replace(/[^\d.]/g, '')
let oldValue = `${this.infoForm['oldcorrectSalary']}`
this.$set(this.infoForm, 'correctSalary', limitPrice(e, oldValue, 6, 2, 0))
this.$set(this.infoForm, 'oldcorrectSalary', this.infoForm['correctSalary'])
},
suffixSlot: 'syncUnit'
addHtml: 'correctSalary'
},
{
label: '备注',
......@@ -83,6 +112,8 @@ export default {
],
infoForm: {
correctSalary: '',
refundOffset: '',
customDeduction: '',
remark: '',
historyRemark: []
},
......@@ -90,6 +121,14 @@ export default {
correctSalary: [
{ required: true, message: '请输入修订后的应发工资', trigger: 'blur' }
],
refundOffset: [
{ required: false, message: '', trigger: 'blur' },
{ validator: validateRefundOffset, trigger: ['blur', 'change'] }
],
customDeduction: [
{ required: false, message: '', trigger: 'blur' },
{ validator: validateCustomDeduction, trigger: ['blur', 'change']}
],
remark: [
{ required: true, message: '请输入备注', trigger: 'blur' }
]
......@@ -104,6 +143,15 @@ export default {
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'revisedSalaryVisible' })
}
},
computedValue: {
get() {
let currentSalary = new BigNumber(this.infoForm.currentSalary || 0)
let refundOffset = new BigNumber(this.infoForm.refundOffset || 0)
let customDeduction = new BigNumber(this.infoForm.customDeduction != '-' ? (this.infoForm.customDeduction || 0) : 0)
this.$set(this.infoForm, 'correctSalary', `${currentSalary.minus(refundOffset).plus(customDeduction)}`)
return `${currentSalary.minus(refundOffset).plus(customDeduction)}`
}
}
},
mounted() {
......@@ -111,6 +159,41 @@ export default {
this.getRecord()
},
methods: {
handleInput(e, key) {
if (key == 'customDeduction') {
this.$set(this.infoForm, key, limitPriceForNegative(e))
} else {
let oldValue = `${this.infoForm['old' + key]}`
let maxlength = key == 'customDeduction' ? 7 : 6
this.$set(this.infoForm, key, limitPrice(e, oldValue, maxlength, 2))
this.$set(this.infoForm, 'old' + key, this.infoForm[key])
}
},
limitPriceForNegative(newValue) {
// 用来检索整数且不超过6位数
const limitDigit = /[0-9]{1,6}/
// 用来检索小数且小数点后不超过两位数
const limitDigitdot = /[0-9]{1,6}.[\d]{0,2}/
if (newValue) {
newValue = newValue + ""
let nn = ""
// 正负判断
if (newValue.match("-")) {
nn = newValue.match("-")[0]
}
// 小数判断
if (newValue.indexOf(".") != -1) {
if (newValue.match(limitDigitdot)) {
nn = nn + newValue.match(limitDigitdot)[0] || ""
}
} else {
if (newValue.match(limitDigit)) {
nn = nn + newValue.match(limitDigit)[0] || ""
}
}
return nn
}
},
getRecord() {
getSalaryRecordApi({ staffPhone: this.revisedSalaryRow.staffPhone, salaryMonth: this.revisedSalaryRow.salaryMonth, pageSize: 10, currentPage: 1 }).then(res => {
res?.list?.forEach(item => {
......@@ -124,7 +207,14 @@ export default {
handleAddConfirm() {
this.$refs.editFormRef?.$refs?.editChildRef?.validate((valid) => {
if (valid) {
reviseSalaryApi({id: this.revisedSalaryRow.id, correctSalary: this.infoForm['correctSalary'], remark: this.infoForm['remark']}).then(res => {
let params = {
id: this.revisedSalaryRow.id,
refundOffset: this.infoForm.refundOffset || '',
customDeduction: this.infoForm.customDeduction || '',
correctSalary: this.computedValue,
remark: this.infoForm.remark
}
reviseSalaryApi(params).then(res => {
this.$message.success('修订成功')
this.$emit('dialogClose', { flag: true, attrName: 'revisedSalaryVisible' })
})
......
......@@ -24,6 +24,7 @@
<d2-table-header>
<span slot="left">
<auth-button category="Button" :show-btn-ids="['9120506']" />
<span class="tips_text">仅展示「深圳嘀加」服务商的驻店员工,以及「广联数科」商户下员工</span>
</span>
<span style="display: inline-block;margin-right: 10px;">
<auth-button category="Button" :show-btn-ids="['9120504']" />
......@@ -95,7 +96,8 @@ export default {
merchantName: "",
hireType: "",
jobType: "",
workingStatus: ""
workingStatus: "",
createdSource: ""
},
searchFormSearch: {},
showFormData: [
......@@ -125,7 +127,7 @@ export default {
optionsName: "staffSceneLabelList"
},
{
label: "当前服务门店",
label: "服务门店",
name: "merchantName",
type: "input",
isClear: true
......@@ -159,6 +161,16 @@ export default {
optionId: "confId",
optionLabel: "confValue",
optionsName: "workingStatusList"
},
{
label: '渠道',
name: 'createdSource',
type: 'select',
isClear: true,
optionList: [],
optionId: 'confId',
optionLabel: 'confValue',
optionsName: 'createdSourceList'
}
],
getListApi: getResidentListApi,
......@@ -188,7 +200,24 @@ export default {
},
{
label: "服务门店",
prop: "merchantName"
prop: "",
width: '200',
formatter: (cellValue) => {
if (cellValue.merchantList && cellValue.merchantList.length > 0) {
return cellValue.merchantList.reduce(
(merchString, item) => {
merchString =
merchString +
`<p>${item.merchantName} ${item.merchantId}</p>`
return merchString
},
""
)
} else {
return "-"
}
},
html: true
},
{
label: "招聘通道",
......@@ -205,8 +234,22 @@ export default {
}
},
{
label: "帮带导师",
prop: "mentorName"
label: "创建人",
prop: "createdBy"
},
{
label: "渠道",
prop: "createdSource",
formatter: (cellValue) => {
return filterStr(cellValue.createdSource, this.baseData.createdSourceList)
}
},
{
label: "创建时间",
prop: "createdDate",
formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD') : '-'
}
},
{
label: "状态",
......@@ -235,6 +278,14 @@ export default {
workingStatusList: [
{ confId: '0', confValue: '在职' },
{ confId: '1', confValue: '离职' }
],
createdSourceList: [
{ confId: '1', confValue: '账户中心' },
{ confId: '2', confValue: 'SCRM' },
{ confId: '3', confValue: '生意助手' },
{ confId: '4', confValue: '门店助手' },
{ confId: '5', confValue: 'D+' },
{ confId: '6', confValue: '员工版小程序' }
]
},
flagVisible: false,
......@@ -314,7 +365,8 @@ export default {
merchantName: "",
hireType: "",
jobType: "",
workingStatus: ""
workingStatus: "",
createdSource: ""
}
this.$refs.recordTable.refreshTable(false, true)
},
......@@ -514,6 +566,10 @@ export default {
}
</script>
<style scoped>
.tips_text{
margin-left: 10px;
color: #999;
}
.count-txt {
font-weight: 700;
color: #2a58ad;
......
......@@ -10,5 +10,5 @@ export function filterStr(val, dataList, hireType) {
const found = dataList?.find(item => item.confId == v)
return found?.confValue
})
return result?.length ? result.join('、') : '-'
return result?.length ? result.join(',') : '-'
}
\ No newline at end of file
......@@ -17,8 +17,10 @@
slot-scope="scope">
<el-input-number v-model="infoForm.pointValue"
placeholder="输入数值"
:min="-100"
:max="100"></el-input-number>
:precision="1"
:step="0.1"
:min="-9.9"
:max="9.9"></el-input-number>
</div>
</glsx-combi-form>
</div>
......@@ -26,18 +28,18 @@
</template>
<script>
import { pointRule, pointAdd } from '@api/inStorePoints'
import { pointRule, pointAdd, pointStaffQuery } from '@api/inStorePoints'
import { Util, deepClone } from '@/common/util'
export default {
name: 'AddDialog',
data() {
function checkPhone(rule, value, callback) {
if (!Util.checkPhone(value)) {
callback(new Error('请输入正确的手机号码'))
return false
}
callback()
}
// function checkPhone(rule, value, callback) {
// if (!Util.checkPhone(value)) {
// callback(new Error('请输入正确的手机号码'))
// return false
// }
// callback()
// }
function checkPointValue(rule, value, callback) {
if (value == 0) {
callback(new Error('积分值不能为0'))
......@@ -70,7 +72,7 @@ export default {
message: '请填写电话号码',
trigger: 'blur'
}, {
validator: checkPhone,
validator: this.checkPhone,
trigger: 'blur'
}],
pointClassification: [{ required: true, message: '请选择积分分类', trigger: 'blur' }],
......@@ -86,13 +88,6 @@ export default {
}]
},
editFormData: [{
label: '员工姓名',
name: 'staffName',
type: 'input',
maxlength: 8,
showLimit: true,
isClear: true
}, {
label: "电话号码",
name: "staffPhone",
type: "input",
......@@ -100,6 +95,15 @@ export default {
isClear: true,
maxlength: "11"
}, {
label: '员工姓名',
name: 'staffName',
type: 'input',
maxlength: 8,
isDisabled: true,
placeholder: '请输入电话号码匹配'
// showLimit: true,
// isClear: true
}, {
label: '积分分类',
name: 'pointClassification',
type: 'select',
......@@ -198,6 +202,22 @@ export default {
})
}
},
checkPhone(rule, value, callback) {
if (!Util.checkPhone(value)) {
callback(new Error('请输入正确的手机号码'))
return false
}
pointStaffQuery({ staffPhone: value }).then((res) => {
console.log('res', res)
if (res) {
this.infoForm.staffName = res.staffName
}
}).catch((err) => {
console.log('err', err)
this.infoForm.staffName = ''
})
callback()
},
pointRule() {
pointRule({}).then((res) => {
this.baseData.pointClassificationOpt = res
......@@ -209,6 +229,7 @@ export default {
this.$refs.addFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
var params = deepClone(this.infoForm)
// params.pointValue = params.pointValue + '' // 后台是字符串类型接收
pointAdd(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
......
......@@ -17,8 +17,10 @@
slot-scope="scope">
<el-input-number v-model="infoForm.pointsValue"
placeholder="输入数值"
:min="-100"
:max="100"></el-input-number>
:precision="1"
:step="0.1"
:min="-9.9"
:max="9.9"></el-input-number>
</div>
</glsx-combi-form>
</div>
......
......@@ -205,6 +205,12 @@ export default {
handleSelect() {
this.infoData.campusList?.sort((a, b) => a.jobType - b.jobType)
},
// 获取配置数据
getFormData() {
return new Promise((resolve, reject) => {
resolve(this.infoData)
})
},
validateCustomForm() {
return new Promise((resolve, reject) => {
this.$refs['configForm'].validate((valid) => {
......
......@@ -8,14 +8,17 @@
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<template slot="remark" slot-scope="scope">
<el-popover placement="top" width="300" trigger="hover">
<div class="merchant-name-box">
{{ remarkFilter(scope.scope) }}
</div>
<div slot="reference">
{{ remarkFilter(scope.scope, 20) }}
</div>
</el-popover>
<template v-if="scope.scope.remark.length > 20">
<el-popover placement="top" width="300" trigger="hover">
<div class="merchant-name-box">
{{ remarkFilter(scope.scope) }}
</div>
<div slot="reference">
{{ remarkFilter(scope.scope, 20) }}
</div>
</el-popover>
</template>
<span v-else>{{ scope.scope.remark || '-' }}</span>
</template>
<template slot="auth-button" slot-scope="scope">
<auth-button :data="scope.scope" :show-btn-ids="['9121208']" />
......
......@@ -23,9 +23,16 @@
</div>
<div class="d2-container-content">
<d2-table-header>
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121201', '9121205']" />
<span style="display: inline-block">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121210']" />
</span>
<span style="display: inline-block;margin-left: 10px;">
<auth-button category="Button"
style="display: inline-block"
:show-btn-ids="['9121205']" />
</span>
</d2-table-header>
<d2-table ref="performanceTable"
:has-num="false"
......@@ -33,6 +40,19 @@
:table-params="tableParams"
:get-list-api="getListApi"
:before-search-fn="beforeSearchFn">
<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">
<div class="brand-box">
{{ brandFilter(scope.scope) }}
</div>
<div slot="reference">
{{ brandFilter(scope.scope, 30) }}
</div>
</el-popover>
</template>
<span v-else>{{scope.scope.brand || '-'}}</span>
</template>
<div slot="auth-button"
slot-scope="scope">
<!-- 编辑 -->
......@@ -45,11 +65,6 @@
<auth-button :data="scope.scope"
:show-btn-ids="['9121204']" />
</span>
<!-- 删除 -->
<span>
<auth-button :data="scope.scope"
:show-btn-ids="['9121203']" />
</span>
</div>
</d2-table>
</div>
......@@ -58,6 +73,8 @@
<script>
import { mapActions, mapState } from 'vuex'
import { getStoreSalaryListApi, editStoreSalaryStatusApi, deleteStoreSalaryApi } from '@api/resident'
import { getCarBrandList } from "@api/commodity.js"
import { deepClone } from '@/common/util'
export default {
name: "PerformanceList",
data() {
......@@ -91,6 +108,14 @@ export default {
optionId: "confId",
optionLabel: "confLabel",
optionsName: "hireTypeList"
}, {
label: '品牌',
name: 'brandId',
type: 'select',
optionList: [],
optionId: "confId",
optionLabel: "confLabel",
optionsName: "brandList"
}],
// 表格参数
tableParams: {
......@@ -112,33 +137,47 @@ export default {
formatter: (cellValue) => {
return `${cellValue.merchantName}${cellValue.merchantId}` || '-'
}
}, {
label: '品牌',
prop: 'brand',
width: '200',
addHtml: 'brand'
}, {
label: '绩效方案',
prop: 'schemeName'
prop: 'schemeNames'
}, {
label: '适配业务',
prop: 'sceneType',
prop: 'sceneTypes',
formatter: (cellValue) => {
return cellValue.sceneType == '1' ? '轻改' : '会员权益/升级'
const arr = cellValue.sceneTypes ? `${cellValue.sceneTypes}`?.split(',') : []
let result = [...new Set(arr)]?.map(v => {
const found = this.baseData.sceneTypeList?.find(item => item.confId == v)
return found?.confLabel
})
return result?.length ? result.join(',') : '-'
}
}, {
label: '招聘通道',
prop: 'hireType',
prop: 'hireTypes',
formatter: (cellValue) => {
return cellValue.hireType ? cellValue.hireType == '1' ? '校招管培生' : '社会招聘' : '-'
const arr = cellValue.hireTypes ? `${cellValue.hireTypes}`?.split(',') : []
let result = [...new Set(arr)]?.map(v => {
const found = this.baseData.hireTypeList?.find(item => item.confId == v)
return found?.confLabel
})
return result?.length ? result.join(',') : '-'
}
}, {
label: '状态',
prop: 'status',
prop: 'minPerformConfigStatus ',
className: (cellValue) => {
return {
1: 'greenSpot',
2: 'redSpot'
}[cellValue.status]
}[cellValue.minPerformConfigStatus ] || ''
},
formatter: (cellValue) => {
return cellValue.status == 1 ? '启用' : '禁用'
return cellValue.minPerformConfigStatus == 1 ? '启用' : cellValue.minPerformConfigStatus == 2 ? '禁用' : '-'
},
width: '100'
}]
......@@ -148,7 +187,8 @@ export default {
merchantName: '',
merchantId: '',
sceneType: '',
hireType: ''
hireType: '',
brandId: ''
},
baseData: {
sceneTypeList: [{
......@@ -164,7 +204,8 @@ export default {
}, {
confId: '2',
confLabel: '社会招聘'
}]
}],
brandList: []
}
}
},
......@@ -176,7 +217,8 @@ export default {
})
},
mounted() {
this.getOptions()
// 获取「深圳嘀加」关联的4s店的所有一级品牌数据
this.getBrandList()
},
methods: {
...mapActions({
......@@ -186,9 +228,30 @@ export default {
...mapActions('d2admin/user', ['actionSetDownloadList']),
beforeSearchFn() {
return new Promise(resolve => {
this.searchForm = {
...this.searchForm,
brandIds: this.searchForm.brandId ? [this.searchForm.brandId] : []
}
resolve()
})
},
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
} else {
return '-'
}
},
getBrandList() {
getCarBrandList({}).then(res => {
res?.forEach(item => {
item.confId = item.id
item.confLabel = item.name
})
this.baseData.brandList = res || []
this.getOptions()
})
},
getOptions() {
this.showFormData?.forEach((item, index) => {
if (item.type == 'select') {
......@@ -206,15 +269,14 @@ export default {
}
})
},
// 新增绩效方案
handleToAdd() {
this.close({ tagName: '/salaryPerformance' })
this.$router.push({
path: '/performanceScheme',
query: {
addOrEdit: 'add'
// 导入绩效
handleImport() {
this.$alert('敬请期待', '提示', {
confirmButtonText: '确定',
closeOnClickModal: true,
callback: action => {
}
})
});
},
// 编辑方案
handleToEdit(row) {
......@@ -229,13 +291,13 @@ export default {
},
// 启用/禁用
handleEnableOrDisable(row) {
let text = row.status == '1' ? '禁用' : '启用'
let text = row.minPerformConfigStatus == '1' ? '禁用' : '启用'
this.$confirm(`是否确认${text}?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editStoreSalaryStatusApi({id: row.id, status: row.status == '1' ? '2' : '1'}).then(res => {
editStoreSalaryStatusApi({merchantId: row.merchantId, status: row.minPerformConfigStatus == '1' ? '2' : '1'}).then(res => {
this.$message.success(`${text}成功`)
this.$refs.performanceTable.refreshTable()
})
......@@ -260,10 +322,16 @@ export default {
},
// 导出
handleExport() {
var params = {
...this.searchForm
}
var params = deepClone(this.searchForm)
params.method = 'dj.api.smartcarlife.merchantPerformanceConfig.exportAsync'
let brandIds = []
brandIds = [params.brandId] || undefined
brandIds?.forEach((item, index) => {
const brandId = `brandIds[${index}]`
params[brandId] = item
})
delete params.brandId
delete params.brandIds
const list = [
...this.dowloadList,
{
......@@ -281,7 +349,8 @@ export default {
merchantName: '',
merchantId: '',
sceneType: '',
hireType: ''
hireType: '',
brandId: ''
}
this.$refs.performanceTable.refreshTable()
}
......@@ -292,4 +361,9 @@ export default {
.m-t-40 {
margin-top: 40px;
}
.brand-box {
font-size: 12px;
max-height: 400px;
overflow-y: auto;
}
</style>
......@@ -281,6 +281,12 @@ export default {
this.$set(formData[index], key, limitPrice(e, oldValue, intergerDigit, key == 'startValue' || key == 'endValue' ? 0 : 2, 0, maxValue))
this.$set(formData[index], 'old' + key, formData[index][key])
},
// 获取配置数据
getFormData() {
return new Promise((resolve, reject) => {
resolve(this.configInfo)
})
},
validateCustomForm() {
return new Promise((resolve) => {
this.$refs['editFormRef'].$refs['editChildRef'].validate(async (valid) => {
......
<!-- 类目配置 -->
<template>
<div>
<div class="d2-container-content">
<d2-table-header>
<span slot="left">
<auth-button category="Button"
:show-btn-ids="['9061202']" />
</span>
</d2-table-header>
<el-table :data="tableData"
row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table-column prop="categoryName"
label="类目名称"
align="center">
</el-table-column>
<el-table-column prop="systemCategoryStr"
label="是否系统类目"
align="center"
width="180">
</el-table-column>
<el-table-column prop="createdDateStr"
label="创建时间"
align="center"
width="180">
</el-table-column>
<el-table-column prop="createdBy"
label="创建人"
align="center"
width="180">
</el-table-column>
<el-table-column prop="updatedDateStr"
label="更新时间"
align="center"
width="180">
</el-table-column>
<el-table-column prop="updatedBy"
label="更新人"
align="center"
width="180">
</el-table-column>
<el-table-column label="操作"
align="center"
width="300px">
<template slot-scope="scope">
<!-- <el-button type="text"
size="mini"
@click="handleEdit(scope.$index, scope.row)">添加子类目</el-button>
<el-button type="text"
size="mini"
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="text"
size="mini"
@click="handleDelete(scope.$index, scope.row)">删除</el-button> -->
<span style="margin-right: 10px;"
v-if="scope.row.level != 3">
<auth-button slot="auth-button"
:show-btn-ids="['9061205']"
:data="scope.row" />
</span>
<span style="margin-right: 10px;"
v-if="scope.row.systemCategory != '1'">
<auth-button slot="auth-button"
:show-btn-ids="['9061203']"
:data="scope.row" />
</span>
<span style="margin-right: 10px;"
v-if="scope.row.systemCategory != '1'">
<auth-button slot="auth-button"
:show-btn-ids="['9061204']"
:data="scope.row" />
</span>
</template>
</el-table-column>
</el-table>
<el-pagination background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="page.pageSize"
:total="total"
:layout="layout" />
</div>
<!-- 新增/编辑类目 -->
<add-dialog :add-visible="categoryVisible"
v-if="categoryVisible"
:category-info="categoryInfo"
@dialogClose="dialogClose" />
</div>
</template>
<script>
import { Util } from '@/common/util'
import addDialog from './components/addDialog'
import { getCategoryList_new, deleteGoodsCategory } from '@api/sceneCategory'
export default {
name: 'CategoryList',
data() {
return {
total: 0,
page: {
currentPage: 1,
pageSize: 10
},
layout: "sizes,total,->,prev,pager,next,jumper",
baseData: {
},
categoryVisible: false,
categoryInfo: {},
tableData: []
}
},
components: {
addDialog
},
mounted() {
this.getPageNew()
},
methods: {
beforeSearchFn() {
return new Promise(resolve => {
resolve()
})
},
keyDowmGetList() {
this.$refs.categoryListTable.refreshTable()
},
getPageNew() {
var params = this.page
getCategoryList_new(params).then((res) => {
this.tableData = res.list
this.total = res.total
if (this.tableData.length > 0) {
this.tableData = this.tableData.map(item => {
if (item.createdDate) {
item.createdDateStr = Util.dateFormate(item.createdDate, 'YYYY-MM-DD HH:mm:ss')
}
if (item.updatedDate) {
item.updatedDateStr = Util.dateFormate(item.updatedDate, 'YYYY-MM-DD HH:mm:ss')
}
item.systemCategoryStr = item.systemCategory == '1' ? '是' : '否'
return item
})
}
})
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.refreshTable()
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.refreshTable()
},
// 重置请求
refreshTable() {
this.getPageNew()
},
addCategory() {
this.categoryInfo = {}
this.categoryInfo.type = 'add'
this.categoryVisible = true
},
editCategory(row) {
this.categoryVisible = true
this.categoryInfo = row
this.categoryInfo.type = 'edit'
},
addChildCategory(row) {
this.categoryVisible = true
this.categoryInfo = row
this.categoryInfo.type = 'addChild'
},
dialogClose(flag) {
this.categoryVisible = !this.categoryVisible
if (flag) {
this.refreshTable()
}
},
// 删除
deleteCategory(row) {
console.log(row)
this.$confirm("<p>是否确定删除?</p>删除后即不可恢复。", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
dangerouslyUseHTMLString: true,
type: "warning"
})
.then(() => {
deleteGoodsCategory({ id: row.id }).then((res) => {
this.notice.okTips()
this.refreshTable()
})
})
.catch((err) => {
console.log(err)
})
}
}
}
</script>
<style scoped>
</style>
<!-- 新增/编辑类目 -->
<template>
<baseDialog :dialog-config="dialogConfig"
:is-show.sync="visible"
class="accountDailog"
@handleClick="handleAddConfirm">
<div class="add-dialog">
<glsx-combi-form class="edit-form-container"
ref="addFormRef"
label-width="150px"
default-width="400px"
:form-ref="editChildRef"
:form-obj="infoForm"
:form-data="editFormData"
:form-rules="formRules">
<div slot="parentCategoryHtml"
slot-scope="scope">
<el-cascader v-model="infoForm.parentId"
:options="baseData.parentCategory"
:props="cascader_props"
style="width: 400px"></el-cascader>
</div>
</glsx-combi-form>
</div>
</baseDialog>
</template>
<script>
import { addGoodsCategory_new, updateGoodsCategory, queryParent } from '@api/sceneCategory'
import { Util, deepClone } from '@/common/util'
export default {
name: 'AddDialog',
data() {
return {
infoForm: {
categoryName: '',
parentId: ''
},
dialogConfig: {
title: '新增类目',
width: '720px'
},
editChildRef: 'editChildRef',
formRules: {
categoryName: [{ required: true, message: '请填写类目名', trigger: 'blur' }]
},
editFormData: [{
label: '所属类目',
name: 'parentId',
isHide: true,
addHtml: 'parentCategoryHtml',
rules: [{ required: true, message: '请选择所属类目', trigger: 'change' }]
}, {
label: '类目名',
name: 'categoryName',
type: 'input',
maxlength: 20,
showLimit: true,
isClear: true
}],
baseData: {
// pointClassificationOpt: [],
parentCategory: []
},
cascader_props: {
checkStrictly: true,
children: 'children',
value: 'id',
label: 'categoryName'
}
}
},
props: {
addVisible: {
type: Boolean,
default: false
},
categoryInfo: {
type: Object,
default: () => { }
}
},
watch: {
},
computed: {
visible: {
get() {
return this.addVisible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal, attrName: 'addVisible' })
}
}
},
mounted() {
this.showTitle()
},
methods: {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find(k => k.name == refreshSigle)
var index = this[formName].findIndex(k => k.name == refreshSigle)
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (item.type === 'select' && this.baseData[item.optionsName].length) {
this.$set(this[formName][index], 'optionList', deepClone(this.baseData[item.optionsName]))
if (hasAll && this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this[formName][index].optionLabel] !== '全部') {
const temp = {}
temp[this[formName][index].optionId] = ''
temp[this[formName][index].optionLabel] = '全部'
this[formName][index].optionList.unshift(temp)
}
}
})
}
},
showTitle() {
console.log('this.categoryInfo', this.categoryInfo)
if (this.categoryInfo) {
if (this.categoryInfo.type == 'edit') {
this.dialogConfig.title = '编辑类目'
this.infoForm.categoryName = this.categoryInfo.categoryName
if (this.categoryInfo.level == 3) {
this.showOrHideAttr('editFormData', '所属类目', false)
this.queryParent()
}
} else if (this.categoryInfo.type == 'addChild') {
this.dialogConfig.title = '添加子类目'
}
}
},
queryParent() {
var params = {}
params.categoryType = this.categoryInfo.categoryType
params.level = 2
queryParent(params).then((res) => {
this.baseData.parentCategory.push(res)
this.infoForm.parentId = this.categoryInfo.parentId
// this.getOptionsList('editFormData', false)
})
},
showOrHideAttr(formName, label, isHide) {
const idx = this[formName].findIndex(item => item.label == label)
this[formName][idx].isHide = isHide
},
handleAddConfirm() {
this.$refs.addFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) {
let api = addGoodsCategory_new
// var params = deepClone(this.infoForm)
var params = {}
params.categoryName = this.infoForm.categoryName
if (this.categoryInfo.type == 'addChild') {
params.parentId = this.categoryInfo.id
} else if (this.categoryInfo.type == 'edit') {
params.id = this.categoryInfo.id
if (this.categoryInfo.level == 3) { // 编辑三级类目时需要传所属类目id
// return console.log(this.infoForm.parentId.length)
if (this.infoForm.parentId.length && this.infoForm.parentId.length > 0) {
params.parentId = this.infoForm.parentId.pop()
} else {
params.parentId = this.infoForm.parentId
}
}
api = updateGoodsCategory
}
api(params).then(res => {
this.notice.okTips('操作成功')
this.visible = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.add-dialog {
margin: 20px 0;
.reject-input {
::v-deep .el-textarea__inner {
height: 70px;
}
}
.el-textarea .el-input__count {
right: 90px;
bottom: -10px;
font-size: 12px;
color: #999999;
}
.tips {
color: #999999;
}
}
</style>
......@@ -19,7 +19,8 @@
<script>
import sceneList from './sceneList'
import categoryList from './categoryList'
// import categoryList from './categoryList'
import categoryList from './categoryList_new'
export default {
name: 'SceneCategoryIndex',
data() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!