Browse Source

添加库移

pda_nev
李俊城 1 year ago
parent
commit
ddba65569d
  1. 83
      fe/PDA/api/index.js
  2. 34
      fe/PDA/common/pdabasic.css
  3. 168
      fe/PDA/components/uni-fab/uni-fab.vue
  4. 68
      fe/PDA/mycomponents/coms/task/comInjectIssue.vue
  5. 68
      fe/PDA/mycomponents/coms/task/comInventyMove.vue
  6. 67
      fe/PDA/mycomponents/wincom/winScanLocationCode.vue
  7. 42
      fe/PDA/pages.js
  8. 49
      fe/PDA/pages.json
  9. 2
      fe/PDA/pages/index/index.vue
  10. 463
      fe/PDA/pages/record/completeInventoryTransfer.vue
  11. 156
      fe/PDA/pages/request/injectionIssueRequest.vue
  12. 20
      fe/PDA/pages/request/thirdLocationRequest.vue
  13. 167
      fe/PDA/pages/task/injectionIssueJob.vue
  14. 405
      fe/PDA/pages/task/injectionIssueJobDetail.vue
  15. 168
      fe/PDA/pages/task/inventoryMoveJob.vue
  16. 607
      fe/PDA/pages/task/inventoryMoveJobDetail.vue

83
fe/PDA/api/index.js

@ -1482,4 +1482,85 @@ export const completeTransfer = (params) => request(
devUrl + "/api/pda/store/transfer-note/", { //
data: params,
method: "post"
});
});
//库移任务列表
export const getInventoryMoveList = (params) => request(
devUrl + "/api/pda/store/transferlib-job/list", {
method: 'get',
data: params
});
//库移任务详情
export const getInventoryMoveDetail = (params) => request(
devUrl + "/api/pda/store/transferlib-job/" + params.id, { //
data: {},
method: "get"
});
//承接库移任务
export const takeInventoryMoveJob = (params) => request(
devUrl + "/api/pda/store/transferlib-job/accept/" + params.id, { //
data: {},
method: "post"
});
//取消承接库移任务
export const cancelTakeInventoryMoveJob = (id) => request(
devUrl + "/api/pda/store/transferlib-job/cancel-accept/" + id, { //
data: {},
method: "post"
});
//提交库移任务
export const finshInventoryMoveJob = (id, params) => request(
devUrl + "/api/pda/store/transferlib-job/complete/" + id, { //
data: params,
method: "post"
})
//完工库移
export const completeInvenTransfer = (params) => request(
devUrl + "/api/pda/store/transfer-note/", { //
data: params,
method: "post"
});
//注塑发料申请
export const injectIssueRequest = (params) => request(
devUrl + "/api/pda/store/injection-request/", { //
data: params,
method: "post"
})
//注塑发料任务列表
export const getInjectIssueJobList = (params) => request(
devUrl + "/api/pda/job/injection/list", {
method: 'get',
data: params
})
//注塑发料任务详情
export const getInjectIssueDetail = (params) => request(
devUrl + "/api/pda/job/injection/" + params.id, { //
data: {},
method: "get"
});
//承接注塑发料任务
export const takeInjectIssueJob = (params) => request(
devUrl + "/api/pda/job/injection/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接注塑发料任务
export const cancelTakeInjectIssueJob = (id) => request(
devUrl + "/api/pda/job/injection/cancel-take/" + id, { //
data: {},
method: "post"
});
//提交注塑发料任务
export const finshInjectIssueJob = (id, params) => request(
devUrl + "/api/pda/job/injection/finish/" + id, { //
data: params,
method: "post"
})

34
fe/PDA/common/pdabasic.css

@ -733,3 +733,37 @@ export function getItemTypeStyle(val) {
color: #FFFFFF;
}
page {
width: 100%;
height: 100%;
/* background-color: #fff; */
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
/* background-color: #fff; */
}
.page-main {
flex: 1;
position: relative;
background: #fff;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}

168
fe/PDA/components/uni-fab/uni-fab.vue

@ -5,7 +5,9 @@
'uni-fab--rightBottom': rightBottom,
'uni-fab--leftTop': leftTop,
'uni-fab--rightTop': rightTop
}" class="uni-fab">
}" class="uni-fab"
:style="nvueBottom"
>
<view :class="{
'uni-fab__content--left': horizontal === 'left',
'uni-fab__content--right': horizontal === 'right',
@ -13,11 +15,15 @@
'uni-fab__content--flexDirectionStart': flexDirectionStart,
'uni-fab__content--flexDirectionEnd': flexDirectionEnd,
'uni-fab__content--other-platform': !isAndroidNvue
}" :style="{ width: boxWidth, height: boxHeight, backgroundColor: styles.backgroundColor }" class="uni-fab__content" elevation="5">
}" :style="{ width: boxWidth, height: boxHeight, backgroundColor: styles.backgroundColor }"
class="uni-fab__content" elevation="5">
<view v-if="flexDirectionStart || horizontalLeft" class="uni-fab__item uni-fab__item--first" />
<view v-for="(item, index) in content" :key="index" :class="{ 'uni-fab__item--active': isShow }" class="uni-fab__item" @click="_onItemClick(index, item)">
<image :src="item.active ? item.selectedIconPath : item.iconPath" class="uni-fab__item-image" mode="widthFix" />
<text class="uni-fab__item-text" :style="{ color: item.active ? styles.selectedColor : styles.color }">{{ item.text }}</text>
<view v-for="(item, index) in content" :key="index" :class="{ 'uni-fab__item--active': isShow }"
class="uni-fab__item" @click="_onItemClick(index, item)">
<image :src="item.active ? item.selectedIconPath : item.iconPath" class="uni-fab__item-image"
mode="aspectFit" />
<text class="uni-fab__item-text"
:style="{ color: item.active ? styles.selectedColor : styles.color }">{{ item.text }}</text>
</view>
<view v-if="flexDirectionEnd || horizontalRight" class="uni-fab__item uni-fab__item--first" />
</view>
@ -28,9 +34,11 @@
'uni-fab__circle--leftTop': leftTop,
'uni-fab__circle--rightTop': rightTop,
'uni-fab__content--other-platform': !isAndroidNvue
}" class="uni-fab__circle uni-fab__plus" :style="{ 'background-color': styles.buttonColor }" @click="_onClick">
<view class="fab-circle-v" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view>
<view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view>
}" class="uni-fab__circle uni-fab__plus" :style="{ 'background-color': styles.buttonColor, 'bottom': nvueBottom }" @click="_onClick">
<uni-icons class="fab-circle-icon" :type="styles.icon" :color="styles.iconColor" size="32"
:class="{'uni-fab__plus--active': isShow && content.length > 0}"></uni-icons>
<!-- <view class="fab-circle-v" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view>
<view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view> -->
</view>
</view>
</template>
@ -106,16 +114,18 @@
color: '#3c3e49',
selectedColor: '#007AFF',
backgroundColor: '#fff',
buttonColor: '#007AFF'
buttonColor: '#007AFF',
iconColor: '#fff',
icon: 'plusempty'
}
}
},
computed: {
contentWidth(e) {
return (this.content.length + 1) * 55 + 10 + 'px'
return (this.content.length + 1) * 55 + 15 + 'px'
},
contentWidthMin() {
return 55 + 'px'
return '55px'
},
//
boxWidth() {
@ -151,12 +161,24 @@
},
horizontalRight() {
return this.getPosition(2, 'horizontal', 'right')
},
// nvue bottom
nvueBottom() {
const safeBottom = uni.getSystemInfoSync().windowBottom;
// #ifdef APP-NVUE
return 30 + safeBottom
// #endif
// #ifndef APP-NVUE
return 30
// #endif
}
},
watch: {
pattern(newValue, oldValue) {
//console.log(JSON.stringify(newValue))
this.styles = Object.assign({}, this.styles, newValue)
pattern: {
handler(val, oldVal) {
this.styles = Object.assign({}, this.styles, val)
},
deep: true
}
},
created() {
@ -185,6 +207,9 @@
* 按钮点击事件
*/
_onItemClick(index, item) {
if (!this.isShow) {
return
}
this.$emit('trigger', {
index,
item
@ -208,7 +233,9 @@
}
</script>
<style scoped>
<style lang="scss" >
$uni-shadow-base:0 1px 5px 2px rgba($color: #000000, $alpha: 0.3) !default;
.uni-fab {
position: fixed;
/* #ifndef APP-NVUE */
@ -217,6 +244,8 @@
justify-content: center;
align-items: center;
z-index: 10;
border-radius: 45px;
box-shadow: $uni-shadow-base;
}
.uni-cursor-point {
@ -230,43 +259,43 @@
}
.uni-fab--leftBottom {
left: 5px;
bottom: 20px;
left: 15px;
bottom: 30px;
/* #ifdef H5 */
left: calc(5px + var(--window-left));
bottom: calc(20px + var(--window-bottom));
left: calc(15px + var(--window-left));
bottom: calc(30px + var(--window-bottom));
/* #endif */
padding: 10px;
// padding: 10px;
}
.uni-fab--leftTop {
left: 5px;
left: 15px;
top: 30px;
/* #ifdef H5 */
left: calc(5px + var(--window-left));
left: calc(15px + var(--window-left));
top: calc(30px + var(--window-top));
/* #endif */
padding: 10px;
// padding: 10px;
}
.uni-fab--rightBottom {
right: 5px;
bottom: 20px;
right: 15px;
bottom: 30px;
/* #ifdef H5 */
right: calc(5px + var(--window-right));
bottom: calc(20px + var(--window-bottom));
right: calc(15px + var(--window-right));
bottom: calc(120px + var(--window-bottom));
/* #endif */
padding: 10px;
// padding: 10px;
}
.uni-fab--rightTop {
right: 5px;
right: 15px;
top: 30px;
/* #ifdef H5 */
right: calc(5px + var(--window-right));
right: calc(15px + var(--window-right));
top: calc(30px + var(--window-top));
/* #endif */
padding: 10px;
// padding: 10px;
}
.uni-fab__circle {
@ -279,8 +308,9 @@
width: 55px;
height: 55px;
background-color: #3c3e49;
border-radius: 55px;
border-radius: 45px;
z-index: 11;
// box-shadow: $uni-shadow-base;
}
.uni-fab__circle--leftBottom {
@ -294,10 +324,10 @@
.uni-fab__circle--leftTop {
left: 15px;
top: 40px;
top: 30px;
/* #ifdef H5 */
left: calc(15px + var(--window-left));
top: calc(40px + var(--window-top));
top: calc(30px + var(--window-top));
/* #endif */
}
@ -306,16 +336,16 @@
bottom: 30px;
/* #ifdef H5 */
right: calc(15px + var(--window-right));
bottom: calc(30px + var(--window-bottom));
bottom: calc(120px + var(--window-bottom));
/* #endif */
}
.uni-fab__circle--rightTop {
right: 15px;
top: 40px;
top: 30px;
/* #ifdef H5 */
right: calc(15px + var(--window-right));
top: calc(40px + var(--window-top));
top: calc(30px + var(--window-top));
/* #endif */
}
@ -339,26 +369,42 @@
font-weight: bold;
}
.fab-circle-v {
position: absolute;
width: 3px;
height: 31px;
left: 26px;
top: 12px;
background-color: white;
transform: rotate(0deg);
transition: transform 0.3s;
}
.fab-circle-h {
position: absolute;
width: 31px;
height: 3px;
left: 12px;
top: 26px;
background-color: white;
// .fab-circle-v {
// position: absolute;
// width: 2px;
// height: 24px;
// left: 0;
// top: 0;
// right: 0;
// bottom: 0;
// /* #ifndef APP-NVUE */
// margin: auto;
// /* #endif */
// background-color: white;
// transform: rotate(0deg);
// transition: transform 0.3s;
// }
// .fab-circle-h {
// position: absolute;
// width: 24px;
// height: 2px;
// left: 0;
// top: 0;
// right: 0;
// bottom: 0;
// /* #ifndef APP-NVUE */
// margin: auto;
// /* #endif */
// background-color: white;
// transform: rotate(0deg);
// transition: transform 0.3s;
// }
.fab-circle-icon {
transform: rotate(0deg);
transition: transform 0.3s;
font-weight: 200;
}
.uni-fab__plus--active {
@ -383,7 +429,7 @@
.uni-fab__content--other-platform {
border-width: 0px;
box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.2);
box-shadow: $uni-shadow-base;
}
.uni-fab__content--left {
@ -427,17 +473,19 @@
}
.uni-fab__item-image {
width: 25px;
height: 25px;
margin-bottom: 3px;
width: 20px;
height: 20px;
margin-bottom: 4px;
}
.uni-fab__item-text {
color: #FFFFFF;
font-size: 12px;
line-height: 12px;
margin-top: 2px;
}
.uni-fab__item--first {
width: 55px;
}
</style>
</style>

68
fe/PDA/mycomponents/coms/task/comInjectIssue.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>

68
fe/PDA/mycomponents/coms/task/comInventyMove.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>

67
fe/PDA/mycomponents/wincom/winScanLocationCode.vue

@ -1,28 +1,34 @@
<template>
<uni-popup ref="popup">
<view class="popup_box">
<view class="pop_title">
扫描信息
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<view class="pop_tab">
<view class="uni-flex uni-row">
<view class="tab_tit tab_tit_active">{{title}}</view>
<view class="">
<uni-popup ref="popup">
<view class="popup_box">
<view class="pop_title">
扫描{{title}}
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<view class="tab_info">
<win-com-scan @getScanResult="getScanResult" :placeholder='title'></win-com-scan>
<view class="pop_tab">
<view class="tab_info">
<win-com-scan @getScanResult="getScanResult" :placeholder='title'></win-com-scan>
</view>
</view>
</view>
</view>
</uni-popup>
</uni-popup>
<com-message ref="comMessage" ></com-message>
</view>
</template>
<script>
import {
locations
} from '@/api/index.js';
import winComScan from '@/mycomponents/wincom/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default {
name: 'winScanByCode',
components: {
winComScan
winComScan,
comMessage
},
props: {
title: {
@ -32,7 +38,8 @@
},
data() {
return {
code: ''
code: '',
locationInfo:null
}
},
@ -52,12 +59,36 @@
} else if (result.data.scanType === 'barcode') {
this.code = result.data.code;
}
this.callBack();
this.getLocationInfo(this.code)
},
callBack() {
this.closeScanPopup();
this.$emit("getLocationCode", this.code);
}
this.$emit("getLocation", this.locationInfo);
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
getLocationInfo(code) {
uni.showLoading({
title: "正在查询库位信息...",
mask: true
});
locations(code).then((res) => {
uni.hideLoading();
if (res) {
this.locationInfo=res
this.callBack()
} else {
this.showMessage('未查找到库位【' + code + '】');
this.locationInfo=null
}
}).catch((err) => {
this.locationInfo=null
this.showMessage(err.message);
uni.hideLoading();
})
},
}
}
</script>

42
fe/PDA/pages.js

@ -666,6 +666,48 @@ module.exports = () => ({
"navigationBarTitleText": "完工转储(装配)",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/inventoryMoveJob",
"style": {
"navigationBarTitleText": "库移任务",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/inventoryMoveJobDetail",
"style": {
"navigationBarTitleText": "库移任务详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/record/completeInventoryTransfer",
"style": {
"navigationBarTitleText": "完工库移",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequest",
"style": {
"navigationBarTitleText": "注塑发料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJob",
"style": {
"navigationBarTitleText": "注塑发料任务",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJobDetail",
"style": {
"navigationBarTitleText": "注塑发料任务详情",
"enablePullDownRefresh": false
}
}

49
fe/PDA/pages.json

@ -637,8 +637,57 @@
"navigationBarTitleText": "完工转储(装配)",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/inventoryMoveJob",
"style": {
"navigationBarTitleText": "库移任务",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/inventoryMoveJobDetail",
"style": {
"navigationBarTitleText": "库移任务详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/record/completeInventoryTransfer",
"style": {
"navigationBarTitleText": "完工库移",
"enablePullDownRefresh": false
}
},
{
"path": "pages/request/injectionIssueRequest",
"style": {
"navigationBarTitleText": "注塑发料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJob",
"style": {
"navigationBarTitleText": "注塑发料任务",
"enablePullDownRefresh": false
}
},
{
"path": "pages/task/injectionIssueJobDetail",
"style": {
"navigationBarTitleText": "注塑发料任务详情",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

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

@ -83,7 +83,7 @@
</view>
</view>
<!-- 菜单 -->
<view class="index_menuinfo">
<view class="index_menuinfo" style="padding-bottom: 100rpx;">
<view class="icon_block" v-for="menuItem in selectedMenus" :key="menuItem.id"
@click="openCheck(menuItem.path)">
<text class="index_badge"

463
fe/PDA/pages/record/completeInventoryTransfer.vue

@ -0,0 +1,463 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll" style="padding-bottom:150px">
<view class="detail-list " v-for="(item, index) in itemList" :key="index">
<view class="detail-content">
<view class="" style="">
<view class="uni-flex uni-row u-col-center">
<view class="" style="margin-top: 20rpx; margin-left: 10rpx; font-weight: bold;">
({{index+1}}).
</view>
<comItemCode :itemData="item"></comItemCode>
</view>
<uni-table border stripe style="">
<!-- <uni-tr>
<uni-td align="center">物品代码</uni-td>
<uni-td>{{item.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>
<view class="uni-flex uni-row space-between u-col-center" style="align-items: center;">
<view class="">
{{item.fromLocationCode}}
</view>
<view class="">
<button type="primary" size="mini" style="margin-left: 0rpx;"
@click="openScanFromLocationPopup(item)">修改</button>
</view>
</view>
</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>
</scroll-view>
<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>
<win-scan-by-code ref="scanFromLocationPopup" title="来源库位" @getScanCode='scanFromLocation'></win-scan-by-code>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterClose='afterCloseMessagg'></com-message>
</view>
</view>
</template>
<script>
import {
locations,
getBalancesByFilter,
completeInvenTransfer
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption
} from '@/common/basic.js';
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';
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
export default {
name: 'comtransfer',
components: {
winBlankView,
comBalanceItem,
comMessage,
winScanButton,
comBalance,
winCollapseLocation,
winScanByProductCode,
comItemCode,
comNumberBox,
winScanByCode
},
data() {
return {
options: [],
itemList: [],
fromLocationCode: '',
fromLocationInfo: {},
toLocationCode: '',
scrollTop: 0,
old: {
scrollTop: 0
},
inventoryStatus: -1,
inventoryStatusArray: [],
isClearPackCode: false, //
isClearContainerCode: false, //
isClearLot: false, //,
locationErpCode: '',
toLocationErpCode: '',
locationGotFocus: false,
transferType:"Transfer_Coating",
fromLocationItem:""
};
},
props: {
// locationTypes: {
// type: [Array, String, Number],
// value: ''
// },
byLocation: {
type: Boolean,
value: false
},
},
watch: {},
mounted: function() {
this.openScanPopup();
this.options = getRemoveOption();
},
methods: {
openScanFromLocationPopup(item) {
this.fromLocationItem = item;
this.$refs.scanFromLocationPopup.openScanPopup()
},
closeScanFromLocationPopup() {
this.$refs.scanFromLocationPopup.closeScanPopup();
},
//
scanFromLocation(code) {
let that = this;
if (code == '') return;
uni.showLoading({
title: '扫描中...',
mask: true
});
locations(code).then(res => {
uni.hideLoading();
if(res){
// this.fromLocationCode = res.code;
// this.fromLocationArea = res.areaCode;
this.fromLocationItem.locationCode = res.code;;
this.closeScanFromLocationPopup();
// if(res.type == 3||res.type == 4){
// this.fromLocationCode = res.code;
// this.fromLocationArea = res.areaCode;
// this.openPackLabel();
// this.closeScanFromLocationPopup();
// }else {
// this.showMessage('' + code + '');
// }
}else {
this.showMessage('未查询到库位【' + code + '】');
}
}).catch(err => {
this.fromLocationCode = "";
this.fromLocationArea = "";
uni.hideLoading();
that.showMessage(err.message);
});
},
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) {
let that = this;
let code = result.itemCode;
let datas = that.itemList.filter(r => {
return r.itemCode == code
})
if (datas.length > 0) {
showConfirmMsg('物料【' + code + '】已经存在,是否要重新扫描?', confirm => {
if (confirm) {
that.itemList.forEach((r, i) => {
if (r.packingCode == code) {
that.itemList.splice(i, 1);
return;
}
});
// that.getBalance(code);
}
});
} else {
var item = {
itemCode: result.itemCode,
itemName: result.itemName,
itemDesc1: result.itemDesc1,
stdPackQty: result.stdPackQty,
uom: result.uom,
qty: result.stdPackQty,
fromLocationCode: "ZPCP1",
fromStatus: 2,
toStatus:2
}
this.itemList.unshift(item);
this.$refs.scanPackPopup.closeScanPopup()
}
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('退货数量必须大于0')
item.handledQty = item.qty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}
},
getFromLocation(code, callBack) {
locations(code).then(res => {
if (res) {
this.fromLocationInfo = res;
callBack(true)
}
}).catch(err => {
callBack(false)
})
},
getToLocation(code) {
if (code == '') {
this.showMessage('目标库位不能为空');
return;
}
uni.showLoading({
title: "扫描中",
mask: true
});
let that = this;
locations(code).then(res => {
if (res == null) {
that.toLocationCode = ''
that.showMessage('目标库位【' + code + '】不存在');
this.$refs.location.clearLocation()
this.locationGotFocus = true;
} else {
that.toLocationCode = code;
that.toLocationErpCode = res.erpLocationCode;
}
uni.hideLoading();
}).catch(err => {
that.toLocationCode = ''
this.locationGotFocus = true;
that.showMessage(err.message);
uni.hideLoading();
})
},
clear() {
this.location = null;
this.toLocationCode = "";
},
submit() {
let that = this;
if (that.itemList.length === 0) {
this.showMessage('请选择要提交的零件');
return;
}
if (that.toLocationCode === '') {
this.showMessage('请扫描目标库位');
return;
}
this.getFromLocation(this.itemList[0].fromLocationCode, res => {
if (res) {
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: []
}
this.itemList.forEach(r => {
r.toLocationCode = that.toLocationCode;
r.toLocationErpCode = this.toLocationErpCode
r.fromLot ="";
r.fromLocationArea = this.fromLocationInfo.areaCode;
r.fromLocationGroup = this.fromLocationInfo.locationGroupCode;
r.fromLocationErpCode = this.fromLocationInfo.erpLocationCode;
r.fromWarehouseCode = localStorage.warehouseCode;
r.toLot ="";
r.fromPackingCode="";
r.toPackingCode = "";
r.toWarehouseCode =localStorage.warehouseCode;
r.worker = localStorage.userName_CN == "" ? localStorage.userName :
localStorage.userName_CN
item.details.push(r);
})
let params = JSON.stringify(item);
console.log('params', params);
completeInvenTransfer(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;
that.$refs.location.clearLocation()
},
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) {
this.$refs.comMessage.showMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
}
};
</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>

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

@ -0,0 +1,156 @@
<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;">
<view class="uni-flex" style=" width: 50%; justify-content: center; margin-top: 40rpx; "
v-for="(item, index) in dataList" :key="index">
<uni-tag :inverted="!item.checked" :circle="false" :text="item.itemCode" type="primary"
@click="setContainerModel(item)"
/>
</view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class="new_btn_bot count_shadow">
<button type="primary" class="new_save_btn" @click="submit()">提交</button>
</view>
</view>
</view>
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
injectIssueRequest
} from '@/api/index.js';
import {
goHome,
dateFormat,
getContainerTypeName,
showConfirmMsg
} 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'
export default {
components: {
winEmptyView,
comJobTopInfo,
comMessage
},
data() {
return {
items: ['保险杠', '轮眉','车门装饰板'],
current: 0,
pageSize: this.modelConfig,
pageIndex: 1,
loadingType: "nomore",
dataList: [{itemCode:"THILDD0A542AG5",checked:false},
{itemCode:"THILDD0A542AG5",checked:false},
{itemCode:"THILDD0A542AG5",checked:false},
{itemCode:"THILDD0A542AG4",checked:false},
{itemCode:"THILDD0A542AG4",checked:false},
{itemCode:"THILDD0A542AG4",checked:false},
{itemCode:"123456",checked:false},
{itemCode:"1234888",checked:false},
{itemCode:"12349528",checked:false}
],
isFinished:false
};
},
filters: {
formatDate: function(val) {
return dateFormat(val)
},
},
onShow() {
},
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: {
setContainerModel(item) {
this.dataList.forEach(res => {
res.checked = false
})
item.checked = true;
},
onClickItem(item) {
this.current = item.currentIndex;
console.log("点击", this.current)
if(this.current==0){
this.isFinished =false;
}else {
this.isFinished =true;
}
},
//
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
submit(item) {
uni.showLoading({
title: "提交中...",
mask:true
});
console.log("测试",JSON.stringify(params));
injectIssueRequest(item.id, params)
.then(res => {
uni.hideLoading();
if (res != null) {
this.showCommitSuccessMessage();
this.getList("refresh")
}
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
},
}
};
</script>

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

@ -204,14 +204,18 @@
locations(code).then(res => {
uni.hideLoading();
if(res){
if(res.type == 3||res.type == 4){
this.fromLocationCode = res.code;
this.fromLocationArea = res.areaCode;
this.openPackLabel();
this.closeScanFromLocationPopup();
}else {
this.showMessage('扫描的库位【' + code + '】不是【半成品库】或【成品库位】');
}
this.fromLocationCode = res.code;
this.fromLocationArea = res.areaCode;
this.openPackLabel();
this.closeScanFromLocationPopup();
// if(res.type == 3||res.type == 4){
// this.fromLocationCode = res.code;
// this.fromLocationArea = res.areaCode;
// this.openPackLabel();
// this.closeScanFromLocationPopup();
// }else {
// this.showMessage('' + code + '');
// }
}else {
this.showMessage('未查询到库位【' + code + '】');
}

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

@ -0,0 +1,167 @@
<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)">
<comThird :dataContent="item"></comThird>
</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 {
getInjectIssueJobList,
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comThird from '@/mycomponents/coms/task/comThird.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,
comThird,
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
};
getInjectIssueJobList(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: './injectionIssueJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

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

@ -0,0 +1,405 @@
<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>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
<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.recommendQty}}({{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.fromLocationCode }}</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>
</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 btn_double" @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 {
getInjectIssueDetail,
takeInjectIssueJob,
cancelTakeInjectIssueJob,
finshInjectIssueJob,
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
}
},
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) {
//
cancelTakeInjectIssueJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
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() {
this.$refs.scanPackPopup.openScanPopup();
},
//
getDetail() {
let that = this;
let params = {
id: that.id,
};
getInjectIssueDetail(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
};
takeInjectIssueJob(params)
.then(res => {
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
});
},
submit() {
let that = this;
if (that.datacontent.details.length === 0) {
this.showMessage('该任务没有要收货的零件');
return;
}
let items = that.datacontent.details.filter(r => r.scaned);
if (items.length === 0) {
this.showMessage('请扫描要收货的零件');
return;
} else if (items.length < that.datacontent.details.length) {
this.showMessage('还有未扫描的零件,不可以收货货');
return;
} else {
if (this.toLocationInfo == null) {
this.showMessage('请扫描目标库位');
return;
}
that.finsh();
}
},
finsh() {
uni.showLoading({
title: "提交中..."
});
this.setParams();
let params = JSON.stringify(this.datacontent);
console.log("提交", params);
finshInjectIssueJob(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.handledFromLocationA rea = 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;
})
},
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>

168
fe/PDA/pages/task/inventoryMoveJob.vue

@ -0,0 +1,168 @@
<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)">
<comInventyMove :dataContent="item"></comInventyMove>
</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 {
getInventoryMoveList,
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comInventyMove from '@/mycomponents/coms/task/comInventyMove.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,
comInventyMove,
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
};
getInventoryMoveList(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: './inventoryMoveJobDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

607
fe/PDA/pages/task/inventoryMoveJobDetail.vue

@ -0,0 +1,607 @@
<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>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
<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">推荐 </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="list_form hold_form">
<view class="uni-container">
<uni-table style="">
<uni-tr>
<uni-th width="100" align="center">实际</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>
<!-- <view class="">
<view class="" style="padding-left: 50rpx; padding-right: 50rpx;">
<button type="default" @click="openFromLocation"> 来源库位</button>
</view>
<view class="" style="padding-left: 50rpx; padding-right: 50rpx;margin-top: 20rpx;">
<button type="default"> 箱码</button>
</view>
<view class="" style="padding-left: 50rpx; padding-right: 50rpx; margin-top: 20rpx;">
<button type="default" @click="openToLocation"> 目标库位</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 btn_double" @click="submit()">提交</button>
</view>
</div>
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> -->
<uni-fab ref="fab" class="fab" :pattern="pattern" :content="content" :horizontal="horizontal"
:vertical="vertical" :direction="direction" @trigger="trigger"></uni-fab>
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<winScanLocationCode ref="locationFrom" title="来源库位" @getLocation="getFromLocation"></winScanLocationCode>
<winScanLocationCode ref="locationTo" title="目标库位" @getLocation="getToLocation"></winScanLocationCode>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view>
</template>
<script>
import {
getInventoryMoveDetail,
takeInventoryMoveJob,
cancelTakeInventoryMoveJob,
finshInventoryMoveJob,
locations,
getBalancesByFilterAsync
} 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';
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
export default {
components: {
winScanButton,
winMulitScan,
winScanByPack,
comMessage,
comJobScanDetail,
winCollapseLocation,
winScanByProductCode,
comNumberBox,
comProductCode,
winScanLocationCode
},
data() {
return {
type: '',
id: "",
datacontent: {},
details: [],
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
balancesItem: {},
titleArray: ['箱标签', '目标库位'],
allCount: 0,
scanCount: 0,
jobStatus: "",
toLocationInfo: null,
fromLocationInfo: null,
pattern: {
color: '#7A7E83',
backgroundColor: '#fff',
selectedColor: '#007AFF',
buttonColor: '#5A7CF3',
iconColor: '#fff'
},
directionStr: '垂直',
horizontal: 'right',
vertical: 'bottom',
direction: 'horizontal',
content: [{
iconPath: '/static/icons_ui/icons_common_sjadd.svg',
selectedIconPath: '/static/icons_ui/icons_common_sjadd.svg',
text: '来源库位',
active: false
},
{
iconPath: '/static/icons_ui/icon_num.svg',
selectedIconPath: '/static/icons_ui/icon_num.svg',
text: '箱码',
active: false
},
{
iconPath: '/static/icons_ui/icon_erp.svg',
selectedIconPath: '/static/icons_ui/icon_erp.svg',
text: '目标库位',
active: false
},
]
}
},
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) {
//
cancelTakeInventoryMoveJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
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() {
this.$refs.scanPopup.openScanPopup();
},
//
getDetail() {
let that = this;
let params = {
id: that.id,
};
getInventoryMoveDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
that.toLocationInfo = null
that.fromLocationInfo = null
})
.catch(err => {
this.showMessage('未查找到详细信息')
});
},
//
async getScanResult(result) {
var packingCode = result.data.code;
var itemFrom = this.details[0];
uni.showLoading({
title: '加载中',
mask: true
})
var params = {
pageIndex: 1,
pageSize: 100,
packingCode: packingCode
};
let balanceRes = await getBalancesByFilterAsync(params);
uni.hideLoading();
if (balanceRes.totalCount === 0) {
this.showMessage('箱码【' + packingCode + '】未查询到库存余额')
return;
}
var balanceData = balanceRes.items[0];
var itemCode = balanceData.itemCode;
var lot = balanceData.lot;
var locationCode = balanceData.locationCode;
var status = balanceData.status;
var qty = balanceData.qty;
//
if (itemFrom.isPackingCodeFrom || itemFrom.isPackingCodeTo) {
if (packingCode != itemFrom.isPackingCodeFrom) {
this.showMessage("任务中不允许修改来源箱码, 扫描箱码[" + packingCode + "]与推荐箱码[" + itemFrom.packingCode +
"]不一致,请重新扫描")
return;
}
}
//
if (itemFrom.isItemCodeFrom || itemFrom.isItemCodeTo) {
if (itemCode != itemFrom.itemCode) {
this.showMessage("任务中不允许修改来源零件, 扫描箱码[" + packingCode + "]的零件[" + itemCode + "]与推荐零件[" +
itemFrom.itemCode + "]不一致,请重新扫描")
return;
}
}
//
if (itemFrom.isLotFrom || itemFrom.isLotTo) {
if (lot != itemFrom.recommendFromLot) {
this.showMessage("任务中不允许修改来源批次, 扫描箱码[" + packingCode + "]的批次是[" + lot + "]与推荐批次[" + itemFrom
.lot + "]不一致,请重新扫描")
return;
}
}
//
if (itemFrom.isLocationCodeFrom) {
if (locationCode != itemFrom.recommendFromLocationCode) {
this.showMessage("任务中不允许修改来源库位, 扫描箱码[" + packingCode + "]的库位是[" + locationCode + "]与推荐库位[" +
itemFrom.recommendFromLocationCode + "]不一致,请重新扫描")
return;
}
}
//
if (itemFrom.isStatusFrom || itemFrom.isStatusTo) {
if (status != itemFrom.status) {
this.showMessage("任务中不允许修改来源状态, 扫描箱码[" + packingCode + "]的状态是[" + status + "]与推荐状态[" + itemFrom
.status + "]不一致,请重新扫描")
return;
}
}
if (itemFrom.isQtyFrom || itemFrom.isQtyTo) {
if (qty != itemFrom.recommendFromQty) {
this.showMessage("任务中不允许修改来源数量, 扫描箱码[" + packingCode + "]的数量是[" + qty + "]与推荐数量[" + itemFrom
.recommendFromQty + "]不一致,请重新扫描")
return;
}
}
itemFrom.handledFromPackingCode = packingCode;
itemFrom.handledFromLot = lot;
// itemFrom.handledFromLocationCode = locationCode;
// itemFrom.handledFromLocationArea = balanceData.locationArea;
// itemFrom.handledFromLocationGroup = balanceData.locationGroup;
// itemFrom.handledFromLocationErpCode = balanceData.locationErpCode;
itemFrom.handledFromContainerCode = balanceData.containerCode;
itemFrom.handledFromSupplierBatch = balanceData.supplierBatch;
itemFrom.handledFromArriveDate = balanceData.arriveDate;
itemFrom.handledFromProduceDate = balanceData.produceDate;
itemFrom.handledFromExpireDate = balanceData.expireDate;
itemFrom.handledFromWarehouseCode = balanceData.warehouseCode;
itemFrom.handledFromQty = balanceData.qty;
itemFrom.handledToContainerCode = itemFrom.handledFromContainerCode;
itemFrom.handledToPackingCode = itemFrom.handledFromPackingCode;
itemFrom.handledToSupplierBatch = itemFrom.handledFromSupplierBatch;
itemFrom.handledToArriveDate = itemFrom.handledFromArriveDate;
itemFrom.handledToProduceDate = itemFrom.handledFromProduceDate;
itemFrom.handledToExpireDate = itemFrom.handledFromExpireDate;
itemFrom.handledToWarehouseCode = itemFrom.handledFromWarehouseCode;
itemFrom.handledToLot = itemFrom.handledFromLot;
itemFrom.handledToQty = itemFrom.handledFromQty;
},
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
};
takeInventoryMoveJob(params)
.then(res => {
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
});
},
submit() {
if (this.fromLocationInfo == null) {
this.showMessage('请扫描来源库位');
return;
}
if (this.toLocationInfo == null) {
this.showMessage('请扫描目标库位');
return;
}
if (!this.details[0].handledFromPackingCode) {
this.showMessage('请扫描箱码');
return;
}
this.finsh();
},
finsh() {
uni.showLoading({
title: "提交中..."
});
this.setParams();
let params = JSON.stringify(this.datacontent);
console.log("提交", params);
finshInventoryMoveJob(this.id, params)
.then(res => {
uni.hideLoading();
if (res != null) {
this.showCommitSuccessMessage();
}
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
},
setParams() {
this.details.forEach(res => {
res.handledFromLocationCode = this.fromLocationInfo.code;
res.handledFromLocationArea =this.fromLocationInfo.areaCode;
res.handledFromLocationGroup =this.fromLocationInfo.locationGroup;
res.handledFromLocationErpCode = this.fromLocationInfo.locationErpCode;
res.handledToLocationCode = this.toLocationInfo.code;
res.handledToLocationArea =this.toLocationInfo.areaCode;
res.handledToLocationGroup = this.toLocationInfo.locationGroup;
res.handledToLocationErpCode = this.toLocationInfo.locationErpCode;
})
},
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;
},
openFromLocation() {
this.$refs.locationFrom.openScanPopup()
},
openToLocation() {
this.$refs.locationTo.openScanPopup()
},
getFromLocation(locationInfo) {
if (this.details[0].isLocationCodeFrom) {
if (locationInfo.code != this.details[0].recommendFromLocationCode) {
this.showMessage("任务中不允许修改来源库位, 扫描来源库位[" + locationInfo.code + "]与推荐库位[" + this.details[0]
.recommendFromLocationCode + "]不一致,请重新扫描")
return;
}
}
this.fromLocationInfo = locationInfo
this.details[0].handledFromLocationCode=locationInfo.code
},
getToLocation(locationInfo) {
if (this.details[0].isLocationCodeTo) {
if (locationInfo.code != this.details[0].recommendToLocationCode) {
this.showMessage("任务中不允许修改目标库位, 扫描目标库位[" + locationInfo.code + "]与推荐库位[" + this.details[0]
.recommendToLocationCode + "]不一致,请重新扫描")
return;
}
}
this.toLocationInfo = locationInfo
this.details[0].handledToLocationCode=locationInfo.code
},
trigger(e) {
if (e.item.text == "来源库位") {
this.openFromLocation()
} else if (e.item.text == "目标库位") {
this.openToLocation();
} else if (e.item.text == "箱码") {
this.openScanPopup()
}
// this.$refs.fab.close();
}
}
}
</script>
<style lang="less">
.fab {
::v-deep.uni-icons.uniui-plusempty.fab-circle-icon {
font-size: 0 !important;
}
::v-deep.uniui-plusempty:before {
content: "扫描" !important;
font-size: 30rpx;
}
}
</style>
Loading…
Cancel
Save