| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="6" :sm="8"> |
| | | <!-- <a-col :md="6" :sm="8"> |
| | | <a-form-item label="ç»æäºº"> |
| | | <j-search-select-tag |
| | | placeholder="è¯·éæ©ç»æäºº" |
| | |
| | | dict="sys_user,realname,id,del_flag!=1" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" |
| | | @change="handleTableChange" |
| | | > |
| | | <!--ç¶ææ 个æ§å±ç¤º--> |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | loading:false |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | click: (e) => { |
| | | //å°å½åéä¸çè®°å½ä¼ å°åé¡µé¢ |
| | | this.$bus.$emit('getToolingStorageData', record) |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | //ç¹å»å½åè¡åè² |
| | | let oldList = document.querySelectorAll('.checked-td-of-add-table') |
| | | if (oldList) { |
| | |
| | | }, |
| | | } |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | handleEdit: function (record) { |
| | | this.$refs.modalForm.edit(record) |
| | | this.$refs.modalForm.title = 'ç¼è¾' |
| | |
| | | }, |
| | | handleSubmit(record) { |
| | | let that = this; |
| | | that.loading = true |
| | | getAction(that.url.submit, { id:record.id}).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | }, |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | class="card-area" |
| | | > |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="rowSelection" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { requestPut,getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | |
| | | export default { |
| | | name: 'InboundApplyDetailList', |
| | | mixins: [JeecgListMixin], |
| | | components: {}, |
| | | data() { |
| | | return { |
| | | url: { |
| | | list: '/tms/inboundDetail/list', |
| | | }, |
| | | queryParam: {}, |
| | | nodeType: 0, |
| | | dataSource: [], |
| | | disableMixinCreated:true, |
| | | columns: [ |
| | | { |
| | | title: 'å·¥å
·ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'toolCode', |
| | | width: '10%', |
| | | key: 'toolCode' |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | dataIndex: 'chineseName', |
| | | align: 'center', |
| | | key: 'toolName' |
| | | }, |
| | | { |
| | | title: 'åå·/å¾å·', |
| | | dataIndex: 'toolModel', |
| | | align: 'center', |
| | | key: 'toolModel' |
| | | }, |
| | | |
| | | { |
| | | title: 'å·¥å
·åç±»', |
| | | dataIndex: 'applicationType', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ°é', |
| | | dataIndex: 'inStorageQuantity', |
| | | align: 'center', |
| | | }, |
| | | { |
| | | title: 'å®é
å
¥åºæ°é', |
| | | dataIndex: 'inActualCount', |
| | | align: 'center', |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.onSelectChange(selectedRowKeys,selectedRows) |
| | | }, |
| | | getCheckboxProps: (record) => ({ |
| | | props: { |
| | | disabled: record.distable, |
| | | }, |
| | | }), |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | methods: { |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (res.result.records[i].inStorageQuantity == res.result.records[i].inActualCount) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | | } |
| | | } |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | if(res.code===510){ |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.$emit('selectRows', selectionRows) |
| | | }, |
| | | |
| | | }, |
| | | mounted() { |
| | | this.$bus.$on('getToolingStorageData', (data) => { |
| | | this.queryParam.inboundOrderId = data.id; |
| | | this.searchQuery(); |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <j-modal |
| | | :width="1500" |
| | | :visible="visible" |
| | | switchFullscreen |
| | | :confirmLoading="confirmLoading" |
| | | @cancel="handleCancel" |
| | | cancelText="å
³é" |
| | | :footer="null" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <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="handleInbound" 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" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" |
| | | @change="handleTableChange" |
| | | > |
| | | </a-table> |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane tab="å·¥å
·å
¥åºæç»" key="1"> |
| | | <inbound-apply-detail-list ref="inboundDetailList" @selectRows="selectRows"></inbound-apply-detail-list> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | <!-- tableåºå-end --> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import InboundApplyDetailList from './InboundApplyDetailList' |
| | | 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: 'InboundApplyModelList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | InboundApplyDetailList, |
| | | JDictSelectTag, |
| | | JSearchSelectTag, |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'ç³è¯·åå
¥åºéæ©çé¢', |
| | | url: { |
| | | list: '/tms/inboundOrder/list', |
| | | importExcelUrl: '/tms/inboundOrder/importExcel', |
| | | exportXlsUrl: '/tms/inboundOrder/exportXls', |
| | | edit:'/tms/inboundOrder/edit', |
| | | addApplyInStorage:'/tms/inboundOrder/addApplyInStorage' |
| | | }, |
| | | 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' }, |
| | | // }, |
| | | ], |
| | | visible:false, |
| | | selectDetailRows:{}, |
| | | model:{}, |
| | | form: this.$form.createForm(this), |
| | | confirmLoading: false, |
| | | loading:false, |
| | | disableMixinCreated: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | /* 导å
¥è·¯å¾é¡µé¢éæ°è®¡ç® */ |
| | | importExcelUrl: function () { |
| | | // return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;//å¼åç¯å¢æå |
| | | return `${window._CONFIG['hxFileURL']}/${this.url.importExcelUrl}` |
| | | }, |
| | | }, |
| | | methods: { |
| | | show(){ |
| | | this.visible = true |
| | | this.loadData() |
| | | }, |
| | | loadData(arg) { |
| | | if(!this.url.list){ |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | this.onClearSelected() |
| | | this.queryParam.orderStatus = '3' |
| | | this.queryParam.inStatus = ['1','2'].join(',') |
| | | 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; |
| | | } |
| | | if(res.code===510){ |
| | | this.$message.warning(res.message) |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {} |
| | | this.$refs.inboundDetailList.dataSource = [] |
| | | this.loadData(1); |
| | | }, |
| | | customRow(record) { |
| | | return { |
| | | on: { |
| | | click: (e) => { |
| | | //å°å½åéä¸çè®°å½ä¼ å°åé¡µé¢ |
| | | this.$bus.$emit('getToolingStorageData', record) |
| | | this.onSelectChange(record.id.split(","), [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') |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | selectRows(selectDetailRows) { |
| | | this.selectDetailRows = selectDetailRows; |
| | | }, |
| | | handleInbound() { |
| | | let that = this |
| | | this.form.validateFields((err, values) => { |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | that.loading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.detailData = this.selectDetailRows |
| | | formData.inStorehouseType = this.selectionRows[0].inStorehouseType |
| | | formData.orderId = this.selectionRows[0].id |
| | | postAction(this.url.addApplyInStorage, formData) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok', new Date()) |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | that.confirmLoading = false |
| | | that.loading = false |
| | | that.handleCancel() |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | handleCancel(){ |
| | | this.visible = false |
| | | |
| | | } |
| | | }, |
| | | } |
| | | </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> |
| | |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> --> |
| | | <a-button @click="handleInbound(nodeSelected)" type="primary" icon="plus">ç³è¯·åå
¥åº</a-button> |
| | | <a-button @click="handleInbound" type="primary">ç³è¯·åå
¥åº</a-button> |
| | | </div> |
| | | |
| | | <!-- tableåºå-begin --> |
| | |
| | | </a-tabs> |
| | | |
| | | <inbound-model ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></inbound-model> |
| | | <inbound-apply-model-list ref="inboundApplyModelList"></inbound-apply-model-list> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import ParaCommonToolList from '.././baseTools/ParaCommonToolList' |
| | | import ParaBladeList from '.././baseTools/ParaBladeList' |
| | | import InboundModel from './InboundModel' |
| | | import InboundApplyModelList from './InboundApplyModelList.vue' |
| | | |
| | | export default { |
| | | name: 'InboundListRight', |
| | |
| | | ParaTurningToolsList, |
| | | ParaCommonToolList, |
| | | ParaBladeList, |
| | | InboundModel |
| | | InboundModel, |
| | | InboundApplyModelList |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | dataIndex: 'toolCode' |
| | | }, |
| | | { |
| | | title:'å·¥å
·ç¼å·', |
| | | align:"center", |
| | | dataIndex: 'onlyCode' |
| | | }, |
| | | { |
| | | title:'å
¥åºç±»å', |
| | | align:"center", |
| | | dataIndex: 'inStorehouseType' |
| | | dataIndex: 'inStorehouseTypeName' |
| | | }, |
| | | { |
| | | title:'åå·/å¾å·', |
| | |
| | | { |
| | | title:'å
¥åºæ°é', |
| | | align:"center", |
| | | dataIndex: 'inStorageQuantity' |
| | | dataIndex: 'inNumber' |
| | | }, |
| | | // { |
| | | // title:'夿³¨', |
| | |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/tms/inboundDetail/list", |
| | | list: "/tms/inStoreDetail/list", |
| | | paraHolesToolsList:"/tms/baseTools/paraHolesToolsList", |
| | | paraCommonToolList:"/tms/baseTools/paraCommonToolList", |
| | | paraThreadingToolList:"/tms/baseTools/paraThreadingToolList", |
| | |
| | | this.$refs.modalForm.title = "æ°å¢å·¥å
·å
¥åº"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | }, |
| | | |
| | | handleInbound() { |
| | | this.$refs.inboundApplyModelList.show(); |
| | | }, |
| | | handleDelete(id) { |
| | | deleteAction(this.url.delete, {id: id}).then((res) => { |
| | | if (res.success) { |
| | |
| | | @cancel="handleCancel" |
| | | > |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-form-model ref="form" :model="model" :rules="validatorRules"> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºç±»å"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å·¥å
·åç±»ç¼å·"> |
| | | <a-input v-model="model.classifyNum" placeholder="请è¾å
¥å·¥å
·åç±»ç¼ç " :disabled="true"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å·¥å
·åç±»åç§°"> |
| | | <a-input v-model="model.typeName" placeholder="请è¾å
¥å·¥å
·åç±»åç§°" :disabled="true"></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row style="width: 100%"> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºç±»å" prop="inStorehouseType"> |
| | | <j-dict-select-tag |
| | | :disabled="disableSubmit" |
| | | type="list" |
| | | v-decorator="['inStorehouseType', validatorRules.inStorehouseType]" |
| | | v-model="model.inStorehouseType" |
| | | :triggerChange="true" |
| | | dictCode="in_storehouse_type" |
| | | placeholder="è¯·éæ©å
¥åºç±»å" |
| | | @change="handleTypeChange" |
| | | /> |
| | | </a-form-item> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºæ¶é´"> |
| | | <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="å
¥åºæ¶é´" prop="inboundTime"> |
| | | <a-date-picker |
| | | @change="onChange" |
| | | :disabled="disableSubmit" |
| | | style="width: 100%" |
| | | v-decorator="['inboundTime', validatorRules.inboundTime]" |
| | | v-model="model.inboundTime" |
| | | /> |
| | | </a-form-item> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </a-form-model> |
| | | </a-spin> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectReturnList()" v-show="returnShow && !disableSubmit">éæ©ååºå·¥å
·</a-button> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTooling()" v-show="toolingShow && !disableSubmit">鿩工å
·</a-button> |
| | |
| | | <div :key="col.dataIndex"> |
| | | <a-input-number |
| | | v-if="col.dataIndex == 'inStorageQuantity'" |
| | | :disabled="quantityDisable" |
| | | :disabled="record.accuracyClass == '1'" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | @change="(e) => handleChange(e, record, col, index)" |
| | | :min="1" |
| | | /> |
| | | </div> |
| | |
| | | <template slot="footer" v-if="disableSubmit == true"> |
| | | <a-button :style="{ marginRight: '8px' }" @click="handleCancel">å
³é</a-button> |
| | | </template> |
| | | <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk"></j-select-tooling-modal> |
| | | <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk"></j-select-return-list-modal> |
| | | <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk"></j-select-sharpen-list-modal> |
| | | <j-select-tooling-modal ref="toolingModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-tooling-modal> |
| | | <j-select-return-list-modal ref="returnModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-return-list-modal> |
| | | <j-select-sharpen-list-modal ref="sharpenModalForm" @ok="modalFormOk" :classifyId="classifyId"></j-select-sharpen-list-modal> |
| | | </a-modal> |
| | | </template> |
| | | |
| | |
| | | import JSelectSharpenListModal from '.././inboundOrder/JSelectSharpenListModal' |
| | | |
| | | export default { |
| | | name: 'InboundOrderModel', |
| | | name: 'InboundModel', |
| | | components: { |
| | | JSelectToolingModal, |
| | | JMultiSelectTag, |
| | |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | form: this.$form.createForm(this), |
| | | isDisabled: false, |
| | | selectedRowKeys: {}, |
| | | state: { |
| | |
| | | maintenanceState: false, |
| | | checkState: false, |
| | | }, |
| | | inboundDate: '', |
| | | applicationDate: '', |
| | | supplierShow: false, |
| | | disableSubmit: false, |
| | | numDisable:false, |
| | | quantityDisable:false, |
| | | onlyCodeDisable:true, |
| | | returnShow:false, |
| | | toolingShow:false, |
| | | sharpenShow:false, |
| | | addDisable:false, |
| | | toolinngOptions:[], |
| | | title: 'æä½', |
| | | visible: false, |
| | | model: {}, |
| | |
| | | }, |
| | | confirmLoading: false, |
| | | loading: false, |
| | | form: this.$form.createForm(this), |
| | | dataSource: [], |
| | | toolingTreeData:[], |
| | | warehouseOptions:[], |
| | | locationOptions:[], |
| | | allToolingList:[], |
| | | param: {}, |
| | | barcodeCurrentType: false, |
| | | inboundOrderId:'', |
| | | validatorRules: { |
| | | inStorehouseType: { |
| | | rules: [ |
| | | inStorehouseType: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å
¥åºç±»å!', |
| | | }, |
| | | ], |
| | | }, |
| | | inboundTime: { |
| | | rules: [ |
| | | inboundTime:[ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç³è¯·å
¥åºæ¥æ!', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | url: { |
| | | addInStorage: '/tms/inboundOrder/addInStorage', |
| | |
| | | queryReturnList:'/tms/toolLedgerDetail/list', |
| | | detailList:'/tms/inboundDetail/list', |
| | | }, |
| | | toolingOptions:[], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | |
| | | dataIndex: 'toolModel' |
| | | }, |
| | | { |
| | | title: 'å¯ä¸ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'onlyCode', |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: 'å
¥åºæ°é', |
| | | align: 'center', |
| | | dataIndex: 'inStorageQuantity', |
| | |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | ], |
| | | classifyId:'' |
| | | } |
| | | }, |
| | | created() {}, |
| | | created() { |
| | | //å¤ä»½modelåå§å¼ |
| | | this.modelDefault = JSON.parse(JSON.stringify(this.model)); |
| | | }, |
| | | methods: { |
| | | modalFormOk() { |
| | | }, |
| | |
| | | this.param.pageSize = this.ipagination.pageSize |
| | | return filterObj(this.param) |
| | | }, |
| | | add() { |
| | | this.edit({}) |
| | | add (nodeSelected) { |
| | | this.classifyId = nodeSelected.key |
| | | this.model.classifyNum = nodeSelected.entity.classifyId |
| | | this.model.typeName = nodeSelected.entity.typeName |
| | | this.dataSource = [] |
| | | this.visible = true; |
| | | }, |
| | | edit(record) { |
| | | let that = this |
| | | this.form.resetFields() |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | this.isDisabled = false |
| | | this.disableSubmit = false |
| | | if (record.id) { |
| | | if(record.inStorehouseType == "1"){ |
| | | this.toolingShow = true |
| | | }else if(record.inStorehouseType == "2"){ |
| | | this.returnShow = true |
| | | }else if(record.inStorehouseType == "5"){ |
| | | this.sharpenShow = true |
| | | } |
| | | this.inboundOrderId = record.id |
| | | this.detailList(this.inboundOrderId) |
| | | } |
| | | this.initOptions() |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'inboundNum', 'inStorehouseType', 'inboundTime', 'applicationReason', 'handler','approvalDate','reviewer','approvalOpinion','remark') |
| | | ) |
| | | }) |
| | | }, |
| | | handleChange(value, key, column, index) { |
| | | handleChange(value, record, column, index) { |
| | | //let t = (this.ipaginationm.current - 1) * this.ipaginationm.pageSize + index |
| | | let key = record.key |
| | | const temp = [...this.dataSource] |
| | | const target = temp.filter(item => key === item.key)[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value |
| | | this.dataSource = temp |
| | | |
| | | if(column.dataIndex === 'inStorageQuantity'){ |
| | | if(target['quantity']<value){ |
| | | this.$message.error('å
¥åºæ°éä¸è½å¤§äºåºåºæ°é!') |
| | | this.isDisabled = true |
| | | }else{ |
| | | this.isDisabled = false |
| | | } |
| | | } |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close') |
| | | this.dataSource = [] |
| | | this.model = {}, |
| | | this.visible = false |
| | | this.supplierShow = false, |
| | | this.disableSubmit = false, |
| | | this.numDisable = false, |
| | | this.quantityDisable = false, |
| | | this.onlyCodeDisable = true, |
| | | this.returnShow = false, |
| | | this.toolingShow = false, |
| | | this.sharpenShow = false, |
| | | this.addDisable = false |
| | | this.sharpenShow = false |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | this.ipagination = pagination |
| | |
| | | that.confirmLoading = true |
| | | let formData = Object.assign(this.model, values) |
| | | formData.detailData = this.dataSource |
| | | formData.classifyId = this.classifyId |
| | | postAction(this.url.addInStorage, formData) |
| | | .then((res) => { |
| | | if (res.success) { |
| | |
| | | selectTooling: function () { |
| | | let ids = [] |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].toolCodeId) |
| | | ids.push(this.dataSource[i].id) |
| | | } |
| | | this.$refs.toolingModalForm.showModal(ids) |
| | | this.$refs.toolingModalForm.title = '鿩工å
·' |
| | |
| | | this.dataSource.splice(index, 1) |
| | | }, |
| | | onChange() {}, |
| | | //æ§å¶æ«ç ææé |
| | | selectCurrentUserType(e) { |
| | | if (e == '0') { |
| | | this.barcodeCurrentType = true |
| | | } else { |
| | | this.barcodeCurrentType = false |
| | | } |
| | | }, |
| | | //æé人åå¼ |
| | | selectCurrentUserChange(e) { |
| | | console.log('å½åæé', e) |
| | | // this.form.setFieldsValue({ |
| | | // // userName: e, |
| | | // userNameId: e, |
| | | // }) |
| | | }, |
| | | //å
¥åºç±»å |
| | | handleTypeChange(value) { |
| | | this.dataSource = [] |
| | | if(value == 1){ |
| | | this.toolingShow = true |
| | | this.quantityDisable = false |
| | | this.addDisable = true |
| | | this.numDisable = false |
| | | }else{ |
| | | this.toolingShow = false |
| | | } |
| | | if(value == 2){ |
| | | this.numDisable = true |
| | | this.addDisable = false |
| | | this.returnShow = true |
| | | this.quantityDisable = true |
| | | }else{ |
| | | this.returnShow = false |
| | | } |
| | | if (value == 5) { |
| | | this.numDisable = true |
| | | this.addDisable = false |
| | | this.sharpenShow = true |
| | | this.quantityDisable = true |
| | | } else { |
| | |
| | | } |
| | | |
| | | }, |
| | | //æ·»å å·¥å
·æé® |
| | | addTooling() { |
| | | const temp = [...this.dataSource]; |
| | | temp.push({ indexId: temp.length + 1 }); |
| | | this.dataSource = temp; |
| | | }, |
| | | detailList(inboundOrderId) { |
| | | this.param.inboundOrderId = inboundOrderId |
| | | getAction(this.url.detailList, this.getQueryParams()).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | }) |
| | | }, |
| | | initOptions() { |
| | | |
| | | ajaxGetDictItems("mes_base_warehouse,name,id,del_flag!='1' order by num asc", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | } |
| | | } |
| | | this.warehouseOptions = res.result; |
| | | } |
| | | }) |
| | | ajaxGetDictItems("mes_base_storage_area,name,id,del_flag!='1'", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | } |
| | | } |
| | | this.locationOptions = res.result; |
| | | } |
| | | }) |
| | | ajaxGetDictItems("mes_base_tooling,num,id,del_flag!='1'", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | res.result[i].toolingName = res.result[i].name |
| | | } |
| | | } |
| | | this.toolingOptions = res.result; |
| | | } |
| | | }) |
| | | }, |
| | |
| | | //getCurrSelected äºä»¶ æ¥æ¶ç»ä»¶ä¼ éçåæ° |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.dataSource.push({ |
| | | toolCodeId:data[i].id, |
| | | id: data[i].id, |
| | | toolCodeId: data[i].toolCodeId, |
| | | toolCode: data[i].toolCode, |
| | | chineseName: data[i].chineseName, |
| | | toolModel: data[i].toolModel, |
| | | applicationType: data[i].applicationTypeName, |
| | | onlyCode:data[i].onlyCode, |
| | | inStorageQuantity:data[i].storageQuantity |
| | | inStorageQuantity:data[i].storageQuantity || data[i].quantity, |
| | | quantity:data[i].quantity, |
| | | accuracyClass:data[i].accuracyClass |
| | | }) |
| | | } |
| | | //this.ipaginationm.total = this.dataSource.length |
| | |
| | | v-if="!barcodeCurrentType" |
| | | placeholder="è¯·éæ©ç»æäºº" |
| | | v-decorator="['handler', { rules: [{ required: false, message: 'è¯·éæ©ç»æäºº' }] }]" |
| | | dict="sys_user,realname,id,del_flag=0" |
| | | dict="sys_user,realname,username,del_flag=0" |
| | | @change="selectCurrentUserChange" |
| | | /> |
| | | </a-form-item> |
| | |
| | | <a-col :span="24 / 2"> |
| | | <a-form-item label="å®¡æ ¸äºº" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-search-select-tag |
| | | :disabled="true" |
| | | :disabled="disableSubmit" |
| | | placeholder="è¯·éæ©å®¡æ ¸äºº" |
| | | v-decorator="['reviewer', validatorRules.reviewer]" |
| | | dict="sys_user,realname,id,del_flag=0" |
| | | dict="sys_user,realname,username,del_flag=0" |
| | | @change="selectCurrentUserChange" |
| | | /> |
| | | </a-form-item> |
| | |
| | | <div :key="col.dataIndex"> |
| | | <a-input-number |
| | | v-if="col.dataIndex == 'inStorageQuantity'" |
| | | :disabled="quantityDisable" |
| | | :disabled="record.accuracyClass == '1'" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :min="1" |
| | |
| | | import { filterObj } from '@/utils/util' |
| | | import JSelectReturnListModal from './JSelectReturnListModal' |
| | | import JSelectSharpenListModal from './JSelectSharpenListModal' |
| | | import store from '@/store' |
| | | |
| | | export default { |
| | | name: 'InboundOrderModel', |
| | |
| | | JSelectReturnListModal, |
| | | JSearchSelectTag, |
| | | JSelectSharpenListModal, |
| | | store |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | reviewer: { |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å®¡æ ¸äºº!', |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | url: { |
| | | add: '/tms/inboundOrder/add', |
| | |
| | | return filterObj(this.param) |
| | | }, |
| | | add() { |
| | | this.handle = store.getters.userInfo.username |
| | | this.edit({}) |
| | | }, |
| | | edit(record) { |
| | |
| | | this.inboundOrderId = record.id |
| | | this.detailList(this.inboundOrderId) |
| | | } |
| | | this.initOptions() |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue( |
| | | pick(this.model, 'inboundNum', 'inStorehouseType', 'inboundTime', 'applicationReason', 'handler','approvalDate','reviewer','approvalOpinion','remark') |
| | |
| | | const target = temp.filter(item => key === item.key)[index]; |
| | | if (target) { |
| | | target[column.dataIndex] = value |
| | | if(column.dataIndex === 'inStorageQuantity'){ |
| | | if(target['quantity']<value){ |
| | | this.$message.error('å
¥åºæ°éä¸è½å¤§äºåºåºæ°é!') |
| | | this.isDisabled = true |
| | | }else{ |
| | | this.isDisabled = false |
| | | } |
| | | } |
| | | this.dataSource = temp |
| | | } |
| | | }, |
| | |
| | | selectTooling: function () { |
| | | let ids = [] |
| | | for (let i = 0; i < this.dataSource.length; i++) { |
| | | ids.push(this.dataSource[i].toolCodeId) |
| | | ids.push(this.dataSource[i].id) |
| | | } |
| | | this.$refs.toolingModalForm.showModal(ids) |
| | | this.$refs.toolingModalForm.title = '鿩工å
·' |
| | |
| | | this.dataSource.splice(index, 1) |
| | | }, |
| | | onChange() {}, |
| | | //æ§å¶æ«ç ææé |
| | | selectCurrentUserType(e) { |
| | | if (e == '0') { |
| | | this.barcodeCurrentType = true |
| | | } else { |
| | | this.barcodeCurrentType = false |
| | | } |
| | | }, |
| | | //æé人åå¼ |
| | | selectCurrentUserChange(e) { |
| | | console.log('å½åæé', e) |
| | |
| | | } |
| | | |
| | | }, |
| | | //æ·»å å·¥å
·æé® |
| | | addTooling() { |
| | | const temp = [...this.dataSource]; |
| | | temp.push({ indexId: temp.length + 1 }); |
| | | this.dataSource = temp; |
| | | }, |
| | | detailList(inboundOrderId) { |
| | | this.param.inboundOrderId = inboundOrderId |
| | | getAction(this.url.detailList, this.getQueryParams()).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records |
| | | this.ipagination.total = res.result.total; |
| | | } |
| | | }) |
| | | }, |
| | | initOptions() { |
| | | |
| | | ajaxGetDictItems("mes_base_warehouse,name,id,del_flag!='1' order by num asc", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | } |
| | | } |
| | | this.warehouseOptions = res.result; |
| | | } |
| | | }) |
| | | ajaxGetDictItems("mes_base_storage_area,name,id,del_flag!='1'", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | } |
| | | } |
| | | this.locationOptions = res.result; |
| | | } |
| | | }) |
| | | ajaxGetDictItems("mes_base_tooling,num,id,del_flag!='1'", null).then((res) => { |
| | | if (res.success) { |
| | | if (res.result) { |
| | | for (let i = 0; i < res.result.length; i++) { |
| | | res.result[i].label = res.result[i].title; |
| | | res.result[i].toolingName = res.result[i].name |
| | | } |
| | | } |
| | | this.toolingOptions = res.result; |
| | | } |
| | | }) |
| | | }, |
| | |
| | | //getCurrSelected äºä»¶ æ¥æ¶ç»ä»¶ä¼ éçåæ° |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.dataSource.push({ |
| | | toolCodeId:data[i].id, |
| | | id:data[i].id, |
| | | toolCodeId: data[i].toolCodeId, |
| | | toolCode: data[i].toolCode, |
| | | chineseName: data[i].chineseName || data[i].toolName, |
| | | chineseName: data[i].chineseName, |
| | | toolModel: data[i].toolModel, |
| | | applicationType: data[i].applicationTypeName, |
| | | onlyCode:data[i].toolNum, |
| | | inStorageQuantity:data[i].storageQuantity || data[i].quantity |
| | | onlyCode:data[i].onlyCode, |
| | | quantity:data[i].quantity, |
| | | inStorageQuantity:data[i].storageQuantity || data[i].quantity, |
| | | accuracyClass:data[i].accuracyClass |
| | | }) |
| | | } |
| | | //this.ipaginationm.total = this.dataSource.length |
| | |
| | | export default { |
| | | name: 'JSelectToolingModal', |
| | | components: {}, |
| | | props: {}, |
| | | props: { |
| | | classifyId:{ |
| | | type:String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | |
| | | { |
| | | title: 'å·¥å
·ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'toolNum', |
| | | dataIndex: 'onlyCode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'toolName', |
| | | dataIndex: 'chineseName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | { |
| | | title: 'å·¥å
፱Ȍ', |
| | | align: 'center', |
| | | dataIndex: 'applicationTypeName', |
| | |
| | | loading: false, |
| | | url: { |
| | | // list: '/base/tooling/list', |
| | | list: '/tms/toolLedgerDetail/list', |
| | | list: '/tms/toolLedgerDetail/queryLendTool', |
| | | queryKnifeBom:'/toolingStorage/mesToolingOutbounds/queryKnifeBom' |
| | | }, |
| | | classifyId:'' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | params["status"] = "2" |
| | | params.status = "2" |
| | | params.classifyId = this.classifyId |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].toolingId) > -1) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | |
| | | export default { |
| | | name: 'JSelectToolingModal', |
| | | components: {}, |
| | | props: {}, |
| | | props: { |
| | | classifyId:{ |
| | | type:String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | |
| | | { |
| | | title: 'å·¥å
·ç¼å·', |
| | | align: 'center', |
| | | dataIndex: 'toolNum', |
| | | dataIndex: 'onlyCode', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | title: 'å·¥å
·åç§°', |
| | | align: 'center', |
| | | dataIndex: 'toolName', |
| | | dataIndex: 'chineseName', |
| | | sorter: true, |
| | | }, |
| | | { |
| | | { |
| | | title: 'å·¥å
፱Ȍ', |
| | | align: 'center', |
| | | dataIndex: 'applicationTypeName', |
| | |
| | | loading: false, |
| | | url: { |
| | | // list: '/base/tooling/list', |
| | | list: '/tms/toolLedgerDetail/list', |
| | | list: '/tms/toolLedgerDetail/querySharpenTool', |
| | | }, |
| | | classifyId:'' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | params["status"] = "5" |
| | | params.status = "5" |
| | | params.classifyId = this.classifyId |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].toolingId) > -1) { |
| | | if (that.oldSlelectRows.indexOf(res.result.records[i].id) > -1) { |
| | | res.result.records[i].distable = true |
| | | } else { |
| | | res.result.records[i].distable = false |
| | |
| | | export default { |
| | | name: 'JSelectToolingModal', |
| | | components: {}, |
| | | props: {}, |
| | | props: { |
| | | classifyId:{ |
| | | type:String |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParam: {}, |
| | |
| | | let that = this |
| | | this.loading = true |
| | | let params = this.getQueryParams() //æ¥è¯¢æ¡ä»¶ |
| | | params.classifyId = this.classifyId |
| | | await getAction(this.url.list, params).then((res) => { |
| | | if (res.success) { |
| | | for (let i = 0; i < res.result.records.length; i++) { |