|
@@ -90,13 +90,13 @@
|
|
<el-form ref="formRef" :model="formModel" :rules="formRules" label-position="top" label-width="auto">
|
|
<el-form ref="formRef" :model="formModel" :rules="formRules" label-position="top" label-width="auto">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="委托单位:" prop="key1">
|
|
|
|
- <el-input v-model="formModel.key1" placeholder="委托单位" disabled />
|
|
|
|
|
|
+ <el-form-item label="委托单位:">
|
|
|
|
+ <el-input v-model="formModel.entrustInfo" placeholder="委托单位" disabled />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="委托单位名称:" prop="key2">
|
|
|
|
- <el-input v-model="formModel.key2" placeholder="委托单位名称" disabled />
|
|
|
|
|
|
+ <el-form-item label="委托单位名称:">
|
|
|
|
+ <el-input v-model="formModel.entrustName" placeholder="委托单位名称" disabled />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -110,13 +110,13 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="样品编号:" prop="key5">
|
|
|
|
- <el-input v-model="formModel.key5" placeholder="样品编号" disabled />
|
|
|
|
|
|
+ <el-form-item label="样品编号:">
|
|
|
|
+ <el-input v-model="formModel.entrustNo" placeholder="样品编号" disabled />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="试验数量:" prop="key6">
|
|
|
|
- <el-input v-model="formModel.key6" placeholder="试验数量" />
|
|
|
|
|
|
+ <el-form-item label="试验数量:" prop="expCount">
|
|
|
|
+ <el-input v-model="formModel.expCount" placeholder="试验数量" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -133,7 +133,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
<template #footer>
|
|
<template #footer>
|
|
<el-button @click="rowActionModalClose">取消</el-button>
|
|
<el-button @click="rowActionModalClose">取消</el-button>
|
|
- <el-button hc-btn type="primary" @click="rowActionSave">创建</el-button>
|
|
|
|
|
|
+ <el-button hc-btn type="primary" :loading="rowActionLoading" @click="rowActionSave">创建</el-button>
|
|
</template>
|
|
</template>
|
|
</hc-new-dialog>
|
|
</hc-new-dialog>
|
|
</hc-body>
|
|
</hc-body>
|
|
@@ -143,7 +143,7 @@
|
|
import { onActivated, ref } from 'vue'
|
|
import { onActivated, ref } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
-import { deepClone, getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
|
|
|
|
|
|
+import { deepClone, formValidate, getArrValue, getObjValue, isNullES, isString } from 'js-fast-way'
|
|
import TestTree from '~src/views/tentative/material/components/TestTree.vue'
|
|
import TestTree from '~src/views/tentative/material/components/TestTree.vue'
|
|
import { getDictionaryData } from '~uti/tools'
|
|
import { getDictionaryData } from '~uti/tools'
|
|
import SamplingPage from './commission/sampling.vue'
|
|
import SamplingPage from './commission/sampling.vue'
|
|
@@ -354,10 +354,10 @@ const rowView = (row) => {
|
|
const formRef = ref(null)
|
|
const formRef = ref(null)
|
|
const formModel = ref({})
|
|
const formModel = ref({})
|
|
const formRules = {
|
|
const formRules = {
|
|
- meterPeriodId: {
|
|
|
|
|
|
+ expCount: {
|
|
required: true,
|
|
required: true,
|
|
trigger: 'blur',
|
|
trigger: 'blur',
|
|
- message: '请选择计量期',
|
|
|
|
|
|
+ message: '请填写试验数量',
|
|
},
|
|
},
|
|
}
|
|
}
|
|
|
|
|
|
@@ -370,8 +370,12 @@ const rowReports = async (row) => {
|
|
}
|
|
}
|
|
|
|
|
|
//提交保存
|
|
//提交保存
|
|
|
|
+const rowActionLoading = ref(false)
|
|
const rowActionSave = async () => {
|
|
const rowActionSave = async () => {
|
|
- rowActionModalClose()
|
|
|
|
|
|
+ const isForm = await formValidate(formRef.value)
|
|
|
|
+ if (!isForm) return
|
|
|
|
+ console.log(formModel.value)
|
|
|
|
+ //rowActionModalClose()
|
|
}
|
|
}
|
|
|
|
|
|
//关闭弹窗
|
|
//关闭弹窗
|