diff --git a/order/addCourse/addCourse.vue b/order/addCourse/addCourse.vue index 9b03c23..de4eb62 100644 --- a/order/addCourse/addCourse.vue +++ b/order/addCourse/addCourse.vue @@ -234,6 +234,7 @@ serviceFee: 0, // 平台服务费(前端计算后展示,不入库) mallNonAssociatedLinks: e.mallNonAssociatedLinks, // 产品链接 typeName: e.typeName, + classificationId: e.classificationId, } }, // 判断是否为客户已有的课程 @@ -262,6 +263,9 @@ if (list.length) { if (this.submiting) return false this.submiting = true + uni.showLoading({ + title: '加载中' + }) const result = this.courses const list1 = [] // 实训、理论 diff --git a/order/editCourse/editCourse.vue b/order/editCourse/editCourse.vue index feda620..62b3304 100644 --- a/order/editCourse/editCourse.vue +++ b/order/editCourse/editCourse.vue @@ -6,7 +6,7 @@ {{ c.name }} - {{ units.find(e => e.id === c.unit).text }} + {{ c.unit !== '' ? units.find(e => e.id === c.unit).text : '请选择' }} @@ -134,16 +134,17 @@ // 产品分类 productCategoryList().then(res => { res.classificationList.forEach(e => { - courses['list' + this.$util.getOrderType(e.classificationId)] = { + courses['list' + e.classificationId] = { shrink: false, name: e.classificationName, deadline: '', - unit: 2, + unit: '', list: [] } }) const { provinceId, cityId } = this const isTrial = this.orderType == 2 + list.map(async e => { // 查询产品管理设置的平台结算价 if (provinceId) { @@ -167,7 +168,7 @@ if (isTrial) { this.calcDate(e, !e.authority) } - courses['list' + e.authority].list.push(e) + courses['list' + e.classificationId].list.push(e) }) this.courses = courses }).catch(e => {}) @@ -186,11 +187,13 @@ title: '标题', itemList: that.unitText, success: ({ tapIndex }) => { - c.unit = tapIndex - c.list.map(e => { - e.options = tapIndex - that.calcDate(e, !e.authority) - }) + if (tapIndex !== '') { + c.unit = tapIndex + c.list.map(e => { + e.options = tapIndex + that.calcDate(e, !e.authority) + }) + } } }) }, @@ -201,8 +204,10 @@ title: '标题', itemList: that.unitText, success: ({ tapIndex }) => { - item.options = tapIndex - that.calcDate(item) + if (tapIndex !== '') { + item.options = tapIndex + that.calcDate(item) + } } }) }, @@ -388,6 +393,11 @@ msg = '请输入使用期限!' break } + if (e.options === '') { + this.err = 'accountNum' + suf + msg = '请选择期限!' + break + } if (!e.startTime) { this.err = 'startTime' + suf msg = '请选择起止日期!' @@ -407,6 +417,9 @@ if (msg) return this.$util.errMsg(msg) if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) // 有重复订单不能提交 this.submiting = true + uni.showLoading({ + title: '加载中' + }) list.forEach(e => { e.edited = 1 // 未编辑过的标识,编辑过了的产品在编辑产品页不再显示 }) @@ -449,6 +462,9 @@ .unit { min-width: 80rpx; text-align: center; + &.placeholder { + color: #797979; + } } } } diff --git a/order/orderDetail/orderDetail.vue b/order/orderDetail/orderDetail.vue index 4dc3174..c025a07 100644 --- a/order/orderDetail/orderDetail.vue +++ b/order/orderDetail/orderDetail.vue @@ -35,11 +35,11 @@ 邮箱 {{ form.email }} - +