|
@@ -21,6 +21,14 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storingLocationList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storingLocationList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storingLocationList-reset">重置</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storingLocationList-reset">重置</a-button>
|
|
|
|
+ <a-button
|
|
|
|
+ style="margin-left: 5px"
|
|
|
|
+ type="primary"
|
|
|
|
+ class="button-warning"
|
|
|
|
+ @click="handleExport"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ :loading="exportLoading"
|
|
|
|
+ id="storingLocationList-export">导出</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
</a-form>
|
|
</a-form>
|
|
@@ -28,6 +36,10 @@
|
|
<!-- 操作按钮 -->
|
|
<!-- 操作按钮 -->
|
|
<div class="table-operator" style="border: 0;padding: 0 0 10px;">
|
|
<div class="table-operator" style="border: 0;padding: 0 0 10px;">
|
|
<a-button v-if="$hasPermissions('B_inventory_warehouse_storingLocation_add')" id="storingLocationList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
|
|
<a-button v-if="$hasPermissions('B_inventory_warehouse_storingLocation_add')" id="storingLocationList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
|
|
|
|
+ <a-button id="storingLocationList-import" type="primary" class="button-primary">导入</a-button>
|
|
|
|
+ <a-button id="storingLocationList-plprint">批量打印</a-button>
|
|
|
|
+ <a-button id="storingLocationList-pldel" type="primary" ghost class="button-error">批量删除</a-button>
|
|
|
|
+ <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
<s-table
|
|
<s-table
|
|
@@ -35,6 +47,8 @@
|
|
ref="table"
|
|
ref="table"
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
size="small"
|
|
size="small"
|
|
|
|
+ @rowSelection="rowSelectionFun"
|
|
|
|
+ :row-selection="{ columnWidth: 40 }"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
@@ -59,6 +73,11 @@
|
|
@click="handleDel(record)"
|
|
@click="handleDel(record)"
|
|
:id="'storingLocationList-id-'+record.id">删除</a-button>
|
|
:id="'storingLocationList-id-'+record.id">删除</a-button>
|
|
<span v-if="!$hasPermissions('B_inventory_warehouse_storingLocation_edit') && !$hasPermissions('B_inventory_warehouse_storingLocation_del')">--</span>
|
|
<span v-if="!$hasPermissions('B_inventory_warehouse_storingLocation_edit') && !$hasPermissions('B_inventory_warehouse_storingLocation_del')">--</span>
|
|
|
|
+ <a-button
|
|
|
|
+ size="small"
|
|
|
|
+ type="link"
|
|
|
|
+ class="button-primary"
|
|
|
|
+ :id="'storingLocationList-print-'+record.id">打印贴签</a-button>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -73,6 +92,7 @@ import { commonMixin } from '@/utils/mixin'
|
|
import { warehouseLocList, warehouseLocDel } from '@/api/warehouse'
|
|
import { warehouseLocList, warehouseLocDel } from '@/api/warehouse'
|
|
import { STable } from '@/components'
|
|
import { STable } from '@/components'
|
|
import storingLocationEditModal from './editModal.vue'
|
|
import storingLocationEditModal from './editModal.vue'
|
|
|
|
+import { downloadExcel } from '@/libs/JGPrint.js'
|
|
export default {
|
|
export default {
|
|
name: 'WarehouseLocList',
|
|
name: 'WarehouseLocList',
|
|
components: { STable, storingLocationEditModal },
|
|
components: { STable, storingLocationEditModal },
|
|
@@ -86,9 +106,10 @@ export default {
|
|
name: '' // 仓位名称
|
|
name: '' // 仓位名称
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
+ exportLoading: false,
|
|
columns: [
|
|
columns: [
|
|
- { title: '序号', dataIndex: 'no', width: '14%', align: 'center' },
|
|
|
|
- { title: '仓位名称', dataIndex: 'name', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
|
+ { title: '仓位名称', dataIndex: 'name', width: '50%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '排序', dataIndex: 'sort', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '排序', dataIndex: 'sort', width: '16%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '30%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '30%', align: 'center' }
|
|
],
|
|
],
|
|
@@ -112,7 +133,8 @@ export default {
|
|
},
|
|
},
|
|
openModal: false, // 新增编辑产品品牌 弹框
|
|
openModal: false, // 新增编辑产品品牌 弹框
|
|
itemId: '', // 当前品牌id
|
|
itemId: '', // 当前品牌id
|
|
- nowData: null // 当前记录数据
|
|
|
|
|
|
+ nowData: null, // 当前记录数据
|
|
|
|
+ rowSelectionInfo: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -122,6 +144,20 @@ export default {
|
|
this.queryParam.name = ''
|
|
this.queryParam.name = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
|
|
+ // 导出
|
|
|
|
+ handleExport () {
|
|
|
|
+ this.exportLoading = true
|
|
|
|
+ this.spinning = true
|
|
|
|
+ dealerProductExport(this.queryParam).then(res => {
|
|
|
|
+ this.exportLoading = false
|
|
|
|
+ this.spinning = false
|
|
|
|
+ downloadExcel(res, '仓位')
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 表格选中项
|
|
|
|
+ rowSelectionFun (obj) {
|
|
|
|
+ this.rowSelectionInfo = obj || null
|
|
|
|
+ },
|
|
// 新增/编辑
|
|
// 新增/编辑
|
|
handleEdit (row) {
|
|
handleEdit (row) {
|
|
if (row) {
|
|
if (row) {
|