diff --git a/src/components/shop-car-apply/apply_service_state.vue b/src/components/shop-car-apply/apply_service_state.vue index fc6fa71e62be67a39be37d80c309300ba2b544ef..e973d5f5fd9afdea484153259102fc315d0e51e4 100644 --- a/src/components/shop-car-apply/apply_service_state.vue +++ b/src/components/shop-car-apply/apply_service_state.vue @@ -50,7 +50,9 @@
@@ -70,6 +72,7 @@ v-if="!data.isapp" v-show="showtable" :isSelection="true" + ref="apply_service_state_table" :headers="headers" :stripe="true" :datas="data.data" @@ -90,6 +93,8 @@ export default { data() { return { sceneinput: "", + fileList:'', + imgList:[], showtable: false, headers: [ { @@ -126,7 +131,14 @@ export default { }, mounted() {}, methods: { - + getNewList(val) { + console.log(val); + this.fileList = "" + this.fileList = val.map((v,k)=>{ + return v.url + }).join(';') + console.log(this.fileList) + } }, }; diff --git a/src/components/shop-car-apply/service_list.vue b/src/components/shop-car-apply/service_list.vue index 3703784eeb6c44eda25a64e1e91911550d1113c2..5ad7631c854c590ada459b1f74d6606cc2fbda05 100644 --- a/src/components/shop-car-apply/service_list.vue +++ b/src/components/shop-car-apply/service_list.vue @@ -6,7 +6,7 @@ 数量 操作

- + diff --git a/src/components/table/table-um.vue b/src/components/table/table-um.vue index 802ae2ba614f86e427c26e3199840540d5827ed0..e4d7898c0af3ef64bfa7d6c81646ba8324e0c42f 100644 --- a/src/components/table/table-um.vue +++ b/src/components/table/table-um.vue @@ -489,6 +489,7 @@ export default { if (this.url == "") { let newArr = []; if (this.datas) { + console.log(this.datas); newArr = this.datas; } let total = newArr.length; diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue index d78674f50cf8508c974113efa46ea7202422c551..a1270afb32ae6cd6e02ede270375895f6c883872 100644 --- a/src/pages/service_shop/shop_car_apply.vue +++ b/src/pages/service_shop/shop_car_apply.vue @@ -2,7 +2,7 @@
- +
@@ -40,6 +40,7 @@ export default { }, ], + post_arr:[], service_arr:[ { img:'http://b-ssl.duitang.com/uploads/item/201705/09/20170509165713_NiHaG.jpeg', @@ -116,28 +117,70 @@ export default { }, methods: { sub_service(){ - console.log(this.$refs.apply_info.formInline); - // var temp = { - // "apply_part":{ - // "o_name":"部门联系人姓名", - // "o_mobile":"部门联系人电话 / 手机号 或 固话" - // }, - // carts:[] + console.log(this.$refs.apply_service.$refs.apply_service_state); + console.log(this.$refs.apply_service.$refs.apply_service_state[0].$refs.apply_service_state_table.metaData); + let formInline = this.$refs.apply_info.formInline + if(formInline.preson&&formInline.phone){ + var temp = { + "apply_part":{ + "o_name":formInline.preson, + "o_mobile":formInline.phone + }, + carts:[] + } + this.post_arr.forEach((e,idx) => { + if(e.service_id){ + temp.carts.push( + { + "id": e.id, + "service_id": e.service_id, + "duration": e.duration, + "spec_id": e.spec_id, + "duration_method": e.duration_method, + "is_subscribe": e.is_subscribe, + "app_id": 0, + "scene":this.$refs.apply_service.$refs.apply_service_state[idx].sceneinput, + "apply_file":this.$refs.apply_service.$refs.apply_service_state[idx].fileList, + "apply_fields":this.$refs.apply_service.$refs.apply_service_state[idx].$refs.apply_service_state_table.metaData + } + ) + }else{ + temp.carts.push( + { + "id": e.id, + "service_id":0, + "duration": e.duration, + "spec_id": e.spec_id, + "duration_method": e.duration_method, + "is_subscribe": e.is_subscribe, + "app_id": e.app_id, + "scene":this.$refs.apply_service.$refs.apply_service_state[idx].sceneinput, + "apply_file":"", + } + ) + } + }); - // } - // this.$http - // .post(`/apaas/serviceapp/v3/shopcart/apply`) - // .then(response => { - // console.log(response); - // }) + }else{ + this.$message.error('请完善服务申请') + return + } + + this.$http + .post(`/apaas/serviceapp/v3/shopcart/apply`,temp) + .then(response => { + console.log(response); + }) }, get_car_list(){ this.service_arr = [] + this.post_arr = [] this.$http .get(`/apaas/serviceapp/v3/shopcart/list`) .then(response => { console.log(response); let data = response.data.data.valid + this.post_arr = data data.forEach(e => { this.service_arr.push({}) let l = this.service_arr.length -1 @@ -147,9 +190,9 @@ export default { this.service_arr[l]['title'] = e.application.app_name this.service_arr[l]['type'] = e.application.type_name this.service_arr[l]['auth'] = e.application.org_name - this.service_arr[l]['size'] = e.app_apply.apply_type==0?'部署':'开发' - this.service_arr[l]['applytype'] = '申请方式:'+e.app_apply.duration_unit==1?'月':'年' - this.service_arr[l]['num'] = e.app_apply.duration + this.service_arr[l]['size'] = e.spec_id==0?'部署':'开发' + this.service_arr[l]['applytype'] = '申请方式:'+e.duration_unit==1?'月':'年' + this.service_arr[l]['num'] = e.duration this.service_arr[l]['isMg'] = false this.service_arr[l]['isapp'] = true }else{ @@ -166,10 +209,12 @@ export default { this.service_arr[l]['auth'] = e.service.organization_name this.service_arr[l]['size'] = '规格:' e.service.request_spcs_info.forEach(el => { - this.service_arr[l]['size'] = this.service_arr[l]['size'] + '访问次数:'+el.count+',访问量:'+el.pv+',' + if(e.spec_id==el.id){ + this.service_arr[l]['size'] = this.service_arr[l]['size'] + '访问次数:'+el.count+',访问量:'+el.pv+',' + } }); - this.service_arr[l]['applytype'] = '申请方式:'+(e.service_apply.duration_unit==1?'月':'年') - this.service_arr[l]['num'] = e.service_apply.duration + this.service_arr[l]['applytype'] = '申请方式:'+(e.duration_unit==1?'月':'年') + this.service_arr[l]['num'] = e.duration this.service_arr[l]['isMg'] = e.service.openness == 3 this.service_arr[l]['data'] = JSON.parse(e.service.res_fields) console.log(this.service_arr[l]['data']); diff --git a/src/pages/workbench/yygl/app_edit.vue b/src/pages/workbench/yygl/app_edit.vue index 1626fb9ebab654e741299fdf0cf4f25d4665ad75..3c0506124bf4665e3dae5c82d5d6ee2152d8273d 100644 --- a/src/pages/workbench/yygl/app_edit.vue +++ b/src/pages/workbench/yygl/app_edit.vue @@ -44,7 +44,7 @@ { + this.form.fileList = [val].map((v,k)=>{ return v.url }).join(';') console.log(this.form.fileList)