Selaa lähdekoodia

销售下推 表格样式调整

chenrui 3 vuotta sitten
vanhempi
commit
5a9340d002

+ 8 - 8
src/views/salesManagement/waitDispatch/edit.vue

@@ -52,7 +52,7 @@
           :columns="columns"
           :data="loadData"
           :showPagination="false"
-          :scroll="{ x:650, y: 300 }"
+          :scroll="{ y: 300 }"
           :defaultLoadData="false"
           bordered>
           <!-- 产品编码 -->
@@ -128,13 +128,13 @@ export default {
       selectedRows: [],
       // 表头
       columns: [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: 120, align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '剩余待下推', dataIndex: 'surplusQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '本次下推数', scopedSlots: { customRender: 'salesNums' }, width: 100, align: 'center' },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '26%', align: 'center' },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '29%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '剩余待下推', dataIndex: 'surplusQty', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '本次下推数', scopedSlots: { customRender: 'salesNums' }, width: '11%', align: 'center' },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 16 - 16
src/views/salesManagement/waitDispatch/queryPart.vue

@@ -90,7 +90,7 @@
       :columns="columns"
       :showPagination="false"
       :data="loadData"
-      :scroll="{ x: 1340, y: 300 }"
+      :scroll="{ y: 300 }"
       :defaultLoadData="false"
       bordered>
       <!-- 取消数量 -->
@@ -102,6 +102,7 @@
             :precision="0"
             :min="0"
             :max="999999"
+            style="width: 100%;"
             placeholder="请输入" />
         </div>
         <div v-else>--</div>
@@ -169,7 +170,6 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.queryParam.salesBillSn = this.salesBillSn
-        console.log(this.salesBillSn, 'this.salesBillSn')
         return salesDetailAllList(Object.assign(parameter, this.queryParam)).then(res => {
           let data = res.data
           if (data) {
@@ -205,22 +205,22 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: 120, align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售价', dataIndex: 'price', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '可用库存', dataIndex: 'stockQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '销售数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '已取消', dataIndex: 'cancelQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '已下推', dataIndex: 'pushedQty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '剩余待下推', dataIndex: 'surplusQty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '取消数量', dataIndex: 'cancelNums', scopedSlots: { customRender: 'nums' }, width: 100, align: 'center' },
-        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: 80, align: 'center', fixed: 'right' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '12%', align: 'center' },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售价', dataIndex: 'price', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '单位', dataIndex: 'productEntity.unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '可用库存', dataIndex: 'stockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已取消', dataIndex: 'cancelQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已下推', dataIndex: 'pushedQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '剩余待下推', dataIndex: 'surplusQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '取消数量', dataIndex: 'cancelNums', scopedSlots: { customRender: 'nums' }, width: '7%', align: 'center' },
+        { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) {
-        arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(4, 0, { title: '成本价', dataIndex: 'showCost', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }

+ 2 - 2
vue.config.js

@@ -108,8 +108,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.16.188:8602/ocs-admin',
-        // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
+        // target: 'http://192.168.16.188:8602/ocs-admin',
+        target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         // target: 'http://ocs-admin.360arrow.com/ocs-admin', //  Éú²ú
         ws: false,
         changeOrigin: true,