New file |
| | |
| | | <script setup> |
| | | import {ref, toRaw} from 'vue'; |
| | | import { formatMessage } from '@/utils/localeUtils'; |
| | | import locTemplate from './locTemplate.vue'; |
| | | |
| | | const template = { |
| | | locTemplate |
| | | } |
| | | |
| | | const printChild = ref(null); |
| | | const selectTemplate = ref('locTemplate'); |
| | | let open = ref(false); |
| | | let printData = ref([]); |
| | | let repeatNum = ref(1); |
| | | let orderNo = ref(''); |
| | | const handleOk = () => { |
| | | |
| | | } |
| | | |
| | | const printObj = ref({ |
| | | id: "printOrder", |
| | | beforeOpenCallback(vue) { |
| | | // console.log(toRaw(printData.value)) |
| | | }, |
| | | openCallback(vue) { |
| | | console.log('执行了打印') |
| | | }, |
| | | closeCallback(vue) { |
| | | console.log('关闭了打印工具') |
| | | }, |
| | | |
| | | }); |
| | | |
| | | defineExpose({ |
| | | open, |
| | | orderNo, |
| | | printData |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <a-modal v-model:open="open" :title="formatMessage('', '库位打印')" @ok="handleOk" :width="'60%'" v-if="open"> |
| | | <div style="height: 500px;overflow-x: hidden;overflow-y: scroll;"> |
| | | <div style="margin-top: 20px;"> |
| | | <Component :is="template[selectTemplate]" ref="printChild" :list="printData" :repeatNum="repeatNum" /> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <a-button key="submit" type="primary" v-print="printObj" @click="handleOk"> |
| | | {{ formatMessage('common.print', '打印') }} |
| | | </a-button> |
| | | </template> |
| | | </a-modal> |
| | | </template> |
| | | |
| | | <style></style> |
New file |
| | |
| | | <script setup> |
| | | import { toRefs, ref, defineProps, watch } from 'vue'; |
| | | import { globalState } from '@/config.js' |
| | | import { formatMessage } from '@/utils/localeUtils'; |
| | | |
| | | const props = defineProps({ |
| | | locNo: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | list: { |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | repeatNum: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }); |
| | | const { locNo, list, repeatNum } = toRefs(props) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="printOrder"> |
| | | <div v-for="(item, index) in list"> |
| | | <table class="contain" width="600" style="overflow: hidden;font-size: xx-small;table-layout: fixed; margin-top: 10px;"> |
| | | <tr style="height: 300px;"> |
| | | <td class="barcode" colspan="9" align="center" scope="col"> |
| | | <img :src="globalState.url + '/api/code/auth?type=1¶m=' + item.locNo" width="90%;" height="180px"/> |
| | | <div style="letter-spacing: 2px;margin-top: 10px; text-align: center;"> |
| | | <span>{{ item.locNo }} </span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style> |
| | | @media print { |
| | | body { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | .print-area { |
| | | margin: 0; |
| | | padding: 0; |
| | | height: auto; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | .contain td { |
| | | border: 1px solid #000; |
| | | padding: 5px; |
| | | } |
| | | </style> |
| | |
| | | import { logout } from '@/config.js';
|
| | | import EditView from './edit.vue'
|
| | | import { formatMessage } from '@/utils/localeUtils.js';
|
| | | import LocsPrint from '@/components/print/locsPrint/index.vue';
|
| | | import useTableSearch from '@/utils/tableUtils.jsx';
|
| | | const context = getCurrentInstance()?.appContext.config.globalProperties;
|
| | |
|
| | |
| | | const TABLE_KEY = 'table-loc';
|
| | | let currentPage = 1;
|
| | | let pageSize = 10;
|
| | | let printDisable = true
|
| | | const printChild = ref("")
|
| | | const searchInput = ref("")
|
| | | const searchParam = ref({
|
| | | locNo: null,
|
| | |
| | | const state = reactive({
|
| | | selectedRowKeys: [],
|
| | | loading: false,
|
| | | selectRecords: []
|
| | | });
|
| | |
|
| | | let tableData = ref([]);
|
| | |
| | | }, 1000);
|
| | | };
|
| | | const onSelectChange = selectedRowKeys => {
|
| | | // console.log('selectedRowKeys changed: ', selectedRowKeys);
|
| | | let printData = [];
|
| | | console.log('selectedRowKeys changed: ', selectedRowKeys);
|
| | | state.selectedRowKeys = selectedRowKeys;
|
| | | state.selectRecords = tableData.value.records.filter(item => {
|
| | | return selectedRowKeys.includes(item.id)
|
| | | })
|
| | |
|
| | | if (state.selectRecords.length > 0) {
|
| | | printDisable = false
|
| | | } else {
|
| | | printDisable = true
|
| | | }
|
| | | };
|
| | |
|
| | | const handlePrint = (item) => {
|
| | | printChild.value.printData = state.selectRecords;
|
| | | printChild.value.open = true;
|
| | | }
|
| | |
|
| | | function getPage() {
|
| | | state.loading = true;
|
| | |
| | | if (result.code == 200) {
|
| | | let data = result.data;
|
| | | tableData.value = data;
|
| | |
|
| | | state.loading = false;
|
| | | } else if (result.code === 401) {
|
| | | message.error(result.msg);
|
| | |
| | | style="width: 200px;" @search="onSearch" />
|
| | | </div>
|
| | | <div class="table-header-right">
|
| | | <a-button @click="handlePrint(null)" type="primary" :disabled="printDisable">{{ formatMessage('page.add', '打印')
|
| | | }}</a-button>
|
| | | <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '添加') }}</a-button>
|
| | | <a-button @click="handleExport">{{ formatMessage('page.export', '导出') }}</a-button>
|
| | | </div>
|
| | |
| | | <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>
|
| | | }}</a-button>
|
| | | </div>
|
| | | </template>
|
| | | </template>
|
| | | </a-table>
|
| | | <LocsPrint ref="printChild" />
|
| | | </div>
|
| | | </template>
|
| | |
|
| | | <style></style>
|
| | |
| | |
|
| | | state.columns = [
|
| | | {
|
| | | title: formatMessage('db.view_work_in.matnr', '入库单号'),
|
| | | dataIndex: 'orderNo',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('orderNo'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.view_work_in.create_time', '入库日期'),
|
| | | dataIndex: 'createTime$',
|
| | | width: 140,
|
| | |
| | | * @description: 获取推荐库位
|
| | | * @version 1.0
|
| | | */
|
| | | @PostMapping("/recommend/locs")
|
| | | @GetMapping("/recommend/locs")
|
| | | public R getRecommend() {
|
| | | return mobileService.getRecommendLocs();
|
| | | }
|
| | |
| | |
|
| | | List<Long> listBySts(Long sts);
|
| | |
|
| | | R getRecommendLocs();
|
| | | Loc getRecommendLocs();
|
| | | }
|
| | |
| | | */
|
| | | @Override
|
| | | public R getRecommengLocs() {
|
| | | return this.baseMapper.getRecommendLocs();
|
| | | return R.ok().add(this.baseMapper.getRecommendLocs());
|
| | | }
|
| | | }
|
| | |
| | | select * from man_loc
|
| | | where loc_sts_id = #{sts}
|
| | | </select>
|
| | | <select id="getRecommendLocs" resultType="com.zy.asrs.framework.common.R">
|
| | | SELECT id, loc_no, loc_sts_id, row1, bay1, lev1, barcode, `status`, flag FROM man_loc WHERE loc_no LIKE '%B%' OR loc_no LIKE '%C%'
|
| | | <select id="getRecommendLocs" resultType="com.zy.asrs.wms.asrs.entity.Loc">
|
| | | SELECT id, loc_no, loc_sts_id, row1, bay1, lev1, barcode, `status`, flag FROM man_loc WHERE (loc_no LIKE '%B%' OR loc_no LIKE '%C%') AND loc_sts_id = 2 ORDER BY lev1 ASC LIMIT 1
|
| | | </select>
|
| | |
|
| | | </mapper>
|