| | |
| | | let currentPage = 1;
|
| | | let pageSize = 10;
|
| | | const searchInput = ref("")
|
| | | const orderType = ref(null)
|
| | | const editChild = ref(null)
|
| | | const showOrderDetlChild = ref(null)
|
| | |
|
| | |
| | | current: currentPage,
|
| | | pageSize: pageSize,
|
| | | condition: searchInput.value,
|
| | | orderType: orderType.value,
|
| | | }).then((resp) => {
|
| | | let result = resp.data;
|
| | | if (result.code == 200) {
|
| | | console.log('--------->')
|
| | | console.log('--------->')
|
| | | let data = result.data;
|
| | | tableData.value = data;
|
| | |
|
| | |
| | | <EditView ref="editChild" @tableReload="handleTableReload"
|
| | | :ioModel="ioModel == 'in' ? 1 : ioModel == 'out' ? 2 : null" />
|
| | | <div class="table-header">
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | <div style="margin-left : 10px;"> |
| | | <a-select v-model:value="orderType" :placeholder="formatMessage('page.locDetl.orderNo.input', '请选择单据类型')" :options="[
|
| | | { label: '手动入库单', value: 1 }, { label: '手动出库单', value: 2 }, ]" style="width: 160px;margin-right: 10px;">
|
| | | </a-select>
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | </div>
|
| | | <div class="table-header-right">
|
| | | <a-dropdown>
|
| | | <template #overlay>
|
| | |
| | | <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" :loading="state.loading">
|
| | | :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"
|
| | | :loading="state.loading">
|
| | | <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="showDetl(record)">{{ formatMessage('page.order.orderDetl', '订单明细')
|
| | | }}</a-button>
|
| | | }}</a-button>
|
| | | <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>
|
| | |
| | | <script setup>
|
| | | import {getCurrentInstance, ref, computed, reactive, defineProps, nextTick} from 'vue';
|
| | | import { getCurrentInstance, ref, computed, reactive, defineProps, nextTick } from 'vue';
|
| | | import { useRouter } from "vue-router";
|
| | | import { get, post, postBlob, postForm } from '@/utils/request.js'
|
| | | import { message, Modal } from 'ant-design-vue';
|
| | |
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('orderSettle$'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order.order_settle', '客户名称'),
|
| | | dataIndex: 'customer',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('customer'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order.order_settle', '电话'),
|
| | | dataIndex: 'phone',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('phone'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order.order_settle', '地址'),
|
| | | dataIndex: 'address',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('address'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_order.ioPri', '优先级'),
|
| | |
| | | const printChild = ref(null);
|
| | | // 打印订单
|
| | | const handlePrint = async (record) => {
|
| | | let printData = [];
|
| | | const resp = await get("/api/orderDetl/orderId/" + record.__v_raw.id, {});
|
| | | const result = resp.data;
|
| | | result.data.forEach((item) => {
|
| | | let newItem = {};
|
| | | newItem.matnr = item.mat$.matnr
|
| | | newItem.maktx = item.mat$.maktx
|
| | | newItem.specs = item.mat$.specs
|
| | | newItem.batch = item.batch
|
| | | newItem.anfme = item.anfme
|
| | | printData.push(newItem)
|
| | | })
|
| | | printChild.value.printData = printData;
|
| | | printChild.value.orderNo = record.__v_raw.orderNo
|
| | | printChild.value.open = true;
|
| | | let printData = [];
|
| | | const resp = await get("/api/orderDetl/orderId/" + record.__v_raw.id, {});
|
| | | const result = resp.data;
|
| | | result.data.forEach((item) => {
|
| | | let newItem = {};
|
| | | newItem.matnr = item.mat$.matnr
|
| | | newItem.maktx = item.mat$.maktx
|
| | | newItem.specs = item.mat$.specs
|
| | | newItem.batch = item.batch
|
| | | newItem.anfme = item.anfme
|
| | | printData.push(newItem)
|
| | | })
|
| | | printChild.value.printData = printData;
|
| | | printChild.value.orderNo = record.__v_raw.orderNo
|
| | | printChild.value.open = true;
|
| | | }
|
| | |
|
| | | const onSearch = () => {
|
| | |
| | | <a-select v-model:value="channel" :options="channelList" mode="multiple"
|
| | | style="width: 100px;"></a-select>
|
| | | <a-button @click="handleGenerateWave()">{{ formatMessage('common.generateWave', '生成波次')
|
| | | }}</a-button>
|
| | | }}</a-button>
|
| | | </div>
|
| | | </div>
|
| | |
|
| | |
| | | <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="showDetl(record)">{{ formatMessage('page.order.orderDetl',
|
| | | '订单明细')
|
| | | }}</a-button>
|
| | | <a-button type="link" primary @click="handlePrint(record)">{{ formatMessage('page.order.orderDetl',
|
| | | '打印订单')
|
| | | }}</a-button>
|
| | | <a-button type="link" primary @click="showDetl(record)">{{ formatMessage('page.order.orderDetl',
|
| | | '订单明细')
|
| | | }}</a-button>
|
| | | <a-button type="link" primary @click="handlePrint(record)">{{
|
| | | formatMessage('page.order.orderDetl',
|
| | | '打印订单')
|
| | | }}</a-button>
|
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑')
|
| | | }}</a-button>
|
| | | }}</a-button>
|
| | | <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除')
|
| | | }}</a-button>
|
| | | }}</a-button>
|
| | | </div>
|
| | | </template>
|
| | | </template>
|
| | | </a-table>
|
| | | <ShowOrderDetlComponent ref="showOrderDetlChild" />
|
| | | </div>
|
| | | <OrderPrint ref="printChild" />
|
| | | <OrderPrint ref="printChild" />
|
| | | </template>
|
| | |
|
| | | <style></style>
|
| | |
| | | })
|
| | |
|
| | | export const get = async (url, params) => {
|
| | | if (params?.condition != null || params?.condition != undefined) {
|
| | | params.current = 1
|
| | | }
|
| | |
|
| | | return instance({
|
| | | url: url,
|
| | | method: 'get',
|
| | |
| | | }
|
| | |
|
| | | export const post = async (url, data) => {
|
| | | if (data?.condition != null || data?.condition != undefined) {
|
| | | data.current = 1
|
| | | }
|
| | |
|
| | | return instance({
|
| | | url: url,
|
| | | method: 'post',
|
| | |
| | | })
|
| | | }
|
| | |
|
| | | const handleDelete = () => {
|
| | | if (state.selectedRowKeys.length == 0) {
|
| | | message.warning(formatMessage('common.select', '请选择'));
|
| | | return;
|
| | | }
|
| | |
|
| | | 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/zpalletBarcode/remove/' + state.selectedRowKeys).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', '请求失败'));
|
| | | }
|
| | | },
|
| | | });
|
| | |
|
| | | console.log(state.selectedRowKeys);
|
| | |
|
| | | }
|
| | |
|
| | | const handlePrint = () => {
|
| | | if (state.selectedRowKeys.length == 0) {
|
| | | message.warning(formatMessage('common.select', '请选择'));
|
| | |
| | | <div class="table-header">
|
| | | <div>
|
| | | <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '请输入')"
|
| | | style="width: 200px;" @search="onSearch" />
|
| | | style="width: 200px; margin: 0 10px;" @search="onSearch" />
|
| | | <a-button @click="handlePrint()" type="primary">
|
| | | {{ formatMessage('db.man_zpallet_barcode.batchPrint', '批量打印') }}
|
| | | </a-button>
|
| | | <a-button @click="handleDelete()" danger style="margin: 0 10px;">
|
| | | {{ formatMessage('db.man_zpallet_barcode.batchPrint', '批量删除') }}
|
| | | </a-button>
|
| | | </div>
|
| | | <div class="table-header-right">
|
| | |
| | | <a-form-item :label="formatMessage('db.man_zpallet_barcode.generateNum', '生成数量')">
|
| | | <a-input v-model:value="generateNum" />
|
| | | </a-form-item>
|
| | | <a-form-item :label="formatMessage('db.man_container.type', '托盘类型')" name="type" >
|
| | | <a-form-item :label="formatMessage('db.man_container.type', '托盘类型')" name="type">
|
| | | <a-select v-model:value="pakinType" :options="[
|
| | | { label: '平库托盘', value: 1 },
|
| | | { label: '立库托盘', value: 2 }, |
| | | { label: '立库托盘', value: 2 },
|
| | | ]">
|
| | | </a-select>
|
| | | </a-form-item>
|
| | |
| | | ...getColumnSearchProps('locNo'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.loc_type', '库位类型'),
|
| | | dataIndex: 'type$',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('type$'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.matnr', '商品编号'),
|
| | | dataIndex: 'matnr',
|
| | | width: 140,
|
| | |
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('model'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.matnr', '品类'),
|
| | | dataIndex: 'tagId$',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('tagId$'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.maktx', '颜色'),
|
| | | dataIndex: 'color',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('color'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.model', '品牌'),
|
| | | dataIndex: 'brand',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('brand'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.model', '产地'),
|
| | | dataIndex: 'origin',
|
| | | width: 140,
|
| | | ellipsis: true,
|
| | | ...getColumnSearchProps('origin'),
|
| | | },
|
| | | {
|
| | | title: formatMessage('db.man_loc_detl.dewell', '入库时间'),
|
| | |
| | | let content = "是否确认生成-->出库任务!!"
|
| | | let type = 2
|
| | | if (item?.locNo.indexOf("B") >= 0 || item?.locNo.indexOf("C") >= 0) {
|
| | | content = "是否确认生成-->拣货单!!"
|
| | | type = 1
|
| | | content = "是否确认生成-->拣货单!!"
|
| | | type = 1
|
| | | }
|
| | | Modal.confirm({
|
| | | title: formatMessage('page.delete', '出库'),
|
| | |
| | | console.log(result);
|
| | | message.success(result.msg);
|
| | | } else {
|
| | | message.error(result.msg); |
| | | message.error(result.msg);
|
| | | }
|
| | | getPage()
|
| | | hide()
|
| | |
| | | <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" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '手动出库')
|
| | | }}</a-button>
|
| | | <!-- <a-button type="link" danger @click="handleDel([record])">{{ formatMessage('page.delete', '删除')}}</a-button> -->
|
| | | </div>
|
| | | </template>
|
| | |
| | | pakinType = "ctu";
|
| | | }
|
| | | }
|
| | | ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>().eq(ZpalletBarcode::getBarcode, barcode));
|
| | | if (one != null) {
|
| | | return R.error("条码起始值已存在");
|
| | | }
|
| | |
|
| | | if (pakinType.equals("flat")) {
|
| | | int barcodeInt = Integer.parseInt(String.valueOf(barcode));
|
| | | for (int i = 0; i < Integer.parseInt(String.valueOf(num)); i++) {
|
| | | ZpalletBarcode zpalletBarcode = new ZpalletBarcode();
|
| | | String strBarcode = String.format("%08d", barcodeInt);
|
| | | zpalletBarcode.setBarcode("PK" + strBarcode);
|
| | | ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>()
|
| | | .eq(ZpalletBarcode::getBarcode, strBarcode));
|
| | | if (one != null) {
|
| | | continue;
|
| | | }
|
| | | zpalletBarcodeService.save(zpalletBarcode);
|
| | | barcodeInt += 1;
|
| | | }
|
| | |
| | | ZpalletBarcode zpalletBarcode = new ZpalletBarcode();
|
| | | String strBarcode = String.format("%08d", barcodeInt);
|
| | | zpalletBarcode.setBarcode(strBarcode);
|
| | | ZpalletBarcode one = zpalletBarcodeService.getOne(new LambdaQueryWrapper<ZpalletBarcode>()
|
| | | .eq(ZpalletBarcode::getBarcode, strBarcode));
|
| | | if (one != null) {
|
| | | continue;
|
| | | }
|
| | | zpalletBarcodeService.save(zpalletBarcode);
|
| | | barcodeInt += 1;
|
| | | }
|
| | |
| | | @ApiModelProperty("型号")
|
| | | private String model;
|
| | |
|
| | | @ApiModelProperty("品牌")
|
| | | private String brand;
|
| | |
|
| | | @ApiModelProperty("颜色")
|
| | | private String color;
|
| | |
|
| | | @ApiModelProperty("产地")
|
| | | private String origin;
|
| | |
|
| | | /**
|
| | | * 状态 1: 正常 0: 禁用
|
| | | */
|
| | |
| | | // return null;
|
| | | // }
|
| | |
|
| | | // public String getTagId$() {
|
| | | // TagService tagService = SpringUtils.getBean(TagService.class);
|
| | | // Tag byId = tagService.getById(this.tagId);
|
| | | // if (!Cools.isEmpty(byId)){
|
| | | // return byId.getName();
|
| | | // }
|
| | | // return null;
|
| | | // }
|
| | | public String getTagId$() {
|
| | | TagService tagService = SpringUtils.getBean(TagService.class);
|
| | | Tag byId = tagService.getById(this.tagId);
|
| | | if (!Cools.isEmpty(byId)){
|
| | | return byId.getName();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | |
|
| | | // @Delegate(types = Mat.class)
|
| | | // public Mat getMatId$(){
|
| | | // MatService service = SpringUtils.getBean(MatService.class);
|
| | | // Mat mat = service.getById(this.matId);
|
| | | // return mat;
|
| | | // }
|
| | | public String getType$() {
|
| | | return (this.locNo.contains("B") || this.locNo.contains("C")) ? "平库" : "立库";
|
| | | }
|
| | |
|
| | | public String getDewell$() {
|
| | | return DateUtils.diff(new Date(), createTime) + "天";
|
| | | }
|
| | |
|
| | |
|
| | | public String getHostId$(){
|
| | | HostService service = SpringUtils.getBean(HostService.class);
|