Commit dfa18029 authored by 沈翠玲's avatar 沈翠玲

消息中心和合同管理

parent 2aa7f570
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
<span <span
class="message-title" class="message-title"
:class="{ ' text-gray-400': item.messageReads && item.messageReads.length }" :class="{ ' text-gray-400': item.messageReads && item.messageReads.length }"
>{{ item.title }}</span >{{ item.message.title }}</span
> >
<span class="message-date">{{ timeago(item.sendTime) }}</span> <span class="message-date">{{ timeago(item.message.sendTime) }}</span>
</div> </div>
</div> </div>
<!-- <div class="message-item"> <!-- <div class="message-item">
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<script setup lang="jsx" name="platformManage"> <script setup lang="jsx" name="platformManage">
import { ref, reactive, onMounted, computed } from 'vue'; import { ref, reactive, onMounted, computed } from 'vue';
import { Plus, Delete, Edit, Setting } from '@element-plus/icons-vue'; import { Plus, Delete, Edit, Setting } from '@element-plus/icons-vue';
import { getContractPage, flowStatusByIds } from '@/api/customer'; import { getContractPage, flowStatusByIds, saveContract } from '@/api/customer';
import { ElMessageBox, ElMessage, ElButton, ElTag } from 'element-plus'; import { ElMessageBox, ElMessage, ElButton, ElTag } from 'element-plus';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import addModel from './components/addModel.vue'; import addModel from './components/addModel.vue';
...@@ -175,6 +175,23 @@ ...@@ -175,6 +175,23 @@
} }
}) })
} }
const sendReplay = async (row) => {
await ElMessageBox.confirm('发起后不可修改,是否发起审批?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
});
saveContract({...row, contractStatus: 'approval'}).then(res => {
if(res.success) {
ElMessage.success({
message: '发起成功',
plain: true,
});
query()
}
})
}
const handleClick = () => { const handleClick = () => {
setTimeout(() => { setTimeout(() => {
query(); query();
...@@ -280,9 +297,12 @@ ...@@ -280,9 +297,12 @@
default({ row }) { default({ row }) {
return ( return (
<> <>
<ElButton type="primary" link onClick={() => addConstant(row, true)} v-show={row.createBy === userStore.userInfo.id} disabled={row.financeFlowStatus=== 'pass'}> <ElButton type="primary" link onClick={() => addConstant(row, true)} v-show={activeName.value === 'created'} disabled={row.financeFlowStatus=== 'pass'}>
修改 修改
</ElButton> </ElButton>
<ElButton type="primary" link onClick={() => sendReplay(row)} v-show={activeName.value === 'created'} disabled={row.financeFlowStatus=== 'pass'}>
发起审批
</ElButton>
<ElButton type="primary" link onClick={() => apply(row, 'finance')} v-show={authButtonListGet.includes('finance_apply')} disabled={row.legalFlowStatus || row.financeFlowStatus === 'pass'}> <ElButton type="primary" link onClick={() => apply(row, 'finance')} v-show={authButtonListGet.includes('finance_apply')} disabled={row.legalFlowStatus || row.financeFlowStatus === 'pass'}>
财务审批 财务审批
</ElButton> </ElButton>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</template> </template>
<script setup name="UserModal" lang="jsx"> <script setup name="UserModal" lang="jsx">
import { ref, onMounted, reactive } from 'vue'; import { ref, onMounted, reactive, nextTick } from 'vue';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import { getUserPage } from '@/api/user'; import { getUserPage } from '@/api/user';
import { Search, Delete } from '@element-plus/icons-vue'; import { Search, Delete } from '@element-plus/icons-vue';
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
const config = reactive({ const config = reactive({
columns: [ columns: [
{ type: 'checkbox', width: 60, fixed: 'left' }, { type: 'checkbox', width: 60, fixed: 'left' },
{ field: 'username', width: 110, title: '用户名称', search: { el: 'input', labelWidth: 85 } }, { field: 'username', width: 160, title: '用户名称', search: { el: 'input', labelWidth: 85 } },
{ {
showOverflow: 'tooltip', showOverflow: 'tooltip',
slots: { slots: {
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
}, },
field: 'tenantNames', field: 'tenantNames',
enum: Tenantlist, enum: Tenantlist,
width: 120, width: 160,
search: { el: 'select', props: { filterable: true }, key: 'tenant', labelWidth: 85 }, search: { el: 'select', props: { filterable: true }, key: 'tenant', labelWidth: 85 },
fieldNames: { label: 'name', value: 'id' }, fieldNames: { label: 'name', value: 'id' },
title: '调解中心' title: '调解中心'
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
); );
}, },
}, },
width: 120, width: 160,
field: 'role', field: 'role',
enum: Rolelist, enum: Rolelist,
search: { el: 'select', props: { filterable: true }, key: 'roleCode', labelWidth: 85 }, search: { el: 'select', props: { filterable: true }, key: 'roleCode', labelWidth: 85 },
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
{ {
field: 'departmentName', field: 'departmentName',
title: '部门', title: '部门',
width: 160,
enum: departlist, enum: departlist,
fieldNames: { label: 'name', value: 'id' }, fieldNames: { label: 'name', value: 'id' },
search: { el: 'tree-select', props: { filterable: true, checkStrictly: true}, labelWidth: 85, key: 'departmentId' }, search: { el: 'tree-select', props: { filterable: true, checkStrictly: true}, labelWidth: 85, key: 'departmentId' },
...@@ -107,9 +106,16 @@ ...@@ -107,9 +106,16 @@
const onHide = () => {}; const onHide = () => {};
const openModal = (row) => { const openModal = (row) => {
showModal.value = true; showModal.value = true;
if (row && proTable.value.element) { nextTick(() => {
if(proTable.value.element) {
proTable.value.element.setAllCheckboxRow(false)
}
if (row && proTable.value.element) {
setTimeout(() => {
proTable.value.element.setCheckboxRow(row, true); proTable.value.element.setCheckboxRow(row, true);
})
} }
})
}; };
const handleSearch = async (params) => { const handleSearch = async (params) => {
const { result } = await getUserPage({ current: 1, size: 9999999, ...params }); const { result } = await getUserPage({ current: 1, size: 9999999, ...params });
...@@ -136,5 +142,6 @@ ...@@ -136,5 +142,6 @@
defineExpose({ defineExpose({
openModal, openModal,
tableData
}); });
</script> </script>
...@@ -114,9 +114,11 @@ ...@@ -114,9 +114,11 @@
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<ElTag type={row.status == 'normal' ? 'primary' : 'danger'}> <>
{row.status == 'normal' ? '正常' : '已撤销'} {row.status
</ElTag> ? MessageStatus.value?.find((v) => v.value === row.status)?.label
: ''}
</>
); );
}, },
}, },
...@@ -194,10 +196,10 @@ ...@@ -194,10 +196,10 @@
<ElButton type="primary" onClick={() => showContent(row)}> <ElButton type="primary" onClick={() => showContent(row)}>
查看详情 查看详情
</ElButton> </ElButton>
<ElButton type="primary" onClick={() => handleEdit(row)}> <ElButton type="primary" onClick={() => handleEdit(row)} disabled={row.status === 'push'}>
编辑 编辑
</ElButton> </ElButton>
<ElButton type="primary" onClick={() => handleSend(row)}> <ElButton type="primary" onClick={() => handleSend(row)} disabled={row.status === 'push'}>
发送 发送
</ElButton> </ElButton>
</> </>
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<script setup name="credit"> <script setup name="credit">
import { Plus } from '@element-plus/icons-vue'; import { Plus } from '@element-plus/icons-vue';
import { getUserPage } from '@/api/user';
import { ref,watch, computed } from 'vue'; import { ref,watch, computed } from 'vue';
import { useDict } from '@/hooks/useDict'; import { useDict } from '@/hooks/useDict';
...@@ -58,12 +59,15 @@ ...@@ -58,12 +59,15 @@
const envs = getAppEnvConfig(); const envs = getAppEnvConfig();
const url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/upload'; const url = envs.VITE_GLOB_API_URL_PREFIX + '/sys/upload';
const ruleFormRef = ref() const ruleFormRef = ref()
const users = ref([])
const ruleForm = reactive({ const ruleForm = reactive({
content: "", content: "",
title: "", title: "",
receivers: [], receivers: [],
username: '' username: ''
}) })
const editValue = ref("") const editValue = ref("")
const hanldeConfirm =(row) => { const hanldeConfirm =(row) => {
ruleForm.receivers = row ruleForm.receivers = row
...@@ -96,7 +100,20 @@ ...@@ -96,7 +100,20 @@
editValue.value = row.content editValue.value = row.content
ruleForm.title = row.title ruleForm.title = row.title
ruleForm.receivers = [] ruleForm.receivers = []
ruleForm.username = "" if (row.receiversIds) {
row.receiversIds.forEach(element => {
console.log('userModalRef.value?.tableData', userModalRef.value?.tableData)
const item = userModalRef.value?.tableData.find(ii => ii.id === element)
console.log('item', item)
if (item) {
ruleForm.receivers.push(item)
}
});
console.log('ruleForm.receivers', ruleForm.receivers)
ruleForm.username = ruleForm.receivers.map(v => v.username).join(',')
}
} else { } else {
ruleForm.content = "" ruleForm.content = ""
editValue.value = "" editValue.value = ""
......
...@@ -42,14 +42,14 @@ ...@@ -42,14 +42,14 @@
}) })
} }
const handleClick = (row) => { const handleClick = (row) => {
if (row.serviceUrl) { if (row.message.serviceUrl) {
router.push(row.serviceUrl) router.push(row.message.serviceUrl)
} }
} }
const config = reactive({ const config = reactive({
columns: [ columns: [
{ {
field: 'title', field: 'message.title',
minWidth: 200, minWidth: 200,
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '消息标题', title: '消息标题',
...@@ -71,14 +71,14 @@ ...@@ -71,14 +71,14 @@
// }, // },
// }, // },
{ {
field: 'sender.username', field: 'message.sender.username',
title: '发送人名称', title: '发送人名称',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 160, width: 160,
search: { el: 'input', props: { clearable: true }, key: 'senderName', labelWidth: 75 }, search: { el: 'input', props: { clearable: true }, key: 'senderName', labelWidth: 75 },
}, },
{ {
field: 'status', field: 'message.status',
title: '状态', title: '状态',
showOverflow: 'tooltip', showOverflow: 'tooltip',
width: 100, width: 100,
...@@ -88,9 +88,11 @@ ...@@ -88,9 +88,11 @@
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<ElTag type={row.status == 'normal' ? 'primary' : 'danger'}> <>
{row.status == 'normal' ? '正常' : '已撤销'} {row.message.status
</ElTag> ? MessageStatus.value?.find((v) => v.value === row.message.status)?.label
: ''}
</>
); );
}, },
}, },
...@@ -114,13 +116,13 @@ ...@@ -114,13 +116,13 @@
}, },
}, },
{ {
field: 'sendTime', field: 'message.sendTime',
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '发送时间', title: '发送时间',
width: 170, width: 170,
}, },
{ {
field: 'messageType', field: 'message.messageType',
width: 100, width: 100,
showOverflow: 'tooltip', showOverflow: 'tooltip',
title: '消息类型', title: '消息类型',
...@@ -131,8 +133,8 @@ ...@@ -131,8 +133,8 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.messageType {row.message.messageType
? MessageType.value?.find((v) => v.value === row.messageType)?.label ? MessageType.value?.find((v) => v.value === row.message.messageType)?.label
: ''} : ''}
</> </>
); );
...@@ -150,7 +152,7 @@ ...@@ -150,7 +152,7 @@
slots: { slots: {
default: ({ row }) => { default: ({ row }) => {
return ( return (
<>{row.sendType ? SendType.value?.find((v) => v.value === row.sendType)?.label : ''}</> <>{row.message.sendType ? SendType.value?.find((v) => v.value === row.message.sendType)?.label : ''}</>
); );
}, },
}, },
...@@ -167,8 +169,8 @@ ...@@ -167,8 +169,8 @@
default: ({ row }) => { default: ({ row }) => {
return ( return (
<> <>
{row.serviceType {row.message.serviceType
? ServiceType.value?.find((v) => v.value === row.serviceType)?.label ? ServiceType.value?.find((v) => v.value === row.message.serviceType)?.label
: ''} : ''}
</> </>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment