From 4b62098fb4528e3f38df4265e1e2ec081664d4b4 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期三, 25 十月 2023 13:18:41 +0800
Subject: [PATCH] 鉴定工单调整

---
 src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue |   92 +++++++++++++++++++++++++++++++++++-----------
 1 files changed, 70 insertions(+), 22 deletions(-)

diff --git a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
index 16a4a2b..94377f6 100644
--- a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
+++ b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
@@ -6,7 +6,7 @@
         <a-row>
           <a-col :span='12'>
             <a-form-model-item label='鐢宠鍗曠紪鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'>
-              <a-input v-model='model.num' placeholder='璇疯緭鍏ョ敵璇峰崟缂栧彿'></a-input>
+              <a-input v-model='model.num' placeholder="灏嗙敱绯荤粺鐢熸垚"></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span='12'>
@@ -28,6 +28,12 @@
             <a-form-model-item label='鐢宠浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='applicant'>
               <j-dict-select-tag type='list' v-model='model.applicant' dictCode='sys_user,realname,id'
                                  placeholder='璇烽�夋嫨鐢宠浜�' disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span='12'>
+            <a-form-model-item label='鍔炵悊浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='handlePerson'>
+              <j-dict-select-tag type='list' v-model='model.handlePerson' dictCode='sys_user,realname,id'
+                                 placeholder='璇烽�夋嫨鍔炵悊浜�'  />
             </a-form-model-item>
           </a-col>
           <a-col :span='12'>
@@ -66,7 +72,7 @@
 
 <script>
 
-import { getAction } from '@/api/manage'
+import { getAction,httpAction } from '@/api/manage'
 import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
 import { JVXETypes } from '@/components/jeecg/JVxeTable'
 import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js'
@@ -82,6 +88,7 @@
   },
   data() {
     return {
+      isAchievement:false,
       labelCol: {
         xs: { span: 24 },
         sm: { span: 5 }
@@ -98,9 +105,9 @@
       // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
       addDefaultRowNum: 1,
       validatorRules: {
-        num: [
-          { required: true, message: '璇疯緭鍏ョ敵璇峰崟缂栧彿!' }
-        ],
+        // num: [
+        //   { required: true, message: '璇疯緭鍏ョ敵璇峰崟缂栧彿!' }
+        // ],
         auditStatus: [
           { required: true, message: '璇疯緭鍏ュ鏍哥姸鎬�!' }
         ]
@@ -152,7 +159,7 @@
             validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }]
           },
           {
-            title: '琛ュ姙鍘熷洜',
+            title: '鐢宠/琛ュ姙鍘熷洜',
             key: 'replaceReason',
             type: JVXETypes.input,
             width: '200px',
@@ -173,7 +180,8 @@
             type: JVXETypes.input,
             width: '200px',
             placeholder: '璇疯緭鍏�${title}',
-            defaultValue: ''
+            defaultValue: '',
+            disabled:false
           },
           {
             title: '瀹炴搷鎴愮哗',
@@ -181,34 +189,38 @@
             type: JVXETypes.input,
             width: '200px',
             placeholder: '璇疯緭鍏�${title}',
-            defaultValue: ''
+            defaultValue: '',
+            disabled:false
           },
           {
             title: '鑰冭瘯缁撹',
             key: 'examinationConclusion',
-            type: JVXETypes.checkbox,
-            customValue: ['Y', 'N'],
+            type: JVXETypes.select,
+            dictCode:'examination_conclusion',
             width: '200px',
             placeholder: '璇疯緭鍏�${title}',
-            defaultValue: ''
+            defaultValue: '',
+            disabled:false
           },
-          {
-            title: '鐘舵��',
-            key: 'status',
-            type: JVXETypes.input,
-            width: '200px',
-            placeholder: '璇疯緭鍏�${title}',
-            defaultValue: ''
-          }
+          // {
+          //   title: '鐘舵��',
+          //   key: 'status',
+          //   type: JVXETypes.input,
+          //   width: '200px',
+          //   placeholder: '璇疯緭鍏�${title}',
+          //   defaultValue: ''
+          // } 
         ]
       },
       url: {
         add: '/eam/operationCertificateApply/add',
         edit: '/eam/operationCertificateApply/edit',
+        addOperationCertificate:'/eam/operationCertificate/addOperationCertificate',
         queryById: '/eam/operationCertificateApply/queryById',
         operationCertificateApplyDetail: {
           list: '/eam/operationCertificateApply/queryOperationCertificateApplyDetailByMainId'
-        }
+        },
+        getNum: '/eam/sysIdentity/getNumNew',
       }
     }
   },
@@ -218,7 +230,7 @@
       type: Boolean,
       default: false,
       required: false
-    }
+    },
   },
   computed: {
     formDisabled() {
@@ -226,8 +238,17 @@
     }
   },
   created() {
+    this.initNum()
   },
   methods: {
+
+    initNum(){
+      getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => {
+            if (res.success) {
+              this.model.num = res.message
+            }
+          })
+    },
     addBefore() {
       this.operationCertificateApplyDetailTable.dataSource = []
     },
@@ -270,7 +291,34 @@
     },
     validateError(msg) {
       this.$message.error(msg)
-    }
+    },
+    request(formData) {
+      let url = this.url.add, method = 'post'
+      if (this.model.id) {
+        url = this.url.edit
+        method = 'put'
+      }
+      this.confirmLoading = true
+      console.log("formData===>",formData);
+      httpAction(url, formData, method).then((res) => {
+        if (res.success) {
+          httpAction(this.url.addOperationCertificate, formData.operationCertificateApplyDetailList, 'post').then((res) => {
+            if (res.success) {
+              this.$message.success(res.message)
+            }else {
+              this.$message.warning(res.message)
+            }
+          })
+          this.$message.success(res.message)
+          this.$emit('ok')
+          this.close()
+        } else {
+          this.$message.warning(res.message)
+        }
+      }).finally(() => {
+        this.confirmLoading = false
+      })
+    },
 
   }
 }

--
Gitblit v1.9.3