lilei преди 6 месеца
родител
ревизия
d3fade2cf4
променени са 3 файла, в които са добавени 16 реда и са изтрити 12 реда
  1. 7 5
      src/views/salesManagement/salesQueryNew/comps/detailProductList.vue
  2. 8 6
      src/views/salesManagement/salesQueryNew/detail.vue
  3. 1 1
      vue.config.js

+ 7 - 5
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 已选配件列表 -->
   <a-spin :spinning="spinning" tip="Loading...">
-    <div style="margin: 0 0 10px 0;">
+    <div :style="{marginTop:type=='normal'?'0px':'10px'}">
       <ve-table
         border-y
         :scroll-width="0"
@@ -80,7 +80,7 @@ export default {
     // 最大高度
     maxHeight: {
       type: [String, Number],
-      default: '300'
+      default: '302'
     },
     // 是否显示表格头部
     showHeader: {
@@ -283,7 +283,7 @@ export default {
 
       // 查询正常产品明细列表
       const normalList = this.type == 'normal' ? await salesDetailAllList(params).then(res => res.data) : []
-      const norTotal = this.type == 'normal' ? await salesDetaiCount(params).then(res => res.data) : null
+      // const norTotal = this.type == 'normal' ? await salesDetaiCount(params).then(res => res.data) : null
       // 查询活动产品明细列表
       const activeList = this.type == 'active' ? await salesDetailExtPromoList({ salesPromoSnSet: [], ...params }).then(res => res.data) : []
       // 赋值
@@ -326,8 +326,10 @@ export default {
         str = str.substr(0, str.length - 1)
         this.outStockStr = '产品编号为:' + str + '的产品库存不足;'
       }
-      this.showEmpty = this.dataSource.length <= 0
-      this.tableHeight = (this.showEmpty ? 0 : this.maxHeight) + 'px'
+
+      const listLen = this.dataSource.length
+      this.showEmpty = listLen <= 0
+      this.tableHeight = (this.showEmpty ? 0 : (listLen > 10 ? this.maxHeight : ((listLen + 1) * 30 + 2))) + 'px'
       this.spinning = false
       this.disabled = false
     }

+ 8 - 6
src/views/salesManagement/salesQueryNew/detail.vue

@@ -65,7 +65,7 @@
           </a-descriptions>
         </div>
       </a-card>
-      <a-card size="small" :bordered="false" class="pages-wrap">
+      <a-card size="small" :bordered="false" class="pages-wrap" style="margin-bottom: 6px;" >
         <!-- 统计信息 -->
         <a-alert type="info" style="margin-bottom: 10px;">
           <div slot="message">
@@ -338,7 +338,7 @@ export default {
         return shippingAddrProvinceName + shippingAddrCityName + shippingAddrCountyName + shippingAddr
       }
     },
-    // 是否因此底部栏按钮
+    // 是否隐藏底部栏按钮
     hideFooter () {
       const detailData = this.detailData
       return detailData && (detailData.billStatus == 'HQ_CHANGE' || (detailData.salesBillSource != 'SALES' && detailData.billStatus == 'AUDIT_REJECT') || detailData.billStatus == 'FINISH' || detailData.billStatus == 'OUTING_WAREHOUSE')
@@ -347,9 +347,13 @@ export default {
     hasPrompActive () {
       return this.detailData && this.detailData.promoFlag == 1
     },
+    // 是否有可转采购额
+    hasConvertPromoGifts () {
+      return this.detailData && this.detailData.totalConvertPromoGiftsQty
+    },
     // 是否有促销产品(转采购额)
     showConvertPromoGifts () {
-      return this.$refs.productList && this.$refs.productList.showConvertPromoGifts
+      return this.activeList && this.activeList.filter(item => item.enabledFlag == 1).find(item => item.promotionRule && item.promotionRule.convertExpenseFlag == 1 && item.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD')
     },
     // 是否显示库存列
     showStock () {
@@ -357,7 +361,7 @@ export default {
     },
     // 表格高度计算
     pageHeight () {
-      return window.innerHeight - 315 + (this.hideFooter ? 45 : 0)
+      return this.activeList.length == 0 ? window.innerHeight - 315 + (this.hideFooter ? 45 : 0) : 302
     }
   },
   methods: {
@@ -481,8 +485,6 @@ export default {
       this.$nextTick(() => {
         if (this.activeList.length) {
           this.$refs.activeTjList.hasInit = false
-          // 刷新活动统计
-          this.$refs.activeTjList.getDataList()
         }
       })
       setTimeout(() => {

+ 1 - 1
vue.config.js

@@ -108,7 +108,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.2.10/ocs-admin',
+        target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,