Merge branch 'master' of https://codeup.aliyun.com/bsdtec/biz-pc-cloud
This commit is contained in:
commit
ba579b5de7
13 files changed
+238
-132
No files matched your search
@@ -39,26 +39,38 @@
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="name" label="商品名称" show-overflow-tooltip/>
|
||||
<el-table-column prop="unit" label="商品单位" show-overflow-tooltip/>
|
||||
<el-table-column prop="purchasePrice" label="进价" show-overflow-tooltip/>
|
||||
<el-table-column prop="baseStock" label="期初库存" show-overflow-tooltip/>
|
||||
<el-table-column prop="currentStock" label="总库存" show-overflow-tooltip/>
|
||||
<el-table-column prop="inventoryLowerLimit" label="库存下限" show-overflow-tooltip/>
|
||||
<el-table-column prop="inventoryUpperLimit" label="库存上限" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'canteen_canteenErpMaterial_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)">编辑</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'canteen_canteenErpMaterial_del'" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="name" label="商品名称" show-overflow-tooltip />
|
||||
<el-table-column prop="unit" label="商品单位" show-overflow-tooltip />
|
||||
<el-table-column prop="purchasePrice" label="进价" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ displayPrice(row.purchasePrice, "") }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="baseStock" label="期初库存" show-overflow-tooltip />
|
||||
<el-table-column prop="currentStock" label="总库存" show-overflow-tooltip />
|
||||
<el-table-column prop="inventoryLowerLimit" label="库存下限" show-overflow-tooltip />
|
||||
<el-table-column prop="inventoryUpperLimit" label="库存上限" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'canteen_canteenErpMaterial_edit'"
|
||||
@click="formDialogRef.openDialog(scope.row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'canteen_canteenErpMaterial_del'" @click="handleDelete([scope.row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
@@ -73,7 +85,6 @@ import { displayPrice } from "/@/utils/formatMoney"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
|
||||
@@ -250,6 +250,7 @@ const tableFormItems = () =>
|
||||
totalAmount: storePrice((Number(item.quantity || 0) * Number(item.realPrice || 0)).toFixed(2)),
|
||||
stock: item.stock,
|
||||
remark: item.remark,
|
||||
orderType: baseForm.orderType,
|
||||
}))
|
||||
|
||||
// 提交数据 成功返回 true 失败返回 false
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
<!-- <el-table-column prop="checkStatus" label="审批状态" show-overflow-tooltip /> -->
|
||||
<!-- <el-table-column prop="checkUserId" label="审批人id" show-overflow-tooltip /> -->
|
||||
<!-- <el-table-column prop="checkTime" label="审核日期" show-overflow-tooltip /> -->
|
||||
<el-table-column prop="supplierId" label="货商" show-overflow-tooltip />
|
||||
<el-table-column prop="supplierId" label="货商" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ supplierSelect?.find((item: any) => item.supplierId == row.supplierId)?.supplierName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="totalAmount" label="入库总金额" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ displayPrice(row.totalAmount) }}</template>
|
||||
@@ -116,6 +118,8 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { fetchList, delObjs } from "/@/api/canteen/canteenInventoryRecords"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
import { canteenSupplierSelect } from "/@/api/canteen/canteenSupplier"
|
||||
import { getSimpleUserAll } from "/@/api/admin/user"
|
||||
|
||||
const CtForm = defineAsyncComponent(() => import("./form.vue"))
|
||||
|
||||
@@ -130,6 +134,8 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
},
|
||||
pageList: fetchList,
|
||||
})
|
||||
const supplierSelect = ref<any>([])
|
||||
// const handleUserSelect = ref<any>([])
|
||||
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
@@ -169,4 +175,21 @@ const handleDelete = async (ids: string[]) => {
|
||||
useMessage().error(err.msg)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
// 获取经办人
|
||||
try {
|
||||
const { data } = await canteenSupplierSelect()
|
||||
supplierSelect.value = data ? data : []
|
||||
} catch (error) {
|
||||
supplierSelect.value = []
|
||||
}
|
||||
// 获取货商
|
||||
// try {
|
||||
// const { data } = await getSimpleUserAll()
|
||||
// handleUserSelect.value = data ?? []
|
||||
// } catch (error) {
|
||||
// handleUserSelect.value = []
|
||||
// }
|
||||
})
|
||||
</script>
|
||||
@@ -389,6 +389,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: Number(unit?.purchasePrice || 0) * item.quantity,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
@@ -399,6 +400,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -394,6 +394,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: Number(unit?.purchasePrice || 0) * item.quantity,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
@@ -404,6 +405,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -420,6 +420,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: storePrice(Number(unitObj?.realPrice || 0) * item.quantity),
|
||||
remark: item.remark,
|
||||
unitId: unitObj.id,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
@@ -431,6 +432,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: item?.realPrice && item.quantity ? storePrice(Number(item.realPrice) * item.quantity) : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -314,6 +314,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: Number(unit?.purchasePrice || 0) * item.quantity,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -435,6 +435,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: unit?.purchasePrice && item.quantity ? Number(unit.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
@@ -445,6 +446,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -427,6 +427,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: unit?.purchasePrice && item.quantity ? Number(unit.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
@@ -437,6 +438,7 @@ const cgPlanSpuItems = computed(() => {
|
||||
totalAmount: item?.purchasePrice && item.quantity ? Number(item.purchasePrice) * item.quantity : 0,
|
||||
remark: item.remark,
|
||||
unitId: item.unitId,
|
||||
orderType: baseDataForm.orderType,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="username" label="申请人" />
|
||||
<el-table-column prop="deptName" label="部门" />
|
||||
<el-table-column prop="applyStartTime" label="申请使用时间">
|
||||
<el-table-column prop="applyStartTime" width="200" label="申请使用时间">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.applyStartTime }}</span>
|
||||
<span class="mx-1">-</span>
|
||||
@@ -68,13 +68,17 @@
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
|
||||
<el-button v-if="row.processStatus == 2" icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletForeign_del'" @click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
<div class="flex">
|
||||
<el-button v-if="row.processStatus == 1 && row.isCheckUser" icon="VideoPlay" text type="primary" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button v-if="row.processStatus == 2" icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'wallet_walletForeign_del'" @click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -84,6 +88,8 @@
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
<code-use-table ref="codeUseTableRef" />
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -93,6 +99,8 @@ import { fetchList, pageJoin, delObjs } from "/@/api/wallet/wallet-foreign"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
const CodeUseTable = defineAsyncComponent(() => import("../components/code-use-table.vue"))
|
||||
@@ -101,6 +109,7 @@ const { check_status } = useDict("check_status")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const codeUseTableRef = ref()
|
||||
const processDrawerRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@@ -142,6 +151,17 @@ const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 审批提交事件
|
||||
const taskSubmitEvent = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击开始处理
|
||||
const deal = (row: any) => {
|
||||
if (!row.processId) return useMessage().warning("流程id不存在")
|
||||
processDrawerRef.value.openProcessDrawer(row)
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
|
||||
@@ -1,116 +1,116 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" width="40%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="用户" prop="userId">
|
||||
<select-user v-model="form.userId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-dialog :title="form.id ? '编辑' : '新增'" width="40%" v-model="visible" :close-on-click-modal="false" draggable>
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px" v-loading="loading">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="用户" prop="userId">
|
||||
<select-user v-model="form.userId" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="钱包类型" prop="walletTypeId">
|
||||
<select-wallet-type v-model="form.walletTypeId" placeholder="钱包类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="钱包类型" prop="walletTypeId">
|
||||
<select-wallet-type v-model="form.walletTypeId" autoFirst disabled :apiParams="{ uniqueCode: '1' }" placeholder="钱包类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" :autosize="{ minRows: 6 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" :autosize="{ minRows: 6 }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit" :disabled="loading">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="WalletFreezeDialog">
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import { getObj, addObj, putObj } from '/@/api/wallet/wallet-freeze'
|
||||
import { rule } from '/@/utils/validate';
|
||||
const emit = defineEmits(['refresh']);
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { getObj, addObj, putObj } from "/@/api/wallet/wallet-freeze"
|
||||
import { rule } from "/@/utils/validate"
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
// 定义变量内容
|
||||
const dataFormRef = ref();
|
||||
const dataFormRef = ref()
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
id: '',
|
||||
walletId: '',
|
||||
walletTypeId: '',
|
||||
userId: '',
|
||||
freeStatus: '',
|
||||
remark: '',
|
||||
});
|
||||
id: "",
|
||||
walletId: "",
|
||||
walletTypeId: "",
|
||||
userId: "",
|
||||
freeStatus: "",
|
||||
remark: "",
|
||||
})
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
walletId: [{ required: true, message: '钱包id不能为空', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '用户id不能为空', trigger: 'blur' }],
|
||||
status: [{ required: true, message: '审核状态不能为空', trigger: 'blur' }],
|
||||
walletTypeId: [{ required: true, message: '请选择钱包类型', trigger: 'change' }]
|
||||
walletId: [{ required: true, message: "钱包id不能为空", trigger: "blur" }],
|
||||
userId: [{ required: true, message: "用户id不能为空", trigger: "blur" }],
|
||||
status: [{ required: true, message: "审核状态不能为空", trigger: "blur" }],
|
||||
walletTypeId: [{ required: true, message: "请选择钱包类型", trigger: "change" }],
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
const openDialog = (id: string) => {
|
||||
visible.value = true
|
||||
form.id = ''
|
||||
visible.value = true
|
||||
form.id = ""
|
||||
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields();
|
||||
});
|
||||
// 重置表单数据
|
||||
nextTick(() => {
|
||||
dataFormRef.value?.resetFields()
|
||||
})
|
||||
|
||||
// 获取walletFreeze信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
getwalletFreezeData(id)
|
||||
}
|
||||
};
|
||||
// 获取walletFreeze信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
getwalletFreezeData(id)
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
const onSubmit = async () => {
|
||||
const valid = await dataFormRef.value.validate().catch(() => { });
|
||||
if (!valid) return false;
|
||||
|
||||
try {
|
||||
loading.value = true;
|
||||
form.id ? await putObj(form) : await addObj(form);
|
||||
useMessage().success(form.id ? '修改成功' : '添加成功');
|
||||
visible.value = false;
|
||||
emit('refresh');
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
};
|
||||
const valid = await dataFormRef.value.validate().catch(() => {})
|
||||
if (!valid) return false
|
||||
|
||||
try {
|
||||
loading.value = true
|
||||
form.id ? await putObj(form) : await addObj(form)
|
||||
useMessage().success(form.id ? "修改成功" : "添加成功")
|
||||
visible.value = false
|
||||
emit("refresh")
|
||||
} catch (err: any) {
|
||||
useMessage().error(err.msg)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 初始化表单数据
|
||||
const getwalletFreezeData = (id: string) => {
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
getObj(id).then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
}).finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
};
|
||||
// 获取数据
|
||||
loading.value = true
|
||||
getObj(id)
|
||||
.then((res: any) => {
|
||||
Object.assign(form, res.data)
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
// 暴露变量
|
||||
defineExpose({
|
||||
openDialog
|
||||
});
|
||||
</script>
|
||||
openDialog,
|
||||
})
|
||||
</script>
|
||||
@@ -69,7 +69,9 @@
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
|
||||
<el-button v-if="row.processStatus == 1 && row.isCheckUser" icon="VideoPlay" text type="primary" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
@@ -77,8 +79,9 @@
|
||||
type="primary"
|
||||
v-auth="'wallet_walletFreeze_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'wallet_walletFreeze_del'" @click="handleDelete([row.id])">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -88,6 +91,8 @@
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -96,6 +101,9 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { delObjs, pageJoin } from "/@/api/wallet/wallet-freeze"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
// 引入组件
|
||||
@@ -104,6 +112,7 @@ const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
const { check_status, yes_no_type } = useDict("check_status", "yes_no_type")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const processDrawerRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@@ -143,6 +152,17 @@ const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 审批提交事件
|
||||
const taskSubmitEvent = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击开始处理
|
||||
const deal = (row: any) => {
|
||||
if (!row.processId) return useMessage().warning("流程id不存在")
|
||||
processDrawerRef.value.openProcessDrawer(row)
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
|
||||
@@ -61,31 +61,37 @@
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'admin_walletStride_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'admin_walletStride_del'" @click="handleDelete([row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button icon="Promotion" text type="primary" @click="doInfo(row)"> 查看审批 </el-button>
|
||||
<el-button v-if="row.processStatus == 2" icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
<div class="flex">
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="edit-pen"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'admin_walletStride_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="false" icon="delete" text type="primary" v-auth="'admin_walletStride_del'" @click="handleDelete([row.id])">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-if="row.processStatus == 1 && row.isCheckUser" icon="VideoPlay" text type="primary" @click="deal(row)">
|
||||
开始处理
|
||||
</el-button>
|
||||
<el-button v-if="row.processStatus == 2" icon="InfoFilled" text type="primary" @click="codeUseTableRef.openDialog(row.id)">
|
||||
使用情况
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
<code-use-table ref="codeUseTableRef" />
|
||||
<!-- 审批抽屉 -->
|
||||
<process-drawer ref="processDrawerRef" @task-submit-event="taskSubmitEvent" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -95,6 +101,8 @@ import { fetchList, delObjs, pageJoin } from "/@/api/wallet/wallet-stride"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
|
||||
const { push } = useRouter()
|
||||
|
||||
// 引入组件
|
||||
@@ -105,6 +113,7 @@ const { check_status, yes_no_type } = useDict("check_status", "yes_no_type")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
const codeUseTableRef = ref()
|
||||
const processDrawerRef = ref()
|
||||
// 搜索变量
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
@@ -144,6 +153,17 @@ const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
// 审批提交事件
|
||||
const taskSubmitEvent = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
// 点击开始处理
|
||||
const deal = (row: any) => {
|
||||
if (!row.processId) return useMessage().warning("流程id不存在")
|
||||
processDrawerRef.value.openProcessDrawer(row)
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user