|
|
@ -1,7 +1,12 @@ |
|
|
|
<template> |
|
|
|
<view class=""> |
|
|
|
<com-empty-view v-if="jobList.length == 0"></com-empty-view> |
|
|
|
<job-filter :isShowFromLocationCode="true" ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :isShowItemCode="true" :checkedWaitTask="checkedWaitTask" @fromLocationCode="fromLocationCode"> </job-filter> |
|
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" |
|
|
|
ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" |
|
|
|
@onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" |
|
|
|
:isShowItemCode="true" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode" |
|
|
|
@onQuery="getListByFilter"> |
|
|
|
</job-filter> |
|
|
|
<view v-if="jobList.length > 0" class="u-m-20"> |
|
|
|
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in jobList" :key="index" :options="item.status == '2' ? detailGiveupOptions : item.status == '1' ? detailCloseOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="swipeClick"> |
|
|
|
<com-repleinsh-job-card :dataContent="item" @click="openJobDetail(item)"></com-repleinsh-job-card> |
|
|
@ -20,7 +25,7 @@ |
|
|
|
import { ref, getCurrentInstance, nextTick } from 'vue' |
|
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
|
|
|
|
|
import { getRepleinshJobList, cancleTakeRepleinshJob, closeTakeRepleinshJob } from '@/api/request2.js' |
|
|
|
import {getRepleinshJobList, cancleTakeRepleinshJob, closeTakeRepleinshJob, getIssueJobList} from '@/api/request2.js' |
|
|
|
|
|
|
|
import { goHome, updateTitle } from '@/common/basic.js' |
|
|
|
|
|
|
@ -64,9 +69,12 @@ const jobListPopupRef = ref() |
|
|
|
const businessTypeCode = ref('Repleinment') |
|
|
|
const businessType = ref(null) |
|
|
|
const scanBalance = ref({}) |
|
|
|
const scanPopup = ref('') |
|
|
|
const outInventoryStatus = ref("") |
|
|
|
const inInventoryStatus = ref("") |
|
|
|
const checkedWaitTask = ref(false) |
|
|
|
const productionLineCode = ref('') |
|
|
|
const productionlineList = ref([]) |
|
|
|
onShow(() => { |
|
|
|
nextTick(() => { |
|
|
|
getList('refresh') |
|
|
@ -190,7 +198,7 @@ const selectedItem = (item) => { |
|
|
|
openJobDetail(item) |
|
|
|
} |
|
|
|
const showItemList = (itemList) => { |
|
|
|
scanList.value.openPopup(itemList) |
|
|
|
jobListPopupRef.value.openPopup(itemList) |
|
|
|
} |
|
|
|
const swipeClick = (index, index1) => { |
|
|
|
// var text = clearTirmAndWrap(requestList.value[index].options[index].text) |
|
|
@ -325,6 +333,74 @@ const openScanPopup = () => { |
|
|
|
scanPopup.value.openScanPopup(businessType.value) |
|
|
|
} |
|
|
|
} |
|
|
|
const getListByFilter = ( param )=>{ |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
let filters = [] |
|
|
|
if (checkedToday.value) { |
|
|
|
filters.push({ |
|
|
|
column: "create_time", |
|
|
|
action: "betweeen", |
|
|
|
value: todayTime.value |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: status.value |
|
|
|
}) |
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "accept_user_id", |
|
|
|
action: "==", |
|
|
|
value:store.id |
|
|
|
}) |
|
|
|
|
|
|
|
if (param.fromLocationCode) { |
|
|
|
// 来源库位 |
|
|
|
filters.push({ |
|
|
|
column: "fromLocationCode", |
|
|
|
action: "==", |
|
|
|
value: param.fromLocationCode |
|
|
|
}) |
|
|
|
} |
|
|
|
if (param.productionLine) { |
|
|
|
// 生产线 |
|
|
|
filters.push({ |
|
|
|
column: "productionLineCode", |
|
|
|
action: "==", |
|
|
|
value: param.productionLine |
|
|
|
}) |
|
|
|
} |
|
|
|
if (param.itemCode) { |
|
|
|
// 生产线 |
|
|
|
filters.push({ |
|
|
|
column: "itemCode", |
|
|
|
action: "like", |
|
|
|
value: param.itemCode |
|
|
|
}) |
|
|
|
} |
|
|
|
let params = { |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
} |
|
|
|
getIssueJobList(params).then(res => { |
|
|
|
uni.hideLoading(); |
|
|
|
if (res.data.total == 0) { |
|
|
|
showMessage('未查找到补料任务'); |
|
|
|
} else if (res.data.total == 1) { |
|
|
|
openJobDetail(res.data.list[0]); |
|
|
|
} else { |
|
|
|
showItemList(res.data.list); |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
showMessage(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
const selectItem = (item) => { |
|
|
|
scanPopup.value.closeScanPopup() |
|
|
|
openJobDetail(item, scanMessage.value) |
|
|
|