diff --git a/components/shopListPopup.vue b/components/shopListPopup.vue index 7661759..86029d0 100644 --- a/components/shopListPopup.vue +++ b/components/shopListPopup.vue @@ -11,9 +11,9 @@ {{item.mer_name}} - 距离最近 - 步行{{item.distance}} + 步行{{item.distance}} diff --git a/pageQuota/quotation/detail.vue b/pageQuota/quotation/detail.vue index 02409e3..94410e5 100644 --- a/pageQuota/quotation/detail.vue +++ b/pageQuota/quotation/detail.vue @@ -1,8 +1,149 @@ - - \ No newline at end of file diff --git a/pageQuota/quotation/index.vue b/pageQuota/quotation/index.vue index 0f5e0ab..742448e 100644 --- a/pageQuota/quotation/index.vue +++ b/pageQuota/quotation/index.vue @@ -5,7 +5,7 @@ - + 订单列表 @@ -22,17 +22,26 @@ PF171504442988969633 待报价 + 已成交 + 未成交 - - - + + + + + + - + 共4件 + + 温馨提示:请于2024年05月20日前发货 + @@ -44,6 +53,13 @@ reactive } from "vue" + const navgo = (url) => { + uni.navigateTo({ + url + }) + } + + // 搜索 const keyword = ref('') const searchKeyword = () => { @@ -88,17 +104,18 @@ margin: 20rpx auto; background-color: white; box-sizing: border-box; - padding: 20rpx; - border-radius: 16rpx; + border-radius: 16rpx 16rpx 0 0; position: relative; .card-head { + padding: 20rpx; display: flex; justify-content: space-between; margin-bottom: 12rpx; } .card-content { + padding: 20rpx; overflow-x: auto; white-space: nowrap; padding-right: 152rpx; @@ -108,14 +125,24 @@ width: 152rpx; height: 160rpx; position: absolute; - border: 1px dashed black; + // border: 1px dashed black; display: flex; justify-content: space-around; align-items: center; - top: 60rpx; + top: 100rpx; right: 20rpx; background-color: white; } + + .card-foot { + background-color: #FFF1EC; + color: #FC452F; + text-indent: 2em; + font-size: 24rpx; + height: 74rpx; + line-height: 74rpx; + + } } } \ No newline at end of file diff --git a/pages.json b/pages.json index fac1278..99d9a2a 100644 --- a/pages.json +++ b/pages.json @@ -44,88 +44,103 @@ ], "subPackages": [{ - "root": "pagesOrder", - "pages": [{ - "path": "order/order", - "style": { - "navigationBarTitleText": "我的订单", - "enablePullDownRefresh": false + "root": "pagesOrder", + "pages": [{ + "path": "order/order", + "style": { + "navigationBarTitleText": "我的订单", + "enablePullDownRefresh": false + } + }, + { + "path": "detail/detail", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }, + { + "path": "addressList/addressList", + "style": { + "navigationBarTitleText": "地址管理", + "enablePullDownRefresh": false + } + }, + { + "path": "addressEdit/addressEdit", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }, + { + "path": "settle/settle", + "style": { + "navigationBarTitleText": "确认订单", + "enablePullDownRefresh": false + } } - }, - { - "path": "detail/detail", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false + ] + }, + { + "root": "pageQuota", + "pages": [{ + "path": "quotation/index", + "style": { + "navigationBarTitleText": "报价单", + "enablePullDownRefresh": false + } + }, + { + "path": "quotation/detail", + "style": { + "navigationBarTitleText": "报价明细", + "enablePullDownRefresh": false + } } - }, - { - "path": "addressList/addressList", - "style": { - "navigationBarTitleText": "地址管理", - "enablePullDownRefresh": false - } - }, - { - "path": "addressEdit/addressEdit", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false - } - }, - { - "path": "settle/settle", - "style": { - "navigationBarTitleText": "确认订单", - "enablePullDownRefresh": false - } - } - ] - }, { - "root": "pageQuota", - "pages": [{ - "path": "quotation/index", - "style": { - "navigationBarTitleText": "报价单", - "enablePullDownRefresh": false, - } - } - ] - }], + ] + } - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "", - "navigationBarBackgroundColor": "#fff", - "backgroundColor": "#fff" - }, - // "tabBar": { - // "color": "#999999", - // "selectedColor": "#20b128", - // "borderStyle": "white", - // "backgroundColor": "#FFFFFF", - // "list": [{ - // "pagePath": "pages/index/index", - // "text": "首页", - // "iconPath": "static/tab/a.png", - // "selectedIconPath": "static/tab/aa.png" - // }, - // { - // "pagePath": "pages/cart/cart", - // "text": "购物车", - // "iconPath": "static/tab/b.png", - // "selectedIconPath": "static/tab/ba.png" - // }, - // { - // "pagePath": "pages/my/my", - // "text": "我的", - // "iconPath": "static/tab/c.png", - // "selectedIconPath": "static/tab/ca.png" - // } + ] +}, - // ] - // }, - "uniIdRouter": {} + +], + +"globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#fff", + "backgroundColor": "#fff" +}, +// "tabBar": { +// "color": "#999999", +// "selectedColor": "#20b128", +// "borderStyle": "white", +// "backgroundColor": "#FFFFFF", +// "list": [{ +// "pagePath": "pages/index/index", +// "text": "首页", +// "iconPath": "static/tab/a.png", +// "selectedIconPath": "static/tab/aa.png" +// }, +// { +// "pagePath": "pages/cart/cart", +// "text": "购物车", +// "iconPath": "static/tab/b.png", +// "selectedIconPath": "static/tab/ba.png" +// }, + +// { +// "pagePath": "pages/my/my", +// "text": "我的", +// "iconPath": "static/tab/c.png", +// "selectedIconPath": "static/tab/ca.png" +// } + +// ] +// }, +"uniIdRouter": {} } \ No newline at end of file diff --git a/pagesOrder/settle/settle.vue b/pagesOrder/settle/settle.vue index 065b410..de880b5 100644 --- a/pagesOrder/settle/settle.vue +++ b/pagesOrder/settle/settle.vue @@ -5,6 +5,28 @@ --> + + + + + + 自提点 + + + {{shopInfo.mer_name}} + + {{shopInfo.service_phone}} + {{shopInfo.distance}} + + + + + + 修改 + + @@ -26,38 +48,6 @@ color="#f6f6f6" :customStyle="{color:'#666666'}">修改 - - - - - - 提货人 - - - 姓名 {{shopInfo.service_phone}} - - - - - - 自提点 - - - {{shopInfo.mer_name}} - - 自提点具体地址 - - - - - - - 修改 - - - @@ -108,7 +98,6 @@ --> -<<<<<<< HEAD @@ -123,28 +112,9 @@ - 提交订单 + 提交订单 -======= - - - - 共 {{ cartList.length }} 款 - - 合计: - - - {{c_price(orderInfo.total, 0)}} - .{{c_price(orderInfo.total, 1)}} - - - - - 提交订单 - - ->>>>>>> b6496db8bd748ff7488207e5479f7e6a6d79cbcb @@ -185,7 +155,6 @@ remark: "" }) -<<<<<<< HEAD const isAddress = ref(false); const toastAddressShow = ref(false); @@ -253,7 +222,6 @@ uni.$u.toast('定位失败, 请手动选择提货点!') }, complete: (res) => { - console.log("===", res); myAddressInfo.value.long = res.longitude || ""; myAddressInfo.value.lat = res.latitude || ""; getMerchantList(); @@ -282,167 +250,73 @@ isAddress.value = true; submitOrder(); } -======= - - // 地址相关 - const addressList = ref([]); - const getAddressList = ()=>{ - addressListsApi().then(res=>{ - addressList.value = res.data.lists; - addressList.value.forEach(item=>{ - if(item.is_default) { - addressInfo.value = item; - isAddress.value = true; - } - }) - if(!isAddress.value && addressList.value.length>0){ - addressInfo.value = addressList.value[0]; - isAddress.value = true; - } - }) - } - // 选择地址 - const showAddress = ref(false); - const addressInfo = ref({}); - const changeAddress = (e) => { - addressInfo.value = e; - showAddress.value = false; - isAddress.value = true; - } - const openAddress = ()=>{ - if(addressList.length>0) showAddress.value=true; - else uni.navigateTo({ - url: '/pagesOrder/addressEdit/addressEdit' - }) - } - - // 提货点相关 - const shopListShow = ref(false); - const merchantList = ref([]); - const myAddressInfo = ref({ - long: "", - lat: "" - }) - const shopInfo = ref({ - mer_id: '' - }); - const getMerchantList = (mer_name=null)=>{ - merchantListApi({ - ...myAddressInfo.value, - mer_name: mer_name ? mer_name : '' - }).then(res=>{ - merchantList.value = res.data.lists; - if(mer_name===null && myAddressInfo.value.long && merchantList.value.length>0 && !shopInfo.value.mer_id) { - shopInfo.value = merchantList.value[0]; - } - }) - } - getMerchantList(''); - // 定位 - const LoadAddress = ()=>{ - uni.getLocation({ - success: (res) => { - }, - fail: (err) => { - uni.$u.toast('定位失败, 请手动选择提货点!') - }, - complete: (res) => { - myAddressInfo.value.long = res.longitude || ""; - myAddressInfo.value.lat = res.latitude || ""; - getMerchantList(); - } - }) - } - LoadAddress(); - const changeShop = (e)=>{ - shopInfo.value = e; - shopListShow.value = false; - } - const searchShop = (e)=>{ - getMerchantList(e) - } - - // 选择地址 - const addAddress = () => { - toastAddressShow.value = false; - nextTick(()=>{ - showAddress.value = true; - }) - } - // 继续支付 - const goPay = ()=>{ - toastAddressShow.value = false; - isAddress.value = true; - submitOrder(); - } ->>>>>>> b6496db8bd748ff7488207e5479f7e6a6d79cbcb - // 提交订单 - const submitOrder = () => { - if (!isAddress.value) return toastAddressShow.value = true; - createOrder(); - } - // 订单相关 - const cartList = ref([]); - const orderInfo = ref({}); - const checkOrder = ()=>{ - checkOrderApi({ - cart_id: cartStore.cartList - }).then(res=>{ - cartList.value = res.data.cart_list; - orderInfo.value = res.data.order; - }) - } - const createOrder = ()=>{ - createOrderApi({ - cart_id: cartStore.cartList, - address_id: addressInfo.value.address_id, - mer_id: shopInfo.value.mer_id, - pay_type: 1 - }).then(res=>{ - if(!res.data?.nonceStr) return uni.$u.toast('支付失败!'); - uni.requestPayment({ - provider: 'wxpay', - timeStamp: res.data.timeStamp, - nonceStr: res.data.nonceStr, - package: res.data.package, - signType: res.data.signType, - paySign: res.data.paySign, - success: (e) => { - if(e.errMsg == 'requestPayment:ok'){ - uni.showModal({ - title: '订单支付成功', - confirmText: '查看订单', - cancelText: '继续购买', - success: (e) => { - if(e.confirm) uni.navigateTo({ - url: '/pagesOrder/order/order' - }) - else uni.navigateBack(); - } - }) - }else uni.$u.toast('支付失败') - }, - fail: (e) => { - uni.$u.toast('用户取消支付') - } - }) - }).catch(err=>{ - uni.$u.toast('网络错误') - }) - } - - const c_price = (price, index=0)=>{ - price = price + ''; - return price.split('.')[index] || (index ? '00' : '0'); - } - - onLoad(options=>{ - checkOrder(); - }) - onShow(()=>{ - getAddressList(); - }) + // 提交订单 + const submitOrder = () => { + if (!isAddress.value) return toastAddressShow.value = true; + createOrder(); + } + // 订单相关 + const cartList = ref([]); + const orderInfo = ref({}); + const checkOrder = () => { + checkOrderApi({ + cart_id: cartStore.cartList + }).then(res => { + cartList.value = res.data.cart_list; + orderInfo.value = res.data.order; + }) + } + const createOrder = () => { + createOrderApi({ + cart_id: cartStore.cartList, + address_id: addressInfo.value.address_id, + mer_id: shopInfo.value.mer_id, + pay_type: 1 + }).then(res => { + if (!res.data?.nonceStr) return uni.$u.toast('支付失败!'); + uni.requestPayment({ + provider: 'wxpay', + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.package, + signType: res.data.signType, + paySign: res.data.paySign, + success: (e) => { + if (e.errMsg == 'requestPayment:ok') { + uni.showModal({ + title: '订单支付成功', + confirmText: '查看订单', + cancelText: '继续购买', + success: (e) => { + if (e.confirm) uni.navigateTo({ + url: '/pagesOrder/order/order' + }) + else uni.navigateBack(); + } + }) + } else uni.$u.toast('支付失败') + }, + fail: (e) => { + uni.$u.toast('用户取消支付') + } + }) + }).catch(err => { + uni.$u.toast('网络错误') + }) + } + + const c_price = (price, index = 0) => { + price = price + ''; + return price.split('.')[index] || (index ? '00' : '0'); + } + + onLoad(options => { + checkOrder(); + }) + onShow(() => { + getAddressList(); + })