|
|
|
@ -45,7 +45,7 @@ const isBooking = computed(() => {
|
|
|
|
|
})
|
|
|
|
|
// 是否显示单位订单
|
|
|
|
|
const isShowUnit = computed(() => {
|
|
|
|
|
const flag = memberStore.profile?.clientType == 2 ? true : false
|
|
|
|
|
const flag = unitList.value.length ? true : false
|
|
|
|
|
return flag
|
|
|
|
|
})
|
|
|
|
|
const unitList = ref([])
|
|
|
|
@ -53,21 +53,6 @@ const unitIndex = ref(0)
|
|
|
|
|
const bindUnitPickerChange = (e: any) => {
|
|
|
|
|
unitIndex.value = e.detail.value
|
|
|
|
|
}
|
|
|
|
|
onLoad(async () => {
|
|
|
|
|
const categoryListStore = categoryStore.categoryVal
|
|
|
|
|
categoryList = Object.assign([], categoryListStore)
|
|
|
|
|
|
|
|
|
|
if (isShowUnit.value) {
|
|
|
|
|
const params = {
|
|
|
|
|
mobilePhone: memberStore.profile?.phone
|
|
|
|
|
}
|
|
|
|
|
const res = await getUnitListAPI(params)
|
|
|
|
|
unitList.value = res.data
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
onShow(() => {
|
|
|
|
|
init()
|
|
|
|
|
})
|
|
|
|
|
const init = async () => {
|
|
|
|
|
// 分类
|
|
|
|
|
const productCode = uni.getStorageSync('productCode')
|
|
|
|
@ -83,6 +68,16 @@ const init = async () => {
|
|
|
|
|
await getMemberAddressData()
|
|
|
|
|
// 获取默认地址的站点类目
|
|
|
|
|
await getNearbySite()
|
|
|
|
|
//当前用户负责的单位列表
|
|
|
|
|
await getUnitList()
|
|
|
|
|
}
|
|
|
|
|
// 判断是否是单位回收负责人
|
|
|
|
|
const getUnitList = async () => {
|
|
|
|
|
const params = {
|
|
|
|
|
mobilePhone: memberStore.profile?.phone
|
|
|
|
|
}
|
|
|
|
|
const res = await getUnitListAPI(params)
|
|
|
|
|
unitList.value = res.data
|
|
|
|
|
}
|
|
|
|
|
// 是否触发下拉刷新
|
|
|
|
|
const isTriggered = ref(false)
|
|
|
|
@ -171,6 +166,13 @@ const getMemberAddressData = async () => {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
onLoad(async () => {
|
|
|
|
|
const categoryListStore = categoryStore.categoryVal
|
|
|
|
|
categoryList = Object.assign([], categoryListStore)
|
|
|
|
|
})
|
|
|
|
|
onShow(() => {
|
|
|
|
|
init()
|
|
|
|
|
})
|
|
|
|
|
// 预估重量
|
|
|
|
|
const activeWeightKey = ref(0)
|
|
|
|
|
const handleWeightChange = (val) => {
|
|
|
|
@ -333,7 +335,7 @@ const handlePopClose = (item) => {
|
|
|
|
|
<switch color="#3775F6" :checked="isUnit" @change="switchUnitChange" style="transform:scale(0.7)" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="uni-list-cell" v-if="isUnit">
|
|
|
|
|
<view class="uni-list-cell-left">单位名称:</view>
|
|
|
|
|
<view class="uni-list-cell-left">单位名称</view>
|
|
|
|
|
<view class="uni-list-cell-db">
|
|
|
|
|
<picker @change="bindUnitPickerChange" :value="unitIndex" :range="unitList">
|
|
|
|
|
<view class="uni-input">{{ unitList[unitIndex] }}</view>
|
|
|
|
|