|
|
@@ -97,13 +97,6 @@
|
|
|
class="table-headermd"
|
|
|
style="width: 100%"
|
|
|
v-if="productTitles">
|
|
|
- <el-table-column label="产品名称" prop="collectionName">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span class="tipTitle" @click="tipTitle(scope.row.collectionName)">
|
|
|
- {{ scope.row.collectionName }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="品类" prop="level1" />
|
|
|
<el-table-column label="档次" prop="grade" />
|
|
|
<el-table-column label="品牌" prop="brandName" />
|
|
|
@@ -124,7 +117,16 @@
|
|
|
@blur="inputblur(item.titleValue, scope.$index, '0')"
|
|
|
/></template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column prop="name">
|
|
|
+ </el-table>
|
|
|
+ <el-table :data="tableData1" border class="table-headermd" style="width: 100%">
|
|
|
+ <el-table-column label="产品名称" prop="collectionName">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span class="tipTitle" @click="tipTitle(scope.row.collectionName)">
|
|
|
+ {{ scope.row.collectionName }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="name">
|
|
|
<template slot="header"> <span>进货原价</span><span class="xing">*</span> </template>
|
|
|
<template slot-scope="scope"
|
|
|
><van-field
|
|
|
@@ -155,7 +157,7 @@
|
|
|
type="number"
|
|
|
@blur="inputblur(scope.row.ygnhj, scope.$index, '2')"
|
|
|
/></template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<div v-if="unManage == 0" style="margin: 10px">
|
|
|
<van-checkbox v-model="checked" shape="square">全部不经营</van-checkbox>
|
|
|
@@ -330,6 +332,8 @@
|
|
|
<van-field
|
|
|
v-model="item.answerValue"
|
|
|
:formatter="formatter"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
:placeholder="item.text"></van-field>
|
|
|
<p
|
|
|
style="
|
|
|
@@ -505,6 +509,8 @@
|
|
|
<van-field
|
|
|
v-model="childitem.collectionOptionList[0].answerValue"
|
|
|
:formatter="formatter"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
:placeholder="childitem.text"></van-field>
|
|
|
<p
|
|
|
style="
|
|
|
@@ -870,6 +876,8 @@
|
|
|
<van-field
|
|
|
v-model="childitem1.collectionOptionList[0].answerValue"
|
|
|
:formatter="formatter"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
:placeholder="childitem1.text"></van-field>
|
|
|
<p
|
|
|
style="
|
|
|
@@ -1194,6 +1202,8 @@
|
|
|
child33item1.collectionOptionList[0].answerValue
|
|
|
"
|
|
|
:formatter="formatter"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
:placeholder="child33item1.text"></van-field>
|
|
|
<p
|
|
|
style="
|
|
|
@@ -1800,6 +1810,8 @@
|
|
|
.answerValue
|
|
|
"
|
|
|
:formatter="formatter"
|
|
|
+ autosize
|
|
|
+ type="textarea"
|
|
|
:placeholder="child44item1.text"></van-field>
|
|
|
<p
|
|
|
style="
|
|
|
@@ -2722,9 +2734,10 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
+ getStoreGroupTask,
|
|
|
getPhotoTypeList,
|
|
|
addCollectionAnswer,
|
|
|
- getStoreGroupTask,
|
|
|
+ getCollectionInfos,
|
|
|
editDwellTime,
|
|
|
deleteTaskAnswer,
|
|
|
getCollectionShowHistory,
|
|
|
@@ -2826,6 +2839,9 @@ export default {
|
|
|
photoIdentifyType: null, //图片识别类型
|
|
|
pictureSource: '0',
|
|
|
stillDistribute: false,
|
|
|
+ productTitles: null,
|
|
|
+ inspectionType: '',
|
|
|
+ competitortableData: [],
|
|
|
};
|
|
|
},
|
|
|
beforeRouteLeave(to, from, next) {
|
|
|
@@ -2835,6 +2851,7 @@ export default {
|
|
|
next();
|
|
|
},
|
|
|
activated() {
|
|
|
+ this.showCode = false;
|
|
|
this.flag = false;
|
|
|
this.link = '3';
|
|
|
this.wuliaoMust = true;
|
|
|
@@ -2844,7 +2861,11 @@ export default {
|
|
|
this.visitId = this.$route.query.visitId + '';
|
|
|
this.taskId = this.$route.query.taskId + '';
|
|
|
this.storeId = this.$route.query.storeId + '';
|
|
|
- this.isMust == this.$route.query.isMust + '';
|
|
|
+ this.isMust = this.$route.query.isMust + '';
|
|
|
+ this.deviceCode = this.$route.query.deviceCode;
|
|
|
+ this.putInCode = this.$route.query.putInCode;
|
|
|
+ this.equipmentCode = this.$route.query.equipmentCode;
|
|
|
+ this.inspectionType = this.$route.query.inspectionType;
|
|
|
this.photoIdentifyType = this.$route.query.photoIdentifyType;
|
|
|
this.storeGroupId = this.$route.query.storeGroupId + '';
|
|
|
if (this.$route.query.photoType != null) {
|
|
|
@@ -2874,7 +2895,11 @@ export default {
|
|
|
this.visitId = this.$route.query.visitId + '';
|
|
|
this.taskId = this.$route.query.taskId + '';
|
|
|
this.storeId = this.$route.query.storeId + '';
|
|
|
- this.isMust == this.$route.query.isMust + '';
|
|
|
+ this.isMust = this.$route.query.isMust + '';
|
|
|
+ this.deviceCode = this.$route.query.deviceCode;
|
|
|
+ this.putInCode = this.$route.query.putInCode;
|
|
|
+ this.equipmentCode = this.$route.query.equipmentCode;
|
|
|
+ this.inspectionType = this.$route.query.inspectionType;
|
|
|
this.photoIdentifyType = this.$route.query.photoIdentifyType;
|
|
|
this.storeGroupId = this.$route.query.storeGroupId + '';
|
|
|
if (this.$route.query.photoType != null) {
|
|
|
@@ -3018,7 +3043,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (val.type == 'E') {
|
|
|
- debugger;
|
|
|
this.collectionItemList[val.index].collectionOptionList[val.index1].collectionItems[
|
|
|
val.index2
|
|
|
].collectionOptionList[val.index3].collectionItems[val.index4].collectionOptionList[
|
|
|
@@ -3210,6 +3234,7 @@ export default {
|
|
|
taskId: that.$route.query.taskId,
|
|
|
}).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
+ localStorage.setItem('getRequestFlage', 'true');
|
|
|
that.$dialog
|
|
|
.alert({
|
|
|
title: '系统提示',
|
|
|
@@ -3294,77 +3319,76 @@ export default {
|
|
|
insert = true;
|
|
|
}
|
|
|
this.insert = insert;
|
|
|
- if (this.$route.query.type == 'edit') {
|
|
|
- var params = {
|
|
|
- storeId: this.$route.query.storeId,
|
|
|
- storeCode: this.$route.query.storeCode,
|
|
|
- visitEntry: '0',
|
|
|
- lat: '',
|
|
|
- lon: '',
|
|
|
- visitModel: this.visitModel,
|
|
|
- routeDetailsId: '',
|
|
|
- storeGroupId: this.$route.query.storeGroupId,
|
|
|
- visitSource: '1',
|
|
|
- insert: insert,
|
|
|
- locationCity: '',
|
|
|
- locationRemark: '',
|
|
|
- locationAccuracy: '',
|
|
|
- };
|
|
|
- } else {
|
|
|
- var params = {
|
|
|
- storeId: this.storeId,
|
|
|
- storeCode: this.$route.query.storeCode,
|
|
|
- visitEntry: '0',
|
|
|
- lat: this.$route.query.lat,
|
|
|
- lon: this.$route.query.lon,
|
|
|
- visitModel: this.$route.query.visitModel,
|
|
|
- routeDetailsId: this.$route.query.taskId,
|
|
|
- locationCity: this.$route.query.locationCity,
|
|
|
- insert: insert,
|
|
|
- locationRemark: this.$route.query.locationRemark,
|
|
|
- locationAccuracy: this.$route.query.locationAccuracy,
|
|
|
- visitSource: this.$route.query.visitSource,
|
|
|
- };
|
|
|
- }
|
|
|
+ let params = {
|
|
|
+ storeCode: this.$route.query.storeCode, // string 门店编码
|
|
|
+ insert: insert, // boolean 是否为拜访时进入,true-拜访时进入,false-编辑时进入
|
|
|
+ id: '', // Long 拜访id
|
|
|
+ taskId: this.$route.query.taskId, // Long 任务id
|
|
|
+ };
|
|
|
+ // if (this.$route.query.type == 'edit') {
|
|
|
+ // var params = {
|
|
|
+ // storeId: this.$route.query.storeId,
|
|
|
+ // storeCode: this.$route.query.storeCode,
|
|
|
+ // visitEntry: '0',
|
|
|
+ // lat: '',
|
|
|
+ // lon: '',
|
|
|
+ // visitModel: this.visitModel,
|
|
|
+ // routeDetailsId: '',
|
|
|
+ // storeGroupId: this.$route.query.storeGroupId,
|
|
|
+ // visitSource: '1',
|
|
|
+ // insert: insert,
|
|
|
+ // locationCity: '',
|
|
|
+ // locationRemark: '',
|
|
|
+ // locationAccuracy: '',
|
|
|
+ // };
|
|
|
+ // } else {
|
|
|
+ // var params = {
|
|
|
+ // storeId: this.storeId,
|
|
|
+ // storeCode: this.$route.query.storeCode,
|
|
|
+ // visitEntry: '0',
|
|
|
+ // lat: this.$route.query.lat,
|
|
|
+ // lon: this.$route.query.lon,
|
|
|
+ // visitModel: this.$route.query.visitModel,
|
|
|
+ // routeDetailsId: this.$route.query.taskId,
|
|
|
+ // locationCity: this.$route.query.locationCity,
|
|
|
+ // insert: insert,
|
|
|
+ // locationRemark: this.$route.query.locationRemark,
|
|
|
+ // locationAccuracy: this.$route.query.locationAccuracy,
|
|
|
+ // visitSource: this.$route.query.visitSource,
|
|
|
+ // };
|
|
|
+ // }
|
|
|
if (this.$route.query.visitId != null) {
|
|
|
params.id = this.$route.query.visitId;
|
|
|
}
|
|
|
- getStoreGroupTask(params).then((res) => {
|
|
|
+ console.log(params.id);
|
|
|
+ getCollectionInfos(params).then((res) => {
|
|
|
loading1.clear();
|
|
|
- this.deviceCode = '';
|
|
|
- this.putInCode = '';
|
|
|
- // 竞品调查-table动态化数据
|
|
|
- this.productTitles = res.data.sfaTaskList[this.$route.query.ids].productTitles; //产品类型表头数据
|
|
|
- // this.equipmentCode = res.data.equipmentCode;
|
|
|
- var checkUnManage = res.data.sfaTaskList[this.$route.query.ids];
|
|
|
- var collectionItemLists = res.data.sfaTaskList[this.$route.query.ids].collectionItemList;
|
|
|
+ this.productTitles = res.data.productTitles; //产品类型表头数据
|
|
|
+ var checkUnManage = res.data;
|
|
|
+ var collectionItemLists = res.data.collectionItemList;
|
|
|
if (checkUnManage.checkUnManage != null && checkUnManage.checkUnManage != 'N') {
|
|
|
this.checked = true;
|
|
|
} else {
|
|
|
this.checked = false;
|
|
|
}
|
|
|
- this.unManage = res.data.sfaTaskList[this.$route.query.ids].unManage;
|
|
|
- this.deviceCode = res.data.sfaTaskList[this.$route.query.ids].deviceCode || ''; // 设备编号
|
|
|
- this.putInCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || ''; // 投放编号
|
|
|
+ this.unManage = res.data.unManage;
|
|
|
// 调色机类型:buy-购买类调色机,place-放置类调色机 不显示设备编号和投放编号
|
|
|
- let inspectionType = res.data.sfaTaskList[this.$route.query.ids].inspectionType;
|
|
|
- if (inspectionType == 'buy') {
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || '';
|
|
|
+ if (this.inspectionType == 'buy') {
|
|
|
+ this.equipmentCode = this.putInCode || '';
|
|
|
this.showCode = true;
|
|
|
- } else if (inspectionType == 'place') {
|
|
|
- this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].equipmentCode || '';
|
|
|
+ } else if (this.inspectionType == 'place') {
|
|
|
+ this.equipmentCode = this.equipmentCode || '';
|
|
|
this.showCode = false;
|
|
|
}
|
|
|
if (
|
|
|
- (res.data.sfaTaskList[this.$route.query.ids].processStatus == 3 &&
|
|
|
- this.$route.query.types == 'edit') ||
|
|
|
- res.data.sfaTaskList[this.$route.query.ids].processStatus == undefined
|
|
|
+ (res.data.processStatus == 3 && this.$route.query.types == 'edit') ||
|
|
|
+ res.data.processStatus == undefined
|
|
|
) {
|
|
|
this.processKey = true;
|
|
|
} else {
|
|
|
this.processKey = false;
|
|
|
}
|
|
|
- this.infoShow = res.data.sfaTaskList[this.$route.query.ids].isMust;
|
|
|
+ this.infoShow = res.data.isMust;
|
|
|
if (this.$route.query.taskType == 1) {
|
|
|
for (var q = 0; q < collectionItemLists.length; q++) {
|
|
|
if (
|
|
|
@@ -3734,44 +3758,46 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.collectionItemList = collectionItemLists;
|
|
|
- } else if (this.$route.query.taskType == 2) {
|
|
|
- for (var f = 0; f < collectionItemLists.length; f++) {
|
|
|
- var collectionOptionListarr = collectionItemLists[f].collectionOptionList;
|
|
|
- for (let p = 0; p < this.productTitles.length; p++) {
|
|
|
- for (var ff = 0; ff < collectionOptionListarr.length; ff++) {
|
|
|
- if (
|
|
|
- this.productTitles[p].titleValue == collectionOptionListarr[ff].collectionOption
|
|
|
- ) {
|
|
|
- collectionItemLists[f][this.productTitles[p].titleValue] =
|
|
|
- collectionOptionListarr[ff].answerValue;
|
|
|
+ } else {
|
|
|
+ if (this.$route.query.taskType == 2 && this.productTitles) {
|
|
|
+ for (var f = 0; f < collectionItemLists.length; f++) {
|
|
|
+ var collectionOptionListarr = collectionItemLists[f].collectionOptionList;
|
|
|
+ for (let p = 0; p < this.productTitles.length; p++) {
|
|
|
+ for (var ff = 0; ff < collectionOptionListarr.length; ff++) {
|
|
|
+ if (
|
|
|
+ this.productTitles[p].titleValue == collectionOptionListarr[ff].collectionOption
|
|
|
+ ) {
|
|
|
+ collectionItemLists[f][this.productTitles[p].titleValue] =
|
|
|
+ collectionOptionListarr[ff].answerValue;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- this.competitortableData = collectionItemLists;
|
|
|
- } else {
|
|
|
- for (var f = 0; f < collectionItemLists.length; f++) {
|
|
|
- var collectionOptionListarr = collectionItemLists[f].collectionOptionList;
|
|
|
- for (var ff = 0; ff < collectionOptionListarr.length; ff++) {
|
|
|
- if (ff == '0') {
|
|
|
- collectionItemLists[f].xdjhyj = collectionOptionListarr[ff].answerValue;
|
|
|
- collectionItemLists[f].value = collectionOptionListarr[ff].answerValue;
|
|
|
- collectionItemLists[f].contrastValue = collectionOptionListarr[ff].answerValue;
|
|
|
- }
|
|
|
- if (ff == '1') {
|
|
|
- collectionItemLists[f].xdjhchjj = collectionOptionListarr[ff].answerValue;
|
|
|
- if (collectionOptionListarr[ff].answerValue == null) {
|
|
|
- collectionItemLists[f].answerVal = 'T';
|
|
|
- } else {
|
|
|
- collectionItemLists[f].answerVal = '';
|
|
|
+ this.competitortableData = collectionItemLists;
|
|
|
+ } else {
|
|
|
+ for (var f = 0; f < collectionItemLists.length; f++) {
|
|
|
+ var collectionOptionListarr = collectionItemLists[f].collectionOptionList;
|
|
|
+ for (var ff = 0; ff < collectionOptionListarr.length; ff++) {
|
|
|
+ if (ff == '0') {
|
|
|
+ collectionItemLists[f].xdjhyj = collectionOptionListarr[ff].answerValue;
|
|
|
+ collectionItemLists[f].value = collectionOptionListarr[ff].answerValue;
|
|
|
+ collectionItemLists[f].contrastValue = collectionOptionListarr[ff].answerValue;
|
|
|
+ }
|
|
|
+ if (ff == '1') {
|
|
|
+ collectionItemLists[f].xdjhchjj = collectionOptionListarr[ff].answerValue;
|
|
|
+ if (collectionOptionListarr[ff].answerValue == null) {
|
|
|
+ collectionItemLists[f].answerVal = 'T';
|
|
|
+ } else {
|
|
|
+ collectionItemLists[f].answerVal = '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (ff == '2') {
|
|
|
+ collectionItemLists[f].ygnhj = collectionOptionListarr[ff].answerValue;
|
|
|
}
|
|
|
- }
|
|
|
- if (ff == '2') {
|
|
|
- collectionItemLists[f].ygnhj = collectionOptionListarr[ff].answerValue;
|
|
|
}
|
|
|
}
|
|
|
+ this.tableData1 = collectionItemLists;
|
|
|
}
|
|
|
- this.tableData1 = collectionItemLists;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -3779,6 +3805,7 @@ export default {
|
|
|
this.$toast(val);
|
|
|
},
|
|
|
inputblurs(val, index, num) {
|
|
|
+ if (!val) return;
|
|
|
if ((val + '').trim() == '') {
|
|
|
this.tableData1[index].xdjhchjj = '';
|
|
|
} else {
|
|
|
@@ -3803,34 +3830,48 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- inputblur(itemVal, index) {
|
|
|
- let value = this.competitortableData[index][itemVal];
|
|
|
- if (value.split('.')[1] == '' || (value + '').trim() == '') {
|
|
|
+ inputblur(val, index, num) {
|
|
|
+ if (val.split('.')[1] == '' || (val + '').trim() == '') {
|
|
|
this.$toast('请输入正确格式数字');
|
|
|
- this.competitortableData[index][itemVal] = '';
|
|
|
+ if (num == '0') {
|
|
|
+ this.tableData1[index].xdjhyj = '';
|
|
|
+ }
|
|
|
+ if (num == '1') {
|
|
|
+ this.tableData1[index].xdjhchjj = '';
|
|
|
+ }
|
|
|
+ if (num == '2') {
|
|
|
+ this.tableData1[index].ygnhj = '';
|
|
|
+ }
|
|
|
} else {
|
|
|
- if (!/^\d+(\.\d{1,2})?$/.test(value) || Number(value) > 10000 || Number(value) <= 0) {
|
|
|
+ if (!/^\d+(\.\d{1,2})?$/.test(val) || Number(val) > 10000 || Number(val) <= 0) {
|
|
|
this.$toast('请输入大于0并且小于10000的两位小数');
|
|
|
- this.competitortableData[index][itemVal] = '';
|
|
|
- ff;
|
|
|
+ if (num == '0') {
|
|
|
+ this.tableData1[index].xdjhyj = '';
|
|
|
+ }
|
|
|
+ if (num == '1') {
|
|
|
+ this.tableData1[index].xdjhchjj = '';
|
|
|
+ }
|
|
|
+ if (num == '2') {
|
|
|
+ this.tableData1[index].ygnhj = '';
|
|
|
+ }
|
|
|
} else {
|
|
|
- // if (num == '0') {
|
|
|
- // if (this.tableData1[index].xdjhyj < this.tableData1[index].xdjhchjj) {
|
|
|
- // this.tableData1[index].xdjhyj = '';
|
|
|
- // this.$toast('请输入大于等于促后净价的数字');
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (num == '1') {
|
|
|
- // if (this.tableData1[index].xdjhyj == '') {
|
|
|
- // this.tableData1[index].xdjhchjj = '';
|
|
|
- // this.$toast('请输入进货原价');
|
|
|
- // } else {
|
|
|
- // if (Number(val) > Number(this.tableData1[index].xdjhyj)) {
|
|
|
- // this.$toast('请输入小于等于进货原价的数字');
|
|
|
- // this.tableData1[index].xdjhchjj = '';
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if (num == '0') {
|
|
|
+ if (this.tableData1[index].xdjhyj < this.tableData1[index].xdjhchjj) {
|
|
|
+ this.tableData1[index].xdjhyj = '';
|
|
|
+ this.$toast('请输入大于等于促后净价的数字');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (num == '1') {
|
|
|
+ if (this.tableData1[index].xdjhyj == '') {
|
|
|
+ this.tableData1[index].xdjhchjj = '';
|
|
|
+ this.$toast('请输入进货原价');
|
|
|
+ } else {
|
|
|
+ if (Number(val) > Number(this.tableData1[index].xdjhyj)) {
|
|
|
+ this.$toast('请输入小于等于进货原价的数字');
|
|
|
+ this.tableData1[index].xdjhchjj = '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -4649,92 +4690,73 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else if (this.$route.query.taskType == 2) {
|
|
|
- for (let dy = 0; dy < this.competitortableData.length; dy++) {
|
|
|
- for (let p = 0; p < this.productTitles.length; p++) {
|
|
|
- if (this.competitortableData[dy][this.productTitles[p].titleValue] == '') {
|
|
|
+ for (let dy = 0; dy < this.tableData1.length; dy++) {
|
|
|
+ if (this.tableData1[dy].xdjhchjj != '') {
|
|
|
+ if (
|
|
|
+ this.tableData1[dy].xdjhyj == '' ||
|
|
|
+ this.tableData1[dy].ygnhj == '' ||
|
|
|
+ this.tableData1[dy].xdjhchjj.split('.')[1] == ''
|
|
|
+ ) {
|
|
|
this.$dialog.alert({
|
|
|
title: '系统提示',
|
|
|
- message: '请完善' + this.competitortableData[dy].collectionName + '信息',
|
|
|
+ message: '请完善' + this.tableData1[dy].collectionName + '信息或促后竞价格式不正确',
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.tableData1[dy].xdjhyj != '') {
|
|
|
+ if (this.tableData1[dy].xdjhchjj == '' || this.tableData1[dy].ygnhj == '') {
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: '请完善' + this.tableData1[dy].collectionName + '信息',
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.tableData1[dy].ygnhj != '') {
|
|
|
+ if (this.tableData1[dy].xdjhchjj == '' || this.tableData1[dy].xdjhyj == '') {
|
|
|
+ this.$dialog.alert({
|
|
|
+ title: '系统提示',
|
|
|
+ message: '请完善' + this.tableData1[dy].collectionName + '信息',
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
- // if (this.tableData1[dy].xdjhchjj != '') {
|
|
|
- // if (
|
|
|
- // this.tableData1[dy].xdjhyj == '' ||
|
|
|
- // this.tableData1[dy].ygnhj == '' ||
|
|
|
- // this.tableData1[dy].xdjhchjj.split('.')[1] == ''
|
|
|
- // ) {
|
|
|
- // this.$dialog.alert({
|
|
|
- // title: '系统提示',
|
|
|
- // message: '请完善' + this.tableData1[dy].collectionName + '信息或促后竞价格式不正确',
|
|
|
- // });
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (this.tableData1[dy].xdjhyj != '') {
|
|
|
- // if (this.tableData1[dy].xdjhchjj == '' || this.tableData1[dy].ygnhj == '') {
|
|
|
- // this.$dialog.alert({
|
|
|
- // title: '系统提示',
|
|
|
- // message: '请完善' + this.tableData1[dy].collectionName + '信息',
|
|
|
- // });
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if (this.tableData1[dy].ygnhj != '') {
|
|
|
- // if (this.tableData1[dy].xdjhchjj == '' || this.tableData1[dy].xdjhyj == '') {
|
|
|
- // this.$dialog.alert({
|
|
|
- // title: '系统提示',
|
|
|
- // message: '请完善' + this.tableData1[dy].collectionName + '信息',
|
|
|
- // });
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // }
|
|
|
}
|
|
|
- for (var d = 0; d < this.competitortableData.length; d++) {
|
|
|
- for (let p = 0; p < this.productTitles.length; p++) {
|
|
|
- formData.collectionAnswers.push({
|
|
|
- collectionId: this.competitortableData[d].collectionId,
|
|
|
- itemName: this.competitortableData[d].collectionName,
|
|
|
- collectionType: 'chanpin',
|
|
|
- collectionOptionId:
|
|
|
- this.competitortableData[d].collectionOptionList[p].collectionOptionId,
|
|
|
- answerType: 'sz',
|
|
|
- answerValue: this.competitortableData[d][this.productTitles[p].titleValue],
|
|
|
- });
|
|
|
+ for (var d = 0; d < this.tableData1.length; d++) {
|
|
|
+ for (var dd = 0; dd < this.tableData1[d].collectionOptionList.length; dd++) {
|
|
|
+ if (dd == 0) {
|
|
|
+ formData.collectionAnswers.push({
|
|
|
+ collectionId: this.tableData1[d].collectionId,
|
|
|
+ itemName: this.tableData1[d].collectionName,
|
|
|
+ collectionType: 'chanpin',
|
|
|
+ collectionOptionId: this.tableData1[d].collectionOptionList[dd].collectionOptionId,
|
|
|
+ answerType: 'sz',
|
|
|
+ answerValue: this.tableData1[d].xdjhyj,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (dd == 1) {
|
|
|
+ formData.collectionAnswers.push({
|
|
|
+ collectionId: this.tableData1[d].collectionId,
|
|
|
+ itemName: this.tableData1[d].collectionName,
|
|
|
+ collectionType: 'chanpin',
|
|
|
+ collectionOptionId: this.tableData1[d].collectionOptionList[dd].collectionOptionId,
|
|
|
+ answerType: 'sz',
|
|
|
+ answerValue: this.tableData1[d].xdjhchjj,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ debugger;
|
|
|
+ if (dd == 2) {
|
|
|
+ formData.collectionAnswers.push({
|
|
|
+ collectionId: this.tableData1[d].collectionId,
|
|
|
+ itemName: this.tableData1[d].collectionName,
|
|
|
+ collectionType: 'chanpin',
|
|
|
+ collectionOptionId: this.tableData1[d].collectionOptionList[dd].collectionOptionId,
|
|
|
+ answerType: 'sz',
|
|
|
+ answerValue: this.tableData1[d].ygnhj,
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- // for (var dd = 0; dd < this.tableData1[d].collectionOptionList.length; dd++) {
|
|
|
- // if (dd == 0) {
|
|
|
- // formData.collectionAnswers.push({
|
|
|
- // collectionId: this.tableData1[d].collectionId,
|
|
|
- // itemName: this.tableData1[d].collectionName,
|
|
|
- // collectionType: 'chanpin',
|
|
|
- // collectionOptionId: this.tableData1[d].collectionOptionList[dd].collectionOptionId,
|
|
|
- // answerType: 'sz',
|
|
|
- // answerValue: this.tableData1[d].xdjhyj,
|
|
|
- // });
|
|
|
- // }
|
|
|
- // if (dd == 1) {
|
|
|
- // formData.collectionAnswers.push({
|
|
|
- // collectionId: this.tableData1[d].collectionId,
|
|
|
- // itemName: this.tableData1[d].collectionName,
|
|
|
- // collectionType: 'chanpin',
|
|
|
- // collectionOptionId: this.tableData1[d].collectionOptionList[dd].collectionOptionId,
|
|
|
- // answerType: 'sz',
|
|
|
- // answerValue: this.tableData1[d].xdjhchjj,
|
|
|
- // });
|
|
|
- // }
|
|
|
- // if (dd == 2) {
|
|
|
- // formData.collectionAnswers.push({
|
|
|
- // collectionId: this.tableData1[d].collectionId,
|
|
|
- // itemName: this.tableData1[d].collectionName,
|
|
|
- // collectionType: 'chanpin',
|
|
|
- // collectionOptionId: this.tableData1[d].collectionOptionList[dd].collectionOptionId,
|
|
|
- // answerType: 'sz',
|
|
|
- // answerValue: this.tableData1[d].ygnhj,
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
}
|
|
|
} else {
|
|
|
for (var d = 0; d < this.tableData1.length; d++) {
|
|
|
@@ -4776,6 +4798,7 @@ export default {
|
|
|
telName = item.itemName + '格式错误';
|
|
|
}
|
|
|
});
|
|
|
+ debugger;
|
|
|
if (!telVerify) {
|
|
|
this.$toast(telName);
|
|
|
} else {
|
|
|
@@ -4788,6 +4811,7 @@ export default {
|
|
|
}
|
|
|
addCollectionAnswer(formData).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
+ localStorage.setItem('getRequestFlage', 'true');
|
|
|
this.$router.go(-1);
|
|
|
} else {
|
|
|
if (res.data) {
|