服务项目

feature-financialTax-yjl-1122
sunzehua 6 days ago
parent 29af111bcc
commit 36b4b26865

@ -14,7 +14,7 @@ VITE_PUBLIC_PATH = /
# Please note that no line breaks # Please note that no line breaks
# VITE_PROXY = [["/basic-api","http://60.209.125.238"],["/upload","http://localhost:3300/upload"]] # VITE_PROXY = [["/basic-api","http://60.209.125.238"],["/upload","http://localhost:3300/upload"]]
# VITE_PROXY=[["/api","http://60.209.125.238:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 # VITE_PROXY=[["/api","http://60.209.125.238:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境
VITE_PROXY=[["/api","http://118.190.144.189:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境 VITE_PROXY=[["/api","http://60.209.125.238:3008"],["/stage-api","https://www.666cxf.com/stage-api"]] # 开发 测试环境
# Delete console # Delete console
VITE_DROP_CONSOLE = false VITE_DROP_CONSOLE = false

@ -112,3 +112,11 @@ export function SaveWFActivities(parameter) {
data: parameter, data: parameter,
}) })
} }
export function GetInfo(parameter) {
return request({
url: '/opApi/ServiceWorkFlowBase/GetInfo',
method: 'get',
params: parameter,
})
}

@ -62,12 +62,12 @@ export const searchFormSchema: FormSchema[] = [
export const columns: BasicColumn[] = [{ export const columns: BasicColumn[] = [{
title: '服务流程名称', title: '服务流程名称',
dataIndex: 'serviceWorkflowName', dataIndex: 'serviceWorkflowName',
width: '160px' width: 160
}, },
{ {
title: '服务流程代码', title: '服务流程代码',
dataIndex: 'serviceWorkflowCode', dataIndex: 'serviceWorkflowCode',
width: '200px' width: 200
}, },
{ {
title: '状态数量', title: '状态数量',

@ -79,9 +79,10 @@
<span class="sort">{{ item.sortNo }}</span> <span class="sort">{{ item.sortNo }}</span>
<span class="name">{{ item.showName }}</span> <span class="name">{{ item.showName }}</span>
<span class="action"> <span class="action">
<a-icon type="setting" @click="handleEditStatus(item, index)" <i class="iconfont icon-shezhi" @click="handleEditStatus(item, index)"
style="margin-right: 10px;cursor: pointer;" /> style="margin-right: 10px;cursor: pointer;"></i>
<a-icon type="delete" @click="handleDelStatus(index)" style="cursor: pointer;" /> <i class="iconfont icon-shanchu3" @click="handleDelStatus(index)"
style="cursor: pointer;"></i>
</span> </span>
</div> </div>
</div> </div>
@ -125,7 +126,7 @@
</a-modal> </a-modal>
<a-modal title="流程活动引入" :width="800" :visible="activeFlag" @cancel="activeFlag = false"> <a-modal title="流程活动引入" :width="800" :visible="activeFlag" @cancel="activeFlag = false">
<div> <div>
<a-form ref="activeForm" :rules="activeRules" :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }" <a-form ref="activeFormRef" :rules="activeRules" :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }"
:model="activeForm"> :model="activeForm">
<a-form-item name="pkId" style="margin-bottom: 10px;" label="流程活动"> <a-form-item name="pkId" style="margin-bottom: 10px;" label="流程活动">
<a-select show-search placeholder="请选择流程活动" v-model:value="activeForm.pkId" <a-select show-search placeholder="请选择流程活动" v-model:value="activeForm.pkId"
@ -156,9 +157,9 @@
<span class="sort">{{ item.sortNo }}</span> <span class="sort">{{ item.sortNo }}</span>
<span class="name">{{ item.showName }}</span> <span class="name">{{ item.showName }}</span>
<span class="action"> <span class="action">
<a-icon type="setting" @click="handleEditSub(item, index)" <i class="iconfont icon-shezhi" @click="handleEditSub(item, index)"
style="margin-right: 10px;cursor: pointer;" /> style="margin-right: 10px;cursor: pointer;"></i>
<a-icon type="delete" @click="handleDelSub(index)" style="cursor: pointer;" /> <i class="iconfont icon-shanchu3" @click="handleDelSub(index)" style="cursor: pointer;"></i>
</span> </span>
</div> </div>
</div> </div>
@ -232,13 +233,47 @@
<div v-else></div> <div v-else></div>
</a-spin> </a-spin>
</a-modal> </a-modal>
<a-modal title="子流程活动引入" :width="800" :visible="subActiveFlag" @cancel="subActiveFlag = false">
<div>
<a-form ref="subActiveFormRef" :rules="subActiveRules" :labelCol="{ span: 3 }" :wrapperCol="{ span: 21 }"
:model="subActiveForm">
<a-form-item name="pkId" style="margin-bottom: 10px;" label="流程活动">
<a-select show-search placeholder="请选择流程活动" v-model:value="subActiveForm.pkId"
style="width: 300px;margin-right: 20px;" @search="activeSearch">
<a-select-option v-for="item in activeList" :key="item.pkId" :value="item.pkId">
{{ item.showName }}
</a-select-option>
</a-select>
<a @click="addActiveFlag = true">添加</a>
</a-form-item>
<a-form-item name="sortNo" style="margin-bottom: 10px;" label="顺序号">
<a-input-number :precision="0" v-model:value="subActiveForm.sortNo" :min="1" :max="100" />
</a-form-item>
<a-form-item name="valType" label="值类型">
<a-select placeholder="请选择值类型" v-model:value="subActiveForm.valType"
style="width: 300px;margin-right: 20px;">
<a-select-option value="DATETIME">时间</a-select-option>
<a-select-option value="STRING">字符串</a-select-option>
</a-select>
</a-form-item>
</a-form>
</div>
<template #footer>
<a-button type="primary" @click="handleSaveSubActive">
确定
</a-button>
<a-button @click="subActiveFlag = false">
关闭
</a-button>
</template>
</a-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted } from 'vue' import { ref, onMounted, defineEmits } from 'vue'
import { import {
projectQueryList, QueryActivitiesList, QueryListStatus, workFlowSetUnPublishRelease, projectQueryList, QueryActivitiesList, QueryListStatus, workFlowSetUnPublishRelease,
workFlowSetUnEnable, workFlowSaveAndEnable, GetShowTimeLine,SaveWFActivities workFlowSetUnEnable, workFlowSaveAndEnable, GetShowTimeLine, SaveWFActivities, GetInfo
} from './api' } from './api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
@ -258,6 +293,7 @@ const wrapperCol = {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 17 } sm: { span: 17 }
} }
const activeFormRef = ref('') as any
const addActiveFormRef = ref('') as any const addActiveFormRef = ref('') as any
const statusList = ref([]) as any const statusList = ref([]) as any
const addItemFlag = ref(false) const addItemFlag = ref(false)
@ -275,6 +311,11 @@ const activeRules = {
sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }], sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }],
pkId: [{ required: true, message: '请选择流程活动', trigger: 'change' }] pkId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
} }
const subActiveRules = {
valType: [{ required: true, message: '请选择值类型', trigger: 'change' }],
sortNo: [{ required: true, message: '请输入顺序号', trigger: 'blur' }],
pkId: [{ required: true, message: '请选择流程活动', trigger: 'change' }]
}
const serviceItem = ref('') const serviceItem = ref('')
const activeFlag = ref(false) const activeFlag = ref(false)
const type = ref('') const type = ref('')
@ -286,37 +327,115 @@ function activeSearch(data) {
activeList.value = res.data activeList.value = res.data
}) })
} }
const SysTenantData = ref([]) as any const index = ref(0)
function handleSubmit() { function handleSaveActive() {
confirmLoading.value = true activeFormRef.value.validate().then(() => {
console.log(form.value) const arr = []
form.value.statusSkuList.forEach(item => { if (type.value === 'add') {
if (item.isContainsSubs) { form.value.statusSkuList.forEach(item => {
item.isContainsSub = 1 if (item.sortNo === activeForm.value.sortNo) {
arr.push(1)
}
})
} else { } else {
item.isContainsSub = 0 form.value.statusSkuList.forEach(item => {
if (item.sortNo === activeForm.value.sortNo &&
activeForm.value.sortNo !== form.value.statusSkuList[index.value].sortNo) {
arr.push(1)
}
})
} }
}) if (arr.length > 0) {
SysTenantData.value.forEach(item => { createMessage.warning('顺序号不能重复')
if (item.id === form.value.belongTenantId) { return false
form.value.belongTenantName = item.name }
activeList.value.forEach(item => {
if (item.pkId == activeForm.value.pkId) {
activeForm.value.showName = item.showName
}
})
if (type.value === 'add') {
form.value.statusSkuList.push(JSON.parse(JSON.stringify(activeForm.value)))
} else {
form.value.statusSkuList[index.value] = JSON.parse(JSON.stringify(activeForm.value))
} }
activeFlag.value = false
form.value.statusSkuList.sort((a, b) => a.sortNo - b.sortNo)
}) })
workFlowSaveAndEnable(form.value).then((res) => { }
confirmLoading.value = false const SysTenantData = ref([]) as any
if (res.data.succ) { const subActiveFormRef = ref('') as any
if (form.value.pkId) { const emit = defineEmits(['handleSuccess'])
createMessage.success('修改成功') function handleSaveSubActive() {
} else { console.log(123113)
createMessage.success('新增成功') subActiveFormRef.value.validate().then(() => {
const arr = []
if (subType.value === 'add') {
activeForm.value.subList.forEach(item => {
if (item.sortNo === subActiveForm.value.sortNo) {
arr.push(1)
}
})
} else {
activeForm.value.subList.forEach(item => {
if (item.sortNo === subActiveForm.value.sortNo &&
subActiveForm.value.sortNo !== activeForm.value.subList[subIndex.value].sortNo) {
arr.push(1)
}
})
}
if (arr.length > 0) {
createMessage.warning('顺序号不能重复')
return false
}
activeList.value.forEach(item => {
if (item.pkId === subActiveForm.value.pkId) {
subActiveForm.value.showName = item.showName
} }
handleCancel() })
if (subType.value === 'add') {
activeForm.value.subList.push(JSON.parse(JSON.stringify(subActiveForm.value)))
} else { } else {
createMessage.error(res.data.msg) activeForm.value.subList[subIndex.value] = JSON.parse(JSON.stringify(subActiveForm.value))
} }
}).finally((res) => { subActiveFlag.value = false
confirmLoading.value = false activeForm.value.subList.sort((a, b) => a.sortNo - b.sortNo)
})
}
function handleSubmit() {
formRef.value.validate().then(() => {
confirmLoading.value = true
form.value.statusSkuList.forEach(item => {
if (item.isContainsSubs) {
item.isContainsSub = 1
} else {
item.isContainsSub = 0
}
})
SysTenantData.value.forEach(item => {
if (item.id === form.value.belongTenantId) {
form.value.belongTenantName = item.name
}
})
workFlowSaveAndEnable(form.value).then((res) => {
confirmLoading.value = false
if (res.succeeded) {
if (form.value.pkId) {
createMessage.success('修改成功')
} else {
createMessage.success('新增成功')
}
emit('handleSuccess')
handleCancel()
} else {
createMessage.error(res.data.msg)
}
}).finally((res) => {
confirmLoading.value = false
})
}) })
} }
function handlePub() { function handlePub() {
workFlowSetUnPublishRelease([form.value.pkId]).then(res => { workFlowSetUnPublishRelease([form.value.pkId]).then(res => {
@ -331,11 +450,11 @@ function handlePub() {
function handleSaveAddActive() { function handleSaveAddActive() {
addActiveFormRef.value.validate().then(() => { addActiveFormRef.value.validate().then(() => {
SaveWFActivities(addActiveForm.value).then(res => { SaveWFActivities(addActiveForm.value).then(res => {
if (res.data.succ) { if (res.succeeded) {
createMessage.success('添加成功') createMessage.success('添加成功')
addActiveFlag.value = false addActiveFlag.value = false
QueryActivitiesList().then(res => { QueryActivitiesList().then(res => {
activeList.value = res.data.ext activeList.value = res.data
}) })
// this.$refs.addActiveForm.resetFields() // this.$refs.addActiveForm.resetFields()
} }
@ -417,10 +536,10 @@ function handlePushSub() {
subActiveFlag.value = true subActiveFlag.value = true
subType.value = 'add' subType.value = 'add'
} }
function handleEditStatus(item, index) { function handleEditStatus(item, index1) {
const arr = [] const arr = []
activeList.value.forEach(ite => { activeList.value.forEach(ite => {
if (item == item.pkId) { if (item.pkId == ite.pkId) {
arr.push(1) arr.push(1)
} }
}) })
@ -433,9 +552,9 @@ function handleEditStatus(item, index) {
activeForm.value = JSON.parse(JSON.stringify(item)) activeForm.value = JSON.parse(JSON.stringify(item))
type.value = 'edit' type.value = 'edit'
activeFlag.value = true activeFlag.value = true
index.value = index index.value = index1
} }
const subActiveForm = ref({}) const subActiveForm = ref({}) as any
const subIndex = ref(0) const subIndex = ref(0)
function handleEditSub(item, index) { function handleEditSub(item, index) {
subActiveForm.value = JSON.parse(JSON.stringify(item)) subActiveForm.value = JSON.parse(JSON.stringify(item))
@ -443,8 +562,40 @@ function handleEditSub(item, index) {
subActiveFlag.value = true subActiveFlag.value = true
subIndex.value = index subIndex.value = index
} }
function init() { function init(id) {
visible.value = true visible.value = true
if (id) {
getDetail(id)
}
}
function getDetail(id) {
confirmLoading.value = true
GetInfo({ id }).then(res => {
if (res.succeeded) {
if (res.data.statusSkuList) {
res.data.statusSkuList.forEach(item => {
if (item.isContainsSub == 1) {
item.isContainsSubs = true
} else {
item.isContainsSubs = false
}
if (!item.subList) {
item.subList = []
}
if (!item.statusTriggerList) {
item.statusTriggerList = []
}
})
} else {
res.data.statusSkuList = []
}
form.value = res.data
console.log(form.vale)
}
confirmLoading.value = false
}).catch(() => {
confirmLoading.value = false
})
} }
const timeFlag = ref(false) const timeFlag = ref(false)
const timeLoading = ref(false) const timeLoading = ref(false)
@ -453,7 +604,7 @@ function handleTime() {
timeFlag.value = true timeFlag.value = true
timeLoading.value = true timeLoading.value = true
GetShowTimeLine({ pkId: form.value.pkId }).then(res => { GetShowTimeLine({ pkId: form.value.pkId }).then(res => {
if (res.data.succ) { if (res.succeeded) {
timeForm.value = res.data.ext timeForm.value = res.data.ext
} else { } else {
createMessage.error(res.data.msg) createMessage.error(res.data.msg)
@ -586,4 +737,7 @@ function handleCancel() {
.blur { .blur {
margin: 0 20px; margin: 0 20px;
} }
:deep(.ant-form-item){
margin-bottom: 10px;
}
</style> </style>

@ -60,7 +60,7 @@
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
<editForm ref="editFormRef" ></editForm> <editForm @handleSuccess="handleSuccess" ref="editFormRef" ></editForm>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -111,23 +111,17 @@ const [registerTable, { reload, clearSelectedRowKeys, getSelectRows, getRawDataS
}, },
}) })
const editFormRef = ref() const editFormRef = ref()
const [registerForm, { resetFields, setFieldsValue, validate, getFieldsValue, }] = useForm({
labelWidth: 100,
schemas: detailForm,
showActionButtonGroup: false,
})
function GoDetailed(type, row) { function GoDetailed(type, row) {
if (!type) { if (!type) {
editFormRef.value.init() editFormRef.value.init()
} else { } else {
// open.value = true editFormRef.value.init(row.pkId)
// const newRow = JSON.parse(JSON.stringify(row))
// setTimeout(() => {
// setFieldsValue(newRow)
// }, 10)
} }
} }
function handleSuccess(){
reload()
}
const loading = ref(false) const loading = ref(false)
function FnDel() { function FnDel() {

Loading…
Cancel
Save