|
@@ -58,14 +58,16 @@
|
|
align="center"
|
|
align="center"
|
|
show-overflow-tooltip
|
|
show-overflow-tooltip
|
|
>
|
|
>
|
|
|
|
+ <!-- devOptions.find((i) => i.value == scope.row.deviceId).label -->
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item
|
|
<el-form-item
|
|
- :prop="`deviceRespList.${scope.$index}.deviceId`"
|
|
|
|
|
|
+ :prop="`scope.row.deviceId`"
|
|
:rules="{ required: true, trigger: 'change' }"
|
|
:rules="{ required: true, trigger: 'change' }"
|
|
>
|
|
>
|
|
<span v-if="disabledActivity">{{
|
|
<span v-if="disabledActivity">{{
|
|
devOptions.find((i) => i.value == scope.row.deviceId).label
|
|
devOptions.find((i) => i.value == scope.row.deviceId).label
|
|
}}</span>
|
|
}}</span>
|
|
|
|
+
|
|
<el-select
|
|
<el-select
|
|
v-else
|
|
v-else
|
|
v-model="scope.row.deviceId"
|
|
v-model="scope.row.deviceId"
|
|
@@ -88,10 +90,12 @@
|
|
<el-table-column label="活动权益" align="center">
|
|
<el-table-column label="活动权益" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item
|
|
<el-form-item
|
|
- :prop="`deviceRespList.${scope.$index}.goodId`"
|
|
|
|
|
|
+ :prop="`scope.row.goodId`"
|
|
:rules="{ required: true, trigger: 'change' }"
|
|
:rules="{ required: true, trigger: 'change' }"
|
|
>
|
|
>
|
|
|
|
+ <span v-if="disabledActivity">{{ scope.row.goodName }}</span>
|
|
<el-select
|
|
<el-select
|
|
|
|
+ v-else
|
|
v-model="scope.row.goodId"
|
|
v-model="scope.row.goodId"
|
|
placeholder="请选择活动权益"
|
|
placeholder="请选择活动权益"
|
|
:disabled="disabledActivity"
|
|
:disabled="disabledActivity"
|
|
@@ -124,7 +128,7 @@
|
|
<el-table-column label="领取数量" align="center">
|
|
<el-table-column label="领取数量" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item
|
|
<el-form-item
|
|
- :prop="`deviceRespList.${scope.$index}.totalNum`"
|
|
|
|
|
|
+ :prop="`scope.row.totalNum`"
|
|
:rules="[
|
|
:rules="[
|
|
{
|
|
{
|
|
type: 'number',
|
|
type: 'number',
|
|
@@ -259,14 +263,17 @@ export default {
|
|
|
|
|
|
"form.platformName": {
|
|
"form.platformName": {
|
|
handler(val) {
|
|
handler(val) {
|
|
- for (let i in this.form.deviceRespList) {
|
|
|
|
- if (this.form.deviceRespList[i].goodId != null) {
|
|
|
|
- this.form.deviceRespList[i].goodId = null;
|
|
|
|
- }
|
|
|
|
- if (this.form.deviceRespList[i].deviceId != null) {
|
|
|
|
- this.form.deviceRespList[i].deviceId = null;
|
|
|
|
|
|
+ if (!this.disabledActivity) {
|
|
|
|
+ for (let i in this.form.deviceRespList) {
|
|
|
|
+ if (this.form.deviceRespList[i].goodId != null) {
|
|
|
|
+ this.form.deviceRespList[i].goodId = null;
|
|
|
|
+ }
|
|
|
|
+ if (this.form.deviceRespList[i].deviceId != null) {
|
|
|
|
+ this.form.deviceRespList[i].deviceId = null;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
this.form.platformId = val == this.platformNames[1] ? 1 : 0;
|
|
this.form.platformId = val == this.platformNames[1] ? 1 : 0;
|
|
},
|
|
},
|
|
deep: true,
|
|
deep: true,
|
|
@@ -274,7 +281,6 @@ export default {
|
|
|
|
|
|
// "form.platformName": {
|
|
// "form.platformName": {
|
|
// handler(val) {
|
|
// handler(val) {
|
|
- // console.log("gasdfasdfasdfaf==22==" + this.form.platformName);
|
|
|
|
// },
|
|
// },
|
|
// deep: true,
|
|
// deep: true,
|
|
// },
|
|
// },
|
|
@@ -313,7 +319,7 @@ export default {
|
|
? this.platformNames[1]
|
|
? this.platformNames[1]
|
|
: this.platformNames[0];
|
|
: this.platformNames[0];
|
|
this.form = res.data;
|
|
this.form = res.data;
|
|
- res.data.deviceRespList.map((i) => {
|
|
|
|
|
|
+ this.form.deviceRespList.map((i) => {
|
|
this.num.push(i.totalNum);
|
|
this.num.push(i.totalNum);
|
|
});
|
|
});
|
|
}
|
|
}
|