Compare commits

..

No commits in common. 'aac6ef4e1e3967d6830383b324e8afa3eb9f7df4' and '2612c48d8ddd440e3ef171f947fcc1164d258088' have entirely different histories.

  1. 4
      Utils/physicalObject.js
  2. 66
      components/cart-choose/cart-choose.vue
  3. 1
      components/goods-list/goods-list.vue
  4. 7
      components/pick-regions/pick-regions.vue
  5. 95
      components/uni-combox/components/uni-combox/uni-combox.vue
  6. 44
      pages.json
  7. 1
      pages/tabBar/classify/classify.vue
  8. 42
      pages/tabBar/home/home.vue
  9. 2
      pages/tabBar/user/user.vue
  10. 422
      physical-merchants/address/addNewAddress/addNewAddress.vue
  11. 167
      physical-merchants/classify/order/orderDetail.vue
  12. 4
      physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue
  13. 2
      physical-merchants/settleAccounts/settleAccounts.vue
  14. 11
      uni.scss
  15. 13
      uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue

@ -71,10 +71,6 @@ export const insertDeliveryAddress = params => {
return POST('POST', `${base}/deliveryAddress/insertDeliveryAddress`, params).then(res => res.data); return POST('POST', `${base}/deliveryAddress/insertDeliveryAddress`, params).then(res => res.data);
} }
export const baiduApiMapSearch = params => {
return POST('GET', `${base}/common/gaoDeApiMapSearch`, params).then(res => res.data);
}
// 更新收货地址 // 更新收货地址
export const updateDeliveryAddress = params => { export const updateDeliveryAddress = params => {
return POST('POST', `${base}/deliveryAddress/updateDeliveryAddress`, params).then(res => res.data); return POST('POST', `${base}/deliveryAddress/updateDeliveryAddress`, params).then(res => res.data);

@ -55,49 +55,41 @@
</view> </view>
<!-- 数量分类 --> <!-- 数量分类 -->
<view v-if="status != 3" class="choose-bottom-title paddbotm10 fontwig6 font14 mart15 choose-num"> <view class="choose-bottom-title paddbotm10 fontwig6 font14 mart15 choose-num">
<view class="">购买数量</view> <view class="">购买数量</view>
<uni-number-box v-model="chooseNumber" :disabled="specificationList[chooseIndex].stock==0" :min="1" :max="specificationList[chooseIndex].stock || 9999999" @noMoreLess="noMoreLess" @noMore="noMore" @change="changeNumValue" /> <uni-number-box v-model="chooseNumber" :disabled="specificationList[chooseIndex].stock==0" :min="1" :max="specificationList[chooseIndex].stock || 9999999" @noMoreLess="noMoreLess" @noMore="noMore" @change="changeNumValue" />
</view> </view>
</view> </view>
<!-- <template v-if="isShowButton"> --> <view class="choose-cart" v-if="specificationList[chooseIndex].stock==0">
<view class="choose-way" >
<view class="choose-cart" v-if="specificationList[chooseIndex].stock==0"> <view class="fcorfff way1 bgcolor-qh" @click="noStock">
<view class="choose-way" > 暂无库存
<view class="fcorfff way1 bgcolor-qh" @click="noStock">
暂无库存
</view>
</view> </view>
</view> </view>
<view class="choose-cart" v-else> </view>
<view class="choose-cart" v-else>
<view class="choose-way" v-if="status == 1">
<view class="fcorfff way bgcolor-left" @click="toCart"> <view class="choose-way" v-if="status == 1">
加入购物车 <view class="fcorfff way bgcolor-left" @click="toCart">
</view> 加入购物车
<view class="fcorfff way bgcolor-ri" @click="toBuy">
立即购买
</view>
</view> </view>
<view class="choose-way" v-if="status == 0"> <view class="fcorfff way bgcolor-ri" @click="toBuy">
<view class="fcorfff way1 bgcolor-left" @click="toCart"> 立即购买
加入购物车
</view>
</view> </view>
<view class="choose-way" v-if="status == 2"> </view>
<view class="fcorfff way1 bgcolor-left" @click="toBuy"> <view class="choose-way" v-if="status == 0">
立即购买 <view class="fcorfff way1 bgcolor-left" @click="toCart">
</view> 加入购物车
</view> </view>
<view class="choose-way" v-if="status == 3"> </view>
<view class="fcorfff way1 bgcolor-left" @click="toSelect"> <view class="choose-way" v-if="status == 2">
确定选择 <view class="fcorfff way1 bgcolor-left" @click="toBuy">
</view> 立即购买
</view> </view>
</view> </view>
<!-- </template> --> </view>
</view> </view>
@ -126,9 +118,9 @@
return [] return []
}, },
}, },
// 0,1. 2: // 0,1
status:{ status:{
type:[Number,String], type:Number,
default:0, default:0,
}, },
goodsDetail:{ goodsDetail:{
@ -136,10 +128,6 @@
default() { default() {
return {} return {}
} }
},
isShowButton:{
type:Boolean,
default:true,
} }
}, },
watch:{ watch:{
@ -253,12 +241,6 @@
}, },
//
toSelect(){
this.$emit('close',this.specificationList[this.chooseIndex])
},
// //
toBuy(){ toBuy(){

@ -595,7 +595,6 @@
.goods-item-bottom .new-price { .goods-item-bottom .new-price {
color: #3DA7E7; color: #3DA7E7;
font-weight: bold; font-weight: bold;
font-size: 18px;
} }
.goods-item-bottom .old-price { .goods-item-bottom .old-price {

@ -83,7 +83,6 @@
}else if(region){ //&&region.length == 6 }else if(region){ //&&region.length == 6
this.handleDefaultRegion(region) this.handleDefaultRegion(region)
}else{ }else{
console.log(region) console.log(region)
console.warn('defaultRegion非有效格式') console.warn('defaultRegion非有效格式')
} }
@ -196,15 +195,9 @@
if(i==0 && j==(children.length-1)){ if(i==0 && j==(children.length-1)){
this.isInitMultiArray = true; this.isInitMultiArray = true;
} }
this.$emit('failreagion')
} }
} }
} }
let address = [this.CHINA_REGIONS[this.multiIndex[0]],this.cityArr[this.multiIndex[1]],this.districtArr[this.multiIndex[2]]];
this.$emit('getRegion',address)
} }
}, },
} }

@ -4,31 +4,17 @@
<text>{{label}}</text> <text>{{label}}</text>
</view> </view>
<view class="uni-combox__input-box"> <view class="uni-combox__input-box">
<input v-if="isShowIcon" class="uni-combox__input" type="text" :placeholder="placeholder" :placeholder-class="placeholderClass" v-model="inputVal" @input="onInput" <input class="uni-combox__input" type="text" :placeholder="placeholder" v-model="inputVal" @input="onInput"
@focus="onFocus" @blur="onBlur" /> @focus="onFocus" @blur="onBlur" />
<textarea v-if="!isShowIcon" :cursor-spacing="110" v-model.trim="inputVal" class="uni-combox__input2" :placeholder="placeholder" :placeholder-class="placeholderClass" @input="onInput" <uni-icons class="uni-combox__input-arrow" type="arrowdown" size="14" @click="toggleSelector"></uni-icons>
@focus="onFocus" @blur="onBlur"></textarea> <view class="uni-combox__selector" v-if="showSelector">
<uni-icons class="uni-combox__input-arrow" v-if="isShowIcon" type="arrowdown" size="14" @click="toggleSelector"></uni-icons> <scroll-view scroll-y="true" class="uni-combox__selector-scroll">
<!-- <view v-if="!isShowIcon" class="icon location foc3da7e7" @click="location"></view> -->
<view :class="' uni-combox__selector '+(isAddress?' topmore ': ' ')" v-if="showSelector">
<scroll-view v-if="isShowIcon" scroll-y="true" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0"> <view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
<text>{{emptyTips}}</text> <text>{{emptyTips}}</text>
</view> </view>
<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index" @click="onSelectorClick(index)"> <view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index" @click="onSelectorClick(index)">
<text>{{item}}</text> <text>{{item}}</text>
</view> </view>
</scroll-view>
<!-- -->
<scroll-view v-else scroll-y="true" :style="'max-height:'+height+'px'" class="uni-combox__selector-scroll">
<view class="uni-combox__selector-empty" v-if="candidates.length === 0">
<text>{{emptyTips}}</text>
</view>
<view v-else class="uni-combox__selector-item se-t" @click="toggleSelector" >
<slot></slot>
</view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
@ -70,27 +56,11 @@
}, },
emptyTips: { emptyTips: {
type: String, type: String,
default: '无匹配项' default: '无匹配项'
}, },
value: { value: {
type: [String, Number], type: [String, Number],
default: '' default: ''
},
isAddress:{
type:Boolean,
default:false
},
isShowIcon:{
type:Boolean,
default:true
},
placeholderClass:{
type: String,
default: ''
},
height:{
type:Number,
default:0,
} }
}, },
data() { data() {
@ -126,38 +96,13 @@
} }
}, },
methods: { methods: {
location(){
this.showSelector = !this.showSelector
if(this.isAddress&&this.showSelector){
this.$emit("location")
}
},
toggleSelector() { toggleSelector() {
this.showSelector = !this.showSelector this.showSelector = !this.showSelector
}, },
onFocus() { onFocus() {
this.$emit("focus"); this.showSelector = true
if(this.isAddress){
this.showSelector = false
}else{
this.showSelector = true
}
}, },
onBlur() {
async onBlur() {
this.$emit("blur")
if(this.isAddress){
if(this.inputVal==""){
this.showSelector = false;
}else{
this.showSelector = true;
}
return
}
setTimeout(() => { setTimeout(() => {
this.showSelector = false this.showSelector = false
}, 153) }, 153)
@ -181,7 +126,7 @@
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
/* #endif */ /* #endif */
// height: 40px; height: 40px;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
// border-bottom: solid 1px #DDDDDD; // border-bottom: solid 1px #DDDDDD;
@ -210,17 +155,7 @@
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
} }
.uni-combox__input2 {
flex: 1;
font-size: 16px;
line-height: 22px;
width: 100%;
background-color: #f6f6f6;
border-radius: 8px;
box-sizing: border-box;
padding: 10px;
height: 100px;
}
.uni-combox__input-arrow { .uni-combox__input-arrow {
padding: 10px; padding: 10px;
} }
@ -234,19 +169,13 @@
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 6px; border-radius: 6px;
box-shadow: #DDDDDD 4px 4px 8px, #DDDDDD -4px -4px 8px; box-shadow: #DDDDDD 4px 4px 8px, #DDDDDD -4px -4px 8px;
z-index: 100; z-index: 2;
}
.uni-combox__selector.topmore{
top:110px;
// bottom: 75px;
} }
.uni-combox__selector-scroll { .uni-combox__selector-scroll {
max-height: 200px; max-height: 200px;
box-sizing: border-box; box-sizing: border-box;
} }
.uni-combox__selector::before { .uni-combox__selector::before {
content: ''; content: '';
@ -257,7 +186,7 @@
border-right: solid 6px transparent; border-right: solid 6px transparent;
border-left: solid 6px transparent; border-left: solid 6px transparent;
left: 50%; left: 50%;
top: -4px; top: -6px;
margin-left: -6px; margin-left: -6px;
} }

@ -1125,7 +1125,7 @@
{ {
"path": "address/addNewAddress/addNewAddress", "path": "address/addNewAddress/addNewAddress",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "新增地址",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@ -1164,7 +1164,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
// {
// "path": "wuliu/wuliu",
// "style": {
// "navigationBarTitleText": "物流信息",
// "enablePullDownRefresh": false
// }
// },
{ {
"path": "classify/order/pay", "path": "classify/order/pay",
"style": { "style": {
@ -1183,40 +1189,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
// ,
// {
// "path": "applyRefund/applyRefund",
// "style": {
// // "navigationBarTitleText": "",
// "enablePullDownRefresh": false
// }
// },
// {
// "path": "applyRefund/selectApplyRefund",
// "style": {
// "navigationBarTitleText": "申请售后",
// "enablePullDownRefresh": false
// }
// },
// {
// "path": "applyRefund/refundDetail",
// "style": {
// "navigationBarTitleText": "退款详情",
// "enablePullDownRefresh": false
// }
// },
// {
// "path": "applyRefund/fillRefundWuliu",
// "style": {
// "navigationBarTitleText": "填写退货物流",
// "enablePullDownRefresh": false
// }
// }
] ]
} }

@ -264,7 +264,6 @@
pageNum:_this.pageData.pageStart, pageNum:_this.pageData.pageStart,
pageSize:_this.pageData.pageNum, pageSize:_this.pageData.pageNum,
price:price, price:price,
companyId:app.globalData.companyId
} }
// uni.showLoading({ // uni.showLoading({

@ -221,11 +221,43 @@
}, },
onShow() { onShow() {
// this.homeCateList = []; this.homeCateList = [];
// if (app.globalData.cityName != '') { if (app.globalData.cityName != '') {
// this.city = app.globalData.qianzhuCityName; this.city = app.globalData.qianzhuCityName;
// this.getCmsContentcmsContent(); this.getCmsContentcmsContent();
// } }
// #ifdef H5
// uni.getStorage({
// key: 'accountId',
// success(e) {
// if (e.data) {
// app.globalData.accountId = e.data;
// }
// }
// })
// uni.getStorage({
// key: 'gasKey',
// success(e) {
// if (e.data) {
// app.globalData.gasKey = e.data;
// }
// }
// })
// uni.getStorage({
// key: 'staffCode',
// success(e) {
// if (e.data) {
// if (app.globalData.accountId == '000001&key' || app.globalData.accountId ==
// '000000&gasKey' || app.globalData.accountId == '000009&key' || app.globalData
// .accountId == '0000010&key') {
// app.globalData.staffCode = e.data;
// } else {
// app.globalData.mchId = e.data;
// }
// }
// }
// })
// #endif
}, },
onLoad(options) { onLoad(options) {
let that = this; let that = this;

@ -252,7 +252,7 @@
onLoad() { onLoad() {
if (!app.globalData.userInfo) { if (!app.globalData.userInfo) {
this.findUser(); this.findUser();
// this.queryHzfDiscountTotalNum(); this.queryHzfDiscountTotalNum();
} }
}, },
onReady() { onReady() {

@ -1,74 +1,65 @@
<template> <template>
<view class="page-bottom-fixed backcor9" > <view class="page-bottom-fixed backcor9">
<form @submit="form_submit" class="form-container"> <form @submit="form_submit" class="form-container">
<view class="pd-main border-box height100" :style="'overflow-y: auto;transform: translateY(-0px);'" > <view class="pd-main height100">
<view class="form-gorup backcolorfff"> <view class="form-gorup backcolorfff">
<view class="dis-flex"> <!-- <view class="form-gorup-item-left">
<view class="form-gorup-title marRight10">收货人: <view class="form-gorup-title marb10">联系人<text class="form-group-tips-must">*</text></view>
</view> <input type="text" name="name" v-model="userAddress.name" maxlength="5"
<input type="text" name="name" v-model="userAddress.name" placeholder-class="corf6" placeholder-class="corf6" class="fcor666 " placeholder="联系人2~5个字符">
class=" flex-1 bs-bb" placeholder="名字">
</view> </view>
<view class="form-gorup-item-right">
<view class="form-gorup-title marb10">联系电话<text class="form-group-tips-must">*</text></view>
<input type="number" name="tel" v-model="userAddress.tel" maxlength="11"
placeholder-class="corf6" class="fcor666" placeholder="手机号">
</view> -->
<!-- -->
<view class="form-gorup-title">联系人<text class="form-group-tips-must">*</text>
</view>
<input type="text" name="name" v-model="userAddress.name"
placeholder-class="corf6" class="fcor666 bs-bb" placeholder="联系人2~5个字符">
<view class="width100 mart10 border-b"> <view class="width100 mart10 border-b">
</view> </view>
<view class="dis-flex"> <view class="form-gorup-title">联系电话<text class="form-group-tips-must">*</text>
<view class="form-gorup-title marRight10">手机号码:
</view>
<input type="number" name="tel" v-model="userAddress.tel" maxlength="11"
placeholder-class="corf6" class=" flex-1" placeholder="手机号">
</view> </view>
<input type="number" name="tel" v-model="userAddress.tel" maxlength="11"
placeholder-class="corf6" class="fcor666" placeholder="手机号">
<!-- --> <!-- -->
</view> </view>
<view class="form-gorup backcolorfff"> <view class="form-gorup backcolorfff">
<view class=""> <view class="">
<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion"> <pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion">
<view class="dis-flex "> <view class="dis-flex flex-sp form-gorup-title">
<view class=" form-gorup-title">所在地区:</view> <view class=" flex-1">点击选择省市区<text class="form-group-tips-must">必选</text></view>
<view class="dis-flex flex-1 flex-end">
<view class=" pickRes ">{{userAddress.region || '请选择'}}</view> <view class="icon-ymt to-right font14 fcor666">
<view class="icon-ymt to-right font14 fcor666"></view>
</view>
</view>
</pick-regions>
</view>
<view class="width100 mart10 border-b">
</view>
<!-- <view style="clear: both;"> -->
<view class="dis-flex scrol-t mart10">
<view class="form-gorup-title marRight10 align-self" style="padding: 0;">详细地址:</view>
<uni-combox :height="height" @focus="focusMethod" @blur="blurMethod" :cursorSpacing="50" placeholderClass="corf6" :candidates="candidates" class="flex-1" :isAddress="true" :isShowIcon="false" placeholder="请输入详细地址" v-model="userAddress.address">
<view class="selector-item" v-for="(item,index) in candidates" :key="index" @click="getSelect(item)">
<view class="text1 name">
{{item.name}}
</view>
<view class="text1 address mart5">
{{item.address}}
</view>
</view> </view>
</view>
</pick-regions>
</uni-combox> <view class=" pickRes fcor666" >{{userAddress.region || '请选择'}}</view>
<!-- <input type="text" name="address" v-model="userAddress.address" maxlength="40"
placeholder-class="corf6" :class="'fcor666 bs-bb flex-1'" placeholder="详细地址1~40个字符"> -->
</view> </view>
<view class="width100 mart10 border-b">
</view>
<!-- </view> --> <view style="clear: both;">
<view class="form-gorup-title">详细地址<text class="form-group-tips-must">*</text>
</view>
<input type="text" name="address" v-model="userAddress.address" maxlength="40"
placeholder-class="corf6" :class="'fcor666 bs-bb '" placeholder="详细地址1~40个字符">
</view>
</view> </view>
@ -77,28 +68,22 @@
<text class="font18">设为默认地址</text> <text class="font18">设为默认地址</text>
</view> </view>
<view class="bottom-fixed ">
<button class="btn " type="default" form-type="submit">保存</button>
</view>
</view> </view>
<view class="bottom-fixed ">
<button class="btn " type="default" form-type="submit">保存</button>
</view>
</form> </form>
</view> </view>
</template> </template>
<script> <script>
import pickRegions from '@/components/pick-regions/pick-regions.vue' import pickRegions from '@/components/pick-regions/pick-regions.vue'
import UniCombox from '@/components/uni-combox/components/uni-combox/uni-combox.vue'
import { import {insertDeliveryAddress,findDeliveryAddressById,updateDeliveryAddress } from '@/Utils/physicalObject.js'
insertDeliveryAddress,
findDeliveryAddressById,
updateDeliveryAddress,
baiduApiMapSearch
} from '@/Utils/physicalObject.js'
let app = getApp();
export default { export default {
data() { data() {
return { return {
@ -108,52 +93,40 @@
region: '', region: '',
address: "", address: "",
is_default: false, is_default: false,
}, },
dataParams: null, dataParams: null,
// //
region: [], region: [],
regionId: '', regionId:'',
// //
// defaultRegion: ['', '', ''], defaultRegion: ['北京市', '市辖区', '东城区'],
defaultRegionCode: '', defaultRegionCode: '110101',
candidates:[
// {"name": "-","address": "189",},
// {"name": "-","address": "189",},
// {"name": "-","address": "189",}
],
top:0,
top1:0,
height:0,
}; };
}, },
components: { components: {
pickRegions, pickRegions
"uni-combox":UniCombox
}, },
onLoad(params) { onLoad(params) {
// console.log(params)
this.dataParams = params this.dataParams = params
}, },
watch: { watch:{
'userAddress.name': { 'userAddress.name':{
handler(n) { handler(n) {
if (n.length > 5) { if(n.length>5){
setTimeout(() => { setTimeout(()=>{
this.userAddress.name = this.userAddress.name.substr(0, 5) this.userAddress.name = this.userAddress.name.substr(0,5)
}, 0) },0)
} }
}, },
}, },
}, },
computed: { computed: {
// regionName() { // regionName() {
// // // //
// // console.log('==============='+this.region.map(item => item)) // // console.log('==============='+this.region.map(item => item))
@ -162,84 +135,38 @@
// } // }
}, },
onReady() { onReady() {
let str = ""
if (this.dataParams && this.dataParams.id) {
str = "地址编辑"
} else {
str = "地址添加"
}
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: str, title: '地址'+(((this.dataParams.id || null) == null) ? '添加' : '编辑')
}); });
if (this.dataParams && this.dataParams.id) { if(this.dataParams.id){
this.findAddressById(this.dataParams.id) this.findAddressById(this.dataParams.id)
} }
}, },
async mounted() {
await this.getRect('.scrol-t').then(res => {
this.top = res.top;
})
await this.getRect('.bottom-fixed').then(res => {
this.top1 = res.top;
})
this.height = this.top1 - this.top - 120;
// console.log(this.top1,this.top,this.height)
},
methods: { methods: {
findAddressById(id){
focusMethod(){
},
blurMethod(){
this.baiduApiMap(this.userAddress.address)
},
getRect(selector, all) {
return new Promise(resolve => {
uni.createSelectorQuery()
.in(this)
[all ? 'selectAll' : 'select'](selector)
.boundingClientRect(rect => {
if (all && Array.isArray(rect) && rect.length) {
resolve(rect);
}
if (!all && rect) {
resolve(rect);
}
})
.exec();
});
},
findAddressById(id) {
let params = { let params = {
id: id id:id
} }
findDeliveryAddressById(params).then(res => { findDeliveryAddressById(params).then(res=>{
if (res.return_code == '000000') { if (res.return_code == '000000') {
let resData = res.return_data; let resData = res.return_data;
this.userAddress = { this.userAddress = {
name: resData.consignee, name: resData.consignee,
tel: resData.phone, tel: resData.phone,
region: resData.regionName, region: resData.regionName,
address: resData.address, address: resData.address,
is_default: resData.whetherDefault, is_default: resData.whetherDefault,
} }
// console.log(this.defaultRegionCode) // console.log(this.defaultRegionCode)
this.defaultRegionCode = resData.regionId; this.defaultRegionCode = resData.regionId;
this.regionId = resData.regionId; this.regionId = resData.regionId;
// console.log(this.defaultRegionCode) // console.log(this.defaultRegionCode)
} else { }else{
uni.showToast({ uni.showToast({
title: res.return_msg, title: res.return_msg,
icon: 'none', icon: 'none',
@ -248,77 +175,27 @@
} }
}) })
}, },
// //
handleGetRegion(region) { handleGetRegion(region) {
// let region = JSON.parse(JSON.stringify(reg)) // let region = JSON.parse(JSON.stringify(reg))
this.region = region; this.region = region;
this.regionId = this.region[2].code; this.regionId = this.region[2].code;
if (region[0].code == region[1].code && region[0].code == region[2].code) { if(region[0].code == region[1].code&&region[0].code == region[2].code){
this.userAddress.region = this.region[0].name this.userAddress.region = this.region[0].name
} else { }else{
this.userAddress.region = this.region.map(item => item.name).join(','); this.userAddress.region = this.region.map(item => item.name).join(',');
} }
// console.log(this.userAddress.region, "", this.regionId, this.region) console.log(this.userAddress.region,"获取选择的地区",this.regionId,this.region)
}, },
// //
init() { init() {
}, },
// //onInput
// location(n){
// // this.userAddress.address = this.userAddress.address.replace(/\s+/g, "")
// },
baiduApiMap(query){
query = query.replace(/\s+/g, "")
let params={
query:query
}
uni.showLoading({
title: '加载中',
mask:true,
});
// console.log(params,"params")
baiduApiMapSearch(params).then(res=>{
uni.hideLoading();
console.log(res)
if (res.return_code == '000000') {
if(res.return_data&&res.return_data.length>0){
this.candidates = res.return_data;
}else{
this.candidates=[]
}
}else{
this.candidates=[]
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
//
getSelect(desc){
// console.log(desc)
this.defaultRegionCode = desc.adcode ;
this.userAddress.address =desc.name + desc.address;
uni.showToast({
icon:'none',
title:"所在地区同步修改"
})
},
// //
defaultChange(e) { defaultChange(e) {
@ -329,10 +206,6 @@
// //
form_submit() { form_submit() {
this.userAddress.name = this.userAddress.name.replace(/\s+/g, "")
this.userAddress.tel = this.userAddress.tel.replace(/\s+/g, "")
this.userAddress.address = this.userAddress.address.replace(/\s+/g, "")
// //
var validation = [{ var validation = [{
fields: "name", fields: "name",
@ -341,7 +214,7 @@
{ {
fields: "tel", fields: "tel",
msg: "请填写联系电话", msg: "请填写联系电话",
vali: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ vali:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
}, },
{ {
fields: "region", fields: "region",
@ -354,35 +227,35 @@
]; ];
this.fields_check(this.userAddress, validation) this.fields_check(this.userAddress, validation)
let isVali = this.fields_check(this.userAddress, validation); let isVali = this.fields_check(this.userAddress, validation);
if (isVali) { if(isVali){
if (this.dataParams.id) { if(this.dataParams.id){
this.updateAddress(this.dataParams.id) this.updateAddress(this.dataParams.id)
} else { }else{
this.addAddress() this.addAddress()
} }
} }
}, },
updateAddress(id) { updateAddress(id){
let _this = this; let _this = this;
let params = { let params ={
"id": id, "id": id,
"address": _this.userAddress.address, "address": _this.userAddress.address,
"consignee": _this.userAddress.name, "consignee": _this.userAddress.name,
"phone": _this.userAddress.tel, "phone": _this.userAddress.tel,
"regionId": _this.regionId, "regionId": _this.regionId,
"regionName": _this.userAddress.region, "regionName":_this.userAddress.region,
"whetherDefault": _this.userAddress.is_default "whetherDefault": _this.userAddress.is_default
} }
updateDeliveryAddress(params).then(res => { updateDeliveryAddress(params).then(res=>{
let title; let title ;
if (res.return_code == '000000') { if (res.return_code == '000000') {
title = res.return_data; title = res.return_data;
} else { }else{
title = res.return_msg; title = res.return_msg;
} }
uni.showToast({ uni.showToast({
@ -391,28 +264,28 @@
duration: 2000 duration: 2000
}) })
// //
this.backPageRefresh(); this.backPageRefresh();
}) })
}, },
backPageRefresh() { backPageRefresh() {
uni.navigateBack({}) uni.navigateBack({})
}, },
addAddress() { addAddress(){
let _this = this; let _this = this;
let params = { let params={
"address": _this.userAddress.address, "address": _this.userAddress.address,
"consignee": _this.userAddress.name, "consignee": _this.userAddress.name,
"phone": _this.userAddress.tel, "phone": _this.userAddress.tel,
"regionId": _this.regionId, "regionId": _this.regionId,
"regionName": _this.userAddress.region, "regionName":_this.userAddress.region,
"whetherDefault": _this.userAddress.is_default "whetherDefault": _this.userAddress.is_default
} }
// console.log(params,this.userAddress) // console.log(params,this.userAddress)
insertDeliveryAddress(params).then(res => { insertDeliveryAddress(params).then(res=>{
let title; let title ;
if (res.return_code == '000000') { if (res.return_code == '000000') {
title = res.return_data; title = res.return_data;
} else { }else{
title = res.return_msg; title = res.return_msg;
} }
uni.showToast({ uni.showToast({
@ -420,14 +293,14 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
// //
_this.backPageRefresh() _this.backPageRefresh()
}) })
}, },
/** /**
* 字段数据校验 * 字段数据校验
* data 待校验的数据, 一维json对象 * data 待校验的数据, 一维json对象
@ -445,10 +318,10 @@
}); });
return false; return false;
} }
if (validation[i]["vali"]) { if(validation[i]["vali"]){
// console.log(validation[i]["vali"].test(this.userAddress.tel),this.userAddress.tel) // console.log(validation[i]["vali"].test(this.userAddress.tel),this.userAddress.tel)
if (!(validation[i]["vali"].test(this.userAddress.tel))) { if(!(validation[i]["vali"].test(this.userAddress.tel))){
uni.showToast({ uni.showToast({
title: "请输入正确格式的手机号码", title: "请输入正确格式的手机号码",
duration: 1000, duration: 1000,
@ -457,7 +330,7 @@
return false; return false;
} }
} }
} }
return true; return true;
}, },
@ -472,13 +345,12 @@
.bottom-fixed { .bottom-fixed {
position: fixed; position: fixed;
left: 10%; left: 10%;
bottom: var(--window-bottom); bottom:var(--window-bottom);
border: none; border: none;
width: 80%; width: 80%;
box-sizing: border-box; box-sizing: border-box;
z-index: 2; z-index: 2;
.btn{
.btn {
height: 60px; height: 60px;
border-radius: 30px; border-radius: 30px;
background-color: #3da7e7; background-color: #3da7e7;
@ -492,24 +364,21 @@
.page-bottom-fixed { .page-bottom-fixed {
height: calc(100vh - var(--window-top)); height: calc(100vh - var(--window-top));
padding-bottom: 75px; padding-bottom: 100px;
box-sizing: border-box; box-sizing: border-box;
overflow-y: auto;
} }
/*表单*/ /*表单*/
.form-container { .form-container {
height: 100%; height: 100%;
/* display: flex;
flex-direction: column; */
.form-gorup { .form-gorup {
padding: 20rpx; padding: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 20rpx; border-radius: 20rpx;
// overflow: auto; overflow: auto;
.pickRes, .pickRes , input {
input {
border-radius: 0; border-radius: 0;
box-sizing: border-box; box-sizing: border-box;
font-size: 18px; font-size: 18px;
@ -526,9 +395,6 @@
margin-bottom: 5rpx; margin-bottom: 5rpx;
font-weight: 500; font-weight: 500;
font-size: 18px; font-size: 18px;
width: 74px;
white-space: nowrap;
text-align: right;
} }
} }
@ -542,31 +408,5 @@
font-size: 24rpx; font-size: 24rpx;
color: #f00; color: #f00;
} }
.selector-item {
font-size: 16px;
text-align: center;
border-bottom: solid 1px #DDDDDD;
padding: 10px;
cursor: pointer;
text-align: left;
.name{
height: 18px;
line-height: 18px;
color: #3da7e7;
font-size: 16px;
font-weight: bold;
}
.address{
font-size: 14px;
height: 16px;
line-height: 16px;
color: #666666;
}
}
</style> </style>

@ -40,8 +40,30 @@
<view class=" pd-main backcolorfff border-8r"> <view class=" pd-main backcolorfff border-8r">
<!-- 商品信息 --> <!-- 商品信息 -->
<view v-for="(item,index) in goodsList" :key="index" class="paddtop10 border-b-666 "> <view v-for="(item,index) in goodsList" :key="index" class="paddbotm10 flex-center-sp">
<view class="flex-center-sp"> <view class="">
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image>
</view>
<view class="flex-1 flex-center-sp">
<view class="width60 paddleft10">
<view class="marb10 font16 fontwig6">{{item.goodsName}}</view>
<view class="marb5 font13 fcor666">规格: {{item.goodsSpecName}}</view>
<view class="fcor666 font12">数量: {{item.saleCount}}</view>
</view>
<view class="font16 tr align-fs">
<view class="fontwig6" v-if="recinfo.memDiscountId">¥ {{item.goodsPrice}}</view>
<view class="fontwig6" v-if="!recinfo.memDiscountId">¥ {{item.goodsActualPrice}}</view>
</view>
</view>
</view>
<!-- 当商品超过3个的时候 -->
<view v-if="!moreThanThree&&isShow" class="goodsMore flex-center" @click="checkMore">
还有{{goodsList2.length}}种商品<text class="icon-ymt to-down"></text>
</view>
<block v-if="moreThanThree">
<view v-for="(item,index) in goodsList2" :key="index" class="paddbotm10 flex-center-sp">
<view class=""> <view class="">
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image> <image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image>
</view> </view>
@ -51,49 +73,11 @@
<view class="marb5 font13 fcor666">规格: {{item.goodsSpecName}}</view> <view class="marb5 font13 fcor666">规格: {{item.goodsSpecName}}</view>
<view class="fcor666 font12">数量: {{item.saleCount}}</view> <view class="fcor666 font12">数量: {{item.saleCount}}</view>
</view> </view>
<view class="font16 tr align-fs"> <view class="font16 tr align-fs">
<view class="fontwig6" v-if="recinfo.memDiscountId">¥ {{item.goodsPrice}}</view> <view class="fontwig6" v-if="recinfo.memDiscountId">¥ {{item.goodsPrice}}</view>
<view class="fontwig6" v-if="!recinfo.memDiscountId">¥ {{item.goodsActualPrice}}</view> <view class="fontwig6" v-if="!recinfo.memDiscountId">¥ {{item.goodsActualPrice}}</view>
</view>
</view>
</view>
<view class="dis-flex flex-end paddtop10 paddbotm10 ">
<!-- 已支付 判断发货与否申请退款申请售后 -->
<!-- <view class="btn1" v-if="recinfo.orderStatus == 2" @click="applyRefund">申请退款</view> -->
<view class="btn1" v-if="recinfo.orderStatus != 1 && recinfo.orderStatus != 5" @click="checkWuliu(item.id,item.ext6)">查看物流</view>
</view>
</view>
<!-- 当商品超过3个的时候 -->
<view v-if="!moreThanThree&&isShow" class="goodsMore flex-center" @click="checkMore">
还有{{goodsList2.length}}种商品<text class="icon-ymt to-down"></text>
</view>
<block v-if="moreThanThree">
<view v-for="(item,index) in goodsList2" :key="index" class="paddtop10 border-b-666 ">
<view class="flex-center-sp">
<view class="">
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image>
</view> </view>
<view class="flex-1 flex-center-sp">
<view class="width60 paddleft10">
<view class="marb10 font16 fontwig6">{{item.goodsName}}</view>
<view class="marb5 font13 fcor666">规格: {{item.goodsSpecName}}</view>
<view class="fcor666 font12">数量: {{item.saleCount}}</view>
</view>
<view class="font16 tr align-fs">
<view class="fontwig6" v-if="recinfo.memDiscountId">¥ {{item.goodsPrice}}</view>
<view class="fontwig6" v-if="!recinfo.memDiscountId">¥ {{item.goodsActualPrice}}</view>
</view>
</view>
</view>
<view class="dis-flex flex-end paddtop10 paddbotm10 ">
<!-- 已支付 判断发货与否申请退款申请售后 -->
<!-- <view class="btn1" v-if="recinfo.orderStatus == 2" @click="applyRefund">申请退款</view> -->
<view class="btn1" v-if="recinfo.orderStatus != 1 && recinfo.orderStatus != 5" @click="checkWuliu(item.id,item.ext6)">查看物流</view>
</view> </view>
</view> </view>
</block> </block>
@ -153,7 +137,26 @@
</view> </view>
<!-- 待支付时开始 -->
<!-- 订单编号 -->
<!-- <block v-if="recinfo.orderStatus == 1">
<view class="flex-center-sp pd-tb10 bordert">
<view class="fcor666 width80px">订单编号</view>
<view class=" flex-center-sp">
<text class="tr flex-1">{{orderId}}</text>
<text class=" margle10 font12 copy-num fcor666" @click="copyText(orderId)">复制</text>
</view>
</view>
<view class="flex-center-sp pd-tb10 ">
<view class="fcor666 width80px">下单时间</view>
<view class=" ">
{{recinfo.createTime | formatDate('-')}}
</view>
</view>
</block>
-->
</view> </view>
<!-- 物流信息 --> <!-- 物流信息 -->
@ -170,12 +173,12 @@
</view> </view>
</view> </view>
<!-- 物流信息 --> <!-- 物流信息 -->
<!-- <view class="flex-center-sp pd-tb10 "> <view class="flex-center-sp pd-tb10 ">
<view class="fontsize width80px">物流信息</view> <view class="fontsize width80px">物流信息</view>
<view class="fcor666 font16 " @click="checkWuliu"> <view class="fcor666 font16 " @click="checkWuliu">
查看物流信息<text class="icon-ymt to-right fcor666 font16 paddleft5"></text> 查看物流信息<text class="icon-ymt to-right fcor666 font16 paddleft5"></text>
</view> </view>
</view> --> </view>
<!-- 订单编号 --> <!-- 订单编号 -->
<view class="flex-center-sp pd-tb10 "> <view class="flex-center-sp pd-tb10 ">
<view class="fontsize width80px">订单编号</view> <view class="fontsize width80px">订单编号</view>
@ -273,7 +276,6 @@
<!-- #endif --> <!-- #endif -->
</view> </view>
<wuliuPopup ref="wuliu"></wuliuPopup> <wuliuPopup ref="wuliu"></wuliuPopup>
</view> </view>
@ -440,10 +442,10 @@
this.moreThanThree = !this.moreThanThree this.moreThanThree = !this.moreThanThree
}, },
// //
checkWuliu(id,status) { checkWuliu() {
// let logisticsNo = this.recinfo.goodsOrder.logisticsNo; let logisticsNo = this.recinfo.goodsOrder.logisticsNo;
if (status == null) { if (!logisticsNo) {
uni.showToast({ uni.showToast({
title: '暂无数据', title: '暂无数据',
icon: 'none', icon: 'none',
@ -452,7 +454,7 @@
return return
} }
this.$refs.wuliu.show(id) this.$refs.wuliu.show(logisticsNo)
}, },
// //
@ -575,21 +577,6 @@
// #endif // #endif
},
// 退
applyRefund(){
//
// ==>退
uni.navigateTo({
url:"/physical-merchants/applyRefund/selectApplyRefund?msg="+encodeURIComponent(JSON.stringify(this.recinfo))
})
// ==>
// uni.navigateTo({
// url:"/physical-merchants/applyRefund/applyRefund?msg="+encodeURIComponent(JSON.stringify(this.recinfo))+"&refundType="+1
// })
} }
} }
} }
@ -597,8 +584,6 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.fontsize{ .fontsize{
font-size: 16px; font-size: 16px;
} }
@ -715,38 +700,26 @@
right: 0; right: 0;
left: 0; left: 0;
.btn {
height: 20px;
padding: 5px 10px;
border-radius: 15px;
margin-left: 15px;
border: 1px solid #666666;
color: #666666;
font-size: 16px;
&.bgred {
color: #ffffff;
background-color: #FF2342;
border: 1px solid #FF2342;
}
} &.oneMore {
color: #FF2342;
.btn1{
height: 20px; border: 1px solid #FF2342;
padding: 5px 10px; }
border-radius: 15px;
margin-left: 15px;
border: 1px solid #f0f0f0;
color: #666666;
font-size: 16px;
}
.btn {
height: 20px;
padding: 5px 10px;
border-radius: 15px;
margin-left: 15px;
border: 1px solid #666666;
color: #666666;
font-size: 16px;
&.bgred {
color: #ffffff;
background-color: #FF2342;
border: 1px solid #FF2342;
}
&.oneMore {
color: #FF2342;
border: 1px solid #FF2342;
} }
} }
</style> </style>

@ -1,6 +1,6 @@
<template> <template>
<wybPopup @touchmove.stop ref="popup" zIndex="999" type="bottom" width="500" height="500" :scrollY="true" radius="0" :showCloseIcon="true"> <wybPopup @touchmove.stop ref="popup" zIndex="999" type="bottom" width="500" height="500" :scrollY="true" radius="0" :showCloseIcon="true">
<view class="pd-main wuliupop height100 border-box backcor9"> <view class="pd-main wuliupop backcor9">
<view class="pop-title fontwig6 backcor9"><text>物流信息</text></view> <view class="pop-title fontwig6 backcor9"><text>物流信息</text></view>
<view class="pd-main backcolorfff border-8r font14" > <view class="pd-main backcolorfff border-8r font14" >
<view class="dis-flex flex-sp mart10 marb10 paddbotm10 border-b"> <view class="dis-flex flex-sp mart10 marb10 paddbotm10 border-b">
@ -147,7 +147,7 @@
// //
getLogisticsMsg(num){ getLogisticsMsg(num){
let params ={ let params ={
orderId:num num:num
} }
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',

@ -172,7 +172,7 @@
</view> </view>
<view class="width100"> <view class="width100">
<textarea :cursor-spacing="50" class="border-8r backcor9 paading10 note" :focus="false" <textarea :cursor-spacing="50" class="border-8r backcor9 paading10 note" :focus="false"
:disable-default-padding="false" v-model.trim="noteValue" maxlength="40" :disable-default-padding="false" v-model="noteValue" maxlength="40"
placeholder="请输入备注信息"></textarea> placeholder="请输入备注信息"></textarea>
</view> </view>

@ -252,10 +252,6 @@ $uni-font-size-paragraph:30upx;
color: #41cda2; color: #41cda2;
} }
.foc3da7e7{
color: #3da7e7 !important;
}
.colorb9 { .colorb9 {
color: #b95859; color: #b95859;
} }
@ -765,10 +761,6 @@ $uni-font-size-paragraph:30upx;
padding-left: 15px; padding-left: 15px;
} }
.paddleft25{
padding-left: 25px;
}
.paddtright5 { .paddtright5 {
padding-right: 5px; padding-right: 5px;
} }
@ -984,9 +976,6 @@ $uni-font-size-paragraph:30upx;
.border-t{ .border-t{
border-top: 1px solid #f6f6f6; border-top: 1px solid #f6f6f6;
} }
.border-b-666{
border-bottom: 1px solid #f0f0f0;
}
// 盒模型 // 盒模型
.border-box{ .border-box{
box-sizing: border-box; box-sizing: border-box;

@ -134,14 +134,11 @@
}, },
_onBlur(event) { _onBlur(event) {
this.$emit('blur', event) this.$emit('blur', event)
// let value = event.detail.value; let value = event.detail.value;
// if (!value) {
let value = parseInt(event.detail.value); // this.inputValue = 0;
return;
// if (!value) { }
// // this.inputValue = 0;
// return;
// }
value = +value; value = +value;
if (value > this.max) { if (value > this.max) {
this.$emit("noMore") this.$emit("noMore")

Loading…
Cancel
Save