Jelajahi Sumber

Merge branch 'master' of http://119.23.210.103:3000/wy/lh_firm_former

wy 3 tahun lalu
induk
melakukan
c38a172ac0

+ 2 - 2
src/api/permission/file.js

@@ -9,7 +9,7 @@ import {
  */
 export function getFileByUserId(params) {
     return request({
-        url: DATA_URL() + '/consult/getFileByUserId',
+        url: DATA_URL() + '/consult/getFileByUserIdAndLH',
         method: 'post',
         data: params
     })
@@ -32,7 +32,7 @@ export function getFileType(params) {
  */
 export function getLmitedFile(params) {
     return request({
-        url: DATA_URL() + '/consult/getLmitedFile?userId=' + params,
+        url: DATA_URL() + '/consult/getLimitedFileLH?userId=' + params,
         method: 'post',
     })
 }

+ 4 - 3
src/views/infosManage/externalFiles/externalFiles.vue

@@ -19,7 +19,8 @@
                         :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns"
                         :loading="loading" @action-event="handleAction">
                         <template slot="wenjinachayue" slot-scope="scope">
-                            <ibps-attachment :value="scope.row.zi_duan_er_" readonly allow-download :download="false" />
+                            <ibps-attachment :value="scope.row.wen_jian_id_" readonly allow-download
+                                :download="false" />
                         </template>
                     </ibps-crud>
                 </template>
@@ -82,7 +83,7 @@ export default {
                     { prop: 'wen_jian_ming_che', label: '文件名称' },
                     { prop: 'ban_ben_hao_', label: '版本号' },
                     { prop: 'fa_bu_ri_qi_', label: '发布日期' },
-                    { prop: 'zi_duan_er_', label: '查阅', slotName: "wenjinachayue" }
+                    { prop: 'wen_jian_id_', label: '查阅', slotName: "wenjinachayue" }
                 ]
             },
             listOptions: {
@@ -97,7 +98,7 @@ export default {
             //     wen_jian_ming_che: '3',
             //     ban_ben_hao_: '4',
             //     fa_bu_ri_qi_: '5',
-            //     zi_duan_er_: '880481571788816384'
+            //     wen_jian_id_: '880481571788816384'
             // }]
         }
     },

+ 27 - 13
src/views/infosManage/internalFiles/internalFiles.vue

@@ -19,7 +19,8 @@
                         :search-form="listConfig.searchForm" :pk-key="pkKey" :columns="listConfig.columns"
                         :loading="loading" @action-event="handleAction">
                         <template slot="wenjinachayue" slot-scope="scope">
-                            <ibps-attachment :value="scope.row.zi_duan_er_" readonly allow-download :download="false" />
+                            <ibps-attachment :value="scope.row.wen_jian_id_" readonly allow-download
+                                :download="false" />
                         </template>
                     </ibps-crud>
                 </template>
@@ -47,17 +48,30 @@ export default {
             orgName: '',
             loading: false,
             typeData: [
-                { id: '0', label: '质量管理手册(QM)' },
-                { id: '1', label: '程序文件(QP)' },
+                { id: '0', label: '质量管理手册(QM' },
+                { id: '1', label: '程序文件(QP' },
                 { id: '2', label: '[限] 生物安全手册(SWAQ)' },
-                { id: '3', label: '[限] 行政管理制度(ZD)' },
-                { id: '4', label: '[限] 检测类(JC-SOP)' },
-                { id: '5', label: '[限] 仪器设备类(YQ-SOP)' },
-                { id: '6', label: '[限] 期间核查类(HC-SOP)' },
+                { id: '3', label: '[限] 行政管理制度(ZD' },
+                { id: '4', label: '[限] 检测类(JC-SOP)' },
+                { id: '5', label: '[限] 仪器设备类(YQ-SOP)' },
+                { id: '6', label: '[限] 期间核查类(HC-SOP)' },
                 { id: '7', label: '[限] 环境设施类(HJ-SOP)' },
                 { id: '8', label: '[限] 质量或技术管理类(ZQ-SOP)' },
-                { id: '9', label: '技术记录表(FQ)' },
-                { id: '10', label: '管理记录表(FQ)' }
+                { id: '9', label: '技术记录表(FQ)' },
+                { id: '10', label: '管理记录表(FQ)' }
+            ],
+            paramsTypeData: [
+                { id: '0', label: '质量管理手册(QM)' },
+                { id: '1', label: '程序文件(QP)' },
+                { id: '2', label: '生物安全手册(SWAQ)' },
+                { id: '3', label: '行政管理制度(ZD)' },
+                { id: '4', label: '检测类(JC-SOP)' },
+                { id: '5', label: '仪器设备类(YQ-SOP)' },
+                { id: '6', label: '期间核查类(HC-SOP)' },
+                { id: '7', label: '环境设施类(HJ-SOP)' },
+                { id: '8', label: '质量或技术管理类(ZQ-SOP)' },
+                { id: '9', label: '技术记录表(FQ)' },
+                { id: '10', label: '管理记录表(FQ)' }
             ],
             filterText: '',
             defaultProps: {
@@ -88,7 +102,7 @@ export default {
                     { prop: 'wen_jian_ming_che', label: '文件名称' },
                     { prop: 'ban_ben_hao_', label: '版本号' },
                     { prop: 'fa_bu_ri_qi_', label: '发布日期' },
-                    { prop: 'zi_duan_er_', label: '查阅', slotName: "wenjinachayue" }
+                    { prop: 'wen_jian_id_', label: '查阅', slotName: "wenjinachayue" }
                 ]
             },
             listOptions: {
@@ -103,7 +117,7 @@ export default {
             //     wen_jian_ming_che: '3',
             //     ban_ben_hao_: '4',
             //     fa_bu_ri_qi_: '5',
-            //     zi_duan_er_: '880481571788816384'
+            //     wen_jian_id_: '880481571788816384'
             // }]
         }
     },
@@ -148,7 +162,7 @@ export default {
                     deptName: "",
                     fileCode: "",
                     fileName: "",
-                    fileType: data.label,
+                    fileType: this.paramsTypeData[data.id].label,
                     userId: this.$store.getters.userInfo.employee.id
                 }).then(res => {
                     this.oldorgId = data.id
@@ -165,7 +179,7 @@ export default {
          */
         getSearcFormData() {
             const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-            params['fileType'] = this.typeData[this.oldorgId].label
+            params['fileType'] = this.paramsTypeData[this.oldorgId].label
             params['userId'] = this.$store.getters.userInfo.employee.id
             return params
         },

+ 472 - 0
src/views/platform/bpmn/bpmInstHis/component/testingRecord.vue

@@ -0,0 +1,472 @@
+<template>
+    <div class="content">
+        <div class="header">{{ info.title }}</div>
+        <div class="search-box">
+            <template v-for="(item, index) in searchList">
+                <span class="label">{{item.label}}</span>
+                <el-input
+                    v-model="searchParam[item.value]"
+                    class="input"
+                    placeholder="请输入内容"
+                    clearable
+                    @keyup.enter.native="search"
+                ></el-input>
+            </template>
+            <el-button class="btn" type="primary" @click="search">
+                <i class="ibps-icon-search"></i>查询
+            </el-button>
+        </div>
+        <div class="table-container">
+            <el-table
+                :data="tableData"
+                :stripe="true"
+                style="width: 100%;"
+                height="75vh"
+                max-height="100%"
+                header-cell-class-name="table-header"
+            >
+                <!-- <el-table-column type="selection" width="55"></el-table-column> -->
+                <!-- <el-table-column prop="year" label="年份" width="80">
+                    <template slot-scope="scope">{{ scope.row.jian_ce_kai_shi_s | getYear }}</template>
+                </el-table-column> -->
+                <el-table-column prop="he_tong_id_" label="合同编号" width="100">
+                    <template slot-scope="scope">{{ scope.row.he_tong_id_ | getID(contractList) }}</template>
+                </el-table-column>
+                <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150"></el-table-column>
+                <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="100"></el-table-column>
+                <el-table-column prop="wei_tuo_id_" label="检测委托单号" width="150">
+                    <template slot-scope="scope">{{ scope.row.wei_tuo_id_ | getID(trustList) }}</template>
+                </el-table-column>
+                <el-table-column prop="wei_tuo_dan_wei_" label="委托单位"></el-table-column>
+                <el-table-column prop="wan_cheng_shi_jia" label="委托日期" width="100"></el-table-column>
+                <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150"></el-table-column>
+                <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150"></el-table-column>
+                <!-- <el-table-column prop="lian_xi_ren_" label="联系人"> </el-table-column>
+                <el-table-column prop="lian_xi_dian_hua_" label="联系电话"></el-table-column>
+                <el-table-column prop="bao_gao_lei_bie_" label="类别">
+                    <template slot-scope="scope">
+                        {{ scope.row.bao_gao_lei_bie_.toUpperCase() }}
+                    </template>
+                </el-table-column> -->
+                <el-table-column label="操作" align="left">
+                    <template slot-scope="scope">
+                        <el-popover placement="left" width="200" trigger="click">
+                            <div slot="reference" class="more">
+                                <i class="el-icon-caret-bottom"></i>查阅
+                            </div>
+                            <template v-for="(item ,index) in reportList">
+                                <div v-if="item.key === 'testing'">
+                                    <el-popover placement="left" width="200" trigger="click">
+                                        <div class="operate-item" slot="reference" @click="getTesting(scope.row)">
+                                            <i class="el-icon-s-order"></i> {{item.name}}
+                                        </div>
+                                        <div class="three-item">
+                                            <div
+                                                v-for="i in testingList"
+                                                :key="i.id"
+                                                class="operate-item"
+                                                @click="consult(i)"
+                                            >
+                                                {{ i.projectName }}
+                                            </div>
+                                        </div>
+                                    </el-popover>
+                                </div>
+                                <div v-else-if="item.key === 'file'">
+                                    <el-popover placement="left" width="200" trigger="click">
+                                        <div class="operate-item" slot="reference" @click="getFile(scope.row)">
+                                            <i class="el-icon-s-order"></i> {{item.name}}
+                                        </div>
+                                        <div class="three-item">
+                                            <div
+                                                v-for="i in fileList"
+                                                :key="i.id"
+                                                class="operate-item"
+                                                @click="preview(i)"
+                                            >
+                                                {{ i.fileName }}.{{ i.ext }}
+                                            </div>
+                                        </div>
+                                    </el-popover>
+                                </div>
+                                <div
+                                    v-else
+                                    :key="index"
+                                    class="operate-item"
+                                    @click="alertReport(item.path, scope.row[item.key])"
+                                >
+                                    <i class="el-icon-s-order"></i> {{item.name}}
+                                </div>
+                            </template>
+                        </el-popover>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+        <el-dialog
+            :close-on-click-modal="false"
+            :close-on-press-escape="false"
+            :top="'3vh'"
+            :width="'90%'"
+            class="js-custom-dialog"
+            append-to-body
+            :fullscreen="false"
+            :visible.sync="visible"
+        >
+            <iframe :src="srcUrl" :height="'100%'" :width="'100%'" frameborder="0" scrolling="no" />
+        </el-dialog>
+        <div class="pagination">
+            <el-pagination
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page.sync="currentPage"
+                :page-sizes="[10, 20, 50, 100]"
+                :page-size="20"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="total"
+            >
+            </el-pagination>
+        </div>
+        <image-viewer
+            v-if="fileType === 'image'"
+            :z-index="zIndex"
+            :url-list="[fileUrl]"
+            :on-close="() => fileType = ''"
+        />
+    </div>
+</template>
+
+<script>
+    import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+    import { previewFile } from '@/api/platform/file/attachment'
+    import PopupManager from '@/utils/popup'
+    import { SYSTEM_URL,BASE_API } from '@/api/baseUrl'
+    const searchList = [
+        {
+            label: '报告编号',
+            value: 'report'
+        },
+        {
+            label: '样品编号',
+            value: 'sampleId'
+        },
+        {
+            label: '样品名称',
+            value: 'sampleName'
+        }
+    ]
+    let reportList = [
+        // {
+        //     name: '合同',
+        //     key: 'he_tong_id_',
+        //     path: '',
+        //     hasItem: false
+        // },
+        {
+            name: '检测委托单',
+            key: 'wei_tuo_id_',
+            path: '43罗湖/LHXBJY-QP-7-01-FQ-05 检测委托单.rpx',
+            hasItem: false
+        },
+        {
+            name: '检测报告',
+            key: 'id_',
+            path: '43罗湖/LH非 检测报告.rpx',
+            hasItem: false
+        },
+        // {
+        //     name: '检测报告审批表',
+        //     key: 'id_',
+        //     path: '43罗湖/检测报告审批表.rpx',
+        //     hasItem: false
+        // },
+        {
+            name: '检测记录',
+            key: 'testing',
+            path: '43罗湖/LHJC 检测记录.rpx',
+            hasItem: true
+        },
+        {
+            name: '附件',
+            key: 'file',
+            path: '',
+            hasItem: true
+        }
+    ]
+    // 非通用检测项目编号及报表路径
+    const specialTest = [
+        {
+            id: '1-1',
+            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
+        },
+        {
+            id: '1-2',
+            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
+        },
+        {
+            id: '2',
+            path: '43罗湖/LHXBJY-JC-SOP-002-FQ-01 支原体检测(培养法).rpx'
+        },
+        {
+            id: '3',
+            path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
+        }
+    ]
+    const imageType = ['jpg', 'jpeg', 'bmp', 'png', 'gif']
+    export default {
+        filters: {
+            getID (v, arr) {
+                let result = arr.find(item => item.id_ === v)
+                return result ? result.name_ : v
+            },
+            getYear (v) {
+                return v ? v.slice(0, 4) : ''
+            }
+        },
+        components: {
+            ImageViewer: () => import('@/components/ibps-file-viewer/image')
+        },
+        props: {
+            info: {
+                type: Object,
+                default: () => {}
+            }
+        },
+        data () {
+            reportList[1].path = this.info.path
+            return {
+                searchList,
+                reportList,
+                reportId: '',
+                total: null,
+                currentPage: 1,
+                visible: false,
+                searchParam: {
+                    report: '',
+                    sampleId: '',
+                    sampleName: ''
+                },
+                tableData: [],
+                testingList: [],
+                fileList: [],
+                contractList: [],
+                trustList: [],
+                srcUrl: '',
+                globalSql: '',
+                fileUrl: '',
+                fileType: '',
+                zIndex: 2000,
+                fileOption: {
+                    user: {}
+                }
+            }
+        },
+        created () {
+            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
+            // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.info.type}'`
+            let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
+            this.loadData(sql)
+            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ in ('已完成', '待发放') and bao_gao_lei_bie_ = '${this.info.type}'`
+            curdPost('sql', sumsql).then((response) => {
+                this.total = response.variables.data[0].total
+            })
+        },
+        beforeDestroy () {
+            this.fileType = ''
+        },
+        methods: {
+            // 请求表格数据函数
+            loadData (sql) {
+                this.tableData = []
+                curdPost('sql', sql).then((res) => {
+                    const { data } = res.variables
+                    if (!data || !data.length) {
+                        return
+                    }
+
+                    this.tableData = data
+                    let ids = {
+                        contract: [],
+                        trust: []
+                    }
+                    data.forEach(item => {
+                        ids.contract.push(item.he_tong_id_)
+                        ids.trust.push(item.wei_tuo_id_)
+                    })
+                    // 获取合同及委托单数据用于转换ID
+                    let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
+                    let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
+                    // console.log(sql1, sql2)
+                    curdPost('sql', sql1).then(res1 => {
+                        this.contractList = res1.variables && res1.variables.data
+                    })
+                    curdPost('sql', sql2).then(res2 => {
+                        this.trustList = res2.variables && res2.variables.data
+                    })
+                })
+            },
+            // 获取检测项目数据
+            getTesting (row) {
+                const { wei_tuo_id_, yang_pin_bian_hao } = row
+                this.testingList = []
+                let sql = `select b.id_ as id, a.xiang_mu_bian_hao as number, a.jian_ce_xiang_mu_ as projectName from t_mjjcnlfw a, t_lhjczb b where a.id_ = b.jian_ce_xiang_mu_ and b.wei_tuo_id_ = '${wei_tuo_id_}' and b.yang_pin_bian_hao = '${yang_pin_bian_hao}'`
+                curdPost('sql', sql).then(res => {
+                    this.testingList = res.variables && res.variables.data
+                    // console.log(this.testingList)
+                })
+            },
+            // 获取附件信息,报告表【bao_gao_pdf_, suo_you_yuan_shi_】字段
+            getFile (row) {
+                this.fileList = []
+                const { bao_gao_pdf_, suo_you_yuan_shi_ } = row
+                let fileArr = [bao_gao_pdf_]
+                fileArr = fileArr.concat(suo_you_yuan_shi_.split(','))
+                // console.log(fileArr)
+                let sql = `select id_ as id, file_name_ as fileName, ext_ as ext from ibps_file_attachment where find_in_set(id_, '${fileArr.join(',')}')`
+                curdPost('sql', sql).then(res => {
+                    this.fileList = res.variables && res.variables.data
+                })
+            },
+            consult (data) {
+                let isSpecial = specialTest.find(i => i.id === data.number)
+                let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
+                this.alertReport(path, data.id)
+            },
+            // 组装查询SQL
+            search () {
+                const { report, sampleId, sampleName } = this.searchParam
+                const paramsList = {
+                    report: ` and bao_gao_bian_hao_ like '%${report}%'`,
+                    sampleId: ` and yang_pin_bian_hao like '%${sampleId}%'`,
+                    sampleName: ` and yang_pin_ming_che like '%${sampleName}%'`
+                }
+                let params = ''
+                Object.keys(this.searchParam).forEach(item => {
+                    if (this.searchParam[item]) {
+                        params += paramsList[item]
+                    }
+                })
+                let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
+                // console.log(sql)
+                this.loadData(sql)
+            },
+            handleSizeChange (value) {
+                this.currentPage = 1
+                let sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
+                this.loadData(sql)
+            },
+            handleCurrentChange (value) {
+                let sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
+                this.loadData(sql)
+            },
+            alertReport (path, id) {
+                this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
+                this.visible = true
+            },
+            // 文件预览
+            preview (file) {
+                if (imageType.includes(file.ext)) {
+                    this.zIndex = PopupManager.getZIndex()
+                    this.fileUrl = previewFile(file.id)
+                    this.fileType = 'image'
+                } else {
+                    this.getOption(file)
+                    this.openWindow()
+                    this.fileType = ''
+                }
+            },
+            getOption (file) {
+                this.fileOption.user.id = this.$store.getters.userId
+                this.fileOption.user.name = this.$store.getters.name
+                this.fileOption.url = BASE_API() + SYSTEM_URL() + `/file/download?attachmentId=${file.id}`
+                this.fileOption.editUrl = BASE_API() + SYSTEM_URL() + `/file/editCallback?fileName=${file.fileName}&fileType=${file.ext}&id=${file.id}`
+                this.fileOption.title = file.fileName
+                this.fileOption.fileType = file.ext
+                console.log(this.fileOption)
+            },
+            openWindow () {
+                let routeData = this.$router.resolve({
+                    path: "/fileView",
+                    query: this.fileOption
+                })
+                window.open(routeData.href);
+            }
+        }
+    }
+</script>
+
+<style lang="scss">
+    .content {
+        .header {
+            margin-top: 5px;
+            width: 100%;
+            height: 25px;
+            text-align: center;
+            font-weight: 700;
+            background-color: #f9ffff;
+            font-size: 18px;
+        }
+        .search-box {
+            height: 30px;
+            margin-bottom: 20px;
+            .label {
+                margin: 0 6px 0 6px;
+                color: #916266;
+                font-size: 12px;
+            }
+            .input {
+                width: 150px;
+                font-size: 12px;
+                height: 28px !important;
+                line-height: 28px;
+                color: #606266;
+            }
+            .btn {
+                margin-left: 10px;
+                background-color: #409eff;
+                border-color: #409eff;
+                font-size: 12px;
+                border-radius: 3px;
+                padding: 7px 15px;
+            }
+        }
+        .table-container{
+            width: 100%;
+            height: calc(100vh - 220px);
+        }
+        .pagination{
+            height: 35px;
+            padding: 5px 2px;
+        }
+        .el-table__header .table-header{
+            color: #000;
+            font-size: 14px;
+            padding: 6px 6px;
+            background: #a7d6f8 !important
+        }
+        // .tableRowClassName {
+        //     backface-visibility: #d9eefd;
+        // }
+        // .el-table .warning-row {
+        //     background: #d9eefd;
+        // }
+        .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
+            background: #d9eefd;
+        }
+        .more {
+            cursor: pointer;
+            color: #409eff;
+        }
+        .el-dropdown-link {
+            cursor: pointer;
+            color: #409eff;
+        }
+        .el-icon-arrow-down {
+            font-size: 12px;
+        }
+    }
+    .operate-item {
+        cursor: pointer;
+        color: #85ce61;
+    }
+</style>

+ 8 - 392
src/views/platform/bpmn/bpmInstHis/listType/CMARecord.vue

@@ -1,403 +1,19 @@
 <template>
-    <div class="content">
-        <div class="header">CNAS/CMA检测档案</div>
-        <div class="search-box">
-            <template v-for="(item, index) in searchList">
-                <span class="label">{{item.label}}</span>
-                <el-input
-                    v-model="searchParam[item.value]"
-                    class="input"
-                    placeholder="请输入内容"
-                    clearable
-                ></el-input>
-            </template>
-            <el-button class="btn" type="primary" @click="search">
-                <i class="ibps-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="table-container">
-            <el-table
-                :data="tableData"
-                :stripe="true"
-                style="width: 100%;"
-                height="75vh"
-                max-height="100%"
-                header-cell-class-name="table-header"
-            >
-                <!-- <el-table-column type="selection" width="55"></el-table-column> -->
-                <el-table-column prop="year" label="年份" width="80">
-                    <template slot-scope="scope">
-                        {{ scope.row.jian_ce_kai_shi_s | getYear }}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="he_tong_id_" label="合同编号" width="100">
-                    <template slot-scope="scope">
-                        {{ scope.row.he_tong_id_ | getID(contractList) }}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150"></el-table-column>
-                <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="100"></el-table-column>
-                <el-table-column prop="wei_tuo_id_" label="检测委托单号" width="150">
-                    <template slot-scope="scope">
-                        {{ scope.row.wei_tuo_id_ | getID(trustList) }}
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位"></el-table-column> -->
-                <el-table-column prop="wan_cheng_shi_jia" label="委托日期" width="100"></el-table-column>
-                <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150"></el-table-column>
-                <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150"></el-table-column>
-                <!-- <el-table-column prop="lian_xi_ren_" label="联系人"> </el-table-column>
-                <el-table-column prop="lian_xi_dian_hua_" label="联系电话"></el-table-column>
-                <el-table-column prop="bao_gao_lei_bie_" label="类别">
-                    <template slot-scope="scope">
-                        {{ scope.row.bao_gao_lei_bie_.toUpperCase() }}
-                    </template>
-                </el-table-column> -->
-                <el-table-column label="操作" align="left">
-                    <template slot-scope="scope">
-                        <el-popover placement="left" width="200" trigger="click">
-                            <div slot="reference" class="more">
-                                <i class="el-icon-caret-bottom"></i>查阅
-                            </div>
-                            <template v-for="(item ,index) in reportList">
-                                <div v-if="item.hasItem">
-                                    <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getDetail(scope.row, item.key)">
-                                            <i class="el-icon-s-order"></i> {{item.name}}
-                                        </div>
-                                        <div class="three-item">
-                                            <div
-                                                v-for="i in testingList"
-                                                :key="i.id_"
-                                                class="operate-item"
-                                                @click="consult(i)"
-                                            >
-                                                {{ item.jian_ce_xiang_mu_ }}
-                                            </div>
-                                        </div>
-                                    </el-popover>
-                                </div>
-                                <div
-                                    v-else
-                                    :key="index"
-                                    class="operate-item"
-                                    @click="alertReport(item.path, scope.row[item.key])"
-                                >
-                                    <i class="el-icon-s-order"></i> {{item.name}}
-                                </div>
-                            </template>
-                        </el-popover>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </div>
-        <el-dialog
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :top="'3vh'"
-            :width="'90%'"
-            class="js-custom-dialog"
-            append-to-body
-            :fullscreen="false"
-            :visible.sync="visible"
-        >
-            <iframe :src="srcUrl" :height="'100%'" :width="'100%'" frameborder="0" scrolling="no" />
-        </el-dialog>
-        <div class="pagination">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page.sync="currentPage"
-                :page-sizes="[10, 20, 50, 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="total"
-            >
-            </el-pagination>
-        </div>
-    </div>
+    <testing-record :info="info"/>
 </template>
-
 <script>
-    import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
-    const searchList = [
-        {
-            label: '年份',
-            value: 'year'
-        },
-        // {
-        //     label: '检测申请单号',
-        //     value: 'sign'
-        // },
-        // {
-        //     label: '委托单位',
-        //     value: 'client'
-        // },
-        {
-            label: '报告编号',
-            value: 'report'
-        }
-    ]
-    const reportList = [
-        // {
-        //     name: '合同',
-        //     key: 'he_tong_id_',
-        //     path: '',
-        //     hasItem: false
-        // },
-        {
-            name: '检测委托单',
-            key: 'wei_tuo_id_',
-            path: '43罗湖/LHXBJY-QP-7-01-FQ-05 检测委托单.rpx',
-            hasItem: false
-        },
-        {
-            name: '检测报告',
-            key: 'id_',
-            path: '43罗湖/LHCNAS-CMA 检测报告.rpx',
-            hasItem: false
-        },
-        // {
-        //     name: '检测报告审批表',
-        //     key: 'id_',
-        //     path: '43罗湖/检测报告审批表.rpx',
-        //     hasItem: false
-        // },
-        {
-            name: '检测记录',
-            key: 'testing',
-            path: '43罗湖/LHJC 检测记录.rpx',
-            hasItem: true
-        },
-        {
-            name: '附件',
-            key: 'file',
-            path: '',
-            hasItem: true
-        }
-    ]
-
-    // 非通用检测项目编号及报表路径
-    const specialTest = [
-        {
-            id: '1-1',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '1-2',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '2',
-            path: '43罗湖/LHXBJY-JC-SOP-002-FQ-01 支原体检测(培养法).rpx'
-        },
-        {
-            id: '3',
-            path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
-        }
-    ]
     export default {
-        filters: {
-            getID (v, arr) {
-                let result = arr.find(item => item.id_ === v)
-                return result ? result.name_ : v
-            },
-            getYear (v) {
-                return v ? v.slice(0, 4) : ''
-            }
+        components: {
+            TestingRecord: () => import('../component/testingRecord')
         },
         data () {
             return {
-                searchList,
-                reportList,
-                type: 'cnas/CMA',
-                reportId: '',
-                total: null,
-                currentPage: 1,
-                visible: false,
-                searchParam: {
-                    year: '',
-                    sign: '',
-                    client: '',
-                    report: '',
-                },
-                tableData: [],
-                testingList: [],
-                contractList: [],
-                trustList: [],
-                srcUrl: '',
-                globalSql: ''
-            }
-        },
-        created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
-            // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.type}'`
-            let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
-            this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
-            curdPost('sql', sumsql).then((response) => {
-                this.total = response.variables.data[0].total
-            })
-        },
-        methods: {
-            // 请求表格数据函数
-            loadData (sql) {
-                this.tableData = []
-                curdPost('sql', sql).then((res) => {
-                    const { data } = res.variables
-                    if (!data || !data.length) {
-                        return
-                    }
-
-                    this.tableData = data
-                    let ids = {
-                        contract: [],
-                        trust: []
-                    }
-                    data.forEach(item => {
-                        ids.contract.push(item.he_tong_id_)
-                        ids.trust.push(item.wei_tuo_id_)
-                    })
-                    // 获取合同数据用于转换
-                    let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
-                    let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
-                    console.log(sql1, sql2)
-                    curdPost('sql', sql1).then(res1 => {
-                        this.contractList = res1.variables && res1.variables.data
-                    })
-                    curdPost('sql', sql2).then(res2 => {
-                        this.trustList = res2.variables && res2.variables.data
-                    })
-                })
-            },
-            getDetail (row, type) {
-                const { yang_pin_bian_hao } = row
-                // 获取检测项目数据
-                if (type === 'testing') {
-                    let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${yang_pin_bian_hao}'))`
-                    curdPost('sql', sql).then(res => {
-                        this.testingList = res.variables && res.variables.data
-                    })
-                    return
-                }
-                // 获取附件信息,委托表【fu_jian_, biao_qian_tu_pian】字段,检测总表【fu_jian_, wen_dang_fu_jian_, kuai_zhao_fu_jian】字段,报告表【bao_gao_pdf_, gai_zhang_jian_pd】字段
-                if (type === 'file') {
-                    let sql = `select `
+                info: {
+                    title: 'CNAS/CMA检测档案',
+                    reportPath: '43罗湖/LHCNAS-CMA 检测报告.rpx',
+                    type: 'cnas/CMA'
                 }
-
-            },
-            consult (data) {
-                let isSpecial = !!specialTest.find(i => i.id === data.xiang_mu_bian_hao)
-                let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
-                this.alertReport(path, data.id_)
-            },
-            // 组装查询SQL
-            search () {
-                const {year, client, report} = this.searchParam
-                const paramsList = {
-                    year: ` and jian_ce_kai_shi_s like '%${year}%'`,
-                    client: ` and wei_tuo_dan_wei_ = '${client}'`,
-                    report: ` and bao_gao_bian_hao_ = '${report}'`
-                }
-                let params = ''
-                Object.keys(this.searchParam).forEach(item => {
-                    if (this.searchParam[item]) {
-                        params += paramsList[item]
-                    }
-                })
-                let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
-                console.log(sql)
-                this.loadData(sql)
-            },
-            handleSizeChange (value) {
-                this.currentPage = 1
-                let sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
-                this.loadData(sql)
-            },
-            handleCurrentChange (value) {
-                let sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
-                this.loadData(sql)
-            },
-            alertReport (path, id) {
-                this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
-                this.visible = true
-            }
-        }
-    }
-</script>
-
-<style lang="scss">
-    .content {
-        .header {
-            margin-top: 5px;
-            width: 100%;
-            height: 25px;
-            text-align: center;
-            font-weight: 700;
-            background-color: #f9ffff;
-            font-size: 18px;
-        }
-        .search-box {
-            height: 30px;
-            margin-bottom: 20px;
-            .label {
-                margin: 0 6px 0 6px;
-                color: #916266;
-                font-size: 12px;
-            }
-            .input {
-                width: 150px;
-                font-size: 12px;
-                height: 28px !important;
-                line-height: 28px;
-                color: #606266;
             }
-            .btn {
-                margin-left: 10px;
-                background-color: #409eff;
-                border-color: #409eff;
-                font-size: 12px;
-                border-radius: 3px;
-                padding: 7px 15px;
-            }
-        }
-        .table-container{
-            width: 100%;
-            height: calc(100vh - 220px);
         }
-        .pagination{
-            height: 35px;
-            padding: 5px 2px;
-        }
-        .el-table__header .table-header{
-            color: #000;
-            font-size: 14px;
-            padding: 6px 6px;
-            background: #a7d6f8 !important
-        }
-        // .tableRowClassName {
-        //     backface-visibility: #d9eefd;
-        // }
-        // .el-table .warning-row {
-        //     background: #d9eefd;
-        // }
-        .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
-            background: #d9eefd;
-        }
-        .more {
-            cursor: pointer;
-            color: #409eff;
-        }
-        .el-dropdown-link {
-            cursor: pointer;
-            color: #409eff;
-        }
-        .el-icon-arrow-down {
-            font-size: 12px;
-        }
-    }
-    .operate-item {
-        cursor: pointer;
-        color: #85ce61;
     }
-</style>
+</script>

+ 8 - 392
src/views/platform/bpmn/bpmInstHis/listType/CNASRecord.vue

@@ -1,403 +1,19 @@
 <template>
-    <div class="content">
-        <div class="header">CNAS检测档案</div>
-        <div class="search-box">
-            <template v-for="(item, index) in searchList">
-                <span class="label">{{item.label}}</span>
-                <el-input
-                    v-model="searchParam[item.value]"
-                    class="input"
-                    placeholder="请输入内容"
-                    clearable
-                ></el-input>
-            </template>
-            <el-button class="btn" type="primary" @click="search">
-                <i class="ibps-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="table-container">
-            <el-table
-                :data="tableData"
-                :stripe="true"
-                style="width: 100%;"
-                height="75vh"
-                max-height="100%"
-                header-cell-class-name="table-header"
-            >
-                <!-- <el-table-column type="selection" width="55"></el-table-column> -->
-                <el-table-column prop="year" label="年份" width="80">
-                    <template slot-scope="scope">
-                        {{ scope.row.jian_ce_kai_shi_s | getYear }}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="he_tong_id_" label="合同编号" width="100">
-                    <template slot-scope="scope">
-                        {{ scope.row.he_tong_id_ | getID(contractList) }}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150"></el-table-column>
-                <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="100"></el-table-column>
-                <el-table-column prop="wei_tuo_id_" label="检测委托单号" width="150">
-                    <template slot-scope="scope">
-                        {{ scope.row.wei_tuo_id_ | getID(trustList) }}
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位"></el-table-column> -->
-                <el-table-column prop="wan_cheng_shi_jia" label="委托日期" width="100"></el-table-column>
-                <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150"></el-table-column>
-                <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150"></el-table-column>
-                <!-- <el-table-column prop="lian_xi_ren_" label="联系人"> </el-table-column>
-                <el-table-column prop="lian_xi_dian_hua_" label="联系电话"></el-table-column>
-                <el-table-column prop="bao_gao_lei_bie_" label="类别">
-                    <template slot-scope="scope">
-                        {{ scope.row.bao_gao_lei_bie_.toUpperCase() }}
-                    </template>
-                </el-table-column> -->
-                <el-table-column label="操作" align="left">
-                    <template slot-scope="scope">
-                        <el-popover placement="left" width="200" trigger="click">
-                            <div slot="reference" class="more">
-                                <i class="el-icon-caret-bottom"></i>查阅
-                            </div>
-                            <template v-for="(item ,index) in reportList">
-                                <div v-if="item.hasItem">
-                                    <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getDetail(scope.row, item.key)">
-                                            <i class="el-icon-s-order"></i> {{item.name}}
-                                        </div>
-                                        <div class="three-item">
-                                            <div
-                                                v-for="i in testingList"
-                                                :key="i.id_"
-                                                class="operate-item"
-                                                @click="consult(i)"
-                                            >
-                                                {{ item.jian_ce_xiang_mu_ }}
-                                            </div>
-                                        </div>
-                                    </el-popover>
-                                </div>
-                                <div
-                                    v-else
-                                    :key="index"
-                                    class="operate-item"
-                                    @click="alertReport(item.path, scope.row[item.key])"
-                                >
-                                    <i class="el-icon-s-order"></i> {{item.name}}
-                                </div>
-                            </template>
-                        </el-popover>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </div>
-        <el-dialog
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :top="'3vh'"
-            :width="'90%'"
-            class="js-custom-dialog"
-            append-to-body
-            :fullscreen="false"
-            :visible.sync="visible"
-        >
-            <iframe :src="srcUrl" :height="'100%'" :width="'100%'" frameborder="0" scrolling="no" />
-        </el-dialog>
-        <div class="pagination">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page.sync="currentPage"
-                :page-sizes="[10, 20, 50, 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="total"
-            >
-            </el-pagination>
-        </div>
-    </div>
+    <testing-record :info="info"/>
 </template>
-
 <script>
-    import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
-    const searchList = [
-        {
-            label: '年份',
-            value: 'year'
-        },
-        // {
-        //     label: '检测申请单号',
-        //     value: 'sign'
-        // },
-        // {
-        //     label: '委托单位',
-        //     value: 'client'
-        // },
-        {
-            label: '报告编号',
-            value: 'report'
-        }
-    ]
-    const reportList = [
-        // {
-        //     name: '合同',
-        //     key: 'he_tong_id_',
-        //     path: '',
-        //     hasItem: false
-        // },
-        {
-            name: '检测委托单',
-            key: 'wei_tuo_id_',
-            path: '43罗湖/LHXBJY-QP-7-01-FQ-05 检测委托单.rpx',
-            hasItem: false
-        },
-        {
-            name: '检测报告',
-            key: 'id_',
-            path: '43罗湖/LHCNAS 检测报告.rpx',
-            hasItem: false
-        },
-        // {
-        //     name: '检测报告审批表',
-        //     key: 'id_',
-        //     path: '43罗湖/检测报告审批表.rpx',
-        //     hasItem: false
-        // },
-        {
-            name: '检测记录',
-            key: 'testing',
-            path: '43罗湖/LHJC 检测记录.rpx',
-            hasItem: true
-        },
-        {
-            name: '附件',
-            key: 'file',
-            path: '',
-            hasItem: true
-        }
-    ]
-
-    // 非通用检测项目编号及报表路径
-    const specialTest = [
-        {
-            id: '1-1',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '1-2',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '2',
-            path: '43罗湖/LHXBJY-JC-SOP-002-FQ-01 支原体检测(培养法).rpx'
-        },
-        {
-            id: '3',
-            path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
-        }
-    ]
     export default {
-        filters: {
-            getID (v, arr) {
-                let result = arr.find(item => item.id_ === v)
-                return result ? result.name_ : v
-            },
-            getYear (v) {
-                return v ? v.slice(0, 4) : ''
-            }
+        components: {
+            TestingRecord: () => import('../component/testingRecord')
         },
         data () {
             return {
-                searchList,
-                reportList,
-                type: 'cnas',
-                reportId: '',
-                total: null,
-                currentPage: 1,
-                visible: false,
-                searchParam: {
-                    year: '',
-                    sign: '',
-                    client: '',
-                    report: '',
-                },
-                tableData: [],
-                testingList: [],
-                contractList: [],
-                trustList: [],
-                srcUrl: '',
-                globalSql: ''
-            }
-        },
-        created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
-            // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.type}'`
-            let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
-            this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
-            curdPost('sql', sumsql).then((response) => {
-                this.total = response.variables.data[0].total
-            })
-        },
-        methods: {
-            // 请求表格数据函数
-            loadData (sql) {
-                this.tableData = []
-                curdPost('sql', sql).then((res) => {
-                    const { data } = res.variables
-                    if (!data || !data.length) {
-                        return
-                    }
-
-                    this.tableData = data
-                    let ids = {
-                        contract: [],
-                        trust: []
-                    }
-                    data.forEach(item => {
-                        ids.contract.push(item.he_tong_id_)
-                        ids.trust.push(item.wei_tuo_id_)
-                    })
-                    // 获取合同数据用于转换
-                    let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
-                    let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
-                    console.log(sql1, sql2)
-                    curdPost('sql', sql1).then(res1 => {
-                        this.contractList = res1.variables && res1.variables.data
-                    })
-                    curdPost('sql', sql2).then(res2 => {
-                        this.trustList = res2.variables && res2.variables.data
-                    })
-                })
-            },
-            getDetail (row, type) {
-                const { yang_pin_bian_hao } = row
-                // 获取检测项目数据
-                if (type === 'testing') {
-                    let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${yang_pin_bian_hao}'))`
-                    curdPost('sql', sql).then(res => {
-                        this.testingList = res.variables && res.variables.data
-                    })
-                    return
-                }
-                // 获取附件信息,委托表【fu_jian_, biao_qian_tu_pian】字段,检测总表【fu_jian_, wen_dang_fu_jian_, kuai_zhao_fu_jian】字段,报告表【bao_gao_pdf_, gai_zhang_jian_pd】字段
-                if (type === 'file') {
-                    let sql = `select `
+                info: {
+                    title: 'CNAS检测档案',
+                    reportPath: '43罗湖/LHCNAS 检测报告.rpx',
+                    type: 'cnas'
                 }
-
-            },
-            consult (data) {
-                let isSpecial = !!specialTest.find(i => i.id === data.xiang_mu_bian_hao)
-                let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
-                this.alertReport(path, data.id_)
-            },
-            // 组装查询SQL
-            search () {
-                const {year, client, report} = this.searchParam
-                const paramsList = {
-                    year: ` and jian_ce_kai_shi_s like '%${year}%'`,
-                    client: ` and wei_tuo_dan_wei_ = '${client}'`,
-                    report: ` and bao_gao_bian_hao_ = '${report}'`
-                }
-                let params = ''
-                Object.keys(this.searchParam).forEach(item => {
-                    if (this.searchParam[item]) {
-                        params += paramsList[item]
-                    }
-                })
-                let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
-                console.log(sql)
-                this.loadData(sql)
-            },
-            handleSizeChange (value) {
-                this.currentPage = 1
-                let sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
-                this.loadData(sql)
-            },
-            handleCurrentChange (value) {
-                let sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
-                this.loadData(sql)
-            },
-            alertReport (path, id) {
-                this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
-                this.visible = true
-            }
-        }
-    }
-</script>
-
-<style lang="scss">
-    .content {
-        .header {
-            margin-top: 5px;
-            width: 100%;
-            height: 25px;
-            text-align: center;
-            font-weight: 700;
-            background-color: #f9ffff;
-            font-size: 18px;
-        }
-        .search-box {
-            height: 30px;
-            margin-bottom: 20px;
-            .label {
-                margin: 0 6px 0 6px;
-                color: #916266;
-                font-size: 12px;
-            }
-            .input {
-                width: 150px;
-                font-size: 12px;
-                height: 28px !important;
-                line-height: 28px;
-                color: #606266;
             }
-            .btn {
-                margin-left: 10px;
-                background-color: #409eff;
-                border-color: #409eff;
-                font-size: 12px;
-                border-radius: 3px;
-                padding: 7px 15px;
-            }
-        }
-        .table-container{
-            width: 100%;
-            height: calc(100vh - 220px);
         }
-        .pagination{
-            height: 35px;
-            padding: 5px 2px;
-        }
-        .el-table__header .table-header{
-            color: #000;
-            font-size: 14px;
-            padding: 6px 6px;
-            background: #a7d6f8 !important
-        }
-        // .tableRowClassName {
-        //     backface-visibility: #d9eefd;
-        // }
-        // .el-table .warning-row {
-        //     background: #d9eefd;
-        // }
-        .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
-            background: #d9eefd;
-        }
-        .more {
-            cursor: pointer;
-            color: #409eff;
-        }
-        .el-dropdown-link {
-            cursor: pointer;
-            color: #409eff;
-        }
-        .el-icon-arrow-down {
-            font-size: 12px;
-        }
-    }
-    .operate-item {
-        cursor: pointer;
-        color: #85ce61;
     }
-</style>
+</script>

+ 8 - 392
src/views/platform/bpmn/bpmInstHis/listType/FEIRecord.vue

@@ -1,403 +1,19 @@
 <template>
-    <div class="content">
-        <div class="header">非CNAS/CMA检测档案</div>
-        <div class="search-box">
-            <template v-for="(item, index) in searchList">
-                <span class="label">{{item.label}}</span>
-                <el-input
-                    v-model="searchParam[item.value]"
-                    class="input"
-                    placeholder="请输入内容"
-                    clearable
-                ></el-input>
-            </template>
-            <el-button class="btn" type="primary" @click="search">
-                <i class="ibps-icon-search"></i>查询
-            </el-button>
-        </div>
-        <div class="table-container">
-            <el-table
-                :data="tableData"
-                :stripe="true"
-                style="width: 100%;"
-                height="75vh"
-                max-height="100%"
-                header-cell-class-name="table-header"
-            >
-                <!-- <el-table-column type="selection" width="55"></el-table-column> -->
-                <el-table-column prop="year" label="年份" width="80">
-                    <template slot-scope="scope">
-                        {{ scope.row.jian_ce_kai_shi_s | getYear }}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="he_tong_id_" label="合同编号" width="100">
-                    <template slot-scope="scope">
-                        {{ scope.row.he_tong_id_ | getID(contractList) }}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="bao_gao_bian_hao_" label="报告编号" width="150"></el-table-column>
-                <el-table-column prop="jian_ce_kai_shi_s" label="检测时间" width="100"></el-table-column>
-                <el-table-column prop="wei_tuo_id_" label="检测委托单号" width="150">
-                    <template slot-scope="scope">
-                        {{ scope.row.wei_tuo_id_ | getID(trustList) }}
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column prop="wei_tuo_dan_wei_" label="委托单位"></el-table-column> -->
-                <el-table-column prop="wan_cheng_shi_jia" label="委托日期" width="100"></el-table-column>
-                <el-table-column prop="yang_pin_bian_hao" label="样品编号" width="150"></el-table-column>
-                <el-table-column prop="yang_pin_ming_che" label="样品名称" width="150"></el-table-column>
-                <!-- <el-table-column prop="lian_xi_ren_" label="联系人"> </el-table-column>
-                <el-table-column prop="lian_xi_dian_hua_" label="联系电话"></el-table-column>
-                <el-table-column prop="bao_gao_lei_bie_" label="类别">
-                    <template slot-scope="scope">
-                        {{ scope.row.bao_gao_lei_bie_.toUpperCase() }}
-                    </template>
-                </el-table-column> -->
-                <el-table-column label="操作" align="left">
-                    <template slot-scope="scope">
-                        <el-popover placement="left" width="200" trigger="click">
-                            <div slot="reference" class="more">
-                                <i class="el-icon-caret-bottom"></i>查阅
-                            </div>
-                            <template v-for="(item ,index) in reportList">
-                                <div v-if="item.hasItem">
-                                    <el-popover placement="left" width="200" trigger="click">
-                                        <div class="operate-item" slot="reference" @click="getDetail(scope.row, item.key)">
-                                            <i class="el-icon-s-order"></i> {{item.name}}
-                                        </div>
-                                        <div class="three-item">
-                                            <div
-                                                v-for="i in testingList"
-                                                :key="i.id_"
-                                                class="operate-item"
-                                                @click="consult(i)"
-                                            >
-                                                {{ item.jian_ce_xiang_mu_ }}
-                                            </div>
-                                        </div>
-                                    </el-popover>
-                                </div>
-                                <div
-                                    v-else
-                                    :key="index"
-                                    class="operate-item"
-                                    @click="alertReport(item.path, scope.row[item.key])"
-                                >
-                                    <i class="el-icon-s-order"></i> {{item.name}}
-                                </div>
-                            </template>
-                        </el-popover>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </div>
-        <el-dialog
-            :close-on-click-modal="false"
-            :close-on-press-escape="false"
-            :top="'3vh'"
-            :width="'90%'"
-            class="js-custom-dialog"
-            append-to-body
-            :fullscreen="false"
-            :visible.sync="visible"
-        >
-            <iframe :src="srcUrl" :height="'100%'" :width="'100%'" frameborder="0" scrolling="no" />
-        </el-dialog>
-        <div class="pagination">
-            <el-pagination
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
-                :current-page.sync="currentPage"
-                :page-sizes="[10, 20, 50, 100]"
-                :page-size="20"
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="total"
-            >
-            </el-pagination>
-        </div>
-    </div>
+    <testing-record :info="info"/>
 </template>
-
 <script>
-    import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
-    const searchList = [
-        {
-            label: '年份',
-            value: 'year'
-        },
-        // {
-        //     label: '检测申请单号',
-        //     value: 'sign'
-        // },
-        // {
-        //     label: '委托单位',
-        //     value: 'client'
-        // },
-        {
-            label: '报告编号',
-            value: 'report'
-        }
-    ]
-    const reportList = [
-        // {
-        //     name: '合同',
-        //     key: 'he_tong_id_',
-        //     path: '',
-        //     hasItem: false
-        // },
-        {
-            name: '检测委托单',
-            key: 'wei_tuo_id_',
-            path: '43罗湖/LHXBJY-QP-7-01-FQ-05 检测委托单.rpx',
-            hasItem: false
-        },
-        {
-            name: '检测报告',
-            key: 'id_',
-            path: '43罗湖/LH非 检测报告.rpx',
-            hasItem: false
-        },
-        // {
-        //     name: '检测报告审批表',
-        //     key: 'id_',
-        //     path: '43罗湖/检测报告审批表.rpx',
-        //     hasItem: false
-        // },
-        {
-            name: '检测记录',
-            key: 'testing',
-            path: '43罗湖/LHJC 检测记录.rpx',
-            hasItem: true
-        },
-        {
-            name: '附件',
-            key: 'file',
-            path: '',
-            hasItem: true
-        }
-    ]
-
-    // 非通用检测项目编号及报表路径
-    const specialTest = [
-        {
-            id: '1-1',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '1-2',
-            path: '43罗湖/LHXBJY-JC-SOP-001-FQ-01 无菌检测记录表.rpx'
-        },
-        {
-            id: '2',
-            path: '43罗湖/LHXBJY-JC-SOP-002-FQ-01 支原体检测(培养法).rpx'
-        },
-        {
-            id: '3',
-            path: '43罗湖/LHXBJY-JC-SOP-003-FQ-01 细菌内毒素检查记录表.rpx'
-        }
-    ]
     export default {
-        filters: {
-            getID (v, arr) {
-                let result = arr.find(item => item.id_ === v)
-                return result ? result.name_ : v
-            },
-            getYear (v) {
-                return v ? v.slice(0, 4) : ''
-            }
+        components: {
+            TestingRecord: () => import('../component/testingRecord')
         },
         data () {
             return {
-                searchList,
-                reportList,
-                type: '非',
-                reportId: '',
-                total: null,
-                currentPage: 1,
-                visible: false,
-                searchParam: {
-                    year: '',
-                    sign: '',
-                    client: '',
-                    report: '',
-                },
-                tableData: [],
-                testingList: [],
-                contractList: [],
-                trustList: [],
-                srcUrl: '',
-                globalSql: ''
-            }
-        },
-        created () {
-            this.globalSql = `select * from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
-            // this.globalSql = `select * from t_lhjcbgb where bao_gao_lei_bie_ = '${this.type}'`
-            let sql = `${this.globalSql} order by create_time_ desc limit 0,20`
-            this.loadData(sql)
-            let sumsql = `select count(*) as total  from t_lhjcbgb where zhuang_tai_ = '已完成' and bao_gao_lei_bie_ = '${this.type}'`
-            curdPost('sql', sumsql).then((response) => {
-                this.total = response.variables.data[0].total
-            })
-        },
-        methods: {
-            // 请求表格数据函数
-            loadData (sql) {
-                this.tableData = []
-                curdPost('sql', sql).then((res) => {
-                    const { data } = res.variables
-                    if (!data || !data.length) {
-                        return
-                    }
-
-                    this.tableData = data
-                    let ids = {
-                        contract: [],
-                        trust: []
-                    }
-                    data.forEach(item => {
-                        ids.contract.push(item.he_tong_id_)
-                        ids.trust.push(item.wei_tuo_id_)
-                    })
-                    // 获取合同数据用于转换
-                    let sql1 = `select id_, he_tong_bian_hao_ as name_ from t_bjd where find_in_set(id_, '${ids.contract.join(',')}')`
-                    let sql2 = `select id_, wei_tuo_bian_hao_ as name_ from t_lhwtsqb where find_in_set(id_, '${ids.trust.join(',')}')`
-                    console.log(sql1, sql2)
-                    curdPost('sql', sql1).then(res1 => {
-                        this.contractList = res1.variables && res1.variables.data
-                    })
-                    curdPost('sql', sql2).then(res2 => {
-                        this.trustList = res2.variables && res2.variables.data
-                    })
-                })
-            },
-            getDetail (row, type) {
-                const { yang_pin_bian_hao } = row
-                // 获取检测项目数据
-                if (type === 'testing') {
-                    let sql = `select id_, xiang_mu_bian_hao, jian_ce_xiang_mu_ from t_mjjcnlfw where find_in_set(id_, (select jian_ce_xiang_mu_ from t_lhypb where yang_pin_bian_hao = '${yang_pin_bian_hao}'))`
-                    curdPost('sql', sql).then(res => {
-                        this.testingList = res.variables && res.variables.data
-                    })
-                    return
-                }
-                // 获取附件信息,委托表【fu_jian_, biao_qian_tu_pian】字段,检测总表【fu_jian_, wen_dang_fu_jian_, kuai_zhao_fu_jian】字段,报告表【bao_gao_pdf_, gai_zhang_jian_pd】字段
-                if (type === 'file') {
-                    let sql = `select `
+                info: {
+                    title: '非CNAS/CMA检测档案',
+                    reportPath: '43罗湖/LH非 检测报告.rpx',
+                    type: '非'
                 }
-
-            },
-            consult (data) {
-                let isSpecial = !!specialTest.find(i => i.id === data.xiang_mu_bian_hao)
-                let path = isSpecial ? isSpecial.path : '43罗湖/LHJC 检测记录.rpx'
-                this.alertReport(path, data.id_)
-            },
-            // 组装查询SQL
-            search () {
-                const {year, client, report} = this.searchParam
-                const paramsList = {
-                    year: ` and jian_ce_kai_shi_s like '%${year}%'`,
-                    client: ` and wei_tuo_dan_wei_ = '${client}'`,
-                    report: ` and bao_gao_bian_hao_ = '${report}'`
-                }
-                let params = ''
-                Object.keys(this.searchParam).forEach(item => {
-                    if (this.searchParam[item]) {
-                        params += paramsList[item]
-                    }
-                })
-                let sql = `${this.globalSql}${params} order by create_time_ desc limit 0,20`
-                console.log(sql)
-                this.loadData(sql)
-            },
-            handleSizeChange (value) {
-                this.currentPage = 1
-                let sql = `${this.globalSql} order by create_time_ desc limit 0,${value}`
-                this.loadData(sql)
-            },
-            handleCurrentChange (value) {
-                let sql = `${this.globalSql} order by create_time_ desc limit ${value},20`
-                this.loadData(sql)
-            },
-            alertReport (path, id) {
-                this.srcUrl = `${this.$reportPash.replace('show', 'pdf')}${path}&id_=${id}`
-                this.visible = true
-            }
-        }
-    }
-</script>
-
-<style lang="scss">
-    .content {
-        .header {
-            margin-top: 5px;
-            width: 100%;
-            height: 25px;
-            text-align: center;
-            font-weight: 700;
-            background-color: #f9ffff;
-            font-size: 18px;
-        }
-        .search-box {
-            height: 30px;
-            margin-bottom: 20px;
-            .label {
-                margin: 0 6px 0 6px;
-                color: #916266;
-                font-size: 12px;
-            }
-            .input {
-                width: 150px;
-                font-size: 12px;
-                height: 28px !important;
-                line-height: 28px;
-                color: #606266;
             }
-            .btn {
-                margin-left: 10px;
-                background-color: #409eff;
-                border-color: #409eff;
-                font-size: 12px;
-                border-radius: 3px;
-                padding: 7px 15px;
-            }
-        }
-        .table-container{
-            width: 100%;
-            height: calc(100vh - 220px);
         }
-        .pagination{
-            height: 35px;
-            padding: 5px 2px;
-        }
-        .el-table__header .table-header{
-            color: #000;
-            font-size: 14px;
-            padding: 6px 6px;
-            background: #a7d6f8 !important
-        }
-        // .tableRowClassName {
-        //     backface-visibility: #d9eefd;
-        // }
-        // .el-table .warning-row {
-        //     background: #d9eefd;
-        // }
-        .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
-            background: #d9eefd;
-        }
-        .more {
-            cursor: pointer;
-            color: #409eff;
-        }
-        .el-dropdown-link {
-            cursor: pointer;
-            color: #409eff;
-        }
-        .el-icon-arrow-down {
-            font-size: 12px;
-        }
-    }
-    .operate-item {
-        cursor: pointer;
-        color: #85ce61;
     }
-</style>
+</script>

+ 6 - 7
src/views/system/jbdScan/goods/manualConfirmation.vue

@@ -221,7 +221,7 @@
 
                         <el-table-column
                           label="留样日期"
-                          width="150px">
+                          width="230px">
                           <template slot-scope="scope">
                             <el-date-picker
                               v-model="scope.row.liu_yang_ri_qi_"
@@ -252,7 +252,7 @@
 
                         <el-table-column
                           label="留样期限至"
-                          width="150px">
+                          width="230px">
                           <template slot-scope="scope">
                             <el-date-picker
                               v-model="scope.row.liu_yang_qi_xian"
@@ -269,7 +269,7 @@
 
                         <el-table-column
                           label="销毁日期"
-                          width="150">
+                          width="230px">
                           <template slot-scope="scope">
                             <el-date-picker
                               v-model="scope.row.xiao_hui_ri_qi_"
@@ -285,7 +285,7 @@
 
                         <el-table-column
                           label="返样日期"
-                          width="150px">
+                          width="230px">
                           <template slot-scope="scope">
                             <el-date-picker
                               v-model="scope.row.fan_yang_ri_qi_"
@@ -367,12 +367,12 @@
                                 v-model="scope.row.bao_gao_bian_zhi_"
                                 placeholder="请选择"
                                 type="user"
-                                :multiple="true"
                                 store="id"
                               />
                            </template>
                         </el-table-column>
-
+                        <!-- 
+                              :multiple="true" -->
                         <el-table-column
                           label="报告复核员"
                           width="130px">
@@ -381,7 +381,6 @@
                               v-model="scope.row.bao_gao_shen_he_y"
                               placeholder="请选择"
                               type="user"
-                              :multiple="true"
                               store="id"
                             />
                             </template>

+ 5 - 7
src/views/system/jbdScan/goods/sampleConfirmation.vue

@@ -164,7 +164,7 @@
                          
                            <el-table-column
                              label="是否留样"
-                             width="80px">
+                             width="120px">
                              <template slot-scope="scope">
                                  <el-select v-model="scope.row.shi_fou_liu_yang_" placeholder="请选择">
                                    <el-option
@@ -221,7 +221,7 @@
                          
                           <el-table-column
                             label="留样日期"
-                            width="150px">
+                            width="230px">
                             <template slot-scope="scope">
                               <el-date-picker
                                 v-model="scope.row.liu_yang_ri_qi_"
@@ -252,7 +252,7 @@
                          
                           <el-table-column
                             label="留样期限至"
-                            width="150px">
+                            width="230px">
                             <template slot-scope="scope">
                               <el-date-picker
                                 v-model="scope.row.liu_yang_qi_xian"
@@ -269,7 +269,7 @@
                          
                           <el-table-column
                             label="销毁日期"
-                            width="150">
+                            width="230">
                             <template slot-scope="scope">
                               <el-date-picker
                                 v-model="scope.row.xiao_hui_ri_qi_"
@@ -285,7 +285,7 @@
                          
                           <el-table-column
                             label="返样日期"
-                            width="150px">
+                            width="230px">
                             <template slot-scope="scope">
                               <el-date-picker
                                 v-model="scope.row.fan_yang_ri_qi_"
@@ -367,7 +367,6 @@
                                   v-model="scope.row.bao_gao_bian_zhi_"
                                   placeholder="请选择"
                                   type="user"
-                                  :multiple="true"
                                   store="id"
                                 />
                              </template>
@@ -381,7 +380,6 @@
                                 v-model="scope.row.bao_gao_shen_he_y"
                                 placeholder="请选择"
                                 type="user"
-                                :multiple="true"
                                 store="id"
                               />
                               </template>