|
|
|
@ -218,7 +218,11 @@ |
|
|
|
<Tabs v-model:activeKey="activeKey2" :animated="false" @change="onReportChange"> |
|
|
|
<TabPane key="1" tab="跟进小计"> |
|
|
|
<div class="flex-col-center-start" style="flex:1;padding-top: 16px;"> |
|
|
|
<BasicForm @register="registerForm"></BasicForm> |
|
|
|
<BasicForm @register="registerForm"> |
|
|
|
<template #imageList="{ model, field }"> |
|
|
|
<OssUpload v-model="model[field]" /> |
|
|
|
</template> |
|
|
|
</BasicForm> |
|
|
|
<div class="flex-row-center-end" style="width: 100%;padding-right: 40px;"> |
|
|
|
<Button type="primary" style="width: 120px;margin-top: 36px;" @click="handleReport">保存</Button> |
|
|
|
</div> |
|
|
|
@ -238,6 +242,14 @@ |
|
|
|
<div class="flex-row-center-start" v-if="item.nextFollowTime"> |
|
|
|
<span style="color: #0960bd;">下次跟进时间:{{item.nextFollowTime}}</span> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 8px;" v-if="item.imageList && item.imageList.length"> |
|
|
|
<ImagePreviewGroup> |
|
|
|
<Image v-for="url in item.imageList" style="width: 80px; height: 80px; border-radius: 5px; margin: 0 5px 5px 0" |
|
|
|
:key="url" |
|
|
|
:src="url" |
|
|
|
/> |
|
|
|
</ImagePreviewGroup> |
|
|
|
</div> |
|
|
|
<div class="flex-row-center-start" v-if="item.remark"> |
|
|
|
<span style="color: #333;">备注:{{item.remark || "--"}}</span> |
|
|
|
</div> |
|
|
|
@ -428,9 +440,24 @@ |
|
|
|
async function handleReport() { |
|
|
|
await validate() |
|
|
|
const values: any = getFieldsValue() |
|
|
|
const { nextFollowTime } = values |
|
|
|
values.nextFollowTime = formatToDateTime(nextFollowTime) |
|
|
|
// const { nextFollowTime } = values |
|
|
|
// values.nextFollowTime = formatToDateTime(nextFollowTime) |
|
|
|
values.datingClueId = details.value.id |
|
|
|
|
|
|
|
var imageList: any = [] |
|
|
|
Object.keys(values).forEach((key) => { |
|
|
|
const val = values[key] |
|
|
|
switch (key) { |
|
|
|
case 'imageList': |
|
|
|
imageList = val?.map?.((item: any) => { |
|
|
|
const { url, response, originFileObj } = item |
|
|
|
return typeof item === 'string' ? item : url || item?.photoUrl || response?.url || originFileObj?.url |
|
|
|
}) |
|
|
|
break |
|
|
|
} |
|
|
|
}) |
|
|
|
delete values.imageList |
|
|
|
values.imageList = imageList |
|
|
|
await recordClueing(values) |
|
|
|
createMessage.success('提交成功') |
|
|
|
resetFields() |
|
|
|
|