Browse Source

发料任务、补料任务、翻包任务、装配上架、预生产上架、预生产收货、成品入库 任务承接处理

lijuncheng0816
lijuncheng 4 months ago
parent
commit
e53f0f2305
  1. 2
      src/common/config.js
  2. 2
      src/mycomponents/job/jobAccept.vue
  3. 5
      src/pages/inventoryMove/coms/comMoveRecord.vue
  4. 9
      src/pages/issue/coms/comIssueJobCard.vue
  5. 111
      src/pages/issue/job/issueJob.vue
  6. 6
      src/pages/package/coms/comOverPackJobCard.vue
  7. 91
      src/pages/package/job/overPackageJob.vue
  8. 6
      src/pages/productPutaway/coms/comProductJobCard.vue
  9. 23
      src/pages/productPutaway/job/fgProductPutawayJob.vue
  10. 111
      src/pages/productPutaway/job/productPutawayJob.vue
  11. 25
      src/pages/productPutaway/job/semiProductPutawayJob.vue
  12. 7
      src/pages/productReceipt/coms/comProductJobCard.vue
  13. 18
      src/pages/productReceipt/job/fgProductReceiptJob.vue
  14. 126
      src/pages/productReceipt/job/productReceiptJob.vue
  15. 26
      src/pages/productReceipt/job/scrapReceiptJob.vue
  16. 19
      src/pages/productReceipt/job/semiProductReceiptJob.vue
  17. 6
      src/pages/repleinsh/coms/comRepleinshJobCard.vue
  18. 112
      src/pages/repleinsh/job/repleinshJob.vue

2
src/common/config.js

@ -1,2 +1,4 @@
export const overPagePrint="overPage_print"
export const overPageTemplate="overPage_Template"
//3分钟刷新
export const planRefreshTime=3*60*1000

2
src/mycomponents/job/jobAccept.vue

@ -1,7 +1,7 @@
<template>
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" -->
<view class="task_item" style="margin-left: 15rpx; margin-right: 15rpx;">
<view class="uni-flex space-between u-col-center">
<view class="uni-flex u-col" style="flex-direction: column;">
<view class="uni-flex uni-row u-col-center">
<text style="font-size: 32rpx;" >承接人: {{dataContent.acceptUserName}}</text>
</view>

5
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -341,6 +341,11 @@
this.showErrorMessage("请先选择目标库位")
return;
}
if(this.fromLocationCode==this.toLocationCode){
this.showErrorMessage("来源库位和目标库位不能一致")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({

9
src/pages/issue/coms/comIssueJobCard.vue

@ -1,6 +1,8 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class="task_item" style="margin-left: 15px;">
<view class="task_text">
<view class="card_view">
@ -9,16 +11,21 @@
</view>
</view>
</view>
<view class='split_line'></view>
<jobAccept :dataContent="dataContent"></jobAccept>
</job-com-main-card>
</template>
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default {
components: {
jobComMainCard,
jobComMainDetailCard
jobComMainDetailCard,
jobAccept
},
data() {
return {};

111
src/pages/issue/job/issueJob.vue

@ -53,6 +53,11 @@
getBusinessType
} from '@/common/record.js';
import {
planRefreshTime
} from '@/common/config.js';
import {
getDetailOption,
getDetailGiveupOption,
@ -103,6 +108,7 @@
filterItemCode: "",
businessTypeCode: "Issue",
businessType: null,
timer:null
};
},
onLoad(option) {
@ -110,8 +116,15 @@
this.getIssueJobByProductionline()
},
onShow() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode)
this.timerRefresh();
},
onHide() {
this.stopRefresh();
},
onUnload(){
this.stopRefresh();
},
onReady() {
@ -153,6 +166,21 @@
},
methods: {
timerRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode)
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode)
console.log('发料刷新');
}, planRefreshTime)
},
stopRefresh() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getBusinessTypeFunc() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
@ -210,11 +238,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (fromLocation) {
//
@ -297,11 +320,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (params.fromLocationCode) {
//
@ -395,10 +413,8 @@
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './issueDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
});
this.getJobInfoByNumber(item.number,scanMessage = '')
},
showItemList(itemList) {
@ -487,6 +503,58 @@
this.status = jobStatus;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode)
},
getJobInfoByNumber(number,scanMessage){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getIssueJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
}
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode)
}
});
return;
}
uni.navigateTo({
url: './issueDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
});
this.scanMessage=""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
getScanNumber(code) {
this.getDataListByType(code)
@ -509,12 +577,6 @@
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: 1,
@ -523,7 +585,7 @@
getIssueJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
that.showMessage('未查找到' + '【' + code + '】的发料任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
}
@ -537,7 +599,7 @@
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packGetFocus()
this.$refs.scanPopup.getfocus()
}
}
});
@ -549,9 +611,6 @@
this.$refs.scanPopup.openScanPopup(this.businessType);
}
},
// openScanPopup() {
// this.$refs.scanPopup.openScanPopup();
// },
getScanResult(result) {
let balance = result.balance;
if (balance != null) {

6
src/pages/package/coms/comOverPackJobCard.vue

@ -1,16 +1,20 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view>
<jobAccept :dataContent="dataContent"></jobAccept>
</job-com-main-card>
</template>
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default {
components: {
jobComMainCard,
jobComMainDetailCard
jobComMainDetailCard,
jobAccept
},
data() {
return {};

91
src/pages/package/job/overPackageJob.vue

@ -32,6 +32,9 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
planRefreshTime
} from '@/common/config.js';
import {
getDetailOption,
@ -64,7 +67,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
title:''
title:'',
timer:null
};
},
@ -73,7 +77,16 @@
},
onShow() {
this.getList('refresh');
this.timerRefresh();
},
onHide() {
this.stopRefresh();
},
onUnload(){
this.stopRefresh();
},
onReady() {
@ -112,6 +125,21 @@
},
methods: {
timerRefresh() {
this.getList('refresh')
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh')
console.log('发料刷新');
}, planRefreshTime)
},
stopRefresh() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getList(type) {
let that = this;
uni.showLoading({
@ -139,11 +167,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: this.pageNo,
@ -203,9 +226,7 @@
openJobDetail(item) {
uni.navigateTo({
url: './overPackageJobDetail?id=' + item.masterId + '&status=' + item.status+'&title='+this.title
});
this.getJobInfoByNumber(item.number)
},
showItemList(itemList) {
@ -213,7 +234,7 @@
},
selectedItem(item) {
this.openJobDetail(item);
this.openJobDetail(item.number);
},
swipeClick(e, dataContent) {
@ -306,6 +327,54 @@
}
});
},
getJobInfoByNumber(number){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getOverPageJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
this.getList('refresh')
}
});
return;
}
uni.navigateTo({
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title
});
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
}
}
</script>

6
src/pages/productPutaway/coms/comProductJobCard.vue

@ -1,16 +1,20 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view>
<jobAccept :dataContent="dataContent"></jobAccept>
</job-com-main-card>
</template>
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default {
components: {
jobComMainCard,
jobComMainDetailCard
jobComMainDetailCard,
jobAccept
},
data() {
return {};

23
src/pages/productPutaway/job/fgProductPutawayJob.vue

@ -19,18 +19,29 @@
onLoad(option){
this.title = option.title
},
onReachBottom() {
this.$refs.productPutawayJob.onReach();
},
onShow() {
if(this.$refs.productPutawayJob!=undefined){
this.$refs.productPutawayJob.refresh();
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.timerRefresh();
}
},
onHide() {
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
},
onPullDownRefresh() {
this.$refs.productPutawayJob.refresh();
this.$refs.productPutawayJob.timerRefresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productPutawayJob.toHome();

111
src/pages/productPutaway/job/productPutawayJob.vue

@ -45,6 +45,9 @@
getDetailOption,
getDetailGiveupOption
} from '@/common/array.js';
import {
planRefreshTime
} from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
@ -79,7 +82,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
scanMessage: ""
scanMessage: "",
timer:null
};
},
props: {
@ -90,26 +94,15 @@
}
},
mounted() {
this.getList('refresh');
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
mounted() {
this.timerRefresh()
},
onPullDownRefresh() {
this.getList('refresh');
},
//退
onBackPress(options) {
@ -121,15 +114,6 @@
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
methods: {
onReach() {
//
@ -144,8 +128,22 @@
openFilter() {
this.$refs.filter.openFilter();
},
refresh() {
timerRefresh() {
this.getList('refresh');
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh');
console.log('预生产上架刷新');
}, planRefreshTime)
},
stopRefresh() {
console.log('stopRefresh预生产上架刷新');
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getList(type) {
let that = this;
@ -174,11 +172,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
filters.push({
column: "type",
action: "==",
@ -220,11 +213,58 @@
},
openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '')
},
getJobInfoByNumber(number,scanMessage){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductPutawayJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
this.getList('refresh')
}
});
return;
}
uni.navigateTo({
url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item
url: './productPutawayDetail?id=' + result.masterId + '&status=' + result.status + '&type=' + result
.type + '&scanMessage=' + this.scanMessage + '&title=' + this.title
});
this.scanMessage = ""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
showItemList(itemList) {
@ -298,12 +338,6 @@
action: "==",
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: 1,
@ -374,11 +408,6 @@
column: "status",
action: "in",
value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
}
// {
// column: "fromLocationCode",

25
src/pages/productPutaway/job/semiProductPutawayJob.vue

@ -21,15 +21,30 @@
},
onShow() {
if(this.$refs.productPutawayJob!=undefined){
this.$refs.productPutawayJob.refresh();
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.timerRefresh();
}
},
onReachBottom() {
this.$refs.productPutawayJob.onReach();
onHide() {
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
console.log("页面销毁")
},
onPullDownRefresh() {
this.$refs.productPutawayJob.refresh();
this.$refs.productPutawayJob.timerRefresh();
},
onReachBottom() {
this.$refs.productPutawayJob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {

7
src/pages/productReceipt/coms/comProductJobCard.vue

@ -1,6 +1,9 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view>
<jobAccept :dataContent="dataContent"></jobAccept>
<!-- <view class="task_item">
<view class="task_text">
<view class="">
@ -36,10 +39,12 @@
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default {
components: {
jobComMainCard,
jobComMainDetailCard
jobComMainDetailCard,
jobAccept
},
data() {
return {};

18
src/pages/productReceipt/job/fgProductReceiptJob.vue

@ -20,15 +20,27 @@
onLoad(option){
this.title = option.title
},
onShow() {
if(this.$refs.productreceiptjob!=undefined){
this.$refs.productreceiptjob.refresh();
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.timerRefresh();
}
},
onHide() {
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onPullDownRefresh() {
this.$refs.productreceiptjob.refresh();
this.$refs.productreceiptjob.timerRefresh();
},
onReachBottom() {

126
src/pages/productReceipt/job/productReceiptJob.vue

@ -39,6 +39,10 @@
updateTitle
} from '@/common/basic.js';
import {
planRefreshTime
} from '@/common/config.js';
import {
getDetailOption,
getDetailGiveupOption
@ -79,7 +83,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
scanMessage: ""
scanMessage: "",
timer:null
};
},
// type = 'assemble'
@ -96,13 +101,7 @@
mounted() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
this.getList('refresh');
},
onPullDownRefresh() {
this.getList('refresh');
this.timerRefresh()
},
@ -134,8 +133,22 @@
}
this.getList("more");
},
refresh() {
timerRefresh() {
this.getList('refresh');
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh');
console.log('装配刷新');
}, planRefreshTime)
},
stopRefresh() {
console.log('stopRefresh装配刷新');
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getList(type) {
let that = this;
@ -162,11 +175,6 @@
action: "in",
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
filters.push({
column: "type",
action: "==",
@ -210,23 +218,7 @@
},
openJobDetail(item, scanMessage = '') {
if (this.type == 'predict') {
uni.navigateTo({
url: './productReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else if (this.type == 'assemble') {
uni.navigateTo({
url: './fgProductReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else {
uni.navigateTo({
url: './scrapReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
}
this.scanMessage = ""
this.getJobInfoByNumber(item.number,scanMessage = '')
},
showItemList(itemList) {
@ -300,11 +292,6 @@
action: "==",
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
@ -382,11 +369,6 @@
column: "status",
action: "in",
value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
}
]
getProductReceiptJobList({
@ -423,6 +405,68 @@
this.showMessage(e.message)
}
},
getJobInfoByNumber(number,scanMessage){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
this.getList('refresh')
}
});
return;
}
if (this.type == 'predict') {
uni.navigateTo({
url: './productReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else if (this.type == 'assemble') {
uni.navigateTo({
url: './fgProductReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else {
uni.navigateTo({
url: './scrapReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
}
this.scanMessage = ""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
}
}

26
src/pages/productReceipt/job/scrapReceiptJob.vue

@ -21,15 +21,29 @@
this.title = option.title
},
onShow() {
this.$nextTick(()=>{
this.$refs.productreceiptjob.refresh()
})
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.timerRefresh();
}
},
onReachBottom() {
this.$refs.productreceiptjob.onReach();
onHide() {
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onPullDownRefresh() {
this.$refs.productreceiptjob.refresh();
this.$refs.productreceiptjob.timerRefresh();
},
onReachBottom() {
this.$refs.productreceiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {

19
src/pages/productReceipt/job/semiProductReceiptJob.vue

@ -24,14 +24,27 @@
this.$refs.productreceiptjob.onReach();
},
onShow() {
if(this.$refs.productreceiptjob!=undefined){
this.$refs.productreceiptjob.refresh();
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.timerRefresh();
}
},
onHide() {
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onPullDownRefresh() {
this.$refs.productreceiptjob.refresh();
this.$refs.productreceiptjob.timerRefresh();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.productreceiptjob.toHome();

6
src/pages/repleinsh/coms/comRepleinshJobCard.vue

@ -1,16 +1,20 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view>
<jobAccept :dataContent="dataContent"></jobAccept>
</job-com-main-card>
</template>
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default {
components: {
jobComMainCard,
jobComMainDetailCard
jobComMainDetailCard,
jobAccept
},
data() {
return {};

112
src/pages/repleinsh/job/repleinshJob.vue

@ -59,9 +59,12 @@
getDetailCloseOption
} from '@/common/array.js';
import {
planRefreshTime
} from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comRepleinshJobCard from '@/pages/repleinsh/coms/comRepleinshJobCard.vue'
import repleinshJobListPopup from '@/pages/repleinsh/coms/repleinshJobListPopup.vue'
import repleinshInfoPopup from '@/pages/repleinsh/coms/repleinshInfoPopup.vue'
@ -105,7 +108,8 @@
productionLineCode: "",
productionlineList: [],
fromLocationCode:'',
filterItemCode:''
filterItemCode:'',
timer:null
};
},
onLoad(option) {
@ -113,8 +117,13 @@
this.getBusinessTypeFunc()
},
onShow() {
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
this.timerRefresh();
},
onHide() {
this.stopRefresh();
},
onReady() {
@ -155,6 +164,21 @@
},
methods: {
timerRefresh() {
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh', that.fromLocationCode, that.filterItemCode)
console.log('补料刷新');
}, planRefreshTime)
},
stopRefresh() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getBusinessTypeFunc() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
@ -197,11 +221,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (fromLocationCode != '') {
//
filters.push({
@ -275,12 +294,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (params.fromLocationCode) {
//
this.fromLocationCode = params.fromLocationCode
@ -335,11 +348,62 @@
},
openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '')
},
getJobInfoByNumber(number,scanMessage){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getRepleinshJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
}
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
}
});
return;
}
uni.navigateTo({
url: './repleinshDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' +
url: './repleinshDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
});
this.scanMessage = ""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
showItemList(itemList) {
@ -377,7 +441,7 @@
cancleJob(id) {
cancleTakeRepleinshJob(id).then(res => {
if (res.data) {
this.getList("refresh")
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
uni.showToast({
title: "放弃任务成功"
})
@ -397,7 +461,7 @@
closeTakeRepleinshJob(id).then(res => {
uni.hideLoading()
if (res.data) {
this.getList("refresh")
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
uni.showToast({
title: "关闭任务成功"
})
@ -413,13 +477,13 @@
switchChangeToday(state, creationTime) {
this.checkedToday = state;
this.todayTime = creationTime;
this.getList("refresh");
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
this.getList('refresh', this.fromLocationCode, this.filterItemCode)
},
getScanNumber(code) {
this.getDataListByType(code)
@ -441,11 +505,6 @@
action: "==",
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
@ -513,11 +572,6 @@
action: "==",
value: result.label.itemCode
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
},
{
column: "fromLocationCode",
action: "==",

Loading…
Cancel
Save