Browse Source

修改发料

pda_nev
李俊城 12 months ago
parent
commit
a0c9a5f03a
  1. 294
      fe/PDA/api/index.js
  2. 4
      fe/PDA/components/uni-tag/uni-tag.vue
  3. 12
      fe/PDA/mycomponents/coms/task/comKittingIssue.vue
  4. 122
      fe/PDA/mycomponents/popup/selectClickList.vue
  5. 133
      fe/PDA/pages.js
  6. 141
      fe/PDA/pages.json
  7. 286
      fe/PDA/pages/request/assembleIssueRequest.vue
  8. 195
      fe/PDA/pages/request/assembleIssueRequestList.vue
  9. 222
      fe/PDA/pages/request/assembleIssueRequestListDetail.vue
  10. 286
      fe/PDA/pages/request/coatingIssueRequest.vue
  11. 194
      fe/PDA/pages/request/coatingIssueRequestList.vue
  12. 222
      fe/PDA/pages/request/coatingIssueRequestListDetail.vue
  13. 395
      fe/PDA/pages/request/injectionIssueRequest.vue
  14. 195
      fe/PDA/pages/request/injectionIssueRequestList.vue
  15. 222
      fe/PDA/pages/request/injectionIssueRequestListDetail.vue
  16. 242
      fe/PDA/pages/request/injectionPlanRequest.vue
  17. 6
      fe/PDA/pages/request/kittingIssueRequestListDetail.vue
  18. 648
      fe/PDA/pages/return/productionReturnFg.vue
  19. 648
      fe/PDA/pages/return/productionReturnRaw.vue
  20. 230
      fe/PDA/pages/task/coatingIssuleJobDetail.vue
  21. 206
      fe/PDA/pages/task/injectionIssueJob.vue
  22. 721
      fe/PDA/pages/task/injectionIssueJobDetail.vue
  23. 547
      fe/PDA/pages/task/injectionIssueJobDetailByQty.vue
  24. 169
      fe/PDA/pages/task/injectionPlanJob.vue
  25. 464
      fe/PDA/pages/task/injectionPlanJobDetail.vue

294
fe/PDA/api/index.js

@ -28,8 +28,7 @@ export function getUserInfo() {
})
}
export function getUserInfoAsync() {
return promise(devUrl + "/api/pda/account/workgroups", { //
export function getUserInfoAsync() {return promise(devUrl + "/api/pda/account/workgroups", { //
data: {},
method: "get"
})
@ -1532,149 +1531,321 @@ export const completeInvenTransfer = (params) => request(
data: params,
method: "post"
});
//创建 注塑发料申请
export const injectionIssueRequest = (params) => request(
devUrl + "/api/pda/store/injection-request", { //
data: params,
method: "post"
})
//注塑 发料申请列表
export const getInjectionRequestList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/store/injection-request/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
})
//注塑发料申请
export const injectIssueRequest = (params) => request(
devUrl + "/api/pda/store/injection-request/", { //
//注塑 发料申请 执行
export const injectionRequestHandle = (id) => promise(
devUrl + "/api/pda/store/injection-request/handle/"+id, {
method: 'post',
data: {}
})
//注塑发料申请 获取任务号
export const getInjectionRequestJobByRequest = (requestNumber) => promise(
devUrl + "/api/pda/job/injection-request/by-request-number/"+requestNumber, {
method: 'post',
data: {}
})
//注塑发料 是否有新任务
export const isInjectionHasNewJob = (data) => promise(
devUrl + "/api/pda/store/injection-request/isHasNewJob", {
method: 'post',
data: data
})
//注塑计划 申请
export const injectionIssuePlanRequest = (params) => request(
devUrl + "/api/pda/store/injection-plan-request/", { //
data: params,
method: "post"
})
//注塑发料任务列表
export const getInjectIssueJobList = (params) => request(
devUrl + "/api/pda/job/injection/list", {
//注塑计划任务列表
export const getInjectionPlanJobList = (params) => request(
devUrl + "/api/pda/job/injection-plan/list", {
method: 'get',
data: params
})
//注塑发料任务详情
export const getInjectIssueDetail = (params) => request(
devUrl + "/api/pda/job/injection/" + params.id, { //
export const getInjectionPlanDetail = (params) => request(
devUrl + "/api/pda/job/injection-plan/" + params.id, { //
data: {},
method: "get"
});
//承接注塑发料任务
export const takeInjectIssueJob = (params) => request(
devUrl + "/api/pda/job/injection/take/" + params.id, { //
//承接注塑计划任务
export const takeInjectionPlanJob = (params) => request(
devUrl + "/api/pda/job/injection-plan/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接注塑发料任务
export const cancelTakeInjectIssueJob = (id) => request(
devUrl + "/api/pda/job/injection/cancel-take/" + id, { //
//取消承接注塑计划 任务
export const cancelTakeInjectionPlanJob = (id) => request(
devUrl + "/api/pda/job/injection-plan/cancel-take/" + id, { //
data: {},
method: "post"
});
//提交注塑发料任务
export const finshInjectIssueJob = (id, params) => request(
devUrl + "/api/pda/job/injection/finish/" + id, { //
//提交注塑计划 任务
export const finshInjectionPlanJob = (id, params) => request(
devUrl + "/api/pda/job/injection-plan/finish/" + id, { //
data: params,
method: "post"
})
//注塑发料获取物料配置信息
export const getItemCategoryList = () => request(
devUrl + "/api/pda/store/injection-request/list/item-category", { //
devUrl + "/api/pda/store/injection-plan-request/list/item-category", { //
data: {},
method: "get"
})
//注塑发料 任务列表
export const getInjectionIssueList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/job/injection-issue/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
});
//根据Number 获取注塑发料 任务列表
export const getInjectionIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/injection-issue/by-number/" + jobNumber, {
data: {},
method: "get"
});
// 根据MaterialRequest Number获取注塑发料任务列表
export const getInjectionIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/injection-request/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
//注塑发料任务详情
export const getInjectionIssueDetail = (params) => request(
devUrl + "/api/pda/job/injection-issue/" + params.id, { //
data: {},
method: "get"
});
//承接注塑发料任务
export const takeInjectionIssueJob = (params) => request(
devUrl + "/api/pda/job/injection-issue/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接 注塑发料任务
export const cancelTakeInjectionIssueJob = (id) => request(
devUrl + "/api/pda/job/injection-issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成注塑发料任务
export const finshInjectionIssueJob = (masterId,detailId, params) => request(
devUrl + "/api/pda/job/injection-issue/ExecuteDetail/" + masterId+"?detailId="+detailId, { //
data: params,
method: "post"
})
//喷涂发料任务列表
export const getSprayIssueList = (params) => request(
devUrl + "/api/pda/job/issue/list", {
method: 'get',
data: params
export const getCoatingIssueList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/job/coating-issue/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
});
//根据Number 获取喷涂发料任务列表
export const getSprayIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/issue/by-number/" + jobNumber, {
export const getCoatingIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/coating-issue/by-number/" + jobNumber, {
data: {},
method: "get"
});
// 根据MaterialRequest Number获取喷涂发料任务列表
export const getSprayIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { //
export const getCoatingIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/coating-issue/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
//喷涂发料任务详情
export const getSprayIssueDetail = (params) => request(
devUrl + "/api/pda/job/issue/" + params.id, { //
export const getCoatingIssueDetail = (params) => request(
devUrl + "/api/pda/job/coating-issue/" + params.id, { //
data: {},
method: "get"
});
//承接喷涂发料任务
export const takeSprayIssueJob = (params) => request(
devUrl + "/api/pda/job/issue/take/" + params.id, { //
export const takeCoatingIssueJob = (params) => request(
devUrl + "/api/pda/job/coating-issue/take/" + params.id, { //
data: {},
method: "post"
});
});
//取消承接喷涂发料任务
export const cancelTakeSprayIssueJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
export const cancelTakeCoatingIssueJob = (id) => request(
devUrl + "/api/pda/job/coating-issue/cancel-take/" + id, { //
data: {},
method: "post"
});
});
//完成喷涂发料任务
export const finshSprayIssueJob = (id, params) => request(
devUrl + "/api/pda/job/issue/finish/" + id, { //
export const finshCoatingIssueJob = (masterId,detailId, params) => request(
devUrl + "/api/pda/job/coating-issue/ExecuteDetail/" + masterId+"?detailId="+detailId, { //
data: params,
method: "post"
})
//创建 喷涂叫料申请
export const coatingIssueRequest = (params) => request(
devUrl + "/api/pda/store/coating-request", { //
data: params,
method: "post"
})
//喷涂发料申请列表
export const getCoatingRequestList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/store/coating-request/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
})
//喷涂发料申请 执行
export const coatingRequestHandle = (id) => promise(
devUrl + "/api/pda/store/coating-request/handle/"+id, {
method: 'post',
data: {}
})
//喷涂发料申请 获取任务号
export const getCoatingRequestJobByRequest = (requestNumber) => promise(
devUrl + "/api/pda/job/coating-issue/by-request-number/"+requestNumber, {
method: 'post',
data: {}
})
//喷涂发料 是否有新任务
export const isCoatingHasNewJob = (data) => promise(
devUrl + "/api/pda/store/coating-request/isHasNewJob", {
method: 'post',
data: data
})
//喷涂发料申请 详情
export const getCoatingRequestDetail = (id) => request(
devUrl + "/api/pda/store/coating-request/" + id, { //
data: {},
method: "get"
});
//装配发料任务列表
export const getAssemblingIssueList = (params) => request(
devUrl + "/api/pda/job/issue/list", {
method: 'get',
data: params
export const getAssembleIssueList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/job/assemble-issue/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
});
//根据Number 获取装配发料任务列表
export const getAssemblingIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/issue/by-number/" + jobNumber, {
export const getAssembleIssueJobByNumber = (jobNumber) => request(
devUrl + "/api/pda/job/assemble-issue/by-number/" + jobNumber, {
data: {},
method: "get"
});
// 根据MaterialRequest Number获取装配发料任务列表
export const getAssemblingIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { //
export const getAssembleIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/assemble-issue/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
//装配发料任务详情
export const getAssemblingIssueDetail = (params) => request(
devUrl + "/api/pda/job/issue/" + params.id, { //
export const getAssembleIssueDetail = (params) => request(
devUrl + "/api/pda/job/assemble-issue/" + params.id, { //
data: {},
method: "get"
});
//承接装配发料任务
export const takeAssemblingIssueJob = (params) => request(
devUrl + "/api/pda/job/issue/take/" + params.id, { //
export const takeAssembleIssueJob = (params) => request(
devUrl + "/api/pda/job/assemble-issue/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接装配发料任务
export const cancelTakeAssemblingIssueJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
export const cancelTakeAssembleIssueJob = (id) => request(
devUrl + "/api/pda/job/assemble-issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成装配发料任务
export const finshAssemblingIssueJob = (id, params) => request(
devUrl + "/api/pda/job/issue/finish/" + id, { //
export const finshAssembleIssueJob = (masterId,detailId, params) => request(
devUrl + "/api/pda/job/assemble-issue/ExecuteDetail/" + masterId+"?detailId="+detailId, { //
data: params,
method: "post"
})
//创建 装配叫料申请
export const assembleIssueRequest = (params) => request(
devUrl + "/api/pda/store/assemble-request", { //
data: params,
method: "post"
})
//装配 发料申请列表
export const getAssembleRequestList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/store/assemble-request/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
method: 'post',
data: {}
})
//装配 发料申请 执行
export const assembleRequestHandle = (id) => promise(
devUrl + "/api/pda/store/assemble-request/handle/"+id, {
method: 'post',
data: {}
})
//装配 发料申请 详情
export const getAssembleRequestDetail = (id) => request(
devUrl + "/api/pda/store/assemble-request/" + id, { //
data: {},
method: "get"
});
//装配 发料申请 获取任务号
export const getAssembleRequestJobByRequest = (requestNumber) => promise(
devUrl + "/api/pda/job/assemble-issue/by-request-number/"+requestNumber, {
method: 'post',
data: {}
})
//装配 发料 是否有新任务
export const isAssembleHasNewJob = (data) => promise(
devUrl + "/api/pda/store/assemble-request/isHasNewJob", {
method: 'post',
data: data
})
//kiting发料任务列表
export const getKittingIssueList = (pageIndex,pageSize,isFinished) => request(
devUrl + "/api/pda/job/kitting-issue/list?pageIndex="+pageIndex+"&pageSize="+pageSize+"&isFinished="+isFinished, {
@ -1691,7 +1862,7 @@ export const getKitingIssueJobByNumber = (jobNumber) => request(
// 根据MaterialRequest Number获取kiting发料任务列表
export const getKitingIssueListByRequest = (requestNumber) => request(
devUrl + "/api/pda/job/issue/list/by-request/" + requestNumber, { //
devUrl + "/api/pda/job/kitting-request/list/by-request/" + requestNumber, { //
data: {},
method: "get"
});
@ -1745,7 +1916,7 @@ export const takeKittingIssueJob = (params) => request(
//取消承接kiting发料任务
export const cancelTakeKittingIssueJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
devUrl + "/api/pda/job/kitting-issue/cancel-take/" + id, { //
data: {},
method: "post"
});
@ -1767,5 +1938,12 @@ export const getCountByItemCode = (itemCode) => request(
data: {},
method: "get"
})
//kitting 推荐 isPackingCode=true 按箱,false 按数量
export const getRecommendBalance = (itemCode,productLine,isPackingCode) => request(
devUrl + "/api/pda/inventory/balances/get-recommend-balance?itemCode="+itemCode+"&productLine="+productLine+"&isPackingCode="+isPackingCode,{ //
data: {},
method: "post"
})

4
fe/PDA/components/uni-tag/uni-tag.vue

@ -117,8 +117,8 @@
align-self: flex-start;
/* #endif */
/* padding: 0px 16px; */
padding: 8rpx;
line-height: 50rpx;
padding: 10rpx;
/* line-height: 40rpx; */
color: #333;
border-radius: 3px;
background-color: #f8f8f8;

12
fe/PDA/mycomponents/coms/task/comKittingIssue.vue

@ -10,9 +10,14 @@
<view class="margin_xs_bottom" style="clear: both;">
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image>
<text>{{dataContent.kittingRequestNumber}}</text>
<text>{{dataContent.requestNumber}}</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
</view>
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image>
<text>{{dataContent.worker}}</text>
<!-- <text>客户{{dataContent.customerCode}}</text> -->
</view>
<view class="label_order" v-if="dataContent.enumIssueSendType==1">
<text>类型 : 按数量发料</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
@ -21,10 +26,7 @@
<text>类型 : 按箱发料</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
</view>
<view class="label_order">
<text>操作人 : {{dataContent.worker}}</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
</view>
<!-- <view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_prod_line.svg"></image>
<text>{{dataContent.prodLine}}</text>

122
fe/PDA/mycomponents/popup/selectClickList.vue

@ -0,0 +1,122 @@
<template>
<view class="container">
<uni-popup ref="popup" :maskClick="true">
<view class="" style="align-items: center;background-color: #fff; border-radius: 15rpx; margin: 50rpx;">
<view class="uni-center popup-content"
style="font-weight: bold; font-size: 40rpx;padding-top: 20rpx; padding-bottom: 20rpx;">
{{title}}
</view>
<view class="" style="background-color: black; height: 1rpx; ">
</view>
<scroll-view scroll-y=""
style="background-color: #fff; align-items: center; border-radius: 10rpx; height: 600rpx; width: 100%">
<view class="uni-flex " style="flex-direction: column; " v-for="(item,index) in dataList" :key="index">
<view class="uni-flex " style="font-size: 38rpx; padding: 25rpx; flex-direction: row;" >
<view class="" style="font-size: 32rpx; font-weight: bold;">
({{index+1}}).
</view>
<view class="" style="font-size: 32rpx;">
<view class="" >
<text style="font-size: 32rpx; font-weight: bold;">物料代码 :</text>
{{item.itemCode}}
</view>
<view class="">
<text style="font-size: 32rpx; font-weight: bold;">物料名称 : </text>
{{item.itemName}}
</view>
<view class="">
<text style="font-size: 32rpx; font-weight: bold;">物料描述 : </text>
{{item.itemDesc1}}
</view>
<view class="" v-if="item.packingCode">
<text style="font-size: 32rpx; font-weight: bold;"> 箱码 : </text>
{{item.packingCode}}
</view>
<view class="" v-if="item.lot">
<text style="font-size: 32rpx; font-weight: bold;">批次 : </text>
{{item.lot}}
</view>
<view class="" >
<text style="font-size: 32rpx; font-weight: bold;">库位 : </text>
{{item.locationCode}}
</view>
<view class="">
<text style="font-size: 32rpx; font-weight: bold;">数量 : </text>
{{item.qty}}
</view>
<view class="">
<text style="font-size: 32rpx; font-weight: bold;">单位 : </text>
{{item.uom}}
</view>
</view>
</view>
<u-line></u-line>
</view>
</scroll-view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ""
},
},
data() {
return {
dataList: [],
}
},
methods: {
openScanPopup(list) {
this.dataList = list;
this.$refs.popup.open('center')
},
closeScanPopup() {
this.$refs.popup.close()
},
select(item) {
this.closeScanPopup();
this.$emit("select", item)
}
}
}
</script>
<style>
.popup_box {
justify-content: center;
width: 100%;
margin-right: 50rpx;
padding-right: 50rpx;
height: 500rpx;
margin: 0 auto;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100%; /* 需要确保父容器有足够的高度 */
}
.popup-content {
display: flex;
justify-content: center;
align-items: center;
/* 其他样式 */
}
</style>

133
fe/PDA/pages.js

@ -166,6 +166,20 @@ module.exports = () => ({
"enablePullDownRefresh": false
}
},
{
"path": "pages/return/productionReturnRaw",
"style": {
"navigationBarTitleText": "原料退库",
"enablePullDownRefresh": true
}
},
{
"path": "pages/return/productionReturnFg",
"style": {
"navigationBarTitleText": "半成品退库",
"enablePullDownRefresh": true
}
},
{
"path": "pages/return/productionReturn",
"style": {
@ -749,54 +763,157 @@ module.exports = () => ({
}
},
{
"path": "pages/request/injectionIssueRequest",
"path": "pages/request/injectionPlanRequest",
"style": {
"navigationBarTitleText": "注塑发料申请",
"navigationBarTitleText": "注塑计划申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionPlanJob",
"style": {
"navigationBarTitleText": "注塑计划任务",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionPlanJobDetail",
"style": {
"navigationBarTitleText": "注塑计划任务详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJob",
"style": {
"navigationBarTitleText": "注塑发料任务",
"navigationBarTitleText": "注塑发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJobDetail",
"style": {
"navigationBarTitleText": "注塑发料任务详情",
"navigationBarTitleText": "注塑发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/sprayIssuleJob",
"path": "pages/task/injectionIssueJobDetailByQty",
"style": {
"navigationBarTitleText": "注塑发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequest",
"style": {
"navigationBarTitleText": "注塑叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequestList",
"style": {
"navigationBarTitleText": "注塑叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequestListDetail",
"style": {
"navigationBarTitleText": "注塑叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/coatingIssuleJob",
"style": {
"navigationBarTitleText": "喷涂发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/sprayIssuleJobDetail",
"path": "pages/task/coatingIssuleJobDetailByQty",
"style": {
"navigationBarTitleText": "喷涂发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assemblingIssueJob",
"path": "pages/task/coatingIssuleJobDetail",
"style": {
"navigationBarTitleText": "喷涂发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/coatingIssueRequest",
"style": {
"navigationBarTitleText": "喷涂叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/coatingIssueRequestList",
"style": {
"navigationBarTitleText": "喷涂叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/coatingIssueRequestListDetail",
"style": {
"navigationBarTitleText": "喷涂叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assembleIssueJob",
"style": {
"navigationBarTitleText": "装配发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assemblingIssueJobDetail",
"path": "pages/task/assembleIssueJobDetailByQty",
"style": {
"navigationBarTitleText": "装配发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assembleIssueJobDetail",
"style": {
"navigationBarTitleText": "装配发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/assembleIssueRequest",
"style": {
"navigationBarTitleText": "装配叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/assembleIssueRequestList",
"style": {
"navigationBarTitleText": "装配叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/assembleIssueRequestListDetail",
"style": {
"navigationBarTitleText": "装配叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/kittingIssueJob",
"style": {

141
fe/PDA/pages.json

@ -175,6 +175,20 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/return/productionReturnRaw",
"style": {
"navigationBarTitleText": "原料退库",
"enablePullDownRefresh": true
}
},
{
"path": "pages/return/productionReturnFg",
"style": {
"navigationBarTitleText": "半成品退库",
"enablePullDownRefresh": true
}
},
{
"path": "pages/return/productionReturn",
"style": {
@ -729,54 +743,162 @@
},
{
"path": "pages/request/injectionIssueRequest",
"path": "pages/request/injectionPlanRequest",
"style": {
"navigationBarTitleText": "注塑发料申请",
"navigationBarTitleText": "注塑计划申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionPlanJob",
"style": {
"navigationBarTitleText": "注塑计划任务",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionPlanJobDetail",
"style": {
"navigationBarTitleText": "注塑计划任务详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJob",
"style": {
"navigationBarTitleText": "注塑发料任务",
"navigationBarTitleText": "注塑发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJobDetail",
"style": {
"navigationBarTitleText": "注塑发料任务详情",
"navigationBarTitleText": "注塑发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/sprayIssuleJob",
"path": "pages/task/injectionIssueJobDetailByQty",
"style": {
"navigationBarTitleText": "注塑发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequest",
"style": {
"navigationBarTitleText": "注塑叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequestList",
"style": {
"navigationBarTitleText": "注塑叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequestListDetail",
"style": {
"navigationBarTitleText": "注塑叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/coatingIssuleJob",
"style": {
"navigationBarTitleText": "喷涂发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/sprayIssuleJobDetail",
"path": "pages/task/coatingIssuleJobDetailByQty",
"style": {
"navigationBarTitleText": "喷涂发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assemblingIssueJob",
"path": "pages/task/coatingIssuleJobDetail",
"style": {
"navigationBarTitleText": "喷涂发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/coatingIssueRequest",
"style": {
"navigationBarTitleText": "喷涂叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/coatingIssueRequestList",
"style": {
"navigationBarTitleText": "喷涂叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/coatingIssueRequestListDetail",
"style": {
"navigationBarTitleText": "喷涂叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assembleIssueJob",
"style": {
"navigationBarTitleText": "装配发料",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assemblingIssueJobDetail",
"path": "pages/task/assembleIssueJobDetail",
"style": {
"navigationBarTitleText": "装配发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/assembleIssueJobDetailByQty",
"style": {
"navigationBarTitleText": "装配发料详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/assembleIssueRequest",
"style": {
"navigationBarTitleText": "装配叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/assembleIssueRequestList",
"style": {
"navigationBarTitleText": "装配叫料申请列表",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/assembleIssueRequestListDetail",
"style": {
"navigationBarTitleText": "装配叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/kittingIssueJob",
"style": {
@ -825,6 +947,9 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",

286
fe/PDA/pages/request/assembleIssueRequest.vue

@ -0,0 +1,286 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<view class="top_wrap" v-if="itemList.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">位置码 : {{dataContent.code}}</text>
</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 itemList" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.partCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.partName }}</view>
<view class="font_xs text_lightblue">{{ item.partDesc }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.locationCode }}({{item.locationName}})
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="240" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">单位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.basicUom }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">标包数</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 class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</scroll-view>
<div class="new_bot_box" v-show="itemList.length>0">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
assembleIssueRequest
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption,
getISODateTime
} from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPosition from '@/mycomponents/wincom/winScanByPosition.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
export default {
name: 'purchasePutaway',
components: {
winBlankView,
comMessage,
winScanButton,
winScanByPosition,
comNumberBox
},
data() {
return {
itemList: [],
dataContent: {}
};
},
props: {
// locationTypes: {
// type: [Array, String, Number],
// value: ''
// },
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
mounted: function() {
this.options = getRemoveOption();
this.openScanPopup();
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup()
},
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
this.itemList.push(result)
this.$forceUpdate()
},
clear() {
this.itemList = [];
this.dataContent = {}
},
submit() {
let that = this;
if (that.itemList.length === 0) {
that.showMessage('请扫描位置码');
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log(JSON.stringify(params))
assembleIssueRequest(params).then(res => {
uni.hideLoading();
this.showMessage("提交成功")
this.clear();
}).catch(error => {
uni.hideLoading();
this.showMessage(error.message);
})
},
setParams() {
var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "",
extraProperties: {},
activeDate: getISODateTime(),
autoSubmit: true,
autoAgree: false,
autoHandle: false,
autoCompleteJob: false,
directCreateNote: true,
issueRequestType: 4,
useOnTheWayLocation: false,
details: []
}
this.itemList.forEach(res => {
var data = {
remark: "",
qty:res.qty,
itemCode: res.partCode,
itemName: res.partName,
itemDesc1: res.itemDesc2,
uom: res.basicUom,
stdPackQty: res.stdPackQty,
toLocationCode: res.locationCode,
prodLine: null,
requestStatus: 1,
issuedQty: res.qty,
receivedQty: 0,
status: 1,
positionCode: this.dataContent.code,
recommendType: 0,
boxQty: res.qty
}
param.details.push(data)
})
return param;
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showConfirmMessage(message) {
this.$refs.comMessage.showConfirmMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
closeScanMessage() {
this.scanPopupGetFocus();
},
closeCommitMessage() {
// this.openScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus(message) {
this.$refs.scanPopup.losefocus();
},
}
};
</script>
<style scoped lang="scss">
</style>

195
fe/PDA/pages/request/assembleIssueRequestList.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 {
getAssembleRequestList,
assembleRequestHandle,
getAssembleRequestJobByRequest,
isAssembleHasNewJob
} 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 getAssembleRequestJobByRequest(item.number)
var handleResult = await assembleRequestHandle(item.id)
var isHaveNewJobList=[];
jobList.forEach(res=>{
isHaveNewJobList.push(res.kittingRequestNumber);
})
var isHaveNewJob = await isAssembleHasNewJob(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 = [];
}
getAssembleRequestList(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: './assembleIssueRequestListDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

222
fe/PDA/pages/request/assembleIssueRequestListDetail.vue

@ -0,0 +1,222 @@
<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 {
getAssembleRequestDetail,
assembleRequestHandle,
getAssembleRequestJobByRequest,
isAssembleHasNewJob
} 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;
uni.showLoading({
title:"加载中",
mask:false
})
getAssembleRequestDetail(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();
}
},
submit() {
showConfirmMsg("是否确认执行?", callback => {
if (callback) {
this.finsh();
}
})
},
async finsh() {
uni.showLoading({
title:"提交中",
mask:true
})
try{
var jobList = await getAssembleRequestJobByRequest(this.datacontent.number)
var handleResult = await assembleRequestHandle(this.datacontent.id)
var isHaveNewJobList=[];
jobList.forEach(res=>{
isHaveNewJobList.push(res.assembleRequestNumber);
})
var isHaveNewJob = await isAssembleHasNewJob(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>

286
fe/PDA/pages/request/coatingIssueRequest.vue

@ -0,0 +1,286 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<view class="top_wrap" v-if="itemList.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">位置码 : {{dataContent.code}}</text>
</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 itemList" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.partCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.partName }}</view>
<view class="font_xs text_lightblue">{{ item.partDesc }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.locationCode }}({{item.locationName}})
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="240" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">单位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.basicUom }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">标包数</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 class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</scroll-view>
<div class="new_bot_box" v-show="itemList.length>0">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
coatingIssueRequest
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption,
getISODateTime
} from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPosition from '@/mycomponents/wincom/winScanByPosition.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
export default {
name: 'purchasePutaway',
components: {
winBlankView,
comMessage,
winScanButton,
winScanByPosition,
comNumberBox
},
data() {
return {
itemList: [],
dataContent: {}
};
},
props: {
// locationTypes: {
// type: [Array, String, Number],
// value: ''
// },
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
mounted: function() {
this.options = getRemoveOption();
this.openScanPopup();
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup()
},
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
this.itemList.push(result)
this.$forceUpdate()
},
clear() {
this.itemList = [];
this.dataContent = {}
},
submit() {
let that = this;
if (that.itemList.length === 0) {
that.showMessage('请扫描位置码');
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log(JSON.stringify(params))
coatingIssueRequest(params).then(res => {
uni.hideLoading();
this.showMessage("提交成功")
this.clear();
}).catch(error => {
uni.hideLoading();
this.showMessage(error.message);
})
},
setParams() {
var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "",
extraProperties: {},
activeDate: getISODateTime(),
autoSubmit: true,
autoAgree: false,
autoHandle: false,
autoCompleteJob: false,
directCreateNote: true,
issueRequestType: 4,
useOnTheWayLocation: false,
details: []
}
this.itemList.forEach(res => {
var data = {
remark: "",
qty:res.qty,
itemCode: res.partCode,
itemName: res.partName,
itemDesc1: res.itemDesc2,
uom: res.basicUom,
stdPackQty: res.stdPackQty,
toLocationCode: res.locationCode,
prodLine: null,
requestStatus: 1,
issuedQty: res.qty,
receivedQty: 0,
status: 1,
positionCode: this.dataContent.code,
recommendType: 0,
boxQty: res.qty
}
param.details.push(data)
})
return param;
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showConfirmMessage(message) {
this.$refs.comMessage.showConfirmMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
closeScanMessage() {
this.scanPopupGetFocus();
},
closeCommitMessage() {
// this.openScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus(message) {
this.$refs.scanPopup.losefocus();
},
}
};
</script>
<style scoped lang="scss">
</style>

194
fe/PDA/pages/request/coatingIssueRequestList.vue

@ -0,0 +1,194 @@
<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 {
getCoatingRequestList,
coatingRequestHandle,
getCoatingRequestJobByRequest,
isCoatingHasNewJob
} 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 getCoatingRequestJobByRequest(item.number)
var handleResult = await coatingRequestHandle(item.id)
var isHaveNewJobList=[];
jobList.forEach(res=>{
isHaveNewJobList.push(res.CoatingRequestNumber);
})
var isHaveNewJob = await isCoatingHasNewJob(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 = [];
}
getCoatingRequestList(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: './coatingIssueRequestListDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

222
fe/PDA/pages/request/coatingIssueRequestListDetail.vue

@ -0,0 +1,222 @@
<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 {
getCoatingRequestDetail,
coatingRequestHandle,
getCoatingRequestJobByRequest,
isCoatingHasNewJob
} 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() {
uni.showLoading({
title:"加载中",
mask:false
})
let that = this;
getCoatingRequestDetail(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();
}
},
submit() {
showConfirmMsg("是否确认执行?", callback => {
if (callback) {
this.finsh();
}
})
},
async finsh() {
uni.showLoading({
title:"提交中",
mask:true
})
try{
var jobList = await getCoatingRequestJobByRequest(this.datacontent.number)
var handleResult = await coatingRequestHandle(this.datacontent.id)
var isHaveNewJobList=[];
jobList.forEach(res=>{
isHaveNewJobList.push(res.coatingRequestNumber);
})
var isHaveNewJob = await isCoatingHasNewJob(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>

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

@ -1,112 +1,143 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<view class="top_wrap" v-if="itemList.length>0">
<view class="top_card">
<view class="page-wraper">
<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.code}}</text>
</view>
<view class="page-header">
<view class="" style="margin: 10rpx;">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
activeColor="#007AFF"></uni-segmented-control>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="uni-flex uni-row" style="flex-wrap: wrap; margin: 10rpx;">
<view class="uni-flex" style=" width: 50%; justify-content: center; margin-top: 40rpx; "
v-for="(item, index) in showList" :key="index">
<uni-tag :inverted="!item.checked" :circle="false" :text="item.code+'\n'+item.desc1" type="primary"
@click="setContainerModel(item)" />
</view>
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
</view>
</scroll-view>
</view>
<view class="detail-list margin_top" v-for="(item, index) in itemList" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.partCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.partName }}</view>
<view class="font_xs text_lightblue">{{ item.partDesc }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.locationCode }}({{item.locationName}})
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="240" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">单位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.basicUom }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">标包数</uni-th>
<uni-th width="240" align="center">
<view class="text_black">{{item.stdPackQty }}</view>
</uni-th>
</uni-tr>
</uni-table>
<view class="page-footer">
<div class="new_bot_box">
<win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation'
@getLocationCode='getDefaultToLocation' @clear='clearDefaultLocation'>
</win-collapse-location>
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_save_btn " style="width: 100%;" @click="submit()">提交</button>
</view>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</div>
</view>
</view>
</scroll-view>
<div class="new_bot_box" v-show="itemList.length>0">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<com-message ref="comMessage"></com-message>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
injectIssueRequest,
getItemCategoryList,
locations
injectionIssueRequest
} from '@/api/index.js';
import {
goHome,
dateFormat,
getContainerTypeName,
showConfirmMsg,
goHome,
getRemoveOption,
getISODateTime
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPosition from '@/mycomponents/wincom/winScanByPosition.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
export default {
name: 'purchasePutaway',
components: {
winEmptyView,
comJobTopInfo,
winBlankView,
comMessage,
winCollapseLocation
winScanButton,
winScanByPosition,
comNumberBox
},
data() {
return {
items: ['保险杠', '轮眉', '车门装饰板'],
current: 0,
pageSize: this.modelConfig,
pageIndex: 1,
loadingType: "nomore",
dataList: [],
showList: [],
toLocationInfo: null
itemList: [],
dataContent: {}
};
},
filters: {
formatDate: function(val) {
return dateFormat(val)
},
props: {
// locationTypes: {
// type: [Array, String, Number],
// value: ''
// },
},
onShow() {},
onLoad() {
getItemCategoryList().then(res => {
this.dataList = res;
this.dataList.forEach(res => {
res.checked = true;
})
this.onClickItem({
currentIndex: 0
})
}).catch(error => {
})
},
onReachBottom() {},
onPullDownRefresh() {},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
goHome();
return true;
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
@ -114,124 +145,142 @@
window.location.reload();
}
},
mounted: function() {
this.options = getRemoveOption();
this.openScanPopup();
},
methods: {
clearDefaultLocation() {
this.toLocationInfo = null
openScanPopup() {
this.$refs.scanPopup.openScanPopup()
},
//
getDefaultToLocation(locationCode) {
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
this.itemList.push(result)
this.$forceUpdate()
},
clear() {
this.itemList = [];
this.dataContent = {}
},
submit() {
let that = this;
if (that.itemList.length === 0) {
that.showMessage('请扫描位置码');
return;
}
uni.showLoading({
title: "扫描中",
title: "提交中....",
mask: true
});
locations(locationCode).then(res => {
var params = this.setParams();
console.log(JSON.stringify(params))
injectionIssueRequest(params).then(res => {
uni.hideLoading();
if (res) {
this.toLocationInfo = res
} else {
this.showMessage('目标库位【' + locationCode + '】不存在');
}
}).catch(err => {
this.showMessage("提交成功")
this.clear();
}).catch(error => {
uni.hideLoading();
this.toLocationInfo = null
this.showMessage(err.message);
})
},
setContainerModel(item) {
this.showList.forEach(res => {
res.checked = false
this.showMessage(error.message);
})
item.checked = true;
this.$forceUpdate()
},
onClickItem(item) {
if (item.currentIndex == 0) {
this.showList = this.dataList.filter(res => res.category == "保险杠")
} else if (item.currentIndex == 1) {
this.showList = this.dataList.filter(res => res.category == "轮眉")
} else if (item.currentIndex == 2) {
this.showList = this.dataList.filter(res => res.category == "车门装饰板")
setParams() {
var param = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
remark: "",
extraProperties: {},
activeDate: getISODateTime(),
autoSubmit: true,
autoAgree: false,
autoHandle: false,
autoCompleteJob: false,
directCreateNote: true,
issueRequestType: 4,
useOnTheWayLocation: false,
details: []
}
this.showList.forEach(res => {
res.checked = false;
this.itemList.forEach(res => {
var data = {
remark: "",
qty:res.qty,
itemCode: res.partCode,
itemName: res.partName,
itemDesc1: res.itemDesc2,
uom: res.basicUom,
stdPackQty: res.stdPackQty,
toLocationCode: res.locationCode,
prodLine: null,
requestStatus: 1,
issuedQty: res.qty,
receivedQty: 0,
status: 1,
positionCode: this.dataContent.code,
recommendType: 0,
boxQty: res.qty
}
param.details.push(data)
})
return param;
},
//
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showCommitSuccessMessage() {
showConfirmMessage(message) {
this.$refs.comMessage.showConfirmMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
clearData() {
this.onClickItem({
currentIndex: 0
})
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
submit(item) {
var checked = this.showList.filter(r=>r.checked)
if (checked.length==0) {
this.showMessage("请选择零件")
return;
}
if (this.toLocationInfo == null) {
this.showMessage("请先扫描目标库位")
return;
}
uni.showLoading({
title: "提交中...",
mask: true
});
var params = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
activeDate: getISODateTime(),
useOnTheWayLocation: false,
type: "Qty",
details: [
closeScanMessage() {
this.scanPopupGetFocus();
},
]
}
var item = {
remark: "",
itemCode: checked[0].code,
itemName: checked[0].name,
itemDesc1: checked[0].desc1,
itemDesc2: checked[0].desc2,
uom: checked[0].basicUom,
qty: 1,
stdPackQty: checked[0].stdPackQty,
toLocationCode: this.toLocationInfo.code,
toLocationArea: this.toLocationInfo.areaCode,
toLocationGroup: this.toLocationInfo.locationGroupCode,
toLocationErpCode: this.toLocationInfo.erpLocationCode,
toWarehouseCode: localStorage.warehouseCode,
positionCode: "",
recommendType: "SEMI",
boxQty: 1
}
params.details.push(item)
console.log("测试", JSON.stringify(params));
injectIssueRequest( params)
.then(res => {
uni.hideLoading();
if (res) {
this.showCommitSuccessMessage();
this.clearData();
}else {
this.showMessage("提交失败");
}
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
closeCommitMessage() {
// this.openScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus(message) {
this.$refs.scanPopup.losefocus();
},
}
};
</script>
</script>
<style scoped lang="scss">
</style>

195
fe/PDA/pages/request/injectionIssueRequestList.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 {
getInjectionRequestList,
injectionRequestHandle,
getInjectionRequestJobByRequest,
isInjectionHasNewJob
} 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 getInjectionRequestJobByRequest(item.number)
var handleResult = await injectionRequestHandle(item.id)
var isHaveNewJobList=[];
jobList.forEach(res=>{
isHaveNewJobList.push(res.injectionRequestNumber);
})
var isHaveNewJob = await isInjectionHasNewJob(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 = [];
}
getInjectionRequestList(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>

222
fe/PDA/pages/request/injectionIssueRequestListDetail.vue

@ -0,0 +1,222 @@
<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 {
getInjectionRequestList,
injectionRequestHandle,
getInjectionRequestJobByRequest,
isInjectionHasNewJob
} 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() {
uni.showLoading({
title:"加载中",
mask:false
})
let that = this;
getInjectionRequestList(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();
}
},
submit() {
showConfirmMsg("是否确认执行?", callback => {
if (callback) {
this.finsh();
}
})
},
async finsh() {
uni.showLoading({
title:"提交中",
mask:true
})
try{
var jobList = await getInjectionRequestJobByRequest(this.datacontent.number)
var handleResult = await injectionRequestHandle(this.datacontent.id)
var isHaveNewJobList=[];
jobList.forEach(res=>{
isHaveNewJobList.push(res.injectionRequestNumber);
})
var isHaveNewJob = await isInjectionHasNewJob(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>

242
fe/PDA/pages/request/injectionPlanRequest.vue

@ -0,0 +1,242 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="" style="margin: 10rpx;">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
activeColor="#007AFF"></uni-segmented-control>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="uni-flex uni-row" style="flex-wrap: wrap; margin: 10rpx;">
<view class="uni-flex" style=" width: 50%; justify-content: center; margin-top: 40rpx; "
v-for="(item, index) in showList" :key="index">
<uni-tag style="width: 100%; margin-left: 20rpx;" :inverted="!item.checked" :circle="false" :text="item.code+'\n'+item.desc1" type="primary"
@click="setContainerModel(item)" />
</view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<div class="new_bot_box">
<win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation'
@getLocationCode='getDefaultToLocation' @clear='clearDefaultLocation'>
</win-collapse-location>
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_save_btn " style="width: 100%;" @click="submit()">提交</button>
</view>
</div>
</view>
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
injectionIssuePlanRequest,
getItemCategoryList,
locations
} from '@/api/index.js';
import {
goHome,
dateFormat,
getContainerTypeName,
showConfirmMsg,
getISODateTime
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
export default {
components: {
winEmptyView,
comJobTopInfo,
comMessage,
winCollapseLocation
},
data() {
return {
items: ['保险杠', '轮眉', '车门装饰板'],
current: 0,
pageSize: this.modelConfig,
pageIndex: 1,
loadingType: "nomore",
dataList: [],
showList: [],
toLocationInfo: null
};
},
filters: {
formatDate: function(val) {
return dateFormat(val)
},
},
onShow() {},
onLoad() {
uni.showLoading({
title:"加载中",
mask:true
})
getItemCategoryList().then(res => {
uni.hideLoading()
this.dataList = res;
this.dataList.forEach(res => {
res.checked = true;
})
this.onClickItem({
currentIndex: 0
})
}).catch(error => {
uni.hideLoading()
this.showMessage("获取分类信息失败"+error)
})
},
onReachBottom() {},
onPullDownRefresh() {},
//退
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: {
clearDefaultLocation() {
this.toLocationInfo = null
},
//
getDefaultToLocation(locationCode) {
uni.showLoading({
title: "扫描中",
mask: true
});
locations(locationCode).then(res => {
uni.hideLoading();
if (res) {
this.toLocationInfo = res
} else {
this.showMessage('目标库位【' + locationCode + '】不存在');
}
}).catch(err => {
uni.hideLoading();
this.toLocationInfo = null
this.showMessage(err.message);
})
},
setContainerModel(item) {
this.showList.forEach(res => {
res.checked = false
})
item.checked = true;
this.$forceUpdate()
},
onClickItem(item) {
if (item.currentIndex == 0) {
this.showList = this.dataList.filter(res => res.category == "保险杠")
} else if (item.currentIndex == 1) {
this.showList = this.dataList.filter(res => res.category == "轮眉")
} else if (item.currentIndex == 2) {
this.showList = this.dataList.filter(res => res.category == "车门装饰板")
}
this.showList.forEach(res => {
res.checked = false;
})
},
//
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
clearData() {
this.onClickItem({
currentIndex: 0
})
},
submit(item) {
var checked = this.showList.filter(r=>r.checked)
if (checked.length==0) {
this.showMessage("请选择零件")
return;
}
if (this.toLocationInfo == null) {
this.showMessage("请先扫描目标库位")
return;
}
uni.showLoading({
title: "提交中...",
mask: true
});
var params = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
activeDate: getISODateTime(),
useOnTheWayLocation: false,
type: "Qty",
details: [
]
}
var item = {
remark: "",
itemCode: checked[0].code,
itemName: checked[0].name,
itemDesc1: checked[0].desc1,
itemDesc2: checked[0].desc2,
uom: checked[0].basicUom,
qty: 1,
stdPackQty: checked[0].stdPackQty,
toLocationCode: this.toLocationInfo.code,
toLocationArea: this.toLocationInfo.areaCode,
toLocationGroup: this.toLocationInfo.locationGroupCode,
toLocationErpCode: this.toLocationInfo.erpLocationCode,
toWarehouseCode: localStorage.warehouseCode,
positionCode: "",
recommendType: "SEMI",
boxQty: 1
}
params.details.push(item)
console.log("测试", JSON.stringify(params));
injectionIssuePlanRequest( params)
.then(res => {
uni.hideLoading();
if (res) {
this.showCommitSuccessMessage();
this.clearData();
}else {
this.showMessage("提交失败");
}
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
},
}
};
</script>

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

@ -138,15 +138,21 @@
//
getDetail() {
uni.showLoading({
title:"加载中",
mask:false
})
let that = this;
getKittingRequestDetail(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('未查找到详细信息')
});
},

648
fe/PDA/pages/return/productionReturnFg.vue

@ -0,0 +1,648 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="fromLocation==null"></win-blank-view>
<scroll-view scroll-y="true" class="scroll-detail" style="margin-top: 20rpx;padding-bottom:100px">
<view class="top_wrap" v-if="fromLocation!=null">
<view class="top_card">
<view class="uni-flex space-between top_lines_info">
<view class="font_sm">
来源库位:
<text class="text_bold">{{fromLocation.code}}</text>
</view>
</view>
</view>
</view>
<uni-collapse v-if="fromLocation!=null">
<view class="pop_list list_info semi_col" v-for="(label, index) in itemList" :key="label.id">
<semi-collapse-item :open="true" :title="label.itemCode" :item="label" :scanCount="label.scanQty"
style="font-size: 20px; ">
<view v-for="(item, index) in label.labelList" :key="item.id">
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" :auto-close="false"
@click="swipeClick($event,label,index)" style='background-color: #ffffff;'>
<view class="common_card" style='margin-left: 10px;'>
<view class="ljh_box">
<view class="ljh_info">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="label_xm font_xs fr">{{ item.packingCode }}</view>
</view>
<view class="uni-flex space-between desc_card">
<view class="ljh_left">
<view class="text_lightblue font_xs">{{item.itemName }}</view>
</view>
<view class="ljh_right">
<text class="tnum">{{item.qty}}</text>
<text class="tunit">{{item.uom}}</text>
</view>
</view>
</view>
<view class="cell_box">
<view class="uni-flex uni-row fl">
<view class="cell_info">
<view class="text_lightblue">源库位</view>
<view class="text_black font_sm">{{ item.locationCode }}
</view>
</view>
<view class="cell_info">
<view class="text_lightblue">目标库位</view>
<view class="text_black font_sm">{{item.toLocationCode }}</view>
</view>
</view>
<view class="scan_btn_fr fr" @click="scanToLocation(item)">
<text>扫描目标库位</text>
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</semi-collapse-item>
</view>
</uni-collapse>
</scroll-view>
<div class="new_bot_box" v-show="fromLocation!=null">
<win-collapse-location scanTitle='扫描默认目标库位' ref='comCollapseLocation'
@getLocationCode='getDefaultToLocation' @clear='clearDefaultLocation'>
</win-collapse-location>
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="cancel()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<win-scan-button @goScan='openScanPopup' v-if="fromLocation!=null"></win-scan-button>
<win-scan-by-code ref="scanFromLocationPopup" title="来源库位" @getScanCode='scanFromLocation'></win-scan-by-code>
<win-scan-by-code ref="scanToLocationPopup" title="目标库位" @getScanCode='getToLocation'></win-scan-by-code>
<win-scan-by-pack ref="scanPackPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
locations,
getBalancesByFilterAsync,
getWipListAsync,
returnToWarehouse,
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption
} from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import comBaseItem from '@/mycomponents/comItem/comBaseItem.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
import comScanSemiPutaway from '@/mycomponents/scan/comScanSemiPutaway.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import SemiCollapseItem from '@/mycomponents/common/SemiCollapseItem.vue'
export default {
name: 'returnToWarehouse',
components: {
winBlankView,
comBaseItem,
comMessage,
winScanButton,
winScanByPack,
winScanByCode,
comScanSemiPutaway,
comBalance,
winCollapseLocation,
SemiCollapseItem
},
data() {
return {
options: [],
itemList: [],
fromLocation: null,
toLocation: null,
defaultToLocation: null,
currentItem: {}
};
},
props: {
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
window.location.reload();
}
},
mounted: function() {
this.options = getRemoveOption();
this.openScanPopup();
},
methods: {
//
scanFromLocation(code) {
let that = this;
if (code == '') return;
uni.showLoading({
title: '扫描中...',
mask: true
});
locations(code).then(res => {
if (res != null) {
if (res.type == 3||res.type == 4||res.type == 5) {
that.fromLocation = res;
this.openPackLabel();
this.closeScanFromLocationPopup();
} else {
that.showMessage('扫描的库位【' + code + '】不是【半成品库】或【线边库位】或【成品库位】');
}
} else {
that.showMessage('未查询到库位【' + code + '】');
}
uni.hideLoading();
}).catch(err => {
uni.hideLoading();
that.showMessage(err.message);
});
},
scanConfirm(fromLocation, itemList) {
this.fromLocation = fromLocation;
this.itemList = itemList;
},
swipeClick(e, label, index) {
let {
content
} = e;
if (content.text === '移除') {
uni.showModal({
title: '提示',
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
let item = label.labelList[index];
label.scanQty = label.scanQty - item.qty;
this.removeLabel(label, index)
//label.labelList.splice(index, 1);
}
}
});
}
},
removeLabel(label, index) {
label.labelList.splice(index, 1);
if (label.labelList.length == 0) {
for (var i = 0; i < this.itemList.length; i++) {
let item = this.itemList[i];
if (item.itemCode == label.itemCode) {
this.itemList.splice(i, 1)
return;
}
}
}
},
getScanResult(result) {
let that = this;
that.currentLabel = result.data;
let code = result.data.code;
if (code) {
let datas = [];
//
this.itemList.filter(r => {
if (r.toPackingCode == code) {
datas.push(r);
return;
}
})
if (datas.length > 0) {
this.showRescanMessage('箱码【' + code + '】已经存在,是否要重新扫描?');
// showConfirmMsg('' + code + ',?', confirm => {
// if (confirm) {
// that.itemList.forEach((r, i) => {
// if (r.toPackingCode == code) {
// that.itemList.splice(i, 1);
// return;
// }
// });
// that.getLabel();
// }
// });
} else {
that.getLabel();
}
} else {
this.showMessage('请先扫描箱标签');
return;
}
},
//
afterRescan(val) {
let that = this;
if (confirm) {
that.itemList.forEach((r, i) => {
if (r.toPackingCode == that.currentLabel.packingCode) {
that.itemList.splice(i, 1);
return;
}
});
that.getLabel();
} else {
this.scanPopupGetFocus();
}
},
async getLabel() {
let that = this;
uni.showLoading({
title: '扫描中...',
mask: true
})
let balanceParams = {
pageSize: 100,
pageIndex: 1,
packingCode: that.currentLabel.packingCode,
};
let balanceRes = await getBalancesByFilterAsync(balanceParams);
if (balanceRes.totalCount > 0) {
let locationCode = balanceRes.items[0].locationCode;
this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【' + locationCode +
'】库位已经有库存信息,请重新扫描箱码');
} else {
let itemInfo = that.itemList.find(r => {
return r.itemCode == that.currentLabel.itemCode
})
if (itemInfo == undefined) {
let params = {
locationCode: that.fromLocation.code,
itemCode: that.currentLabel.itemCode
};
let wipRes = await getWipListAsync(params);
if (wipRes.totalCount == 0) {
this.showScanMessage('零件【' + that.currentLabel.itemCode + '】在【' + this.fromLocation.code +
'】库位没有库存信息,不可以退库');
} else {
let balanceItem = wipRes.items[0];
let item = {
itemCode: that.currentLabel.itemCode,
totalQty: balanceItem.qty,
uom: balanceItem.uom,
scanQty: 0,
status: balanceItem.status,
balanceItem: balanceItem,
labelList: []
};
this.addLabel(item);
}
} else {
this.addLabel(itemInfo);
}
}
uni.hideLoading();
},
addLabel(item) {
//
if (item.labelList.length == 0) {
if (this.currentLabel.qty > item.totalQty) {
this.showScanMessage('标签数量【' + this.currentLabel.qty +
'】大于零件的库存数量【' + item.totalQty + '】,不可以退库')
} else {
let data = this.itemList.find(r => r.itemCode == item.itemCode)
if (data == undefined) {
this.itemList.push(item)
}
this.calcScanQty(item, 0)
item.labelList.unshift(this.currentLabel);
this.scanPopupGetFocus();
}
} else {
let scanQty = 0;
item.labelList.forEach(r => {
scanQty += Number(r.qty)
})
if (scanQty + this.currentLabel.qty > item.totalQty) {
this.showScanMessage('已扫描数量【' + scanQty + '】加标签数量【' + this.currentLabel.qty +
'】大于零件的库存数量【' + item.totalQty + '】,不可以退库')
} else {
this.calcScanQty(item, scanQty)
item.labelList.unshift(this.currentLabel);
this.scanPopupGetFocus();
}
}
},
calcScanQty(item, scanQty) {
item.scanQty = scanQty + this.currentLabel.qty;
//
this.currentLabel.locationCode = this.fromLocation.code;
this.currentLabel.status = 2;
},
scanToLocation(item) {
this.currentItem = item;
this.openScanToLocationPopup();
},
//
getDefaultToLocation(locationCode) {
let that = this;
uni.showLoading({
title: "扫描中",
mask: true
});
locations(locationCode).then(res => {
if (res == null) {
that.showMessage('目标库位【' + locationCode + '】不存在');
} else {
if (res.type == 2 || res.type == 3||res.type == 4 ||res.type == 6) {
showConfirmMsg('是否要将所有未扫描目标库位的零件,指定目标库位【' + locationCode + '】',
confirm => {
if (confirm) {
that.defaultToLocation = res;
that.itemList.forEach(r => {
r.labelList.forEach(l => {
if (l.toLocationCode == '' || l
.toLocationCode == undefined) {
that.handledToLocation(l, res);
}
});
})
}
});
} else {
that.showMessage('目标库位的库位类型必须是【原料库】或【半成品库】或【成品库】或【隔离库】')
}
}
uni.hideLoading();
}).catch(err => {
that.toLocation = null;
that.showMessage(err.message);
uni.hideLoading();
})
},
getToLocation(code) {
if (code == '') {
this.showMessage('目标库位不能为空');
return;
}
if (code == this.currentItem.fromLocationCode) {
this.showMessage('源库位【' + this.currentItem.fromLocationCode + '】与目标库位【' + code + '】不能相同');
return;
}
uni.showLoading({
title: "扫描中",
mask: true
});
let that = this;
locations(code).then(res => {
if (res == null) {
that.showMessage('目标库位【' + code + '】不存在');
} else {
if (res.type == 2 || res.type == 3||res.type == 4||res.type == 6) {
this.handledToLocation(this.currentItem, res);
} else {
this.showMessage('目标库位的库位类型必须是【原料库】或【半成品库】或【成品库】或【隔离库】')
}
}
uni.hideLoading();
}).catch(err => {
that.toLocation = null;
that.showMessage(err.message);
uni.hideLoading();
})
},
handledToLocation(item, location) {
item.toLocationCode = location.code;
item.toLocationGroup = location.locationGroupCode;
item.toLocationArea = location.areaCode;
item.toLocationErpCode = location.erpLocationCode;
this.$forceUpdate();
this.closeScanToLocationPopup();
},
clearDefaultLocation() {
let that = this;
that.defaultToLocation = null;
},
submit() {
let that = this;
if (that.itemList.length === 0) {
that.showMessage('请扫描要退库的零件');
return;
}
let noToLocations = [];
that.itemList.forEach(r => {
r.labelList.filter(l => {
if (l.toLocationCode == '' || l.toLocationCode == undefined) {
noToLocations.push(l.itemCode)
}
})
})
if (noToLocations.length > 0) {
that.showMessage('还有未扫描目标库位的零件,请先扫描目标库位');
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
let item = this.getSubmitParam();
let params = JSON.stringify(item);
returnToWarehouse(params)
.then(res => {
that.showCommitSuccess();
that.clearInfo();
uni.hideLoading();
})
.catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
getSubmitParam() {
let that = this;
let item = {
number: "",
worker: localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
putawayType: 2,
details: []
}
that.itemList.forEach(i => {
let balanceItem = i.balanceItem;
i.labelList.forEach(l => {
let detail = {};
detail.itemCode = balanceItem.itemCode;
detail.itemName = balanceItem.itemName;
detail.itemDesc1 = balanceItem.itemDesc1;
detail.itemDesc2 = balanceItem.itemDesc2;
detail.uom = l.uom;
detail.qty = l.qty;
detail.stdPackQty = balanceItem.stdPackQty;
detail.fromPackingCode = balanceItem.packingCode;
detail.toPackingCode = l.packingCode;
detail.fromLot = balanceItem.lot;
detail.toLot = l.lot;
detail.fromLocationCode = that.fromLocation.code;
detail.fromLocationErpCode = that.fromLocation.erpLocationCode;
detail.fromLocationGroup = that.fromLocation.locationGroupCode;
detail.fromLocationArea = that.fromLocation.areaCode;
detail.toLocationCode = l.toLocationCode ?? that.defaultToLocation.code;
detail.toLocationGroup = l.toLocationGroup ?? that.defaultToLocation
.locationGroupCode;
detail.toLocationArea = l.toLocationArea ?? that.defaultToLocation.areaCode;
detail.toLocationErpCode = l.toLocationErpCode ?? that.defaultToLocation
.erpLocationCode;
detail.fromStatus = balanceItem.status;
detail.toStatus = l.status;
detail.fromWarehouseCode = localStorage.warehouseCode;
detail.toWarehouseCode = localStorage.warehouseCode;
detail.supplierBatch = balanceItem.supplierBatch;
detail.arriveDate = balanceItem.arriveDate;
detail.produceDate = balanceItem.produceDate;
detail.expireDate = balanceItem.expireDate;
//===========================================
detail.recommendContainerCode = that.fromLocation.code;
detail.recommendPackingCode = balanceItem.packingCode;
detail.recommendSupplierBatch = l.supplierBatch;
detail.recommendArriveDate = l.arriveDate;
detail.recommendProduceDate = l.produceDate;
detail.recommendExpireDate = l.expireDate;
detail.recommendLot = balanceItem.lot;;
detail.recommendToLocationCode = l.toLocationCode ?? that.defaultToLocation.code;
detail.recommendToLocationArea = l.toLocationArea ?? that.defaultToLocation.areaCode;
detail.recommendToLocationGroup = l.toLocationGroup ?? that.defaultToLocation
.locationGroupCode;
detail.recommendToLocationErpCode = l.toLocationErpCode ?? that.defaultToLocation
.erpLocationCode;
detail.recommendToWarehouseCode = localStorage.warehouseCode;
detail.recommendQty = balanceItem.qty;
detail.handledContainerCode = l.containerCode;
detail.handledPackingCode = l.packingCode;
detail.handledSupplierBatch = l.supplierBatch;
detail.handledArriveDate = l.arriveDate;
detail.handledProduceDate = l.produceDate;
detail.handledExpireDate = l.expireDate;
detail.handledLot = l.lot;
detail.handledToLocationCode = l.toLocationCode ?? that.defaultToLocation.code;
detail.handledToLocationArea = l.toLocationArea ?? that.defaultToLocation.areaCode;
detail.handledToLocationGroup = l.toLocationGroup ?? that.defaultToLocation
.locationGroupCode;
detail.handledToLocationErpCode = l.toLocationErpCode ?? that.defaultToLocation
.erpLocationCode;
detail.handledToWarehouseCode = localStorage.warehouseCode;
detail.handledQty = l.qty;
item.details.push(detail);
});
})
return item;
},
cancel() {
let that = this;
showConfirmMsg('是否要清空已扫描的零件和库位信息?', confirm => {
if (confirm) {
that.clearInfo();
}
})
},
clearInfo() {
let that = this;
that.itemList = [];
that.fromLocation = null;
that.toLocation = null;
that.defaultToLocation = null;
},
openScanPopup() {
if (this.fromLocation == null) { //
this.openScanFromLocationPopup();
} else { //
this.openPackLabel();
}
},
scanPopupGetFocus() {
this.$refs.scanPackPopup.getfocus();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
closeCommitMessage() {
// this.openScanPopup();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
openPackLabel() {
this.$refs.scanPackPopup.openScanPopup()
},
openScanFromLocationPopup() {
this.$refs.scanFromLocationPopup.openScanPopup()
},
closeScanFromLocationPopup() {
this.$refs.scanFromLocationPopup.closeScanPopup();
},
openScanToLocationPopup() {
this.$refs.scanToLocationPopup.openScanPopup()
},
closeScanToLocationPopup() {
this.$refs.scanToLocationPopup.closeScanPopup();
},
}
};
</script>
<style scoped lang="scss">
</style>

648
fe/PDA/pages/return/productionReturnRaw.vue

@ -0,0 +1,648 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="fromLocation==null"></win-blank-view>
<scroll-view scroll-y="true" class="scroll-detail" style="margin-top: 20rpx;padding-bottom:100px">
<view class="top_wrap" v-if="fromLocation!=null">
<view class="top_card">
<view class="uni-flex space-between top_lines_info">
<view class="font_sm">
来源库位:
<text class="text_bold">{{fromLocation.code}}</text>
</view>
</view>
</view>
</view>
<uni-collapse v-if="fromLocation!=null">
<view class="pop_list list_info semi_col" v-for="(label, index) in itemList" :key="label.id">
<semi-collapse-item :open="true" :title="label.itemCode" :item="label" :scanCount="label.scanQty"
style="font-size: 20px; ">
<view v-for="(item, index) in label.labelList" :key="item.id">
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" :auto-close="false"
@click="swipeClick($event,label,index)" style='background-color: #ffffff;'>
<view class="common_card" style='margin-left: 10px;'>
<view class="ljh_box">
<view class="ljh_info">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="label_xm font_xs fr">{{ item.packingCode }}</view>
</view>
<view class="uni-flex space-between desc_card">
<view class="ljh_left">
<view class="text_lightblue font_xs">{{item.itemName }}</view>
</view>
<view class="ljh_right">
<text class="tnum">{{item.qty}}</text>
<text class="tunit">{{item.uom}}</text>
</view>
</view>
</view>
<view class="cell_box">
<view class="uni-flex uni-row fl">
<view class="cell_info">
<view class="text_lightblue">源库位</view>
<view class="text_black font_sm">{{ item.locationCode }}
</view>
</view>
<view class="cell_info">
<view class="text_lightblue">目标库位</view>
<view class="text_black font_sm">{{item.toLocationCode }}</view>
</view>
</view>
<view class="scan_btn_fr fr" @click="scanToLocation(item)">
<text>扫描目标库位</text>
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</semi-collapse-item>
</view>
</uni-collapse>
</scroll-view>
<div class="new_bot_box" v-show="fromLocation!=null">
<win-collapse-location scanTitle='扫描默认目标库位' ref='comCollapseLocation'
@getLocationCode='getDefaultToLocation' @clear='clearDefaultLocation'>
</win-collapse-location>
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="cancel()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<win-scan-button @goScan='openScanPopup' v-if="fromLocation!=null"></win-scan-button>
<win-scan-by-code ref="scanFromLocationPopup" title="来源库位" @getScanCode='scanFromLocation'></win-scan-by-code>
<win-scan-by-code ref="scanToLocationPopup" title="目标库位" @getScanCode='getToLocation'></win-scan-by-code>
<win-scan-by-pack ref="scanPackPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
locations,
getBalancesByFilterAsync,
getWipListAsync,
returnToWarehouse,
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption
} from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import comBaseItem from '@/mycomponents/comItem/comBaseItem.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
import comScanSemiPutaway from '@/mycomponents/scan/comScanSemiPutaway.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import SemiCollapseItem from '@/mycomponents/common/SemiCollapseItem.vue'
export default {
name: 'returnToWarehouse',
components: {
winBlankView,
comBaseItem,
comMessage,
winScanButton,
winScanByPack,
winScanByCode,
comScanSemiPutaway,
comBalance,
winCollapseLocation,
SemiCollapseItem
},
data() {
return {
options: [],
itemList: [],
fromLocation: null,
toLocation: null,
defaultToLocation: null,
currentItem: {}
};
},
props: {
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
window.location.reload();
}
},
mounted: function() {
this.options = getRemoveOption();
this.openScanPopup();
},
methods: {
//
scanFromLocation(code) {
let that = this;
if (code == '') return;
uni.showLoading({
title: '扫描中...',
mask: true
});
locations(code).then(res => {
if (res != null) {
if (res.type == 3||res.type == 4||res.type == 5) {
that.fromLocation = res;
this.openPackLabel();
this.closeScanFromLocationPopup();
} else {
that.showMessage('扫描的库位【' + code + '】不是【半成品库】或【线边库位】或【成品库位】');
}
} else {
that.showMessage('未查询到库位【' + code + '】');
}
uni.hideLoading();
}).catch(err => {
uni.hideLoading();
that.showMessage(err.message);
});
},
scanConfirm(fromLocation, itemList) {
this.fromLocation = fromLocation;
this.itemList = itemList;
},
swipeClick(e, label, index) {
let {
content
} = e;
if (content.text === '移除') {
uni.showModal({
title: '提示',
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
let item = label.labelList[index];
label.scanQty = label.scanQty - item.qty;
this.removeLabel(label, index)
//label.labelList.splice(index, 1);
}
}
});
}
},
removeLabel(label, index) {
label.labelList.splice(index, 1);
if (label.labelList.length == 0) {
for (var i = 0; i < this.itemList.length; i++) {
let item = this.itemList[i];
if (item.itemCode == label.itemCode) {
this.itemList.splice(i, 1)
return;
}
}
}
},
getScanResult(result) {
let that = this;
that.currentLabel = result.data;
let code = result.data.code;
if (code) {
let datas = [];
//
this.itemList.filter(r => {
if (r.toPackingCode == code) {
datas.push(r);
return;
}
})
if (datas.length > 0) {
this.showRescanMessage('箱码【' + code + '】已经存在,是否要重新扫描?');
// showConfirmMsg('' + code + ',?', confirm => {
// if (confirm) {
// that.itemList.forEach((r, i) => {
// if (r.toPackingCode == code) {
// that.itemList.splice(i, 1);
// return;
// }
// });
// that.getLabel();
// }
// });
} else {
that.getLabel();
}
} else {
this.showMessage('请先扫描箱标签');
return;
}
},
//
afterRescan(val) {
let that = this;
if (confirm) {
that.itemList.forEach((r, i) => {
if (r.toPackingCode == that.currentLabel.packingCode) {
that.itemList.splice(i, 1);
return;
}
});
that.getLabel();
} else {
this.scanPopupGetFocus();
}
},
async getLabel() {
let that = this;
uni.showLoading({
title: '扫描中...',
mask: true
})
let balanceParams = {
pageSize: 100,
pageIndex: 1,
packingCode: that.currentLabel.packingCode,
};
let balanceRes = await getBalancesByFilterAsync(balanceParams);
if (balanceRes.totalCount > 0) {
let locationCode = balanceRes.items[0].locationCode;
this.showScanMessage('箱码【' + that.currentLabel.packingCode + '】在【' + locationCode +
'】库位已经有库存信息,请重新扫描箱码');
} else {
let itemInfo = that.itemList.find(r => {
return r.itemCode == that.currentLabel.itemCode
})
if (itemInfo == undefined) {
let params = {
locationCode: that.fromLocation.code,
itemCode: that.currentLabel.itemCode
};
let wipRes = await getWipListAsync(params);
if (wipRes.totalCount == 0) {
this.showScanMessage('零件【' + that.currentLabel.itemCode + '】在【' + this.fromLocation.code +
'】库位没有库存信息,不可以退库');
} else {
let balanceItem = wipRes.items[0];
let item = {
itemCode: that.currentLabel.itemCode,
totalQty: balanceItem.qty,
uom: balanceItem.uom,
scanQty: 0,
status: balanceItem.status,
balanceItem: balanceItem,
labelList: []
};
this.addLabel(item);
}
} else {
this.addLabel(itemInfo);
}
}
uni.hideLoading();
},
addLabel(item) {
//
if (item.labelList.length == 0) {
if (this.currentLabel.qty > item.totalQty) {
this.showScanMessage('标签数量【' + this.currentLabel.qty +
'】大于零件的库存数量【' + item.totalQty + '】,不可以退库')
} else {
let data = this.itemList.find(r => r.itemCode == item.itemCode)
if (data == undefined) {
this.itemList.push(item)
}
this.calcScanQty(item, 0)
item.labelList.unshift(this.currentLabel);
this.scanPopupGetFocus();
}
} else {
let scanQty = 0;
item.labelList.forEach(r => {
scanQty += Number(r.qty)
})
if (scanQty + this.currentLabel.qty > item.totalQty) {
this.showScanMessage('已扫描数量【' + scanQty + '】加标签数量【' + this.currentLabel.qty +
'】大于零件的库存数量【' + item.totalQty + '】,不可以退库')
} else {
this.calcScanQty(item, scanQty)
item.labelList.unshift(this.currentLabel);
this.scanPopupGetFocus();
}
}
},
calcScanQty(item, scanQty) {
item.scanQty = scanQty + this.currentLabel.qty;
//
this.currentLabel.locationCode = this.fromLocation.code;
this.currentLabel.status = 2;
},
scanToLocation(item) {
this.currentItem = item;
this.openScanToLocationPopup();
},
//
getDefaultToLocation(locationCode) {
let that = this;
uni.showLoading({
title: "扫描中",
mask: true
});
locations(locationCode).then(res => {
if (res == null) {
that.showMessage('目标库位【' + locationCode + '】不存在');
} else {
if (res.type == 2 || res.type == 3||res.type == 4 ||res.type == 6) {
showConfirmMsg('是否要将所有未扫描目标库位的零件,指定目标库位【' + locationCode + '】',
confirm => {
if (confirm) {
that.defaultToLocation = res;
that.itemList.forEach(r => {
r.labelList.forEach(l => {
if (l.toLocationCode == '' || l
.toLocationCode == undefined) {
that.handledToLocation(l, res);
}
});
})
}
});
} else {
that.showMessage('目标库位的库位类型必须是【原料库】或【半成品库】或【成品库】或【隔离库】')
}
}
uni.hideLoading();
}).catch(err => {
that.toLocation = null;
that.showMessage(err.message);
uni.hideLoading();
})
},
getToLocation(code) {
if (code == '') {
this.showMessage('目标库位不能为空');
return;
}
if (code == this.currentItem.fromLocationCode) {
this.showMessage('源库位【' + this.currentItem.fromLocationCode + '】与目标库位【' + code + '】不能相同');
return;
}
uni.showLoading({
title: "扫描中",
mask: true
});
let that = this;
locations(code).then(res => {
if (res == null) {
that.showMessage('目标库位【' + code + '】不存在');
} else {
if (res.type == 2 || res.type == 3||res.type == 4||res.type == 6) {
this.handledToLocation(this.currentItem, res);
} else {
this.showMessage('目标库位的库位类型必须是【原料库】或【半成品库】或【成品库】或【隔离库】')
}
}
uni.hideLoading();
}).catch(err => {
that.toLocation = null;
that.showMessage(err.message);
uni.hideLoading();
})
},
handledToLocation(item, location) {
item.toLocationCode = location.code;
item.toLocationGroup = location.locationGroupCode;
item.toLocationArea = location.areaCode;
item.toLocationErpCode = location.erpLocationCode;
this.$forceUpdate();
this.closeScanToLocationPopup();
},
clearDefaultLocation() {
let that = this;
that.defaultToLocation = null;
},
submit() {
let that = this;
if (that.itemList.length === 0) {
that.showMessage('请扫描要退库的零件');
return;
}
let noToLocations = [];
that.itemList.forEach(r => {
r.labelList.filter(l => {
if (l.toLocationCode == '' || l.toLocationCode == undefined) {
noToLocations.push(l.itemCode)
}
})
})
if (noToLocations.length > 0) {
that.showMessage('还有未扫描目标库位的零件,请先扫描目标库位');
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
let item = this.getSubmitParam();
let params = JSON.stringify(item);
returnToWarehouse(params)
.then(res => {
that.showCommitSuccess();
that.clearInfo();
uni.hideLoading();
})
.catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
getSubmitParam() {
let that = this;
let item = {
number: "",
worker: localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
putawayType: 2,
details: []
}
that.itemList.forEach(i => {
let balanceItem = i.balanceItem;
i.labelList.forEach(l => {
let detail = {};
detail.itemCode = balanceItem.itemCode;
detail.itemName = balanceItem.itemName;
detail.itemDesc1 = balanceItem.itemDesc1;
detail.itemDesc2 = balanceItem.itemDesc2;
detail.uom = l.uom;
detail.qty = l.qty;
detail.stdPackQty = balanceItem.stdPackQty;
detail.fromPackingCode = balanceItem.packingCode;
detail.toPackingCode = l.packingCode;
detail.fromLot = balanceItem.lot;
detail.toLot = l.lot;
detail.fromLocationCode = that.fromLocation.code;
detail.fromLocationErpCode = that.fromLocation.erpLocationCode;
detail.fromLocationGroup = that.fromLocation.locationGroupCode;
detail.fromLocationArea = that.fromLocation.areaCode;
detail.toLocationCode = l.toLocationCode ?? that.defaultToLocation.code;
detail.toLocationGroup = l.toLocationGroup ?? that.defaultToLocation
.locationGroupCode;
detail.toLocationArea = l.toLocationArea ?? that.defaultToLocation.areaCode;
detail.toLocationErpCode = l.toLocationErpCode ?? that.defaultToLocation
.erpLocationCode;
detail.fromStatus = balanceItem.status;
detail.toStatus = l.status;
detail.fromWarehouseCode = localStorage.warehouseCode;
detail.toWarehouseCode = localStorage.warehouseCode;
detail.supplierBatch = balanceItem.supplierBatch;
detail.arriveDate = balanceItem.arriveDate;
detail.produceDate = balanceItem.produceDate;
detail.expireDate = balanceItem.expireDate;
//===========================================
detail.recommendContainerCode = that.fromLocation.code;
detail.recommendPackingCode = balanceItem.packingCode;
detail.recommendSupplierBatch = l.supplierBatch;
detail.recommendArriveDate = l.arriveDate;
detail.recommendProduceDate = l.produceDate;
detail.recommendExpireDate = l.expireDate;
detail.recommendLot = balanceItem.lot;;
detail.recommendToLocationCode = l.toLocationCode ?? that.defaultToLocation.code;
detail.recommendToLocationArea = l.toLocationArea ?? that.defaultToLocation.areaCode;
detail.recommendToLocationGroup = l.toLocationGroup ?? that.defaultToLocation
.locationGroupCode;
detail.recommendToLocationErpCode = l.toLocationErpCode ?? that.defaultToLocation
.erpLocationCode;
detail.recommendToWarehouseCode = localStorage.warehouseCode;
detail.recommendQty = balanceItem.qty;
detail.handledContainerCode = l.containerCode;
detail.handledPackingCode = l.packingCode;
detail.handledSupplierBatch = l.supplierBatch;
detail.handledArriveDate = l.arriveDate;
detail.handledProduceDate = l.produceDate;
detail.handledExpireDate = l.expireDate;
detail.handledLot = l.lot;
detail.handledToLocationCode = l.toLocationCode ?? that.defaultToLocation.code;
detail.handledToLocationArea = l.toLocationArea ?? that.defaultToLocation.areaCode;
detail.handledToLocationGroup = l.toLocationGroup ?? that.defaultToLocation
.locationGroupCode;
detail.handledToLocationErpCode = l.toLocationErpCode ?? that.defaultToLocation
.erpLocationCode;
detail.handledToWarehouseCode = localStorage.warehouseCode;
detail.handledQty = l.qty;
item.details.push(detail);
});
})
return item;
},
cancel() {
let that = this;
showConfirmMsg('是否要清空已扫描的零件和库位信息?', confirm => {
if (confirm) {
that.clearInfo();
}
})
},
clearInfo() {
let that = this;
that.itemList = [];
that.fromLocation = null;
that.toLocation = null;
that.defaultToLocation = null;
},
openScanPopup() {
if (this.fromLocation == null) { //
this.openScanFromLocationPopup();
} else { //
this.openPackLabel();
}
},
scanPopupGetFocus() {
this.$refs.scanPackPopup.getfocus();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
closeCommitMessage() {
// this.openScanPopup();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
openPackLabel() {
this.$refs.scanPackPopup.openScanPopup()
},
openScanFromLocationPopup() {
this.$refs.scanFromLocationPopup.openScanPopup()
},
closeScanFromLocationPopup() {
this.$refs.scanFromLocationPopup.closeScanPopup();
},
openScanToLocationPopup() {
this.$refs.scanToLocationPopup.openScanPopup()
},
closeScanToLocationPopup() {
this.$refs.scanToLocationPopup.closeScanPopup();
},
}
};
</script>
<style scoped lang="scss">
</style>

230
fe/PDA/pages/task/coatingIssuleJobDetail.vue

@ -3,11 +3,8 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent"
:allCount="allCount"
:isShowScanHint="false"
allCountHint ="箱数"
>
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="false"
allCountHint="箱数">
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
@ -151,7 +148,7 @@
</view>
</view>
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend"> 推荐</button>
<button type="primary" size="default" @click="recommend"> 推荐库存</button>
</view>
</view>
@ -161,10 +158,11 @@
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
<selectClickList ref="selectPopup" title="推荐信息" @select="selectPlan"></selectClickList>
<winScanButtonTop @goScan='openScanPopupFrom' title="箱码"></winScanButtonTop>
<win-scan-button @goScan='openLocationTo' title="库位"></win-scan-button>
<win-scan-by-pack ref="scanPopupFrom" @getScanResult='getScanResultFrom' title="来源箱码"></win-scan-by-pack>
<winScanButtonTop @goScan='openScanPopupTo' title="箱码"></winScanButtonTop>
<win-scan-button @goScan='openLocationFrom' title="来源库位"></win-scan-button>
<winScanButtonBottom @goScan='openLocationTo' title="目标库位"></winScanButtonBottom>
<win-scan-by-pack ref="scanPopupTo" @getScanResult='getScanResultTo' title="箱码"></win-scan-by-pack>
<winScanLocationCode ref="locationFrom" title="来源库位" @getLocation="geFromLocation"></winScanLocationCode>
<winScanLocationCode ref="locationTo" title="目标库位" @getLocation="geToLocation"></winScanLocationCode>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
@ -193,18 +191,21 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue'
import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
winScanButton,
winScanButtonTop,
winScanButtonBottom,
winMulitScan,
comJobScanDetail,
winScanByPack,
@ -228,7 +229,8 @@
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {}
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
}
},
props: {
@ -276,26 +278,47 @@
})
},
methods: {
openScanPopupFrom() {
this.$refs.scanPopupFrom.openScanPopup();
openScanPopupTo() {
this.$refs.scanPopupTo.openScanPopup();
},
openLocationTo() {
this.$refs.locationTo.openScanPopup()
},
openLocationFrom() {
this.$refs.locationFrom.openScanPopup()
},
geFromLocation(locationInfo) {
var current = this.details[0]
if (!current.handledToPackingCode) {
this.showMessage("请先扫描箱码")
return;
}
if (locationInfo.code != current.handleToPackingCodeLocationCode) {
this.showMessage("扫描来源库位[" + locationInfo.code + "]与箱码[" + current.handledToPackingCode +
"]对应的库位[" + current.handleToPackingCodeLocationCode + "]不一致,请重新扫描")
return;
}
current.handledFromLocationCode = locationInfo.code
current.handledFromLocationArea = locationInfo.locationArea
current.handledFromLocationGroup = locationInfo.locationGroup
current.handledFromLocationErpCode = locationInfo.locationErpCode
},
geToLocation(locationInfo) {
var current = this.details[0]
if (locationInfo.code != current.transferLibToLocationCode) {
this.showMessage(" 扫描目标库位[" + locationInfo.code + "]与推荐库位[" + this.details[0]
.transferLibToLocationCode + "]不一致,请重新扫描")
if (locationInfo.code != current.recommendToLocationCode) {
this.showMessage(" 扫描目标库位[" + locationInfo.code + "]与推荐目标库位[" + current
.recommendToLocationCode + "]不一致,请重新扫描")
return;
}
current.handledToLocationCode = locationInfo.code
current.handledToLocationArea = locationInfo.locationArea
current.handledToLocationGroup = locationInfo.locationGroup
current.handledToLocationErpCode = locationInfo.locationErpCode
current.handledToWarehouseCode = locationInfo.warehouseCode
current.handledToPackingCode = ""
current.handledToLot = ""
},
//
getDetail() {
@ -321,20 +344,20 @@
r => {
r.scaned = false;
r.scanDate = new Date()
r.handledFromContainerCode = r.transferLibFromContainerCode
r.handledFromPackingCode = r.transferLibFromPackingCode
r.handledFromSupplierBatch = r.transferLibFromSupplierBatch
r.handledFromArriveDate = r.transferLibFromArriveDate
r.handledFromProduceDate = r.transferLibFromProduceDate
r.handledFromExpireDate = r.transferLibFromExpireDate
r.handledFromLot = r.transferLibFromLot
r.handledFromLocationCode = r.transferLibFromLocationCode
r.handledFromLocationArea = r.transferLibFromLocationArea
r.handledFromLocationGroup = r.transferLibFromLocationGroup
r.handledFromLocationErpCode = r.transferLibFromLocationErpCode
r.handledFromWarehouseCode = r.transferLibFromWarehouseCode
r.handledFromQty = r.transferLibFromQty
r.handledToQty = r.handledFromQty
r.handledFromContainerCode = r.recommendFromContainerCode
r.handledFromPackingCode = r.recommendFromPackingCode
r.handledFromSupplierBatch = r.recommendFromSupplierBatch
r.handledFromArriveDate = r.recommendFromArriveDate
r.handledFromProduceDate = r.recommendFromProduceDate
r.handledFromExpireDate = r.recommendFromExpireDate
r.handledFromLot = r.recommendFromLot
// r.handledFromLocationCode = r.recommendFromLocationCode
// r.handledFromLocationArea = r.recommendFromLocationArea
// r.handledFromLocationGroup = r.recommendFromLocationGroup
// r.handledFromLocationErpCode = r.recommendFromLocationErpCode
// r.handledFromWarehouseCode = r.recommendFromWarehouseCode
r.handledFromQty = r.recommendFromQty
// r.handledToQty = r.handledFromQty
}
);
that.ispending = item.jobStatus === 2;
@ -349,7 +372,7 @@
});
},
getScanResultFrom(result) {
getScanResultTo(result) {
var fromData = result.data;
var data = this.details.filter(r => r.itemCode == result.data.itemCode)
if (data.length == 0) {
@ -360,52 +383,59 @@
if (res.totalCount > 0) {
var balancesItem = res.items[0];
var item = data[0];
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
item.handledFromArriveDate = balancesItem.arriveDate
item.handledFromProduceDate = balancesItem.produceDate
item.handledFromExpireDate = balancesItem.expireDate
item.handledFromLot = balancesItem.lot
item.handledFromLocationCode = balancesItem.locationCode
item.handledFromLocationArea = balancesItem.locationArea
item.handledFromLocationGroup = balancesItem.locationGroup
item.handledFromLocationErpCode = balancesItem.locationErpCode
item.handledFromWarehouseCode = balancesItem.warehouseCode
item.handledFromQty = balancesItem.qty;
item.handledToQty =item.handledFromQty;
this.$forceUpdate()
}
});
if (balancesItem.lot == item.recommendToLot) {
item.handledToContainerCode = balancesItem.containerCode
item.handledToPackingCode = balancesItem.packingCode
item.handledToSupplierBatch = balancesItem.supplierBatch
item.handledToArriveDate = balancesItem.arriveDate
item.handledToProduceDate = balancesItem.produceDate
item.handledToExpireDate = balancesItem.expireDate
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
item.handledFromArriveDate = balancesItem.arriveDate
item.handledFromProduceDate = balancesItem.produceDate
item.handledFromExpireDate = balancesItem.expireDate
item.handledFromLot = balancesItem.lot
item.handledFromWarehouseCode = balancesItem.warehouseCode
item.handledFromQty = balancesItem.qty
item.handleToPackingCodeLocationCode = balancesItem.locationCode
} else {
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item
.recommendToLot + "]不一致,是否继续发料", res => {
if (res) {
item.handledToContainerCode = balancesItem.containerCode
item.handledToPackingCode = balancesItem.packingCode
item.handledToSupplierBatch = balancesItem.supplierBatch
item.handledToArriveDate = balancesItem.arriveDate
item.handledToProduceDate = balancesItem.produceDate
item.handledToExpireDate = balancesItem.expireDate
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
item.handledFromArriveDate = balancesItem.arriveDate
item.handledFromProduceDate = balancesItem.produceDate
item.handledFromExpireDate = balancesItem.expireDate
item.handledFromLot = balancesItem.lot
item.handledFromWarehouseCode = balancesItem.warehouseCode
item.handledFromQty = balancesItem.qty
item.handleToPackingCodeLocationCode = balancesItem.locationCode
}
})
},
}
getScanResultTo(result) {
var fromData = result.data;
var data = this.details.filter(r => r.itemCode == result.data.itemCode)
if (data.length == 0) {
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
var item = data[0];
item.handledToContainerCode = balancesItem.containerCode
item.handledToPackingCode = balancesItem.packingCode
item.handledToSupplierBatch = balancesItem.supplierBatch
item.handledToArriveDate = balancesItem.arriveDate
item.handledToProduceDate = balancesItem.produceDate
item.handledToExpireDate = balancesItem.expireDate
item.handledToLot = balancesItem.lot
item.handledToLocationCode = balancesItem.locationCode
item.handledToLocationArea = balancesItem.locationArea
item.handledToLocationGroup = balancesItem.locationGroup
item.handledToLocationErpCode = balancesItem.locationErpCode
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
this.$forceUpdate()
this.$forceUpdate()
}
});
@ -443,40 +473,32 @@
uni.hideLoading();
});
},
recommend(){
var itemCode =this.details[0].itemCode
var productLine =this.details[0].prodLine
if(!itemCode){
recommend() {
var itemCode = this.details[0].itemCode
var productLine = this.details[0].prodLine
if (!itemCode) {
this.showMessage("物料为空")
return;
}
if(!productLine){
if (!productLine) {
this.showMessage("生产线为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode,productLine).then(res=>{
getRecommendBalance(itemCode, productLine, true).then(res => {
uni.hideLoading()
if (res.length > 0) {
var list = [];
list = res.Result;
list.forEach(res => {
res.label = res.PLAN_NO;
res.value = res.SHIFT_CODE
})
this.$refs.selectPopup.openScanPopup(list)
}
else {
this.showMessage("推荐列表为0")
this.$refs.selectPopup.openScanPopup(res)
} else {
this.showMessage("暂无推荐库存")
}
}).catch(error=>{
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
@ -503,12 +525,16 @@
this.showMessage('该任务没有要上架的零件');
return;
}
if (!that.details[0].handledFromPackingCode) {
if (!that.details[0].handledToPackingCode) {
this.showMessage('请先扫描箱码');
return;
}
if (!that.details[0].handledToLocationCode) {
this.showMessage('请先扫描库位');
this.showMessage('请先扫描目标库位');
return;
}
if (!that.details[0].handledFromLocationCode) {
this.showMessage('请先扫描来源库位');
return;
}
that.finsh();
@ -523,6 +549,7 @@
mask: true
});
let params = that.details[0];
// console.log("",JSON.stringify(params))
finshCoatingIssueJob(that.id, params.id, params)
.then(res => {
uni.hideLoading();
@ -537,6 +564,7 @@
},
clear() {
this.handleToPackingCodeLocationCode = ""
this.getDetail();
},
showMessage(message) {

206
fe/PDA/pages/task/injectionIssueJob.vue

@ -1,24 +1,39 @@
<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"
<!-- <view class="uni-flex uni-row require_wrap">
<button @click="isTodayChange" :class="[isToday==true?'require_cell require_active':'require_cell']">
<text></text>
只看当天发料
</button>
<button @click="timeSortingChange"
:class="[isIssueTimeChange==true?'require_cell require_active':'require_cell']">
<text></text>
按发料时间排序
</button>
</view> -->
<win-empty-view v-if="issueList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in issueList" :key="item.id"
@click="openDetail(item)">
<comInjectIssue :dataContent="item"></comInjectIssue>
<comKittingIssue :dataContent="item"></comKittingIssue>
</view>
<uni-load-more :status="loadingType" v-if="deliverList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button>
<uni-load-more :status="loadingType" v-if="issueList.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>
</win-mulit-scan>
<com-scan-issue-list ref="scanList" @selectedItem="selectedItem"></com-scan-issue-list>
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
getInjectIssueJobList,
getInjectionIssueList,
getInjectionIssueJobByNumber,
getInjectionIssueListByRequest
} from '@/api/index.js';
import {
@ -26,22 +41,29 @@
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comInjectIssue from '@/mycomponents/coms/task/comInjectIssue.vue';
import issueDetail from './issue_detail.vue';
import comKittingIssue from '@/mycomponents/coms/task/comKittingIssue.vue';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comScanIssueList from '@/mycomponents/scan/comScanIssueList.vue'
export default {
name: 'deliver',
name: 'issue',
components: {
winEmptyView,
comKittingIssue,
issueDetail,
comMessage,
winScanButton,
winMulitScan,
comInjectIssue,
comMessage
comScanIssueList
},
data() {
return {
deliverList: [],
//popup
type: '',
issueList: [],
reload: false,
status: '',
contentText: {
@ -51,41 +73,25 @@
},
pageSize: this.modelConfig,
pageIndex: 1,
isTimeWindowSorting: false,
isToday: true,
isIssueTimeChange: false,
isToday: false,
titleArray: ['任务编号'],
loadingType: "nomore"
};
},
props: {
datacontent: {
type: Object,
value: null
},
isByFIFO: {
type: Boolean,
value: false
}
},
onShow: function() {
this.getList('refresh');
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
onShow() {
this.getList('refresh');
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
goHome();
return true;
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
@ -97,19 +103,19 @@
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
//
timeSortingChange: function(e) {
this.isTimeWindowSorting = e.detail.value
timeSortingChange() {
this.isIssueTimeChange = !this.isIssueTimeChange;
this.getList()
},
//
isTodayChange: function(e) {
this.isToday = e.detail.value
isTodayChange() {
this.isToday = !this.isToday
this.getList()
},
//
//
getList(type) {
let that = this;
uni.showLoading({
@ -119,20 +125,17 @@
this.loadingType = "loading";
if (type === "refresh") {
this.pageIndex = 1;
this.deliverList = [];
this.issueList = [];
}
let params = {
pageSize: that.pageSize,
pageIndex: that.pageIndex,
// isCreationTimeSorting: that.isTimeWindowSorting,
// isToday: that.isToday
};
getInjectIssueJobList(params)
getInjectionIssueList(that.pageIndex,that.pageSize,false)
.then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
res.items.forEach(item=>{
item.requestNumber =item.injectionRequestNumber
})
var list = res.items;
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
@ -140,28 +143,105 @@
this.loadingType = "nomore";
return;
}
// that.deliverList = [...that.deliverList, ...list];
that.deliverList = type === "refresh" ? list : this.deliverList.concat(list);
that.issueList = type === "refresh" ? list : this.issueList.concat(list);
that.pageIndex++;
})
.catch(err => {
this.loadingType = "";
this.showMessage(err.message);
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
});
},
openDetail(item) {
uni.navigateTo({
url: './injectionIssueJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
getScanResult(type, result) {
let code = result.data.code;
if (code == '') {
this.showMessage('扫描的内容不能为空')
return;
}
if (type == '申请单号') {
this.scanByRequesNumber(code, type);
} else if (type == '任务编号') {
this.scanByNumber(code, type);
}
},
//
scanByRequesNumber(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getInjectionIssueListByRequest(code).then(res => {
uni.hideLoading();
let items = res.items;
if (res.totalCount > 0) {
if (res.totalCount == 1) {
that.openDetail(items[0]);
} else {
that.showItemList(items);
}
} else {
that.showMessage('未查找到' + type + '为【' + code + '】的发料任务');
}
}).catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
//
scanByNumber(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getInjectionIssueJobByNumber(code).then(res => {
uni.hideLoading();
if (res != null) {
that.openDetail(res);
} else {
that.showMessage('未查找到' + type + '为【' + code + '】的发料任务');
}
}).catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
openDetail(item) {
if(item.enumIssueSendType==1){
uni.navigateTo({
url: './injectionIssueJobDetailByQty?id=' + item.id + '&jobStatus=' + item.jobStatus
});
}else {
uni.navigateTo({
url: './injectionIssueJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
onPull() {
this.getList('refresh');
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList('more');
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
},
selectedItem(item) {
this.openDetail(item);
}
}
};
</script>

721
fe/PDA/pages/task/injectionIssueJobDetail.vue

@ -1,210 +1,241 @@
<!-- 发料任务详情 -->
<template>
<page-meta root-font-size="18px"></page-meta>
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="false"
allCountHint="箱数">
</com-job-scan-detail>
</view>
<!-- <view class="uni-flex uni-row" style="background-color: #fff; padding: 20rpx; align-items: center;">
<view class="" style="font-size: 35rpx; font-weight: bold; margin-right: 10rpx;">
来源库位 :
</view>
<uni-data-select v-model="value" :localdata="range" @change="change" label="来源库位"></uni-data-select>
</view> -->
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
<view class="uni-flex uni-col" style="flex-direction: column">
<view class="" v-for="(item, index) in details" :key="index">
<view class="detail-list margin_top">
<!-- 单选卡片 -->
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
<view class="" v-for="(item, index) in details" :key="index">
<view class="detail-list margin_top">
<!-- 单选卡片 -->
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<!-- <uni-tr>
<uni-th width="70"></uni-th>
<uni-th width="120" align="center">推荐</uni-th>
<uni-th width="120" align="center"></uni-th>
</uni-tr> -->
<uni-tr>
<uni-th width="70">收容数</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{item.requestQty}}({{item.uom}})</text>
</view>
</uni-th>
<!-- -->
<!-- <uni-th width="120" align="center">
<view class="" v-if="item.scaned">
<com-number-box :ref="'comNumberBox_'+index"
v-model="item.handledQty" :max="99999" :min="0"
@change="qtyChanged($event,item,index)">
</com-number-box>
</view> -->
<!-- <view v-if="dataContent.scaned" class="text_black">
{{dataContent.handledQty}}({{dataContent.uom}})
</view> -->
<!-- </uni-th> -->
</uni-tr>
<uni-tr>
<uni-th width="70">来源库位</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.recommendFromLocationCode }}</view>
</uni-th>
<!-- <uni-th width="120" align="center">
<view class="">
<button v-if="item.scaned" type="primary" size="mini"
style="margin-left: 30rpx;"
@click="remove(dataContent,index)">移除</button>
</view>
</uni-th> -->
</uni-tr>
</uni-table>
</view>
</view>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="">
<uni-tr>
<uni-th width="100" align="center">
<text
style="font-weight:800; font-size: 35rpx; color: black; ">推荐</text>
</uni-th>
<uni-th width="120" align="center">来源</uni-th>
<uni-th width="120" align="center">目标</uni-th>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">箱码</uni-td>
<uni-td width="120" align="center">
{{item.recommendFromPackingCode}}</uni-td>
<uni-td width="120" align="center"> {{item.recommendToPackingCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">批次</uni-td>
<uni-td width="120" align="center">{{item.recommendFromLot}}</uni-td>
<uni-td width="120" align="center">{{item.recommendToLot}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">库位</uni-td>
<uni-td width="120" align="center">
{{item.recommendFromLocationCode}}</uni-td>
<uni-td width="120" align="center">
{{item.recommendToLocationCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">数量({{item.uom}})</uni-td>
<uni-td width="120" align="center">{{item.recommendFromQty}}</uni-td>
<uni-td width="120" align="center">{{item.recommendToQty}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="">
<uni-tr>
<uni-th width="100" align="center">
<text style="font-weight:800; font-size: 35rpx; color: black; ">库移
</text>
</uni-th>
</uni-th>
<uni-th width="120" align="center">来源</uni-th>
<uni-th width="120" align="center">目标</uni-th>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">箱码</uni-td>
<uni-td width="120" align="center">
{{item.transferLibFromPackingCode}}</uni-td>
<uni-td width="120" align="center">
{{item.transferLibToPackingCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">批次</uni-td>
<uni-td width="120" align="center">{{item.transferLibFromLot}}</uni-td>
<uni-td width="120" align="center">{{item.transferLibToLot}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">库位</uni-td>
<uni-td width="120" align="center">
{{item.transferLibFromLocationCode}}</uni-td>
<uni-td width="120" align="center">
{{item.transferLibToLocationCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">数量({{item.uom}})</uni-td>
<uni-td width="120" align="center">{{item.transferLibFromQty}}</uni-td>
<uni-td width="120" align="center">{{item.transferLibToQty}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="">
<uni-tr>
<uni-th width="100" align="center">
<text
style="font-weight:800; font-size: 35rpx; color: black; ">实际</text></uni-th>
<uni-th width="120" align="center">来源</uni-th>
<uni-th width="120" align="center">目标</uni-th>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">箱码</uni-td>
<uni-td width="120" align="center"> {{item.handledFromPackingCode}}</uni-td>
<uni-td width="120" align="center"> {{item.handledToPackingCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">批次</uni-td>
<uni-td width="120" align="center">{{item.handledFromLot}}</uni-td>
<uni-td width="120" align="center">{{item.handledToLot}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">库位</uni-td>
<uni-td width="120" align="center">
{{item.handledFromLocationCode}}</uni-td>
<uni-td width="120" align="center"> {{item.handledToLocationCode}}</uni-td>
</uni-tr>
<uni-tr>
<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">{{item.handledToQty}}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend"> 推荐库存</button>
</view>
</view>
</scroll-view>
<div class="new_bot_box">
<!-- <win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation'
@clear='clearDefaultLocation'>
</win-collapse-location> -->
<view class="new_btn_bot bot_pos uni-flex">
<!-- <button class="new_clear_btn btn_double" @click="cancel()">清空</button> -->
<button class="new_save_btn " style="width: 100%;" @click="submit()">提交</button>
</view>
</div>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
<view class="uni-flex uni-row new_btn_bot">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
<selectClickList ref="selectPopup" title="推荐信息" @select="selectPlan"></selectClickList>
<winScanButtonTop @goScan='openScanPopupTo' title="箱码"></winScanButtonTop>
<win-scan-button @goScan='openLocationFrom' title="来源库位"></win-scan-button>
<winScanButtonBottom @goScan='openLocationTo' title="目标库位"></winScanButtonBottom>
<win-scan-by-pack ref="scanPopupTo" @getScanResult='getScanResultTo' title="箱码"></win-scan-by-pack>
<winScanLocationCode ref="locationFrom" title="来源库位" @getLocation="geFromLocation"></winScanLocationCode>
<winScanLocationCode ref="locationTo" title="目标库位" @getLocation="geToLocation"></winScanLocationCode>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view>
</template>
<script>
import {
getInjectIssueDetail,
takeInjectIssueJob,
cancelTakeInjectIssueJob,
finshInjectIssueJob,
locations
getInjectionIssueDetail,
takeInjectionIssueJob,
cancelTakeInjectionIssueJob,
finshInjectionIssueJob,
getRecommendBalance,
balances
} from '@/api/index.js';
import {
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome,
compareDesc,
compareStr,
getCurrDateTime,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue'
import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comProductCode from '@/mycomponents/coms/task/comProductCode.vue';
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
winScanButton,
winScanButtonTop,
winScanButtonBottom,
winMulitScan,
winScanByPack,
comMessage,
comJobScanDetail,
winCollapseLocation,
winScanByProductCode,
winScanByPack,
comNumberBox,
comProductCode
winScanLocationCode,
selectClickList
},
data() {
return {
type: '',
id: "",
datacontent: {},
details: [],
details: {},
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
ispending: false,
balancesItem: {},
titleArray: ['箱标签', '目标库位'],
balancesItem: null,
allCount: 0,
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: null,
value: 0,
range: [{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
],
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
}
},
props: {
itemCode: "",
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
@ -229,7 +260,7 @@
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeInjectIssueJob(this.id).then(res => {
cancelTakeInjectionIssueJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
@ -247,129 +278,238 @@
})
},
methods: {
change(e) {
console.log("e:", e);
openScanPopupTo() {
this.$refs.scanPopupTo.openScanPopup();
},
openLocationTo() {
this.$refs.locationTo.openScanPopup()
},
openLocationFrom() {
this.$refs.locationFrom.openScanPopup()
},
//
getDefaultToLocation(locationCode) {
uni.showLoading({
title: "扫描中",
mask: true
});
locations(locationCode).then(res => {
uni.hideLoading();
if (res) {
this.toLocationInfo = res
} else {
this.showMessage('目标库位【' + locationCode + '】不存在');
}
}).catch(err => {
uni.hideLoading();
this.toLocationInfo = null
this.showMessage(err.message);
})
},
geFromLocation(locationInfo) {
var current = this.details[0]
if (!current.handledToPackingCode) {
this.showMessage("请先扫描箱码")
return;
}
clearDefaultLocation() {
this.toLocationInfo = null
},
remove(item, index) {
showConfirmMsg("是否移除当前【" + item.itemCode + "】扫描信息", res => {
if (res) {
item.scaned = false;
item.handledQty = null;
this.getScanCount()
}
})
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('收货货数量必须大于0')
item.qty = item.handledQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
if (locationInfo.code != current.handleToPackingCodeLocationCode) {
this.showMessage("扫描来源库位[" + locationInfo.code + "]与箱码[" + current.handledToPackingCode +
"]对应的库位[" + current.handleToPackingCodeLocationCode + "]不一致,请重新扫描")
return;
}
current.handledFromLocationCode = locationInfo.code
current.handledFromLocationArea = locationInfo.locationArea
current.handledFromLocationGroup = locationInfo.locationGroup
current.handledFromLocationErpCode = locationInfo.locationErpCode
},
openScanPopup() {
this.$refs.scanPackPopup.openScanPopup();
geToLocation(locationInfo) {
var current = this.details[0]
if (locationInfo.code != current.recommendToLocationCode) {
this.showMessage(" 扫描目标库位[" + locationInfo.code + "]与推荐目标库位[" + current
.recommendToLocationCode + "]不一致,请重新扫描")
return;
}
current.handledToLocationCode = locationInfo.code
current.handledToLocationArea = locationInfo.locationArea
current.handledToLocationGroup = locationInfo.locationGroup
current.handledToLocationErpCode = locationInfo.locationErpCode
},
//
getDetail() {
let that = this;
if (that.id == undefined) {
return;
}
uni.showLoading({
title: '加载中...',
mask: true
})
let params = {
id: that.id,
};
getInjectIssueDetail(params)
getInjectionIssueDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.jobStatus = item.jobStatus;
that.details = item.details;
that.details.forEach(res => {
res.scaned = false;
})
that.ispending = item.jobStatus === 2;
that.allCount = item.details.length;
// that.toLocation = item.details[0].recommendLocationCode;
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
r.handledFromContainerCode = r.recommendFromContainerCode
r.handledFromPackingCode = r.recommendFromPackingCode
r.handledFromSupplierBatch = r.recommendFromSupplierBatch
r.handledFromArriveDate = r.recommendFromArriveDate
r.handledFromProduceDate = r.recommendFromProduceDate
r.handledFromExpireDate = r.recommendFromExpireDate
r.handledFromLot = r.recommendFromLot
// r.handledFromLocationCode = r.recommendFromLocationCode
// r.handledFromLocationArea = r.recommendFromLocationArea
// r.handledFromLocationGroup = r.recommendFromLocationGroup
// r.handledFromLocationErpCode = r.recommendFromLocationErpCode
// r.handledFromWarehouseCode = r.recommendFromWarehouseCode
r.handledFromQty = r.recommendFromQty
// r.handledToQty = r.handledFromQty
}
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
//
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
});
if (item === undefined) {
this.showMessage('在任务详情中,未找到物料号【' + result.itemCode + '】');
getScanResultTo(result) {
var fromData = result.data;
var data = this.details.filter(r => r.itemCode == result.data.itemCode)
if (data.length == 0) {
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
} else {
if (item.scaned) {
this.showMessage('物料号【' + result.itemCode + '】已经扫描,请扫描下一箱零件');
return;
} else {
item.scaned = true;
item.handledQty = item.recommendQty;
this.getScanCount()
setTimeout(res => {
this.$forceUpdate()
}, 1000)
}
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
var item = data[0];
if (balancesItem.lot == item.recommendToLot) {
item.handledToContainerCode = balancesItem.containerCode
item.handledToPackingCode = balancesItem.packingCode
item.handledToSupplierBatch = balancesItem.supplierBatch
item.handledToArriveDate = balancesItem.arriveDate
item.handledToProduceDate = balancesItem.produceDate
item.handledToExpireDate = balancesItem.expireDate
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
item.handledFromArriveDate = balancesItem.arriveDate
item.handledFromProduceDate = balancesItem.produceDate
item.handledFromExpireDate = balancesItem.expireDate
item.handledFromLot = balancesItem.lot
item.handledFromWarehouseCode = balancesItem.warehouseCode
item.handledFromQty = balancesItem.qty
item.handleToPackingCodeLocationCode = balancesItem.locationCode
} else {
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item
.recommendToLot + "]不一致,是否继续发料", res => {
if (res) {
item.handledToContainerCode = balancesItem.containerCode
item.handledToPackingCode = balancesItem.packingCode
item.handledToSupplierBatch = balancesItem.supplierBatch
item.handledToArriveDate = balancesItem.arriveDate
item.handledToProduceDate = balancesItem.produceDate
item.handledToExpireDate = balancesItem.expireDate
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
item.handledFromArriveDate = balancesItem.arriveDate
item.handledFromProduceDate = balancesItem.produceDate
item.handledFromExpireDate = balancesItem.expireDate
item.handledFromLot = balancesItem.lot
item.handledFromWarehouseCode = balancesItem.warehouseCode
item.handledFromQty = balancesItem.qty
item.handleToPackingCodeLocationCode = balancesItem.locationCode
}
})
}
this.$forceUpdate()
}
}
});
},
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
//
getBalance(result, callback) {
uni.showLoading({
title: '扫描中...',
mask: true
})
let params = {
pageSize: 1000,
pageIndex: 1,
packingCode: result.data.code,
// itemCode: result.data.itemCode,
// lot: result.data.lot,
// inventoryStatus: 2, //2
// locationTypes: [2, 3],
// sortBy: 'PackingCode asc'
};
balances(params)
.then(res => {
if (res.totalCount === 0) {
this.showScanMessage('按箱码【' + result.data.code + '】未查询到库存信息');
} else {
callback(res);
}
uni.hideLoading();
})
.catch(err => {
this.showScanMessage(err.message);
uni.hideLoading();
});
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
recommend() {
var itemCode = this.details[0].itemCode
var productLine = this.details[0].prodLine
if (!itemCode) {
this.showMessage("物料为空")
return;
}
if (!productLine) {
this.showMessage("生产线为空")
return;
}
},
cancel() {
showConfirmMsg("是否清除已经扫描的数据?", res => {
if (res) {
this.getDetail();
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode, productLine, true).then(res => {
uni.hideLoading()
if (res.length > 0) {
this.$refs.selectPopup.openScanPopup(res)
} else {
this.showMessage("暂无推荐库存")
}
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
},
//
// //
receive(callback) {
let params = {
id: this.id
};
takeInjectIssueJob(params)
takeInjectionIssueJob(params)
.then(res => {
callback(true);
})
@ -380,59 +520,58 @@
},
submit() {
this.finsh();
let that = this;
if (that.details.length === 0) {
this.showMessage('该任务没有要上架的零件');
return;
}
if (!that.details[0].handledToPackingCode) {
this.showMessage('请先扫描箱码');
return;
}
if (!that.details[0].handledToLocationCode) {
this.showMessage('请先扫描目标库位');
return;
}
if (!that.details[0].handledFromLocationCode) {
this.showMessage('请先扫描来源库位');
return;
}
that.finsh();
},
finsh() {
let that = this;
uni.showLoading({
title: "提交中..."
title: "提交中...",
mask: true
});
this.setParams();
let params = JSON.stringify(this.datacontent);
console.log("提交", params);
finshInjectIssueJob(this.id, params)
let params = that.details[0];
// console.log("",JSON.stringify(params))
finshInjectionIssueJob(that.id, params.id, params)
.then(res => {
uni.hideLoading();
if (res != null) {
this.showCommitSuccessMessage();
that.showCommitSuccessMessage();
}
})
.catch(err => {
this.showMessage(err.message);
that.showMessage(err.message);
uni.hideLoading();
});
},
setParams() {
this.datacontent.details.forEach(res => {
res.handledFromContainerCode = res.recommendFromContainerCode;
res.handledFromPackingCode = res.recommendFromPackingCode;
res.handledFromSupplierBatch = res.recommendFromSupplierBatch;
res.handledFromArriveDate = res.recommendFromArriveDate;
res.handledFromProduceDate =res.recommendFromProduceDate;
res.handledFromExpireDate = res.recommendFromExpireDate;
res.handledFromLot = res.recommendFromLot;
res.handledFromLocationCode = res.recommendFromLocationCode;
res.handledFromLocationArea = res.recommendFromLocationArea;
res.handledFromLocationGroup = res.recommendFromLocationGroup;
res.handledFromLocationErpCode = res.recommendFromLocationErpCode;
res.handledFromWarehouseCode = res.recommendFromWarehouseCode;
res.handledFromQty =res.recommendFromQty;
res.handledToContainerCode = res.recommendToContainerCode;
res.handledToPackingCode = res.recommendToPackingCode;
res.handledToSupplierBatch = res.recommendToSupplierBatch;
res.handledToArriveDate = res.recommendToArriveDate;
res.handledToProduceDate = res.recommendToProduceDate;
res.handledToExpireDate =res.recommendToExpireDate;
res.handledToLot = res.recommendToLot;
res.handledToLocationCode = res.recommendToLocationCode;
res.handledToLocationArea = res.recommendToLocationArea;
res.handledToLocationGroup = res.recommendToLocationGroup;
res.handledToLocationErpCode = res.recommendToLocationErpCode;
res.handledToWarehouseCode = res.recommendToWarehouseCode;
res.handledToQty = res.recommendToQty
})
clear() {
this.handleToPackingCodeLocationCode = ""
this.getDetail();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccessMessage() {
@ -440,22 +579,46 @@
},
closeCommitMessage() {
navigateBack(1); //
navigateBack(1)
uni.hideLoading();
},
closeScanPopup() {
this.$refs.scanPopupForm.closeScanPopup();
},
clearScanLocation() {
// this.$refs.scanLocation.getfocus();
// this.$refs.scanLocation.clear();
closeScanMessage() {
this.scanPopupGetFocus();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
scanPopupGetFocus() {
this.$refs.scanPopupForm.getfocus();
},
scrollToTop() {
let that = this;
// view
that.scrollTop = that.old.scrollTop
this.$nextTick(function() {
that.scrollTop = 0
});
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else if (value > item.defaultHandleQty) {
item.handledQty = item.defaultHandleQty
this.showMessage('发料数量不能大于叫料数量:' + item.handledQty)
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}
},
}
}
</script>

547
fe/PDA/pages/task/injectionIssueJobDetailByQty.vue

@ -0,0 +1,547 @@
<!-- 发料任务详情 -->
<template>
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail
:jobContent="datacontent"
:allCount="allCount"
:isShowScanHint="true"
scanHint="已发数"
:scanCount="scanCount"
:isShowOther="true"
:isShowShouRong="true"
:shouRongCount="shouRongCount"
>
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail" style="padding-bottom: 40rpx;">
<view class="" v-for="(item, index) in details" :key="index">
<view class="detail-list margin_top">
<!-- 单选卡片 -->
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="">
<uni-tr>
<uni-th width="100" align="center">
<text
style="font-weight:800; font-size: 35rpx; color: black; ">推荐</text>
</uni-th>
<uni-th width="120" align="center">来源</uni-th>
<uni-th width="120" align="center">目标</uni-th>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">库位</uni-td>
<uni-td width="120" align="center">
{{item.recommendFromLocationCode}}</uni-td>
<uni-td width="120" align="center">
{{item.recommendToLocationCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">数量({{item.uom}})</uni-td>
<uni-td width="120" align="center">{{item.recommendFromQty}}</uni-td>
<uni-td width="120" align="center">{{item.recommendToQty }}</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="">
<uni-tr>
<uni-th width="100" align="center">
<text
style="font-weight:800; font-size: 35rpx; color: black; ">实际</text></uni-th>
<uni-th width="120" align="center">来源</uni-th>
<uni-th width="120" align="center">目标</uni-th>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">库位</uni-td>
<uni-td width="120" align="center">
{{item.handledFromLocationCode}}</uni-td>
<uni-td width="120" align="center"> {{item.handledToLocationCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td width="100" align="center">数量({{item.uom}})</uni-td>
<uni-td width="120" align="center">{{item.tempHandledFromQty}}</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="comNumberBoxRef" v-model="item.tempHandledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</view>
</view>
</view>
</view>
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend"> 推荐</button>
</view>
</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="scan_float_top" @click="openScanPopup">
<image src="@/static/icons_ui/icon_scan_white.svg"></image>
<view>单件码</view>
</view>
</view>
<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 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 class="uni-flex uni-row new_btn_bot">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
<selectClickList ref="selectPopup" title="推荐信息" @select="selectPlan"></selectClickList>
<winScanLocationCode ref="locationFrom" title="来源库位" @getLocation="getFromLocation"></winScanLocationCode>
<winScanLocationCode ref="locationTo" title="目标库位" @getLocation="getToLocation"></winScanLocationCode>
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view>
</template>
<script>
import {
getKittingIssueDetail,
takeKittingIssueJob,
cancelTakeKittingIssueJob,
finshKittingIssueJob,
getCountByItemCode,
getRecommendBalance
} from '@/api/index.js';
import {
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome,
compareDesc,
compareStr,
getCurrDateTime,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButtonLeft from '@/mycomponents/wincom/winScanButtonLeft.vue'
import winScanButtonTop from '@/mycomponents/wincom/winScanButtonTop.vue'
import winScanButtonBottom from '@/mycomponents/wincom/winScanButtonBottom.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
winScanButtonLeft,
winScanButtonTop,
winScanButtonBottom,
winMulitScan,
comBalance,
comJobScanDetail,
winScanByPack,
comNumberBox,
winScanLocationCode,
winScanByProductCode,
selectClickList
},
data() {
return {
id: "",
datacontent: {},
details: [],
toLocation: '',
ispending: false,
allCount: 0,
scanCount:0,
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
singCode: "",
shouRongCount:null
}
},
props: {
itemCode: "",
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeKittingIssueJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
methods: {
openScanPopup() {
this.$refs.scanPackPopup.openScanPopup();
},
openLocationTo() {
this.$refs.locationTo.openScanPopup()
},
openLocationFrom() {
this.$refs.locationFrom.openScanPopup()
},
getFromLocation(locationInfo) {
var current = this.details[0]
if (locationInfo.code != current.recommendFromLocationCode) {
this.showMessage(" 扫描来源库位[" + locationInfo.code + "]与推荐来源库位[" + current
.recommendFromLocationCode + "]不一致,请重新扫描")
return;
}
current.handledFromLocationCode = locationInfo.code
current.handledFromLocationArea = locationInfo.locationArea
current.handledFromLocationGroup = locationInfo.locationGroup
current.handledFromLocationErpCode = locationInfo.locationErpCode
current.handledFromWarehouseCode = locationInfo.warehouseCode
current.handledFromPackingCode = ""
current.handledFromLot = ""
},
getToLocation(locationInfo) {
var current = this.details[0]
if (locationInfo.code != current.recommendToLocationCode) {
this.showMessage("扫描目标库位[" + locationInfo.code + "]与推荐目标库位[" + current
.recommendToLocationCode + "]不一致,请重新扫描")
return;
}
this.toLocationInfo = locationInfo
current.handledToLocationCode = locationInfo.code
current.handledToLocationArea = locationInfo.locationArea
current.handledToLocationGroup = locationInfo.locationGroup
current.handledToLocationErpCode = locationInfo.locationErpCode
current.handledToWarehouseCode = locationInfo.warehouseCode
current.handledToPackingCode = ""
current.handledToLot = ""
},
//
getDetail() {
let that = this;
if (that.id == undefined) {
return;
}
uni.showLoading({
title: '加载中...',
mask: true
})
let params = {
id: that.id,
};
getKittingIssueDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
that.details = item.details;
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
}
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details[0].recommendFromQty;
this.scanCount = that.details[0].handledToQty;
that.details[0].defaultHandleQty = that.details[0].handledFromQty;
that.details[0].tempHandledToQty =0
that.details[0].tempHandledFromQty =0
//
getCountByItemCode(that.details[0].itemCode).then(res => {
if (res) {
uni.hideLoading();
var qty = res.qty;
this.shouRongCount = qty;
this.details[0].tempHandledToQty = qty;
this.details[0].tempHandledFromQty = qty;
this.$forceUpdate()
} else {
this.showMessage("没有查找到[" + that.details[0].itemCode + "]的收容数")
}
}).catch(error => {
uni.hideLoading();
this.showMessage(error)
})
}
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
});
if (item == undefined) {
this.showMessage('在任务详情中,未找到物料号【' + result.itemCode + '】');
return;
}
this.singCode = result.itemCode
},
recommend(){
var itemCode =this.details[0].itemCode
var productLine =this.details[0].prodLine
if(!itemCode){
this.showMessage("物料为空")
return;
}
if(!productLine){
this.showMessage("生产线为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode,productLine,false).then(res=>{
uni.hideLoading()
if (res.length > 0) {
var list = [];
list = res.Result;
list.forEach(res => {
res.label = res.PLAN_NO;
res.value = res.SHIFT_CODE
})
this.$refs.selectPopup.openScanPopup(list)
}
else {
this.showMessage("推荐列表为0")
}
}).catch(error=>{
uni.hideLoading()
this.showMessage(error)
})
},
// //
receive(callback) {
let params = {
id: this.id
};
takeKittingIssueJob(params)
.then(res => {
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
});
},
submit() {
let that = this;
if (that.details.length === 0) {
this.showMessage('该任务没有零件');
return;
}
if (this.singCode == "") {
this.showMessage('请先扫描单件码');
return;
}
if (!that.details[0].handledFromLocationCode) {
this.showMessage('请先扫描来源库位');
return;
}
if (!that.details[0].handledToLocationCode) {
this.showMessage('请先扫描目标库位');
return;
}
if (that.details[0].itempHandledToQty == 0 || that.details[0].itempHandledToQty == "") {
this.showMessage('发料数量必须大于0');
return;
}
that.finsh();
},
finsh() {
let that = this;
uni.showLoading({
title: "提交中...",
mask: true
});
that.details[0].handledFromQty =that.details[0].tempHandledToQty
that.details[0].handledToQty =that.details[0].tempHandledToQty
let params = that.details[0];
finshKittingIssueJob(that.id, params.id, params)
.then(res => {
uni.hideLoading();
if (res != null) {
that.showCommitSuccessMessage();
}
})
.catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
clear() {
this.singCode == ""
this.getDetail();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
navigateBack(1)
uni.hideLoading();
},
closeScanPopup() {
this.$refs.scanPopupForm.closeScanPopup();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
this.$refs.scanPopupForm.getfocus();
},
qtyChanged(value, item, index) {
if (item.tempHandledToQty == 0) {
this.$refs.comNumberBoxRef[0].setValue(0);
this.showMessage('请先扫描单件码')
return;
}
if (value == 0) {
this.showMessage('发料数量必须大于0')
item.tempHandledToQty =item.tempHandledFromQty
this.$refs.comNumberBoxRef[0].setValue(item.tempHandledToQty);
return;
}
item.tempHandledFromQty =value;
console.log('item', item.tempHandledFromQty);
this.$forceUpdate();
},
}
}
</script>
<style scoped lang="scss">
.scan_float_top {
opacity: 0.4;
width: 110rpx;
height: 110rpx;
color: #000;
background-color: #5A7CF3;
border-radius: 50%;
text-align: center;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}
.scan_float_top image {
width: 40rpx;
height: 40rpx;
margin-top: 10rpx;
}
.scan_float_top view {
color: #fff;
font-size: .725rem;
margin-top: -8rpx;
}
</style>

169
fe/PDA/pages/task/injectionPlanJob.vue

@ -0,0 +1,169 @@
<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)">
<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 {
getInjectionPlanJobList,
} 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 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,
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: {
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 = [];
}
let params = {
pageSize: that.pageSize,
pageIndex: that.pageIndex,
// isCreationTimeSorting: that.isTimeWindowSorting,
// isToday: that.isToday
};
getInjectionPlanJobList(params)
.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: './injectionPlanJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

464
fe/PDA/pages/task/injectionPlanJobDetail.vue

@ -0,0 +1,464 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
</view>
<!-- <view class="uni-flex uni-row" style="background-color: #fff; padding: 20rpx; align-items: center;">
<view class="" style="font-size: 35rpx; font-weight: bold; margin-right: 10rpx;">
来源库位 :
</view>
<uni-data-select v-model="value" :localdata="range" @change="change" label="来源库位"></uni-data-select>
</view> -->
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
<view class="uni-flex uni-col" style="flex-direction: column">
<view class="" v-for="(item, index) in details" :key="index">
<view class="detail-list margin_top">
<!-- 单选卡片 -->
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form hold_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<!-- <uni-tr>
<uni-th width="70"></uni-th>
<uni-th width="120" align="center">推荐</uni-th>
<uni-th width="120" align="center"></uni-th>
</uni-tr> -->
<uni-tr>
<uni-th width="70">收容数</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{item.requestQty}}({{item.uom}})</text>
</view>
</uni-th>
<!-- -->
<!-- <uni-th width="120" align="center">
<view class="" v-if="item.scaned">
<com-number-box :ref="'comNumberBox_'+index"
v-model="item.handledQty" :max="99999" :min="0"
@change="qtyChanged($event,item,index)">
</com-number-box>
</view> -->
<!-- <view v-if="dataContent.scaned" class="text_black">
{{dataContent.handledQty}}({{dataContent.uom}})
</view> -->
<!-- </uni-th> -->
</uni-tr>
<uni-tr>
<uni-th width="70">来源库位</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.recommendFromLocationCode }}</view>
</uni-th>
<!-- <uni-th width="120" align="center">
<view class="">
<button v-if="item.scaned" type="primary" size="mini"
style="margin-left: 30rpx;"
@click="remove(dataContent,index)">移除</button>
</view>
</uni-th> -->
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<div class="new_bot_box">
<!-- <win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation'
@clear='clearDefaultLocation'>
</win-collapse-location> -->
<view class="new_btn_bot bot_pos uni-flex">
<!-- <button class="new_clear_btn btn_double" @click="cancel()">清空</button> -->
<button class="new_save_btn " style="width: 100%;" @click="submit()">提交</button>
</view>
</div>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view>
</template>
<script>
import {
getInjectionPlanDetail,
takeInjectionPlanJob,
cancelTakeInjectionPlanJob,
finshInjectionPlanJob,
locations
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
navigateBack
} from '@/common/basic.js';
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comProductCode from '@/mycomponents/coms/task/comProductCode.vue';
export default {
components: {
winScanButton,
winMulitScan,
winScanByPack,
comMessage,
comJobScanDetail,
winCollapseLocation,
winScanByProductCode,
comNumberBox,
comProductCode
},
data() {
return {
type: '',
id: "",
datacontent: {},
details: [],
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
ispending: false,
balancesItem: {},
titleArray: ['箱标签', '目标库位'],
allCount: 0,
scanCount: 0,
jobStatus: "",
toLocationInfo: null,
value: 0,
range: [{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
{
value: 0,
text: "篮球"
},
{
value: 1,
text: "足球"
},
{
value: 2,
text: "游泳"
},
],
}
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeInjectionPlanJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
methods: {
change(e) {
console.log("e:", e);
},
//
getDefaultToLocation(locationCode) {
uni.showLoading({
title: "扫描中",
mask: true
});
locations(locationCode).then(res => {
uni.hideLoading();
if (res) {
this.toLocationInfo = res
} else {
this.showMessage('目标库位【' + locationCode + '】不存在');
}
}).catch(err => {
uni.hideLoading();
this.toLocationInfo = null
this.showMessage(err.message);
})
},
clearDefaultLocation() {
this.toLocationInfo = null
},
remove(item, index) {
showConfirmMsg("是否移除当前【" + item.itemCode + "】扫描信息", res => {
if (res) {
item.scaned = false;
item.handledQty = null;
this.getScanCount()
}
})
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('收货货数量必须大于0')
item.qty = item.handledQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
}
},
openScanPopup() {
this.$refs.scanPackPopup.openScanPopup();
},
//
getDetail() {
let that = this;
let params = {
id: that.id,
};
getInjectionPlanDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
that.details.forEach(res => {
res.scaned = false;
})
that.ispending = item.jobStatus === 2;
that.allCount = item.details.length;
// that.toLocation = item.details[0].recommendLocationCode;
})
.catch(err => {
this.showMessage('未查找到详细信息')
});
},
//
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
});
if (item === undefined) {
this.showMessage('在任务详情中,未找到物料号【' + result.itemCode + '】');
return;
} else {
if (item.scaned) {
this.showMessage('物料号【' + result.itemCode + '】已经扫描,请扫描下一箱零件');
return;
} else {
item.scaned = true;
item.handledQty = item.recommendQty;
this.getScanCount()
setTimeout(res => {
this.$forceUpdate()
}, 1000)
}
}
},
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
cancel() {
showConfirmMsg("是否清除已经扫描的数据?", res => {
if (res) {
this.getDetail();
}
})
},
//
receive(callback) {
let params = {
id: this.id
};
takeInjectionPlanJob(params)
.then(res => {
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
});
},
submit() {
this.finsh();
},
finsh() {
uni.showLoading({
title: "提交中..."
});
this.setParams();
let params = JSON.stringify(this.datacontent);
console.log("提交", params);
finshInjectionPlanJob(this.id, params)
.then(res => {
uni.hideLoading();
if (res != null) {
this.showCommitSuccessMessage();
}
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
},
setParams() {
this.datacontent.details.forEach(res => {
res.handledFromContainerCode = res.recommendFromContainerCode;
res.handledFromPackingCode = res.recommendFromPackingCode;
res.handledFromSupplierBatch = res.recommendFromSupplierBatch;
res.handledFromArriveDate = res.recommendFromArriveDate;
res.handledFromProduceDate =res.recommendFromProduceDate;
res.handledFromExpireDate = res.recommendFromExpireDate;
res.handledFromLot = res.recommendFromLot;
res.handledFromLocationCode = res.recommendFromLocationCode;
res.handledFromLocationArea = res.recommendFromLocationArea;
res.handledFromLocationGroup = res.recommendFromLocationGroup;
res.handledFromLocationErpCode = res.recommendFromLocationErpCode;
res.handledFromWarehouseCode = res.recommendFromWarehouseCode;
res.handledFromQty =res.recommendFromQty;
res.handledToContainerCode = res.recommendToContainerCode;
res.handledToPackingCode = res.recommendToPackingCode;
res.handledToSupplierBatch = res.recommendToSupplierBatch;
res.handledToArriveDate = res.recommendToArriveDate;
res.handledToProduceDate = res.recommendToProduceDate;
res.handledToExpireDate =res.recommendToExpireDate;
res.handledToLot = res.recommendToLot;
res.handledToLocationCode = res.recommendToLocationCode;
res.handledToLocationArea = res.recommendToLocationArea;
res.handledToLocationGroup = res.recommendToLocationGroup;
res.handledToLocationErpCode = res.recommendToLocationErpCode;
res.handledToWarehouseCode = res.recommendToWarehouseCode;
res.handledToQty = res.recommendToQty
})
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
navigateBack(1); //
uni.hideLoading();
},
clearScanLocation() {
// this.$refs.scanLocation.getfocus();
// this.$refs.scanLocation.clear();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop;
},
}
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save