lilei 6 tháng trước cách đây
mục cha
commit
74b243c692

+ 42 - 23
src/components/VTable/index.vue

@@ -22,22 +22,23 @@
         :event-custom-option="eventCustomOption"
       />
       <div v-show="localDataSource.length==0" :style="{height:(showPagination?scroll.y-35:scroll.y)+'px',position:!showPagination?'absolute':'relative',top:!showPagination?0:''}" class="empty-data"><a-empty description="暂无数据" :image="simpleImage"/></div>
-      <div class="ve-pagination" :class="'ve-pagination-align-'+pageAlign">
-        <div class="ve-page-left" v-if="pageAlign=='right'"><slot name="page"></slot></div>
-        <a-pagination
-          v-show="showPagination&&localPagination.total"
-          size="small"
-          :total="localPagination.total"
-          v-model="localPagination.current"
-          :pageSize="localPagination.pageSize"
-          :showTotal="total => `共 ${total} 条记录`"
-          :pageSizeOptions="localPagination.pageSizeOptions"
-          :show-quick-jumper="localPagination.showQuickJumper"
-          @change="paginationChange"
-          show-size-changer
-          @showSizeChange="paginationShowSizeChange"
-        />
-        <div class="ve-page-right" v-if="pageAlign=='left'"><slot name="page"></slot></div>
+      <div class="v-pagination" :class="'v-pagination-align-'+pageAlign">
+        <div class="v-page-left" v-if="pageAlign=='right'"><slot name="page"></slot></div>
+        <div class="v-page-no" v-if="showPagination&&localPagination.total">
+          <a-pagination
+            size="small"
+            :total="localPagination.total"
+            v-model="localPagination.current"
+            :pageSize="localPagination.pageSize"
+            :showTotal="total => `共 ${total} 条记录`"
+            :pageSizeOptions="localPagination.pageSizeOptions"
+            :show-quick-jumper="localPagination.showQuickJumper"
+            @change="paginationChange"
+            show-size-changer
+            @showSizeChange="paginationShowSizeChange"
+          />
+        </div>
+        <div class="v-page-right" v-if="pageAlign=='left'"><slot name="page"></slot></div>
       </div>
     </a-spin>
   </div>
@@ -56,7 +57,12 @@ export default {
     // load data function
     data: {
       type: Function,
-      required: true
+      required: false
+    },
+    // 数据
+    dataSource: {
+      type: Array,
+      default: () => []
     },
     // 默认是否加载表格数据
     defaultLoadData: {
@@ -182,9 +188,20 @@ export default {
     }
   },
   created () {
-    if (this.defaultLoadData) {
+    if (this.defaultLoadData && this.data) {
       this.loadData()
     }
+    if (!this.data) {
+      this.localDataSource = this.dataSource
+    }
+  },
+  watch: {
+    dataSource: {
+      handler () {
+        this.localDataSource = this.dataSource
+      },
+      deep: true
+    }
   },
   methods: {
     // 选择单元格
@@ -429,20 +446,22 @@ export default {
         flex-direction: column;
         justify-content: center;
     }
-    .ve-pagination{
+    .v-pagination{
       display:flex;
       align-items: center;
-      padding: 20px 0 10px 0;
     }
-    .ve-pagination-align-right{
+    .v-pagination-align-right{
       justify-content: space-between;
     }
-    .ve-pagination-align-left{
+    .v-pagination-align-left{
       justify-content: space-between;
     }
-    .ve-pagination-align-center{
+    .v-pagination-align-center{
       justify-content: center;
     }
+    .v-page-no{
+      padding: 10px 0;
+    }
     /deep/ .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-body-tr td.ve-table-body-td,
     .ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content tbody.ve-table-body tr.ve-table-expand-tr td.ve-table-body-td{
       div:empty::before {

+ 5 - 2
src/views/financialManagement/financialCollection/detail.vue

@@ -1,10 +1,10 @@
 <template>
   <div class="financialCollectionDetailwrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="financialCollectionAddcont" v-if="!bookSn" >
+      <a-page-header :ghost="false" :backIcon="false" class="financialCollectionAddcont">
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
-          <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack(0)"><a-icon type="left" /> 返回列表</a>
+          <a id="purchaseOrderEdit-back-btn" href="javascript:;" v-if="!bookSn" @click="handleBack(0)"><a-icon type="left" /> 返回列表</a>
           <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.bookNo || '--' }}</span>
           <span style="margin: 0 10px;color: #666;">申请人:{{ detailData&&detailData.applyPersonName }}</span>
           <a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
@@ -172,6 +172,9 @@ export default {
   },
   methods: {
     setTableH () {
+      if (this.bookSn) {
+        return 300
+      }
       const tableSearchH = this.showDetail ? this.$refs.tableSearch.offsetHeight : 0
       this.tableHeight = window.innerHeight - tableSearchH - 240
     },

+ 15 - 17
src/views/salesManagement/salesCollection/detailModal.vue

@@ -16,7 +16,7 @@
           <a-button type="primary" class="button-primary" @click="handleCommonOk">{{ okText }}</a-button>
         </div>
         <div>
-          <a-table :columns="columns" :scroll="{ y: 400 }" :pagination="false" :data-source="chooseData" bordered>
+          <v-table :columns="columns" :scroll="{ y: 300 }" :showPagination="false" :data-source="chooseData" bordered>
             <!-- 收款单号 -->
             <template slot="bookNo" slot-scope="text, record">
               <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="viewDetail(record)">{{ record.bookNo }}</span>
@@ -33,7 +33,7 @@
                 删除
               </a-button>
             </template>
-          </a-table>
+          </v-table>
         </div>
       </div>
       <a-divider>请选择收款单</a-divider>
@@ -42,6 +42,11 @@
         <div ref="tableSearch" class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="申请时间">
+                  <rangeDate ref="rangeApply" :value="applyDate" @change="dateApplyChange" />
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款单号">
                   <a-input v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
@@ -57,11 +62,6 @@
                   <employee style="width: 100%;" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="申请时间">
-                  <rangeDate ref="rangeApply" :value="applyDate" @change="dateApplyChange" />
-                </a-form-item>
-              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="付款方">
                   <a-input id="financialCollectionList-payerName" v-model.trim="queryParam.payerName" allowClear placeholder="请输入付款方"/>
@@ -78,15 +78,13 @@
           </a-form>
         </div>
         <!-- 表格数据 -->
-        <s-table
+        <v-table
           class="sTable"
           ref="table"
           size="small"
-          :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
-          :scroll="{ y: 400 }"
-          :pageSize="10"
+          :scroll="{ y: 300 }"
           bordered>
           <!-- 收款单号 -->
           <template slot="bookNo" slot-scope="text, record">
@@ -104,7 +102,7 @@
             >选择</a-button>
             <span style="color:green;" v-else>已选</span>
           </template>
-        </s-table>
+        </v-table>
       </div>
     </a-spin>
     <!-- 查看财务收款详情 -->
@@ -122,7 +120,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
+import { VTable, VSelect } from '@/components'
 import { financeBookQueryPage } from '@/api/financeBook.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import commonModal from '@/views/common/commonModal.vue'
@@ -132,7 +130,7 @@ import { settleReceiptBookBatch } from '@/api/settleReceipt'
 export default {
   name: 'GlDetailModal',
   mixins: [commonMixin],
-  components: { STable, VSelect, employee, commonModal, detailModal, rangeDate },
+  components: { VTable, VSelect, employee, commonModal, detailModal, rangeDate },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -174,9 +172,9 @@ export default {
       },
       chooseData: [], // 已选数据
       columns: [
-        { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
-        { title: '申请人', dataIndex: 'applyPersonName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '9%', align: 'center' },
+        { title: '申请人', dataIndex: 'applyPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '财务收款事由', dataIndex: 'bookReason', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '付款方', dataIndex: 'payerName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },

+ 14 - 8
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -67,13 +67,19 @@
           </a-descriptions>
         </div>
         <div v-if="detail.keepType == 'RELATION_BOOK'">
-          <a-table class="sTable" :columns="columns" :pagination="false" :data-source="tableData" bordered>
+          <v-table
+            class="sTable"
+            :columns="columns"
+            :scroll="{ y: 300 }"
+            :showPagination="false"
+            :data-source="tableData"
+            bordered>
             <!-- 收款单号 -->
             <template slot="bookNo" slot-scope="text, record">
               <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="viewDetail(record)">{{ record.bookNo }}</span>
               <span v-else>{{ record.bookNo }}</span>
             </template>
-          </a-table>
+          </v-table>
         </div>
       </div>
       <div class="btn-box">
@@ -108,7 +114,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
+import { VTable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import printModel from '../receiptPrint/printModel.vue'
 import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
@@ -118,7 +124,7 @@ import { getProcessInstance } from '@/api/expenseManagement'
 export default {
   name: 'VoucherModal',
   mixins: [commonMixin],
-  components: { STable, VSelect, commonModal, printModel, detailModal, collectDetailModal },
+  components: { VTable, VSelect, commonModal, printModel, detailModal, collectDetailModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -146,17 +152,17 @@ export default {
       spinning: false,
       detail: null, // 单据详情数据
       columns: [
-        { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '10%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '财务收款事由', dataIndex: 'bookReason', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '财务收款事由', dataIndex: 'bookReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '授信还款总金额', dataIndex: 'payTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '余款抵扣总金额', dataIndex: 'balanceTotalAmount', width: '8%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '审核时间', dataIndex: 'auditDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '审核时间', dataIndex: 'auditDate', width: '11%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'statusDictValue', width: '7%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       tableData: [], // 列表数据
       associatedLoading: false, // 关联收款单 按钮 loading

+ 1 - 1
src/views/salesManagement/salesQueryNew/comps/productNormalList.vue

@@ -330,7 +330,7 @@ export default {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '40px', align: 'center' },
         { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '150px', align: 'left' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', ellipsis: true },
+        { title: '产品名称', dataIndex: 'productEntity.name', align: 'left', width: '200px', ellipsis: true },
         { title: '销售数量', scopedSlots: { customRender: 'salesNums' }, width: '100px', align: 'center' },
         { title: '库存', dataIndex: 'stockQty', scopedSlots: { customRender: 'stockQty' }, width: '100px', align: 'center' },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '150px', align: 'center' },

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

@@ -508,7 +508,7 @@ export default {
       let arr = [
         { title: '序号', dataIndex: 'no', width: '3%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return formatDate(text) }, sorter: true },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '8%', align: 'left' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '10%', align: 'left' },
         { title: '提交时间', slots: { title: 'customDateTitle' }, dataIndex: 'firstSubmitDate', width: '6%', align: 'center', customRender: function (text) { return formatDate(text) }, sorter: true },
         { title: '客户名称', dataIndex: 'buyerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '5%', align: 'center', ellipsis: true },