Jelajahi Sumber

保存增加确认按钮

shish 2 tahun lalu
induk
melakukan
5780bb5ada
1 mengubah file dengan 12 tambahan dan 10 penghapusan
  1. 12 10
      ghsApp/src/pagesOrder/arrival.vue

+ 12 - 10
ghsApp/src/pagesOrder/arrival.vue

@@ -102,7 +102,7 @@
 		<view class="app-footer">
 			<button class="admin-button-com big default" @click="goBack()" style="margin-left:10upx;">取消</button>
 			<button class="admin-button-com big default" @click="savePrice()" style="margin:0 10upx 0 10upx;">保存</button>
-			<button class="admin-button-com big blue" @click="commitItem()" style="margin-right:10upx;">确认</button>
+			<button class="admin-button-com big blue" @click="commitItem()" style="margin-right:10upx;">确认提交</button>
 		</view>
 	</view>
 </template>
@@ -222,14 +222,16 @@ export default {
 			if(this.$util.isEmpty(this.detailInfo.product)){
 				this.$msg('没有花材信息')
 				return false
-			}			
-			const data = this.detailInfo.product.map(ele => { 
-				return { orderSn: ele.orderSn, xhNum:ele.xhNum,xhUnitPrice:ele.currentHdPrice,id:ele.id}
-			})
-			modifyBookItem({data:data,id:this.detailInfo.id,packCost:this.packCost,sendCost:this.sendCost}).then(res=>{
-				if(res.code == 1){
-					this.$msg(res.msg)
-				}
+			}
+			this.$util.confirmModal({content:'确认保存?'},() => {
+				const data = this.detailInfo.product.map(ele => { 
+					return { orderSn: ele.orderSn, xhNum:ele.xhNum,xhUnitPrice:ele.currentHdPrice,id:ele.id}
+				})
+				modifyBookItem({data:data,id:this.detailInfo.id,packCost:this.packCost,sendCost:this.sendCost}).then(res=>{
+					if(res.code == 1){
+						this.$msg(res.msg)
+					}
+				})
 			})
 		},
 		commitItem(){
@@ -266,7 +268,7 @@ export default {
 			if(hasError == true){
 				return false
 			}
-			that.$util.confirmModal({content:'确认提交'},() => {
+			that.$util.confirmModal({content:'确认提交'},() => {
 				arrival({id:that.option.id,product:JSON.stringify(product),packCost:that.packCost,sendCost:that.sendCost}).then(res=>{
 					if(res.code == 1){
 						let id = res.data.id ? res.data.id : 0