فهرست منبع

feat(备件申请): 自动填充领用部门和领用人信息并优化表单校验规则

yusheng 5 ماه پیش
والد
کامیت
7922ad12d7
1فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 4 4
      src/views/sparePartsApply/components/edit.vue

+ 4 - 4
src/views/sparePartsApply/components/edit.vue

@@ -291,9 +291,7 @@
         executorList: [],
         form: { ...defForm },
         rules: {
-          deviceName: [
-            { required: true, message: '请选择', trigger: 'change' }
-          ],
+          deviceName: [{ required: true, message: '请选择', trigger: 'change' }]
           // useDeptName: [
           //   { required: true, message: '请输入', trigger: 'change' }
           // ],
@@ -497,7 +495,7 @@
         this.sparePartsApplyList = [];
         this.tableList = [];
         this.deviceList = [];
-        
+
         this.form = { ...defForm };
         this.executorList = [];
         this.visible = false;
@@ -510,6 +508,8 @@
         this.form.repairName = row.planName;
         this.form.repairId = row.id;
         this.deviceList = row.deviceList;
+        this.form.receivingDeptName = this.$store.state.user.info.groupName;
+        this.form.recipientName = this.$store.state.user.info.name;
       },
 
       addEquipment() {