|
|
@@ -56,12 +56,13 @@
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form"> </avue-form>
|
|
|
</trade-card>
|
|
|
- <trade-card title="文件中心">
|
|
|
+ <trade-card title="相应图片信息">
|
|
|
<upload-file
|
|
|
:data="form.claimAttachmentList"
|
|
|
:disabled="editDis"
|
|
|
@upDate="upDate"
|
|
|
:isImage="true"
|
|
|
+ :filePropertiesHide="true"
|
|
|
></upload-file>
|
|
|
</trade-card>
|
|
|
<trade-card title="反馈表">
|
|
|
@@ -132,10 +133,6 @@ export default {
|
|
|
{
|
|
|
label: "电话",
|
|
|
prop: "consumerPhone",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "胎号",
|
|
|
- prop: "tyreNo",
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
|
@@ -145,6 +142,10 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ label: "胎号",
|
|
|
+ prop: "tyreNo",
|
|
|
+ },
|
|
|
+ {
|
|
|
label: "车牌号",
|
|
|
prop: "vehicleNumber",
|
|
|
rules: [
|
|
|
@@ -165,13 +166,6 @@ export default {
|
|
|
type: "number",
|
|
|
controls: false,
|
|
|
precision: 0,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
},
|
|
|
{
|
|
|
label: "购买日期",
|
|
|
@@ -231,13 +225,6 @@ export default {
|
|
|
type: "textarea",
|
|
|
span: 12,
|
|
|
minRows: 2,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur",
|
|
|
- },
|
|
|
- ],
|
|
|
},
|
|
|
{
|
|
|
label: "备注",
|
|
|
@@ -436,10 +423,22 @@ 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.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("请上传鼓包处照片");
|
|
|
+ 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 > 1) {
|
|
|
+ return this.$message.error("只能上传一张花纹深度");
|
|
|
+ }
|
|
|
+ if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length > 1) {
|
|
|
+ return this.$message.error("只能上传一张鼓包处照片");
|
|
|
+ }
|
|
|
submit(this.form);
|
|
|
this.$confirm("是否提交审批?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
@@ -486,13 +485,22 @@ 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.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;
|
|
|
- });
|
|
|
+ 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 > 1) {
|
|
|
+ return this.$message.error("只能上传一张花纹深度");
|
|
|
+ }
|
|
|
+ if (this.form.claimAttachmentList.filter((item) => item.fileProperties == 4).length > 1) {
|
|
|
+ return this.$message.error("只能上传一张鼓包处照片");
|
|
|
+ }
|
|
|
+
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: "加载中",
|