shish 7 месяцев назад
Родитель
Сommit
2eebcb7569
1 измененных файлов с 42 добавлено и 5 удалено
  1. 42 5
      ghsApp/src/pagesPurchase/info.vue

+ 42 - 5
ghsApp/src/pagesPurchase/info.vue

@@ -88,10 +88,10 @@
 				<block v-if="!$util.isEmpty(getLoginInfo.admin) && getLoginInfo.admin.currentGhsShopId > 0">
 					<text @click="goRefund(detailInfo)" v-if="detailInfo.status == 4" 
 					style="float:right;font-weight:normal;color:#3385FF;margin-right:30upx;">申请售后</text>
-					<text @click="printAllLabel(detailInfo,1)" style="float:right;font-weight:normal;color:#3385FF;margin-right:30upx;">
+					<text @click="printAllLabelConfirm(detailInfo,1)" style="float:right;font-weight:normal;color:#3385FF;margin-right:30upx;">
 					打全部价码
 					</text>
-					<text @click="printAllLabel(detailInfo,0)" style="float:right;font-weight:normal;color:#3385FF;margin-right:30upx;">
+					<text @click="printAllLabelConfirm(detailInfo,0)" style="float:right;font-weight:normal;color:#3385FF;margin-right:30upx;">
 					打全部标签
 					</text>
 				</block>
@@ -298,7 +298,23 @@
 	</template>
 	</modal-module>
 
-		<mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
+	<modal-module :show="printAllLabelShow" @click="printAllLabelConfirmFn" :maskClosable="true" title="提示" padding="30rpx 30rpx" >
+		<template v-slot:content>
+			<div class="app-modal-input-wrap">
+				<div class="inp-list-line" style="justify-content: center;margin-top: 30upx;">
+				<text style="text-align:center;color:black;font-size:38upx;">确认打全部{{printAllLabelType==0?'标签':'价码'}}?</text>
+			</div>
+			<div class="inp-list-line" v-if="printAllLabelType==0">
+				<div class="line-input" style="justify-content: center;margin-top: 30upx;">
+					<button class="admin-button-com big" :class="printAllPriceOption === 0 ? 'blue' : 'default'" @click="printAllPriceOption = 0" style="margin-right:40upx;">没价格</button>
+					<button class="admin-button-com big" :class="printAllPriceOption === 1 ? 'blue' : 'default'" @click="printAllPriceOption = 1">有价格</button>
+				</div>
+			</div>
+			</div>
+		</template>
+	</modal-module>
+
+	<mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
 
 	</view>
 </template>
@@ -349,7 +365,10 @@ export default {
 			title:'',
 			imageUrl:'',
       		currentEnv:'production',
-			priceOption:0
+			priceOption:0,
+			printAllLabelShow:false,
+			printAllLabelType:0,
+			printAllPriceOption:0
 		};
 	},
 	onPullDownRefresh() {
@@ -559,13 +578,31 @@ export default {
 		printAllLabel(item,type){
 			let that = this
 			that.$util.confirmModal({content:'确认打印'},() => {
-				printAll({orderSn:item.orderSn,type:type}).then(res=>{
+				printAll({orderSn:item.orderSn,type:type,priceOption:that.printAllPriceOption}).then(res=>{
 					if(res.code == 1){
 						that.$msg(res.msg)
 					}
 				})          
 			})
 		},
+		printAllLabelConfirm(item,type){
+			this.printAllLabelShow = true
+			this.printAllLabelType = type
+			this.printAllPriceOption = 0
+		},
+		printAllLabelConfirmFn(val){
+			let that = this
+			if (val.index == 0) {
+				that.printAllLabelShow = false
+				return
+			}
+			printAll({orderSn:that.detailInfo.orderSn,type:that.printAllLabelType,priceOption:that.printAllPriceOption}).then(res=>{
+				if(res.code == 1){
+					that.$msg(res.msg)
+					that.printAllLabelShow = false
+				}
+			})
+		},
 		goToClear (item) {
 			this.pageTo({
 				url: '/pagesGys/details?id='+item.ghsId