Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7a525815e2
17 files changed
+220
-161
No files matched your search
@@ -1,81 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { completeTask } from '/@/api/flow/task'
|
||||
import type { FlowFormItem, TaskData, TaskSubmitParam } from './types'
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const submitDesc = ref('')
|
||||
const currentData = ref<TaskData>()
|
||||
const currentOpenFlowForm = ref<FlowFormItem[]>()
|
||||
|
||||
const handle = (row: TaskData, formData: FlowFormItem[]) => {
|
||||
submitDesc.value = ''
|
||||
currentData.value = row
|
||||
currentOpenFlowForm.value = formData
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
defineExpose({ handle })
|
||||
const emit = defineEmits<{
|
||||
(e: 'taskSubmitEvent'): void
|
||||
}>()
|
||||
|
||||
const submit = async () => {
|
||||
if (!currentData.value || !currentOpenFlowForm.value) return
|
||||
|
||||
const formData: Record<string, any> = {}
|
||||
|
||||
for (const item of currentOpenFlowForm.value) {
|
||||
formData[item.id] = item.props.value
|
||||
|
||||
if (item.type === 'Layout') {
|
||||
const subList = item.props.value as FlowFormItem[][]
|
||||
const processedData = subList.map(array =>
|
||||
array.reduce((acc, subItem) => ({
|
||||
...acc,
|
||||
[subItem.id]: subItem.props.value
|
||||
}), {})
|
||||
)
|
||||
formData[item.id] = processedData
|
||||
}
|
||||
}
|
||||
|
||||
formData[`${currentData.value.nodeId}_approve_condition`] = true
|
||||
|
||||
const param: TaskSubmitParam = {
|
||||
paramMap: formData,
|
||||
taskId: currentData.value.taskId,
|
||||
taskLocalParamMap: {
|
||||
approveDesc: submitDesc.value,
|
||||
},
|
||||
}
|
||||
|
||||
try {
|
||||
await completeTask(param)
|
||||
dialogVisible.value = false
|
||||
emit('taskSubmitEvent')
|
||||
} catch (error) {
|
||||
console.error('Failed to complete task:', error)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dialogVisible" title="提交审核" :width="400" class="rounded-lg shadow-xl">
|
||||
<div class="p-4 space-y-4">
|
||||
<el-input v-model="submitDesc" type="textarea" maxlength="100" :rows="5" placeholder="请输入审核意见..."
|
||||
show-word-limit class="w-full transition-all duration-300 focus:ring-2 focus:ring-primary" />
|
||||
|
||||
<div class="flex justify-end pt-4 space-x-3">
|
||||
<el-button @click="dialogVisible = false" class="hover:bg-gray-100 dark:hover:bg-gray-700">
|
||||
取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="submit" class="bg-primary hover:bg-primary-focus">
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,77 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import {defineExpose} from 'vue';
|
||||
import {completeTask} from '/@/api/flow/task';
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
|
||||
const submitDesc = ref('');
|
||||
|
||||
const currentData = ref();
|
||||
const currentProcessInstanceId = ref('')
|
||||
const currentOpenFlowForm = ref();
|
||||
|
||||
const handle = (row, formData) => {
|
||||
submitDesc.value = '';
|
||||
currentProcessInstanceId.value = row.processInstanceId;
|
||||
currentData.value = row;
|
||||
currentOpenFlowForm.value = formData;
|
||||
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
defineExpose({ handle });
|
||||
const emit = defineEmits(['taskSubmitEvent']);
|
||||
|
||||
const submit = () => {
|
||||
let value = currentOpenFlowForm.value;
|
||||
|
||||
var formData = {};
|
||||
for (var item of value) {
|
||||
formData[item.id] = item.props.value;
|
||||
|
||||
if (item.type === 'Layout') {
|
||||
let subList = item.props.value;
|
||||
|
||||
var d = [];
|
||||
for (var array of subList) {
|
||||
var v = {};
|
||||
|
||||
for (var subItem of array) {
|
||||
v[subItem.id] = subItem.props.value;
|
||||
}
|
||||
d.push(v);
|
||||
}
|
||||
formData[item.id] = d;
|
||||
}
|
||||
}
|
||||
|
||||
formData[currentData.value.nodeId + '_approve_condition'] = false;
|
||||
|
||||
const param = {
|
||||
paramMap: formData,
|
||||
taskId: currentData.value.taskId,
|
||||
taskLocalParamMap: {
|
||||
approveDesc: '拒绝原因:' + submitDesc.value,
|
||||
},
|
||||
};
|
||||
|
||||
completeTask(param).then((res) => {
|
||||
dialogVisible.value = false;
|
||||
emit('taskSubmitEvent');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dialogVisible" title="拒绝审核" width="400px">
|
||||
<el-input v-model="submitDesc" type="textarea" maxlength="100" :rows="5" placeholder="审核意见" show-word-limit />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit"> 确定 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,129 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { defineExpose, ref } from 'vue';
|
||||
import { transferTask } from '/@/api/flow/task';
|
||||
import selectShow from '/@/components/OrgSelector/index.vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
interface FlowFormItem {
|
||||
id: string;
|
||||
type: string;
|
||||
props: {
|
||||
value: any;
|
||||
label?: string;
|
||||
};
|
||||
}
|
||||
|
||||
interface TaskData {
|
||||
taskId: string;
|
||||
nodeId: string;
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false);
|
||||
const submitDesc = ref('');
|
||||
const userList = ref<Array<{ id: string }>>([]);
|
||||
const currentData = ref<TaskData>();
|
||||
const currentOpenFlowForm = ref<FlowFormItem[]>();
|
||||
|
||||
const handle = (row: TaskData, formData: FlowFormItem[]) => {
|
||||
submitDesc.value = '';
|
||||
currentData.value = row;
|
||||
currentOpenFlowForm.value = formData;
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
defineExpose({ handle });
|
||||
const emit = defineEmits(['taskSubmitEvent']);
|
||||
|
||||
const validateForm = (): boolean => {
|
||||
if (userList.value.length === 0) {
|
||||
ElMessage.warning('请选择转办人员');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!submitDesc.value.trim()) {
|
||||
ElMessage.warning('请输入审核意见');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (submitDesc.value.trim().length < 2) {
|
||||
ElMessage.warning('审核意见至少需要2个字符');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const submit = async () => {
|
||||
if (!currentOpenFlowForm.value || !currentData.value) return;
|
||||
|
||||
// 表单校验
|
||||
if (!validateForm()) return;
|
||||
|
||||
try {
|
||||
const formData: Record<string, any> = {};
|
||||
|
||||
for (const item of currentOpenFlowForm.value) {
|
||||
formData[item.id] = item.props.value;
|
||||
|
||||
if (item.type === 'Layout') {
|
||||
const subList = item.props.value as Array<FlowFormItem[]>;
|
||||
const d = subList.map((array) => {
|
||||
const v: Record<string, any> = {};
|
||||
for (const subItem of array) {
|
||||
v[subItem.id] = subItem.props.value;
|
||||
}
|
||||
return v;
|
||||
});
|
||||
formData[item.id] = d;
|
||||
}
|
||||
}
|
||||
|
||||
formData[`${currentData.value.nodeId}_approve_condition`] = true;
|
||||
|
||||
const param = {
|
||||
paramMap: formData,
|
||||
taskId: currentData.value.taskId,
|
||||
targetUserIdList: userList.value.map((user) => user.id),
|
||||
taskLocalParamMap: {
|
||||
approveDesc: submitDesc.value.trim(),
|
||||
},
|
||||
};
|
||||
|
||||
await transferTask(param);
|
||||
ElMessage.success('转办成功');
|
||||
dialogVisible.value = false;
|
||||
emit('taskSubmitEvent');
|
||||
} catch (error) {
|
||||
ElMessage.error('转办失败,请重试');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-model="dialogVisible" width="400px" :close-on-click-modal="false" :close-on-press-escape="false" class="transfer-dialog">
|
||||
<div class="space-y-4">
|
||||
<div class="w-full">
|
||||
<label class="block pb-2">
|
||||
<span class="text-base font-medium after:content-['*'] after:text-red-500 after:ml-1"> 选择转办人员 </span>
|
||||
</label>
|
||||
<select-show v-model:orgList="userList" type="user" :multiple="true"></select-show>
|
||||
</div>
|
||||
|
||||
<div class="w-full">
|
||||
<label class="block pb-2">
|
||||
<span class="text-base font-medium after:content-['*'] after:text-red-500 after:ml-1"> 审核意见 </span>
|
||||
</label>
|
||||
<el-input v-model="submitDesc" type="textarea" maxlength="100" :rows="5" placeholder="请输入审核意见(2-100字)" show-word-limit />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="flex justify-end gap-2">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,22 +0,0 @@
|
||||
// First let's create types for our form data
|
||||
export interface FlowFormItem {
|
||||
id: string
|
||||
type: string
|
||||
props: {
|
||||
value: any
|
||||
[key: string]: any
|
||||
}
|
||||
}
|
||||
|
||||
export interface TaskData {
|
||||
taskId: string
|
||||
nodeId: string
|
||||
}
|
||||
|
||||
export interface TaskSubmitParam {
|
||||
paramMap: Record<string, any>
|
||||
taskId: string
|
||||
taskLocalParamMap: {
|
||||
approveDesc: string
|
||||
}
|
||||
}
|
||||
@@ -52,73 +52,35 @@
|
||||
<el-table-column label="任务时间" prop="taskCreateTime" />
|
||||
<el-table-column fixed="right" label="操作" width="200">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(scope.row)"> 开始处理 </el-button>
|
||||
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(scope.row)">开始处理</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination @current-change="currentChangeHandle" @size-change="sizeChangeHandle" v-bind="state.pagination"></pagination>
|
||||
|
||||
<!--右侧抽屉-->
|
||||
<el-drawer v-model="rightDrawerVisible" direction="rtl" size="400px">
|
||||
<template #header>
|
||||
<h3>{{ currentData?.processName }}</h3>
|
||||
</template>
|
||||
<template #default>
|
||||
<el-card class="box-card">
|
||||
<form-render
|
||||
@addLayoutOneItem="addLayoutOneItem"
|
||||
@deleteLayoutOneItem="deleteLayoutOneItem"
|
||||
ref="formRenderRef"
|
||||
:form-list="currentOpenFlowForm"
|
||||
></form-render>
|
||||
</el-card>
|
||||
<flow-node-format
|
||||
:disableSelect="true"
|
||||
:formData="formValue"
|
||||
:task-id="currentData.taskId"
|
||||
:processInstanceId="currentData.processInstanceId"
|
||||
:flow-id="currentData.flowId"
|
||||
ref="flowNodeFormatRef"
|
||||
class="mt-4"
|
||||
/>
|
||||
</template>
|
||||
<template #footer>
|
||||
<div style="flex: auto">
|
||||
<el-button size="large" type="danger" icon="Close" @click="refuseTask">拒绝</el-button>
|
||||
<el-button size="large" type="primary" icon="Check" @click="submitTask">提交</el-button>
|
||||
<el-button size="large" type="info" icon="Share" @click="transferTask">转办</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
<!--同意提交处理-->
|
||||
<agree-handle @taskSubmitEvent="taskSubmitEvent" ref="agreeHandler"></agree-handle>
|
||||
|
||||
<!--拒绝审核处理-->
|
||||
<refuse-handle @taskSubmitEvent="taskSubmitEvent" ref="refuseHandler"></refuse-handle>
|
||||
|
||||
<!--转办处理-->
|
||||
<transfer-handle @taskSubmitEvent="taskSubmitEvent" ref="transferHandler"></transfer-handle>
|
||||
<!-- 右侧抽屉 -->
|
||||
<taskDrawer
|
||||
v-model="taskDrawerVisible"
|
||||
:current-data="currentData"
|
||||
:current-open-flow-form="currentOpenFlowForm"
|
||||
@task-submit-event="taskSubmitEvent"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import FormRender from "/@/views/flow/form/render/FormRender.vue"
|
||||
import AgreeHandle from "./handler/agree.vue"
|
||||
import RefuseHandle from "./handler/refuse.vue"
|
||||
import TransferHandle from "./handler/transfer.vue"
|
||||
import FlowNodeFormat from "/@/views/flow/form/tools/FlowNodeFormatData.vue"
|
||||
import other from "/@/utils/other"
|
||||
import { queryMineTask, queryTask } from "/@/api/flow/task"
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import taskDrawer from "/@/components/taskDrawer/index.vue"
|
||||
|
||||
const rightDrawerVisible = ref(false)
|
||||
const taskDrawerVisible = ref(false)
|
||||
const showSearch = ref(true)
|
||||
const loading = ref(false)
|
||||
const queryRef = ref()
|
||||
|
||||
const currentData = ref()
|
||||
const currentOpenFlowForm = ref()
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
pageList: queryMineTask,
|
||||
queryForm: {
|
||||
@@ -137,33 +99,9 @@ const deal = (row: any) => {
|
||||
currentData.value = row
|
||||
queryTask(row.taskId, false).then((res) => {
|
||||
currentOpenFlowForm.value = res.data.formItems
|
||||
rightDrawerVisible.value = true
|
||||
taskDrawerVisible.value = true
|
||||
})
|
||||
}
|
||||
const currentOpenFlowForm = ref()
|
||||
const addLayoutOneItem = (id: Number) => {
|
||||
for (const item of currentOpenFlowForm.value) {
|
||||
if (item.id !== id) {
|
||||
continue
|
||||
}
|
||||
let value = item.props.value
|
||||
let oriForm = item.props.oriForm
|
||||
value.push(other.deepClone(oriForm))
|
||||
item.props.value = value
|
||||
}
|
||||
}
|
||||
const deleteLayoutOneItem = (id, index) => {
|
||||
for (const item of currentOpenFlowForm.value) {
|
||||
if (item.id !== id) {
|
||||
continue
|
||||
}
|
||||
item.props.value.splice(index, 1)
|
||||
}
|
||||
}
|
||||
|
||||
const agreeHandler = ref()
|
||||
const refuseHandler = ref()
|
||||
const transferHandler = ref()
|
||||
|
||||
// 清空搜索条件
|
||||
const resetQuery = () => {
|
||||
@@ -171,37 +109,18 @@ const resetQuery = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 任务提交事件
|
||||
const taskSubmitEvent = () => {
|
||||
rightDrawerVisible.value = false
|
||||
taskDrawerVisible.value = false
|
||||
getDataList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交任务
|
||||
*/
|
||||
const submitTask = () => {
|
||||
agreeHandler.value.handle(currentData.value, currentOpenFlowForm.value)
|
||||
}
|
||||
/**
|
||||
* 拒绝任务
|
||||
*/
|
||||
const refuseTask = () => {
|
||||
refuseHandler.value.handle(currentData.value, currentOpenFlowForm.value)
|
||||
}
|
||||
|
||||
/**
|
||||
* 转办任务
|
||||
*/
|
||||
const transferTask = () => {
|
||||
transferHandler.value.handle(currentData.value, currentOpenFlowForm.value)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDataList()
|
||||
})
|
||||
|
||||
const formValue = computed(() => {
|
||||
const obj = {}
|
||||
const obj: any = {}
|
||||
|
||||
for (var item of currentOpenFlowForm.value) {
|
||||
obj[item.id] = item.props.value
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品轮播图" prop="sliderPicUrls">
|
||||
<upload-img v-model:imageUrl="form.sliderPicUrls"></upload-img>
|
||||
<upload-imgs v-model:imageUrls="form.sliderPicUrls"></upload-imgs>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -29,21 +29,14 @@
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="item.value" v-for="(item, index) in spu_status" border :key="index"
|
||||
>{{ item.label }}
|
||||
</el-radio>
|
||||
<el-radio :label="item.value" v-for="(item, index) in spu_status" border :key="index">{{ item.label }} </el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="赠送积分" prop="giveIntegral">
|
||||
<el-input-number
|
||||
:min="0"
|
||||
:max="1000"
|
||||
v-model="form.giveIntegral"
|
||||
placeholder="请输入赠送积分"
|
||||
></el-input-number>
|
||||
<el-input-number :min="0" :max="1000" v-model="form.giveIntegral" placeholder="请输入赠送积分"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -62,14 +55,7 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 库存商品选择对话框 -->
|
||||
<el-dialog
|
||||
v-model="spuSelectDialogVisible"
|
||||
title="选择商品"
|
||||
width="60%"
|
||||
:close-on-click-modal="false"
|
||||
draggable
|
||||
@close=""
|
||||
>
|
||||
<el-dialog v-model="spuSelectDialogVisible" title="选择商品" width="60%" :close-on-click-modal="false" draggable @close="">
|
||||
<el-row>
|
||||
<el-form :inline="true" @keyup.enter="getDataList">
|
||||
<el-form-item label="商品名称" prop="name">
|
||||
@@ -82,12 +68,7 @@
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="state.loading"
|
||||
:data="state.dataList"
|
||||
@row-click="handleRowClick"
|
||||
:row-style="{ cursor: 'pointer' }"
|
||||
>
|
||||
<el-table v-loading="state.loading" :data="state.dataList" @row-click="handleRowClick" :row-style="{ cursor: 'pointer' }">
|
||||
<el-table-column type="index" label="#" width="50" align="center" />
|
||||
<el-table-column prop="productName" label="商品名称" width="100px" align="center" show-overflow-tooltip />
|
||||
<el-table-column prop="brandId" label="商品品牌" width="100px" align="center" show-overflow-tooltip />
|
||||
@@ -178,11 +159,8 @@ const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ""
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
form.erpSpuName = ""
|
||||
})
|
||||
dataFormRef.value?.resetFields()
|
||||
form.erpSpuName = ""
|
||||
|
||||
// 获取smSpu信息
|
||||
if (id) {
|
||||
@@ -228,8 +206,7 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
pageList: getOnlineSpuPage,
|
||||
})
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } =
|
||||
useTable(state)
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
const resetQuery = () => {
|
||||
state.queryForm.productName = ""
|
||||
|
||||
@@ -427,8 +427,8 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.unitPrice ? Number(item.unitPrice) : 0,
|
||||
totalAmount: Number(item.unitPrice || 0) * item.quantity,
|
||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
}
|
||||
|
||||
@@ -431,8 +431,8 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.unitPrice ? Number(item.unitPrice) : 0,
|
||||
totalAmount: Number(item.unitPrice || 0) * item.quantity,
|
||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<el-form-item label="编号" prop="planCode">
|
||||
<el-input v-model="baseDataForm.planCode" readonly style="width: 200px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单据日期" prop="planDate">
|
||||
<el-input v-model="baseDataForm.planDate" readonly style="width: 200px" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -431,8 +431,8 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.unitPrice ? Number(item.unitPrice) : 0,
|
||||
totalAmount: Number(item.unitPrice || 0) * item.quantity,
|
||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
}
|
||||
|
||||
@@ -469,8 +469,8 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.unitPrice ? Number(item.unitPrice) : 0,
|
||||
totalAmount: item.unitPrice ? Number(item.unitPrice) * item.quantity : 0,
|
||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
}
|
||||
|
||||
@@ -469,8 +469,8 @@ const cgPlanSpuItems = computed(() => {
|
||||
id: item.isNew ? undefined : item.id,
|
||||
erpSpuId: item.erpSpuId,
|
||||
quantity: item.quantity,
|
||||
unitPrice: item.unitPrice ? Number(item.unitPrice) : 0,
|
||||
totalAmount: item.unitPrice ? Number(item.unitPrice) * item.quantity : 0,
|
||||
unitPrice: item.purchasePrice ? Number(item.purchasePrice) : 0,
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
}
|
||||
|
||||
@@ -110,6 +110,9 @@
|
||||
@click="handleDelete([row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" link icon="VideoPlay" @click="deal(row)" v-auth="'wallet_walletRechargeApply_check'">
|
||||
开始处理
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -126,6 +129,14 @@
|
||||
temp-url="/admin/sys-file/local/file/wallet_recharge.xlsx"
|
||||
@refreshDataList="getDataList(false)"
|
||||
/>
|
||||
|
||||
<!-- 右侧抽屉 -->
|
||||
<taskDrawer
|
||||
v-model="taskDrawerVisible"
|
||||
:current-data="currentData"
|
||||
:current-open-flow-form="currentOpenFlowForm"
|
||||
@task-submit-event="taskSubmitEvent"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -135,6 +146,8 @@ import * as walletRechargeApplyApi from "/@/api/wallet/wallet-recharge-apply"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { ElLoading } from "element-plus"
|
||||
import { queryTask } from "/@/api/flow/task"
|
||||
import taskDrawer from "/@/components/taskDrawer/index.vue"
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
@@ -151,6 +164,9 @@ const showSearch = ref(true)
|
||||
// 多选变量
|
||||
const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
const taskDrawerVisible = ref<boolean>()
|
||||
const currentData = ref()
|
||||
const currentOpenFlowForm = ref()
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
@@ -221,4 +237,22 @@ const handleDelete = async (ids: string[]) => {
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击开始处理
|
||||
* @param row
|
||||
*/
|
||||
const deal = (row: any) => {
|
||||
currentData.value = row
|
||||
queryTask(row.processId, false).then((res) => {
|
||||
currentOpenFlowForm.value = res.data.formItems
|
||||
taskDrawerVisible.value = true
|
||||
})
|
||||
}
|
||||
|
||||
// 任务提交事件
|
||||
const taskSubmitEvent = () => {
|
||||
taskDrawerVisible.value = false
|
||||
getDataList()
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user