From 16c5957f34016af1118d371933adaaa26e7bd83c Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期二, 27 五月 2025 14:13:51 +0800 Subject: [PATCH] 工具管理-工具出库:申请单出库 --- src/views/tms/modules/outBound/OutboundListLeft.vue | 322 ++++++++++++ src/views/tms/modules/outBound/OutboundDetailSelectList.vue | 215 ++++++++ src/views/tms/modules/outBound/OutboundOrderSelectList.vue | 330 +++++++++++++ src/views/tms/modules/outBound/OutboundListRight.vue | 530 +++++++++++++++++++++ src/views/tms/modules/outBound/JSelectOutboundToolModal.vue | 2 src/views/tms/OutboundList.vue | 39 + src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue | 3 7 files changed, 1,439 insertions(+), 2 deletions(-) diff --git a/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue b/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue index d84210a..99c918c 100644 --- a/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue +++ b/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue @@ -312,6 +312,7 @@ callback() { }, handCancel() { + this.assignFileStream = {} this.visible = false }, clearTableSource() { @@ -371,7 +372,7 @@ httpAction(url,flowTaskVo,method).then((res)=>{ if(res.success){ that.$message.success(res.message); - that.visible = false + this.handCancel() //鍒锋柊琛ㄦ牸 that.$emit('searchReset') }else{ diff --git a/src/views/tms/OutboundList.vue b/src/views/tms/OutboundList.vue new file mode 100644 index 0000000..642f1db --- /dev/null +++ b/src/views/tms/OutboundList.vue @@ -0,0 +1,39 @@ +<template> + <a-row + type="flex" + :gutter="16" + > + <a-col + :md="5" + :sm="24" + > + <outbound-list-left/> + </a-col> + <a-col + :md="24-5" + :sm="24" + > + <outbound-list-right/> + </a-col> + </a-row> +</template> + +<script> +import OutboundListLeft from './modules/outBound/OutboundListLeft.vue' +import OutboundListRight from './modules/outBound/OutboundListRight.vue' +export default { + name: 'OutboundList', + components: { OutboundListLeft, OutboundListRight }, + data() { + return { + description: '宸ュ叿鍑哄簱', + currentOrgCode: '' + } + }, + methods: {} +} +</script> + +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue b/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue index 2ffd5b2..6282992 100644 --- a/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue +++ b/src/views/tms/modules/outBound/JSelectOutboundToolModal.vue @@ -173,7 +173,7 @@ showModal(oldSelectRow) { this.oldSelectRow = oldSelectRow this.visible = true - this.queryParam.status = '1' + this.queryParam.quantity = 0 this.queryParam.excludeIds = oldSelectRow this.loadData(1) }, diff --git a/src/views/tms/modules/outBound/OutboundDetailSelectList.vue b/src/views/tms/modules/outBound/OutboundDetailSelectList.vue new file mode 100644 index 0000000..6ba9e73 --- /dev/null +++ b/src/views/tms/modules/outBound/OutboundDetailSelectList.vue @@ -0,0 +1,215 @@ +<template> + <a-card :bordered="false" :class="'cust-erp-sub-tab'"> + <div class="table-operator" v-if="mainId"> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" + @change="handleTableChange"> + + <span slot="action" slot-scope="text, record"> + <a @click="handleOutbound(record)">鍑哄簱</a> + </span> + </a-table> + </div> + + </a-card> +</template> + +<script> + + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import { postAction } from '../../../../api/manage' + + export default { + name: "OutboundDetailList", + mixins:[JeecgListMixin], + components: { + }, + props:{ + mainId:{ + type:String, + default:'', + required:false + } + }, + watch:{ + mainId:{ + immediate: true, + handler(val) { + if(!this.mainId){ + this.clearList() + }else{ + console.log('mainId',val) + this.queryParam['outStorehouseId'] = val + this.queryParam.status = ['1','2'].join(',') + this.loadData(1); + } + } + } + }, + data () { + return { + description: 'tms_outbound_order绠$悊椤甸潰', + disableMixinCreated:true, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key:'rowIndex', + width:30, + align:"center", + customRender:function (t,r,index) { + return parseInt(index)+1; + } + }, + { + title:'宸ュ叿缂栫爜', + align:"left", + dataIndex: 'toolNum' + }, + { + title:'宸ュ叿缂栧彿', + align:"left", + dataIndex: 'toolId' + }, + { + title:'宸ュ叿绫诲瀷', + align:"center", + dataIndex: 'applicationType_dictText' + }, + { + title:'涓枃鍚嶇О', + align:"center", + dataIndex: 'chineseName' + }, + { + title:'鍨嬪彿/鍥惧彿', + align:"left", + dataIndex: 'toolModel' + }, + { + title:'鐢宠鍑哄簱鏁伴噺', + align:"left", + dataIndex: 'outboundQuantity' + }, + // { + // title:'宸插嚭搴撴暟閲�', + // align:"left", + // dataIndex: 'outActualCount' + // }, + { + title:'鍑哄簱鐘舵��', + align:"center", + dataIndex: 'status_dictText' + }, + { + title:'鍒�鍏锋潗鏂�', + align:"center", + dataIndex: 'toolMaterial' + }, + { + title:'闆朵欢鏉愭枡', + align:"center", + dataIndex: 'partMaterial' + }, + { + title:'鍘傚', + align:"center", + dataIndex: 'supplierId' + }, + { + title:'浠撳簱', + align:"center", + dataIndex: 'warehouseName' + }, + { + title:'鍑哄簱搴撲綅', + align:"center", + dataIndex: 'outboundLocation' + }, + // { + // title:'鍙敤搴撳瓨鏁伴噺', + // align:"left", + // dataIndex: 'quantity' + // }, + { + title:'鍒涘缓鏃堕棿', + align:"left", + dataIndex: 'createTime' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:50, + scopedSlots: { customRender: 'action' }, + } + ], + url: { + list: "/tms/outboundOrder/listOutboundDetailByMainId", + outbound: "/tms/outboundOrder/outBound", + delete: "/tms/outboundOrder/deleteOutboundDetail", + deleteBatch: "/tms/outboundOrder/deleteBatchOutboundDetail", + exportXlsUrl: "/tms/outboundOrder/exportOutboundDetail", + importUrl: "/tms/outboundOrder/importOutboundDetail", + }, + dictOptions:{ + outStorehouseType:[], + } + } + }, + created() { + }, + computed: { + importExcelUrl(){ + return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; + } + }, + methods: { + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + this.$emit('select-change', selectedRowKeys, selectionRows) + }, + clearList(){ + this.dataSource=[] + this.selectedRowKeys=[] + this.ipagination.current = 1 + }, + handleOutbound(record) { + console.log(this.mainId) + console.log(record) + const params = [ + { + outBoundOrderId: this.mainId, + outboundDetailId: record.id, + outboundQuantity: record.outboundQuantity + } + ] + postAction(this.url.outbound, params).then(res=>{ + if(res.success){ + this.loadData(1) + this.$emit("ok") + this.$message.success(res.message) + }else{ + this.$message + } + }) + } + + } + } +</script> +<style scoped> + @import '~@assets/less/common.less' +</style> diff --git a/src/views/tms/modules/outBound/OutboundListLeft.vue b/src/views/tms/modules/outBound/OutboundListLeft.vue new file mode 100644 index 0000000..61a2487 --- /dev/null +++ b/src/views/tms/modules/outBound/OutboundListLeft.vue @@ -0,0 +1,322 @@ +<template> + <a-card + :loading="cardLoading" + :bordered="false" + title="宸ュ叿淇℃伅" + style="height: 100%;" + > + <a-spin :spinning="loading"> + <a-alert + type="info" + :showIcon="true" + style="margin-right: 54px;" + > + <div slot="message"> + 褰撳墠锛�<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span> + <a + v-if="this.currSelected.title" + style="margin-left: 10px" + @click="onClearSelected" + >鍙栨秷</a> + </div> + </a-alert> + <div class="drawer-bootom-button"> + <a-dropdown + :trigger="['click']" + placement="bottomCenter" + > + <a-menu slot="overlay"> + <a-menu-item + key="1" + @click="expandAll" + >灞曞紑鎵�鏈�</a-menu-item> + <a-menu-item + key="2" + @click="closeAll" + >鍚堝苟鎵�鏈�</a-menu-item> + <a-menu-item + key="3" + @click="refreshTree" + >鍒锋柊</a-menu-item> + </a-menu> + <a-button> + <a-icon type="bars" /> + </a-button> + </a-dropdown> + </div> + + <a-input-search + @search="handleSearch" + style="width:100%;margin-top: 10px" + placeholder="妫�绱㈠伐鍏峰垎绫�" + allowClear + v-model="searchInput" + @change="handleChange" + /> + + <!-- showLine --> + <a-tree + :checkStrictly="checkStrictly" + :expandedKeys.sync="expandedKeys" + :selectedKeys="selectedKeys" + :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" + :treeData="treeDataSource" + :autoExpandParent="autoExpandParent" + @select="onSelect" + @expand="onExpand" + > + <template + slot="title" + slot-scope="{title, type, rfield1}" + > + <Tooltip + placement="top" + title="宸ュ叿鍒嗙被" + > + <i + v-if="type == 0" + class="action-jeecg actioncompany2" + style="font-size: 18px;" + /> + </Tooltip> + + <span v-if="title.indexOf(searchValue) > -1"> + {{ title.substr(0, title.indexOf(searchValue)) }} + <span class="replaceSearch">{{ searchValue }}</span> + {{ title.substr(title.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ title }}</span> + + </template> + </a-tree> + </a-spin> + </a-card> +</template> + +<script> +import { getAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' +export default { + name: 'OutboundListLeft', + components: { + Tooltip, + }, + props: ['value'], + data() { + return { + searchInput: '', + cardLoading: false, + loading: false, + treeDataSource: [], + selectedKeys: [], + expandedKeys: [], + url: { + factoryTreeList: '/tms/toolsClassify/loadTree', + }, + searchValue: '', + dataList: [], + autoExpandParent: true, + checkStrictly: true, + allTreeKeys: [], + currSelected: {}, + hiding: false, + } + }, + created() { + this.queryTreeData(); + this.closeAll(); + }, + methods: { + getCurrSelectedTitle() { + return !this.currSelected.title ? '' : this.currSelected.title; + }, + onClearSelected() { + this.hiding = true; + this.currSelected = {}; + this.selectedKeys = []; + }, + onSelect(selectedKeys, e) { + this.hiding = false; + let record = e.node.dataRef; + this.currSelected = Object.assign({}, record); + this.selectedKeys = [record.key]; + }, + onExpand(expandedKeys) { + this.expandedKeys = expandedKeys; + this.autoExpandParent = false; + }, + queryTreeData() { + this.loading = true; + this.cardLoading = true; + getAction(this.url.factoryTreeList).then((res) => { + if (res.success) { + this.dataList = []; + this.allTreeKeys = []; + this.treeDataSource = res.result; + this.generateList(res.result); + } else { + this.$message.warn(res.message); + } + }).finally(() => { + this.loading = false; + this.cardLoading = false; + }) + }, + + handleChange() { + let search = this.searchInput; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + handleSearch(value) { + let search = value; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + getParentKey(key, tree) { + let parentKey; + for (let i = 0; i < tree.length; i++) { + const node = tree[i]; + if (node.children) { + if (node.children.some(item => item.key === key)) { + parentKey = node.key; + } else if ( + this.getParentKey(key, node.children)) { + parentKey = this.getParentKey(key, node.children); + } + } + } + return parentKey; + }, + + generateList(data) { + for (let i = 0; i < data.length; i++) { + const node = data[i]; + const key = node.key; + const title = node.title; + this.dataList.push({ key, title: title }); + this.allTreeKeys.push(key); + if (node.children) { + this.generateList(node.children); + } + } + }, + expandAll() { + this.expandedKeys = this.allTreeKeys; + }, + closeAll() { + this.expandedKeys = this.allSiteIds; + }, + refreshTree() { + this.queryTreeData(); + } + }, + mounted() { + this.$bus.$on('queryTreeData', this.queryTreeData); + }, + //鐩戝惉 + watch: { + currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + this.$bus.$emit('getCurrSelected', val) + }, + } +} +</script> + +<style scoped> +.replaceSearch { + color: #40a9ff; + font-weight: bold; + background-color: rgb(204, 204, 204); +} +/*闅愯棌鏍戠殑榛樿icon*/ +.ant-tree-switcher-noop { + display: none !important; +} +/*闅愯棌鏍戠殑榛樿绔栫嚎*/ +.ant-tree.ant-tree-show-line li:not(:last-child):before { + border-left: 0px; +} + +.ant-card-body .table-operator { + margin: 15px; +} + +.anty-form-btn { + width: 100%; + text-align: center; +} + +.anty-form-btn button { + margin: 0 5px; +} + +.anty-node-layout .ant-layout-header { + padding-right: 0; +} + +.header { + padding: 0 8px; +} + +.header button { + margin: 0 3px; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +#app .desktop { + height: auto !important; +} + +/** Button鎸夐挳闂磋窛 */ +.ant-btn { + margin-left: 3px; +} +.ant-alert { + padding: 5px 15px 5px 37px; +} +.drawer-bootom-button { + position: absolute; + top: 1px; + /* padding: 10px 16px; */ + text-align: left; + right: 0; + background: #fff; + border-radius: 0 0 2px 2px; +} +</style> \ No newline at end of file diff --git a/src/views/tms/modules/outBound/OutboundListRight.vue b/src/views/tms/modules/outBound/OutboundListRight.vue new file mode 100644 index 0000000..c12bce1 --- /dev/null +++ b/src/views/tms/modules/outBound/OutboundListRight.vue @@ -0,0 +1,530 @@ +<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="宸ュ叿缂栧彿" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ伐鍏风紪鍙锋绱�" + v-model="queryParam.toolCode" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item + label="鍨嬪彿/鍥惧彿" + :labelCol="{span: 5}" + :wrapperCol="{span: 18, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ瀷鍙�/鍥惧彿妫�绱�" + v-model="queryParam.toolModel" + ></a-input> + </a-form-item> + </a-col> + <a-col :md="6" :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> + </span> + </a-col> + + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <Tooltip + placement="top" + title="閫夋嫨宸ュ叿鍒嗙被鍚庡啀鎵ц鏂板" + > + <a-button @click="handleAdd(nodeSelected)" type="primary" icon="plus" :disabled="!nodeSelected.key || nodeSelected.entity.leafFlag === '2'">鏂板</a-button> + </Tooltip> + <a-button type="primary" @click="selectOutboundOrder">鐢宠鍗曞嚭搴�</a-button> + <a-button type="primary" icon="download" @click="handleExportXls('tms_tools_classify')">瀵煎嚭</a-button> + <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> + <a-button type="primary" icon="import">瀵煎叆</a-button> + </a-upload> + </div> + + <!-- table鍖哄煙-begin --> + <div> + + <a-table + ref="table" + size="middle" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" + class="j-table-force-nowrap" + @change="handleTableChange"> + +<!-- <template slot="htmlSlot" slot-scope="text">--> +<!-- <div v-html="text"></div>--> +<!-- </template>--> +<!-- <template slot="imgSlot" slot-scope="text,record">--> +<!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犲浘鐗�</span>--> +<!-- <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>--> +<!-- </template>--> +<!-- <template slot="fileSlot" slot-scope="text">--> +<!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">鏃犳枃浠�</span>--> +<!-- <a-button--> +<!-- v-else--> +<!-- :ghost="true"--> +<!-- type="primary"--> +<!-- icon="download"--> +<!-- size="small"--> +<!-- @click="downloadFile(text)">--> +<!-- 涓嬭浇--> +<!-- </a-button>--> +<!-- </template>--> + + <span slot="action" slot-scope="text, record"> + <a @click="handleDetail(record)">璇︽儏</a> + </span> + + </a-table> + </div> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane key="1"> + <span slot="tab"> + <a-badge>鍙傛暟 </a-badge> + </span> + <para-hole-tools-list ref="paraHoleToolsList"></para-hole-tools-list> + <para-threading-tool-list ref="paraThreadingToolList"></para-threading-tool-list> + <para-mill-tool-list ref="paraMillToolList"></para-mill-tool-list> + <para-turning-tools-list ref="paraTurningToolsList"></para-turning-tools-list> + <para-blade-list ref="paraBladeList"></para-blade-list> + <para-common-tool-list ref="paraCommonToolList"></para-common-tool-list> + </a-tab-pane> + + <a-tab-pane + key="2" + forceRender + > + <span slot="tab"> + <a-badge>绠$悊鍙傛暟 </a-badge> + </span> + <tools-config-property-list ref="toolsConfigPropertyList"></tools-config-property-list> + </a-tab-pane> + </a-tabs> + + <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> + +<script> + + import '@/assets/less/TableExpand.less' + import { mixinDevice } from '@/utils/mixin' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import BaseToolsModal from '../baseTools/BaseToolsModal' + import Tooltip from 'ant-design-vue/es/tooltip' + import { getAction, postAction, deleteAction, requestPut } from '@api/manage' + 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' + import ParaThreadingToolList from '../baseTools/ParaThreadingToolList' + import ParaTurningToolsList from '../baseTools/ParaTurningToolsList' + import ParaCommonToolList from '../baseTools/ParaCommonToolList' + import ParaBladeList from '../baseTools/ParaBladeList' + + export default { + name: 'OutboundListRight', + mixins:[JeecgListMixin, mixinDevice], + components: { + OutboundOrderSelectList, + BaseToolsModal, + Tooltip, + ParaHoleToolsModal, + ParaMillToolModal, + ParaThreadingToolModal, + ParaTurningToolsModal, + ToolsConfigPropertyModal, + ParaCommonToolModal, + ParaBladeModal, + ParaHoleToolsList, + ToolsConfigPropertyList, + ParaMillToolList, + ParaThreadingToolList, + ParaTurningToolsList, + ParaCommonToolList, + ParaBladeList + }, + 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: 'toolCode' + }, + { + title:'宸ュ叿缂栧彿', + align:"center", + dataIndex: 'toolId' + }, + { + title:'宸ュ叿绫诲瀷', + align:"center", + dataIndex: 'signCode' + }, + { + title:'涓枃鍚嶇О', + align:"center", + dataIndex: 'chineseName' + }, + { + title:'鍨嬪彿/鍥惧彿', + align:"center", + dataIndex: 'toolModel' + }, + { + title:'鍒�鍏锋潗鏂�', + align:"center", + dataIndex: 'toolMaterial' + }, + { + title:'闆朵欢鏉愭枡', + align:"center", + dataIndex: 'partMaterial' + }, + { + title:'鍑哄簱绫诲瀷', + align:"center", + dataIndex: 'outStorehouseType_dictText' + }, + { + title:'搴撲綅鍙�', + align:"center", + dataIndex: 'goodsShelvesCode' + }, + { + title:'鍑哄簱鏁伴噺', + align:"center", + dataIndex: 'outNumber' + }, + { + title:'鍒涘缓浜�', + align:"center", + dataIndex: 'createBy' + }, + { + title:'鍒涘缓鏃堕棿', + align:"center", + dataIndex: 'createTime' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align:"center", + fixed:"right", + width:147, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/tms/outStoreDetail/list", + paraHolesToolsList:"/tms/baseTools/paraHolesToolsList", + paraCommonToolList:"/tms/baseTools/paraCommonToolList", + paraThreadingToolList:"/tms/baseTools/paraThreadingToolList", + paraMillToolList:"/tms/baseTools/paraMillToolList", + paraTurningToolsList:"/tms/baseTools/paraTurningToolsList", + paraBladeList:"/tms/baseTools/paraBladeList", + delete: "/tms/baseTools/delete", + deleteBatch: "/tms/baseTools/deleteBatch", + edit: '/tms/baseTools/edit', + exportXlsUrl: "/tms/baseTools/exportXls", + importExcelUrl: "tms/baseTools/importExcel", + queryParaByToolCode:"/tms/baseTools/queryByToolCode", + queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode" + }, + dictOptions:{}, + superFieldList:[], + nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹� + paraTypeFlag:'' + } + }, + created() { + this.$bus.$on('getCurrSelected', (data) => { + console.log(data) + //getCurrSelected 浜嬩欢 鎺ユ敹缁勪欢浼犻�掔殑鍙傛暟 + this.nodeType = (data.type == undefined ? 0 : data.type); + this.paraTypeFlag = (data.entity == undefined ? 0 : data.entity.paraTypeFlag) + this.nodeSelected = data; + this.loadData() + this.clearPara() + }) + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + }, + methods: { + selectOutboundOrder() { + this.$refs.outboundOrderSelectList.openSelect(); + }, + 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 = "鏂板閾e墛宸ュ叿"; + 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; + } + }, + handleDelete(id) { + deleteAction(this.url.delete, {id: id}).then((res) => { + if (res.success) { + //閲嶆柊璁$畻鍒嗛〉闂 + this.loadData() + this.$message.success(res.message); + this.$bus.$emit('queryTreeData') + this.clearPara() + } else { + this.$message.warning(res.message); + } + }); + }, + selectListOK() { + this.loadData() + }, + modalFormOk() { + this.loadData(); // 鍒锋柊琛ㄦ牸鏁版嵁 + this.$bus.$emit('queryTreeData') //鍒锋柊宸︿晶鏍� + }, + onSelectChange(selectedRowKeys) { + this.selectedRowKeys = selectedRowKeys; + //閫氳繃id鏌ヨ绠$悊鍙傛暟鍜屽弬鏁版暟鎹� + getAction(this.url.queryParaByToolCode, { toolCode: this.selectedRowKeys[0],paraTypeFlag:this.paraTypeFlag}).then((res) => { + if (res.success) { + if(this.paraTypeFlag === "1"){ + this.$refs.paraCommonToolList.getPara(res.result); + }else if(this.paraTypeFlag === "2"){ + this.$refs.paraHoleToolsList.getPara(res.result); + }else if(this.paraTypeFlag === "3"){ + this.$refs.paraThreadingToolList.getPara(res.result); + }else if(this.paraTypeFlag === "4"){ + this.$refs.paraMillToolList.getPara(res.result); + }else if(this.paraTypeFlag === "5"){ + this.$refs.paraTurningToolsList.getPara(res.result); + }else if(this.paraTypeFlag === "6"){ + this.$refs.paraBladeList.getPara(res.result); + } + } else { + this.$message.warning(res.message); + } + }) + getAction(this.url.queryByToolCode, { toolCode: this.selectedRowKeys[0]}).then((res) => { + if (res.success) { + this.$refs.toolsConfigPropertyList.getPara(res.result); + } else { + this.$message.warning(res.message); + } + }) + + }, + // 澶勭悊缂栬緫鎸夐挳鐐瑰嚮浜嬩欢 + handleEditSelected() { + if (this.selectedRowKeys.length === 0) { + this.$message.warning('璇烽�夋嫨涓�鏉¤褰曡繘琛岀紪杈�'); + return; + } + const selectedRecord = this.dataSource.find(item => item.id === this.selectedRowKeys[0]); + 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 = []; + this.nodeSelected = {}; // 娓呯┖閫変腑鐨勮妭鐐� + this.dataSource = []; // 娓呯┖琛ㄦ牸鏁版嵁 + }, + //閲嶇疆 + searchReset() { + this.queryParam = {} + this.loadData(1); + this.clearPara() + }, + //娓呯┖閫変腑鍙婂弬鏁� + clearPara(){ + this.selectedRowKeys = [] + this.$refs.paraCommonToolList.visable = false + this.$refs.paraHoleToolsList.visable = false + this.$refs.paraThreadingToolList.visable = false + this.$refs.paraMillToolList.visable = false + this.$refs.paraTurningToolsList.visable = false + this.$refs.paraBladeList.visable = false + this.$refs.toolsConfigPropertyList.visable = false + } + + }, + } +</script> +<style scoped> + @import '~@assets/less/common.less'; + .enable { + color: green; + } + .disable { + color: red; + } +</style> \ No newline at end of file diff --git a/src/views/tms/modules/outBound/OutboundOrderSelectList.vue b/src/views/tms/modules/outBound/OutboundOrderSelectList.vue new file mode 100644 index 0000000..00e1f3e --- /dev/null +++ b/src/views/tms/modules/outBound/OutboundOrderSelectList.vue @@ -0,0 +1,330 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + :confirmLoading="confirmLoading" + switchFullscreen + @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 :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍑哄簱鍗曠紪鍙�"> + <a-input placeholder="璇疯緭鍏ュ嚭搴撳崟缂栧彿" v-model="queryParam.outNum"></a-input> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍑哄簱绫诲瀷"> + <j-dict-select-tag placeholder="璇烽�夋嫨鍑哄簱绫诲瀷" v-model="queryParam.outStorehouseType" dictCode="out_storehouse_type"/> + </a-form-item> + </a-col> + <template v-if="toggleSearchStatus"> + </template> + <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-button type="primary" @click="handleOutbound" 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 --> + + <!-- 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="null" + :customRow="clickThenSelect" + @change="handleTableChange"> + + </a-table> + </div> + + <a-tabs defaultActiveKey="1"> + <a-tab-pane tab="鍑哄簱鐢宠鍗曟槑缁�" key="1" > + <OutboundDetailSelectList + ref="outboundDetailSelectList" :mainId="outboundDetailMainId" @ok="detailSelectListOK" + @select-change="handleDetailSelectChange" + /> + </a-tab-pane> + </a-tabs> + + </j-modal> +</template> + +<script> + + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import { getAction, deleteAction } from '@/api/manage' + import OutboundDetailSelectList from './OutboundDetailSelectList' + import {initDictOptions,filterMultiDictText} from '@/components/dict/JDictSelectUtil' + import '@/assets/less/TableExpand.less' + import { postAction } from '../../../../api/manage' + + export default { + name: "OutboundOrderSelectList", + mixins:[JeecgListMixin], + components: { + OutboundDetailSelectList + }, + data () { + return { + title: '閫夋嫨鍑哄簱鍗曠敵璇�', + width: 1200, + visible: false, + disableSubmit: false, + confirmLoading: false, + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title:'鍑哄簱绫诲瀷', + align:"center", + dataIndex: 'outStorehouseType_dictText', + }, + { + title:'鍑哄簱鍗曠紪鍙�', + align:"left", + dataIndex: 'outNum' + }, + { + title:'鍗曟嵁鐘舵��', + align:"center", + dataIndex: 'orderStatus_dictText' + }, + { + title:'缁忔墜浜�', + align:"center", + dataIndex: 'handler_dictText' + }, + { + title:'瀹℃牳浜�', + align:"center", + dataIndex: 'reviewer_dictText' + }, + { + title:'瀹℃牳鏃堕棿', + align:"left", + dataIndex: 'auditDate' + }, + { + title:'瀹℃牳鎰忚', + align:"center", + dataIndex: 'approvalOpinion' + }, + { + title:'鐢宠鍑哄簱鏃堕棿', + align:"left", + dataIndex: 'outboundTime' + }, + { + title:'鍑哄簱鐘舵��', + align:"center", + dataIndex: 'outStatus_dictText' + }, + { + title:'棰嗙敤浜嬬敱', + align:"center", + dataIndex: 'subjectMatter' + }, + { + title:'澶囨敞', + align:"center", + dataIndex: 'remark' + }, + { + title:'鎿嶄綔鍛�', + align:"center", + dataIndex: 'createBy' + }, + { + title:'鍒涘缓鏃堕棿', + align:"left", + dataIndex: 'createTime' + } + ], + url: { + list: "/tms/outboundOrder/list", + outbound: "/tms/outboundOrder/outBound", + delete: "/tms/outboundOrder/delete", + submit: "/tms/outboundOrder/submit", + deleteBatch: "/tms/outboundOrder/deleteBatch", + exportXlsUrl: "/tms/outboundOrder/exportXls", + importExcelUrl: "tms/outboundOrder/importExcel", + }, + dictOptions:{ + outStorehouseType:[], + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination:{ + current: 1, + pageSize: 5, + pageSizeOptions: ['5', '10', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + selectedMainId:'', + superFieldList:[], + outboundDetailMainId: '', + } + }, + created() { + this.getSuperFieldList(); + }, + computed: { + importExcelUrl: function(){ + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + openSelect() { + this.loadData() + this.visible = true + }, + modalFormOk() { + this.$refs.outboundDetailSelectList.clearList() + this.loadData(); + }, + detailSelectListOK() { + this.loadData() + }, + searchReset() { + this.queryParam = {} + this.onClearSelected() + this.$refs.outboundDetailSelectList.clearList() + this.loadData(1); + }, + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); + } + } + } + }, + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + this.selectedMainId = '' + this.outboundDetailMainId = '' + }, + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedMainId=selectedRowKeys[0] + this.outboundDetailMainId = selectionRows[0]['id'] + }, + handleDetailSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + }, + handleOutbound() { + if (this.selectionRows.length < 1) { + this.$message.warning("璇烽�夋嫨鏄庣粏鍚庡啀鍑哄簱锛�") + return + } + const params = this.selectionRows.map((item) => { + return { + outBoundOrderId: this.selectedMainId, + outboundDetailId: item.id, + outboundQuantity: item.outboundQuantity + } + }) + postAction(this.url.outbound, params).then(res=>{ + if (res.success) { + this.$message.success(res.message); + this.onClearSelected() + this.$refs.outboundDetailSelectList.clearList() + this.$emit("ok") + this.visible = false + } else { + this.$message.warning(res.message); + } + }) + }, + handleCancel () { + this.close() + }, + close () { + this.$emit('close'); + this.onClearSelected() + this.addShow = true + this.visible = false; + // this.$refs.form.clearValidate(); + }, + loadData(arg) { + if(!this.url.list){ + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + this.onClearSelected() + this.queryParam.orderStatus = '3' + this.queryParam.outStatus = '1' + 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; + }) + }, + getSuperFieldList(){ + let fieldList=[]; + fieldList.push({type:'string',value:'outNum',text:'鍑哄簱鍗曠紪鍙�',dictCode:''}) + fieldList.push({type:'string',value:'outStorehouseType',text:'鍑哄簱绫诲瀷',dictCode:'out_storehouse_type'}) + fieldList.push({type:'string',value:'handler',text:'缁忔墜浜�',dictCode:''}) + fieldList.push({type:'sel_user',value:'reviewer',text:'瀹℃牳浜�'}) + fieldList.push({type:'string',value:'orderStatus',text:'鍗曞瓙鐘舵��',dictCode:''}) + fieldList.push({type:'date',value:'auditDate',text:'瀹℃牳鏃堕棿'}) + fieldList.push({type:'string',value:'approvalOpinion',text:'瀹℃牳鎰忚',dictCode:''}) + fieldList.push({type:'string',value:'subjectMatter',text:'棰嗙敤浜嬬敱',dictCode:''}) + fieldList.push({type:'date',value:'outboundTime',text:'鍑哄簱鏃堕棿'}) + fieldList.push({type:'string',value:'remark',text:'澶囨敞',dictCode:''}) + fieldList.push({type:'string',value:'createBy',text:'鎿嶄綔鍛�',dictCode:''}) + fieldList.push({type:'date',value:'createTime',text:'鍒涘缓鏃堕棿'}) + this.superFieldList = fieldList + } + } + } +</script> +<style scoped> + @import '~@assets/less/common.less' +</style> \ No newline at end of file -- Gitblit v1.9.3