|
@@ -453,7 +453,7 @@
|
453
|
453
|
<div style="display: inline-block;">
|
454
|
454
|
<el-date-picker
|
455
|
455
|
:disabled="!editAll || isread"
|
456
|
|
- value-format="yyyy-MM-ddT00:00:00+08:00"
|
|
456
|
+ value-format="yyyy-MM-ddT23:59:59+08:00"
|
457
|
457
|
v-model="addPrizeInfo.VerificationEnd"
|
458
|
458
|
type="date"
|
459
|
459
|
placeholder="选择截止日期">
|
|
@@ -659,8 +659,7 @@ export default {
|
659
|
659
|
},
|
660
|
660
|
mounted () {
|
661
|
661
|
uploadImage(this.$refs.myQuillEditor.quill, file => {
|
662
|
|
- console.log(file)
|
663
|
|
- return this.toolClass.upload(file).then(data => {
|
|
662
|
+ return this.toolClass.upload({ file }).then(data => {
|
664
|
663
|
const url = data.result.url
|
665
|
664
|
return { src: url, alt: '' }
|
666
|
665
|
})
|
|
@@ -876,12 +875,13 @@ export default {
|
876
|
875
|
}
|
877
|
876
|
for (var a = 0; a < this.postData.Prizes.length; a++) {
|
878
|
877
|
if (this.postData.Prizes[a].IsReality) {
|
879
|
|
- if (this.postData.Prizes[a].VerificationStart === '') {
|
|
878
|
+ if (this.postData.Prizes[a].ValidDays === '') {
|
|
879
|
+ delete this.postData.Prizes[a].ValidDays
|
|
880
|
+ }
|
|
881
|
+ if (this.postData.Prizes[a].VerificationStart === '' || this.postData.Prizes[a].VerificationEnd === '') {
|
880
|
882
|
delete this.postData.Prizes[a].VerificationStart
|
881
|
883
|
delete this.postData.Prizes[a].VerificationEnd
|
882
|
884
|
this.postData.Prizes[a].ValidDays = this.postData.Prizes[a].ValidDays - 0
|
883
|
|
- } else {
|
884
|
|
- delete this.postData.Prizes[a].ValidDays
|
885
|
885
|
}
|
886
|
886
|
} else {
|
887
|
887
|
delete this.postData.Prizes[a].VerificationStart
|
|
@@ -922,8 +922,16 @@ export default {
|
922
|
922
|
this.addPhoneTableData.splice(index, 1)
|
923
|
923
|
this.postData.Prizes[this.editPrizePhoneIndex].Defaults.splice(index, 1)
|
924
|
924
|
},
|
|
925
|
+ findSamePhone (num) { // 验重手机号
|
|
926
|
+ for (var n = 0; n < this.addPhoneTableData.length; n++) {
|
|
927
|
+ if (this.addPhoneTableData[n].Tel === num) {
|
|
928
|
+ return false
|
|
929
|
+ }
|
|
930
|
+ }
|
|
931
|
+ return true
|
|
932
|
+ },
|
925
|
933
|
addPhoneInPrize () { // 添加内定奖品手机号
|
926
|
|
- if (this.checkPhone(this.addPhoneNum) && this.addPhoneNum !== '') {
|
|
934
|
+ if (this.checkPhone(this.addPhoneNum) && this.addPhoneNum !== '' && this.findSamePhone(this.addPhoneNum)) {
|
927
|
935
|
this.addPhoneTableData.push({
|
928
|
936
|
Tel: this.addPhoneNum,
|
929
|
937
|
})
|
|
@@ -1048,7 +1056,7 @@ export default {
|
1048
|
1056
|
return false
|
1049
|
1057
|
}
|
1050
|
1058
|
if (this.verificationType === 1 && this.addPrizeInfo.IsReality) {
|
1051
|
|
- if (this.addPrizeInfo.ValidDays === '' || (this.addPrizeInfo.ValidDays - 0) % 1 !== 0 || (this.addPrizeInfo.ValidDays - 0) <= 0) {
|
|
1059
|
+ if (!this.addPrizeInfo.ValidDays || (this.addPrizeInfo.ValidDays - 0) % 1 !== 0 || (this.addPrizeInfo.ValidDays - 0) <= 0) {
|
1052
|
1060
|
this.$message({
|
1053
|
1061
|
type: 'error',
|
1054
|
1062
|
message: '有效期须为大于0正整数'
|