lilei 4 yıl önce
ebeveyn
işleme
1316b9d95b
1 değiştirilmiş dosya ile 11 ekleme ve 8 silme
  1. 11 8
      src/views/market/addlotterySetModal.vue

+ 11 - 8
src/views/market/addlotterySetModal.vue

@@ -45,7 +45,7 @@
             <a-form-model-item ref="activeName" label="活动名称" prop="activeName">
               <a-input
                 id="addLottery-time"
-                :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                :disabled="participantsNum>0||state==1"
                 v-model="form.activeName"
                 allowClear
                 :maxLength="15"
@@ -55,7 +55,7 @@
           <a-col :span="12">
             <a-form-model-item ref="time" label="活动时间" prop="time">
               <a-range-picker
-                :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                :disabled="participantsNum>0||state==1"
                 id="addLottery-time"
                 v-model="form.time"
                 :disabledDate="disabledDate"
@@ -80,13 +80,13 @@
                 id="addLottery-cjRc"
                 style="width: 50%;margin-right: 20px;"
                 v-model="form.peopleLimitCount"
-                :disabled="form.isPeopleLimit==1||participantsNum>0||taskParticipantsNum>0||state==1"
+                :disabled="form.isPeopleLimit==1||participantsNum>0||state==1"
                 :min="0"
                 :max="999999"
                 :precision="0"
                 placeholder="请输入抽奖人次(0~999999)"
                 allowClear />
-              <a-checkbox :disabled="state==1||participantsNum>0||taskParticipantsNum>0" @change="bxCjRcChange" v-model="form.isPeopleLimit">
+              <a-checkbox :disabled="state==1||participantsNum>0" @change="bxCjRcChange" v-model="form.isPeopleLimit">
                 不限
               </a-checkbox>
             </a-form-model-item>
@@ -96,7 +96,7 @@
               每次抽奖需要支付
               <a-input-number
                 id="addLottery-cjgz"
-                :disabled="state==1||participantsNum>0||taskParticipantsNum>0"
+                :disabled="state==1||participantsNum>0"
                 style="width: 30%;margin-right: 5px;"
                 v-model="form.purchaseTimesGold"
                 :min="1"
@@ -213,7 +213,7 @@
                 }"
               >
                 <a-select
-                  :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                  :disabled="participantsNum>0||state==1"
                   :id="'jpList-prizeType'+index"
                   style="width: 100%;"
                   v-model="item.prizeType"
@@ -243,7 +243,7 @@
                 }"
               >
                 <a-input
-                  :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                  :disabled="participantsNum>0||state==1"
                   v-if="item.prizeType !== 'GOLD'"
                   :id="'jpList-name'+index"
                   style="width: 100%;"
@@ -323,7 +323,7 @@
               >
                 <Upload
                   :ref="'prizeImage'+index"
-                  :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                  :disabled="participantsNum>0||state==1"
                   :id="'jpList-prizeImage'+index"
                   v-model="item.prizeImage"
                   :fileSize="0.25"
@@ -620,6 +620,9 @@ export default {
             if (!item.hasOwnProperty('prizeNum')) {
               item.prizeNum = ''
             }
+            if (this.participantsNum <= 0) {
+              delete item.id
+            }
           })
           this.form = Object.assign({}, this.form, res.data)
           this.form.isPeopleLimit = this.form.isPeopleLimit == 1