lilei 2 weeks ago
parent
commit
32a3c66808

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

@@ -306,7 +306,7 @@ export default {
               title: '配额',
               title: '配额',
               width: 50,
               width: 50,
               align: 'center',
               align: 'center',
-              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'gateUnit')
+              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'quotaUnit')
             },
             },
             {
             {
               field: 'unUseGateQuota',
               field: 'unUseGateQuota',
@@ -314,7 +314,7 @@ export default {
               title: '未用配额',
               title: '未用配额',
               width: 60,
               width: 60,
               align: 'center',
               align: 'center',
-              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'gateUnit')
+              renderBodyCell: ({ row, column, rowIndex }, h) => formatTd(row, column, rowIndex, 'quotaUnit')
             }
             }
           ]
           ]
         },
         },
@@ -588,9 +588,10 @@ export default {
         const gateUnit = isYuan ? '元' : '个' // 单位
         const gateUnit = isYuan ? '元' : '个' // 单位
         const gateSelected = isYuan ? item.gateTotalAmount : item.gateQty // 已选
         const gateSelected = isYuan ? item.gateTotalAmount : item.gateQty // 已选
         const gateTotal = isYuan ? item.gateBorrowAmount : item.gateBorrowQty // 累计
         const gateTotal = isYuan ? item.gateBorrowAmount : item.gateBorrowQty // 累计
-        const gateQuota = isYuan ? item.gateQuotaAmount : item.gateQuotaQty // 配额
-        const unUseGateQuota = isYuan ? Number(item.unUseAmount).toFixed(2) : item.unUseAmount // 未用配额
         const geteBalance = item.gateShortfallValue // 差额
         const geteBalance = item.gateShortfallValue // 差额
+        const quotaUnit = item.QuotaRuleUnit == 'YUAN' ? '元' : '个' // 配额单位
+        const gateQuota = item.QuotaRuleUnit == 'YUAN' ? item.gateQuotaAmount : item.gateQuotaQty // 配额
+        const unUseGateQuota = item.unUseAmount // 未用配额
         // 特价产品
         // 特价产品
         const isYuan2 = item.gateRuleUnit == 'YUAN'
         const isYuan2 = item.gateRuleUnit == 'YUAN'
         const specialPriceUnit = isYuan2 ? '元' : '个' // 已选单位
         const specialPriceUnit = isYuan2 ? '元' : '个' // 已选单位
@@ -628,6 +629,7 @@ export default {
           promotionTitle: item.promotion.title,
           promotionTitle: item.promotion.title,
           // 门槛
           // 门槛
           gateUnit, // 单位
           gateUnit, // 单位
+          quotaUnit, // 配额单位
           gateQuota, // 配额
           gateQuota, // 配额
           unUseGateQuota, // 未用配额
           unUseGateQuota, // 未用配额
           gateSelected, // 已选
           gateSelected, // 已选

+ 19 - 18
src/views/salesManagement/salesQueryNew/comps/productActiveList.vue

@@ -387,7 +387,7 @@ export default {
           operationColumn: false,
           operationColumn: false,
           renderBodyCell: ({ row, column, rowIndex }, h) => {
           renderBodyCell: ({ row, column, rowIndex }, h) => {
             return (
             return (
-              !(row.promotionFlag.indexOf('GIFT') >= 0 && row.sameGiteFlag == '1')
+              !(row.promotionFlag.indexOf('GIFT') >= 0 && row.sameGiteFlag == '1') && row.borrowFlag != '1'
                 ? <a-input-number
                 ? <a-input-number
                   id={'salesEdit-qty-' + row.id}
                   id={'salesEdit-qty-' + row.id}
                   size="small"
                   size="small"
@@ -433,22 +433,23 @@ export default {
           operationColumn: false,
           operationColumn: false,
           renderBodyCell: ({ row, column, rowIndex }, h) => {
           renderBodyCell: ({ row, column, rowIndex }, h) => {
             return (
             return (
-              <a-select
-                id={'salesEdit-warehouse-' + row.id}
-                size="small"
-                style="width:100%;"
-                placeholder="请选择仓库"
-                vModel={row.warehouseSn}
-                showSearch={true}
-                onChange={() => _this.handleWarehouseBox(row)}
-                mode="default"
-                filter-option={_this.filterOption}>
-                {
-                  _this.warehouseDataList.map(item => {
-                    return <a-select-option key={item.warehouseSn} value={item.warehouseSn}>{ item.name }</a-select-option>
-                  })
-                }
-              </a-select>
+              row.borrowFlag != '1'
+                ? <a-select
+                  id={'salesEdit-warehouse-' + row.id}
+                  size="small"
+                  style="width:100%;"
+                  placeholder="请选择仓库"
+                  vModel={row.warehouseSn}
+                  showSearch={true}
+                  onChange={() => _this.handleWarehouseBox(row)}
+                  mode="default"
+                  filter-option={_this.filterOption}>
+                  {
+                    _this.warehouseDataList.map(item => {
+                      return <a-select-option key={item.warehouseSn} value={item.warehouseSn}>{ item.name }</a-select-option>
+                    })
+                  }
+                </a-select> : <span>{ row.warehouseName }</span>
             )
             )
           }
           }
         },
         },
@@ -466,7 +467,7 @@ export default {
             return (
             return (
               <div>
               <div>
                 {
                 {
-                  !(row.promotionFlag.indexOf('GIFT') >= 0 && row.sameGiteFlag == '1')
+                  row.promotionFlag.indexOf('GIFT') < 0 && row.borrowFlag != '1'
                     ? <a-button
                     ? <a-button
                       id={'salesEdit-upactive-' + row.id}
                       id={'salesEdit-upactive-' + row.id}
                       size="small"
                       size="small"

+ 6 - 8
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -183,15 +183,13 @@
           @click="handleDel(record)"
           @click="handleDel(record)"
         >删除</a-button>
         >删除</a-button>
       </template>
       </template>
-      <!-- 总计 -->
-      <template slot="page">
-        <div v-if="showTotal" style="width: auto;display: inline-block;padding:5px 0;">
-          总款数:<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_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
-        </div>
-      </template>
     </v-table>
     </v-table>
+    <!-- 总计 -->
+    <div v-if="showTotal" style="padding:6px 0 0;text-align: right;">
+      总款数:<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_salesEdit_salesPrice')">总金额:<strong>{{ countData&&(countData.totalAmount || countData.totalAmount==0) ? toThousands(countData.totalAmount) : '0.00' }}</strong>;</span>
+    </div>
     <!-- 导入产品 -->
     <!-- 导入产品 -->
     <importGuideModal ref="guideModal" :openModal="openGuideModal" @close="closeGuideModel" @ok="hanldeOk" />
     <importGuideModal ref="guideModal" :openModal="openGuideModal" @close="closeGuideModel" @ok="hanldeOk" />
     <!-- 仓库设置 -->
     <!-- 仓库设置 -->