diff --git a/components/bookingOrderCard.vue b/components/bookingOrderCard.vue new file mode 100644 index 0000000..6a21048 --- /dev/null +++ b/components/bookingOrderCard.vue @@ -0,0 +1,270 @@ + + + + + diff --git a/components/projectPicker.vue b/components/projectPicker.vue index fa4e2b1..05c24c3 100644 --- a/components/projectPicker.vue +++ b/components/projectPicker.vue @@ -20,9 +20,9 @@ - - {{ item.typeName }} + {{ item.name }} @@ -39,6 +39,9 @@ + + 新增维修项目 + @@ -68,6 +71,10 @@ export default { console.log("执行onload") this.$refs.popup.open() this.getProjeectList() + if (this.typeList && this.typeList.length > 0) { + this.typeId = this.typeList[0].id + this.getProject() + } // this.selectedProj = JSON.parse(JSON.stringify(selectedProj)) }, removeProj(index) { @@ -82,46 +89,44 @@ export default { } }, chooseType(type) { - this.groupList = type.groupList - this.typeId = type.typeId + this.typeId = type.id + this.getProject() + console.log("this.groupList",this.groupList) + // this.typeId = type.typeId + }, + addProject() { + uni.navigateTo({ + url: `/pages/project/project?typeId=${this.typeId}` + }) }, getProjeectList() { - const categoryList = [] - console.log("执行") const params = { pageNo: 1, pageSize: 10000, type: '03' } request({ - url: '/admin-api/repair/project/getRepairProjectAndCateGory', + // url: '/admin-api/repair/project/getRepairProjectAndCateGory', + url: '/admin-api/conf/baseType/list', method: 'GET', params: params }).then(res => { console.log("分类",res); this.typeList = res.data - // categoryList.push(...res.data) - // console.log("categoryList",categoryList) - // - // categoryList.forEach(item => { - // let a = { - // name: item.name, - // id: item.id, - // groupList: [ - // - // ] - // } - // this.typeList.push(a) - // }) - // console.log("typeList",this.typeList) }) + }, + getProject() { request({ url: '/admin-api/repair/project/page', method: 'GET', - params: params + params: { + pageNo: 1, + pageSize: 10000, + type: this.typeId + } }).then(res => { console.log("项目",res); - this.projectList = res.data.records + this.groupList = res.data.records }) }, diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue index 38e0c24..304c050 100644 --- a/pages-order/addOrder/addOrder.vue +++ b/pages-order/addOrder/addOrder.vue @@ -10,7 +10,7 @@ @@ -37,16 +37,21 @@