会员价 及回收时间报错

version/0412
fanfan 12 months ago
parent 11b1a6f85c
commit 752e0dc90c
  1. 4
      pages/news/recycling/order.vue
  2. 4
      pages/news/recycling/timer.vue
  3. 1
      pages/news3/components/category.vue
  4. 34
      pages/news3/vipPrice.vue

@ -189,8 +189,8 @@
methods: { methods: {
reservation() { reservation() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/news/recycling/timer?shop_id=" + this.infor.shop_id + "&infor=" + JSON.stringify( url: "/pages/news/recycling/timer?shop_id=" + this.infor.shop_id + "&infor=" + encodeURIComponent(JSON.stringify(
this.infor) this.infor))
}) })
}, },
copyOrderNumber(orderNumber) { copyOrderNumber(orderNumber) {

@ -35,7 +35,9 @@
} }
}, },
onLoad(op) { onLoad(op) {
this.infor = op.infor ? JSON.parse(op.infor) : '' if(op.infor){
this.infor = op.infor ? JSON.parse(decodeURIComponent(op.infor)) : ''
}
this.getstopTimes(op.shop_id) this.getstopTimes(op.shop_id)
}, },
methods: { methods: {

@ -69,7 +69,6 @@
if (storage.length > 0 && idList.length > 0) { if (storage.length > 0 && idList.length > 0) {
idList = this.getArrDifference(idList, storage) idList = this.getArrDifference(idList, storage)
} }
this.$emit('getChoseCategory', { this.$emit('getChoseCategory', {
category_id: idList, category_id: idList,
}) })

@ -89,7 +89,6 @@
list: [], list: [],
categoryList: '', categoryList: '',
type: '', type: '',
isEdit: false
} }
}, },
onLoad(op) { onLoad(op) {
@ -109,17 +108,17 @@
}); });
if (status == 200) { if (status == 200) {
if (data.list.length > 0) { if (data.list.length > 0) {
this.isEdit = true
data.list.forEach((item_1, index_1) => { data.list.forEach((item_1, index_1) => {
let arr = item_1.category.split(",").map(item => Number(item)) let arr = item_1.category.split(",").map(item => Number(item))
let name = this.categoryList.filter(function(obj) { let name = this.categoryList.filter(function(obj) {
return arr.some(function(item) { return item_1.category.split(",").map(item => Number(item)).some(
return item === obj.category_id; function(item) {
}); return item === obj.category_id;
});
}).map(function(obj) { }).map(function(obj) {
return obj.name + '等'; return obj.name
}); });
item_1.category_name = name.join(',') item_1.category_name = name.join(',') + (name.length > 0 ? '等' : '');
item_1.price_list.forEach((item_2, index_2) => { item_1.price_list.forEach((item_2, index_2) => {
item_2.startProfit = Number((Number(item_2.min) * (Number(item_2 item_2.startProfit = Number((Number(item_2.min) * (Number(item_2
.add_price_rate) / 100)).toFixed(2)); .add_price_rate) / 100)).toFixed(2));
@ -129,7 +128,7 @@
}) })
this.list = data.list this.list = data.list
} else { } else {
this.isEdit = false this.list = []
} }
} }
}, },
@ -206,23 +205,14 @@
delete item_1.startProfit delete item_1.startProfit
}) })
}) })
let url = ''
if (this.isEdit) {
url = newFunApi.editStore({
list: list,
type: this.type
})
} else {
url = newFunApi.setStorePrice({
list: list,
type: this.type
})
}
let { let {
status, status,
message, message,
data data
} = await url; } = await newFunApi.setStorePrice({
list: list,
type: this.type
});
if (status == 200) { if (status == 200) {
uni.showToast({ uni.showToast({
title: "保存成功" title: "保存成功"
@ -335,7 +325,7 @@
}); });
}); });
console.log(nameList, newList) console.log(nameList, newList)
this.list[this.categoryIndex].category_name = nameList.join(','); this.list[this.categoryIndex].category_name = nameList.join(',') +(nameList.length > 0 ? '等' : '');
this.list[this.categoryIndex].category = newList.join(',') this.list[this.categoryIndex].category = newList.join(',')
this.$refs.category.afterSale = false; this.$refs.category.afterSale = false;
}, },

Loading…
Cancel
Save