From 1f4bc9f584c07a0958747657b7353ccbd1d56b41 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 16 八月 2023 17:39:00 +0800
Subject: [PATCH] bug修复及销售子单产品管理相关

---
 src/components/makepager/CommonFormTableView.vue |   40 +++++++++++++++++++++++++---------------
 1 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 01f734a..dedaea4 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -15,7 +15,7 @@
           :label="item.label"
           :width="item.width"
           :min-width="item.min"
-          align="right"
+          align="center"
         >
           <!-- 琛ㄥご鏍峰紡 -->
           <template slot="header">
@@ -31,7 +31,16 @@
                 :prop="'tableData.' + scope.$index + '.' + item.prop"
                 :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]"
               >
-                <el-input v-model.trim="scope.row[item.prop]" maxlength="50" size="mini" disabled></el-input>
+                <el-input
+                  v-model.trim="scope.row[item.prop]"
+                  maxlength="50"
+                  size="mini"
+                  @change="
+                    (val) => {
+                      commonInputChange(val, item.prop, scope.row)
+                    }
+                  "
+                ></el-input>
               </el-form-item>
               <el-form-item
                 v-else-if="item.date"
@@ -40,7 +49,7 @@
                 :rules="[{ required: item.isRequird ? true : false, message: '杈撳叆涓嶈兘涓虹┖' }]"
               >
                 <!-- <el-input v-model.trim="scope.row[item.prop]" maxlength="50" size="mini"></el-input> -->
-                <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px" disabled>
+                <el-date-picker v-model="scope.row[item.prop]" type="date" size="mini" style="width: 110px">
                 </el-date-picker>
               </el-form-item>
               <span v-else>{{ scope.row[item.prop] }}</span>
@@ -51,10 +60,10 @@
       </el-table>
     </el-form>
     <div v-if="!detailEnter" style="margin: 10px">
-      <el-button size="small" type="primary" disabled>鏂板</el-button>
-      <el-button size="small" type="primary" disabled>瀵煎叆鏄庣粏</el-button>
-      <el-button size="small" type="primary" disabled>娓呯┖</el-button>
-      <el-button size="small" type="primary" disabled>閲嶇畻</el-button>
+      <el-button size="small" type="primary" @click="add">鏂板</el-button>
+      <!-- <el-button size="small" type="primary" disabled>瀵煎叆鏄庣粏</el-button> -->
+      <el-button size="small" type="primary">娓呯┖</el-button>
+      <el-button size="small" type="primary">閲嶇畻</el-button>
     </div>
     <div v-if="showSummary.total || showSummary.refundable" style="height: 42px; line-height: 42px">
       <el-row :gutter="10">
@@ -107,14 +116,7 @@
   data() {
     return {}
   },
-  computed: {
-    maxHeight() {
-      if (this.productTableList.height) {
-        return `calc(100vh - ${this.productTableList.height})`
-      }
-      return undefined
-    }
-  },
+  computed: {},
   methods: {
     handleReserve(row) {
       return row._id ? row._id : row.id
@@ -191,6 +193,14 @@
         s[1] = s[1].substring(0, prec) //灏忔暟鐐逛綅鏁拌秴鍑洪暱搴︽椂鎴彇鍓嶉潰鐨勪綅鏁�
       }
       return s.join(dec)
+    },
+    add() {
+      this.$emit("addProductClick")
+    },
+    commonInputChange(val, prop, row) {
+      console.log(val, prop)
+      console.log(row)
+      this.$emit("inputContent", val, prop, row)
     }
   }
 }

--
Gitblit v1.8.0