|
@@ -7,7 +7,6 @@
|
|
|
<button :class="[ checkAll ? 'active' : 'select' ]" @click="handleAll"
|
|
|
style="margin-left: 0px;display: flex; align-items: center; justify-content: center;">全选</button>
|
|
|
</view>
|
|
|
-
|
|
|
<button @click="handleSearch" style="margin-right: 20rpx ;">搜索</button>
|
|
|
<uni-data-select v-model="workshopId" :localdata="workshopList" @change="handleChangeWorkshop"
|
|
|
:clear="false" class="label right"
|
|
@@ -52,12 +51,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
<view v-if="allData.length==0" style="color: #999;">
|
|
|
<image style="width: 420rpx; height: 420rpx; padding-top: 30% ; margin: auto;"
|
|
|
src="../../static/images/fastProductionPlan.png" />
|
|
|
-
|
|
|
</view>
|
|
|
<view v-if="allData.length==0" class='bottom-btn-container'>
|
|
|
<text style="margin: auto; padding-bottom: 10%;">扫箱码开始快速报工</text>
|
|
@@ -116,7 +112,7 @@
|
|
|
})
|
|
|
//初始化
|
|
|
function init() {
|
|
|
- console.log(store.curDeptDetails)
|
|
|
+ // console.log(store.curDeptDetails)
|
|
|
uni.showLoading({
|
|
|
title: '加载中'
|
|
|
});
|
|
@@ -124,7 +120,7 @@
|
|
|
getQuickDayworkList({
|
|
|
deptId: store.curDeptDetails.deptId,
|
|
|
}).then(res => {
|
|
|
- console.log(res)
|
|
|
+ // console.log(res)
|
|
|
if (res.code == 200) {
|
|
|
allData.value = res.rows
|
|
|
if (allData.value.length == 0) {
|
|
@@ -138,7 +134,7 @@
|
|
|
text: v.name,
|
|
|
depts: v.depts
|
|
|
}))
|
|
|
- if (workshopId.value == null && workshopList.value.length > 0) {
|
|
|
+ if ((workshopId.value == null || !workshopList.value.some(e => e.value === workshopId.value)) && workshopList.value.length > 0) {
|
|
|
workshopId.value = workshopList.value[0].value
|
|
|
handleChangeWorkshop(workshopId.value)
|
|
|
} else {
|
|
@@ -158,7 +154,7 @@
|
|
|
}
|
|
|
|
|
|
function refreshSearch(input) {
|
|
|
- console.log(input)
|
|
|
+ // console.log(input)
|
|
|
keyword.value = input
|
|
|
handleChangeWorkshop(workshopId.value)
|
|
|
}
|
|
@@ -263,8 +259,8 @@
|
|
|
|
|
|
function handleChangeWorkshop(arg) {
|
|
|
const workshop = workshopList.value.find(v => v.value === arg)
|
|
|
- console.log(allData.value)
|
|
|
- console.log(workshop)
|
|
|
+ // console.log(allData.value)
|
|
|
+ // console.log(workshop)
|
|
|
// console.log()
|
|
|
listData.value = allData.value.filter(v => workshop.depts.some(e => e.deptId === v.quickInfo.deptId) && (v.lotCode.includes(keyword.value) || v.productDescription.includes(keyword.value)))
|
|
|
}
|
|
@@ -290,6 +286,9 @@
|
|
|
}
|
|
|
|
|
|
function handleChangeCarrier(item) {
|
|
|
+ uni.$once('refreshQuickReport', () => {
|
|
|
+ init()
|
|
|
+ })
|
|
|
store.dayworkInfo = null
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/changeBox/index",
|
|
@@ -311,7 +310,7 @@
|
|
|
return
|
|
|
}
|
|
|
finishQuick(selection.value).then(res => {
|
|
|
- console.log(res)
|
|
|
+ // console.log(res)
|
|
|
if (res.code === 200) {
|
|
|
init()
|
|
|
}
|
|
@@ -323,7 +322,6 @@
|
|
|
|
|
|
<style lang="scss">
|
|
|
$nav-height: 60rpx;
|
|
|
-
|
|
|
.bottom-btn-container {
|
|
|
position: fixed;
|
|
|
top: 80%;
|