tianyi 1 month ago
parent
commit
ef768521c4
  1. 22
      package1/buyFood/buyFood.vue
  2. 51
      package1/group/groupBuySingle.vue
  3. 25
      package1/myCenter/addGoods.vue
  4. 91
      package1/myCenter/attributeList.vue
  5. 2
      package1/myCenter/goodsList.vue
  6. 5
      package1/order/orderDetail.vue
  7. 2
      package1/runErrand/runErrand.vue

22
package1/buyFood/buyFood.vue

@ -313,7 +313,7 @@
<text
style="font-size: 60rpx;">{{backendTotalAmount ? backendTotalAmount.toFixed(2) : totalAmountCalc.toFixed(2)}}</text>
</view>
<view style="height: 40rpx;text-align: center;color: red;">
<view style="height: 40rpx;text-align: center;color: red;" v-if="isGroupBuy">
若拼团失败将会为您自动退款
</view>
</view>
@ -693,7 +693,10 @@
let shopArea = this.shopItem.shopArea || '';
let putArea = this.formData.address ? this.formData.address.areaId : '';
if(shopArea == '' || putArea == ''){
this.tui.toast('请先选择取货和收货地址');
uni.showToast({
title: '请先选择取货和收货地址',
icon: 'none'
})
return;
}
uni.navigateTo({
@ -756,7 +759,10 @@
wxPayment() {
let that = this;
if (!this.currentOrderId || !this.backendTotalAmount) {
that.tui.toast(this.currentOrderId + this.backendTotalAmount);
uni.showToast({
title: this.currentOrderId + this.backendTotalAmount,
icon: 'none'
})
return;
}
@ -811,10 +817,16 @@
that.handlePaymentSuccess();
}, 1500);
}).catch(e => {
that.tui.toast("请求失败");
uni.showToast({
title: '请求失败',
icon: 'none'
})
});
} else {
that.tui.toast(res.message);
uni.showToast({
title: res.message,
icon: 'none'
})
}
}
})

51
package1/group/groupBuySingle.vue

@ -302,7 +302,7 @@
:class="selectedGroupRule && selectedGroupRule.groupCount === rule.groupCount ? 'team-check' : 'team1'"
v-for="(rule, rIndex) in currentItem.productGroupBuyPrices" :key="rIndex"
@tap="selectGroupRule(rule)">
<view class="team11">
<view class="team11" style="margin-top: 0;">
{{parseFloat(rule.groupPrice).toFixed(2)}}
</view>
<view class="team11">
@ -331,14 +331,17 @@
</view>
</view>
<view class="goods-team" v-if="moreBuyList.length > 0 && isPintuan">
<view :class="spec.isChecked ? 'team-check' : 'team1'"
<view class="goods-team" v-if="moreBuyList.length > 0 && isPintuan" style="min-height: 280rpx;">
<view :class="spec.isChecked ? 'team-check1' : 'team2'"
v-for="(spec, sIndex) in moreBuyList" :key="sIndex"
@tap="selectMoreBuy(spec,sIndex)">
<view class="team11">
<view>
<img :src="spec.productPicture" alt="" style="width: 70px;height: 70px;background-size: 100%;">
</view>
<view class="team11" style="margin-top:10rpx;">
{{spec.attributeListPrice | sliceMsg}}
</view>
<view class="team11">
<view class="team11" style="margin-top:10rpx;">
{{spec.productName}}
</view>
<view class="jiaobiao" v-if="spec.isChecked && spec.quantity>0">
@ -2101,6 +2104,11 @@
font-size: 28rpx;
font-weight: 700;
}
.spec22 {
display: flex;
white-space: nowrap;
overflow-x: scroll;
}
.spec222 {
display: inline-block;
@ -2127,7 +2135,6 @@
.team1 {
width: 154rpx;
height: 126rpx;
background: #eee;
border-radius: 20rpx;
font-size: 26rpx;
@ -2136,11 +2143,35 @@
float: left;
margin-right: 40rpx;
font-weight: 700;
padding: 10px;
}
.team2{
width: 190rpx;
height: 270rpx;
background: #f5f5f5;
border-radius: 10px;
float: left;
text-align: center;
margin-right: 20px;
padding: 10px 10px 0;
}
.team-check1 {
width: 190rpx;
height: 280rpx;
background: rgba(166, 255, 234, 1);
border-radius: 20rpx;
font-size: 26rpx;
text-align: center;
line-height: 40rpx;
float: left;
margin-right: 40rpx;
position: relative;
padding: 10px 10px 0;
font-weight: 700;
}
.team-check {
width: 154rpx;
height: 126rpx;
height: auto;
background: rgba(166, 255, 234, 1);
border-radius: 20rpx;
font-size: 26rpx;
@ -2149,6 +2180,7 @@
float: left;
margin-right: 40rpx;
position: relative;
padding: 10px;
}
.zaixian-swiper{
flex: 1;
@ -2171,6 +2203,9 @@
.goods-team {
width: 100%;
min-height: 130rpx;
display: flex;
white-space: nowrap;
overflow-x: scroll;
}
.list-right {

25
package1/myCenter/addGoods.vue

@ -54,9 +54,9 @@
<uni-forms-item label="拼团信息" name="productGroupBuyPrices">
<view>
<view v-for="(item,index) in formData.productGroupBuyPrices" :key="index" style="display: flex;margin-top:10rpx;">
<input class="content-input" v-model="item.groupCount" style="padding-right: 20rpx;margin-right: 20rpx;" placeholder="成团人数" />
<input class="content-input" v-model="item.groupPrice" style="padding-right: 20rpx;" placeholder="成团价格"/>
<button @click="delGroup(index)" v-if="formData.productGroupBuyPrices.length>1" style="width: 240rpx;height: 60rpx;line-height: 60rpx;color: red;border:none;background: #fff;">删除</button>
<input class="content-input" v-model="item.groupCount" style="padding-right: 20rpx;margin-right: 20rpx;width: 100px;" placeholder="成团人数" />
<input class="content-input" v-model="item.groupPrice" style="padding-right: 20rpx;width: 100px;" placeholder="成团价格"/>
<view @click="delGroup(index)" v-if="formData.productGroupBuyPrices.length>1" style="width: 240rpx;height: 60rpx;line-height: 60rpx;color: red;border:none;background: #fff;">删除</view>
</view>
<view @click="addGroup()" style="margin-top: 10rpx;width: 160rpx;height: 60rpx;text-align: center;line-height: 60rpx;background: rgba(0, 35, 28, 1);border-radius: 60rpx;color: rgba(166, 255, 234, 1);">
新增拼团
@ -124,21 +124,24 @@
<!-- 添加分类弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view style="height:900rpx;">
<view class="content-left" style="float: left;">
<view style="height:900rpx;display: flex;">
<view class="content-left">
<view class="left-box" v-for="(item,index) in categoryData" :key="index"
:class="item.parentId ? 'left-box-hover':''" @tap="clickLeftBtn(index)">
<text style="width: 100%;height: 100rpx;line-height: 100rpx;display: inline-block;overflow: hidden;"
:class="item.parentId ? 'red' :''">{{item.title}}</text>
</view>
</view>
<view v-for="(item,index) in categorySonData" :key="index" @tap="checkSpecValue(index)" class="content-low" :class="item.checked?'checked':''">
{{item.title}}
</view>
<view>
<uni-forms-item label="可选数量" name="currentCanbuy">
<view style="flex: 1;position: relative;padding: 20rpx;">
<view v-for="(item,index) in categorySonData" :key="index" @tap="checkSpecValue(index)" class="content-low" :class="item.checked?'checked':''">
{{item.title}}
</view>
<view style="position: absolute;bottom: 0;">
<view style="font-size: 28rpx;line-height: 60rpx;font-weight: 700;">
该分类可选数量
</view>
<input type="digit" class="content-input" v-model="currentCanbuy" placeholder="该分类可选几个(默认1)">
</uni-forms-item>
</view>
</view>
</view>
<view slot="footer" style="display: flex;padding-left: 40rpx;margin-top: 20rpx;">

91
package1/myCenter/attributeList.vue

@ -6,25 +6,25 @@
<uni-icons type="left" size="28"></uni-icons>
</view>
<view class="title-name" :style="{'padding-top': menuButtonInfo.top +'px'}">
规格管理
属性管理
</view>
</view>
</view>
<view style="width: 100%;position: fixed;bottom: 10px;background: #fff;z-index: 99;">
<button size="default" type="default" @tap="inputDialogToggle('add')" hover-class="is-hover">添加规格</button>
<button size="default" type="default" @tap="inputDialogToggle('add')" hover-class="is-hover">添加属性</button>
</view>
<view class="card-list">
<ul>
<li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)">
<view class="name">
<text>{{item.attributeName}}</text>
<u-icon name="edit-pen-fill" size="22" v-if="item.attributeName != '默认规格'" @tap.stop="inputDialogToggle('edit', item)"></u-icon>
<u-icon name="edit-pen-fill" size="22" v-if="item.attributeName != '默认属性'" @tap.stop="inputDialogToggle('edit', item)"></u-icon>
</view>
<button class="bj-btn" @tap.stop="goGategoryLow(item)">管理属性</button>
</li>
</ul>
</view>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此规格?'" showCancelButton="true" @cancel="show = false"
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此属性?'" showCancelButton="true" @cancel="show = false"
@confirm="delItemModal"></u-modal>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
@ -35,17 +35,17 @@
<uni-popup ref="delDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-title">
<text>编辑规格</text>
<text>编辑属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view class="add-popup-container">
<view style="width: 90%;margin: 40rpx auto 0;">
规格名称
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入规格值" />
属性名称
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入属性值" />
</view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;color: #fff;display: flex;position: absolute;bottom: 0;">
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认规格'" @tap="dialogDel">删除</view>
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认属性'" @tap="dialogDel">删除</view>
<view style="flex: 1;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view>
</view>
<!-- <ul>
@ -64,20 +64,18 @@
</view>
</view>
</uni-popup>
<!-- 添加规格弹出层 -->
<!-- 添加属性弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-title">
<text>新增规格</text>
<text>新增属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view class="add-popup-container">
<view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加规格,如没有想要的快捷项可以手动输入</text>
</view>
<input type="text" v-model="typeText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;"
placeholder="请输入规格名称">
placeholder="请输入属性名称">
<!-- <ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
@ -99,7 +97,7 @@
</uni-popup>
<uni-popup ref="attrValueDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-content" style="width: 640rpx;max-height: 600px;overflow: scroll;">
<view class="add-popup-title">
<text>管理属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
@ -107,16 +105,20 @@
</view>
<view class="add-popup-container">
<view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加属性,如没有想要的快捷项可以手动输入</text>
<text style="color:red;font-size:22rpx;">*点击+号可新增专属自己店铺的属性值</text>
</view>
<view style="display: flex;font-weight: 700;font-size: 16px;height: 50px;line-height: 50px;padding-right: 10px;">
<view style="flex: 1;">
属性列表
</view>
<uni-icons type="plusempty" @tap="toggle()" color="#5fd9ee" size="20"></uni-icons>
</view>
<u-icon size="20" name="plus" color="#5fd9ee"
@tap="toggle() "></u-icon>
<ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
<view class="name">{{item.value}}</view>
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认规格'" @tap="editValue(item)">修改</view>
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认规格'" @tap="delValue(item)">删除</view>
<view class="btn" v-if="inputVal != '默认属性'" @tap="editValue(item)">修改</view>
<view class="btn" v-if="inputVal != '默认属性'" @tap="delValue(item)">删除</view>
</view>
</li>
</ul>
@ -130,11 +132,11 @@
<view style="font-size: 36rpx;font-weight: bold;text-align: center;">提示</view>
<view v-if="goodsList !=''"
style="width:100%;font-weight:bold;text-align: center;font-size: 28rpx;margin: 20rpx 0;">
{{goodsList[0].productName}}规格下有以下库存确认继续删除吗
{{goodsList[0].productName}}属性下有以下库存确认继续删除吗
</view>
<view class="tui-order-item boxbg">
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;">
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view>
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品属性</view>
<view style="width: 29%;text-align: center;">数量</view>
</view>
<view class="shop-box" v-for="(item,index) in goodsList" :key="index" style="position: relative;">
@ -191,7 +193,7 @@
isOpenId: '',
delType: '',
goodsList: [],
dialogTit: '输入规格名',
dialogTit: '输入属性名',
typeText:'',
sortText:'',
sortTextEdit:'',
@ -369,7 +371,7 @@
}).catch((res) => {})
},
//
//
getGategoryList() {
this.tui.request("/app/productAttribute/selectByCategoryId", "post", {categoryId:this.attrId}, false, true).then((res) => {
if (res.code == 200) {
@ -389,13 +391,13 @@
} else if (type == 'add') {
this.inputVal = '';
this.isOpenId = item;
this.dialogTit = '输入规格名'
this.dialogTit = '输入属性名'
this.$refs.addTypeDialog.open('bottom')
}
},
close(){
this.$refs.addTypeDialog.close()
this.$refs.attrValueDialog.close()
},
handleBlur(e){
this.inputVal = e.detail.value
@ -403,7 +405,7 @@
handleBlurSort(e){
this.sortTextEdit = e.detail.value
},
//
//
getTypeToNum(id) {
let that = this;
this.tui.request("/app/stock/getlistByAttributeList", "post", {
@ -421,7 +423,7 @@
if (res1.result.length > 0) {
uni.showModal({
title: "提示",
content: "此规格已经维护了子规格,确定继续删除吗?",
content: "此属性已经维护了子属性,确定继续删除吗?",
success: function(res2) {
if (res2.confirm) {
that.delItemModal()
@ -486,7 +488,7 @@
}).catch((res) => {})
}
},
//
//
dialogInputConfirm(e) {
let that = this;
switch (that.typeModel) {
@ -501,7 +503,7 @@
}
}
if(e == ''){
that.tui.toast("请输入规格名")
that.tui.toast("请输入属性名")
return
}
that.tui.request("/app/productAttribute/save", "post", {
@ -610,7 +612,7 @@
this.delItems = item;
this.getTypeToNum(this.delItems.id)
},
//
//
goGategoryLow(item) {
this.editItem = item
this.tui.request("/app/productAttributeValue/selectByAttributeId", "get", {
@ -628,7 +630,7 @@
}).catch((res) => {})
},
//
//
addMultipleType(item,item1,index){
@ -644,16 +646,16 @@
this.multipleList.push(data)
}else{
for(var i=0;i<this.multipleList.length;i++){
if(this.multipleList[i].attributeName == item.name){ //
if(this.multipleList[i].attributeName == item.name){ //
for(var m=0;m<this.multipleList[i].productAttributeValueVoList.length;m++){
if(this.multipleList[i].productAttributeValueVoList[m].value == item.list[index].value){ //
if(this.multipleList[i].productAttributeValueVoList[m].value == item.list[index].value){ //
this.multipleList[i].productAttributeValueVoList.splice(m,1)
return;
}else{ //
}else{ //
if(m+1 == this.multipleList[i].productAttributeValueVoList.length){
this.multipleList[i].productAttributeValueVoList.push(item.list[index])
@ -662,7 +664,7 @@
}
}
}
}else{ //
}else{ //
if(this.multipleList.length == i+1){
@ -760,7 +762,7 @@
border-radius: 10upx;
background: #fff;
height: auto;
margin: 150rpx auto 0;
margin: -200rpx auto 0;
}
.checked{
@ -847,6 +849,15 @@
bottom: 0;
left: 20rpx;
}
.btn{
flex: 1;
line-height: 25px;
text-align: center;
height: 25px;
color: #1E90FF;
border-radius: 7px;
margin: 5px 0 0 10px;
}
.title-search {
margin-top: 110rpx;
@ -901,7 +912,7 @@
justify-content: center;
padding: 30rpx;
width: 100%;
height: 400rpx;
height: 325rpx;
background-color: #fff;
overflow: scroll;
}
@ -941,10 +952,10 @@
height: 70rpx;
margin: 0 auto;
border-bottom: 1px solid #eee;
display: flex;
.name {
font-size: 30rpx;
width: 90%;
float: left;
width: 65%;
height: 70rpx;
line-height: 70rpx;
}

2
package1/myCenter/goodsList.vue

@ -46,7 +46,7 @@
<text>餐盒费</text>
</view>
<view class="price-box">
<text>{{item.startPayNum}}</text>
<text>{{item.startPayNum?item.startPayNum:0}}</text>
<text>起售数量</text>
</view>
<view class="price-box" @tap="changeShow(index,'shopList')" style="flex: 1;text-align: right;padding-top: 26rpx;">

5
package1/order/orderDetail.vue

@ -65,7 +65,7 @@
</view>
</view>
<view class="kaituan41">
<button open-type="share" style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;">
<button open-type="share" class="share-btn" style="background:transparent;border:none;color:inherit;font-size:inherit;display:inline-flex;align-items:center;">
分享至微信 <uni-icons type="weixin" size="15"></uni-icons>
</button>
</view>
@ -1524,4 +1524,7 @@
font-size: 28rpx;
font-weight: 700;
}
.share-btn::after{
border: 0;
}
</style>

2
package1/runErrand/runErrand.vue

@ -306,7 +306,7 @@
alt="" style="width: 36rpx;height: 36rpx;" />
</view>
</view>
<view class="btn" @tap="wxPayment" style="width: 90%; height: 100rpx; background: linear-gradient(90deg, #e3ff96, #a6ffea); font-size: 32rpx; font-weight: 700; line-height: 100rpx; text-align: center; border-radius: 100rpx; margin: 40rpx auto 60rpx;">
<view class="btn" @tap="wxPayment" style="width: 90%; height: 100rpx; background: linear-gradient(90deg, #e3ff96, #a6ffea); font-size: 32rpx; font-weight: 700; line-height: 100rpx; text-align: center; border-radius: 100rpx; margin: 40rpx auto 0;">
确认付款
</view>
</view>

Loading…
Cancel
Save