lilei 2 years ago
parent
commit
549d7e4a7e

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1677566210366
+  "version": 1677579557756
 }

+ 0 - 5
src/store/modules/shoppingCart.js

@@ -3,11 +3,6 @@ export default {
   state: {
     cartCount: 0,
   },
-  getters: {
-    cartCount: state => {
-      return () => state.cartCount
-    },
-  },
   mutations: {
     setCartCount (state, count) {
       state.cartCount = count

+ 3 - 1
src/views/common/printPanel.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="print-page-header">
-        <a-popover :placement="position">
+        <a-popover :placement="position" v-model="hovered" trigger="hover">
             <template slot="content">
                 <div style="padding:10px;">
                     <span>打印方式:</span>
@@ -73,6 +73,7 @@
     },
     data () {
       return {
+        hovered: false,
         printerType: 'NEEDLE' // 打印机类型
       }
     },
@@ -80,6 +81,7 @@
       handlePrint (type) {
         this.$store.dispatch('TogglePrintSettingType', this.printerType)
         this.$emit('handlePrint', type, this.printerType)
+        // this.hovered = false
       }
     }
   }

+ 2 - 1
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -13,7 +13,7 @@
       <!-- 操作区,位于 title 行的行尾 -->
       <template slot="extra">
         <div style="margin-top: 5px;">
-          <PrintPanel v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></PrintPanel>
+          <PrintPanel ref="printBox" v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></PrintPanel>
           <a-divider type="vertical" v-if="detail&&detail.totalCategory" />
           <a-button type="link" v-if="detail&&detail.totalCategory" @click="showSearch=!showSearch" :class="showSearch?'button-error':'button-default'"> <a-icon type="search" /> 筛选</a-button>
           <a-divider type="vertical" v-if="detail&&detail.totalCategory" />
@@ -504,6 +504,7 @@ export default {
       // 打印或导出
       hdPrint(printerType, type, url, params, '采购单', function () {
         _this.$store.state.app.printLoading = false
+        _this.$refs.printBox.hovered = false
       })
     },
     //  返回列表

+ 4 - 13
src/views/salesManagement/salesQueryNew/chooseProductModal.vue

@@ -10,7 +10,6 @@
     @close="onClose"
     wrapClassName="chooseProduct-drawer jg-drawer-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-    <div class="productInfoList-wrap">
     <!-- 搜索条件 -->
     <div ref="searchBox" class="table-page-search-wrapper">
       <a-form-model
@@ -197,7 +196,7 @@
           style="margin-left: 5px;">销售记录</a-button>
       </template>
     </s-table>
-    <div v-else>
+    <div style="padding-top: 30px;" v-else>
       <a-empty
         :image="simpleImage"
         :image-style="{
@@ -207,11 +206,9 @@
         <span style="color:red" slot="description">请输入查询条件</span>
       </a-empty>
     </div>
-    <!-- 销售记录 -->
-    <product-salesRecord-modal ref="salseRecord" :openModal="openModal" @close="closeModal" />
+    
     <!-- 查看车辆信息 -->
     <car-info-modal ref="carInfoModal" :openModal="openCarInfoModal" :infoData="vinInfoData&&vinInfoData.vinInfo" @close="openCarInfoModal=false" />
-  </div>
     </a-spin>
   </a-drawer>
 </template>
@@ -221,7 +218,6 @@ import { Empty } from 'ant-design-vue'
 import { commonMixin } from '@/utils/mixin'
 import { querySumByProductLocation } from '@/api/stock'
 import { warehouseAllList } from '@/api/warehouse'
-import productSalesRecordModal from './productSalesRecordModal.vue'
 import carInfoModal from './carInfoModal.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
@@ -230,7 +226,7 @@ import { supperCodeByVin, vinCodeParse } from '@/api/sales'
 import defImg from '@/assets/def_img@2x.png'
 export default {
   mixins: [commonMixin],
-  components: { STable, VSelect, Upload, productSalesRecordModal, carInfoModal, ProductType, ProductBrand },
+  components: { STable, VSelect, Upload, carInfoModal, ProductType, ProductBrand },
   props: {
     showModal: {
       type: Boolean,
@@ -533,12 +529,7 @@ export default {
     },
     // 销售记录
     handleDetail (row) {
-      this.openModal = true
-      this.$refs.salseRecord.getDetail(this.buyerSn, row.productSn, row)
-    },
-    //  关闭弹框
-    closeModal () {
-      this.openModal = false
+      this.$emit('viewRecord',row)
     },
     uploadFun () {
       document.getElementById('filed').click()

+ 126 - 93
src/views/salesManagement/salesQueryNew/edit.vue

@@ -17,7 +17,7 @@
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_salesPrint')">
           <div style="margin-top: 5px;">
-            <PrintPanel :disabled="dataSource.length==0" @handlePrint="handlePrint">
+            <PrintPanel ref="printBox" :disabled="dataSource.length==0" @handlePrint="handlePrint">
               <div style="padding:10px;" slot="extendCons">
                 <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
                 <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
@@ -62,59 +62,53 @@
         <div class="choosed-table" v-if="detailData&&detailData.totalCategory">
           <!-- 搜索条件 -->
           <div class="table-page-search-wrapper" style="margin-bottom:0;" v-if="showSearch">
-            <a-row :gutter="0">
-              <a-col :lg="24" :xl="14">
-                <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
-                  <a-row :gutter="10">
-                    <a-col :md="6" :sm="24">
-                      <a-form-model-item label="产品编码">
-                        <a-input v-model.trim="productForm.productCode" allowClear placeholder="输入产品编码" />
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-model-item label="产品名称">
-                        <a-input v-model.trim="productForm.productName" allowClear placeholder="输入产品名称" />
-                      </a-form-model-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="是否有急件">
-                        <a-select allowClear v-model="productForm.oosFlag" placeholder="请选择是否">
-                          <a-select-option value="1">
-                            是
-                          </a-select-option>
-                          <a-select-option value="0">
-                            否
-                          </a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
-                      <a-button style="margin-left: 5px" @click="resetForm" id="salesEdit-reset">重置</a-button>
-                    </a-col>
-                  </a-row>
-                </a-form-model>
-              </a-col>
-              <a-col :lg="24" :xl="10">
-                <div style="display:flex;align-items:center;padding: 6px 0;justify-content: flex-end;width:100%;">
-                  <div>
-                  折扣金额:
-                  <a-input-number
-                    id="discount"
-                    size="small"
-                    v-model.trim="detailData.discountAmount"
-                    :min="0"
-                    :precision="2"
-                    :max="999999"/>
-                  <a-button size="small" type="primary" class="button-primary" @click="salesDiscount">打折</a-button>
-                </div>
-                <div style="padding:0 10px;">
-                  折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
-                  折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
-                </div>
-                </div>
-              </a-col>
-            </a-row>
+            <a-form-model :model="productForm" ref="ruleForm" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
+              <a-row :gutter="10">
+                <a-col :md="5" :sm="24">
+                  <a-form-model-item label="产品编码">
+                    <a-input v-model.trim="productForm.productCode" allowClear placeholder="输入产品编码" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="5" :sm="24">
+                  <a-form-model-item label="产品名称">
+                    <a-input v-model.trim="productForm.productName" allowClear placeholder="输入产品名称" />
+                  </a-form-model-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="是否有急件">
+                    <a-select allowClear v-model="productForm.oosFlag" placeholder="请选择是否">
+                      <a-select-option value="1">
+                        是
+                      </a-select-option>
+                      <a-select-option value="0">
+                        否
+                      </a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                  <a-button style="margin-left: 5px" @click="resetForm" id="salesEdit-reset">重置</a-button>
+                </a-col>
+              </a-row>
+            </a-form-model>
+          </div>
+          <div class="discount-box">
+            <div>
+            折扣金额:
+            <a-input-number
+              id="discount"
+              size="small"
+              v-model.trim="detailData.discountAmount"
+              :min="0"
+              :precision="2"
+              :max="999999"/>
+            <a-button size="small" type="primary" class="button-primary" @click="salesDiscount">打折</a-button>
+          </div>
+          <div style="padding:0 10px;">
+            折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
+            折后总售价:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>;
+          </div>
           </div>
           <!-- 已选配件列表 -->
           <s-table
@@ -211,7 +205,7 @@
           </s-table>
         </div>
         <div class="choosed-table" v-else>
-          <div v-if="!spinning&&dataSource.length==0">
+          <div v-if="!spinning&&detailData.totalCategory==0">
             <a-empty
               :image="simpleImage"
               :image-style="{
@@ -232,45 +226,57 @@
         <!-- 总计 -->
         <div v-if="detailData" class="total-bar">
           <div>
-            总售价:<strong>{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</strong>;
-            总款数:<strong>{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}</strong>;
-            总数量:<strong>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}</strong>;
-            赠品总数量:<strong>{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</strong>;
-            <span v-if="isCosts">
-              总成本价:<strong>{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</strong>;
-              毛利:<strong>{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</strong>;
-            </span>
+            <div style="display: inline-block;">
+              <span>共计{{ detailData&&(detailData.totalCategory || detailData.totalCategory==0) ? detailData.totalCategory : '--' }}款</span>
+              <span>{{ detailData&&(detailData.totalQty || detailData.totalQty==0) ? detailData.totalQty : '--' }}件产品,</span>
+              赠品总数量:<span class="red">{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</span>,
+              <template v-if="isCosts">
+                总成本价:<span class="red">{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</span>,
+                毛利:<span class="red">{{ detailData&&(detailData.grossProfit || detailData.grossProfit==0) ? toThousands(detailData.grossProfit) : '--' }}</span>,
+              </template>
+              总售价:<span class="red">{{ detailData&&(detailData.totalAmount || detailData.totalAmount==0) ? toThousands(detailData.totalAmount) : '--' }}</span>;
+            </div>
+            <div class="totalPrice" style="display: inline-block;">
+              折后合计:<strong>{{ detailData&&(detailData.discountedAmount || detailData.discountedAmount==0) ? toThousands(detailData.discountedAmount) : '--' }}</strong>
+            </div>
           </div>
           <div>
-            
+            <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
+            <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
+            <a-checkbox :value="2" :checked="tbForm.indexOf('SETTLE')>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
           </div>
       </div>
         <div>
-          <a-checkbox :value="0" :checked="tbForm.indexOf('AUDIT')>=0" @change="(e)=>{tbFormChange(e,0)}" id="salesQuery-tbsh">同步审核</a-checkbox>
-          <a-checkbox :value="1" :checked="tbForm.indexOf('STOCK_OUT')>=0" @change="(e)=>{tbFormChange(e,1)}" id="salesQuery-tbck">同步出库</a-checkbox>
-          <a-checkbox :value="2" :checked="tbForm.indexOf('SETTLE')>=0" @change="(e)=>{tbFormChange(e,2)}" id="salesQuery-tbsk">同步收款</a-checkbox>
           <a-button
-            style="padding: 0 25px;"
             type="primary"
-            :disabled="spinning"
+            id="salesEdit-handleSubmit"
+            size="large"
             class="button-primary"
+            :loading="spinning"
             @click="enableFundAccount && tbForm.length == 3 ? handleSettleAcountPay(null,0) : handleSubmit({})"
-            id="productInfoList-handleSubmit">提交</a-button>
+            style="padding: 0 60px;">提交</a-button>
         </div>
       </div>
     </div>
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
     <!-- 导入产品 -->
-    <importGuideModal :openModal="openGuideModal" :params="{salesBillSn: $route.params.sn, salesBillNo:detailData?detailData.salesBillNo:''}" @close="openGuideModal=false" @ok="hanldeImprotOk" />
+    <importGuideModal 
+    :openModal="openGuideModal" 
+    :params="{salesBillSn: $route.params.sn, salesBillNo:detailData?detailData.salesBillNo:''}" 
+    @close="openGuideModal=false" 
+    @ok="hanldeImprotOk"></importGuideModal>
     <!-- 收付款弹框 -->
     <settleModal ref="settleModal" @ok="settleAcountPay" :openModal="openSettleModal" @close="openSettleModal=false"></settleModal>
     <!-- 出库明细 -->
     <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
+    <!-- 销售记录 -->
+    <product-salesRecord-modal ref="salseRecord" :openModal="openSalesRecordModal" @close="openSalesRecordModal=false" />
     <!-- 添加产品 -->
     <chooseProductModal
       ref="partQuery"
       :showModal="openChooseProduct"
+      @viewRecord="hanldSalesRecord" 
       @close="openChooseProduct=false"
       @add="insterProduct"
     ></chooseProductModal>
@@ -294,6 +300,7 @@ import chooseProductModal from './chooseProductModal.vue'
 import chooseCustomModal from './chooseCustomModal.vue'
 import importGuideModal from './importGuideModal.vue'
 import settleModal from '@/views/financialManagement/settleModal/settleModal.vue'
+import productSalesRecordModal from './productSalesRecordModal.vue'
 import { stockByProductSn } from '@/api/stock'
 import { queryByCustomerSn } from '@/api/shelf'
 import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
@@ -304,7 +311,7 @@ import PrintPanel from '@/views/common/printPanel.vue'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
   name: 'SalesEdit',
-  components: { STable, VSelect, chooseProductModal, chooseCustomModal, PrintPanel, importGuideModal, settleModal, outInDetialModal, chooseShelfProduct },
+  components: { STable, VSelect, chooseProductModal, chooseCustomModal, PrintPanel, importGuideModal, settleModal, outInDetialModal, chooseShelfProduct, productSalesRecordModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -321,6 +328,7 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       isInster: false, // 是否正在添加产品
       openModal: false, // 客户弹框
+      openSalesRecordModal: false, // 销售记录
       openGuideModal: false, // 导入产品弹框
       openSettleModal: false, // 打开收款弹框
       enableFundAccount: false, // 是否开启资金账户管理
@@ -342,7 +350,7 @@ export default {
         this.disabled = true
         this.spinning = true
         this.productForm.salesBillSn = this.$route.params.sn
-        
+        console.log(111)
         return salesDetailList(Object.assign(parameter, this.productForm)).then(res => {
           let data
           if (res.status == 200) {
@@ -389,7 +397,7 @@ export default {
         { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '售价小计', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后小计', dataIndex: 'discountedAmount', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       // 下级创建,不显示仓库仓位
       if (!this.isOwerEdit) {
@@ -424,7 +432,7 @@ export default {
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
       const _this = this
-      _this.spinning = true
+      _this.$store.state.app.printLoading = true
       let url = salesDetailPrint
       const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
       if (type == 'export') { //  导出
@@ -432,7 +440,8 @@ export default {
       }
       // 打印或导出
       hdPrint(printerType, type, url, params, '销售单', function () {
-        _this.spinning = false
+        _this.$store.state.app.printLoading = false
+        _this.$refs.printBox.hovered = false
       })
     },
     tbFormChange (e, val) {
@@ -451,6 +460,12 @@ export default {
       this.openModal = true
       this.$refs.custModal.editCust(this.detailData)
     },
+    // 查看销售记录
+    hanldSalesRecord(row){
+      console.log(row)
+      this.openSalesRecordModal = true
+      this.$refs.salseRecord.getDetail(this.detailData.buyerSn, row.productSn, row)
+    },
     // 更新产品列表
     updateData (priceType) {
       // 价格类型变更
@@ -556,7 +571,9 @@ export default {
         oosFlag:undefined,
         orderBy: 'sales_bill_detail.CREATE_DATE desc'
       }
-      this.$refs.table.refresh()
+      this.$nextTick(()=>{
+        this.$refs.table.refresh()
+      })
     },
     //  返回
     handleBack () {
@@ -710,7 +727,7 @@ export default {
         stockSn: row.stockSn
       }).then(res => {
         if (res.status == 200) {
-          this.resetForm()
+          this.getOrderDetail(true)
           if (this.showShelfModal) {
             this.$refs.chooseShelfProduct.reload()
           }
@@ -747,7 +764,7 @@ export default {
       this.$message.loading('正在批量添加产品...', 1)
       salesDetailInsertBatch(params).then(res => {
         if (res.status == 200) {
-          this.resetForm()
+          this.getOrderDetail(true)
           if (this.showShelfModal) {
             this.$refs.chooseShelfProduct.reload()
           }
@@ -756,12 +773,12 @@ export default {
     },
     //  销售单详情
     getOrderDetail (flag,resetTable) {
-      this.spinning = true
-      salesDetail({ id: this.$route.params.id }).then(res => {
+      const vm = this
+      vm.spinning = true
+      salesDetail({ id: vm.$route.params.id }).then(res => {
         if (res.status == 200) {
-          this.detailData = res.data
+          vm.detailData = res.data
           if (flag) {
-            const vm = this
             const buyerSn = (vm.detailData && vm.detailData.buyerSn && vm.detailData.sourceType && vm.detailData.sourceType == 'PURCHASE') ? '' : vm.detailData.buyerSn
             const priceType = vm.$route.params.priceType
             vm.$refs.partQuery.pageInit(buyerSn, priceType, vm.salesBillSn)
@@ -769,16 +786,18 @@ export default {
               vm.$nextTick(()=>{
                 vm.$refs.table.refresh(true)
               })
+            }else{
+              vm.spinning = false
             }
             // 查询关联的客户货架信息
             if (vm.detailData && vm.detailData.buyerSn) {
-              this.getShelfQueryByCustomer()
+              vm.getShelfQueryByCustomer()
             }
           }else{
             if(resetTable){
-              this.$refs.table.refresh()
+              vm.$refs.table.refresh()
             }else{
-              this.spinning = false
+              vm.spinning = false
             }
           }
         }
@@ -803,7 +822,7 @@ export default {
         if (res.status == 200) {
           this.handleBack()
           this.$message.success(res.message)
-          // this.spinning = false
+          this.spinning = false
         } else {
           this.spinning = false
         }
@@ -845,7 +864,7 @@ export default {
       })
     },
     setTableH () {
-      this.tableHeight = window.innerHeight - (this.showSearch ? 42 : 0) - 280
+      this.tableHeight = window.innerHeight - (this.showSearch ? 42 : 0) - 330
     },
     pageInit () {
       const vm = this
@@ -917,22 +936,36 @@ export default {
           color: #f5452e;
         }
       }
+      .discount-box{
+        display:flex;
+        align-items:center;
+        padding: 0 0 6px 0;
+        justify-content: flex-end;
+        width:100%;
+        strong{
+          color: #f5452e;
+        }
+      }
     }
     .total-bar{
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
       > div{
+        &:first-child{
+          span{
+            color: #666;
+          }
+          .red{
+            color: #f5452e;
+          }
+        }
         &:last-child{
           display: flex;
           align-items: center;
-          justify-content: space-between;
+          justify-content: flex-end;
           > div{
             padding: 0 10px;
           }
         }
       }
     }
-    
   }
 </style>

+ 34 - 22
src/views/salesManagement/salesQueryNew/productSalesRecordModal.vue

@@ -1,32 +1,34 @@
 <template>
-  <div v-if="isShow">
-    <a-modal
-      centered
-      class="salesRecord-modal"
-      :footer="null"
-      :maskClosable="false"
+  <a-drawer
+      placement="right"
       :title="modalTit"
-      v-drag
-      v-model="isShow"
-      @cancel="isShow=false"
-      :width="960">
+      :visible="isShow"
+      :get-container="false"
+      :wrap-style="{ position: 'absolute' }"
+      @close="isShow=false"
+      :z-index="150"
+      wrapClassName="salesRecord-modal jg-drawer-wrap"
+      width="70%">
       <div>
-        <div style="padding: 0 0 10px 0;line-height: 24px;" v-if="baseData">
-          <div>产品名称:{{ baseData.productName }}</div>
-          <div>产品编码:{{ baseData.productCode }}</div>
+        <div ref="searchBox">
+          <div style="padding: 0 0 10px 0;line-height: 24px;" v-if="baseData">
+            <div style="flex:1">产品名称:{{ baseData.productName }}</div>
+            <div style="flex:1">产品编码:{{ baseData.productCode }}</div>
+          </div>
+          <a-tabs size="small" type="card" v-model="curTab" @change="callback">
+            <a-tab-pane key="1" tab="当前客户">
+            </a-tab-pane>
+            <a-tab-pane key="2" tab="全部客户">
+            </a-tab-pane>
+          </a-tabs>
         </div>
-        <a-tabs size="small" type="card" v-model="curTab" @change="callback">
-          <a-tab-pane key="1" tab="当前客户">
-          </a-tab-pane>
-          <a-tab-pane key="2" tab="全部客户">
-          </a-tab-pane>
-        </a-tabs>
         <!-- 表格 -->
         <a-table
           class="sTable"
           ref="table"
           size="small"
           :rowKey="(record) => record.id"
+          :scroll="{ y: tableHeight }"
           :columns="columns"
           :dataSource="list"
           :loading="loading"
@@ -42,8 +44,7 @@
           @changePageSize="changePageSize"
           @changePage="changePage" />
       </div>
-    </a-modal>
-  </div>
+    </a-drawer>
 </template>
 
 <script>
@@ -74,6 +75,7 @@ export default {
     const _this = this
     return {
       isShow: this.openModal, //  是否打开弹框
+      tableHeight: 0,
       buyerSn: null,
       queryParam: {
         productSn: null
@@ -97,6 +99,12 @@ export default {
     }
   },
   methods: {
+    setTableH () {
+      this.$nextTick(() => {
+        const searchBoxH = this.$refs.searchBox.offsetHeight
+        this.tableHeight = window.innerHeight - searchBoxH - 235
+      })
+    },
     //  获取详情
     getDetail (buyerSn, productSn, row) {
       this.buyerSn = buyerSn
@@ -131,6 +139,7 @@ export default {
           this.paginationProps.pageSize = 20
           this.list = []
         }
+        this.setTableH()
       })
     },
     //  分页  一页多少条change
@@ -154,6 +163,9 @@ export default {
     openModal (newValue, oldValue) {
       this.isShow = newValue
     },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    },
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {
@@ -171,7 +183,7 @@ export default {
 
 <style lang="less">
   .salesRecord-modal{
-    .ant-modal-body {
+    .ant-drawer-body {
       padding: 10px;
     }
   }