Explorar el Código

Merge branch 'develop_yh50' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh50

chenrui hace 4 meses
padre
commit
cc90a310c5

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

@@ -31,7 +31,7 @@
             v-model="localPagination.current"
             :pageSize="localPagination.pageSize"
             :showTotal="total => `共 ${total} 条记录`"
-            :pageSizeOptions="localPagination.pageSizeOptions"
+            :pageSizeOptions="['10', '20', '30', '40', '50', '100', '300', '500']"
             :show-quick-jumper="localPagination.showQuickJumper"
             @change="paginationChange"
             show-size-changer

+ 1 - 0
src/views/salesManagement/salesQueryNew/comps/activeQueryPart.vue

@@ -62,6 +62,7 @@
       :customRow="handleClickRow"
       :scroll="{ y: tableHeight, x: 1040 }"
       :defaultLoadData="false"
+      :pagination="{pageSizeOptions: ['10','20','30','50','100','300','500']}"
       :pageSize="50"
       bordered>
       <!-- 销售数量 -->

+ 1 - 0
src/views/salesManagement/salesQueryNew/comps/cumulativeQueryPart.vue

@@ -72,6 +72,7 @@
       :row-selection="{ columnWidth: 40 }"
       @rowSelection="rowSelectionFun"
       :scroll="{ y: tableHeight, x: 1040 }"
+      :pagination="{pageSizeOptions: ['10','20','30','50','100','300','500']}"
       :defaultLoadData="false"
       :pageSize="50"
       bordered>

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/importGuideModal.vue

@@ -117,7 +117,7 @@ export default {
   },
   methods: {
     pageInit (params, row, title) {
-      this.title = ('导入' + title) || '导入产品'
+      this.title = title ? ('导入' + title) : '导入产品'
       this.curRowData = row || null
       this.isTotalFlag = params.promoProductClz && (params.promoProductClz === 'BORROW_GATE' || params.promoProductClz === 'BORROW_REGULAR')
       // 判断是否是累计产品导入

+ 12 - 8
src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

@@ -662,12 +662,12 @@ export default {
           this.resetSearchForm(true)
           this.$emit('refash', 'promo', 'add')
         } else {
-          this.$emit('error', 'normal', 'add')
+          this.$emit('error', 'promo', 'add')
         }
         this.spinning = false
         this.isInster = false
       }).catch(err => {
-        this.$emit('error', 'normal', 'add')
+        this.$emit('error', 'promo', 'add')
         this.isInster = false
         this.spinning = false
       })
@@ -685,6 +685,8 @@ export default {
         salesBillDetailList: chooseData
       }
       salesDetailInsertBatchBorrow(params).then(res => {
+        this.spinning = false
+        this.isInster = false
         if (res.status == 200) {
           if (res.data && res.data.length) {
             const tipInfo = res.data.map((item, i) => { return <p>{item},无法添加!</p> })
@@ -694,15 +696,17 @@ export default {
               centered: true,
               okText: '知道了'
             })
-            return
+            this.$emit('error', 'promo', 'add')
+          } else {
+            this.$message.success('累计产品添加成功', 2.5)
+            this.resetSearchForm(true)
+            this.$emit('refash', 'promo', 'add')
           }
-          this.$message.success('累计产品添加成功', 2.5)
-          this.resetSearchForm(true)
-          this.$emit('refash', 'promo', 'add')
+        } else {
+          this.$emit('error', 'promo', 'add')
         }
-        this.spinning = false
-        this.isInster = false
       }).catch(err => {
+        this.$emit('error', 'promo', 'add')
         this.isInster = false
         this.spinning = false
       })

+ 1 - 1
src/views/salesManagement/salesQueryNew/detail.vue

@@ -759,7 +759,7 @@ export default {
     // 验证通过
     verificationSuccess (isBatch) {
       if (isBatch) { // 一键审核
-        if (this.$refs.productActiveList.hasOutStockOfActive) {
+        if (this.$refs.productActiveList && this.$refs.productActiveList.hasOutStockOfActive) {
           this.messageInfo('参加促销活动的产品存在缺货,不可一键审核!')
           return
         }

+ 0 - 4
src/views/salesManagement/salesQueryNew/edit.vue

@@ -298,10 +298,6 @@ export default {
     // 确定新增产品到列表,
     // row 产品信息,promo 活动规则信息,promoProductClz 规则类型,cptype 1 添加活动产品,2 累计产品
     insterProduct (row, promo, promoProductClz, cptype) {
-      if (this.spinning) {
-        this.$message.warning('正在添加产品,请稍等...')
-        return
-      }
       this.spinning = true
       // 正常产品
       if (promoProductClz == 0) {

+ 5 - 5
src/views/salesManagement/waitDispatchNew/detailProductList.vue

@@ -25,7 +25,7 @@
         row-key-field-name="id"
         :checkbox-option="checkboxOption"
       />
-      <div v-show="showEmpty" class="empty-data1"><a-empty description="暂无产品" :image="simpleImage"/></div>
+      <div v-show="showEmpty" class="empty-data3"><a-empty description="暂无产品" :image="simpleImage"/></div>
     </a-spin>
 
   </div>
@@ -255,9 +255,9 @@ export default {
       this.showEmpty = this.dataSource.length <= 0
       const len = this.dataSource.length
       if (len < 8) {
-        this.tableHeight = (len + 1) * 34
+        this.tableHeight = this.showEmpty ? 200 : (len + 1) * 34 - 1
       } else {
-        this.tableHeight = (this.showEmpty ? 300 : this.maxHeight) + 'px'
+        this.tableHeight = this.maxHeight
       }
       this.spinning = false
       this.disabled = false
@@ -363,12 +363,12 @@ export default {
 }
 </script>
   <style lang="less">
-  .empty-data1{
+  .empty-data3{
         color: #999;
         text-align: center;
         padding: 20px;
         position: absolute;
-        bottom: 50px;
+        top: 30px;
         width: 100%;
     }
     .ve-table-body-td{