some features
This commit is contained in:
parent
eea5ef4b28
commit
6661b4dd3d
|
|
@ -1235,7 +1235,8 @@ button.cuIcon.lg {
|
|||
position: absolute;
|
||||
left: 146upx;
|
||||
width: calc(100% - 96upx - 60upx - 120upx - 20upx);
|
||||
line-height: 1.6em;
|
||||
/* line-height: 1.6em; */
|
||||
max-height: 128upx;
|
||||
}
|
||||
|
||||
.cu-list.menu-avatar>.cu-item .content.flex-sub {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import globalData from '@/common/js/globalData.js';
|
|||
|
||||
export default {
|
||||
// address: 'https://www.opsoul.com:8881',https://gmhl.opsoul.com
|
||||
address: 'https://gmhl.opsoul.com',
|
||||
// address: 'https://gmhl.opsoul.com',
|
||||
address: 'https://gmhl.gmjlb.com',
|
||||
// 异步接口拦截
|
||||
addInterceptor() {
|
||||
uni.addInterceptor('request', {
|
||||
|
|
@ -12,8 +13,8 @@ export default {
|
|||
title: '加载中'
|
||||
})
|
||||
// request 触发前拼接 url
|
||||
args.url = 'https://gmhl.opsoul.com' + args.url;
|
||||
// args.url = 'http://192.168.2.54:80' + args.url;
|
||||
// args.url = 'https://gmhl.opsoul.com' + args.url;
|
||||
args.url = 'https://gmhl.gmjlb.com' + args.url;
|
||||
// args.url = 'http://127.0.0.1:80' + args.url;
|
||||
if (args.data && Object.prototype && Object.prototype.toString.call(args.data) === '[object Object]') {
|
||||
args.data.deptId = globalData.deptId;
|
||||
|
|
@ -135,11 +136,20 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async login() {
|
||||
let userInfo = await wx.getUserProfile({
|
||||
desc: '用于小程序登录'
|
||||
});
|
||||
console.log(userInfo)
|
||||
async login(phoneNumber) {
|
||||
const _this = this;
|
||||
// uni.getUserInfo({
|
||||
// provider: 'weixin',
|
||||
// withCredentials: true,
|
||||
// lang: 'zh_CN',
|
||||
// success: async (obj) => {
|
||||
// console.log(obj);
|
||||
// }})
|
||||
// let userInfo = await wx.getUserProfile({
|
||||
// desc: '用于小程序登录'
|
||||
// });
|
||||
// console.log(userInfo)
|
||||
let userInfo;
|
||||
// 获取微信登录凭证
|
||||
const wxLoginRes = await wx.login();
|
||||
// 获取openid
|
||||
|
|
@ -157,9 +167,11 @@ export default {
|
|||
// 注册完成后再次从服务端获取用户信息
|
||||
let registerRes = await this.registerUser({
|
||||
openId: openId,
|
||||
name: userInfo.userInfo.nickName,
|
||||
customerLogoUrl: userInfo.userInfo.avatarUrl,
|
||||
status: 0
|
||||
name: "微信用户",
|
||||
customerLogoUrl: "https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132",
|
||||
status: 0,
|
||||
account: phoneNumber,
|
||||
phone: phoneNumber
|
||||
});
|
||||
if (registerRes.code === 0) {
|
||||
wxGetUserRes = await this.qryUserInfo(openId);
|
||||
|
|
@ -181,11 +193,12 @@ export default {
|
|||
return false;
|
||||
}
|
||||
// 页面存储用户登录有效信息,以便其他页面调用
|
||||
uni.setStorageSync('userProfile', userInfo);
|
||||
uni.setStorageSync('userProfile', userInfo);
|
||||
|
||||
return true;
|
||||
},
|
||||
async storageExistUser() {
|
||||
uni.clearStorageSync('userProfile');
|
||||
uni.setStorageSync('userProfile', {});
|
||||
// 获取微信登录凭证
|
||||
const wxLoginRes = await wx.login();
|
||||
// 获取openid
|
||||
|
|
@ -265,13 +278,14 @@ export default {
|
|||
})
|
||||
return false;
|
||||
}
|
||||
if (phoneRes && phoneRes.data) {
|
||||
let userInfo = this.getCurUserInfo();
|
||||
await this.updateUser({
|
||||
customerId: userInfo.customerId,
|
||||
account: phoneRes.data,
|
||||
phone: phoneRes.data
|
||||
})
|
||||
if (phoneRes && phoneRes.data) {
|
||||
await this.login(phoneRes.data)
|
||||
// let userInfo = this.getCurUserInfo();
|
||||
// await this.updateUser({
|
||||
// customerId: userInfo.customerId,
|
||||
// account: phoneRes.data,
|
||||
// phone: phoneRes.data
|
||||
// })
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
|
@ -305,6 +319,14 @@ export default {
|
|||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
},
|
||||
getChooseCategories(params = {}) {
|
||||
const res = uni.request({
|
||||
url: '/customer/selection/listNoPage',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res;
|
||||
},
|
||||
qryProductPage(params = {}) {
|
||||
return uni.request({
|
||||
|
|
@ -473,7 +495,7 @@ export default {
|
|||
},
|
||||
async qryFinancialDetail(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/financial/detail/app/list',
|
||||
url: '/financial/detail/app/listV2',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
|
|
@ -507,6 +529,14 @@ export default {
|
|||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async updateMasterAddress(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/master/updateMasterAddress',
|
||||
method: 'POST',
|
||||
data: params
|
||||
})
|
||||
return res[1].data;
|
||||
},
|
||||
async cancelMasterOrder(params = {}) {
|
||||
let res = await uni.request({
|
||||
url: '/order/master/cancel',
|
||||
|
|
|
|||
|
|
@ -114,12 +114,16 @@
|
|||
uni.$on('initValid', this.initValid)
|
||||
},
|
||||
mounted() {
|
||||
this.authLogin()
|
||||
// this.$refs.vertifyLogin.showModal();
|
||||
},
|
||||
methods: {
|
||||
initValid(initParam) {
|
||||
async initValid(initParam) {
|
||||
this.initParam = initParam
|
||||
this.$refs.validRef.loadData(initParam)
|
||||
if (initParam && initParam.distributor) {
|
||||
const res = await this.authLogin()
|
||||
this.$refs.validRef.loadData(initParam, res)
|
||||
}
|
||||
},
|
||||
goRouter(path) {
|
||||
uni.navigateTo({
|
||||
|
|
@ -151,26 +155,30 @@
|
|||
let curUserInfo = this.$request.getCurUserInfo();
|
||||
// 校验提示登录
|
||||
if (!curUserInfo || !curUserInfo.openId) {
|
||||
this.$refs.vertifyLogin.showModal();
|
||||
return false;
|
||||
} else {
|
||||
this.$refs.vertifyLogin.hideModal();
|
||||
}
|
||||
// 校验提示获取手机号码
|
||||
if (!curUserInfo.phone) {
|
||||
this.$refs.vertifyPhone.showModal();
|
||||
return false;
|
||||
} else {
|
||||
this.$refs.vertifyPhone.hideModal();
|
||||
}
|
||||
// 校验提示获取手机号码
|
||||
// if (!curUserInfo.phone) {
|
||||
// this.$refs.vertifyPhone.showModal();
|
||||
// return false;
|
||||
// } else {
|
||||
// this.$refs.vertifyPhone.hideModal();
|
||||
// }
|
||||
return true;
|
||||
},
|
||||
reloadForwardPage() {
|
||||
if(this.$refs.validRef.inByShare){
|
||||
this.$refs.validRef.loadData(this.initParam)
|
||||
} else {
|
||||
this.authLogin()
|
||||
async reloadForwardPage() {
|
||||
const res = await this.authLogin()
|
||||
if(res) {
|
||||
this.$refs.validRef.loadData(this.initParam, res)
|
||||
}
|
||||
// if(this.$refs.validRef.inByShare){
|
||||
// this.$refs.validRef.loadData(this.initParam)
|
||||
// } else {
|
||||
// this.authLogin()
|
||||
// }
|
||||
},
|
||||
},
|
||||
destroyed() {
|
||||
|
|
|
|||
|
|
@ -7,16 +7,21 @@
|
|||
<input @confirm="searchGoods" :adjust-position="true" type="text" placeholder="输入搜索内容"
|
||||
confirm-type="search"></input>
|
||||
</view>
|
||||
</view> -->
|
||||
</view> -->
|
||||
<!-- height 64rpx -->
|
||||
<view class="flex flex-wrap justify-center" style="padding-bottom: 6rpx;">
|
||||
<button class="cu-btn long-btn shadow bg-main-color" style="width: 200rpx;margin-left: 20rpx;" @click="chooseAll()">全选</button>
|
||||
<button class="cu-btn long-btn shadow bg-main-color light" style="width: 200rpx;margin-left: 20rpx;" @click="cancelAll()">取消全选</button>
|
||||
</view>
|
||||
<view class="VerticalBox" :style="'height:calc(' + containerHeight + ')'">
|
||||
<scroll-view class="VerticalNav nav">
|
||||
<scroll-view class="VerticalNav nav" scroll-y="true">
|
||||
<view class="cu-item" :class="index==tabCur?'text-main-color cur':''" v-for="(item,index) in list"
|
||||
:key="index" @tap="tabSelect" :data-index="index" :data-id="item.goodsCategoryId"
|
||||
:data-main-cur="item.child && item.child.length > 0 ? item.child[0].goodsCategoryId : -1">
|
||||
{{item.goodsCategoryName}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="VerticalMain">
|
||||
<scroll-view class="VerticalMain" scroll-y="true">
|
||||
<view class="padding-top padding-lr" v-for="(type, index1) in list[tabCur].child" :key="index1"
|
||||
:id="'main-'+type.goodsCategoryId">
|
||||
<view class="cu-bar bg-white bottom-border" @click="chooseNavItem(type)">
|
||||
|
|
@ -45,7 +50,7 @@
|
|||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default: []
|
||||
default: () => []
|
||||
},
|
||||
containerHeight: {
|
||||
type: String,
|
||||
|
|
@ -54,6 +59,10 @@
|
|||
isClick2ShowProducts: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
allLevel3CategoryIds: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
|
@ -66,8 +75,6 @@
|
|||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
},
|
||||
tabSelect(e) {
|
||||
this.tabCur = e.currentTarget.dataset.index;
|
||||
},
|
||||
|
|
@ -86,6 +93,18 @@
|
|||
clearChosenItem() {
|
||||
this.chosenCategoryIds = [];
|
||||
uni.$emit(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.chosenCategoryIds);
|
||||
},
|
||||
setChooseItems(arr) {
|
||||
this.chosenCategoryIds = [...arr]
|
||||
uni.$emit(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.chosenCategoryIds);
|
||||
},
|
||||
chooseAll() {
|
||||
this.chosenCategoryIds = [...this.allLevel3CategoryIds]
|
||||
uni.$emit(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.chosenCategoryIds);
|
||||
},
|
||||
cancelAll() {
|
||||
this.chosenCategoryIds = []
|
||||
uni.$emit(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.chosenCategoryIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -93,7 +112,8 @@
|
|||
|
||||
<style scoped>
|
||||
.VerticalNav.nav {
|
||||
width: 200upx;
|
||||
width: 200upx;
|
||||
height: 100%;
|
||||
white-space: initial;
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +150,8 @@
|
|||
|
||||
.VerticalMain {
|
||||
background-color: #f1f1f1;
|
||||
flex: 1;
|
||||
/* flex: 1; */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.cu-list>.cu-item {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<view class="cu-modal" :class="isShow?'show':''">
|
||||
<view class="cu-dialog">
|
||||
<view class="padding-xl">
|
||||
<view>授予小程序绑定手机号码的权限</view>
|
||||
<view>你需要授权手机号码绑定为登录账号</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<navigator class="modal-bottom-oper margin-0 flex-sub text-black solid-right" open-type="exit" target="miniProgram">拒绝授权
|
||||
|
|
@ -36,6 +36,7 @@
|
|||
this.isShow = false;
|
||||
},
|
||||
getPhoneNumber(e) {
|
||||
console.log(e.detail);
|
||||
this.$request.storagePhoneIntoUserInfo(e.detail.code).then(res => {
|
||||
if (res) {
|
||||
this.$emit('reload');
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@
|
|||
"path": "my-address"
|
||||
}, {
|
||||
"path": "edit-address"
|
||||
},{
|
||||
"path": "edit-service-address"
|
||||
}, {
|
||||
"path": "apply-operator"
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -24,18 +24,18 @@
|
|||
// this.loadData(option);
|
||||
// },
|
||||
methods: {
|
||||
async loadData(option) {
|
||||
async loadData(option, loginRes) {
|
||||
this.inParam = option;
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
// 更新分销人信息
|
||||
if (option && option.distributor) {
|
||||
let loginRes = await this.authLogin();
|
||||
if (!loginRes) {
|
||||
this.inByShare = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this.inByShare = false;
|
||||
console.log(this.curUserInfo);
|
||||
let res = await this.$request.updateUser({
|
||||
customerPlace: option.distributor,
|
||||
customerId: this.curUserInfo.customerId
|
||||
|
|
@ -62,34 +62,6 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
reloadForwardPage() {
|
||||
if (this.inByShare) {
|
||||
this.loadData(this.inParam);
|
||||
} else {
|
||||
this.getCurPageInfo({
|
||||
curPageCode: this.forwardingPageCode
|
||||
})
|
||||
}
|
||||
},
|
||||
async getCurPageInfo(data) {
|
||||
let pageCode = data.curPageCode;
|
||||
this.forwardingPageCode = pageCode;
|
||||
// 登录校验
|
||||
if (['publishPage', 'myPage'].indexOf(pageCode) >= 0) {
|
||||
let loginRes = await this.authLogin();
|
||||
if (!loginRes) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.forwardingPageCode = null;
|
||||
|
||||
if (pageCode === 'publishPage') {
|
||||
this.isShowPublish = true;
|
||||
} else {
|
||||
this.isShowPublish = false;
|
||||
this.curPageCode = pageCode;
|
||||
}
|
||||
},
|
||||
hidePublish() {
|
||||
this.isShowPublish = false;
|
||||
},
|
||||
|
|
@ -97,27 +69,6 @@
|
|||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
async authLogin() {
|
||||
// 更新缓存中的userInfo
|
||||
let res = await this.$request.storageExistUser();
|
||||
// 获取缓存中的userInfo
|
||||
let curUserInfo = this.$request.getCurUserInfo();
|
||||
// 校验提示登录
|
||||
if (!curUserInfo || !curUserInfo.openId) {
|
||||
this.$refs.vertifyLogin.showModal();
|
||||
return false;
|
||||
} else {
|
||||
this.$refs.vertifyLogin.hideModal();
|
||||
}
|
||||
// 校验提示获取手机号码
|
||||
if (!curUserInfo.phone) {
|
||||
this.$refs.vertifyPhone.showModal();
|
||||
return false;
|
||||
} else {
|
||||
this.$refs.vertifyPhone.hideModal();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<view class="cu-bar search bg-white">
|
||||
<view class="search-form round">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input @confirm="searchGoods" v-model="searchInfo.inputGoodsName" :adjust-position="true"
|
||||
<input @confirm="chooseCategory(null)" v-model="searchInfo.inputGoodsName" :adjust-position="true"
|
||||
type="text" placeholder="输入搜索内容" confirm-type="search"></input>
|
||||
</view>
|
||||
<!-- 区域筛选picker -->
|
||||
|
|
@ -184,10 +184,34 @@
|
|||
otherCityProductPageNum: 0,
|
||||
otherCityProductPageSize: 0,
|
||||
isShowPrivSetting: false,
|
||||
initParam: null
|
||||
initParam: null,
|
||||
goInfo: false,
|
||||
deptGoodsCategoryIds: []
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
if(option) {
|
||||
// 跳转逻辑
|
||||
if (option.menuCode) {
|
||||
if(option.menuCode == 'myPage') {
|
||||
setTimeout(() => {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/my-home'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (option.scene) {
|
||||
let paraStr = decodeURIComponent(option.scene);
|
||||
let kvStrArr = paraStr.split("&");
|
||||
kvStrArr.forEach((kvStr) => {
|
||||
let kvArr = kvStr.split("=");
|
||||
option[kvArr[0]] = kvArr[1];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.initParam = option
|
||||
uni.hideTabBar();
|
||||
},
|
||||
|
|
@ -203,6 +227,22 @@
|
|||
await this.getCurAreaArr();
|
||||
uni.$emit('initValid', this.initParam)
|
||||
},
|
||||
async onShow() {
|
||||
if((this.productList.length || this.otherCityProductList.length) && !this.goInfo) {
|
||||
this.reloadProductPage();
|
||||
}
|
||||
this.goInfo = false;
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
// if (this.initParam && this.initParam.distributor) {
|
||||
// let res = await this.$request.updateUser({
|
||||
// customerPlace: this.initParam.distributor,
|
||||
// customerId: this.curUserInfo.customerId
|
||||
// });
|
||||
// if (res && res.code === 0) {
|
||||
// this.initParam = null;
|
||||
// }
|
||||
// }
|
||||
},
|
||||
async onShareAppMessage(e) {
|
||||
let shareInfo = null;
|
||||
if (e && e.target && e.target.dataset) {
|
||||
|
|
@ -241,7 +281,18 @@
|
|||
let hotFittingsCategoryRes = await this.$request.getHotCategory({
|
||||
type: 2
|
||||
});
|
||||
this.hotFittingsCategory = hotFittingsCategoryRes.data;
|
||||
this.hotFittingsCategory = hotFittingsCategoryRes.data;
|
||||
|
||||
const deptGoodsCategoryIds = []
|
||||
if(this.curUserInfo) {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: 1,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
deptGoodsCategoryIds.push(...res[1].data.data)
|
||||
}
|
||||
this.deptGoodsCategoryIds = deptGoodsCategoryIds
|
||||
|
||||
// 加载品类
|
||||
this.loadCategoryList();
|
||||
// 加载当前定位城市的服务列表
|
||||
|
|
@ -254,7 +305,9 @@
|
|||
// this.subCategories = await this.$api.data('subCategories');
|
||||
this.moduleBarInfos = await this.$api.data('moduleBarInfos');
|
||||
// this.hotGoods = await this.$api.data('hotGoods');
|
||||
// this.discountGoods = await this.$api.data('discountGoods');
|
||||
// this.discountGoods = await this.$api.data('discountGoods');
|
||||
|
||||
|
||||
},
|
||||
// authCallback() {
|
||||
// this.$refs.validRef.loadData(this.initParam)
|
||||
|
|
@ -288,10 +341,21 @@
|
|||
this.isShowPrivSetting = true;
|
||||
} else {
|
||||
// 用户授权
|
||||
uni.showToast({
|
||||
title: '请确认是否开启定位',
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
// uni.showToast({
|
||||
// title: '请确认是否开启定位',
|
||||
// icon: 'none',
|
||||
// duration: 1500
|
||||
// })
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请确认是否开启定位',
|
||||
cancelText: '取消',
|
||||
confirmText: '重试',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.getCurAreaArr();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
@ -310,16 +374,38 @@
|
|||
fail: async (result) => {
|
||||
console.log(result)
|
||||
if (result.errCode === 2 || result.errCode === 404) {
|
||||
uni.showToast({
|
||||
title: '定位获取失败,请确认是否开启定位',
|
||||
icon: 'none',
|
||||
duration: 2500
|
||||
// uni.showToast({
|
||||
// title: '定位获取失败,请确认是否开启定位',
|
||||
// icon: 'none',
|
||||
// duration: 2500
|
||||
// })
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '定位获取失败,请确认是否开启定位',
|
||||
cancelText: '取消',
|
||||
confirmText: '重试',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.getCurAreaArr();
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '定位获取失败,请稍后重试',
|
||||
icon: 'none',
|
||||
duration: 2500
|
||||
// uni.showToast({
|
||||
// title: '定位获取失败,请稍后重试',
|
||||
// icon: 'none',
|
||||
// duration: 2500
|
||||
// })
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '定位获取失败,请稍后重试',
|
||||
cancelText: '取消',
|
||||
confirmText: '重试',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.getCurAreaArr();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
@ -476,21 +562,30 @@
|
|||
chooseCategory(item) {
|
||||
this.searchInfo.category = item;
|
||||
this.searchGoods();
|
||||
},
|
||||
searchGoods() {
|
||||
},
|
||||
|
||||
searchGoods() {
|
||||
let params = {
|
||||
category: this.searchInfo.category,
|
||||
area: this.searchInfo.area,
|
||||
inputGoodsName: this.searchInfo.inputGoodsName
|
||||
};
|
||||
inputGoodsName: this.searchInfo.category ? '' : this.searchInfo.inputGoodsName,
|
||||
showData: true
|
||||
};
|
||||
// if(!this.deptGoodsCategoryIds.includes(this.searchInfo.category)) {
|
||||
// params.showData = false
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/filtered-products?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
})
|
||||
},
|
||||
clickHotCategory(item) {
|
||||
let params = {
|
||||
category: item
|
||||
};
|
||||
category: item,
|
||||
showData: true
|
||||
};
|
||||
// if(!this.deptGoodsCategoryIds.includes(this.searchInfo.category)) {
|
||||
// params.showData = false
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/filtered-products?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
})
|
||||
|
|
@ -512,7 +607,8 @@
|
|||
showDetails(productItem) {
|
||||
let params = {
|
||||
goodsId: productItem.goodsId
|
||||
}
|
||||
}
|
||||
this.goInfo = true;
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/product-detail?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
});
|
||||
|
|
@ -531,7 +627,9 @@
|
|||
this.searchInfo.area.length && this.searchInfo.area[this.searchInfo.area.length - 1].isAll) {
|
||||
params.areaIds = this.searchInfo.area[this.searchInfo.area.length - 1].areaIds;
|
||||
params.areaId = null;
|
||||
}
|
||||
}
|
||||
|
||||
params.deptGoodsCategoryIds = this.deptGoodsCategoryIds;
|
||||
params.pageNum = this[pageNumName];
|
||||
params.pageSize = this[pageSizeName];
|
||||
params.status = 0;
|
||||
|
|
|
|||
|
|
@ -386,9 +386,9 @@
|
|||
onShow() {
|
||||
this.loadData();
|
||||
},
|
||||
onReady() {
|
||||
this.loadData();
|
||||
},
|
||||
// onReady() {
|
||||
// this.loadData();
|
||||
// },
|
||||
async onShareAppMessage(e) {
|
||||
let shareInfo = null;
|
||||
if (e && e.target && e.target.dataset) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
<view class="margin-left-sm flex-column-between text-beside-avatar">
|
||||
<view class="text-black text-xl">{{item.name}}</view>
|
||||
<view class="text-sm">
|
||||
<view>
|
||||
<view :class="isShowAllAreaCurCity[index] ? '' : 'certern-height'">
|
||||
<text class="margin-right-xs">服务技能:</text>
|
||||
<text>{{item.goodsCategories}}</text>
|
||||
</view>
|
||||
|
|
@ -51,9 +51,9 @@
|
|||
<text class="margin-right-xs">服务范围:</text>
|
||||
<text>{{item.workerAreas}}</text>
|
||||
</view>
|
||||
<view class="text-main-color bg-white padding-top-sm"
|
||||
<view v-if="item.workerAreas.length>55 || item.goodsCategories.length>55" class="text-main-color bg-white padding-top-sm"
|
||||
@click="showAllArea('CurCity', index)">
|
||||
<text>查看全部服务区域</text>
|
||||
<text>查看全部服务技能范围</text>
|
||||
<text :class="'cuIcon-' + (isShowAllAreaCurCity[index] ? 'fold' : 'unfold')"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -95,12 +95,12 @@
|
|||
<!-- 进店看看 -->
|
||||
<view class="flex justify-between align-end margin-top-xs">
|
||||
<view class="cu-capsule">
|
||||
<view class='cu-tag bg-main-color'>
|
||||
<!-- <view class='cu-tag bg-main-color'>
|
||||
<text class='cuIcon-shopfill'></text>
|
||||
</view>
|
||||
<view class="cu-tag line-main-color">
|
||||
{{item.deptName}}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="margin-right-sm text-black">{{item.shopName}}</view> -->
|
||||
<view class='cu-tag light bg-main-color radius' @click="showShopDetail(item)">进店看看<text
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
<view class="margin-left-sm flex-column-between text-beside-avatar">
|
||||
<view class="text-black text-xl">{{item.name}}</view>
|
||||
<view class="text-sm">
|
||||
<view>
|
||||
<view :class="item.showAllAreas ? '' : 'certern-height'">
|
||||
<text class="margin-right-xs">服务技能:</text>
|
||||
<text>{{item.goodsCategories}}</text>
|
||||
<!-- <text v-for="(skill, skillArrIndex) in item.goodsCategories"
|
||||
|
|
@ -147,9 +147,9 @@
|
|||
<text v-if="areaArrIndex !== item.workerAreas.length - 1">,</text>
|
||||
</text> -->
|
||||
</view>
|
||||
<view class="text-main-color bg-white padding-top-sm"
|
||||
<view v-if="item.workerAreas.length>55 || item.goodsCategories.length>55" class="text-main-color bg-white padding-top-sm"
|
||||
@click="showAllArea('OtherCity', index)">
|
||||
<text>查看全部服务区域</text>
|
||||
<text>查看全部服务技能范围</text>
|
||||
<text
|
||||
:class="'cuIcon-' + (item.showAllAreas ? 'fold' : 'unfold')"></text>
|
||||
</view>
|
||||
|
|
@ -192,12 +192,12 @@
|
|||
<!-- 进店看看 -->
|
||||
<view class="flex justify-between align-end margin-top-xs">
|
||||
<view class="cu-capsule">
|
||||
<view class='cu-tag bg-main-color'>
|
||||
<!-- <view class='cu-tag bg-main-color'>
|
||||
<text class='cuIcon-shopfill'></text>
|
||||
</view>
|
||||
<view class="cu-tag line-main-color">
|
||||
{{item.deptName}}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- <view class="margin-right-sm text-black">{{item.shopName}}</view> -->
|
||||
<view class='cu-tag light bg-main-color radius' @click="showShopDetail(item)">进店看看<text
|
||||
|
|
@ -621,7 +621,7 @@
|
|||
}
|
||||
|
||||
.certern-height {
|
||||
max-height: 200rpx;
|
||||
max-height: 100rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 顶部操作条 -->
|
||||
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">编辑地址</block>
|
||||
</cu-custom>
|
||||
<!-- 地址信息form -->
|
||||
<view class="bg-white margin-top-sm">
|
||||
<form @submit="submit">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">联系人</view>
|
||||
<input name="name" v-model="formData.name"></input>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">手机号码</view>
|
||||
<input name="phone" v-model="formData.phone"></input>
|
||||
</view>
|
||||
<!-- #ifndef H5 || APP-PLUS || MP-ALIPAY -->
|
||||
<view class="cu-form-group">
|
||||
<view class="title">地址选择</view>
|
||||
<picker :mode="'multiSelector'" @change="regionChange" @columnchange="regionColChange" :value="multiIndex" :range-key="'areaName'" :range="areaList">
|
||||
<view class="picker">
|
||||
{{formData.provinceName + '-' + formData.cityName + '-' + formData.countryName + '-' + formData.streetName}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view class="cu-form-group">
|
||||
<view class="title">详细地址</view>
|
||||
<input name="address" v-model="formData.address"></input>
|
||||
</view>
|
||||
<!-- 底部操作栏 -->
|
||||
<view class="cu-bar tabbar border shop fixed-bottom-bar">
|
||||
<button class="cu-btn bg-main-color long-btn margin-lr-sm shadow-blur" form-type="submit">保存</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
areaList: [],
|
||||
multiIndex: [0, 0, 0],
|
||||
formData: {
|
||||
},
|
||||
mode: 0 // 1为新增,0为修改
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let params = JSON.parse(decodeURIComponent(options.params));
|
||||
console.log(params);
|
||||
if (this.mode === 0) {
|
||||
// 修改
|
||||
this.fillForm(params);
|
||||
}
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
async loadData() {
|
||||
// this.areaList = await this.$api.data('areaList');
|
||||
this.loadAreaList();
|
||||
},
|
||||
fillForm(addressInfo) {
|
||||
this.formData = addressInfo && Object.keys(addressInfo).length > 0 ? addressInfo : this.formData;
|
||||
},
|
||||
async loadAreaList(idArr) {
|
||||
let areaList = await this.$request.areaListByStep();
|
||||
areaList = areaList.data;
|
||||
let col1Code = idArr ? idArr[0] : areaList[0].areaCode;
|
||||
let subAreaList = await this.$request.areaListByStep({ parentCode: col1Code });
|
||||
subAreaList = subAreaList.data;
|
||||
let col2Code = idArr ? idArr[1] : subAreaList[0].areaCode;
|
||||
let subSubAreaList = await this.$request.areaListByStep({ parentCode: col2Code });
|
||||
subSubAreaList = subSubAreaList.data;
|
||||
let col3Code = idArr ? idArr[2] : subSubAreaList[0].areaCode;
|
||||
let subSub2AreaList = await this.$request.areaListByStep({ parentCode: col3Code });
|
||||
subSub2AreaList = subSub2AreaList.data;
|
||||
this.areaList.push(areaList);
|
||||
this.areaList.push(subAreaList);
|
||||
this.areaList.push(subSubAreaList);
|
||||
this.areaList.push(subSub2AreaList);
|
||||
},
|
||||
regionChange(e) {
|
||||
this.multiIndex = e.detail.value;
|
||||
let chosenArea = [];
|
||||
for(let i = 0; i < this.areaList.length; i++) {
|
||||
chosenArea.push(this.areaList[i][this.multiIndex[i]]);
|
||||
}
|
||||
this.formData.area = chosenArea;
|
||||
this.formData.provinceId = chosenArea[0].areaId;
|
||||
this.formData.provinceName = chosenArea[0].areaName;
|
||||
this.formData.cityId = chosenArea[1].areaId;
|
||||
this.formData.cityName = chosenArea[1].areaName;
|
||||
this.formData.countryId = chosenArea[2].areaId;
|
||||
this.formData.countryName = chosenArea[2].areaName;
|
||||
this.formData.streetId = chosenArea[3].areaId;
|
||||
this.formData.streetName = chosenArea[3].areaName;
|
||||
uni.hideLoading()
|
||||
},
|
||||
async regionColChange(e) {
|
||||
let colObj = e.detail;
|
||||
if (colObj.column == 0) {
|
||||
let subSubAreaList = [], subSub2AreaList = [];
|
||||
// 通过一级查询二级,通过二级查三级
|
||||
let subAreaList = await this.$request.areaListByStep({parentCode: this.areaList[0][colObj.value].areaCode});
|
||||
subAreaList = subAreaList.data;
|
||||
if (subAreaList && subAreaList.length) {
|
||||
subSubAreaList = await this.$request.areaListByStep({parentCode: subAreaList[0].areaCode});
|
||||
subSubAreaList = subSubAreaList.data;
|
||||
if(subSubAreaList && subSubAreaList.length) {
|
||||
subSub2AreaList = await this.$request.areaListByStep({parentCode: subSubAreaList[0].areaCode});
|
||||
subSub2AreaList = subSub2AreaList.data;
|
||||
}
|
||||
}
|
||||
this.areaList[1] = subAreaList
|
||||
this.areaList[2] = subSubAreaList
|
||||
this.areaList[3] = subSub2AreaList
|
||||
this.multiIndex = [colObj.value, 0, 0, 0];
|
||||
} else if (colObj.column == 1) {
|
||||
let subSub2AreaList = []
|
||||
// 通过二级查三级
|
||||
let subSubAreaList = await this.$request.areaListByStep({parentCode: this.areaList[1][colObj.value].areaCode});
|
||||
subSubAreaList = subSubAreaList.data;
|
||||
if (subSubAreaList && subSubAreaList.length) {
|
||||
subSub2AreaList = await this.$request.areaListByStep({parentCode: subSubAreaList[0].areaCode});
|
||||
subSub2AreaList = subSub2AreaList.data;
|
||||
}
|
||||
this.areaList[2] = subSubAreaList
|
||||
this.areaList[3] = subSub2AreaList
|
||||
this.multiIndex = [this.multiIndex[0], colObj.value, 0, 0];
|
||||
} else if (colObj.column == 2) {
|
||||
// 通过二级查三级
|
||||
let subSubAreaList = await this.$request.areaListByStep({parentCode: this.areaList[2][colObj.value].areaCode});
|
||||
subSubAreaList = subSubAreaList.data;
|
||||
this.areaList[3] = subSubAreaList;
|
||||
this.multiIndex = [this.multiIndex[0], this.multiIndex[1], colObj.value, 0];
|
||||
}
|
||||
},
|
||||
validateForm(addressInfo) {
|
||||
let valid = Boolean(addressInfo.name) &&
|
||||
Boolean(addressInfo.phone) &&
|
||||
Boolean(addressInfo.address) &&
|
||||
Boolean(addressInfo.provinceName) &&
|
||||
Boolean(addressInfo.cityName) &&
|
||||
Boolean(addressInfo.countryName) &&
|
||||
Boolean(addressInfo.streetName)
|
||||
|
||||
if (!valid) {
|
||||
uni.showToast({
|
||||
title: '请填写完整信息',
|
||||
icon: 'none',
|
||||
mask: true
|
||||
})
|
||||
} else if (!this.$validate.validContactNum(addressInfo.phone)) {
|
||||
valid = false;
|
||||
uni.showToast({
|
||||
title: '联系号码格式错误',
|
||||
icon: 'none',
|
||||
mask: true
|
||||
})
|
||||
}
|
||||
return valid;
|
||||
},
|
||||
async submit(e) {
|
||||
const confirmFormData = Object.assign({}, this.formData, e.detail.value)
|
||||
let formValid = this.validateForm(confirmFormData);
|
||||
if (formValid) {
|
||||
uni.$emit(this.$globalFun.CHOOSE_ADDRESS, confirmFormData);
|
||||
uni.navigateBack({
|
||||
delta: -1
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
<block slot="content">地址列表</block>
|
||||
</cu-custom>
|
||||
<!-- 地址列表 -->
|
||||
<view class="margin-bottom-with-bar">
|
||||
<view class="margin-bottom-with-bar padding-tb-xl">
|
||||
<view class="padding margin-lr-sm margin-top-sm bg-white flex justify-between align-center" v-for="(item, index) in myAddressList" :key="index">
|
||||
<view @click="chooseAddress(item)">
|
||||
<view class="flex justify-start align-center">
|
||||
|
|
@ -59,7 +59,8 @@
|
|||
async loadData() {
|
||||
// this.myAddressList = await this.$api.data('myAddressList');
|
||||
let res = await this.$request.getAddressList({
|
||||
customerId: this.$request.getCurUserInfo().customerId
|
||||
customerId: this.$request.getCurUserInfo().customerId,
|
||||
isDelete: 0
|
||||
});
|
||||
this.myAddressList = res.data;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<block slot="backText">返回</block>
|
||||
<block slot="content">运营账单</block>
|
||||
</cu-custom>
|
||||
<view class="padding-tb bg-white solid-bottom">
|
||||
<!-- <view class="padding-tb bg-white solid-bottom">
|
||||
<view class="flex justify-between align-center margin-top-xs padding-left">
|
||||
<my-uni-combox class="flex-sub margin-right-xs" :candidates="billingStateList"
|
||||
:showField="'name'" placeholder="筛选账单状态" v-model="billingStateObj"
|
||||
|
|
@ -14,31 +14,41 @@
|
|||
<text class="cuIcon-search margin-right-sm" @click="searchBills"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<uni-collapse ref="collapse">
|
||||
<uni-collapse-item ref="collapseItem" :showArrow="false" v-for="(billItem, index) in bill" :key="index" :open="openStatusArr[index] === '0' ? true : false" >
|
||||
<template v-slot:title>
|
||||
<view class="padding bg-white" :data-index="index" @click="showStatement">
|
||||
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
|
||||
<view>
|
||||
<text><text>收入:</text><text class="text-price text-black">{{billItem.incomeCount}}</text></text>
|
||||
<view class="flex justify-between align-center">
|
||||
<view>
|
||||
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
|
||||
<view>
|
||||
<text><text>收入:</text><text class="text-price text-black">{{billItem.incomeCount}}</text></text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 200rpx;" @click.stop v-if="openStatusArr[index] === '0'">
|
||||
<my-uni-combox class="margin-right-xs" :candidates="billingStateList"
|
||||
:showField="'name'" placeholder="筛选" v-model="billingStateObj"
|
||||
@input="chooseBillingState($event)"></my-uni-combox>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view>
|
||||
<view v-for="(item, index1) in billItem.statement"
|
||||
<view v-if="billItem.statement">
|
||||
<view v-for="(item, index1) in billItem.statement.filter(i => filterCode.includes(i.orderStatus))"
|
||||
:key="index1"
|
||||
class="bg-white padding flex justify-between align-center solid-bottom" @click="showDetail(bill[index].statement[index1])">
|
||||
<view>
|
||||
<view class="flex">
|
||||
<view class="margin-right-sm">提现单号:{{item.code}}</view>
|
||||
<view class="text-gray">
|
||||
<view class="margin-bottom-xs" v-if="item.financialDetailType == 3">分销金额</view>
|
||||
</view>
|
||||
<view class="flex margin-bottom-sm">
|
||||
<view class="margin-right-sm">订单号:{{item.orderCode}}</view>
|
||||
</view>
|
||||
<view class="text-gray">{{item.createTime}}</view>
|
||||
</view>
|
||||
<view class="text-price text-black">{{item.payMoney}}</view>
|
||||
<view class="text-right">
|
||||
<view class="text-price text-black margin-bottom-sm">{{item.payMoney}}</view>
|
||||
<view class="text-black">{{item.orderStatusDesc}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
|
|
@ -59,8 +69,11 @@
|
|||
bill: [],
|
||||
curUserInfo: {},
|
||||
billingStateList: [{
|
||||
code: 0,
|
||||
name: '全部'
|
||||
},{
|
||||
code: 1,
|
||||
name: '待到帐'
|
||||
name: '待分帐'
|
||||
},{
|
||||
code: 6,
|
||||
name: '已取消'
|
||||
|
|
@ -68,6 +81,7 @@
|
|||
code: 5,
|
||||
name: '已到帐'
|
||||
}],
|
||||
filterCode: [0,1,2,3,4,5,6],
|
||||
billingStateObj: null
|
||||
}
|
||||
},
|
||||
|
|
@ -100,36 +114,47 @@
|
|||
},
|
||||
async showStatement(e) {
|
||||
let curIndex = e.currentTarget.dataset.index;
|
||||
console.log(this.openStatusArr, curIndex);
|
||||
// 1为缩起状态,0为展开状态
|
||||
if (this.openStatusArr[curIndex] == '1' && !this.bill[curIndex].statement) {
|
||||
let createTime = new Date(new Date(this.bill[curIndex].createTime).setHours(0));
|
||||
let createMonth = createTime.getMonth() + 1;
|
||||
let createYear = createTime.getFullYear();
|
||||
let finishYear = createMonth === 12 ? createYear + 1 : createYear;
|
||||
let finishMonth = createMonth === 12 ? 1 : createMonth + 1;
|
||||
|
||||
let createTimeStr = createYear + '-' + createMonth + '-1 00:00:00';
|
||||
let finishTimeStr = finishYear + '-' + finishMonth + '-1 00:00:00';
|
||||
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中'
|
||||
})
|
||||
let res = await this.$request.qryFinancialDetail({
|
||||
beginTime: createTimeStr,
|
||||
endTime: finishTimeStr,
|
||||
financialDetailTypes: [3],
|
||||
payeeId: this.curUserInfo.customerId
|
||||
});
|
||||
let newBill = this.bill.concat();
|
||||
newBill[curIndex].statement = res.rows;
|
||||
this.bill = newBill;
|
||||
if (this.openStatusArr[curIndex] == '1') {
|
||||
if(!this.bill[curIndex].statement) {
|
||||
let createTime = new Date(new Date(this.bill[curIndex].createTime).setHours(0));
|
||||
let createMonth = createTime.getMonth() + 1;
|
||||
let createYear = createTime.getFullYear();
|
||||
let finishYear = createMonth === 12 ? createYear + 1 : createYear;
|
||||
let finishMonth = createMonth === 12 ? 1 : createMonth + 1;
|
||||
|
||||
let createTimeStr = createYear + '-' + createMonth + '-1 00:00:00';
|
||||
let finishTimeStr = finishYear + '-' + finishMonth + '-1 00:00:00';
|
||||
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: '加载中'
|
||||
})
|
||||
let res = await this.$request.qryFinancialDetail({
|
||||
beginTime: createTimeStr,
|
||||
endTime: finishTimeStr,
|
||||
financialDetailTypes: [3],
|
||||
customerId: this.curUserInfo.customerId
|
||||
});
|
||||
let newBill = this.bill.concat();
|
||||
newBill[curIndex].statement = res.rows;
|
||||
this.bill = newBill;
|
||||
}
|
||||
for(let k = 0; k < this.openStatusArr.length; k++) {
|
||||
this.$set(this.openStatusArr, k, k === curIndex ? '0' : '1')
|
||||
}
|
||||
uni.hideLoading()
|
||||
// #ifdef MP
|
||||
this.$nextTick(() => {
|
||||
this.$refs.collapse.resize();
|
||||
uni.hideLoading();
|
||||
})
|
||||
// #endif
|
||||
} else {
|
||||
this.$set(this.openStatusArr, curIndex, '1')
|
||||
this.billingStateObj = null
|
||||
this.filterCode = [0,1,2,3,4,5,6]
|
||||
}
|
||||
},
|
||||
showDetail(item) {
|
||||
|
|
@ -138,12 +163,23 @@
|
|||
})
|
||||
},
|
||||
chooseBillingState(e) {
|
||||
console.log(e);
|
||||
this.billingStateObj = e;
|
||||
if(e.code === 0) {
|
||||
this.filterCode = [0,1,2,3,4,5,6]
|
||||
} else if(e.code === 1) {
|
||||
this.filterCode = [0,1,2,3,4]
|
||||
} else {
|
||||
this.filterCode = [e.code]
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.collapse.resize();
|
||||
})
|
||||
},
|
||||
searchBills() {
|
||||
this.qryBills({
|
||||
billingState: this.billingStateObj ? this.billingStateObj.code : null
|
||||
});
|
||||
// this.qryBills({
|
||||
// billingState: this.billingStateObj ? this.billingStateObj.code : null
|
||||
// });
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
</view>
|
||||
<!-- 团队人员统计 -->
|
||||
<view class="cu-list grid no-border col-4 solid-top margin-top-sm">
|
||||
<view class="cu-item" :class="index == 2 ? 'solid-left' : ''" v-for="(item, index) in myOperator.analyseItems" v-if="index < 4 && item.type === 'common'">
|
||||
<view class="cu-item" :class="index == 2 ? 'solid-left' : ''" v-for="(item, index) in myOperator.analyseItems" :key="index" v-if="index < 4 && item.type === 'common'">
|
||||
<view class="margin-bottom-xs">{{item.title}}</view>
|
||||
<view class="text-red" v-if="item.unit === 'yuan'">
|
||||
¥{{item.value}}
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
<!-- 团队订单统计 -->
|
||||
<view class="margin-lr-sm margin-top-sm padding bg-white margin-bottom-with-bar">
|
||||
<view class="cu-list grid no-border col-4">
|
||||
<view class="cu-item" v-for="(item, index) in myOperator.analyseItems" v-if="index >= 4 && item.type === 'dayAnalyse'">
|
||||
<view class="cu-item" v-for="(item, index) in myOperator.analyseItems" :key="index" v-if="index >= 4 && item.type === 'dayAnalyse'">
|
||||
<view class="margin-bottom-xs">{{item.title}}</view>
|
||||
<view class="text-red" v-if="item.unit === 'yuan'">
|
||||
¥{{item.value}}
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
{{item.value}}{{item.unit}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-item" v-for="(item, index) in myOperator.analyseItems" v-if="index >= 4 && item.type === 'common'">
|
||||
<view class="cu-item" v-for="(item, index) in myOperator.analyseItems" :key="index" v-if="index >= 4 && item.type === 'common'">
|
||||
<view class="margin-bottom-xs">{{item.title}}</view>
|
||||
<view class="text-red" v-if="item.unit === 'yuan'">
|
||||
¥{{item.value}}
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<!-- 操作栏 -->
|
||||
<view class="bg-white padding margin-top-sm fixed-bottom-bar">
|
||||
<view class="flex flex-wrap justify-between">
|
||||
<view class="basis-df margin-tb-sm" v-for="(item, index) in operBtn">
|
||||
<view class="basis-df margin-tb-sm" v-for="(item, index) in operBtn" :key="item.name">
|
||||
<button class="cu-btn long-btn shadow bg-main-color light" :data-cur="item.code"
|
||||
@click="doSomething">{{item.name}}</button>
|
||||
</view>
|
||||
|
|
@ -85,13 +85,19 @@
|
|||
</view>
|
||||
<view class="padding-xl">
|
||||
<view class="flex align-start margin-bottom-xl padding-lr">
|
||||
<view class="margin-right">选品广场:</view>
|
||||
<view class="margin-right">
|
||||
<view class="margin-bottom-sm">
|
||||
<view class="margin-right-sm">选品广场:</view>
|
||||
<view class="margin-right-sm">
|
||||
<!-- <view class="margin-bottom-sm">
|
||||
<text class="margin-right-xs">全选</text>
|
||||
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 1"
|
||||
@click="changeAgreeShield(1)">
|
||||
</checkbox>
|
||||
</view> -->
|
||||
<view class="margin-bottom-sm">
|
||||
<text class="margin-right-xs">正选</text>
|
||||
<checkbox style="transform:scale(0.9)" class="main-color" :value="agreeShield" :checked="agreeShield === 1"
|
||||
@click="changeAgreeShield(1)">
|
||||
</checkbox>
|
||||
</view>
|
||||
<view>
|
||||
<text class="margin-right-xs">反选</text>
|
||||
|
|
@ -102,13 +108,17 @@
|
|||
</view>
|
||||
<view class="text-left">
|
||||
<view>逐条选品</view>
|
||||
<view class="text-main-color" @tap="showModal('categoryModal')">去选品</view>
|
||||
<view>
|
||||
<text class="text-main-color" @tap="showModal('categoryModal')">去选品</text>
|
||||
<text v-if="chosenCategoryIds.length" style="color: red;font-size: 24upx;padding-left: 10upx;"> - 您已选品</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-top-lg text-left text-sm">
|
||||
<view class="margin-bottom-xs">全选:全部勾选供应链的服务及商品/运营代理所有类目</view>
|
||||
<view class="margin-bottom-xs">反选:把与我提供的服务和商品有冲突的区域范围不勾选</view>
|
||||
<view class="text-main-color">(注:你所提供的服务及类目以你同手机号上架或入驻为准)</view>
|
||||
<!-- <view class="margin-bottom-xs">全选:勾选后将运营代理所有供应链上的服务与商品,您的所有客户可见可选!</view> -->
|
||||
<view class="margin-bottom-xs">正选:进行对类目逐条勾选,已勾选的服务与商品,您的所有客户可见可选!</view>
|
||||
<view class="margin-bottom-xs">反选:所有人与我区域范围提供的服务和商品重叠的进行屏蔽!<text class="text-main-color">(注:需两端绑定的手机号一致)</text></view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
|
|
@ -120,11 +130,11 @@
|
|||
</view>
|
||||
<!-- 类目抽屉 -->
|
||||
<view class="DrawerClose" :class="modalName=='categoryModal'?'show':''" @tap="showModal('shieldSetModal')">
|
||||
<view class="cuIcon-roundcheckfill text-main-color"></view>
|
||||
<view class="cuIcon-roundclosefill"></view>
|
||||
<view class="cuIcon-roundcheckfill text-main-color" style="margin-top: 20upx;font-size: 70upx;"></view>
|
||||
<view class="cuIcon-roundclosefill" style="margin-top: 20upx;font-size: 70upx;"></view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="DrawerWindow bg-gray" :class="modalName=='categoryModal'?'show':''">
|
||||
<multiselect-vertical-nav ref="multiSelectNav" :list="categoryList" :containerHeight="'calc(100vh - 200rpx)'"></multiselect-vertical-nav>
|
||||
<multiselect-vertical-nav ref="multiSelectNav" :list="categoryList" :containerHeight="'calc(100vh - 270rpx)'" :allLevel3CategoryIds="allLevel3CategoryIds"></multiselect-vertical-nav>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -220,6 +230,10 @@
|
|||
},
|
||||
showModal(modalName) {
|
||||
this.modalName = modalName;
|
||||
// 获取已选择项
|
||||
if(modalName = 'shieldSetModal' && !this.chosenCategoryIds.length) {
|
||||
this.goChooseItem()
|
||||
}
|
||||
},
|
||||
hideModal() {
|
||||
this.modalName = null;
|
||||
|
|
@ -232,19 +246,26 @@
|
|||
uni.$off(this.$globalFun.VERTICAL_NAV_GET_ITEM);
|
||||
},
|
||||
doSomething(e) {
|
||||
const cur = e.currentTarget.dataset.cur;
|
||||
const cur = e.currentTarget.dataset.cur;
|
||||
let findItem, numberMember;
|
||||
switch (cur) {
|
||||
case 'ShieldSet':
|
||||
this.showModal('shieldSetModal')
|
||||
break;
|
||||
case 'showTeamMembers':
|
||||
findItem = this.myOperator.analyseItems.find(item => item.title === '团队')
|
||||
numberMember = findItem ? findItem.value : 0
|
||||
console.log(numberMember);
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/my-team-member?placeStatus=2'
|
||||
url: '/pages/my/my-team-member?placeStatus=2&number='+numberMember
|
||||
})
|
||||
break;
|
||||
case 'showCustomers':
|
||||
findItem = this.myOperator.analyseItems.find(item => item.title === '客户数')
|
||||
numberMember = findItem ? findItem.value : 0
|
||||
console.log(numberMember);
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/my-team-member'
|
||||
url: '/pages/my/my-team-member?number='+numberMember
|
||||
})
|
||||
case 'showMembers2Approval':
|
||||
uni.navigateTo({
|
||||
|
|
@ -254,19 +275,35 @@
|
|||
break;
|
||||
}
|
||||
},
|
||||
changeAgreeShield(agreeShield) {
|
||||
changeAgreeShield(agreeShield) {
|
||||
if(agreeShield === this.agreeShield) return
|
||||
this.agreeShield = agreeShield;
|
||||
this.$refs.multiSelectNav.clearChosenItem();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请重新进行逐条选品'
|
||||
})
|
||||
// this.$refs.multiSelectNav.clearChosenItem();
|
||||
this.goChooseItem()
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '请重新进行逐条选品'
|
||||
// })
|
||||
},
|
||||
tmpChooseCategory(chosenCategoryIds) {
|
||||
this.chosenCategoryIds = chosenCategoryIds;
|
||||
},
|
||||
},
|
||||
async goChooseItem() {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: this.agreeShield,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
console.log(res);
|
||||
if(res[1].data.data.length) {
|
||||
this.$refs.multiSelectNav.setChooseItems([...res[1].data.data])
|
||||
}
|
||||
// this.showModal('categoryModal')
|
||||
},
|
||||
|
||||
async confirmShield(e) {
|
||||
if (this.agreeShield === 2 && this.chosenCategoryIds.length === 0) {
|
||||
// console.log(this.agreeShield, this.chosenCategoryIds);
|
||||
// return
|
||||
if ((this.agreeShield === 2 || this.agreeShield === 1) && this.chosenCategoryIds.length === 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请至少选择一个类目'
|
||||
|
|
@ -274,14 +311,14 @@
|
|||
return;
|
||||
}
|
||||
let chosenCategoryIds = this.chosenCategoryIds;
|
||||
if (this.agreeShield === 1 && this.chosenCategoryIds.length === 0) {
|
||||
// 全选,带上所有的类目id
|
||||
chosenCategoryIds = this.allLevel3CategoryIds;
|
||||
}
|
||||
// if (this.agreeShield === 1 && this.chosenCategoryIds.length === 0) {
|
||||
// // 全选,带上所有的类目id
|
||||
// chosenCategoryIds = this.allLevel3CategoryIds;
|
||||
// }
|
||||
let res = await this.$request.addCustomerSelection({
|
||||
customerId: this.curUserInfo.customerId,
|
||||
deptCategoryIds: chosenCategoryIds,
|
||||
selectionType: this.agreeShield
|
||||
selectionType: this.agreeShield == 3 ? 1 : this.agreeShield
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
uni.showToast({
|
||||
|
|
|
|||
|
|
@ -80,6 +80,9 @@
|
|||
async loadData(option) {
|
||||
if (option && option.placeStatus != undefined) {
|
||||
this.placeStatus = option.placeStatus
|
||||
}
|
||||
if(option && option.number) {
|
||||
this.totalMembers = option.number
|
||||
}
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
this.resetData();
|
||||
|
|
@ -110,7 +113,7 @@
|
|||
let rowsLength = res.rows.length;
|
||||
if (rowsLength > 0) {
|
||||
this.members = this.members.concat(res.rows);
|
||||
this.totalMembers = res.total;
|
||||
// this.totalMembers = res.total;
|
||||
this.pageNum++;
|
||||
if (rowsLength === this.pageSize) {
|
||||
this.$refs.loadStatusBar.showLoadMore();
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<!-- 订单编码和时间 -->
|
||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
|
||||
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar padding-bottom-xl">
|
||||
<view>订单编码:{{servDetail.orderMasterCode}}</view>
|
||||
<view class="margin-top-xs">订单时间:{{servDetail.createTime}}</view>
|
||||
</view>
|
||||
|
|
@ -558,26 +558,63 @@
|
|||
}
|
||||
},
|
||||
showAddress2Choose() {
|
||||
const {provinceId,provinceName,cityId,cityName,countryId,countryName,address,name,streetId,streetName,phone} = this.servDetail
|
||||
let newAddr = address
|
||||
if(newAddr.indexOf(provinceName) > -1) {
|
||||
newAddr = newAddr.replace(provinceName, "")
|
||||
}
|
||||
if(newAddr.indexOf(cityName) > -1) {
|
||||
newAddr = newAddr.replace(cityName, "")
|
||||
}
|
||||
if(newAddr.indexOf(countryName) > -1) {
|
||||
newAddr = newAddr.replace(countryName, "")
|
||||
}
|
||||
if(newAddr.indexOf(streetName) > -1) {
|
||||
newAddr = newAddr.replace(streetName, "")
|
||||
}
|
||||
const addressInfo = {
|
||||
provinceId,
|
||||
provinceName,
|
||||
cityId,
|
||||
cityName,
|
||||
countryId,
|
||||
countryName,
|
||||
address: newAddr,
|
||||
streetId,
|
||||
streetName,
|
||||
phone,
|
||||
name
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/my-address?chooseMode=true'
|
||||
url: '/pages/my/edit-service-address?params=' + encodeURIComponent(JSON.stringify(addressInfo))
|
||||
})
|
||||
},
|
||||
editAddress(addressInfo) {
|
||||
async editAddress(addressInfo) {
|
||||
console.log(addressInfo)
|
||||
// let res = await this.$request.updateOrder({
|
||||
// id: order.orderMasterId,
|
||||
// orderStatus: status
|
||||
// });
|
||||
// if (res && res.code === 0) {
|
||||
// this.reload();
|
||||
// if (ifRollback) {
|
||||
// uni.showToast({
|
||||
// title: '订单已回滚至服务中状态,请联系师傅',
|
||||
// icon: 'none',
|
||||
// duration: 3000
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
const {provinceId,provinceName,cityId,cityName,countryId,countryName,address,name,streetId,streetName,phone} = addressInfo
|
||||
let res = await this.$request.updateMasterAddress({
|
||||
id: this.servDetail.orderMasterId,
|
||||
provinceId,
|
||||
provinceName,
|
||||
cityId,
|
||||
cityName,
|
||||
countryId,
|
||||
countryName,
|
||||
address,
|
||||
streetId,
|
||||
streetName,
|
||||
phone,
|
||||
name
|
||||
});
|
||||
if (res && res.code === 0) {
|
||||
this.loadData(this.order.orderMasterId);
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
icon: 'success',
|
||||
title: '修改成功'
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
makePhoneCall(phoneNum) {
|
||||
uni.makePhoneCall({
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
</view>
|
||||
<view class="padding-tb-lg">
|
||||
<view class="margin-bottom-sm">
|
||||
<text class="text-gray">当前状态:</text>
|
||||
<text>{{statementDesc.payStatus == 0 ? '未付款' : '已付款'}}</text>
|
||||
<text class="text-gray">订单支付:</text>
|
||||
<text>{{statementDesc.payStatusDesc}}</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
<text class="text-gray">详情说明:</text>
|
||||
|
|
@ -31,12 +31,12 @@
|
|||
</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
<text class="text-gray">提现单号:</text>
|
||||
<text v-if="statementDesc.code">{{statementDesc.code}}</text>
|
||||
<text class="text-gray">订单号码:</text>
|
||||
<text v-if="statementDesc.orderCode">{{statementDesc.orderCode}}</text>
|
||||
</view>
|
||||
<view class="margin-bottom-sm">
|
||||
<text class="text-gray">发起时间:</text>
|
||||
<text v-if="statementDesc.updateTime">{{statementDesc.updateTime}}</text>
|
||||
<text class="text-gray">利润支付:</text>
|
||||
<text v-if="statementDesc.payTime">{{statementDesc.payTime}}</text>
|
||||
</view>
|
||||
<!-- <view class="margin-bottom-sm">
|
||||
<text class="text-gray">订单编号:</text>
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
</view>
|
||||
<!-- 选购的商品列表 -->
|
||||
<view class="margin-lr-sm margin-top-sm bg-white">
|
||||
<view class="solid-top" v-for="(item, index0) in pickedProductList">
|
||||
<view class="solid-top" v-for="(item, index0) in pickedProductList" :key="index0">
|
||||
<view class="cu-bar">
|
||||
<view class="action bar-first-action">
|
||||
<text class="cuIcon-shopfill text-main-color"></text>
|
||||
|
|
@ -97,7 +97,29 @@
|
|||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="InsuranceList.length">
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding">
|
||||
<view class="text-black">
|
||||
<!-- insuranceAmount -->
|
||||
<text style="font-size: 40rpx;">保险</text> <text style="font-size: 26rpx;margin-left: 10upx;" v-if="chooseInsurance.insuranceAmount">核对服务费¥{{chooseInsurance.insuranceAmount}}(预付),未出发上门可退!</text>
|
||||
</view>
|
||||
<view class="text-black" style="font-size: 26rpx;padding-top: 10upx;">本订单勾选全程保险,请平台核对本单家政公司的雇主雇员与订单关联者按下方保险购买并生效:</view>
|
||||
<radio-group @change="changeInsurance" style="width: 100%;">
|
||||
<label v-for="item in InsuranceList" :key="item.id" class="radio" style="width: 100%;display: flex;justify-content: space-between;align-items: center;padding: 20upx 0;">
|
||||
<view>
|
||||
<radio class="main-color" :value="item.id" :checked="chooseInsurance.id == item.id" />
|
||||
<text class="margin-left-xs text-red">{{item.insuranceName}}</text>
|
||||
</view>
|
||||
<text class="text-main-color">条款查看</text>
|
||||
</label>
|
||||
</radio-group>
|
||||
<view style="text-align: right;padding: 10upx 0;">
|
||||
<view class="cu-tag light bg-blue radius" @click="chooseInsurance.id = null; chooseInsurance.insuranceAmount = 0;">清除保险</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 发票信息 -->
|
||||
<view class="margin-lr-sm margin-top-sm bg-white padding">
|
||||
<view class="flex justify-between align-center">
|
||||
|
|
@ -160,12 +182,14 @@
|
|||
doorTime: null,
|
||||
defaultAddress: null,
|
||||
expectTimeStart: '',
|
||||
expectTimeEnd: ''
|
||||
expectTimeEnd: '',
|
||||
},
|
||||
totalPrice: 0,
|
||||
timeRangeIndex: 0,
|
||||
timeRange: '',
|
||||
timeRangeList: []
|
||||
timeRangeList: [],
|
||||
InsuranceList: [],
|
||||
chooseInsurance: {id: null, insuranceAmount: 0}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -181,6 +205,13 @@
|
|||
this.loadDefaultAddress();
|
||||
// this.pickedProductList = await this.$api.data('pickedProductList');
|
||||
this.pickedProductList = params.pickedProductList;
|
||||
console.log(params);
|
||||
this.InsuranceList = params.pickedProductList[0].insuranceManagers || []
|
||||
if(this.InsuranceList.length) {
|
||||
this.chooseInsurance.id = this.InsuranceList[0].id;
|
||||
this.chooseInsurance.insuranceAmount = this.InsuranceList[0].insuranceAmount;
|
||||
}
|
||||
|
||||
this.loadTotalPrice();
|
||||
this.timeRangeList = this.$globalData.timeRangeList;
|
||||
this.timeRange = this.timeRangeList[0];
|
||||
|
|
@ -190,8 +221,12 @@
|
|||
customerId: this.$request.getCurUserInfo().customerId,
|
||||
isDefault: 1
|
||||
});
|
||||
// if (res && res.data &&res.data.length) {
|
||||
// this.formInfo.defaultAddress = res.data[0];
|
||||
// }
|
||||
if (res && res.data &&res.data.length) {
|
||||
this.formInfo.defaultAddress = res.data[0];
|
||||
const defaultAdd = res.data.filter(i => i.isDefault === 1)
|
||||
this.formInfo.defaultAddress = defaultAdd.length ? defaultAdd[0] : res.data[0];
|
||||
}
|
||||
},
|
||||
loadTotalPrice() {
|
||||
|
|
@ -211,6 +246,16 @@
|
|||
},
|
||||
changeIsNeedBill(e) {
|
||||
this.formInfo.isNeedBill = e.detail.value;
|
||||
},
|
||||
changeInsurance(e) {
|
||||
if(e.detail.value) {
|
||||
const current = this.InsuranceList.find(i => i.id == e.detail.value)
|
||||
this.chooseInsurance.id = current.id;
|
||||
this.chooseInsurance.insuranceAmount = current.insuranceAmount;
|
||||
} else {
|
||||
this.chooseInsurance.id = null;
|
||||
this.chooseInsurance.insuranceAmount = 0;
|
||||
}
|
||||
},
|
||||
inputComments(e) {
|
||||
this.formInfo.comments = e.detail.value
|
||||
|
|
@ -269,11 +314,42 @@
|
|||
}
|
||||
return true;
|
||||
},
|
||||
async submit() {
|
||||
// 检测当前默认地址是否在服务区域之间
|
||||
checkDefaultAddressIfInclude() {
|
||||
if(!this.formInfo.defaultAddress) return true
|
||||
const allAreaId = []
|
||||
this.pickedProductList.forEach(item => {
|
||||
item.product.forEach(pro => {
|
||||
allAreaId.push(...pro.goodsAreaList.map(i => i.countryAreaId))
|
||||
})
|
||||
})
|
||||
// console.log(allAreaId, this.formInfo.defaultAddress);
|
||||
// const allAreaId = this.shopInfo.workerAreas.map(i => i.districtId)
|
||||
return allAreaId.includes(this.formInfo.defaultAddress.countryId)
|
||||
},
|
||||
submit() {
|
||||
let valid = this.validForm();
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
if(!this.checkDefaultAddressIfInclude()) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '所选服务的区域与您所填地址的区域不匹配!可能会无法服务,请核对!',
|
||||
cancelText: '查看',
|
||||
confirmText: '仍然下单',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.makeOrderOpration()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.makeOrderOpration()
|
||||
}
|
||||
},
|
||||
async makeOrderOpration() {
|
||||
|
||||
let curUserInfo = this.$request.getCurUserInfo();
|
||||
let params = {
|
||||
customerId: curUserInfo.customerId,
|
||||
|
|
@ -284,7 +360,9 @@
|
|||
remark: this.formInfo.comments,
|
||||
isNeedBill: this.formInfo.isNeedBill,
|
||||
goodsList: this.parseGoodsList(),
|
||||
goodsId: this.pickedProductList[0].product[0].goodsId
|
||||
goodsId: this.pickedProductList[0].product[0].goodsId,
|
||||
// 保险id
|
||||
insuranceId: this.chooseInsurance.id
|
||||
// goodsList: [{
|
||||
// goodsId: 2,
|
||||
// num: 1
|
||||
|
|
|
|||
|
|
@ -79,10 +79,15 @@
|
|||
tabCur: 0
|
||||
}
|
||||
}
|
||||
uni.navigateTo({
|
||||
// url: '/pages/my/my-order?tabInfo=' + encodeURIComponent(JSON.stringify(params))
|
||||
url: '/pages/index/index?menuCode=myPage'
|
||||
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/home?menuCode=myPage'
|
||||
})
|
||||
|
||||
// uni.navigateTo({
|
||||
// // url: '/pages/my/my-order?tabInfo=' + encodeURIComponent(JSON.stringify(params))
|
||||
// url: '/pages/index/home?menuCode=myPage'
|
||||
// })
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,8 @@
|
|||
chosenArea: [],
|
||||
categoryList: [],
|
||||
categoryMultiIndex: [0, 0, 0],
|
||||
chosenCategory: []
|
||||
chosenCategory: [],
|
||||
isLoadLocalData: true
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
|
@ -188,6 +189,9 @@
|
|||
if (params.inputGoodsName) {
|
||||
this.inputGoodsName = params.inputGoodsName;
|
||||
}
|
||||
|
||||
this.isLoadLocalData = params.showData;
|
||||
|
||||
this.loadData();
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -201,7 +205,8 @@
|
|||
this.loadCategoryList(type);
|
||||
// 获取当前定位
|
||||
await this.getCurAreaArr();
|
||||
await this.loadRegionList();
|
||||
await this.loadRegionList();
|
||||
|
||||
this.loadProductData();
|
||||
this.loadOtherCityProductData();
|
||||
},
|
||||
|
|
@ -212,7 +217,12 @@
|
|||
this.taskConditions[0].value = this.chosenArea[this.chosenArea.length - 1].areaId;
|
||||
}
|
||||
},
|
||||
async loadProductData(params = {}) {
|
||||
async loadProductData(params = {}) {
|
||||
if(!this.isLoadLocalData) {
|
||||
this.loadMoreStatus = 'over bg-grey padding-tb text-lg'
|
||||
this.hasMoreData = false;
|
||||
return;
|
||||
}
|
||||
params.pageNum = this.pageNum;
|
||||
params.pageSize = this.pageSize;
|
||||
params.goodsName = this.inputGoodsName;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@
|
|||
return {
|
||||
containerHeight: '100vh - ' + this.CustomBar + 'px - 46px',
|
||||
level0CategoryList: [],
|
||||
categoryList: []
|
||||
categoryList: [],
|
||||
deptGoodsCategoryIds: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
|
@ -36,6 +37,16 @@
|
|||
level: 0
|
||||
});
|
||||
this.level0CategoryList = res0.data;
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
if(this.curUserInfo) {
|
||||
const res = await this.$request.getChooseCategories({
|
||||
selectionType: 1,
|
||||
customerId: this.curUserInfo.customerId
|
||||
})
|
||||
this.deptGoodsCategoryIds = res[1].data.data
|
||||
// this.deptGoodsCategoryIds = [16,234,106,113]
|
||||
// [16,234,106,113]
|
||||
}
|
||||
this.loadTargetTypeCategoryList(params, type);
|
||||
},
|
||||
async loadTargetTypeCategoryList(params = {}, type = 1) {
|
||||
|
|
@ -48,10 +59,34 @@
|
|||
res = res[1].data.data;
|
||||
res.forEach(firstCategory => {
|
||||
if (firstCategory.child && firstCategory.child.length) {
|
||||
this.categoryList = this.categoryList.concat(firstCategory.child)
|
||||
if(this.deptGoodsCategoryIds.length === 0) {
|
||||
this.categoryList = this.categoryList.concat(firstCategory.child)
|
||||
} else {
|
||||
this.categoryList = this.filterDataInSelect(firstCategory.child)
|
||||
console.log(this.categoryList);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
filterDataInSelect(data) {
|
||||
const newData = []
|
||||
for(let i = 0; i < data.length; i++) {
|
||||
const newChild = []
|
||||
if(!data[i].child) continue;
|
||||
for(let j = 0; j < data[i].child.length; j++) {
|
||||
const filterChild = (data[i].child[j].child || []).filter(item => this.deptGoodsCategoryIds.includes(item.goodsCategoryId))
|
||||
if(filterChild.length) {
|
||||
data[i].child[j].child = filterChild
|
||||
newChild.push(data[i].child[j])
|
||||
}
|
||||
}
|
||||
if(newChild.length) {
|
||||
data[i].child = newChild
|
||||
newData.push(data[i])
|
||||
}
|
||||
}
|
||||
return newData
|
||||
},
|
||||
bindEvent() {
|
||||
uni.$on(this.$globalFun.VERTICAL_NAV_GET_ITEM, this.chooseSubType);
|
||||
uni.$on(this.$globalFun.VERTICAL_NAV_SEARCH, this.searchType);
|
||||
|
|
|
|||
|
|
@ -153,8 +153,15 @@
|
|||
</view>
|
||||
<text class="margin-lr-xs text-sm">{{productDetail.remark}}</text>
|
||||
</view> -->
|
||||
<view class="solid-top text-lg padding-tb-sm">
|
||||
<text class="text-black">选择品类</text>
|
||||
<view class="solid-top text-lg padding-tb-sm">
|
||||
<view class='cu-tag light radius bg-orange padding-lr-xs' style="font-size: 0.9rem;" v-if="productDetail.deptGoodsCategoryName">
|
||||
<text v-if="productDetail.parGoodsCategoryName">
|
||||
{{productDetail.parGoodsCategoryName}}
|
||||
<text>/</text>
|
||||
</text>
|
||||
<text>{{productDetail.deptGoodsCategoryName}}</text>
|
||||
</view>
|
||||
<text class="text-black margin-left-sm" style="vertical-align: middle;">查看产品</text>
|
||||
</view>
|
||||
<view class="flex flex-wrap" :class="isShowAllSpecs ? '' : 'certern-height'">
|
||||
<view class="margin-tb-xs margin-right-xs" v-for="(item,index) in productDetail.goodsStandardList" :key="item.goodsStandardId">
|
||||
|
|
@ -163,7 +170,7 @@
|
|||
@click="chooseSpecs(item)">{{item.goodsStandardName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="text-bold text-gray text-lg text-center bg-white padding-top-sm" @click="showAllSpecs()"><text
|
||||
<view class="text-bold text-gray text-lg text-center bg-white padding-top-sm" @click="showAllSpecs()"><text v-if="!isShowAllSpecs">展开</text><text
|
||||
:class="'cuIcon-' + (isShowAllSpecs ? 'fold' : 'unfold')"></text></view>
|
||||
</view>
|
||||
<!-- 服务评价 -->
|
||||
|
|
@ -192,7 +199,7 @@
|
|||
<view id="pageAnchor2" class="margin-lr-sm margin-top-sm bg-white margin-bottom-with-bar ">
|
||||
<view class="text-center padding-xl">{{productDetail.remark}}</view>
|
||||
<view class="image">
|
||||
<image v-for="(item,index) in detailPicList" :src="item.imgUrl" mode="widthFix" style="width: 100%;"></image>
|
||||
<image v-for="(item,index) in detailPicList" :key="index" :src="item.imgUrl" mode="widthFix" style="width: 100%;"></image>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部操作条 -->
|
||||
|
|
@ -221,7 +228,7 @@
|
|||
购物车
|
||||
</view> -->
|
||||
<!-- <view class="bg-main-color light submit" @click="toggleProductPickModal">加入购物车</view> -->
|
||||
<view class="bg-main-color submit" @tap="checkLogin" @click="toggleProductPickModal($event, true)">立即订购</view>
|
||||
<view class="bg-main-color submit" @tap="checkLogin" @click="beforeCheckStatusThenOpen">立即订购</view>
|
||||
</view>
|
||||
<!-- 底部弹窗 -->
|
||||
<uni-popup ref="productPickPopup" type="bottom" @change="changePopupState">
|
||||
|
|
@ -265,14 +272,16 @@
|
|||
totalPickCount: 0,
|
||||
ifHasCsMsg: true,
|
||||
picUrls: [],
|
||||
curUserInfo: {}
|
||||
curUserInfo: {},
|
||||
defaultAddress: null
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
let params = JSON.parse(decodeURIComponent(options.params));
|
||||
this.inParam = params;
|
||||
this.loadData();
|
||||
this.bindEvent();
|
||||
this.bindEvent();
|
||||
this.loadDefaultAddress()
|
||||
},
|
||||
onUnload() {
|
||||
this.offBindEvent();
|
||||
|
|
@ -286,7 +295,8 @@
|
|||
},
|
||||
onShareAppMessage(e) {
|
||||
let params = {
|
||||
goodsId: this.inParam.goodsId
|
||||
goodsId: this.inParam.goodsId,
|
||||
distributor: this.curUserInfo.customerId
|
||||
}
|
||||
return {
|
||||
title: this.productDetail.goodsName,
|
||||
|
|
@ -296,7 +306,8 @@
|
|||
},
|
||||
onShareTimeline(e) {
|
||||
let params = {
|
||||
goodsId: this.inParam.goodsId
|
||||
goodsId: this.inParam.goodsId,
|
||||
distributor: this.curUserInfo.customerId
|
||||
}
|
||||
return {
|
||||
title: this.productDetail.goodsName,
|
||||
|
|
@ -307,33 +318,41 @@
|
|||
methods: {
|
||||
async loadData() {
|
||||
await this.$request.refreshCurUserCache();
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
let productDetailMock = await this.$api.data('productDetail');
|
||||
this.productDetail = await this.$request.getGoodsDetail({
|
||||
goodsId: this.inParam.goodsId
|
||||
});
|
||||
// 默认规格
|
||||
this.curProductSpecs = this.productDetail.goodsStandardList[0];
|
||||
// 轮播图
|
||||
this.swiperList = this.productDetail.goodsImgsMap["0"];
|
||||
// 详情图
|
||||
this.detailPicList = this.productDetail.goodsImgsMap["1"];
|
||||
// 用于点击放大查看图片
|
||||
this.swiperList.forEach((picItem) => {
|
||||
this.picUrls.push(picItem.imgUrl);
|
||||
})
|
||||
this.detailPicList.forEach((picItem) => {
|
||||
this.picUrls.push(picItem.imgUrl);
|
||||
})
|
||||
let res = await this.$request.getWorkerAllDetailById({
|
||||
workerId: this.productDetail.workerId
|
||||
})
|
||||
this.shopInfo = res.data;
|
||||
|
||||
this.guaranteeList = productDetailMock.guaranteeList;
|
||||
this.productInfo = productDetailMock.productInfo;
|
||||
this.reviewers = productDetailMock.reviewers;
|
||||
// this.shopInfo = productDetailMock.shopInfo;
|
||||
this.curUserInfo = this.$request.getCurUserInfo();
|
||||
if(this.curUserInfo) {
|
||||
let productDetailMock = await this.$api.data('productDetail');
|
||||
this.productDetail = await this.$request.getGoodsDetail({
|
||||
goodsId: this.inParam.goodsId
|
||||
});
|
||||
// 默认规格
|
||||
this.curProductSpecs = this.productDetail.goodsStandardList[0];
|
||||
// 轮播图
|
||||
this.swiperList = this.productDetail.goodsImgsMap["0"];
|
||||
// 详情图
|
||||
this.detailPicList = this.productDetail.goodsImgsMap["1"];
|
||||
// 用于点击放大查看图片
|
||||
this.swiperList.forEach((picItem) => {
|
||||
this.picUrls.push(picItem.imgUrl);
|
||||
})
|
||||
this.detailPicList.forEach((picItem) => {
|
||||
this.picUrls.push(picItem.imgUrl);
|
||||
})
|
||||
let res = await this.$request.getWorkerAllDetailById({
|
||||
workerId: this.productDetail.workerId
|
||||
})
|
||||
this.shopInfo = res.data;
|
||||
|
||||
this.guaranteeList = productDetailMock.guaranteeList;
|
||||
this.productInfo = productDetailMock.productInfo;
|
||||
this.reviewers = productDetailMock.reviewers;
|
||||
// this.shopInfo = productDetailMock.shopInfo;
|
||||
if(this.inParam.distributor) {
|
||||
await this.$request.updateUser({
|
||||
customerPlace: this.inParam.distributor,
|
||||
customerId: this.curUserInfo.customerId
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async checkLogin() {
|
||||
let loginRes = await this.authLogin();
|
||||
|
|
@ -412,6 +431,107 @@
|
|||
uni.pageScrollTo({
|
||||
selector: '#pageAnchor' + index
|
||||
})
|
||||
},
|
||||
async loadDefaultAddress() {
|
||||
let res = await this.$request.getAddressList({
|
||||
customerId: this.$request.getCurUserInfo().customerId,
|
||||
isDefault: 1
|
||||
});
|
||||
if (res && res.data &&res.data.length) {
|
||||
const defaultAdd = res.data.filter(i => i.isDefault === 1)
|
||||
this.defaultAddress = defaultAdd.length ? defaultAdd[0] : res.data[0];
|
||||
}
|
||||
},
|
||||
// 检测当前默认地址是否在服务区域之间
|
||||
checkDefaultAddressIfInclude() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const allAreaId = this.productDetail.goodsAreaList.map(i => i.countryAreaId)
|
||||
const status = allAreaId.includes(this.defaultAddress.countryId)
|
||||
console.log('checkDefaultAddressIfInclude == ', status)
|
||||
if(!status) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '产品页面的【服务区域】与您默认的地址不匹配,如未选错产品,请提交后改新地址!',
|
||||
cancelText: '返回查看',
|
||||
confirmText: '继续下单',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
resolve(true)
|
||||
} else {
|
||||
resolve(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
resolve(true)
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
async checkCurAreaIncludeServiceAreas() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let curLocation = uni.getStorageSync('curLocation');
|
||||
if(!curLocation) resolve(true)
|
||||
const curAreaId = curLocation.area[curLocation.area.length - 1].areaId
|
||||
const allAreaId = this.productDetail.goodsAreaList.map(i => i.countryAreaId)
|
||||
if(!allAreaId.includes(curAreaId)) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '所选产品与您目前所在位置定位不是同一个区/县,请查看产品页面的【服务区域】与【区域备注】!',
|
||||
cancelText: '返回查看',
|
||||
confirmText: '继续下单',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
resolve(true)
|
||||
} else {
|
||||
resolve(false)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
resolve(true)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async beforeCheckStatusThenOpen() {
|
||||
if(this.defaultAddress) {
|
||||
const status = await this.checkDefaultAddressIfInclude()
|
||||
if(status) {
|
||||
this.toggleProductPickModal(null, true)
|
||||
}
|
||||
} else {
|
||||
const areaStatus = await this.checkCurAreaIncludeServiceAreas()
|
||||
if(areaStatus) {
|
||||
this.toggleProductPickModal(null, true)
|
||||
}
|
||||
}
|
||||
// console.log('checkDefaultAddressIfInclude == start',)
|
||||
// const status = await this.checkDefaultAddressIfInclude()
|
||||
// console.log('checkDefaultAddressIfInclude == ', status)
|
||||
// if(status) {
|
||||
// const areaStatus = await this.checkCurAreaIncludeServiceAreas()
|
||||
// if(areaStatus) {
|
||||
// this.toggleProductPickModal(null, true)
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(!status) {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '所选产品与您目前所在位置定位不是同一个区/县,请查看产品页面的【服务区域】与【区域备注】!',
|
||||
// cancelText: '返回查看',
|
||||
// confirmText: '继续下单',
|
||||
// success: res => {
|
||||
// if (res.confirm) {
|
||||
// this.toggleProductPickModal(null, true)
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// this.toggleProductPickModal(null, true)
|
||||
// }
|
||||
},
|
||||
async toggleProductPickModal(e, orderNow) {
|
||||
this.orderNow = orderNow ? true : false;
|
||||
|
|
@ -440,8 +560,8 @@
|
|||
});
|
||||
},
|
||||
showIndex() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/home'
|
||||
});
|
||||
},
|
||||
defaultHead(url) {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,19 @@
|
|||
<view class="cu-item padding-bottom-sm">
|
||||
<view class="cu-avatar xl" :style="'background-image:url(' + productInfo.goodsImgUrl + ');'">
|
||||
</view>
|
||||
<view class="content margin-left">
|
||||
<text class="text-price text-red text-xxl">{{curSpec.goodsPrice}}</text>
|
||||
<text class="margin-left-xs">/{{curSpec.goodsUnit}}</text>
|
||||
<view class="content margin-left">
|
||||
<view>
|
||||
<text class="text-price text-red text-xxl">{{curSpec.goodsPrice}}</text>
|
||||
<text class="margin-left-xs">/{{curSpec.goodsUnit}}</text>
|
||||
<view class='cu-tag round light bg-blue padding-lr-sm margin-left-xs' v-if="productInfo.deptGoodsCategoryName">
|
||||
<text v-if="productInfo.parGoodsCategoryName">
|
||||
{{productInfo.parGoodsCategoryName}}
|
||||
<text class="margin-lr-xs">/</text>
|
||||
</text>
|
||||
<text>{{productInfo.deptGoodsCategoryName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<text class="text-gray text-sm flex justify-between">
|
||||
{{productInfo.goodsDesc}}
|
||||
</text>
|
||||
|
|
@ -24,7 +34,12 @@
|
|||
<view class='cu-tag padding'
|
||||
:class="curSpec.goodsStandardId === item.goodsStandardId ? 'line-main-color' : 'line-default'"
|
||||
@click="chooseSpecs(item)">{{item.goodsStandardName}}</view>
|
||||
<uni-number-box :min="0" :max="item.goodsNum ? item.goodsNum : 999" :value="0" @change="changePiecesNum($event, index)">
|
||||
<uni-number-box
|
||||
:min="0"
|
||||
:max="item.goodsNum ? item.goodsNum : 999"
|
||||
:value="0"
|
||||
@change="changePiecesNum($event, index)"
|
||||
@overstock="overstock">
|
||||
</uni-number-box>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
|
@ -51,15 +66,15 @@
|
|||
props: {
|
||||
shopInfo: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: () => {}
|
||||
},
|
||||
productInfo: {
|
||||
type: Object,
|
||||
default: {}
|
||||
default: () => {}
|
||||
},
|
||||
specsList: {
|
||||
type: Array,
|
||||
default: []
|
||||
default: () => []
|
||||
},
|
||||
orderNow: {
|
||||
type: Boolean,
|
||||
|
|
@ -72,13 +87,18 @@
|
|||
// specsList: [],
|
||||
totalPrice: 0,
|
||||
pickList: [],
|
||||
totalPickCount: 0
|
||||
totalPickCount: 0,
|
||||
defaultAddress: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
specsList(newV, oldV) {
|
||||
this.loadData();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.loadDefaultAddress()
|
||||
},
|
||||
methods: {
|
||||
loadData() {
|
||||
|
|
@ -89,7 +109,8 @@
|
|||
salePrice: item.discountPrice,
|
||||
pickCount: 0
|
||||
})
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
|
||||
},
|
||||
changePiecesNum(piecesNum, index) {
|
||||
let spec = this.pickList[index];
|
||||
|
|
@ -114,6 +135,28 @@
|
|||
}
|
||||
}
|
||||
return pickedList;
|
||||
},
|
||||
|
||||
async loadDefaultAddress() {
|
||||
let res = await this.$request.getAddressList({
|
||||
customerId: this.$request.getCurUserInfo().customerId,
|
||||
isDefault: 1
|
||||
});
|
||||
if (res && res.data &&res.data.length) {
|
||||
this.defaultAddress = res.data[0];
|
||||
}
|
||||
},
|
||||
// 检测当前默认地址是否在服务区域之间
|
||||
checkDefaultAddressIfInclude() {
|
||||
if(!this.defaultAddress) return true
|
||||
const allAreaId = this.shopInfo.workerAreas.map(i => i.districtId)
|
||||
return allAreaId.includes(this.defaultAddress.countryId)
|
||||
},
|
||||
overstock(maxStock) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '最大库存为:'+maxStock
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if (this.orderNow) {
|
||||
|
|
@ -125,26 +168,31 @@
|
|||
title: '请选择型号'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
pickedProductList: [{
|
||||
...this.shopInfo,
|
||||
totalMoney: this.totalPrice,
|
||||
product: [{
|
||||
...this.productInfo,
|
||||
discountPrice: this.specsList[0].discountPrice,
|
||||
goodsPrice: this.specsList[0].goodsPrice,
|
||||
pickedList: pickedList
|
||||
}]
|
||||
}]
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '../order/order-detail?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
})
|
||||
}
|
||||
this.makeOrder(pickedList)
|
||||
|
||||
} else {
|
||||
// 从加入购物车按钮进来的触发父页面事件
|
||||
uni.$emit('product-detail_add2Cart', this.totalPickCount)
|
||||
}
|
||||
},
|
||||
makeOrder(pickedList) {
|
||||
let params = {
|
||||
pickedProductList: [{
|
||||
...this.shopInfo,
|
||||
totalMoney: this.totalPrice,
|
||||
product: [{
|
||||
...this.productInfo,
|
||||
discountPrice: this.specsList[0].discountPrice,
|
||||
goodsPrice: this.specsList[0].goodsPrice,
|
||||
pickedList
|
||||
}],
|
||||
insuranceManagers: this.productInfo.insuranceManagers
|
||||
}]
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '../order/order-detail?params=' + encodeURIComponent(JSON.stringify(params))
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,8 @@
|
|||
}
|
||||
value = +value;
|
||||
if (value > this.max) {
|
||||
value = this.max;
|
||||
value = this.max;
|
||||
this.$emit('overstock', this.max)
|
||||
} else if (value < this.min) {
|
||||
value = this.min;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue