Procházet zdrojové kódy

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin před 4 roky
rodič
revize
36dbe8e1ba

+ 20 - 0
src/common/constants/enumsName.ts

@@ -495,4 +495,24 @@ export function getAgreementTypeName(type: EnumType.AgreementType): string {
             break
     }
     return result
+}
+
+/**
+ * 获取协议状态
+ * @param isvalid
+ */
+export function getAgreementStatus(isvalid: number): string {
+    let result = '--'
+    switch (isvalid) {
+        case 1:
+            result = '正常'
+            break
+        case 2:
+            result = '停用'
+            break
+        case 3:
+            result = '注销'
+            break
+    }
+    return result
 }

+ 5 - 1
src/views/platinum/platinum_agreement/list/tab/index.vue

@@ -21,6 +21,9 @@
                  @click="openComponent" />
       </template>
       <!-- 协议类型-->
+        <template #isvalid="{ record }">
+            <span>{{ getAgreementStatus(record.isvalid) }}</span>
+        </template>
       <template #agreementtype="{ record }">
         <span>{{ getAgreementTypeName(record.agreementtype) }}</span>
       </template>
@@ -45,7 +48,7 @@ import { defineComponent, queryTableList, _getBtnList } from '@/common/export/ta
 import { queryAgreementConfig } from '@/services/go/ermcp/qhj';
 import { QhjAgreementConfig } from '@/services/go/ermcp/qhj/interface';
 import Filter from '../../compoments/filter/index.vue';
-import { getAgreementTypeName } from '@/common/constants/enumsName';
+import {getAgreementStatus, getAgreementTypeName} from '@/common/constants/enumsName';
 import BtnList from '@/common/components/btnList/index.vue';
 import { handleArgreementType, handlePermissionBtn } from '../../setup';
 import contextMenu from '@/common/components/contextMenu/temp.vue';
@@ -99,6 +102,7 @@ export default defineComponent({
             handlePermissionBtn,
             filterTable,
             getAgreementTypeName,
+            getAgreementStatus,
         };
     },
 });