shuxiaoquan 12 months ago
commit 9f29108806
  1. 2
      api/goods/index.js
  2. 142
      components/goods-sku-popup/index.vue
  3. 4
      pages/cart/index.vue
  4. 69
      pages/goods/components/SkuPopup.vue
  5. 50
      pages/goods/components/setPrice.vue
  6. 45
      pages/goods/detail.vue
  7. 4
      pages/goods/list.vue
  8. 4
      pages/index/index.vue
  9. 6
      pages/invoice/edit.vue
  10. 2
      pages/news1/feedback.vue
  11. 4
      pages/order/index.vue
  12. 210
      pages/sureOrder/index.vue

@ -92,5 +92,5 @@ export const editGoodsSeckillPrice = param => {
} }
// 是否有货 // 是否有货
export const getGoodsStock = param => { export const getGoodsStock = param => {
return request.get('goods/getGoodsStock', param) return request.post('goods/getGoodsStock', param)
} }

@ -1,6 +1,6 @@
<template> <template>
<view class="goods-sku-popup" catchtouchmove="true" :class="valueCom && complete ? 'show' : 'none'" @touchmove.stop.prevent="moveHandle" <view class="goods-sku-popup" catchtouchmove="true" :class="valueCom && complete ? 'show' : 'none'"
@click.stop="stop"> @touchmove.stop.prevent="moveHandle" @click.stop="stop">
<!-- 页面内容开始 --> <!-- 页面内容开始 -->
<view class="mask" @click="close('mask')"></view> <view class="mask" @click="close('mask')"></view>
<view class="layer attr-content" :class="{'safe-area-inset-bottom':safeAreaInsetBottom }" <view class="layer attr-content" :class="{'safe-area-inset-bottom':safeAreaInsetBottom }"
@ -9,8 +9,10 @@
<scroll-view class="specification-wrapper-content" scroll-y="true"> <scroll-view class="specification-wrapper-content" scroll-y="true">
<view class="specification-header"> <view class="specification-header">
<view class="specification-left"> <view class="specification-left">
<image class="product-img" :src="selectShop.image ? selectShop.image : goodsInfo[goodsThumbName]" <image class="product-img"
:style="{ backgroundColor: goodsThumbBackgroundColor }" mode="aspectFill" @click="previewImage"></image> :src="selectShop.image ? selectShop.image : goodsInfo[goodsThumbName]"
:style="{ backgroundColor: goodsThumbBackgroundColor }" mode="aspectFill"
@click="previewImage"></image>
</view> </view>
<view class="specification-right"> <view class="specification-right">
<view class="price-content" :style="{ color: themeColorFn('priceColor') }"> <view class="price-content" :style="{ color: themeColorFn('priceColor') }">
@ -25,11 +27,13 @@
</view> </view>
</view> </view>
<view class="specification-content"> <view class="specification-content">
<view v-show="isManyCom" class="specification-item" v-for="(item, index1) in goodsInfo[specListName]" :key="index1"> <view v-show="isManyCom" class="specification-item"
v-for="(item, index1) in goodsInfo[specListName]" :key="index1">
<view class="item-title">{{ item.name }}</view> <view class="item-title">{{ item.name }}</view>
<view class="item-wrapper"> <view class="item-wrapper">
<view class="item-content" v-for="(item_value, index2) in item.list" :key="index2" <view class="item-content" v-for="(item_value, index2) in item.list" :key="index2"
:class="[item_value.ishow ? '' : 'noactived', subIndex[index1] == index2 ? 'actived' : '']" :style="[ :class="[item_value.ishow ? '' : 'noactived', subIndex[index1] == index2 ? 'actived' : '']"
:style="[
item_value.ishow ? '' : themeColorFn('disableStyle'), item_value.ishow ? '' : themeColorFn('disableStyle'),
item_value.ishow ? themeColorFn('btnStyle') : '', item_value.ishow ? themeColorFn('btnStyle') : '',
subIndex[index1] == index2 ? themeColorFn('activedStyle') : '' subIndex[index1] == index2 ? themeColorFn('activedStyle') : ''
@ -41,8 +45,9 @@
<view class="number-box-view" v-if="!userInfo.user_type || userInfo.user_type != 40"> <view class="number-box-view" v-if="!userInfo.user_type || userInfo.user_type != 40">
<view style="flex: 1;">数量</view> <view style="flex: 1;">数量</view>
<view style="flex: 4;text-align: right;"> <view style="flex: 4;text-align: right;">
<number-box v-model="selectNum" :min="minBuyNum || 1" :max="maxBuyNumCom" :step="stepBuyNum || 1" <number-box v-model="selectNum" :min="minBuyNum || 1" :max="maxBuyNumCom"
:step-strictly="stepStrictly" :positive-integer="true" @change="numChange" /> :step="stepBuyNum || 1" :step-strictly="stepStrictly" :positive-integer="true"
@change="numChange" />
</view> </view>
</view> </view>
</view> </view>
@ -97,8 +102,12 @@
var goodsCache = {}; // var goodsCache = {}; //
export default { export default {
name: 'GoodsSkuPopup', name: 'GoodsSkuPopup',
components: { NumberBox }, components: {
emits: ['update:modelValue', 'input', 'update-goods', 'open', 'close', 'add-cart', 'buy-now', 'cart', 'buy', 'num-change'], NumberBox
},
emits: ['update:modelValue', 'input', 'update-goods', 'open', 'close', 'add-cart', 'buy-now', 'cart', 'buy',
'num-change'
],
props: { props: {
// true false // true false
value: { value: {
@ -328,6 +337,7 @@
}, },
data() { data() {
return { return {
skuItem: '',
userInfo: {}, userInfo: {},
complete: false, // complete: false, //
goodsInfo: {}, // goodsInfo: {}, //
@ -460,12 +470,16 @@
// 使vk // 使vk
findGoodsInfo(obj = {}) { findGoodsInfo(obj = {}) {
let that = this; let that = this;
let { useCache } = obj; let {
useCache
} = obj;
if (typeof vk == 'undefined') { if (typeof vk == 'undefined') {
that.toast('custom-action必须是function', 'none'); that.toast('custom-action必须是function', 'none');
return false; return false;
} }
let { actionTips } = that; let {
actionTips
} = that;
let actionTitle = ''; let actionTitle = '';
let actionAoading = false; let actionAoading = false;
if (actionTips !== 'custom') { if (actionTips !== 'custom') {
@ -509,8 +523,11 @@
// goodsInfo.sku_list.map((item, index) => { // goodsInfo.sku_list.map((item, index) => {
// item.sku_name_arr = ["20ml/"]; // item.sku_name_arr = ["20ml/"];
// }); // });
let { skuListName } = that; let {
if (JSON.stringify(that.goodsInfo) === '{}' || that.goodsInfo[that.goodsIdName] !== goodsInfo[that.goodsIdName]) { skuListName
} = that;
if (JSON.stringify(that.goodsInfo) === '{}' || that.goodsInfo[that.goodsIdName] !== goodsInfo[that
.goodsIdName]) {
that.goodsInfo = goodsInfo; that.goodsInfo = goodsInfo;
that.initKey = true; that.initKey = true;
} else { } else {
@ -526,7 +543,8 @@
that.init(!autoClickSku) that.init(!autoClickSku)
} }
// sku // sku
let select_sku_info = that.getListItem(that.goodsInfo[skuListName], that.skuIdName, that.selectShop[that.skuIdName]); let select_sku_info = that.getListItem(that.goodsInfo[skuListName], that.skuIdName, that.selectShop[that
.skuIdName]);
Object.assign(that.selectShop, select_sku_info); Object.assign(that.selectShop, select_sku_info);
that.defaultSelectSku(); that.defaultSelectSku();
that.complete = true; that.complete = true;
@ -564,7 +582,9 @@
}, 500); }, 500);
}); });
} catch (err) { } catch (err) {
let { message = '' } = err; let {
message = ''
} = err;
if (message.indexOf('.catch is not a function') > -1) { if (message.indexOf('.catch is not a function') > -1) {
that.toast('custom-action必须返回一个Promise', 'none'); that.toast('custom-action必须返回一个Promise', 'none');
setTimeout(function() { setTimeout(function() {
@ -597,7 +617,9 @@
return false; return false;
} }
} else { } else {
if (findGoodsInfoRun) that.findGoodsInfo({ useCache }); if (findGoodsInfoRun) that.findGoodsInfo({
useCache
});
} }
}, },
// - // -
@ -632,7 +654,12 @@
that.$set(that.selectArr, index1, ''); that.$set(that.selectArr, index1, '');
that.$set(that.subIndex, index1, -1); that.$set(that.subIndex, index1, -1);
} }
this.$emit('selectedOld',{title:item,value:value,}) this.skuItem = item;
this.skuIValue = value
this.$emit('selectedOld', {
title: this.skuItem,
value: this.skuIValue,
})
that.checkInpath(index1); that.checkInpath(index1);
// //
that.checkSelectShop(); that.checkSelectShop();
@ -696,7 +723,9 @@
checkItem() { checkItem() {
let that = this; let that = this;
// console.time(''); // console.time('');
let { stockName } = that; let {
stockName
} = that;
let skuListName = that.skuListName; let skuListName = that.skuListName;
// 0sku // 0sku
let originalSkuList = that.goodsInfo[skuListName]; let originalSkuList = that.goodsInfo[skuListName];
@ -721,8 +750,11 @@
arr.map(item2 => { arr.map(item2 => {
// //
//console.log(1,that.shopItemInfo,that.getArrayToSting([...item2, item]),item2,item,items); //console.log(1,that.shopItemInfo,that.getArrayToSting([...item2, item]),item2,item,items);
if (!that.shopItemInfo.hasOwnProperty(that.getArrayToSting([...item2, item]))) { if (!that.shopItemInfo.hasOwnProperty(that.getArrayToSting([...
that.shopItemInfo[that.getArrayToSting([...item2, item])] = items; item2, item
]))) {
that.shopItemInfo[that.getArrayToSting([...item2, item])] =
items;
} }
return [...item2, item]; return [...item2, item];
}) })
@ -760,7 +792,12 @@
return false; return false;
} }
that.clickTime = clickTime; that.clickTime = clickTime;
let { selectShop, selectNum, stockText, stockName } = that; let {
selectShop,
selectNum,
stockText,
stockName
} = that;
if (!selectShop || !selectShop[that.skuIdName]) { if (!selectShop || !selectShop[that.skuIdName]) {
that.toast('请先选择对应规格', 'none'); that.toast('请先选择对应规格', 'none');
return false; return false;
@ -784,6 +821,10 @@
selectShop.buy_num = that.selectNum; selectShop.buy_num = that.selectNum;
that.$emit('add-cart', selectShop); that.$emit('add-cart', selectShop);
that.$emit('cart', selectShop); that.$emit('cart', selectShop);
that.$emit('selectedOld', {
title: that.skuItem,
value: that.skuIValue,
})
} }
}); });
}, },
@ -796,6 +837,10 @@
console.log(selectShop) console.log(selectShop)
that.$emit('buy-now', selectShop); that.$emit('buy-now', selectShop);
that.$emit('buy', selectShop); that.$emit('buy', selectShop);
that.$emit('selectedOld', {
title: that.skuItem,
value: that.skuIValue,
})
} }
}); });
}, },
@ -839,7 +884,9 @@
// skusku,sku // skusku,sku
autoClickSku() { autoClickSku() {
let that = this; let that = this;
let { stockName } = that; let {
stockName
} = that;
let skuList = that.goodsInfo[that.skuListName]; let skuList = that.goodsInfo[that.skuListName];
let specListArr = that.goodsInfo[that.specListName]; let specListArr = that.goodsInfo[that.specListName];
if (specListArr.length == 1) { if (specListArr.length == 1) {
@ -856,13 +903,18 @@
// //
themeColorFn(name) { themeColorFn(name) {
let that = this; let that = this;
let { theme, themeColor } = that; let {
theme,
themeColor
} = that;
let color = that[name] ? that[name] : themeColor[theme][name]; let color = that[name] ? that[name] : themeColor[theme][name];
return color; return color;
}, },
defaultSelectSku() { defaultSelectSku() {
let that = this; let that = this;
let { defaultSelect } = that; let {
defaultSelect
} = that;
if (defaultSelect && defaultSelect.sku && defaultSelect.sku.length > 0) { if (defaultSelect && defaultSelect.sku && defaultSelect.sku.length > 0) {
that.selectSku(defaultSelect); that.selectSku(defaultSelect);
} }
@ -876,7 +928,10 @@
*/ */
selectSku(obj = {}) { selectSku(obj = {}) {
let that = this; let that = this;
let { sku: skuArr, num: selectNum } = obj; let {
sku: skuArr,
num: selectNum
} = obj;
let specListArr = that.goodsInfo[that.specListName]; let specListArr = that.goodsInfo[that.specListName];
if (skuArr && specListArr.length === skuArr.length) { if (skuArr && specListArr.length === skuArr.length) {
// //
@ -919,7 +974,9 @@
}, },
pushGoodsCache(goodsInfo) { pushGoodsCache(goodsInfo) {
let that = this; let that = this;
let { goodsIdName } = that; let {
goodsIdName
} = that;
goodsCache[goodsInfo[goodsIdName]] = goodsInfo; goodsCache[goodsInfo[goodsIdName]] = goodsInfo;
}, },
// //
@ -927,7 +984,11 @@
// //
previewImage() { previewImage() {
let that = this; let that = this;
let { selectShop, goodsInfo, goodsThumbName } = that; let {
selectShop,
goodsInfo,
goodsThumbName
} = that;
let src = selectShop.image ? selectShop.image : goodsInfo[goodsThumbName]; let src = selectShop.image ? selectShop.image : goodsInfo[goodsThumbName];
if (src) { if (src) {
uni.previewImage({ uni.previewImage({
@ -938,7 +999,9 @@
getMaxStock() { getMaxStock() {
let maxStock = 0; let maxStock = 0;
let that = this; let that = this;
let { selectShop = {}, goodsInfo = {}, skuListName, stockName } = that; let {
selectShop = {}, goodsInfo = {}, skuListName, stockName
} = that;
if (selectShop[stockName]) { if (selectShop[stockName]) {
maxStock = selectShop[stockName]; maxStock = selectShop[stockName];
} else { } else {
@ -983,7 +1046,11 @@
// //
isManyCom() { isManyCom() {
let that = this; let that = this;
let { goodsInfo, defaultSingleSkuName, specListName } = that; let {
goodsInfo,
defaultSingleSkuName,
specListName
} = that;
let isMany = true; let isMany = true;
if ( if (
goodsInfo[specListName] && goodsInfo[specListName] &&
@ -999,7 +1066,9 @@
priceCom() { priceCom() {
let str = ''; let str = '';
let that = this; let that = this;
let { selectShop = {}, goodsInfo = {}, skuListName, skuIdName } = that; let {
selectShop = {}, goodsInfo = {}, skuListName, skuIdName
} = that;
if (selectShop[skuIdName]) { if (selectShop[skuIdName]) {
str = that.priceFilter(selectShop.price); str = that.priceFilter(selectShop.price);
} else { } else {
@ -1024,7 +1093,9 @@
stockCom() { stockCom() {
let str = ''; let str = '';
let that = this; let that = this;
let { selectShop = {}, goodsInfo = {}, skuListName, stockName } = that; let {
selectShop = {}, goodsInfo = {}, skuListName, stockName
} = that;
if (selectShop[stockName]) { if (selectShop[stockName]) {
str = selectShop[stockName]; str = selectShop[stockName];
} else { } else {
@ -1057,8 +1128,11 @@
immediate: true, immediate: true,
handler: function(newVal, oldValue) { handler: function(newVal, oldValue) {
let that = this; let that = this;
let { goodsIdName } = that; let {
if (typeof newVal === 'object' && newVal && newVal[goodsIdName] && !goodsCache[newVal[goodsIdName]]) { goodsIdName
} = that;
if (typeof newVal === 'object' && newVal && newVal[goodsIdName] && !goodsCache[newVal[
goodsIdName]]) {
that.pushGoodsCache(newVal); that.pushGoodsCache(newVal);
} }
} }

@ -90,7 +90,7 @@
<text v-if="item.line_price_min > 0" <text v-if="item.line_price_min > 0"
class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text>
</view> </view>
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="is_check==1" mode=""></image> <image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode=""></image>
</view> </view>
<view class="goodsInfo1"> <view class="goodsInfo1">
<view class="oneTip"> <view class="oneTip">
@ -139,7 +139,7 @@
<text v-if="item.line_price_min > 0" <text v-if="item.line_price_min > 0"
class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text>
</view> </view>
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="is_check==1" mode=""></image> <image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode=""></image>
</view> </view>
<view class="goodsInfo1"> <view class="goodsInfo1">
<view class="oneTip"> <view class="oneTip">

@ -16,6 +16,7 @@
} from '@/utils/color' } from '@/utils/color'
import * as CartApi from '@/api/cart' import * as CartApi from '@/api/cart'
import GoodsSkuPopup from '@/components/goods-sku-popup' import GoodsSkuPopup from '@/components/goods-sku-popup'
import * as GoodsApi from '@/api/goods'
export default { export default {
components: { components: {
@ -37,8 +38,16 @@
goods: { goods: {
type: Object, type: Object,
default: {} default: {}
},
addressResult: {
type: Object,
default: {
province: '江苏省',
city: '南京市',
district: '玄武区'
} }
}, },
},
data() { data() {
return { return {
// //
@ -47,6 +56,7 @@
maxBuyNum: null, maxBuyNum: null,
selectSku: '', selectSku: '',
shopNum: 1, shopNum: 1,
stockValue: '有货',
} }
}, },
computed: { computed: {
@ -184,9 +194,17 @@
}, },
selectedOld(e) { selectedOld(e) {
this.selectSku = e this.selectSku = e
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
}, },
numChange(e) { numChange(e) {
this.shopNum = e this.shopNum = e
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
}, },
// sku ----------------------------------------------------------- // sku -----------------------------------------------------------
openSkuPopup() { openSkuPopup() {
@ -194,17 +212,48 @@
}, },
closeSkuPopup() { closeSkuPopup() {
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
// console.log(" - sku") // console.log(" - sku")
}, },
async getGoodsStockInfor(selectShop, type) {
let that = this;
let params = {
list: [{
goods_id: that.goods.goods_id,
num: that.selectNum
}],
province: that.addressResult ? that.addressResult.province : '江苏省',
city: that.addressResult ? that.addressResult.city : '南京市',
district: that.addressResult ? that.addressResult.district : '玄武区'
}
let {
status,
message,
data
} = await GoodsApi.getGoodsStock(params);
if (status == 200) {
that.stockValue = data[0].state
if (that.stockValue == '无货') {
uni.showToast({
icon: "none",
title: "该商品暂时无货"
})
} else {
if (type == 1) {
that.addCartInfor(selectShop)
} else {
that.buyNowInfor(selectShop)
}
}
}
},
// //
addCart(selectShop) { addCart(selectShop) {
this.selectInfor = selectShop
const app = this const app = this
app.getGoodsStockInfor(selectShop, 1)
},
addCartInfor(selectShop) {
const app = this
app.selectInfor = selectShop
const { const {
goods_id, goods_id,
goods_sku_id, goods_sku_id,
@ -224,9 +273,13 @@
app.$emit('addCart', cartTotal) app.$emit('addCart', cartTotal)
}) })
}, },
// //
buyNow(selectShop) { buyNow(selectShop) {
const app = this
app.getGoodsStockInfor(selectShop, 2)
},
buyNowInfor(selectShop) {
const app = this
this.selectInfor = selectShop this.selectInfor = selectShop
if (uni.getStorageSync("userInfo").user_type == 40) { if (uni.getStorageSync("userInfo").user_type == 40) {
// //
@ -244,7 +297,7 @@
}) })
// //
this.onChangeValue(false) this.onChangeValue(false)
} },
} }
} }

@ -11,20 +11,20 @@
placeholder="秒杀价格可低于成本价" /> placeholder="秒杀价格可低于成本价" />
</view> </view>
<view class="priceTime"> <view class="priceTime">
<view class="text">秒杀区间</view> <view class="text">开始时间</view>
<view class="priceDate">
<view class="selectTime" :style="'color: ' + (startTime?fontColor:'')" @click="timeShow=true"> <view class="selectTime" :style="'color: ' + (startTime?fontColor:'')" @click="timeShow=true">
{{startTime?startTime:'起始时间'}} {{startTime?startTime:'起始时间'}}
</view> </view>
<text>-</text>
<view class="selectTime" :style="'color: ' + (endTime?fontColor:'')" @click="timeShow=true">
{{endTime?endTime:'终止时间'}}
</view>
</view> </view>
<view class="priceCon" v-if="secondQuota">
<text>秒杀时长</text>
<input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="sec_hour"
placeholder="请输入"> /
</view> </view>
<view class="priceCon" style="justify-content: space-between;"> <view class="priceCon">
<text>秒杀限购</text> <text>秒杀限购</text>
<u-switch v-model="secondQuota" size='35' @change="change" activeColor='#55BD6A' inactiveColor='#F1F1F1'> <u-switch v-model="secondQuota" size='35' @change="change" activeColor='#55BD6A'
inactiveColor='#F1F1F1'>
</u-switch> </u-switch>
</view> </view>
<view class="priceCon" v-if="secondQuota"> <view class="priceCon" v-if="secondQuota">
@ -44,8 +44,8 @@
</view> </view>
</u-popup> </u-popup>
</view> </view>
<u-calendar v-model="timeShow" mode="multiple" minDate='0' @change="getTime" :pickerOptions="pickerOptions" range-color='#FF6257' range-bg-color='#FFBDBA' <u-calendar v-model="timeShow" mode="date" minDate='0' @change="getTime" :pickerOptions="pickerOptions"
active-bg-color='#FF6257'></u-calendar> range-color='#FF6257' range-bg-color='#FFBDBA' active-bg-color='#FF6257'></u-calendar>
</template> </template>
<script> <script>
@ -55,28 +55,22 @@
afterSale: false, afterSale: false,
timeShow: false, timeShow: false,
startTime: '', startTime: '',
endTime: '', sec_hour: '',
secondPrice: '', secondPrice: '',
secondQuota: 1, secondQuota: 1,
quotaNum: '', quotaNum: '',
fontColor: '#262626', fontColor: '#262626',
pickerOptions:{
disabledDate(time){
return true
}
}
} }
}, },
methods: { methods: {
reset() { reset() {
this.startTime = null; this.startTime = null;
this.endTime = null this.sec_hour = null
this.secondPrice = null; this.secondPrice = null;
this.quotaNum = null this.quotaNum = null
}, },
getTime(e) { getTime(e) {
this.startTime = e.startDate; this.startTime = e.result;
this.endTime = e.endDate;
}, },
submit() { submit() {
if (!this.secondPrice) { if (!this.secondPrice) {
@ -85,15 +79,15 @@
if (!this.startTime) { if (!this.startTime) {
return this.$toast('请选择开始时间') return this.$toast('请选择开始时间')
} }
if (!this.endTime) { if (!this.sec_hour) {
return this.$toast('请选择结束时间') return this.$toast('请输入秒杀时长')
} }
if (!this.quotaNum && this.secondQuota) { if (!this.quotaNum && this.secondQuota) {
return this.$toast('请输入限购次数') return this.$toast('请输入限购次数')
} }
this.$emit('getprice', { this.$emit('getprice', {
startTime: this.startTime, startTime: this.startTime,
endTime: this.endTime, sec_hour: this.sec_hour,
secondPrice: this.secondPrice, secondPrice: this.secondPrice,
quotaNum: this.secondQuota ? this.quotaNum : '', quotaNum: this.secondQuota ? this.quotaNum : '',
secondQuota: this.secondQuota ? 1 : 2 secondQuota: this.secondQuota ? 1 : 2
@ -108,6 +102,7 @@
background-color: #FF6257 !important; background-color: #FF6257 !important;
border-color: #FF6257 !important; border-color: #FF6257 !important;
} }
.afterSales { .afterSales {
padding: 32upx; padding: 32upx;
@ -154,6 +149,10 @@
} }
.priceTime { .priceTime {
display: flex;
align-items: center;
font-size: 28rpx;
color: #262626;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.text { .text {
@ -168,12 +167,8 @@
text-transform: none; text-transform: none;
} }
.priceDate {
display: flex;
align-items: center;
.selectTime { .selectTime {
width: 238rpx; width: 300rpx;
height: 70rpx; height: 70rpx;
background: #F3F3F3; background: #F3F3F3;
border-radius: 44rpx; border-radius: 44rpx;
@ -191,7 +186,6 @@
margin: 0 15rpx; margin: 0 15rpx;
} }
} }
}
// ::v-deep .u-input { // ::v-deep .u-input {
// height: 70upx; // height: 70upx;

@ -46,7 +46,7 @@
<text class="span" <text class="span"
v-if="userInfo.user_type==40">{{goods.cost_price_min?Number(goods.cost_price_min):0}}</text> v-if="userInfo.user_type==40">{{goods.cost_price_min?Number(goods.cost_price_min):0}}</text>
<text class="span" <text class="span"
v-else>{{(goods.line_price_min>0&&goods.goods_price_min>0)?(Number(goods.line_price_min)-Number(goods.goods_price_min)):0}}</text> v-else>{{(goods.line_price_min>0&&goods.goods_price_min>0)?Number((Number(goods.line_price_min)-Number(goods.goods_price_min)).toFixed(2)):0}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -76,7 +76,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="goodsOpera"> <!-- <view class="goodsOpera">
<view v-if="goods.goods_no" class="goodsNum" @click="copyNum(goods.goods_no)"> <view v-if="goods.goods_no" class="goodsNum" @click="copyNum(goods.goods_no)">
<text>{{goods.goods_no}}</text> <text>{{goods.goods_no}}</text>
<image :src="$picUrl+'/static/detail/copy.png'"></image> <image :src="$picUrl+'/static/detail/copy.png'"></image>
@ -87,7 +87,7 @@
class="tips"> class="tips">
</image> </image>
</view> </view>
</view> </view> -->
<view class="rank" @click="goRanking()" v-if="goods && goods.category"> <view class="rank" @click="goRanking()" v-if="goods && goods.category">
<text><text style="font-size: 32rpx;font-weight: bold;">排行榜</text> <text><text style="font-size: 32rpx;font-weight: bold;">排行榜</text>
{{goods.category.name}}热搜榜第{{goods.paihang}}</text> {{goods.category.name}}热搜榜第{{goods.paihang}}</text>
@ -105,11 +105,11 @@
<u-icon name="arrow-right" color="#B7B7B7" size="22"></u-icon> <u-icon name="arrow-right" color="#B7B7B7" size="22"></u-icon>
</picker> </picker>
</view> </view>
<view v-if="goods.unicode" class="operaImg" @click="copyNum(goods.unicode)"> <view v-if="goods.goods_no" class="operaImg" @click="copyNum(goods.goods_no)">
<view class="left_1"> <view class="left_1">
{{goods.goods_source}} {{goods.goods_source}}
</view> </view>
<text>{{goods.unicode}}</text> <text>{{goods.goods_no}}</text>
<image :src="$picUrl+'/static/detail/copy.png'" <image :src="$picUrl+'/static/detail/copy.png'"
style="width: 27rpx;height: 27rpx;margin-left: 8rpx;"></image> style="width: 27rpx;height: 27rpx;margin-left: 8rpx;"></image>
</view> </view>
@ -117,17 +117,17 @@
</view> </view>
</view> </view>
<view class="orderInfo"> <view class="orderInfo">
<view class="chosed" v-if="goods.spec_type == 20" @click="choseSku(3)"> <view class="chosed" v-if="goods.spec_type == 20" @click="stockValue=='有货'?choseSku(3):''">
<view class="title">已选</view> <view class="title">已选</view>
<view class="info" style="justify-content: flex-start;" v-if="goods.skuList.length>0"> <view class="info" style="justify-content: flex-start;" v-if="goods.skuList.length>0">
<text <text
style="margin-right: 10rpx;">{{selectSku.title.name}}-{{selectSku.value.name}}</text>{{selectShop}} style="margin-right: 10rpx;">{{selectSku.title.name}}-{{selectSku.value.name}}</text>{{selectShop}}
</view> </view>
<u-icon name="arrow-right" color="#B7B7B7"></u-icon> <u-icon name="arrow-right" color="#B7B7B7" v-if="stockValue=='有货'"></u-icon>
</view> </view>
<view class="chosed" v-else @click="choseSku(3)"> <view class="chosed" v-else @click="stockValue=='有货'?choseSku(3):''">
<view class="title">已选</view> <view class="title">已选</view>
<view class="info">{{selectShop}}</view> <view class="info">{{selectNum}}</view>
<u-icon name="arrow-right" color="#B7B7B7"></u-icon> <u-icon name="arrow-right" color="#B7B7B7"></u-icon>
</view> </view>
<view class="chosed" v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num > 0"> <view class="chosed" v-if="goods.skuList && goods.skuList.length > 0 && goods.skuList[0].stock_num > 0">
@ -284,10 +284,10 @@
<template v-if="isSeckill"> <template v-if="isSeckill">
<template v-if="isBuy"> <template v-if="isBuy">
<template v-if="seckillText=='距离'"> <template v-if="seckillText=='距离'">
<view class="addCar" @click="choseSku(2)"> <view class="addCar" :style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }" @click="stockValue=='有货'?choseSku(2):''">
加入购物车 加入购物车
</view> </view>
<view class="buyNow" @click="choseSku(3)"> <view class="buyNow" :style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }" @click="stockValue=='有货'?choseSku(3):''" >
立即购买 立即购买
</view> </view>
</template> </template>
@ -304,10 +304,10 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="addCar" @click="choseSku(2)"> <view class="addCar" :style="{'background': stockValue=='有货'?'#FF9E2B':'#cecece' }" @click="stockValue=='有货'?choseSku(2):''">
加入购物车 加入购物车
</view> </view>
<view class="buyNow" @click="choseSku(3)"> <view class="buyNow" :style="{'background': stockValue=='有货'?'linear-gradient(102deg, #FE5E06 0%, #F3221A 100%)':'#cecece' }" @click="stockValue=='有货'?choseSku(3):''">
立即购买 立即购买
</view> </view>
</template> </template>
@ -409,7 +409,7 @@
<image :src="$picUrl+'/static/toTop.png?=1'"></image> <image :src="$picUrl+'/static/toTop.png?=1'"></image>
</view> </view>
<view v-if="isTodo"> <view v-if="isTodo">
<SkuPopup v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" @getSku='onGetSku' <SkuPopup v-model="showSkuPopup" :skuMode="skuMode" :goods="goods" :addressResult='addressResult' @getSku='onGetSku'
@addCart="onAddCart" /> @addCart="onAddCart" />
</view> </view>
<setPrice ref="setRange" @getprice="getprice" /> <setPrice ref="setRange" @getprice="getprice" />
@ -484,11 +484,11 @@
name: '运损换新' name: '运损换新'
}], }],
selectSku: '', selectSku: '',
selectShop: 1, selectNum: 1,
multiIndex: [0, 0, 0], multiIndex: [0, 0, 0],
multiArray: [], multiArray: [],
multiData: [], multiData: [],
stockValue: '南京市', stockValue: '有货',
addressResult: { addressResult: {
province: '江苏省', province: '江苏省',
city: '南京市', city: '南京市',
@ -499,7 +499,7 @@
onLoad(options) { onLoad(options) {
const that = this; const that = this;
let result = uni.getStorageSync("addressResult") let result = uni.getStorageSync("addressResult")
this.addressResult = result.address_component || '' this.addressResult = result?result.address_component:this.addressResult
this.isPre = options.isPre ? options.isPre : null this.isPre = options.isPre ? options.isPre : null
// query // query
// this.onRecordQuery(options) // this.onRecordQuery(options)
@ -552,7 +552,7 @@
methods: { methods: {
async getGoodsStockInfor() { async getGoodsStockInfor() {
let params = { let params = {
goods_id: this.goodsId, list:[{goods_id:this.goodsId,num:this.selectNum}],
province: this.addressResult ? this.addressResult.province : '江苏省', province: this.addressResult ? this.addressResult.province : '江苏省',
city: this.addressResult ? this.addressResult.city : '南京市', city: this.addressResult ? this.addressResult.city : '南京市',
district: this.addressResult ? this.addressResult.district : '玄武区' district: this.addressResult ? this.addressResult.district : '玄武区'
@ -563,7 +563,7 @@
data data
} = await GoodsApi.getGoodsStock(params); } = await GoodsApi.getGoodsStock(params);
if (status == 200) { if (status == 200) {
this.stockValue = data.stock this.stockValue = data[0].state
} }
}, },
async getProvinceAll() { async getProvinceAll() {
@ -618,7 +618,7 @@
sku_id: that.goods.skuList[0].id, sku_id: that.goods.skuList[0].id,
seckill_price: e.secondPrice, seckill_price: e.secondPrice,
sec_start_time: e.startTime, sec_start_time: e.startTime,
sec_end_time: e.endTime, sec_hour: e.sec_hour,
is_limit: e.secondQuota, is_limit: e.secondQuota,
limit_times: e.quotaNum limit_times: e.quotaNum
} }
@ -836,8 +836,9 @@
}) })
}, },
onGetSku(e) { onGetSku(e) {
console.log(e)
this.selectSku = e.selectSku this.selectSku = e.selectSku
this.selectShop = e.shopNum this.selectNum = e.shopNum
}, },
// //
onAddCart(total) { onAddCart(total) {
@ -1297,7 +1298,7 @@
} }
.rightBox { .rightBox {
width: 195rpx; min-width: 195rpx;
height: 64rpx; height: 64rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx; border-radius: 20rpx 20rpx 20rpx 20rpx;

@ -127,7 +127,7 @@
<text v-if="item.line_price_min > 0" <text v-if="item.line_price_min > 0"
class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text>
</view> </view>
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="is_check==1" mode=""> <image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode="">
</image> </image>
</view> </view>
<view class="goodsInfo"> <view class="goodsInfo">
@ -181,7 +181,7 @@
<text v-if="item.line_price_min > 0" <text v-if="item.line_price_min > 0"
class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):'' }}</text> class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):'' }}</text>
</view> </view>
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="is_check==1" mode=""> <image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode="">
</image> </image>
</view> </view>
<view class="goodsInfo"> <view class="goodsInfo">

@ -259,7 +259,7 @@
<text v-if="item.line_price_min > 0" <text v-if="item.line_price_min > 0"
class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text>
</view> </view>
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="is_check==1" mode=""></image> <image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode=""></image>
</view> </view>
<view class="goodsInfo1"> <view class="goodsInfo1">
<view class="oneTip"> <view class="oneTip">
@ -308,7 +308,7 @@
<text v-if="item.line_price_min > 0" <text v-if="item.line_price_min > 0"
class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text> class="line-price col-9 f-24">{{ item.line_price_min>0?Number(item.line_price_min):0.00 }}</text>
</view> </view>
<image :src="$picUrl+'/static/detail/redShen.png'" v-if="is_check==1" mode=""></image> <image :src="$picUrl+'/static/detail/redShen.png'" v-if="item.is_check==1" mode=""></image>
</view> </view>
<view class="goodsInfo1"> <view class="goodsInfo1">
<view class="oneTip"> <view class="oneTip">

@ -34,7 +34,7 @@
<view class="l">发票抬头</view> <view class="l">发票抬头</view>
<view class="r"> <view class="r">
<input type="text" v-model="array1[index1]" placeholder="请输入单位名称" /> <input type="text" v-model="array1[index1]" placeholder="请输入单位名称" />
<view class="tt" @click="bindPickerChange1" style="color: rgb(58, 134, 255;">更改抬头</view> <view class="tt" @click="bindPickerChange1" style="color: rgb(58, 134, 255;">选择发票抬头</view>
</view> </view>
</view> </view>
<view class="item" v-if="tabIndex == 2"> <view class="item" v-if="tabIndex == 2">
@ -192,7 +192,7 @@
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}) })
if (result.data.list.length.length > 0) { if (result.data.length > 0) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/detail?id=" + result.data.list[0].id url: "/pages/invoice/detail?id=" + result.data.list[0].id
}) })
@ -244,7 +244,7 @@
}, },
bindPickerChange1() { bindPickerChange1() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/invoice/index?orderId=" + this.orderId +'&order='+(app.orderDetail?JSON.stringify(app.orderDetail):'') url: "/pages/invoice/index?orderId=" + this.orderId +'&order='+(this.orderDetail?JSON.stringify(this.orderDetail):'')
}) })
} }
} }

@ -28,7 +28,7 @@
</u-radio-group> </u-radio-group>
</u-form-item> </u-form-item>
<u-form-item label="反馈类型" label-width="170"> <u-form-item label="反馈店铺" label-width="170">
<u-radio-group v-model="form.shop"> <u-radio-group v-model="form.shop">
<u-radio active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index" <u-radio active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index"
:name="item.val"> :name="item.val">

@ -94,9 +94,7 @@
<!-- <view class="n" <!-- <view class="n"
v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value" v-if="item.pay_status == PayStatusEnum.SUCCESS.value && item.delivery_status == DeliveryStatusEnum.NOT_DELIVERED.value"
@click="onAdress(order.goods_id)">修改地址</view> --> @click="onAdress(order.goods_id)">修改地址</view> -->
<!-- <view class="n n-1" <!-- <view class="n n-1" @click="onInvoicing(item.order_id,item)">评价</view> -->
v-if="item.order_status == OrderStatusEnum.COMPLETED.value && item.is_comment == 0"
@click="handleTargetComment(item.order_id)">评价</view> -->
</view> </view>
</view> </view>
</view> </view>

@ -4,10 +4,12 @@
<u-navbar title="确认订单" :border-bottom="false" title-color="#333" :background="background"></u-navbar> <u-navbar title="确认订单" :border-bottom="false" title-color="#333" :background="background"></u-navbar>
</view> </view>
<view class="buyType"> <view class="buyType">
<view class="toDoor" :class="buyType=='sm'?'':'toDoor-dis'" @click="handleSwichDelivery(DeliveryTypeEnum.EXPRESS.value,'sm')"> <view class="toDoor" :class="buyType=='sm'?'':'toDoor-dis'"
@click="handleSwichDelivery(DeliveryTypeEnum.EXPRESS.value,'sm')">
送货上门 送货上门
</view> </view>
<view class="toDoor" :class="buyType=='zq'?'':'toDoor-dis'" @click="handleSwichDelivery(DeliveryTypeEnum.EXTRACT.value,'zq')"> <view class="toDoor" :class="buyType=='zq'?'':'toDoor-dis'"
@click="handleSwichDelivery(DeliveryTypeEnum.EXTRACT.value,'zq')">
到店自取 到店自取
</view> </view>
<view class="toDoor-on" :style="{'left': buyType=='sm'?'0':'350rpx'}">{{buyType=='zq'?'到店自取':'送货上门'}}</view> <view class="toDoor-on" :style="{'left': buyType=='sm'?'0':'350rpx'}">{{buyType=='zq'?'到店自取':'送货上门'}}</view>
@ -40,7 +42,9 @@
</view> </view>
</view> </view>
<view class="b"> <view class="b">
{{ order.extractShop.region.province }} {{ order.extractShop.region.city }}{{ order.extractShop.region.region }} {{ order.extractShop.address }} {{ order.extractShop.region.province }}
{{ order.extractShop.region.city }}{{ order.extractShop.region.region }}
{{ order.extractShop.address }}
</view> </view>
<view class="lookMap"> <view class="lookMap">
<image :src="$picUrl+'/static/user/address.png'" mode="" class="addressIcon"></image> <image :src="$picUrl+'/static/user/address.png'" mode="" class="addressIcon"></image>
@ -53,7 +57,9 @@
<image :src="$picUrl+'/static/order/left.png'" mode="" class="rightIcon"></image> <image :src="$picUrl+'/static/order/left.png'" mode="" class="rightIcon"></image>
</view> </view>
</view> </view>
<view class="tip" v-else @click="onSelectExtractPoint()">请选择门店<image :src="$picUrl+'/static/order/left.png'" mode=""></image></view> <view class="tip" v-else @click="onSelectExtractPoint()">请选择门店<image
:src="$picUrl+'/static/order/left.png'" mode=""></image>
</view>
<view class="pickUp"> <view class="pickUp">
<view class="pickPeople"> <view class="pickPeople">
<view class="title"> <view class="title">
@ -118,6 +124,7 @@
<image :src="$picUrl+'/static/order/left.png'" mode="" class="leftIcon"></image> <image :src="$picUrl+'/static/order/left.png'" mode="" class="leftIcon"></image>
</view> </view>
<view class="goods" v-for="(item, index) in order.goodsList" :key="index"> <view class="goods" v-for="(item, index) in order.goodsList" :key="index">
<view class="goodsBox" :style="{'opacity': item.stockValue=='有货'?1:0.6 }">
<view class="goodsImg"> <view class="goodsImg">
<image :src="item.goods_image" mode=""></image> <image :src="item.goods_image" mode=""></image>
</view> </view>
@ -140,6 +147,11 @@
x{{ item.total_num }} x{{ item.total_num }}
</view> </view>
</view> </view>
<view style="color: red;font-size: 24rpx;margin-left: 182rpx;" v-if="item.stockValue=='无货'">
该商品暂时无货
</view>
</view>
</view> </view>
<view class="timer"> <view class="timer">
<view class="youTime" style="width: 60rpx;"> <view class="youTime" style="width: 60rpx;">
@ -198,7 +210,8 @@
</view> </view>
<view class="right"> <view class="right">
<text class="totalNum">{{order.orderTotalNum}}合计</text> <text class="totalNum">{{order.orderTotalNum}}合计</text>
<text class="allPrice">{{ order.orderPayPrice?Number(order.orderPayPrice):order.orderPayPrice }}</text> <text
class="allPrice">{{ order.orderPayPrice?Number(order.orderPayPrice):order.orderPayPrice }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -239,7 +252,10 @@
<text class="type"></text> <text class="type"></text>
<text class="price">{{order.orderPayPrice?Number(order.orderPayPrice):order.orderPayPrice}}</text> <text class="price">{{order.orderPayPrice?Number(order.orderPayPrice):order.orderPayPrice}}</text>
</view> </view>
<view class="btn" @click="onSubmitOrder()"> <view class="btn" @click="onSubmitOrder()" v-if="stockValue==true">
提交订单
</view>
<view class="btn" style="background: #cecece;" v-else>
提交订单 提交订单
</view> </view>
</view> </view>
@ -251,7 +267,8 @@
<view class="coupon-list"> <view class="coupon-list">
<scroll-view :scroll-y="true" style="height: 565rpx;"> <scroll-view :scroll-y="true" style="height: 565rpx;">
<view class="coupon-item" v-for="(item, index) in order.couponList" :key="index"> <view class="coupon-item" v-for="(item, index) in order.couponList" :key="index">
<view class="item-wrapper" :class="[item.is_apply ? 'color-' + CouponColors[index % CouponColors.length] : 'color-gray']" <view class="item-wrapper"
:class="[item.is_apply ? 'color-' + CouponColors[index % CouponColors.length] : 'color-gray']"
@click="handleSelectCoupon(index)"> @click="handleSelectCoupon(index)">
<view class="coupon-type">{{ CouponTypeEnum[item.coupon_type].name }}</view> <view class="coupon-type">{{ CouponTypeEnum[item.coupon_type].name }}</view>
<view class="tip dis-flex flex-dir-column flex-x-center"> <view class="tip dis-flex flex-dir-column flex-x-center">
@ -259,7 +276,8 @@
<text class="f-30"></text> <text class="f-30"></text>
<text class="money">{{ item.reduce_price }}</text> <text class="money">{{ item.reduce_price }}</text>
</view> </view>
<text class="money" v-if="item.coupon_type == CouponTypeEnum.DISCOUNT.value">{{ item.discount }}</text> <text class="money"
v-if="item.coupon_type == CouponTypeEnum.DISCOUNT.value">{{ item.discount }}</text>
<text class="pay-line">{{ item.min_price }}元可用</text> <text class="pay-line">{{ item.min_price }}元可用</text>
</view> </view>
<view class="split-line"></view> <view class="split-line"></view>
@ -267,7 +285,8 @@
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
<view class="bottom dis-flex flex-y-center"> <view class="bottom dis-flex flex-y-center">
<view class="time flex-box"> <view class="time flex-box">
<block v-if="item.start_time === item.end_time">{{ item.start_time }} 当天有效</block> <block v-if="item.start_time === item.end_time">{{ item.start_time }} 当天有效
</block>
<block v-else>{{ item.start_time }}~{{ item.end_time }}</block> <block v-else>{{ item.start_time }}~{{ item.end_time }}</block>
</view> </view>
</view> </view>
@ -295,8 +314,14 @@
import * as SharpCheckoutApi from '@/api/sharp/checkout' import * as SharpCheckoutApi from '@/api/sharp/checkout'
import * as BargainCheckoutApi from '@/api/bargain/checkout' import * as BargainCheckoutApi from '@/api/bargain/checkout'
import * as GrouponCheckoutApi from '@/api/groupon/checkout' import * as GrouponCheckoutApi from '@/api/groupon/checkout'
import { CouponTypeEnum } from '@/common/enum/coupon' import * as GoodsApi from '@/api/goods'
import { OrderTypeEnum, DeliveryTypeEnum } from '@/common/enum/order' import {
CouponTypeEnum
} from '@/common/enum/coupon'
import {
OrderTypeEnum,
DeliveryTypeEnum
} from '@/common/enum/order'
const CouponColors = ['red', 'blue', 'violet', 'yellow'] const CouponColors = ['red', 'blue', 'violet', 'yellow']
@ -421,7 +446,13 @@
// //
setting: {}, setting: {},
timer: "", timer: "",
distance_unit: "" distance_unit: "",
stockValue: true,
addressResult: {
province: '江苏省',
city: '南京市',
district: '玄武区'
}
} }
}, },
@ -459,6 +490,55 @@
}, },
methods: { methods: {
async getGoodsStockInfor(order) {
let that = this
let step = 0
let list = [];
order.goodsList.forEach(item => {
list.push({
goods_id: item.goods_id,
num: item.total_num
})
});
if (that.curDelivery == DeliveryTypeEnum.EXTRACT.value) {
that.addressResult.province = order.extractShop ? order.extractShop.region.province : '江苏省'
that.addressResult.city = order.extractShop ? order.extractShop.region.city : '南京市'
that.addressResult.district = order.extractShop ? order.extractShop.region.region : '玄武区'
} else {
that.addressResult.province = order.address ? order.address.region.province : '江苏省'
that.addressResult.city = order.address ? order.address.region.city : '南京市'
that.addressResult.district = order.address ? order.address.region.region : '玄武区'
}
let params = {
list: list,
province: this.addressResult.province,
city: this.addressResult.city,
district: this.addressResult.district
}
let {
status,
message,
data
} = await GoodsApi.getGoodsStock(params);
if (status == 200) {
order.goodsList.forEach(item_1 => {
item_1.stockValue = '有货'
data.forEach(item_2 => {
if (item_1.goods_id == item_2.goods_id) {
item_1.stockValue = item_2.state
}
if (item_2.state == '无货') {
step++
}
});
});
if(step>0){
this.showToast('部分商品无货')
}
that.order = order
this.stockValue = step > 0 ? false : true
}
},
toStore() { toStore() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/news/consult/about" url: "/pages/news/consult/about"
@ -482,7 +562,11 @@
// //
getOrderData() { getOrderData() {
const app = this const app = this
const { options: { mode } } = app const {
options: {
mode
}
} = app
// //
const params = app.getRequestParam() const params = app.getRequestParam()
// api // api
@ -493,7 +577,11 @@
}, },
// //
initData({ order, setting, personal }) { initData({
order,
setting,
personal
}) {
const app = this const app = this
app.order = order app.order = order
app.personal = personal app.personal = personal
@ -513,12 +601,15 @@
if (app.phone === '') { if (app.phone === '') {
app.phone = order.lastExtract.phone app.phone = order.lastExtract.phone
} }
this.getGoodsStockInfor(app.order)
}, },
// api // api
getRequestParam() { getRequestParam() {
const app = this const app = this
const { options } = app const {
options
} = app
// //
const modeParam = getModeParam(options.mode, options) const modeParam = getModeParam(options.mode, options)
// () // ()
@ -528,7 +619,10 @@
couponId: app.selectCouponId || 0, couponId: app.selectCouponId || 0,
isUsePoints: app.isUsePoints ? 1 : 0, isUsePoints: app.isUsePoints ? 1 : 0,
} }
return { ...orderParam, ...modeParam } return {
...orderParam,
...modeParam
}
}, },
// //
@ -553,7 +647,9 @@
// //
handleSelectCoupon(index) { handleSelectCoupon(index) {
const app = this const app = this
const { couponList } = app.order const {
couponList
} = app.order
// //
const couponItem = couponList[index] const couponItem = couponList[index]
// //
@ -581,17 +677,23 @@
// //
onSelectAddress() { onSelectAddress() {
this.$navTo('pages/address/index', { from: 'checkout' }) this.$navTo('pages/address/index', {
from: 'checkout'
})
}, },
// //
onSelectExtractPoint() { onSelectExtractPoint() {
this.$navTo('pages/shop/extract', { selectedId: this.selectedShopId }) this.$navTo('pages/shop/extract', {
selectedId: this.selectedShopId
})
}, },
// //
onTargetGoods(goodsId) { onTargetGoods(goodsId) {
this.$navTo('pages/goods/detail', { goodsId }) this.$navTo('pages/goods/detail', {
goodsId
})
}, },
// //
@ -613,7 +715,9 @@
// : // :
const orderId = result.data.orderId const orderId = result.data.orderId
setTimeout(() => { setTimeout(() => {
this.$navTo('pages/checkout/cashier/index', { orderId }, 'redirectTo') this.$navTo('pages/checkout/cashier/index', {
orderId
}, 'redirectTo')
}, 100) }, 100)
}) })
.catch(res => app.showToast(res.errMsg, 3000)) .catch(res => app.showToast(res.errMsg, 3000))
@ -629,7 +733,9 @@
// //
getFormData() { getFormData() {
const app = this const app = this
const { options } = app const {
options
} = app
// //
const form = { const form = {
delivery: app.curDelivery, delivery: app.curDelivery,
@ -650,7 +756,10 @@
} }
// //
const modeParam = getModeParam(options.mode, options) const modeParam = getModeParam(options.mode, options)
return { ...form, ...modeParam } return {
...form,
...modeParam
}
}, },
// //
@ -686,7 +795,10 @@
// toast // toast
showToast(title, duration = 2000) { showToast(title, duration = 2000) {
this.$refs.uToast.show({ title, duration }) this.$refs.uToast.show({
title,
duration
})
} }
} }
@ -700,6 +812,7 @@
padding-bottom: 140rpx; padding-bottom: 140rpx;
background: url('https://www.royaum.com.cn/static/news/login-bg.png') center top no-repeat; background: url('https://www.royaum.com.cn/static/news/login-bg.png') center top no-repeat;
background-size: 100% auto; background-size: 100% auto;
/* 优惠券选择 */ /* 优惠券选择 */
.popup__coupon { .popup__coupon {
background: #fff; background: #fff;
@ -879,6 +992,7 @@
margin: 30rpx auto 0; margin: 30rpx auto 0;
position: relative; position: relative;
height: 88rpx; height: 88rpx;
.toDoor { .toDoor {
width: 50%; width: 50%;
height: 74rpx; height: 74rpx;
@ -891,6 +1005,7 @@
float: left; float: left;
margin-top: 14rpx; margin-top: 14rpx;
float: left; float: left;
&-on { &-on {
width: 350rpx; width: 350rpx;
height: 88rpx; height: 88rpx;
@ -906,6 +1021,7 @@
z-index: 2; z-index: 2;
border-radius: 10rpx 10rpx 0 0; border-radius: 10rpx 10rpx 0 0;
} }
&-dis { &-dis {
border-radius: 10rpx 10rpx 0 0; border-radius: 10rpx 10rpx 0 0;
} }
@ -922,6 +1038,7 @@
box-sizing: border-box; box-sizing: border-box;
} }
.timer { .timer {
display: flex; display: flex;
width: 700rpx; width: 700rpx;
@ -933,11 +1050,13 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 32rpx 0 28rpx; padding: 0 32rpx 0 28rpx;
.youTime { .youTime {
font-size: 25rpx; font-size: 25rpx;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
} }
input { input {
flex: 1; flex: 1;
padding: 0 20rpx; padding: 0 20rpx;
@ -946,10 +1065,12 @@
color: #000000; color: #000000;
text-align: right; text-align: right;
} }
.leftImg { .leftImg {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #9E9E9E; color: #9E9E9E;
image { image {
width: 12rpx; width: 12rpx;
height: 18rpx; height: 18rpx;
@ -957,36 +1078,44 @@
} }
} }
} }
.leftText { .leftText {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #F21A1C; color: #F21A1C;
line-height: 28rpx; line-height: 28rpx;
} }
.shopAddress { .shopAddress {
max-height: 260rpx; max-height: 260rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
overflow: hidden; overflow: hidden;
.tip { .tip {
font-size: 24rpx; font-size: 24rpx;
color: #F32E2E; color: #F32E2E;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
image { image {
width: 12rpx; width: 12rpx;
height: 18rpx; height: 18rpx;
} }
} }
.pickUp { .pickUp {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin-top: 16rpx; margin-top: 16rpx;
.pickPeople { .pickPeople {
flex: 1; flex: 1;
&:first-child { &:first-child {
margin-right: 20rpx; margin-right: 20rpx;
} }
.title { .title {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
@ -997,6 +1126,7 @@
margin-top: 10rpx; margin-top: 10rpx;
display: flex; display: flex;
align-items: center; align-items: center;
input { input {
width: 200rpx; width: 200rpx;
line-height: 60rpx; line-height: 60rpx;
@ -1004,6 +1134,7 @@
color: #2C2C2C; color: #2C2C2C;
display: block; display: block;
} }
.edit { .edit {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
@ -1012,10 +1143,12 @@
} }
} }
} }
.a { .a {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.youTime { .youTime {
font-size: 28rpx; font-size: 28rpx;
font-weight: 600; font-weight: 600;
@ -1026,6 +1159,7 @@
font-size: 24rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #F42B17; color: #F42B17;
image { image {
width: 12rpx; width: 12rpx;
height: 18rpx; height: 18rpx;
@ -1033,16 +1167,19 @@
} }
} }
} }
.b { .b {
font-size: 24rpx; font-size: 24rpx;
color: #838383; color: #838383;
line-height: 50rpx; line-height: 50rpx;
} }
.lookMap { .lookMap {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 8rpx; margin-top: 8rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
.addressIcon { .addressIcon {
width: 23rpx; width: 23rpx;
height: 26rpx; height: 26rpx;
@ -1073,6 +1210,7 @@
} }
} }
} }
.address { .address {
width: 100%; width: 100%;
display: flex; display: flex;
@ -1081,26 +1219,32 @@
justify-content: space-between; justify-content: space-between;
padding: 0 22rpx 0 32rpx; padding: 0 22rpx 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
.addAddress { .addAddress {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
// color: #F32E2E; // color: #F32E2E;
color: #212121; color: #212121;
.info { .info {
flex: 1; flex: 1;
.name { .name {
font-size: 28rpx; font-size: 28rpx;
color: #212121; color: #212121;
text { text {
margin-left: 20rpx; margin-left: 20rpx;
color: #666; color: #666;
} }
} }
.detail { .detail {
margin-top: 10rpx; margin-top: 10rpx;
font-size: 26rpx; font-size: 26rpx;
} }
} }
.tip { .tip {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
@ -1111,6 +1255,7 @@
.leftImg { .leftImg {
width: 12rpx; width: 12rpx;
height: 18rpx; height: 18rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -1118,10 +1263,12 @@
} }
} }
} }
.ziqu { .ziqu {
overflow: hidden; overflow: hidden;
padding: 0 22rpx 0 32rpx; padding: 0 22rpx 0 32rpx;
} }
.preTime { .preTime {
width: 700rpx; width: 700rpx;
height: 140rpx; height: 140rpx;
@ -1132,6 +1279,7 @@
justify-content: space-between; justify-content: space-between;
padding: 34rpx 0 0 30rpx; padding: 34rpx 0 0 30rpx;
box-sizing: border-box; box-sizing: border-box;
.left { .left {
.bagImg { .bagImg {
font-size: 24rpx; font-size: 24rpx;
@ -1139,6 +1287,7 @@
color: #000000; color: #000000;
display: flex; display: flex;
align-items: center; align-items: center;
.bag { .bag {
width: 35rpx; width: 35rpx;
height: 35rpx; height: 35rpx;
@ -1188,13 +1337,18 @@
} }
.goods { .goods {
margin-top: 28rpx;
.goodsBox {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: 28rpx;
justify-content: space-between; justify-content: space-between;
}
.goodsImg { .goodsImg {
width: 162rpx; width: 162rpx;
height: 148rpx; height: 148rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -1204,6 +1358,7 @@
.goodsInfo { .goodsInfo {
margin-left: 20rpx; margin-left: 20rpx;
max-width: 400rpx; max-width: 400rpx;
.goodsName { .goodsName {
min-height: 40rpx; min-height: 40rpx;
font-size: 28rpx; font-size: 28rpx;
@ -1220,17 +1375,20 @@
font-weight: 600; font-weight: 600;
color: #F21A1C; color: #F21A1C;
line-height: 50rpx; line-height: 50rpx;
text { text {
font-size: 36rpx; font-size: 36rpx;
} }
} }
} }
.goods-props { .goods-props {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.goodsNum { .goodsNum {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
@ -1269,6 +1427,7 @@
font-size: 28rpx; font-size: 28rpx;
color: #F42B17; color: #F42B17;
} }
image { image {
width: 12rpx; width: 12rpx;
height: 18rpx; height: 18rpx;
@ -1373,6 +1532,7 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
z-index: 22; z-index: 22;
.meetPrice { .meetPrice {
margin-left: 26rpx; margin-left: 26rpx;
font-size: 24rpx; font-size: 24rpx;

Loading…
Cancel
Save