|
@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<com-empty-view v-if="jobList.length == 0"></com-empty-view> |
|
|
<com-empty-view v-if="jobList.length == 0"></com-empty-view> |
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> </job-filter> |
|
|
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionline" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" @productionLineCode="productionLineCode" @fromLocationCode="fromLocationCode"> </job-filter> |
|
|
<view v-if="jobList.length > 0" class="u-m-20"> |
|
|
<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 : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="swipeClick"> |
|
|
<u-swipe-action :show="item.show" :index="index" v-for="(item, index) in jobList" :key="index" :options="item.status == '2' ? detailGiveupOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="swipeClick"> |
|
|
<com-issue-job-card :dataContent="item" @click="openJobDetail(item)"></com-issue-job-card> |
|
|
<com-issue-job-card :dataContent="item" @click="openJobDetail(item)"></com-issue-job-card> |
|
@ -22,7 +22,7 @@ |
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
import { ref, getCurrentInstance, nextTick } from 'vue' |
|
|
import { ref, getCurrentInstance, nextTick } from 'vue' |
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
import { onLoad, onShow, onNavigationBarButtonTap, onReady, onBackPress, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' |
|
|
import { cancleTakeIssueJob, getIssueJobList } from '@/api/request2.js' |
|
|
import { cancleTakeIssueJob, getIssueJobList, getIssueJobByProductionline } from '@/api/request2.js' |
|
|
import { goHome, updateTitle } from '@/common/basic.js' |
|
|
import { goHome, updateTitle } from '@/common/basic.js' |
|
|
|
|
|
|
|
|
import { getDetailOption, getDetailGiveupOption } from '@/common/array.js' |
|
|
import { getDetailOption, getDetailGiveupOption } from '@/common/array.js' |
|
@ -49,6 +49,7 @@ const todayTime = ref('') |
|
|
const status = ref('1,2') // 待处理 、进行中 |
|
|
const status = ref('1,2') // 待处理 、进行中 |
|
|
const detailOptions = ref([]) |
|
|
const detailOptions = ref([]) |
|
|
const detailGiveupOptions = ref([]) |
|
|
const detailGiveupOptions = ref([]) |
|
|
|
|
|
const productionline = ref([]) |
|
|
const filter = ref() |
|
|
const filter = ref() |
|
|
const scanMessage = ref('') |
|
|
const scanMessage = ref('') |
|
|
const comMessageRef = ref() |
|
|
const comMessageRef = ref() |
|
@ -61,6 +62,9 @@ onShow(() => { |
|
|
getList('refresh') |
|
|
getList('refresh') |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
onLoad(() => { |
|
|
|
|
|
getIssueJobByProductionline() |
|
|
|
|
|
}) |
|
|
onReady(() => { |
|
|
onReady(() => { |
|
|
detailOptions.value = getDetailOption() |
|
|
detailOptions.value = getDetailOption() |
|
|
detailGiveupOptions.value = getDetailGiveupOption() |
|
|
detailGiveupOptions.value = getDetailGiveupOption() |
|
@ -92,6 +96,19 @@ onNavigationBarButtonTap((e) => { |
|
|
filter.value.openFilter() |
|
|
filter.value.openFilter() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
const getIssueJobByProductionline = () => { |
|
|
|
|
|
getIssueJobByProductionline().then((res) => { |
|
|
|
|
|
console.log('生产线', res) |
|
|
|
|
|
if (res.code == 0) { |
|
|
|
|
|
productionline.value = res.data.map((item) => ({ |
|
|
|
|
|
value: item, |
|
|
|
|
|
text: item |
|
|
|
|
|
})) |
|
|
|
|
|
} else { |
|
|
|
|
|
productionline.value = [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
const getList = (type, fromLocationCode = '', productionLineCode = '') => { |
|
|
const getList = (type, fromLocationCode = '', productionLineCode = '') => { |
|
|
proxy.$modal.loading('加载中....') |
|
|
proxy.$modal.loading('加载中....') |
|
|
loadingType.value = 'loading' |
|
|
loadingType.value = 'loading' |
|
|