lilei 8 months ago
parent
commit
957383b3b9

+ 1 - 1
App.vue

@@ -1,7 +1,7 @@
 <script>
 	export default {
 		globalData: {
-			baseUrl: 'http://192.168.2.103:9110/saas/clz/', // 本地
+			baseUrl: 'http://192.168.2.100:7002/saas/clz/', // 本地
 			// baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},

+ 49 - 0
pagesB/cart/index.vue

@@ -27,6 +27,7 @@
 					:list="item" 
 					@changeQty="changeQty" 
 					@check="chooseItem"
+					@editQty="editQty"
 					@remove="removeCart">
 					</productItem>
 					<!-- loading -->
@@ -77,6 +78,24 @@
 					<view :style="{height:safeAreaBottom+'px'}"></view>
 				</view>
 		</view>
+		<!-- 修改数量弹框 -->
+		<page-container
+		:show="showPopu" 
+		:round="true"
+		:z-index="100"
+		position="center" 
+		customStyle="right: 0; left: 0; top: 0; bottom: 0; margin: auto 10%;width: fit-content;height: fit-content;border-radius:15px;"
+		@afterleave="closePopu">
+			<view class="popu-content">
+				<view class="popu-close" @click="closePopu">
+					<uni-icons size="26" type="closeempty"></uni-icons>
+				</view>
+				<view class="popu-content-num flex align_center justify_between">
+					<text>数量</text>
+					<u-number-box v-model="qty" :input-width="100" :input-height="60" :min="1" :max="999"></u-number-box>
+				</view>
+			</view>
+		</page-container>
 	</view>
 </template>
 
@@ -106,6 +125,7 @@
 		data() {
 			return {
 				loading: false,
+				showPopu: false,
 				status: 'loading',
 				noDataText: '暂无产品',
 				empty: {
@@ -154,6 +174,14 @@
 				this.list = []
 				this.getRow()
 			},
+			// 关闭弹框
+			closePopu(){
+				this.showPopu = false
+			},
+			// 打开编辑数量弹框
+			editQty(item){
+				this.showPopu = true
+			},
 			// 查询列表
 			getRow (pageNo) {
 			  let _this = this
@@ -576,6 +604,27 @@
 	height: 100vh;
 	display: flex;
 	flex-direction: column;
+	.popu-content{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 10px 15px;
+		.popu-close{
+			padding: 10px;
+			position: absolute;
+			right: 0;
+			top: 0;
+		}
+		.popu-content-num{
+			font-size: 14px;
+			color: #999999;
+			padding: 10px 0;
+			> text{
+				margin-right: 10px;
+				font-size: 10px;
+			}
+		}
+	}
 	.cart-body{
 		position: relative;
 		flex-grow: 1;

+ 7 - 2
pagesB/cart/productitem.vue

@@ -41,8 +41,9 @@
 								<view v-if="item.status==1&&item.dealerScopeFlag==1" :style="{opacity:!item.edit?1:0,width:!item.edit?'auto':0}">
 									<view class="flex align_center qty-box">
 										<view class="qty-btn" @click="changeQty(item.qty-1,item,1)" :class="(item.qty <= 1)?'qty-disabled':''">-</view>
-										<view class="qty-num" :style="{width:Number(item.qty).toString().length*8+10+'px'}">
-											<input type="number" @input="inputQty(item)" @blur="changeQty(item.qty,item,0)" v-model="item.qty"/>
+										<view class="qty-num" @click="editQty(item)" :style="{width:Number(item.qty).toString().length*8+10+'px'}">
+											<!-- <input type="number" @input="inputQty(item)" @blur="changeQty(item.qty,item,0)" v-model="item.qty"/> -->
+											{{item.qty}}
 										</view>
 										<view class="qty-btn" @click="changeQty(item.qty+1,item,1)" :class="(item.qty >= 999)?'qty-disabled':''">+</view>
 									</view>
@@ -137,6 +138,9 @@
 				if(item.edit || (item.status==1&&item.dealerScopeFlag==1)){
 					this.$emit('check',item.cartSn)
 				}
+			},
+			editQty(item){
+				this.$emit('editQty',item)
 			}
 		}
 	}
@@ -164,6 +168,7 @@
 			height: 22px;
 			line-height: 22px;
 			padding:0 3px;
+			text-align: center;
 			input{
 				width: 100%;
 				height: 100%;

+ 1 - 1
pagesB/promoProduct.vue

@@ -131,7 +131,7 @@
 				getShopProductList({
 					pageNo: this.pageNo,
 					pageSize: this.pageSize,
-					queryWord: this.queryWord,
+					productCode: this.queryWord,
 					promoSn: this.promoSn,
 					dealerSn: dealerSn
 				}).then(res => {

BIN
static/nav_icon1.jpg


BIN
static/nav_icon2.jpg


BIN
static/nav_icon3.jpg


BIN
static/nav_icon4.jpg