Compare commits
4 Commits
1f7eebd66a
...
414ea79463
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
414ea79463 | ||
|
|
d3c1ab9a99 | ||
|
|
fad29dd656 | ||
|
|
7d6cff8a62 |
@ -43,7 +43,7 @@
|
||||
<view class="group-price">
|
||||
<view>¥{{ item.commodity_goods_info.sales_price }}/{{
|
||||
item.commodity_goods_info.goods_unit
|
||||
}}</view>
|
||||
}}</view>
|
||||
<!-- 运费 -->
|
||||
<view class="goods-desc" style="margin-top: 10rpx;">运费 ¥{{
|
||||
item.commodity_goods_info.freight }}</view>
|
||||
@ -462,10 +462,10 @@ export default {
|
||||
});
|
||||
item.count = 0
|
||||
} else {
|
||||
item.count--
|
||||
item.count -= item.is_one_one === 1 ? 2 : 1;
|
||||
}
|
||||
} else {
|
||||
item.count--
|
||||
item.count -= item.is_one_one === 1 ? 2 : 1;
|
||||
}
|
||||
|
||||
// 当数量减到0时,从carList中删除该商品
|
||||
@ -496,11 +496,11 @@ export default {
|
||||
|
||||
if (currentTime >= startTime && currentTime <= endTime) {
|
||||
if (item.count == 0) {
|
||||
item.count += item.commodity_goods_info.min_order_quantity
|
||||
item.count += item.is_one_one === 1 ? 2 : 1;
|
||||
} else {
|
||||
if (item.count >= item.commodity_goods_info.stock_quantity) {
|
||||
if (item.count >= item.purchase_limit) {
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
title: '您选择的数量已达到最大限购量',
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
@ -514,7 +514,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
item.count++;
|
||||
item.count += item.is_one_one === 1 ? 2 : 1;
|
||||
this.changeCart(item);
|
||||
},
|
||||
// 更改购物车
|
||||
@ -543,7 +543,7 @@ export default {
|
||||
let total = 0;
|
||||
this.orderList1.forEach(goods => {
|
||||
// 直接使用item.price进行计算
|
||||
total += goods.price * goods.count;
|
||||
total += goods.price * (goods.is_one_one === 1 ? goods.count / 2 : goods.count);
|
||||
});
|
||||
// 加运费
|
||||
return total.toFixed(2);
|
||||
@ -551,7 +551,7 @@ export default {
|
||||
let total = 0;
|
||||
this.orderList2.forEach(goods => {
|
||||
// 直接使用item.price进行计算
|
||||
total += goods.price * goods.count;
|
||||
total += goods.price * (goods.is_one_one === 1 ? goods.count / 2 : goods.count);
|
||||
this.totalPrice = total.toFixed(2);
|
||||
});
|
||||
// 加运费
|
||||
@ -666,7 +666,7 @@ export default {
|
||||
goods_and_count: group.map(item => {
|
||||
return {
|
||||
goods_id: item.goods_id,
|
||||
count: item.count,
|
||||
count: item.is_one_one === 1 ? item.count / 2 : item.count,
|
||||
price: item.price,
|
||||
freight: item.commodity_goods_info.freight,
|
||||
}
|
||||
|
||||
@ -147,25 +147,23 @@ export default {
|
||||
increaseQuantity(index) {
|
||||
const item = this.goodsList[index]
|
||||
if (item.quantity == 0) {
|
||||
item.quantity += item.min_order_quantity || 1
|
||||
this.carNum += item.min_order_quantity || 1
|
||||
if (item.one_one === 1) {
|
||||
item.quantity += 2
|
||||
this.carNum += 2
|
||||
} else {
|
||||
item.quantity += 1
|
||||
this.carNum += 1
|
||||
}
|
||||
} else {
|
||||
if (item.quantity == item.total_stock) {
|
||||
if (item.quantity == (item.one_one === 1 ? item.purchase_limit * 2 : item.purchase_limit)) {
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
title: '您选择的数量已达到最大限购量',
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
if (item.quantity == item.max_limit_quantity) {
|
||||
uni.showToast({
|
||||
title: '一次最多购买' + item.max_limit_quantity + '件',
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
item.quantity++;
|
||||
this.carNum++;
|
||||
item.quantity = item.one_one === 1 ? item.quantity + 2 : item.quantity + 1;
|
||||
this.carNum = item.one_one === 1 ? this.carNum + 2 : this.carNum + 1;
|
||||
}
|
||||
const params = {
|
||||
goods_id_and_count: [
|
||||
@ -173,6 +171,8 @@ export default {
|
||||
goods_id: item.goods_id,
|
||||
count: item.quantity,
|
||||
price: item.promotional_price,
|
||||
is_one_one: item.one_one,
|
||||
purchase_limit: item.purchase_limit,
|
||||
},
|
||||
],
|
||||
adver_id: item.adver_id
|
||||
@ -183,9 +183,9 @@ export default {
|
||||
decreaseQuantity(index) {
|
||||
const item = this.goodsList[index]
|
||||
if (item.quantity > 0) {
|
||||
if (item.quantity == (item.min_order_quantity || 1)) {
|
||||
item.quantity = 0
|
||||
this.carNum = 0
|
||||
if (item.one_one === 1) {
|
||||
item.quantity = item.quantity - 2
|
||||
this.carNum = this.carNum - 2
|
||||
} else {
|
||||
item.quantity--;
|
||||
this.carNum--;
|
||||
@ -197,6 +197,8 @@ export default {
|
||||
goods_id: item.goods_id,
|
||||
count: item.quantity,
|
||||
price: item.promotional_price,
|
||||
is_one_one: item.one_one,
|
||||
purchase_limit: item.purchase_limit,
|
||||
},
|
||||
],
|
||||
adver_id: item.adver_id
|
||||
|
||||
@ -516,7 +516,12 @@ export default {
|
||||
// } else {
|
||||
// total += goods.commodity_goods_info.sales_price * goods.count;
|
||||
// }
|
||||
total += goods.price * goods.count
|
||||
|
||||
if(goods.is_one_one === 1) {
|
||||
total += goods.price * (goods.count / 2)
|
||||
} else {
|
||||
total += goods.price * goods.count
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -593,8 +598,8 @@ export default {
|
||||
that.deleteCarItem(carItem, goodsIndex, item);
|
||||
} else {
|
||||
// 正常减少数量
|
||||
this.shopCarTotal = Math.max(0, this.shopCarTotal - 1);
|
||||
carItem.count = carItem.count - 1;
|
||||
this.shopCarTotal = carItem.is_one_one === 1 ? Math.max(0, that.shopCarTotal - 2) : Math.max(0, that.shopCarTotal - 1);
|
||||
carItem.count = carItem.is_one_one === 1 ? carItem.count - 2 : carItem.count - 1;
|
||||
this.handleQuantityChange(carItem.count, carItem);
|
||||
|
||||
// 如果数量减为0,删除商品
|
||||
@ -617,12 +622,12 @@ export default {
|
||||
currentTime <= new Date(carItem.commodity_goods_info.group_buy_activity_info?.end_time).getTime();
|
||||
if (isGroupBuyActive) {
|
||||
if (carItem.count == 0) {
|
||||
carItem.count = carItem.commodity_goods_info.min_order_quantity
|
||||
this.shopCarTotal += carItem.commodity_goods_info.min_order_quantity;
|
||||
carItem.count = carItem.is_one_one === 1 ? 2 : 1
|
||||
this.shopCarTotal += carItem.is_one_one === 1 ? 2 : 1;
|
||||
} else {
|
||||
if (carItem.count == carItem.commodity_goods_info.total_stock) {
|
||||
if (carItem.count == carItem.purchase_limit) {
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
title: '您选择的数量已达到最大限购量',
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
@ -634,19 +639,19 @@ export default {
|
||||
});
|
||||
return
|
||||
}
|
||||
carItem.count++;
|
||||
this.shopCarTotal++;
|
||||
carItem.count += carItem.is_one_one === 1 ? 2 : 1;
|
||||
this.shopCarTotal += carItem.is_one_one === 1 ? 2 : 1;
|
||||
}
|
||||
} else {
|
||||
if (carItem.count >= carItem.commodity_goods_info.stock_quantity) {
|
||||
if (carItem.count >= carItem.purchase_limit) {
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
title: '您选择的数量已达到最大限购量',
|
||||
icon: 'none'
|
||||
});
|
||||
return
|
||||
}
|
||||
carItem.count++;
|
||||
this.shopCarTotal++;
|
||||
carItem.count += carItem.is_one_one === 1 ? 2 : 1;
|
||||
this.shopCarTotal += carItem.is_one_one === 1 ? 2 : 1;
|
||||
}
|
||||
|
||||
const item = carItem.commodity_cart_and_goods_model;
|
||||
|
||||
@ -231,7 +231,7 @@ export default {
|
||||
},
|
||||
{
|
||||
nav_icon: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/noValFunction1.png',
|
||||
nav_name: "物业保修",
|
||||
nav_name: "物业报修",
|
||||
},
|
||||
{
|
||||
nav_icon: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/noValFunction4.png',
|
||||
|
||||
@ -130,7 +130,7 @@ export default {
|
||||
localHeight: "",
|
||||
roomList: [],
|
||||
columns: [],
|
||||
category: {}, // 保修类型信息
|
||||
category: {}, // 报修类型信息
|
||||
repairInfo: '', // 问题描述
|
||||
contactName: '', // 联系人名称
|
||||
contactPhone: '', // 联系人电话
|
||||
|
||||
@ -46,6 +46,13 @@
|
||||
<input type="text" v-model="contact_phone" placeholder="请输入联系方式">
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_label">商家分类</view>
|
||||
<view class="row_con" @click="chooseClassify">
|
||||
<input type="text" disabled v-model="confirmClassify.short_name" placeholder="请选择商家分类">
|
||||
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="row_label">银行卡号</view>
|
||||
<view class="row_con nonebor">
|
||||
@ -61,7 +68,9 @@
|
||||
<u-upload :fileList="imgList" @afterRead="afterReadImg" @delete="deletePic" name="1" multiple
|
||||
:maxCount="10">
|
||||
<view class="imgCon">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
|
||||
mode="widthFix"></image>
|
||||
上传图片
|
||||
</view>
|
||||
</u-upload>
|
||||
@ -74,7 +83,9 @@
|
||||
<u-upload :fileList="imgList3" @afterRead="afterReadImg2" @delete="deletePic2" name="1" multiple
|
||||
:maxCount="10">
|
||||
<view class="imgCon">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
|
||||
mode="widthFix"></image>
|
||||
上传图片
|
||||
</view>
|
||||
</u-upload>
|
||||
@ -87,7 +98,9 @@
|
||||
<u-upload :fileList="imgList5" @afterRead="afterReadImg3" @delete="deletePic3" name="1" multiple
|
||||
:maxCount="1">
|
||||
<view class="imgCon">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image>
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
|
||||
mode="widthFix"></image>
|
||||
上传图片
|
||||
</view>
|
||||
</u-upload>
|
||||
@ -102,6 +115,8 @@
|
||||
@cancel="cancelCity"></u-picker>
|
||||
<u-picker :show="show3" :columns="[buss]" keyName="short_name" @confirm="clickBuss"
|
||||
@cancel="cancelBuss"></u-picker>
|
||||
<u-picker :show="show4" :columns="[classify]" keyName="short_name" @confirm="clickClassify"
|
||||
@cancel="cancelClassify"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -140,15 +155,18 @@ export default {
|
||||
store_name: "",
|
||||
address: "",
|
||||
|
||||
confirmProv:"",
|
||||
confirmCity:"",
|
||||
confirmBusiness:"",
|
||||
confirmProv: "",
|
||||
confirmCity: "",
|
||||
confirmBusiness: "",
|
||||
confirmClassify: "",
|
||||
pro: [],
|
||||
show: false,
|
||||
city: [],
|
||||
show2: false,
|
||||
buss: [],
|
||||
show3: false,
|
||||
classify: [],
|
||||
show4: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -181,6 +199,14 @@ export default {
|
||||
this.getCity(e.value[0].ad_code)
|
||||
this.confirmProv = e.value[0]
|
||||
},
|
||||
cancelClassify() {
|
||||
this.show4 = false;
|
||||
},
|
||||
clickClassify(e) {
|
||||
this.show4 = false;
|
||||
this.confirmClassify = e.value[0]
|
||||
console.log("🚀 ~ this.confirmClassify:", this.confirmClassify)
|
||||
},
|
||||
chooseCity() {
|
||||
this.show = true;
|
||||
},
|
||||
@ -190,6 +216,9 @@ export default {
|
||||
chooseCity3() {
|
||||
this.show3 = true;
|
||||
},
|
||||
chooseClassify() {
|
||||
this.show4 = true;
|
||||
},
|
||||
afterReadImg(e) {
|
||||
e.file.forEach(item => {
|
||||
upload(item.url, res => {
|
||||
@ -254,24 +283,30 @@ export default {
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
if(!that.confirmProv.ad_code){
|
||||
if (!that.confirmProv.ad_code) {
|
||||
return uni.showToast({
|
||||
title: '请选择所在省',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
if(!that.confirmCity.ad_code){
|
||||
if (!that.confirmCity.ad_code) {
|
||||
return uni.showToast({
|
||||
title: '请选择所在市',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
if(!that.confirmBusiness.ad_code){
|
||||
if (!that.confirmBusiness.ad_code) {
|
||||
return uni.showToast({
|
||||
title: '请选择所在区',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
if (!that.confirmClassify.ad_code) {
|
||||
return uni.showToast({
|
||||
title: '请选择商家分类',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
if (!that.imgList6.length) {
|
||||
return uni.showToast({
|
||||
title: '请上传营业执照',
|
||||
@ -288,10 +323,11 @@ export default {
|
||||
bank_card: that.bank_card,
|
||||
store_name: that.store_name,
|
||||
address: that.address,
|
||||
ad_code:that.confirmBusiness.ad_code,
|
||||
ad_code: that.confirmBusiness.ad_code,
|
||||
facade_photo,
|
||||
interior_photo,
|
||||
license_photo,
|
||||
classify_code: that.confirmClassify.ad_code,
|
||||
}).then(res => {
|
||||
that.contact_name = ''
|
||||
that.contact_phone = ''
|
||||
@ -307,6 +343,7 @@ export default {
|
||||
that.imgList4 = []
|
||||
that.imgList5 = []
|
||||
that.imgList6 = []
|
||||
that.confirmClassify = ''
|
||||
NavgateTo("../sucess/index")
|
||||
})
|
||||
},
|
||||
@ -332,10 +369,27 @@ export default {
|
||||
this.buss = res.rows
|
||||
})
|
||||
},
|
||||
getClassify(e) {
|
||||
this.classify = [
|
||||
{
|
||||
ad_code: "1",
|
||||
short_name: "111"
|
||||
},
|
||||
{
|
||||
ad_code: "2",
|
||||
short_name: "222"
|
||||
},
|
||||
{
|
||||
ad_code: "3",
|
||||
short_name: "333"
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
this.getPro()
|
||||
this.getClassify()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -49,7 +49,7 @@ page {
|
||||
}
|
||||
|
||||
.hot-word-container {
|
||||
width: 60%;
|
||||
width: 90%;
|
||||
height: 50rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
@ -73,7 +73,7 @@ page {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.search_input{
|
||||
.search_input {
|
||||
width: 55%;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
@ -81,11 +81,6 @@ page {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.searchBox2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.white_container {
|
||||
background: #FFFFFF;
|
||||
padding: 0 20rpx;
|
||||
@ -170,6 +165,8 @@ page {
|
||||
}
|
||||
|
||||
.searchBox2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
background-color: #f6f7fb;
|
||||
@ -183,7 +180,7 @@ page {
|
||||
}
|
||||
|
||||
.searchBox2 image {
|
||||
width: 40rpx;
|
||||
width: 30rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<view class="search2" v-if="isShowSearch">
|
||||
<view class="searchBox2">
|
||||
<view class="searchBox2" @click="goSearchView">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
@ -33,9 +33,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="search_input" @click="goSearchView">
|
||||
请输入内容
|
||||
</view>
|
||||
<!-- <input class="search_input" placeholder='请输入内容' confirm-type='search' @input="searchInput"
|
||||
@confirm="searchInput" :value="selectKeyWord" @click="goSearchView"/> -->
|
||||
</view>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user