Browse Source

no message

master
xpz2018 6 months ago
parent
commit
01ec178c76
2 changed files with 37 additions and 11 deletions
  1. 15
      src/views/invite/inviteInfo/data.ts
  2. 33
      src/views/invite/inviteInfo/index.vue

15
src/views/invite/inviteInfo/data.ts

@ -363,14 +363,13 @@ export const modalFormSchema: FormSchema[] = [
],
},
},
// {
// label: '下次跟进时间',
// component: 'DatePicker',
// field: 'nextFollowTime',
// componentProps: {
// ...dateComProps,
// },
// },
{
label: '微信截图',
// required: true,
field: 'imageList',
component: 'Upload',
slot: 'imageList',
},
{
field: 'remark',
label: '备注',

33
src/views/invite/inviteInfo/index.vue

@ -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()

Loading…
Cancel
Save