Browse Source

修改采购退货

hella_online_20250306
lijuncheng 1 month ago
parent
commit
16b084c95e
  1. 2
      src/api/httpRequest3.js
  2. 3
      src/common/config.js
  3. 1
      src/pages/issue/job/issueJob.vue
  4. 4
      src/pages/login/index.vue
  5. 158
      src/pages/purchaseReturn/job/returnJob.vue

2
src/api/httpRequest3.js

@ -109,7 +109,6 @@ function service(options = {}) {
uni.getNetworkType({ uni.getNetworkType({
success: function(res) { success: function(res) {
const networkType = res.networkType; const networkType = res.networkType;
console.log("网络类型", networkType)
if (networkType == "none") { if (networkType == "none") {
reject("当前设备无网络,请检查网络后重试"); reject("当前设备无网络,请检查网络后重试");
} else { } else {
@ -119,7 +118,6 @@ function service(options = {}) {
}) })
// #endif // #endif
// #ifdef H5 // #ifdef H5
console.log("网s络H5", navigator.onLine)
if (navigator.onLine) { if (navigator.onLine) {
uni.request(options); uni.request(options);
} else { } else {

3
src/common/config.js

@ -8,4 +8,7 @@ export const repleinshJobFilter="repleinsh_job_filter"
export const overPackageJobFilter="over_package_job_filter" export const overPackageJobFilter="over_package_job_filter"
export const productionReceiptJobFilter="production_receipt_job_filter" export const productionReceiptJobFilter="production_receipt_job_filter"
export const deliverJobFilter="deliver_job_filter" export const deliverJobFilter="deliver_job_filter"
export const purchaseReturnJobFilter="purchase_return_job_filter"

1
src/pages/issue/job/issueJob.vue

@ -235,7 +235,6 @@
pageSize: this.pageSize, pageSize: this.pageSize,
} }
console.log("查询条件",JSON.stringify(params))
getIssueJobList(params).then(res => { getIssueJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {

4
src/pages/login/index.vue

@ -131,8 +131,8 @@
storage.clearStorage() storage.clearStorage()
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
this.username = "admin" this.username = "winin123"
this.password = "CD_win09"; this.password = "ABC!de7#45";
} }
uni.setNavigationBarColor({ uni.setNavigationBarColor({
frontColor: '#ffffff', frontColor: '#ffffff',

158
src/pages/purchaseReturn/job/returnJob.vue

@ -1,9 +1,10 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter ref="filter"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" @onScanAsnNumber="getScanAsnNumber" :isShowItemCode="true"
:checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"> @onQuery="getListByFilter" :isShowQurery='true'
>
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
@ -35,6 +36,11 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
purchaseReturnJobFilter
} from '@/common/config.js';
import { import {
getDetailOption, getDetailOption,
@ -66,7 +72,7 @@
loadingType: "nomore", loadingType: "nomore",
checkedToday: false, checkedToday: false,
checkedWaitTask: false, checkedWaitTask: false,
todayTime: "", creationTime:"",
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
@ -113,7 +119,7 @@
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) { } else if (e.index == 1) {
this.$refs.filter.openFilter(); this.$refs.filter.openFilterParams(uni.getStorageSync(purchaseReturnJobFilter));
} }
}, },
@ -130,27 +136,10 @@
this.pageNo = 1; this.pageNo = 1;
this.jobList = []; this.jobList = [];
} }
var filters = []
if (this.checkedToday) { var queryFiltersParams =this.setQueryParam()
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = { var params = {
filters: filters, filters: queryFiltersParams,
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
} }
@ -182,6 +171,50 @@
that.showErrorMessage(error) that.showErrorMessage(error)
}) })
}, },
setQueryParam(){
var filterParams = []
var queryParams=uni.getStorageSync(purchaseReturnJobFilter)
if (queryParams.creationTime) {
filterParams.push({
column: "create_time",
action: "betweeen",
value: queryParams.creationTime
})
}
//
if (queryParams.status) {
filterParams.push({
column: "status",
action: "in",
value: queryParams.status
})
}else {
filterParams.push({
column: "status",
action: "in",
value: "1,2"
})
}
if(queryParams.itemCode){
filterParams.push({
column: "itemCode",
action: "like",
value: queryParams.itemCode
})
}
filterParams.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
return filterParams;
},
openJobDetail(item) { openJobDetail(item) {
@ -231,78 +264,9 @@
}) })
}, },
switchChangeToday(state, creationTime) { getListByFilter(params) {
this.checkedToday = state; uni.setStorageSync(purchaseReturnJobFilter,params)
this.todayTime = creationTime; this.getList('refresh')
this.getList("refresh");
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
},
getScanAsnNumber(code) {
this.getDataListByType(code, "asnNumber")
},
getScanNumber(code) {
this.getDataListByType(code, "number")
},
getDataListByType(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
if (type == "asnNumber") {
filters.push({
column: "asn_number",
action: "==",
value: code
})
} else if (type == "number") {
filters.push({
column: "number",
action: "==",
value: code
})
}
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getPurchaseReturnJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
} else {
if (type == "asnNumber") {
that.showItemList(res.data.list);
}
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
}, },
showErrorMessage(message) { showErrorMessage(message) {

Loading…
Cancel
Save