Procházet zdrojové kódy

fix: 审批管理,笼位申请的审批缺少字段展示

Lambert před 2 měsíci
rodič
revize
c0684b877f

+ 13 - 0
components.d.ts

@@ -13,22 +13,34 @@ declare module 'vue' {
     RouterView: typeof import('vue-router')['RouterView']
     SelectInst: typeof import('./src/components/select-inst.vue')['default']
     SelectInstAppointRecord: typeof import('./src/components/select-inst-appoint-record.vue')['default']
+    VanActionBar: typeof import('vant/es')['ActionBar']
+    VanActionBarButton: typeof import('vant/es')['ActionBarButton']
+    VanActionBarIcon: typeof import('vant/es')['ActionBarIcon']
+    VanBackTop: typeof import('vant/es')['BackTop']
     VanButton: typeof import('vant/es')['Button']
     VanCalendar: typeof import('vant/es')['Calendar']
     VanCell: typeof import('vant/es')['Cell']
     VanCellGroup: typeof import('vant/es')['CellGroup']
     VanCheckbox: typeof import('vant/es')['Checkbox']
+    VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup']
+    VanCol: typeof import('vant/es')['Col']
+    VanDatePicker: typeof import('vant/es')['DatePicker']
     VanDialog: typeof import('vant/es')['Dialog']
+    VanEmpty: typeof import('vant/es')['Empty']
     VanField: typeof import('vant/es')['Field']
     VanFloatingBubble: typeof import('vant/es')['FloatingBubble']
     VanForm: typeof import('vant/es')['Form']
     VanIcon: typeof import('vant/es')['Icon']
+    VanImage: typeof import('vant/es')['Image']
     VanList: typeof import('vant/es')['List']
     VanNotify: typeof import('vant/es')['Notify']
     VanPicker: typeof import('vant/es')['Picker']
+    VanPickerGroup: typeof import('vant/es')['PickerGroup']
     VanPopup: typeof import('vant/es')['Popup']
     VanRadio: typeof import('vant/es')['Radio']
     VanRadioGroup: typeof import('vant/es')['RadioGroup']
+    VanRow: typeof import('vant/es')['Row']
+    VanSearch: typeof import('vant/es')['Search']
     VanStep: typeof import('vant/es')['Step']
     VanStepper: typeof import('vant/es')['Stepper']
     VanSteps: typeof import('vant/es')['Steps']
@@ -40,6 +52,7 @@ declare module 'vue' {
     VanTabs: typeof import('vant/es')['Tabs']
     VanTag: typeof import('vant/es')['Tag']
     VanTextEllipsis: typeof import('vant/es')['TextEllipsis']
+    VanTimePicker: typeof import('vant/es')['TimePicker']
     VanUploader: typeof import('vant/es')['Uploader']
   }
 }

+ 7 - 1
src/view/animal/application/components/Application.vue

@@ -343,7 +343,13 @@ const getDicts = () => {
 
 // 重置表单数据
 const resetForm = () => {
-  state.form = { ...defaultFormData }
+  Object.assign(state.form, deepClone(defaultFormData));
+
+  // 3. 特别注意:你在 onSubmit 里把 age 和 weight 转成了字符串
+  // 这里必须手动确保它们恢复成对象结构,否则 v-model 会报错
+  state.form.age = { min: null, max: null };
+  state.form.weight = { min: null, max: null };
+  // state.form = { ...defaultFormData }
   expertDialogFormRef.value?.resetValidation()
   licenseNumberFileList.value = []
   animalTestDateFileList.value = []

+ 15 - 0
src/view/todo/component/plat_cage_applications.vue

@@ -21,6 +21,11 @@
         title="申请笼位(个)"
         :value="state.form.number"
       />
+      <van-cell title="开始使用时间">
+        <template #value>
+          <span>{{ dayjs(state.form.startDate).format('YYYY-MM-DD') }}</span>
+        </template>
+      </van-cell>
       <van-cell
         title="动物类别"
         :value="state.form.categoryName"
@@ -29,6 +34,7 @@
         title="品种品系"
         :value="state.form.variety"
       />
+      <van-cell title="饲养区域" :value="LeavelList.find(i => i.id === state.form.level)?.name || '未选择'"/>
       <van-cell
         title="采购渠道"
         :value="checkProcurementChannels"
@@ -188,6 +194,13 @@
       id: 40,
     },
   ]
+
+  const LeavelList = [
+    { name: '普通级', id: 1 },
+    { name: 'SPF级', id: 3 },
+    // { name: '无菌级', id: 4 },
+  ]
+
   // 解析范围字段
   const parseRangeField = (str: string) => {
     try {
@@ -232,6 +245,8 @@
       ethicsCheckFile: '',
       ethicsAdviceFile: '',
       geneIdentificationFile: '',
+      startDate: '',
+      level: '',
     },
     disabled: false,
   })