会员价及回收订单修改

version/0412
fanfan 9 months ago
parent 53b2d039fb
commit 518099de44
  1. 4
      pages.json
  2. 5
      pages/news/recycling/confirm1.vue
  3. 2
      pages/news/recycling/order.vue
  4. 78
      pages/news/recycling/recoveryList.vue
  5. 2
      pages/news/recycling/timer.vue
  6. 20
      pages/news3/components/category.vue
  7. 88
      pages/news3/vipPrice.vue
  8. 2
      pages/user/index.vue

@ -683,13 +683,13 @@
},{
"path": "recycling/recoveryList",
"style": {
"navigationBarTitleText": "我的订单",
"navigationBarTitleText": "回收订单",
"enablePullDownRefresh": false
}
},{
"path": "recycling/orderList",
"style": {
"navigationBarTitleText": "我的订单",
"navigationBarTitleText": "服务订单",
"enablePullDownRefresh": true
}
},{

@ -143,7 +143,7 @@
</view>
<view class="recycling-fd">
<view class="a">免支付预购</view>
<view class="b" @click="openPage(4)">提交订单</view>
<view class="b" @click="openPage(4)">{{source==2?'修改':'提交'}}订单</view>
</view>
<!-- 时间选择器 -->
<u-picker mode="time" :params="params" v-model="show" confirm-color="#FE483B" :show-time-tag="false"
@ -354,7 +354,6 @@
});
this.obj.image_ids = trList.join(',');
}
console.log(this.obj.image_ids)
if (this.tabIndex == 0) {
this.obj.recovery_type = 20
}
@ -463,7 +462,7 @@
},
onLook() {
uni.redirectTo({
url: "/pages/news/recycling/orderList"
url: "/pages/news/recycling/recoveryList"
})
},
}

@ -130,7 +130,7 @@
联系商家
</view>
<view class="b" @click="reservation">
立即预约
修改预约
</view>
</view>
<u-mask :show="isShow" @click="isShow = false">

@ -50,12 +50,16 @@
</view>
</view>
<view class="btnGroup">
<view class="btn info" v-if="item.is_cancel==1 && (item.order_status == 10)"
@click.stop="openPage(3,index,item)">修改订单</view>
<view class="btn info" v-if="item.is_cancel==1 && (item.order_status == 10)"
@click.stop="openPage(1,index,item)">取消订单</view>
<view class="btn info" v-if="item.order_status == 10" @click.stop="openPage(3,index,item)">修改订单
</view>
<view class="btn info" v-if="item.order_status == 10" @click.stop="openPage(1,index,item)">取消订单
</view>
<view class="btn info" v-if="item.is_success==1 && (item.order_status == 20)"
@click.stop="openPage(4,index,item)">完成</view>
<view class="btn info" v-if="item.order_status == 10&&userInfo.user_type == 40"
@click.stop="openPage(5,index,item)">验收</view>
<view class="btn info" v-if="item.order_status == 10&&userInfo.user_type !=40"
@click.stop="openPage(6,index,item)">确认收款</view>
</view>
</view>
</view>
@ -81,9 +85,11 @@
total: 1,
order_no: "",
pageNum: 1,
userInfo: ''
}
},
onLoad(o) {
this.userInfo = uni.getStorageSync('userInfo')
if (o.type) {
this.classifyShow = o.type
}
@ -143,6 +149,70 @@
}
})
}
//
if (i == 5) {
uni.showModal({
title: "温馨提示",
content: "是否验收该订单?",
confirmColor: "#F21A1C",
complete(res) {
if (res.confirm) {
that.toCheck(index, a.order_id);
}
}
})
}
//
if (i == 6) {
uni.showModal({
title: "温馨提示",
content: "是否确认收款?",
confirmColor: "#F21A1C",
complete(res) {
if (res.confirm) {
that.toCollection(index, a.order_id);
}
}
})
}
},
//
async toCheck(index, order_id) {
const {
status,
message,
data
} = await newFunApi.completeOrder({
order_id
});
if (status == 200) {
uni.showToast({
title: "验收成功"
})
this.classifyShow = 2
this.pageNum = 1;
this.goodsList = []
this.getOrderList(1)
}
},
//
async toCollection(index, order_id) {
const {
status,
message,
data
} = await newFunApi.completeOrder({
order_id
});
if (status == 200) {
uni.showToast({
title: "收款成功"
})
this.classifyShow = 2
this.pageNum = 1;
this.goodsList = []
this.getOrderList(1)
}
},
//
async toComplete(index, order_id) {

@ -54,7 +54,7 @@
} = await newFunApi.updateOrder(this.infor);
if (status == 200) {
uni.reLaunch({
url: "/pages/news/recycling/orderList"
url: "/pages/news/recycling/recoveryList"
})
}
},

@ -33,7 +33,7 @@
props: {
tabList: Array, //
activeIndex: Array,
categoryId: String || Number
categoryId: String || Number,
},
data() {
return {
@ -47,6 +47,9 @@
this.activeIndex = []
},
getShop(item, category_id) {
if (uni.getStorageSync('list').indexOf(category_id) > -1) {
return this.$toast('此分类已被设置规则')
}
let arrIndex = this.activeIndex.indexOf(category_id)
if (arrIndex > -1) {
this.activeIndex.splice(arrIndex, 1)
@ -57,18 +60,25 @@
},
submit() {
let idList = [];
let nameList = []
this.tabList.forEach(item => {
if (this.activeIndex.indexOf(item.category_id) > -1) {
idList.push(item.category_id);
nameList.push(item.name)
}
});
let storage = uni.getStorageSync('list') || []
if (storage.length > 0 && idList.length > 0) {
idList = this.getArrDifference(idList, storage)
}
this.$emit('getChoseCategory', {
category_id: idList.join(','),
category_name: nameList.length > 1 ? nameList.join(',') + '等' : nameList.join(',')
category_id: idList,
})
},
getArrDifference(arr1, arr2) {
return arr1.concat(arr2).filter(function(v, i, arr) {
return arr.indexOf(v) === arr.lastIndexOf(v);
});
}
}
}

@ -6,6 +6,16 @@
<text>利润空间(</text>
</view>
<view class="classifyContainer">
<view class="category">
<view class="rangeHandle" @click="addCatego(list.length)">
<view class="addFlag">+</view>
<text>新增分类模板</text>
</view>
<view class="rangeHandle" @click="delCatego('',1)" style="border-left:1px solid #E2E2E2;">
<view class="delBtn">-</view>
<text>删除分类模板</text>
</view>
</view>
<view class="classifyItem" v-for="(item,index_1) in list" :key="index_1">
<view class="classTitle">
<view class="category_box" @click="onCategory(item.category,index_1)">
@ -48,15 +58,8 @@
</view>
</view>
</view>
<view class="category">
<view class="rangeHandle" @click="addCatego(list.length)">
<view class="addFlag">+</view>
<text>新增分类模板</text>
</view>
<view class="rangeHandle" @click="delCatego('',1)" style="border-left:1px solid #E2E2E2;">
<view class="delBtn">-</view>
<text>删除分类模板</text>
</view>
<view class="ruleText" v-if="type==1">
备注利润低于_元的商品不展示在商城里
</view>
</view>
<view class="price-fd">
@ -69,7 +72,6 @@
</template>
<script>
category
import * as newFunApi from '@/api/newFun'
import setRange from './components/setRange.vue'
import category from './components/category.vue'
@ -115,14 +117,14 @@
return item === obj.category_id;
});
}).map(function(obj) {
return obj.name;
return obj.name + '等';
});
item_1.category_name = name.join(',')
item_1.price_list.forEach((item_2, index_2) => {
item_2.startProfit = (Number(item_2.min) * (Number(item_2
.add_price_rate) / 100)).toFixed(2);
item_2.endProfit = (Number(item_2.max) * (Number(item_2
.add_price_rate) / 100)).toFixed(2);
item_2.startProfit = Number((Number(item_2.min) * (Number(item_2
.add_price_rate) / 100)).toFixed(2));
item_2.endProfit = Number((Number(item_2.max) * (Number(item_2
.add_price_rate) / 100)).toFixed(2));
})
})
this.list = data.list
@ -302,30 +304,40 @@
},
//
onCategory(categoryId, index) {
let newId = []
this.categoryIndex = index;
this.activeIndex = [];
// let newId = []
// this.list.forEach((item, index) => {
// if (item.category) {
// newId.push(item.category.split(",").map(item => Number(item)))
// }
// })
// console.log(newId)
// this.activeIndex = newId
if (typeof categoryId == 'number') {} else {
let arr = categoryId.split(",")
this.activeIndex = arr.map(item => Number(item));
}
console.log(this.activeIndex)
// if (newId.length > 0) {
this.$refs.category.afterSale = true;
// }
this.list.forEach((item, index) => {
if (item.category) {
newId = newId.concat((item.category.split(",").map(item => Number(item))))
}
})
let list = Array.from(new Set(newId));
this.activeIndex = list
uni.setStorageSync('list', list)
this.$refs.category.afterSale = true;
},
//
getChoseCategory(res) {
let nameList = [];
let list = [];
console.log(this.list[this.categoryIndex].category, this.categoryIndex)
if (this.list[this.categoryIndex].category) {
list = this.list[this.categoryIndex].category.split(",").map(item => Number(item))
}
let newList = list.concat(res.category_id);
this.categoryList.forEach(item1 => {
newList.forEach(item2 => {
if (item1.category_id == item2) {
nameList.push(item1.name)
}
});
});
console.log(nameList, newList)
this.list[this.categoryIndex].category_name = nameList.join(',');
this.list[this.categoryIndex].category = newList.join(',')
this.$refs.category.afterSale = false;
this.list[this.categoryIndex].category_name = res.category_name;
this.list[this.categoryIndex].category = res.category_id
},
//
addCatego(index) {
@ -360,6 +372,16 @@
padding-bottom: 60upx;
}
.ruleText {
margin: 30rpx 50rpx;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #8B8B8B;
line-height: 32px;
}
::v-deep .uni-input-wrapper {
width: 180rpx !important;
text-align: center !important;

@ -267,7 +267,7 @@
<view class="text-group_21">
<text class="text_71"
v-if="orderTodoInfo.recovery_order.already_number">{{orderTodoInfo.recovery_order.already_number>=100?"99+":orderTodoInfo.recovery_order.already_number}}</text>
<text class="text_81">已验收</text>
<text class="text_81">{{userInfo.user_type == 40?'已验收':'已完成'}}</text>
</view>
</view>
<view class="image-text_21" @click="toRecovery(3)">

Loading…
Cancel
Save