lilei 4 lat temu
rodzic
commit
84b5386ea8
1 zmienionych plików z 176 dodań i 169 usunięć
  1. 176 169
      src/views/market/addlotterySetModal.vue

+ 176 - 169
src/views/market/addlotterySetModal.vue

@@ -155,177 +155,179 @@
             </a-select>
           </a-form-model-item>
         </div>
-        <a-row
-          type="flex"
-          align="middle"
-          :gutter="10"
-        >
-          <a-col span="1">
-            序号
-          </a-col>
-          <a-col span="3">
-            奖品类型
-          </a-col>
-          <a-col span="3">
-            奖品描述
-          </a-col>
-          <a-col span="3">
-            概率
-          </a-col>
-          <a-col span="3">
-            数量
-          </a-col>
-          <a-col span="8">
-            奖品图片
-          </a-col>
-        </a-row>
-        <a-row
-          type="flex"
-          align="middle"
-          v-for="(item, index) in form.luckyDrawPrizeList"
-          :key="index"
-          v-if="form.luckyDrawPrizeList.length"
-          :gutter="10"
-        >
-          <a-col span="1">
-            <a-form-model-item>
-              <span class="red" v-if="state==0">*</span> 奖品{{ index+1 }}
-            </a-form-model-item>
-          </a-col>
-          <a-col span="3">
-            <a-form-model-item
-              :label="''"
-              :required="true"
-              :label-col=" { span: 0 }"
-              :wrapper-col=" { span: 24 }"
-              :prop="'luckyDrawPrizeList.' + index + '.prizeType'"
-              :rules="{
-                required: true,
-                message: '请选择奖品类型',
-                trigger: ['blur','change'],
-              }"
-            >
-              <a-select
-                :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
-                :id="'jpList-prizeType'+index"
-                style="width: 100%;"
-                v-model="item.prizeType"
-                @change="res => {
-                  item.prizeDesc = ''
-                  item.isPrizeLimit = item.prizeType == 'NONE' ? 0 : undefined
+        <div style="padding: 0 5px;">
+          <a-row
+            type="flex"
+            align="middle"
+            :gutter="10"
+          >
+            <a-col span="1">
+              序号
+            </a-col>
+            <a-col span="3">
+              奖品类型
+            </a-col>
+            <a-col span="3">
+              奖品描述
+            </a-col>
+            <a-col span="3">
+              概率
+            </a-col>
+            <a-col span="3">
+              数量
+            </a-col>
+            <a-col span="8">
+              奖品图片
+            </a-col>
+          </a-row>
+          <a-row
+            type="flex"
+            align="middle"
+            v-for="(item, index) in form.luckyDrawPrizeList"
+            :key="index"
+            v-if="form.luckyDrawPrizeList.length"
+            :gutter="10"
+          >
+            <a-col span="1">
+              <a-form-model-item>
+                <span class="red" v-if="state==0">*</span> 奖品{{ index+1 }}
+              </a-form-model-item>
+            </a-col>
+            <a-col span="3">
+              <a-form-model-item
+                :label="''"
+                :required="true"
+                :label-col=" { span: 0 }"
+                :wrapper-col=" { span: 24 }"
+                :prop="'luckyDrawPrizeList.' + index + '.prizeType'"
+                :rules="{
+                  required: true,
+                  message: '请选择奖品类型',
+                  trigger: ['blur','change'],
                 }"
-                placeholder="请选择奖品类型">
-                <a-select-option
-                  v-for="item in $refs.jpType.getOptionDatas()"
-                  :key="item.code"
-                  :value="item.code">{{ item.dispName }}</a-select-option>
-              </a-select>
-            </a-form-model-item>
-          </a-col>
-          <a-col span="3">
-            <a-form-model-item
-              :label="''"
-              :required="true"
-              :label-col=" { span: 0 }"
-              :wrapper-col=" { span: 24 }"
-              :prop="'luckyDrawPrizeList.' + index + '.prizeDesc'"
-              :rules="{
-                required: true,
-                message: '请输入奖品名称',
-                trigger: ['blur','change'],
-              }"
-            >
-              <a-input
-                :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
-                v-if="item.prizeType !== 'GOLD'"
-                :id="'jpList-name'+index"
-                style="width: 100%;"
-                v-model="item.prizeDesc"
-                :maxLength="10"
-                placeholder="请输入奖品名称,10个字以内"/>
+              >
+                <a-select
+                  :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                  :id="'jpList-prizeType'+index"
+                  style="width: 100%;"
+                  v-model="item.prizeType"
+                  @change="res => {
+                    item.prizeDesc = ''
+                    item.isPrizeLimit = item.prizeType == 'NONE' ? 0 : undefined
+                  }"
+                  placeholder="请选择奖品类型">
+                  <a-select-option
+                    v-for="item in $refs.jpType.getOptionDatas()"
+                    :key="item.code"
+                    :value="item.code">{{ item.dispName }}</a-select-option>
+                </a-select>
+              </a-form-model-item>
+            </a-col>
+            <a-col span="3">
+              <a-form-model-item
+                :label="''"
+                :required="true"
+                :label-col=" { span: 0 }"
+                :wrapper-col=" { span: 24 }"
+                :prop="'luckyDrawPrizeList.' + index + '.prizeDesc'"
+                :rules="{
+                  required: true,
+                  message: '请输入奖品名称',
+                  trigger: ['blur','change'],
+                }"
+              >
+                <a-input
+                  :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                  v-if="item.prizeType !== 'GOLD'"
+                  :id="'jpList-name'+index"
+                  style="width: 100%;"
+                  v-model="item.prizeDesc"
+                  :maxLength="10"
+                  placeholder="请输入奖品名称,10个字以内"/>
 
-              <a-input-number
-                v-else
-                :disabled="participantsNum>0||state==1"
-                style="width: 100%;"
-                :id="'jpList-name'+index"
-                v-model="item.prizeDesc"
-                :min="0"
-                :max="999999"
-                :precision="0"
-                placeholder="请输入乐豆数量"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col span="3">
-            <a-form-model-item
-              :label="''"
-              :required="true"
-              :label-col=" { span: 0 }"
-              :wrapper-col=" { span: 24 }"
-              :prop="'luckyDrawPrizeList.' + index + '.prizeRate'"
-              :rules="{
-                required: true,
-                message: '请输入中奖概率',
-                trigger: ['blur','change'],
-              }"
-            >
-              <a-input-number
-                style="width: 100%;"
-                :disabled="state==1"
-                :id="'jpList-prizeRate'+index"
-                v-model="item.prizeRate"
-                :min="0"
-                :max="100"
-                :precision="2"
-                placeholder="请输入中奖概率(%)"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col span="3" v-if="item.prizeType!='NONE'">
-            <a-form-model-item
-              :label="''"
-              :required="true"
-              :label-col=" { span: 0 }"
-              :wrapper-col=" { span: 24 }"
-              :prop="'luckyDrawPrizeList.' + index + '.prizeNum'"
-              :rules="{
-                required: true,
-                message: '请输入奖品数量',
-                trigger: ['blur','change'],
-              }"
-            >
-              <a-input-number
-                style="width: 100%;"
-                :disabled="state==1"
-                :id="'jpList-prizeNum'+index"
-                v-model="item.prizeNum"
-                :min="0"
-                :max="999999"
-                :precision="0"
-                placeholder="请输入奖品数量"
-                allowClear />
-            </a-form-model-item>
-          </a-col>
-          <a-col span="8">
-            <a-form-model-item
-              :label="''"
-              :label-col=" { span: 0 }"
-              :wrapper-col=" { span: 24 }"
-              :prop="'luckyDrawPrizeList.' + index + '.prizeImage'"
-            >
-              <Upload
-                :ref="'prizeImage'+index"
-                :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
-                :id="'jpList-prizeImage'+index"
-                v-model="item.prizeImage"
-                :fileSize="0.25"
-                listType="picture-card">
-              </Upload>
-              <span class="upload-desc">请上传奖品图片,300*300px,0.25MB 以内。</span>
-            </a-form-model-item>
-          </a-col>
-        </a-row>
+                <a-input-number
+                  v-else
+                  :disabled="participantsNum>0||state==1"
+                  style="width: 100%;"
+                  :id="'jpList-name'+index"
+                  v-model="item.prizeDesc"
+                  :min="0"
+                  :max="999999"
+                  :precision="0"
+                  placeholder="请输入乐豆数量"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col span="3">
+              <a-form-model-item
+                :label="''"
+                :required="true"
+                :label-col=" { span: 0 }"
+                :wrapper-col=" { span: 24 }"
+                :prop="'luckyDrawPrizeList.' + index + '.prizeRate'"
+                :rules="{
+                  required: true,
+                  message: '请输入中奖概率',
+                  trigger: ['blur','change'],
+                }"
+              >
+                <a-input-number
+                  style="width: 100%;"
+                  :disabled="state==1"
+                  :id="'jpList-prizeRate'+index"
+                  v-model="item.prizeRate"
+                  :min="0"
+                  :max="100"
+                  :precision="2"
+                  placeholder="请输入中奖概率(%)"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col span="3" v-if="item.prizeType!='NONE'">
+              <a-form-model-item
+                :label="''"
+                :required="true"
+                :label-col=" { span: 0 }"
+                :wrapper-col=" { span: 24 }"
+                :prop="'luckyDrawPrizeList.' + index + '.prizeNum'"
+                :rules="{
+                  required: true,
+                  message: '请输入奖品数量',
+                  trigger: ['blur','change'],
+                }"
+              >
+                <a-input-number
+                  style="width: 100%;"
+                  :disabled="state==1"
+                  :id="'jpList-prizeNum'+index"
+                  v-model="item.prizeNum"
+                  :min="0"
+                  :max="999999"
+                  :precision="0"
+                  placeholder="请输入奖品数量"
+                  allowClear />
+              </a-form-model-item>
+            </a-col>
+            <a-col span="8">
+              <a-form-model-item
+                :label="''"
+                :label-col=" { span: 0 }"
+                :wrapper-col=" { span: 24 }"
+                :prop="'luckyDrawPrizeList.' + index + '.prizeImage'"
+              >
+                <Upload
+                  :ref="'prizeImage'+index"
+                  :disabled="participantsNum>0||taskParticipantsNum>0||state==1"
+                  :id="'jpList-prizeImage'+index"
+                  v-model="item.prizeImage"
+                  :fileSize="0.25"
+                  listType="picture-card">
+                </Upload>
+                <span class="upload-desc">请上传奖品图片,300*300px,0.25MB 以内。</span>
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </div>
         <div v-if="form.luckyDrawPrizeList.length" style="height: 1px;background-color: #eee;margin-bottom: 20px;" ></div>
         <a-row :gutter="48" v-if="form.luckyDrawPrizeList.length">
           <!-- <a-col :span="12">
@@ -705,6 +707,11 @@ export default {
 
 <style lang="less">
   .addLottery-modal{
+    .ant-modal-body{
+      padding: 15px 25px;
+      height: 600px;
+      overflow: auto;
+    }
     .ant-input[disabled]{
       background: #F8F8F8;
       color: #666;