lilei 6 miesięcy temu
rodzic
commit
c9ac9985de

+ 2 - 1
src/components/VTable/index.vue

@@ -152,6 +152,7 @@ export default {
       const _this = this
       for (let i = 0; i < columns.length; i++) {
         const item = columns[i]
+        const windowWidth = window.innerWidth
         ret.push({
           field: item.field || item.dataIndex,
           key: item.key || 'col-' + i,
@@ -168,7 +169,7 @@ export default {
             }
             return h('span', column.title)
           },
-          width: String(item.width).indexOf('%') >= 0 ? String(item.width).replace('%', '') * 12 : item.width, // 百分比转数字
+          width: String(item.width).indexOf('%') >= 0 ? Number(String(item.width).replace('%', '') * windowWidth / 100) : item.width, // 百分比转数字
           align: item.align,
           fixed: item.fixed,
           sortBy: item.sortBy || item.sorter ? '' : undefined,

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

@@ -471,11 +471,11 @@ export default {
     columns () {
       const _this = this
       let arr = [
-        { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '5%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
         { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '8%', align: 'left' },
         { title: '提交时间', slots: { title: 'customDateTitle' }, dataIndex: 'firstSubmitDate', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') }, sorter: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '出库仓库', scopedSlots: { customRender: 'warehouseBox' }, width: '6%', align: 'center', ellipsis: 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 },
         { title: '总数量', dataIndex: 'totalQty', width: '4%', align: 'center' },
         { title: '总售价', dataIndex: 'totalAmount', width: '4%', align: 'right', isShow: false, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '已下推数量', dataIndex: 'totalPushedQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -487,12 +487,12 @@ export default {
         { title: '转采购额数量', dataIndex: 'totalConvertPromoGiftsQty', width: '5%', align: 'center', isShow: false, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '转采购额金额', dataIndex: 'totalConvertPromoGiftsAmount', width: '5%', align: 'right', isShow: false, customRender: function (text) { return ((text || text == 0) ? _this.toThousands(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: '7%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '5%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '财务状态', dataIndex: 'financialStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '9%', align: 'center' }
+        { title: '最近备货时间', dataIndex: 'lastStockUpDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' }, sorter: true },
+        { title: '备货打印状态', dataIndex: 'printStatusDictValue', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       // 根据权限及勾选按固定顺序动态显示列
       if (!this.$hasPermissions('M_salesQueryList_salesPrice')) {