diff --git a/src/views/inout/DialogInvoice.vue b/src/views/inout/DialogInvoice.vue index 049457e..27cdbc9 100644 --- a/src/views/inout/DialogInvoice.vue +++ b/src/views/inout/DialogInvoice.vue @@ -22,32 +22,32 @@ - + - - + + - + - - + + - + @@ -67,7 +67,7 @@ - + @@ -104,12 +104,13 @@ - - 文件预览 - + + 文件预览 + - + @@ -126,7 +127,7 @@ import store from "@/store"; import {insertCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert"; import {updateById} from '@/api/inout/orderDetailBiz' import ElImageViewer from "element-ui/packages/image/src/image-viewer"; -import { previewImage } from '@/api/purchase/supCompany' +import {previewImage} from '@/api/purchase/supCompany' export default { @@ -145,24 +146,24 @@ export default { }, data() { return { - imgList:[], - imgViewerVisible:false, + imgList: [], + imgViewerVisible: false, BASE_URL: process.env.VUE_APP_BASE_API, code: "", formData: { - ggxh:"", - cpmctymc:"", - machineNo:"", - invoiceCode:"", - invoiceEncode:"", - price:"", - remark:"", - licenseUrl:"" + ggxh: "", + cpmctymc: "", + machineNo: "", + invoiceCode: "", + invoiceEncode: "", + price: "", + remark: "", + licenseUrl: "" }, formRules: { - machineNo: [ - {required: true, message: "请输入机械编码", trigger: "blur"} - ], + // machineNo: [ + // {required: true, message: "请输入机器编码", trigger: "blur"} + // ], invoiceCode: [ {required: true, message: "请输入发票代码", trigger: "blur"} ], @@ -170,10 +171,10 @@ export default { {required: true, message: "请输入发票编码", trigger: "blur"} ], price: [ - {required : true, message: "请输入发票价格", trigger:"blur"} + {required: true, message: "请输入发票价格", trigger: "blur"} ], remark: [ - {required : true, message: "请输入备注", trigger:"blur"} + {required: true, message: "请输入备注", trigger: "blur"} ], }, loading: false, @@ -185,43 +186,43 @@ export default { }; }, components: { - draggable,ElImageViewer + draggable, ElImageViewer }, methods: { submitUpload() { this.$refs["dataForm"].validate(valid => { - if (valid) { - if (this.$isBlank(this.inputQuery.machineNo)) { - this.$message.error("机械编码不能为空!"); - return; - } - if (this.$isBlank(this.inputQuery.invoiceCode)) { - this.$message.error("发票代码不能为空!"); - return; - } - if (this.$isBlank(this.inputQuery.invoiceEncode)) { - this.$message.error("发票编码不能为空!"); - return; - } - if (this.$isBlank(this.inputQuery.price)) { - this.$message.error("发票价格不能为空!"); - return; - } - if (this.$isBlank(this.inputQuery.remark)) { - this.$message.error("备注不能为空!"); - return; - } - updateById(this.inputQuery).then((res) => { - if (res.code == 20000) { - this.$message({ - type: "success", - message: "修改成功!", - }); - this.closeDialog(); - } - - }) + if (valid) { + // if (this.$isBlank(this.inputQuery.machineNo)) { + // this.$message.error("机器编码不能为空!"); + // return; + // } + if (this.$isBlank(this.inputQuery.invoiceCode)) { + this.$message.error("发票代码不能为空!"); + return; } + if (this.$isBlank(this.inputQuery.invoiceEncode)) { + this.$message.error("发票编码不能为空!"); + return; + } + if (this.$isBlank(this.inputQuery.price)) { + this.$message.error("发票价格不能为空!"); + return; + } + if (this.$isBlank(this.inputQuery.remark)) { + this.$message.error("备注不能为空!"); + return; + } + updateById(this.inputQuery).then((res) => { + if (res.code == 20000) { + this.$message({ + type: "success", + message: "修改成功!", + }); + this.closeDialog(); + } + + }) + } }) }, @@ -267,7 +268,7 @@ export default { // // }, uploadHandleRemove(file, fileList) { - this.inputQuery.licenseUrl=null; + this.inputQuery.licenseUrl = null; console.log(file, fileList); }, uploadHandlePreview(file) { @@ -306,7 +307,7 @@ export default { uploadHandleSuccess(response, file, fileList) { if (response.code === 20000) { this.inputQuery.licenseUrl = response.data.name; - // this.onSubmit(); + // this.onSubmit(); } else { this.$message.error("文件上传失败:" + response.message); } @@ -314,24 +315,28 @@ export default { uploadHandleError() { }, - showImgViewer(){ + showImgViewer() { this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - this.imgList=[]; - previewImage({imageUrl:this.inputQuery.licenseUrl,certFileUrl:this.certFileUrl}).then(response => { + this.imgList = []; + previewImage({imageUrl: this.inputQuery.licenseUrl, certFileUrl: this.certFileUrl}).then(response => { if (response.code === 20000) { - this.imgList=response.data; + this.imgList = response.data; } console.log(this.imgList) this.imgViewerVisible = true; }); - const m = (e) => { e.preventDefault() }; + const m = (e) => { + e.preventDefault() + }; document.body.style.overflow = 'hidden'; document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, - closeImgViewer(){ + closeImgViewer() { this.imgViewerVisible = false; - const m = (e) => { e.preventDefault() }; + const m = (e) => { + e.preventDefault() + }; document.body.style.overflow = 'auto'; document.removeEventListener("touchmove", m, true); }, diff --git a/src/views/inout/InvoiceCkeck.vue b/src/views/inout/InvoiceCkeck.vue index 262aacc..c35fd0f 100644 --- a/src/views/inout/InvoiceCkeck.vue +++ b/src/views/inout/InvoiceCkeck.vue @@ -31,7 +31,7 @@ - + 草稿保存 + >草稿保存 提交审核 + >提交审核 提交审核 + >提交审核 选入资质证书 + >选入资质证书 添加资质证书 + >添加资质证书 @@ -245,13 +245,15 @@ type="text" size="small" @click.native="addCert(scope.row)" - >编辑编辑 + 预览预览 + 删除删除 + 说明说明 + @@ -347,7 +351,7 @@ import { getSubCompany, } from "@/api/supplier/supCompany"; import store from "@/store/index"; -import { regionDataPlus, CodeToText } from "element-china-area-data"; +import {regionDataPlus, CodeToText} from "element-china-area-data"; import { filterCompanyCert, deleteCompanyCert, @@ -356,8 +360,8 @@ import { import companyAddCert from "@/views/purchase/cert/supCertAddDialog"; import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog"; import draggable from "vuedraggable"; -import { getCompany } from "@/api/supplier/company"; -import { previewImage } from "@/api/purchase/supCompany"; +import {getCompany} from "@/api/supplier/company"; +import {previewImage} from "@/api/purchase/supCompany"; import ElImageViewer from "element-ui/packages/image/src/image-viewer"; export default { @@ -535,7 +539,8 @@ export default { this.getCompanyCertList(); this.selectedOptions = this.inputQuery.areaCode.split(","); }) - .catch(() => {}); + .catch(() => { + }); }, onModifySubmit(val) { @@ -565,7 +570,8 @@ export default { } }); }) - .catch(() => {}); + .catch(() => { + }); } else { return false; } @@ -578,7 +584,7 @@ export default { var str = "是否确定提交审核?"; } else if (val == 2) { var str = "企业信息已拒绝审核,是否确认重新提交审核?"; - } else { + } else { var str = "企业信息已通过审核,是否确认重新提交审核?"; } this.$refs["inputQuery"].validate((valid) => { @@ -602,7 +608,8 @@ export default { } }); }) - .catch(() => {}); + .catch(() => { + }); } else { return false; } @@ -610,7 +617,8 @@ export default { } }, - onAuditSubmit() {}, + onAuditSubmit() { + }, disableCert(row, status) { row.status = status; @@ -720,7 +728,8 @@ export default { confirmButtonText: "确定", type: "warning", showCancelButton: false, - }).then(() => {}); + }).then(() => { + }); }, deleteCompanyCert(row) { this.$confirm("是否删除?", "提示", { @@ -751,7 +760,8 @@ export default { this.certLoading = false; }); }) - .catch(() => {}); + .catch(() => { + }); }, }, filters: {