From ab701df859cd79ae036f8cc86268137d2c8da8ee Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 22 Feb 2024 18:00:56 +0800
Subject: [PATCH] 消防自查导出、消防自查和场所检查增加场所类别字段

---
 src/views/publicSecurity/positionManage/TransactRegist.vue |  182 +++++++++++++++++++++++----------------------
 1 files changed, 94 insertions(+), 88 deletions(-)

diff --git a/src/views/publicSecurity/positionManage/TransactRegist.vue b/src/views/publicSecurity/positionManage/TransactRegist.vue
index 4e4350a..d888c4d 100644
--- a/src/views/publicSecurity/positionManage/TransactRegist.vue
+++ b/src/views/publicSecurity/positionManage/TransactRegist.vue
@@ -13,8 +13,8 @@
                 <el-button type="text" :size="size" icon="el-icon-delete" v-if="permission.place_del" plain
                     @click="rowDel(row)">删 除
                 </el-button>
-                <el-button type="text" :size="size" icon="el-icon-s-check" v-if="row.confirmFlag == 1" plain
-                    @click="goAudit(row)" :disabled="row.confirmFlag != 1">审 核
+                <el-button type="text" :size="size" icon="el-icon-s-check" plain @click="goAudit(row)"
+                    v-if="row.confirmFlag == 1" :disabled="row.confirmFlag != 1">审 核
                 </el-button>
             </template>
 
@@ -39,6 +39,11 @@
                     v-text="textDispose(row, 'transactionObjectTelflag', 'transactionObjectTel')">
                 </el-button>
             </template>
+            <template slot-scope="{row, size}" slot="idCard">
+                <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
+                    v-text="textDispose(row, 'idCardflag', 'idCard')">
+                </el-button>
+            </template>
         </avue-crud>
 
 
@@ -50,21 +55,7 @@
 
         <el-dialog :visible.sync="visible" append-to-body destroy-on-close title="审核" width="30%"
             custom-class="flow-design-dialog" :before-close="handleClose">
-            <el-form ref="auditForm" :model="auditForm" :rules="auditRules">
-                <el-form-item label="审核结论:" prop="status">
-                    <el-radio-group v-model="auditForm.status">
-                        <el-radio :label="2">通过</el-radio>
-                        <el-radio :label="3">不通过</el-radio>
-                    </el-radio-group>
-                </el-form-item>
-                <el-form-item label="不通过原因:" prop="remark" v-if="auditForm.status == 3">
-                    <el-input type="textarea" v-model="auditForm.remark"></el-input>
-                </el-form-item>
-            </el-form>
-            <div style="display:flex;justify-content:center">
-                <el-button @click="submitAudit" size="small" type="primary">保 存</el-button>
-                <el-button @click="cancelAudit" size="small">取 消</el-button>
-            </div>
+            <audit-base @handleSubmit="submitAudit"></audit-base>
         </el-dialog>
     </basic-container>
 </template>
@@ -123,7 +114,6 @@
                 status: [{ required: true, message: "必填" }],
                 remark: [{ required: true, message: "必填" }],
             },
-            auditForm: {},
             visible: false,
             taskType: 0,
             curRow: {},
@@ -167,35 +157,29 @@
                     {
                         width: 110,
                         span: 12,
-                        label: "场所负责人",
-                        prop: "owner",
-                        searchSpan: 4,
-                        searchLabelWidth: 100,
-                        search: true,
-                        align: 'center'
-                    }, {
-                        width: 120,
-                        span: 12,
-                        label: "联系方式",
-                        prop: "phoneNumber",
-                        searchSpan: 4,
-                        search: true,
-                        rules: [{
-                            validator: validatorPhone,
-                            trigger: 'blur'
-                        }],
-                        align: 'center',
-                        slot: true,
-                    },
-                    {
-                        width: 110,
-                        span: 12,
                         label: "场所名称",
                         prop: "districtName",
                         searchSpan: 4,
                         searchLabelWidth: 100,
                         search: true,
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
+                    },
+                    {
+                        span: 12,
+                        label: "场所地址",
+                        prop: "localtion",
+                        searchSpan: 4,
+                        minWidth: 220,
+                        overHidden: true,
+                        // search: true,
+                        rules: [{
+                            required: true,
+                            message: "请输入地址",
+                            trigger: "blur",
+                        },],
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
                         label: "阵地类型",
@@ -210,6 +194,33 @@
                         searchSpan: 4,
                         align: 'center',
                         width: 120,
+                        labelWidth: 110,
+                    },
+                    {
+                        width: 110,
+                        span: 12,
+                        label: "场所负责人",
+                        prop: "owner",
+                        searchSpan: 4,
+                        searchLabelWidth: 110,
+                        search: true,
+                        align: 'center',
+                        labelWidth: 110,
+                    }, {
+                        width: 120,
+                        span: 12,
+                        label: "联系方式",
+                        prop: "phoneNumber",
+                        searchSpan: 4,
+                        search: true,
+                        searchLabelWidth: 96,
+                        rules: [{
+                            validator: validatorPhone,
+                            trigger: 'blur'
+                        }],
+                        align: 'center',
+                        slot: true,
+                        labelWidth: 110,
                     },
                     {
                         width: 110,
@@ -217,9 +228,10 @@
                         label: "交易对象",
                         prop: "transactionObject",
                         searchSpan: 4,
-                        searchLabelWidth: 100,
+                        searchLabelWidth: 96,
                         search: true,
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
                         width: 110,
@@ -227,65 +239,57 @@
                         label: "交易对象电话",
                         prop: "transactionObjectTel",
                         searchSpan: 4,
-                        searchLabelWidth: 100,
+                        searchLabelWidth: 120,
+                        searchPlaceholder: '请输入交易电话',
                         search: true,
                         align: 'center',
                         labelWidth: 110,
                         slot: true
                     },
                     {
-                        width: 110,
+                        width: 160,
                         span: 12,
                         label: "身份证号",
                         prop: "idCard",
                         searchSpan: 4,
                         searchLabelWidth: 100,
                         search: true,
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
                         width: 110,
                         span: 12,
                         label: "交易数量",
                         prop: "goodsNums",
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
                         width: 110,
                         span: 12,
                         label: "交易金额",
                         prop: "transactionMoney",
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
                         width: 110,
                         span: 12,
                         label: "交易过程",
                         prop: "transactionProcess",
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
                         width: 140,
                         span: 12,
                         label: "发生时间",
-                        prop: "happenTime",
-                        align: 'center'
+                        prop: "createTime",
+                        align: 'center',
+                        labelWidth: 110,
                     },
                     {
-                        span: 12,
-                        label: "地址",
-                        prop: "localtion",
-                        searchSpan: 4,
-                        minWidth: 220,
-                        overHidden: true,
-                        // search: true,
-                        rules: [{
-                            required: true,
-                            message: "请输入地址",
-                            trigger: "blur",
-                        },],
-                        align: 'center'
-                    }, {
                         width: 110,
                         label: "所属街道",
                         // hide: true,
@@ -293,16 +297,17 @@
                         parent: false,
                         searchSpan: 4,
                         prop: "streetName",
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     }, {
                         width: 156,
                         parent: false,
                         searchSpan: 4,
                         label: "所属社区",
                         prop: "communityName",
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     },
-
                     {
                         width: 100,
                         addDisplay: false,
@@ -325,7 +330,8 @@
                             label: '待接收',
                             value: 4
                         }],
-                        align: 'center'
+                        align: 'center',
+                        labelWidth: 110,
                     }, {
                         width: 110,
                         label: '物品图片',
@@ -336,6 +342,7 @@
                         dataType: "string",
                         disabled: true,
                         span: 12,
+                        labelWidth: 110,
                     }, {
                         width: 110,
                         label: '身份证照片',
@@ -346,6 +353,7 @@
                         dataType: "string",
                         disabled: true,
                         span: 12,
+                        labelWidth: 110,
                     },],
             },
             data: [],
@@ -418,7 +426,7 @@
                 if (row[flag] || row[type] == null) {
                     return row[type]
                 } else {
-                    if (type == 'principalIdCard') {
+                    if (type == 'idCardflag') {
                         return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
                     } else {
                         return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
@@ -461,23 +469,21 @@
         // 取消审核
         cancelAudit () {
             this.visible = false
-            this.auditForm = {}
-            this.$refs.auditForm.resetFields()
         },
 
         // 确认提交审核
-        submitAudit () {
-            this.$refs.auditForm.validate((valid) => {
-                if (valid) {
-                    applyTaskExamine(Object.assign(this.auditParams, this.auditForm)).then(res => {
-                        if (res.data.code == 200) {
-                            this.$message.warning("审核成功")
-                            this.onLoad(this.page)
-                            this.cancelAudit()
-                        }
-                    })
-                } else {
-                    return false
+        submitAudit (form) {
+            let auditForm = {
+                status: form.status == '1' ? '2' : '3',
+                remark: form.confirmNotion,
+                reportType: 5
+            }
+
+            applyTaskExamine(Object.assign(this.auditParams, auditForm)).then(res => {
+                if (res.data.code == 200) {
+                    this.$message.warning("审核成功")
+                    this.onLoad(this.page)
+                    this.cancelAudit()
                 }
             })
         },
@@ -485,10 +491,9 @@
         // 审核按钮
         goAudit (row) {
             this.auditParams = {
-                id: row.id,
-                reportType: row.reportType
+                id: row.taskId,
+                reportType: 5
             }
-            console.log('this.auditParams', this.auditParams)
             this.visible = true
         },
 
@@ -719,6 +724,7 @@
                 this.data.forEach(item => {
                     this.$set(item, 'phoneNumberflag', false)
                     this.$set(item, 'transactionObjectTelflag', false)
+                    this.$set(item, 'idCardflag', false)
                     if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
                         var urls = []
                         var names = item.imageUrls.split(",").filter(item => item != '')

--
Gitblit v1.9.3