Browse Source

修改任务修改状态

pda_nev
李俊城 1 year ago
parent
commit
99a8b6f042
  1. 7
      fe/PDA/api/index.js
  2. 35
      fe/PDA/mycomponents/comItem/comJobScanDetail.vue
  3. 4
      fe/PDA/mycomponents/wincom/winScanByCode.vue
  4. 43
      fe/PDA/pages.js
  5. 43
      fe/PDA/pages.json
  6. 187
      fe/PDA/pages/container/containerCall.vue
  7. 192
      fe/PDA/pages/container/containerMove.vue
  8. 413
      fe/PDA/pages/container/containerMoveDetail.vue
  9. 52
      fe/PDA/pages/inventory/productionReturn_detail.vue
  10. 44
      fe/PDA/pages/inventory/transferIssue_detail.vue
  11. 33
      fe/PDA/pages/inventory/transferReceipt_detail.vue
  12. 176
      fe/PDA/pages/plastics/plasticsCompleteReceive.vue
  13. 192
      fe/PDA/pages/plastics/plasticsInventoryMove.vue
  14. 412
      fe/PDA/pages/plastics/plasticsInventoryMoveDetail.vue
  15. 39
      fe/PDA/pages/return/productionReturn_detail.vue
  16. 42
      fe/PDA/pages/return/purchaseReturn_detail.vue
  17. 31
      fe/PDA/pages/task/Inspect_detail.vue
  18. 24
      fe/PDA/pages/task/count_detail.vue
  19. 1
      fe/PDA/pages/task/deliver.vue
  20. 44
      fe/PDA/pages/task/deliverBoard_detail.vue
  21. 8
      fe/PDA/pages/task/deliverJis_detail.vue
  22. 55
      fe/PDA/pages/task/deliver_detail.vue
  23. 42
      fe/PDA/pages/task/issue_detail.vue
  24. 30
      fe/PDA/pages/task/putaway_detail.vue
  25. 25
      fe/PDA/pages/task/receipt_detail.vue
  26. 7
      fe/PDA/pages/task/receipt_result.vue
  27. 4
      fe/PDA/pages/task/unProducePickDetail.vue
  28. 4
      fe/PDA/pages/task/unProduceReturnDetail.vue

7
fe/PDA/api/index.js

@ -1394,3 +1394,10 @@ export const finshDeliverBoardJob = (id, params) => request(
method: "post"
})
//高往低库存转移任务列表
export const getPlasticsList = (params) => request(
devUrl + "/api/pda/job/deliver/list", {
method: 'get',
data: params
});

35
fe/PDA/mycomponents/comItem/comJobScanDetail.vue

@ -110,7 +110,8 @@
getJobStatuDesc,
showConfirmMsg,
compare,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
@ -139,11 +140,11 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {}
selectedItem: {},
jobStatus:""
};
},
onLoad(option) {
@ -152,7 +153,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -168,16 +168,21 @@
window.location.reload();
}
},
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeReceiptJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeReceiptJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
@ -214,6 +219,7 @@
getDetail() {
let that = this;
that.getJoDetail(callBack => {
that.jobStatus =that.receiptJob.jobStatus;
that.ispending = that.receiptJob.jobStatus === 2;
if (that.receiptJob.details != null) {
that.allCount = that.receiptJob.details.length;
@ -433,13 +439,6 @@
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)

4
fe/PDA/mycomponents/wincom/winScanByCode.vue

@ -58,6 +58,10 @@
this.$refs.scan.getfocus()
}
},
losefocus() {
this.$refs.scan.losefocus()
},
scanClick() {
this.$refs.scan.handelScanMsg();
},

43
fe/PDA/pages.js

@ -575,7 +575,50 @@ module.exports = () => ({
"navigationBarTitleText": "Jis发运详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/plastics/plasticsInventoryMove",
"style": {
"navigationBarTitleText": "高往低库存转移(注塑)",
"enablePullDownRefresh": true
}
},
{
"path": "pages/plastics/plasticsInventoryMoveDetail",
"style": {
"navigationBarTitleText": "高往低库存转移详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/plastics/plasticsCompleteReceive",
"style": {
"navigationBarTitleText": "完工转储(注塑)",
"enablePullDownRefresh": true
}
},
{
"path": "pages/container/containerCall",
"style": {
"navigationBarTitleText": "空器具呼叫",
"enablePullDownRefresh": true
}
},
{
"path": "pages/container/containerMove",
"style": {
"navigationBarTitleText": "空器具库移",
"enablePullDownRefresh": true
}
},
{
"path": "pages/container/containerMoveDetail",
"style": {
"navigationBarTitleText": "空器具库移详情",
"enablePullDownRefresh": true
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",

43
fe/PDA/pages.json

@ -553,7 +553,50 @@
"navigationBarTitleText": "Jis发运详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/plastics/plasticsInventoryMove",
"style": {
"navigationBarTitleText": "高往低库存转移(注塑)",
"enablePullDownRefresh": true
}
},
{
"path": "pages/plastics/plasticsInventoryMoveDetail",
"style": {
"navigationBarTitleText": "高往低库存转移详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/plastics/plasticsCompleteReceive",
"style": {
"navigationBarTitleText": "完工转储(注塑)",
"enablePullDownRefresh": true
}
},
{
"path": "pages/container/containerCall",
"style": {
"navigationBarTitleText": "空器具呼叫",
"enablePullDownRefresh": true
}
},
{
"path": "pages/container/containerMove",
"style": {
"navigationBarTitleText": "空器具库移",
"enablePullDownRefresh": true
}
},
{
"path": "pages/container/containerMoveDetail",
"style": {
"navigationBarTitleText": "空器具库移详情",
"enablePullDownRefresh": true
}
}
],

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

@ -0,0 +1,187 @@
<template>
<view class="" >
<view class="uni-list">
<view class="uni-list-cell " style="padding:10rpx; ">
<view class="" style="color: red; font-size: 40rpx; ">
*
</view>
<view class="uni-list-cell-left" style="font-size:35rpx">
器具类型 :
</view>
<view class="uni-list-cell-db">
<picker @change="containerTypeChange" :value="typeIndex" :range="containerTypeList" range-key="name" >
<view class="uni-input" style="font-size:35rpx">{{containerType}}</view>
</picker>
</view>
</view>
</view>
<view class="uni-list">
<view class="uni-list-cell" style="padding:10rpx">
<view class="" style="color: red; font-size: 40rpx; ">
*
</view>
<view class="uni-list-cell-left" style="font-size:35rpx">
器具规格 :
</view>
<view class="uni-list-cell-db">
<picker @change="containerModelChange" :value="modelIndex" :range="containerModelList" range-key="name">
<view class="uni-input" style="font-size:35rpx">{{containerModel}}</view>
</picker>
</view>
</view>
</view>
<view class="uni-list">
<view class="uni-list-cell" style="padding-left: 15rpx; padding-top: 20rpx;padding-bottom:20rpx; padding-right: 15rpx; ; align-items: center; display: flex;">
<view class="" style="color: red; font-size: 40rpx; ">
*
</view>
<view class="uni-list-cell-left" style="font-size:35rpx; align-items: center;display: flex; text-align: center;">
呼叫库位 :
</view>
<view class="uni-list-cell-db" style="font-size:35rpx" @click="openScanLocation">
<text>{{locationCode}}</text>
<text v-if="locationName!=''">({{locationName}})</text>
</view>
</view>
</view>
<view class="new_btn_bot">
<button class="new_save_btn" @click="submit()">提交</button>
</view>
<win-scan-by-code ref="scanLocation" title="库位" @getScanCode='getLocation'></win-scan-by-code>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterClose='afterClose'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
locations,
} from '@/api/index.js';
import {
goHome,
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
export default {
components: {
comMessage,
winScanByCode
},
data() {
return {
containerTypeList: [ {
name: '内物流',
value: "1",
test:"test1"
}, {
name: '外物流',
value: "2",
test:"test2"
}],
containerModelList: [ {
name: '小器具',
value: "1",
test:"test1"
}, {
name: '大器具',
value: "2",
test:"test2"
}],
typeIndex:0,
modelIndex:0,
location:"",
locationCode:"请扫描库位",
locationName:"",
containerType:"请选择器具类型",
containerModel:"请选择器具规格"
}
},
onLoad() {},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
window.location.reload();
}
},
methods: {
containerTypeChange(e) {
this.typeIndex = e.detail.value
var select =this.containerTypeList[this.typeIndex];
this.containerType =select.name
console.log(select)
},
containerModelChange(e) {
this.modelIndex = e.detail.value
var select =this.containerModelList[this.typeIndex];
this.containerModel =select.name
console.log(select)
},
openScanLocation() {
this.$refs.scanLocation.openScanPopup()
},
closeScanLocation() {
this.$refs.scanLocation.closeScanPopup();
},
//
getLocation(code) {
let that = this;
if (code == '') return;
uni.showLoading({
title: '扫描中...',
mask: true
});
locations(code).then(res => {
if (res == null) {
that.scanPopupLoseFocus();
that.showMessage('未查询到库位【' + code + '】');
} else {
that.locationCode = res.code;
that.locationName = res.name
that.closeScanLocation();
}
uni.hideLoading();
}).catch(err => {
uni.hideLoading();
that.showMessage(err.message);
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
afterClose() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
this.$refs.scanLocation.getfocus();
},
scanPopupLoseFocus() {
this.$refs.scanLocation.losefocus();
},
submit(){
if(this.containerCode =="请选择器具类型"){
this.showMessage("请选择器具类型")
return;
}
if(this.containerModel =="请选择器具规格"){
this.showMessage("请选择器具规格")
return;
}
if(this.locationCode =="请扫描库位"){
this.showMessage("请扫描库位")
return;
}
}
}
}
</script>
<style>
</style>

192
fe/PDA/pages/container/containerMove.vue

@ -0,0 +1,192 @@
<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)">
<com-deliver :dataContent="item"></com-deliver>
</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 {
getPlasticsList,
getDeliverJobByNumber
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comDeliver from '@/mycomponents/coms/task/comDeliver.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,
comDeliver,
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
};
getPlasticsList(params)
.then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.items;
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
//
this.loadingType = "nomore";
return;
}
// that.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();
}
});
},
getScanResult(type, result) {
if (type == '任务编号') {
this.getByNumber(type, result.data.code);
}
},
getByNumber(type, code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getDeliverJobByNumber(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: './containerMoveDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

413
fe/PDA/pages/container/containerMoveDetail.vue

@ -0,0 +1,413 @@
<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="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">
<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="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_black">{{item.recommendQty}}({{item.uom}})</text>
</view>
</uni-th>
<!-- -->
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">
{{item.handledQty}}({{item.uom}})
</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><text class="text_black">{{item.recommendLot }}</text>
</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned">
<text class="text_black">{{item.handledLot }}</text>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.recommendLocationCode }}</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">
{{ item.handledFromLocationCode }}
</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</scroll-view>
<view class="new_btn_bot count_shadow">
<button type="primary" class="new_save_btn" @click="submit()">提交</button>
</view>
<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>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view>
</template>
<script>
import {
getDeliverDetail,
takeDeliverJob,
cancelTakeDeliverJob,
finshDeliverJob,
balances
} 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 comBalance from '@/mycomponents/common/comBalance.vue'
export default {
components: {
winScanButton,
winMulitScan,
winScanByPack,
comMessage,
comJobScanDetail,
comBalance
},
data() {
return {
type: '',
id: "",
datacontent: {},
details: {},
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
ispending: false,
balancesItem: {},
titleArray: ['箱标签', '目标库位'],
allCount: 0,
scanCount: 0,
jobStatus:""
}
},
props: {
itemCode: "",
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
window.location.reload();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeDeliverJob(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;
let params = {
id: that.id,
};
getDeliverDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
that.details.forEach(r => r.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 that = this;
let code = result.data.code;
let item = this.details.find(r => {
return r.recommendPackingCode === code
});
if (item === undefined) {
this.showMessage('在发货任务详情中,未找到箱码【' + code + '】');
return;
} else {
if (item.scaned) {
this.showMessage('箱码【' + code + '】已经扫描,请扫描下一箱零件');
return;
}
}
//
let params = {
pageSize: 1000,
pageIndex: 1,
packingCode: code,
locationTypes: [4], //
inventoryStatuses: [2], //
};
balances(params)
.then(res => {
try {
if (res.totalCount == 0) {
this.showMessage('箱码【' + code + '】在【成品库】未查询到库存信息');
} else if (res.totalCount == 1) {
that.balancesItem = res.items[0];
this.createItem(item);
} else {
this.$refs.balanceItems.openPopup(res.items);
}
uni.hideLoading();
} catch (e) {
this.showMessage(e.message)
}
})
.catch(err => {
this.showMessage(err.message)
});
},
createItem(item) {
let that = this;
if (that.balancesItem != null || that.balancesItem != undefined) {
// if (that.balancesItem.qty != item.recommendQty) {
// this.showMessage('' + that.balancesItem.qty + '' + item.recommendQty + ',')
// } else {
item.scaned = true;
item.handledContainerCode = that.balancesItem.containerCode;
item.handledPackingCode = that.balancesItem.packingCode;
item.handledBatch = that.balancesItem.batch;
item.handledLot = that.balancesItem.lot;
item.handledFromLocationArea = that.balancesItem.locationCode;
item.handledQty = that.balancesItem.qty;
// ==================================
// item.recommendFromLocationCode = string;
// item.recommendFromLocationArea = string;
// item.recommendFromLocationGroup = string;
// item.recommendFromLocationErpCode = string;
// item.recommendFromWarehouseCode = string;
// item.uom = string;
// item.recommendQty = 0;
// item.handledFromLocationCode = string;
// item.handledFromLocationArea = string;
// item.handledFromLocationGroup = string;
// item.handledFromLocationErpCode = string;
// item.handledFromWarehouseCode = string;
// item.handledQty = that.balancesItem.qty;
// item.toLocationCode = string;
// item.toLocationArea = string;
// item.toLocationGroup = string;
// item.toLocationErpCode = string;
// item.toWarehouseCode = string;
// item.onTheWayLocationCode = string;
this.getScanCount();
this.closeScanPopup();
that.$forceUpdate();
// }
}
},
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
selectedBalanceItem(balanceItem) {
that.balancesItem = balanceItem;
this.createItem(item);
},
//
receive(callback) {
let params = {
id: this.id
};
takeDeliverJob(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 {
that.finsh();
}
},
finsh() {
let that = this;
uni.showLoading({
title: "提交中..."
});
let params = JSON.stringify(that.datacontent);
console.log(params);
// finshDeliverJob(that.id, params)
// .then(res => {
// uni.hideLoading();
// if (res != null) {
// that.showCommitSuccessMessage();
// navigateBack(1)
// }
// })
// .catch(err => {
// this.showMessage(err.message);
// uni.hideLoading();
// });
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
navigateBack(1)//
uni.hideLoading();
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
clearScanLocation() {
// this.$refs.scanLocation.getfocus();
// this.$refs.scanLocation.clear();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
}
}
</script>
<style scoped lang="scss">
</style>

52
fe/PDA/pages/inventory/productionReturn_detail.vue

@ -83,7 +83,8 @@
getJobStatuDesc,
showConfirmMsg,
compareDesc,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import {
getReturnReasonArray
@ -113,13 +114,14 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {},
returnReason: "",
returnReasonArray: [],
jobStatus:""
};
},
mounted: function() {
@ -131,7 +133,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -152,28 +153,21 @@
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeReturnJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
},
inspectDesc: function(val) {
if (val == 'none') return ''
else if (val == 'pass') return '合格'
else if (val == 'unPass') return '不合格'
},
},
mounted() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
@ -218,6 +212,7 @@
getReturnJobDetail(that.id)
.then(res => {
that.dataContent = res;
that.jobStatus = res.jobStatus
that.ispending = res.jobStatus === 2;
that.allCount = res.details.length;
that.initDetails();
@ -342,11 +337,7 @@
let params = JSON.stringify(this.dataContent);
finishReturnJob(this.id, params)
.then(res => {
setTimeout(() => {
uni.navigateTo({
url: './purchaseReturn'
})
}, 1000)
navigateBack(1)
uni.hideLoading();
this.showMessage('提交成功');
})
@ -379,13 +370,6 @@
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)

44
fe/PDA/pages/inventory/transferIssue_detail.vue

@ -77,7 +77,8 @@
getJobStatuDesc,
showConfirmMsg,
compareDesc,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import {
getReturnReasonArray
@ -107,13 +108,13 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {},
returnReason: "",
returnReasonArray: [],
jobStatus:""
};
},
mounted: function() {
@ -125,7 +126,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -141,16 +141,21 @@
window.location.reload();
}
},
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeReturnJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
@ -205,6 +210,7 @@
getReturnJobDetail(that.id)
.then(res => {
that.detail = res;
that.jobStatus = res.jobStatus
that.ispending = res.jobStatus === 2;
that.allCount = res.details.length;
that.initDetails();
@ -305,11 +311,12 @@
let params = JSON.stringify(this.detail);
finishReturnJob(this.id, params)
.then(res => {
setTimeout(() => {
uni.navigateTo({
url: './purchaseReturn'
})
}, 1000)
// setTimeout(() => {
// uni.navigateTo({
// url: './purchaseReturn'
// })
// }, 1000)
navigateBack(1)
uni.hideLoading();
this.showMessage('提交成功');
})
@ -342,13 +349,6 @@
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)

33
fe/PDA/pages/inventory/transferReceipt_detail.vue

@ -77,7 +77,8 @@
getJobStatuDesc,
showConfirmMsg,
compareDesc,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import {
getReturnReasonArray
@ -107,13 +108,13 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {},
returnReason: "",
returnReasonArray: [],
jobStatus:""
};
},
mounted: function() {
@ -125,7 +126,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -141,16 +141,21 @@
window.location.reload();
}
},
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeReturnJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
@ -199,6 +204,7 @@
getReturnJobDetail(that.id)
.then(res => {
that.detail = res;
that.jobStatus =res.jobStatus;
that.ispending = res.jobStatus === 2;
that.allCount = res.details.length;
that.initDetails();
@ -336,13 +342,6 @@
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)

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

@ -0,0 +1,176 @@
<template>
<view style="padding: 15rpx;">
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
activeColor="#007AFF"></uni-segmented-control>
<view class="content">
<view v-show="current === 0">
<win-empty-view v-if="dataList.length==0"></win-empty-view>
<view class="" v-for="(item, index) in dataList">
<view class="device-detail">
<view>物料:</view>
<view>零件:</view>
<button type="primary" style="width: 140rpx; font-size: 32rpx; float: right;" >完成</button>
</view>
</view>
选项卡1的内容
</view>
<view v-show="current === 1">
<win-empty-view v-if="dataList.length==0"></win-empty-view>
<view class="" v-for="(item, index) in dataList">
<view class="" v-for="(item, index) in dataList">
<view class="device-detail">
<view>物料:</view>
<view>零件:</view>
<button type="primary" style="width: 140rpx; font-size: 32rpx; float: right;" >完成</button>
</view>
</view>
</view>
选项卡2的内容
</view>
</view>
<uni-load-more :status="loadingType" v-if="dataList.length>0" />
</view>
</template>
<script>
import {
getPlasticsList,
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
export default {
components: {
winEmptyView
},
data() {
return {
items: ['已完成', '未完成'],
current: 0,
pageSize: this.modelConfig,
pageIndex: 1,
loadingType: "nomore",
dataList:[]
};
},
onShow() {
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: {
onClickItem(item){
this.current = item.currentIndex;
console.log("点击",this.current)
this.getList("refresh");
},
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.dataList = [];
}
let params = {
pageSize: that.pageSize,
pageIndex: that.pageIndex,
// isCreationTimeSorting: that.isTimeWindowSorting,
// isToday: that.isToday
};
getPlasticsList(params)
.then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.items;
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
//
this.loadingType = "nomore";
return;
}
// that.dataList = [...that.dataList, ...list];
that.dataList = type === "refresh" ? list : this.dataList.concat(list);
that.pageIndex++;
})
.catch(err => {
this.loadingType = "";
this.showMessage(err.message);
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
});
},
getScanResult(type, result) {
if (type == '任务编号') {
this.getByNumber(type, result.data.code);
}
},
getByNumber(type, code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getDeliverJobByNumber(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: './plasticsInventoryMoveDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>

192
fe/PDA/pages/plastics/plasticsInventoryMove.vue

@ -0,0 +1,192 @@
<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)">
<com-deliver :dataContent="item"></com-deliver>
</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 {
getPlasticsList,
getDeliverJobByNumber
} from '@/api/index.js';
import {
goHome
} from '@/common/basic.js';
import winEmptyView from '@/mycomponents/wincom/winEmptyView.vue'
import comDeliver from '@/mycomponents/coms/task/comDeliver.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,
comDeliver,
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
};
getPlasticsList(params)
.then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.items;
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
//
this.loadingType = "nomore";
return;
}
// that.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();
}
});
},
getScanResult(type, result) {
if (type == '任务编号') {
this.getByNumber(type, result.data.code);
}
},
getByNumber(type, code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getDeliverJobByNumber(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: './plasticsInventoryMoveDetail?id=' + item.id + '&jobStatus=' + item.jobStatus
});
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
}
};
</script>
<style scoped lang="scss">
</style>

412
fe/PDA/pages/plastics/plasticsInventoryMoveDetail.vue

@ -0,0 +1,412 @@
<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="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">
<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="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_black">{{item.recommendQty}}({{item.uom}})</text>
</view>
</uni-th>
<!-- -->
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">
{{item.handledQty}}({{item.uom}})
</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><text class="text_black">{{item.recommendLot }}</text>
</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned">
<text class="text_black">{{item.handledLot }}</text>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{ item.recommendLocationCode }}</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">
{{ item.handledFromLocationCode }}
</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</scroll-view>
<view class="new_btn_bot count_shadow">
<button type="primary" class="new_save_btn" @click="submit()">提交</button>
</view>
<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>
<comMessage ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></comMessage>
</view>
</template>
<script>
import {
getDeliverDetail,
takeDeliverJob,
cancelTakeDeliverJob,
finshDeliverJob,
balances
} 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 comBalance from '@/mycomponents/common/comBalance.vue'
export default {
components: {
winScanButton,
winMulitScan,
winScanByPack,
comMessage,
comJobScanDetail,
comBalance
},
data() {
return {
type: '',
id: "",
datacontent: {},
details: {},
toLocation: '',
scrollTop: 0,
old: {
scrollTop: 0
},
ispending: false,
balancesItem: {},
titleArray: ['箱标签', '目标库位'],
allCount: 0,
scanCount: 0,
jobStatus:""
}
},
props: {
itemCode: "",
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}else if(e.index === 1){
window.location.reload();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeDeliverJob(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;
let params = {
id: that.id,
};
getDeliverDetail(params)
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
that.details = item.details;
that.details.forEach(r => r.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 that = this;
let code = result.data.code;
let item = this.details.find(r => {
return r.recommendPackingCode === code
});
if (item === undefined) {
this.showMessage('在发货任务详情中,未找到箱码【' + code + '】');
return;
} else {
if (item.scaned) {
this.showMessage('箱码【' + code + '】已经扫描,请扫描下一箱零件');
return;
}
}
//
let params = {
pageSize: 1000,
pageIndex: 1,
packingCode: code,
locationTypes: [4], //
inventoryStatuses: [2], //
};
balances(params)
.then(res => {
try {
if (res.totalCount == 0) {
this.showMessage('箱码【' + code + '】在【成品库】未查询到库存信息');
} else if (res.totalCount == 1) {
that.balancesItem = res.items[0];
this.createItem(item);
} else {
this.$refs.balanceItems.openPopup(res.items);
}
uni.hideLoading();
} catch (e) {
this.showMessage(e.message)
}
})
.catch(err => {
this.showMessage(err.message)
});
},
createItem(item) {
let that = this;
if (that.balancesItem != null || that.balancesItem != undefined) {
// if (that.balancesItem.qty != item.recommendQty) {
// this.showMessage('' + that.balancesItem.qty + '' + item.recommendQty + ',')
// } else {
item.scaned = true;
item.handledContainerCode = that.balancesItem.containerCode;
item.handledPackingCode = that.balancesItem.packingCode;
item.handledBatch = that.balancesItem.batch;
item.handledLot = that.balancesItem.lot;
item.handledFromLocationArea = that.balancesItem.locationCode;
item.handledQty = that.balancesItem.qty;
// ==================================
// item.recommendFromLocationCode = string;
// item.recommendFromLocationArea = string;
// item.recommendFromLocationGroup = string;
// item.recommendFromLocationErpCode = string;
// item.recommendFromWarehouseCode = string;
// item.uom = string;
// item.recommendQty = 0;
// item.handledFromLocationCode = string;
// item.handledFromLocationArea = string;
// item.handledFromLocationGroup = string;
// item.handledFromLocationErpCode = string;
// item.handledFromWarehouseCode = string;
// item.handledQty = that.balancesItem.qty;
// item.toLocationCode = string;
// item.toLocationArea = string;
// item.toLocationGroup = string;
// item.toLocationErpCode = string;
// item.toWarehouseCode = string;
// item.onTheWayLocationCode = string;
this.getScanCount();
this.closeScanPopup();
that.$forceUpdate();
// }
}
},
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
selectedBalanceItem(balanceItem) {
that.balancesItem = balanceItem;
this.createItem(item);
},
//
receive(callback) {
let params = {
id: this.id
};
takeDeliverJob(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 {
that.finsh();
}
},
finsh() {
let that = this;
uni.showLoading({
title: "提交中..."
});
let params = JSON.stringify(that.datacontent);
console.log(params);
// finshDeliverJob(that.id, params)
// .then(res => {
// uni.hideLoading();
// if (res != null) {
// that.showCommitSuccessMessage();
// that.backJobList(1000);
// navigateBack(1)
// }
// })
// .catch(err => {
// this.showMessage(err.message);
// uni.hideLoading();
// });
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
navigateBack(1)
uni.hideLoading();
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
clearScanLocation() {
// this.$refs.scanLocation.getfocus();
// this.$refs.scanLocation.clear();
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
}
}
</script>
<style scoped lang="scss">
</style>

39
fe/PDA/pages/return/productionReturn_detail.vue

@ -75,7 +75,8 @@
getJobStatuDesc,
showConfirmMsg,
compareDesc,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import {
getReturnReasonArray
@ -107,11 +108,11 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {}
selectedItem: {},
jobStatus:""
};
},
mounted: function() {
@ -123,7 +124,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -139,16 +139,20 @@
window.location.reload();
}
},
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeProductionReturnJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeProductionReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
@ -196,6 +200,7 @@
getProductionReturnJobDetail(that.id)
.then(res => {
that.dataContent = res;
that.jobStatus =res.jobStatus
that.ispending = res.jobStatus === 2;
that.allCount = res.details.length;
that.initDetails();
@ -319,13 +324,15 @@
console.log('params', params)
finishProductionReturnJob(this.id, params)
.then(res => {
setTimeout(() => {
uni.navigateTo({
url: './productionReturn'
})
}, 1000)
// setTimeout(() => {
// uni.navigateTo({
// url: './productionReturn'
// })
// }, 1000)
uni.hideLoading();
this.showCommitSuccess();
navigateBack(1)
})
.catch(err => {
this.showMessage(err.message);

42
fe/PDA/pages/return/purchaseReturn_detail.vue

@ -50,7 +50,8 @@
getJobStatuDesc,
showConfirmMsg,
compareDesc,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import {
getReturnReasonArray
@ -86,13 +87,13 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {},
returnReason: "",
returnReasonArray: [],
jobStatus:""
};
},
mounted: function() {
@ -104,7 +105,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -125,25 +125,21 @@
window.location.reload();
}
},
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakePutchaseReturnJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakePutchaseReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
},
},
mounted() {
uni.setNavigationBarColor({
@ -178,6 +174,7 @@
getReturnJobDetail(that.id)
.then(res => {
that.detail = res;
that.jobStatus =res.jobStatus;
that.ispending = res.jobStatus === 2;
that.allCount = res.details.length;
that.initDetails();
@ -286,7 +283,7 @@
uni.hideLoading();
if (res != null) {
that.showCommitSuccessMessage();
that.backJobList(1000);
navigateBack(1)
}
})
.catch(err => {
@ -388,13 +385,6 @@
});
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)

31
fe/PDA/pages/task/Inspect_detail.vue

@ -132,7 +132,8 @@
getInspectTypeDesc,
showConfirmMsg,
compare,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
@ -165,7 +166,7 @@
inspectResult: {},
submitting: false,
finshed: false,
received: false
jobStatus:""
}
},
props: {},
@ -173,12 +174,13 @@
let that = this;
that.id = this.$route.params.id;
that.datacontent = this.$route.params.item;
that.jobStatus =that.datacontent.jobStatus
that.summaryDetail = that.datacontent.summaryDetails[0];
that.details = that.datacontent.details;
that.nextStep = this.$route.params.nextStep; //
that.nextStepIndex = this.$route.params.nextStepIndex;
that.received = this.$route.params.received;
that.details.forEach(r => {
r.check = false;
@ -199,13 +201,18 @@
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeInspectJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeInspectJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
@ -382,13 +389,9 @@
console.log(params);
finshInspectJob(that.id, params)
.then(res => {
setTimeout(() => {
uni.navigateTo({
url: './Inspect'
})
}, 1000)
that.hideLoading();
that.showCommitSuccess();
navigateBack(1)
})
.catch(err => {
that.showMessage('提交失败' + err.message);

24
fe/PDA/pages/task/count_detail.vue

@ -201,7 +201,8 @@
getISODateTime,
compare,
getRemoveOption,
getCurrDateTime
getCurrDateTime,
navigateBack
} from '@/common/basic.js';
import {
@ -264,6 +265,7 @@
loadingType: "",
currentPage: 0,
pageSize: 20,
jobStatus:""
// array: [{
// text: '',
// value: 1
@ -290,7 +292,6 @@
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -307,13 +308,19 @@
},
//
onBackPress(e) {
if (this.received) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeCountJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeCountJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
onReachBottom() {},
@ -371,6 +378,7 @@
getCountJobDetail(params)
.then(async res => {
that.datacontent = res;
that.jobStatus =res.jobStatus;
// var test = res.details[0]
// for (var i = 0; i < 10000; i++) {
// var detail = {}

1
fe/PDA/pages/task/deliver.vue

@ -54,6 +54,7 @@
isToday: true,
titleArray: ['任务编号'],
loadingType: "nomore"
};
},
props: {

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

@ -99,7 +99,8 @@
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
@ -132,18 +133,10 @@
},
ispending: false,
balancesItem: {},
received: false,
titleArray: ['箱标签', '目标库位'],
allCount: 0,
scanCount: 0,
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
jobStatus:""
}
},
props: {
@ -153,7 +146,6 @@
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -170,13 +162,19 @@
},
//
onBackPress(e) {
if (this.received) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeDeliverJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeDeliverJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
@ -365,6 +363,7 @@
// if (res != null) {
// that.showCommitSuccessMessage();
// that.backJobList(1000);
// navigateBack(1)
// }
// })
// .catch(err => {
@ -373,21 +372,12 @@
// });
},
//
backJobList(delay) {
setTimeout(() => {
uni.navigateTo({
url: './deliver'
})
}, delay)
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
this.backJobList(0); //
navigateBack(1); //
uni.hideLoading();
},

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

@ -140,7 +140,6 @@
ispending: false,
balancesItem: null,
currentItem: null,
received: false,
allCount: 0,
scanCount: 0,
jobStatus: ""
@ -151,7 +150,6 @@
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -361,12 +359,6 @@
});
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;

55
fe/PDA/pages/task/deliver_detail.vue

@ -107,10 +107,9 @@
balances
} from '@/api/index.js';
import {
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
@ -141,18 +140,10 @@
},
ispending: false,
balancesItem: {},
received: false,
titleArray: ['箱标签', '目标库位'],
allCount: 0,
scanCount: 0,
}
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
jobStatus:""
}
},
props: {
@ -162,7 +153,6 @@
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -179,13 +169,19 @@
},
//
onBackPress(e) {
if (this.received) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeDeliverJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeDeliverJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
@ -208,6 +204,7 @@
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
that.details.forEach(r => r.scaned = false);
that.ispending = item.jobStatus === 2;
@ -370,7 +367,7 @@
// uni.hideLoading();
// if (res != null) {
// that.showCommitSuccessMessage();
// that.backJobList(1000);
// navigateBack(1);
// }
// })
// .catch(err => {
@ -379,21 +376,12 @@
// });
},
//
backJobList(delay) {
setTimeout(() => {
uni.navigateTo({
url: './deliver'
})
}, delay)
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
},
closeCommitMessage() {
this.backJobList(0); //
navigateBack(1); //
uni.hideLoading();
},
@ -411,14 +399,7 @@
this.$refs.comMessage.showMessage(message);
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;
},
}

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

@ -126,7 +126,8 @@
goHome,
compareDesc,
compareStr,
getCurrDateTime
getCurrDateTime,
navigateBack
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
@ -161,21 +162,13 @@
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);
jobStatus:""
}
},
props: {
@ -186,7 +179,6 @@
this.byFIFO = param.isByFIFO === 'true' ? true : false;
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -214,13 +206,19 @@
},
//
onBackPress(e) {
if (this.received) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeIssueJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeIssueJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
@ -254,6 +252,7 @@
.then(item => {
console.log('item', item);
that.datacontent = item;
that.jobStatus =item.jobStatus;
that.details = item.details;
if (that.details != null) {
that.details.forEach(
@ -644,7 +643,8 @@
uni.hideLoading();
if (res != null) {
that.showCommitSuccessMessage();
that.backJobList(1000);
// that.backJobList(1000);
navigateBack(1)
}
})
.catch(err => {
@ -730,12 +730,6 @@
});
},
upper: function(e) {
// console.log(e)
},
lower: function(e) {
// console.log(e)
},
scroll: function(e) {
// console.log(e)
this.old.scrollTop = e.detail.scrollTop;

30
fe/PDA/pages/task/putaway_detail.vue

@ -104,7 +104,8 @@
getJobStatuStyle,
getJobStatuDesc,
showConfirmMsg,
goHome
goHome,
navigateBack
} from '@/common/basic.js';
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
@ -145,8 +146,8 @@
recommendLocationCode: '', //
submitting: false,
finshed: false,
received: false,
isByLocation: false
isByLocation: false,
jobStatus:""
}
},
props: {},
@ -157,7 +158,6 @@
//
if (param.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -184,15 +184,22 @@
window.location.reload();
}
},
//
onBackPress() {
if (this.received && !this.finshed) {
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakePutawayJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakePutawayJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
filters: {
@ -257,6 +264,7 @@
getPutawayJobDetail(params)
.then(res => {
this.datacontent = res;
this.jobStatus =res.jobStatus;
this.details = res.details;
if (res.details != null) {
this.currentdetail = res.details[0];

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

@ -135,13 +135,13 @@
inputQty: "",
listfocus: false,
finshed: false,
received: false,
allCount: 0,
scanCount: 0,
isCheckAll: false,
selectedItem: {},
loadingType: "",
jobContent:{}
jobContent:{},
jobStatus:""
};
},
onLoad(option) {
@ -150,7 +150,6 @@
//
if (option.jobStatus == 1) {
this.receive((callback => {
this.received = true;
this.getDetail();
}));
} else {
@ -166,16 +165,21 @@
window.location.reload();
}
},
//
onBackPress(e) {
//
if (this.received) {
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeReceiptJob(this.id)
.then(res => {})
.catch(err => {
this.showMessage(err.message);
});
cancelTakeReceiptJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
@ -218,6 +222,7 @@
that.ispending = that.receiptJob.jobStatus === 2;
if (that.receiptJob.details != null) {
that.jobContent =that.receiptJob;
that.jobStatus = item.jobStatus
that.allCount = that.receiptJob.details.length;
that.calcScanCount();
this.$nextTick();

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

@ -82,7 +82,8 @@
showConfirmMsg,
goHome,
getCurrDateTime,
getCurrDateTimeAndT
getCurrDateTimeAndT,
navigateBack
} from '@/common/basic.js';
import {
@ -236,7 +237,7 @@
uni.hideLoading();
if (res != null) {
that.showCommitSuccessMessage();
that.backJobList(1000);
navigateBack(1);
}
}).catch(err => {
uni.hideLoading();
@ -274,7 +275,7 @@
},
closeCommitMessage() {
this.backJobList(0); //
navigateBack(1)
uni.hideLoading();
},
scroll: function(e) {

4
fe/PDA/pages/task/unProducePickDetail.vue

@ -157,7 +157,6 @@
ispending: false,
balancesItem: null,
currentItem: null,
received: false,
currentScanLebel: null,
allCount: 0,
scanCount: 0,
@ -180,7 +179,6 @@
this.id = param.id;
// if (param.jobStatus == 1) {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
@ -199,14 +197,12 @@
},
//
onBackPress(e) {
if (this.received) {
//
// cancelTakeIssueJob(this.id)
// .then(res => {})
// .catch(err => {
// this.showMessage(err.message);
// });
}
},
mounted() {
uni.setNavigationBarColor({

4
fe/PDA/pages/task/unProduceReturnDetail.vue

@ -156,7 +156,6 @@
ispending: false,
balancesItem: null,
currentItem: null,
received: false,
currentScanLebel: null,
allCount: 0,
scanCount: 0,
@ -179,7 +178,6 @@
this.id = param.id;
// if (param.jobStatus == 1) {
// this.receive((callback => {
// this.received = true;
// this.getDetail();
// }));
// } else {
@ -198,14 +196,12 @@
},
//
onBackPress(e) {
if (this.received) {
//
// cancelTakeIssueJob(this.id)
// .then(res => {})
// .catch(err => {
// this.showMessage(err.message);
// });
}
},
mounted() {
uni.setNavigationBarColor({

Loading…
Cancel
Save