MrShi
2024-04-02 174350e855349919ee287a52d3198c7c7558b858
wx/pages/factoryChange/factoryChange.vue
@@ -73,10 +73,10 @@
               cyclePrice: ''
            },
            rules: {
               'programmeName': {
               'code': {
                  type: 'string',
                  required: true,
                  message: '请选择保险方案',
                  message: '请选择保单号',
                  trigger: ['blur', 'change']
               },
               'startDate': {
@@ -105,8 +105,11 @@
               }
            })
         },
         confirm(e) {
            this.model.id = e.value[0].solutionId
         async confirm(e) {
            // 获取最新方案id
            let res = await this.$u.api.insuranceApplyById(e.value[0].id)
            if (res.code === 200) {
               this.model.id = res.data.newVersionSolutionId
            this.model.code = e.value[0].code
            this.id = e.value[0].id
            if ([1,3].includes(this.compareDates(this.getDate(), e.value[0].startTime)) && !e.value[0].lastChangeDate) {
@@ -130,17 +133,20 @@
               }
            }
            this.show = false
            }
         },
         // 选择时间
         confirm1(e) {
            this.model.startDate = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') + ' 00:00:00'
            this.$u.api.getChangeCountCyclePriceVO({
               applyId: this.model.id,
               applyId: this.id,
               validTime: this.model.startDate
            }).then(res => {
               if (res.code === 200) {
                  this.model.cyclePrice = res.data.cyclePrice
                  this.show1 = false
               } else {
                  this.model.startDate = ''
               }
            })
         },
@@ -174,7 +180,7 @@
         submit() {
            this.$refs.uForm.validate().then(res => {
               uni.navigateTo({
                  url: `/pages/addition_subtraction/addition_subtraction?id=${this.model.id}&codeId=${this.id}&cyclePrice=${this.model.cyclePrice}&startDate=${this.model.startDate}&code=${this.model.code}`
                  url: `/pages/factory_change_insurance/factory_change_insurance?id=${this.model.id}&codeId=${this.id}&cyclePrice=${this.model.cyclePrice}&startDate=${this.model.startDate}&code=${this.model.code}`
               })
            }).catch(errors => {