|
|
@@ -204,19 +204,23 @@ Component({
|
|
|
icon: "none"
|
|
|
});
|
|
|
|
|
|
- if (!res.data.isrepeat) return handle()
|
|
|
if (res.data.items.length) {
|
|
|
- wx.showModal({
|
|
|
- title: '提示',
|
|
|
- content: `本单已存在【${res.data.items[0].itemname}】商品,确认继续添加吗?`,
|
|
|
- complete: (res) => {
|
|
|
- if (res.cancel) {
|
|
|
-
|
|
|
+ if (res.data.isrepeat) {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `本单已存在【${res.data.items[0].itemname}】商品,确认继续添加吗?`,
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) handle()
|
|
|
}
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `本单已存在【${res.data.items[0].itemname}】商品,禁止重复添加!`,
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
- if (res.confirm) handle()
|
|
|
- }
|
|
|
- })
|
|
|
} else {
|
|
|
handle()
|
|
|
}
|