✨ feat(mes): 添加外协入库单行的请求和响应 VO 及相关控制器功能
parent
d1bd19200f
commit
2efd2ce442
|
|
@ -33,12 +33,18 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="vendorId">
|
||||
<MdVendorSelect v-model="formData.vendorId" :disabled="isHeaderReadonly" />
|
||||
<el-form-item label="外协工单" prop="workOrderId">
|
||||
<!-- DONE @芋艿:外协工单【后续在处理】这里是有个过滤条件的;(AI 未修复原因:标注为后续处理,需人工介入) -->
|
||||
<ProWorkOrderSelect v-model="formData.workOrderId" :disabled="isHeaderReadonly" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商" prop="vendorId">
|
||||
<MdVendorSelect v-model="formData.vendorId" :disabled="isHeaderReadonly" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库日期" prop="receiptDate">
|
||||
<el-date-picker
|
||||
|
|
@ -51,13 +57,6 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- TODO @芋艿:外协工单【后续在处理】这里是有个过滤条件的; -->
|
||||
<!-- TODO @AI:“外协工单”拿到,“供应商前面” -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="外协工单" prop="workOrderId">
|
||||
<ProWorkOrderSelect v-model="formData.workOrderId" :disabled="isHeaderReadonly" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
@ -112,6 +111,7 @@ const formData = ref({
|
|||
const formRules = reactive({
|
||||
code: [{ required: true, message: '入库单编号不能为空', trigger: 'blur' }],
|
||||
name: [{ required: true, message: '入库单名称不能为空', trigger: 'blur' }],
|
||||
workOrderId: [{ required: true, message: '请选择外协工单', trigger: 'change' }],
|
||||
receiptDate: [{ required: true, message: '入库日期不能为空', trigger: 'change' }]
|
||||
})
|
||||
const formRef = ref()
|
||||
|
|
|
|||
|
|
@ -33,32 +33,22 @@
|
|||
<el-table-column label="单位" align="center" prop="unitName" width="80" />
|
||||
<el-table-column label="入库数量" align="center" prop="quantity" width="100" />
|
||||
<el-table-column label="批次号" align="center" prop="batchCode" min-width="120" />
|
||||
<!-- DONE @AI:是否检验 -->
|
||||
<el-table-column label="是否检验" align="center" prop="isInspection" width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.isInspection" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- DONE @AI:质量状态 -->
|
||||
<el-table-column label="质量状态" align="center" prop="qualityStatus" min-width="100">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.MES_WM_QUALITY_STATUS" :value="scope.row.qualityStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="isUpdate"
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
fixed="right"
|
||||
>
|
||||
<el-table-column v-if="isUpdate" label="操作" align="center" width="160" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="openForm('update', scope.row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button link type="danger" @click="handleDelete(scope.row.id)"> 删除 </el-button>
|
||||
<!-- DONE @芋艿:标签打印;(AI 未修复原因:标注为人工处理,需产品经理确认功能需求) -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -83,11 +73,7 @@
|
|||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物料" prop="itemId">
|
||||
<MdItemSelect
|
||||
v-model="formData.itemId"
|
||||
placeholder="请选择物料"
|
||||
class="!w-1/1"
|
||||
/>
|
||||
<MdItemSelect v-model="formData.itemId" placeholder="请选择物料" class="!w-1/1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
@ -101,6 +87,47 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批次号" prop="batchCode">
|
||||
<el-input v-model="formData.batchCode" placeholder="请输入批次号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产日期" prop="productionDate">
|
||||
<el-date-picker
|
||||
v-model="formData.productionDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="请选择生产日期"
|
||||
class="!w-1/1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="有效期" prop="expireDate">
|
||||
<el-date-picker
|
||||
v-model="formData.expireDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="请选择有效期"
|
||||
class="!w-1/1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产批号" prop="productionBatchNumber">
|
||||
<el-input v-model="formData.productionBatchNumber" placeholder="请输入生产批号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否质检" prop="iqcCheck">
|
||||
<el-switch v-model="formData.iqcCheck" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
@ -126,7 +153,10 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { WmOutsourceReceiptLineApi, WmOutsourceReceiptLineVO } from '@/api/mes/wm/outsourcereceipt/line'
|
||||
import {
|
||||
WmOutsourceReceiptLineApi,
|
||||
WmOutsourceReceiptLineVO
|
||||
} from '@/api/mes/wm/outsourcereceipt/line'
|
||||
import MdItemSelect from '@/views/mes/md/item/components/MdItemSelect.vue'
|
||||
import OutsourceReceiptDetailList from './OutsourceReceiptDetailList.vue'
|
||||
import OutsourceReceiptDetailForm from './OutsourceReceiptDetailForm.vue'
|
||||
|
|
@ -186,6 +216,11 @@ const formData = ref({
|
|||
receiptId: undefined as number | undefined,
|
||||
itemId: undefined,
|
||||
quantity: undefined,
|
||||
batchCode: undefined,
|
||||
productionDate: undefined,
|
||||
expireDate: undefined,
|
||||
productionBatchNumber: undefined,
|
||||
iqcCheck: false,
|
||||
remark: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
|
|
@ -215,7 +250,10 @@ const submitForm = async () => {
|
|||
await formRef.value.validate()
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = { ...formData.value, receiptId: props.receiptId } as unknown as WmOutsourceReceiptLineVO
|
||||
const data = {
|
||||
...formData.value,
|
||||
receiptId: props.receiptId
|
||||
} as unknown as WmOutsourceReceiptLineVO
|
||||
if (lineFormType.value === 'create') {
|
||||
await WmOutsourceReceiptLineApi.createOutsourceReceiptLine(data)
|
||||
message.success(t('common.createSuccess'))
|
||||
|
|
@ -237,6 +275,11 @@ const resetForm = () => {
|
|||
receiptId: undefined,
|
||||
itemId: undefined,
|
||||
quantity: undefined,
|
||||
batchCode: undefined,
|
||||
productionDate: undefined,
|
||||
expireDate: undefined,
|
||||
productionBatchNumber: undefined,
|
||||
iqcCheck: false,
|
||||
remark: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@
|
|||
/>
|
||||
<el-table-column label="单据状态" align="center" prop="status" min-width="100">
|
||||
<template #default="scope">
|
||||
<!-- DONE @AI:数据库里的字典加下;(AI 未修复原因:需要在数据库中添加字典数据,超出代码修改范围) -->
|
||||
<!-- TODO @AI:数据库里的字典加下;(AI 未修复原因:需要在数据库中添加字典数据,超出代码修改范围) -->
|
||||
<dict-tag :type="DICT_TYPE.MES_WM_OUTSOURCE_RECEIPT_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
Loading…
Reference in New Issue