Просмотр исходного кода

feature(优化): 组件重新打卡不重置数据问题

ZZH-wl 2 лет назад
Родитель
Сommit
671af14e1f

+ 1 - 1
src/components/currency/index.vue

@@ -46,7 +46,7 @@
     methods: {
       // 失焦显示数字类型
       inputMoney(el) {
-        this.num = Number(el.target.value) || null
+        this.num = Number(el.target.value) || 0
       },
       // 获得焦点金额去掉格式
       uninputMoney(el) {

+ 1 - 0
src/components/select/SelectBusiness.vue

@@ -199,6 +199,7 @@
       },
       close() {
         this.selectRows = []
+        this.queryForm = this.$options.data().queryForm
         this.$refs.businessTable.clearSelection()
       },
       save() {

+ 1 - 0
src/components/select/SelectBusinessContact.vue

@@ -163,6 +163,7 @@
       },
       close() {
         this.selectRows = []
+        this.queryForm = this.$options.data().queryForm
         this.$refs.contactTable.clearSelection()
       },
       save() {

+ 1 - 0
src/components/select/SelectCustomer.vue

@@ -175,6 +175,7 @@
       },
       close() {
         this.selectRows = []
+        this.queryForm = this.$options.data().queryForm
         this.$refs.customerTable.clearSelection()
       },
       save() {

+ 1 - 0
src/components/select/SelectCustomerContact.vue

@@ -186,6 +186,7 @@
       },
       close() {
         this.selectRows = []
+        this.queryForm = this.$options.data().queryForm
         this.$refs.contactTable.clearSelection()
       },
       save() {

+ 1 - 0
src/components/select/SelectDistributor.vue

@@ -168,6 +168,7 @@
       },
       close() {
         this.selectRows = []
+        this.queryForm = this.$options.data().queryForm
         this.$refs.distributorTable.clearSelection()
       },
       save() {

+ 1 - 0
src/components/select/SelectProduct.vue

@@ -169,6 +169,7 @@
       },
       close() {
         this.selectRows = []
+        this.queryForm = this.$options.data().queryForm
         this.$refs.productTable.clearSelection()
       },
       save() {

+ 4 - 1
src/components/select/SelectUser.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-dialog append-to-body :title="title" :visible.sync="innerVisible" width="40%">
+  <el-dialog append-to-body :title="title" :visible.sync="innerVisible" @close="close">
     <el-row class="transfer">
       <el-col :span="12">
         <header>
@@ -119,6 +119,9 @@
         }
         this.innerVisible = true
       },
+      close() {
+        this.queryForm = this.$options.data().queryForm
+      },
       save() {
         this.innerVisible = false
         this.$emit('save', this.selected, this.property, this.label)

+ 1 - 0
src/views/proj/business/components/BusinessEdit.vue

@@ -454,6 +454,7 @@
       },
       showEdit(row) {
         this.activeSteps = 1
+        this.productData = []
         if (!row) {
           this.title = '添加'
         } else {