Compare commits

..

No commits in common. "414ea794631ece4ba412dcaa637a62c3f1d2c408" and "1f7eebd66af9005d95088c6e4c0649236c4bf71a" have entirely different histories.

8 changed files with 64 additions and 119 deletions

View File

@ -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.is_one_one === 1 ? 2 : 1;
item.count--
}
} else {
item.count -= item.is_one_one === 1 ? 2 : 1;
item.count--
}
// 0carList
@ -496,11 +496,11 @@ export default {
if (currentTime >= startTime && currentTime <= endTime) {
if (item.count == 0) {
item.count += item.is_one_one === 1 ? 2 : 1;
item.count += item.commodity_goods_info.min_order_quantity
} else {
if (item.count >= item.purchase_limit) {
if (item.count >= item.commodity_goods_info.stock_quantity) {
uni.showToast({
title: '您选择的数量已达到最大限购量',
title: '库存不足',
icon: 'none'
});
return
@ -514,7 +514,7 @@ export default {
}
}
}
item.count += item.is_one_one === 1 ? 2 : 1;
item.count++;
this.changeCart(item);
},
//
@ -543,7 +543,7 @@ export default {
let total = 0;
this.orderList1.forEach(goods => {
// 使item.price
total += goods.price * (goods.is_one_one === 1 ? goods.count / 2 : goods.count);
total += goods.price * 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.is_one_one === 1 ? goods.count / 2 : goods.count);
total += goods.price * 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.is_one_one === 1 ? item.count / 2 : item.count,
count: item.count,
price: item.price,
freight: item.commodity_goods_info.freight,
}

View File

@ -147,23 +147,25 @@ export default {
increaseQuantity(index) {
const item = this.goodsList[index]
if (item.quantity == 0) {
if (item.one_one === 1) {
item.quantity += 2
this.carNum += 2
} else {
item.quantity += 1
this.carNum += 1
}
item.quantity += item.min_order_quantity || 1
this.carNum += item.min_order_quantity || 1
} else {
if (item.quantity == (item.one_one === 1 ? item.purchase_limit * 2 : item.purchase_limit)) {
if (item.quantity == item.total_stock) {
uni.showToast({
title: '您选择的数量已达到最大限购量',
title: '库存不足',
icon: 'none'
});
return
}
item.quantity = item.one_one === 1 ? item.quantity + 2 : item.quantity + 1;
this.carNum = item.one_one === 1 ? this.carNum + 2 : this.carNum + 1;
if (item.quantity == item.max_limit_quantity) {
uni.showToast({
title: '一次最多购买' + item.max_limit_quantity + '件',
icon: 'none'
});
return
}
item.quantity++;
this.carNum++;
}
const params = {
goods_id_and_count: [
@ -171,8 +173,6 @@ 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.one_one === 1) {
item.quantity = item.quantity - 2
this.carNum = this.carNum - 2
if (item.quantity == (item.min_order_quantity || 1)) {
item.quantity = 0
this.carNum = 0
} else {
item.quantity--;
this.carNum--;
@ -197,8 +197,6 @@ 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

View File

@ -516,12 +516,7 @@ export default {
// } else {
// total += goods.commodity_goods_info.sales_price * goods.count;
// }
if(goods.is_one_one === 1) {
total += goods.price * (goods.count / 2)
} else {
total += goods.price * goods.count
}
total += goods.price * goods.count
}
});
});
@ -598,8 +593,8 @@ export default {
that.deleteCarItem(carItem, goodsIndex, item);
} else {
//
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.shopCarTotal = Math.max(0, this.shopCarTotal - 1);
carItem.count = carItem.count - 1;
this.handleQuantityChange(carItem.count, carItem);
// 0
@ -622,12 +617,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.is_one_one === 1 ? 2 : 1
this.shopCarTotal += carItem.is_one_one === 1 ? 2 : 1;
carItem.count = carItem.commodity_goods_info.min_order_quantity
this.shopCarTotal += carItem.commodity_goods_info.min_order_quantity;
} else {
if (carItem.count == carItem.purchase_limit) {
if (carItem.count == carItem.commodity_goods_info.total_stock) {
uni.showToast({
title: '您选择的数量已达到最大限购量',
title: '库存不足',
icon: 'none'
});
return
@ -639,19 +634,19 @@ export default {
});
return
}
carItem.count += carItem.is_one_one === 1 ? 2 : 1;
this.shopCarTotal += carItem.is_one_one === 1 ? 2 : 1;
carItem.count++;
this.shopCarTotal++;
}
} else {
if (carItem.count >= carItem.purchase_limit) {
if (carItem.count >= carItem.commodity_goods_info.stock_quantity) {
uni.showToast({
title: '您选择的数量已达到最大限购量',
title: '库存不足',
icon: 'none'
});
return
}
carItem.count += carItem.is_one_one === 1 ? 2 : 1;
this.shopCarTotal += carItem.is_one_one === 1 ? 2 : 1;
carItem.count++;
this.shopCarTotal++;
}
const item = carItem.commodity_cart_and_goods_model;

View File

@ -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',

View File

@ -130,7 +130,7 @@ export default {
localHeight: "",
roomList: [],
columns: [],
category: {}, //
category: {}, //
repairInfo: '', //
contactName: '', //
contactPhone: '', //

View File

@ -46,13 +46,6 @@
<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">
@ -68,9 +61,7 @@
<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>
@ -83,9 +74,7 @@
<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>
@ -98,9 +87,7 @@
<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>
@ -115,8 +102,6 @@
@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>
@ -155,18 +140,15 @@ export default {
store_name: "",
address: "",
confirmProv: "",
confirmCity: "",
confirmBusiness: "",
confirmClassify: "",
confirmProv:"",
confirmCity:"",
confirmBusiness:"",
pro: [],
show: false,
city: [],
show2: false,
buss: [],
show3: false,
classify: [],
show4: false,
}
},
methods: {
@ -199,14 +181,6 @@ 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;
},
@ -216,9 +190,6 @@ export default {
chooseCity3() {
this.show3 = true;
},
chooseClassify() {
this.show4 = true;
},
afterReadImg(e) {
e.file.forEach(item => {
upload(item.url, res => {
@ -283,30 +254,24 @@ 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: '请上传营业执照',
@ -323,11 +288,10 @@ 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 = ''
@ -343,7 +307,6 @@ export default {
that.imgList4 = []
that.imgList5 = []
that.imgList6 = []
that.confirmClassify = ''
NavgateTo("../sucess/index")
})
},
@ -369,27 +332,10 @@ 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>

View File

@ -49,7 +49,7 @@ page {
}
.hot-word-container {
width: 90%;
width: 60%;
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,6 +81,11 @@ page {
color: #666;
}
.searchBox2 {
display: flex;
align-items: center;
}
.white_container {
background: #FFFFFF;
padding: 0 20rpx;
@ -165,8 +170,6 @@ page {
}
.searchBox2 {
display: flex;
align-items: center;
width: 100%;
height: 60rpx;
background-color: #f6f7fb;
@ -180,7 +183,7 @@ page {
}
.searchBox2 image {
width: 30rpx;
width: 40rpx;
height: 28rpx;
margin-right: 16rpx;
}

View File

@ -21,7 +21,7 @@
<!-- 搜索框 -->
<view class="search2" v-if="isShowSearch">
<view class="searchBox2" @click="goSearchView">
<view class="searchBox2">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
mode="aspectFill"></image>
@ -33,6 +33,9 @@
</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>