src/views/tms/modules/outBound/JSelectOutboundToolModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundDetailSelectList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundListRight.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundOrderModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/tms/modules/outBound/OutboundOrderSelectList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/tms/modules/outBound/JSelectOutboundToolModal.vue
@@ -170,7 +170,15 @@ this.loading = false }) }, showModal(oldSelectRow) { showModal(oldSelectRow, classifyId) { this.oldSelectRow = oldSelectRow this.visible = true this.queryParam.quantity = 0 this.queryParam.classifyId = classifyId this.queryParam.excludeIds = oldSelectRow this.loadData(1) }, showOrderModal(oldSelectRow) { this.oldSelectRow = oldSelectRow this.visible = true this.queryParam.quantity = 0 src/views/tms/modules/outBound/OutboundDetailSelectList.vue
@@ -157,7 +157,7 @@ ], url: { list: "/tms/outboundOrder/listOutboundDetailByMainId", outbound: "/tms/outboundOrder/outBound", outbound: "/tms/outboundOrder/outBoundByApply", delete: "/tms/outboundOrder/deleteOutboundDetail", deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail", exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail", src/views/tms/modules/outBound/OutboundListRight.vue
@@ -75,6 +75,7 @@ :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" :customRow="handleRowClick" class="j-table-force-nowrap" @change="handleTableChange"> @@ -129,14 +130,9 @@ </a-tab-pane> </a-tabs> <outbound-modal ref="outboundModal" @ok="selectListOK"></outbound-modal> <OutboundOrderSelectList ref="outboundOrderSelectList" @ok="selectListOK"></OutboundOrderSelectList> <base-tools-modal ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></base-tools-modal> <para-hole-tools-modal ref="paraHoleToolsModal" @ok="modalFormOk" :nodeSelected="nodeSelected"></para-hole-tools-modal> <para-threading-tool-modal ref="paraThreadingToolModal"></para-threading-tool-modal> <para-mill-tool-modal ref="paraMillToolModal"></para-mill-tool-modal> <para-turning-tools-modal ref="paraTurningToolsModal"></para-turning-tools-modal> <para-blade-modal ref="paraBladeModal"></para-blade-modal> <para-common-tool-modal ref="paraCommonToolModal"></para-common-tool-modal> </a-card> </template> @@ -148,14 +144,8 @@ import BaseToolsModal from '../baseTools/BaseToolsModal' import Tooltip from 'ant-design-vue/es/tooltip' import { getAction, postAction, deleteAction, requestPut } from '@api/manage' import OutboundModal from './OutboundModal' import OutboundOrderSelectList from './OutboundOrderSelectList' import ParaHoleToolsModal from '../baseTools/ParaHoleToolsModal' import ParaMillToolModal from '../baseTools/ParaMillToolModal' import ParaThreadingToolModal from '../baseTools/ParaThreadingToolModal' import ParaTurningToolsModal from '../baseTools/ParaTurningToolsModal' import ToolsConfigPropertyModal from '../baseTools/ToolsConfigPropertyModal' import ParaCommonToolModal from '../baseTools/ParaCommonToolModal' import ParaBladeModal from '../baseTools/ParaBladeModal' import ParaHoleToolsList from '../baseTools/ParaHoleToolsList' import ToolsConfigPropertyList from '../baseTools/ToolsConfigPropertyList' import ParaMillToolList from '../baseTools/ParaMillToolList' @@ -168,16 +158,10 @@ name: 'OutboundListRight', mixins:[JeecgListMixin, mixinDevice], components: { OutboundModal, OutboundOrderSelectList, BaseToolsModal, Tooltip, ParaHoleToolsModal, ParaMillToolModal, ParaThreadingToolModal, ParaTurningToolsModal, ToolsConfigPropertyModal, ParaCommonToolModal, ParaBladeModal, ParaHoleToolsList, ToolsConfigPropertyList, ParaMillToolList, @@ -188,7 +172,19 @@ }, data () { return { description: 'å·¥å ·ä¿¡æ¯ç®¡ç页é¢', description: 'å·¥å ·åºåºé¡µé¢', /* å页忰 */ ipagination:{ current: 1, pageSize: 5, pageSizeOptions: ['5', '10', '20', '30'], showTotal: (total, range) => { return range[0] + "-" + range[1] + " å ±" + total + "æ¡" }, showQuickJumper: true, showSizeChanger: true, total: 0 }, // 表头 columns: [ { @@ -261,14 +257,14 @@ align:"center", dataIndex: 'createTime' }, { 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/outStoreDetail/list", @@ -299,6 +295,7 @@ this.nodeType = (data.type == undefined ? 0 : data.type); this.paraTypeFlag = (data.entity == undefined ? 0 : data.entity.paraTypeFlag) this.nodeSelected = data; this.queryParam.classifyId = data.key this.loadData() this.clearPara() }) @@ -312,37 +309,25 @@ selectOutboundOrder() { this.$refs.outboundOrderSelectList.openSelect(); }, handleRowClick(record) { return { on: { click: () => { console.log(record) this.onSelectChange(record.id.split(","), [record]); } } } }, handleAdd(entity) { if (!this.nodeSelected ) { this.$message.warning('请å éæ©ä¸ä¸ªå·¥å ·åç±»'); return; } // æå¼æ°å¢æ¨¡ææ¡ï¼å¹¶ä¼ éå½åéä¸çèç¹ if(this.paraTypeFlag === "1"){ this.$refs.paraCommonToolModal.add(this.nodeSelected); this.$refs.paraCommonToolModal.title = "æ°å¢éç¨åæ°ç±»åå·¥å ·"; this.$refs.paraCommonToolModal.disableSubmit = false; }else if(this.paraTypeFlag === "2"){ this.$refs.paraHoleToolsModal.add(this.nodeSelected); this.$refs.paraHoleToolsModal.title = "æ°å¢åå å·¥å·¥å ·"; this.$refs.paraHoleToolsModal.disableSubmit = false; }else if(this.paraTypeFlag === "3"){ this.$refs.paraThreadingToolModal.add(this.nodeSelected); this.$refs.paraThreadingToolModal.title = "æ°å¢èºçº¹å·¥å ·"; this.$refs.paraThreadingToolModal.disableSubmit = false; }else if(this.paraTypeFlag === "4"){ this.$refs.paraMillToolModal.add(this.nodeSelected); this.$refs.paraMillToolModal.title = "æ°å¢é£åå·¥å ·"; this.$refs.paraMillToolModal.disableSubmit = false; }else if(this.paraTypeFlag === "5"){ this.$refs.paraTurningToolsModal.add(this.nodeSelected); this.$refs.paraTurningToolsModal.title = "æ°å¢è½¦åå·¥å ·"; this.$refs.paraTurningToolsModal.disableSubmit = false; }else if(this.paraTypeFlag === "6"){ this.$refs.paraBladeModal.add(this.nodeSelected); this.$refs.paraBladeModal.title = "æ°å¢åç"; this.$refs.paraBladeModal.disableSubmit = false; } this.$refs.outboundModal.add(this.nodeSelected); this.$refs.outboundModal.title = "æ°å¢å·¥å ·åºåº"; this.$refs.outboundModal.disableSubmit = false; }, handleDelete(id) { deleteAction(this.url.delete, {id: id}).then((res) => { @@ -364,10 +349,12 @@ this.loadData(); // å·æ°è¡¨æ ¼æ°æ® this.$bus.$emit('queryTreeData') //å·æ°å·¦ä¾§æ }, onSelectChange(selectedRowKeys) { onSelectChange(selectedRowKeys, selectionRows) { this.selectedRowKeys = selectedRowKeys; this.selectionRows = selectionRows; const toolCode = this.selectionRows[0].toolCode //éè¿idæ¥è¯¢ç®¡çåæ°ååæ°æ°æ® getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { getAction(this.url.queryParaByToolCode, { toolCode: toolCode,paraTypeFlag:this.paraTypeFlag}).then((res) => { if (res.success) { if(this.paraTypeFlag === "1"){ this.$refs.paraCommonToolList.getPara(res.result); @@ -386,7 +373,7 @@ this.$message.warning(res.message); } }) getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0]}).then((res) => { getAction(this.url.queryByToolCode, { toolCode: toolCode}).then((res) => { if (res.success) { this.$refs.toolsConfigPropertyList.getPara(res.result); } else { @@ -405,93 +392,6 @@ if (selectedRecord) { this.handleEdit(selectedRecord); } }, //ç¼è¾ handleEdit(record) { if(record.paramaTableName === "1"){ this.$refs.paraCommonToolModal.edit(record); this.$refs.paraCommonToolModal.title = "ç¼è¾"; this.$refs.paraCommonToolModal.disableSubmit = false; }else if(record.paramaTableName === "2"){ this.$refs.paraHoleToolsModal.edit(record); this.$refs.paraHoleToolsModal.title = "ç¼è¾"; this.$refs.paraHoleToolsModal.disableSubmit = false; }else if(record.paramaTableName === "3"){ this.$refs.paraThreadingToolModal.edit(record); this.$refs.paraThreadingToolModal.title = "ç¼è¾"; this.$refs.paraThreadingToolModal.disableSubmit = false; }else if(record.paramaTableName === "4"){ this.$refs.paraMillToolModal.edit(record); this.$refs.paraMillToolModal.title = "ç¼è¾"; this.$refs.paraMillToolModal.disableSubmit = false; }else if(record.paramaTableName === "5"){ this.$refs.paraTurningToolsModal.edit(record); this.$refs.paraTurningToolsModal.title = "ç¼è¾"; this.$refs.paraTurningToolsModal.disableSubmit = false; }else if(record.paramaTableName === "6"){ this.$refs.paraBladeModal.edit(record); this.$refs.paraBladeModal.title = "ç¼è¾"; this.$refs.paraBladeModal.disableSubmit = false; } }, //详æ handleDetail:function(record){ if(record.paramaTableName === "1"){ this.$refs.paraCommonToolModal.edit(record); this.$refs.paraCommonToolModal.title="详æ "; this.$refs.paraCommonToolModal.disableSubmit = true; this.$refs.paraCommonToolModal.disSeach = true; if(this.$refs.paraCommonToolModal.removeValidate) { this.$refs.paraCommonToolModal.removeValidate() } }else if(record.paramaTableName === "2"){ this.$refs.paraHoleToolsModal.edit(record); this.$refs.paraHoleToolsModal.title="详æ "; this.$refs.paraHoleToolsModal.disableSubmit = true; this.$refs.paraHoleToolsModal.disSeach = true; if(this.$refs.paraHoleToolsModal.removeValidate) { this.$refs.paraHoleToolsModal.removeValidate() } }else if(record.paramaTableName === "3"){ this.$refs.paraThreadingToolModal.edit(record); this.$refs.paraThreadingToolModal.title="详æ "; this.$refs.paraThreadingToolModal.disableSubmit = true; this.$refs.paraThreadingToolModal.disSeach = true; if(this.$refs.paraThreadingToolModal.removeValidate) { this.$refs.paraThreadingToolModal.removeValidate() } }else if(record.paramaTableName === "4"){ this.$refs.paraMillToolModal.edit(record); this.$refs.paraMillToolModal.title="详æ "; this.$refs.paraMillToolModal.disableSubmit = true; this.$refs.paraMillToolModal.disSeach = true; if(this.$refs.paraMillToolModal.removeValidate) { this.$refs.paraMillToolModal.removeValidate() } }else if(record.paramaTableName === "5"){ this.$refs.paraTurningToolsModal.edit(record); this.$refs.paraTurningToolsModal.title="详æ "; this.$refs.paraTurningToolsModal.disableSubmit = true; this.$refs.paraTurningToolsModal.disSeach = true; if(this.$refs.paraTurningToolsModal.removeValidate) { this.$refs.paraTurningToolsModal.removeValidate() } }else if(record.paramaTableName === "6"){ this.$refs.paraBladeModal.edit(record); this.$refs.paraBladeModal.title="详æ "; this.$refs.paraBladeModal.disableSubmit = true; this.$refs.paraBladeModal.disSeach = true; if(this.$refs.paraBladeModal.removeValidate) { this.$refs.paraBladeModal.removeValidate() } } }, //ç¦ç¨ç¶ææ ·å¼ tableRowClass(record, index) { if (record.status != "1") { return "frozenRowClass"; } return ""; }, onClearSelected() { this.selectedKeys = []; src/views/tms/modules/outBound/OutboundModal.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,312 @@ <template> <j-modal :title="title" :width="width" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="å ³é"> <a-spin :spinning="confirmLoading"> <a-form-model ref="form" :model="model" :rules="validatorRules"> <a-row :gutter="24"> <a-col :span="12"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="classifyNum" label="å·¥å ·åç±»ç¼ç "> <a-input placeholder="请è¾å ¥å·¥å ·åç±»ç¼ç " v-model="model.classifyNum" :disabled="true" /> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="classifyName" label="å·¥å ·åç±»åç§°"> <a-input placeholder="请è¾å ¥å·¥å ·åç±»åç§°" v-model="model.classifyName" :disabled="true" /> </a-form-model-item> </a-col> </a-row> <a-row :gutter="24"> <a-col :span="12"> <a-form-model-item label="åºåºç±»å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outStorehouseType"> <j-dict-select-tag :disabled="disableSubmit" @change="handleTypeChange" type="list" v-model="model.outStorehouseType" dictCode="out_storehouse_type" placeholder="è¯·éæ©åºåºç±»å" /> </a-form-model-item> </a-col> </a-row> </a-form-model> </a-spin> <a-button v-show="selectBorrowTool" type="primary" :style="{ marginBottom: '8px' }" @click="selectOutBoundTool">éæ©åºåºå·¥å ·</a-button> <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{x:true}" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" :rowSelection="null" @change="handleTableChange"> <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> <div :key="col.dataIndex"> <a-input-number v-if="col.dataIndex === 'outboundQuantity'" :disabled="record.quantity <= 1" :value="text" @change="(e) => handleChange(e, record.key, col, index)" :min="1" /> </div> </template> <span slot="action" v-if="disableSubmit === false" slot-scope="text, record, index"> <a-popconfirm title="ç¡®å®å é¤å?" @confirm="() => handleDelete(record, index)"> <a>å é¤</a> </a-popconfirm> </span> </a-table> <template slot="footer" v-if="disableSubmit === false"> <a-button :style="{ marginRight: '8px' }" @click="handleCancel">å ³é</a-button> <a-button @click="handleOk" :disabled="isDisabled" type="primary">åºåº</a-button> </template> <j-select-outbound-tool-modal ref="selectOutBoundToolModal"></j-select-outbound-tool-modal> </j-modal> </template> <script> import { validateDuplicateValue } from '@/utils/util' import OutboundDetailList from '../../OutboundDetailList.vue' import JSelectOutboundToolModal from './JSelectOutboundToolModal.vue' import { postAction } from '../../../../api/manage' import title from 'ant-design-vue/lib/skeleton/Title' export default { name: "OutboundOrderModal", components: { OutboundDetailList, JSelectOutboundToolModal }, data () { return { title: '', width:1200, visible: false, disableSubmit: false, isDisabled: false, addShow: true, selectBorrowTool: false, model:{ }, labelCol: { xs: { span: 24 }, sm: { span: 5 }, }, wrapperCol: { xs: { span: 24 }, sm: { span: 16 }, }, //è¡¨æ ¼åæ° ipagination: { current: 1, pageSize: 10, total: 0, }, dataSource: [], loading: false, // 表头 columns: [ { title: '#', dataIndex: '', key:'rowIndex', width:60, align:"center", customRender:function (t,r,index) { return parseInt(index)+1; } }, { title:'å·¥å ·ç¼ç ', align:"center", dataIndex: 'toolNum' }, { title:'å·¥å ·ç¼å·', align:"center", dataIndex: 'toolId' }, { title:'å¯ç¨åºå', align:"center", dataIndex: 'quantity' }, { title:'åºåºæ°é', align:"center", dataIndex: 'outboundQuantity', scopedSlots: { customRender: 'outboundQuantity' }, }, { title:'åºåºä»åº', align:"center", dataIndex: 'warehouseName' }, { title:'åºåºåºä½', align:"center", dataIndex: 'outboundLocation' }, // { // title:'åºåºç¶æ;1.æªåºåºï¼2.é¨ååºåºï¼3.åºåºå®æ', // align:"center", // dataIndex: 'status' // }, { title: 'æä½', dataIndex: 'action', align:"center", fixed:"right", width:147, scopedSlots: { customRender: 'action' }, } ], confirmLoading: false, validatorRules: { outStorehouseType: [ { required: true, message: 'è¯·éæ©åºåºç±»å!'}, ] }, url: { outbound: "/tms/outboundOrder/outBoundByAdd", list: "/tms/outboundOrder/listOutboundDetailByMainId", add: "/tms/outboundOrder/addTotal", edit: "/tms/outboundOrder/editTotal", }, classifyId: '' } }, created () { //å¤ä»½modelåå§å¼ this.modelDefault = JSON.parse(JSON.stringify(this.model)); }, mounted() { this.$bus.$on('selectionRows', (data) => { for (let i = 0; i < data.length; i++) { this.dataSource.push({ id: data[i].id, toolCode:data[i].toolCode, toolNum:data[i].toolNum, toolId: data[i].toolId, quantity: data[i].quantity, outboundQuantity: data[i].quantity, storageLocation: data[i].warehouseId, warehouseName: data[i].warehouseName, outboundLocation: data[i].positionCode }) } this.ipagination.total = this.dataSource.length }) }, methods: { handleTypeChange(value) { if (value === '1') { this.selectBorrowTool = true } if (value === '2') { this.selectBorrowTool = false } if (value === '3') { this.selectBorrowTool = false } if (value === '4') { this.selectBorrowTool = false } }, handleDelete(record, index) { this.dataSource.splice(index, 1) }, handleChange(value, key, column, index) { console.log(value, key, column, index) 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 === 'outboundQuantity'){ if(target['quantity']<value){ this.$message.error('åºåºæ°éä¸è½å¤§äºå¯ç¨åºå!') this.isDisabled = true }else{ this.isDisabled = false } } this.dataSource = temp } }, selectOutBoundTool() { console.log(this.dataSource) let ids = this.dataSource.map(item => item.id).join(',') this.$refs.selectOutBoundToolModal.showModal(ids, this.classifyId) }, add (nodeSelected) { this.addShow = false this.classifyId = nodeSelected.key this.model.classifyNum = nodeSelected.entity.classifyId this.model.classifyName = nodeSelected.entity.typeName this.dataSource = [] this.visible = true; }, close () { this.$emit('close'); this.addShow = true this.visible = false; this.$refs.form.clearValidate(); }, handleTableChange(pagination, filters, sorter) { this.ipagination = pagination }, handleOk () { // 触å表åéªè¯ this.$refs.form.validate(valid => { if (valid) { if (this.dataSource == null || this.dataSource.length === 0) { this.$message.warning('è¯·éæ©åºåºå·¥å ·!'); return } const params = this.dataSource.map(item => { return { toolLedgerDetailId: item.id, toolCode: item.toolCode, toolId: item.toolId, outboundQuantity: item.outboundQuantity, outStorehouseType: this.model.outStorehouseType, storageLocation: item.storageLocation } }) console.log(params) this.confirmLoading = true; postAction(this.url.outbound, params).then((res)=>{ if(res.success){ this.$message.success(res.message) this.$emit("ok") } else { this.$message.warning(res.message) } }).finally(() => { this.confirmLoading = false; this.close(); }) }else{ return false } }) }, handleCancel () { this.close() }, } } </script> src/views/tms/modules/outBound/OutboundOrderModal.vue
@@ -305,7 +305,7 @@ if (this.title === 'ç¼è¾') { ids = this.dataSource.map(item => item.toolLedgerDetailId).join(',') } this.$refs.selectOutBoundToolModal.showModal(ids) this.$refs.selectOutBoundToolModal.showOrderModal(ids) }, add () { this.addShow = false src/views/tms/modules/outBound/OutboundOrderSelectList.vue
@@ -171,7 +171,7 @@ ], url: { list: "/tms/outboundOrder/list", outbound: "/tms/outboundOrder/outBound", outbound: "/tms/outboundOrder/outBoundByApply", delete: "/tms/outboundOrder/delete", submit: "/tms/outboundOrder/submit", deleteBatch: "/tms/outboundOrder/deleteBatch",