Commit e41fa984 by 肖康

整单提交

parent 25214db1
Showing with 7 additions and 12 deletions
...@@ -37,7 +37,7 @@ Page({ ...@@ -37,7 +37,7 @@ Page({
}, },
getSaoMaId(code) { getSaoMaId(code) {
axios({ axios({
url: "/photo_taking/scan_order_detail/" + this.data.inputValue + "/" + code url: "/photo_taking/scan_order_detail/" + this.data.inputValue + "/" + encodeURI(code)
}).then(res => { }).then(res => {
//请求得到的ID值 //请求得到的ID值
let detail_id = res.data.data; let detail_id = res.data.data;
...@@ -62,7 +62,7 @@ Page({ ...@@ -62,7 +62,7 @@ Page({
dd.scan({ dd.scan({
type: 'qr', type: 'qr',
success: (res) => { success: (res) => {
let code_=encodeURI(res.code) let code_=res.code
this.setData({ this.setData({
inputValue2: code_ inputValue2: code_
}); });
...@@ -100,17 +100,13 @@ Page({ ...@@ -100,17 +100,13 @@ Page({
image_src: (this.data.detailImages.join(",")) image_src: (this.data.detailImages.join(","))
} }
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.data.code == 0) {
console.log(res)
dd.showToast({
type: 'success',
content: '扫码明细提交成功',
duration: 3000
});
//提交成功 //提交成功
this.clear(); this.clear();
this.getDateList(); this.getDateList();
} }
}).catch(err=>{
console.log(err)
}) })
}, },
subMxActionShee() { subMxActionShee() {
...@@ -121,7 +117,6 @@ Page({ ...@@ -121,7 +117,6 @@ Page({
success: (res) => { success: (res) => {
if (res.index == 0) { if (res.index == 0) {
this.submitDetail() this.submitDetail()
} else if (res.index == 1) { } else if (res.index == 1) {
//拍照 //拍照
dd.chooseImage({ dd.chooseImage({
...@@ -157,7 +152,7 @@ Page({ ...@@ -157,7 +152,7 @@ Page({
axios({ axios({
url: "/photo_taking/submit_order/" + this.data.inputValue url: "/photo_taking/submit_order/" + this.data.inputValue
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.data.code == 0) {
dd.showToast({ dd.showToast({
type: 'success', type: 'success',
content: '整单提交成功', content: '整单提交成功',
...@@ -171,7 +166,7 @@ Page({ ...@@ -171,7 +166,7 @@ Page({
} else { } else {
dd.showToast({ dd.showToast({
type: 'fail', type: 'fail',
content: res.data, content: res.data.data,
duration: 3000 duration: 3000
}); });
} }
......
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 sign in to comment