first commit

This commit is contained in:
编码猿
2024-09-27 01:32:49 +08:00
commit 28ebe05a64
7399 changed files with 1174529 additions and 0 deletions

View File

@@ -0,0 +1 @@
9e45e791-de8b-419c-89c7-3fd0dbc7382f

View File

@@ -0,0 +1,768 @@
// user/appointment/appointment.js
const app = getApp();
const regeneratorRuntime = app.loadAsync()
const model = app.loadModel("index")
const http = app.loadHttp()
const util = app.loadUtils("util")
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "一键下单", //头部标题
isBack: true,//显示返回
visible: false,//弹出层
somList: [],
date_list: [],//预约时间列表
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
address: "",//选中的收货地址
remarks: "",//备注
isPlaceOrder: false,//防止重复提交
postage: {},//邮费
shopList: {
shopCart: [], //购物车商品数据
orderPrice: null, //商品总价
ordinaryPrice: null, //普通衣物的价格
workPrice: null, //工服衣物的价格
totalPrice: null, //扣除优惠+邮费的价格
postageMoney: null, //邮费
wxMoney: null,//微信该支付的钱
total: null, //底部显示的合计
},
isPay: [true, true],//0下标是微信支付 1下标是卡支付
isPayp: 2,//1卡支付 2微信支付
giftCard: {},//会员卡信息
coupon: {},//优惠券
isgiftCard: "",//拼接的卡劵信息方便操作
groupType: -1,//如果不是0就是团体用户0 或 -1 是非广大用户
type: 1,//1是团体用户普通洗 2是洗工服
groupData: {},//团体用户折扣优惠数据信息
take_type: 1,//门店自取1 单位自取2
branchList: [], //支行列表
branchIndex: 0,// 当前用户选择的支行下标
takeTypeOrd: 1,//普通用户 自送门店1 上门取件2
addList: [], // 门店列表
addIndex: -1, //当前用户选择的门店下标
timeFreight: '', //如果团体客户在预约时间内则免运费
isCoupon: true, //是否显示优惠卷
coilingCode: '', //用户输入的卷码
formSource: 0,// 订单来源 如果不是0则显示码卷输入
freightTips: true, // true 显示 实付xxfalse 3月底免运费
isCurtains: 0 // // 0 不是窗帘套餐, 1 是窗帘套餐
},
// 获取默认收货人
async getConsignee() {
let token = await util.token()
if (!token) return;
let res = await http.http.request2({ url: `${http.api.defaultUserAddress}`, method: "POST" })
let add = res.data.data
if (!!add.id) {
add.all = add.provinceName + add.cityName + add.countryName + add.detail
this.setData({
address: add
})
}
},
// 获取支行列表
async groupBranchList() {
let res = await http.http.request2({ url: http.api.groupBranchList, method: 'POST' })
res.data.data.forEach((v,i)=>{
if(v.id == app.globalData.userInfo.group_branch){
this.setData({
branchIndex: i
})
}
})
this.setData({
branchList: res.data.data
})
},
// 选择其他支行
pickerChange(e) {
this.setData({
branchIndex: parseInt(e.detail.value),
timeFreight: '',
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
})
this.getMaketime()
this.calculation()
},
/**
* 获取全部门店列表
*/
async getStoreList() {
let data = await model.storage.getSetting("position")
let res = await http.http.request1({
url: `${http.api.disShopList}`, method: "POST", data: {
pick_door: 1
}
})
let rel = res.data.data;
this.setData({
addList: [...rel]
})
},
// 门店选择
pickerChangeOrd(e){
this.setData({
addIndex: parseInt(e.detail.value)
})
this.calculation()
},
// 获取邮费
async postage() {
let url = '';
if (this.data.groupType !== 0 && this.data.type == 2) {
url = http.api.newPostage
} else {
url = http.api.postage
}
let res = await http.http.request2({ url: url, method: "POST", data: { type: 2 } })
this.setData({
postage: res.data.data
})
},
// 获取光大用户会员卡
async getGuangDa() {
let res = await http.http.request2({ url: http.api.guangDa, method: "POST", data: { group_type: this.data.groupType } })
this.setData({
giftCard: res.data.data
})
},
//弹出层开启关闭
onClose() {
this.setData({
visible: !this.data.visible
})
},
// 选中大分类
bigSelect(e) {
let index = e.currentTarget.dataset.index
this.setData({
bigIndex: index,
somList: this.data.date_list[index].time_list
})
},
// 选中小分类
somSelect(e) {
let index = e.currentTarget.dataset.index
let item = e.currentTarget.dataset.item
if (item.type == '今日休息') {
wx.showToast({
title: '每周四休息,给您带来不便,敬请谅解',
icon: 'none',
duration: 2000
})
return
} else if (item.type == '2') {
wx.showToast({
title: '当前时间段已过,请重新选择',
icon: 'none',
duration: 2000
})
return
}
this.setData({
somIndex: item,
timeFreight: parseInt(item.post_desc) > 0 ? parseInt(item.post_desc) : 0
})
this.onClose()
if(this.data.take_type == 2){
this.calculation()
}
},
// 获取收货地址并且赋值到页面
async getAdd() {
let data = await model.storage.getSetting("address")
if (!!data) {
model.storage.deleteStorage('address')
data.all = data.provinceName + data.cityName + data.countyName + data.detailInfo
this.setData({
address: data || ""
})
}
},
/**
* 获取预约时间
* 并把小分类赋值
*/
async getMaketime() {
let data = {}
// isCurtains 如果为1请求窗帘的活动时间如果为 0 请求普通衣物和套餐时间
data.is_appoint_time = this.data.isCurtains;
if(this.data.take_type == 2){
data.bind_id = this.data.branchList[this.data.branchIndex].id
if(this.data.type == 1){
data.bind_wash_type = 2
}else{
data.bind_wash_type = 1
}
}
let time = await http.http.request1({ url: `${http.api.getTime}`, method: "POST", data:data })
this.setData({
date_list: time.data.data.date_list,
somList: time.data.data.date_list[0].time_list
})
},
// 团体用户折扣优惠数据信息
async groupDiscountInfo() {
let res = await http.http.request2({ url: http.api.groupDiscountInfo, method: "POST" })
this.setData({
groupData: res.data.data
})
},
// 团体是否门店自取
async tapTakeType(e) {
this.setData({
take_type: e.currentTarget.dataset.type,
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
timeFreight: ''
})
this.getMaketime()
this.calculation()
// 1 自送门店 3月底免运费
// if (this.data.take_type == 1) {
// this.setData({
// freightTips: true
// })
// }
},
// 普通用户门店自取和上门取件选择
async tapTakeTypeOrdinary(e) {
this.setData({
takeTypeOrd: e.currentTarget.dataset.type,
bigIndex: 0,//大分类选中
somIndex: null,//小分类选中
timeFreight: ''
})
this.getMaketime()
this.calculation()
// 1 自送门店 3月底免运费
// if (this.data.takeTypeOrd == 2) {
// this.setData({
// freightTips: true
// })
// }
},
// 提交下单
async placeOrder(e) {
// 防止重复提交
if (this.data.isPlaceOrder) {
return
}
let formId = e.detail.formId
let m = this.data
let add = m.address
if (add == "" && this.data.take_type == 1 && (this.data.groupType !== 0 && this.data.groupType !== -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (add == "" && this.data.takeTypeOrd == 2 && (this.data.groupType == 0 || this.data.groupType == -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (m.somIndex == null && (this.data.takeTypeOrd == 2 || ((this.data.groupType != 0 && this.data.groupType != -1)))) {
model.msg.dataMsg({
content: "请选择上门时间",
type: "warning"
})
return
}
if (this.data.addIndex == -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)) {
model.msg.dataMsg({
content: "请选择门店",
type: "warning"
})
return
}
let data = {
status: 1,
accept_time: '',
address_id: "",
remarks: m.remarks,
form_id: formId,
form: this.data.formSource,
code_num: this.data.coilingCode,
wx_info: {
name: add.userName,
tel: add.telNumber,
address: `${add.provinceName},${add.cityName},${add.countyName},${add.detailInfo}`
}
}
// 判断是否是自送门店,如果是 logic_type = 1
if (this.data.takeTypeOrd == 1) {
data.logic_type = 3
} else {
data.logic_type = 1
}
// 如果普通用户上门取件或团体客户上门取件则在下单时加上地址id
if(this.data.takeTypeOrd == 2 || this.data.take_type == 1) {
data.address_id = add.id
}
// 光大用户
if (this.data.groupType != 0 && this.data.groupType != -1 ) {
data.logic_type = 1
}
// 普通用户门店自取
if (this.data.addIndex !== -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)) {
data.accept_shop_id = this.data.addList[this.data.addIndex].id
}
if (this.data.takeTypeOrd == 2 || (this.data.groupType !== 0 && this.data.groupType !== -1)) {
data.accept_time = (`${m.date_list[m.bigIndex].date} ${m.somIndex.time}`).replace(/(^\s*)|(\s*$)/g, "")
}
this.setData({
isPlaceOrder: true
})
setTimeout(() => {
this.setData({
isPlaceOrder: false
})
}, 200)
let res = await http.http.request2({ url: `${http.api.quickReserva}`, method: "POST", data: data })
if (res.data.status == 1) {
model.msg.dataMsg({
content: res.data.msg,
type: "none"
})
// 500ms后跳转首页
setTimeout(() => {
wx.redirectTo({
url: "/user/appointment/paid/paid"
})
}, 500)
return
}
},
changeSearch(e) {
this.setData({
remarks: e.detail.value
})
},
// 码卷
changeCode(e) {
this.setData({
coilingCode: e.detail.value
})
},
// 订单各种金额计算
calculation() {
let orderPrice = 0, ordinaryPrice = 0, workPrice = 0, totalPrice = 0, postageMoney = 0, wxMoney = 0, total = 0, shopCart = this.data.shopList.shopCart, take_type= this.data.take_type;
let groupType = this.data.groupType
let coupon = this.data.coupon.price || 0
// 不打折的钱
let is_discountAll = 0
//如果选中的商品有is_special字段并且等于2则改成true
//如果等于true则免运费
let is_specialAll = false
// 邮费配置团体用户的折扣
let groupData = this.data.groupData
shopCart.forEach((v, i) => {
orderPrice += parseFloat(v.price) * v.num
// 如果有套餐不给使用优惠卷
if (v.is_discount == 2){
this.setData({
isCoupon: false
})
}
// 如果is_special等于2则代表免运费
if (v.is_special == 2) {
// 如果有套餐衣物那么现实3月底不要运费的提示信息
this.setData({ freightTips: false });
is_specialAll = true
}
// 这部分钱是不需要打折的钱
if (v.is_discount == 2){
is_discountAll += parseFloat(v.price) * v.num
}
if (v.type == 2) {
ordinaryPrice += parseFloat(v.price) * v.num
} else if (v.type == 1) {
workPrice += parseFloat(v.price) * v.num
}
});
// 如果groupType不是0则是团体用户
if (groupType !== 0) {
totalPrice = (((ordinaryPrice - is_discountAll) * groupData.wx_discount / 100) + workPrice + is_discountAll)
// 计算光大用户的专属折扣
ordinaryPrice = ((ordinaryPrice - is_discountAll) * groupData.wx_discount / 100)
total = totalPrice
} else {
// 商品总价
totalPrice = ordinaryPrice + workPrice
// 加上优惠卷
total = totalPrice - coupon
ordinaryPrice = 0.00
// 计算普通用户选择会员卡和优惠券后的价格
if (this.data.giftCard.price) {
total = ((total - is_discountAll) * (this.data.giftCard.price * 0.1)) + is_discountAll
}
}
// 计算邮费
// 团体客户计算运费
if (groupType !== 0) {
// 团体用户普通洗
if (this.data.type == 1) {
postageMoney = this.postageTwo(total, is_specialAll)
wxMoney = wxMoney + postageMoney
} else if (this.data.type == 2) {
// 团体用户工服洗计算
postageMoney = this.postageOne(total)
}
} else {
// 正常用户运费计算
postageMoney = this.postageThree(total, is_specialAll)
}
// shopList.total 做三元运算判断,防止支付金额出现负数.
this.setData({
'shopList.orderPrice': orderPrice.toFixed(2),
'shopList.ordinaryPrice': ordinaryPrice.toFixed(2),
'shopList.workPrice': workPrice.toFixed(2),
'shopList.totalPrice': (totalPrice + postageMoney).toFixed(2),
'shopList.postageMoney': postageMoney.toFixed(2),
'shopList.wxMoney': ordinaryPrice.toFixed(2),
'shopList.total': (total + postageMoney).toFixed(2) <= 0 ? 0 : (total + postageMoney).toFixed(2)
})
},
// 团体客户清洗工服的邮费计算
postageOne(total){
let postageMoney = 0;
// 邮费配置团体用户的折扣
// 因为团体客户使用专属卡洗衣所以,运费从专属配置中获取
let groupData = this.data.groupData
// 正常判断总价是否大于收取运费的阈值
if ((total >= groupData.satisfy_money)) {
postageMoney = 0
} else {
// 这一步中如果时间上不收取运费 并且是单位取件则不收取运费
if ((this.data.timeFreight <= 0 && this.data.take_type == 2)){
postageMoney = 0
}else{
postageMoney = groupData.postage_money
}
}
return postageMoney
},
// 团体客户清洗普通衣物邮费计算
//
postageTwo(total, suit){
let postageMoney = 0;
// 邮费配置
let postage = this.data.postage;
// 正常判断总价是否大于收取运费的阈值
if ((total >= postage.satisfy_money) || suit) {
postageMoney = 0
} else {
// 如果是单位取件 并且 时间上是免运费 就不收运费
if ((this.data.timeFreight <= 0 && this.data.take_type == 2) || suit > 0){
postageMoney = 0
}else{
postageMoney = postage.postage_money
}
}
return postageMoney
},
// 普通客户清洗衣物的邮费计算
postageThree(total, suit){
let postageMoney = 0;
// 邮费配置
let postage = this.data.postage;
// 正常判断总价是否大于收取运费的阈值 如果是门店自取不收取客户运费
if (total >= postage.satisfy_money || suit || this.data.takeTypeOrd == 1) {
postageMoney = 0
} else {
postageMoney = postage.postage_money
}
return postageMoney
},
// 获取卡劵
async getGiftCard() {
let giftCard = await model.storage.getSetting("giftCard")
if (!!giftCard) {
model.storage.deleteStorage('giftCard')
this.setData({
giftCard: giftCard,
isgiftCard: giftCard.title + " " + giftCard.price + '折',
isPayp: 1
})
}
this.calculation()
},
// 获取优惠券
async getCoupon() {
let coupon = await model.storage.getSetting("coupon")
if (!!coupon) {
model.storage.deleteStorage('coupon')
this.setData({
coupon: coupon
})
}
this.calculation()
},
// 选择支付方式
selectPay(e) {
let type = e.currentTarget.dataset.type
let url = e.currentTarget.dataset.url
if (type == 2) {
this.setData({
isgiftCard: "",
giftCard: {},
isPayp: type
})
this.calculation()
} else if (type == 1) {
wx.navigateTo({
url: url
})
}
},
// 用户支付
async payment(e) {
let formId = e.detail.formId
let m = this.data
let add = m.address
if (add == "" && this.data.take_type == 1 && (this.data.groupType !== 0 && this.data.groupType !== -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (add == "" && this.data.takeTypeOrd == 2 && (this.data.groupType == 0 || this.data.groupType == -1)) {
model.msg.dataMsg({
content: "请选择收货地址",
type: "warning"
})
return
}
if (m.somIndex == null && (this.data.takeTypeOrd == 2 || ((this.data.groupType != 0 && this.data.groupType != -1)))) {
model.msg.dataMsg({
content: "请选择上门时间",
type: "warning"
})
return
}
if (this.data.addIndex == -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)){
model.msg.dataMsg({
content: "请选择门店",
type: "warning"
})
return
}
// 如果是光大用户切礼卡中钱不足则提示
if (this.data.groupType !== 0 && this.data.type == 2 && parseFloat(this.data.giftCard.money) < this.data.shopList.workPrice) {
model.msg.dataMsg({
content: "礼卡中余额不足不能清洗工服,请重新下单清洗普通衣物",
type: "warning",
duration: 3
})
return
}
let pro_id = '', pro_id_count = '';
let data = {
status: 1,
accept_time: '',
address_id: "",
remarks: m.remarks,
form_id: formId,
wx_info: {
name: add.userName,
tel: add.telNumber,
address: `${add.provinceName},${add.cityName},${add.countyName},${add.detailInfo}`
},
take_type: this.data.groupType == 39 ? this.data.take_type : 1
};
// 判断是否是自送门店,如果是 logic_type = 1
if (this.data.takeTypeOrd == 1) {
data.logic_type = 3
} else {
data.logic_type = 1
}
// 如果普通用户上门取件或团体客户上门取件则在下单时加上地址id
if(this.data.takeTypeOrd == 2 || this.data.take_type == 1) {
data.address_id = add.id
}
// 光大用户
if (this.data.groupType != 0 && this.data.groupType != -1) {
data.logic_type = 1
}
m.shopList.shopCart.forEach((v, i) => {
pro_id += v.id + ','
pro_id_count += v.num + ','
})
data.pro_id = pro_id.replace(/^(\s|,)+|(\s|,)+$/g, '')
data.pro_id_count = pro_id_count.replace(/^(\s|,)+|(\s|,)+$/g, '')
if(this.data.take_type == 2 && this.data.groupType == 39){
data.brand_id = this.data.branchList[this.data.branchIndex].id
}
// 普通用户门店自取
if (this.data.addIndex !== -1 && this.data.takeTypeOrd == 1 && (this.data.groupType == 0 || this.data.groupType == -1)){
data.accept_shop_id = this.data.addList[this.data.addIndex].id
}
if (this.data.takeTypeOrd == 2 || (this.data.groupType !== 0 && this.data.groupType !== -1)){
data.accept_time = (`${m.date_list[m.bigIndex].date} ${m.somIndex.time}`).replace(/(^\s*)|(\s*$)/g, "")
}
let res = await http.http.request2({ url: http.api.newQReserva, method: "POST", data: data })
let payInfo = {
orderID: res.data.data.order_id,
userCouponID: 0,
userCardID: 0
}
// 光大用户
if (this.data.groupType !== 0 && this.data.groupType !== -1) {
payInfo.payType = 3
payInfo.userCardID = this.data.giftCard.id
if(this.data.take_type == 2){
payInfo.bindId = this.data.branchList[this.data.branchIndex].id
}
} else {
// 普通用户
payInfo.payType = this.data.isPayp
// 卡
if (this.data.isPayp == 1) {
payInfo.userCardID = this.data.giftCard.id
}
// 优惠券
if (!!this.data.coupon.id) {
payInfo.userCouponID = this.data.coupon.id
}
}
let rel = await model.payment.pay(http.api.preShopOrder, payInfo)
if (rel == 1) {
// 500ms后跳转首页
setTimeout(() => {
wx.redirectTo({
url: "/user/appointment/paid/paid"
})
}, 500)
return
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: async function (options) {
let isTel = app.globalData.userInfo.telnum
if (isTel == "点击授权手机号" || isTel == '') {
wx.navigateTo({
url: '/pages/login/login'
})
return 1
}
this.data.isCurtains = options.isCurtains
// console.log("options.isCurtains: ", this.data.isCurtains)
// 如果有值,则代表从别的小程序过来的
if (!!options.from){
this.setData({
formSource: options.from
})
// 存储用户来源,在登录时使用
model.storage.setStorage("from", options.from)
}
Promise.all([this.getMaketime(),this.getConsignee(),this.groupBranchList(),this.postage(),this.getStoreList()])
.then( async (res)=>{
if (!!options.shopCart) {
let shopCart = JSON.parse(options.shopCart)
this.setData({
'shopList.shopCart': shopCart,
groupType: parseInt(options.group_type),
type: parseInt(options.type)
})
if (options.group_type !== '0') {
// 如果是团体用户默认选中单位取件
this.setData({
take_type: 2
})
// 如果是团体客户重新调一次时间 因为团体默认单位取件
this.getMaketime()
// 获取团体卡
this.getGuangDa()
await this.groupDiscountInfo()
}
// 订单各种金额计算
this.calculation()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getAdd()
if (this.data.groupType != -1) {
this.getGiftCard()
this.getCoupon()
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,8 @@
{
"navigationBarTextStyle": "black",
"usingComponents": {
"wux-popup":"../../extend/wux/dist/popup/index",
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
"wux-cell": "../../extend/wux/dist/cell/index"
}
}

View File

@@ -0,0 +1,320 @@
<!-- user/appointment/appointment.wxml -->
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}" />
<view class="tecProcess">
<image mode="widthFix" src="{{ shopList.shopCart.length != 0 ?'http://cdn.yishaxiyi.com/ff8049b242111156b09d8b714de064dd.png':'http://cdn.yishaxiyi.com/d0a3068c38351c1082013e9dd135efdc.png'}}" />
</view>
<!-- 自送门店 和 上门取件 -->
<view class="tabs_choice pd20">
<view class="mt20" wx:if="{{groupType == -1 || groupType == 0}}">
<wux-cell-group>
<wux-cell
right="text_right_cell2"
title="自送门店"
data-type='1'
bind:tap="tapTakeTypeOrdinary"
rightUrl="{{takeTypeOrd == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
right="text_right_cell2"
title="上门取件"
data-type='2'
bind:tap="tapTakeTypeOrdinary"
rightUrl="{{takeTypeOrd == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
</view>
<!-- 内容 -->
<view class="appointment pd20">
<form report-submit bindsubmit="placeOrder">
<view class="mt20" wx:if="{{groupType !== -1 && groupType !== 0}}">
<wux-cell-group>
<wux-cell
right="text_right_cell2"
title="在单位约定时间或到门店洗衣免运费"
data-type='2'
bind:tap="tapTakeType"
rightUrl="{{take_type == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
right="text_right_cell2"
title="其它地址上门取送"
data-type='1'
bind:tap="tapTakeType"
rightUrl="{{take_type == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
<!-- 团体客户地址选择 -->
<view wx:if="{{groupType !== 0 && groupType !== -1}}">
<!-- 选择快递方式 -->
<view class="mt20" wx:if="{{take_type == 2}}">
<picker
value="{{branchIndex}}"
range="{{branchList}}"
range-key='unit_title'
bindchange='pickerChange'
>
<view class='bac_cell'>
<wux-cell-group>
<wux-cell right="text_right_cell2" title="{{ branchIndex == -1?'请选择您所在的分行':branchList[branchIndex].unit_title}}" rightUrl='/static/img/icon/asfa51f3a1f3a5f13a.png' />
</wux-cell-group>
</view>
</picker>
</view>
<navigator url="/user/addList/addList" wx:if='{{take_type == 1}}'>
<view class="rec mt20 pd25 flex-con2">
<view class="rec-all">
<view class="rec-img fl flex-con2">
<image src="/static/img/icon/rfw161.png" />
</view>
<view class="rec-add fl pl20">
<view class="adds clamp1">
<span>{{address.userName || '请选择或新建地址'}}</span>
<span class="ml10">{{address.telNumber}}</span>
</view>
<view class="addInfo clamp1">{{address.all || '请填写您的详细地址'}}</view>
</view>
<view class="fr right_icon flex-con2">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
</navigator>
</view>
<!-- 普通用户的地址选择 -->
<view wx:if="{{groupType == -1 || groupType == 0}}">
<!-- 普通用户门店自取 -->
<view class="mt20" wx:if="{{takeTypeOrd == 1}}">
<picker
value="{{addIndex}}"
range="{{addList}}"
range-key='name'
bindchange='pickerChangeOrd'
>
<view class='bac_cell'>
<wux-cell-group>
<wux-cell right="text_right_cell2" title="{{ addIndex == -1?'请选择门店':addList[addIndex].name}}" rightUrl='/static/img/icon/asfa51f3a1f3a5f13a.png' />
</wux-cell-group>
</view>
</picker>
</view>
<!-- 普通用户填写地址显示 -->
<navigator url="/user/addList/addList" wx:if='{{takeTypeOrd == 2 }}'>
<view class="rec mt20 pd25 flex-con2">
<view class="rec-all">
<view class="rec-img fl flex-con2">
<image src="/static/img/icon/rfw161.png" />
</view>
<view class="rec-add fl pl20">
<view class="adds clamp1">
<span>{{address.userName || '请选择或新建地址'}}</span>
<span class="ml10">{{address.telNumber}}</span>
</view>
<view class="addInfo clamp1">{{address.all || '请填写您的详细地址'}}</view>
</view>
<view class="fr right_icon flex-con2">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
</navigator>
</view>
<view wx:if='{{ takeTypeOrd == 1 && (groupType == 0 || groupType == -1) }}' class="tips pd25 mt20 app2">
部分门店周四休息,到店前请联系门店确认
</view>
<view class="rec app2 mt20 pd25" wx:if='{{takeTypeOrd == 2 || ((groupType != 0 && groupType != -1)) }}'>
<view class="rec-rem flex-con2 pl20" bind:tap="onClose">
<view class="time">
<view class="time1 fl">
<image src="/static/img/icon/asfasfwerf.jpg" />
</view>
<view class="time2 fl pl20">
{{ !!somIndex.time ? date_list[bigIndex].title :''}} {{ somIndex.time || '请选择上门时间'}}
</view>
<view class="right_icon fr">
<image src="/static/img/icon/rthyrthertherth.png" />
</view>
</view>
</view>
<view class="rec-rem flex-con2 pl20">
<input type="text" placeholder="备注:(如取送时间、污渍等说明)" bindinput="changeSearch" />
</view>
</view>
<view class="rec app2 mt20 pd25">
<!-- 第三方进入时显示 -->
<view class="rec-rem flex-con2 pl20" wx:if="{{formSource != 0}}">
<input type="text" placeholder="请输入卷码" bindinput="changeCode" />
</view>
</view>
<!-- 如果从洗衣购物车过来的显示 -->
<view class="shop_list mt20" wx:if="{{shopList.shopCart.length != 0}}">
<view class="shop_list_row dis-flex" wx:for="{{ shopList.shopCart }}" wx:key="index">
<view class="shop_list_img">
<image src="{{item.image}}" />
</view>
<view class="flex1 ml20 dis-flex1">
<view class="flex1 flex-con2">
<view class="flex1 text1">{{item.name}}{{item.type == 1?'(工服)':''}}</view>
<view class="flex1 text-right text1">¥{{item.price}}</view>
</view>
<view class="flex1 flex-con2">
<view class="flex1 text2">
<span>{{item.attr}}</span>
</view>
<view class="flex1 text-right text1">×{{item.num}}</view>
</view>
</view>
</view>
<view class="mon mt20">
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">订单金额</view>
<view class="flex1 text-right mon_p">¥{{shopList.orderPrice}}</view>
</view>
<view class="mon_cen pdtb20 dis-flex" wx:if="{{groupType !== 0 && type == 1}}">
<view class="flex1 mon_p">
专属优惠
<span class="discount ml20" wx:if="{{shopList.ordinaryPrice > 0}}">{{groupData.favour_des}}</span>
</view>
<view class="flex1 text-right mon_p2">-¥{{shopList.ordinaryPrice}}</view>
</view>
<navigator wx:if="{{groupType == 0 && isCoupon}}" url="/mall/couponCard/couponCard?total={{shopList.orderPrice}}" class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">优惠</view>
<view class="flex1 flex-con5 mon_span">
<image src="/static/img/icon/right-r.png" />
<span wx:if="{{ !!coupon && !!coupon.price }}" class="mr20">
-¥{{coupon.price}}
</span>
<span wx:else class="mr20">选择优惠券</span>
</view>
</navigator>
<view class="mon_cen pdtb20 dis-flex">
<view class="flex1 mon_p">
运费
<span class="explain ml20" wx:if="{{ freightTips}}">实付满{{type == 2?groupData.satisfy_money:postage.satisfy_money}}元免运费</span>
<span class="explain ml20" wx:else>3月底前免运费</span>
</view>
<view class="flex1 text-right mon_p">¥{{shopList.postageMoney}}</view>
</view>
<!-- <view class="mon_cen pdtb20 dis-flex">
<view class="flex1 text-right mon_p">
合计:
<span class="mon_span">¥{{shopList.total}}</span>
</view>
</view> -->
</view>
</view>
<view class="mt20" wx:if="{{groupType !== 0 && groupType !== -1}}">
<wux-cell-group>
<wux-cell
wx:if="{{type == 1}}"
extra='{{shopList.total}}'
right="text_right_cell2"
thumb="/static/img/icon/wxlogo2.png"
title="微信支付"
rightUrl="{{isPay[0] ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
wx:if="{{type == 2}}"
extra='{{shopList.total}}'
right="text_right_cell2"
thumb="{{!!giftCard.logo?giftCard.logo:'/static/img/icon/guangda.png'}}"
title="光大专属礼卡"
rightUrl="{{isPay[1] ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
>
<span style="color:#f22c21;">(余额¥{{giftCard.money}})</span>
</wux-cell>
</wux-cell-group>
</view>
<view class="mt20" wx:elif="{{groupType == 0}}">
<wux-cell-group>
<wux-cell
data-type="1"
bind:tap="selectPay"
data-url="/user/payment/card/card"
right="text_right_cell2"
thumb="{{!!giftCard.logo?giftCard.logo:'/static/img/icon/yhk.png'}}"
title="{{isgiftCard != ''?isgiftCard:'会员卡支付'}}"
rightUrl="{{isPayp == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
<wux-cell
data-type="2"
bind:tap="selectPay"
thumb="/static/img/icon/wxlogo2.png"
title="微信支付"
rightUrl="{{isPayp == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"
/>
</wux-cell-group>
</view>
<button wx:if="{{groupType == -1}}" class="sub" form-type="submit">立即下单</button>
<view class="tip mt40" wx:if="{{groupType !== 0 && groupType !== -1}}">
温馨提示:{{groupData.tips}}
</view>
<view class="tip mt40" wx:else>
温馨提示:如订单总额未满{{postage.satisfy_money}}元需支付{{postage.postage_money}}元运费
</view>
</form>
</view>
<!-- 支付 -->
<view class="shop_pay" wx:if="{{groupType !== -1}}">
<view class="flex-con5 flex1 pay_num">应付:¥{{shopList.total}}</view>
<form report-submit bindsubmit="payment">
<button class="pay_sub" form-type="submit">支付</button>
</form>
</view>
<wux-popup position="bottom" visible="{{ visible }}" bind:close="onClose">
<view class="frame">
<view class="frame_title">
<view class="frame_p">上门时间</view>
<span bind:tap="onClose">
<image src="/static/img/icon/dasdasd_05.png" />
</span>
</view>
<view class="frame_cen">
<view class="frame_cenl">
<view
wx:for="{{date_list}}"
wx:key="index"
bind:tap="bigSelect"
class="cenl_row {{bigIndex == index?'row_active1':''}}"
data-index="{{index}}"
>
{{item.title}}
</view>
</view>
<view class="frame_cenr">
<view
wx:for="{{somList}}"
wx:key="index"
bind:tap="somSelect"
data-item="{{item}}"
data-index="{{index}}"
class="cenr_row pd30"
>
<view class="frame_time fl {{somIndex.time == item.time?'row_active2':''}} {{item.type == 1 ?'black300':''}}">
{{item.time || '今日休息'}}
</view>
<view class="frame_time" wx:if="{{groupType !== 0 && take_type == 2}}">
运费:{{item.post_desc}}
</view>
<view wx:if="{{somIndex.time == item.time && bigIndex == index}}" class="frame_img fr">
<image src="/static/img/icon/qewfwrgerthgrt.png" />
</view>
</view>
</view>
</view>
</view>
</wux-popup>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,341 @@
page{
padding-bottom: 120rpx;
}
.tips {
width: 100%;
background: #fff;
padding: 15px;
color: #8d8d8d;
}
.rec {
height: 180rpx;
width: 100%;
background-color: var(--white);
border-radius: 15rpx;
box-sizing: border-box;
}
.rec-all {
width: 100%;
}
.rec-img, .right_icon {
height: 100rpx;
}
.rec-img image {
height: 80rpx;
width: 80rpx;
}
.adds {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #000;
}
.rec-add {
width: 420rpx;
}
.addInfo {
margin-top: 20rpx;
font-family: PingFang-SC-Medium;
font-size: 26rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #999;
}
.right_icon image {
width: 15rpx;
height: 33rpx;
}
.app2 {
height: auto;
}
.rec-rem {
height: 113rpx;
width: 100%;
}
.rec-rem {
border-bottom: 2rpx solid #ebebeb;
}
.rec-rem:last-child {
border: 0;
}
.time {
width: 100%;
height: 36rpx;
line-height: 36rpx;
}
.time1 image {
width: 36rpx;
height: 36rpx;
}
.time2 {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #666;
}
.rec-rem input {
width: 100%;
}
.tip {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #999;
text-align: center;
}
/* 弹出层 */
.frame {
width: 100%;
}
.frame_title {
height: 108rpx;
width: 100%;
border-bottom: 2rpx solid #ebebeb;
position: relative;
}
.frame_p {
font-family: PingFang-SC-Medium;
font-size: 32rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
height: 108rpx;
line-height: 108rpx;
width: 100%;
text-align: center;
}
.frame_title span {
position: absolute;
right: 30rpx;
top: 41rpx;
width: 26rpx;
height: 26rpx;
}
.frame_title span image {
width: 26rpx;
height: 26rpx;
}
.frame_cen {
display: flex;
height: 704rpx;
width: 100%;
}
.frame_cenl {
flex: 1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
background: #f6f6f6;
padding-bottom: 100rpx;
}
.frame_cenr {
flex: 2;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.cenl_row {
height: 116rpx;
width: 100%;
text-align: center;
line-height: 116rpx;
font-family: PingFang-SC-Medium;
font-size: 36rpx;
font-weight: normal;
font-stretch: normal;
letter-spacing: 0px;
color: #333;
}
.cenr_row {
padding: 20rpx 0;
/* height: 100rpx; */
width: 100%;
/* line-height: 100rpx; */
box-sizing: border-box;
border-bottom: 2rpx solid #ebebeb;
display: flex;
}
.frame_img image {
width: 30rpx;
height: 30rpx;
vertical-align: middle;
}
.row_active1 {
color: #2fd152;
background: var(--white);
}
.row_active2 {
color: #2fd152;
}
.frame_time {
color: #ccc;
width: 40%;
display: inline-block;
flex: 1;
padding: 0 10rpx;
}
.black300 {
color: #333;
}
.tecProcess{
width: 100%;
}
.tecProcess image{
width: 100%;
height: 50rpx;
}
.shop_list {
padding: 40rpx 0;
background-color: #fff;
border-radius: 10rpx;
}
.shop_list_row {
height: 100rpx;
padding: 22rpx 0;
margin: 0 30rpx;
border-bottom: 1rpx solid #ebebeb;
box-sizing: initial;
}
.shop_list_row:last-child {
margin-bottom: 0;
}
.shop_list_img image {
width: 100rpx;
height: 100rpx;
}
.text1 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.text2 {
font-family: PingFang-SC-Medium;
font-size: 22rpx;
color: #999;
}
.mon{
padding: 0 20rpx;
}
.mon_p,.mon_p2 {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #333;
}
.mon_p2{
color: #f22c21;
}
.mon_span{
font-weight: 500;
font-size: 34rpx;
color: #333;
}
.discount{
font-size: 24rpx;
border: #f22c21 1rpx solid;
color: #f22c21;
padding: 2rpx 5rpx;
box-sizing: border-box;
}
.explain{
font-size: 28rpx;
color: #999999;
}
.text_right_cell2{
display: flex;
align-items: center;
}
/* 支付 */
.shop_pay {
position: fixed;
height: 100rpx;
bottom: 0;
left: 0;
right: 0;
width: 100%;
display: flex;
background-color: #fff;
border-bottom: 2rpx solid #ebebeb;
z-index: 99999;
}
.pay_sub {
width: 260rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background-color: #1dbf53;
font-family: PingFang-SC-Medium;
font-size: 32rpx;
color: #fff;
border-radius: 0;
border: 0;
}
pay_sub::after{
width: 0;
height: 0;
border: 0;
}
.pay_num {
margin-right: 30rpx;
font-weight: 600;
font-family: PingFang-SC-Bold;
font-size: 30rpx;
color: #333;
}
.mon_span {
font-family: PingFang-SC-Medium;
font-size: 28rpx;
color: #ff4838;
}
.mon_span image {
height: 28rpx;
width: 15rpx;
}

View File

@@ -0,0 +1 @@
206c2199-fe18-4380-a69e-87f8b0f0782b

View File

@@ -0,0 +1,75 @@
// user/appointment/paid/paid.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
system: app.globalData.system, //设备相关信息
pageTitle: "预约成功", //头部标题
isBack: false,//显示返回
},
// 跳转
goUrl(e) {
let url = e.currentTarget.dataset.url
wx.redirectTo({
url: url
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,15 @@
<!-- 头部 -->
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
<!--user/wardrobe/wardrobeInfo/wardrobeInfo.wxml-->
<view class="wardrobeInfo">
<view class="wardrobeInfo_suo">
<image src="/static/img/success-icon.png" />
</view>
<view class="wardrobeInfo_tit">预约成功</view>
<view class="wardrobeInfo_sub flex-con1">
<view class="wardrobeInfo_sub_l" data-url="/pages/auth/auth?index=1" bind:tap="goUrl">返回首页</view>
<view class="wardrobeInfo_sub_r" data-url="/user/order/order?orderState=1" bind:tap="goUrl">查看订单</view>
</view>
</view>
<!-- toasta提示 -->
<i-toast id="toast" />

View File

@@ -0,0 +1,49 @@
/* user/appointment/paid/paid.wxss */
page{
background-color: #ffffff !important;
height: 100%;
}
.wardrobeInfo{
width: 660rpx;
margin: 130rpx auto 0;
}
.wardrobeInfo_suo{
display: block;
text-align: center;
}
.wardrobeInfo_suo image{
width: 231rpx;
height: 231rpx;
}
.wardrobeInfo_tit{
margin-top: 70rpx;
font-family: PingFang-SC-Medium;
font-size: 45rpx;
color: #333333;
font-weight: 400;
text-align: center;
}
.wardrobeInfo_tit1{
margin-top: 40rpx;
font-family: PingFang-SC-Regular;
font-size: 32rpx;
text-align: center;
color: #666666;
}
.wardrobeInfo_sub_l,.wardrobeInfo_sub_r{
margin-top: 100rpx;
width: 310rpx;
height: 90rpx;
line-height: 90rpx;
text-align: center;
border-radius: 45rpx;
border: solid 2rpx #1dbf53;
font-size: 32rpx;
}
.wardrobeInfo_sub_l{
color: #1dbf53;
}
.wardrobeInfo_sub_r{
background-color: #1dbf53;
color: #ffffff;
}