|
|
@@ -111,9 +111,9 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- sa_quotedpriceid = 0
|
|
|
- quotedpricenotes = []
|
|
|
- address = ""
|
|
|
+ sa_quotedpriceid = 0;
|
|
|
+ quotedpricenotes = [];
|
|
|
+ address = "";
|
|
|
if (options.data) {
|
|
|
let data = JSON.parse(options.data);
|
|
|
let form = this.data.form;
|
|
|
@@ -318,9 +318,6 @@ Page({
|
|
|
} else {
|
|
|
if (res.data.length) data.attinfos = res.data;
|
|
|
this.changeItem(data)
|
|
|
- setTimeout(() => {
|
|
|
- wx.navigateBack()
|
|
|
- }, 500)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -400,24 +397,34 @@ Page({
|
|
|
getApp().globalData.Language.showToast(s.code == '1' ? "创建成功" : s.msg)
|
|
|
try {
|
|
|
let attachmentids = this.selectComponent("#Yl_files").getFiles().attachmentids;
|
|
|
- if (attachmentids.length) return this.handleFileLink(attachmentids, 'sa_quotedprice', res.data.sa_quotedpriceid, res.data);
|
|
|
+ if (attachmentids.length) {
|
|
|
+ this.handleFileLink(attachmentids, 'sa_quotedprice', res.data.sa_quotedpriceid, res.data)
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.changeItem(res.data)
|
|
|
+ }, 500)
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
-
|
|
|
+ setTimeout(() => {
|
|
|
+ this.changeItem(res.data)
|
|
|
+ }, 500)
|
|
|
}
|
|
|
- setTimeout(() => {
|
|
|
- this.changeItem(res.data)
|
|
|
- }, 500)
|
|
|
})
|
|
|
} else {
|
|
|
try {
|
|
|
let attachmentids = this.selectComponent("#Yl_files").getFiles().attachmentids;
|
|
|
- if (attachmentids.length) return this.handleFileLink(attachmentids, 'sa_quotedprice', res.data.sa_quotedpriceid, res.data);
|
|
|
+ if (attachmentids.length) {
|
|
|
+ this.handleFileLink(attachmentids, 'sa_quotedprice', res.data.sa_quotedpriceid, res.data)
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.changeItem(res.data)
|
|
|
+ }, 500)
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
-
|
|
|
+ setTimeout(() => {
|
|
|
+ this.changeItem(res.data)
|
|
|
+ }, 500)
|
|
|
}
|
|
|
- setTimeout(() => {
|
|
|
- this.changeItem(res.data)
|
|
|
- }, 500)
|
|
|
}
|
|
|
})
|
|
|
},
|