pm重传审批修改
continuous-integration/drone/push Build is passing Details

uat
wangxiaoshuang 2025-05-23 10:11:52 +08:00
parent 810c786512
commit 269f9f9477
1 changed files with 86 additions and 44 deletions

View File

@ -172,17 +172,17 @@
<el-table-column prop="AuditTime" :label="$t('trials:reuploadAudit:table:auditTime')" <el-table-column prop="AuditTime" :label="$t('trials:reuploadAudit:table:auditTime')"
show-overflow-tooltip sortable="custom" min-width="150px" /> show-overflow-tooltip sortable="custom" min-width="150px" />
<el-table-column :label="$t('common:action:action')" fixed="right" <el-table-column :label="$t('common:action:action')" fixed="right"
v-if="hasPermi(['trials:trials-panel:visit:reupload-audit:agree', 'trials:trials-panel:visit:reupload-audit:refuse'])" v-if="hasPermi(['trials:trials-panel:visit:reupload-audit:agree'])"
min-width="120px"> min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :title="$t('trials:reuploadAudit:button:auditYes')" <el-button :title="$t('trials:reuploadAudit:button:imageBack')"
v-hasPermi="['trials:trials-panel:visit:reupload-audit:agree']" circle v-hasPermi="['trials:trials-panel:visit:reupload-audit:agree']" circle
:disabled="scope.row.ImageBackState > 0" icon="el-icon-check" size="mini" :disabled="scope.row.ImageBackState > 0" icon="el-icon-edit-outline" size="mini"
@click="audit(scope.row, 1)" /> @click="audit(scope.row)" />
<el-button :title="$t('trials:reuploadAudit:button:auditNo')" <!-- <el-button :title="$t('trials:reuploadAudit:button:auditNo')"
v-hasPermi="['trials:trials-panel:visit:reupload-audit:refuse']" v-hasPermi="['trials:trials-panel:visit:reupload-audit:refuse']"
:disabled="scope.row.ImageBackState > 0" circle icon="el-icon-close" size="mini" :disabled="scope.row.ImageBackState > 0" circle icon="el-icon-close" size="mini"
@click="audit(scope.row, 2)" /> @click="audit(scope.row, 2)" /> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -191,6 +191,35 @@
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" <pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
@pagination="getList" /> @pagination="getList" />
</template> </template>
<base-model v-if="config.visible" :config="config">
<template slot="dialog-body">
<div style="text-align: center;font-weight: bold;margin-bottom: 10px;">{{ rowData.title }}</div>
<el-form ref="imageBackform" :model="form" class="demo-form-inline" :rules="rules" label-width="100px">
<el-form-item :label="$t('trials:reuploadAudit:table:ApplyReason') + ': '" prop="ApplyReason">
<span>{{ rowData.ApplyReason }}</span>
</el-form-item>
<el-form-item :label="$t('trials:reuploadAudit:form:IsAgree') + ': '" prop="IsAgree">
<el-radio-group v-model="form.IsAgree">
<el-radio :label="true">{{ $t('trials:reuploadAudit:button:auditYes') }}</el-radio>
<el-radio :label="false">{{ $t('trials:reuploadAudit:button:auditNo') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('trials:reuploadAudit:table:ResultRemark') + ': '" prop="ResultRemark">
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder=""
v-model="form.ResultRemark">
</el-input>
</el-form-item>
</el-form>
</template>
<template slot="dialog-footer">
<el-button type="primary" @click="auditImageBack" :loading="loading">
{{ $t('common:button:confirm') }}
</el-button>
<el-button @click="config.visible = false" :loading="loading">
{{ $t('common:button:cancel') }}
</el-button>
</template>
</base-model>
</BaseContainer> </BaseContainer>
</template> </template>
<script> <script>
@ -204,6 +233,7 @@ import {
import BaseContainer from '@/components/BaseContainer' import BaseContainer from '@/components/BaseContainer'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import moment from 'moment' import moment from 'moment'
import baseModel from '@/components/BaseModel'
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
@ -229,7 +259,8 @@ export default {
name: 'QcCheck', name: 'QcCheck',
components: { components: {
BaseContainer, BaseContainer,
Pagination Pagination,
baseModel
}, },
data() { data() {
return { return {
@ -243,7 +274,27 @@ export default {
timeListC: [], timeListC: [],
timeList: [], timeList: [],
trialId: null, trialId: null,
moment moment,
rowData: {},
config: {
visible: false,
title: this.$t("trials:reuploadAudit:confirmMessage:imageBack"),
width: '500px',
appendToBody: true,
},
form: {
IsAgree: null,
ResultRemark: null
},
rules: {
IsAgree: [
{
required: true,
message: this.$t('common:ruleMessage:select'),
trigger: ['blur', 'change'],
},
],
}
} }
}, },
watch: { watch: {
@ -259,47 +310,38 @@ export default {
this.getVisitPlanOptions() this.getVisitPlanOptions()
}, },
methods: { methods: {
async audit(row, state) { async audit(row) {
try { try {
let status = state === 1 ? this.$t('trials:reuploadAudit:button:auditYes') : this.$t('trials:reuploadAudit:button:auditNo') this.rowData = Object.assign({}, row)
let message = this.$t("trials:reuploadAudit:confirmMessage:imageBack").replace("xxx", status) this.rowData.title = `${row.CreateUserFullName} (${this.$fd('ImageBackApplyEnum', row.ApplyUserRole)}) ${this.$t('trials:reuploadAudit:title:imageBack').replace('xxx', row.SubjectCode).replace('yyy', row.VisitName)}`
this.$prompt(this.$t("trials:reuploadAudit:confirmMessage:ResultRemark"), message, { Object.keys(this.form).forEach(key => {
confirmButtonText: this.$t("common:button:save"), this.form[key] = null
cancelButtonText: this.$t("common:button:cancel"), })
}).then(async ({ value }) => { this.config.visible = true
let params = { } catch (err) {
IamgeBackRecordId: row.Id, console.log(err)
IsAgree: state === 1 ? true : false, this.loading = false
ResultRemark: value
} }
},
async auditImageBack() {
try {
let validate = await this.$refs.imageBackform.validate()
if (!validate) return false
let params = Object.assign({}, this.form)
params.IamgeBackRecordId = this.rowData.Id
// return console.log(params) // return console.log(params)
this.loading = true this.loading = true
let res = await auditImageBack(params) let res = await auditImageBack(params)
this.loading = false this.loading = false
if (res.IsSuccess) { if (res.IsSuccess) {
this.config.visible = false
this.getList() this.getList()
} }
}).catch(() => {
});
// let confirm = await this.$confirm(message)
// if (!confirm) return false
// let params = {
// IamgeBackRecordId: row.Id,
// IsAgree: state === 1 ? true : false,
// ResultRemark
// }
// this.loading = true
// let res = await auditImageBack(params)
// this.loading = false
// if (res.IsSuccess) {
// this.getList()
// }
} catch (err) { } catch (err) {
console.log(err)
this.loading = false this.loading = false
console.log(err)
} }
}, },
getList() { getList() {
this.loading = true this.loading = true