Browse Source

三方库发货和收货

pda_nev
李俊城 1 year ago
parent
commit
0817c935cc
  1. 49
      fe/PDA/api/index.js
  2. 185
      fe/PDA/components/uni-section/uni-section.vue
  3. 4
      fe/PDA/mycomponents/common/comMessage.vue
  4. 97
      fe/PDA/mycomponents/coms/task/comProductCode.vue
  5. 68
      fe/PDA/mycomponents/coms/task/comThird.vue
  6. 4
      fe/PDA/pages.js
  7. 4
      fe/PDA/pages.json
  8. 133
      fe/PDA/pages/container/containerCall.vue
  9. 2
      fe/PDA/pages/index/index.vue
  10. 482
      fe/PDA/pages/plastics/plasticsCompleteReceive.vue
  11. 26
      fe/PDA/pages/record/productionReturn.vue
  12. 97
      fe/PDA/pages/request/thirdLocationRequest.vue
  13. 3
      fe/PDA/pages/task/receipt_detail.vue
  14. 2
      fe/PDA/pages/task/receipt_result.vue
  15. 14
      fe/PDA/pages/task/thirdLocation.vue
  16. 389
      fe/PDA/pages/task/thirdLocationDetail.vue

49
fe/PDA/api/index.js

@ -1422,9 +1422,56 @@ export const finshContainerJob = (id, params) => request(
}) })
//生产退库详情 //生产退库详情
export const customerReturn = (params) => request( export const customerReturnCommit = (params) => request(
devUrl + "/api/pda/job/production-return", { // devUrl + "/api/pda/job/production-return", { //
method: "post", method: "post",
data: params, data: params,
}); });
//三方库发货申请
export const thirdLocationRequest = (params) => request(
devUrl + "/api/pda/store/third-location-request", { //
method: "post",
data: params,
});
//三方库收货任务列表
export const getThirdLocationList = (params) => request(
devUrl + "/api/pda/job/third-location/list", {
method: 'get',
data: params
});
//根据Number 获取三方库收货任务
export const getThirdLocationJobByNumber = (number) => request(
devUrl + "/api/pda/job/third-location/by-number/" + number, {
data: {},
method: "get"
});
//承接三方库收货任务
export const takeThirdLocationJob = (params) => request(
devUrl + "/api/pda/job/third-location/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接三方库收货任务
export const cancelTakeThirdLocationJob = (id) => request(
devUrl + "/api/pda/job/third-location/cancel-take/" + id, { //
data: {},
method: "post"
});
//提交三方库收货任务
export const finshThirdLocationJob = (id, params) => request(
devUrl + "/api/pda/job/third-location/finish/" + id, { //
data: params,
method: "post"
})
//三方库收货任务详情
export const getThirdLocationDetail = (params) => request(
devUrl + "/api/pda/job/third-location/" + params.id, { //
data: {},
method: "get"
});

185
fe/PDA/components/uni-section/uni-section.vue

@ -1,30 +1,46 @@
<template> <template>
<view class="uni-section" nvue> <view class="uni-section">
<view v-if="type" class="uni-section__head"> <view class="uni-section-header" @click="onClick">
<view :class="type" class="uni-section__head-tag" /> <view class="uni-section-header__decoration" v-if="type" :class="type" />
<slot v-else name="decoration"></slot>
<view class="uni-section-header__content">
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
</view>
<view class="uni-section-header__slot-right">
<slot name="right"></slot>
</view>
</view> </view>
<view class="uni-section__content">
<text :class="{'distraction':!subTitle}" class="uni-section__content-title">{{ title }}</text> <view class="uni-section-content" :style="{padding: _padding}">
<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text> <slot />
</view> </view>
<slot />
</view> </view>
</template> </template>
<script> <script>
/** /**
* Section 标题栏 * Section 标题栏
* @description 标题栏 * @description 标题栏
* @property {String} type = [line|circle] 标题装饰类型 * @property {String} type = [line|circle|square] 标题装饰类型
* @value line 竖线 * @value line 竖线
* @value circle 圆形 * @value circle 圆形
* @value square 正方形
* @property {String} title 主标题 * @property {String} title 主标题
* @property {String} titleFontSize 主标题字体大小
* @property {String} titleColor 主标题字体颜色
* @property {String} subTitle 副标题 * @property {String} subTitle 副标题
* @property {String} subTitleFontSize 副标题字体大小
* @property {String} subTitleColor 副标题字体颜色
* @property {String} padding 默认插槽 padding
*/ */
export default { export default {
name: 'UniSection', name: 'UniSection',
emits: ['click'], emits:['click'],
props: { props: {
type: { type: {
type: String, type: String,
@ -32,16 +48,43 @@
}, },
title: { title: {
type: String, type: String,
required: true,
default: '' default: ''
}, },
titleFontSize: {
type: String,
default: '14px'
},
titleColor:{
type: String,
default: '#333'
},
subTitle: { subTitle: {
type: String, type: String,
default: '' default: ''
},
subTitleFontSize: {
type: String,
default: '12px'
},
subTitleColor: {
type: String,
default: '#999'
},
padding: {
type: [Boolean, String],
default: false
} }
}, },
data() { computed:{
return {} _padding(){
}, if(typeof this.padding === 'string'){
return this.padding
}
return this.padding?'1px':''
}
},
watch: { watch: {
title(newVal) { title(newVal) {
if (uni.report && newVal !== '') { if (uni.report && newVal !== '') {
@ -49,77 +92,77 @@
} }
} }
}, },
methods: { methods: {
onClick() { onClick() {
this.$emit('click') this.$emit('click')
} }
} }
} }
</script> </script>
<style scoped> <style lang="scss" >
$uni-primary: #2979ff !default;
.uni-section { .uni-section {
position: relative; background-color: #fff;
/* #ifndef APP-NVUE */ // background-color: #2979ff;
display: flex; .uni-section-header {
/* #endif */ position: relative;
margin-top: 10px; /* #ifndef APP-NVUE */
flex-direction: row; display: flex;
align-items: center; /* #endif */
padding: 0 10px; flex-direction: row;
height: 50px; align-items: center;
background-color: #f8f8f8; padding: 2px 1px;
/* #ifdef APP-NVUE */ font-weight: normal;
/* #endif */
font-weight: normal;
}
/* #ifndef APP-NVUE */ &__decoration{
/* #endif */ margin-right: 6px;
.uni-section__head { background-color: $uni-primary;
flex-direction: row; &.line {
justify-content: center; width: 4px;
align-items: center; height: 12px;
margin-right: 10px; border-radius: 10px;
} }
.line { &.circle {
height: 15px; width: 8px;
background-color: #c0c0c0; height: 8px;
border-radius: 5px; border-top-right-radius: 50px;
width: 3px; border-top-left-radius: 50px;
} border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
}
.circle { &.square {
width: 8px; width: 8px;
height: 8px; height: 8px;
border-top-right-radius: 50px; }
border-top-left-radius: 50px; }
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
background-color: #c0c0c0;
}
.uni-section__content { &__content {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
/* #endif */ /* #endif */
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
color: #333; color: #333;
}
.uni-section__content-title { .distraction {
font-size: 14px; flex-direction: row;
color: #333; align-items: center;
} }
&-sub {
margin-top: 2px;
}
}
.distraction { &__slot-right{
flex-direction: row; font-size: 14px;
align-items: center; }
} }
.uni-section__content-sub { .uni-section-content{
font-size: 12px; font-size: 14px;
color: #999; }
} }
</style> </style>

4
fe/PDA/mycomponents/common/comMessage.vue

@ -98,14 +98,14 @@
openMessage(content, type) { openMessage(content, type) {
this.content = content; this.content = content;
this.type = type; this.type = type;
this.$refs['popupMessage'].open("center"); this.$refs.popupMessage.open("center");
}, },
closeMessage() { closeMessage() {
this.confirmResult = false; this.confirmResult = false;
clearInterval(this.timer) //timer clearInterval(this.timer) //timer
this.$refs['popupMessage'].close(); this.$refs.popupMessage.close();
this.afterClose(); this.afterClose();
}, },

97
fe/PDA/mycomponents/coms/task/comProductCode.vue

@ -0,0 +1,97 @@
<template>
<view>
<view class="detail-list margin_top" >
<!-- 单选卡片 -->
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ dataContent.itemCode }}</view>
<view class="ljh_left">
<view class="font_xs text_lightblue">{{ dataContent.itemName }}</view>
<view class="font_xs text_lightblue">{{ dataContent.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">{{dataContent.recommendQty}}({{dataContent.uom}})</text>
</view>
</uni-th>
<!-- -->
<uni-th width="120" align="center">
<view class="" v-if="dataContent.scaned">
<com-number-box :ref="'comNumberBox_'+index" v-model="dataContent.handledQty"
:max="99999" :min="0" @change="qtyChanged($event,dataContent,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">{{ dataContent.recommendFromLocationCode }}</view>
</uni-th>
<uni-th width="120" align="center">
<view class="">
<button v-if="dataContent.scaned" type="primary" size="mini"
style="margin-left: 30rpx;" @click="remove(dataContent,index)">移除</button>
</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
{{dataContent.scaned}}
<view class="choose_marked" v-if="dataContent.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
dataContent: {
type: Object,
value: {}
}
},
watch:{
dataContent: {
handler(newName, oldName) {
this.dataContent=newName;
},
immediate: true,
deep: true
}
},
methods: {
remove() {
this.$emit("remove", dataContent)
}
}
}
</script>
<style>
</style>

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

@ -0,0 +1,68 @@
<!--发料任务卡片-->
<template>
<view class="device-detail">
<view class="card_task nopad">
<com-job-top-info :jobContent="dataContent"></com-job-top-info>
</view>
<view class="margin_xs_bottom">
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image>
<text>{{dataContent.requestNumber}}</text>
<!-- <text>申请单{{dataContent.deliverRequestNumber}}</text> -->
</view>
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_customer.svg"></image>
<text>{{dataContent.worker}}</text>
<!-- <text>客户{{dataContent.customerCode}}</text> -->
</view>
</view>
<view class="uni-flex uni-row receipt_bot">
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_date.svg">
</image>
<text
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text>
</view>
</view>
</view>
</template>
<script>
import {
getJobStatuStyle,
getJobStatuDesc,
dateFormat
} from '@/common/basic.js';
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default {
name: "comDeliver",
components: {
comJobTopInfo
},
data() {
return {};
},
//
props: {
dataContent: {
type: Object,
value: null
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
},
formatDate: function(val) {
return dateFormat(val)
}
},
}
</script>
<style scoped lang="scss">
</style>

4
fe/PDA/pages.js

@ -626,7 +626,7 @@ module.exports = () => ({
} }
}, },
{ {
"path": "pages/record/thirdLocationDeviler", "path": "pages/request/thirdLocationRequest",
"style": { "style": {
"navigationBarTitleText": "三方库发货", "navigationBarTitleText": "三方库发货",
"enablePullDownRefresh": true "enablePullDownRefresh": true
@ -643,7 +643,7 @@ module.exports = () => ({
"path": "pages/task/thirdLocationDetail", "path": "pages/task/thirdLocationDetail",
"style": { "style": {
"navigationBarTitleText": "三方库收货详情", "navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
} }

4
fe/PDA/pages.json

@ -604,7 +604,7 @@
} }
}, },
{ {
"path": "pages/record/thirdLocationDeviler", "path": "pages/request/thirdLocationRequest",
"style": { "style": {
"navigationBarTitleText": "三方库发货", "navigationBarTitleText": "三方库发货",
"enablePullDownRefresh": true "enablePullDownRefresh": true
@ -621,7 +621,7 @@
"path": "pages/task/thirdLocationDetail", "path": "pages/task/thirdLocationDetail",
"style": { "style": {
"navigationBarTitleText": "三方库收货详情", "navigationBarTitleText": "三方库收货详情",
"enablePullDownRefresh": true "enablePullDownRefresh": false
} }
} }

133
fe/PDA/pages/container/containerCall.vue

@ -1,53 +1,78 @@
<template> <template>
<view class=""> <view class="">
<!-- <view class="" style="width: 100%; background-color: #fff;">
<uni-section title="1.物流类型" subTitle="内物流" subTitleFontSize="32rpx" titleFontSize="40rpx"
type="line" padding>
</uni-section>
</view>
<view class="" style="width: 100%; background-color: #fff;">
<uni-section title="2.器具规格" subTitleFontSize="32rpx" titleFontSize="40rpx"
type="line" padding>
</uni-section>
</view>
-->
<view class="uni-list">
<view class="uni-list-cell"
style="padding-left: 15rpx; padding-top: 20rpx;padding-bottom:20rpx; padding-right: 15rpx; ; align-items: center; display: flex;">
<view class="" style="color: red; font-size: 40rpx; ">
*
</view>
<view class="uni-list-cell-left"
style="font-size:35rpx; align-items: center;display: flex; text-align: center;font-weight: bold;">
呼叫库位 :
</view>
<view class="uni-list-cell-db" style="font-size:35rpx" @click="openScanLocation">
<text>{{locationCode}}</text>
<text v-if="locationName!=''">({{locationName}})</text>
</view>
</view>
</view>
<view class="uni-list"> <view class="uni-list">
<view class="uni-list-cell " style="padding:10rpx; "> <view class="uni-list-cell " style="padding:10rpx; ">
<view class="" style="color: red; font-size: 40rpx; "> <view class="" style="color: red; font-size: 40rpx; ">
* *
</view> </view>
<view class="uni-list-cell-left" style="font-size:35rpx"> <view class="uni-list-cell-left" style="font-size:35rpx;font-weight: bold;">
器具类型 : 器具类型 :
</view> </view>
<view class="uni-list-cell-db"> <view class="uni-list-cell-db" style="font-size: 35rpx;">
<picker @change="containerTypeChange" :value="typeIndex" :range="containerTypeList" 内物流
range-key="name">
<view class="uni-input" style="font-size:35rpx">{{containerType}}</view>
</picker>
</view> </view>
</view> </view>
</view> </view>
<view class="uni-list"> <view class="uni-list">
<view class="uni-list-cell" style="padding:10rpx"> <view class="uni-flex uni-row" style="padding:10rpx">
<view class="" style="color: red; font-size: 40rpx; "> <view class="" style="color: red; font-size: 40rpx; ">
* *
</view> </view>
<view class="uni-list-cell-left" style="font-size:35rpx"> <view class="uni-list-cell-left" style="font-size:35rpx;font-weight: bold;">
器具规格 : 器具规格 :
</view> </view>
<view class="uni-list-cell-db">
<picker @change="containerModelChange" :value="modelIndex" :range="containerModelList"
range-key="name">
<view class="uni-input" style="font-size:35rpx">{{containerModel}}</view>
</picker>
</view>
</view> </view>
</view>
<view class="uni-list"> <view class="uni-list-cell-db" style="margin-bottom: 20rpx;">
<view class="uni-list-cell" <!-- <picker @change="containerModelChange" :value="modelIndex" :range="containerModelList"
style="padding-left: 15rpx; padding-top: 20rpx;padding-bottom:20rpx; padding-right: 15rpx; ; align-items: center; display: flex;"> range-key="name">
<view class="" style="color: red; font-size: 40rpx; "> <view class="uni-input" style="font-size:35rpx">{{containerModel}}</view>
* </picker> -->
</view>
<view class="uni-list-cell-left" <view class="uni-flex uni-row" style="flex-wrap: wrap;">
style="font-size:35rpx; align-items: center;display: flex; text-align: center;"> <view class="uni-flex" style=" width: 33.3%; justify-content: center; margin-top: 20rpx; "
呼叫库位 : v-for="(item, index) in containerModelList" :key="index">
</view> <uni-tag :inverted="!item.checked" :circle="true" :text="item.name" type="primary"
<view class="uni-list-cell-db" style="font-size:35rpx" @click="openScanLocation"> @click="setContainerModel(item)" />
<text>{{locationCode}}</text>
<text v-if="locationName!=''">({{locationName}})</text> <!-- <u-radio size="45" labelSize="35" iconSize="40" :name="radio.name" @change="radioChangeType3(item,radio)">
{{radio.name}}
</u-radio> -->
</view>
</view> </view>
</view> </view>
</view> </view>
<view class="new_btn_bot"> <view class="new_btn_bot">
<button class="new_save_btn" @click="submit()">提交</button> <button class="new_save_btn" @click="submit()">提交</button>
</view> </view>
@ -78,22 +103,20 @@
}, },
data() { data() {
return { return {
containerTypeList: [],
containerModelList: [], containerModelList: [],
typeIndex: 0, typeIndex: 0,
modelIndex: 0, modelIndex: 0,
location: "", location: "",
locationCode: "请扫描库位", locationCode: "请扫描库位",
locationName: "", locationName: "",
containerType: "请选择器具类型", containerType: "内物流",
containerTypeCode: "", containerTypeCode: "InLogistics",
containerModel: "请选择器具规格", containerModel: "请选择器具规格",
containerModelCode: "" containerModelCode: ""
} }
}, },
onShow() { onShow() {
this.getContainerModelList(); this.getContainerModelList();
this.containerTypeList = getContainerTypeArray();
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
@ -104,30 +127,24 @@
} }
}, },
methods: { methods: {
setContainerModel(item) {
this.containerModelList.forEach(res => {
res.checked = false
})
item.checked = true;
this.containerModelCode =item.code;
},
getContainerModelList() { getContainerModelList() {
getDictByCode("ContainerSpecificationsType").then(res => { getDictByCode("ContainerSpecificationsType").then(res => {
res.items.forEach(item => { res.items.forEach(item => {
item.value = item.code; item.value = item.code;
item.checked = false
}) })
this.containerModelList = res.items; this.containerModelList = res.items;
}).catch(error => { }).catch(error => {
}) })
}, },
containerTypeChange(e) {
this.typeIndex = e.detail.value
var select = this.containerTypeList[this.typeIndex];
this.containerType = select.name
this.containerTypeCode = select.value
console.log(select)
},
containerModelChange(e) {
this.modelIndex = e.detail.value
var select = this.containerModelList[this.modelIndex];
this.containerModel = select.name
this.containerModelCode = select.value
console.log(select)
},
openScanLocation() { openScanLocation() {
this.$refs.scanLocation.openScanPopup() this.$refs.scanLocation.openScanPopup()
}, },
@ -172,14 +189,10 @@
this.$refs.scanLocation.losefocus(); this.$refs.scanLocation.losefocus();
}, },
clearData() { clearData() {
this.containerType = "请选择器具类型"
this.containerModel = "请选择器具规格";
this.locationCode = "请扫描库位"
this.locationName ="";
this.containerTypeCode = ""
this.containerModelCode = "" this.containerModelCode = ""
this.modelIndex =0; this.containerModelList.forEach(res=>{
this.typeIndex =0; res.checked = false
});
}, },
@ -190,18 +203,13 @@
containerType: this.containerTypeCode, containerType: this.containerTypeCode,
specificationsType: this.containerModelCode, specificationsType: this.containerModelCode,
requestLocationCode: this.locationCode, requestLocationCode: this.locationCode,
} }
return data; return data;
}, },
submit() { submit() {
if (this.containerType == "请选择器具类型") { if (this.containerModelCode == "") {
this.showMessage("请选择器具类型")
return;
}
if (this.containerModel == "请选择器具规格") {
this.showMessage("请选择器具规格") this.showMessage("请选择器具规格")
return; return;
} }
@ -210,15 +218,12 @@
this.showMessage("请扫描库位") this.showMessage("请扫描库位")
return; return;
} }
console.log(this.containerTypeCode)
console.log(this.containerModelCode)
console.log(this.locationCode)
uni.showLoading({ uni.showLoading({
title: '提交中...', title: '提交中...',
mask: true mask: true
}); });
var params = this.setParams(); var params = this.setParams();
console.log(JSON.stringify(params))
containerRequest(params).then(res => { containerRequest(params).then(res => {
uni.hideLoading(); uni.hideLoading();
this.showMessage("提交成功"); this.showMessage("提交成功");

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

@ -179,7 +179,7 @@
if (sessionStorage.hasLogin !== 'true') { if (sessionStorage.hasLogin !== 'true') {
uni.showModal({ uni.showModal({
title: '未登录', title: '未登录',
content: '您未登录需要登录后才能继续', // content: '您未登录,需要登录后才能继续', //
showCancel: !this.forcedLogin, showCancel: !this.forcedLogin,
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {

482
fe/PDA/pages/plastics/plasticsCompleteReceive.vue

@ -1,176 +1,408 @@
<template> <template>
<view style="padding: 15rpx;"> <page-meta root-font-size="18px"></page-meta>
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button" <view class="">
activeColor="#007AFF"></uni-segmented-control> <win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<view class="content"> <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
<view v-show="current === 0"> @scrolltolower="lower" @scroll="scroll" style="padding-bottom:150px">
<win-empty-view v-if="dataList.length==0"></win-empty-view> <view class="detail-list " v-for="(item, index) in itemList" :key="index">
<view class="" v-for="(item, index) in dataList"> <view class="detail-content">
<view class="device-detail"> <view class="" style="">
<view>物料:</view> <view class="uni-flex uni-row u-col-center">
<view>零件:</view> <view class="" style="margin-top: 20rpx; margin-left: 10rpx; font-weight: bold;">
<button type="primary" style="width: 140rpx; font-size: 32rpx; float: right;" >完成</button> ({{index+1}}).
</view> </view>
</view> <comItemCode :itemData="item"></comItemCode>
选项卡1的内容
</view>
<view v-show="current === 1">
<win-empty-view v-if="dataList.length==0"></win-empty-view>
<view class="" v-for="(item, index) in dataList">
<view class="" v-for="(item, index) in dataList">
<view class="device-detail">
<view>物料:</view>
<view>零件:</view>
<button type="primary" style="width: 140rpx; font-size: 32rpx; float: right;" >完成</button>
</view> </view>
<uni-table border stripe style="">
<!-- <uni-tr>
<uni-td align="center">物品代码</uni-td>
<uni-td>{{item.itemCode}}</uni-td>
</uni-tr> -->
<uni-tr>
<uni-td align="center">单位</uni-td>
<uni-td>{{item.uom}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">标包数</uni-td>
<uni-td>{{item.stdPackQty}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">来源库位</uni-td>
<uni-td>{{item.fromLocationCode}}</uni-td>
</uni-tr>
<uni-tr>
<uni-td align="center">数量</uni-td>
<uni-td>
<view class="uni-flex uni-row">
<view class="uni-flex uni-row space-between" style="width: 100%;">
<view class="">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="99999" :min="0" @change="qtyChanged($event,item,index)">
</com-number-box>
</view>
<view class="">
<button type="primary" size="mini" style="margin-left: 30rpx;"
@click="remove(item,index)">移除</button>
</view>
</view>
</view>
</uni-td>
</uni-tr>
</uni-table>
</view> </view>
</view> </view>
选项卡2的内容
</view> </view>
</view> </scroll-view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" />
<div class="new_bot_box" v-show="itemList.length>0">
<win-collapse-location ref="location" @getLocationCode='getToLocation' @clear='clear'>
</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="itemList.length>0"></win-scan-button>
<winScanByProductCode ref="scanPackPopup" title="产品编码" @getScanResult='getScanResult'></winScanByProductCode>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterClose='afterCloseMessagg'></com-message>
</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
getPlasticsList, locations,
getBalancesByFilter,
completeTransfer
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
goHome showConfirmMsg,
goHome,
getRemoveOption
} from '@/common/basic.js'; } from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import comBalanceItem from '@/mycomponents/comItem/comBalanceItem.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import comItemCode from '@/mycomponents/comItem/comItemCode.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
export default { export default {
name: 'comtransfer',
components: { components: {
winEmptyView winBlankView,
comBalanceItem,
comMessage,
winScanButton,
comBalance,
winCollapseLocation,
winScanByProductCode,
comItemCode,
comNumberBox
}, },
data() { data() {
return { return {
items: ['已完成', '未完成'], options: [],
current: 0, itemList: [],
pageSize: this.modelConfig, fromLocationCode: '',
pageIndex: 1, toLocationCode: '',
loadingType: "nomore", scrollTop: 0,
dataList:[] old: {
scrollTop: 0
},
inventoryStatus: -1,
inventoryStatusArray: [],
isClearPackCode: false, //
isClearContainerCode: false, //
isClearLot: false, //,
locationErpCode: '',
toLocationErpCode: '',
locationGotFocus: false
}; };
}, },
props: {
onShow() { // locationTypes: {
this.getList('refresh'); // type: [Array, String, Number],
}, // value: ''
onReachBottom() { // },
// byLocation: {
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { type: Boolean,
return; value: false
} },
this.getList("more"); transferType: {
}, type: String,
onPullDownRefresh() { value: 'Transfer_Inside' //Transfer_Inside: Transfer_Area:
this.getList('refresh');
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
} }
goHome();
return true;
}, },
//
onNavigationBarButtonTap(e) { watch: {},
if (e.index === 0) { mounted: function() {
goHome(); this.openScanPopup();
} else if (e.index === 1) { this.options = getRemoveOption();
window.location.reload();
}
}, },
methods: { methods: {
onClickItem(item){
this.current = item.currentIndex;
console.log("点击",this.current)
this.getList("refresh");
},
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPackPopup.openScanPopup()
},
//?
swipeClick(e, index) {
let {
content
} = e;
if (content.text === '移除') {
uni.showModal({
title: '提示',
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
this.itemList.splice(index, 1);
}
}
});
}
}, },
// getScanResult(result) {
getList(type) {
let that = this; let that = this;
uni.showLoading({ let code = result.itemCode;
title: "加载中....", let datas = that.itemList.filter(r => {
mask: true return r.itemCode == code
}); })
this.loadingType = "loading";
if (type === "refresh") { if (datas.length > 0) {
this.pageIndex = 1; showConfirmMsg('物料【' + code + '】已经存在,是否要重新扫描?', confirm => {
this.dataList = []; if (confirm) {
} that.itemList.forEach((r, i) => {
let params = { if (r.packingCode == code) {
pageSize: that.pageSize, that.itemList.splice(i, 1);
pageIndex: that.pageIndex, return;
// isCreationTimeSorting: that.isTimeWindowSorting, }
// isToday: that.isToday });
}; // that.getBalance(code);
getPlasticsList(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.dataList = [...that.dataList, ...list];
that.dataList = type === "refresh" ? list : this.dataList.concat(list);
that.pageIndex++;
})
.catch(err => {
this.loadingType = "";
this.showMessage(err.message);
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
} }
}); });
} else {
var item ={
itemCode: result.itemCode,
itemName: result.itemName,
itemDesc1: result.itemDesc1,
stdPackQty: result.stdPackQty,
uom: result.uom,
qty: result.stdPackQty,
fromLocationCode:"Z1C1"
}
this.itemList.unshift(item);
}
}, },
getScanResult(type, result) { qtyChanged(value, item, index) {
if (type == '任务编号') { if (value <= 0) {
this.getByNumber(type, result.data.code); this.showMessage('退货数量必须大于0')
item.handledQty = item.qty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} }
}, },
getByNumber(type, code) { getToLocation(code) {
let that = this; if (code == '') {
this.showMessage('目标库位不能为空');
return;
}
uni.showLoading({ uni.showLoading({
title: "加载中....", title: "扫描中",
mask: true mask: true
}); });
getDeliverJobByNumber(code).then(res => { let that = this;
uni.hideLoading(); locations(code).then(res => {
if (res != null) { if (res == null) {
that.openDetail(res); that.toLocationCode = ''
that.showMessage('目标库位【' + code + '】不存在');
this.$refs.location.clearLocation()
this.locationGotFocus = true;
} else { } else {
that.showMessage('未查找到' + type + '为【' + code + '】的盘点任务'); if (that.transferType == 'Transfer_Inside') //
{
if (that.locationErpCode != res.erpLocationCode) {
that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' + this
.locationErpCode +
'】不是同一ERP储位,请重新扫描目标库位');
that.toLocationCode = ''
that.$refs.location.clearLocation();
this.locationGotFocus = true;
} else {
that.toLocationCode = code;
that.toLocationErpCode = res.erpLocationCode;
}
} else //
{
let items = that.itemList.filter(r => {
return r.fromLocationErpCode == res.erpLocationCode;
})
if (items.length > 0) {
let msg = '';
for (var i = 0; i < items.length; i++) {
let r = items[i];
msg += (i == 0 ? '' : ',') + r.fromPackingCode
}
that.showMessage('【' + msg + '】所在ERP储位与目标库位的ERP储位【' + res
.erpLocationCode + '】相同,请重新扫描目标库位');
that.toLocationCode = ''
that.$refs.location.clearLocation();
this.locationGotFocus = true;
} else {
that.toLocationCode = res.code;
that.toLocationErpCode = res.erpLocationCode;
}
}
} }
uni.hideLoading();
}).catch(err => { }).catch(err => {
that.toLocationCode = ''
this.locationGotFocus = true;
that.showMessage(err.message); that.showMessage(err.message);
uni.hideLoading(); uni.hideLoading();
}); })
},
clear() {
this.location = null;
this.toLocationCode = "";
}, },
openDetail(item) { submit() {
uni.navigateTo({ let that = this;
url: './plasticsInventoryMoveDetail?id=' + item.id + '&jobStatus=' + item.jobStatus if (that.itemList.length === 0) {
this.showMessage('请选择要提交的零件');
return;
}
if (that.toLocationCode === '') {
this.showMessage('请扫描目标库位');
return;
}
uni.showLoading({
title: "提交中....",
mask: true
}); });
let item = {
worker: localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
warehouseCode: localStorage.warehouseCode,
jobNumber: "",
supplierCode: "",
company: localStorage.company,
number: "",
type: this.transferType,
details: []
}
that.itemList.forEach(r => {
r.toLocationCode = that.toLocationCode;
r.toLocationErpCode = this.toLocationErpCode
r.worker = localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN
item.details.push(r);
})
let params = JSON.stringify(item);
console.log('params', params);
completeTransfer(params)
.then(res => {
that.showCommitSuccess();
that.clearInfo();
uni.hideLoading();
})
.catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
cancel() {
let that = this;
showConfirmMsg('是否要清空已扫描的零件和目标库位信息?', confirm => {
if (confirm) {
that.clearInfo();
}
})
},
clearInfo() {
let that = this;
that.itemList = [];
that.toLocationCode = '';
that.inventoryStatus = -1;
},
afterCloseMessagg() {
if (this.locationGotFocus) {
this.$refs.location.gotFocus();
}
},
clearPackCode() {
this.isClearPackCode = !this.isClearPackCode;
},
clearContainerCode() {
this.isClearContainerCode = !this.isClearContainerCode;
},
clearLot() {
this.isClearLot = !this.isClearLot;
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message); this.$refs.comMessage.showMessage(message);
}, },
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
} }
}; };
</script> </script>
<style scoped lang="scss">
/deep/ .input-value {
font-size: 16px;
}
/deep/ .uni-collapse-item__title-text {
font-size: 16px;
}
/deep/ .uni-collapse-item--border {
border-bottom-width: 0px;
border-bottom-color: #ebeef5;
}
/deep/ .uni-collapse-item--border {
border-bottom-width: 1px;
border-bottom-color: #ebeef5;
}
</style>

26
fe/PDA/pages/record/productionReturn.vue

@ -121,8 +121,8 @@
options: [], options: [],
currentItem: {}, currentItem: {},
showList: [], showList: [],
defaultToLocation: {}, toLocationInfo:{},
defaultToLocationCode: "", toLocationCode: "",
allCount: 0, allCount: 0,
allDataList: [], allDataList: [],
loadingType: "", loadingType: "",
@ -253,24 +253,23 @@
locations(locationCode).then(res => { locations(locationCode).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res) { if (res) {
this.defaultToLocation = res; this.toLocationInfo =res;
this.defaultToLocationCode = res.code this.toLocationCode = res.code
} else { } else {
this.showMessage('目标库位【' + locationCode + '】不存在'); this.showMessage('目标库位【' + locationCode + '】不存在');
} }
}).catch(err => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();
this.defaultToLocation = {}; this.toLocationInfo={}
this.defaultToLocationCode = "" this.toLocationCode = ""
this.showMessage(err.message); this.showMessage(err.message);
}) })
}, },
clearDefaultLocation() { clearDefaultLocation() {
this.defaultToLocationCode = "" this.toLocationCode = ""
this.defaultToLocation = {};
}, },
submit() { submit() {
@ -279,7 +278,7 @@
return; return;
} }
if (this.defaultToLocationCode == "") { if (this.toLocationCode == "") {
this.showMessage('请扫描目标库位'); this.showMessage('请扫描目标库位');
return; return;
} }
@ -335,7 +334,10 @@
uom: res.uom, uom: res.uom,
qty: res.qty, qty: res.qty,
stdPackQty: res.stdPackQty, stdPackQty: res.stdPackQty,
toLocationCode:this.defaultToLocationCode toLocationCode:this.toLocationCode,
toLocationArea:this.toLocationInfo.areaCode,
toLocationGroup:this.toLocationInfo.locationGroupCode,
toLocationErpCode:this.toLocationInfo.erpLocationCode
} }
item.details.push(detail) item.details.push(detail)
}) })
@ -440,8 +442,8 @@
clearInfo() { clearInfo() {
this.allDataList = []; this.allDataList = [];
this.showList = []; this.showList = [];
this.defaultToLocation = {}; this.toLocationInfo={}
this.defaultToLocationCode = ""; this.toLocationCode = "";
this.allCount = 0; this.allCount = 0;
this.loadingType = "" this.loadingType = ""
this.pageNo = 0 this.pageNo = 0

97
fe/PDA/pages/record/thirdLocationDeviler.vue → fe/PDA/pages/request/thirdLocationRequest.vue

@ -2,12 +2,12 @@
<page-meta root-font-size="18px"></page-meta> <page-meta root-font-size="18px"></page-meta>
<view class=""> <view class="">
<win-blank-view @goScan='openScanPopup' v-if="fromLocationCode==''"></win-blank-view> <win-blank-view @goScan='openScanPopup' v-if="fromLocationCode==''"></win-blank-view>
<view class="" style=" background-color: #5A7CF3; color: #fff; border-radius: 20rpx; margin: 15rpx;" v-if="fromLocationCode!=''"> <view class="" style=" background-color: #5A7CF3; color: #fff; border-radius: 10rpx; margin: 15rpx;" v-if="fromLocationCode!=''">
<view class="" style=""> <view class="" style="">
<view class="uni-flex top_lines_info" style="flex-direction: column;"> <view class="uni-flex top_lines_info" style="flex-direction: column;">
<view class="" style="padding: 10rpx;"> <view class="" style="padding: 20rpx;">
来源库位: 来源库位:
<text class="text_bold" >{{fromLocationCode.code}}</text> <text class="text_bold" >{{fromLocationCode}}</text>
</view> </view>
<!-- <view class="" style="padding: 10rpx;"> <!-- <view class="" style="padding: 10rpx;">
扫描数量: 扫描数量:
@ -77,7 +77,7 @@
<button class="new_save_btn btn_double" @click="submit()">提交</button> <button class="new_save_btn btn_double" @click="submit()">提交</button>
</view> </view>
</div> </div>
<win-scan-button @goScan='openScanPopup' v-if="showList.length>0"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="fromLocationCode!=''"></win-scan-button>
<winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode> <winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode>
<win-scan-by-code ref="scanFromLocationPopup" title="来源库位" @getScanCode='scanFromLocation'></win-scan-by-code> <win-scan-by-code ref="scanFromLocationPopup" title="来源库位" @getScanCode='scanFromLocation'></win-scan-by-code>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan' <com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@ -91,13 +91,14 @@
locations, locations,
getBalancesByFilterAsync, getBalancesByFilterAsync,
getWipListAsync, getWipListAsync,
customerReturn, thirdLocationRequest,
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
showConfirmMsg, showConfirmMsg,
goHome, goHome,
getRemoveOption getRemoveOption,
getISODateTime
} from '@/common/basic.js'; } from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue' import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
@ -116,7 +117,7 @@
export default { export default {
name: 'customerReturn', name: 'thirdLocationRequest',
components: { components: {
winBlankView, winBlankView,
comBaseItem, comBaseItem,
@ -136,9 +137,10 @@
options: [], options: [],
currentItem: {}, currentItem: {},
showList: [], showList: [],
defaultToLocation: {}, toLocationCode: "",
defaultToLocationCode: "", toLocationArea:"",
fromLocationCode: "", fromLocationCode: "",
fromLocationArea:"",
allCount: 0, allCount: 0,
allDataList: [], allDataList: [],
loadingType: "", loadingType: "",
@ -151,9 +153,7 @@
}; };
}, },
onLoad() { onLoad() {
uni.setNavigationBarTitle({ this.updateTitle()
title: "三方库发货"
})
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.pageNo = 1; this.pageNo = 1;
@ -204,18 +204,21 @@
locations(code).then(res => { locations(code).then(res => {
uni.hideLoading(); uni.hideLoading();
if(res){ if(res){
if(res.type == 3||res.type == 5){ if(res.type == 3||res.type == 4){
that.fromLocationCode = res; this.fromLocationCode = res.code;
this.fromLocationArea = res.areaCode;
this.openPackLabel(); this.openPackLabel();
this.closeScanFromLocationPopup(); this.closeScanFromLocationPopup();
}else { }else {
that.showMessage('扫描的库位【' + code + '】不是【半成品库】或【成品库位】'); this.showMessage('扫描的库位【' + code + '】不是【半成品库】或【成品库位】');
} }
}else { }else {
that.showMessage('未查询到库位【' + code + '】'); this.showMessage('未查询到库位【' + code + '】');
} }
}).catch(err => { }).catch(err => {
this.fromLocationCode = "";
this.fromLocationArea = "";
uni.hideLoading(); uni.hideLoading();
that.showMessage(err.message); that.showMessage(err.message);
}); });
@ -242,9 +245,7 @@
if (res) { if (res) {
this.allDataList.splice(index, 1); this.allDataList.splice(index, 1);
this.allCount = this.allDataList.length; this.allCount = this.allDataList.length;
uni.setNavigationBarTitle({ this.updateTitle()
title: "三方库发货"+"("+this.allCount+")"
})
this.$forceUpdate() this.$forceUpdate()
} }
}) })
@ -261,7 +262,7 @@
let balanceRes = await getBalancesByFilterAsync(balanceParam); let balanceRes = await getBalancesByFilterAsync(balanceParam);
if(balanceRes.totalCount==0){ if(balanceRes.totalCount==0){
this.showMessage("单件码【" + filterItem[0].itemCode + "】在库位【"+this.fromLocationCode+"】没有库存") this.showMessage("单件码【" + result.itemCode + "】在库位【"+this.fromLocationCode+"】没有库存")
return; return;
} }
@ -290,10 +291,7 @@
this.showList = [] this.showList = []
this.loadingType = ""; this.loadingType = "";
this.showList = this.getDataPage(this.pageNo, this.pageSize) this.showList = this.getDataPage(this.pageNo, this.pageSize)
uni.setNavigationBarTitle({ this.updateTitle()
title: "三方库发货"+"("+this.allCount+")"
})
this.$forceUpdate(); this.$forceUpdate();
}, },
@ -307,24 +305,24 @@
locations(locationCode).then(res => { locations(locationCode).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res) { if (res) {
this.defaultToLocation = res; this.toLocationCode = res.code
this.defaultToLocationCode = res.code this.toLocationArea =res.areaCode;
} else { } else {
this.showMessage('目标库位【' + locationCode + '】不存在'); this.showMessage('目标库位【' + locationCode + '】不存在');
} }
}).catch(err => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();
this.defaultToLocation = {}; this.toLocationCode = ""
this.defaultToLocationCode = "" this.toLocationArea =""
this.showMessage(err.message); this.showMessage(err.message);
}) })
}, },
clearDefaultLocation() { clearDefaultLocation() {
this.defaultToLocationCode = "" this.toLocationCode = ""
this.defaultToLocation = {}; this.toLocationArea =""
}, },
submit() { submit() {
@ -333,7 +331,7 @@
return; return;
} }
if (this.defaultToLocationCode == "") { if (this.toLocationCode == "") {
this.showMessage('请扫描目标库位'); this.showMessage('请扫描目标库位');
return; return;
} }
@ -349,8 +347,8 @@
}); });
let params = this.setSubmitParam(); let params = this.setSubmitParam();
console.log( JSON.stringify(params) ) console.log("提交"+JSON.stringify(params) )
customerReturn(params) thirdLocationRequest(params)
.then(res => { .then(res => {
uni.hideLoading(); uni.hideLoading();
this.showCommitSuccess(); this.showCommitSuccess();
@ -379,6 +377,9 @@
setSubmitParam() { setSubmitParam() {
let item = { let item = {
worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
activeDate:getISODateTime(),
useOnTheWayLocation: true,
type: "Transfer_Warehouse",
details: [] details: []
} }
this.allDataList.forEach(res => { this.allDataList.forEach(res => {
@ -389,7 +390,11 @@
uom: res.uom, uom: res.uom,
qty: res.qty, qty: res.qty,
stdPackQty: res.stdPackQty, stdPackQty: res.stdPackQty,
toLocationCode:this.defaultToLocationCode toLocationCode:this.toLocationCode,
toLocationArea:this.toLocationArea,
fromLocationCode:this.fromLocationCode,
fromLocationArea:this.fromLocationArea,
useOnTheWayLocation: true
} }
item.details.push(detail) item.details.push(detail)
}) })
@ -494,14 +499,28 @@
clearInfo() { clearInfo() {
this.allDataList = []; this.allDataList = [];
this.showList = []; this.showList = [];
this.defaultToLocation = {}; this.toLocationCode = "";
this.defaultToLocationCode = ""; this.toLocationCodeArea = "";
this.fromLocationCode= ""
this.fromLocationCodeArea= ""
this.allCount = 0; this.allCount = 0;
this.loadingType = "" this.loadingType = ""
this.pageNo = 0 this.pageNo = 0
uni.setNavigationBarTitle({ this.updateTitle()
title: "三方库发货" this.$refs.comCollapseLocation.clearLocation();
})
},
updateTitle(){
if(this.allCount == 0){
uni.setNavigationBarTitle({
title: "三方库发货"
})
}else {
uni.setNavigationBarTitle({
title: "三方库发货"+"("+this.allCount+")"
})
}
}, },
openScanPopup() { openScanPopup() {

3
fe/PDA/pages/task/receipt_detail.vue

@ -142,6 +142,7 @@
loadingType: "", loadingType: "",
jobContent:{}, jobContent:{},
jobStatus:"" jobStatus:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -222,7 +223,7 @@
that.ispending = that.receiptJob.jobStatus === 2; that.ispending = that.receiptJob.jobStatus === 2;
if (that.receiptJob.details != null) { if (that.receiptJob.details != null) {
that.jobContent =that.receiptJob; that.jobContent =that.receiptJob;
that.jobStatus = item.jobStatus that.jobStatus = that.receiptJob.jobStatus
that.allCount = that.receiptJob.details.length; that.allCount = that.receiptJob.details.length;
that.calcScanCount(); that.calcScanCount();
this.$nextTick(); this.$nextTick();

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

@ -237,7 +237,7 @@
uni.hideLoading(); uni.hideLoading();
if (res != null) { if (res != null) {
that.showCommitSuccessMessage(); that.showCommitSuccessMessage();
navigateBack(1); navigateBack(2);
} }
}).catch(err => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();

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

@ -4,7 +4,7 @@
<win-empty-view v-if="deliverList.length==0"></win-empty-view> <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 hover-class="uni-list-cell-hover" v-for="(item, index) in deliverList" :key="item.id"
@click="openDetail(item)"> @click="openDetail(item)">
<com-deliver :dataContent="item"></com-deliver> <comThird :dataContent="item"></comThird>
</view> </view>
<uni-load-more :status="loadingType" v-if="deliverList.length>0" /> <uni-load-more :status="loadingType" v-if="deliverList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> <!-- <win-scan-button @goScan='openScanPopup'></win-scan-button>
@ -16,8 +16,8 @@
<script> <script>
import { import {
getDeliverList, getThirdLocationList,
getDeliverJobByNumber getThirdLocationJobByNumber
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
@ -25,7 +25,7 @@
} from '@/common/basic.js'; } from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue' import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comDeliver from '@/mycomponents/coms/task/comDeliver.vue'; import comThird from '@/mycomponents/coms/task/comThird.vue';
import winScanButton from '@/mycomponents/wincom/winScanButton.vue' import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue' import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
@ -35,7 +35,7 @@
winEmptyView, winEmptyView,
winScanButton, winScanButton,
winMulitScan, winMulitScan,
comDeliver, comThird,
comMessage comMessage
}, },
data() { data() {
@ -126,7 +126,7 @@
// isCreationTimeSorting: that.isTimeWindowSorting, // isCreationTimeSorting: that.isTimeWindowSorting,
// isToday: that.isToday // isToday: that.isToday
}; };
getDeliverList(params) getThirdLocationList(params)
.then(res => { .then(res => {
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
@ -165,7 +165,7 @@
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getDeliverJobByNumber(code).then(res => { getThirdLocationJobByNumber(code).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res != null) { if (res != null) {
that.openDetail(res); that.openDetail(res);

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

@ -8,103 +8,93 @@
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll" <scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail"> class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id"> <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="detail-content">
<view class="ljh_box"> <view class="choose_main">
<view class="tit_ljh">{{ item.itemCode }}</view> <view class="ljh_box">
<view class="ljh_left"> <view class="tit_ljh">{{ item.itemCode }}</view>
<view class="font_xs text_lightblue">{{ item.itemName }}</view> <view class="ljh_left">
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view> <view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view> </view>
</view> <view class="list_form hold_form">
<view class="list_form hold_form"> <view class="uni-container">
<view class="uni-container"> <uni-table style="overflow-x: hidden;">
<uni-table style="overflow-x: hidden;"> <uni-tr>
<uni-tr> <uni-th width="70"></uni-th>
<!-- <uni-th width="90"></uni-th> <uni-th width="120" align="center">推荐</uni-th>
<uni-th width="100" align="center">推荐</uni-th> <uni-th width="120" align="center">实际</uni-th>
<uni-th width="100" align="center">实际</uni-th> --> </uni-tr>
<uni-th width="50"></uni-th> <uni-tr>
<uni-th width="120" align="center">推荐</uni-th> <uni-th width="70">数量</uni-th>
<uni-th width="120" align="center">实际</uni-th> <uni-th width="120" align="center">
</uni-tr> <view class="text_black">{{item.recommendQty}}({{item.uom}})</text>
<uni-tr> </view>
<uni-th width="50">数量</uni-th> </uni-th>
<uni-th width="120" align="center"> <!-- -->
<view class="text_black">{{item.recommendQty}}({{item.uom}})</text> <uni-th width="120" align="center">
</view> <view class="" v-if="item.scaned">
</uni-th> <com-number-box :ref="'comNumberBox_'+index"
<!-- --> v-model="item.handledQty" :max="99999" :min="0"
<uni-th width="120" align="center"> @change="qtyChanged($event,item,index)">
<view v-if="item.scaned" class="text_black"> </com-number-box>
{{item.handledQty}}({{item.uom}}) </view>
</view> <!-- <view v-if="dataContent.scaned" class="text_black">
</uni-th> {{dataContent.handledQty}}({{dataContent.uom}})
</uni-tr> </view> -->
<uni-tr> </uni-th>
<uni-th width="50">箱码</uni-th> </uni-tr>
<uni-th width="120" align="center"> <uni-tr>
<view class="text_packingCode">{{ item.recommendPackingCode }}</view> <uni-th width="70">来源库位</uni-th>
</uni-th> <uni-th width="120" align="center">
<uni-th width="120" align="center"> <view class="text_black">{{ item.fromLocationCode }}</view>
<view v-if="item.scaned" class="text_packingCode"> </uni-th>
{{ item.handledPackingCode }} <uni-th width="120" align="center">
</view> <view class="">
</uni-th> <button v-if="item.scaned" type="primary" size="mini"
</uni-tr> style="margin-left: 30rpx;"
<uni-tr> @click="remove(dataContent,index)">移除</button>
<uni-th width="50">批次</uni-th> </view>
<uni-th width="120" align="center"> </uni-th>
<view><text class="text_black">{{item.recommendLot }}</text> </uni-tr>
</view> </uni-table>
</uni-th> </view>
<uni-th width="120" align="center">
<view v-if="item.scaned">
<text class="text_black">{{item.handledLot }}</text>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.recommendLocationCode }}</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">
{{ item.handledFromLocationCode }}
</view>
</uni-th>
</uni-tr>
</uni-table>
</view> </view>
</view> </view>
</view> <view class="choose_marked" v-if="item.scaned">
<view class="choose_marked" v-if="item.scaned"> <image src="@/static/image_marked.svg"></image>
<image src="@/static/image_marked.svg"></image> </view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="new_btn_bot count_shadow"> <div class="new_bot_box">
<button type="primary" class="new_save_btn" @click="submit()">提交</button> <win-collapse-location scanTitle='扫描目标库位' ref='comCollapseLocation' @getLocationCode='getDefaultToLocation'
</view> @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'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack> <winScanByProductCode ref="scanPackPopup" title="单件码" @getScanResult='getScanResult'></winScanByProductCode>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage> <comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view> </view>
</template> </template>
<script> <script>
import { import {
getDeliverDetail, getThirdLocationDetail,
takeDeliverJob, takeThirdLocationJob,
cancelTakeDeliverJob, cancelTakeThirdLocationJob,
finshDeliverJob, finshThirdLocationJob,
balances locations
} from '@/api/index.js'; } from '@/api/index.js';
import { import {
showConfirmMsg, showConfirmMsg,
@ -116,7 +106,12 @@
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import comBalance from '@/mycomponents/common/comBalance.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 { export default {
components: { components: {
@ -125,14 +120,17 @@
winScanByPack, winScanByPack,
comMessage, comMessage,
comJobScanDetail, comJobScanDetail,
comBalance winCollapseLocation,
winScanByProductCode,
comNumberBox,
comProductCode
}, },
data() { data() {
return { return {
type: '', type: '',
id: "", id: "",
datacontent: {}, datacontent: {},
details: {}, details: [],
toLocation: '', toLocation: '',
scrollTop: 0, scrollTop: 0,
old: { old: {
@ -143,12 +141,10 @@
titleArray: ['箱标签', '目标库位'], titleArray: ['箱标签', '目标库位'],
allCount: 0, allCount: 0,
scanCount: 0, scanCount: 0,
jobStatus:"" jobStatus: "",
toLocationInfo: null
} }
}, },
props: {
itemCode: "",
},
onLoad(param) { onLoad(param) {
this.id = param.id; this.id = param.id;
if (param.jobStatus == 1) { if (param.jobStatus == 1) {
@ -163,7 +159,7 @@
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
}else if(e.index === 1){ } else if (e.index === 1) {
window.location.reload(); window.location.reload();
} }
}, },
@ -173,7 +169,7 @@
if (e.from == 'backbutton') { if (e.from == 'backbutton') {
if (this.jobStatus == 2) { if (this.jobStatus == 2) {
// //
cancelTakeDeliverJob(this.id).then(res => { cancelTakeThirdLocationJob(this.id).then(res => {
uni.navigateBack(); uni.navigateBack();
}).catch(error => { }).catch(error => {
uni.navigateBack(); uni.navigateBack();
@ -191,8 +187,49 @@
}) })
}, },
methods: { methods: {
//
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() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPackPopup.openScanPopup();
}, },
// //
getDetail() { getDetail() {
@ -200,13 +237,15 @@
let params = { let params = {
id: that.id, id: that.id,
}; };
getDeliverDetail(params) getThirdLocationDetail(params)
.then(item => { .then(item => {
console.log('item', item); console.log('item', item);
that.datacontent = item; that.datacontent = item;
that.jobStatus = item.jobStatus that.jobStatus = item.jobStatus
that.details = item.details; that.details = item.details;
that.details.forEach(r => r.scaned = false); that.details.forEach(res => {
res.scaned = false;
})
that.ispending = item.jobStatus === 2; that.ispending = item.jobStatus === 2;
that.allCount = item.details.length; that.allCount = item.details.length;
// that.toLocation = item.details[0].recommendLocationCode; // that.toLocation = item.details[0].recommendLocationCode;
@ -217,92 +256,28 @@
}, },
// //
getScanResult(result) { getScanResult(result) {
let that = this;
let code = result.data.code;
let item = this.details.find(r => { let item = this.details.find(r => {
return r.recommendPackingCode === code return r.itemCode == result.itemCode
}); });
if (item === undefined) { if (item === undefined) {
this.showMessage('在发货任务详情中,未找到箱码【' + code + '】'); this.showMessage('在任务详情中,未找到物料号【' + result.itemCode + '】');
return; return;
} else { } else {
if (item.scaned) { if (item.scaned) {
this.showMessage('箱码【' + code + '】已经扫描,请扫描下一箱零件'); this.showMessage('物料号【' + result.itemCode + '】已经扫描,请扫描下一箱零件');
return; return;
} else {
item.scaned = true;
item.handledQty = item.recommendQty;
this.getScanCount()
setTimeout(res => {
this.$forceUpdate()
}, 1000)
} }
} }
//
let params = {
pageSize: 1000,
pageIndex: 1,
packingCode: code,
locationTypes: [4], //
inventoryStatuses: [2], //
};
balances(params)
.then(res => {
try {
if (res.totalCount == 0) {
this.showMessage('箱码【' + code + '】在【成品库】未查询到库存信息');
} else if (res.totalCount == 1) {
that.balancesItem = res.items[0];
this.createItem(item);
} else {
this.$refs.balanceItems.openPopup(res.items);
}
uni.hideLoading();
} catch (e) {
this.showMessage(e.message)
}
})
.catch(err => {
this.showMessage(err.message)
});
},
createItem(item) {
let that = this;
if (that.balancesItem != null || that.balancesItem != undefined) {
// if (that.balancesItem.qty != item.recommendQty) {
// this.showMessage('' + that.balancesItem.qty + '' + item.recommendQty + ',')
// } else {
item.scaned = true;
item.handledContainerCode = that.balancesItem.containerCode;
item.handledPackingCode = that.balancesItem.packingCode;
item.handledBatch = that.balancesItem.batch;
item.handledLot = that.balancesItem.lot;
item.handledFromLocationArea = that.balancesItem.locationCode;
item.handledQty = that.balancesItem.qty;
// ==================================
// item.recommendFromLocationCode = string;
// item.recommendFromLocationArea = string;
// item.recommendFromLocationGroup = string;
// item.recommendFromLocationErpCode = string;
// item.recommendFromWarehouseCode = string;
// item.uom = string;
// item.recommendQty = 0;
// item.handledFromLocationCode = string;
// item.handledFromLocationArea = string;
// item.handledFromLocationGroup = string;
// item.handledFromLocationErpCode = string;
// item.handledFromWarehouseCode = string;
// item.handledQty = that.balancesItem.qty;
// item.toLocationCode = string;
// item.toLocationArea = string;
// item.toLocationGroup = string;
// item.toLocationErpCode = string;
// item.toWarehouseCode = string;
// item.onTheWayLocationCode = string;
this.getScanCount();
this.closeScanPopup();
that.$forceUpdate();
// }
}
}, },
@ -316,17 +291,22 @@
} }
}, },
selectedBalanceItem(balanceItem) { cancel() {
that.balancesItem = balanceItem; showConfirmMsg("是否清除已经扫描的数据?", res => {
this.createItem(item); if (res) {
this.getDetail();
}
})
}, },
// //
receive(callback) { receive(callback) {
let params = { let params = {
id: this.id id: this.id
}; };
takeDeliverJob(params) takeThirdLocationJob(params)
.then(res => { .then(res => {
callback(true); callback(true);
}) })
@ -339,41 +319,61 @@
submit() { submit() {
let that = this; let that = this;
if (that.datacontent.details.length === 0) { if (that.datacontent.details.length === 0) {
this.showMessage('该任务没有要货的零件'); this.showMessage('该任务没有要货的零件');
return; return;
} }
let items = that.datacontent.details.filter(r => r.scaned); let items = that.datacontent.details.filter(r => r.scaned);
if (items.length === 0) { if (items.length === 0) {
this.showMessage('请扫描要货的零件'); this.showMessage('请扫描要货的零件');
return; return;
} else if (items.length < that.datacontent.details.length) { } else if (items.length < that.datacontent.details.length) {
this.showMessage('还有未扫描的零件,不可以货'); this.showMessage('还有未扫描的零件,不可以收货货');
return; return;
} else { } else {
if (this.toLocationInfo == null) {
this.showMessage('请扫描目标库位');
return;
}
that.finsh(); that.finsh();
} }
}, },
finsh() { finsh() {
let that = this;
uni.showLoading({ uni.showLoading({
title: "提交中..." title: "提交中..."
}); });
this.setParams();
let params = JSON.stringify(this.datacontent);
console.log("提交", params);
finshThirdLocationJob(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.handledFromLocationCode = res.recommendFromLocationCode;
// res.handledFromLocationArea = res.recommendFromLocationArea;
// res.handledFromLocationGroup = res.recommendFromLocationGroup;
// res.handledFromLocationErpCode = res.recommendFromLocationErpCode
// res.handledFromWarehouseCode = res.recommendFromWarehouseCode;
res.toLocationCode = this.toLocationInfo.code;
res.toLocationArea = this.toLocationInfo.areaCode;
// res.toLocationGroup = this.toLocationInfo.locationGroupCode;
// res.toLocationErpCode = this.toLocationInfo.erpLocationCode;
})
let params = JSON.stringify(that.datacontent);
console.log(params);
// finshDeliverJob(that.id, params)
// .then(res => {
// uni.hideLoading();
// if (res != null) {
// that.showCommitSuccessMessage();
// navigateBack(1);
// }
// })
// .catch(err => {
// this.showMessage(err.message);
// uni.hideLoading();
// });
}, },
showCommitSuccessMessage() { showCommitSuccessMessage() {
@ -385,11 +385,6 @@
uni.hideLoading(); uni.hideLoading();
}, },
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
clearScanLocation() { clearScanLocation() {
// this.$refs.scanLocation.getfocus(); // this.$refs.scanLocation.getfocus();
@ -407,4 +402,4 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>
Loading…
Cancel
Save