Browse Source

改花材

jf 5 years ago
parent
commit
94997e647d

+ 1 - 0
ghsApp/src/admin/home/order.vue

@@ -280,6 +280,7 @@ export default {
 			console.log(123)
 			// 花材
 			if (s.type === "item") {
+				uni.navigateTo({url: `/pagesOrder/select?id=${item.id}`});
 				// 自取
 			} else if (s.type === "selfGet") {
 				this.freeShipModal = true;

+ 2 - 2
ghsApp/src/api/order/index.js

@@ -90,10 +90,10 @@ export const sendReach = data => {
 };
 
 /** *
- * 未支付订单重选花材
+ * 未支付订单重选花材  姜枫 2021.03.21 原请求地址:order/choose-product
  */
 export const chooseOrderProductApi = async data => {
-	return https.post("/order/choose-product", data);
+	return https.post("/order-item/reset", data);
 };
 
 /** *

+ 3 - 13
ghsApp/src/pagesOrder/detail.vue

@@ -101,11 +101,7 @@
 						</view>
 					</view>
 					<view class="summary-bar">
-<!--						<view v-if="detailInfo.status == ORDER_STATUS.NOPAY || detailInfo.status == ORDER_STATUS.UNDIS" class="operate-view" @click="gotoSelect">-->
-						<view v-if="detailInfo.showResetItem == 1" class="operate-view" @click="gotoSelect">
-							<text class="iconfont icongouwuche"></text>
-							改花材
-						</view>
+						<view class="operate-view" ></view>
 						<view class="describe-view">
 							共{{ detailInfo.productStat.kind || 0 }}种, 共{{ detailInfo.productStat.bigNum }}扎{{
 								detailInfo.productStat.smallNun}}支,合计 ¥<text class="price">{{ detailInfo.productStat.totalPrice }}</text>
@@ -221,10 +217,9 @@ export default {
 			this.freeShipModal = false;
 		},
 		openBt(s, item) {
-			console.log(s)
-			console.log(s.item === "send")
 			// 花材
 			if (s.type === "item") {
+				this.gotoSelect();
 				// 自取
 			} else if (s.type === "selfGet") {
 				this.freeShipModal = true;
@@ -314,12 +309,7 @@ export default {
 			}
 		},
 		gotoSelect() {
-			uni.navigateTo({
-				url: `/pagesOrder/select?id=${this.detailInfo.id}`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+			uni.navigateTo({url: `/pagesOrder/select?id=${this.detailInfo.id}`});
 		}
 	}
 };

+ 15 - 58
ghsApp/src/pagesOrder/select.vue

@@ -29,37 +29,17 @@
 					@tap.stop="swichClass"
 				>
 					<text>{{ item.className || "" }}</text>
-					<text
-						class="tag"
-						v-if="
-							getSelectClassById(item.classId).bigCount > 0 ||
-								getSelectClassById(item.classId).smallCount > 0
-						"
-					>
-						<text
-							v-if="
-								getSelectClassById(item.classId).bigCount > 0 ||
-									getSelectClassById(item.classId).smallCount > 0
-							"
-						>
+					<text class="tag" v-if=" getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
+						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
 							{{ `${getSelectClassById(item.classId).bigCount}` }}
 						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">
-							/
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{
-							getSelectClassById(item.classId).smallCount
-						}}</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
+						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
 					</text>
 				</div>
 			</scroll-view>
 
-			<scroll-view
-				scroll-y
-				class="right-box"
-				v-if="tabIndex == 0"
-				:scroll-into-view="scrollClassId"
-			>
+			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="scrollClassId">
 				<!--内容部分 start -->
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 					<view
@@ -97,10 +77,7 @@
 					</view>
 				</block>
 				<block v-else>
-					<app-wrapper-empty
-						title="暂无数据"
-						:is-empty="$util.isEmpty(filterProductInfo)"
-					/>
+					<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(filterProductInfo)" />
 				</block>
 				<!--内容部分 end -->
 			</scroll-view>
@@ -111,44 +88,23 @@
 			</block>
 		</view>
 		<!-- :maskClosable="false" -->
-		<modal-module
-			:show="isModel"
-			@cancel="modalCancel"
-			@click="affirm"
-			:title="customData.itemName"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
+		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx">
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"> 库存{{ customData.stock }} </view>
 					<view class="num_bx">
-						<input v-model="customData.bigCount" type="number" focus />扎
-						<input
-							v-model="customData.smallCount"
-							type="number"
-							style="margin-left:24upx"
-						/>支
+						<input v-model="customData.bigCount" focus type="number" >扎
+<!--						<input v-model="customData.bigCount" :focus="isModel" @focus="allSelect" :selection-start="startIndex" :selection-end="endIndex" type="number" >扎-->
+						<input v-model="customData.smallCount" type="number" style="margin-left:24upx" />支
 					</view>
 				</view>
 			</template>
 		</modal-module>
-		<modal-module
-			:show="showSubmitModel"
-			@cancel="cancelEvent"
-			@click="submitEvent"
-			:title="confirmContent"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
+
+		<modal-module :show="showSubmitModel" @cancel="cancelEvent" @click="submitEvent" :title="confirmContent" color="#333" :size="32" padding="30rpx 30rpx" >
 		</modal-module>
-		<FooterCart
-			:price="allPrice"
-			:count="allCount"
-			@confirm="confirmSelectEvent"
-		></FooterCart>
+
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" ></FooterCart>
 	</view>
 </template>
 
@@ -273,6 +229,7 @@ export default {
 				if (this.selectList.length > 0) {
 					const product = this.selectList.map(ele => {
 						return {
+							classId:ele.classId,
 							productId: ele.id,
 							bigNum: ele.bigCount,
 							smallNum: ele.smallCount