From 4d41577c2d01648ba3e9919fbd540380279ca85f Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 19 四月 2024 11:23:05 +0800
Subject: [PATCH] 毛重,净重如果是0强制修改为空的逻辑处理

---
 src/components/makepager/CommonFormTableView.vue |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 3a8fc20..312b0db 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -79,7 +79,11 @@
                 <div class="custom-name">
                   <el-autocomplete
                     v-model="scope.row[item.prop]"
-                    :fetch-suggestions="querySearchAsync"
+                    :fetch-suggestions="
+                      (queryString, callback) => {
+                        querySearchAsync(queryString, callback, 'product')
+                      }
+                    "
                     value-key="name"
                     :disabled="!isOperate"
                     size="mini"
@@ -142,12 +146,12 @@
                 </div>
               </el-form-item>
               <el-form-item
-                v-else-if="item.inputFloat"
+                v-else-if="item.inputFloat||item.inputFloatValue"
                 label=" "
                 :prop="'tableData.' + scope.$index + '.' + item.prop"
                 :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]"
               >
-                <span v-if="scope.row.isEdit">{{ scope.row[item.prop] }}</span>
+                <span v-if="scope.row.isEdit||(item.inputFloatValue&&!scope.row[item.isInputFloat])">{{ scope.row[item.prop] }}</span>
                 <div v-else @click.stop="commoInput">
                   <el-input-number
                     v-model="scope.row[item.prop]"
@@ -430,7 +434,7 @@
         <slot name="tableButton" />
       </el-table>
     </el-form>
-    <div v-if="!detailEnter && !isinventory && !isReorder" style="margin: 10px">
+    <div v-if="!detailEnter && !isinventory && !isReorder&&isOperateAdd" style="margin: 10px">
       <el-button size="small" type="primary" @click="add">鏂板</el-button>
       <el-button size="small" type="primary" @click="empty">娓呯┖</el-button>
     </div>
@@ -507,7 +511,12 @@
     isOperate: {
       type: Boolean,
       default: true
-    }
+    },
+    // 鏄惁鏈夋柊澧炲拰娓呯┖鎿嶄綔
+    isOperateAdd: {
+      type: Boolean,
+      default: true
+    },
   },
   data() {
     return {
@@ -612,7 +621,7 @@
       } else if (value === "formLocation") {
         restaurants = this.selLocationOptions
       }
-      var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants
+      var results = (queryString&&restaurants) ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants
       cb(results)
       if (results.length === 0) {
         this.productTypeNameOptions = []
@@ -679,6 +688,7 @@
       this.locacionName = ""
       await getLocationList({
         // keyword: "",
+        type:3,
         jointName: this.initialPosition ? this.initialPosition : null,
         productId: this.queryProductId ? this.queryProductId : null,
         productCategoryId: this.categoryId ? this.categoryId : null,

--
Gitblit v1.8.0