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({
success: function(res) {
const networkType = res.networkType;
console.log("网络类型", networkType)
if (networkType == "none") {
reject("当前设备无网络,请检查网络后重试");
} else {
@ -119,7 +118,6 @@ function service(options = {}) {
})
// #endif
// #ifdef H5
console.log("网s络H5", navigator.onLine)
if (navigator.onLine) {
uni.request(options);
} 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 productionReceiptJobFilter="production_receipt_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,
}
console.log("查询条件",JSON.stringify(params))
getIssueJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {

4
src/pages/login/index.vue

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

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

@ -1,9 +1,10 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" @onScanAsnNumber="getScanAsnNumber"
:checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask">
<job-filter ref="filter"
:isShowItemCode="true"
@onQuery="getListByFilter" :isShowQurery='true'
>
</job-filter>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
@ -35,6 +36,11 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
purchaseReturnJobFilter
} from '@/common/config.js';
import {
getDetailOption,
@ -66,7 +72,7 @@
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
creationTime:"",
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
@ -113,7 +119,7 @@
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
this.$refs.filter.openFilterParams(uni.getStorageSync(purchaseReturnJobFilter));
}
},
@ -130,27 +136,10 @@
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
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 queryFiltersParams =this.setQueryParam()
var params = {
filters: filters,
filters: queryFiltersParams,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
@ -182,6 +171,50 @@
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) {
@ -231,78 +264,9 @@
})
},
switchChangeToday(state, creationTime) {
this.checkedToday = state;
this.todayTime = creationTime;
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);
})
getListByFilter(params) {
uni.setStorageSync(purchaseReturnJobFilter,params)
this.getList('refresh')
},
showErrorMessage(message) {

Loading…
Cancel
Save