| | |
| | | data: query, |
| | | }); |
| | | } |
| | | |
| | | // 计éå¨å
·å°è´¦-æ°å¢ |
| | | // /measuringInstrumentLedger/add |
| | | export function addMeasuringInstrumentLedger(data){ |
| | | return request({ |
| | | url:"/measuringInstrumentLedger/add", |
| | | method:"post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 计éå¨å
·å°è´¦-ç¼è¾ |
| | | // /measuringInstrumentLedger/update |
| | | export function updateMeasuringInstrumentLedger(data){ |
| | | return request({ |
| | | url:"/measuringInstrumentLedger/update", |
| | | method:"post", |
| | | data |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | |
| | | </template> |
| | | |
| | | <script setup> |
| | | |
| | | </script> |
| | |
| | | ref="formRef" |
| | | > |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计éå¨å
·ç¼å·ï¼" prop="code"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åºåç¼å·ï¼" prop="code"> |
| | | <el-input |
| | | v-model="form.code" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计éå¨å
·åç§°ï¼" prop="name"> |
| | | <el-input |
| | | v-model="form.name" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·ï¼" prop="model"> |
| | | <el-form-item label="å®è£
ä½ç½®ï¼" prop="installationLocation"> |
| | | <el-input |
| | | v-model="form.installationLocation" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£å®åä½ï¼" prop="unit"> |
| | | <el-input |
| | | v-model="form.unit" |
| | | placeholder="请è¾å
¥æ£å®åä½" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è¯ä¹¦ç¼å·ï¼" prop="model"> |
| | | <el-input |
| | | v-model="form.model" |
| | | placeholder="请è¾å
¥" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é¢è®¡ä¸æ¬¡æ£å®æ¥æï¼" prop="nextDate"> |
| | | <el-form-item label="ææ°é´å®æ¥æï¼" prop="mostDate"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="form.nextDate" |
| | | v-model="form.mostDate" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æææ¥æ(天)ï¼" prop="valid"> |
| | | <el-input |
| | | v-model="form.valid" |
| | | placeholder="请è¾å
¥æææå¤©æ°" |
| | | clearable |
| | | > |
| | | <template #append>æ¥</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£å®å¨æï¼" prop="cycle"> |
| | | <el-input |
| | | v-model="form.cycle" |
| | | placeholder="请è¾å
¥æ£å®å¨æ" |
| | | clearable |
| | | /> |
| | | </el-form-item> |
| | |
| | | style="width: 100%" |
| | | v-model="form.recordDate" |
| | | value-format="YYYY-MM-DD" |
| | | disabled |
| | | format="YYYY-MM-DD" |
| | | type="date" |
| | | placeholder="è¯·éæ©" |
| | |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {afterSalesServiceAdd, afterSalesServiceUpdate} from "@/api/customerService/index.js"; |
| | | import {getToken} from "@/utils/auth.js"; |
| | | import {measuringInstrumentAdd, measuringInstrumentUpdate} from "@/api/equipmentManagement/measurementEquipment.js"; |
| | | import {addMeasuringInstrumentLedger, updateMeasuringInstrumentLedger} from "@/api/equipmentManagement/measurementEquipment.js"; |
| | | import { getCurrentDate } from "@/utils/index.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | |
| | | const data = reactive({ |
| | | form: { |
| | | code: "", |
| | | name: "", |
| | | installationLocation: "", |
| | | mostDate:"", |
| | | model: "", |
| | | cycle:"", |
| | | validDate: "", |
| | | nextDate: "", |
| | | userId: "", |
| | |
| | | }, |
| | | rules: { |
| | | code: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | name: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | model: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | validDate: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | nextDate: [{required: true, message: "è¯·éæ©", trigger: "change"}], |
| | | userId: [{required: true, message: "è¯·éæ©", trigger: "change"}], |
| | | recordDate: [{required: true, message: "è¯·éæ©", trigger: "change"}], |
| | | installationLocation: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | mostDate: [{required: true, message: "è¯·éæ©", trigger: "change"}], |
| | | cycle: [{required: true, message: "è¯·éæ©", trigger: "blur"}], |
| | | valid: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | unit: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | } |
| | | }) |
| | | const { form, rules } = toRefs(data); |
| | |
| | | proxy.$refs["formRef"].validate(valid => { |
| | | if (valid) { |
| | | if (operationType.value === "add") { |
| | | measuringInstrumentAdd(form.value).then(response => { |
| | | addMeasuringInstrumentLedger(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("æ°å¢æå") |
| | | form.value.tempFileIds = [] |
| | | closeDia() |
| | | }) |
| | | } else { |
| | | measuringInstrumentUpdate(form.value).then(response => { |
| | | updateMeasuringInstrumentLedger(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("ä¿®æ¹æå") |
| | | form.value.tempFileIds = [] |
| | | closeDia() |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogFormVisible" |
| | | title="æ£å®æ ¡åè®°å½" |
| | | width="50%" |
| | | @close="closeDia" |
| | | > |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :tableLoading="tableLoading" |
| | | @selection-change="handleSelectionChange" |
| | | height="500" |
| | | :isPagination="false" |
| | | > |
| | | </PIMTable> |
| | | <pagination |
| | | style="margin: 10px 0" |
| | | v-show="total > 0" |
| | | @pagination="paginationSearch" |
| | | :total="total" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | /> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <filePreview ref="filePreviewRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import filePreview from '@/components/filePreview/index.vue' |
| | | import {ledgerRecordListPage} from "@/api/equipmentManagement/calibration.js"; |
| | | import Pagination from "@/components/PIMTable/Pagination.vue"; |
| | | const emit = defineEmits(['close']) |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const currentId = ref('') |
| | | const selectedRows = ref([]); |
| | | const filePreviewRef = ref() |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "æ£å®æ¥æ", |
| | | prop: "recordDate", |
| | | width: 130, |
| | | }, |
| | | { |
| | | label: "计éå¨å
·ç¼å·", |
| | | prop: "code", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "计éå¨å
·åç§°", |
| | | prop: "name", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "model", |
| | | width:200 |
| | | }, |
| | | { |
| | | label: "æææ", |
| | | prop: "valid", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å½å
¥äºº", |
| | | prop: "userName", |
| | | }, |
| | | { |
| | | label: "å½å
¥æ¥æ", |
| | | prop: "entryDate", |
| | | width: 130, |
| | | }, |
| | | ]); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | }); |
| | | const total = ref(0); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (row,type) => { |
| | | dialogFormVisible.value = true; |
| | | currentId.value = row.id; |
| | | getList() |
| | | } |
| | | const paginationSearch = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | let query = { |
| | | measuringInstrumentLedgerId:currentId.value, |
| | | current : page.current, |
| | | size : page.size |
| | | } |
| | | ledgerRecordListPage(query).then(res => { |
| | | tableData.value = res?.data?.records || []; |
| | | total.value = res?.data?.total; |
| | | }) |
| | | } |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | </script> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :dbRowClick="dbRowClick" |
| | | ></PIMTable> |
| | | </div> |
| | | <form-dia ref="formDia" @close="handleQuery"></form-dia> |
| | | <calibration-dia ref="calibrationDia" @close="handleQuery"></calibration-dia> |
| | | <files-dia ref="filesDia"></files-dia> |
| | | <rowClickDataForm ref="rowClickData"></rowClickDataForm> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import CalibrationDia from "@/views/equipmentManagement/measurementEquipment/components/calibrationDia.vue"; |
| | | import { |
| | | measuringInstrumentDelete, |
| | | measuringInstrumentListPage |
| | | measuringInstrumentListPage, |
| | | } from "@/api/equipmentManagement/measurementEquipment.js"; |
| | | import FilesDia from "./filesDia.vue"; |
| | | import rowClickDataForm from "./components/rowClickData.vue" |
| | | const { proxy } = getCurrentInstance(); |
| | | const userStore = useUserStore() |
| | | |
| | |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "ç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return "ææ"; |
| | | } else if (params == 2) { |
| | | return "龿"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return "success"; |
| | | } else if (params == 2) { |
| | | return "danger"; |
| | | } else { |
| | | return null; |
| | | } |
| | | }, |
| | | label: "åºåç¼å·", |
| | | prop: "code", |
| | | minWidth:150, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "æè¿ä¸æ¬¡æ£å®æ¥æ", |
| | | label: "é¨é¨", |
| | | prop: "deptName", |
| | | width: 130, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "å®è£
ä½ç½®", |
| | | prop: "installationLocation", |
| | | width: 150, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "æ£å®åä½", |
| | | prop: "unit", |
| | | width: 200, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "è¯ä¹¦ç¼å·", |
| | | prop: "model", |
| | | width:200, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "ææ°é´å®æ¥æ", |
| | | prop: "mostDate", |
| | | width: 130, |
| | | }, |
| | | { |
| | | label: "计éå¨å
·ç¼å·", |
| | | prop: "code", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "计éå¨å
·åç§°", |
| | | prop: "name", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "model", |
| | | width:200 |
| | | }, |
| | | { |
| | | label: "æææ", |
| | | prop: "valid", |
| | | width: 130, |
| | | }, |
| | | { |
| | | label: "é¢è®¡ä¸æ¬¡æ£å®æ¥æ", |
| | | prop: "nextDate", |
| | | width: 130, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "å½å
¥äºº", |
| | | prop: "userName", |
| | | width: 130, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "å½å
¥æ¥æ", |
| | | prop: "recordDate", |
| | | align:"center", |
| | | minWidth: 130 |
| | | }, |
| | | { |
| | | label: "æææ¥æ", |
| | | prop: "valid", |
| | | width: 130, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "æ£å®å¨æ(天)", |
| | | prop: "cycle", |
| | | width: 130, |
| | | align:"center" |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | prop: "status", |
| | | width: 130, |
| | | align: "center", |
| | | formatData: (params) => { |
| | | if (params === 1) { |
| | | return "ææ"; |
| | | } else if (params === 2) { |
| | | return "龿"; |
| | | } else { |
| | | return null; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | fixed: 'right', |
| | | operation: [ |
| | | { |
| | | name: "æ£å®æ ¡å", |
| | | name: "éä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openFilesFormDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openCalibrationDia("verifying", row); |
| | | }, |
| | | }, |
| | | // { |
| | | // name: "éä»¶", |
| | | // type: "text", |
| | | // clickFun: (row) => { |
| | | // openFilesFormDia(row); |
| | | // }, |
| | | // }, |
| | | ], |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const rowClickData = ref([]) |
| | | const filesDia = ref() |
| | | const page = reactive({ |
| | | current: 1, |
| | |
| | | |
| | | // æå¼éä»¶å¼¹æ¡ |
| | | const openFilesFormDia = (row) => { |
| | | console.log(row) |
| | | nextTick(() => { |
| | | filesDia.value?.openDialog( row,'计éå¨å
·å°è´¦') |
| | | }) |
| | | }; |
| | | |
| | | const dbRowClick = (row)=>{ |
| | | rowClickData.value?.openDialog(row) |
| | | } |
| | | |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | |
| | | import { ref, computed, onMounted, reactive } from 'vue'; |
| | | import 'element-plus/dist/index.css'; |
| | | import Echarts from "@/components/Echarts/echarts.vue"; |
| | | import { getLedgerPage, getAssetInfo } from "@/api/equipmentManagement/ledger"; |
| | | import { getLedgerPage } from "@/api/equipmentManagement/ledger"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | // ç鿡件 |