|
@@ -2,13 +2,76 @@
|
|
|
<my-dialog
|
|
|
:visible="visible"
|
|
|
header="异常处理审核"
|
|
|
- :width="800"
|
|
|
+ :width="1100"
|
|
|
attach="body"
|
|
|
:closeOnOverlayClick="false"
|
|
|
@close="emit('update:visible', false)"
|
|
|
>
|
|
|
<t-form colon>
|
|
|
- <t-row :gutter="[0, 0]">
|
|
|
+ <t-row :gutter="[0, 4]">
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="异常编号">{{ curRow.code }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="服务单元">{{ curRow.serviceName }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="SOP流水号">{{ tbDingApply.sopNo }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="姓名">{{ curRow.createRealName }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="客户名称">{{ curRow.customName }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="客户类型">{{
|
|
|
+ customerTypeFilter(curRow.customType)
|
|
|
+ }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="异常类型">{{
|
|
|
+ tbDingApply.dingExceptionTypeStr
|
|
|
+ }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="异常日期">{{
|
|
|
+ tbDingApply.exceptionTime
|
|
|
+ }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="补卡时间">{{
|
|
|
+ timestampFilter(tbDingApply.applyTime)
|
|
|
+ }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="12">
|
|
|
+ <t-form-item label="理由">{{ tbDingApply.reason }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="12">
|
|
|
+ <t-form-item label="附件/截图">
|
|
|
+ <attachment-view
|
|
|
+ :imageList="getUrls('image')"
|
|
|
+ :fileList="getUrls('file')"
|
|
|
+ :imgSize="60"
|
|
|
+ ></attachment-view>
|
|
|
+ </t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="审核状态">{{ curRow.statusStr }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="当前审核人">{{
|
|
|
+ tbDingApply.approveUserName
|
|
|
+ }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ <t-col :span="3">
|
|
|
+ <t-form-item label="申请时间">{{
|
|
|
+ timestampFilter(tbDingApply.createTime)
|
|
|
+ }}</t-form-item>
|
|
|
+ </t-col>
|
|
|
+ </t-row>
|
|
|
+
|
|
|
+ <t-row :gutter="[0, 8]" style="margin-top: 30px">
|
|
|
<t-col :span="12">
|
|
|
<t-form-item label="审核" required-mark>
|
|
|
<t-radio-group
|
|
@@ -30,8 +93,13 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup name="AbnormalAudit">
|
|
|
-import { ref } from 'vue';
|
|
|
-import { workHoursWaitCheckAuditApi } from '@/api/work-hours';
|
|
|
+import { ref, watch } from 'vue';
|
|
|
+import {
|
|
|
+ workHoursWaitCheckAuditApi,
|
|
|
+ workHoursCheckDetailApi,
|
|
|
+} from '@/api/work-hours';
|
|
|
+import { timeNumberToText } from '@/utils/tool';
|
|
|
+import { timestampFilter, customerTypeFilter } from '@/utils/filter';
|
|
|
// import { customerTypeFilter, timestampFilter } from '@/utils/filter';
|
|
|
import { DialogPlugin, MessagePlugin } from 'tdesign-vue-next';
|
|
|
|
|
@@ -41,6 +109,51 @@ const props = defineProps({
|
|
|
curRow: Object,
|
|
|
});
|
|
|
|
|
|
+const crmInfo = ref({});
|
|
|
+const tbDingApply = ref({});
|
|
|
+const stepHistoryShow = ref(false);
|
|
|
+const flowApproveHistoryList = ref([]);
|
|
|
+const getUrls = (type) => {
|
|
|
+ const list = tbDingApply.value.attachmentPaths?.split(',') || [];
|
|
|
+ const imgs = ['jpg', 'png', 'jpeg'];
|
|
|
+ if (type === 'image') {
|
|
|
+ return list.filter((item) => {
|
|
|
+ const evt = item.split('.').slice(-1)[0];
|
|
|
+ return imgs.includes(evt);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return list.filter((item) => {
|
|
|
+ const evt = item.split('.').slice(-1)[0];
|
|
|
+ return !imgs.includes(evt);
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+function getFlowApproveHistoryList(data) {
|
|
|
+ if (!data) return [];
|
|
|
+
|
|
|
+ let lastTime = 0;
|
|
|
+ return data.map((item, index) => {
|
|
|
+ let nitem = { ...item };
|
|
|
+ nitem.duration =
|
|
|
+ index === 0 ? '-' : timeNumberToText(item.createTime - lastTime);
|
|
|
+ lastTime = item.createTime;
|
|
|
+ return nitem;
|
|
|
+ });
|
|
|
+}
|
|
|
+const initDetail = async () => {
|
|
|
+ stepHistoryShow.value = false;
|
|
|
+ flowApproveHistoryList.value = [];
|
|
|
+ const res = await workHoursCheckDetailApi(props.curRow.objId);
|
|
|
+ tbDingApply.value = res.tbDingApply;
|
|
|
+ crmInfo.value = res.crmInfo;
|
|
|
+ flowApproveHistoryList.value = getFlowApproveHistoryList(
|
|
|
+ res.flowApproveHistoryList
|
|
|
+ );
|
|
|
+};
|
|
|
+const toViewHistory = () => {
|
|
|
+ stepHistoryShow.value = !stepHistoryShow.value;
|
|
|
+};
|
|
|
+
|
|
|
const dingExceptionApprove = ref('PASS');
|
|
|
const optionList = ref([
|
|
|
{
|
|
@@ -75,4 +188,11 @@ const handleAudit = async () => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+watch(
|
|
|
+ () => props.visible,
|
|
|
+ (val) => {
|
|
|
+ if (val) initDetail();
|
|
|
+ }
|
|
|
+);
|
|
|
</script>
|