From e1fa0477995bd179cdc483c33dff78ef1461dbe4 Mon Sep 17 00:00:00 2001
From: xzg <4727863@qq.com>
Date: Wed, 11 Sep 2024 17:55:53 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?=
 =?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/option/distribution/createTask.js         | 22 +++----
 .../checkInventoryTask/createTask.vue         | 58 ++++++++++++++-----
 2 files changed, 56 insertions(+), 24 deletions(-)

diff --git a/src/option/distribution/createTask.js b/src/option/distribution/createTask.js
index ebc70fc2..1274f196 100644
--- a/src/option/distribution/createTask.js
+++ b/src/option/distribution/createTask.js
@@ -475,7 +475,7 @@ export const columnListInventory = [
   {
     prop: 'materialCode',
     label: '物料编码',
-    type: 15,
+    type: 1,
     values: '',
     width: '150',
     checkarr: [],
@@ -495,16 +495,16 @@ export const columnListInventory = [
     head: false,
   },
 
-  {
-    prop: '',
-    label: '操作',
-    type: 6,
-    values: '',
-    width: '120',
-    checkarr: [],
-    fixed: 'right',
-    sortable: false,
-  },
+  // {
+  //   prop: '',
+  //   label: '操作',
+  //   type: 6,
+  //   values: '',
+  //   width: '120',
+  //   checkarr: [],
+  //   fixed: 'right',
+  //   sortable: false,
+  // },
 ];
 
 export const comparativecolumnList = [
diff --git a/src/views/distribution/checkInventoryTask/createTask.vue b/src/views/distribution/checkInventoryTask/createTask.vue
index fced61e9..ea9ee65c 100644
--- a/src/views/distribution/checkInventoryTask/createTask.vue
+++ b/src/views/distribution/checkInventoryTask/createTask.vue
@@ -254,17 +254,27 @@
       <el-tabs type="border-card" v-model="eltabs" @tab-click="tabclick">
         <el-tab-pane label="未盘点明细" :name="0"></el-tab-pane>
         <el-tab-pane label="已盘点明细" :name="1"></el-tab-pane>
+        <div class="el_top_button">
+          <div class="el_top_button_left">
+            <el-button type="primary" icon="Download" @click="ExportDataInventory"
+              >导出数据</el-button
+            >
+            <el-button type="primary" icon="EditPen" @click="Submitmodifications" v-if="eltabs"
+              >提交修改</el-button
+            >
+            <el-button type="primary" icon="Menu" @click="Inventorypackages" v-if="!eltabs"
+              >盘点包件</el-button
+            >
+            <el-button type="primary" icon="Delete" v-if="eltabs" @click="BatchdeletePackages"
+              >删除包件</el-button
+            >
+          </div>
+          <div>
+            <el-button icon="el-icon-refresh" @click="Inventorysearch" circle></el-button>
+            <el-button icon="CircleClose" @click="Inventoryempty" circle></el-button>
+          </div>
+        </div>
         <!-- 首页表格 -->
-        <el-button type="primary" icon="Download" @click="ExportDataInventory">导出数据</el-button>
-        <el-button type="primary" icon="EditPen" @click="Submitmodifications" v-if="eltabs"
-          >提交修改</el-button
-        >
-        <el-button type="primary" icon="Menu" @click="Inventorypackages" v-if="!eltabs"
-          >盘点包件</el-button
-        >
-        <el-button type="primary" icon="Delete" v-if="eltabs" @click="BatchdeletePackages"
-          >删除包件</el-button
-        >
         <el-row>
           <!-- 列表模块 -->
           <tablecmt
@@ -1004,7 +1014,7 @@ const Inventorydetails = async row => {
   Inventorydialog.value = true; //展开盘点明细
   await nextTick(); //
   const _node = document.querySelector('.InventorytableNode');
-  setNodeHeight(_node, '70vh', true);
+  setNodeHeight(_node, '60vh', true);
   tabclick(); //获取盘点明细数据
 };
 // 盘点明细编辑
@@ -1026,7 +1036,8 @@ const tabclick = async value => {
   await handleClearTableQuery(details.columnListInventory); //重置搜索表头搜索条件
   InventoriedData(); //获取数据
 };
-// 已盘点明细
+
+// 盘点明细
 const InventoriedData = value => {
   const { id, questNum } = DataRow.value;
   let data = {
@@ -1058,6 +1069,18 @@ const InventoriedData = value => {
       details.loadingObj.inventorylist = false;
     });
 };
+
+// 盘点明细清空搜索条件
+const Inventoryempty = () => {
+  details.queryInventory = {};
+  handleClearTableQuery(details.columnListInventory); //重置搜索表头搜索条件
+  details.inventorypage.currentPage = 1;
+  InventoriedData();
+};
+// 盘点明细刷新
+const Inventorysearch = () => {
+  InventoriedData();
+};
 // 删除盘点包件校验
 const BatchdeletePackages = () => {
   if (!details.selectionList.length) {
@@ -1172,7 +1195,7 @@ const Submitmodifications = () => {
         let _res = await $_updateDetailInfo(data);
         console.log(_res, '修改品类提交');
         if (_res.data.code == 200) {
-          InventoriedData();
+          await InventoriedData();
           ElMessage({
             message: _res.data.msg,
             type: 'success',
@@ -1365,4 +1388,13 @@ const Inventorysynchronization = row => {
     padding: 0 10px;
   }
 }
+.el_top_button {
+  margin: 8px 0;
+  display: flex;
+  justify-content: space-between;
+  .el_top_button_left {
+    display: flex;
+    align-items: center;
+  }
+}
 </style>