zs 1 năm trước cách đây
mục cha
commit
21f2e39dfb
2 tập tin đã thay đổi với 4 bổ sung39 xóa
  1. 2 25
      pagesMy/score/index.js
  2. 2 14
      pagesMy/score/index.wxml

+ 2 - 25
pagesMy/score/index.js

@@ -10,7 +10,6 @@ Page({
         id: '',
         id: '',
         form: {},
         form: {},
         // 状态
         // 状态
-        statusList: [],
         userList: [],
         userList: [],
         red_disabled: false,
         red_disabled: false,
         blue_disabled: false
         blue_disabled: false
@@ -25,23 +24,6 @@ Page({
                 if (data) return data.name
                 if (data) return data.name
                 else return '暂无'
                 else return '暂无'
             }
             }
-        } else {
-            if (value) {
-                let list = that.data[model + 'List']
-                let data = list.find(i => i.value == value);
-                if (data) return data.label
-                else return '暂无'
-            }
-        }
-    },
-    // 选择状态
-    statusChange(e) {
-        const that = this;
-        const index = e.detail.value;
-        let data = that.data.statusList[index];
-        if (data) {
-            that.setData({ 'form.status': data.value })
-            that.setData({ 'form.status_name': data.label })
         }
         }
     },
     },
     // 提交保存
     // 提交保存
@@ -81,17 +63,14 @@ Page({
         wx.hideLoading()
         wx.hideLoading()
     },
     },
     initValidate() {
     initValidate() {
-        const rules = { red_score: { required: true }, blue_score: { required: true }, status: { required: true } }
-        const messages = { red_score: { required: '请输入红方比分' }, blue_score: { required: '请输入蓝方比分' }, status: { required: '请选择状态' } };
+        const rules = { red_score: { required: true }, blue_score: { required: true } }
+        const messages = { red_score: { required: '请输入红方比分' }, blue_score: { required: '请输入蓝方比分' } };
         this.WxValidate = new WxValidate(rules, messages)
         this.WxValidate = new WxValidate(rules, messages)
     },
     },
     // 查询其他信息
     // 查询其他信息
     async searchOther() {
     async searchOther() {
         const that = this;
         const that = this;
         let res;
         let res;
-        // 状态
-        res = await app.$api('dictData', 'GET', { type: 'course_status', is_use: '0' })
-        if (res.errcode == '0') that.setData({ statusList: res.data })
         // 团队
         // 团队
         res = await app.$api('team', 'GET', { status: '1' })
         res = await app.$api('team', 'GET', { status: '1' })
         if (res.errcode == '0') that.setData({ userList: res.data })
         if (res.errcode == '0') that.setData({ userList: res.data })
@@ -108,8 +87,6 @@ Page({
                     if (form && form._id) {
                     if (form && form._id) {
                         if (form.red_team_id == that.data.team_id) that.setData({ blue_disabled: true })
                         if (form.red_team_id == that.data.team_id) that.setData({ blue_disabled: true })
                         else if (form.blue_team_id == that.data.team_id) that.setData({ red_disabled: true })
                         else if (form.blue_team_id == that.data.team_id) that.setData({ red_disabled: true })
-                        // 状态
-                        if (form.status) form.status_name = that.getDict(form.status, 'status')
                     }
                     }
                 } else {
                 } else {
                     wx.showToast({ title: `${aee.errmsg}`, icon: 'error' });
                     wx.showToast({ title: `${aee.errmsg}`, icon: 'error' });

+ 2 - 14
pagesMy/score/index.wxml

@@ -7,7 +7,7 @@
                         红方团队:
                         红方团队:
                     </view>
                     </view>
                     <view class="value">
                     <view class="value">
-                        <input disabled value="{{form.red_team_name}}" name="red_team_name" type="text" placeholder="" />
+                        <input disabled value="{{form.red_team_name}}" type="text" placeholder="" />
                     </view>
                     </view>
                 </view>
                 </view>
                 <view class="info_1">
                 <view class="info_1">
@@ -23,7 +23,7 @@
                         蓝方团队:
                         蓝方团队:
                     </view>
                     </view>
                     <view class="value">
                     <view class="value">
-                        <input disabled value="{{form.blue_team_name}}" name="blue_team_name" type="text" placeholder="" />
+                        <input disabled value="{{form.blue_team_name}}" type="text" placeholder="" />
                     </view>
                     </view>
                 </view>
                 </view>
                 <view class="info_1">
                 <view class="info_1">
@@ -34,18 +34,6 @@
                         <input disabled="{{blue_disabled}}" value="{{form.blue_score}}" name="blue_score" type="text" placeholder="" />
                         <input disabled="{{blue_disabled}}" value="{{form.blue_score}}" name="blue_score" type="text" placeholder="" />
                     </view>
                     </view>
                 </view>
                 </view>
-                <view class="info_1">
-                    <view class="label">
-                        状态:
-                    </view>
-                    <view class="value">
-                        <picker bindchange="statusChange" value="{{form.status}}" name="status" range="{{statusList}}" range-key='label'>
-                            <view class="picker">
-                                {{form.status_name||''}}
-                            </view>
-                        </picker>
-                    </view>
-                </view>
                 <view class="btn">
                 <view class="btn">
                     <button type="primary" formType="submit">上传比分</button>
                     <button type="primary" formType="submit">上传比分</button>
                 </view>
                 </view>