lilei 2 سال پیش
والد
کامیت
7f00de3369

+ 1 - 1
public/version.json

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

+ 2 - 0
src/App.vue

@@ -32,6 +32,8 @@ export default {
     }
     }
     // 在页面刷新时将store保存到sessionStorage里
     // 在页面刷新时将store保存到sessionStorage里
     window.addEventListener('beforeunload', () => {
     window.addEventListener('beforeunload', () => {
+      this.$store.state.app.isNewTab = true
+      this.$store.state.app.updateList = false
       sessionStorage.setItem('store', JSON.stringify(this.$store.state))
       sessionStorage.setItem('store', JSON.stringify(this.$store.state))
     })
     })
     // 按F5 刷新页面
     // 按F5 刷新页面

+ 3 - 0
src/components/index.less

@@ -376,6 +376,9 @@
       .baseInfo-bar{
       .baseInfo-bar{
         padding:10px 10px 0 10px;
         padding:10px 10px 0 10px;
         border-bottom:6px solid #f0f0f0;
         border-bottom:6px solid #f0f0f0;
+        .ant-descriptions-title{
+          margin-bottom: 10px;
+        }
       }
       }
       .choosed-table{
       .choosed-table{
         padding:10px;
         padding:10px;

+ 4 - 7
src/views/purchasingManagement/purchaseOrderNew/detail.vue

@@ -247,14 +247,11 @@ export default {
     .purchaseOrderDetail-cont{
     .purchaseOrderDetail-cont{
       margin-bottom: 10px;
       margin-bottom: 10px;
       .alert-message{
       .alert-message{
-         margin-bottom: 20px;
+         margin-bottom: 10px;
       }
       }
-      // .timeline-box{
-      //   margin-top: 30px;
-      //   .auxiliary-txt{
-      //     color: #808695;
-      //   }
-      // }
+     /deep/ .ant-descriptions-title{
+          margin-bottom: 10px;
+        }
     }
     }
   }
   }
 </style>
 </style>

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

@@ -560,9 +560,7 @@ export default {
     position: relative;
     position: relative;
     height: 100%;
     height: 100%;
     box-sizing: border-box;
     box-sizing: border-box;
-    .ant-descriptions-title{
-      margin-bottom: 10px;
-    }
+    
     .choosedList-cont{
     .choosedList-cont{
       position: relative;
       position: relative;
       background-color: #fff;
       background-color: #fff;

+ 1 - 1
src/views/salesManagement/salesQuery/list.vue

@@ -294,7 +294,7 @@ export default {
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总款数', dataIndex: 'totalCategory', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', align: 'center', width: '5%', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '总售价', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '折扣金额', dataIndex: 'totalAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '折扣金额', dataIndex: 'discountAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '折后总售价', dataIndex: 'discountedAmount', align: 'right', width: '5%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款方式', dataIndex: 'settleStyleSnDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },

+ 51 - 30
src/views/salesManagement/salesQueryNew/chooseShelfProduct.vue

@@ -1,53 +1,53 @@
 <template>
 <template>
-  <a-modal
-    centered
-    class="chooseShelf-modal"
-    :footer="null"
-    :maskClosable="false"
+  <a-drawer
+    :zIndex="zIndex"
     :title="mtitle"
     :title="mtitle"
-    v-model="isShow"
-    @cancel="isShow = false"
-    width="80%">
+    placement="right"
+    :visible="isShow"
+    :width="width"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="isShow = false"
+    wrapClassName="chooseShelf-modal jg-drawer-wrap"
+     >
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-tabs type="card">
       <a-tabs type="card">
         <a-tab-pane :defaultActiveKey="curTab" v-model="curTab" :key="1" tab="待补货产品">
         <a-tab-pane :defaultActiveKey="curTab" v-model="curTab" :key="1" tab="待补货产品">
           <!-- 搜索条件 -->
           <!-- 搜索条件 -->
-          <div class="table-page-search-wrapper">
+          <div ref="searchBox" class="table-page-search-wrapper">
             <a-form-model
             <a-form-model
               ref="ruleForm"
               ref="ruleForm"
               class="form-model-con"
               class="form-model-con"
               layout="inline"
               layout="inline"
               :model="queryParam"
               :model="queryParam"
               @keyup.enter.native="$refs.table.refresh(true)" >
               @keyup.enter.native="$refs.table.refresh(true)" >
-              <a-row :gutter="15">
-                <a-col :md="4" :sm="24">
+              <a-row type="flex" :gutter="5">
+                <a-col flex="250px">
                   <a-form-model-item label="产品编码">
                   <a-form-model-item label="产品编码">
                     <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
                     <a-input id="chooseShelf-code" ref="searchProductCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
                   </a-form-model-item>
                   </a-form-model-item>
                 </a-col>
                 </a-col>
-                <a-col :md="4" :sm="24">
+                <a-col flex="250px">
                   <a-form-model-item label="产品名称">
                   <a-form-model-item label="产品名称">
                     <a-input id="chooseShelf-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                     <a-input id="chooseShelf-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
                   </a-form-model-item>
                   </a-form-model-item>
                 </a-col>
                 </a-col>
-                <a-col :md="6" :sm="24">
+                <a-col flex="250px">
                   <a-form-model-item label="产品分类">
                   <a-form-model-item label="产品分类">
                     <ProductType id="chooseShelf-productType" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                     <ProductType id="chooseShelf-productType" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
                   </a-form-model-item>
                   </a-form-model-item>
                 </a-col>
                 </a-col>
-                <a-col :md="6" :sm="24">
+                <a-col flex="370px">
                   <a-form-model-item label="库存情况">
                   <a-form-model-item label="库存情况">
-                    <a-checkbox-group v-model.trim="queryParam.stockStateList" :options="options" />
+                    <a-select v-model.trim="queryParam.stockStateList" mode="multiple" :options="options" placeholder="请选择库存情况" />
                   </a-form-model-item>
                   </a-form-model-item>
                 </a-col>
                 </a-col>
-                <a-col :md="4" :sm="12" style="margin-bottom: 10px;">
+                <a-col flex="auto" style="margin-bottom: 10px;">
                   <a-button type="primary" @click="$refs.table.refresh(true)" id="chooseShelf-refresh">查询</a-button>
                   <a-button type="primary" @click="$refs.table.refresh(true)" id="chooseShelf-refresh">查询</a-button>
                   <a-button style="margin-left: 5px" @click="resetSearchForm" id="chooseShelf-reset">重置</a-button>
                   <a-button style="margin-left: 5px" @click="resetSearchForm" id="chooseShelf-reset">重置</a-button>
                 </a-col>
                 </a-col>
               </a-row>
               </a-row>
             </a-form-model>
             </a-form-model>
-          </div>
-          <div class="chooseShelf-modal-table">
             <div class="table-operator">
             <div class="table-operator">
               <div>
               <div>
                 <a-button type="primary" @click="handlePlAdd">批量添加</a-button>
                 <a-button type="primary" @click="handlePlAdd">批量添加</a-button>
@@ -58,6 +58,8 @@
                 此界面仅显示货架上需要补货的产品
                 此界面仅显示货架上需要补货的产品
               </div>
               </div>
             </div>
             </div>
+          </div>
+          <div class="chooseShelf-modal-table">
             <!-- 列表 -->
             <!-- 列表 -->
             <s-table
             <s-table
               class="sTable"
               class="sTable"
@@ -68,8 +70,7 @@
               @rowSelection="rowSelectionFun"
               @rowSelection="rowSelectionFun"
               :columns="columns"
               :columns="columns"
               :data="loadData"
               :data="loadData"
-              :style="{ height: '500px' }"
-              :scroll="{ y: 450 }"
+              :scroll="{ y: tableHeight }"
               :showPagination="false"
               :showPagination="false"
               bordered>
               bordered>
               <!-- 售价 -->
               <!-- 售价 -->
@@ -123,7 +124,7 @@
         </a-tab-pane>
         </a-tab-pane>
         <a-tab-pane :key="2" tab="全部货架产品">
         <a-tab-pane :key="2" tab="全部货架产品">
           <!-- 搜索条件 -->
           <!-- 搜索条件 -->
-          <div class="table-page-search-wrapper">
+          <div ref="searchBox1" class="table-page-search-wrapper">
             <a-form-model
             <a-form-model
               ref="ruleForm1"
               ref="ruleForm1"
               class="form-model-con"
               class="form-model-con"
@@ -162,8 +163,7 @@
               :rowKey="(record) => record.id"
               :rowKey="(record) => record.id"
               :columns="columns1"
               :columns="columns1"
               :data="loadData1"
               :data="loadData1"
-              :style="{ height: '500px' }"
-              :scroll="{ y: 450 }"
+              :scroll="{ y: tableHeight }"
               :showPagination="false"
               :showPagination="false"
               bordered>
               bordered>
             </s-table>
             </s-table>
@@ -173,7 +173,7 @@
     </a-spin>
     </a-spin>
     <!-- 销售记录 -->
     <!-- 销售记录 -->
     <product-salesRecord-modal ref="salseRecord" :openModal="showRecord" @close="showRecord=false" />
     <product-salesRecord-modal ref="salseRecord" :openModal="showRecord" @close="showRecord=false" />
-  </a-modal>
+  </a-drawer>
 </template>
 </template>
 
 
 <script>
 <script>
@@ -197,7 +197,15 @@ export default {
       default: function () {
       default: function () {
         return null
         return null
       }
       }
-    }
+    },
+    width: {
+      type: [String, Number],
+      default: '80%'
+    },
+    zIndex: {
+      type: Number,
+      default: 100
+    },
   },
   },
   data () {
   data () {
     return {
     return {
@@ -211,6 +219,7 @@ export default {
         { label: '全部缺货', value: 'allStockout' }
         { label: '全部缺货', value: 'allStockout' }
       ],
       ],
       curTab: 1,
       curTab: 1,
+      tableHeight:0,
       productType: [],
       productType: [],
       queryParam: {
       queryParam: {
         productCode: '', //  产品编码
         productCode: '', //  产品编码
@@ -271,6 +280,7 @@ export default {
             }
             }
           }
           }
           this.spinning = false
           this.spinning = false
+          this.setTableH()
           return data
           return data
         })
         })
       }
       }
@@ -391,9 +401,19 @@ export default {
       this.productType1 = []
       this.productType1 = []
       this.$refs.ruleForm1.resetFields()
       this.$refs.ruleForm1.resetFields()
       this.$refs.table1.refresh(true)
       this.$refs.table1.refresh(true)
+    },
+    setTableH () {
+      this.$nextTick(() => {
+        const searchBoxH = this.$refs.searchBox.offsetHeight
+        const searchBoxH1 = this.$refs.searchBox1.offsetHeight
+        this.tableHeight = window.innerHeight - (this.curTab == 1 ? searchBoxH : searchBoxH1) - 215
+      })
     }
     }
   },
   },
   watch: {
   watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    },
     //  父页面传过来的弹框状态
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
     openModal (newValue, oldValue) {
       this.isShow = newValue
       this.isShow = newValue
@@ -405,6 +425,7 @@ export default {
       } else {
       } else {
         this.$nextTick(() => {
         this.$nextTick(() => {
           this.curTab = 1
           this.curTab = 1
+          this.setTableH()
         })
         })
       }
       }
     }
     }
@@ -414,16 +435,16 @@ export default {
 
 
 <style lang="less">
 <style lang="less">
 .chooseShelf-modal {
 .chooseShelf-modal {
-	.ant-modal-body {
-		padding: 0;
-    .chooseShelf-modal-table{
-      padding: 0 20px 10px;
-      .table-operator{
+	.ant-drawer-body {
+		padding: 5px;
+    .table-operator{
         padding:0 10px 10px 0;
         padding:0 10px 10px 0;
         display:flex;
         display:flex;
         justify-content: space-between;
         justify-content: space-between;
         align-items: center;
         align-items: center;
       }
       }
+    .chooseShelf-modal-table{
+      padding: 0 20px 10px;
     }
     }
     .table-page-search-wrapper{
     .table-page-search-wrapper{
       padding: 5px 20px 0;
       padding: 5px 20px 0;

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

@@ -20,6 +20,7 @@
           </div>
           </div>
         </template>
         </template>
       </a-page-header>
       </a-page-header>
+    <div class="sales-detail-body">
       <!-- 基础信息 -->
       <!-- 基础信息 -->
       <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
       <a-card size="small" :bordered="false" class="salesDetail-cont" v-show="isShowBisiceInfo">
         <a-descriptions size="small" :column="3">
         <a-descriptions size="small" :column="3">
@@ -112,10 +113,11 @@
             <span v-else>--</span>
             <span v-else>--</span>
           </template>
           </template>
         </s-table>
         </s-table>
-        <!-- 出入库明细 -->
-        <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
       </a-card>
       </a-card>
+    </div>
     </a-spin>
     </a-spin>
+     <!-- 出入库明细 -->
+     <outInDetialModal ref="outInDetialModal" outBizType="SALES" :openModal="showOutInModal" @close="showOutInModal=false"></outInDetialModal>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -125,8 +127,7 @@ import { getOperationalPrecision } from '@/libs/tools.js'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
 import { salesDetailBySn, salesDetailPrint, salesDetailExport } from '@/api/sales'
 import { salesDetailList } from '@/api/salesDetail'
 import { salesDetailList } from '@/api/salesDetail'
-import outInDetialModal from '@/views/common/outInDetialModal.vue'
-// import Print from '@/views/common/print.vue'
+import outInDetialModal from './outInDetialModal.vue'
 import PrintPanel from '@/views/common/printPanel.vue'
 import PrintPanel from '@/views/common/printPanel.vue'
 import { hdPrint } from '@/libs/JGPrint'
 import { hdPrint } from '@/libs/JGPrint'
 export default {
 export default {
@@ -230,7 +231,7 @@ export default {
     // 打印预览/快捷打印
     // 打印预览/快捷打印
     handlePrint (type, printerType) {
     handlePrint (type, printerType) {
       const _this = this
       const _this = this
-      _this.spinning = true
+      _this.$store.state.app.printLoading = true
       let url = salesDetailPrint
       let url = salesDetailPrint
       const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
       const params = { sn: this.outBizSn || this.$route.params.sn, printOrgCode: this.printOrgCode ? 1 : 0, printAllName: this.printAllName ? 1 : 0 }
       if (type == 'export') { //  导出
       if (type == 'export') { //  导出
@@ -238,7 +239,7 @@ export default {
       }
       }
       // 打印或导出
       // 打印或导出
       hdPrint(printerType, type, url, params, '销售单', function () {
       hdPrint(printerType, type, url, params, '销售单', function () {
-        _this.spinning = false
+        _this.$store.state.app.printLoading = false
       })
       })
     },
     },
     //  返回
     //  返回
@@ -305,6 +306,8 @@ export default {
 
 
 <style lang="less" scoped>
 <style lang="less" scoped>
   .salesDetail-wrap{
   .salesDetail-wrap{
+    position: relative;
+    height: 100%;
     .billno{
     .billno{
       font-size: 16px;
       font-size: 16px;
       font-weight: 600;
       font-weight: 600;
@@ -318,11 +321,15 @@ export default {
     }
     }
     .salesDetail-cont{
     .salesDetail-cont{
       margin-bottom: 10px;
       margin-bottom: 10px;
+      /deep/ .ant-descriptions-title{
+          margin-bottom: 10px;
+        }
     }
     }
     .pages-wrap{
     .pages-wrap{
         strong{
         strong{
           color:#f12929;
           color:#f12929;
         }
         }
     }
     }
+    
   }
   }
 </style>
 </style>

+ 3 - 3
src/views/salesManagement/salesQueryNew/edit.vue

@@ -227,8 +227,8 @@
         <div v-if="detailData" class="total-bar">
         <div v-if="detailData" class="total-bar">
           <div>
           <div>
             <div style="display: inline-block;">
             <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>共计 {{ 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>,
               赠品总数量:<span class="red">{{ detailData&&(detailData.giftQty || detailData.giftQty==0) ? detailData.giftQty : '--' }}</span>,
               <template v-if="isCosts">
               <template v-if="isCosts">
                 总成本价:<span class="red">{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</span>,
                 总成本价:<span class="red">{{ detailData&&(detailData.totalCost || detailData.totalCost==0) ? toThousands(detailData.totalCost) : '--' }}</span>,
@@ -305,7 +305,7 @@ import { stockByProductSn } from '@/api/stock'
 import { queryByCustomerSn } from '@/api/shelf'
 import { queryByCustomerSn } from '@/api/shelf'
 import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
 import { salesDetail, salesWriteSubmit, salesWriteDiscount, salesDetailPrint, salesDetailExport, salesDel } from '@/api/sales'
 import { salesDetailList, salesDetailInsert, salesDetailInsertBatch, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll, salesDetailInsertImport } from '@/api/salesDetail'
 import { salesDetailList, salesDetailInsert, salesDetailInsertBatch, salesDetailUpdatePrice, salesDetailUpdateQty, salesDetailDel, salesDetailDelAll, salesDetailInsertImport } from '@/api/salesDetail'
-import outInDetialModal from '@/views/common/outInDetialModal.vue'
+import outInDetialModal from './outInDetialModal.vue'
 import chooseShelfProduct from './chooseShelfProduct.vue'
 import chooseShelfProduct from './chooseShelfProduct.vue'
 import PrintPanel from '@/views/common/printPanel.vue'
 import PrintPanel from '@/views/common/printPanel.vue'
 import { hdPrint } from '@/libs/JGPrint'
 import { hdPrint } from '@/libs/JGPrint'

+ 3 - 6
src/views/salesManagement/salesQueryNew/list.vue

@@ -456,7 +456,7 @@ export default {
         }
         }
       })
       })
     },
     },
-    searchForm () {
+    searchForm (flag) {
       if (!this.isByCustQuery) {
       if (!this.isByCustQuery) {
         const a = moment(this.queryParam.beginDate)
         const a = moment(this.queryParam.beginDate)
         const b = moment(this.queryParam.endDate)
         const b = moment(this.queryParam.endDate)
@@ -464,10 +464,10 @@ export default {
           this.$message.info('最多只能选择2年的时间区间')
           this.$message.info('最多只能选择2年的时间区间')
           return false
           return false
         }
         }
-        this.$refs.table.refresh(true)
+        this.$refs.table.refresh(!flag)
       } else {
       } else {
         if (this.queryParam.buyerSn) {
         if (this.queryParam.buyerSn) {
-          this.$refs.table.refresh(true)
+          this.$refs.table.refresh(!flag)
         } else {
         } else {
           this.$message.info('请选择客户')
           this.$message.info('请选择客户')
           return false
           return false
@@ -571,9 +571,6 @@ export default {
         if (a && !b) {
         if (a && !b) {
           this.resetSearchForm()
           this.resetSearchForm()
         }
         }
-        if (!a && !b) {
-          this.resetSearchForm()
-        }
       }
       }
       // 仅刷新列表,不重置页面
       // 仅刷新列表,不重置页面
       if (b || a == b) {
       if (b || a == b) {

+ 173 - 0
src/views/salesManagement/salesQueryNew/outInDetialModal.vue

@@ -0,0 +1,173 @@
+<template>
+    <a-drawer
+    :zIndex="1010"
+    title="出库明细"
+    placement="right"
+    :visible="isShow"
+    width="80%"
+    :get-container="false"
+    :wrap-style="{ position: 'absolute' }"
+    @close="isShow = false"
+    wrapClassName="outIndetail-modal jg-drawer-wrap"
+     >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="baseInfo" ref="searchBox" v-if="baseData">
+        <div>
+          <span>产品编码:{{ baseData.dealerProductEntity ? baseData.dealerProductEntity.code : baseData.productCode }}</span>
+        </div>
+        <div>
+          <span>产品名称:{{ baseData.dealerProductEntity ? baseData.dealerProductEntity.name : baseData.productName }}</span>
+        </div>
+      </div>
+      <div class="outIndetail-modal-table">
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          :showPagination="false"
+          bordered>
+        </s-table>
+      </div>
+    </a-spin>
+  </a-drawer>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable } from '@/components'
+import { stockOutDetailList } from '@/api/stockOut'
+export default {
+  name: 'OutinDetailModal',
+  components: { STable },
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    outBizType: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      tableHeight: 0,
+      baseData: null,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        // outBizType = SHOP_CALL_OUT(店内调出)   /  SALES (销售)
+        const params = this.baseData
+        console.log(params)
+        const queryParams = { outBizType: this.outBizType, productSn: params.productSn }
+        if (this.outBizType == 'SALES') {
+          queryParams.outBizSn = params.salesBillSn
+          queryParams.outBizNo = params.salesBillNo
+        }
+        if (this.outBizType == 'SHOP_CALL_OUT') {
+          queryParams.outBizSn = params.storeCallOutSn
+          queryParams.outBizNo = params.storeCallOutNo
+        }
+        // 仓库仓位
+        queryParams.warehouseSn = params.warehouseSn
+        queryParams.warehouseLocationSn = params.warehouseLocationSn
+        return stockOutDetailList(queryParams).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              data[i].totalCost = Number(data[i].putCost * data[i].outQty).toFixed(2)
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '库存批次', dataIndex: 'stockBatchNo', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入库类型', dataIndex: 'putBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '仓位', dataIndex: 'warehouseLocationName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次出库数量', dataIndex: 'outQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        // { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+      ]
+      if (this.$hasPermissions('M_ShowAllCost')) {
+        arr.splice(5, 0, { title: '成本价', dataIndex: 'putCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') } })
+        arr.splice(7, 0, { title: '成本小计', dataIndex: 'totalCost', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ?  _this.toThousands(text) : '--') } })
+      }
+      return arr
+    }
+  },
+  methods: {
+    setTableH () {
+      this.$nextTick(() => {
+        const searchBoxH = this.$refs.searchBox.offsetHeight
+        this.tableHeight = window.innerHeight - searchBoxH - 235
+      })
+    },
+    cansel () {
+      this.isShow = false
+      this.baseData = null
+    },
+    getData (row) {
+      this.baseData = row
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }else{
+        this.setTableH()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+.outIndetail-modal {
+	.ant-drawer-body {
+		padding: 10px 20px;
+    .outIndetail-modal-table{
+      padding: 20px 0 0;
+    }
+    .baseInfo{
+      line-height: 24px;
+      font-size: 14px;
+    }
+	}
+}
+</style>