Ver código fonte

销售下推报表、销售单列表

chenrui 1 ano atrás
pai
commit
0fe5da0e80

+ 24 - 13
src/views/reportData/salesDetails/list.vue

@@ -102,14 +102,24 @@
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品类型" prop="goodFlag">
-                  <v-select
-                    v-model="queryParam.goodFlag"
-                    ref=" goodFlag"
-                    id="returnSchedule-goodFlag"
-                    code="GOOD_FLAG"
-                    placeholder="请选择产品类型"
-                    allowClear></v-select>
+                <a-form-model-item label="产品类型" prop="promotionFlag">
+                  <a-select allowClear v-model.trim="queryParam.promotionFlag" :dropdownMatchSelectWidth="false" placeholder="请选择产品类型">
+                    <a-select-option value="0">
+                      正常产品
+                    </a-select-option>
+                    <a-select-option value="REGULAR">
+                      正价产品(活动)
+                    </a-select-option>
+                    <a-select-option value="DISCOUNT">
+                      特价产品
+                    </a-select-option>
+                    <a-select-option value="GIFT">
+                      促销产品
+                    </a-select-option>
+                    <a-select-option value="GATE">
+                      门槛产品
+                    </a-select-option>
+                  </a-select>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -157,13 +167,12 @@
           :defaultLoadData="false"
           bordered>
           <!-- 产品编码 -->
-          <!-- <template slot="productCode" slot-scope="text, record">
+          <template slot="productCode" slot-scope="text, record">
             <span style="padding-right: 15px;">{{ text }}</span>
             <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
             <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
             <a-badge count="槛" v-if="record.promotionFlag=='GATE'" :number-style="{ backgroundColor: '#108ee9', zoom:'80%' }"></a-badge>
-            <a-badge count="缺" v-if="Number(record.stockQty||0) < Number(record.unpushedQty||0)" :number-style="{ zoom:'80%' }"></a-badge>
-          </template> -->
+          </template>
           <template slot="footer">
             <a-row :gutter="15">
               <a-col :md="4" :sm="24">下推数量:{{ (totalData && (totalData.qty || totalData.qty==0)) ? totalData.qty : '--' }}</a-col>
@@ -235,7 +244,8 @@ export default {
         dealerCitySn: undefined,
         dealerCountySn: undefined,
         warehouseSn: undefined,
-        giftFLag: undefined
+        giftFLag: undefined,
+        promotionFlag: undefined
       },
       productType: [],
       rules: {
@@ -287,7 +297,7 @@ export default {
         { title: '品牌', dataIndex: 'productBrandName', width: 130, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '二级分类', dataIndex: 'productTypeName2', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 150, align: 'center', scopedSlots: { customRender: 'productCode' } },
         { title: '单位', dataIndex: 'productUnit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '下推数量', dataIndex: 'qty', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
         // { title: '成本价', dataIndex: 'totalCost', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -402,6 +412,7 @@ export default {
       this.queryParam.dealerCountySn = undefined
       this.queryParam.warehouseSn = undefined
       this.queryParam.giftFLag = undefined
+      this.queryParam.promotionFlag = undefined
       if (this.advanced) {
         this.$refs.subarea.clearData()
         this.$refs.areaList.clearData()

+ 21 - 22
src/views/salesManagement/salesQueryNew/list.vue

@@ -150,9 +150,6 @@
                 已发货金额:<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? toThousands(totalData.totalDispatchAmount) : '--' }}</strong>;
               </div>
             </div>
-            <!-- <div>
-              <a-checkbox v-model="showCancelNum"><span style="display: inline-block;margin-top: 1px;">显示取消数量</span></a-checkbox>
-            </div> -->
             <div>
               <span>显示:</span>
               <a-tree-select
@@ -413,7 +410,6 @@ export default {
           return data
         })
       },
-      showCancelNum: false, //  是否显示取消数量和待下推数量
       tipData: null, // 备货单信息
       tempSalesBillSn: null,
       // 允许备货打印
@@ -436,18 +432,18 @@ export default {
       colsArr: [
         {
           title: '取消数量',
-          value: 'salesBillNo',
-          key: 'salesBillNo'
+          value: 'showCancelQty',
+          key: 'showCancelQty'
         },
         {
           title: '待下推金额',
-          value: 'warehouseName',
-          key: 'warehouseName'
+          value: 'showPushedPrice',
+          key: 'showPushedPrice'
         },
         {
           title: '转采购额数量',
-          value: 'billStatusDictValue',
-          key: 'billStatusDictValue'
+          value: 'showPurchaseQty',
+          key: 'showPurchaseQty'
         }
       ]
     }
@@ -462,8 +458,14 @@ export default {
         { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '8%', align: 'left', ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', scopedSlots: { customRender: 'totalQty' }, width: '4%', align: 'center' },
+        // 总售价
+        { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // 待下推金额
         { title: '已下推数量', dataIndex: 'totalPushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // 下推总金额
+        // 已取消数量
         { title: '已发货数量', dataIndex: 'totalDispatchQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        // 转采购额数量
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审核时间', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
@@ -472,23 +474,20 @@ export default {
         { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
       ]
-
+      if (this.$hasPermissions('M_salesQueryList_salesPrice') && this.showCols.includes('showPushedPrice')) {
+        arr.splice(7, 0, { title: '待下推金额', dataIndex: 'totalUnpushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+      }
       if (this.$hasPermissions('M_salesQueryList_salesPrice')) { // 售价权限
+        const pos = this.showCols.includes('showPushedPrice') ? 10 : 9
         arr.splice(6, 0, { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(8, 0, { title: '待下推金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(pos, 0, { title: '下推总金额', dataIndex: 'totalPushedAmount', width: '4%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
-
-      if (this.showCols.includes('salesBillNo') && this.showCancelNum) {
-        const ind = this.$hasPermissions('M_salesQueryList_salesPrice') ? 10 : 8
-        arr.splice(ind, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      if (this.showCols.includes('showCancelQty')) {
+        arr.splice(11, 0, { title: '已取消数量', dataIndex: 'totalCancelQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
-
-      if (this.showCancelNum) {
-        const ind = this.$hasPermissions('M_salesQueryList_salesPrice') ? 10 : 8
-        arr.splice(ind + 1, 0, { title: '待下推数量', dataIndex: 'totalUnpushedQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+      if (this.showCols.includes('showPurchaseQty')) {
+        arr.splice(13, 0, { title: '转采购额数量', dataIndex: 'totalConvertPromoGiftsQty', width: '4%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
-
       return arr
     }
   },