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 3 months ago
parent
commit
44868c10d6
  1. 10
      .env.development
  2. 24
      src/api/request2.js
  3. 20
      src/common/array.js
  4. 18
      src/common/detail.js
  5. 4
      src/manifest.json
  6. 39
      src/pages/issue/job/issueJob.vue
  7. 1
      src/pages/issue/record/issueRecord.vue
  8. 5
      src/pages/productReceipt/job/scrapReceiptJob.vue
  9. 76
      src/pages/purchaseReceipt/job/receiptDetail.vue
  10. 38
      src/pages/repleinsh/job/repleinshJob.vue
  11. 4
      src/pages/repleinsh/record/repleinshRecord.vue

10
.env.development

@ -1,11 +1,11 @@
#VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api VITE_BASE_URL=http://172.21.32.14:81/api/admin-api
#VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/api/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api # 租户配置
# 租户配置 VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' VITE_TENANT='[{"text":"长春1379","value":1}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=true VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'

24
src/api/request2.js

@ -1418,6 +1418,18 @@ export function cancleTakeIssueJob(id) {
data: {}, data: {},
}); });
} }
/**
* 发料 关闭任务
* @param {*} id
*
*/
export function closeTakeIssueJob(id) {
return request({
url: baseApi + "/wms/issue-job-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 发料任务 提交 * 发料任务 提交
@ -3861,6 +3873,18 @@ export function cancleTakeRepleinshJob(id) {
}); });
} }
/**
* 补料任务 关闭任务
* @param {*} id
*
*/
export function closeTakeRepleinshJob(id) {
return request({
url: baseApi + "/wms/repleinsh-job-main/close?id=" + id,
method: "put",
data: {},
});
}
/** /**
* 补料任务 提交 * 补料任务 提交
* @param {*} params * @param {*} params

20
src/common/array.js

@ -223,7 +223,7 @@ export function getDetailEditRemoveOption() {
} }
//详情编辑放弃 //详情编辑关闭
export function getDetailGiveupOption() { export function getDetailGiveupOption() {
let option_detail_giveup = [{ let option_detail_giveup = [{
text: '详情', text: '详情',
@ -241,7 +241,23 @@ export function getDetailGiveupOption() {
return option_detail_giveup; return option_detail_giveup;
} }
//详情放弃
export function getDetailCloseOption() {
let option_detail_giveup = [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '关闭',
style: {
backgroundColor: '#F56C6C'
}
}
];
return option_detail_giveup;
}
//详情编辑移除 //详情编辑移除
export function getEditRemoveOption() { export function getEditRemoveOption() {

18
src/common/detail.js

@ -34,8 +34,9 @@ export function getTreeDataSource(dataList) {
items.forEach(r => items.forEach(r =>
r.subList.forEach(s => { r.subList.forEach(s => {
s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber) s.packList = childList.filter(c => c.parentPackingNumber == s.packingNumber)
s.packList.forEach(pac=>{ s.packList.forEach(pac => {
pac.scaned=false; pac.scaned = false;
pac.scanDate = new Date();
}) })
}) })
) )
@ -61,7 +62,7 @@ export function getDataSource(subList) {
} }
}) })
return items; return items;
} }
export function createItemInfo(detail) { export function createItemInfo(detail) {
let item = { let item = {
@ -79,6 +80,7 @@ export function createItemInfo(detail) {
export function createDetailInfo(data) { export function createDetailInfo(data) {
data.scaned = false; data.scaned = false;
data.scanDate = new Date();
let detail = data; let detail = data;
detail.packList = []; detail.packList = [];
return detail; return detail;
@ -104,8 +106,8 @@ export function calcHandleQty(detailSource) {
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber(); item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined ) { if (detail != undefined) {
if(detail.scaned){ if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty); item.handleQty = calc.add(item.handleQty, detail.handleQty);
} }
item.qty = calc.add(item.qty, detail.qty); item.qty = calc.add(item.qty, detail.qty);
@ -120,10 +122,10 @@ export function calcTreeHandleQty(detailSource) {
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
if(detail.packList.length>0){ if (detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber(); detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList){ for (let pack of detail.packList) {
if(pack!=undefined&&pack.scaned){ if (pack != undefined && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty); detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
} }
} }

4
src/manifest.json

@ -2,8 +2,8 @@
"name" : "wms", "name" : "wms",
"appid" : "__UNI__C9CF4BF", "appid" : "__UNI__C9CF4BF",
"description" : "", "description" : "",
"versionName" : "1.0.28", "versionName" : "1.0.37",
"versionCode" : 28, "versionCode" : 37,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

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

@ -9,7 +9,8 @@
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<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:item.status=='1'?detailCloseOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card> <com-issue-job-card :dataContent="item" @click='openJobDetail(item)'></com-issue-job-card>
@ -34,7 +35,8 @@
import { import {
cancleTakeIssueJob, cancleTakeIssueJob,
getIssueJobList, getIssueJobList,
getIssueJobByProductionline getIssueJobByProductionline,
closeTakeIssueJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome, goHome,
@ -43,7 +45,8 @@
import { import {
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption,
getDetailCloseOption
} from '@/common/array.js'; } from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@ -81,6 +84,7 @@
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
productionlineList: [], productionlineList: [],
detailCloseOptions: [],
title:'', title:'',
productionLine:"", productionLine:"",
fromLocation:"" fromLocation:""
@ -97,6 +101,7 @@
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.detailCloseOptions = getDetailCloseOption();
}, },
onReachBottom() { onReachBottom() {
// //
@ -294,6 +299,13 @@
this.cancleJob(dataContent.masterId); this.cancleJob(dataContent.masterId);
} }
}); });
}else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
} }
}, },
@ -315,6 +327,27 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
closeJob(id) {
uni.showLoading({
title: "加载中....",
mask: true
});
closeTakeIssueJob(id).then(res => {
uni.hideLoading()
if(res.data){
this.getList("refresh")
uni.showToast({
title:"关闭任务成功"
})
}else {
this.showMessage("关闭任务失败")
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;

1
src/pages/issue/record/issueRecord.vue

@ -518,6 +518,7 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData(); this.clearData();
this.openScanPopup();
}) })
}, },

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

@ -20,6 +20,11 @@
onLoad(option){ onLoad(option){
this.title = option.title this.title = option.title
}, },
onShow(){
this.$nextTick(()=>{
this.$refs.productreceiptjob.refresh()
})
},
onReachBottom() { onReachBottom() {
this.$refs.productreceiptjob.onReach(); this.$refs.productreceiptjob.onReach();
}, },

76
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -14,9 +14,9 @@
@change="switchChange"></u-switch> @change="switchChange"></u-switch>
</view> </view>
</view> </view>
<view class="" v-if ="operation=='reject'"> <view class="" v-if="operation=='reject'">
<uni-section title="拒收原因" type="line"> <uni-section title="拒收原因" type="line">
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因" ></uni-easyinput> <uni-easyinput v-model="reasonText" placeholder="请输入拒收原因"></uni-easyinput>
</uni-section> </uni-section>
</view> </view>
@ -44,8 +44,7 @@
<view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10"> <view v-if="operation=='receipt'" class="uni-flex u-col-center space-between padding_10">
<view> <view>
<locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode" <locationCompare ref="locationCompare" title="收货库位" :recommendLocationCode="jobToLocationCode"
@getLocation='scanLocationCode' @getLocation='scanLocationCode' :locationAreaTypeList="toLocationAreaTypeList">
:locationAreaTypeList="toLocationAreaTypeList">
</locationCompare> </locationCompare>
</view> </view>
<view> <view>
@ -79,7 +78,7 @@
goHome, goHome,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatch, getPackingNumberAndBatch,
compareAsc, compareDesc,
navigateBack, navigateBack,
getSwitchInfoByCode getSwitchInfoByCode
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -143,8 +142,8 @@
operation: '', operation: '',
scanMessage: '', scanMessage: '',
status: '', status: '',
switchCode:"", switchCode: "",
isCheckLocation: 'purchaseReceiptLocationCodeValidate',// isCheckLocation: 'purchaseReceiptLocationCodeValidate', //
reasonText: "", reasonText: "",
}; };
}, },
@ -155,7 +154,7 @@
this.scanMessage = option.scanMessage; this.scanMessage = option.scanMessage;
this.operation = option.operation; this.operation = option.operation;
this.status = option.status; this.status = option.status;
this.switchCode = "purchasereceiptPrintPDA"//pda this.switchCode = "purchasereceiptPrintPDA" //pda
}, },
@ -249,7 +248,7 @@
} }
that.isAllReceived = false; that.isAllReceived = false;
//ASN //ASN
if(this.scanMessage){ if (this.scanMessage) {
this.$refs.scanPopup.simulateScan(this.scanMessage); this.$refs.scanPopup.simulateScan(this.scanMessage);
} }
@ -265,7 +264,6 @@
getScanResult(result) { getScanResult(result) {
try { try {
var itemCode = result.label.itemCode; var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var detail = this.detailSource.find(r => r.itemCode == itemCode);
@ -284,17 +282,19 @@
} else { } else {
itemDetail.forEach(item => { itemDetail.forEach(item => {
item.scaned = true; item.scaned = true;
itemDetail.scanDate = new Date();
item.handleQty = item.qty; item.handleQty = item.qty;
item.toLocationCode = this.toLocationCode; item.toLocationCode = this.toLocationCode;
}) })
this.detailSource[0].subList.sort(compareAsc('scaned')); //
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.detailSource[0].subList.sort(compareDesc('scanDate')); //
this.continueScan() this.continueScan()
this.$forceUpdate() this.$forceUpdate()
} }
} }
} else if (result.label.labelType == "PurchaseLabel") { } else if (result.label.labelType == "PurchaseLabel") {
var packingNumber = result.label.packingNumber; var packingNumber = result.package.number;
var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch; var batch = result.label.batch;
var qty = result.label.qty; var qty = result.label.qty;
var detail = this.detailSource.find(r => r.itemCode == itemCode); var detail = this.detailSource.find(r => r.itemCode == itemCode);
@ -305,39 +305,35 @@
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch ==
batch); batch);
if (itemDetail == undefined) { if (itemDetail == undefined) {
var isExit; itemDetail = detail.subList.find(r => r.packingNumber == parentpackingNumber && r.batch ==
for (let subItem of detail.subList) { batch);
var item;
for (let pack of subItem.packList) {
if (pack.packingNumber == packingNumber &&
pack.batch == batch) {
item = pack;
isExit = pack;
break;
}
}
if (item != undefined) {
subItem.scaned = true
subItem.handleQty = 0;
item = undefined
}
}
if (isExit == undefined) { if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中") this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else { } else {
if ( isExit.scaned) { var pack = itemDetail.packList.find(p => p.packingNumber == packingNumber &&
this.showMessage("箱码【" + packingNumber + "】已经扫描") p.batch == batch)
if (pack == undefined) {
this.showMessage("箱码【" + packingNumber + "】、批次【" + batch + "】不在列表中")
} else {
if (pack.scaned) {
pack.scanDate = new Date();
this.showMessage("箱码【" + packingNumber + "】已经扫描");
} else { } else {
isExit.scaned = true pack.scaned = true
isExit.handleQty = Number(result.label.qty); pack.scanDate = new Date();
isExit.toLocationCode = this.toLocationCode; pack.handleQty = Number(result.label.qty);
isExit.labelQty = Number(result.label.qty); pack.toLocationCode = this.toLocationCode;
pack.labelQty = Number(result.label.qty);
} }
} }
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
itemDetail.packList.sort(compareDesc('scanDate')); //
this.$forceUpdate() this.$forceUpdate()
}
} else { } else {
//,
var scanedLength = 0; var scanedLength = 0;
itemDetail.packList.forEach(res => { itemDetail.packList.forEach(res => {
if (res.scaned) { if (res.scaned) {
@ -346,21 +342,23 @@
}) })
if (itemDetail.scaned && scanedLength == itemDetail if (itemDetail.scaned && scanedLength == itemDetail
.packList.length) { .packList.length) {
isExit.scanDate = new Date();
this.showMessage("箱码【" + packingNumber + "】已经扫描") this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); // itemDetail.scanDate = new Date();
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty); itemDetail.labelQty = Number(result.label.qty);
itemDetail.packList.forEach(pac => { itemDetail.packList.forEach(pac => {
pac.scaned = true pac.scaned = true
pac.scanDate = new Date();
pac.handleQty = Number(pac.qty); pac.handleQty = Number(pac.qty);
pac.toLocationCode = this.toLocationCode; pac.toLocationCode = this.toLocationCode;
}) })
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
var test = this.detailSource this.detailSource[0].subList.sort(compareDesc('scanDate')); //
this.continueScan() this.continueScan()
this.$forceUpdate() this.$forceUpdate()
} }
@ -445,7 +443,7 @@
}, },
reject() { reject() {
if(!this.reasonText){ if (!this.reasonText) {
this.showMessage("请输入拒收原因") this.showMessage("请输入拒收原因")
return; return;
} }

38
src/pages/repleinsh/job/repleinshJob.vue

@ -9,7 +9,7 @@
<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 <uni-swipe-action-item
:right-options="item.status=='2'?detailGiveupOptions:detailOptions" :right-options="item.status=='2'?detailGiveupOptions:item.status=='1'?detailCloseOptions:detailOptions"
@click="swipeClick($event,item)"> @click="swipeClick($event,item)">
<com-repleinsh-job-card :dataContent="item" @click='openJobDetail(item)'></com-repleinsh-job-card> <com-repleinsh-job-card :dataContent="item" @click='openJobDetail(item)'></com-repleinsh-job-card>
</uni-swipe-action-item> </uni-swipe-action-item>
@ -31,7 +31,8 @@
import { import {
getRepleinshJobList, getRepleinshJobList,
cancleTakeRepleinshJob cancleTakeRepleinshJob,
closeTakeRepleinshJob
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -41,7 +42,8 @@
import { import {
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption,
getDetailCloseOption
} from '@/common/array.js'; } from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
@ -77,6 +79,7 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
detailCloseOptions: [],
title:'', title:'',
scanMessage:"" scanMessage:""
}; };
@ -92,6 +95,7 @@
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.detailCloseOptions = getDetailCloseOption();
}, },
//退 //退
@ -231,6 +235,13 @@
this.cancleJob(dataContent.masterId); this.cancleJob(dataContent.masterId);
} }
}); });
}else if (e.content.text == "关闭") {
this.$refs.comMessage.showQuestionMessage("确定要关闭当前任务?",
res => {
if (res) {
this.closeJob(dataContent.masterId);
}
});
} }
}, },
@ -252,6 +263,27 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
closeJob(id) {
uni.showLoading({
title: "加载中....",
mask: true
});
closeTakeRepleinshJob(id).then(res => {
uni.hideLoading()
if(res.data){
this.getList("refresh")
uni.showToast({
title:"关闭任务成功"
})
}else {
this.showMessage("关闭任务失败")
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;

4
src/pages/repleinsh/record/repleinshRecord.vue

@ -9,7 +9,7 @@
<uni-collapse ref="collapse"> <uni-collapse ref="collapse">
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx;"> <view class="card_itemName" style="font-size: 28rpx;">
先进先出推荐信息 先进先出推荐信息
</view> </view>
</template> </template>
@ -542,6 +542,7 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clear(); this.clear();
this.openScanPopup();
}) })
}, },
@ -552,6 +553,7 @@
this.detailSource = []; this.detailSource = [];
this.toLocationCode = ""; this.toLocationCode = "";
this.itemCode = "" this.itemCode = ""
this.recommendList = [];
} }
} }
} }

Loading…
Cancel
Save