diff --git a/sgzb-ui/src/views/claimAndRefund/receive/agreement.vue b/sgzb-ui/src/views/claimAndRefund/receive/agreement.vue index 5767ca13..3092b2fe 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/agreement.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/agreement.vue @@ -96,7 +96,17 @@ - + + + 内部单位 + 外部单位 + + + + + {{scope.row.imgNameList[index]}} + + @@ -223,7 +233,7 @@ - + @@ -244,6 +254,7 @@ list-type="picture-card" accept=".png,.jpg,.jpeg" :on-success="handleAvatarSuccess" + :class="{ disabled: uploadDisabled }" :on-preview="handlePictureCardPreview" :on-remove="handleRemove"> @@ -354,6 +365,12 @@ export default { deptName: undefined, }; }, + computed: { + //图片上传1张后,隐藏上传框 + uploadDisabled() { + return this.checkUrlList.length > 4 + } + }, created() { this.getList(); this.getUnitList(); @@ -378,6 +395,12 @@ export default { this.loading = true; getAgreementList(this.queryParams).then(response => { this.agreementList = response.rows; + this.agreementList.forEach(item=>{ + if(item.fileUrl){ + item.imgUrlList = item.fileUrl.split(',') + item.imgNameList = item.fileName.split(',') + } + }) this.total = response.total; this.loading = false; } @@ -443,13 +466,13 @@ export default { }) }, handleAvatarSuccess(res,file) { - console.log("success") - }, - handleRemove(file, fileList) { + + }, + handleRemove(file,fileList) { let sum = 0; this.checkUrlNameList.forEach((item,index) => { if(item == file.name){ sum = index } }); this.checkUrlNameList.splice(sum, 1); - this.checkUrlList.splice(sum, 1); + this.checkUrlList.splice(sum, 1); }, //图片点击查看 handlePictureCardPreview(file) { @@ -480,7 +503,7 @@ export default { this.fileList = [] this.checkUrlList = [] this.checkUrlNameList = [] - if(response.data.fileUrl!=''){ + if(response.data.fileUrl&&response.data.fileUrl!=''){ let urlArr = response.data.fileUrl.split(',') let nameArr = response.data.fileName.split(',') for(let i=0;i \ No newline at end of file diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue index ca495774..4d7e3668 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveApplyAdd.vue @@ -577,7 +577,7 @@ export default { if(res.code == 200){ this.$message({ type:'success', - message: '申请成功' + message: res.msg }) this.$tab.closeOpenPage({ path: "/claimAndRefund/receive/receiveApply"}); } diff --git a/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue b/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue index e380fc6a..ffe62865 100644 --- a/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue +++ b/sgzb-ui/src/views/claimAndRefund/receive/receiveManage.vue @@ -93,7 +93,12 @@ - + + + {{ scope.row.leaseApplyInfoList[0].remark }} + + + - + + + {{ scope.row.leaseApplyInfoList[0].remark }} + + + { diff --git a/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue b/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue index f0f1775c..41e0575c 100644 --- a/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue +++ b/sgzb-ui/src/views/claimAndRefund/return/returnIn.vue @@ -155,25 +155,7 @@ - - - - - 待审核 - - - 已审核 - - - 退料核查 - - - 退料完成 - - - 退料驳回 - - + @@ -181,7 +163,7 @@ 查看 - + 退料 @@ -399,9 +381,9 @@ }, /** 导出按钮操作 */ handleExport() { - // this.download('material/backApply/exportExamine', { - // ...this.queryParams - // }, `退料审核单_${new Date().getTime()}.xlsx`) + this.download('base/backReceive/export', { + ...this.queryParams + }, `退料接收_${new Date().getTime()}.xlsx`) }, diff --git a/sgzb-ui/src/views/claimAndRefund/return/returnInDetail.vue b/sgzb-ui/src/views/claimAndRefund/return/returnInDetail.vue index b1e5abb8..75419576 100644 --- a/sgzb-ui/src/views/claimAndRefund/return/returnInDetail.vue +++ b/sgzb-ui/src/views/claimAndRefund/return/returnInDetail.vue @@ -68,7 +68,7 @@ - + diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue index 526c949f..f4b5d953 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesAccept.vue @@ -136,6 +136,7 @@ :show-file-list="true" list-type="picture-card" accept=".png,.jpg,.jpeg" + :class="{ disabled: uploadDisabled }" :on-preview="handlePictureCardPreview" :on-remove="handleRemove"> @@ -166,6 +167,7 @@ list-type="picture-card" accept=".png,.jpg,.jpeg" :on-preview="handlePictureCardPreview" + :class="{ disabled: uploadDisabled }" :on-remove="handleRemove"> @@ -360,6 +362,12 @@ export default { deptName: undefined, }; }, + computed: { + //图片上传1张后,隐藏上传框 + uploadDisabled() { + return this.checkUrlList.length > 4 + } + }, mounted() { const taskId = this.$route.query && this.$route.query.taskId; this.taskId = taskId; @@ -385,12 +393,9 @@ export default { this.equipmentList.forEach(item=>{ if(item.checkUrl){ item.imgUrlList = item.checkUrl.split(',') - item.imgNameList = item.checkUrlName.split(',') + item.imgNameList = item.checkUrlName.split(',') } - // console.log(item.checkUrl) - }) - this.loading = false; }) }, @@ -720,4 +725,10 @@ export default { width: 60px !important; margin-bottom: 10px; } +//隐藏图片上传框的css +::v-deep.disabled { + .el-upload--picture-card { + display: none; + } +} \ No newline at end of file diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue index 32efe817..c8e2aca9 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesCode.vue @@ -104,12 +104,12 @@ - + - - + - @@ -412,16 +412,11 @@ export default { /** 提交按钮 */ submitForm: function() { - console.log(this.codeList) - - // for(let i = 0; i < this.codeListt; i++) { - // if(this.codeList[i].maCode==''){ - // this.$modal.msgError("设备编码不能为空"); - // return false - // } - // } - - + // console.log(this.codeList) + if(this.hasDuplicateField(this.codeList, 'assetsCode')){ + this.$modal.msgError("固定资产编码绑定失败,存在重复编码,请重新输入"); + return false + } if(this.codeList.length==0){ this.$modal.msgError("无新增编码绑定"); }else{ @@ -437,9 +432,17 @@ export default { } }); } - - - + }, + hasDuplicateField(array, field) { + const map = {}; + for (let i = 0; i < array.length; i++) { + const value = array[i][field]; + if (map[value]) { + return true; + } + map[value] = true; + } + return false; }, getdetailmaCodeList(data){ console.log(data) diff --git a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue index 74b82f34..bcb45a3c 100644 --- a/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue +++ b/sgzb-ui/src/views/store/newBuy/newDevices/newDevicesWarehousing.vue @@ -161,7 +161,7 @@ 数量管理 - + 未入库 diff --git a/sgzb-ui/src/views/store/shelves/shelvesConfig.vue b/sgzb-ui/src/views/store/shelves/shelvesConfig.vue index 991dfa76..f7a5f1f7 100644 --- a/sgzb-ui/src/views/store/shelves/shelvesConfig.vue +++ b/sgzb-ui/src/views/store/shelves/shelvesConfig.vue @@ -30,9 +30,9 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{dict.label}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 将文件拖到此处,或点击上传 - - - 是否更新已经存在的用户数据 - - 仅允许导入xls、xlsx格式文件。 - 下载模板 - - - - + @@ -402,9 +257,6 @@ export default { created() { this.getList(); this.getDeptTree(); - // this.getConfigKey("sys.user.initPassword").then(response => { - // this.initPassword = response.msg; - // }); }, methods: { /** 查询用户列表 */ @@ -479,59 +331,16 @@ export default { /** 新增按钮操作 */ handleAdd() { - this.reset(); - getUser().then(response => { - this.postOptions = response.posts; - this.roleOptions = response.roles; - this.open = true; - this.title = "添加用户"; - this.form.password = this.initPassword; - }); + }, /** 修改按钮操作 */ handleUpdate(row) { - this.reset(); - const houseId = row.houseId || this.ids; - getUser(houseId).then(response => { - this.form = response.data; - this.postOptions = response.posts; - this.roleOptions = response.roles; - this.$set(this.form, "postIds", response.postIds); - this.$set(this.form, "roleIds", response.roleIds); - this.open = true; - this.title = "修改用户"; - this.form.password = ""; - }); - }, - /** 提交按钮 */ - submitForm: function() { - this.$refs["form"].validate(valid => { - if (valid) { - if (this.form.houseId != undefined) { - updateHouseSet(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); - } else { - addHouseSet(this.form).then(response => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); - } - } - }); + }, + /** 删除按钮操作 */ handleDelete(row) { - const houseIds = row.houseId || this.ids; - this.$modal.confirm('是否确认删除编号为"' + houseIds + '"的数据项?').then(function() { - return delHouseSet(houseIds); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + }, /** 导出按钮操作 */ handleExport() { @@ -539,32 +348,9 @@ export default { // ...this.queryParams // }, `user_${new Date().getTime()}.xlsx`) }, - /** 导入按钮操作 */ - handleImport() { - this.upload.title = "用户导入"; - this.upload.open = true; - }, - /** 下载模板操作 */ - importTemplate() { - this.download('system/user/importTemplate', { - }, `user_template_${new Date().getTime()}.xlsx`) - }, - // 文件上传中处理 - handleFileUploadProgress(event, file, fileList) { - this.upload.isUploading = true; - }, - // 文件上传成功处理 - handleFileSuccess(response, file, fileList) { - this.upload.open = false; - this.upload.isUploading = false; - this.$refs.upload.clearFiles(); - this.$alert("" + response.msg + "", "导入结果", { dangerouslyUseHTMLString: true }); - this.getList(); - }, - // 提交上传文件 - submitFileForm() { - this.$refs.upload.submit(); - } + + + } };