| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="附件材料:" prop="remark"> |
| | | <el-upload v-model:file-list="fileList" :action="upload.url" multiple ref="fileUpload" auto-upload |
| | | :headers="upload.headers" :before-upload="handleBeforeUpload" :on-error="handleUploadError" |
| | | :on-success="handleUploadSuccess" :on-remove="handleRemove"> |
| | | <el-button type="primary" v-if="operationType !== 'view'">上传</el-button> |
| | | <template #tip v-if="operationType !== 'view'"> |
| | | <div class="el-upload__tip"> |
| | | 文件格式支持 |
| | | doc,docx,xls,xlsx,ppt,pptx,pdf,txt,xml,jpg,jpeg,png,gif,bmp,rar,zip,7z |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row :gutter="30">--> |
| | | <!-- <el-col :span="24">--> |
| | | <!-- <el-form-item label="附件材料:" prop="remark">--> |
| | | <!-- <el-upload v-model:file-list="fileList" :action="upload.url" multiple ref="fileUpload" auto-upload--> |
| | | <!-- :headers="upload.headers" :before-upload="handleBeforeUpload" :on-error="handleUploadError"--> |
| | | <!-- :on-success="handleUploadSuccess" :on-remove="handleRemove">--> |
| | | <!-- <el-button type="primary" v-if="operationType !== 'view'">上传</el-button>--> |
| | | <!-- <template #tip v-if="operationType !== 'view'">--> |
| | | <!-- <div class="el-upload__tip">--> |
| | | <!-- 文件格式支持--> |
| | | <!-- doc,docx,xls,xlsx,ppt,pptx,pdf,txt,xml,jpg,jpeg,png,gif,bmp,rar,zip,7z--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-upload>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | 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() |