Commit 7bab4e6b by 王琦琳

Merge branch 'dev_v4.35.0-0305' into 'dev_v4.35.1-0308'

上线合并

See merge request !268
2 parents 235cb94a 085ff142
...@@ -275,9 +275,9 @@ export default { ...@@ -275,9 +275,9 @@ export default {
4: "已支付", 4: "已支付",
// // 5: '已退款', // // 5: '已退款',
// 6: "已评价", // 6: "已评价",
9: "已撤销" 9: "已撤销",
// 10: "已关闭", // 10: "已关闭",
// 11: "错误订单", 11: "错误订单"
// 12: "已退款" // 12: "已退款"
// Y: "已升级", // Y: "已升级",
// N: "不升级" // N: "不升级"
...@@ -500,15 +500,15 @@ export default { ...@@ -500,15 +500,15 @@ export default {
{ {
confId: 9, confId: 9,
confLabel: "已撤销" confLabel: "已撤销"
} },
// { // {
// confId: 10, // confId: 10,
// confLabel: "已关闭" // confLabel: "已关闭"
// }, // },
// { {
// confId: 11, confId: 11,
// confLabel: "错误订单" confLabel: "错误订单"
// }, }
// { // {
// confId: 12, // confId: 12,
// confLabel: "已退款" // confLabel: "已退款"
...@@ -799,8 +799,9 @@ export default { ...@@ -799,8 +799,9 @@ export default {
subShopMerchantId: "", subShopMerchantId: "",
businessType: "" businessType: ""
} }
this.baseData.storeIdList = [] // this.baseData.storeIdList = []
this.handleSearch() this.handleSearch()
this.getAllServiceStore()
this.getOptionsList() this.getOptionsList()
}, },
getServiceStore(merchantId) { getServiceStore(merchantId) {
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<div class="itemCon"> <div class="itemCon">
<el-form-item label="选择门店" prop="merchantId" required> <el-form-item label="选择门店" prop="merchantId" required>
<el-select :remote-method="userRemoteMethod" v-model="storeConfigConObj.merchantId" remote reserve-keyword <el-select :remote-method="userRemoteMethod" v-model="storeConfigConObj.merchantId" remote reserve-keyword
@visible-change="visibleChange" :disabled="routerParams.idEdit == 'true' || routerForView" @visible-change="visibleChange"
:disabled="routerParams.idEdit == true || routerParams.idEdit == 'true' || routerForView"
style="width: 300px" width="300px" placeholder="请选择门店" v-el-select-loadmore="loadmore" filterable style="width: 300px" width="300px" placeholder="请选择门店" v-el-select-loadmore="loadmore" filterable
@change="restData"> @change="restData">
<el-option v-for="subItem in baseData.merchantList" :key="subItem.merchantId" :label="subItem.merchantName" <el-option v-for="subItem in baseData.merchantList" :key="subItem.merchantId" :label="subItem.merchantName"
...@@ -23,7 +24,7 @@ ...@@ -23,7 +24,7 @@
</el-select> --> </el-select> -->
</el-form-item> </el-form-item>
<el-form-item label="场景名称" prop="sceneType" required> <el-form-item label="场景名称" prop="sceneType" required>
<el-checkbox-group :disabled="routerParams.idEdit == 'true' || routerForView" <el-checkbox-group :disabled="routerParams.idEdit == true || routerParams.idEdit == 'true' || routerForView"
v-model="storeConfigConObj.sceneType" @change="restData"> v-model="storeConfigConObj.sceneType" @change="restData">
<el-checkbox false-label="null" :true-label="1" name="state">精品升级</el-checkbox> <el-checkbox false-label="null" :true-label="1" name="state">精品升级</el-checkbox>
<el-checkbox false-label="null" :true-label="0" name="state">会员权益/升级</el-checkbox> <el-checkbox false-label="null" :true-label="0" name="state">会员权益/升级</el-checkbox>
...@@ -86,11 +87,12 @@ ...@@ -86,11 +87,12 @@
scope.row.maxCarPrice scope.row.maxCarPrice
}}万 }}万
</div> </div>
<!-- ${subItem.carBrand}-${subItem.carChildsBrandName}- -->
<div v-if="scope.row.selectCarType == 2"> <div v-if="scope.row.selectCarType == 2">
车辆类型: 车辆类型:
<span v-for="(subItem, subIndex) in scope.row.carList" :key="subIndex">{{ <span v-for="(subItem, subIndex) in scope.row.carList" :key="subIndex">{{
`${subItem.carBrand}-${subItem.carChildsBrandName}-${subItem.carSeriesName}` `${subItem.carSeriesName}`
}}</span> }} <span v-if="subIndex < scope.row.carList.length - 1"> / </span></span>
</div> </div>
<!-- </div> --> <!-- </div> -->
<!-- {{ selectCarTypeObj[scope.row.selectCarType] }} --> <!-- {{ selectCarTypeObj[scope.row.selectCarType] }} -->
...@@ -101,17 +103,22 @@ ...@@ -101,17 +103,22 @@
{{ scope.row | goodsTypeFilter }} {{ scope.row | goodsTypeFilter }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="主推产品套餐" align="center"> <el-table-column label="主推产品套餐" align="center" width="180px">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <div v-for="(item, index) in scope.scope.taskList" :key="index"> --> <!-- <div v-for="(item, index) in scope.scope.taskList" :key="index"> -->
<div v-if="scope.row.selectPackageType == 0">无</div> <div v-if="scope.row.selectPackageType == 0">无</div>
<div v-if="scope.row.selectPackageType == 1 || <div v-if="scope.row.selectPackageType == 1">
scope.row.selectPackageType == 2 <div v-for="(subItem, subIndex) in scope.row.packageList" :key="subIndex"
"> style="padding: 0 3px;width: 180px;overflow: hidden; text-overflow: ellipsis;white-space: nowrap;">
<div v-for="(subItem, subIndex) in scope.row.packageList" :key="subIndex"> {{ subItem.upgradeGoodsName || subItem.goodsName }}
{{ subItem.upgradeGoodsName }}
</div> </div>
</div> </div>
<span v-if="scope.row.selectPackageType == 2">
<span v-for="(subItem, subIndex) in scope.row.packageList" :key="subIndex">
{{ subItem.upgradeGoodsName || subItem.goodsName }}
<span v-if="subIndex < scope.row.packageList.length - 1"> + </span>
</span>
</span>
<!-- </div> --> <!-- </div> -->
</template> </template>
</el-table-column> </el-table-column>
...@@ -234,33 +241,33 @@ const defaultPeriodItem = { ...@@ -234,33 +241,33 @@ const defaultPeriodItem = {
} }
const periodList = [ const periodList = [
{ {
checkMonth: "1", checkMonth: 1,
checkPeriod: "1", checkPeriod: 1,
taskList: [defaultPeriodItem] taskList: [defaultPeriodItem]
}, },
{ {
checkMonth: "1", checkMonth: 1,
checkPeriod: "2", checkPeriod: 2,
taskList: [defaultPeriodItem] taskList: [defaultPeriodItem]
}, },
{ {
checkMonth: "2", checkMonth: 2,
checkPeriod: "1", checkPeriod: 1,
taskList: [defaultPeriodItem] taskList: [defaultPeriodItem]
}, },
{ {
checkMonth: "2", checkMonth: 2,
checkPeriod: "2", checkPeriod: 2,
taskList: [defaultPeriodItem] taskList: [defaultPeriodItem]
}, },
{ {
checkMonth: "3", checkMonth: 3,
checkPeriod: "1", checkPeriod: 1,
taskList: [defaultPeriodItem] taskList: [defaultPeriodItem]
}, },
{ {
checkMonth: "3", checkMonth: 3,
checkPeriod: "2", checkPeriod: 2,
taskList: [defaultPeriodItem] taskList: [defaultPeriodItem]
} }
] ]
...@@ -432,6 +439,30 @@ export default { ...@@ -432,6 +439,30 @@ export default {
periodList periodList
}) })
this.getStaff() this.getStaff()
// 确定是否可以提交
this.checkMerchantRule()
},
checkMerchantRule() {
const { merchantId, sceneType } = this.storeConfigConObj
// console.log(
// merchantId && (sceneType === 0 || sceneType === 1),
// "sceneType"
// )
console.log(sceneType, "sceneType")
if (merchantId && (sceneType === 0 || sceneType === 1)) {
merchantTargetConfigDetail({ merchantId, sceneType })
.then((res) => {
console.log(res)
this.storeConfigConObj.canSubmit = Boolean(res)
if (res) {
return this.$message.warning("该园区店场景已配置过")
}
// this.getStaff()
})
.catch((err) => {
console.log(err)
})
}
}, },
saveDraft() { saveDraft() {
console.log("submitForm") console.log("submitForm")
...@@ -439,10 +470,16 @@ export default { ...@@ -439,10 +470,16 @@ export default {
if (!params.merchantId) { if (!params.merchantId) {
return this.$message.warning("请选择门店") return this.$message.warning("请选择门店")
} }
if (params.sceneType == null || params.sceneType == "") { // console.log(params.sceneType == null)
// console.log(params.sceneType == "")
if (![0, 1, '0', '1'].includes(params.sceneType)) {
return this.$message.warning("请选择场景") return this.$message.warning("请选择场景")
} }
if (params.canSubmit) {
return this.$message.warning("该园区店场景已配置过")
}
params.saveDraft = true params.saveDraft = true
params.edit = this.routerParams.idEdit == true || this.routerParams.idEdit == 'true'
merchantTargetConfigUpdate(params) merchantTargetConfigUpdate(params)
.then((res) => { .then((res) => {
console.log(res, "merchantTargetConfigUpdate") console.log(res, "merchantTargetConfigUpdate")
...@@ -537,8 +574,8 @@ export default { ...@@ -537,8 +574,8 @@ export default {
this.mode = "add" this.mode = "add"
this.editPeriodObj = { this.editPeriodObj = {
defaultFlag: "N", defaultFlag: "N",
checkMonth: "1", checkMonth: 1,
checkPeriod: "1", checkPeriod: 1,
selectCarType: 0, selectCarType: 0,
selectGoodsType: 0, selectGoodsType: 0,
selectPackageType: 0, selectPackageType: 0,
...@@ -566,6 +603,10 @@ export default { ...@@ -566,6 +603,10 @@ export default {
// params = params.map(item=>{ // params = params.map(item=>{
// }) // })
if (params.canSubmit) {
return this.$message.warning("该园区店场景已配置过")
}
params.edit = this.routerParams.idEdit == true || this.routerParams.idEdit == 'true'
merchantTargetConfigUpdate(params) merchantTargetConfigUpdate(params)
.then((res) => { .then((res) => {
console.log(res, "merchantTargetConfigUpdate") console.log(res, "merchantTargetConfigUpdate")
...@@ -592,7 +633,7 @@ export default { ...@@ -592,7 +633,7 @@ export default {
visibleChange(data) { visibleChange(data) {
// 获取焦点重新渲染下拉框数据 // 获取焦点重新渲染下拉框数据
if (data) { if (data) {
if ( this.queryParams.merchantName) { if (this.queryParams.merchantName) {
this.queryParams.merchantName = "" this.queryParams.merchantName = ""
this.queryParams.currentPage = 1 this.queryParams.currentPage = 1
this.baseData.merchantList = [] this.baseData.merchantList = []
...@@ -625,14 +666,14 @@ export default { ...@@ -625,14 +666,14 @@ export default {
console.log(res, "getMerchantList") console.log(res, "getMerchantList")
// this.baseData.merchantList = this.storeConfigConObj.merchantId ? this.baseData.merchantList.concat(res.list) : [...res.list, { merchantId: this.routerParams.merchantId, merchantName: this.routerParams.merchantName }] // this.baseData.merchantList = this.storeConfigConObj.merchantId ? this.baseData.merchantList.concat(res.list) : [...res.list, { merchantId: this.routerParams.merchantId, merchantName: this.routerParams.merchantName }]
// this.baseData.merchantList = this.storeConfigConObj.merchantId ? this.baseData.merchantList.concat(res.list) : [...res.list, { merchantId: this.routerParams.merchantId, merchantName: this.routerParams.merchantName }] // this.baseData.merchantList = this.storeConfigConObj.merchantId ? this.baseData.merchantList.concat(res.list) : [...res.list, { merchantId: this.routerParams.merchantId, merchantName: this.routerParams.merchantName }]
let list = deepClone(this.baseData.merchantList.concat(res.list)) const list = deepClone(this.baseData.merchantList.concat(res.list))
// this.storeConfigConObj.merchantId ? : [this.baseData.merchantList.concat(res.list) , ] // this.storeConfigConObj.merchantId ? : [this.baseData.merchantList.concat(res.list) , ]
let merchantObj = { const merchantObj = {
merchantId: Number(this.routerParams.merchantId), merchantId: Number(this.routerParams.merchantId),
merchantName: this.routerParams.merchantName merchantName: this.routerParams.merchantName
} }
const uniqueArrayObjects = arr => [...new Set(arr.map(JSON.stringify))].map(JSON.parse); const uniqueArrayObjects = arr => [...new Set(arr.map(JSON.stringify))].map(JSON.parse)
let filerList = uniqueArrayObjects([...list, merchantObj]) const filerList = uniqueArrayObjects([...list, merchantObj])
console.log(filerList, 'filerList') console.log(filerList, 'filerList')
this.baseData.merchantList = this.storeConfigConObj.merchantId this.baseData.merchantList = this.storeConfigConObj.merchantId
? filerList ? filerList
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
</el-form-item> </el-form-item>
<el-form-item label="周期" prop="checkPeriod" required> <el-form-item label="周期" prop="checkPeriod" required>
<el-radio-group :disabled="mode == 'edit'" v-model="periodItemForm.checkPeriod" @change="restData"> <el-radio-group :disabled="mode == 'edit'" v-model="periodItemForm.checkPeriod" @change="restData">
<el-radio :label="'1'">上半月</el-radio> <el-radio :label="1">上半月</el-radio>
<el-radio :label="'2'">下半月</el-radio> <el-radio :label="2">下半月</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="车主类型" prop="selectCarType" required> <el-form-item label="车主类型" prop="selectCarType" required>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="商品分类" prop="selectGoodsType" required> <el-form-item label="商品分类" prop="selectGoodsType" required>
<el-radio-group v-model="periodItemForm.selectGoodsType"> <el-radio-group v-model="periodItemForm.selectGoodsType" @change="restPackageList">
<el-radio :label="0">无</el-radio> <el-radio :label="0">无</el-radio>
<el-radio :label="1">选择分类</el-radio> <el-radio :label="1">选择分类</el-radio>
</el-radio-group> </el-radio-group>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<el-table v-if="periodItemForm.selectPackageType == 2" :data="periodItemForm.packageList" border stripe <el-table v-if="periodItemForm.selectPackageType == 2" :data="periodItemForm.packageList" border stripe
:header-cell-style="rowClass" style="width: 800px;"> :header-cell-style="rowClass" style="width: 800px;">
<el-table-column label="序号" type="index" align="center" width="50px" /> <el-table-column label="序号" type="index" align="center" width="50px" />
<el-table-column prop="goodsName" align="center" label="商品名称"></el-table-column> <el-table-column prop="upgradeGoodsName" align="center" label="商品名称"></el-table-column>
<el-table-column prop="thumbUrl" align="center" label="商品图"> <el-table-column prop="thumbUrl" align="center" label="商品图">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.thumbUrl" style="width: 50px; height: 50px" /> <img :src="scope.row.thumbUrl" style="width: 50px; height: 50px" />
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<el-table v-if="periodItemForm.selectPackageType == 1" :data="periodItemForm.packageList" border stripe <el-table v-if="periodItemForm.selectPackageType == 1" :data="periodItemForm.packageList" border stripe
:header-cell-style="rowClass" style="width: 750px;"> :header-cell-style="rowClass" style="width: 750px;">
<el-table-column label="序号" type="index" align="center" width="50px" /> <el-table-column label="序号" type="index" align="center" width="50px" />
<el-table-column prop="goodsName" align="center" label="商品名称"></el-table-column> <el-table-column prop="upgradeGoodsName" align="center" label="商品名称"></el-table-column>
<el-table-column prop="thumbUrl" align="center" label="商品图"> <el-table-column prop="thumbUrl" align="center" label="商品图">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.thumbUrl" style="width: 50px; height: 50px" /> <img :src="scope.row.thumbUrl" style="width: 50px; height: 50px" />
...@@ -262,15 +262,15 @@ export default { ...@@ -262,15 +262,15 @@ export default {
goodsDialogVisible: false, goodsDialogVisible: false,
baseData: { baseData: {
MonthList: [{ MonthList: [{
value: '1', value: 1,
label: '首月' label: '首月'
}, },
{ {
value: '2', value: 2,
label: '次月' label: '次月'
}, },
{ {
value: '3', value: 3,
label: '第三月' label: '第三月'
}] }]
}, },
...@@ -278,8 +278,8 @@ export default { ...@@ -278,8 +278,8 @@ export default {
// form: this.$form.createForm(this), // form: this.$form.createForm(this),
periodItemForm: { periodItemForm: {
defaultFlag: 'Y', defaultFlag: 'Y',
checkMonth: '1', checkMonth: 1,
checkPeriod: '1', checkPeriod: 1,
defaultFormValue defaultFormValue
// selectCarType: [], // selectCarType: [],
}, },
...@@ -290,7 +290,7 @@ export default { ...@@ -290,7 +290,7 @@ export default {
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
console.log(value, this.periodItemForm, "value") console.log(value, this.periodItemForm, "value")
if (value && (this.periodItemForm?.carList && this.periodItemForm?.carList.length == 0)) { if (value && value == 2 && (this.periodItemForm?.carList && this.periodItemForm?.carList.length == 0)) {
callback(new Error('请选择车辆类型')) callback(new Error('请选择车辆类型'))
} else { } else {
callback() callback()
...@@ -301,8 +301,9 @@ export default { ...@@ -301,8 +301,9 @@ export default {
], ],
selectGoodsType: [{ required: true, message: '请选择商品分类', trigger: 'change' }, { selectGoodsType: [{ required: true, message: '请选择商品分类', trigger: 'change' }, {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
console.log(this.periodItemForm?.goodsTypeList && this.periodItemForm?.goodsTypeList.length == 0)
console.log(value, this.periodItemForm, "value") console.log(value, this.periodItemForm, "value")
if (value && (this.periodItemForm?.goodsTypeList && this.periodItemForm?.goodsTypeList.length == 0)) { if (value && (!this.periodItemForm?.goodsTypeList || (this.periodItemForm?.goodsTypeList && this.periodItemForm?.goodsTypeList.length == 0))) {
callback(new Error('请选择商品分类')) callback(new Error('请选择商品分类'))
} else { } else {
callback() callback()
...@@ -375,6 +376,19 @@ export default { ...@@ -375,6 +376,19 @@ export default {
} }
}, },
methods: { methods: {
restPackageList() {
console.log(this.periodItemForm.selectGoodsType, 'this.periodItemForm.selectGoodsType')
if (this.periodItemForm.selectGoodsType == 1) {
this.periodItemForm = {
...this.periodItemForm,
packageList: [],
conversionRate: '',
conversionRatePercentage: '',
customerUnitPrice: '',
customerUnitPricePercentage: ''
}
}
},
handleConfirm(list) { handleConfirm(list) {
this.periodItemForm.carList = this.extractArrays(list).map(item => { this.periodItemForm.carList = this.extractArrays(list).map(item => {
item.carBrandId = item.rootId item.carBrandId = item.rootId
...@@ -519,6 +533,10 @@ export default { ...@@ -519,6 +533,10 @@ export default {
// this.periodItemForm.packageList = deepClone(list) // this.periodItemForm.packageList = deepClone(list)
} }
this.periodItemForm.packageList = deepClone(list) this.periodItemForm.packageList = deepClone(list)
this.$nextTick(() => {
console.log(this.periodItemForm.goodsTypeList, 'this.periodItemForm.goodsTypeList')
this.$refs.periodItem.validateField('selectPackageType')
})
}, },
handleAddConfirmSelectGoodsType(list) { handleAddConfirmSelectGoodsType(list) {
list.map(item => { list.map(item => {
...@@ -529,6 +547,7 @@ export default { ...@@ -529,6 +547,7 @@ export default {
}) })
this.periodItemForm.goodsTypeList = deepClone(list) this.periodItemForm.goodsTypeList = deepClone(list)
this.$nextTick(() => { this.$nextTick(() => {
this.restPackageList()
console.log(this.periodItemForm.goodsTypeList, 'this.periodItemForm.goodsTypeList') console.log(this.periodItemForm.goodsTypeList, 'this.periodItemForm.goodsTypeList')
this.$refs.periodItem.validateField('selectGoodsType') this.$refs.periodItem.validateField('selectGoodsType')
}) })
...@@ -559,9 +578,9 @@ export default { ...@@ -559,9 +578,9 @@ export default {
defaultFormValue defaultFormValue
} }
}, },
selectGoodsType() { // selectGoodsType() {
}, // },
// 设置表头的颜色 // 设置表头的颜色
rowClass({ row, rowIndex }) { rowClass({ row, rowIndex }) {
// console.log(rowIndex) // 表头行标号为0 // console.log(rowIndex) // 表头行标号为0
......
<template> <template>
<GLDialog <GLDialog title="选择车系" mode="mid" :visible.sync="dialogVisible" :before-close="handleClose"
title="选择车系" :close-on-click-modal="false" @onOk="handleConfirm" @onCancel="handleClose">
mode="mid"
:visible.sync="dialogVisible"
:before-close="handleClose"
:close-on-click-modal="false"
@onOk="handleConfirm"
@onCancel="handleClose">
<div class="search-wrap"> <div class="search-wrap">
<!-- <el-select clearable v-model="curbrandName" @change="changeFilterItem" filterable placeholder="请选择"> <!-- <el-select clearable v-model="curbrandName" @change="changeFilterItem" filterable placeholder="请选择">
<el-option <el-option
...@@ -16,72 +10,43 @@ ...@@ -16,72 +10,43 @@
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> --> </el-select> -->
<el-autocomplete <el-autocomplete clearable :debounce="1000" v-model="curbrandName" :fetch-suggestions="querySearchAsync"
clearable placeholder="请输入内容" @select="changeFilterItem">
:debounce="1000" </el-autocomplete>
v-model="curbrandName"
:fetch-suggestions="querySearchAsync"
placeholder="请输入内容"
@select="changeFilterItem">
</el-autocomplete>
</div> </div>
<div v-if="loading" class="loading-wrap"> <div v-if="loading" class="loading-wrap">
<img class="loading-img" :src="url" alt="" /> <img class="loading-img" :src="url" alt="" />
</div> </div>
<div class="car-container" v-else> <div class="car-container" v-else>
<div class="wrap"> <div class="wrap">
<div <div class="item son-brand-wrap" v-for="(item, index) in filterBrandList" :key="item.id">
class="item son-brand-wrap" <el-checkbox v-if="!singleChoice" :disabled="!(item.childs && item.childs.length)"
v-for="(item, index) in filterBrandList" :indeterminate="isIndeterminate(item, 1)" :value="isChecked(item, 1)"
:key="item.id">
<el-checkbox
v-if="!singleChoice"
:disabled="!(item.childs && item.childs.length)"
:indeterminate="isIndeterminate(item, 1)"
:value="isChecked(item, 1)"
@change="changeBrandStatus($event, item, index)"></el-checkbox> @change="changeBrandStatus($event, item, index)"></el-checkbox>
<span <span :class="[
:class="[ 'son-brand-label',
'son-brand-label', { curItem: curBrandInfo.id == item.id }
{ curItem: curBrandInfo.id == item.id } ]" @click="showSonBrandList(item)">
]"
@click="showSonBrandList(item)">
{{ item.name }} {{ item.name }}
<i <i v-if="item.childs && item.childs.length" class="el-icon-arrow-right"></i>
v-if="item.childs && item.childs.length"
class="el-icon-arrow-right"></i>
</span> </span>
</div> </div>
</div> </div>
<div class="wrap"> <div class="wrap">
<div <div class="item son-brand-wrap" v-for="(item, index) in sonBrandList" :key="item.id">
class="item son-brand-wrap" <el-checkbox :disabled="!(item.childs && item.childs.length)" :indeterminate="isIndeterminate(item, 2)"
v-for="(item, index) in sonBrandList" :value="isChecked(item, 2)" @change="changeSonBrandStatus($event, item, index)"></el-checkbox>
:key="item.id"> <span :class="[
<el-checkbox 'son-brand-label',
:disabled="!(item.childs && item.childs.length)" { curItem: curSonBrandInfo.id == item.id }
:indeterminate="isIndeterminate(item, 2)" ]" @click="showCarSeriesList(item)">
:value="isChecked(item, 2)"
@change="changeSonBrandStatus($event, item, index)"></el-checkbox>
<span
:class="[
'son-brand-label',
{ curItem: curSonBrandInfo.id == item.id }
]"
@click="showCarSeriesList(item)">
{{ item.name }} {{ item.name }}
<i <i v-if="item.childs && item.childs.length" class="el-icon-arrow-right"></i>
v-if="item.childs && item.childs.length"
class="el-icon-arrow-right"></i>
</span> </span>
</div> </div>
</div> </div>
<div class="wrap"> <div class="wrap">
<el-checkbox <el-checkbox class="item" v-for="item in carSeriesList" :key="item.id" :value="isChecked(item, '3')"
class="item"
v-for="item in carSeriesList"
:key="item.id"
:value="isChecked(item, '3')"
@change="changeCarSeriesStatus($event, item, index)">{{ item.name }}</el-checkbox> @change="changeCarSeriesStatus($event, item, index)">{{ item.name }}</el-checkbox>
</div> </div>
</div> </div>
...@@ -93,7 +58,7 @@ import url from "@/assets/loading.png" ...@@ -93,7 +58,7 @@ import url from "@/assets/loading.png"
// import { mapState, mapActions } from 'vuex' // import { mapState, mapActions } from 'vuex'
import { getCarBrandList } from "@api/commodity.js" import { getCarBrandList } from "@api/commodity.js"
export default { export default {
name: "SelectStore", name: "SelectCarDialog",
data() { data() {
return { return {
url, url,
...@@ -106,11 +71,12 @@ export default { ...@@ -106,11 +71,12 @@ export default {
} }
], ],
curbrandName: "", curbrandName: "",
// searchList: [], //搜索列表 searchList: [], // 搜索列表
filterBrandList: [], // 品牌数据 filterBrandList: [], // 品牌数据
sonBrandList: [], // 子品牌数据 sonBrandList: [], // 子品牌数据
carSeriesList: [], // 车系数据 carSeriesList: [], // 车系数据
selectdData: {}, // 已选的数据 selectdData: {}, // 已选的数据
carSeriesData: [],
curBrandInfo: { curBrandInfo: {
id: "", id: "",
name: "" name: ""
...@@ -157,6 +123,20 @@ export default { ...@@ -157,6 +123,20 @@ export default {
.then((res) => { .then((res) => {
console.log(res) console.log(res)
this.filterBrandList = res this.filterBrandList = res
this.carSeriesData = res
const payload = res
const list = []
payload?.forEach(item => {
list.push({ id: `${item.id}`, value: item.name })
item.childs?.forEach(ele => {
list.push({ id: `${item.id}-${ele.id}`, value: ele.name })
ele.childs?.forEach(o => {
list.push({ id: `${item.id}-${ele.id}-${o.id}`, value: o.name })
})
})
})
this.searchList = list
this.echoDataFn() this.echoDataFn()
}) })
.catch((err) => { .catch((err) => {
...@@ -165,14 +145,23 @@ export default { ...@@ -165,14 +145,23 @@ export default {
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
var restaurants = this.searchList var restaurants = this.searchList
// this.createStateFilter(queryString)
console.log(queryString, restaurants, 'queryString')
var results = queryString var results = queryString
? restaurants.filter(this.createStateFilter(queryString)) ? restaurants.filter(state => {
console.log(state, 'state')
return state.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
})
: [] : []
console.log(results, 'results')
if (!queryString) this.filterBrandList = this.carSeriesData if (!queryString) this.filterBrandList = this.carSeriesData
if (results?.length > 0) cb(results) if (results?.length > 0) cb(results)
}, },
createStateFilter(queryString) { createStateFilter(queryString) {
// console.log(queryString, 'queryString')
// debugger
return (state) => { return (state) => {
console.log(state, 'state')
return state.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1 return state.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1
} }
}, },
...@@ -462,7 +451,7 @@ export default { ...@@ -462,7 +451,7 @@ export default {
) { ) {
return ( return (
Object.keys(this.selectdData[this.curBrandInfo.id][id])?.length != Object.keys(this.selectdData[this.curBrandInfo.id][id])?.length !=
len && len &&
Object.keys(this.selectdData[this.curBrandInfo.id][id])?.length != 0 Object.keys(this.selectdData[this.curBrandInfo.id][id])?.length != 0
) )
} else { } else {
...@@ -504,6 +493,7 @@ export default { ...@@ -504,6 +493,7 @@ export default {
margin-bottom: 12px; margin-bottom: 12px;
.el-input { .el-input {
&, &,
.el-input__inner { .el-input__inner {
height: 36px; height: 36px;
......
...@@ -147,6 +147,7 @@ export default { ...@@ -147,6 +147,7 @@ export default {
// upgradeProductFlag: 'Y', // upgradeProductFlag: 'Y',
upradeFlag: 'Y', upradeFlag: 'Y',
...this.storeConfigConObjSearchObj, ...this.storeConfigConObjSearchObj,
merchantId: this.storeConfigConObjSearchObj.merchantIds[0],
upgradeGoodsName: this.upgradeGoodsName, upgradeGoodsName: this.upgradeGoodsName,
goodsTypeList, goodsTypeList,
currentPage: this.currentPage, currentPage: this.currentPage,
...@@ -160,7 +161,8 @@ export default { ...@@ -160,7 +161,8 @@ export default {
id: item.id, id: item.id,
goodsName: item.upgradeGoodsName, goodsName: item.upgradeGoodsName,
thumbUrl: item.goodsInfo?.thumbUrl, thumbUrl: item.goodsInfo?.thumbUrl,
sellPrice: item.sellPrice sellPrice: item.sellPrice,
upgradeGoodsName: item.upgradeGoodsName
// goodsInfo: item.goodsInfo // goodsInfo: item.goodsInfo
} }
// let goods ={ // let goods ={
......
...@@ -20,15 +20,20 @@ ...@@ -20,15 +20,20 @@
<div v-if="scope.scope.selectCarType == 0">无</div> <div v-if="scope.scope.selectCarType == 0">无</div>
<div v-if="scope.scope.selectCarType == 1">车辆价格:{{ scope.scope.minCarPrice }}-{{ scope.scope.maxCarPrice }}万</div> <div v-if="scope.scope.selectCarType == 1">车辆价格:{{ scope.scope.minCarPrice }}-{{ scope.scope.maxCarPrice }}万</div>
<div v-if="scope.scope.selectCarType == 2">车辆类型: <div v-if="scope.scope.selectCarType == 2">车辆类型:
<span v-for="(subItem, subIndex) in scope.scope.carList" :key="subIndex">{{ `${subItem.carBrand}-${subItem.carChildsBrandName}-${subItem.carSeriesName}` }}</span> <span v-for="(subItem, subIndex) in scope.scope.carList" :key="subIndex">{{ `${subItem.carSeriesName}` }}<span v-if="subIndex < scope.scope.carList.length - 1"> / </span></span>
</div> </div>
</template> </template>
<!-- 主推产品套餐 --> <!-- 主推产品套餐 -->
<template slot="selectPackageType" slot-scope="scope"> <template slot="selectPackageType" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div> <div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1 || scope.scope.selectPackageType == 2"> <!-- 单商品/多个商品 -->
<div v-if="scope.scope.selectPackageType == 1">
<div style="padding: 0 3px;width: 180px;overflow: hidden; text-overflow: ellipsis;white-space: nowrap;" v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}</div> <div style="padding: 0 3px;width: 180px;overflow: hidden; text-overflow: ellipsis;white-space: nowrap;" v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}</div>
</div> </div>
<!-- 商品组合 -->
<div v-if="scope.scope.selectPackageType == 2">
<span v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}<span v-if="subIndex < scope.scope.packageList.length - 1"> + </span></span>
</div>
</template> </template>
<!-- 目标转化率 --> <!-- 目标转化率 -->
<template slot="conversionRate" slot-scope="scope"> <template slot="conversionRate" slot-scope="scope">
......
...@@ -35,22 +35,27 @@ ...@@ -35,22 +35,27 @@
<div v-if="scope.scope.selectCarType == 0">无</div> <div v-if="scope.scope.selectCarType == 0">无</div>
<div v-if="scope.scope.selectCarType == 1">车辆价格:{{ scope.scope.minCarPrice }}-{{ scope.scope.maxCarPrice }}万</div> <div v-if="scope.scope.selectCarType == 1">车辆价格:{{ scope.scope.minCarPrice }}-{{ scope.scope.maxCarPrice }}万</div>
<div v-if="scope.scope.selectCarType == 2">车辆类型: <div v-if="scope.scope.selectCarType == 2">车辆类型:
<span v-for="(subItem, subIndex) in scope.scope.carList" :key="subIndex">{{ `${subItem.carBrand}-${subItem.carChildsBrandName}-${subItem.carSeriesName}` }}</span> <span v-for="(subItem, subIndex) in scope.scope.carList" :key="subIndex">{{ `${subItem.carSeriesName}` }}<span v-if="subIndex < scope.scope.carList.length - 1"> / </span></span>
</div> </div>
</template> </template>
<!-- 商品分类 --> <!-- 商品分类 -->
<template slot="selectGoodsType" slot-scope="scope"> <template slot="selectGoodsType" slot-scope="scope">
<div v-if="scope.scope.selectGoodsType == 0">无</div> <div v-if="scope.scope.selectGoodsType == 0">无</div>
<div v-if="scope.scope.selectGoodsType == 1"> <div v-if="scope.scope.selectGoodsType == 1">
<span v-for="(subItem, subIndex) in scope.scope.goodsTypeList" :key="subIndex">{{ subItem.goodsTypeName }}<span v-if="subIndex < scope.scope.goodsTypeList.length - 1">+</span></span> <span v-for="(subItem, subIndex) in scope.scope.goodsTypeList" :key="subIndex">{{ subItem.goodsTypeName }}<span v-if="subIndex < scope.scope.goodsTypeList.length - 1"> + </span></span>
</div> </div>
</template> </template>
<!-- 主推产品套餐 --> <!-- 主推产品套餐 -->
<template slot="selectPackageType" slot-scope="scope"> <template slot="selectPackageType" slot-scope="scope">
<div v-if="scope.scope.selectPackageType == 0">无</div> <div v-if="scope.scope.selectPackageType == 0">无</div>
<div v-if="scope.scope.selectPackageType == 1 || scope.scope.selectPackageType == 2"> <!-- 单商品/多个商品 -->
<div v-if="scope.scope.selectPackageType == 1">
<div style="padding: 0 3px;width: 180px;overflow: hidden; text-overflow: ellipsis;white-space: nowrap;" v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}</div> <div style="padding: 0 3px;width: 180px;overflow: hidden; text-overflow: ellipsis;white-space: nowrap;" v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}</div>
</div> </div>
<!-- 商品组合 -->
<div v-if="scope.scope.selectPackageType == 2">
<span v-for="(subItem, subIndex) in scope.scope.packageList" :key="subIndex">{{ subItem.upgradeGoodsName }}<span v-if="subIndex < scope.scope.packageList.length - 1"> + </span></span>
</div>
</template> </template>
<!-- 目标转化率 --> <!-- 目标转化率 -->
<template slot="conversionRate" slot-scope="scope"> <template slot="conversionRate" slot-scope="scope">
......
...@@ -96,7 +96,9 @@ export default { ...@@ -96,7 +96,9 @@ export default {
}, },
mounted() { mounted() {
this.shopMerchant = this.info.shopMerchantList[0].merchantId if (this.info.shopMerchantList) {
this.shopMerchant = this.info.shopMerchantList[0].merchantId
}
this.staffLabelDetail() this.staffLabelDetail()
}, },
......
...@@ -21,6 +21,9 @@ ...@@ -21,6 +21,9 @@
type="primary"> type="primary">
审核 审核
</el-button> </el-button>
<el-button @click="cacel">
取消
</el-button>
</div> </div>
</div> </div>
</d2-Container> </d2-Container>
...@@ -94,6 +97,10 @@ export default { ...@@ -94,6 +97,10 @@ export default {
console.log(err) console.log(err)
}) })
}, },
cacel() {
this.$router.go(-1)
}
}, },
components: { components: {
ledgerAccount, ledgerAccount,
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</span> </span>
<!-- 撤销 --> <!-- 撤销 -->
<span style="margin-right: 10px;" <span style="margin-right: 10px;"
v-if="scope.scope.auditStatus == 2 && isRevoke(scope.scope)"> v-if="scope.scope.auditStatus == 2 && scope.scope.enabledFlag == 'N'">
<auth-button :data="scope.scope" <auth-button :data="scope.scope"
:show-btn-ids="['9062403']" /> :show-btn-ids="['9062403']" />
</span> </span>
...@@ -157,12 +157,12 @@ export default { ...@@ -157,12 +157,12 @@ export default {
{ {
label: '生效开始时间', label: '生效开始时间',
prop: 'effectStartDate', prop: 'effectStartDate',
width: '150px', width: '160px',
formatter: (cellValue) => { formatter: (cellValue) => {
if (cellValue.effectDateType == 2) { if (cellValue.effectDateType == 2) {
return '立即生效' return '立即生效'
} else { } else {
return cellValue.effectStartDate ? Util.dateFormate(cellValue.effectStartDate, 'YYYY-MM-DD') : '--' return cellValue.effectStartDate ? Util.dateFormate(cellValue.effectStartDate, 'YYYY-MM-DD HH:mm:ss') : '--'
} }
} }
}, },
...@@ -181,21 +181,21 @@ export default { ...@@ -181,21 +181,21 @@ export default {
{ {
label: '创建时间', label: '创建时间',
prop: 'createdDate', prop: 'createdDate',
width: '150px', width: '160px',
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm') : '--' return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--'
} }
}, },
{ {
label: '审核人', label: '审核人',
prop: 'auditBy' prop: 'auditorName'
}, },
{ {
label: '审核时间', label: '审核时间',
prop: 'auditDate', prop: 'auditDate',
width: '150px', width: '160px',
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.auditDate ? Util.dateFormate(cellValue.auditDate, 'YYYY-MM-DD HH:mm') : '--' return cellValue.auditDate ? Util.dateFormate(cellValue.auditDate, 'YYYY-MM-DD HH:mm:ss') : '--'
} }
} }
] ]
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!