| | |
| | | <el-table :data="state.form.documentBorrowCopyRecordList" class="customedTable" :border="true"> |
| | | <el-table-column label="序号" type="index" width="80" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="时间" prop="borrowDate" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | | v-model="scope.row.borrowDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择日期" |
| | | :disabled="state.title =='查看'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="文件名称" prop="fileName" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="编号" prop="number" align="center"> |
| | | <el-table-column label="文件编号" prop="number" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.number" |
| | |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="发放记录" align="center"> |
| | | <el-table-column label="部门" prop="distributionDeptName" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.distributionDeptName" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="签收" prop="distributionSign" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.distributionSign" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="日期" prop="distributionDate" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | | v-model="scope.row.distributionDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择日期" |
| | | :disabled="state.title =='查看'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="份数" prop="distributionNum" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.distributionNum" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="受控状态" prop="controlledState" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.controlledState" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="回收记录" align="center"> |
| | | <el-table-column label="部门" prop="collectionDeptName" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.collectionDeptName" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="签回" prop="collectionSign" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.collectionSign" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="日期" prop="collectionDate" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | | v-model="scope.row.collectionDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择日期" |
| | | :disabled="state.title =='查看'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="份数" prop="collectionNum" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.collectionNum" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="借阅/复制(份数)" prop="collectionNum" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.number.trim="scope.row.collectionNum" |
| | | size="large" |
| | | type="number" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注/版本" prop="remark" align="center"> |
| | | <el-table-column label="签名" prop="backSign" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.backSign" |
| | | size="large" |
| | | type="textarea" |
| | | style="width: 100%;" |
| | | clearable |
| | | :readonly="state.title =='查看'" |
| | | > |
| | | </el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="归还日期" prop="backDate" align="center"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | | v-model="scope.row.backDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择日期" |
| | | :disabled="state.title =='查看'" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="备注" prop="remark" align="center"> |
| | | <template #default="scope"> |
| | | <el-input |
| | | v-model.trim="scope.row.remark" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="制表:" prop="tabulationId"> |
| | | <el-select clearable v-model="state.form.tabulationId" :disabled="state.title =='查看'" filterable placeholder="编制" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in state.userList" |
| | | :key="item.userId" |
| | | :label="item.name" |
| | | :value="item.userId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="日期:" prop="tabulationDate"> |
| | | <el-date-picker |
| | | v-model="state.form.tabulationDate" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择日期" |
| | | :disabled="state.title =='查看'" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer v-if="state.title !='查看'"> |
| | | <span class="dialog-footer"> |
| | |
| | | import {reactive, ref, toRefs, defineEmits, nextTick, onMounted} from 'vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {getToken} from "@/utils/auth"; |
| | | import { |
| | | updateMaintenanceEvaluate, |
| | | getMaintenanceEvaluateDetail |
| | | } from "@/api/infrastructureMng/ledger"; |
| | | |
| | | import {listUser} from "@/api/system/user"; |
| | | import { |
| | | getDocBorrowCopyDetail, |
| | | getDocDistributeCollectDetail, |
| | | saveDocBorrowCopy, |
| | | saveDocDistributeCollect |
| | | } from "@/api/documentManage"; |
| | | |
| | | const emit = defineEmits(["getList"]); |
| | |
| | | const superRef = ref() |
| | | const checkList = (rule, value, callback) => { |
| | | if (state.form.documentBorrowCopyRecordList.length == 0) { |
| | | callback(new Error('文件发放回收记录不可为空')) |
| | | callback(new Error('文件借阅复制记录不可为空')) |
| | | } else { |
| | | callback() |
| | | } |
| | |
| | | companyId: null, |
| | | name: '', |
| | | documentBorrowCopyRecordList: [], |
| | | deleteIds: [], |
| | | tabulationId: null, |
| | | tabulationName: '', |
| | | tabulationDate: '' |
| | | deleteIds: [] |
| | | }, |
| | | oldDeviceList: [], |
| | | formRules:{ |
| | | companyId: [{ required: true, message: '请选择企业', trigger: 'blur' }], |
| | | name: [{ required: true, message: '请填写名称', trigger: 'blur' }], |
| | | tabulationId: [{ required: true, message: '请选择制表人', trigger: 'blur' }], |
| | | tabulationDate: [{ required: true, message: '请选择制表日期', trigger: 'blur' }], |
| | | documentBorrowCopyRecordList: [{ required: true, validator: checkList, trigger: 'blur' }], |
| | | }, |
| | | isAdmin: false, |
| | | companyList: [], |
| | |
| | | const addLine = () => { |
| | | const obj = { |
| | | id: null, |
| | | documentId: null, |
| | | documentBorrowId: null, |
| | | fileName: '', |
| | | number: '', |
| | | distributionDeptName: '', |
| | | distributionSign: '', |
| | | distributionDate: '', |
| | | distributionNum: null, |
| | | collectionDeptName: '', |
| | | collectionSign: '', |
| | | collectionDate: '', |
| | | borrowDate: '', |
| | | controlledState: '', |
| | | collectionNum: null, |
| | | backSign: '', |
| | | backDate: '', |
| | | remark: '' |
| | | } |
| | | state.form.documentBorrowCopyRecordList.push(obj); |
| | |
| | | } |
| | | }) |
| | | state.form.documentBorrowCopyRecordList = res.data.documentBorrowCopyRecordList?.map( |
| | | ({ id, documentId, fileName, number, distributionDeptName, distributionSign, distributionDate, distributionNum, collectionDeptName, collectionSign, collectionDate, collectionNum, remark}) => ({ |
| | | id, documentId, fileName, number, distributionDeptName, distributionSign, distributionDate, distributionNum, collectionDeptName, collectionSign, collectionDate, collectionNum, remark |
| | | ({ id, documentBorrowId, fileName, number, borrowDate, controlledState, collectionNum, backSign, backDate, remark}) => ({ |
| | | id, documentBorrowId, fileName, number, borrowDate, controlledState, collectionNum, backSign, backDate, remark |
| | | }) |
| | | ) |
| | | state.oldDeviceList = state.form.documentBorrowCopyRecordList |
| | |
| | | } |
| | | |
| | | const getDeptList = async ()=>{ |
| | | state.form.tabulationId = null |
| | | state.form.tabulationName = '' |
| | | await getUserList(state.form.companyId) |
| | | // await getUserList(state.form.companyId) |
| | | } |
| | | |
| | | const getUserList = async (companyId)=> { |
| | |
| | | companyId: null, |
| | | name: '', |
| | | documentBorrowCopyRecordList: [], |
| | | deleteIds: [], |
| | | tabulationId: null, |
| | | tabulationName: '', |
| | | tabulationDate: '' |
| | | deleteIds: [] |
| | | } |
| | | superRef.value.clearValidate(); |
| | | superRef.value.resetFields() |