Browse Source

kitting 发料申请

pda_nev
李俊城 12 months ago
parent
commit
fa09d58535
  1. 141
      fe/PDA/api/index.js
  2. 107
      fe/PDA/mycomponents/comRequest/comKittingRequestItem.vue
  3. 80
      fe/PDA/mycomponents/coms/request/comInjectIssue.vue
  4. 2
      fe/PDA/mycomponents/wincom/winScanButtonTop.vue
  5. 14
      fe/PDA/pages.js
  6. 16
      fe/PDA/pages.json
  7. 2
      fe/PDA/pages/index/index.vue
  8. 2
      fe/PDA/pages/request/injectionIssueRequest.vue
  9. 195
      fe/PDA/pages/request/kittingIssueRequestList.vue
  10. 216
      fe/PDA/pages/request/kittingIssueRequestListDetail.vue
  11. 87
      fe/PDA/pages/task/kittingIssueJobDetailByQty.vue

141
fe/PDA/api/index.js

@ -1667,64 +1667,97 @@ export const finshAssemblingIssueJob = (id, params) => request(
method: "post"
})
//kiting发料任务列表
export const getKittingIssueList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/job/kitting-issue/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
});
//kiting发料任务列表
export const getKittingIssueList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/job/kitting-issue/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
});
//根据Number 获取kiting发料任务列表
export const getKitingIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/kitting-issue/by-number/" + jobNumber, {
data: {},
method: "get"
});
//根据Number 获取kiting发料任务列表
export const getKitingIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/kitting-issue/by-number/" + jobNumber, {
data: {},
method: "get"
});
// 根据MaterialRequest Number获取kiting发料任务列表
export const getKitingIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
// 根据MaterialRequest Number获取kiting发料任务列表
export const getKitingIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
//kiting发料任务详情
export const getKittingIssueDetail = (params) => request(
devUrl + "/api/pda/job/kitting-issue/" + params.id, { //
data: {},
method: "get"
});
//kiting发料申请列表
export const getKittingRequestList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/store/kitting-request/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
})
//承接kiting发料任务
export const takeKittingIssueJob = (params) => request(
devUrl + "/api/pda/job/kitting-issue/take/" + params.id, { //
data: {},
method: "post"
});
//kiting发料申请 执行
export const kittingRequestHandle = (id) => promise(
devUrl + "/api/pda/store/kitting-request/handle/"+id, {
method: 'post',
data: {}
})
//kiting发料申请 获取任务号
export const getkittingRequestJobByRequest = (requestNumber) => promise(
devUrl + "/api/pda/job/kitting-issue/by-request-number/"+requestNumber, {
method: 'post',
data: {}
})
//取消承接kiting发料任务
export const cancelTakeKittingIssueJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成kiting发料任务
export const finshKittingIssueJob = (masterId,detailId, params) => request(
devUrl + "/api/pda/job/kitting-issue/ExecuteDetail/" + masterId+"?detailId="+detailId, { //
data: params,
method: "post"
})
//创建 kiting叫料申请
export const kittingIssueRequest = (params) => request(
devUrl + "/api/pda/store/kitting-request", { //
data: params,
method: "post"
})
//通过物料号查询收容数
export const getCountByItemCode = (itemCode) => request(
devUrl + "/api/pda/item-container/by-item?itemCode="+itemCode, { //
data: {},
method: "get"
})
//kiting发料 是否有新任务
export const iskittingHasNewJob = (data) => promise(
devUrl + "/api/pda/store/kitting-request/isHasNewJob", {
method: 'post',
data: data
})
//kiting发料申请 详情
export const getKittingRequestDetail = (id) => request(
devUrl + "/api/pda/store/kitting-request/" + id, { //
data: {},
method: "get"
});
//kiting发料任务详情
export const getKittingIssueDetail = (params) => request(
devUrl + "/api/pda/job/kitting-issue/" + params.id, { //
data: {},
method: "get"
});
//承接kiting发料任务
export const takeKittingIssueJob = (params) => request(
devUrl + "/api/pda/job/kitting-issue/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接kiting发料任务
export const cancelTakeKittingIssueJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成kiting发料任务
export const finshKittingIssueJob = (masterId,detailId, params) => request(
devUrl + "/api/pda/job/kitting-issue/ExecuteDetail/" + masterId+"?detailId="+detailId, { //
data: params,
method: "post"
})
//创建 kiting叫料申请
export const kittingIssueRequest = (params) => request(
devUrl + "/api/pda/store/kitting-request", { //
data: params,
method: "post"
})
//通过物料号查询收容数
export const getCountByItemCode = (itemCode) => request(
devUrl + "/api/pda/item-container/by-item?itemCode="+itemCode, { //
data: {},
method: "get"
})

107
fe/PDA/mycomponents/comRequest/comKittingRequestItem.vue

@ -0,0 +1,107 @@
<!-- 收货任务详情 -->
<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" v-if="dataContent.details.length>0">
<text>物料号 {{dataContent.details[0].itemCode}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>物料描述 {{dataContent.details[0].itemDesc1}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>位置码 {{dataContent.details[0].positionCode}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>目标库位 {{dataContent.details[0].toLocationCode}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>叫料数量 {{dataContent.details[0].issuedQty}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>单位 {{dataContent.details[0].uom}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>标包数 {{dataContent.details[0].stdPackQty}}</text>
</view>
<view class="label_order">
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image>
<text>{{dataContent.worker}}</text> -->
<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="">
<button type="primary" style="width: 140rpx; font-size: 32rpx; float: right;"
@click.stop="complete()">执行</button>
</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: {
complete(){
showConfirmMsg("是否确认执行?", callback => {
if (callback) {
this.$emit("handle",this.dataContent)
}
})
}
}
}
</script>
<style scoped lang="scss">
</style>

80
fe/PDA/mycomponents/coms/request/comInjectIssue.vue

@ -0,0 +1,80 @@
<!--发料任务卡片-->
<template>
<view class="device-detail">
<view class="card_task nopad">
<com-job-top-info :jobContent="dataContent"></com-job-top-info>
</view>
<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" v-if="dataContent.details.length>0">
<text>物料号 {{dataContent.details[0].itemCode}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>物料描述 {{dataContent.details[0].itemDesc1}}</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>收容数 {{dataContent.details[0].requestQty}} ({{dataContent.details[0].uom}})</text>
</view>
<view class="label_order" v-if="dataContent.details.length>0">
<text>目标库位 {{dataContent.details[0].recommendToLocationCode}}</text>
</view>
<view class="label_order">
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image>
<text>{{dataContent.worker}}</text> -->
<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>
</template>
<script>
import {
getJobStatuStyle,
getJobStatuDesc,
dateFormat
} from '@/common/basic.js';
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default {
name: "comDeliver",
components: {
comJobTopInfo
},
data() {
return {};
},
//
props: {
dataContent: {
type: Object,
value: null
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
},
formatDate: function(val) {
return dateFormat(val)
}
},
}
</script>
<style scoped lang="scss">
</style>

2
fe/PDA/mycomponents/wincom/winScanButtonTop.vue

@ -33,7 +33,7 @@
opacity: 0.4;
position: fixed;
z-index: 11;
left: 20rpx;
right: 20rpx;
bottom: 35%;
width: 110rpx;
height: 110rpx;

14
fe/PDA/pages.js

@ -793,6 +793,20 @@ module.exports = () => ({
"navigationBarTitleText": "kiting叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/kittingIssueRequestList",
"style": {
"navigationBarTitleText": "kiting叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/kittingIssueRequestListDetail",
"style": {
"navigationBarTitleText": "kiting叫料申请详情",
"enablePullDownRefresh": false
}
}

16
fe/PDA/pages.json

@ -772,9 +772,25 @@
"navigationBarTitleText": "kiting叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/kittingIssueRequestList",
"style": {
"navigationBarTitleText": "kiting叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/kittingIssueRequestListDetail",
"style": {
"navigationBarTitleText": "kiting叫料申请详情",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

2
fe/PDA/pages/index/index.vue

@ -76,7 +76,7 @@
<view class="index_menu">
<view class="menu_ab">
<view class="menu_content">
<view class="menu_content" style="padding-bottom: 70rpx;">
<!-- 标题 -->
<view :class="menuIndex == index ? 'index_title tit_active' : 'index_title'"
v-for="(item,index) in menu" :data-current="index" @click="ontabtap($event,item)">{{item.title}}

2
fe/PDA/pages/request/injectionIssueRequest.vue

@ -212,7 +212,7 @@
toLocationErpCode: this.toLocationInfo.erpLocationCode,
toWarehouseCode: localStorage.warehouseCode,
positionCode: "",
recommendType: "B",
recommendType: "SEMI",
boxQty: 1
}
params.details.push(item)

195
fe/PDA/pages/request/kittingIssueRequestList.vue

@ -0,0 +1,195 @@
<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)">
<comKittingRequestItem :dataContent="item" @handle="handle">
</comKittingRequestItem>
<!-- <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 {
getKittingRequestList,
kittingRequestHandle,
getkittingRequestJobByRequest,
iskittingHasNewJob
} 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 comKittingRequestItem from '@/mycomponents/comRequest/comKittingRequestItem.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,
comKittingRequestItem,
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: {
async handle(item){
uni.showLoading({
title:"提交中",
mask:true
})
try{
var jobList = await getkittingRequestJobByRequest(item.number)
var handleResult = await kittingRequestHandle(item.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)
}
},
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 = [];
}
getKittingRequestList(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: './kittingIssueRequestListDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

216
fe/PDA/pages/request/kittingIssueRequestListDetail.vue

@ -0,0 +1,216 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<view class="top_card">
<view class="top_wrap" v-if="details.length>0">
<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">位置码 : {{details[0].positionCode}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="70">库位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.toLocationCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="70">叫料数量</text></uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
{{item.issuedQty}}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="70">单位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.uom }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="70">标包数</uni-th>
<uni-th width="240" align="center">
<view class="text_black">{{item.stdPackQty }}</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<div class="new_bot_box">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_save_btn " style="width: 100%;" @click="submit()">执行</button>
</view>
</div>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view>
</template>
<script>
import {
getKittingRequestDetail,
kittingRequestHandle,
getkittingRequestJobByRequest,
iskittingHasNewJob
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
export default {
components: {
comMessage,
comJobScanDetail,
},
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() {
let that = this;
getKittingRequestDetail(that.id)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
})
.catch(err => {
this.showMessage('未查找到详细信息')
});
},
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
submit() {
showConfirmMsg("是否确认执行?", callback => {
if (callback) {
this.finsh();
}
})
},
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>

87
fe/PDA/pages/task/kittingIssueJobDetailByQty.vue

@ -7,7 +7,7 @@
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail" style="padding-bottom: 40rpx;" >
class="scroll-detail" style="padding-bottom: 40rpx;">
<view class="" v-for="(item, index) in details" :key="index">
<view class="detail-list margin_top">
<!-- 单选卡片 -->
@ -71,13 +71,13 @@
<uni-td width="100" align="center">数量({{item.uom}})</uni-td>
<uni-td width="120" align="center">{{item.handledFromQty}}</uni-td>
<uni-td width="120" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBox" v-model="item.handledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBoxRef" v-model="item.handledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-td>
</uni-tr>
@ -91,23 +91,24 @@
</view>
</scroll-view>
<view class="" style=" display: flex; width: 100%;padding-bottom: 150rpx; flex-direction: row; justify-content: space-around;">
<view class="" style=" align-items: center;">
<view class=""
style=" display: flex; width: 100%;padding-bottom: 150rpx; flex-direction: row; justify-content: space-around;">
<view class="" style=" align-items: center;">
<view class="scan_float_top" @click="openScanPopup">
<image src="@/static/icons_ui/icon_scan_white.svg"></image>
<view >单件码</view>
<view>单件码</view>
</view>
</view>
<view class="" style="">
<view class="" style="">
<view class="scan_float_top" @click="openLocationFrom">
<image src="@/static/icons_ui/icon_scan_white.svg"></image>
<view >来源库位</view>
<view>来源库位</view>
</view>
</view>
<view class="" style="">
<view class="" style="">
<view class="scan_float_top" @click="openLocationTo">
<image src="@/static/icons_ui/icon_scan_white.svg"></image>
<view >目标库位</view>
<view>目标库位</view>
</view>
</view>
@ -190,7 +191,7 @@
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
singCode:""
singCode: ""
}
},
props: {
@ -266,9 +267,9 @@
},
geToLocation(locationInfo) {
var current =this.details[0]
var current = this.details[0]
if (locationInfo.code != current.recommendToLocationCode) {
this.showMessage("扫描目标库位[" + locationInfo.code + "]与推荐目标库位[" +current
this.showMessage("扫描目标库位[" + locationInfo.code + "]与推荐目标库位[" + current
.recommendToLocationCode + "]不一致,请重新扫描")
return;
}
@ -310,7 +311,7 @@
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
that.details[0].defaultHandleQty =that.details[0].handledFromQty;
that.details[0].defaultHandleQty = that.details[0].handledFromQty;
}
uni.hideLoading();
@ -331,17 +332,17 @@
return;
}
//
getCountByItemCode(result.itemCode).then(res=>{
if(res){
this.singCode =result.itemCode
getCountByItemCode(result.itemCode).then(res => {
if (res) {
this.singCode = result.itemCode
var qty = res.qty;
this.details[0].handledFromQty = this.details[0].handledFromQty+qty;
this.details[0].handledFromQty = this.details[0].handledFromQty + qty;
this.details[0].handledToQty = this.details[0].handledFromQty;
}else {
this.showMessage("没有查找到["+result.itemCode+"]的收容数")
} else {
this.showMessage("没有查找到[" + result.itemCode + "]的收容数")
}
console.log("数量",res)
}).catch(error=>{
console.log("数量", res)
}).catch(error => {
this.showMessage(error)
})
@ -433,7 +434,7 @@
this.showMessage('该任务没有零件');
return;
}
if(this.singCode==""){
if (this.singCode == "") {
this.showMessage('请先扫描单件码');
return;
}
@ -447,7 +448,7 @@
return;
}
if (that.details[0].handledToQty==0||that.details[0].handledToQty=="") {
if (that.details[0].handledToQty == 0 || that.details[0].handledToQty == "") {
this.showMessage('发料数量必须大于0');
return;
}
@ -462,6 +463,7 @@
title: "提交中...",
mask: true
});
that.details[0].handledFromQty =that.details[0].handledToQty;
let params = that.details[0];
finshKittingIssueJob(that.id, params.id, params)
.then(res => {
@ -509,18 +511,23 @@
},
qtyChanged(value, item, index) {
if(value==0){
this.showMessage('发料数量不能小于或等于0')
if (item.handledToQty == 0) {
this.$refs.comNumberBoxRef[0].setValue(0);
this.showMessage('请先扫描单件码')
return;
}
if (value == 0) {
this.showMessage('发料数量必须大于0')
item.handledToQty = item.handledFromQty
this.$refs.comNumberBox.setValue(item.handledToQty);
}else {
if(value>item.defaultHandleQty){
this.showMessage('发料数量不能大于实际来源数量')
item.handledToQty = item.handledFromQty
this.$refs.comNumberBox.setValue(item.handledToQty);
this.$refs.comNumberBoxRef[0].setValue(item.handledToQty);
} else {
if (value < item.defaultHandleQty) {
this.showMessage('发料数量不能小于实际来源数量' + item.defaultHandleQty)
item.handledToQty = item.defaultHandleQty==0?item.handledFromQty:item.defaultHandleQty
this.$refs.comNumberBoxRef[0].setValue(item.handledToQty);
}else {
item.handledFromQty = value
}
item.handledFromQty =item.handledToQty
this.$forceUpdate()
}
},
@ -529,7 +536,7 @@
</script>
<style scoped lang="scss">
.scan_float_top{
.scan_float_top {
opacity: 0.4;
width: 110rpx;
height: 110rpx;

Loading…
Cancel
Save