#
Junjie
2024-09-07 0ea1110b84334f1ecbd94fef6f4bf60e8d820b9a
#
3个文件已修改
59 ■■■■■ 已修改文件
zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-admin/src/components/orderOut/orderOutBatchPreview/index.vue
@@ -20,6 +20,7 @@
let currentOrder = ref(null);
let searchInput = ref(null);
let tableData = ref([]);
const operationPortList = ref([])
const open = ref(false);
const showWidth = ref("60%")
const records = ref([])
@@ -105,6 +106,14 @@
        })
        tmp.push({
            title: formatMessage('db.man_order_detl.operationPort', '作业口'),
            dataIndex: 'operationPort',
            width: 140,
            ellipsis: true,
            fixed: 'right',
        })
        tmp.push({
            title: '',
            dataIndex: 'handleStatus',
            width: 100,
@@ -140,16 +149,47 @@
    })
}
const handleOrderOutPreview = () => {
async function getOperationPort() {
    let resp = await post('/api/operationPort/list', {})
    let result = resp.data;
    if (result.code == 200) {
        let data = result.data;
        let tmp = []
        data.forEach((item) => {
            tmp.push({
                label: item.flag,
                value: item.id
            })
        })
        operationPortList.value = tmp;
    } else if (result.code === 401) {
        message.error(result.msg);
        logout()
    } else {
        message.error(result.msg);
    }
}
const handleOrderOutPreview = async () => {
    await getOperationPort();
    loading.value = true;
    tableData.value = []
    let defaultOperationPort = "";
    if (operationPortList.value.length > 0) {
        defaultOperationPort = operationPortList.value[0].value;
    }
    post('/api/out/orderOut/batch/preview', {
        orderDetlIds: records.value,
    }).then((resp) => {
        let result = resp.data;
        if (result.code == 200) {
            tableData.value = result.data;
            let tmp = result.data;
            tmp.forEach((item) => {
                item.operationPort = defaultOperationPort;
            })
            tableData.value = tmp;
            loading.value = false;
        }
    })
@@ -228,6 +268,10 @@
                            </div>
                        </div>
                    </template>
                    <template v-if="column.dataIndex === 'operationPort'">
                        <a-select v-model:value="record.operationPort" :options="operationPortList"></a-select>
                    </template>
                </template>
            </a-table>
        </a-modal>
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/dto/OrderOutBatchPreviewDto.java
@@ -28,6 +28,8 @@
    private Long orderDetlId;
    private Long operationPort;
    private List<BatchPreviewOtherLocDto> otherLoc;
    public LocDetl getLocDetl$() {
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/manage/OutManage.java
@@ -330,6 +330,8 @@
            Long locId = entry.getKey();
            List<OrderOutBatchPreviewDto> previewDtos = entry.getValue();
            Boolean all = outUtils.isAllForPreview(locId, previewDtos);
            OrderOutBatchPreviewDto previewDto = previewDtos.get(0);
            Long operationPortId = previewDto.getOperationPort();
            Loc loc = locService.getById(locId);
            if (loc == null) {
@@ -338,6 +340,11 @@
            if (!loc.getLocStsId().equals(LocStsType.F.val())) {
                continue;
            }
            OperationPort operationPort = operationPortService.getById(operationPortId);
            if (operationPort == null) {
                throw new CoolException("作业口不存在");
            }
@@ -349,7 +356,7 @@
            task.setTaskType(taskType);
            task.setIoPri(workService.generateIoPri(taskType));
            task.setOriginLoc(loc.getLocNo());
            task.setTargetSite("A");
            task.setTargetSite(operationPort.getFlag());
            task.setBarcode(loc.getBarcode());
            boolean res = taskService.save(task);
            if (!res) {