Commit 18f2ad79 authored by xiaoyan's avatar xiaoyan

feature: 入仓取消空白关闭&弹窗点取消二次确认

parent 517e74c8
......@@ -146,7 +146,7 @@
<button style="color: #007aff" @tap="next">{{$t('下一步')}}</button>
</view>
<view class="add-popup">
<uni-popup ref="popup" background-color="#fff" @maskClick="maskClick">
<uni-popup ref="popup" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{title}}</view>
<view class="add-form">
......@@ -293,7 +293,7 @@
<!-- 添加新商品-->
<view class="add-popup">
<uni-popup ref="product" background-color="#fff" @maskClick="maskClickAddProduct">
<uni-popup ref="product" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{$t('添加新商品')}}</view>
......@@ -908,25 +908,45 @@ export default {
})
},
maskClick() {
this.$refs.popup.close()
this.addForm = {
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.$refs.popup.close()
_this.addForm = {
unit: '1',
orderWarehouseInItemDoList: [{cartonsNum:undefined}],
pictureUrls: [],
usageIds: [],
}
}
}
});
},
addProduct() {
this.$refs.product.open('center')
},
maskClickAddProduct() {
this.$refs.product.close()
this.productForm = {
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.$refs.product.close()
_this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
});
},
saveProductForm() {
if(!this.productForm.typeId){
......
......@@ -145,7 +145,7 @@
<button style="color: #007aff" @tap="next">{{$t('下一步')}}</button>
</view>
<view class="add-popup">
<uni-popup ref="popup" background-color="#fff" @maskClick="maskClick">
<uni-popup ref="popup" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{title}}</view>
<view class="add-form">
......@@ -292,7 +292,7 @@
<!-- 添加新商品-->
<view class="add-popup">
<uni-popup ref="product" background-color="#fff" @maskClick="maskClickAddProduct">
<uni-popup ref="product" background-color="#fff" :maskClick="false">
<view class="popup-content">
<view class="popup-title">{{$t('添加新商品')}}</view>
......@@ -906,25 +906,44 @@ export default {
})
},
maskClick() {
this.$refs.popup.close()
this.addForm = {
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
_this.$refs.popup.close()
_this.addForm = {
unit: '1',
orderWarehouseInItemDoList: [{cartonsNum:undefined}],
pictureUrls: [],
usageIds: [],
}
}
}
});
},
addProduct() {
this.$refs.product.open('center')
},
maskClickAddProduct() {
this.$refs.product.close()
this.productForm = {
const _this = this
uni.showModal({
title: '提示',
content: '确认取消吗?',
success: function (res) {
if (res.confirm) {
_this.$refs.product.close()
_this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
});
},
saveProductForm() {
if(!this.productForm.typeId){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment