diff --git a/common/basic.js b/common/basic.js
index 45b24ed5..ba15c4d1 100644
--- a/common/basic.js
+++ b/common/basic.js
@@ -877,5 +877,17 @@ export function updateTitle(title) {
}
export function clearTirmAndWrap(content) {
- return content.replace(/<\/?.+?\/?>|\r|\n|\s*/g,'')
+ return content.replace(/<\/?.+?\/?>|\r|\n|\s*/g, '')
+}
+
+export function navigateBack(backIndex) {
+ let canNavBack = getCurrentPages()
+ console.log("返回",canNavBack.length )
+ if (canNavBack && canNavBack.length - 1 > backIndex) {
+ uni.navigateBack({
+ delta: backIndex
+ })
+ } else {
+ history.back();
+ }
}
diff --git a/pages/customerReturn/job/returnDetail.vue b/pages/customerReturn/job/returnDetail.vue
index ae34419d..8affa224 100644
--- a/pages/customerReturn/job/returnDetail.vue
+++ b/pages/customerReturn/job/returnDetail.vue
@@ -359,11 +359,10 @@
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
- customerReturnJobSubmit(this.id, params).then(res => {
+ customerReturnJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功
生成客户退货记录:" + res.data)
-
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
diff --git a/pages/inspect/job/inspectDetail.vue b/pages/inspect/job/inspectDetail.vue
index e32a286a..99904637 100644
--- a/pages/inspect/job/inspectDetail.vue
+++ b/pages/inspect/job/inspectDetail.vue
@@ -42,6 +42,7 @@
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
+ navigateBack
} from '@/common/basic.js';
import {
getInventoryStatusName,
@@ -312,8 +313,12 @@
this.showErrorMessage(e.message);
}
},
+ commit(){
+ this.showCommitSuccessMessage("提交成功")
+ },
- commit() {
+ commits() {
+
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
@@ -476,9 +481,15 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
- uni.navigateTo({
- url: './inspectJob'
- })
+ // let canNavBack = getCurrentPages()
+ // if( canNavBack && canNavBack.length>1) {
+ // uni.navigateBack({
+ // delta:2
+ // })
+ // } else {
+ // history.back();
+ // }
+ navigateBack(2);
})
},
diff --git a/pages/inspect/job/inspectResult.vue b/pages/inspect/job/inspectResult.vue
index e24ad139..840141b8 100644
--- a/pages/inspect/job/inspectResult.vue
+++ b/pages/inspect/job/inspectResult.vue
@@ -157,7 +157,8 @@
} from '@/common/directory.js';
import {
- goHome
+ goHome,
+ navigateBack
} from '@/common/basic.js';
export default {
@@ -382,7 +383,7 @@
} else {
//报废数大于0,进入详情
//进入下一页面
- uni.navigateTo({
+ uni.redirectTo({
url: './inspectDetail?id=' + this.id +
'&status=' + this.status +
'&failedQty=' + this.jobContent.failedQty +
@@ -419,7 +420,7 @@
//部分合格
} else if (this.nextAction == "PARTIAL_OK") {
//进入下一页面
- uni.navigateTo({
+ uni.redirectTo({
url: './inspectDetail?id=' + this.id +
'&status=' + this.status +
'&failedQty=' + this.jobContent.failedQty +
@@ -475,9 +476,7 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
- uni.navigateTo({
- url: './inspectJob'
- })
+ navigateBack(1)
})
},
showErrorMessage(message) {
diff --git a/pages/inspect/request/inspectRequestDetail.vue b/pages/inspect/request/inspectRequestDetail.vue
index 26e6c558..78d19a77 100644
--- a/pages/inspect/request/inspectRequestDetail.vue
+++ b/pages/inspect/request/inspectRequestDetail.vue
@@ -5,10 +5,10 @@
- 单据号 : {{jobContent.number}}
+ 单据号 : {{requestContent.number}}
- 供应商代码 : {{jobContent.supplierCode}}
+ 供应商代码 : {{requestContent.supplierCode}}
@@ -93,7 +93,7 @@
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
- that.jobContent = res.data;
+ that.requestContent = res.data;
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
// that.subList = res.data[0];
diff --git a/static/config.json b/static/config.json
index 471c6bba..4f688e61 100644
--- a/static/config.json
+++ b/static/config.json
@@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
- "value": "http://192.168.0.178:12080/admin-api",
+ "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",