Browse Source

添加新增页面

pda_nev
李俊城 1 year ago
parent
commit
eb01565661
  1. 42
      fe/PDA/api/index.js
  2. 20
      fe/PDA/common/new_style.css
  3. 2
      fe/PDA/mycomponents/comjob/comJobScanDetail.vue
  4. 123
      fe/PDA/mycomponents/coms/comDeliverBoardDetail.vue
  5. 18
      fe/PDA/mycomponents/coms/comUnPacking.vue
  6. 84
      fe/PDA/mycomponents/coms/task/comDeliverBoard.vue
  7. 170
      fe/PDA/mycomponents/wincom/winScanByContainer.vue
  8. 28
      fe/PDA/pages.js
  9. 28
      fe/PDA/pages.json
  10. 3
      fe/PDA/pages/index/index.vue
  11. 212
      fe/PDA/pages/task/deliverBoard.vue
  12. 386
      fe/PDA/pages/task/deliverBoard_detail.vue
  13. 240
      fe/PDA/pages/task/deliverJis.vue
  14. 760
      fe/PDA/pages/task/deliverJis_detail.vue
  15. 16
      fe/PDA/pages/task/issue_detail.vue
  16. 7
      fe/PDA/pages/task/receipt_detail.vue
  17. 2
      fe/PDA/pages/task/unProducePick.vue

42
fe/PDA/api/index.js

@ -1192,9 +1192,12 @@ export const returnBeforePutaway = (params) => request(
// data: {}, // data: {},
// method: "get" // method: "get"
// }); // });
export const getContainerCodeInfo = (code) => request(
devUrl + "/api/pda/position-code/" + code, { //
data: {},
method: "get"
});
//获取位置码信息 //获取位置码信息
//查询器具是否存在
export const getPositionCodeInfo = (code) => request( export const getPositionCodeInfo = (code) => request(
devUrl + "/api/pda/position-code/" + code, { // devUrl + "/api/pda/position-code/" + code, { //
data: {}, data: {},
@ -1331,3 +1334,38 @@ export const issueDirect = (params) => request(
data: params, data: params,
method: "post" method: "post"
}); });
//看板件发运
export const getDeliverBoardList = (params) => request(
devUrl + "/api/pda/job/issue/list", {
method: 'get',
data: params
});
//承接发运任务
export const takeDeliverBoardJob = (params) => request(
devUrl + "/api/pda/job/issue/take/" + params.id, { //
data: {},
method: "post"
});
//取消承接发运任务
export const cancelTakeDeliverBoardJob = (id) => request(
devUrl + "/api/pda/job/issue/cancel-take/" + id, { //
data: {},
method: "post"
});
//发运任务详情
export const getDeliverJobDetail = (params) => request(
devUrl + "/api/pda/job/issue/" + params.id, { //
data: {},
method: "get"
});
//完成发运任务
export const finshDeliverBoardJob = (id, params) => request(
devUrl + "/api/pda/job/issue/finish/" + id, { //
data: params,
method: "post"
})

20
fe/PDA/common/new_style.css

@ -63,7 +63,7 @@ uni-page-head .uni-page-head__title {
} }
.margin_top { .margin_top {
margin-top: 20rpx; margin-top: 10rpx;
} }
.margin_bottom { .margin_bottom {
@ -187,7 +187,7 @@ uni-page-head .uni-page-head__title {
position: relative; position: relative;
/* width: 25%; */ /* width: 25%; */
padding: 0 20rpx; padding: 0 20rpx;
margin: 0 0 20rpx; /* margin: 0 0 20rpx; */
text-align: center; text-align: center;
} }
@ -816,8 +816,8 @@ uni-page-head .uni-page-head__title {
.task_num { .task_num {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
padding-bottom: 10rpx; padding-bottom: 5rpx;
margin-bottom: 10rpx; margin-bottom: 5rpx;
overflow: hidden; overflow: hidden;
} }
@ -1880,3 +1880,15 @@ uni-modal .uni-modal__hd {
right: 0; right: 0;
top: -6rpx; top: -6rpx;
} }
.btn_single {
background-color: #3C9CFF;
font-size: 32rpx;
color: #fff;
text-align: center;
width: 150rpx;
margin:0 20rpx 20rpx;
}
.btn_single_after {
opacity: 0.7;
}

2
fe/PDA/mycomponents/comjob/comJobScanDetail.vue

@ -8,7 +8,7 @@
</text> </text>
<text class="tit_ljh">{{ jobContent.number }}</text> <text class="tit_ljh">{{ jobContent.number }}</text>
</view> --> </view> -->
<view class="cell_box uni-flex uni-row margin_top"> <view class="cell_box uni-flex uni-row margin_top" >
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">总数量</view> <view class="text_lightblue">总数量</view>
<view class="text_black text_bold">{{ allCount}}</view> <view class="text_black text_bold">{{ allCount}}</view>

123
fe/PDA/mycomponents/coms/comDeliverBoardDetail.vue

@ -0,0 +1,123 @@
<template>
<view class="">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ dataContent.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ dataContent.itemName }}</view>
<view class="font_xs text_lightblue">{{ dataContent.itemDesc1 }}</view>
</view>
</view>
扫描{{dataContent.scaned}}
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<!-- <uni-th width="90"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="100" align="center">实际</uni-th> -->
<uni-th width="50"></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="50">器具码</uni-th>
<uni-th width="120" align="center">
<view class="text_packingCode">
{{ dataContent.recommendContainerCode }}
</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="dataContent.scaned" class="text_packingCode">
{{ dataContent.containerCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="120" align="center">
<text class="text_black">{{dataContent.recommendQty}}({{dataContent.uom}})</text>
</uni-th>
<uni-th width="120" align="center">
<view v-if="dataContent.scaned"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBox" v-model="dataContent.handledQty"
:max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,dataContent)">
</com-number-box>
<text class="text_black">({{dataContent.uom}})</text>
</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view class="choose_marked" v-if="dataContent.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
<view class="fr" v-if="isShowPacking">
<button class="btn_single" hover-class="btn_single_after" @click="unPacking(dataContent)">拆箱</button>
</view>
</view>
<comUnPacking ref='comUnPacking'
@getvalue="getUnPackingCount" title="拆箱">
</comUnPacking>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view>
</template>
<script>
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comUnPacking from '@/mycomponents/coms/comUnPacking.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default {
name: "",
components: {
comNumberBox,
comUnPacking,
comMessage
},
data() {
return {};
},
//
props: {
dataContent: {
type: Object,
value: {}
},
isShowPacking: {
type: Boolean,
value: false
},
},
methods: {
unPacking(item) {
this.$refs.comUnPacking.openPopup3(item,item.handledQty,item.recommendQty,false);
},
qtyChanged(value, item) {
if (value <= 0) {
this.showMessage('数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs.comNumberBox.setValue(item.handledQty);
} else if (value > item.defaultHandleQty) {
item.handledQty = item.defaultHandleQty
this.showMessage('数量不能大于库存数量:' + item.handledQty)
this.$refs.comNumberBox.setValue(item.handledQty);
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
}
</script>
<style>
</style>

18
fe/PDA/mycomponents/coms/comUnPacking.vue

@ -5,21 +5,22 @@
<view <view
style="display: flex; justify-content: center; align-items: center; padding: 10rpx;flex-direction: column;"> style="display: flex; justify-content: center; align-items: center; padding: 10rpx;flex-direction: column;">
<view style="padding: 10rpx; font-weight: bold; font-size: 35rpx;">{{title}}</view> <view style="padding: 10rpx; font-weight: bold; font-size: 35rpx;">{{title}}</view>
<view class="" style="width: 100%; background-color: black;height: 1rpx;"> <view class="" style="width: 100%; background-color: black;height: 2rpx;">
</view> </view>
</view> </view>
<view style="padding: 6rpx;margin-left: 15rpx;">箱码 : {{dataContent.recommendPackingCode}}</view> <view style="padding: 6rpx;margin-left: 15rpx;font-size: 32rpx;">箱码 : {{dataContent.recommendPackingCode}}</view>
<view style="padding: 6rpx;margin-left: 15rpx;">物料号 : {{dataContent.itemCode}}</view> <view style="padding: 6rpx;margin-left: 15rpx;font-size: 32rpx;">物料号 : {{dataContent.itemCode}}</view>
<view style="padding: 6rpx;margin-left: 15rpx;">名称 : {{dataContent.itemName}}</view> <view style="padding: 6rpx;margin-left: 15rpx;font-size: 32rpx;">名称 : {{dataContent.itemName}}</view>
<view style="padding: 6rpx;margin-left: 15rpx;">描述 : {{dataContent.itemDesc1}}</view> <view style="padding: 6rpx;margin-left: 15rpx;font-size: 32rpx;">描述 : {{dataContent.itemDesc1}}</view>
<view style="display: flex; justify-content: center;align-items: center; padding: 6rpx;"> <view style="display: flex; justify-content: center;align-items: center; padding: 6rpx;margin-top: 10rpx;">
<com-number-box v-model="value" :max="99999999" :min="0" style='margin: 0px 5px' /> <com-number-box v-model="value" :max="99999999" :min="0" style='margin: 0px 5px' />
<view class=""> <view class="">
({{dataContent.uom}}) ({{dataContent.uom}})
</view> </view>
</view> </view>
<view class="uni-popup-button-box"> <view class="uni-popup-button-box">
<button @click="submit" class="save-button" style="width: 220rpx;margin-top: 10rpx; " type="primary">确定</button> <button @click="cancle" class="save-button" style="width: 220rpx;margin-top: 10rpx;margin-right: 10rpx; " type="default">取消</button>
<button @click="submit" class="save-button" style="width: 220rpx;margin-top: 10rpx;margin-left: 10rpx; " type="primary">确定</button>
</view> </view>
@ -102,6 +103,9 @@
this.allowZero = isZero; this.allowZero = isZero;
this.$refs['popupqtyedit'].open("center"); this.$refs['popupqtyedit'].open("center");
}, },
cancle(){
this.$refs['popupqtyedit'].close();
},
// //
submit() { submit() {
let that = this; let that = this;

84
fe/PDA/mycomponents/coms/task/comDeliverBoard.vue

@ -0,0 +1,84 @@
<!--发料任务卡片-->
<template>
<view class="device-detail issuelist">
<!-- <view class="card_task issuecard nopad uni-flex space-between"> -->
<view class="card_task nopad space-between">
<com-job-top-info :jobContent="dataContent"></com-job-top-info>
<image v-if="dataContent.useOnTheWayLocation" class="tag_icon" src="@/static/icons_ui/icon_kw_use.svg">
</image>
</view>
<view class="margin_xs_bottom" style="clear: both;">
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image>
<text>{{dataContent.materialRequestNumber}}</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
</view>
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_prod_line.svg"></image>
<text>{{dataContent.prodLine}}</text>
<!-- <text>生产线{{dataContent.prodLine}}</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,
getInventoryTypeStyle,
getInventoryStatusDesc,
dateFormat
} from '@/common/basic.js';
import comItemTop from '@/mycomponents/comItem/comItemTop.vue'
import comItemBottom from '@/mycomponents/comItem/comItemBottom.vue'
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default {
name: "comissue",
components: {
comItemTop,
comItemBottom,
comJobTopInfo
},
data() {
return {};
},
computed: {},
//
props: {
dataContent: {
type: Object,
value: null
}
},
filters: {
jobStatusStyle: function(val) {
return getJobStatuStyle(val);
},
jobStatusColor: function(val) {
return getJobStatuDesc(val);
},
statusStyle: function(val) {
return getInventoryTypeStyle(val);
},
statusColor: function(val) {
return getInventoryStatusDesc(val);
},
formatDate: function(val) {
return dateFormat(val)
}
},
}
</script>
<style scoped lang="scss">
</style>

170
fe/PDA/mycomponents/wincom/winScanByContainer.vue

@ -0,0 +1,170 @@
<template>
<view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()">
<view class="popup_box">
<view class="pop_title">
扫描器具码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<view class="pop_tab">
<view class="tab_info">
<win-com-scan ref="comscan" @getScanResult="getScanResult" placeholder="器具码"
:clearResult="true"></win-com-scan>
<view class="uni-flex">
<button class="clean_scan_btn" @click="cancelClick()">清空</button>
<button class="scan_btn" @click="scanClick()">扫描</button>
</view>
</view>
</view>
</view>
</uni-popup>
<com-message ref="comMessage" @afterClose="getfocus"></com-message>
</view>
</template>
<script>
import winComScan from '@/mycomponents/wincom/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
getContainerCodeInfo
} from '@/api/index.js';
export default {
name: 'winScanByPack',
components: {
winComScan,
comMessage
},
props: {
title: {
type: String,
default: ''
},
},
data() {
return {
scanResult: {},
show: false,
}
},
created() {
},
methods: {
openScanPopup(content) {
this.$refs.popup.open('bottom');
},
closeScanPopup(content) {
this.$refs.popup.close();
this.$emit("close", '');
},
scanClick() {
this.$refs.comscan.handelScanMsg();
},
cancelClick() {
this.$refs.comscan.clearScanValue();
},
getScanResult(result) {
console.log("扫描",result.data.code)
if (result != null) {
if(result.data.code[0].toUpperCase()!="C"){
this.showMessage("标签格式不正确")
return;
}
// uni.showLoading({
// title: '...',
// mask: true
// })
// getContainerCodeInfo(code).then(res=>{
// uni.hideLoading();
//this.scanResult=res.data
// }).catch(error=>{
// uni.hideLoading();
// this.showMessage(error.message)
// })
var data =
{
containerCode: "C19",
partCode: "TMDLYA0AFM6A",
partName: "P000000000000015",
partDesc: "MY前保总成件售后件(冲孔)",
basicUom: "PC",
locationCode: "W",
locationName: "原物料库位",
stdPackQty: 100,
remark: null,
tenantId: null,
concurrencyStamp: "b3f2cf7ba3e14166bb97dac768d91741",
lastModificationTime: null,
lastModifierId: null,
creationTime: "2024-02-28T14:47:08.6878607",
creatorId: null,
qty:0,
id: "4c40f72b-a86d-54be-aed2-3a1100a46436"
}
this.scanResult = data;
this.callBack()
// this.closeScanPopup()
}
},
getLabelResult(label) {
let labelResult = {
sucess: true,
message: "",
data: label,
// data: {
// isPack: true,
// // scanType: null,
// itemCode: label.itemCode,
// itemName: label.itemName,
// itemDesc1: label.itemDesc1,
// itemDesc2: label.itemDesc2,
// lot: label.lot,
// qty: label.qty,
// uom: label.uom,
// poNumber: label.poNumber,
// // asn: null,
// packingCode: label.code,
// supplierBatch: label.supplierBatch,
// // order: null,
// // poLine: null,
// code: label.code,
// }
};
labelResult.data.isPack = true;
labelResult.data.packingCode = label.code;
return labelResult;
},
callBack() {
this.$refs.comscan.clear();
this.$emit("getScanResult", this.scanResult);
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
change(e) {
this.show = e.show
}
}
}
</script>
<style>
</style>

28
fe/PDA/pages.js

@ -547,6 +547,34 @@ module.exports = () => ({
"navigationBarTitleText": "非生产退料详情", "navigationBarTitleText": "非生产退料详情",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
{
"path": "pages/task/deliverBoard",
"style": {
"navigationBarTitleText": "看板件发运",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/deliverBoard_detail",
"style": {
"navigationBarTitleText": "看板件发运详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/deliverJis",
"style": {
"navigationBarTitleText": "Jis发运",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/deliverJis_detail",
"style": {
"navigationBarTitleText": "Jis发运详情",
"enablePullDownRefresh": true
}
} }
], ],
"globalStyle": { "globalStyle": {

28
fe/PDA/pages.json

@ -525,6 +525,34 @@
"navigationBarTitleText": "非生产退料详情", "navigationBarTitleText": "非生产退料详情",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
{
"path": "pages/task/deliverBoard",
"style": {
"navigationBarTitleText": "看板件发运",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/deliverBoard_detail",
"style": {
"navigationBarTitleText": "看板件发运详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/deliverJis",
"style": {
"navigationBarTitleText": "Jis发运",
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/deliverJis_detail",
"style": {
"navigationBarTitleText": "Jis发运详情",
"enablePullDownRefresh": true
}
} }

3
fe/PDA/pages/index/index.vue

@ -1,6 +1,9 @@
<template> <template>
<page-meta root-font-size="18px"></page-meta> <page-meta root-font-size="18px"></page-meta>
<view class="content"> <view class="content">
<view class="" style="background-color: orangered;">
东阳NEV
</view>
<view class="index_top" style="position: relative;"> <view class="index_top" style="position: relative;">
<view class="serch" style="height: 50px;"> <view class="serch" style="height: 50px;">
<uni-search-bar class="flex1" @confirm="search" cancelButton="none" v-model="serchval" <uni-search-bar class="flex1" @confirm="search" cancelButton="none" v-model="serchval"

212
fe/PDA/pages/task/deliverBoard.vue

@ -0,0 +1,212 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-empty-view v-if="issueList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in issueList" :key="item.id"
@click="openDetail(item)">
<comDeliverBoard :dataContent="item"></comDeliverBoard>
</view>
<uni-load-more :status="loadingType" v-if="issueList.length>0" />
<!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> -->
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'>
</win-mulit-scan>
<com-scan-issue-list ref="scanList" @selectedItem="selectedItem"></com-scan-issue-list>
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
getDeliverBoardList,
getIssueJobByNumber,
getIssueListByRequest
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comDeliverBoard from '@/mycomponents/coms/task/comDeliverBoard.vue';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comScanIssueList from '@/mycomponents/scan/comScanIssueList.vue'
export default {
name: 'issue',
components: {
winEmptyView,
comDeliverBoard,
comMessage,
winScanButton,
winMulitScan,
comScanIssueList
},
data() {
return {
//popup
type: '',
issueList: [],
reload: false,
status: '',
contentText: {
contentdown: '上拉加载更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
pageSize: this.modelConfig,
pageIndex: 1,
isIssueTimeChange: false,
isToday: false,
titleArray: ['任务编号'],
loadingType: "nomore"
};
},
props: {
datacontent: {
type: Object,
value: null
},
isByFIFO: {
type: Boolean,
value: false
}
},
onShow() {
this.getList('refresh');
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
//
getList(type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageIndex = 1;
this.issueList = [];
}
let params = {
pageSize: that.pageSize,
pageIndex: that.pageIndex,
isCreationTimeSorting: that.isIssueTimeChange,
isToday: that.isToday
};
getDeliverBoardList(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.issueList = type === "refresh" ? list : this.issueList.concat(list);
that.pageIndex++;
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
},
getScanResult(type, result) {
let code = result.data.code;
if (code == '') {
this.showMessage('扫描的内容不能为空')
return;
}
if (type == '任务编号') {
this.scanByNumber(code, type);
}
},
//
scanByRequesNumber(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getIssueListByRequest(code).then(res => {
uni.hideLoading();
let items = res.items;
if (res.totalCount > 0) {
if (res.totalCount == 1) {
that.openDetail(items[0]);
} else {
that.showItemList(items);
}
} else {
that.showMessage('未查找到' + type + '为【' + code + '】的发料任务');
}
}).catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
//
scanByNumber(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getIssueJobByNumber(code).then(res => {
uni.hideLoading();
if (res != null) {
that.openDetail(res);
} else {
that.showMessage('未查找到' + type + '为【' + code + '】的发料任务');
}
}).catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
openDetail(item) {
uni.navigateTo({
url: './deliverBoard_detail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
onPull() {
this.getList('refresh');
},
onReach() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList('more');
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
},
selectedItem(item) {
this.openDetail(item);
}
}
};
</script>
<style scoped lang="scss">
</style>

386
fe/PDA/pages/task/deliverBoard_detail.vue

@ -0,0 +1,386 @@
<!-- 发料任务详情 -->
<template>
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<!-- <comDeliverBoardDetail :dataContent="item" :isShowPacking="true"></comDeliverBoardDetail> -->
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<!-- <uni-th width="90"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="100" align="center">实际</uni-th> -->
<uni-th width="50"></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="50">器具码</uni-th>
<uni-th width="120" align="center">
<view class="text_packingCode">
{{ item.recommendContainerCode }}
</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_packingCode">
{{ item.containerCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="120" align="center">
<!-- <text class="text_black">{{item.recommendQty}}({{item.uom}})</text> -->
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBox" v-model="item.handledQty"
:max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black">({{item.uom}})</text>
</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 class="fr" >
<button class="btn_single" hover-class="btn_single_after" @click="unPacking(item)">拆箱</button>
</view>
</view>
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<winScanByContainer ref="scanPopup" @getScanResult='getScanResult'></winScanByContainer>
<comUnPacking ref='comUnPacking'
@getvalue="getUnPackingCount" title="拆箱">
</comUnPacking>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view>
</template>
<script>
import {
getDeliverJobDetail,
takeDeliverBoardJob,
cancelTakeDeliverBoardJob,
finshIssueJob,
issueBalances
} from '@/api/index.js';
import {
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome,
compareDesc,
compareStr,
getCurrDateTime,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByContainer from '@/mycomponents/wincom/winScanByContainer.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import comDeliverBoardDetail from '@/mycomponents/coms/comDeliverBoardDetail.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comUnPacking from '@/mycomponents/coms/comUnPacking.vue'
export default {
components: {
comMessage,
winScanButton,
winScanByContainer,
comBalance,
comJobScanDetail,
comDeliverBoardDetail,
comNumberBox,
comUnPacking
},
data() {
return {
id: "",
datacontent: {},
details: {},
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
ispending: false,
balancesItem: null,
currentItem: null,
received: false,
allCount: 0,
scanCount: 0,
jobStatus: ""
}
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
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) {
//
cancelTakeDeliverBoardJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
//
getDetail() {
let that = this;
if (that.id == undefined) {
return;
}
uni.showLoading({
title: '加载中...',
mask: true
})
let params = {
id: that.id,
};
getDeliverJobDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.details = item.details;
that.details[0].recommendContainerCode = "C19"
that.jobStatus = item.jobStatus
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
}
);
that.ispending = item.jobStatus === 2;
// if (that.toLocation === '') {
// that.toLocation = item.details[0].requestLocationCode;
// }
this.allCount = that.details.length;
this.scanCount = 0;
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
getScanResult(result) {
//
let item = this.details.find(r => r.recommendContainerCode == result.containerCode);
if (item == undefined) {
this.showMessage("器具码【" + result.containerCode + "】不在列表中")
} else {
if (item.scaned) {
this.showMessage("器具码【" + result.containerCode + "】已经扫描")
} else {
if (this.allCount == this.scanCount) {
this.showMessage("零件已经全部扫描完成");
return;
}
item.containerCode = result.containerCode;
item.scaned = true;
item.handleQty = 10;
this.calcScanCount()
this.$forceUpdate();
}
}
},
// //
receive(callback) {
let params = {
id: this.id
};
takeDeliverBoardJob(params)
.then(res => {
callback(true);
})
.catch(err => {
this.showMessage(err.message);
callback(false);
});
},
calcScanCount() {
this.scanCount = this.details.filter(r => r.scaned === true).length;
this.closeScanPopup();
},
submit() {
this.calcScanCount()
if (this.scanCount != this.allCount) {
this.showMessage('当前扫描数量【'+this.scanCount+"】,总数量为【"+this.allCount+"】,未全部扫描");
return;
}
uni.showLoading({
title: "提交中...",
mask: true
});
let params = that.datacontent;
// finshIssueJob(that.id, params)
// .then(res => {
// uni.hideLoading();
// if (res != null) {
// that.showCommitSuccessMessage();
// that.backJobList();
// }
// })
// .catch(err => {
// that.showMessage(err.message);
// uni.hideLoading();
// });
},
//
backJobList() {
navigateBack(1)
},
clear() {
this.scanCount = 0;
this.getDetail();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
closeScanMessage() {
this.$refs.scanPopup.getfocus();
},
calcScanCount() {
this.scanCount = this.details.filter(r => r.scaned === true).length;
this.closeScanPopup();
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
this.backJobList(0); //
uni.hideLoading();
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
closeScanMessage() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scrollToTop() {
let that = this;
// view
that.scrollTop = that.old.scrollTop
this.$nextTick(function() {
that.scrollTop = 0
});
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}
},
}
}
</script>
<style scoped lang="scss">
</style>

240
fe/PDA/pages/task/deliverJis.vue

@ -0,0 +1,240 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<!-- <view class="uni-flex uni-row require_wrap">
<button @click="isTodayChange" :class="[isToday==true?'require_cell require_active':'require_cell']">
<text></text>
只看当天发料
</button>
<button @click="timeSortingChange"
:class="[isIssueTimeChange==true?'require_cell require_active':'require_cell']">
<text></text>
按发料时间排序
</button>
</view> -->
<win-empty-view v-if="issueList.length==0"></win-empty-view>
<view hover-class="uni-list-cell-hover" v-for="(item, index) in issueList" :key="item.id"
@click="openDetail(item)">
<com-issue :dataContent="item"></com-issue>
</view>
<uni-load-more :status="loadingType" v-if="issueList.length>0" />
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'>
</win-mulit-scan>
<com-scan-issue-list ref="scanList" @selectedItem="selectedItem"></com-scan-issue-list>
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
getIssueList,
getIssueJobByNumber,
getIssueListByRequest
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import issueDetail from './issue_detail.vue';
import comIssue from '@/mycomponents/coms/task/comIssue.vue';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comScanIssueList from '@/mycomponents/scan/comScanIssueList.vue'
export default {
name: 'issue',
components: {
winEmptyView,
comIssue,
issueDetail,
comMessage,
winScanButton,
winMulitScan,
comScanIssueList
},
data() {
return {
//popup
type: '',
issueList: [],
reload: false,
status: '',
contentText: {
contentdown: '上拉加载更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
pageSize: this.modelConfig,
pageIndex: 1,
isIssueTimeChange: false,
isToday: false,
titleArray: ['任务编号'],
loadingType: "nomore"
};
},
props: {
datacontent: {
type: Object,
value: null
},
isByFIFO: {
type: Boolean,
value: false
}
},
mounted() {
this.getList('refresh');
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
//
timeSortingChange() {
this.isIssueTimeChange = !this.isIssueTimeChange;
this.getList()
},
//
isTodayChange() {
this.isToday = !this.isToday
this.getList()
},
//
getList(type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageIndex = 1;
this.issueList = [];
}
let params = {
pageSize: that.pageSize,
pageIndex: that.pageIndex,
isCreationTimeSorting: that.isIssueTimeChange,
isToday: that.isToday
};
getIssueList(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.issueList = type === "refresh" ? list : this.issueList.concat(list);
that.pageIndex++;
})
.catch(err => {
this.showMessage(err.message);
uni.hideLoading();
});
},
getScanResult(type, result) {
let code = result.data.code;
if (code == '') {
this.showMessage('扫描的内容不能为空')
return;
}
if (type == '申请单号') {
this.scanByRequesNumber(code, type);
} else if (type == '任务编号') {
this.scanByNumber(code, type);
}
},
//
scanByRequesNumber(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getIssueListByRequest(code).then(res => {
uni.hideLoading();
let items = res.items;
if (res.totalCount > 0) {
if (res.totalCount == 1) {
that.openDetail(items[0]);
} else {
that.showItemList(items);
}
} else {
that.showMessage('未查找到' + type + '为【' + code + '】的发料任务');
}
}).catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
//
scanByNumber(code, type) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getIssueJobByNumber(code).then(res => {
uni.hideLoading();
if (res != null) {
that.openDetail(res);
} else {
that.showMessage('未查找到' + type + '为【' + code + '】的发料任务');
}
}).catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
openDetail(item) {
uni.navigateTo({
url: './issue_detail?id=' + item.id + '&jobStatus=' + item.jobStatus + '&isByFIFO=' +
this
.isByFIFO
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
onPull() {
this.getList('refresh');
},
onReach() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList('more');
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
},
selectedItem(item) {
this.openDetail(item);
}
}
};
</script>
<style scoped lang="scss">
</style>

760
fe/PDA/pages/task/deliverJis_detail.vue

@ -0,0 +1,760 @@
<!-- 发料任务详情 -->
<template>
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<!-- <uni-th width="90"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="100" align="center">实际</uni-th> -->
<uni-th width="50"></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="50">数量</text></uni-th>
<uni-th width="120" align="center">
<text class="text_black">{{item.recommendQty}}({{item.uom}})</text>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty"
:max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">箱码</uni-th>
<uni-th width="120" align="center">
<view class="text_packingCode">
{{ item.recommendPackingCode }}
</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_packingCode">
{{ item.handledPackingCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">批次</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{item.recommendLot }}</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">{{item.handledLot }}</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="60">库位</uni-th>
<uni-th width="100" align="center">
<view class="text_black">{{ item.recommendFromLocationCode }}</view>
</uni-th>
<uni-th width="100" align="center">
<view class="text_black" v-if="item.scaned">
{{ item.handledFromLocationCode }}
</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 class="fr"
>
<button class="btn_single" hover-class="btn_single_after" @click="unPacking(item)">拆箱</button>
</view>
</view>
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<comUnPacking ref='comUnPacking'
@getvalue="getUnPackingCount" title="拆箱">
</comUnPacking>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view>
</template>
<script>
import {
getIssueDetail,
takeIssueJob,
cancelTakeIssueJob,
finshIssueJob,
issueBalances
} from '@/api/index.js';
import {
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome,
compareDesc,
compareStr,
getCurrDateTime
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comUnPacking from '@/mycomponents/coms/comUnPacking.vue'
export default {
components: {
comMessage,
winScanButton,
winMulitScan,
comBalance,
comJobScanDetail,
winScanByPack,
comNumberBox,
comUnPacking
},
data() {
return {
id: "",
datacontent: {},
details: {},
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
ispending: false,
balancesItem: null,
currentItem: null,
received: false,
currentScanLebel: null,
allCount: 0,
scanCount: 0,
byFIFO: false,
isPack: true,
titleArray: ['箱标签'],
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
}
},
props: {
itemCode: "",
},
onLoad(param) {
this.id = param.id;
this.byFIFO = param.isByFIFO === 'true' ? true : false;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
this.getDetail();
}
},
onReady() {
// if (this.byFIFO) {
// uni.setNavigationBarTitle({
// title: ''
// })
// } else {
// uni.setNavigationBarTitle({
// title: 'FIFO'
// })
// }
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
window.location.reload();
}
},
//
onBackPress(e) {
if (this.received) {
//
cancelTakeIssueJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
}
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: "#5A7CF3 !important"
})
},
methods: {
openScanPopup() {
// if (this.allCount === this.scanCount) {
// this.showMessage("");
// return;
// }
this.$refs.scanPopup.openScanPopup();
},
//
getDetail() {
let that = this;
if (that.id == undefined) {
return;
}
uni.showLoading({
title: '加载中...',
mask: true
})
let params = {
id: that.id,
};
getIssueDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.details = item.details;
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
}
);
that.ispending = item.jobStatus === 2;
// if (that.toLocation === '') {
// that.toLocation = item.details[0].requestLocationCode;
// }
this.allCount = that.details.length;
this.scanCount = 0;
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
getScanResult(result) {
//
let item = this.details.find(r => r.recommendPackingCode === result.data.packingCode && r
.scanPackingCode != result.data.packingCode);
if (item != undefined && item.scaned) {
showConfirmMsg('扫描的箱码【' + result.data.packingCode + '】匹配到任务中的【' + item.scanPackingCode +
'】箱,是否要重新匹配任务中的【' + item.scanPackingCode + '】箱?',
confirm => {
if (confirm) {
this.handledPackCode(result, true);
} else {
return;
}
})
} else {
if (this.allCount === this.scanCount) {
this.showMessage("零件已经全部扫描完成");
return;
}
this.handledPackCode(result, false);
}
this.scrollToTop();
},
//
//scaned
handledPackCode(result, scaned) {
//
let that = this;
that.currentScanLebel = result;
let scanItem = this.details.find(r => r.scanItemCode === that.currentScanLebel.data.itemCode &&
r.scanPackingCode === that.currentScanLebel.data.packingCode &&
r.scanLot === that.currentScanLebel.data.lot &&
r.scaned == true)
if (scanItem != undefined) {
this.showScanMessage('箱码【' + that.currentScanLebel.data.packingCode + '】已经扫描,请扫描下一箱零件');
} else {
this.dyIssue(result, scaned);
}
},
dyIssue(result, scaned) {
let that = this;
var itemCode = that.details.find(r => {
return r.itemCode === result.data.itemCode&&
r.scaned === scaned
})
if (itemCode == undefined) {
that.showScanMessage('所扫描的箱码【' + result.data.code + '】对应的物料【' + result.data.itemCode + '】不在任务中');
}else {
//
var itemCode1 = that.details.find(r => {
return r.itemCode === result.data.itemCode&&
r.recommendPackingCode === result.data.code
r.scaned === scaned
})
//
if(itemCode1 == undefined){
var itemCode2 = that.details.find(r => {
return r.itemCode === result.data.itemCode&&
r.recommendLot === result.data.lot
&&r.scaned === scaned
})
//
if(itemCode2==undefined){
//
console.log("零件号相同、箱码不相同、批次不相同")
setTimeout(res => {
showConfirmMsg(itemCode.recommendPackingCode+'未执行先进先出或不是最先批次,是否继续?', confirm => {
if (confirm) {
that.currentItem = itemCode;
that.afterScanPackLabel(result);
} else {
that.scanPopupGetFocus();
}
});
}, 100)
}else {
console.log("零件号相同、箱码不相同、批次相同")
//
that.currentItem = itemCode2;
that.afterScanPackLabel(result);
}
}else {
//
var itemCode3 = that.details.find(r => {
return r.itemCode === result.data.itemCode&&
r.recommendPackingCode === result.data.code&&
r.recommendLot === result.data.lot
&&r.scaned === scaned
})
if(itemCode3==undefined){
//
console.log("零件号相同、箱码相同、批次不同")
setTimeout(res => {
showConfirmMsg(itemCode1.recommendPackingCode+'未执行先进先出或不是最先批次,是否继续?', confirm => {
if (confirm) {
that.currentItem = itemCode1;
that.afterScanPackLabel(result);
} else {
that.scanPopupGetFocus();
}
});
}, 100)
}else {
console.log("零件号相同、箱码相同、批次相同")
//
that.currentItem = itemCode3;
that.afterScanPackLabel(result);
}
}
}
// that.currentItem = that.details.find(r => {
// return r.itemCode === result.data.itemCode &&
// r.recommendPackingCode === result.data.code &&
// r.recommendLot === result.data.lot &&
// r.scaned === scaned
// });
// //
// if (that.currentItem === undefined) {
// var itemCode = that.details.find(res => {
// return res.itemCode === result.data.itemCode &&
// res.scaned === scaned
// })
// //
// if (itemCode != undefined) {
// var lot = that.details.find(res => {
// return res.itemCode === result.data.itemCode &&
// res.recommendLot === result.data.lot &&
// res.scaned === scaned
// })
// if (lot != undefined) {
// //
// that.currentItem = lot;
// that.afterScanPackLabel(result);
// } else {
// //
// //
// setTimeout(res => {
// showConfirmMsg(',?', confirm => {
// if (confirm) {
// that.currentItem = itemCode;
// that.afterScanPackLabel(result);
// } else {
// that.scanPopupGetFocus();
// }
// });
// }, 100)
// }
// } else {
// //
// var lot = that.details.find(res => {
// return res.recommendLot === result.data.lot &&
// res.scaned === scaned
// })
// //
// if (lot != undefined) {
// //
// that.showScanMessage('');
// } else {
// //,
// that.showScanMessage('');
// }
// }
// } else {
// that.afterScanPackLabel(result);
// }
},
afterScanPackLabel(result) {
let that = this;
that.getBalance(result, res => {
if (res.totalCount === 1) {
that.balancesItem = res.items[0];
if (that.balancesItem != null || that.balancesItem != undefined) {
that.setBalanceInfo(this.currentItem, that.balancesItem);
that.scanPopupGetFocus();
}
} else {
this.$refs['issueitems'].openPopup(res.items);
}
});
},
//
getBalance(result, callback) {
uni.showLoading({
title: '扫描中...',
mask: true
})
let params = {
pageSize: 1000,
pageIndex: 1,
packingCode: result.data.code,
itemCode: result.data.itemCode,
lot: result.data.lot,
inventoryStatus: 2, //2
locationTypes: [2, 3],
sortBy: 'PackingCode asc'
};
issueBalances(params)
.then(res => {
if (res.totalCount === 0) {
this.showScanMessage('按零件号【' + result.data.itemCode + '】箱码【' + result.data.code + '】批次【' +
result
.data.lot + '】在【原料库、半成品库】未查询到库存信息');
} else {
callback(res);
}
uni.hideLoading();
})
.catch(err => {
this.showScanMessage(err.message);
uni.hideLoading();
});
},
setBalanceInfo(item, balanceItem) {
item.scaned = true;
item.scanDate = new Date() //
item.fromLocationCode = balanceItem.locationCode;
item.fromLocationErpCode = balanceItem.locationErpCode;
item.toLocationCode = item.locationCode;
item.toLocationErpCode = item.locationErpCode;
//
item.handledContainerCode = balanceItem.containerCode;
item.handledPackingCode = balanceItem.packingCode;
item.handledBatch = balanceItem.batch;
item.handledLot = balanceItem.lot;
item.defaultHandleQty = balanceItem.qty;
item.handledQty = balanceItem.qty;
item.handledFromLocationCode = balanceItem.locationCode;
item.handledFromLocationArea = balanceItem.locationArea;
item.handledFromLocationGroup = balanceItem.locationErpCode;
item.handledFromLocationErpCode = balanceItem.locationGroup;
item.handledFromWarehouseCode = balanceItem.warehouseCode;
item.toLocationArea = balanceItem.locationArea;
item.toLocationGroup = balanceItem.locationGroup;
item.toLocationErpCode = balanceItem.locationErpCode;
//
item.scanItemCode = this.currentScanLebel.data.itemCode;
item.scanPackingCode = this.currentScanLebel.data.code;
item.scanLot = this.currentScanLebel.data.lot;
item.worker = localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN;
item.uom = balanceItem.uom;
this.details.sort(compareDesc('scanDate')); //
this.calcScanCount(); //
this.$forceUpdate();
},
selectedBalanceItem(balanceItem) {
this.setBalanceInfo(this.currentItem, balanceItem);
},
// //
receive(callback) {
let params = {
id: this.id
};
takeIssueJob(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 checkItems = that.details.filter(r => r.scaned === true);
if (checkItems.length < that.details.length) {
showConfirmMsg('还有未扫描的零件,是否继续发料', confirm => {
if (confirm) {
that.finsh();
}
});
} else {
that.finsh();
}
},
handleLocation() {
let that = this;
if (that.details[0].requestLocationCode != that.toLocation) {
showConfirmMsg('目标库位【' + that.toLocation + '】与需求库位不一致,是否要将以上零件发到目标库位?', confirm => {
if (confirm) {
that.handledPackingCode();
} else {
that.clearScanLocation();
}
});
} else {
showConfirmMsg('是否要将以上零件发到目标库位:【' + that.toLocation + "】", confirm => {
if (confirm) {
that.handledPackingCode();
} else {
that.clearScanLocation();
}
});
}
},
//
handledPackingCode() {
let that = this;
let items = this.details.filter(r => {
return r.scaned && (r.handledPackingCode === null || r.handledPackingCode === '')
})
if (items.length > 0) {
let packingCodes = '';
items.forEach(r => {
packingCodes += r.recommendPackingCode + ','
})
showConfirmMsg('以下箱码对应的实际箱码为空,是否要继续发料?【' + packingCodes + "】", confirm => {
if (confirm) {
that.finsh();
} else {
that.clearScanLocation();
}
});
} else {
that.finsh();
}
},
finsh() {
let that = this;
uni.showLoading({
title: "提交中...",
mask: true
});
that.datacontent.completeUserId = localStorage.getItem('userId')
that.datacontent.completeUserName = localStorage.getItem('userName_CN')
that.datacontent.completeTime = getCurrDateTime();
that.datacontent.worker = localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN;
that.datacontent.details = that.details;
let params = JSON.stringify(that.datacontent);
finshIssueJob(that.id, params)
.then(res => {
uni.hideLoading();
if (res != null) {
that.showCommitSuccessMessage();
that.backJobList(1000);
}
})
.catch(err => {
that.showMessage(err.message);
uni.hideLoading();
});
},
//
backJobList(delay) {
if (this.byFIFO) {
setTimeout(() => {
uni.navigateTo({
url: './issueByFIFO'
})
}, 1000)
} else {
setTimeout(() => {
uni.navigateTo({
url: './issueNoFIFO'
})
}, 1000)
}
},
clear() {
this.scanCount = 0;
this.currentItem = null;
this.currentScanLebel = null;
this.getDetail();
},
clearScanLocation() {
this.currentItem = null;
},
unPacking(item) {
this.$refs.comUnPacking.openPopup3(item,item.handledQty,item.recommendQty,false);
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
closeScanMessage() {
this.$refs.scanPopup.getfocus();
},
calcScanCount() {
this.scanCount = this.details.filter(r => r.scaned === true).length;
this.closeScanPopup();
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
this.backJobList(0); //
uni.hideLoading();
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
closeScanMessage() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scrollToTop() {
let that = this;
// view
that.scrollTop = that.old.scrollTop
this.$nextTick(function() {
that.scrollTop = 0
});
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else if (value > item.defaultHandleQty) {
item.handledQty = item.defaultHandleQty
this.showMessage('发料数量不能大于库存数量:' + item.handledQty)
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
}
},
}
}
</script>
<style scoped lang="scss">
</style>

16
fe/PDA/pages/task/issue_detail.vue

@ -88,6 +88,10 @@
<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 class="fr"
>
<button class="btn_single" hover-class="btn_single_after" @click="unPacking(item)">拆箱</button>
</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -100,6 +104,9 @@
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack> <win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance> <com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<comUnPacking ref='comUnPacking'
@getvalue="getUnPackingCount" title="拆箱">
</comUnPacking>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' <com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message> @afterCloseScanMessage='closeScanMessage'></com-message>
</view> </view>
@ -129,7 +136,8 @@
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue' import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue' import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'; import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import comUnPacking from '@/mycomponents/coms/comUnPacking.vue'
export default { export default {
components: { components: {
comMessage, comMessage,
@ -138,7 +146,8 @@
comBalance, comBalance,
comJobScanDetail, comJobScanDetail,
winScanByPack, winScanByPack,
comNumberBox comNumberBox,
comUnPacking
}, },
data() { data() {
return { return {
@ -671,6 +680,9 @@
clearScanLocation() { clearScanLocation() {
this.currentItem = null; this.currentItem = null;
}, },
unPacking(item) {
this.$refs.comUnPacking.openPopup3(item,item.handledQty,item.recommendQty,false);
},
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message); this.$refs.comMessage.showMessage(message);
}, },

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

@ -50,10 +50,13 @@
<image class="icon_normal fl" src="@/static/icons_ui/icon_take_photo.svg"></image> <image class="icon_normal fl" src="@/static/icons_ui/icon_take_photo.svg"></image>
<text class="fl" style="text-align: center;" >拍照</text> <text class="fl" style="text-align: center;" >拍照</text>
</view> </view>
<view v-if="item.purchaseReceiptInspectStatus>1" class="photo_btn fr" style="margin:0 20rpx 20rpx; font-size:38rpx;" <view v-if="item.purchaseReceiptInspectStatus>1" class="fr">
<button class="btn_single" hover-class="btn_single_after" @click="unPacking(item)">拆箱</button>
</view>
<!-- <view class="photo_btn fr" style="margin:0 20rpx 20rpx; font-size:38rpx;"
@click="unPacking(item)"> @click="unPacking(item)">
拆箱 拆箱
</view> </view> -->
</view> </view>
<view v-if="item.purchaseReceiptInspectStatus>1" <view v-if="item.purchaseReceiptInspectStatus>1"
:class="item.purchaseReceiptInspectStatus==2?'choose_marked':'choose_marked_faild'"> :class="item.purchaseReceiptInspectStatus==2?'choose_marked':'choose_marked_faild'">

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

@ -8,7 +8,7 @@
<comUnProduce :dataContent="item" fromType ="pick"></comUnProduce> <comUnProduce :dataContent="item" fromType ="pick"></comUnProduce>
</view> </view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" /> <uni-load-more :status="loadingType" v-if="dataList.length>0" />
<win-scan-button @goScan='openScanPopup'></win-scan-button> <!-- <win-scan-button @goScan='openScanPopup'></win-scan-button> -->
<win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'> <win-mulit-scan ref="scanPopup" :titleArray="titleArray" @getScanResult='getScanResult'>
</win-mulit-scan> </win-mulit-scan>
<com-scan-issue-list ref="scanList" @selectedItem="selectedItem"></com-scan-issue-list> <com-scan-issue-list ref="scanList" @selectedItem="selectedItem"></com-scan-issue-list>

Loading…
Cancel
Save