Explorar el Código

材料进场修改

duy hace 1 mes
padre
commit
1e1028dc78
Se han modificado 1 ficheros con 20 adiciones y 2 borrados
  1. 20 2
      src/views/tentative/material/approach.vue

+ 20 - 2
src/views/tentative/material/approach.vue

@@ -109,7 +109,7 @@
                 <div class="hc-form-item">
                     <el-form-item label="材料类型" prop="materialType">
                         <el-select v-model="addEditFormModel.materialType" block>
-                            <el-option v-for="item in typeData" :label="item.dictValue" :value="item.dictKey" />
+                            <el-option v-for="(item, index) in typeData" :key="index" :label="item.dictValue" :value="item.dictKey" />
                         </el-select>
                     </el-form-item>
                     <el-form-item label="材料单价" prop="materialPrice">
@@ -280,7 +280,7 @@
 </template>
 
 <script setup>
-import { onMounted, ref } from 'vue'
+import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import HcDragUpload from './components/HcDragUpload.vue'
 import FormItemUpload from './components/FormItemUpload.vue'
@@ -480,6 +480,24 @@ const addEditFormModalClose = () => {
 //新增/编辑 表单
 const addEditFormRef = ref(null)
 const addEditFormModel = ref({})
+
+
+watch(() => addEditFormModel.value.productionCertificate, (newVal) => {
+  if (newVal) {
+     addEditFormModel.value.productionCertificatePdfUrl = newVal
+  }
+})
+
+watch(() => addEditFormModel.value.qualityInspectionReport, (newVal) => {
+  if (newVal) {
+    addEditFormModel.value.qualityInspectionReportPdfUrl = newVal
+  }
+})
+watch(() => addEditFormModel.value.otherAccessories, (newVal) => {
+  if (newVal) {
+    addEditFormModel.value.otherAccessoriesPdfUrl = newVal
+  }
+})
 const otherAccessoriesName = ref('')
 const productionCertificateName = ref('')
 const qualityInspectionReportName = ref('')