|
@@ -6,45 +6,47 @@
|
|
:width="1000"
|
|
:width="1000"
|
|
:closeOnOverlayClick="false"
|
|
:closeOnOverlayClick="false"
|
|
>
|
|
>
|
|
- <t-form ref="formRef" :data="formData" labelWidth="85px" :rules="rules">
|
|
|
|
|
|
+ <t-form ref="formRef" :data="formData" labelWidth="100px" :rules="rules">
|
|
<div class="form-group-title">预警信息</div>
|
|
<div class="form-group-title">预警信息</div>
|
|
<t-row :gutter="[0, 10]">
|
|
<t-row :gutter="[0, 10]">
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
- <t-form-item label="服务单元:"> {{ curRow.service }}</t-form-item>
|
|
|
|
|
|
+ <t-form-item label="服务单元:">
|
|
|
|
+ {{ asyncDetail.service }}</t-form-item
|
|
|
|
+ >
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="SOP流水号:">
|
|
<t-form-item label="SOP流水号:">
|
|
- {{ curRow.sopNo }}
|
|
|
|
|
|
+ {{ asyncDetail.sopNo }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="客户类型:">
|
|
<t-form-item label="客户类型:">
|
|
- {{ curRow.customType }}
|
|
|
|
|
|
+ {{ asyncDetail.customType }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="客户名称:">
|
|
<t-form-item label="客户名称:">
|
|
- {{ curRow.custom }}
|
|
|
|
|
|
+ {{ asyncDetail.custom }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="预警时间:">
|
|
<t-form-item label="预警时间:">
|
|
- {{ dateFormat(curRow.warnTime, 'yyyy-MM-dd hh:mm') }}
|
|
|
|
|
|
+ {{ dateFormat(asyncDetail.warnTime, 'yyyy-MM-dd hh:mm') }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="节点负责人:">
|
|
<t-form-item label="节点负责人:">
|
|
- {{ curRow.userName }}
|
|
|
|
|
|
+ {{ asyncDetail.userName }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="预警类型:">
|
|
<t-form-item label="预警类型:">
|
|
- {{ WARN_TYPE[curRow.type] || curRow.type }}
|
|
|
|
|
|
+ {{ WARN_TYPE[asyncDetail.type] || asyncDetail.type }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
<t-col :span="3">
|
|
<t-col :span="3">
|
|
<t-form-item label="预警字段:">
|
|
<t-form-item label="预警字段:">
|
|
- {{ curRow.fieldObj }}
|
|
|
|
|
|
+ {{ asyncDetail.fieldObj }}
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
</t-row>
|
|
</t-row>
|
|
@@ -55,22 +57,57 @@
|
|
{{ userStore.user.realName }}</t-form-item
|
|
{{ userStore.user.realName }}</t-form-item
|
|
>
|
|
>
|
|
</t-col>
|
|
</t-col>
|
|
|
|
+ <t-col :span="12">
|
|
|
|
+ <t-form-item label="跟进说明:" name="remark">
|
|
|
|
+ <t-textarea
|
|
|
|
+ v-model="formData.remark"
|
|
|
|
+ tips="限100字以内"
|
|
|
|
+ :maxlength="100"
|
|
|
|
+ ></t-textarea>
|
|
|
|
+ </t-form-item>
|
|
|
|
+ </t-col>
|
|
<t-col :span="12">
|
|
<t-col :span="12">
|
|
<t-form-item label="附件说明:">
|
|
<t-form-item label="附件说明:">
|
|
- <my-upload></my-upload>
|
|
|
|
|
|
+ <my-upload @change="fileChange"></my-upload>
|
|
</t-form-item>
|
|
</t-form-item>
|
|
</t-col>
|
|
</t-col>
|
|
</t-row>
|
|
</t-row>
|
|
|
|
+ <div class="m-t-20px">
|
|
|
|
+ <t-button theme="primary" @click="save">保存</t-button>
|
|
|
|
+ <t-link
|
|
|
|
+ theme="primary"
|
|
|
|
+ underline
|
|
|
|
+ class="m-l-40px"
|
|
|
|
+ @click="showHistory = !showHistory"
|
|
|
|
+ >查看历史跟进记录</t-link
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ <template v-if="showHistory">
|
|
|
|
+ <div class="form-group-title next-title">历史明细查阅</div>
|
|
|
|
+ <t-table
|
|
|
|
+ size="small"
|
|
|
|
+ row-key="id"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="tableData"
|
|
|
|
+ bordered
|
|
|
|
+ ></t-table>
|
|
|
|
+ </template>
|
|
</t-form>
|
|
</t-form>
|
|
- <template #foot></template>
|
|
|
|
|
|
+ <template #foot>
|
|
|
|
+ <!-- <t-button theme="default" @click="emit('update:visible', false)"
|
|
|
|
+ >取消</t-button
|
|
|
|
+ >
|
|
|
|
+ <t-button theme="primary" @click="save">保存</t-button> -->
|
|
|
|
+ </template>
|
|
</my-dialog>
|
|
</my-dialog>
|
|
</template>
|
|
</template>
|
|
-<script setup name="FlowDialog">
|
|
|
|
|
|
+<script setup name="DelayWarnFlowDialog">
|
|
import useClearDialog from '@/hooks/useClearDialog';
|
|
import useClearDialog from '@/hooks/useClearDialog';
|
|
import { ref, computed } from 'vue';
|
|
import { ref, computed } from 'vue';
|
|
import { WARN_TYPE, WARN_FLOW_STATUS } from '@/config/constants';
|
|
import { WARN_TYPE, WARN_FLOW_STATUS } from '@/config/constants';
|
|
import { dateFormat } from '@/utils/tool';
|
|
import { dateFormat } from '@/utils/tool';
|
|
import { useUserStore } from '@/store';
|
|
import { useUserStore } from '@/store';
|
|
|
|
+import { delayWarnDetail, delayWarnDetailList, flowDelayWarn } from '@/api/sop';
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
visible: Boolean,
|
|
visible: Boolean,
|
|
@@ -79,11 +116,20 @@ const props = defineProps({
|
|
const { curRow } = props;
|
|
const { curRow } = props;
|
|
const emit = defineEmits(['update:visible', 'success']);
|
|
const emit = defineEmits(['update:visible', 'success']);
|
|
const formRef = ref(null);
|
|
const formRef = ref(null);
|
|
|
|
+const asyncDetail = ref({});
|
|
|
|
+const tableData = ref([]);
|
|
|
|
+const showHistory = ref(false);
|
|
const getDetail = async () => {
|
|
const getDetail = async () => {
|
|
//编辑状态下获取回显数据的接口请求业务,如果curRow里的字段够用,就直接把curRow里的字段赋值给formData
|
|
//编辑状态下获取回显数据的接口请求业务,如果curRow里的字段够用,就直接把curRow里的字段赋值给formData
|
|
- for (let key in formData) {
|
|
|
|
- // formData[key] = props.curRow[key];
|
|
|
|
- }
|
|
|
|
|
|
+ // for (let key in formData) {
|
|
|
|
+ // formData[key] = props.curRow[key];
|
|
|
|
+ // }
|
|
|
|
+ delayWarnDetail(curRow.id).then((res) => {
|
|
|
|
+ asyncDetail.value = res;
|
|
|
|
+ });
|
|
|
|
+ delayWarnDetailList(curRow.id).then((res) => {
|
|
|
|
+ tableData.value = res;
|
|
|
|
+ });
|
|
};
|
|
};
|
|
const { formData, isEdit } = useClearDialog(
|
|
const { formData, isEdit } = useClearDialog(
|
|
{
|
|
{
|
|
@@ -105,10 +151,25 @@ const rules = {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
};
|
|
};
|
|
|
|
+const fileChange = (fileList) => {
|
|
|
|
+ formData.attachmentIds = fileList.map((item) => item.response.id).join(',');
|
|
|
|
+};
|
|
|
|
+const columns = [
|
|
|
|
+ { colKey: 'createTime', title: '跟进时间' },
|
|
|
|
+ { colKey: 'createName', title: '跟进人' },
|
|
|
|
+ { colKey: 'remark', title: '跟进说明' },
|
|
|
|
+ { colKey: 'attachmentIds', title: '附件说明' },
|
|
|
|
+];
|
|
const flowHandler = () => {
|
|
const flowHandler = () => {
|
|
- // addUser({ ...formData, id: props.curRow?.id || undefined }).then(() => {
|
|
|
|
- // emit('success');
|
|
|
|
- // });
|
|
|
|
|
|
+ flowDelayWarn({
|
|
|
|
+ ...formData,
|
|
|
|
+ delayWarnId: curRow.id,
|
|
|
|
+ id: asyncDetail.value.id || undefined,
|
|
|
|
+ createId: asyncDetail.createId || undefined,
|
|
|
|
+ createTime: asyncDetail.createTime || undefined,
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ emit('success');
|
|
|
|
+ });
|
|
};
|
|
};
|
|
const save = () => {
|
|
const save = () => {
|
|
formRef.value.validate().then(async (result) => {
|
|
formRef.value.validate().then(async (result) => {
|