shuxiaoquan 11 months ago
commit 9f29108806
  1. 2
      api/goods/index.js
  2. 2836
      components/goods-sku-popup/index.vue
  3. 4
      pages/cart/index.vue
  4. 71
      pages/goods/components/SkuPopup.vue
  5. 96
      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. 2412
      pages/sureOrder/index.vue

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

File diff suppressed because it is too large Load Diff

@ -90,7 +90,7 @@
<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>
</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 class="goodsInfo1">
<view class="oneTip">
@ -139,7 +139,7 @@
<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>
</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 class="goodsInfo1">
<view class="oneTip">

@ -16,6 +16,7 @@
} from '@/utils/color'
import * as CartApi from '@/api/cart'
import GoodsSkuPopup from '@/components/goods-sku-popup'
import * as GoodsApi from '@/api/goods'
export default {
components: {
@ -37,7 +38,15 @@
goods: {
type: Object,
default: {}
}
},
addressResult: {
type: Object,
default: {
province: '江苏省',
city: '南京市',
district: '玄武区'
}
},
},
data() {
return {
@ -47,6 +56,7 @@
maxBuyNum: null,
selectSku: '',
shopNum: 1,
stockValue: '有货',
}
},
computed: {
@ -184,9 +194,17 @@
},
selectedOld(e) {
this.selectSku = e
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
},
numChange(e) {
this.shopNum = e
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
},
// sku -----------------------------------------------------------
openSkuPopup() {
@ -194,17 +212,48 @@
},
closeSkuPopup() {
this.$emit('getSku', {
selectSku: this.selectSku,
shopNum: this.shopNum
})
// 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) {
this.selectInfor = selectShop
const app = this
app.getGoodsStockInfor(selectShop, 1)
},
addCartInfor(selectShop) {
const app = this
app.selectInfor = selectShop
const {
goods_id,
goods_sku_id,
@ -224,9 +273,13 @@
app.$emit('addCart', cartTotal)
})
},
//
buyNow(selectShop) {
const app = this
app.getGoodsStockInfor(selectShop, 2)
},
buyNowInfor(selectShop) {
const app = this
this.selectInfor = selectShop
if (uni.getStorageSync("userInfo").user_type == 40) {
//
@ -244,7 +297,7 @@
})
//
this.onChangeValue(false)
}
},
}
}

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

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

@ -127,7 +127,7 @@
<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>
</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>
</view>
<view class="goodsInfo">
@ -181,7 +181,7 @@
<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>
</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>
</view>
<view class="goodsInfo">

@ -259,7 +259,7 @@
<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>
</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 class="goodsInfo1">
<view class="oneTip">
@ -308,7 +308,7 @@
<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>
</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 class="goodsInfo1">
<view class="oneTip">

@ -34,7 +34,7 @@
<view class="l">发票抬头</view>
<view class="r">
<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 class="item" v-if="tabIndex == 2">
@ -192,7 +192,7 @@
icon: 'none',
duration: 2000
})
if (result.data.list.length.length > 0) {
if (result.data.length > 0) {
uni.navigateTo({
url: "/pages/invoice/detail?id=" + result.data.list[0].id
})
@ -244,7 +244,7 @@
},
bindPickerChange1() {
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-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 active-color="#FF4434" v-for="(item, index) in checkboxList2" :key="index"
:name="item.val">

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

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save