¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="çç¹åå·"> |
| | | <j-input placeholder="请è¾å
¥çç¹åå·" v-model="queryParam.orderCode"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="ç»æäºº"> |
| | | <j-dict-select-tag dictCode="sys_user,realname,id" placeholder="è¯·éæ©ç»æäºº" v-model="queryParam.handler" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">éç½®</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? 'æ¶èµ·' : 'å±å¼' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <!-- æ¥è¯¢åºå-END --> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | |
| | | |
| | | <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
| | | <!-- <a-menu slot="overlay">--> |
| | | <!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>å é¤</a-menu-item>--> |
| | | <!-- </a-menu>--> |
| | | <!-- <a-button style="margin-left: 8px"> æ¹éæä½ <a-icon type="down" /></a-button>--> |
| | | <!-- </a-dropdown>--> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | class="j-table-force-nowrap" |
| | | :scroll="{x:true}" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection='{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }' :customRow='clickThenSelect' |
| | | @change="handleTabChange"> |
| | | |
| | | |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleDetail(record)">详æ
</a> |
| | | <span v-if="record.approvalStatus === '1'"> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm title="ç¡®å®æäº¤å?" @confirm="() => handleSubmit(record)"> |
| | | <a>æäº¤</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">æ´å¤<a-icon type="down" /></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </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> |
| | | </span> |
| | | </a-table> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <!-- type="card" --> |
| | | <a-tab-pane tab='çç¹åæç»' key="1"> |
| | | <div class="table-operator" style="margin:-16px"> |
| | | <tools-stockta-king-bound-detail ref="toolStockingBoundDetail" :mainId='mainId' /> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | </a-tabs> |
| | | </div> |
| | | |
| | | |
| | | <tools-stocktaking-bound-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></tools-stocktaking-bound-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import ToolsStocktaKingBoundDetail from './ToolsStocktaKingBoundDetail.vue' |
| | | import ToolsStocktakingBoundModal from './modules/ToolsStocktakingBoundModal' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: "ToolsStocktakingBoundList", |
| | | mixins:[JeecgListMixin], |
| | | components: { |
| | | ToolsStocktakingBoundModal, |
| | | ToolsStocktaKingBoundDetail |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'çç¹å表管ç页é¢', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'çç¹åå·', |
| | | align:"center", |
| | | dataIndex: 'orderCode' |
| | | }, |
| | | { |
| | | title:'ç»æäºº', |
| | | align:"center", |
| | | dataIndex: 'handler_dictText' |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸äºº', |
| | | align:"center", |
| | | dataIndex: 'reviewer_dictText' |
| | | }, |
| | | { |
| | | title:'çç¹åç§°', |
| | | align:"center", |
| | | dataIndex: 'stocktakingName' |
| | | }, |
| | | { |
| | | title:'夿³¨', |
| | | align:"center", |
| | | dataIndex: 'remark' |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸ç¶æ', |
| | | align:"center", |
| | | dataIndex: 'approvalStatus_dictText' |
| | | |
| | | }, |
| | | { |
| | | title:'å®¡æ ¸æè§', |
| | | align:"center", |
| | | dataIndex: 'approvalOpinion' |
| | | }, |
| | | { |
| | | title:'çç¹æ¶é´', |
| | | align:"center", |
| | | dataIndex: 'inventoryTime' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' }, |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/toolsStocktakingBound/list", |
| | | submit:"/tms/toolsStocktakingBound/submit", |
| | | delete: "/tms/toolsStocktakingBound/delete", |
| | | deleteBatch: "/tms/toolsStocktakingBound/deleteBatch", |
| | | exportXlsUrl: "/tms/toolsStocktakingBound/exportXls", |
| | | importExcelUrl: "tms/toolsStocktakingBound/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | mainId: '', |
| | | superFieldList:[], |
| | | selectedMainId: '', |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(','), [record]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | |
| | | this.selectedMainId = '' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.mainId = selectionRows[0]['id'] |
| | | } else { |
| | | this.mainId = '' |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | }, |
| | | handleTabChange(pagination, filters, sorter) { |
| | | this.selectedRowKeys = [] |
| | | this.$refs.toolStockingBoundDetail.dataSource = [] |
| | | this.handleTableChange(pagination, filters, sorter) |
| | | }, |
| | | handleDelete: function (id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error('请设置url.delete屿§!') |
| | | return |
| | | } |
| | | deleteAction(this.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | this.reCalculatePage(1) |
| | | this.$message.success(res.message) |
| | | this.$refs.toolStockingBoundDetail.dataSource = [] |
| | | this.loadData() |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | }, |
| | | handleSubmit(record) { |
| | | getAction(this.url.submit,{ id: record.id }).then((res)=>{ |
| | | if (res.success) { |
| | | |
| | | this.$message.success(res.message); |
| | | this.loadData(); |
| | | this.$refs.toolStockingBoundDetail.clearList() |
| | | } else { |
| | | this.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | searchQuery() { |
| | | this.selectedRowKeys = []; |
| | | this.$refs.toolStockingBoundDetail.loadData(); |
| | | this.$refs.toolStockingBoundDetail.selectedRowKeys = []; |
| | | this.loadData(); |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.selectedRowKeys = [] |
| | | this.$refs.toolStockingBoundDetail.dataSource = [] |
| | | this.loadData(); |
| | | }, |
| | | modalFormOk() { |
| | | this.queryParam = {} |
| | | this.selectedRowKeys = [] |
| | | this.$refs.toolStockingBoundDetail.dataSource = [] |
| | | this.loadData(); |
| | | }, |
| | | |
| | | handleEdit: function (record) { |
| | | |
| | | console.log('record:', record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.edit(record) |
| | | |
| | | }, |
| | | handleDetail:function(record){ |
| | | |
| | | this.$refs.modalForm.title="详æ
"; |
| | | this.$refs.modalForm.disableSubmit = true; |
| | | this.$refs.modalForm.edit(record); |
| | | }, |
| | | handleAdd: function () { |
| | | this.$refs.modalForm.disableSubmit = false |
| | | this.$refs.modalForm.title = "æ°å¢å·¥å
·ç³è¯·å"; |
| | | this.$refs.modalForm.add(); |
| | | |
| | | console.log(this.$refs.modalForm.title); |
| | | |
| | | }, |
| | | |
| | | |
| | | initDictConfig(){ |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |