diff --git a/src/views/materials/expend.vue b/src/views/materials/expend.vue index d87675e..9bf4593 100644 --- a/src/views/materials/expend.vue +++ b/src/views/materials/expend.vue @@ -113,7 +113,7 @@ export default { columnBtn: false, menuAlign: "left", searchMenuPosition: "right", - menuWidth: 140, + menuWidth: 120, column: [ { label: "部门", @@ -126,6 +126,7 @@ export default { prop: "materialCode", headerAlign: "center", align: "center", + // width: 160, }, { label: "名称", diff --git a/src/views/materials/index.vue b/src/views/materials/index.vue index b2175df..4910879 100644 --- a/src/views/materials/index.vue +++ b/src/views/materials/index.vue @@ -129,6 +129,8 @@ export default { span: 12, tip: "只能上传jpg/png文件", hide: true, + limit: 1, + multiple: false, httpRequest: this.handleUpload, }, { @@ -164,6 +166,7 @@ export default { formData.append("file", params.file); upload(formData) .then((res) => { + // 确保 picture 是字符串而不是数组 this.form.picture = res.data.message; params.onSuccess(res); }) @@ -231,6 +234,11 @@ export default { }, //新增 rowSave(row, done, loading) { + // 处理 picture 字段,如果是数组则取第一个元素 + if (row.picture && Array.isArray(row.picture)) { + row.picture = row.picture[0] || ''; + } + add(row).then( () => { this.onLoad(this.page); @@ -248,6 +256,11 @@ export default { }, //修改 rowUpdate(row, index, done, loading) { + // 处理 picture 字段,如果是数组则取第一个元素 + if (row.picture && Array.isArray(row.picture)) { + row.picture = row.picture[0] || ''; + } + update(row).then( () => { this.onLoad(this.page); @@ -306,4 +319,4 @@ export default { }, }, }; - + \ No newline at end of file diff --git a/src/views/secondOrder/components/outDialog.vue b/src/views/secondOrder/components/outDialog.vue index 91fd159..1434cda 100644 --- a/src/views/secondOrder/components/outDialog.vue +++ b/src/views/secondOrder/components/outDialog.vue @@ -1,56 +1,30 @@