lilei 4 vuotta sitten
vanhempi
commit
1b38d7a5d6

+ 5 - 1
src/views/financialManagement/expenseManagement/list.vue

@@ -219,7 +219,11 @@ export default {
     },
     },
     //  新增/编辑
     //  新增/编辑
     handleEdit (row) {
     handleEdit (row) {
-      this.$router.push({ name: 'expenseManagementEdit', params: { id: row.id } })
+      if (row) {
+        this.$router.push({ name: 'expenseManagementEdit', params: { id: row.id } })
+      } else {
+        this.$router.push({ name: 'expenseManagementAdd' })
+      }
     },
     },
     //  提交
     //  提交
     handleSubmit (row) {
     handleSubmit (row) {

+ 14 - 15
src/views/inventoryManagement/warehouse/storingLocation/list.vue

@@ -1,12 +1,12 @@
 <template>
 <template>
   <div class="storingLocationList-wrap">
   <div class="storingLocationList-wrap">
-    <a-page-header :ghost="false" :backIcon="false" class="storingLocationList-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="storingLocationList-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-      </template>
-    </a-page-header>
     <a-card size="small" :bordered="false" class="storingLocationList-cont">
     <a-card size="small" :bordered="false" class="storingLocationList-cont">
+      <!-- 操作按钮 -->
+      <div class="table-operator" style="display: flex;justify-content: space-between;border:0">
+        <a id="storingLocationList-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+        <strong style="display: block;">所属仓库:{{ $route.query.name }}</strong>
+        <a-button v-if="$hasPermissions('B_inventory_warehouse_storingLocation_add')" id="storingLocationList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
+      </div>
       <!-- 搜索条件 -->
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
       <div class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
@@ -23,11 +23,6 @@
           </a-row>
           </a-row>
         </a-form>
         </a-form>
       </div>
       </div>
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button v-if="$hasPermissions('B_inventory_warehouse_storingLocation_add')" id="storingLocationList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-      </div>
-      <strong style="display: block;margin: 10px 0 20px;">所属仓库:{{ $route.query.name }}</strong>
       <!-- 列表 -->
       <!-- 列表 -->
       <s-table
       <s-table
         class="sTable"
         class="sTable"
@@ -36,7 +31,7 @@
         :rowKey="(record) => record.id"
         :rowKey="(record) => record.id"
         :columns="columns"
         :columns="columns"
         :data="loadData"
         :data="loadData"
-        :scroll="{ y: 300 }"
+        :scroll="{ y: tableHeight }"
         bordered>
         bordered>
         <!-- 操作 -->
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
         <template slot="action" slot-scope="text, record">
@@ -44,14 +39,14 @@
           <a-button
           <a-button
             size="small"
             size="small"
             v-if="$hasPermissions('B_inventory_warehouse_storingLocation_edit') && record.sysFlag==0"
             v-if="$hasPermissions('B_inventory_warehouse_storingLocation_edit') && record.sysFlag==0"
-            type="primary"
+            type="link"
             class="button-info"
             class="button-info"
             @click="handleEdit(record)"
             @click="handleEdit(record)"
             id="storingLocationList-edit-btn">编辑</a-button>
             id="storingLocationList-edit-btn">编辑</a-button>
           <a-button
           <a-button
             size="small"
             size="small"
             v-if="$hasPermissions('B_inventory_warehouse_storingLocation_del') && record.sysFlag==0"
             v-if="$hasPermissions('B_inventory_warehouse_storingLocation_del') && record.sysFlag==0"
-            type="primary"
+            type="link"
             class="button-error"
             class="button-error"
             @click="handleDel(record)"
             @click="handleDel(record)"
             id="storingLocationList-del-btn">删除</a-button>
             id="storingLocationList-del-btn">删除</a-button>
@@ -71,6 +66,7 @@ export default {
   components: { STable, storingLocationEditModal },
   components: { STable, storingLocationEditModal },
   data () {
   data () {
     return {
     return {
+      tableHeight: 0,
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         warehouseSn: this.$route.params.sn, //  仓库sn
         warehouseSn: this.$route.params.sn, //  仓库sn
         name: '' //  仓位名称
         name: '' //  仓位名称
@@ -80,11 +76,14 @@ export default {
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '仓位名称', dataIndex: 'name', align: 'center', ellipsis: true },
         { title: '仓位名称', dataIndex: 'name', align: 'center', ellipsis: true },
         { title: '排序', dataIndex: 'sort', align: 'center', width: 150, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '排序', dataIndex: 'sort', align: 'center', width: 150, customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 160, align: 'center' }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
+        if (this.tableHeight == 0) {
+          this.tableHeight = window.innerHeight - 340
+        }
         return warehouseLocList(Object.assign(parameter, this.queryParam)).then(res => {
         return warehouseLocList(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           const no = (data.pageNo - 1) * data.pageSize