diff --git a/src/views/modules/workRecord/weekrecordinfo.vue b/src/views/modules/workRecord/weekrecordinfo.vue index 352a8863..f7ab53b0 100644 --- a/src/views/modules/workRecord/weekrecordinfo.vue +++ b/src/views/modules/workRecord/weekrecordinfo.vue @@ -66,8 +66,8 @@ - - + + @@ -149,6 +149,10 @@ export default { } }, methods: { + dateFormat (row, column) { + let date = row[column.property] + return date.length >= 10 ? date.substring(0, 10) : date + }, addHandle (id, disabled, isAdd) { this.$parent.selectComponent = 'WeekrecordinfoDetail' this.$router.push({ path: '/workRecord-weekrecordinforoute', query: { id: id, disabled: disabled, isAdd: isAdd } }) diff --git a/src/views/modules/workRecord/weekrecordinfoDetail.vue b/src/views/modules/workRecord/weekrecordinfoDetail.vue index 9115d1a8..c3dcbbe4 100644 --- a/src/views/modules/workRecord/weekrecordinfoDetail.vue +++ b/src/views/modules/workRecord/weekrecordinfoDetail.vue @@ -188,8 +188,8 @@ export default { }, // ----------文件上传下载---------- handleFileCardPreview (file) { - window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}` - // window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}` + // window.location.href = `${window.SITE_CONFIG['apiURL']}/oss/file/download?fileUrl=${file.url}` + window.location.href = `http://219.146.91.110:10000/epdc-api/oss/file/download?fileUrl=${file.url}` }, beforeFileRemove (file, fileList) { return this.$confirm(`确定移除${file.name}?`) @@ -243,6 +243,28 @@ export default { }, // 表单提交 dataFormSubmitHandle: debounce(function () { + // 统计项非0校验 + let remindInfo = '' + for (var i = 0; i < this.dataForm.totalConfigList.length; i++) { + for (var j = 0; j < this.dataForm.totalConfigList[i].configList.length; j++) { + if (this.dataForm.totalConfigList[i].configList[j].total <= 0 && this.dataForm.totalConfigList[i].showFlag === '1') { + remindInfo += '第' + (i + 1) + '项、' + break + } + } + } + if (remindInfo.length > 0) { + remindInfo = remindInfo.substring(0, remindInfo.length - 1) + this.$confirm(remindInfo + '存在未完善信息,请完善后提交!', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + // 确定逻辑 + }).catch(() => {}) + return false + } + // 表单提交后台 this.$refs['dataForm'].validate((valid) => { if (!valid) { return false