| | |
| | | <a-row :gutter="30"> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="仓库编号"> |
| | | <a-form-item label="线边库编号"> |
| | | <j-input |
| | | placeholder="请输入仓库编号检索" |
| | | placeholder="请输入线边库编号检索" |
| | | v-model="queryParam.warehouseCode" |
| | | ></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="仓库名称"> |
| | | <a-form-item label="线边库名称"> |
| | | <j-input |
| | | placeholder="请输入仓库名称检索" |
| | | placeholder="请输入线边库名称检索" |
| | | v-model="queryParam.warehouseName" |
| | | ></j-input> |
| | | </a-form-item> |
| | |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | >新增</a-button> |
| | | >新增 |
| | | </a-button> |
| | | </div> |
| | | |
| | | <!-- table区域-begin --> |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <!--状态栏个性展示--> |
| | | <span |
| | |
| | | > |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleDetail(record)" |
| | | >详情</a> |
| | | @click="handleEdit(record)" |
| | | >编辑</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item v-if="record.warehouseStatus==1"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="确定删除吗?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.warehouseStatus == 0"> |
| | | <a-popconfirm |
| | |
| | | <a>禁用</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="确定删除吗?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | | |
| | | </a-menu-item> |
| | | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | |
| | | //按需引入 组件 |
| | | import WarehouseModel from './modules/warehouse/WarehouseModel' |
| | | |
| | | import { deleteAction, requestPut, getAction } from '@/api/manage' |
| | | import { getAction, requestPut } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import JInput from '@/components/jeecg/JInput' |
| | |
| | | components: { |
| | | WarehouseModel, |
| | | JEllipsis, |
| | | JInput, |
| | | JInput |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | /* 分页参数 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | /* 排序参数 */ |
| | | isorter:{ |
| | | column: 'warehouseCode', |
| | | order: 'asc', |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '线边库编号', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'warehouseCode' |
| | | }, |
| | | { |
| | | title: '线边库名称', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'warehouseName' |
| | | }, |
| | | { |
| | |
| | | title: '状态', |
| | | align: 'center', |
| | | scopedSlots: { |
| | | customRender: 'status', |
| | | customRender: 'status' |
| | | }, |
| | | dataIndex: 'warehouseStatus' |
| | | }, |
| | |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/base/lineSideWarehouse/list', |
| | | delete: '/base/lineSideWarehouse/delete', |
| | | active: '/base/lineSideWarehouse/active', |
| | | }, |
| | | active: '/base/lineSideWarehouse/active' |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | methods: { |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | this.ipagination.current = 1 |
| | | } |
| | | var params = this.getQueryParams();//查询条件 |
| | | this.loading = true; |
| | | var params = this.getQueryParams()//查询条件 |
| | | this.loading = true |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total |
| | | } |
| | | if (res.code === 510) { |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | //禁用状态样式 |
| | | tableRowClass(record, index) { |
| | | if (record.warehouseStatus != "1") { |
| | | return "frozenRowClass"; |
| | | if (record.warehouseStatus != '1') { |
| | | return 'frozenRowClass' |
| | | } |
| | | return ""; |
| | | return '' |
| | | }, |
| | | //启用禁用 |
| | | handleActive(id) { |
| | | if (!this.url.active) { |
| | | this.$message.error("请设置url.active!") |
| | | this.$message.error('请设置url.active!') |
| | | return |
| | | } |
| | | let that = this; |
| | | let that = this |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | that.$message.success(res.message) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | that.$message.warning(res.message) |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .ant-card-body .table-operator { |
| | | margin-bottom: 18px; |
| | | } |