Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_online_20240829
lijuncheng 6 months ago
parent
commit
75c5eb1746
  1. 12
      src/api/httpRequest3.js
  2. 39
      src/pages/index/index.vue
  3. 16
      src/pages/productPutaway/record/productPutawayRecord.vue
  4. 29
      src/pages/productReceipt/job/productReceiptJob.vue
  5. 4
      src/pages/productReceipt/job/scrapReceiptJob.vue
  6. 4
      src/pages/productReceipt/job/semiProductReceiptJob.vue

12
src/api/httpRequest3.js

@ -1,5 +1,8 @@
import storage from '../common/utils/storage' import storage from '../common/utils/storage'
import {
removeToken
} from '@/common/utils/auth'
function service(options = {}) { function service(options = {}) {
var token = storage.getStorage(storage.constant.token) var token = storage.getStorage(storage.constant.token)
@ -20,7 +23,7 @@ function service(options = {}) {
"dataType":"json", "dataType":"json",
"tenant-id":tenantId "tenant-id":tenantId
}; };
options.timeout = 10000 options.timeout = 300000
options.url = requestUrl+options.url options.url = requestUrl+options.url
@ -31,6 +34,13 @@ function service(options = {}) {
if(res.data.code==0){ if(res.data.code==0){
resolve(res.data); resolve(res.data);
}else { }else {
if(res.data.code==401){
uni.clearStorageSync()
removeToken();
uni.reLaunch({
url: '/pages/login/index'
})
}
reject("系统异常:"+res.data.msg) reject("系统异常:"+res.data.msg)
console.log("系统异常",res.data.msg) console.log("系统异常",res.data.msg)
} }

39
src/pages/index/index.vue

@ -156,24 +156,27 @@
}, },
onShow() { onShow() {
if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) { if (uni.getStorageSync("hasLogin") == null || uni.getStorageSync("hasLogin") == false) {
uni.showModal({ // uni.showModal({
title: '未登录', // title: '',
content: '您未登录 , 需要登录后才能继续', // // content: ' , ', //
showCancel: !this.forcedLogin, // showCancel: !this.forcedLogin,
success: (res) => { // success: (res) => {
if (res.confirm) { // if (res.confirm) {
//使reLanch // //使reLanch
if (this.forcedLogin) { // if (this.forcedLogin) {
uni.reLaunch({ // uni.reLaunch({
url: '../login/index' // url: '../login/index'
}) // })
} else { // } else {
uni.navigateTo({ // uni.navigateTo({
url: '../login/index' // url: '../login/index'
}) // })
} // }
} // }
} // }
// })
uni.reLaunch({
url: '../login/index'
}) })
} else { } else {
this.timerRefresh(); this.timerRefresh();

16
src/pages/productPutaway/record/productPutawayRecord.vue

@ -73,6 +73,9 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import {
updateTitle
} from '@/common/basic.js';
export default { export default {
@ -100,10 +103,18 @@
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
managementList: [] managementList: [],
type:''
}; };
}, },
onLoad(option) { onLoad(option) {
this.type = option.type
if(this.type=='predict'){
updateTitle('制品上架记录')
}else if(this.type=='assemble'){
updateTitle('装配上架记录')
}
var typeCode = "ProductPutaway" var typeCode = "ProductPutaway"
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
@ -336,6 +347,9 @@
}) })
}) })
this.dataContent.subList = subList; this.dataContent.subList = subList;
if(this.type){
this.dataContent.type = this.type;
}
this.dataContent.creator = creator; this.dataContent.creator = creator;
return this.dataContent; return this.dataContent;
}, },

29
src/pages/productReceipt/job/productReceiptJob.vue

@ -72,7 +72,7 @@
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
totalCount: 0, totalCount: 0,
loadingType: "nomore", loadingType: "noMore",
checkedToday: false, checkedToday: false,
checkedWaitTask: false, checkedWaitTask: false,
todayTime: "", todayTime: "",
@ -94,13 +94,7 @@
this.getList('refresh'); this.getList('refresh');
}, },
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh'); this.getList('refresh');
@ -127,6 +121,14 @@
}, },
methods: { methods: {
onReachBottom() {
console.log('onReachBottom',this.loadingType)
//
if (this.loadingType == 'loading' || this.loadingType == 'noMore') {
return;
}
this.getList("more");
},
refresh() { refresh() {
this.getList('refresh'); this.getList('refresh');
}, },
@ -183,9 +185,9 @@
} else { } else {
updateTitle("报废收货任务(" + this.totalCount + ")"); updateTitle("报废收货任务(" + this.totalCount + ")");
} }
this.loadingType = "loadmore"; this.loadingType = "more";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "noMore";
return; return;
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
@ -332,7 +334,7 @@
goHome() goHome()
}, },
onReach() { onReach() {
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'noMore') {
return; return;
} }
this.getList("more"); this.getList("more");
@ -366,6 +368,11 @@
action: "==", action: "==",
value: result.label.itemCode value: result.label.itemCode
}, },
{
column: "type",
action: "==",
value: this.type
}
// { // {
// column: "fromLocationCode", // column: "fromLocationCode",
// action: "==", // action: "==",

4
src/pages/productReceipt/job/scrapReceiptJob.vue

@ -17,7 +17,9 @@
}; };
}, },
onReachBottom() {
this.$refs.productreceiptjob.onReach();
},
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.refresh();
}, },

4
src/pages/productReceipt/job/semiProductReceiptJob.vue

@ -17,7 +17,9 @@
}; };
}, },
onReachBottom() {
this.$refs.productreceiptjob.onReach();
},
onShow() { onShow() {
if(this.$refs.productreceiptjob!=undefined){ if(this.$refs.productreceiptjob!=undefined){
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.refresh();

Loading…
Cancel
Save