diff --git a/src/main.js b/src/main.js index d12c5eb6..2e890fb0 100644 --- a/src/main.js +++ b/src/main.js @@ -97,6 +97,7 @@ DictData.install(); // 修改 el-dialog 默认点击遮照为不关闭 Element.Dialog.props.closeOnClickModal.default = false; + Vue.use(Element, { size: Cookies.get("size") || "mini", // set element-ui default size }); diff --git a/src/views/basic/product/product.vue b/src/views/basic/product/product.vue index 71bab954..693b770b 100644 --- a/src/views/basic/product/product.vue +++ b/src/views/basic/product/product.vue @@ -2247,7 +2247,7 @@ export default { .itemTag { float: left; text-align: right; - margin-top: 5px; + margin-top: 10px; padding-right: 10px; width: 35%; } diff --git a/src/views/inventory/InvCountOrderModify.vue b/src/views/inventory/InvCountOrderModify.vue index 2984a68b..7aa2aa8f 100644 --- a/src/views/inventory/InvCountOrderModify.vue +++ b/src/views/inventory/InvCountOrderModify.vue @@ -531,6 +531,10 @@ export default { this.$message.warning("请先选择盘点仓库"); return; } + // if (this.codeArray.length === 0) { + // this.$message.warning("请先录入产品"); + // return; + // } //拉取整个仓库的数据 let params = { invCode: this.formData.invCode, diff --git a/src/views/purchase/product/supProductEditDialog.vue b/src/views/purchase/product/supProductEditDialog.vue index 93cc78c1..aa59deaa 100644 --- a/src/views/purchase/product/supProductEditDialog.vue +++ b/src/views/purchase/product/supProductEditDialog.vue @@ -240,7 +240,8 @@ > + highlight-current-row + > @@ -291,7 +292,8 @@ + :url-list="imgList" + /> { this.$refs['inputQuery'].validate(valid => { if (valid) { // this.inputQuery.auditStatus = val; - - let formData = JSON.parse(JSON.stringify(this.inputQuery)); - formData.manufacturerIdFk = this.manufacturerId; - formData.auditStatus = val; - this.loading = true; - let urlName = this.editType == 0 ? 'add' : 'update'; + let formData = JSON.parse(JSON.stringify(this.inputQuery)) + formData.manufacturerIdFk = this.manufacturerId + formData.auditStatus = val + this.loading = true + let urlName = this.editType == 0 ? 'add' : 'update' addOrModifyRegistration(formData, urlName).then(response => { - this.loading = false; + this.loading = false if (response.code === 20000) { - this.closeRegistrationDialog(true); - this.$message.success("保存成功"); + this.closeRegistrationDialog(true) + this.$message.success('保存成功') } else { - this.$message.error(response.message); + this.$message.error(response.message) } - }); + }) } else { - return false; + return false } - }); - }); - }else{ + }) + }) + } else { this.$refs['inputQuery'].validate(valid => { if (valid) { // this.inputQuery.auditStatus = val; - - let formData = JSON.parse(JSON.stringify(this.inputQuery)); - formData.manufacturerIdFk = this.manufacturerId; - formData.auditStatus = val; - this.loading = true; - let urlName = this.editType == 0 ? 'add' : 'update'; + let formData = JSON.parse(JSON.stringify(this.inputQuery)) + formData.manufacturerIdFk = this.manufacturerId + formData.auditStatus = val + this.loading = true + let urlName = this.editType == 0 ? 'add' : 'update' addOrModifyRegistration(formData, urlName).then(response => { - this.loading = false; + this.loading = false if (response.code === 20000) { - this.closeRegistrationDialog(true); - this.$message.success("保存成功"); + this.closeRegistrationDialog(true) + this.$message.success('保存成功') } else { - this.$message.error(response.message); + this.$message.error(response.message) } - }); + }) } else { - return false; + return false } - }); + }) } }, toViewCompanyCert(row) { - window.open(this.certFileUrl + row.filePath); + window.open(this.certFileUrl + row.filePath) }, rejectInfo(row) { - this.$confirm(row.auditComment, "拒绝说明", { - confirmButtonText: "确定", - type: "warning", - showCancelButton: false, + this.$confirm(row.auditComment, '拒绝说明', { + confirmButtonText: '确定', + type: 'warning', + showCancelButton: false }) .then(() => { - }); + }) }, findMethod(query) { - this.fromOptions = []; + this.fromOptions = [] let cQuery = { - companyName: query, - }; + companyName: query + } getSupComapnys(cQuery) .then((response) => { - this.loading = false; - this.fromOptions = response.data.list || []; + this.loading = false + this.fromOptions = response.data.list || [] }) .catch(() => { - this.loading = false; - }); + this.loading = false + }) }, supChange(val) { - this.pmQuery.customerId = val; - this.findPMMethod(); + this.pmQuery.customerId = val + this.findPMMethod() }, findPMMethod(key) { - this.fromPMOptions = []; - this.pmQuery.companyName = key; + this.fromPMOptions = [] + this.pmQuery.companyName = key getCompanyList(this.pmQuery) .then((response) => { - this.loading = false; - this.fromPMOptions = response.data.list || []; - this.total = response.data.total || 0; + this.loading = false + this.fromPMOptions = response.data.list || [] + this.total = response.data.total || 0 }) .catch(() => { - this.loading = false; - this.fromPMOptions = []; - this.total = 0; - }); + this.loading = false + this.fromPMOptions = [] + this.total = 0 + }) }, closeLocalDialog() { - this.addCertVisible = false; - this.selectCertVisible = false; - this.getCompanyCertList(); + this.addCertVisible = false + this.selectCertVisible = false + this.getCompanyCertList() }, isAssetTypeAnImage(ext) { return [ - 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1; + 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1 }, showImgViewer(row) { - this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - this.imgList = []; - previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { - if (response.code === 20000) { - this.imgList=response.data; - } - }); - this.imgViewerVisible = true; - const m = (e) => { - e.preventDefault() - }; - document.body.style.overflow = 'hidden'; - document.addEventListener("touchmove", m, false); // 禁止页面滑动 + this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' + this.imgList = [] + previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { + if (response.code === 20000) { + this.imgList = response.data + } + }) + this.imgViewerVisible = true + const m = (e) => { + e.preventDefault() + } + document.body.style.overflow = 'hidden' + document.addEventListener('touchmove', m, false) // 禁止页面滑动 }, closeImgViewer() { - this.imgViewerVisible = false; + this.imgViewerVisible = false const m = (e) => { e.preventDefault() - }; - document.body.style.overflow = 'auto'; - document.removeEventListener("touchmove", m, true); + } + document.body.style.overflow = 'auto' + document.removeEventListener('touchmove', m, true) }, closeSelDialog(val) { @@ -703,108 +702,108 @@ export default { companyName: this.inputQuery.companyName, auditStatus: this.inputQuery.auditStatus - }; + } bindProduct(query).then(response => { - this.loading = false; + this.loading = false if (response.code === 20000) { - this.inputQuery = response.data; - this.inputQuery.manufacturerId=this.inputQuery.manufacturerIdFk - this.selectSingleProductVisible = false; + this.inputQuery = response.data + this.inputQuery.manufacturerId = this.inputQuery.manufacturerIdFk + this.selectSingleProductVisible = false // this.inputQuery.recordCode = val.zczbhhzbapzbh//把注册证号覆盖掉 } else { - this.$message.error(response.message); + this.$message.error(response.message) } - }); + }) } + console.log('111' + this.inputQuery.companyName) }, addCert(row) { if (this.$isNotBlank(row)) { this.formName = 2 - this.inputQuery.formData = row; - this.editTye = 2; + this.inputQuery.formData = row + this.editTye = 2 } else { - this.formName = 1; - this.editTye = 1; - this.inputQuery.formData = {}; + this.formName = 1 + this.editTye = 1 + this.inputQuery.formData = {} } - this.addCertVisible = true; + this.addCertVisible = true }, selectCert() { - this.customerId = this.inputQuery.customerId; - this.selectCertVisible = true; + this.customerId = this.inputQuery.customerId + this.selectCertVisible = true }, deleteCompanyCert(row) { - this.$confirm("是否删除?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", + this.$confirm('是否删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' }).then(() => { - this.certLoading = true; + this.certLoading = true let tquery = { id: row.id, - filePath: row.filePath, - }; + filePath: row.filePath + } deleteCompanyCert(tquery) .then((response) => { - this.certLoading = false; + this.certLoading = false if (response.code === 20000) { - this.getCompanyCertList(); + this.getCompanyCertList() this.$message({ - type: "success", - message: "删除成功!", - }); + type: 'success', + message: '删除成功!' + }) } else { - this.$message.error(response.message); + this.$message.error(response.message) } }) .catch(() => { - this.certLoading = false; - }); + this.certLoading = false + }) }).catch(() => { - }); + }) }, certHandleCurrentChange(val) { - this.certQuery.page = val.page; - this.getCompanyCertList(); + this.certQuery.page = val.page + this.getCompanyCertList() }, getCompanyCertList() { - this.certLoading = true; - this.certQuery.customerId = this.inputQuery.customerId; - this.certQuery.manufacturerIdFk = this.inputQuery.manufacturerIdFk; - this.certQuery.productIdFk = this.inputQuery.productId; + this.certLoading = true + this.certQuery.customerId = this.inputQuery.customerId + this.certQuery.manufacturerIdFk = this.inputQuery.manufacturerIdFk + this.certQuery.productIdFk = this.inputQuery.productId filterCompanyCert(this.certQuery) .then((response) => { - this.certLoading = false; - this.certList = response.data.list || []; + this.certLoading = false + this.certList = response.data.list || [] this.certTotal = response.data.total }) .catch(() => { - this.certLoading = false; - this.certList = []; - }); + this.certLoading = false + this.certList = [] + }) }, - selectProduct() { - this.selectSingleProductVisible = true; - }, + this.selectSingleProductVisible = true + } }, filters: { statusFilterType(status) { const statusMap = { - 0: "warning", - 1: "success", - 2: "danger", - 6: "warning", - }; - return statusMap[status]; - }, - }, + 0: 'warning', + 1: 'success', + 2: 'danger', + 6: 'warning' + } + return statusMap[status] + } + } -}; +}