From f50a44b1d96fdda1530e8136ca3be758868ddb78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=BF=97=E5=9B=BD?= <854933521@qq.com>
Date: Mon, 28 Oct 2024 11:44:20 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E6=96=99=E7=AD=9B?=
 =?UTF-8?q?=E9=80=89=202024/8/7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/mycomponents/job/jobFilter.vue       | 39 ++++++++++++++++--------
 src/pages/issue/job/issueJob.vue         |  6 ++--
 src/pages/repleinsh/job/repleinshJob.vue | 10 +++---
 3 files changed, 34 insertions(+), 21 deletions(-)

diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue
index 0a61413a..844ec414 100644
--- a/src/mycomponents/job/jobFilter.vue
+++ b/src/mycomponents/job/jobFilter.vue
@@ -5,7 +5,7 @@
           style="background-color: white;width: 100%; height:auto;padding: 20rpx;z-index: 99;position: relative; border-radius: 10rpx;">
 
       <!-- 现场并不需要这两个筛选条件,暂时拿掉 -->
-      <!-- <view class="uni-flex space-between u-col-center" style="width: 100%;">
+      <view class="uni-flex space-between u-col-center" style="width: 100%;">
         <view class="" style="font-size: 32rpx;">
           只看当天
         </view>
@@ -20,7 +20,7 @@
         </view>
         <u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35"
           @change="switchChangeWait"></u-switch>
-      </view> -->
+      </view>
       <view v-if="isShowProductionLineCode" class="uni-flex space-between u-col-center"
             style="width: 100%;margin-top: 30rpx;">
         <view class="" style="font-size: 32rpx;">
@@ -59,7 +59,8 @@
             @click="scanNumberClick">扫描任务编号</button>
         </view>
       </view> -->
-      <view class=" uni-flex uni-row" style="margin-top: 5px;">
+      <view class=" uni-flex uni-row" style="margin-top: 5px;" v-if="isShowQurery">
+        <button class="btn_single_clear" hover-class="btn_commit_after" @click="query()">重置</button>
         <button class="btn_single_commit" hover-class="btn_commit_after" @click="query()">查询</button>
       </view>
     </view>
@@ -112,6 +113,10 @@ const props = defineProps({
   isShowItemCode: {
     type: Boolean,
     default: false
+  },
+  isShowQurery: {
+    type: Boolean,
+    default: false
   }
 })
 const dataContent = ref({})
@@ -123,6 +128,8 @@ const show = ref(false)
 const scanNumber = ref()
 const scanAsnNumber = ref()
 const itemCode = ref('')//物料代码
+const creationTime = ref('')
+const status = ref('')
 // 监视属性
 watch(
   () => props.checkedToday,
@@ -143,7 +150,9 @@ const getQueryCondition = ()=>{
   let params = {
     productionLineCode: productionLineCode.value,
     fromLocationCode: fromLocationCode.value,
-    itemCode: itemCode.value
+    itemCode: itemCode.value,
+    creationTime: creationTime.value,
+    status: status.value
   }
   return params;
 }
@@ -176,20 +185,26 @@ const closeScanPopup = () => {
   show.value = false
 }
 const switchChangeToday = (isOn) => {
-  let creationTime = ''
+  let creationTimeCode = ''
   if (isOn) {
-    creationTime = getTodayDate()
+    creationTimeCode = getTodayDate()
+  }
+  creationTime.value = creationTimeCode;
+  emit('switchChangeToday', isOn, creationTimeCode)
+  if (!props.isShowQurery) {
+    closeScanPopup()
   }
-  emit('switchChangeToday', isOn, creationTime)
-  closeScanPopup()
 }
 const switchChangeWait = (isOn) => {
-  let status = '1,2'
+  let statusCode = '1,2'
   if (isOn) {
-    status = '1'
+    statusCode = '1'
+  }
+  status.value = statusCode;
+  emit('switchChangeWait', isOn, statusCode)
+  if (!props.isShowQurery) {
+    closeScanPopup()
   }
-  emit('switchChangeWait', isOn, status)
-  closeScanPopup()
 }
 const scanNumberClick = () => {
   scanNumber.value.openScanPopup()
diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue
index 8163a65a..00a2f0fa 100644
--- a/src/pages/issue/job/issueJob.vue
+++ b/src/pages/issue/job/issueJob.vue
@@ -2,10 +2,8 @@
   <view class="">
     <com-empty-view v-if="jobList.length == 0"></com-empty-view>
     <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">
+                ref="filter" otherTitle="" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"
+                :isShowItemCode="true" @onQuery="getListByFilter" :isShowQurery='true'>
       <!-- <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true"
         :productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
         @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
diff --git a/src/pages/repleinsh/job/repleinshJob.vue b/src/pages/repleinsh/job/repleinshJob.vue
index 7f3d813e..6efe2cf4 100644
--- a/src/pages/repleinsh/job/repleinshJob.vue
+++ b/src/pages/repleinsh/job/repleinshJob.vue
@@ -1,11 +1,11 @@
 <template>
   <view class="">
     <com-empty-view v-if="jobList.length == 0"></com-empty-view>
-    <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="false" :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 :isShowFromLocationCode="true" :isShowProductionLineCode="false"
+                :productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
+                @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
+                :checkedWaitTask="checkedWaitTask" :isShowItemCode="true" @productionLineCode="productionLineCode"
+                @fromLocationCode="fromLocationCode" :isShowQurery='true' @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">