| | |
| | | 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) {
|
| | |
| | | <EditView ref="editChild" @tableReload="handleTableReload"
|
| | | :ioModel="ioModel == 'in' ? 1 : ioModel == 'out' ? 2 : null" />
|
| | | <div class="table-header">
|
| | | <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;">
|
| | |
| | | ...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', '优先级'),
|
| | | dataIndex: 'ioPri',
|
| | | width: 100,
|
| | |
| | | <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 type="link" primary @click="handlePrint(record)">{{
|
| | | formatMessage('page.order.orderDetl',
|
| | | '打印订单')
|
| | | }}</a-button>
|
| | | <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '编辑')
|
| | |
| | | })
|
| | |
|
| | | 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-button @click="handleOpenGenerate()" type="primary">{{
|
| | |
| | | ...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', '入库时间'),
|
| | |
| | | <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);
|