From 49b8b52ae6dfb28e3e9a741bb277c231bd13418d Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期五, 04 七月 2025 15:51:45 +0800 Subject: [PATCH] 库存明细出库 --- zy-asrs-admin/src/views/out/flat/index.vue | 361 +++++++++++++++++++++++++-------------------------- 1 files changed, 176 insertions(+), 185 deletions(-) diff --git a/zy-asrs-admin/src/views/out/flat/index.vue b/zy-asrs-admin/src/views/out/flat/index.vue index d556efe..dc7f0fc 100644 --- a/zy-asrs-admin/src/views/out/flat/index.vue +++ b/zy-asrs-admin/src/views/out/flat/index.vue @@ -2,24 +2,18 @@ <div class="table-header"> <div style="display: flex;padding: 10px;"> <div style="margin-right: 10px;"> - <a-input v-model:value="searchParam.pickNo" - placeholder="璇疯緭鎷h揣鍗曠紪鍙�" - style="width: 200px;margin-right: 10px;"/> - <a-input v-model:value="searchParam.waveNo" placeholder="璇疯緭鍏ユ尝娆″彿" - style="width: 200px;" /> + <a-input v-model:value="searchParam.pickNo" placeholder="璇疯緭鎷h揣鍗曠紪鍙�" + style="width: 200px;margin-right: 10px;" /> + <a-input v-model:value="searchParam.waveNo" placeholder="璇疯緭鍏ユ尝娆″彿" style="width: 200px;" /> <a-button @click="queryPickSheets" type="primary" style="margin-left: 35px">鏌ヨ</a-button> </div> </div> </div> - <a-table :columns="columns" - :data-source="datasource" bordered - :defaultExpandAllRows="false" - :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" - :scroll="{y: columns.length * 140}" - style="margin: 5px" - > - <template #bodyCell="{column, record, index}"> + <a-table :columns="columns" :data-source="datasource" bordered :defaultExpandAllRows="false" + :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" + :scroll="{ y: columns.length * 140 }" style="margin: 5px"> + <template #bodyCell="{ column, record, index }"> <template v-if="column.key === 'number'"> {{ index + 1 }} </template> @@ -38,7 +32,7 @@ </template> </a-table> <a-modal ref="sheetDetl" v-model:open="show" :width="'80%'" title="鎷h揣鍗曟槑缁�" @ok="handleOk" @cancel="cancel" - :okText="isPrint ? '鎵撳嵃' : '纭'" cancel-text="鍏抽棴"> + :okText="isPrint ? '鎵撳嵃' : '纭'" cancel-text="鍏抽棴"> <div id="pcik-detl"> <div class="component-header"> <div> @@ -50,15 +44,11 @@ </h3> </div> <div class="qrcode"> - <a-qrcode :value="selectDetl.pickNo" :size="100" :bordered="false"/> + <a-qrcode :value="selectDetl.pickNo" :size="100" :bordered="false" /> </div> </div> - <a-table :columns="childNodes" - :data-source="childList" - bordered - :pagination="{hideOnSinglePage: true}" - > - <template #bodyCell="{column, record, index}"> + <a-table :columns="childNodes" :data-source="childList" bordered :pagination="{ hideOnSinglePage: true }"> + <template #bodyCell="{ column, record, index }"> <template v-if="column.key === 'number'"> {{ index + 1 }} </template> @@ -74,183 +64,184 @@ </template> <script> - import {post, get} from "@/utils/request.js"; - import {message, Modal} from "ant-design-vue"; - import {createVNode} from 'vue'; - import {ExclamationCircleOutlined} from '@ant-design/icons-vue'; - import printJS from 'print-js' +import { post, get } from "@/utils/request.js"; +import { message, Modal } from "ant-design-vue"; +import { createVNode } from 'vue'; +import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; +import printJS from 'print-js' - export default { - name: "out-stock-flat", - data() { - return { - searchParam: { - pickNo: '', - waveNo:'' - }, - state: { - selectedRowKeys: [] - }, - searchInput: '', - columns: [ - {key: 'number', title: '搴忓彿', dataIndex: 'number', align: 'center', width: '65px'}, - {key: 'pickNo', title: '鍗曞彿', dataIndex: 'pickNo', align: 'center', width: '205px'}, - {key: 'waveNo', title: '娉㈡鍙�', dataIndex: 'waveNo', align: 'center', width: '155px'}, - {key: 'anfme', title: '鏁伴噺', dataIndex: 'anfme', align: 'center', width: '85px'}, - {key: 'status', title: '鍗曟嵁鐘舵��', dataIndex: 'status', align: 'center', width: '105px'}, - {key: 'createdTime', title: '鍒涘缓鏃堕棿', dataIndex: 'createdTime', align: 'center', width: '185px'}, - {key: 'updatedTime', title: '淇敼鏃堕棿', dataIndex: 'updatedTime', align: 'center', width: '185px'}, - {key: 'memo', title: '澶囨敞', dataIndex: '', align: 'center'}, - { - key: 'operate', - title: '鎿嶄綔', - dataIndex: 'operate', - fixed: 'right', - align: 'center', - width: '155px' - } - ], - childNodes: [ - {key: 'number', title: '搴忓彿', dataIndex: 'number'}, - {key: 'maktx', title: '鐗╂枡鍚嶇О', dataIndex: 'maktx'}, - {key: 'matnr', title: '鐗╂枡缂栫爜', dataIndex: 'matnr'}, - {key: 'batch', title: '鎵瑰彿', dataIndex: 'batch'}, - {key: 'locNo', title: '搴撲綅', dataIndex: 'locNo'}, - {key: 'barcode', title: '鎷栫洏鐮�', dataIndex: 'barcode'}, - {key: 'anfme', title: '鏁伴噺', dataIndex: 'anfme'}, - {key: 'memo', title: '澶囨敞', dataIndex: ''}, - {key: 'status', title: '鍗曟嵁鐘舵��', dataIndex: 'status'}, - // {key: 'operate', title: '鎿嶄綔', dataIndex: 'operate'} - ], - datasource: [], - childList: [], - show: false, - isPrint: false, - selectDetl: {}, +export default { + name: "out-stock-flat", + data() { + return { + searchParam: { + pickNo: '', + waveNo: '' + }, + state: { + selectedRowKeys: [] + }, + searchInput: '', + columns: [ + { key: 'number', title: '搴忓彿', dataIndex: 'number', align: 'center', width: '65px' }, + { key: 'pickNo', title: '鍗曞彿', dataIndex: 'pickNo', align: 'center', width: '205px' }, + { key: 'waveNo', title: '娉㈡鍙�', dataIndex: 'waveNo', align: 'center', width: '205px' }, + { key: 'type$', title: '绫诲瀷', dataIndex: 'type$', align: 'center', width: '155px' }, + { key: 'anfme', title: '鏁伴噺', dataIndex: 'anfme', align: 'center', width: '85px' }, + { key: 'status', title: '鍗曟嵁鐘舵��', dataIndex: 'status', align: 'center', width: '105px' }, + { key: 'createdTime', title: '鍒涘缓鏃堕棿', dataIndex: 'createdTime', align: 'center', width: '185px' }, + { key: 'updatedTime', title: '淇敼鏃堕棿', dataIndex: 'updatedTime', align: 'center', width: '185px' }, + { key: 'memo', title: '澶囨敞', dataIndex: '', align: 'center' }, + { + key: 'operate', + title: '鎿嶄綔', + dataIndex: 'operate', + fixed: 'right', + align: 'center', + width: '155px' + } + ], + childNodes: [ + { key: 'number', title: '搴忓彿', dataIndex: 'number' }, + { key: 'maktx', title: '鐗╂枡鍚嶇О', dataIndex: 'maktx' }, + { key: 'matnr', title: '鐗╂枡缂栫爜', dataIndex: 'matnr' }, + { key: 'batch', title: '鎵瑰彿', dataIndex: 'batch' }, + { key: 'locNo', title: '搴撲綅', dataIndex: 'locNo' }, + { key: 'barcode', title: '鎷栫洏鐮�', dataIndex: 'barcode' }, + { key: 'anfme', title: '鏁伴噺', dataIndex: 'anfme' }, + { key: 'memo', title: '澶囨敞', dataIndex: '' }, + { key: 'status', title: '鍗曟嵁鐘舵��', dataIndex: 'status' }, + // {key: 'operate', title: '鎿嶄綔', dataIndex: 'operate'} + ], + datasource: [], + childList: [], + show: false, + isPrint: false, + selectDetl: {}, + } + }, + mounted() { + //鑾峰彇鎷h揣鍗曟暟鎹簮 + this.getOutFlatSheet(); + }, + + methods: { + queryPickSheets() { + this.getOutFlatSheet() + }, + + handleOk() { + if (this.isPrint) { + printJS('pcik-detl', 'html') } }, - mounted() { - //鑾峰彇鎷h揣鍗曟暟鎹簮 - this.getOutFlatSheet(); + + cancel() { + this.isPrint = false + }, + onSelectChange(selectedRowKeys) { + state.selectedRowKeys = selectedRowKeys; + + }, + /** + * 鎵撳嵃 + */ + handlePrint(column, record) { + this.show = true + this.isPrint = true + this.selectDetl = record + this.getSheetDetl(record) + }, + /** + * 鎼滅储 + */ + onSearch() { + console.log(this) }, - methods: { - queryPickSheets() { - this.getOutFlatSheet() - }, + showDeleteConfirm(record) { + let that = this + Modal.confirm({ + title: '鏄惁纭鍒犻櫎褰撳墠鎷h揣鍗�', + icon: createVNode(ExclamationCircleOutlined), + content: '杩炲悓鏄庣粏涓�璧峰垹闄�', + okText: '纭', + okType: 'danger', + cancelText: '鍙栨秷', + onOk() { + that.removeRow(record) + }, + onCancel() { + console.log('Cancel'); + }, + }); + }, - handleOk() { - if (this.isPrint) { - printJS('pcik-detl', 'html') + //鍒犻櫎褰撳墠琛� + removeRow(record) { + let that = this + get('/api/pick/flat/remove/' + record.id).then((resp) => { + let result = resp.data; + if (result.code == 200) { + that.getOutFlatSheet() + message.success(formatMessage('page.delete.success', '鍒犻櫎鎴愬姛')); + } else { + message.error(result.msg); } - }, - - cancel() { - this.isPrint = false - }, - onSelectChange(selectedRowKeys) { - state.selectedRowKeys = selectedRowKeys; - - }, - /** - * 鎵撳嵃 - */ - handlePrint(column, record) { - this.show = true - this.isPrint = true - this.selectDetl = record - this.getSheetDetl(record) - }, - /** - * 鎼滅储 - */ - onSearch() { - console.log(this) - }, - - showDeleteConfirm(record) { - let that = this - Modal.confirm({ - title: '鏄惁纭鍒犻櫎褰撳墠鎷h揣鍗�', - icon: createVNode(ExclamationCircleOutlined), - content: '杩炲悓鏄庣粏涓�璧峰垹闄�', - okText: '纭', - okType: 'danger', - cancelText: '鍙栨秷', - onOk() { - that.removeRow(record) - }, - onCancel() { - console.log('Cancel'); - }, - }); - }, - - //鍒犻櫎褰撳墠琛� - removeRow(record) { - let that = this - get('/api/pick/flat/remove/' + record.id).then((resp) => { - let result = resp.data; - if (result.code == 200) { - that.getOutFlatSheet() - message.success(formatMessage('page.delete.success', '鍒犻櫎鎴愬姛')); - } else { - message.error(result.msg); - } - }) - }, - //鏌ョ湅鏄庣粏 - viewDetail(column, record) { - this.show = !this.show - this.isPrint = false - this.selectDetl = record - this.getSheetDetl(record) - }, - getOutFlatSheet() { - let that = this - post('/api/pick/flat/page', {page: {currnt: 1, size: 10}, params: {pickNo: this.searchParam.pickNo, waveNo: this.searchParam.waveNo}}).then((resp) => { - let result = resp.data; - if (result.code == 200) { - // message.success(formatMessage('page.add.success', '鎴愬姛')); - that.datasource = result.data - } else { - message.error(result.msg); - } - }) - }, - getSheetDetl(record) { - let that = this - post('/api/pick/flat/detl/page', { - page: {currnt: 1, size: 10}, - params: {pickId: record.id} - }).then((resp) => { - let result = resp.data; - if (result.code == 200) { - // message.success(formatMessage('page.add.success', '鎴愬姛')); - that.childList = result.data - } else { - message.error(result.msg); - } - }) - }, - } + }) + }, + //鏌ョ湅鏄庣粏 + viewDetail(column, record) { + this.show = !this.show + this.isPrint = false + this.selectDetl = record + this.getSheetDetl(record) + }, + getOutFlatSheet() { + let that = this + post('/api/pick/flat/page', { page: { currnt: 1, size: 10 }, params: { pickNo: this.searchParam.pickNo, waveNo: this.searchParam.waveNo } }).then((resp) => { + let result = resp.data; + if (result.code == 200) { + // message.success(formatMessage('page.add.success', '鎴愬姛')); + that.datasource = result.data + } else { + message.error(result.msg); + } + }) + }, + getSheetDetl(record) { + let that = this + post('/api/pick/flat/detl/page', { + page: { currnt: 1, size: 10 }, + params: { pickId: record.id } + }).then((resp) => { + let result = resp.data; + if (result.code == 200) { + // message.success(formatMessage('page.add.success', '鎴愬姛')); + that.childList = result.data + } else { + message.error(result.msg); + } + }) + }, } +} </script> <style scoped> - .component-header { - display: flex; - } +.component-header { + display: flex; +} - .component-header > div { - flex: 1; - } +.component-header>div { + flex: 1; +} - .qrcode { - display: flex; - justify-content: flex-end; - margin-right: 30px; - } +.qrcode { + display: flex; + justify-content: flex-end; + margin-right: 30px; +} </style> \ No newline at end of file -- Gitblit v1.9.1