chenrui 3 年之前
父節點
當前提交
c0865b2191

+ 1 - 1
src/components/Table/index.js

@@ -389,7 +389,7 @@ export default {
       return props[k]
     })
     if (!this.isSucceed) { // 请求失败
-      props['locale'] = { emptyText: '网络异常,请点击按钮刷新' }
+      props['locale'] = { emptyText: '暂时无法获取数据,请刷新页面重试' }
     }
     // isSucceed
     const table = (

+ 1 - 1
src/views/common/productJqList.vue

@@ -4,7 +4,7 @@
     show-search
     label-in-value
     :value="productCode"
-    placeholder="请输入名称搜索"
+    placeholder="请输入产品编码搜索"
     style="width: 100%"
     :filter-option="false"
     :dropdownMatchSelectWidth="false"

+ 12 - 4
src/views/numsGoodsShelves/shelfSet/bindProductModal.vue

@@ -197,6 +197,17 @@ export default {
           this.$refs.ruleForm.resetFields()
         }
       })
+    },
+    resetData(){
+      this.form.productSn = undefined
+      this.form.productCode = undefined
+      this.form.price = ''
+      this.form.cost = ''
+      this.form.maxQty = ''
+      if (this.$refs.productJqList) {
+        this.$refs.productJqList.resetForm()
+      }
+      this.$refs.ruleForm.resetFields(['productSn'])
     }
   },
   watch: {
@@ -208,10 +219,7 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
-        this.$refs.ruleForm.resetFields()
-        if (this.$refs.productJqList) {
-          this.$refs.productJqList.resetForm()
-        }
+        this.resetData()
         this.productName = ''
         this.productInfo = null
       } else {

+ 1 - 5
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -95,7 +95,7 @@
       </a-card>
     </a-spin>
     <!-- 修改信息/绑定产品/更换产品 -->
-    <bind-product-modal :openModal="openModal" :type="modalType" :nowData="nowData" @ok="handleOk" @close="handleCancel" />
+    <bind-product-modal :openModal="openModal" :type="modalType" :nowData="nowData" @ok="$refs.table.refresh()" @close="handleCancel" />
     <!-- 更换产品 -->
     <common-modal
       :openModal="openTipsModal"
@@ -200,13 +200,9 @@ export default {
       }else{
         this.nowData = null
       }
-      this.nowData = row || null
       this.modalType = type
       this.openModal = true
     },
-    handleOk () {
-      this.$refs.table.refresh()
-    },
     handleCancel () {
       this.nowData = null
       this.openModal = false