|
|
@@ -51,7 +51,11 @@
|
|
|
<el-descriptions-item label="已完成数量">{{ form.qtyCompleted ?? '-' }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
<el-form-item label="报检数量"><el-input-number v-model="form.qty" :controls="false" :min="0" style="width: 180px" /></el-form-item>
|
|
|
- <el-form-item label="检验优先级"><el-input v-model="form.priority" style="width: 180px" /></el-form-item>
|
|
|
+ <el-form-item label="检验优先级">
|
|
|
+ <el-select v-model="form.priority" style="width: 180px">
|
|
|
+ <el-option v-for="item in FQC_PRIORITY_OPTIONS" :key="item" :label="item" :value="item" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="击发编号"><el-input v-model="form.fireNo" style="width: 260px" /></el-form-item>
|
|
|
<el-form-item label="备注"><el-input v-model="form.remark" type="textarea" :rows="2" style="width: 360px" /></el-form-item>
|
|
|
</el-form>
|
|
|
@@ -116,6 +120,7 @@ import { useRoute, useRouter } from 'vue-router';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
import AidopDemoShell from '/@/views/aidop/components/AidopDemoShell.vue';
|
|
|
import { fetchFqcWorkOrders, fetchFqcApplyPage, fetchFqcApplyDetail, createFqcApply, generateFqcInspection, type FqcWorkOrderRow, type FqcApplyRow } from '../api/fqcApply';
|
|
|
+import { createFqcApplyForm, fillFqcApplyFormFromWorkOrder, FQC_PRIORITY_OPTIONS } from './fqcApplyForm';
|
|
|
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
@@ -154,11 +159,9 @@ function doSearch() {
|
|
|
// 新增报检
|
|
|
const createVisible = ref(false);
|
|
|
const saving = ref(false);
|
|
|
-const form = reactive<{ workOrdRecId: number | null; batch: string; materialCode: string; productName: string; productModel: string; lotSerial: string; qtyOrded: number | null; qtyCompleted: number | null; qty: number | null; priority: string; fireNo: string; remark: string }>({
|
|
|
- workOrdRecId: null, batch: '', materialCode: '', productName: '', productModel: '', lotSerial: '', qtyOrded: null, qtyCompleted: null, qty: null, priority: '', fireNo: '', remark: '',
|
|
|
-});
|
|
|
+const form = reactive(createFqcApplyForm());
|
|
|
function openCreate() {
|
|
|
- Object.assign(form, { workOrdRecId: null, batch: '', materialCode: '', productName: '', productModel: '', lotSerial: '', qtyOrded: null, qtyCompleted: null, qty: null, priority: '', fireNo: '', remark: '' });
|
|
|
+ Object.assign(form, createFqcApplyForm());
|
|
|
createVisible.value = true;
|
|
|
}
|
|
|
async function onCreate() {
|
|
|
@@ -213,14 +216,7 @@ function woHint(row: FqcWorkOrderRow): string {
|
|
|
return '';
|
|
|
}
|
|
|
function pickWo(row: FqcWorkOrderRow) {
|
|
|
- form.workOrdRecId = row.recId;
|
|
|
- form.batch = row.batch || '';
|
|
|
- form.materialCode = row.materialCode || '';
|
|
|
- form.productName = row.productName || '';
|
|
|
- form.productModel = row.productModel || '';
|
|
|
- form.lotSerial = row.lotSerial || '';
|
|
|
- form.qtyOrded = row.qtyOrded ?? null;
|
|
|
- form.qtyCompleted = row.qtyCompleted ?? null;
|
|
|
+ fillFqcApplyFormFromWorkOrder(form, row);
|
|
|
woVisible.value = false;
|
|
|
}
|
|
|
|