更新
This commit is contained in:
@@ -21,7 +21,7 @@ const save = (params) => {
|
|||||||
};
|
};
|
||||||
// 修改
|
// 修改
|
||||||
const update = (params) => {
|
const update = (params) => {
|
||||||
return request.postJson(
|
return request.postPut(
|
||||||
"/oil-finance/oilCompanyAccountReverse/update",
|
"/oil-finance/oilCompanyAccountReverse/update",
|
||||||
params
|
params
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ export default {
|
|||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
postPut(url, data) {
|
||||||
|
return axios({
|
||||||
|
url: url,
|
||||||
|
method: "put",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
},
|
||||||
postFromData(url, data) {
|
postFromData(url, data) {
|
||||||
return axios({
|
return axios({
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
@@ -105,10 +105,17 @@
|
|||||||
>
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
:action="uploadUrl"
|
:action="uploadUrl"
|
||||||
|
:data="{
|
||||||
|
ossKey: 'xingyou',
|
||||||
|
pathKey: 'other',
|
||||||
|
encrypt: 'PUBLIC',
|
||||||
|
code: 'A003',
|
||||||
|
}"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
|
:before-upload="beforeHandle"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
>
|
>
|
||||||
@@ -281,6 +288,17 @@ export default {
|
|||||||
this.handleRemove();
|
this.handleRemove();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeHandle(file) {
|
||||||
|
if (file.type.indexOf("image/") === -1) {
|
||||||
|
this.$message.error("上传的文件不是图片格式!");
|
||||||
|
return false;
|
||||||
|
} else if (file.size / 1024 / 1024 > 5) {
|
||||||
|
this.$message.error("上传图片大小不能超过 5MB!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
//img大图
|
//img大图
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.form.offlineTransactionProof = file.url;
|
this.form.offlineTransactionProof = file.url;
|
||||||
@@ -292,9 +310,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传成功
|
// 上传成功
|
||||||
handleSuccess(response, file, fileList) {
|
handleSuccess(response, file, fileList) {
|
||||||
if (response.code === 20000) {
|
if (response.code !== 20000) {
|
||||||
this.form.offlineTransactionProof = response.data.publicUrl;
|
this.$message.error(response.msg);
|
||||||
|
this.fileList = [];
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
console.log("response", response);
|
||||||
|
this.form.offlineTransactionProof = response.data.publicUrl;
|
||||||
},
|
},
|
||||||
//企业收款账户
|
//企业收款账户
|
||||||
getCascaderList() {
|
getCascaderList() {
|
||||||
|
|||||||
Reference in New Issue
Block a user