¶Ô±ÈÐÂÎļþ |
| | |
| | | <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 :md="6" :sm="8"> |
| | | <a-form-item label="å
¥åºç³è¯·åç¼å·"> |
| | | <a-input placeholder="请è¾å
¥å
¥åºç³è¯·åç¼å·" v-model="queryParam.inboundNum" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="å
¥åºç±»å"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©å
¥åºç±»å" |
| | | v-model="queryParam.inStorehouseType" |
| | | dict="in_storehouse_type" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <a-form-item label="ç»æäºº"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©ç»æäºº" |
| | | v-model="queryParam.handler" |
| | | dict="sys_user,realname,id,del_flag!=1" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div class="table-operator"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">æ¥è¯¢</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload">éç½®</a-button> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">æ°å¢</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :customRow="customRow" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a href="javascript:;" @click="handleEdit(record)" v-if="record.orderStatus == '1'">ç¼è¾</a> |
| | | <a-divider type="vertical" v-if="record.orderStatus == '1'" /> |
| | | <a href="javascript:;" @click="handleDetail(record)">详æ
</a> |
| | | <a-divider type="vertical" v-if="record.orderStatus == '1'"/> |
| | | <a href="javascript:;" @click="handleSubmit(record)" v-if="record.orderStatus == '1'">æäº¤</a> |
| | | </span> |
| | | </a-table> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="å·¥å
·å
¥åºæç»" key="1"> |
| | | <inbound-detail-list ref="inboundDetailList"></inbound-detail-list> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <!-- tableåºå-end --> |
| | | <inbound-order-model ref="modalForm" @ok="modalFormOk"></inbound-order-model> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import InboundOrderModel from './modules/inboundOrder/InboundOrderModel' |
| | | import InboundDetailList from './modules/inboundOrder/InboundDetailList' |
| | | import { requestPut } from '@/api/manage' |
| | | import JDictSelectTag from '@/components/dict/JDictSelectTag' |
| | | import JSearchSelectTag from '@/components/dict/JSearchSelectTag' |
| | | import { postAction,getAction } from '../../api/manage' |
| | | |
| | | export default { |
| | | name: 'InboundOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | InboundOrderModel, |
| | | InboundDetailList, |
| | | JDictSelectTag, |
| | | JSearchSelectTag, |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'å
¥åºç³è¯·å', |
| | | url: { |
| | | list: '/tms/inboundOrder/list', |
| | | importExcelUrl: '/tms/inboundOrder/importExcel', |
| | | exportXlsUrl: '/tms/inboundOrder/exportXls', |
| | | edit:'/tms/inboundOrder/edit', |
| | | submit:'/tms/inboundOrder/submit' |
| | | }, |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | }, |
| | | { |
| | | title: 'å
¥åºç³è¯·åç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'inboundNum', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å
¥åºåç±»å', |
| | | align: 'center', |
| | | dataIndex: 'inStorehouseType_dictText', |
| | | }, |
| | | { |
| | | title: 'ç»æäºº', |
| | | align: 'center', |
| | | dataIndex: 'handler_dictText', |
| | | }, |
| | | { |
| | | title: 'ç³è¯·åå ', |
| | | align: 'center', |
| | | dataIndex: 'applicationReason', |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'inboundTime', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸äºº', |
| | | align: 'center', |
| | | dataIndex: 'reviewer_dictText', |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸æ¶é´', |
| | | align: 'center', |
| | | dataIndex: 'approvalDate', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å®¡æ ¸ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'orderStatus_dictText', |
| | | }, |
| | | { |
| | | title: 'åç¨åå·', |
| | | align: 'center', |
| | | dataIndex: 'borrowNum', |
| | | }, |
| | | { |
| | | title: 'å®¡æ¹æè§', |
| | | align: 'center', |
| | | dataIndex: 'approvalOpinion', |
| | | }, |
| | | { |
| | | width: 150, |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | computed: { |
| | | /* 导å
¥è·¯å¾é¡µé¢éæ°è®¡ç® */ |
| | | importExcelUrl: function () { |
| | | // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;//å¼åç¯å¢æå |
| | | return `${window._CONFIG['hxFileURL']}/${this.url.importExcelUrl}` |
| | | }, |
| | | }, |
| | | methods: { |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.$refs.inboundDetailList.dataSource = [] |
| | | this.loadData(1); |
| | | }, |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | //å°å½åéä¸çè®°å½ä¼ å°åé¡µé¢ |
| | | this.$bus.$emit('getToolingStorageData', record) |
| | | //ç¹å»å½åè¡åè² |
| | | let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | if (oldList) { |
| | | for (let j = 0; j < oldList.length; j++) { |
| | | oldList[j].classList.remove('checked-td-of-add-table') |
| | | } |
| | | } |
| | | let children = e.target.parentNode.children |
| | | for (let i = 0; i < children.length; i++) { |
| | | children[i].classList.add('checked-td-of-add-table') |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | handleAdd() { |
| | | this.$refs.modalForm.add() |
| | | this.$refs.modalForm.title = 'æ°å¢' |
| | | this.$refs.modalForm.disableSubmit = false |
| | | }, |
| | | handleSubmit(record) { |
| | | let that = this; |
| | | getAction(that.url.submit, { id:record.id}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | /deep/ .notshow { |
| | | display: none; |
| | | } |
| | | /deep/ .checked-td-of-add-table { |
| | | background-color: rgba(220, 220, 220, 1); |
| | | } |
| | | </style> |