Commit ad2a2501 by 前端

Merge branch 'dev_v4.35.0-0305' of http://192.168.3.233:8090/saas_plus/dj-car-li…

…fe-system into dev_v4.35.0-0305
2 parents ae67d6ba 8e1adb39
......@@ -10,7 +10,8 @@
<div class="itemCon">
<el-form-item label="选择门店" prop="merchantId" required>
<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
@change="restData">
<el-option v-for="subItem in baseData.merchantList" :key="subItem.merchantId" :label="subItem.merchantName"
......@@ -23,7 +24,7 @@
</el-select> -->
</el-form-item>
<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">
<el-checkbox false-label="null" :true-label="1" name="state">精品升级</el-checkbox>
<el-checkbox false-label="null" :true-label="0" name="state">会员权益/升级</el-checkbox>
......@@ -90,7 +91,7 @@
车辆类型:
<span v-for="(subItem, subIndex) in scope.row.carList" :key="subIndex">{{
`${subItem.carBrand}-${subItem.carChildsBrandName}-${subItem.carSeriesName}`
}}</span>
}} <span v-if="subIndex < scope.row.carList.length - 1"> / </span></span>
</div>
<!-- </div> -->
<!-- {{ selectCarTypeObj[scope.row.selectCarType] }} -->
......@@ -109,7 +110,7 @@
scope.row.selectPackageType == 2
">
<div v-for="(subItem, subIndex) in scope.row.packageList" :key="subIndex">
{{ subItem.upgradeGoodsName }}
{{ subItem.upgradeGoodsName || subItem.goodsName }}
</div>
</div>
<!-- </div> -->
......@@ -439,10 +440,13 @@ export default {
if (!params.merchantId) {
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("请选择场景")
}
params.saveDraft = true
params.edit = this.routerParams.idEdit == true || this.routerParams.idEdit == 'true'
merchantTargetConfigUpdate(params)
.then((res) => {
console.log(res, "merchantTargetConfigUpdate")
......@@ -566,6 +570,7 @@ export default {
// params = params.map(item=>{
// })
params.edit = this.routerParams.idEdit == true || this.routerParams.idEdit == 'true'
merchantTargetConfigUpdate(params)
.then((res) => {
console.log(res, "merchantTargetConfigUpdate")
......@@ -592,7 +597,7 @@ export default {
visibleChange(data) {
// 获取焦点重新渲染下拉框数据
if (data) {
if ( this.queryParams.merchantName) {
if (this.queryParams.merchantName) {
this.queryParams.merchantName = ""
this.queryParams.currentPage = 1
this.baseData.merchantList = []
......@@ -625,14 +630,14 @@ export default {
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 }]
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) , ]
let merchantObj = {
const merchantObj = {
merchantId: Number(this.routerParams.merchantId),
merchantName: this.routerParams.merchantName
}
const uniqueArrayObjects = arr => [...new Set(arr.map(JSON.stringify))].map(JSON.parse);
let filerList = uniqueArrayObjects([...list, merchantObj])
const uniqueArrayObjects = arr => [...new Set(arr.map(JSON.stringify))].map(JSON.parse)
const filerList = uniqueArrayObjects([...list, merchantObj])
console.log(filerList, 'filerList')
this.baseData.merchantList = this.storeConfigConObj.merchantId
? filerList
......
......@@ -290,7 +290,7 @@ export default {
{
validator: (rule, value, callback) => {
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('请选择车辆类型'))
} else {
callback()
......@@ -301,8 +301,9 @@ export default {
],
selectGoodsType: [{ required: true, message: '请选择商品分类', trigger: 'change' }, {
validator: (rule, value, callback) => {
console.log(this.periodItemForm?.goodsTypeList && this.periodItemForm?.goodsTypeList.length == 0)
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('请选择商品分类'))
} else {
callback()
......@@ -519,6 +520,10 @@ export default {
// 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) {
list.map(item => {
......@@ -559,9 +564,9 @@ export default {
defaultFormValue
}
},
selectGoodsType() {
// selectGoodsType() {
},
// },
// 设置表头的颜色
rowClass({ row, rowIndex }) {
// console.log(rowIndex) // 表头行标号为0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!