Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | data: query, |
| | | }) |
| | | } |
| | | // 提交审批 |
| | | export function updateApproveNode(query) { |
| | | return request({ |
| | | url: '/approveNode/updateApproveNode', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | // 删除审批流程 |
| | | export function approveProcessDelete(query) { |
| | | return request({ |
| | |
| | | data: query, |
| | | }) |
| | | } |
| | | // 删除审批流程 |
| | | // 查询审批流程 |
| | | export function approveProcessDetails(query) { |
| | | return request({ |
| | | url: '/approveNode/details', |
| | | url: '/approveNode/details/' + query, |
| | | method: 'get', |
| | | params: query, |
| | | }) |
| | | } |
| | |
| | | })
|
| | | }
|
| | | // 查询用户列表
|
| | | export function userListNoPageByTenantId() {
|
| | | return request({
|
| | | url: '/system/user/userListNoPageByTenantId',
|
| | | method: 'get'
|
| | | })
|
| | | }
|
| | |
|
| | | // 查询用户列表
|
| | | export function userListNoPage() {
|
| | | return request({
|
| | | url: '/system/user/userListNoPage',
|
| | |
| | | this.avatar = avatar
|
| | | this.currentFactoryName = user.currentFactoryName
|
| | | this.nickName = user.nickName
|
| | | this.currentDeptId = user.currentDeptId
|
| | | resolve(res)
|
| | | }).catch(error => {
|
| | | reject(error)
|
| | |
| | | :key="index" |
| | | :type="activity.current ? 'primary' : ''" |
| | | :hollow="activity.current" |
| | | :timestamp="activity.timestamp" |
| | | :timestamp="activity.approveNodeTime" |
| | | > |
| | | <el-card> |
| | | <span style="font-size: 18px;font-weight: 700">{{activity.content}}</span> |
| | | <span style="font-size: 18px;font-weight: 700">节点{{activity.approveNodeOrder}}</span> |
| | | <div style="margin: 10px 0"> |
| | | <span style="font-size: 16px;font-weight: 600">审批人:{{activity.people}}</span> |
| | | <span style="font-size: 16px;font-weight: 600">审批人:{{activity.approveNodeUser}}</span> |
| | | </div> |
| | | <div> |
| | | <span style="margin-bottom: 8px;display: inline-block;font-size: 16px;font-weight: 600">审批意见:</span> |
| | | <el-form-item |
| | | v-if="activity.current" |
| | | :prop="'activities.' + index + '.value'" |
| | | v-if="activity.approveNodeRemark == 1" |
| | | :prop="'activities.' + index + '.approveNodeReason'" |
| | | :rules="[{ required: true, message: '审批意见不能为空', trigger: 'blur' }]" |
| | | > |
| | | <el-input v-model="activity.value" clearable type="textarea" :disabled="operationType === 'view'"></el-input> |
| | | <el-input v-model="activity.approveNodeReason" clearable type="textarea" :disabled="operationType === 'view'"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-else> |
| | | <el-input v-model="activity.value" clearable type="textarea" disabled></el-input> |
| | | <el-input v-model="activity.approveNodeReason" clearable type="textarea" disabled></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-card> |
| | |
| | | </el-form> |
| | | <template #footer v-if="operationType === 'approval'"> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button type="primary" @click="submitForm(2)">不通过</el-button> |
| | | <el-button type="primary" @click="submitForm(1)">通过</el-button> |
| | | <el-button @click="closeDia">取消</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, ref} from "vue"; |
| | | import {approveProcessDetails} from "../../../../api/collaborativeApproval/approvalProcess.js"; |
| | | import {approveProcessDetails, updateApproveNode} from "../../../../api/collaborativeApproval/approvalProcess.js"; |
| | | const emit = defineEmits(['close']) |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref('') |
| | | const activities = ref([ |
| | | { |
| | | content: '节点1', |
| | | timestamp: '', |
| | | type: 'primary', |
| | | hollow: true, |
| | | people: 'admin', |
| | | value: '' |
| | | }, |
| | | { |
| | | content: '节点2', |
| | | timestamp: '', |
| | | type: '', |
| | | hollow: false, |
| | | current: true, |
| | | people: 'admin', |
| | | value: '' |
| | | }, |
| | | ]) |
| | | const activities = ref([]) |
| | | const formRef = ref(null); |
| | | |
| | | // 打开弹框 |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | approveProcessDetails({id: row.approveId}).then((res) => { |
| | | approveProcessDetails(row.approveId).then((res) => { |
| | | console.log(res) |
| | | activities.value = res.data |
| | | }) |
| | | } |
| | | // 提交审批 |
| | | const submitForm = () => { |
| | | formRef.value.validate(valid => { |
| | | if (valid) { |
| | | // 校验通过后的逻辑 |
| | | } |
| | | }) |
| | | const submitForm = (status) => { |
| | | const filteredActivities = activities.value.filter(activity => activity.approveNodeRemark == 1); |
| | | filteredActivities[0].approveNodeStatus = status |
| | | updateApproveNode(filteredActivities[0]).then(() => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | // 关闭弹框 |
| | | const closeDia = () => { |
| | |
| | | <el-col :span="24"> |
| | | <el-form-item label="申请部门:" prop="approveDeptId"> |
| | | <el-select |
| | | disabled |
| | | v-model="form.approveDeptId" |
| | | placeholder="选择部门" |
| | | > |
| | |
| | | approveProcessUpdate, |
| | | getDept |
| | | } from "../../../../api/collaborativeApproval/approvalProcess.js"; |
| | | import {userListNoPage} from "../../../../api/system/user.js"; |
| | | import {userListNoPage, getUserProfile} from "../../../../api/system/user.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | import useUserStore from "@/store/modules/user"; |
| | |
| | | console.log(userStore) |
| | | form.value.approveUser = userStore.id; |
| | | form.value.approveTime = getCurrentDate(); |
| | | |
| | | // 获取当前用户信息并设置部门ID |
| | | form.value.approveDeptId = userStore.currentDeptId |
| | | if (operationType.value === 'edit') { |
| | | approveProcessGetInfo({id: row.approveId,approveReason: '1'}).then(res => { |
| | | form.value = {...res.data} |
| | | // 反显审批人 |
| | | // if (res.data && res.data.approverIds) { |
| | | // const nameArr = res.data.approverIds.split(',') |
| | | // approverNodes.value = nameArr.map((name, idx) => { |
| | | // const user = userList.value.find(u => u.name === name) |
| | | // return { id: idx + 1, userId: user ? user.id : null } |
| | | // }) |
| | | // nextApproverId = nameArr.length + 1 |
| | | // } else if (row.approverList && Array.isArray(row.approverList) && row.approverList.length > 0) { |
| | | // approverNodes.value = row.approverList.map((userId, idx) => ({ id: idx + 1, userId })) |
| | | // nextApproverId = row.approverList.length + 1 |
| | | // } else { |
| | | // approverNodes.value = [{ id: 1, userId: null }] |
| | | // nextApproverId = 2 |
| | | // } |
| | | if (res.data && res.data.approveUserIds) { |
| | | const userIds = res.data.approveUserIds.split(',') |
| | | approverNodes.value = userIds.map((userId, idx) => ({ |
| | | id: idx + 1, |
| | | userId: parseInt(userId.trim()) |
| | | })) |
| | | nextApproverId = userIds.length + 1 |
| | | } else { |
| | | approverNodes.value = [{ id: 1, userId: null }] |
| | | nextApproverId = 2 |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | // 提交产品表单 |
| | | const submitForm = () => { |
| | | // 收集所有节点的审批人id |
| | | form.value.approverIds = approverNodes.value.map(node => node.userId).join(',') |
| | | form.value.approveUserIds = approverNodes.value.map(node => node.userId).join(',') |
| | | // 审批人必填校验 |
| | | const hasEmptyApprover = approverNodes.value.some(node => !node.userId) |
| | | if (hasEmptyApprover) { |
| | |
| | | { |
| | | label: "申请部门", |
| | | prop: "approveDeptName", |
| | | width: 220 |
| | | }, |
| | | { |
| | | label: "审批事由", |
| | |
| | | }, |
| | | { |
| | | label: "申请人", |
| | | prop: "approveUser", |
| | | prop: "approveUserName", |
| | | }, |
| | | { |
| | | label: "申请日期", |
| | |
| | | }, |
| | | { |
| | | label: "当前审批人", |
| | | prop: "checkCompany", |
| | | prop: "approveUserCurrentName", |
| | | width: 120 |
| | | }, |
| | | { |
| | |
| | | import { ref } from 'vue' |
| | | import { ElMessageBox } from "element-plus"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import { userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import { |
| | | getStockInPage |
| | | } from "@/api/inventoryManagement/stockIn.js"; |
| | |
| | | console.log('form',form.value) |
| | | // 加载用户列表 |
| | | try { |
| | | const userLists = await userListNoPage() |
| | | const userLists = await userListNoPageByTenantId() |
| | | userList.value = userLists.data |
| | | } catch (error) { |
| | | console.error('加载用户列表失败:', error) |
| | |
| | | import { ref } from 'vue' |
| | | import { ElMessageBox } from "element-plus"; |
| | | import useUserStore from '@/store/modules/user' |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import { userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import { productTreeList,modelList } from "@/api/basicData/product.js" |
| | | import { |
| | | getStockManagePage , |
| | |
| | | operationType.value = type |
| | | form.value = {} |
| | | productData.value = [] |
| | | let userLists = await userListNoPage() |
| | | let userLists = await userListNoPageByTenantId() |
| | | userList.value = userLists.data |
| | | // customerList().then(res => { |
| | | // customerOption.value = res |
| | |
| | | :column="columns" |
| | | :tableData="dataList" |
| | | :tableLoading="loading" |
| | | height="auto" |
| | | > |
| | | </PIMTable> |
| | | </template> |
| | |
| | | <script setup> |
| | | import { usePaginationApi } from "@/hooks/usePaginationApi"; |
| | | import { productList } from "@/api/procurementManagement/procurementLedger.js"; |
| | | import { nextTick } from "vue"; |
| | | |
| | | defineOptions({ |
| | | name: "来票登记折叠表", |
| | |
| | | } |
| | | ); |
| | | |
| | | const getList = (id) => { |
| | | const getList = async (id) => { |
| | | await nextTick(); |
| | | filters.salesLedgerId = id; |
| | | getTableData(); |
| | | }; |
| | |
| | | const handleDelete = () => {}; |
| | | |
| | | const expandChange = async (row, expandedRows) => { |
| | | await nextTick(); |
| | | expandTableRef.value.getList(row.id); |
| | | if (expandedRows.length > 0) { |
| | | await nextTick(); |
| | | expandTableRef.value.getList(row.id); |
| | | } |
| | | }; |
| | | |
| | | const changePage = ({ page }) => { |
| | |
| | | return; |
| | | } |
| | | let tempFileIds = []; |
| | | if (fileList.value.length > 0) { |
| | | if (fileList.value !== null && fileList.value.length > 0) { |
| | | tempFileIds = fileList.value.map((item) => item.tempId); |
| | | } |
| | | form.value.tempFileIds = tempFileIds; |
| | |
| | | }; |
| | | const submitProductEdit = () => { |
| | | productForm.value.salesLedgerId = currentId.value; |
| | | productForm.value.type = 1 |
| | | addOrUpdateSalesLedgerProduct(productForm.value).then((res) => { |
| | | proxy.$modal.msgSuccess("提交成功"); |
| | | closeProductDia(); |