对比新文件 |
| | |
| | | import request from "/@/utils/request"; |
| | | |
| | | export function claimReturnRecordsApi() { |
| | | return { |
| | | getClaimReturnRecords: (data: {}) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL_OUT + `/equipment/material/record/page/list`, |
| | | method: 'post', |
| | | data |
| | | }); |
| | | }, |
| | | returnGoods: (data: {}) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL_OUT + `/equipment/material/record/revert`, |
| | | method: 'post', |
| | | data |
| | | }); |
| | | }, |
| | | refreshReturnAndNoReturn: (data: {}) => { |
| | | return request({ |
| | | url: import.meta.env.VITE_API_URL_OUT + `/equipment/material/record/queryById`, |
| | | method: 'post', |
| | | data |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | |
| | | padding-right: 10px; |
| | | padding-bottom: 10px; |
| | | } |
| | | .input-box2{ |
| | | width: 200px !important; |
| | | padding-right: 10px; |
| | | } |
| | | .input-add{ |
| | | width: 90% !important; |
| | | } |
| | |
| | | time: number; |
| | | userName: string; |
| | | uid: string; |
| | | depId: string; |
| | | depId: null | number; |
| | | projectId: string; |
| | | dataList: []; |
| | | } |
| | |
| | | roles: [], |
| | | authBtnList: [], |
| | | uid: '', |
| | | depId: '', |
| | | depId: null, |
| | | projectId: '', |
| | | dataList: [] |
| | | } |
| | |
| | | // if(typeof JSON.parse(data) === 'object'){ |
| | | // return JSONbig.parse(data); |
| | | // }; |
| | | return JSONbig.parse(data); |
| | | return JSONbig.parse(data); |
| | | } catch (err) { |
| | | // 转换失败返回一个空对象 |
| | | return data |
对比新文件 |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :title="invalidDealState.title" :close-on-click-modal="false" v-model="invalidDealState.invalidDealDialogVisible" width="30%"> |
| | | <el-form |
| | | :model="invalidDealState.invalidDealForm" |
| | | ref="invalidDealFormRef" |
| | | size="default" |
| | | label-width="150px"> |
| | | <el-row> |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="失效原因:" prop="reason"> |
| | | <el-select class="input-add" v-model="invalidDealState.invalidDealForm.reason" placeholder="失效原因"> |
| | | <el-option |
| | | v-for="item in invalidDealState.reasonList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="备注:" prop="remark"> |
| | | <el-input type="textarea" :rows="3" v-model="invalidDealState.invalidDealForm.remark" placeholder="备注" class="input-add"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="invalidDealState.invalidDealDialogVisible = !invalidDealState.invalidDealDialogVisible" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitInvalidDeal" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { reactive, ref } from 'vue' |
| | | import {InvalidDealStateType, materialType} from '..' |
| | | |
| | | const invalidDealFormRef = ref() |
| | | |
| | | const invalidDealState = reactive<InvalidDealStateType>({ |
| | | title: '', |
| | | invalidDealDialogVisible: false, |
| | | invalidDealForm: { |
| | | id: null, |
| | | reason: null, |
| | | remark: null, |
| | | }, |
| | | reasonList:[ |
| | | {id: 0, name:'完好'}, |
| | | {id: 1, name:'损坏'}, |
| | | {id: 2, name:'丢失'}, |
| | | {id: 3, name:'过期'}, |
| | | {id: 4, name:'其他'} |
| | | ] |
| | | }) |
| | | |
| | | const openInvalidDealDialog = (value: materialType) => { |
| | | invalidDealState.invalidDealDialogVisible = true |
| | | invalidDealState.invalidDealForm.id = value.id |
| | | invalidDealState.invalidDealForm.reason = value.materialStatus |
| | | invalidDealState.invalidDealForm.remark = value.remark |
| | | } |
| | | |
| | | const submitInvalidDeal = () => { |
| | | emit('refreshInvalidDeal',invalidDealState.invalidDealForm) |
| | | invalidDealState.invalidDealDialogVisible = false |
| | | } |
| | | |
| | | const emit = defineEmits(['refreshInvalidDeal']) |
| | | |
| | | defineExpose({ |
| | | openInvalidDealDialog |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="system-add-menu-container"> |
| | | <el-dialog :title="returnAndWatchState.title" :close-on-click-modal="false" v-model="returnAndWatchState.showReturnAndWatchDialog" width="50%"> |
| | | <el-tabs class="active" v-model="returnAndWatchState.activeName"> |
| | | <el-tab-pane label="未归还" name="noReturn"> |
| | | <el-table |
| | | :data="returnAndWatchState.noReturnData" |
| | | border fit highlight-current-row lazy |
| | | :header-cell-style="{ background: '#fafafa' }" |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column v-if="returnAndWatchState.ifShow === true" type="selection" width="55"/> |
| | | <el-table-column prop="materialName" label="物资名称" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="smdId" label="物资编号" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="materialStatus" label="物资状态" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ filterMaterialStatus(scope.row.materialStatus) }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="备注" show-overflow-tooltip align="center"/> |
| | | <el-table-column label="操作" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" v-if="returnAndWatchState.ifShow === true" text type="danger" :icon="Delete" @click="invalidDeal(scope.row)">无效处理</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="padding-top: 20px" align="center"> |
| | | <span> |
| | | <el-button type="primary" v-if="returnAndWatchState.ifShow === true" @click="returnConfirm" v-throttle size="default">归 还</el-button> |
| | | </span> |
| | | </div> |
| | | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="已归还" name="return"> |
| | | <el-table |
| | | :data="returnAndWatchState.returnData" |
| | | border fit highlight-current-row lazy |
| | | :header-cell-style="{ background: '#fafafa' }" |
| | | style="width: 100%"> |
| | | <el-table-column prop="materialName" label="物资名称" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="smdId" label="物资编号" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="materialStatus" label="物资状态" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ filterMaterialStatus(scope.row.materialStatus) }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="备注" show-overflow-tooltip align="center"/> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="无效操作" name="Invalid"> |
| | | <el-table |
| | | :data="returnAndWatchState.invalidData" |
| | | border fit highlight-current-row lazy |
| | | :header-cell-style="{ background: '#fafafa' }" |
| | | style="width: 100%"> |
| | | <el-table-column prop="materialName" label="物资名称" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="smdId" label="物资编号" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="materialStatus" label="物资状态" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <span> |
| | | {{ filterMaterialStatus(scope.row.materialStatus) }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="备注" show-overflow-tooltip align="center"/> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </el-dialog> |
| | | <invalid-deal-dialog ref="invalidDealDialogRef" @refreshInvalidDeal="refreshInvalidDeal"></invalid-deal-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import {computed, nextTick, onMounted, reactive, ref, toRefs, watch} from 'vue' |
| | | import { Edit, Delete, } from '@element-plus/icons-vue'; |
| | | import { |
| | | claimReturnDataType, InvalidDealFormType, |
| | | materialType, |
| | | ReturnAndWatchType |
| | | } from "/@/views/facilityManagement/claimReturnRecords/index"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {claimReturnRecordsApi} from "/@/api/facilityManagement/claimReturnRecords"; |
| | | import InvalidDealDialog from './invalidDealDialog.vue' |
| | | |
| | | const invalidDealDialogRef = ref() |
| | | |
| | | const returnAndWatchState = reactive<ReturnAndWatchType>({ |
| | | title: '', |
| | | ifShow: false, |
| | | goodsClassifyTitle: '', |
| | | showReturnAndWatchDialog: false, |
| | | activeName: 'noReturn', |
| | | goodsClassifyForm: { |
| | | id: null, |
| | | materialClassifyName: '', |
| | | parentId: null, |
| | | }, |
| | | goodsClassifyRules: { |
| | | |
| | | }, |
| | | returnData: [], |
| | | noReturnData: [], |
| | | invalidData: [], |
| | | returnFormList: { |
| | | receiveBaseId: null, |
| | | materialList: [] |
| | | }, |
| | | reasonList:[ |
| | | {id: 0, name:'完好'}, |
| | | {id: 1, name:'损坏'}, |
| | | {id: 2, name:'丢失'}, |
| | | {id: 3, name:'过期'}, |
| | | {id: 4, name:'其他'} |
| | | ] |
| | | }); |
| | | |
| | | const openReturnAndWatchDialog = (title: string, value: claimReturnDataType ) => { |
| | | returnAndWatchState.showReturnAndWatchDialog = true; |
| | | returnAndWatchState.returnFormList.receiveBaseId = value.id; |
| | | if(title === '归还'){ |
| | | returnAndWatchState.ifShow = true; |
| | | returnAndWatchState.title = '归还记录'; |
| | | returnAndWatchState.returnData = value.materialList.filter(item => item.revertStatus === 0); |
| | | returnAndWatchState.noReturnData = JSON.parse(JSON.stringify(value.materialList.filter(item => item.revertStatus === 1))); |
| | | returnAndWatchState.invalidData = value.materialList.filter(item => item.revertStatus !== 0 && item.revertStatus !== 1); |
| | | }else { |
| | | returnAndWatchState.ifShow = false; |
| | | returnAndWatchState.title = '查看物资'; |
| | | returnAndWatchState.returnData = value.materialList.filter(item => item.revertStatus === 0); |
| | | returnAndWatchState.noReturnData = value.materialList.filter(item => item.revertStatus === 1); |
| | | returnAndWatchState.invalidData = value.materialList.filter(item => item.revertStatus !== 0 && item.revertStatus !== 1); |
| | | } |
| | | }; |
| | | |
| | | const returnConfirm = () => { |
| | | if(returnAndWatchState.returnFormList.materialList.length > 0){ |
| | | ElMessageBox.confirm(`此操作将把所选中物资全部归还,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await claimReturnRecordsApi().returnGoods(returnAndWatchState.returnFormList); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '物资归还成功' |
| | | }); |
| | | await refreshReturnTableData() |
| | | emit('refreshReturnData') |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }else{ |
| | | ElMessage({ |
| | | type:'warning', |
| | | message: '请选择要归还的物资' |
| | | }) |
| | | } |
| | | }; |
| | | |
| | | const refreshReturnTableData = async () => { |
| | | let res = await claimReturnRecordsApi().refreshReturnAndNoReturn({id: returnAndWatchState.returnFormList.receiveBaseId}) |
| | | if(res.data.code === '200'){ |
| | | returnAndWatchState.returnData = res.data.data.materialList.filter((item: materialType) => item.revertStatus === 0); |
| | | returnAndWatchState.noReturnData = res.data.data.materialList.filter((item: materialType) => item.revertStatus === 1); |
| | | returnAndWatchState.invalidData = res.data.data.materialList.filter((item: materialType) => item.revertStatus !== 0 && item.revertStatus !== 1); |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | } |
| | | |
| | | const invalidDeal = (value: materialType) => { |
| | | invalidDealDialogRef.value.openInvalidDealDialog(value) |
| | | }; |
| | | |
| | | const refreshInvalidDeal = (value: InvalidDealFormType) => { |
| | | let returnDataNum = returnAndWatchState.noReturnData.findIndex(item => item.id == value.id) |
| | | returnAndWatchState.noReturnData[returnDataNum].materialStatus = value.reason as number |
| | | returnAndWatchState.noReturnData[returnDataNum].remark = value.remark as string |
| | | for(let i in returnAndWatchState.returnFormList.materialList){ |
| | | if(returnAndWatchState.returnFormList.materialList[i].receiveId === value.id){ |
| | | returnAndWatchState.returnFormList.materialList[i] = { |
| | | receiveId: value.id, |
| | | materialStatus: value.reason, |
| | | remark: value.remark, |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const handleSelectionChange = (val: materialType []) => { |
| | | returnAndWatchState.returnFormList.materialList = val.map((item: materialType) => { |
| | | return { |
| | | receiveId: item.id, |
| | | materialStatus: item.materialStatus, |
| | | remark: item.remark, |
| | | } |
| | | }) |
| | | }; |
| | | |
| | | const filterMaterialStatus = (value: number) => { |
| | | return returnAndWatchState.reasonList.find(item => item.id === value)?.name |
| | | } |
| | | |
| | | const emit = defineEmits(['refreshReturnData']); |
| | | |
| | | defineExpose({ |
| | | openReturnAndWatchDialog, |
| | | }); |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /*:deep(.el-overlay .el-overlay-dialog .el-dialog .el-dialog__body) {*/ |
| | | /* padding-bottom: 20px !important;*/ |
| | | /*}*/ |
| | | :deep(.el-table .big-row) { |
| | | font-size: 16px !important; |
| | | font-weight: 700; |
| | | } |
| | | |
| | | </style> |
对比新文件 |
| | |
| | | export interface ClaimReturnRecordsType { |
| | | tableLoading: boolean, |
| | | total: number, |
| | | timeValue: Array<string>, |
| | | claimReturnData: Array<claimReturnDataType> , |
| | | listQuery: { |
| | | pageSize: number, |
| | | pageIndex: number, |
| | | searchParams: { |
| | | materialName: string| null, |
| | | receiveUname: string | null, |
| | | endTime: string | null, |
| | | startTime: string | null, |
| | | } |
| | | }, |
| | | } |
| | | |
| | | export interface ReturnAndWatchType { |
| | | title: string, |
| | | ifShow: Boolean, |
| | | goodsClassifyTitle: string, |
| | | showReturnAndWatchDialog: boolean, |
| | | activeName: string, |
| | | goodsClassifyForm: { |
| | | id: null, |
| | | materialClassifyName: '', |
| | | parentId: null, |
| | | }, |
| | | goodsClassifyRules: { |
| | | |
| | | }, |
| | | returnData: materialType [], |
| | | noReturnData: materialType [], |
| | | invalidData: materialType [], |
| | | returnFormList: { |
| | | receiveBaseId: null | number, |
| | | materialList: returnFormListType [] , |
| | | }, |
| | | reasonList: Type [] |
| | | } |
| | | |
| | | export interface claimReturnDataType { |
| | | id: number, |
| | | materialList: materialType [], |
| | | } |
| | | |
| | | export interface materialType { |
| | | id: number, |
| | | materialStatus: number, |
| | | revertStatus: number, |
| | | remark: string | null, |
| | | } |
| | | |
| | | export interface returnFormListType { |
| | | receiveId: number, |
| | | materialStatus: number | null, |
| | | remark: string | null, |
| | | } |
| | | |
| | | export interface InvalidDealStateType { |
| | | title: string, |
| | | invalidDealDialogVisible: boolean, |
| | | invalidDealForm: InvalidDealFormType, |
| | | reasonList: Type [] |
| | | } |
| | | |
| | | export interface InvalidDealFormType { |
| | | id: number | null, |
| | | reason: number | null, |
| | | remark: string | null, |
| | | } |
| | | |
| | | export interface Type { |
| | | id: number, |
| | | name: string, |
| | | } |
对比新文件 |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <div class="basic-line"> |
| | | <span>领取时间:</span> |
| | | <el-date-picker |
| | | value-format="YYYY-MM-DD" |
| | | v-model="claimReturnRecordsState.timeValue" |
| | | type="daterange" |
| | | range-separator="To" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | /> |
| | | </div> |
| | | <!-- <div class="basic-line">--> |
| | | <!-- <span>领取人:</span>--> |
| | | <!-- <el-input class="input-box2" v-model="claimReturnRecordsState.listQuery.searchParams.materialName" placeholder="领取人" clearable> </el-input>--> |
| | | <!-- </div>--> |
| | | <div> |
| | | <el-button size="large" type="primary" class="ml10" v-throttle @click="initClaimReturnData"> |
| | | <el-icon> |
| | | <ele-Search /> |
| | | </el-icon> |
| | | 查询 |
| | | </el-button> |
| | | </div> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-table element-loading-text="Loading..." v-loading="claimReturnRecordsState.tableLoading" :data="claimReturnRecordsState.claimReturnData" style="width: 100%" height="calc(100% - 100px)" :header-cell-style="{ background: '#fafafa' }"> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="createTime" label="物资领取时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="receiveUname" label="领取人" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="materialName" label="物资" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="receiveCount" label="领取数量" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="revertCount" label="已归还数量" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="statusName" label="归还情况" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.status === 0 ? 'danger' : scope.row.status === 1 ? 'warning' : scope.row.status === 2 ? 'success' : ''"> |
| | | <span> |
| | | {{ scope.row.statusName }} |
| | | </span> |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="250" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="success" @click="onOpenReturnGoodsDialog('归还', scope.row)">归还</el-button> |
| | | <el-button size="small" text type="primary" @click="onOpenReturnGoodsDialog('查看物资', scope.row)">查看物资</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="claimReturnRecordsState.listQuery.pageIndex" background v-model:page-size="claimReturnRecordsState.listQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="claimReturnRecordsState.total" class="page-position"> </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <return-and-watch ref="returnAndWatchRef" @refreshReturnData="initClaimReturnData"></return-and-watch> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import {onMounted, reactive, watch, ref} from "vue"; |
| | | import { |
| | | claimReturnDataType, |
| | | ClaimReturnRecordsType, |
| | | materialType |
| | | } from "/@/views/facilityManagement/claimReturnRecords/index"; |
| | | import {claimReturnRecordsApi} from "/@/api/facilityManagement/claimReturnRecords"; |
| | | import {ElMessage} from "element-plus"; |
| | | import ReturnAndWatch from "/@/views/facilityManagement/claimReturnRecords/components/returnAndWatch.vue"; |
| | | |
| | | const returnAndWatchRef = ref(); |
| | | |
| | | const claimReturnRecordsState = reactive<ClaimReturnRecordsType>({ |
| | | tableLoading: true, |
| | | total: 0, |
| | | timeValue: [], |
| | | claimReturnData: [], |
| | | listQuery: { |
| | | pageSize: 10, |
| | | pageIndex: 1, |
| | | searchParams: { |
| | | materialName: null, |
| | | receiveUname: null, |
| | | endTime: null, |
| | | startTime: null, |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | watch(() => claimReturnRecordsState.timeValue, (newVal, oldVal) => { |
| | | claimReturnRecordsState.listQuery.searchParams.startTime = newVal?.[0] || null; |
| | | claimReturnRecordsState.listQuery.searchParams.endTime = newVal?.[1] || null; |
| | | }) |
| | | |
| | | const initClaimReturnData = async () => { |
| | | claimReturnRecordsState.tableLoading = true; |
| | | let res = await claimReturnRecordsApi().getClaimReturnRecords(claimReturnRecordsState.listQuery); |
| | | if(res.data.code === '200') { |
| | | claimReturnRecordsState.claimReturnData = res.data.data; |
| | | claimReturnRecordsState.total = res.data.total; |
| | | }else { |
| | | ElMessage({ |
| | | type:'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | claimReturnRecordsState.tableLoading = false; |
| | | }; |
| | | |
| | | const onOpenReturnGoodsDialog = (title: string, value: claimReturnDataType) => { |
| | | returnAndWatchRef.value.openReturnAndWatchDialog(title, value) |
| | | } |
| | | |
| | | const onHandleSizeChange = (val: number) => { |
| | | claimReturnRecordsState.listQuery.pageSize = val; |
| | | initClaimReturnData(); |
| | | }; |
| | | |
| | | const onHandleCurrentChange = (val: number) => { |
| | | claimReturnRecordsState.listQuery.pageIndex = val; |
| | | initClaimReturnData(); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | initClaimReturnData() |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | .homeCard { |
| | | width: 100%; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | |
| | | .main-card { |
| | | width: 100%; |
| | | height: 100%; |
| | | .cardTop { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | .mainCardBtn { |
| | | margin: 0; |
| | | } |
| | | } |
| | | .pageBtn { |
| | | height: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | |
| | | .demo-pagination-block + .demo-pagination-block { |
| | | margin-top: 10px; |
| | | } |
| | | .demo-pagination-block .demonstration { |
| | | margin-bottom: 16px; |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type { |
| | | height: calc(100% - 100px); |
| | | } |
| | | } |
| | | .el-row { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .grid-content { |
| | | align-items: center; |
| | | min-height: 36px; |
| | | } |
| | | |
| | | .topInfo { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | |
| | | & > div { |
| | | white-space: nowrap; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .stepItem { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-bottom: 30px; |
| | | margin-left: 30px; |
| | | padding-bottom: 30px; |
| | | border-left: 2px solid #ccc; |
| | | &:first-of-type { |
| | | margin-top: 30px; |
| | | } |
| | | &:last-of-type { |
| | | margin-bottom: 0; |
| | | border-left: none; |
| | | } |
| | | .stepNum { |
| | | width: 30px; |
| | | height: 30px; |
| | | border-radius: 15px; |
| | | box-sizing: border-box; |
| | | color: #333; |
| | | border: 1px solid #999; |
| | | line-height: 28px; |
| | | text-align: center; |
| | | margin-right: 10px; |
| | | margin-left: -16px; |
| | | margin-top: -30px; |
| | | } |
| | | .stepCard { |
| | | width: 100%; |
| | | margin-top: -30px; |
| | | |
| | | .box-card { |
| | | width: 100%; |
| | | &:deep(.el-card__header) { |
| | | padding: 10px 15px; |
| | | } |
| | | .card-header { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | & > div:first-of-type { |
| | | margin-right: 80px; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:hover .card-header { |
| | | color: #0098f5; |
| | | } |
| | | &:hover .stepNum { |
| | | border: 2px solid #0098f5; |
| | | color: #0098f5; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="认领人:" prop="claimantId"> |
| | | <el-select class="input-add" v-model="checkOutState.checkOutForm.claimantId" placeholder="选择认领人"> |
| | | <el-form-item label="认领人:" prop="receiveUid"> |
| | | <el-select class="input-add" v-model="checkOutState.checkOutForm.receiveUid" placeholder="选择认领人"> |
| | | <el-option |
| | | v-for="item in checkOutState.userList" |
| | | :key="item.uid" |
| | |
| | | import {teamManageApi} from "/@/api/systemManage/basicDateManage/personShiftManage/teamManage"; |
| | | import {ElMessage} from "element-plus/es"; |
| | | import {goodsDetailApi} from "/@/api/facilityManagement/goodsDetailManage"; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | |
| | | const checkOutState = reactive<checkOutStateType>({ |
| | | title: '', |
| | |
| | | materialName: '', |
| | | checkOutForm: { |
| | | id: null, |
| | | claimantId: null, |
| | | receiveUid: null, |
| | | ids: [], |
| | | }, |
| | | userList: [], |
| | |
| | | const openCheckOutDialog = (title: string, value: GoodsDetailDataType, ids:Array<number>, checkOutName: null | string) => { |
| | | checkOutState.title = title; |
| | | checkOutState.checkOutDialogVisible = true; |
| | | checkOutState.checkOutForm.claimantId = null; |
| | | getUserByDepartment(1 as number) |
| | | checkOutState.checkOutForm.receiveUid = null; |
| | | getUserByDepartment(useUserInfo().userInfos.depId as number) |
| | | if(title === '单独出库'){ |
| | | checkOutState.materialName = value.name as string |
| | | checkOutState.checkOutForm.id = value.id; |
| | | delete checkOutState.checkOutForm.ids; |
| | | }else{ |
| | | checkOutState.materialName = checkOutName as string |
| | | checkOutState.checkOutForm.ids = ids |
| | | delete checkOutState.checkOutForm.id; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | const submitCheckOutForm = async () => { |
| | | if(checkOutState.checkOutForm.claimantId === null){ |
| | | if(checkOutState.checkOutForm.receiveUid === null){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请选择认领人' |
| | |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="选择物资" prop="smId"> |
| | | <el-row :gutter="6"> |
| | | <el-col :span="8"> |
| | | <el-select |
| | | filterable |
| | | placeholder="请选择部门" |
| | | clearable |
| | | @change="changeDepartment" |
| | | v-model="goodsDetailAddState.depId"> |
| | | <el-option |
| | | v-for="item in goodsDetailAddState.departmentList" |
| | | :key="item.depId" |
| | | :value="item.depId" |
| | | :label="item.depName" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-col :span="8">--> |
| | | <!-- <el-select--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="请选择部门"--> |
| | | <!-- clearable--> |
| | | <!-- @change="changeDepartment"--> |
| | | <!-- v-model="goodsDetailAddState.depId">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in goodsDetailAddState.departmentList"--> |
| | | <!-- :key="item.depId"--> |
| | | <!-- :value="item.depId"--> |
| | | <!-- :label="item.depName"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12"> |
| | | <el-select v-model="goodsDetailAddState.classifyId" placeholder="选择分类" @change="changeClassify" filterable clearable> |
| | | <el-option |
| | | v-for="item in goodsDetailAddState.classifyList" |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="12"> |
| | | <el-select v-model="goodsDetailAddState.goodsDetailForm.smId" placeholder="选择物资" filterable clearable> |
| | | <el-option |
| | | v-for="item in goodsDetailAddState.goodsList" |
| | |
| | | import {ElMessage} from "element-plus/es"; |
| | | import {goodsDetailApi} from "/@/api/facilityManagement/goodsDetailManage"; |
| | | import {verifiyNumberInteger, verifyString} from "/@/utils/toolsValidate"; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | |
| | | const goodsDetailFormRef = ref() |
| | | const userInfo = useUserInfo() |
| | | |
| | | const goodsDetailAddState = reactive<GoodsDetailAddType>({ |
| | | title: '新增入库', |
| | |
| | | setTimeout(() => { |
| | | goodsDetailFormRef.value.clearValidate(); |
| | | }); |
| | | goodsDetailAddState.startRfid = '' |
| | | goodsDetailAddState.endRfid = '' |
| | | goodsDetailAddState.startRfid = ''; |
| | | goodsDetailAddState.endRfid = ''; |
| | | goodsDetailAddState.goodsDetailForm = { |
| | | id: null, |
| | | smId: null, |
| | |
| | | startRfid: null, |
| | | endRfid: null , |
| | | wareHousingCount: null, |
| | | } |
| | | }; |
| | | goodsDetailAddState.classifyList = goodsDetailAddState.departmentList.find(item => item.depId === userInfo.userInfos.depId)?.classificationList as Array<ClassificationListType> |
| | | } |
| | | |
| | | const changeDepartment = (value: number | null) => { |
| | | goodsDetailAddState.classifyId = null |
| | | goodsDetailAddState.goodsDetailForm.smId = null |
| | | goodsDetailAddState.classifyList = goodsDetailAddState.departmentList.find(item => item.depId === value)?.classificationList as Array<ClassificationListType> |
| | | } |
| | | // const changeDepartment = (value: number | null) => { |
| | | // goodsDetailAddState.classifyId = null |
| | | // goodsDetailAddState.goodsDetailForm.smId = null |
| | | // goodsDetailAddState.classifyList = goodsDetailAddState.departmentList.find(item => item.depId === value)?.classificationList as Array<ClassificationListType> |
| | | // } |
| | | |
| | | const changeClassify = (value: number | null) => { |
| | | goodsDetailAddState.goodsDetailForm.smId = null |
| | | goodsDetailAddState.goodsList = goodsDetailAddState.classifyList.find(item => item.materialClassifyId === value)?.baseMaterialList as Array<BaseMaterialListType> |
| | | goodsDetailAddState.goodsList = JSON.parse(JSON.stringify( |
| | | (goodsDetailAddState.classifyList.find(item => item.materialClassifyId === value) ?? {baseMaterialList:[]})?.baseMaterialList as Array<BaseMaterialListType> |
| | | )) |
| | | } |
| | | |
| | | const submitGoodsDetail = () => { |
| | |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="选择物资" prop="smId"> |
| | | <el-row :gutter="6"> |
| | | <el-col :span="8"> |
| | | <el-select |
| | | filterable |
| | | placeholder="请选择部门" |
| | | clearable |
| | | @change="changeDepartment" |
| | | v-model="goodsDetailEditState.depId"> |
| | | <el-option |
| | | v-for="item in goodsDetailEditState.departmentList" |
| | | :key="item.depId" |
| | | :value="item.depId" |
| | | :label="item.depName" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-col :span="8">--> |
| | | <!-- <el-select--> |
| | | <!-- filterable--> |
| | | <!-- placeholder="请选择部门"--> |
| | | <!-- clearable--> |
| | | <!-- @change="changeDepartment"--> |
| | | <!-- v-model="goodsDetailEditState.depId">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in goodsDetailEditState.departmentList"--> |
| | | <!-- :key="item.depId"--> |
| | | <!-- :value="item.depId"--> |
| | | <!-- :label="item.depName"--> |
| | | <!-- ></el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12"> |
| | | <el-select v-model="goodsDetailEditState.classifyId" placeholder="选择分类" @change="changeClassify" filterable clearable> |
| | | <el-option |
| | | v-for="item in goodsDetailEditState.classifyList" |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="12"> |
| | | <el-select v-model="goodsDetailEditState.goodsDetailForm.smId" placeholder="选择物资" filterable clearable> |
| | | <el-option |
| | | v-for="item in goodsDetailEditState.goodsList" |
| | |
| | | import {isValidKey} from "/@/views/facilityManagement/safetyGoodsAndEquipment/index"; |
| | | import {ElMessage} from "element-plus/es"; |
| | | import {goodsDetailApi} from "/@/api/facilityManagement/goodsDetailManage"; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | |
| | | const goodsDetailFormRef = ref() |
| | | const userInfo = useUserInfo() |
| | | |
| | | const goodsDetailEditState = reactive<GoodsDetailEditType>({ |
| | | title: '编辑', |
| | |
| | | }) |
| | | |
| | | // watch(() => goodsDetailEditState.depId ,(newVal, oldVal) => { |
| | | // debugger |
| | | // goodsDetailEditState.classify = null |
| | | // goodsDetailEditState.goodsDetailForm.smId = null |
| | | // goodsDetailEditState.classifyList = goodsDetailEditState.departmentList.find(item => item.depId === newVal)?.classificationList as Array<ClassificationListType> |
| | |
| | | setTimeout(() => { |
| | | goodsDetailFormRef.value.clearValidate(); |
| | | }); |
| | | await changeDepartment(value.depId) |
| | | await changeDepartment(userInfo.userInfos.depId) |
| | | await changeClassify(value.bigClassifyId) |
| | | goodsDetailEditState.depId = value.depId |
| | | goodsDetailEditState.classifyId = value.bigClassifyId |
| | |
| | | const changeDepartment = (value: number | null) => { |
| | | goodsDetailEditState.classifyId = null |
| | | goodsDetailEditState.goodsDetailForm.smId = null |
| | | goodsDetailEditState.classifyList = goodsDetailEditState.departmentList.find(item => item.depId === value)?.classificationList as Array<ClassificationListType> |
| | | goodsDetailEditState.classifyList = JSON.parse(JSON.stringify( |
| | | (goodsDetailEditState.departmentList.find(item => item.depId === value) ?? {classificationList:[]})?.classificationList as Array<ClassificationListType> |
| | | )) |
| | | } |
| | | |
| | | const changeClassify = (value: number | null) => { |
| | |
| | | materialName: string; |
| | | checkOutForm: { |
| | | id?: null | number; |
| | | claimantId: null | number; |
| | | receiveUid: null | number; |
| | | ids?: Array<number>; |
| | | }; |
| | | // checkOutMoreForm: { |
对比新文件 |
| | |
| | | <template> |
| | | <div class="home-container"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <div class="basic-line"> |
| | | </div> |
| | | <div class="basic-line"> |
| | | </div> |
| | | <div style="padding-bottom: 10px"> |
| | | <el-button size="default" type="primary" @click="onOpenGoodsClassifyDialog('新增', '')"> |
| | | <el-icon> |
| | | <ele-FolderAdd /> |
| | | </el-icon> |
| | | 新增分类 |
| | | </el-button> |
| | | </div> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | | <div class="main-card"> |
| | | <el-table |
| | | :data="addGoodsState.goodsData" |
| | | style="width: 100%" |
| | | height="calc(100% - 100px)" |
| | | :header-cell-style="{ background: '#fafafa' }" |
| | | border |
| | | row-key="id" |
| | | :load="load" |
| | | :row-class-name="tableRowClassName" |
| | | :tree-props="{ children: 'childList', hasChildren: true }" |
| | | > |
| | | <el-table-column prop="materialClassifyName" label="分类名称" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="consumableName" label="是否耗材" show-overflow-tooltip align="center"/> |
| | | <el-table-column prop="materialClassifyName" label="类别" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <div v-if="scope.row.parentId === 0">{{'分类名称'}}</div> |
| | | <div v-if="scope.row.parentId !== 0">{{'物资名称'}}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="150" align="center"> |
| | | <template #default="scope"> |
| | | <el-button v-if="scope.row.parentId === 0" size="small" text type="primary" @click="onOpenGoodsClassifyDialog('新增物资', scope.row)"> |
| | | <el-icon> |
| | | <ele-FolderAdd /> |
| | | </el-icon> |
| | | 新增物资 |
| | | </el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="onOpenGoodsClassifyDialog('编辑', scope.row)">编辑</el-button> |
| | | <el-button size="small" text type="danger" :icon="Delete" @click="deleteGoodsClassify(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <br /> |
| | | <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" :pager-count="5" :page-sizes="[5, 10, 20]" v-model:current-page="addGoodsState.listQuery.pageIndex" background v-model:page-size="addGoodsState.listQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="addGoodsState.total" class="page-position" style="padding-top: 20px;"> </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <el-dialog :title="addGoodsState.goodsClassifyTitle" :close-on-click-modal="false" v-model="addGoodsState.showAddGoodsClassifyDialog" width="30%"> |
| | | <el-form |
| | | :model="addGoodsState.goodsClassifyForm" |
| | | :rules="addGoodsState.goodsClassifyRules" |
| | | ref="goodsClassifyRef" |
| | | size="default" |
| | | label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="24" class="mb20" v-if="!addGoodsState.goodsClassifyForm.parentId"> |
| | | <el-form-item label="分类名称" prop="materialClassifyName"> |
| | | <el-input v-model="addGoodsState.goodsClassifyForm.materialClassifyName" placeholder="输入分类名称" class="input-add"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" class="mb20" v-if="addGoodsState.goodsClassifyForm.parentId"> |
| | | <el-form-item label="物资名称" prop="materialClassifyName"> |
| | | <el-input v-model="addGoodsState.goodsClassifyForm.materialClassifyName" placeholder="输入物资名称" class="input-add"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" class="mb20" v-if="addGoodsState.goodsClassifyForm.parentId"> |
| | | <el-form-item label="是否耗材" prop="consumable"> |
| | | <el-select class="input-add" v-model="addGoodsState.goodsClassifyForm.consumable" placeholder="是否耗材" clearable filterable> |
| | | <el-option |
| | | v-for="item in addGoodsState.consumableList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="addGoodsState.showAddGoodsClassifyDialog = !addGoodsState.showAddGoodsClassifyDialog" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="submitGoodsClassify" v-throttle size="default">确 定</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import {computed, nextTick, onMounted, reactive, ref, watch} from 'vue' |
| | | import { Edit, Delete, } from '@element-plus/icons-vue'; |
| | | import {AddGoodsStateType, BigClassifyType} from "/@/views/facilityManagement/safetyGoodsAndEquipment/index"; |
| | | import {mount} from "sortablejs"; |
| | | import {goodsAndEquipmentApi} from "/@/api/facilityManagement/safetyGoodsAndEquipment"; |
| | | import {ElMessage, valueEquals} from "element-plus/es"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {inspectTaskApi} from "/@/api/intellectInspectSystem/inspectTask"; |
| | | |
| | | const addGoodsState = reactive<AddGoodsStateType>({ |
| | | title:'', |
| | | goodsClassifyTitle:'', |
| | | showAddGoodsDialog: false, |
| | | showAddGoodsClassifyDialog: false, |
| | | activeName: 'goodsInformation', |
| | | goodsData: [], |
| | | goodsBigClassifyList: [], |
| | | consumableList: [ |
| | | {id: 0, name: '是'}, |
| | | {id: 1, name: '否'}, |
| | | ], |
| | | total:0, |
| | | listQuery:{ |
| | | pageSize: 10, |
| | | pageIndex: 1, |
| | | searchParams: { |
| | | classifyName:'' |
| | | } |
| | | }, |
| | | goodsClassifyForm: { |
| | | id: null, |
| | | materialClassifyName: '', |
| | | parentId: null, |
| | | consumable: null, |
| | | }, |
| | | goodsClassifyRules: { |
| | | |
| | | }, |
| | | }); |
| | | |
| | | const openAddGoodsDialog = (goodsBigClassifyList: BigClassifyType []) => { |
| | | addGoodsState.showAddGoodsDialog = true |
| | | addGoodsState.goodsBigClassifyList = goodsBigClassifyList |
| | | getGoodsClassifyDataByPage() |
| | | } |
| | | |
| | | const onOpenGoodsClassifyDialog = (title: string, value:BigClassifyType ) => { |
| | | addGoodsState.showAddGoodsClassifyDialog = true |
| | | addGoodsState.goodsClassifyForm = { |
| | | id: null, |
| | | materialClassifyName: '', |
| | | parentId: null, |
| | | } |
| | | if(title === '新增') { |
| | | addGoodsState.goodsClassifyTitle = '新增分类' |
| | | }else if(title === '新增物资'){ |
| | | addGoodsState.goodsClassifyTitle = `新增${value.materialClassifyName}` |
| | | addGoodsState.goodsClassifyForm.parentId = value.id |
| | | } else if(title === '编辑' && value.parentId === 0){ |
| | | addGoodsState.goodsClassifyTitle = '编辑分类' |
| | | addGoodsState.goodsClassifyForm = { |
| | | id: value.id, |
| | | materialClassifyName: value.materialClassifyName, |
| | | consumable: null, |
| | | parentId: null, |
| | | } |
| | | }else { |
| | | addGoodsState.goodsClassifyTitle = `编辑${addGoodsState.goodsBigClassifyList.find(item => item.id === value.parentId)?.materialClassifyName as string}` |
| | | addGoodsState.goodsClassifyForm.parentId = addGoodsState.goodsBigClassifyList.find(item => item.id === value.parentId)?.id as number |
| | | addGoodsState.goodsClassifyForm.materialClassifyName = value.materialClassifyName |
| | | addGoodsState.goodsClassifyForm.consumable = value.consumable |
| | | addGoodsState.goodsClassifyForm.id = value.id |
| | | } |
| | | } |
| | | |
| | | const submitGoodsClassify = async () => { |
| | | if(addGoodsState.goodsClassifyTitle.substring(0,2) === '新增'){ |
| | | let res = await goodsAndEquipmentApi().addGoodsClassify(addGoodsState.goodsClassifyForm); |
| | | if(res.data.code === '200'){ |
| | | addGoodsState.showAddGoodsClassifyDialog = false; |
| | | await getGoodsClassifyDataByPage(); |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '新增成功', |
| | | duration: 2000 |
| | | }); |
| | | }else{ |
| | | ElMessage({ |
| | | type:'warning', |
| | | message:res.data.msg |
| | | }) |
| | | } |
| | | }else{ |
| | | let res = await goodsAndEquipmentApi().updateGoodsClassify(addGoodsState.goodsClassifyForm); |
| | | if(res.data.code === '200'){ |
| | | addGoodsState.showAddGoodsClassifyDialog = false; |
| | | await getGoodsClassifyDataByPage(); |
| | | emit('refreshClassify') |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '编辑成功', |
| | | duration: 2000 |
| | | }); |
| | | }else{ |
| | | ElMessage({ |
| | | type:'warning', |
| | | message:res.data.msg |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const deleteGoodsClassify = (row: BigClassifyType) => { |
| | | ElMessageBox.confirm(`此操作将永久删除该:“${row.materialClassifyName}”,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await goodsAndEquipmentApi().deleteGoodsClassify({ id: row.id }); |
| | | if (res.data.code === '200') { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '删除成功' |
| | | }); |
| | | await getGoodsClassifyDataByPage(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | |
| | | const getGoodsClassifyDataByPage = async () => { |
| | | let res = await goodsAndEquipmentApi().getAllSafetyEquipmentByPage(addGoodsState.listQuery); |
| | | if(res.data.code === '200'){ |
| | | addGoodsState.goodsData = res.data.data |
| | | addGoodsState.total = res.data.total |
| | | }else{ |
| | | ElMessage({ |
| | | message:res.data.msg, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const getAllSafetyEquipmentList = async () => { |
| | | let res = await goodsAndEquipmentApi().getAllSafetyEquipment(); |
| | | if(res.data.code === '200'){ |
| | | addGoodsState.goodsBigClassifyList = JSON.parse(JSON.stringify(res.data.data)) |
| | | }else{ |
| | | ElMessage({ |
| | | message:res.data.msg, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const tableRowClassName = ( row: {rowIndex: number, row: BigClassifyType } ) => { |
| | | if (row.row.parentId === 0) { |
| | | return 'big-row'; |
| | | } else{ |
| | | return 'small-row'; |
| | | } |
| | | } |
| | | |
| | | const onHandleSizeChange = (val: number) => { |
| | | addGoodsState.listQuery.pageSize = val |
| | | getGoodsClassifyDataByPage() |
| | | } |
| | | |
| | | const onHandleCurrentChange = (val: number) => { |
| | | addGoodsState.listQuery.pageIndex = val |
| | | getGoodsClassifyDataByPage() |
| | | } |
| | | |
| | | const load = ( |
| | | row: BigClassifyType, |
| | | treeNode: unknown, |
| | | resolve: (date: BigClassifyType[]) => void |
| | | ) => { |
| | | setTimeout(() => { |
| | | resolve([]) |
| | | }, 1000) |
| | | } |
| | | |
| | | const emit = defineEmits(['refreshClassify']) |
| | | |
| | | defineExpose({ |
| | | openAddGoodsDialog, |
| | | }); |
| | | |
| | | onMounted( () => { |
| | | getGoodsClassifyDataByPage(); |
| | | getAllSafetyEquipmentList(); |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | $homeNavLengh: 8; |
| | | .home-container { |
| | | height: calc(100vh - 144px); |
| | | box-sizing: border-box; |
| | | overflow: hidden; |
| | | .homeCard { |
| | | width: 100%; |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | |
| | | .main-card { |
| | | width: 100%; |
| | | height: 100%; |
| | | .cardTop { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 20px; |
| | | .mainCardBtn { |
| | | margin: 0; |
| | | } |
| | | } |
| | | .pageBtn { |
| | | height: 60px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | |
| | | .demo-pagination-block + .demo-pagination-block { |
| | | margin-top: 10px; |
| | | } |
| | | .demo-pagination-block .demonstration { |
| | | margin-bottom: 16px; |
| | | } |
| | | } |
| | | } |
| | | &:last-of-type { |
| | | height: calc(100% - 100px); |
| | | } |
| | | } |
| | | .el-row { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | .grid-content { |
| | | align-items: center; |
| | | min-height: 36px; |
| | | } |
| | | |
| | | .topInfo { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | |
| | | & > div { |
| | | white-space: nowrap; |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .stepItem { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: flex-start; |
| | | margin-bottom: 30px; |
| | | margin-left: 30px; |
| | | padding-bottom: 30px; |
| | | border-left: 2px solid #ccc; |
| | | &:first-of-type { |
| | | margin-top: 30px; |
| | | } |
| | | &:last-of-type { |
| | | margin-bottom: 0; |
| | | border-left: none; |
| | | } |
| | | .stepNum { |
| | | width: 30px; |
| | | height: 30px; |
| | | border-radius: 15px; |
| | | box-sizing: border-box; |
| | | color: #333; |
| | | border: 1px solid #999; |
| | | line-height: 28px; |
| | | text-align: center; |
| | | margin-right: 10px; |
| | | margin-left: -16px; |
| | | margin-top: -30px; |
| | | } |
| | | .stepCard { |
| | | width: 100%; |
| | | margin-top: -30px; |
| | | |
| | | .box-card { |
| | | width: 100%; |
| | | &:deep(.el-card__header) { |
| | | padding: 10px 15px; |
| | | } |
| | | .card-header { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | & > div:first-of-type { |
| | | margin-right: 80px; |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | &:hover .card-header { |
| | | color: #0098f5; |
| | | } |
| | | &:hover .stepNum { |
| | | border: 2px solid #0098f5; |
| | | color: #0098f5; |
| | | } |
| | | } |
| | | :deep(.el-table .big-row) { |
| | | font-size: 16px !important; |
| | | font-weight: 700; |
| | | } |
| | | </style> |
| | |
| | | if(res.data.code === '200'){ |
| | | addGoodsState.showAddGoodsClassifyDialog = false; |
| | | await getGoodsClassifyDataByPage(); |
| | | emit('refreshClassify') |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '编辑成功', |
| | |
| | | }, 1000) |
| | | } |
| | | |
| | | const emit = defineEmits(['refreshClassify']) |
| | | |
| | | defineExpose({ |
| | | openAddGoodsDialog, |
| | | }); |
| | |
| | | <el-form-item label="有效期至:" prop="validTime"> |
| | | <el-date-picker |
| | | v-model="batchInStorageState.inStorageData.validTime" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | type="datetime" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | placeholder="选择日期时间" |
| | | style="width: 90%" /> |
| | | </el-form-item> |
| | |
| | | } |
| | | |
| | | const submitInStorageData = () => { |
| | | batchInStorageState.loading = true; |
| | | inStorageDataRef.value.validate(async (valid: boolean) => { |
| | | if(valid){ |
| | | batchInStorageState.loading = true; |
| | | let res = await goodsAndEquipmentApi().batchInStorageGoods(batchInStorageState.inStorageData); |
| | | if(res.data.code === '200'){ |
| | | batchInStorageState.batchInStorageDialogVisible = false; |
| | |
| | | message:res.data.msg |
| | | }); |
| | | } |
| | | batchInStorageState.loading = false |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | }); |
| | | } |
| | | }); |
| | | batchInStorageState.loading = false; |
| | | }; |
| | | |
| | | const emit = defineEmits(['refreshData',]); |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="认领人:" prop="claimantId"> |
| | | <el-select class="input-add" v-model="batchOutStorageState.outStorageData.claimantId" placeholder="选择认领人"> |
| | | <el-form-item label="认领人:" prop="receiveUid"> |
| | | <el-select class="input-add" v-model="batchOutStorageState.outStorageData.receiveUid" placeholder="选择认领人"> |
| | | <el-option |
| | | v-for="item in batchOutStorageState.userList" |
| | | :key="item.uid" |
| | |
| | | outStorageData:{ |
| | | smId: null, |
| | | count: null, |
| | | claimantId: null, |
| | | receiveUid: null, |
| | | rfid: null, |
| | | }, |
| | | outStorageDataRules: { |
| | | count: [{ required: true, message: '请填写出库数量', trigger: 'blur' }], |
| | | claimantId: [{ required: true, message: '请选择认领人', trigger: 'change' }], |
| | | receiveUid: [{ required: true, message: '请选择认领人', trigger: 'change' }], |
| | | }, |
| | | userList: [], |
| | | }) |
| | |
| | | } |
| | | |
| | | const submitOutStorageData = () => { |
| | | batchOutStorageState.loading = true; |
| | | outStorageDataRef.value.validate(async (valid: boolean) => { |
| | | if(valid){ |
| | | batchOutStorageState.loading = true; |
| | | let res = await goodsAndEquipmentApi().batchOutStorageGoods(batchOutStorageState.outStorageData); |
| | | if(res.data.code === '200'){ |
| | | batchOutStorageState.batchOutStorageDialogVisible = false; |
| | |
| | | message:res.data.msg |
| | | }); |
| | | } |
| | | batchOutStorageState.loading = false |
| | | }else{ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | }); |
| | | } |
| | | }); |
| | | batchOutStorageState.loading = false |
| | | }; |
| | | |
| | | const emit = defineEmits(['refreshData',]); |
| | |
| | | element-loading-text="Loading..." |
| | | label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="18" class="mb20"> |
| | | <el-col :span="24" class="mb20"> |
| | | <el-form-item label="物资大类" prop="bigClassifyId"> |
| | | <el-select v-model="dialogState.safetyGoodsAndEquipmentForm.bigClassifyId" @change="changeSmallClassify(null)" placeholder="物资大类" class="input-add"> |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-button type="primary" @click="openAddGoods">添加物资</el-button> |
| | | </el-col> |
| | | |
| | | <!-- <el-col :span="5">--> |
| | | <!-- <el-button type="primary" @click="openAddGoods">添加物资</el-button>--> |
| | | <!-- </el-col>--> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="物资小类" prop="smallClassifyId"> |
| | | <el-select class="input-add" v-model="dialogState.safetyGoodsAndEquipmentForm.smallClassifyId" placeholder="请先选择物资大类"> |
| | |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="部门" prop="depId"> |
| | | <el-cascader |
| | | :disabled="true" |
| | | :options="dialogState.departmentList" |
| | | :props="{ emitPath: false, checkStrictly: true, value: 'depId', label: 'depName' }" |
| | | placeholder="请选择部门" |
| | |
| | | </el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20"> |
| | | <el-form-item label="是否耗材" prop="consumable"> |
| | | <el-select class="input-add" v-model="dialogState.safetyGoodsAndEquipmentForm.consumable" placeholder="是否耗材" clearable filterable> |
| | | <el-option |
| | | v-for="item in dialogState.consumableList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">--> |
| | | <!-- <el-form-item label="是否耗材" prop="consumable">--> |
| | | <!-- <el-select class="input-add" v-model="dialogState.safetyGoodsAndEquipmentForm.consumable" placeholder="是否耗材" clearable filterable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in dialogState.consumableList"--> |
| | | <!-- :key="item.id"--> |
| | | <!-- :value="item.id"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <add-goods-dialog ref="addGoodsDialogRef"></add-goods-dialog> |
| | | <add-goods-dialog ref="addGoodsDialogRef" @refreshClassify="getAllSafetyEquipmentList"></add-goods-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { goodsAndEquipmentApi } from "/@/api/facilityManagement/safetyGoodsAndEquipment"; |
| | | import {ElMessage} from "element-plus"; |
| | | import AddGoodsDialog from "./addGoodsDialog.vue"; |
| | | import {useUserInfo} from "/@/stores/userInfo"; |
| | | |
| | | const safetyGoodsAndEquipmentRef = ref(); |
| | | const addGoodsDialogRef = ref() |
| | | const addGoodsDialogRef = ref(); |
| | | const userInfo = useUserInfo() |
| | | |
| | | const dialogState = reactive<SafetyGoodsAndEquipmentDialogStateType>({ |
| | | safetyGoodsAndEquipmentForm: { |
| | |
| | | bigClassifyId: null, |
| | | smallClassifyId: null, |
| | | depId: null, |
| | | consumable: null, |
| | | // consumable: null, |
| | | }, |
| | | safetyGoodsAndEquipmentRules: { |
| | | bigClassifyId: [{ required: true, message: '请选择物资大类', trigger: 'change' }], |
| | | smallClassifyId: [{ required: true, message: '请选择物资小类', trigger: 'change' }], |
| | | depId: [{ required: true, message: '请选择部门', trigger: 'change' }], |
| | | consumable: [{ required: true, message: '请选择是否耗材', trigger: 'change' }], |
| | | // depId: [{ required: true, message: '请选择部门', trigger: 'change' }], |
| | | // consumable: [{ required: true, message: '请选择是否耗材', trigger: 'change' }], |
| | | }, |
| | | showSafetyGoodsAndEquipmentDialog: false, |
| | | title: '', |
| | |
| | | |
| | | },); |
| | | |
| | | const openAddGoods = () => { |
| | | addGoodsDialogRef.value.openAddGoodsDialog(dialogState.goodsBigClassifyList) |
| | | } |
| | | // const openAddGoods = () => { |
| | | // addGoodsDialogRef.value.openAddGoodsDialog(dialogState.goodsBigClassifyList) |
| | | // } |
| | | |
| | | const openSafetyGoodsAndEquipmentDialog = |
| | | (title: string, value: safetyGoodsAndEquipmentFormType, goodsBigClassifyList: BigClassifyType [], departmentList : DepartmentType []) => { |
| | |
| | | id: null, |
| | | bigClassifyId: null, |
| | | smallClassifyId: null, |
| | | depId: null, |
| | | consumable: null, |
| | | depId: userInfo.userInfos.depId, |
| | | // consumable: null, |
| | | }; |
| | | nextTick( () => { |
| | | safetyGoodsAndEquipmentRef.value.clearValidate(); |
| | | }) |
| | | if(title === '新增') { |
| | | dialogState.title = '新增' |
| | | }else { |
| | |
| | | }) |
| | | }; |
| | | |
| | | const getAllSafetyEquipmentList = async () => { |
| | | let res = await goodsAndEquipmentApi().getAllSafetyEquipment(); |
| | | if(res.data.code === '200'){ |
| | | dialogState.goodsBigClassifyList = res.data.data |
| | | }else{ |
| | | ElMessage({ |
| | | message:res.data.msg, |
| | | type:'warning' |
| | | }) |
| | | } |
| | | }; |
| | | |
| | | const emit = defineEmits(['refreshData',]) |
| | | |
| | | defineExpose({ |
| | |
| | | activeName: string; |
| | | goodsData: BigClassifyType []; |
| | | goodsBigClassifyList: BigClassifyType []; |
| | | consumableList?: Type []; |
| | | total: number; |
| | | listQuery: { |
| | | pageSize: number; |
| | |
| | | id: null | number; |
| | | materialClassifyName: string; |
| | | parentId: number | null; |
| | | consumable?: number | null; |
| | | }; |
| | | goodsClassifyRules: { |
| | | |
| | |
| | | outStorageData: { |
| | | smId: null | number, |
| | | count: null | number, |
| | | claimantId: null | number, |
| | | receiveUid: null | number, |
| | | rfid: null | string, |
| | | }; |
| | | outStorageDataRules: { |
| | |
| | | bigClassifyId: null | number, |
| | | smallClassifyId: null | number, |
| | | depId: null | number, |
| | | consumable: null | number, |
| | | // consumable: null | number, |
| | | } |
| | | |
| | | export type DataType = { |
| | |
| | | export type BigClassifyType = { |
| | | id: number; |
| | | materialClassifyName: string; |
| | | consumable?: number | null; |
| | | parentId?: number; |
| | | childList?: BigClassifyType []; |
| | | } |
| | |
| | | <div class="home-container"> |
| | | <div style="height: 100%"> |
| | | <el-row class="homeCard"> |
| | | <!-- <div class="basic-line">--> |
| | | <!-- <span>设备区域名称:</span>--> |
| | | <!-- <el-input class="input-box" v-model="tableData.listQuery.regionName" placeholder="设备区域名称" clearable> </el-input>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="basic-line">--> |
| | | <!-- <span>设备区域类型:</span>--> |
| | | <!-- <el-select class="input-box" v-model="tableData.listQuery.regionTypeId" placeholder="设备区域类型" filterable>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | <div class="basic-line"> |
| | | <span>分类名称:</span> |
| | | <el-select class="input-box" v-model="tableData.listQuery.searchParams.bigClassifyId" placeholder="分类名称" filterable> |
| | | <el-option |
| | | v-for="item in tableData.goodsBigClassifyList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.materialClassifyName" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic-line"> |
| | | <span>物资名称:</span> |
| | | <el-input class="input-box" v-model="tableData.listQuery.searchParams.materialName" placeholder="物资名称" clearable> </el-input> |
| | | </div> |
| | | <div style="padding-bottom: 10px"> |
| | | <el-button size="large" type="primary" class="ml10" v-throttle @click="refreshGoodsAndEquipmentData"> |
| | | <el-icon> |
| | |
| | | </el-icon> |
| | | 新增 |
| | | </el-button> |
| | | <el-button size="large" class="ml10" @click="openAddGoods()"> |
| | | 管理分类 |
| | | </el-button> |
| | | <!-- <el-button size="large" class="ml10" @click="openAddGoods()">--> |
| | | <!-- 管理分类--> |
| | | <!-- </el-button>--> |
| | | </div> |
| | | </el-row> |
| | | <div class="homeCard"> |
| | |
| | | <el-table-column prop="serialNum" label="序列号" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="depName" label="部门名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="consumableName" label="是否是耗材" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="validStockCount" label="库存" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="stockCount" label="库存" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="操作" width="250" align="center"> |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="success" :icon="Edit" @click="openBatchInStorage('批量入库', scope.row)">批量入库</el-button> |
| | |
| | | <safety-goods-and-equipment-dialog ref="safetyGoodsAndEquipmentDialogRef" @refreshData="refreshGoodsAndEquipmentData"></safety-goods-and-equipment-dialog> |
| | | <batch-out-storage ref="batchOutStorageRef" @refreshData="refreshGoodsAndEquipmentData"></batch-out-storage> |
| | | <batch-in-storage ref="batchInStorageRef" @refreshData="refreshGoodsAndEquipmentData"></batch-in-storage> |
| | | <add-goods-dialog ref="addGoodsDialogRef"></add-goods-dialog> |
| | | <add-goods-dialog ref="addGoodsDialogRef" @refreshClassify="getAllSafetyEquipmentList"></add-goods-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | batchOutStorageRef.value.openBatchOutStorageDialog(value) |
| | | } |
| | | |
| | | const openAddGoods = () => { |
| | | addGoodsDialogRef.value.openAddGoodsDialog(tableData.goodsBigClassifyList) |
| | | } |
| | | // const openAddGoods = () => { |
| | | // addGoodsDialogRef.value.openAddGoodsDialog(tableData.goodsBigClassifyList) |
| | | // } |
| | | |
| | | const linkToGoodsDetail = (title: string, value: DataType) => { |
| | | router.push({ path: '/goodsDetailManage', query:{ id: value.id } }); |
| | |
| | | const getAllSafetyEquipmentList = async () => { |
| | | let res = await goodsAndEquipmentApi().getAllSafetyEquipment(); |
| | | if(res.data.code === '200'){ |
| | | tableData.goodsBigClassifyList = res.data.data |
| | | tableData.goodsBigClassifyList = JSON.parse(JSON.stringify(res.data.data)) |
| | | }else{ |
| | | ElMessage({ |
| | | message:res.data.msg, |
| | |
| | | color: #0098f5; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-textarea.is-disabled .el-textarea__inner) { |
| | | background-color: var(--el-card-bg-color); |
| | | color: var(--el-input-text-color, var(--el-text-color-regular)); |
| | | } |
| | | :deep(.el-input.is-disabled .el-input__inner) { |
| | | color: var(--el-input-text-color, var(--el-text-color-regular)); |
| | | } |
| | | :deep(.el-input.is-disabled .el-input__wrapper) { |
| | | background-color: var(--el-card-bg-color); |
| | | } |
| | | </style> |
| | |
| | | Cookies.set('token', res.data.data.accessToken); |
| | | Cookies.set('projectId', ''); |
| | | Cookies.set('uid', res.data.data.uid); |
| | | Cookies.set('depId', res.data.data.depId); |
| | | // Session.set('token', res.data.data.accessToken); |
| | | // Session.set('projectId', ''); |
| | | // Session.set('uid', res.data.data.uid); |