diff --git a/pages/quote/index.vue b/pages/quote/index.vue index ccc724a..270abc5 100644 --- a/pages/quote/index.vue +++ b/pages/quote/index.vue @@ -36,12 +36,11 @@ + style="background-color:#F6F6F6;border: none;" type="number" @blur="blur1(item)"> - - + @@ -69,10 +68,10 @@ - + - + @@ -81,7 +80,7 @@ - + @@ -140,6 +139,7 @@ ybj: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/274ad202405111523222891.png', model_type: 2, deliveryNameShow: false, + deliveryBtnShow: false, model1: { delivery_name: "", delivery_id: "", @@ -167,6 +167,14 @@ url }) }, + blur1(item){ + if(item.nums<0) item.nums=0; + if(item.nums>item.need_num) item.nums=item.need_num; + }, + blur2(item){ + if(item.price<0) item.price=0; + item.price = (+item.price).toFixed(2) + }, getTabsPosi() { const { windowWidth @@ -180,7 +188,8 @@ type: type || this.tabIndex, date: this.date }).then(res => { - this.lists = res.data.lists + this.lists = res.data.lists; + this.deliveryBtnShow = res.data.extend.delivery ? true : false; this.lists.forEach(item => { if (!(+item.nums)) { item.nums = '' @@ -208,6 +217,7 @@ this.lists.filter(item => { return (+item.price && +item.nums) }).map(item => { + if(item.nums > item.need_num) item.nums = item.need_num; return { id: item.id, nums: item.nums, @@ -229,7 +239,7 @@ this.$refs.uForm.validate().then(res=>{ OpurchaseclassExpressApi({ ...this.model1, - date: this.date + // date: this.date }).then(res => { this.getLists(2); this.$refs.deliver.close(); @@ -372,7 +382,6 @@ .deliver { width: 600rpx; - height: 500rpx; background-color: #fff; border-radius: 14rpx; padding: 20rpx;