no message
parent
d01030e922
commit
394e3e4223
|
|
@ -78,8 +78,6 @@
|
|||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns } from './Item.data';
|
||||
import { list, deleteOne, batchDelete, saveOrUpdate, getImportUrl, getExportUrl } from './Item.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getDateByPicker } from '/@/utils';
|
||||
import { JInputTypeEnum } from '@/enums/cpteEnum';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
|
|
@ -93,8 +91,6 @@
|
|||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
//将是否启用转换成开关
|
||||
const enhancedColumns = columns.map((col) => {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="stockCode">
|
||||
<template #label><span title="容器编码">容器编码</span></template>
|
||||
<a-input placeholder="请输入容器编码" v-model:value="queryParam.stockCode" allow-clear></a-input>
|
||||
<JInput v-model:value="queryParam.stockCode" :placeholder="'请输入容器编码'" :type="JInputTypeEnum.JINPUT_RIGHT_LIKE" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
|
|
@ -97,6 +97,8 @@
|
|||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getDateByPicker } from '/@/utils';
|
||||
import { JDictSelectTag, JSearchSelect } from '@/components/Form';
|
||||
import { JInputTypeEnum } from '@/enums/cpteEnum';
|
||||
import JInput from '../../../components/Form/src/jeecg/components/JInput.vue';
|
||||
|
||||
const fieldPickers = reactive({});
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
|
|||
|
||||
enum Api {
|
||||
showConveyorLine = '/api/conveyorLine/showConveyorLine',
|
||||
scanTray='/api/conveyorLine/scanTray',
|
||||
}
|
||||
|
||||
export const showConveyorLine = (conveyorLine) => {
|
||||
|
|
@ -13,3 +14,16 @@ export const showConveyorLine = (conveyorLine) => {
|
|||
{ joinParamsToUrl: true }
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* 输送线扫描
|
||||
* @param params
|
||||
*/
|
||||
export const scanTray = (params) => {
|
||||
return defHttp.post(
|
||||
{ url: Api.scanTray, params },
|
||||
{
|
||||
isTransformResponse: false,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -7,21 +7,25 @@ export const columns: BasicColumn[] = [
|
|||
title: '系统单号',
|
||||
align: 'center',
|
||||
dataIndex: 'orderNo',
|
||||
width: '130px',
|
||||
},
|
||||
{
|
||||
title: '外部单号',
|
||||
title: '赛意单号',
|
||||
align: 'center',
|
||||
dataIndex: 'thirdOrderNo',
|
||||
width: '120px',
|
||||
},
|
||||
{
|
||||
title: '任务号',
|
||||
align: 'center',
|
||||
dataIndex: 'no',
|
||||
width: '160px',
|
||||
},
|
||||
{
|
||||
title: '订单状态',
|
||||
align: 'center',
|
||||
dataIndex: 'status_dictText',
|
||||
width: '80px',
|
||||
customRender: ({ text }) => {
|
||||
//入库状态:1.已创建;2.部分收货;3.收货完成;4.已关闭,5.已取消。
|
||||
const statusColorMap = {
|
||||
|
|
@ -39,31 +43,39 @@ export const columns: BasicColumn[] = [
|
|||
title: '单据类型',
|
||||
align: 'center',
|
||||
dataIndex: 'orderType_dictText',
|
||||
width: '80px',
|
||||
},
|
||||
{
|
||||
title: '需求数量',
|
||||
align: 'center',
|
||||
dataIndex: 'orderQty',
|
||||
width: '80px',
|
||||
},
|
||||
{
|
||||
title: '收货数量',
|
||||
align: 'center',
|
||||
dataIndex: 'receivedQty',
|
||||
width: '80px',
|
||||
},
|
||||
{
|
||||
title: '供应商',
|
||||
align: 'center',
|
||||
dataIndex: 'supplierCode',
|
||||
width: '80px',
|
||||
},
|
||||
{
|
||||
title: '外部仓库',
|
||||
align: 'center',
|
||||
dataIndex: 'whCode',
|
||||
width: '80px',
|
||||
},
|
||||
{
|
||||
title: '回传报文',
|
||||
align: 'center',
|
||||
dataIndex: 'resMessage',
|
||||
customRender: ({ text }) => {
|
||||
return render.renderTip(text)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单日期',
|
||||
|
|
@ -87,11 +99,11 @@ export const asnDetailColumns: JVxeColumn[] = [
|
|||
{
|
||||
title: '物料',
|
||||
key: 'itemId',
|
||||
type: JVxeTypes.selectSearch,
|
||||
type: JVxeTypes.selectDictSearch,
|
||||
width: 150,
|
||||
async: true, // 异步搜索,默认为 true
|
||||
//查询状态启用、未删除的物料
|
||||
dictCode: 'base_item where iz_active=1 and del_flag=0,item_code,id',
|
||||
dict: 'base_item where iz_active=1 and del_flag=0,item_code,id',
|
||||
tipsContent: '请搜索物料',
|
||||
validateRules: [
|
||||
{
|
||||
|
|
@ -112,11 +124,11 @@ export const asnDetailColumns: JVxeColumn[] = [
|
|||
{
|
||||
title: '容器',
|
||||
key: 'stockId',
|
||||
type: JVxeTypes.selectSearch,
|
||||
type: JVxeTypes.selectDictSearch,
|
||||
width: 150,
|
||||
async: true, // 异步搜索,默认为 true
|
||||
//查询状态为可用、启用、未删除的容器
|
||||
dictCode: 'base_stock where iz_active=1 and del_flag=0,stock_code,id',
|
||||
dict: 'base_stock where iz_active=1 and del_flag=0,stock_code,id',
|
||||
tipsContent: '请搜索容器',
|
||||
validateRules: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@
|
|||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'receive:data_asn:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增 </a-button>
|
||||
<a-button type="primary" @click="scanTray" preIcon="ant-design:barcode-outlined"> 托盘扫描 </a-button>
|
||||
|
||||
<a-button type="primary" v-auth="'receive:data_asn:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出 </a-button>
|
||||
<j-upload-button
|
||||
type="primary"
|
||||
|
|
@ -89,6 +91,7 @@
|
|||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<AsnModal @register="registerModal" @success="handleSuccess"></AsnModal>
|
||||
<ScanTrayModal ref="registerScanTrayModal" @success="handleSuccess"></ScanTrayModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -100,23 +103,21 @@
|
|||
import AsnModal from './components/AsnModal.vue';
|
||||
import { columns } from './Asn.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Asn.api';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getDateByPicker } from '/@/utils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { JInputTypeEnum } from '@/enums/cpteEnum';
|
||||
import { JInput, JDictSelectTag } from '@/components/Form';
|
||||
import JRangeDate from '@/components/Form/src/jeecg/components/JRangeDate.vue';
|
||||
import ScanTrayModal from '@/views/receive/asn/components/scanTray/ScanTrayModal.vue';
|
||||
import ItemModal from '@/views/base/item/components/ItemModal.vue';
|
||||
|
||||
const fieldPickers = reactive({});
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
const userStore = useUserStore();
|
||||
const { createMessage } = useMessage();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
const { tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '入库单',
|
||||
api: list,
|
||||
|
|
@ -213,6 +214,16 @@
|
|||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 托盘扫描
|
||||
*/
|
||||
const registerScanTrayModal = ref();
|
||||
|
||||
function scanTray() {
|
||||
registerScanTrayModal.value.disableSubmit = false;
|
||||
registerScanTrayModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,138 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ScanTrayForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="托盘" v-bind="validateInfos.stockCode" id="ScanTrayForm-stockCode" name="stockCode">
|
||||
<JSearchSelect
|
||||
v-model:value="formData.stockCode"
|
||||
placeholder="请选择托盘"
|
||||
dict="base_stock where status=1 and iz_active=1 and del_flag=0,stock_code,stock_code"
|
||||
allowClear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="入库工作站" v-bind="validateInfos.station" id="ScanTrayForm-station" name="station">
|
||||
<JSearchSelect
|
||||
v-model:value="formData.station"
|
||||
placeholder="请选择入库工作站"
|
||||
dict="base_point where area_id=1986328561044119554 and iz_active=1 and del_flag=0,point_code,point_code"
|
||||
allowClear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed } from 'vue';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import { JSearchSelect } from '@/components/Form';
|
||||
import { scanTray } from '@/views/conveyorLine/ConveyorLine.api';
|
||||
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({}) },
|
||||
formBpm: { type: Boolean, default: true },
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
stockCode: '',
|
||||
station: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
stockCode: [{ required: true, message: '请选择托盘!' }],
|
||||
station: [{ required: true, message: '请选择入库工作站!' }],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key];
|
||||
}
|
||||
});
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
try {
|
||||
const res = await scanTray(formData);
|
||||
if (res && res.code === 200) {
|
||||
createMessage.success('操作成功');
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.error(res.message || '处理失败');
|
||||
}
|
||||
} catch (error) {
|
||||
createMessage.error('请求异常: ' + error);
|
||||
} finally {
|
||||
confirmLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<template>
|
||||
<j-modal :title="title" :maxHeight="500" :width="600" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<ScanTrayForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ScanTrayForm>
|
||||
<template #footer>
|
||||
<a-button @click="handleCancel">取消</a-button>
|
||||
<a-button :class="{ 'jee-hidden': disableSubmit }" type="primary" @click="handleOk">确认</a-button>
|
||||
</template>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ScanTrayForm from './ScanTrayForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
const title = ref<string>('');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 托盘扫描
|
||||
*/
|
||||
function add() {
|
||||
title.value = '托盘扫描';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
defineExpose({
|
||||
add,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -94,11 +94,11 @@ export const pickDetailColumns: JVxeColumn[] = [
|
|||
{
|
||||
title: '物料',
|
||||
key: 'itemId',
|
||||
type: JVxeTypes.selectSearch,
|
||||
type: JVxeTypes.selectDictSearch,
|
||||
width: 150,
|
||||
async: true, // 异步搜索,默认为 true
|
||||
//查询状态启用、未删除的物料
|
||||
dictCode: 'base_item where iz_active=1 and del_flag=0,item_code,id',
|
||||
dict: 'base_item where iz_active=1 and del_flag=0,item_code,id',
|
||||
tipsContent: '请搜索物料',
|
||||
validateRules: [
|
||||
{
|
||||
|
|
@ -209,6 +209,40 @@ export const pickDetailColumns: JVxeColumn[] = [
|
|||
placeholder: '请输入${title}',
|
||||
defaultValue: null,
|
||||
},
|
||||
];
|
||||
|
||||
//task表格配置
|
||||
export const taskColumns: JVxeColumn[] = [
|
||||
{
|
||||
title: '任务ID',
|
||||
key: 'id',
|
||||
type: JVxeTypes.hidden,
|
||||
},
|
||||
{
|
||||
title: '物料',
|
||||
key: 'itemId',
|
||||
type: JVxeTypes.normal,
|
||||
async: true, // 异步搜索,默认为 true
|
||||
//查询状态启用、未删除的物料
|
||||
dict: 'base_item where iz_active=1 and del_flag=0,item_code,id',
|
||||
tipsContent: '请搜索物料',
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
key: 'unit',
|
||||
type: JVxeTypes.normal,
|
||||
dictCode: 'package_unit',
|
||||
placeholder: '请选择${title}',
|
||||
defaultValue: '托',
|
||||
},
|
||||
|
||||
{
|
||||
title: '拣货数量',
|
||||
key: 'planQty',
|
||||
type: JVxeTypes.normal,
|
||||
defaultValue: '0',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
title: '返回报文',
|
||||
key: 'resMessage',
|
||||
|
|
|
|||
|
|
@ -85,6 +85,21 @@
|
|||
:toolbar="true"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane tab="拣货详情" key="task" :forceRender="true">
|
||||
<j-vxe-table
|
||||
:keep-source="true"
|
||||
resizable
|
||||
ref="taskTableRef"
|
||||
:loading="taskTable.loading"
|
||||
:columns="taskTable.columns"
|
||||
:dataSource="taskTable.dataSource"
|
||||
:height="340"
|
||||
:disabled="disabled"
|
||||
:rowNumber="true"
|
||||
:rowSelection="true"
|
||||
:toolbar="false"
|
||||
/>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
|
@ -94,7 +109,7 @@
|
|||
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
||||
import { queryPickDetailListByMainId, queryDataById, saveOrUpdate } from '../Pick.api';
|
||||
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
||||
import { pickDetailColumns } from '../Pick.data';
|
||||
import { pickDetailColumns, taskColumns } from '../Pick.data';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import { JDictSelectTag } from '@/components/Form';
|
||||
import { Form } from 'ant-design-vue';
|
||||
|
|
@ -126,12 +141,23 @@
|
|||
setup(props, { emit }) {
|
||||
const loading = ref(false);
|
||||
const formRef = ref();
|
||||
//出库明细
|
||||
const pickDetailTableRef = ref();
|
||||
const pickDetailTable = reactive<Record<string, any>>({
|
||||
loading: false,
|
||||
columns: pickDetailColumns,
|
||||
dataSource: [],
|
||||
});
|
||||
|
||||
//拣货详细
|
||||
const taskTableRef = ref();
|
||||
const taskTable = reactive<Record<string, any>>({
|
||||
loading: false,
|
||||
columns: taskColumns,
|
||||
dataSource: [],
|
||||
});
|
||||
|
||||
|
||||
const activeKey = ref('pickDetail');
|
||||
//仓库 ID
|
||||
let tenantId = getTenantId();
|
||||
|
|
@ -154,7 +180,7 @@
|
|||
thirdOrderNo: [{ required: true, message: '请输入外部单号!' }],
|
||||
no: [{ required: true, message: '请输入任务号!' }],
|
||||
orderType: [{ required: true, message: '请选择单据类型!' }],
|
||||
whCode: [{ required: true, message: '请输入外部仓库代码' }]
|
||||
whCode: [{ required: true, message: '请输入外部仓库代码' }],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
//日期个性化选择
|
||||
|
|
@ -205,6 +231,7 @@
|
|||
|
||||
const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
|
||||
pickDetail: pickDetailTableRef,
|
||||
task: taskTableRef,
|
||||
});
|
||||
|
||||
async function getFormData() {
|
||||
|
|
@ -284,6 +311,8 @@
|
|||
return {
|
||||
pickDetailTableRef,
|
||||
pickDetailTable,
|
||||
taskTableRef,
|
||||
taskTable,
|
||||
validatorRules,
|
||||
validateInfos,
|
||||
activeKey,
|
||||
|
|
|
|||
Loading…
Reference in New Issue