Browse Source

修改三方库

pda_nev
李俊城 11 months ago
parent
commit
4411c4f4db
  1. 35
      fe/PDA/api/index.js
  2. 89
      fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue
  3. 33
      fe/PDA/mycomponents/coms/task/comThird.vue
  4. 3
      fe/PDA/mycomponents/wincom/winScanByProductCode.vue
  5. 14
      fe/PDA/pages.js
  6. 15
      fe/PDA/pages.json
  7. 26
      fe/PDA/pages/request/thirdLocationRequest.vue
  8. 191
      fe/PDA/pages/request/thirdLocationRequestList.vue
  9. 223
      fe/PDA/pages/request/thirdLocationRequestListDetail.vue
  10. 2
      fe/PDA/pages/return/purchaseReturnRequestApprove.vue
  11. 21
      fe/PDA/pages/return/purchaseReturnRequestApprove_detail.vue
  12. 33
      fe/PDA/pages/return/returnBeforPutaway.vue
  13. 2
      fe/PDA/pages/task/countFgDetail.vue
  14. 49
      fe/PDA/pages/task/countRawDetail.vue
  15. 23
      fe/PDA/pages/task/thirdLocation.vue
  16. 53
      fe/PDA/pages/task/thirdLocationDetail.vue

35
fe/PDA/api/index.js

@ -1480,6 +1480,33 @@ export const thirdLocationRequest = (params) => request(
data: params,
});
//三方库申请列表
export const getThirdLocationRequestList = (pageIndex,pageSize) => request(
devUrl + "/api/pda/store/third-location-request/list?pageIndex="+pageIndex+"&pageSize="+pageSize, {
method: 'get',
data: {}
})
//三方库申请详情
export const getThirdLocationRequestDetail = (id) => request(
devUrl + "/api/pda/store/third-location-request/" + id, { //
data: {},
method: "get"
});
//三方库发料申请 取消
export const thirdLocationRequestCancle = (id) => promise(
devUrl + "/api/pda/store/third-location-request/cancel/"+id, {
method: 'post',
data: {}
})
//三方库发料申请 终止
export const thirdLocationRequestClose = (id) => promise(
devUrl + "/api/pda/store/third-location/close-job/"+id, {
method: 'post',
data: {}
})
//三方库收货任务列表
export const getThirdLocationList = (params) => request(
devUrl + "/api/pda/job/third-location/list", {
@ -2063,6 +2090,14 @@ export const sparePartIssueRequest = (params) => request(
data: params,
method: "post"
})
//拆箱的时候,通过箱码获取原箱码采购订单信息
export const getPoNumberByPackingCode = (toPackingCode) => promise(
devUrl + "/api/pda/split-packing-rec/get-split-packing-code?toPackingCode="+toPackingCode, { //
data: {},
method: "get"
})

89
fe/PDA/mycomponents/comRequest/comThirdLocationRequestItem.vue

@ -0,0 +1,89 @@
<!-- 收货任务详情 -->
<template>
<view class="device-detail" style="padding-bottom: 0 !important;">
<comRequestTopInfo :requestContent="dataContent"></comRequestTopInfo>
<view class="margin_xs_bottom">
<!-- <view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image>
<text>{{dataContent.injectionIssueRequestNumber}}</text>
<text>申请单{{dataContent.deliverRequestNumber}}</text>
</view> -->
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image>
<text>{{dataContent.worker}}</text>
</view>
</view>
<view class="uni-flex uni-row receipt_bot">
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg">
</image>
<text
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text>
</view>
</view>
<view class="" style="display: flex; justify-content: space-between; margin-bottom: 15rpx;">
<view class="">
</view>
<view class="" style="float: right;" v-if="dataContent.requestStatus==5">
<view class="uni-flex uni-row">
<button type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
@click.stop="cancle()">取消</button>
</view>
</view>
</view>
</view>
</template>
<script>
import {
dateFormat,
showConfirmMsg
} from '@/common/basic.js';
import comRequestTopInfo from '@/mycomponents/comRequest/comRequestTopInfo.vue'
export default {
components: {
comRequestTopInfo
},
props: {
dataContent: {
type: Object,
default: {}
}
},
filters: {
formatDate: function(val) {
return dateFormat(val)
}
},
data() {
return {
};
},
mounted() {
},
methods: {
cancle() {
showConfirmMsg("是否确认取消?", callback => {
if (callback) {
this.$emit("cancle", this.dataContent)
}
})
}
}
}
</script>
<style scoped lang="scss">
</style>

33
fe/PDA/mycomponents/coms/task/comThird.vue

@ -24,6 +24,19 @@
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text>
</view>
</view>
<view class="" style="display: flex; justify-content: space-between; margin-bottom: 15rpx;">
<view class="">
</view>
<view class="" style="float: right;" v-if="getScanCount(dataContent)">
<view class="uni-flex uni-row">
<button type="primary" style="width: 140rpx; font-size: 32rpx; margin-right: 20rpx;"
@click.stop="finish()">终止</button>
</view>
</view>
</view>
</view>
</template>
@ -59,7 +72,27 @@
formatDate: function(val) {
return dateFormat(val)
}
},
methods: {
finish() {
showConfirmMsg("是否确认终止?", callback => {
if (callback) {
this.$emit("finish", this.dataContent)
}
})
},
getScanCount(data){
var count = 0;
this.dataContent.details.forEach(res => {
count = count + res.handledQty
})
if (count == 0) {
return false
}
return true;
}
}
}
</script>

3
fe/PDA/mycomponents/wincom/winScanByProductCode.vue

@ -88,7 +88,8 @@
itemName:item.itemName,
itemDesc1:item.itemDesc1,
stdPackQty: item.stdPackQty,
uom: item.uom
uom: item.uom,
qty:item.qty
};
uni.hideLoading();
this.callBack();

14
fe/PDA/pages.js

@ -706,6 +706,20 @@ module.exports = () => ({
"enablePullDownRefresh": true
}
},
{
"path": "pages/request/thirdLocationRequestList",
"style": {
"navigationBarTitleText": "三方库发货申请",
"enablePullDownRefresh": true
}
},
{
"path": "pages/request/thirdLocationRequestListDetail",
"style": {
"navigationBarTitleText": "三方库发货申请详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/thirdLocation",
"style": {

15
fe/PDA/pages.json

@ -691,6 +691,21 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/request/thirdLocationRequestList",
"style": {
"navigationBarTitleText": "三方库发货申请",
"enablePullDownRefresh": true
}
},
{
"path": "pages/request/thirdLocationRequestListDetail",
"style": {
"navigationBarTitleText": "三方库发货申请详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/thirdLocation",
"style": {

26
fe/PDA/pages/request/thirdLocationRequest.vue

@ -28,10 +28,10 @@
</view>
<uni-table border stripe style="">
<!-- <uni-tr>
<uni-td align="center">物品代</uni-td>
<uni-td>{{item.itemCode}}</uni-td>
</uni-tr> -->
<uni-tr>
<uni-td align="center">单件</uni-td>
<uni-td>{{item.singleCodeRequest}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">单位</uni-td>
<uni-td>{{item.uom}}</uni-td>
@ -267,7 +267,7 @@
let balanceRes = await getBalancesByFilterAsync(balanceParam);
if(balanceRes.totalCount==0){
this.showMessage("单件码【" + result.itemCode + "】在库位【"+this.fromLocationCode+"】没有库存")
this.showMessage("单件码【" + result.scanCode + "】在库位【"+this.fromLocationCode+"】没有库存")
return;
}
@ -282,12 +282,13 @@
}
var item = {
singleCodeRequest:result.scanCode,
itemCode: result.itemCode,
itemName: result.itemName,
itemDesc1: result.itemDesc1,
stdPackQty: result.stdPackQty,
uom: result.uom,
qty: result.stdPackQty
qty: result.qty
}
this.allDataList.unshift(item)
@ -297,6 +298,7 @@
this.loadingType = "";
this.showList = this.getDataPage(this.pageNo, this.pageSize)
this.updateTitle()
this.$refs.scanPackPopup.closeScanPopup()
this.$forceUpdate();
},
@ -310,8 +312,18 @@
locations(locationCode).then(res => {
uni.hideLoading();
if (res) {
if(res.code==this.fromLocationCode){
this.showMessage('目标库位【' + locationCode + "】不能与来源库位【"+this.fromLocationCode+"]一致");
}else {
if(res.type==14){
this.toLocationCode = res.code
this.toLocationArea =res.areaCode;
}else {
this.showMessage('目标库位【' + locationCode + '】的库位类型不是三方库');
}
}
} else {
this.showMessage('目标库位【' + locationCode + '】不存在');
}
@ -363,7 +375,6 @@
.catch(err => {
uni.hideLoading();
this.showMessage(err.message);
});
},
@ -394,6 +405,7 @@
itemDesc1: res.itemDesc1,
uom: res.uom,
qty: res.qty,
singleCodeRequest:res.singleCodeRequest,
stdPackQty: res.stdPackQty,
toLocationCode:this.toLocationCode,
toLocationArea:this.toLocationArea,

191
fe/PDA/pages/request/thirdLocationRequestList.vue

@ -0,0 +1,191 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-empty-view v-if="deliverList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id"
@click="openDetail(item)">
<comThirdLocationRequestItem :dataContent="item" @cancle="cancle">
</comThirdLocationRequestItem>
<!-- <comInjectIssue :dataContent="item"></comInjectIssue> -->
</view>
<uni-load-more :status="loadingType" v-if="deliverList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'>
</win-mulit-scan> -->
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getThirdLocationRequestList,
thirdLocationRequestCancle,
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comInjectIssue from '@/mycomponents/coms/task/comInjectIssue.vue';
import comThirdLocationRequestItem from '@/mycomponents/comRequest/comThirdLocationRequestItem.vue';
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default {
name: 'deliver',
components: {
winEmptyView,
winScanButton,
winMulitScan,
comInjectIssue,
comThirdLocationRequestItem,
comMessage
},
data() {
return {
deliverList: [],
reload: false,
status: '',
contentText: {
contentdown: '上拉加载更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
pageSize: this.modelConfig,
pageIndex: 1,
isTimeWindowSorting: false,
isToday: true,
titleArray: ['任务编号'],
loadingType: "nomore"
};
},
props: {
datacontent: {
type: Object,
value: null
}
},
onShow: function() {
this.getList('refresh');
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
goHome();
return true;
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
methods: {
cancle(item) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestCancle(item.id).then(res => {
uni.hideLoading()
uni.showToast({
title:"取消成功"
})
this.getList('refresh');
}).catch(error => {
uni.hideLoading()
this.showMessage("取消失败" + error)
})
},
finish(item) {
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
//
timeSortingChange: function(e) {
this.isTimeWindowSorting = e.detail.value
this.getList()
},
//
isTodayChange: function(e) {
this.isToday = e.detail.value
this.getList()
},
//
getList(type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageIndex = 1;
this.deliverList = [];
}
getThirdLocationRequestList(that.pageIndex, that.pageSize, false)
.then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.items;
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
//
this.loadingType = "nomore";
return;
}
// that.deliverList = [...that.deliverList, ...list];
that.deliverList = type === "refresh" ? list : this.deliverList.concat(list);
that.pageIndex++;
})
.catch(err => {
this.loadingType = "";
this.showMessage(err.message);
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
});
},
openDetail(item) {
uni.navigateTo({
url: './thirdLocationRequestListDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

223
fe/PDA/pages/request/thirdLocationRequestListDetail.vue

@ -0,0 +1,223 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<view class="top_card">
<view class="top_wrap" v-if="datacontent">
<view class="top_card">
<view class="device-detail">
<view class="list-style nopad">
<view class="ljh_box nopad">
<view class="tit_ljh uni-flex">
<text class="font_xl text_black text_bold">申请单号 : {{datacontent.number}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-y class="scroll-detail" style="margin-top: 10rpx;padding-bottom:100px">
<view class="detail-list " v-for="(item, index) in details" :key="index">
<view class="detail-content">
<view class="" style="">
<view class="uni-flex uni-row u-col-center">
<view class="" style="margin-top: 20rpx; margin-left: 10rpx; font-weight: bold;">
({{index+1}}).
</view>
<comItemCode :itemData="item"></comItemCode>
</view>
<uni-table border stripe style="">
<uni-tr>
<uni-td align="center">单件码</uni-td>
<uni-td>{{item.singleCodeRequest}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">单位</uni-td>
<uni-td>{{item.uom}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">标包数</uni-td>
<uni-td>{{item.stdPackQty}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">数量</uni-td>
<uni-td>
<view class="uni-flex uni-row">
<view class="uni-flex uni-row space-between" style="width: 100%;">
<view class="">
{{item.qty}}
</view>
<view class="">
</view>
</view>
</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</view>
</scroll-view>
<div class="new_bot_box" v-if="datacontent.requestStatus==5">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_save_btn " style="width: 100%;" @click="cancle()">取消</button>
</view>
</div>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view>
</template>
<script>
import {
getThirdLocationRequestDetail,
thirdLocationRequestCancle
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
navigateBack
} from '@/common/basic.js';
import comItemCode from '@/mycomponents/comItem/comItemCode.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
export default {
components: {
comMessage,
comJobScanDetail,
comItemCode
},
data() {
return {
id: "",
datacontent: {},
details: [],
jobStatus: "",
}
},
onLoad(param) {
this.id = param.id;
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
methods: {
//
getDetail() {
uni.showLoading({
title: "加载中",
mask: false
})
let that = this;
getThirdLocationRequestDetail(that.id)
.then(item => {
uni.hideLoading()
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
})
.catch(err => {
uni.hideLoading()
this.showMessage('未查找到详细信息')
});
},
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
cancle() {
showConfirmMsg("是否确认取消?", callback => {
if (callback) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestCancle(this.datacontent.id).then(res => {
uni.hideLoading()
uni.showToast({
title:"取消成功"
})
navigateBack(1)
}).catch(error => {
uni.hideLoading()
this.showMessage("取消失败" + error)
})
}
})
},
async finsh() {
uni.showLoading({
title: "提交中",
mask: true
})
try {
var jobList = await getkittingRequestJobByRequest(this.datacontent.number)
var handleResult = await kittingRequestHandle(this.datacontent.id)
var isHaveNewJobList = [];
jobList.forEach(res => {
isHaveNewJobList.push(res.kittingRequestNumber);
})
var isHaveNewJob = await iskittingHasNewJob(isHaveNewJobList)
uni.hideLoading()
this.showMessage(isHaveNewJob)
} catch (error) {
uni.hideLoading()
this.showMessage(error)
}
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
navigateBack(1); //
uni.hideLoading();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
}
</script>
<style scoped lang="scss">
</style>

2
fe/PDA/pages/return/purchaseReturnRequestApprove.vue

@ -167,7 +167,7 @@
openDetail(item) {
uni.navigateTo({
url: './purchaseReturnRequestApprove_detail?id=' + item.id
url: './purchaseReturnRequestApprove_detail?id=' + item.id +"&requestStatus="+item.requestStatus
});
},

21
fe/PDA/pages/return/purchaseReturnRequestApprove_detail.vue

@ -8,18 +8,20 @@
</view>
<scroll-view scroll-y="true" class="scroll-Y" style="padding-bottom: 180rpx;">
<view class="" style="background-color: #fff;">
<uni-table border stripe emptyText="" v-for="(item, index) in dataList" style="width: 100%;">
<uni-tr style="width: 100%;" v-for="(item1, index1) in item" :key="index1">
<uni-table border stripe emptyText="" v-for="(item, index) in dataList" style="width: 100%;background-color: antiquewhite;">
<uni-tr style="width: 100%; " v-for="(item1, index1) in item" :key="index1">
<uni-td>{{item1.title}}</uni-td>
<uni-td>{{item1.content}}</uni-td>
</uni-tr>
<view style=" height: 30rpx; width: 100%;">
</view>
<uni-tr style="height: 50rpx; width: 100%; background-color: lightgray" >
<uni-td></uni-td>
<uni-td></uni-td>
</uni-tr>`
</uni-table>
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="isShowButton">
<button class="new_clear_btn btn_double" @click="approve()">审批</button>
<button class="new_save_btn btn_double" @click="reject()">驳回</button>
</view>
@ -49,7 +51,8 @@
return {
dataContent: {},
dataList: [],
id: ""
id: "",
isShowButton:false
};
},
mounted: function() {
@ -59,6 +62,12 @@
if (option.id != undefined) {
this.id = option.id
this.getDetail(option.id);
var requestStatus =option.requestStatus
if(requestStatus==2){
this.isShowButton=true
}else {
this.isShowButton=false
}
}
},
//

33
fe/PDA/pages/return/returnBeforPutaway.vue

@ -1,6 +1,7 @@
<template>
<page-meta root-font-size="16px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<uni-data-picker v-if="itemList.length>0" style="padding: 20rpx; background-color:#fff;" class='uni-data-picker'
placeholder="请选择原因" popup-title="不合格原因" :localdata="returnReasonArray" v-model="returnReason">
@ -28,9 +29,10 @@
<script>
import {
getBalanceRemoveInAndOutAsync,
getBalancesByFilter,
returnBeforePutaway,
getDictByCode
getDictByCode,
getPoNumberByPackingCode
} from '@/api/index.js';
import {
showConfirmMsg,
@ -105,13 +107,17 @@
this.$refs.scanPopup.openScanPopup()
},
//
getScanResult(result) {
async getScanResult(result) {
let code = result.data.code;
if (code == '') return;
let items = this.itemList.filter(r => {
return r.packingCode === code
})
const poNumberData = await getPoNumberByPackingCode(code);
const poNumber =poNumberData?poNumberData.purchaseInfo_PoNumber:""
if (items.length > 0) {
showConfirmMsg('箱码【' + code + '】已经存在,是否要重新扫描?', confirm => {
if (confirm) {
@ -121,17 +127,17 @@
return;
}
});
this.getItem(code)
this.getItem(code,poNumber)
} else {
this.scanPopupGetFocus();
}
})
} else {
this.getItem(code)
this.getItem(code,poNumber)
}
},
getItem(code) {
getItem(code,poNumber) {
let that = this;
uni.showLoading({
title: "加载中....",
@ -143,10 +149,11 @@
packingCode: code,
locationTypes: [6] //
};
getBalanceRemoveInAndOutAsync(params).then(res => {
getBalancesByFilter(params).then(res => {
if (res.totalCount == 0) {
that.showScanMessage('箱码【' + code + '】在【隔离库】未查询到库存信息');
} else if (res.totalCount == 1) {
res.items[0].poNumber = poNumber;
that.itemList.unshift(res.items[0])
this.scanPopupGetFocus();
} else {
@ -207,7 +214,7 @@
}
that.itemList.forEach(r => {
let data = {
poNumber: "",
poNumber: r.poNumber,
packingCode: r.packingCode
}
item.details.push(data);
@ -287,4 +294,14 @@
</script>
<style scoped lang="scss">
.container {
display: flex;
width: 100%;
overflow-x: auto;
}
.webview-wrapper {
width: 100%;
min-width: 2000px; /* 设置一个足够宽的值,确保内容能够横向滚动 */
white-space: nowrap;
}
</style>

2
fe/PDA/pages/task/countFgDetail.vue

@ -500,7 +500,7 @@
}
},
creatDetail(result, balanceItem) {
creatDetail(result) {
let detail = {
isNew: true,
IsDelete:false,

49
fe/PDA/pages/task/countRawDetail.vue

@ -366,13 +366,50 @@
selectCheckbox(mode, data) {
console.log(mode, data)
var result={
data:data
} ;
var itemCode = data.itemCode;
var itemScan = this.scanAllDetails.filter(r =>
r.itemCode == itemCode&&r.inventoryStage==this.datacontent.inventoryStage)
if (itemScan.length > 0) {
setTimeout(res => {
showConfirmMsg("物料【" + itemCode + "】已经扫描,是否覆盖已经扫描的信息", res => {
if (res) {
this.setQty(itemScan[0], itemScan[0].countQty, false);
}
})
}, 100)
return;
}
let items = this.originalDetails.filter(r =>
r.itemCode === itemCode&&r.inventoryStage==this.datacontent.inventoryStage)
if(items.length == 0){
let detail = this.creatDetail(result);
this.setDetailNoBalance(detail, result)
detail.inventoryQty=result.data.qty
this.scanAllDetails.unshift(detail);
this.initList();
this.calcScanCount();
this.$forceUpdate();
}else if (items.length == 1){
setTimeout(res => {
showConfirmMsg("物料【" + itemCode + "】已经扫描,是否覆盖已经扫描的信息", res => {
if (res) {
this.setQty(items[0], items[0].inventoryQty, false);
}
})
}, 100)
}
},
reqGetList(data) {
let params = {
pageSize: data.pageSize,
pageIndex: data.pageIndex,
itemCode:data.searchValue
itemCode: data.searchValue
};
return getBalancesByFilterAsync(params);
// return simulationReqGetList({
@ -463,7 +500,7 @@
this.addNewDetail(result)
} else if (items.length == 1) {
var item = items[0];
item.isNew =true;
item.isNew = true;
this.setQty(item, item.inventoryQty, true);
} else {
this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据');
@ -539,7 +576,7 @@
}
},
creatDetail(result, balanceItem) {
creatDetail(result) {
let detail = {
isNew: true,
IsDelete: false,
@ -618,10 +655,10 @@
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
if(item.isNew){
if (item.isNew) {
this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1)
}else {
} else {
item.IsDelete = true;
item.modified = true;
}
@ -723,7 +760,7 @@
calcScanCount() {
this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length;
this.scanCount = this.scanAllDetails.filter(r => r.IsDelete == false).length;
},
bindPickerChange(e, item) {

23
fe/PDA/pages/task/thirdLocation.vue

@ -4,7 +4,7 @@
<win-empty-view v-if="deliverList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id"
@click="openDetail(item)">
<comThird :dataContent="item"></comThird>
<comThird :dataContent="item" @finish="finish"></comThird>
</view>
<uni-load-more :status="loadingType" v-if="deliverList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button>
@ -17,7 +17,8 @@
<script>
import {
getThirdLocationList,
getThirdLocationJobByNumber
getThirdLocationJobByNumber,
thirdLocationRequestClose
} from '@/api/index.js';
import {
@ -93,6 +94,24 @@
}
},
methods: {
finish(item) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestClose(item.id).then(res => {
uni.hideLoading()
uni.showToast({
title:"终止成功"
})
this.getList('refresh');
}).catch(error => {
uni.hideLoading()
this.showMessage("终止失败" + error)
})
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},

53
fe/PDA/pages/task/thirdLocationDetail.vue

@ -6,6 +6,7 @@
:isShowOther="true" showOther="未发数量">
</com-job-scan-detail>
</view>
<button v-if="showFinishButton" type="primary" @click="finish" style="margin: 20rpx;"> 任务终止</button>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
@ -57,10 +58,19 @@
<view class="">
<button v-if="item.scaned" type="primary" size="mini"
style="margin-left: 30rpx;"
@click="remove(dataContent,index)">移除</button>
@click="remove(item,index)">移除</button>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="70">单件码</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.singleCodeRequest }}</view>
</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.singleCodeJob }}</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
@ -95,7 +105,8 @@
takeThirdLocationJob,
cancelTakeThirdLocationJob,
finshThirdLocationJob,
locations
locations,
thirdLocationRequestClose
} from '@/api/index.js';
import {
showConfirmMsg,
@ -143,7 +154,8 @@
allCount: 0,
scanCount: 0,
jobStatus: "",
toLocationInfo: null
toLocationInfo: null,
showFinishButton:false
}
},
onLoad(param) {
@ -213,11 +225,32 @@
clearDefaultLocation() {
this.toLocationInfo = null
},
finish(){
showConfirmMsg("是否确认终止?", callback => {
if (callback) {
uni.showLoading({
title: "加载中",
mask: true
})
thirdLocationRequestClose(this.id).then(res => {
uni.hideLoading()
uni.showToast({
title:"终止成功"
})
navigateBack(1)
}).catch(error => {
uni.hideLoading()
this.showMessage("终止失败" + error)
})
}
})
},
remove(item, index) {
showConfirmMsg("是否移除当前【" + item.itemCode + "】扫描信息", res => {
if (res) {
item.scaned = false;
item.handledQty = null;
item.singleCodeJob=""
this.getScanCount()
}
})
@ -227,6 +260,13 @@
this.showMessage('收货货数量必须大于0')
item.qty = item.handledQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
}else {
if(value>item.recommendQty){
this.showMessage("收货货数量["+value+"]不能大于申请数量["+item.recommendQty+"]");
item.handledQty = item.recommendQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}
}
},
openScanPopup() {
@ -250,6 +290,12 @@
that.allCount = that.allCount + res.recommendQty
})
that.ispending = item.jobStatus === 2;
this.getScanCount()
if(this.scanCount>0){
this.showFinishButton=true
}else {
this.showFinishButton=false
}
// that.toLocation = item.details[0].recommendLocationCode;
})
@ -273,6 +319,7 @@
} else {
item.scaned = true;
item.handledQty = item.recommendQty;
item.singleCodeJob =result.scanCode
this.getScanCount()
setTimeout(res => {
this.$forceUpdate()

Loading…
Cancel
Save