| | |
| | | import {afterSalesServiceAdd, afterSalesServiceUpdate} from "@/api/customerService/index.js"; |
| | | import {getToken} from "@/utils/auth.js"; |
| | | import {ledgerRecordUpdate, ledgerRecordVerifying} from "@/api/equipmentManagement/calibration.js"; |
| | | import {delLedgerFile} from "@/api/salesManagement/salesLedger.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | const dialogFormVisible = ref(false); |
| | |
| | | recordDate: "", |
| | | userId: "", |
| | | entryDate: "", |
| | | tempFileIds: [] |
| | | }, |
| | | rules: { |
| | | code: [{required: true, message: "请输入", trigger: "blur"}], |
| | |
| | | |
| | | // 打开弹框 |
| | | const openDialog = (type, row) => { |
| | | console.log(row) |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | fileList.value = [] |
| | | if(type !== "add"){ |
| | | form.value.tempFileIds = []; |
| | | } |
| | | if (type === "edit") { |
| | | form.value.valid = row.valid; |
| | | form.value.recordDate = row.recordDate; |
| | | fileList.value = row.commonFiles; |
| | | } |
| | | if(type === "add"){ |
| | | fileList.value = row.commonFiles; |
| | | } |
| | | |
| | | form.value.id = row.id; |
| | | form.value.code = row.code; |
| | | form.value.name = row.name; |
| | |
| | | proxy.$modal.closeLoading(); |
| | | if (res.code === 200) { |
| | | file.tempId = res.data.tempId; |
| | | form.value.tempFileIds.push(file.tempId); |
| | | proxy.$modal.msgSuccess("上传成功"); |
| | | } else { |
| | | proxy.$modal.msgError(res.msg); |
| | |
| | | const submitForm = () => { |
| | | proxy.$refs["formRef"].validate(valid => { |
| | | if (valid) { |
| | | if (operationType.value === "add") { |
| | | if (operationType.value === "verifying") { |
| | | ledgerRecordVerifying(form.value).then(response => { |
| | | proxy.$modal.msgSuccess("检定校准成功") |
| | | closeDia() |