| New file | 
|  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { ref, nextTick, watch } from 'vue'; | 
|---|
|  |  |  | import { get, post, postBlob, postForm } from '@/utils/request.js' | 
|---|
|  |  |  | import { formatMessage } from '@/utils/localeUtils.js'; | 
|---|
|  |  |  | import { message } from 'ant-design-vue'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const formTable = ref(null); | 
|---|
|  |  |  | const submitButton = ref(null); | 
|---|
|  |  |  | const isSave = ref(true); | 
|---|
|  |  |  | const open = ref(false); | 
|---|
|  |  |  | const initFormData = {} | 
|---|
|  |  |  | let formData = ref(initFormData); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let minAnfme = ref(0); | 
|---|
|  |  |  | let maxAnfme = ref(999); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const emit = defineEmits(['tableReload']) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleOk = (e) => { | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | submitButton.value.$el.click(); | 
|---|
|  |  |  | }, 100); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const onFinish = values => { | 
|---|
|  |  |  | // console.log('Success:', values); | 
|---|
|  |  |  | open.value = false; | 
|---|
|  |  |  | post(isSave.value ? '/api/waitPakin/save' : '/api/waitPakin/update', formData.value).then((resp) => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | if (result.code === 200) { | 
|---|
|  |  |  | message.success(isSave.value ? formatMessage('page.add.success', '新增成功') : formatMessage('page.update.success', '更新成功')); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | message.error(result.msg); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | emit('tableReload', 'reload') | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | formTable.value.resetFields() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | const onFinishFailed = errorInfo => { | 
|---|
|  |  |  | console.log('Failed:', errorInfo); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const orderQueryList = ref(null); | 
|---|
|  |  |  | orderQuery(); | 
|---|
|  |  |  | function orderQuery() { | 
|---|
|  |  |  | postForm('/api/order/query', {}).then(resp => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | orderQueryList.value = result.data; | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | const orderDetlQueryList = ref(null); | 
|---|
|  |  |  | async function orderDetlQuery(orderId) { | 
|---|
|  |  |  | let resp = await get('/api/orderDetl/orderId/' + orderId, {}); | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const userQueryList = ref(null); | 
|---|
|  |  |  | userQuery(); | 
|---|
|  |  |  | function userQuery() { | 
|---|
|  |  |  | postForm('/api/user/query', {}).then(resp => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | userQueryList.value = result.data; | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const zpalletBarcodeQueryList = ref([]); | 
|---|
|  |  |  | zpalletBarcodeQuery(""); | 
|---|
|  |  |  | function zpalletBarcodeQuery(condition) { | 
|---|
|  |  |  | postForm('/api/zpalletBarcode/query', { | 
|---|
|  |  |  | condition: condition | 
|---|
|  |  |  | }).then(resp => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | let tmp = [] | 
|---|
|  |  |  | result.data.forEach((item) => { | 
|---|
|  |  |  | tmp.push({ | 
|---|
|  |  |  | value: item.label | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | zpalletBarcodeQueryList.value = tmp; | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | const zpalletBarcodeSearch = (e) => { | 
|---|
|  |  |  | zpalletBarcodeQuery(e) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleSelectChange = async (id) => { | 
|---|
|  |  |  | orderQueryList.value.forEach((item) => { | 
|---|
|  |  |  | if (item.value == id) { | 
|---|
|  |  |  | formData.value.orderNo = item.label; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let result = await orderDetlQuery(id); | 
|---|
|  |  |  | let tmp = [] | 
|---|
|  |  |  | result.data.forEach((item) => { | 
|---|
|  |  |  | tmp.push({ | 
|---|
|  |  |  | value: item.id, | 
|---|
|  |  |  | label: item.mat$.matnr + '-' + item.anfme, | 
|---|
|  |  |  | anfme: item.anfme | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | orderDetlQueryList.value = tmp; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleDetlSelectChange = (id) => { | 
|---|
|  |  |  | orderDetlQueryList.value.forEach((item) => { | 
|---|
|  |  |  | if (item.value == id) { | 
|---|
|  |  |  | maxAnfme.value = item.anfme; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | watch(formData, (newVal, oldVal) => { | 
|---|
|  |  |  | if (formData.value.orderId != null) { | 
|---|
|  |  |  | handleSelectChange(formData.value.orderId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineExpose({ | 
|---|
|  |  |  | open, | 
|---|
|  |  |  | formData, | 
|---|
|  |  |  | initFormData, | 
|---|
|  |  |  | isSave, | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: '组托通知档-edit' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <a-modal v-model:open="open" | 
|---|
|  |  |  | :title="isSave ? formatMessage('page.add', '添加') : formatMessage('page.edit', '编辑')" @ok="handleOk" | 
|---|
|  |  |  | style="width: 600px;"> | 
|---|
|  |  |  | <a-form :model="formData" ref="formTable" name="formTable" :label-col="{ span: 8 }" | 
|---|
|  |  |  | :wrapper-col="{ span: 16 }" style="display: flex;justify-content: space-between;flex-wrap: wrap;" | 
|---|
|  |  |  | autocomplete="off" @finish="onFinish" @finishFailed="onFinishFailed"> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.order_id', '订单')" name="orderId" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-select v-model:value="formData.orderId" :placeholder="formatMessage('common.select', '请选择')" | 
|---|
|  |  |  | style="width: 100%" show-search :options="orderQueryList" optionFilterProp="label" | 
|---|
|  |  |  | optionLabelProp="label" @change="handleSelectChange"> | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.order_no', '订单编号')" name="orderNo" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-input v-model:value="formData.orderNo" /> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.anfme', '组托数量')" name="anfme" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-input-number v-model:value="formData.anfme" :min="minAnfme" :max="maxAnfme" | 
|---|
|  |  |  | style="width: 100%;" /> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.barcode', '托盘码')" name="barcode" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-auto-complete v-model:value="formData.barcode" :options="zpalletBarcodeQueryList" | 
|---|
|  |  |  | @search="zpalletBarcodeSearch" /> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.detl_id', '订单明细')" name="detlId" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-select v-model:value="formData.detlId" :placeholder="formatMessage('common.select', '请选择')" | 
|---|
|  |  |  | style="width: 100%" show-search :options="orderDetlQueryList" optionFilterProp="label" | 
|---|
|  |  |  | optionLabelProp="label" @change="handleDetlSelectChange"> | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.io_status', '组托状态')" name="status" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-select v-model:value="formData.ioStatus" :options="[ | 
|---|
|  |  |  | { label: '待入库', value: 0 }, | 
|---|
|  |  |  | { label: '入库中', value: 1 }, | 
|---|
|  |  |  | ]"> | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.status', '状态')" name="status" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-select v-model:value="formData.status" :options="[ | 
|---|
|  |  |  | { label: '正常', value: 1 }, | 
|---|
|  |  |  | { label: '禁用', value: 0 }, | 
|---|
|  |  |  | ]"> | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <!-- <a-form-item :label="formatMessage('db.man_wait_pakin.create_time', '添加时间')" name="createTime" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-date-picker v-model:value="formData.createTime" show-time format="YYYY-MM-DD HH:mm:ss" | 
|---|
|  |  |  | value-format="YYYY-MM-DD HH:mm:ss" /> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.create_by', '添加人员')" name="createBy" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-select v-model:value="formData.createBy" :placeholder="formatMessage('common.select', '请选择')" | 
|---|
|  |  |  | style="width: 100%" show-search :options="userQueryList" optionFilterProp="label" | 
|---|
|  |  |  | optionLabelProp="label"> | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.update_time', '修改时间')" name="updateTime" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-date-picker v-model:value="formData.updateTime" show-time format="YYYY-MM-DD HH:mm:ss" | 
|---|
|  |  |  | value-format="YYYY-MM-DD HH:mm:ss" /> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.update_by', '修改人员')" name="updateBy" | 
|---|
|  |  |  | style="width: 250px;"> | 
|---|
|  |  |  | <a-select v-model:value="formData.updateBy" :placeholder="formatMessage('common.select', '请选择')" | 
|---|
|  |  |  | style="width: 100%" show-search :options="userQueryList" optionFilterProp="label" | 
|---|
|  |  |  | optionLabelProp="label"> | 
|---|
|  |  |  | </a-select> | 
|---|
|  |  |  | </a-form-item> --> | 
|---|
|  |  |  | <a-form-item :label="formatMessage('db.man_wait_pakin.memo', '备注')" name="memo" style="width: 250px;"> | 
|---|
|  |  |  | <a-input v-model:value="formData.memo" /> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <a-form-item> | 
|---|
|  |  |  | <a-button type="primary" html-type="submit" ref="submitButton" | 
|---|
|  |  |  | style="visibility: hidden;">Submit</a-button> | 
|---|
|  |  |  | </a-form-item> | 
|---|
|  |  |  | </a-form> | 
|---|
|  |  |  | </a-modal> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style></style> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { getCurrentInstance, ref, computed, reactive } from 'vue'; | 
|---|
|  |  |  | import { useRouter } from "vue-router"; | 
|---|
|  |  |  | import { get, post, postBlob } from '@/utils/request.js' | 
|---|
|  |  |  | import { message, Modal } from 'ant-design-vue'; | 
|---|
|  |  |  | import { logout } from '@/config.js'; | 
|---|
|  |  |  | import EditView from './edit.vue' | 
|---|
|  |  |  | import { formatMessage } from '@/utils/localeUtils.js'; | 
|---|
|  |  |  | import useTableSearch from '@/utils/tableUtils.jsx'; | 
|---|
|  |  |  | const context = getCurrentInstance()?.appContext.config.globalProperties; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const router = useRouter(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const TABLE_KEY = 'table-waitPakin'; | 
|---|
|  |  |  | let currentPage = 1; | 
|---|
|  |  |  | let pageSize = 10; | 
|---|
|  |  |  | const searchInput = ref("") | 
|---|
|  |  |  | const editChild = ref(null) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let tableData = ref([]); | 
|---|
|  |  |  | getPage(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | getColumnSearchProps, | 
|---|
|  |  |  | handleResizeColumn, | 
|---|
|  |  |  | } = useTableSearch(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const columns = [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.order_id', '订单ID'), | 
|---|
|  |  |  | dataIndex: 'orderId$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('orderId$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.order_no', '订单编号'), | 
|---|
|  |  |  | dataIndex: 'orderNo', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('orderNo'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.barcode', '托盘码'), | 
|---|
|  |  |  | dataIndex: 'barcode', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('barcode'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.matnr', '物料号'), | 
|---|
|  |  |  | dataIndex: ['detl$','mat$','matnr'], | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('detl$.matnr'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.batch', '批号'), | 
|---|
|  |  |  | dataIndex: ['detl$','batch'], | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('detl$.matnr'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.anfme', '组托数量'), | 
|---|
|  |  |  | dataIndex: 'anfme', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('anfme'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.io_status', '组托状态'), | 
|---|
|  |  |  | dataIndex: 'ioStatus$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('ioStatus$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.status', '状态'), | 
|---|
|  |  |  | dataIndex: 'status$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('status$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.create_time', '添加时间'), | 
|---|
|  |  |  | dataIndex: 'createTime$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('createTime$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.create_by', '添加人员'), | 
|---|
|  |  |  | dataIndex: 'createBy$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('createBy$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.update_time', '修改时间'), | 
|---|
|  |  |  | dataIndex: 'updateTime$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('updateTime$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.update_by', '修改人员'), | 
|---|
|  |  |  | dataIndex: 'updateBy$', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('updateBy$'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('db.man_wait_pakin.memo', '备注'), | 
|---|
|  |  |  | dataIndex: 'memo', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | ellipsis: true, | 
|---|
|  |  |  | ...getColumnSearchProps('memo'), | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | title: formatMessage('common.operation', '操作'), | 
|---|
|  |  |  | name: 'oper', | 
|---|
|  |  |  | dataIndex: 'oper', | 
|---|
|  |  |  | key: 'oper', | 
|---|
|  |  |  | width: 140, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const state = reactive({ | 
|---|
|  |  |  | selectedRowKeys: [], | 
|---|
|  |  |  | loading: false, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | const hasSelected = computed(() => state.selectedRowKeys.length > 0); | 
|---|
|  |  |  | const start = () => { | 
|---|
|  |  |  | state.loading = true; | 
|---|
|  |  |  | // ajax request after empty completing | 
|---|
|  |  |  | setTimeout(() => { | 
|---|
|  |  |  | state.loading = false; | 
|---|
|  |  |  | state.selectedRowKeys = []; | 
|---|
|  |  |  | }, 1000); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | const onSelectChange = selectedRowKeys => { | 
|---|
|  |  |  | // console.log('selectedRowKeys changed: ', selectedRowKeys); | 
|---|
|  |  |  | state.selectedRowKeys = selectedRowKeys; | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function getPage() { | 
|---|
|  |  |  | post('/api/waitPakin/page', { | 
|---|
|  |  |  | current: currentPage, | 
|---|
|  |  |  | pageSize: pageSize, | 
|---|
|  |  |  | condition: searchInput.value | 
|---|
|  |  |  | }).then((resp) => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | if (result.code == 200) { | 
|---|
|  |  |  | let data = result.data; | 
|---|
|  |  |  | tableData.value = data; | 
|---|
|  |  |  | } else if (result.code === 401) { | 
|---|
|  |  |  | message.error(result.msg); | 
|---|
|  |  |  | logout() | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | message.error(result.msg); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleEdit = (item) => { | 
|---|
|  |  |  | editChild.value.open = true; | 
|---|
|  |  |  | editChild.value.formData = item == null ? editChild.value.initFormData : JSON.parse(JSON.stringify(item)); | 
|---|
|  |  |  | editChild.value.isSave = item == null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleDel = (rows) => { | 
|---|
|  |  |  | Modal.confirm({ | 
|---|
|  |  |  | title: formatMessage('page.delete', '删除'), | 
|---|
|  |  |  | content: formatMessage('page.delete.confirm', '确定删除该项吗?'), | 
|---|
|  |  |  | maskClosable: true, | 
|---|
|  |  |  | onOk: async () => { | 
|---|
|  |  |  | const hide = message.loading(formatMessage('common.loading', '请求中')); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | post('/api/waitPakin/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => { | 
|---|
|  |  |  | let result = resp.data; | 
|---|
|  |  |  | if (result.code === 200) { | 
|---|
|  |  |  | message.success(result.msg); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | message.error(result.msg); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | getPage() | 
|---|
|  |  |  | hide() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } catch (error) { | 
|---|
|  |  |  | message.error(formatMessage('common.fail', '请求失败')); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleExport = async (intl) => { | 
|---|
|  |  |  | postBlob('/api/waitPakin/export', {}).then(result => { | 
|---|
|  |  |  | const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' }); | 
|---|
|  |  |  | window.location.href = window.URL.createObjectURL(blob); | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const onSearch = () => { | 
|---|
|  |  |  | // console.log('search'); | 
|---|
|  |  |  | getPage() | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const onPageChange = (page, size) => { | 
|---|
|  |  |  | currentPage = page; | 
|---|
|  |  |  | pageSize = size; | 
|---|
|  |  |  | getPage(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function handleTableReload(value) { | 
|---|
|  |  |  | getPage() | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | name: '组托通知档' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <EditView ref="editChild" @tableReload="handleTableReload" /> | 
|---|
|  |  |  | <div class="table-header"> | 
|---|
|  |  |  | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')" | 
|---|
|  |  |  | style="width: 200px;" @search="onSearch" /> | 
|---|
|  |  |  | <div class="table-header-right"> | 
|---|
|  |  |  | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button> | 
|---|
|  |  |  | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }" | 
|---|
|  |  |  | :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id" | 
|---|
|  |  |  | :pagination="{ total: tableData.total, onChange: onPageChange }" | 
|---|
|  |  |  | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"> | 
|---|
|  |  |  | <template #bodyCell="{ column, text, record }"> | 
|---|
|  |  |  | <template v-if="column.dataIndex === 'oper'"> | 
|---|
|  |  |  | <div style="display: flex;justify-content: space-evenly;"> | 
|---|
|  |  |  | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑') }}</a-button> | 
|---|
|  |  |  | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除') | 
|---|
|  |  |  | }}</a-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <template v-if="column.dataIndex === 'ioStatus$'"> | 
|---|
|  |  |  | <a-switch :checked="record.ioStatus == 1" :checked-children="formatMessage('waitPakin.switch.open','入库中')" :un-checked-children="formatMessage('waitPakin.switch.close','待入库')" :disabled="true" /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </a-table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style></style> | 
|---|
|  |  |  | 
|---|
|  |  |  | wrapper.like(Order::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | orderService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getOrderNo())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.Cools; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.R; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.annotation.OperationLog; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.BaseParam; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.KeyValVo; | 
|---|
|  |  |  | import com.zy.asrs.wms.common.domain.PageParam; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.WaitPakin; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.service.WaitPakinService; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.controller.BaseController; | 
|---|
|  |  |  | import com.zy.asrs.wms.utils.ExcelUtil; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.security.access.prepost.PreAuthorize; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.Arrays; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping("/api") | 
|---|
|  |  |  | public class WaitPakinController extends BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaitPakinService waitPakinService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakin/page") | 
|---|
|  |  |  | public R page(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | BaseParam baseParam = buildParam(map, BaseParam.class); | 
|---|
|  |  |  | PageParam<WaitPakin, BaseParam> pageParam = new PageParam<>(baseParam, WaitPakin.class); | 
|---|
|  |  |  | return R.ok().add(waitPakinService.page(pageParam, pageParam.buildWrapper(true))); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakin/list") | 
|---|
|  |  |  | public R list(@RequestBody Map<String, Object> map) { | 
|---|
|  |  |  | return R.ok().add(waitPakinService.list()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") | 
|---|
|  |  |  | @GetMapping("/waitPakin/{id}") | 
|---|
|  |  |  | public R get(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return R.ok().add(waitPakinService.getById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:save')") | 
|---|
|  |  |  | @OperationLog("添加组托通知档") | 
|---|
|  |  |  | @PostMapping("/waitPakin/save") | 
|---|
|  |  |  | public R save(@RequestBody WaitPakin waitPakin) { | 
|---|
|  |  |  | if (!waitPakinService.save(waitPakin)) { | 
|---|
|  |  |  | return R.error("添加失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("添加成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:update')") | 
|---|
|  |  |  | @OperationLog("修改组托通知档") | 
|---|
|  |  |  | @PostMapping("/waitPakin/update") | 
|---|
|  |  |  | public R update(@RequestBody WaitPakin waitPakin) { | 
|---|
|  |  |  | if (!waitPakinService.updateById(waitPakin)) { | 
|---|
|  |  |  | return R.error("修改失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("修改成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:remove')") | 
|---|
|  |  |  | @OperationLog("删除组托通知档") | 
|---|
|  |  |  | @PostMapping("/waitPakin/remove/{ids}") | 
|---|
|  |  |  | public R remove(@PathVariable Long[] ids) { | 
|---|
|  |  |  | if (!waitPakinService.removeByIds(Arrays.asList(ids))) { | 
|---|
|  |  |  | return R.error("删除失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("删除成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakin/query") | 
|---|
|  |  |  | public R query(@RequestParam(required = false) String condition) { | 
|---|
|  |  |  | List<KeyValVo> vos = new ArrayList<>(); | 
|---|
|  |  |  | LambdaQueryWrapper<WaitPakin> wrapper = new LambdaQueryWrapper<>(); | 
|---|
|  |  |  | if (!Cools.isEmpty(condition)) { | 
|---|
|  |  |  | wrapper.like(WaitPakin::getId, condition); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | waitPakinService.page(new Page<>(1, 30), wrapper).getRecords().forEach( | 
|---|
|  |  |  | item -> vos.add(new KeyValVo(item.getId(), item.getId())) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return R.ok().add(vos); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("hasAuthority('asrs:waitPakin:list')") | 
|---|
|  |  |  | @PostMapping("/waitPakin/export") | 
|---|
|  |  |  | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { | 
|---|
|  |  |  | ExcelUtil.build(ExcelUtil.create(waitPakinService.list(), WaitPakin.class), response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.entity; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.service.OrderDetlService; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.service.OrderService; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.entity.Host; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.entity.User; | 
|---|
|  |  |  | import org.springframework.format.annotation.DateTimeFormat; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.IdType; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableId; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableLogic; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.annotation.TableName; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModel; | 
|---|
|  |  |  | import io.swagger.annotations.ApiModelProperty; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.Cools; | 
|---|
|  |  |  | import com.zy.asrs.framework.common.SpringUtils; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.service.UserService; | 
|---|
|  |  |  | import com.zy.asrs.wms.system.service.HostService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.io.Serializable; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @TableName("man_wait_pakin") | 
|---|
|  |  |  | public class WaitPakin implements Serializable { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static final long serialVersionUID = 1L; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "ID") | 
|---|
|  |  |  | @TableId(value = "id", type = IdType.AUTO) | 
|---|
|  |  |  | private Long id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订单ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "订单ID") | 
|---|
|  |  |  | private Long orderId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订单编号 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "订单编号") | 
|---|
|  |  |  | private String orderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 组托数量 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "组托数量") | 
|---|
|  |  |  | private Double anfme; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 托盘码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "托盘码") | 
|---|
|  |  |  | private String barcode; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 明细ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "明细ID") | 
|---|
|  |  |  | private Long detlId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 组托状态 1: 入库中  0: 待入库 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 入库中  0: 待入库  ") | 
|---|
|  |  |  | private Integer ioStatus; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 所属机构 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "所属机构") | 
|---|
|  |  |  | private Long hostId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 状态 1: 正常  0: 禁用 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "状态 1: 正常  0: 禁用  ") | 
|---|
|  |  |  | private Integer status; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 是否删除 1: 是  0: 否 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "是否删除 1: 是  0: 否  ") | 
|---|
|  |  |  | @TableLogic | 
|---|
|  |  |  | private Integer deleted; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date createTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "添加人员") | 
|---|
|  |  |  | private Long createBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改时间 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改时间") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateTime; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改人员 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员") | 
|---|
|  |  |  | private Long updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaitPakin() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaitPakin(Long orderId,String orderNo,Double anfme,String barcode,Long detlId,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo) { | 
|---|
|  |  |  | this.orderId = orderId; | 
|---|
|  |  |  | this.orderNo = orderNo; | 
|---|
|  |  |  | this.anfme = anfme; | 
|---|
|  |  |  | this.barcode = barcode; | 
|---|
|  |  |  | this.detlId = detlId; | 
|---|
|  |  |  | this.hostId = hostId; | 
|---|
|  |  |  | this.status = status; | 
|---|
|  |  |  | this.deleted = deleted; | 
|---|
|  |  |  | this.createTime = createTime; | 
|---|
|  |  |  | this.createBy = createBy; | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | this.memo = memo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    WaitPakin waitPakin = new WaitPakin( | 
|---|
|  |  |  | //            null,    // 订单ID | 
|---|
|  |  |  | //            null,    // 订单编号 | 
|---|
|  |  |  | //            null,    // 组托数量 | 
|---|
|  |  |  | //            null,    // 托盘码 | 
|---|
|  |  |  | //            null,    // 明细ID | 
|---|
|  |  |  | //            null,    // 所属机构 | 
|---|
|  |  |  | //            null,    // 状态 | 
|---|
|  |  |  | //            null,    // 是否删除 | 
|---|
|  |  |  | //            null,    // 添加时间 | 
|---|
|  |  |  | //            null,    // 添加人员 | 
|---|
|  |  |  | //            null,    // 修改时间 | 
|---|
|  |  |  | //            null,    // 修改人员 | 
|---|
|  |  |  | //            null    // 备注 | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getOrderId$(){ | 
|---|
|  |  |  | OrderService service = SpringUtils.getBean(OrderService.class); | 
|---|
|  |  |  | Order order = service.getById(this.orderId); | 
|---|
|  |  |  | if (!Cools.isEmpty(order)){ | 
|---|
|  |  |  | return String.valueOf(order.getId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public OrderDetl getDetl$(){ | 
|---|
|  |  |  | OrderDetlService service = SpringUtils.getBean(OrderDetlService.class); | 
|---|
|  |  |  | OrderDetl orderDetl = service.getById(this.detlId); | 
|---|
|  |  |  | if (!Cools.isEmpty(orderDetl)){ | 
|---|
|  |  |  | return orderDetl; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getDetlId$(){ | 
|---|
|  |  |  | OrderDetlService service = SpringUtils.getBean(OrderDetlService.class); | 
|---|
|  |  |  | OrderDetl orderDetl = service.getById(this.detlId); | 
|---|
|  |  |  | if (!Cools.isEmpty(orderDetl)){ | 
|---|
|  |  |  | return String.valueOf(orderDetl.getId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getHostId$(){ | 
|---|
|  |  |  | HostService service = SpringUtils.getBean(HostService.class); | 
|---|
|  |  |  | Host host = service.getById(this.hostId); | 
|---|
|  |  |  | if (!Cools.isEmpty(host)){ | 
|---|
|  |  |  | return String.valueOf(host.getName()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getStatus$(){ | 
|---|
|  |  |  | if (null == this.status){ return null; } | 
|---|
|  |  |  | switch (this.status){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "正常"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "禁用"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.status); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getIoStatus$(){ | 
|---|
|  |  |  | if (null == this.ioStatus){ return null; } | 
|---|
|  |  |  | switch (this.ioStatus){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "入库中"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "待入库"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.ioStatus); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getDeleted$(){ | 
|---|
|  |  |  | if (null == this.deleted){ return null; } | 
|---|
|  |  |  | switch (this.deleted){ | 
|---|
|  |  |  | case 1: | 
|---|
|  |  |  | return "是"; | 
|---|
|  |  |  | case 0: | 
|---|
|  |  |  | return "否"; | 
|---|
|  |  |  | default: | 
|---|
|  |  |  | return String.valueOf(this.deleted); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.createTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getCreateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.createBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateTime$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateTime)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | UserService service = SpringUtils.getBean(UserService.class); | 
|---|
|  |  |  | User user = service.getById(this.updateBy); | 
|---|
|  |  |  | if (!Cools.isEmpty(user)){ | 
|---|
|  |  |  | return String.valueOf(user.getNickname()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.WaitPakin; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | import org.springframework.stereotype.Repository; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Mapper | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface WaitPakinMapper extends BaseMapper<WaitPakin> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.IService; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.WaitPakin; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface WaitPakinService extends IService<WaitPakin> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.zy.asrs.wms.asrs.service.impl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.mapper.WaitPakinMapper; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.entity.WaitPakin; | 
|---|
|  |  |  | import com.zy.asrs.wms.asrs.service.WaitPakinService; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Service("waitPakinService") | 
|---|
|  |  |  | public class WaitPakinServiceImpl extends ServiceImpl<WaitPakinMapper, WaitPakin> implements WaitPakinService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | //        generator.username="sa"; | 
|---|
|  |  |  | //        generator.password="Zoneyung@zy56$"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | generator.table="man_order_detl_field"; | 
|---|
|  |  |  | generator.tableName="订单明细扩展字段"; | 
|---|
|  |  |  | generator.table="man_wait_pakin"; | 
|---|
|  |  |  | generator.tableName="组托通知档"; | 
|---|
|  |  |  | generator.rootPackagePath="com.zy.asrs.wms"; | 
|---|
|  |  |  | generator.packagePath="com.zy.asrs.wms.asrs"; | 
|---|
|  |  |  |  | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
|  |  |  | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 
|---|
|  |  |  | <mapper namespace="com.zy.asrs.wms.asrs.mapper.WaitPakinMapper"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|