Browse Source

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

hella_online_20240823
lijuncheng 4 weeks ago
parent
commit
bcd4858c70
  1. 8
      src/api/httpRequest3.js
  2. 4
      src/manifest.json
  3. 8
      src/mycomponents/job/jobFilter.vue
  4. 2
      src/pages.json
  5. 46
      src/pages/fg/receiptByPlan.vue
  6. 6
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  7. 76
      src/pages/putaway/job/quantityPutawayJob.vue

8
src/api/httpRequest3.js

@ -16,13 +16,17 @@ function service(options = {}) {
// } // }
var requestUrl = "" var requestUrl = ""
requestUrl = import.meta.env.VITE_BASE_URL requestUrl = import.meta.env.VITE_BASE_URL
// 获取当前页面路由
let pages = getCurrentPages(); // 获取所有页面栈的实例数组
let currentPage = pages[pages.length - 1]; // 获取最后一个页面的实例
let currentRoute = currentPage.route; // 获取当前页面的路由
options.header = { options.header = {
"content-type": "application/json", "content-type": "application/json",
"Authorization": "Bearer " + token, "Authorization": "Bearer " + token,
"dataType": "json", "dataType": "json",
"dataSource": "PDA", "dataSource": "PDA",
"tenant-id": tenantId "tenant-id": tenantId,
"Referer1":currentPage.route
}; };
options.timeout = 300000 options.timeout = 300000

4
src/manifest.json

@ -3,8 +3,8 @@
"package" : "uni.UNI43932FE", "package" : "uni.UNI43932FE",
"appid" : "__UNI__C9CF4BF", "appid" : "__UNI__C9CF4BF",
"description" : "", "description" : "",
"versionName" : "1.0.66", "versionName" : "1.0.67",
"versionCode" : 66, "versionCode" : 67,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

8
src/mycomponents/job/jobFilter.vue

@ -11,7 +11,7 @@
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" <u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35"
@change="switchChangeToday"></u-switch> @change="switchChangeToday"></u-switch>
</view> </view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;"> <view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;" v-if="isShowStatus">
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx;">
只看待处理 只看待处理
@ -152,7 +152,11 @@
isShowToAreaCode: { isShowToAreaCode: {
type: Boolean, type: Boolean,
default: false default: false
} },
isShowStatus: {
type: Boolean,
default: true
},
}, },
data() { data() {
return { return {

2
src/pages.json

@ -462,7 +462,7 @@
{ {
"path": "pages/putaway/job/quantityPutawayJob", "path": "pages/putaway/job/quantityPutawayJob",
"style": { "style": {
"navigationBarTitleText": "采购上架(批量)", "navigationBarTitleText": "批量采购上架",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"titleNView": { "titleNView": {
// "autoBackButton": "true", // "autoBackButton": "true",

46
src/pages/fg/receiptByPlan.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="page-wraper" style="background-color: #fff;"> <view class="page-wraper" style="background-color: #fff;">
<view class="header" > <view class="header">
<view class=""> <view class="">
<com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view> <com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view>
</view> </view>
@ -132,7 +132,9 @@
import { import {
Exception Exception
} from 'sass'; } from 'sass';
import { nextTick } from 'vue'; import {
nextTick
} from 'vue';
export default { export default {
components: { components: {
@ -273,9 +275,9 @@ import { nextTick } from 'vue';
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
let list = [] let list = []
try{ try {
var planData = await planReceiptSubmit(params) var planData = await planReceiptSubmit(params)
console.log('planData',planData) console.log('planData', planData)
if (planData.data) { if (planData.data) {
planData.data.forEach(item => { planData.data.forEach(item => {
@ -300,9 +302,9 @@ import { nextTick } from 'vue';
} else { } else {
throw new Error("提交失败") throw new Error("提交失败")
} }
}catch(error){ } catch (error) {
console.log('异常',error) console.log('异常', error)
if(error.indexOf('请返回开工阶段')>-1){ if (error.indexOf('请返回开工阶段') > -1) {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage('计划已完成') this.showErrorMessage('计划已完成')
this.clearData() this.clearData()
@ -333,21 +335,16 @@ import { nextTick } from 'vue';
var queryParams = { var queryParams = {
filters: [{ filters: [{
column: "plan_type",
action: "==",
value: "assemble"
},
{
column: "number", column: "number",
action: "==", action: "==",
value: this.dataContent.planNumber value: this.dataContent.planNumber
} }],
],
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
} }
let isAllSubmit = Number(Number(this.dataContent.goodQty)+ Number(this.showList.length))==Number(this.dataContent.planQty) let isAllSubmit = Number(Number(this.dataContent.goodQty) + Number(this.showList.length)) ==
Number(this.dataContent.planQty)
var planeInfo = await getPlanByNumber(queryParams); var planeInfo = await getPlanByNumber(queryParams);
if (planeInfo.data && planeInfo.data.list.length > 0) { if (planeInfo.data && planeInfo.data.list.length > 0) {
@ -370,16 +367,16 @@ import { nextTick } from 'vue';
// throw new Error("") // throw new Error("")
// } // }
uni.hideLoading() uni.hideLoading()
if(isAllSubmit){ if (isAllSubmit) {
this.clearData() this.clearData()
}else{ } else {
this.showList = []; this.showList = [];
this.allList = []; this.allList = [];
this.index = 1; this.index = 1;
this.dataContent.handleQty = 0; this.dataContent.handleQty = 0;
} }
nextTick(()=>{ nextTick(() => {
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
}) })
@ -469,7 +466,8 @@ import { nextTick } from 'vue';
// this.dataContent.handleQty = this.allList.length; // this.dataContent.handleQty = this.allList.length;
// dataContent.noGoodQty // dataContent.noGoodQty
if (this.dataContent.handleQty == this.dataContent.packQty || (this.dataContent.noGoodQty<this.dataContent.packQty&&this.dataContent.handleQty == this.dataContent.noGoodQty)) { if (this.dataContent.handleQty == this.dataContent.packQty || (this.dataContent.noGoodQty < this
.dataContent.packQty && this.dataContent.handleQty == this.dataContent.noGoodQty)) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
} }
@ -487,7 +485,7 @@ import { nextTick } from 'vue';
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
} }
}, },
getH5BatchPrintingLable( number) { getH5BatchPrintingLable(number) {
let _this = this let _this = this
batchPrintingLable(number).then(resLable => { batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable) console.log('batchPrintingLable', resLable)
@ -503,7 +501,7 @@ import { nextTick } from 'vue';
_this.showErrorMessage(error) _this.showErrorMessage(error)
}) })
}, },
print(pointData){ print(pointData) {
let _this = this let _this = this
// #ifdef APP // #ifdef APP
@ -515,10 +513,10 @@ import { nextTick } from 'vue';
// #endif // #endif
// #ifdef H5 // #ifdef H5
let packingNumber = [] let packingNumber = []
pointData.forEach(item=>{ pointData.forEach(item => {
packingNumber.push(item.packageCode) packingNumber.push(item.packageCode)
}) })
if(packingNumber.length==0){ if (packingNumber.length == 0) {
_this.showErrorMessage('包装号不能为空!') _this.showErrorMessage('包装号不能为空!')
return return
} }
@ -555,8 +553,6 @@ import { nextTick } from 'vue';
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {
background-color: #fff; background-color: #fff;
} }

6
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -420,7 +420,11 @@
inventoryMoveSubmit(params).then(res => { inventoryMoveSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成库存转移记录\n" + res.data) let showTitle = this.title
if(this.title.indexOf('任务')==this.title.length-2){
showTitle = this.title.replace('任务','')
}
this.showCommitSuccessMessage("提交成功\n生成"+showTitle+"记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

76
src/pages/putaway/job/quantityPutawayJob.vue

@ -1,5 +1,8 @@
<template> <template>
<view class=""> <view class="">
<view class="" style="background: white;padding: 20rpx;position: fixed;width: 100%;box-shadow: 0px 0px 10px 10px rgba(1, 1, 1, 0.05);z-index: 22;">
<uni-pagination :total="totalCount" title="标题文字" :pageSize='pageSize' @change="changePage" :current="pageNo"/>
</view>
<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" otherTitle="ASN" @switchChangeToday="switchChangeToday"
:isShowToAreaCode="true" :isShowQurery='true' :isShowToday='false' :isShowStatus='false' :isShowToAreaCode="true" :isShowQurery='true' :isShowToday='false' :isShowStatus='false'
@ -7,7 +10,7 @@
:checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter"> :checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter">
</job-filter> </job-filter>
<view v-if="jobList.length>0" style="padding-bottom: 100rpx;"> <view v-if="jobList.length>0" style="padding-bottom: 100rpx;padding-top: 100rpx;">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index"> <view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions" <uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@ -20,7 +23,7 @@
<putaway-info-popup ref='jobInfoPopup'></putaway-info-popup> <putaway-info-popup ref='jobInfoPopup'></putaway-info-popup>
<putaway-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></putaway-job-list-popup> <putaway-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></putaway-job-list-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <!-- <uni-load-more :status="loadingType" v-if="jobList.length>0" /> -->
</view> </view>
<!-- <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> --> <!-- <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> -->
@ -29,7 +32,7 @@
</winScanPackJob> --> </winScanPackJob> -->
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobList" @selectItem="selectItem"></jobList>
<view class="footer" v-if="jobList.length>0"> <view class="footer" v-if="jobList.length>0">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">全部执行</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="takeAllJob">执行当前页</button>
</view> </view>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -42,7 +45,8 @@
getPutawayJobList, getPutawayJobList,
cancleTakePutawayJob, cancleTakePutawayJob,
putawayJobAllExecute, putawayJobAllExecute,
takeAllPutawayJob takeAllPutawayJob,
cancleAllTakePutawayJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -130,13 +134,13 @@
this.$refs.filter.openFilter(); this.$refs.filter.openFilter();
} }
}, },
onReachBottom() { // onReachBottom() {
// // //
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { // if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; // return;
} // }
this.getList("more"); // this.getList("more");
}, // },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh'); this.getList('refresh');
}, },
@ -174,12 +178,12 @@
action: "==", action: "==",
value: this.$store.state.user.id value: this.$store.state.user.id
}) })
if(toAreaCode){ if(this.toAreaCode){
// //
filters.push({ filters.push({
column: "toAreaCode", column: "toAreaCode",
action: "==", action: "==",
value: toAreaCode value: this.toAreaCode
}) })
} }
var params = { var params = {
@ -197,15 +201,16 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
console.log(333,this.totalCount)
updateTitle(this.title + "(" + this.totalCount + ")"); updateTitle(this.title + "(" + this.totalCount + ")");
this.loadingType = "loadmore"; // this.loadingType = "loadmore";
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 = list
this.jobNumberList = list.map(item=>item.number) this.jobNumberList = list.map(item=>item.number)
this.pageNo++; // this.pageNo++;
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
@ -273,7 +278,7 @@
switchChangeWait(state, jobStatus) { switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state; this.checkedWaitTask = state;
this.status = jobStatus; // this.status = jobStatus;
this.getList("refresh"); this.getList("refresh");
}, },
@ -446,13 +451,7 @@
title: "加载中­....", title: "加载中­....",
mask: true mask: true
}); });
if (params.status) {
this.status = params.status
}else{
this.status = "1" this.status = "1"
}
if(params.creationTime==""){ if(params.creationTime==""){
this.checkedToday = false; this.checkedToday = false;
} }
@ -492,17 +491,38 @@
uni.hideLoading() uni.hideLoading()
this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => { this.$refs.comMessage.showSuccessMessage( "执行任务成功", res => {
if (res) { if (res) {
this.getList("refresh") this.getList()
} }
}); });
} else { } else {
uni.hideLoading() uni.hideLoading()
this.showMessage("执行任务失败") this.showMessage("执行任务失败")
this.cancleAllJob()
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showMessage(error) this.showMessage(error)
this.cancleAllJob()
}) })
},
//
cancleAllJob(){
cancleAllTakePutawayJob({
jobNumberList:this.jobNumberList
}).then(res => {
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
changePage(e){
console.log(e)
this.pageNo = e.current
this.status = 1
this.getList()
} }
} }

Loading…
Cancel
Save