许成详 6 gadus atpakaļ
vecāks
revīzija
5c4146b9ae

+ 5
- 6
src/pages/system/cardAndCouponManager/cardManager/edit.vue Parādīt failu

@@ -390,14 +390,13 @@ export default {
390 390
           }
391 391
         }
392 392
         this.cardInfo.TotalCount = this.cardInfo.TotalCount - 0
393
-        console.log(JSON.stringify(this.cardInfo))
393
+        // console.log(JSON.stringify(this.cardInfo))
394 394
         this.addCard(this.cardInfo).then((res) => {
395
-          this.$alert('操作成功', '提示', {
396
-            confirmButtonText: '确定',
397
-            callback: action => {
398
-              this.$router.push({ name: 'cardList' })
399
-            }
395
+          this.$message({
396
+            type: 'success',
397
+            message: '操作成功'
400 398
           })
399
+          this.$router.push({ name: 'cardList' })
401 400
         })
402 401
       }
403 402
     },

+ 4
- 5
src/pages/system/cardAndCouponManager/couponManager/edit.vue Parādīt failu

@@ -608,12 +608,11 @@ export default {
608 608
           TotalCount: this.couponInfo.TotalCount - 0,
609 609
           ValidDays: this.couponInfo.ValidDays - 0 || 0
610 610
         }).then((res) => {
611
-          this.$alert('操作成功', '提示', {
612
-            confirmButtonText: '确定',
613
-            callback: action => {
614
-              this.$router.push({ name: 'couponList' })
615
-            }
611
+          this.$message({
612
+            type: 'success',
613
+            message: '操作成功'
616 614
           })
615
+          this.$router.push({ name: 'couponList' })
617 616
         })
618 617
       }
619 618
     },

+ 23
- 16
src/pages/system/cardAndCouponManager/vipManager/activateVip.vue Parādīt failu

@@ -149,7 +149,7 @@ export default {
149 149
         })
150 150
         return
151 151
       }
152
-      this.GetCustomerByTel({tel: this.customerPhone})
152
+      this.GetCustomerByTel({ tel: this.customerPhone })
153 153
     },
154 154
     searchSeller () {
155 155
       if (this.salesPhone === '') {
@@ -159,7 +159,7 @@ export default {
159 159
         })
160 160
         return
161 161
       }
162
-      this.GetUserByTel({tel: this.salesPhone})
162
+      this.GetUserByTel({ tel: this.salesPhone })
163 163
     },
164 164
     setNull () {
165 165
       this.salesPhone = ''
@@ -168,24 +168,31 @@ export default {
168 168
       this.SetCustomerInfoNull()
169 169
     },
170 170
     activateVip () {
171
-      this.GetVipByCode({ code: this.CardNo }).then((res) => {
172
-        if (res) {
173
-          if (res.Status !== 0) {
171
+      if (this.CardNo !== '') {
172
+        this.GetVipByCode({ code: this.CardNo }).then((res) => {
173
+          if (res) {
174
+            if (res.Status !== 0) {
175
+              this.$message({
176
+                type: 'error',
177
+                message: 'VIP卡已被激活!',
178
+              })
179
+              return
180
+            }
181
+            this.setNull()
182
+            this.centerDialogVisible = true
183
+          } else {
174 184
             this.$message({
175 185
               type: 'error',
176
-              message: 'VIP卡已被激活!',
186
+              message: '没有查询到VIP卡信息!',
177 187
             })
178
-            return
179 188
           }
180
-          this.setNull()
181
-          this.centerDialogVisible = true
182
-        } else {
183
-          this.$message({
184
-            type: 'error',
185
-            message: '没有查询到VIP卡信息!',
186
-          })
187
-        }
188
-      })
189
+        })
190
+      } else {
191
+        this.$message({
192
+          type: 'error',
193
+          message: '请输入VIP卡号!',
194
+        })
195
+      }
189 196
     },
190 197
     vipCharge () {
191 198
       if (this.vip.VipCardChildCode === '') {

+ 11
- 4
src/pages/system/caseManager/caseAreaManager/add.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>区域名:</span>
6
+          <span>区域名:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -17,7 +17,7 @@
17 17
           </div>
18 18
         </li>
19 19
         <li class="flex-h">
20
-          <span>案场:</span>
20
+          <span>案场:<em>*</em></span>
21 21
           <div class="flex-item">
22 22
             <div style="width:50%">
23 23
               <el-select v-model="CaseId" placeholder="请选择">
@@ -32,7 +32,7 @@
32 32
           </div>
33 33
         </li>
34 34
         <li class="flex-h">
35
-          <span>图片:</span>
35
+          <span>图片:<em>*</em></span>
36 36
           <div class="flex-item">
37 37
             <div>
38 38
               <el-upload
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>黑白图片:</span>
51
+          <span>黑白图片:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div>
54 54
               <el-upload
@@ -120,6 +120,13 @@ export default {
120 120
         })
121 121
         return false
122 122
       }
123
+      if (this.postData.CaseId === '') {
124
+        this.$message({
125
+          type: 'error',
126
+          message: '案场不能为空'
127
+        })
128
+        return false
129
+      }
123 130
       if (this.postData.AreaIcon === '') {
124 131
         this.$message({
125 132
           type: 'error',

+ 28
- 40
src/pages/system/cmsManager/bannerManager/add.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9 9
                 <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
@@ -12,7 +12,7 @@
12 12
           </div>
13 13
         </li>
14 14
         <li class="flex-h" v-if="postData.ForwardType==='url'">
15
-          <span>链接:</span>
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select v-model="postData.LocationId" placeholder="请选择">
@@ -75,22 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94 80
             <el-upload
95 81
               class="avatar-uploader"
96 82
               action='string'
@@ -100,26 +86,8 @@
100 86
               <img v-if="postData.ImageUrl" :src="postData.ImageUrl" class="avatar">
101 87
               <i v-else class="el-icon-plus avatar-uploader-icon"></i>
102 88
             </el-upload>
103
-            <!-- <div>
104
-              <image-uploader :upload="uploader" v-model="postData.ImageUrl" />
105
-            </div> -->
106 89
           </div>
107 90
         </li>
108
-        <!-- <li class="flex-h">
109
-          <span>对应案场:</span>
110
-          <div class="flex-item">
111
-            <div style="width:50%">
112
-              <el-select v-model="postData.CaseId" placeholder="请选择">
113
-                <el-option
114
-                  v-for="item in caseList"
115
-                  :key="item.CaseId"
116
-                  :label="item.CaseName"
117
-                  :value="item.CaseId">
118
-                </el-option>
119
-              </el-select>
120
-            </div>
121
-          </div>
122
-        </li> -->
123 91
         <li style="text-align:center">
124 92
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
125 93
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -187,7 +155,7 @@ export default {
187 155
     ...mapCmsActions(['updateLocationAllInfo']),
188 156
     ...mapActions(['updateSystemInfo']),
189 157
     submit () {
190
-      if (this.postData.ForwardType === '1') {
158
+      if (this.postData.ForwardType === 'url') {
191 159
         this.postData.ForwardResourceId = ''
192 160
         if (this.postData.ForwardUrl === '') {
193 161
           this.$message({
@@ -196,7 +164,6 @@ export default {
196 164
           })
197 165
           return false
198 166
         } else {
199
-          // var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
200 167
           var reg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/  // eslint-disable-line
201 168
           if (!reg.test(this.postData.ForwardUrl)) {
202 169
             this.$message({
@@ -208,6 +175,27 @@ export default {
208 175
         }
209 176
       } else {
210 177
         this.postData.ForwardUrl = ''
178
+        if (this.postData.ForwardResourceId === '') {
179
+          this.$message({
180
+            message: '课程不能为空',
181
+            type: 'error',
182
+          })
183
+          return false
184
+        }
185
+      }
186
+      if (this.postData.LocationId === '') {
187
+        this.$message({
188
+          message: '图片位置不能为空',
189
+          type: 'error',
190
+        })
191
+        return false
192
+      }
193
+      if (this.postData.ImageUrl === '') {
194
+        this.$message({
195
+          message: '图片不能为空',
196
+          type: 'error',
197
+        })
198
+        return false
211 199
       }
212 200
       this.postData.OrgId = this.OrgId
213 201
       // this.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'

+ 29
- 37
src/pages/system/cmsManager/bannerManager/edit.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9 9
                 <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
@@ -12,7 +12,7 @@
12 12
           </div>
13 13
         </li>
14 14
         <li class="flex-h" v-if="postData.ForwardType==='1'">
15
-          <span>链接:</span>
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select v-model="postData.LocationId" placeholder="请选择">
@@ -75,22 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94 80
             <el-upload
95 81
               class="avatar-uploader"
96 82
               action='string'
@@ -102,21 +88,6 @@
102 88
             </el-upload>
103 89
           </div>
104 90
         </li>
105
-        <!-- <li class="flex-h">
106
-          <span>对应案场:</span>
107
-          <div class="flex-item">
108
-            <div style="width:50%">
109
-              <el-select v-model="postData.CaseId" placeholder="请选择">
110
-                <el-option
111
-                  v-for="item in caseList"
112
-                  :key="item.CaseId"
113
-                  :label="item.CaseName"
114
-                  :value="item.CaseId">
115
-                </el-option>
116
-              </el-select>
117
-            </div>
118
-          </div>
119
-        </li> -->
120 91
         <li style="text-align:center">
121 92
           <el-button type="primary" size="mini" @click="submit">保存</el-button>
122 93
           <el-button type="danger" size="mini" @click="cancel">取消</el-button>
@@ -173,7 +144,7 @@ export default {
173 144
     ]),
174 145
     ...mapCmsActions(['updateLocationInfo']),
175 146
     submit () {
176
-      if (this.postData.ForwardType === '1') {
147
+      if (this.postData.ForwardType === 'url') {
177 148
         this.postData.ForwardResourceId = ''
178 149
         if (this.postData.ForwardUrl === '') {
179 150
           this.$message({
@@ -182,7 +153,7 @@ export default {
182 153
           })
183 154
           return false
184 155
         } else {
185
-          var reg = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/  // eslint-disable-line
156
+          var reg = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/  // eslint-disable-line
186 157
           if (!reg.test(this.postData.ForwardUrl)) {
187 158
             this.$message({
188 159
               message: '链接地址格式不正确',
@@ -193,6 +164,27 @@ export default {
193 164
         }
194 165
       } else {
195 166
         this.postData.ForwardUrl = ''
167
+        if (this.postData.ForwardResourceId === '') {
168
+          this.$message({
169
+            message: '课程不能为空',
170
+            type: 'error',
171
+          })
172
+          return false
173
+        }
174
+      }
175
+      if (this.postData.LocationId === '') {
176
+        this.$message({
177
+          message: '图片位置不能为空',
178
+          type: 'error',
179
+        })
180
+        return false
181
+      }
182
+      if (this.postData.ImageUrl === '') {
183
+        this.$message({
184
+          message: '图片不能为空',
185
+          type: 'error',
186
+        })
187
+        return false
196 188
       }
197 189
       this.postData.OrgId = this.OrgId
198 190
       this.postData.CaseId = this.CaseId

+ 39
- 24
src/pages/system/cmsManager/newsManager/add.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9 9
                 <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
@@ -12,7 +12,7 @@
12 12
           </div>
13 13
         </li>
14 14
         <li class="flex-h" v-if="postData.ForwardType==='url'">
15
-          <span>链接:</span>
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -24,7 +24,7 @@
24 24
           </div>
25 25
         </li>
26 26
         <li class="flex-h" v-else>
27
-          <span>课程:</span>
27
+          <span>课程:<em>*</em></span>
28 28
           <div class="flex-item">
29 29
             <div style="width:50%">
30 30
               <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%" class="radio">
45 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -48,7 +48,7 @@
48 48
           </div>
49 49
         </li>
50 50
         <li class="flex-h">
51
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
52 52
           <div class="flex-item">
53 53
             <div style="width:50%">
54 54
               <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
@@ -63,7 +63,7 @@
63 63
           </div>
64 64
         </li>
65 65
         <li class="flex-h">
66
-          <span>标题:</span>
66
+          <span>标题:<em>*</em></span>
67 67
           <div class="flex-item">
68 68
             <div style="width:50%">
69 69
               <el-input
@@ -75,23 +75,8 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
79 79
           <div class="flex-item">
80
-            <!-- <el-upload
81
-              action='string'
82
-              :http-request="toolClass.upload"
83
-              :limit='limit'
84
-              list-type="picture-card"
85
-              :file-list='imgsArr'
86
-              :on-success="handlePictureCardPreview"
87
-              :on-remove="handleRemove"
88
-              :on-exceed="exceed">
89
-              <i class="el-icon-plus"></i>
90
-            </el-upload>
91
-            <el-dialog :visible.sync="dialogVisible">
92
-              <img width="100%" :src="imgs" alt="">
93
-            </el-dialog> -->
94
-            <!-- 单选 -->
95 80
             <el-upload
96 81
               class="avatar-uploader"
97 82
               action='string'
@@ -166,7 +151,8 @@ export default {
166 151
       'updateLocationAllInfo',
167 152
     ]),
168 153
     submit () {
169
-      if (this.postData.ForwardType === '1') {
154
+      if (this.postData.ForwardType === 'url') {
155
+        this.postData.ForwardResourceId = ''
170 156
         if (this.postData.ForwardUrl === '') {
171 157
           this.$message({
172 158
             message: '链接地址不能为空',
@@ -183,8 +169,37 @@ export default {
183 169
             return false
184 170
           }
185 171
         }
172
+      } else {
173
+        this.postData.ForwardUrl = ''
174
+        if (this.postData.ForwardResourceId === '') {
175
+          this.$message({
176
+            message: '课程不能为空',
177
+            type: 'error',
178
+          })
179
+          return false
180
+        }
181
+      }
182
+      if (!this.postData.LocationIds.length) {
183
+        this.$message({
184
+          message: '图片位置不能为空',
185
+          type: 'error',
186
+        })
187
+        return false
188
+      }
189
+      if (this.postData.Title === '') {
190
+        this.$message({
191
+          message: '标题不能为空',
192
+          type: 'error',
193
+        })
194
+        return false
195
+      }
196
+      if (this.postData.ImageUrl === '') {
197
+        this.$message({
198
+          message: '图片不能为空',
199
+          type: 'error',
200
+        })
201
+        return false
186 202
       }
187
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
188 203
       this.postData.locationids = this.postData.LocationIds.join(',')
189 204
       this.$ajax(this.$api.cms.addNews.url, {
190 205
         method: this.$api.cms.addNews.method,

+ 57
- 61
src/pages/system/cmsManager/newsManager/edit.vue Parādīt failu

@@ -3,16 +3,16 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>跳转类型:</span>
6
+          <span>跳转类型:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%" class="radio">
9
-                <el-radio v-model="postData.ForwardType" label='1' >链接</el-radio>
10
-                <el-radio v-model="postData.ForwardType" label='0' >课程</el-radio>
9
+                <el-radio v-model="postData.ForwardType" label='url' >链接</el-radio>
10
+                <el-radio v-model="postData.ForwardType" label='course' >课程</el-radio>
11 11
             </div>
12 12
           </div>
13 13
         </li>
14
-        <li class="flex-h">
15
-          <span>链接:</span>
14
+        <li class="flex-h" v-if="postData.ForwardType==='url'">
15
+          <span>链接:<em>*</em></span>
16 16
           <div class="flex-item">
17 17
             <div style="width:50%">
18 18
               <el-input
@@ -23,8 +23,23 @@
23 23
             </div>
24 24
           </div>
25 25
         </li>
26
+        <li class="flex-h" v-else>
27
+          <span>课程:<em>*</em></span>
28
+          <div class="flex-item">
29
+            <div style="width:50%">
30
+              <el-select v-model="postData.ForwardResourceId" placeholder="请选择课程">
31
+                <el-option
32
+                  v-for="item in courses.list"
33
+                  :key="item.CourseId"
34
+                  :label="item.CourseName"
35
+                  :value="item.CourseId">
36
+                </el-option>
37
+              </el-select>
38
+            </div>
39
+          </div>
40
+        </li>
26 41
         <li class="flex-h">
27
-          <span>是否发布:</span>
42
+          <span>是否发布:<em>*</em></span>
28 43
           <div class="flex-item">
29 44
             <div style="width:50%" class="radio">
30 45
               <el-radio v-model="postData.Status" label='1' >是</el-radio>
@@ -33,7 +48,7 @@
33 48
           </div>
34 49
         </li>
35 50
         <li class="flex-h">
36
-          <span>图片位置:</span>
51
+          <span>图片位置:<em>*</em></span>
37 52
           <div class="flex-item">
38 53
             <div style="width:50%">
39 54
               <el-select style="width:100%" v-model="postData.LocationIds" multiple placeholder="请选择">
@@ -48,7 +63,7 @@
48 63
           </div>
49 64
         </li>
50 65
         <li class="flex-h">
51
-          <span>标题:</span>
66
+          <span>标题:<em>*</em></span>
52 67
           <div class="flex-item">
53 68
             <div style="width:50%">
54 69
               <el-input
@@ -60,22 +75,8 @@
60 75
           </div>
61 76
         </li>
62 77
         <li class="flex-h">
63
-          <span>图片:</span>
78
+          <span>图片:<em>*</em></span>
64 79
           <div class="flex-item">
65
-            <!-- <el-upload
66
-              action='string'
67
-              :http-request="toolClass.upload"
68
-              :limit='limit'
69
-              list-type="picture-card"
70
-              :file-list='imgsArr'
71
-              :on-success="handlePictureCardPreview"
72
-              :on-remove="handleRemove"
73
-              :on-exceed="exceed">
74
-              <i class="el-icon-plus"></i>
75
-            </el-upload>
76
-            <el-dialog :visible.sync="dialogVisible">
77
-              <img width="100%" :src="imgs" alt="">
78
-            </el-dialog> -->
79 80
             <el-upload
80 81
               class="avatar-uploader"
81 82
               action='string'
@@ -104,7 +105,7 @@ export default {
104 105
   data () {
105 106
     return {
106 107
       postData: {
107
-        ForwardType: '1',
108
+        ForwardType: 'url',
108 109
         ForwardUrl: '',
109 110
         ForwardResourceId: '',
110 111
         Status: '1',
@@ -134,7 +135,8 @@ export default {
134 135
   methods: {
135 136
     ...mapCmsActions(['updateLocationInfo']),
136 137
     submit () {
137
-      if (this.postData.ForwardType === '1') {
138
+      if (this.postData.ForwardType === 'url') {
139
+        this.postData.ForwardResourceId = ''
138 140
         if (this.postData.ForwardUrl === '') {
139 141
           this.$message({
140 142
             message: '链接地址不能为空',
@@ -151,16 +153,38 @@ export default {
151 153
             return false
152 154
           }
153 155
         }
156
+      } else {
157
+        this.postData.ForwardUrl = ''
158
+        if (this.postData.ForwardResourceId === '') {
159
+          this.$message({
160
+            message: '课程不能为空',
161
+            type: 'error',
162
+          })
163
+          return false
164
+        }
165
+      }
166
+      if (!this.postData.LocationIds.length) {
167
+        this.$message({
168
+          message: '图片位置不能为空',
169
+          type: 'error',
170
+        })
171
+        return false
172
+      }
173
+      if (this.postData.Title === '') {
174
+        this.$message({
175
+          message: '标题不能为空',
176
+          type: 'error',
177
+        })
178
+        return false
179
+      }
180
+      if (this.postData.ImageUrl === '') {
181
+        this.$message({
182
+          message: '图片不能为空',
183
+          type: 'error',
184
+        })
185
+        return false
154 186
       }
155
-      this.postData.ForwardType === '1' ? this.postData.ForwardType = 'url' : this.postData.ForwardType = 'course'
156 187
       this.postData.locationids = this.postData.LocationIds.join(',')
157
-      // this.postData.ImageUrl = ''
158
-      // for (let i = 0; i < this.imgsArr.length; i++) {
159
-      //   this.postData.ImageUrl += this.imgsArr[i].response.result.url + ','
160
-      // }
161
-      // if (this.postData.ImageUrl) {
162
-      //   this.postData.ImageUrl = this.postData.ImageUrl.substr(0, this.postData.ImageUrl.length - 1)
163
-      // }
164 188
       this.$ajax(this.$api.cms.editNews.url, {
165 189
         method: this.$api.cms.editNews.method,
166 190
         urlData: {
@@ -183,21 +207,6 @@ export default {
183 207
     cancel () {
184 208
       this.$router.go(-1)
185 209
     },
186
-    // handlePictureCardPreview (res, file, fileList) {
187
-    //   this.imgs = res.result.url
188
-    //   this.dialogVisible = false
189
-    //   this.imgsArr = fileList
190
-    // },
191
-    // handleRemove (file, fileList) {
192
-    //   this.imgsArr = fileList
193
-    // },
194
-    // exceed () {
195
-    //   this.$message({
196
-    //     message: '超过可传的图片上限',
197
-    //     type: 'info',
198
-    //     duration: 1000
199
-    //   })
200
-    // },
201 210
     getDetail () {
202 211
       this.$ajax(this.$api.cms.newsDetail.url, {
203 212
         method: this.$api.cms.newsDetail.method,
@@ -208,22 +217,9 @@ export default {
208 217
         res.ForwardType === 'url' ? res.ForwardType = '1' : res.ForwardType = '0'
209 218
         res.Status += ''
210 219
         res.LocationIds = res.NewsLocations.reduce((previousValue, currentValue, index, array) => {
211
-          console.log(previousValue)
212 220
           previousValue.push(currentValue.LocationId)
213 221
           return previousValue
214 222
         }, [])
215
-        console.log(res.LocationIds)
216
-        // let imgsArr = []
217
-        // let item = {
218
-        //   url: res.ImageUrl,
219
-        //   response: {
220
-        //     result: {
221
-        //       url: res.ImageUrl
222
-        //     }
223
-        //   }
224
-        // }
225
-        // imgsArr.push(item)
226
-        // this.imgsArr = imgsArr
227 223
         this.postData = res
228 224
       }).catch(msg => {
229 225
 

+ 14
- 12
src/pages/system/dashboard/index.vue Parādīt failu

@@ -101,18 +101,20 @@ export default {
101 101
       }
102 102
     }
103 103
   },
104
-  created () {
105
-    this.postData.caseid = this.postData.caseid || this.cases[0].CaseId
106
-    this.getDashboardData({
107
-      caseid: this.postData.caseid
108
-    }).then((res) => {
109
-      console.log(JSON.stringify(res))
110
-    })
111
-    this.getDashboardBottomData({
112
-      caseid: this.postData.caseid,
113
-      statype: 'week'
114
-    }).then((res) => {
115
-      console.log(JSON.stringify(res))
104
+  mounted () {
105
+    this.$nextTick(function () {
106
+      this.postData.caseid = this.postData.caseid || this.cases[0].CaseId
107
+      this.getDashboardData({
108
+        caseid: this.postData.caseid
109
+      }).then((res) => {
110
+        console.log(JSON.stringify(res))
111
+      })
112
+      this.getDashboardBottomData({
113
+        caseid: this.postData.caseid,
114
+        statype: 'week'
115
+      }).then((res) => {
116
+        console.log(JSON.stringify(res))
117
+      })
116 118
     })
117 119
   },
118 120
   methods: {

+ 45
- 41
src/pages/system/goodsManager/goodManager/edit.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
          <li class="flex-h">
6
-          <span>选择案场:</span>
6
+          <span>选择案场:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-select v-model="Case" placeholder="请选择">
@@ -18,7 +18,7 @@
18 18
           </div>
19 19
         </li>
20 20
         <li class="flex-h">
21
-          <span>商品名称:</span>
21
+          <span>商品名称:<em>*</em></span>
22 22
           <div class="flex-item">
23 23
             <div style="width:50%">
24 24
               <el-input
@@ -30,22 +30,9 @@
30 30
           </div>
31 31
         </li>
32 32
         <li class="flex-h">
33
-          <span>商品图片:</span>
33
+          <span>商品图片:<em>*</em></span>
34 34
           <div class="flex-item">
35 35
             <div style="width:50%">
36
-              <!-- 多选 -->
37
-              <!-- <el-upload
38
-                action='string'
39
-                :http-request="toolClass.upload"
40
-                :limit='limit'
41
-                list-type="picture-card"
42
-                :file-list='imgsArr'
43
-                :on-success="handlePictureCardPreview"
44
-                :on-remove="handleRemove"
45
-                :on-exceed="exceed">
46
-                <i class="el-icon-plus"></i>
47
-              </el-upload> -->
48
-              <!-- 单选 -->
49 36
               <el-upload
50 37
                 class="avatar-uploader"
51 38
                 action='string'
@@ -59,7 +46,7 @@
59 46
           </div>
60 47
         </li>
61 48
         <li class="flex-h">
62
-          <span>商品价格:</span>
49
+          <span>商品价格:<em>*</em></span>
63 50
           <div class="flex-item">
64 51
             <div style="width:50%">
65 52
               <el-input
@@ -86,7 +73,7 @@
86 73
           </div>
87 74
         </li>
88 75
         <li class="flex-h">
89
-          <span>商品类别:</span>
76
+          <span>商品类别:<em>*</em></span>
90 77
           <div class="flex-item">
91 78
             <div style="width:50%">
92 79
               <el-select v-model="detail.TypeId" placeholder="请选择商品类型">
@@ -139,7 +126,7 @@ export default {
139 126
         return this.detail.CaseId || this.caseid
140 127
       },
141 128
       set (val) {
142
-        this.UpdateInfo({...this.detail, CaseId: val})
129
+        this.UpdateInfo({ ...this.detail, CaseId: val })
143 130
         this.detail.TypeId = ''
144 131
         this.GetGoodTypes({ pagesize: 1000, caseid: this.Case })
145 132
         this.GetGoodSpecs({ pagesize: 1000, caseid: this.Case })
@@ -147,18 +134,13 @@ export default {
147 134
     },
148 135
     detailSpecs: {
149 136
       get () {
150
-        console.log(this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId))
137
+        // console.log(this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId))
151 138
         return this.infoSpecs || (this.detail.Specs || []).map(x => x.SpecId)
152 139
       },
153 140
       set (val) {
154 141
         this.infoSpecs = val
155 142
       },
156 143
     },
157
-    // imgsArr () {
158
-    //   return (this.detail.Images || []).map(x => {
159
-    //     return {...x, url: x.url || x.ImgUrl}
160
-    //   })
161
-    // },
162 144
     Image () {
163 145
       return ((this.detail.Images || [])[0] || {}).ImgUrl
164 146
     }
@@ -174,14 +156,49 @@ export default {
174 156
       'GetGoodSpecs',
175 157
     ]),
176 158
     submit () {
177
-      this.detail.specs = JSON.stringify(this.detailSpecs.map(x => ({SpecId: x, GoodsPrice: this.detail.Price})))
178
-      this.detail.images = this.detail.Images.map(x => {
159
+      this.detail.specs = JSON.stringify(this.detailSpecs.map(x => ({ SpecId: x, GoodsPrice: this.detail.Price })))
160
+      this.detail.images = (this.detail.Images || []).map(x => {
179 161
         if (x.response) {
180 162
           return x.response.result.url
181 163
         } else {
182 164
           return x.ImgUrl
183 165
         }
184 166
       }).join(',')
167
+      if ((this.detail.CaseId || '') === '') {
168
+        this.$message({
169
+          type: 'error',
170
+          message: '案场不能为空'
171
+        })
172
+        return false
173
+      }
174
+      if ((this.detail.GoodsName || '') === '') {
175
+        this.$message({
176
+          type: 'error',
177
+          message: '商品名称不能为空'
178
+        })
179
+        return false
180
+      }
181
+      if ((this.detail.Images || '') === '') {
182
+        this.$message({
183
+          type: 'error',
184
+          message: '图片不能为空'
185
+        })
186
+        return false
187
+      }
188
+      if ((this.detail.Price || '') === '') {
189
+        this.$message({
190
+          type: 'error',
191
+          message: '价格不能为空'
192
+        })
193
+        return false
194
+      }
195
+      if ((this.detail.TypeId || '') === '') {
196
+        this.$message({
197
+          type: 'error',
198
+          message: '类别不能为空'
199
+        })
200
+        return false
201
+      }
185 202
       if ((this.detail.GoodsId || '') === '') {
186 203
         this.detail.OrgId = this.orgid
187 204
         if (!this.detail.CaseId || this.detail.CaseId === '') {
@@ -200,21 +217,8 @@ export default {
200 217
     cancel () {
201 218
       this.$router.go(-1)
202 219
     },
203
-    // handlePictureCardPreview (res, file, fileList) {
204
-    //   this.detail.Images = fileList
205
-    // },
206
-    // handleRemove (file, fileList) {
207
-    //   this.detail.Images = fileList
208
-    // },
209
-    // exceed () {
210
-    //   this.$message({
211
-    //     message: '超过可传的图片上限',
212
-    //     type: 'info',
213
-    //     duration: 1000
214
-    //   })
215
-    // },
216 220
     handleAvatarSuccess (res, file) {
217
-      this.UpdateInfo({...this.detail, Images: [{ImgUrl: res.result.url}]})
221
+      this.UpdateInfo({ ...this.detail, Images: [{ ImgUrl: res.result.url }] })
218 222
     },
219 223
   },
220 224
   created () {

+ 19
- 13
src/pages/system/systemSet/userManager/add.vue Parādīt failu

@@ -3,7 +3,7 @@
3 3
     <form class="mainForm">
4 4
       <ul>
5 5
         <li class="flex-h">
6
-          <span>帐户名称:</span>
6
+          <span>帐户名称:<em>*</em></span>
7 7
           <div class="flex-item">
8 8
             <div style="width:50%">
9 9
               <el-input
@@ -39,7 +39,7 @@
39 39
           </div>
40 40
         </li>
41 41
         <li class="flex-h">
42
-          <span>真实姓名:</span>
42
+          <span>真实姓名:<em>*</em></span>
43 43
           <div class="flex-item">
44 44
             <div style="width:50%">
45 45
               <el-input
@@ -51,7 +51,7 @@
51 51
           </div>
52 52
         </li>
53 53
         <li class="flex-h">
54
-          <span>邮箱:</span>
54
+          <span>邮箱:<em>*</em></span>
55 55
           <div class="flex-item">
56 56
             <div style="width:50%">
57 57
               <el-input
@@ -75,7 +75,7 @@
75 75
           </div>
76 76
         </li>
77 77
         <li class="flex-h">
78
-          <span>手机号:</span>
78
+          <span>手机号:<em>*</em></span>
79 79
           <div class="flex-item">
80 80
             <div style="width:50%">
81 81
               <el-input
@@ -219,21 +219,27 @@ export default {
219 219
         })
220 220
         return false
221 221
       }
222
+      if (this.postData.RealName === '') {
223
+        this.$message({
224
+          type: 'error',
225
+          message: '真实姓名不能为空'
226
+        })
227
+        return false
228
+      }
222 229
       if (this.postData.Phone === '') {
223 230
         this.$message({
224 231
           type: 'error',
225 232
           message: '手机号不能为空'
226 233
         })
227 234
         return false
228
-      } else {
229
-        var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
230
-        if (!myreg.test(this.postData.Phone)) {
231
-          this.$message({
232
-            type: 'error',
233
-            message: '请输入正确的手机号!'
234
-          })
235
-          return false
236
-        }
235
+      }
236
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
237
+      if (!myreg.test(this.postData.Phone)) {
238
+        this.$message({
239
+          type: 'error',
240
+          message: '请输入正确的手机号!'
241
+        })
242
+        return false
237 243
       }
238 244
       if (this.postData.Email !== '') {
239 245
         var emailreg = new RegExp('^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$')

+ 15
- 9
src/pages/system/systemSet/userManager/edit.vue Parādīt failu

@@ -237,21 +237,27 @@ export default {
237 237
         })
238 238
         return false
239 239
       }
240
+      if (this.postData.RealName === '') {
241
+        this.$message({
242
+          type: 'error',
243
+          message: '真实姓名不能为空'
244
+        })
245
+        return false
246
+      }
240 247
       if (this.postData.Phone === '') {
241 248
         this.$message({
242 249
           type: 'error',
243 250
           message: '手机号不能为空'
244 251
         })
245 252
         return false
246
-      } else {
247
-        var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
248
-        if (!myreg.test(this.postData.Phone)) {
249
-          this.$message({
250
-            type: 'error',
251
-            message: '请输入正确的手机号!'
252
-          })
253
-          return false
254
-        }
253
+      }
254
+      var myreg = /^[1][3,4,5,6,7,8][0-9]{9}$/
255
+      if (!myreg.test(this.postData.Phone)) {
256
+        this.$message({
257
+          type: 'error',
258
+          message: '请输入正确的手机号!'
259
+        })
260
+        return false
255 261
       }
256 262
       if (this.postData.Email !== '') {
257 263
         var emailreg = new RegExp('^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$')

+ 4
- 0
src/style/main.css Parādīt failu

@@ -251,6 +251,10 @@ select:focus {
251 251
   min-width: 110px;
252 252
 }
253 253
 
254
+.mainForm>ul>li>span:first-child>em{
255
+  color: red;
256
+}
257
+
254 258
 .mainForm>ul>li>div>div{
255 259
   min-height: 40px;
256 260
   vertical-align: top;