|
|
@@ -62,7 +62,6 @@
|
|
|
:disabled="editDis"
|
|
|
@upDate="upDate"
|
|
|
:isImage="true"
|
|
|
- :filePropertiesHide="true"
|
|
|
></upload-file>
|
|
|
</trade-card>
|
|
|
<trade-card title="反馈表">
|
|
|
@@ -416,30 +415,13 @@ export default {
|
|
|
if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.consumerPhone)) {
|
|
|
return this.$message.error("请输入正确电话");
|
|
|
}
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length == 0) {
|
|
|
- return this.$message.error("请上传鼓包并向照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length > 1) {
|
|
|
- return this.$message.error("只能上传一张鼓包并向照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length == 0) {
|
|
|
- return this.$message.error("请上传轮胎DOT");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length > 1) {
|
|
|
- return this.$message.error("只能上传一张轮胎DOT");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length == 0) {
|
|
|
- return this.$message.error("请上传车头照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length > 1) {
|
|
|
- return this.$message.error("只能上传一张车头照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length == 0) {
|
|
|
- return this.$message.error("请上传鼓包处照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length > 1) {
|
|
|
- return this.$message.error("只能上传一张鼓包处照片");
|
|
|
- }
|
|
|
+ if (this.form.claimAttachmentList.length == 0) return this.$message.error("请上传鼓包并向照片");
|
|
|
+ if (this.form.claimAttachmentList.length == 1) return this.$message.error("请上传轮胎DOT");
|
|
|
+ if (this.form.claimAttachmentList.length == 2) return this.$message.error("请上传车头照片");
|
|
|
+ if (this.form.claimAttachmentList.length == 3) return this.$message.error("请上传鼓包处照片");
|
|
|
+ this.form.claimAttachmentList.forEach((item, index) => {
|
|
|
+ item.fileProperties = index + 1;
|
|
|
+ });
|
|
|
submit(this.form);
|
|
|
this.$confirm("是否提交审批?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -486,30 +468,13 @@ export default {
|
|
|
if (!/^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.form.consumerPhone)) {
|
|
|
return this.$message.error("请输入正确电话");
|
|
|
}
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length == 0) {
|
|
|
- return this.$message.error("请上传鼓包并向照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 1).length > 1) {
|
|
|
- return this.$message.error("只能上传一张鼓包并向照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length == 0) {
|
|
|
- return this.$message.error("请上传轮胎DOT");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 2).length > 1) {
|
|
|
- return this.$message.error("只能上传一张轮胎DOT");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length == 0) {
|
|
|
- return this.$message.error("请上传车头照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 3).length > 1) {
|
|
|
- return this.$message.error("只能上传一张车头照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length == 0) {
|
|
|
- return this.$message.error("请上传鼓包处照片");
|
|
|
- }
|
|
|
- if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length > 1) {
|
|
|
- return this.$message.error("只能上传一张鼓包处照片");
|
|
|
- }
|
|
|
+ if (this.form.claimAttachmentList.length == 0) return this.$message.error("请上传鼓包并向照片");
|
|
|
+ if (this.form.claimAttachmentList.length == 1) return this.$message.error("请上传轮胎DOT");
|
|
|
+ if (this.form.claimAttachmentList.length == 2) return this.$message.error("请上传车头照片");
|
|
|
+ if (this.form.claimAttachmentList.length == 3) return this.$message.error("请上传鼓包处照片");
|
|
|
+ this.form.claimAttachmentList.forEach((item, index) => {
|
|
|
+ item.fileProperties = index + 1;
|
|
|
+ });
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: "加载中",
|