lilei před 6 měsíci
rodič
revize
94b1e3b337

+ 2 - 4
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -3,11 +3,10 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <ve-table
         style="width:100%"
-        :max-height="tableHeight"
-        :scroll-width="0"
         border-y
         border-x
         border-around
+        :max-height="300"
         row-key-field-name="salesPromoSn"
         :checkbox-option="checkboxOption"
         :column-width-resize-option="columnWidthResizeOption"
@@ -139,8 +138,7 @@ export default {
       disabledActiveOption: null, // 禁用规则选项
       enableActiveOption: null, // 启用规则选项
       openGuideModal: false, //  导入产品引导
-      buyGiftsInfo: null, // 买赠产品弹窗详情信息
-      tableHeight: 302
+      buyGiftsInfo: null // 买赠产品弹窗详情信息
     }
   },
   computed: {

+ 11 - 35
src/views/salesManagement/salesQueryNew/comps/detailProductList.vue

@@ -1,6 +1,12 @@
 <template>
   <!-- 已选配件列表 -->
   <a-spin :spinning="spinning" tip="Loading...">
+    <!-- 总计 -->
+    <div style="padding:0 0 5px 0;" v-if="countData">
+      总款数:<strong>{{ countData&&(countData.totalCategory || countData.totalCategory==0) ? countData.totalCategory : 0 }}</strong>;
+      总数量:<strong>{{ countData&&(countData.totalQty || countData.totalQty==0) ? countData.totalQty : 0 }}</strong>;
+      <span v-if="$hasPermissions('B_salesDetail_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
+    </div>
     <div :style="{marginTop:type=='normal'?'0px':'10px'}">
       <ve-table
         border-y
@@ -110,7 +116,8 @@ export default {
       hasOutStockOfActive: false, // 产品是否存在缺货
       simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, // 空图片
       showStockCol: false, // 显示第三方库存
-      hasJGtire: false // 是否轮胎产品
+      hasJGtire: false, // 是否轮胎产品
+      countData: null
     }
   },
   computed: {
@@ -124,7 +131,7 @@ export default {
       const numsFormat = function (data) {
         return data || data == 0 ? data : '--'
       }
-      // 销售单
+      // 
       const codeFormat = function (record, data, h) {
         return (
           <div>
@@ -138,37 +145,6 @@ export default {
           </div>
         )
       }
-      // 编号,并且格式化活动分类行
-      const noFormat = function (record, data, h) {
-        const isBuyPSendP = record.promo && record.promo.promotionRule.convertExpenseFlag == 1 && record.promo.promotionRule.promotionRuleType == 'BUY_PROD_GIVE_PROD'
-        return (
-          <div>
-            {record.id.indexOf('promo-') >= 0 ? (
-              <div class="active-title">
-                {record.promo ? (
-                  <div>
-                    <strong style="font-size:14px;">{record.promo.promotion.description}</strong>
-                    <span>({record.promo.promotionRule.description})</span>
-                    <span id="salesDetail-activeDesc" style="margin-left:20px;color:#00aaff;cursor: pointer;" onClick={() => _this.showDesc(record.promo)}>
-                      <a-icon title="查看活动详情" type="eye"/> 活动详情
-                    </span>
-                  </div>
-                ) : (<div></div>)}
-                <div>
-                  款数:<strong>{record.total && record.total.totalCategory || '--'}</strong>;
-                  数量:<strong>{record.total && record.total.totalQty || '--'}</strong>;
-                  {_this.$hasPermissions('B_salesDetail_salesPrice') ? (<span>总金额:<strong>{record.total && record.total.totalAmount || '--'}</strong>;</span>) : ('')}
-                  {_this.$hasPermissions('B_salesDetail_salesPrice') && record.promo && record.total && record.total.lossAmount ? (<span>优惠金额:<strong>{record.total.lossAmount}</strong>;</span>) : ('')}
-                  {_this.$hasPermissions('B_salesDetail_salesPrice') && record.promo && record.total && record.total.cgejyAmount > 0 && !isBuyPSendP ? (<span>采购额结余:<strong>{_this.toThousands(record.total.cgejyAmount)}</strong>;</span>) : ('')}
-                  {_this.$hasPermissions('B_salesDetail_salesPrice') && record.promo && record.total && record.total.cgejyAmount < 0 && !isBuyPSendP ? (<span>采购额超出:<strong>{_this.toThousands(record.total.cgeccAmount)}</strong>;</span>) : ('')}
-                  {_this.$hasPermissions('B_salesDetail_salesPrice') && record.promo && record.total && record.total.totalPromoGiftsAmount && isBuyPSendP ? (<span>促销产品转采购额金额:<strong>{_this.toThousands(record.total.totalPromoGiftsAmount)}</strong>;</span>) : ('')}
-                  {record.total && record.total.expenseAccountFlag != 'WAIT' ? (<span style="color:red;">{record.total.expenseAccountFlagDictValue}</span>) : ''}
-                </div>
-              </div>
-            ) : (<span>{data}</span>)}
-          </div>
-        )
-      }
       // 显示折扣价
       const discountPriceFormat = function (record, data, h) {
         return (
@@ -182,7 +158,7 @@ export default {
       }
       // 列定义
       let arr = [
-        { title: '序号', field: 'no', key: 'a', width: 50, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return noFormat(row, row[column.field], h) } },
+        { title: '序号', field: 'no', key: 'a', width: 50, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
         { title: '产品编码', field: 'productCode', key: 'b', width: 150, align: 'left', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return codeFormat(row, row[column.field], h) } },
         { title: '产品名称', field: 'productName', key: 'c', width: 250, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
         { title: '原厂编码', field: 'productOrigCode', key: 'd', width: 150, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
@@ -275,7 +251,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
+      this.countData = this.type == 'normal' ? await salesDetaiCount(params).then(res => res.data) : null
       // 查询活动产品明细列表
       const activeList = this.type == 'active' ? await salesDetailExtPromoList({ salesPromoSnSet: [], ...params }).then(res => res.data) : []
       // 赋值

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

@@ -125,7 +125,7 @@
                       </a-select>
                     </a-form-item>
                   </a-col>
-                  <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                  <a-col :md="6" :sm="24">
                     <a-button type="primary" @click="searchTable" :disabled="disabled" id="salesDetail-refresh">查询</a-button>
                     <a-button style="margin-left: 5px" @click="resetSearchForm" id="salesDetail-reset">重置</a-button>
                   </a-col>