+
只能上传PDF、excel、word、图片、压缩包,且不超过50MB
+
-
暂未上传
+
暂未上传
@@ -1220,16 +1217,22 @@
},
handleSupplierMaterialRemove(scope, fileList) {
- scope.row['attachment'] = fileList
+ scope.row['attachment'] = fileList.map(file => ({
+ uri: file.response.data.url,
+ name: file.name
+ }))
},
removeSupplierMaterialAttachment(scope, attachmentToRemove) {
- scope.row['attachment'] = scope.row['attachment'].filter(item => item === attachmentToRemove)
+ scope.row['attachment'] = scope.row['attachment'].filter(item => item !== attachmentToRemove)
},
handleSupplierMaterialExceed(scope, files, fileList) {
this.$message.warning("当前限制选择只能选择10个文件");
- scope.row['attachment'] = fileList
+ scope.row['attachment'] = fileList.map(file => ({
+ uri: file.response.data.url,
+ name: file.name
+ }))
},
beforeSupplierMaterialRemove(scope, file, fileList) {
@@ -1242,19 +1245,16 @@
handleSupplierMaterialFileUploaded(scope, response, file, fileList) {
if (response.success) {
- let attachments = scope.row['attachment']
+ let attachments = scope.row.attachment
if (isEmpty(attachments)) {
attachments = []
- scope.row['attachment'] = attachments
}
attachments.push({
uri: response.data.url,
name: file.name
})
- console.log(attachments)
- console.log(scope.row['attachment'])
-
+ scope.row.attachment = attachments
this.$message.success("上传成功");
}
else {
@@ -1269,6 +1269,7 @@
addSupplierRow() {
this.supplierMaterialsForm.push({
rowKey: this.rowKeyCounter++,
+ attachment: []
})
},
@@ -1402,6 +1403,15 @@
// this.handleSelectProject({ id: 135 })
this.applyDeptSectorOptions = JSON.parse('${applyDeptSectorOptions}')
},
+ filters: {
+ ellipsis(value, limit = 40) {
+ if (!value) return ''
+ if (value.length > limit) {
+ return value.slice(0, limit) + '...'
+ }
+ return value
+ }
+ }
})
diff --git a/src/main/resources/templates/admin/business/process-review.ftl b/src/main/resources/templates/admin/business/process-review.ftl
index dc871d4..73708ba 100644
--- a/src/main/resources/templates/admin/business/process-review.ftl
+++ b/src/main/resources/templates/admin/business/process-review.ftl
@@ -222,29 +222,25 @@
'Content-Type': 'application/json',
},
body: JSON.stringify(form),
- }).then(response => {
- if (response.ok) {
- // 关闭对话框
- this.auditFormVisible = false
- this.queryTable()
- this.$message({
- showClose: true,
- message: '撤销成功',
- type: 'success'
- })
- }
- else {
- return Promise.reject(response)
- }
-
+ }).then(checkStatus).then(parseJSON).then(data => {
+ // 关闭对话框
+ this.auditFormVisible = false
+ this.queryTable()
this.$message({
showClose: true,
message: '审核成功',
type: 'success'
})
-
- }).catch(err => {
- this.$message.error("审核失败");
+ }).catch(({ response }) => {
+ if (response) {
+ parseJSON(response)
+ .then(json => {
+ this.$message.error(json.message || "审核失败")
+ })
+ }
+ else {
+ this.$message.error("审核失败")
+ }
}).finally(() => loading.close())
}
else {