Browse Source

bug 修复

lilei 2 years ago
parent
commit
c3851ec5c6
1 changed files with 16 additions and 16 deletions
  1. 16 16
      src/views/financialManagement/financialCollection/dispatchModal.vue

+ 16 - 16
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -9,7 +9,7 @@
     width="50%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div v-if="detailData">
-        <a-descriptions :column="{ xs: 2, sm: 3, md: 3}">
+        <a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
           <a-descriptions-item label="收款单号">{{ detailData&&detailData.bookNo || '--' }}</a-descriptions-item>
           <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
@@ -38,7 +38,7 @@
           <span v-else>{{ record.dispatchBillNo }}</span>
         </template>
       </s-table>
-      <div class="btn-box">
+      <div class="btn-box" style="text-align:center;padding-top:20px;">
         <a-button @click="handleCommonCancel">关闭</a-button>
       </div>
     </a-spin>
@@ -67,16 +67,16 @@ export default {
       isShow: this.openModal,
       detailData: null,
       columns: [
-        { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '120px', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '120px', align: 'center' },
-        { title: '发货编号', dataIndex: 'sendNo', width: '80px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '150px', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'totalCategory', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品数量', dataIndex: 'totalQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '13%', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '13%', align: 'center' },
+        { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -87,11 +87,11 @@ export default {
           let data
           if (res.status == 200) {
             data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
             }
-            this.total = data.count || 0
+            this.total = data.length
             this.disabled = false
           }
           this.spinning = false