|
|
@@ -1,471 +1,364 @@
|
|
|
<template>
|
|
|
- <div class='container'>
|
|
|
- <div class="containerTitle">
|
|
|
- <div class="titleTop" @click="chooseLevel('photographer')">
|
|
|
- <div class="name">选择摄影师</div>
|
|
|
- <div class="sub">{{choosePhotographerLevelInfo.levelName}}</div>
|
|
|
- <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
|
|
|
+ <div class="container">
|
|
|
+ <div v-for="(item,index) in allIShowList" :key="index">
|
|
|
+ <div class="containerTitle">
|
|
|
+ <div class="titleTop" @click="chooseLevel(item.levelList,item.index)">
|
|
|
+ <div class="name">选择{{item.name}}</div>
|
|
|
+ <div class="sub">{{item.levelName}}</div>
|
|
|
+ <img src="/static/images/gouwuche_icon_zhankai.png" alt />
|
|
|
+ </div>
|
|
|
+ <div class="tips">点击图片可以查看详情</div>
|
|
|
</div>
|
|
|
- <div class="tips">点击图片可以查看详情</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="list">
|
|
|
- <customizeItem v-for="(item,index) in filifterPhotographer" type='photographer' @chooseSelect='chooseSelect' :id='item.id' :isChoose="checkChoose('photographer',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="containerTitle">
|
|
|
- <div class="titleTop" @click="chooseLevel('makeup_artist')">
|
|
|
- <div class="name">选择化妆师</div>
|
|
|
- <div class="sub">{{chooseMakeUpLevelInfo.levelName}}</div>
|
|
|
- <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
|
|
|
+ <div class="list">
|
|
|
+ <customizeItem
|
|
|
+ v-for="(k,kIndex) in item.children"
|
|
|
+ :index="item.index"
|
|
|
+ @chooseSelect="chooseSelect"
|
|
|
+ :id="k.id"
|
|
|
+ :isChoose="k.isChoose"
|
|
|
+ :name="k.serviceName"
|
|
|
+ :image="k.listImage"
|
|
|
+ :key="kIndex"
|
|
|
+ ></customizeItem>
|
|
|
</div>
|
|
|
- <div class="tips">点击图片可以查看详情</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="list">
|
|
|
- <customizeItem v-for="(item,index) in filifterMakeUp" type='makeup_artist' @chooseSelect='chooseSelect' :id='item.id' :isChoose="checkChoose('makeup_artist',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="containerTitle">
|
|
|
- <div class="titleTop" @click="chooseLevel('clothing')">
|
|
|
- <div class="name">选择服装道具</div>
|
|
|
- <div class="sub">{{chooseClothingLevelInfo.levelName}}</div>
|
|
|
- <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
|
|
|
+ <div class="numberList">
|
|
|
+ <div class="num-item">
|
|
|
+ <div class="title">照片精修数量</div>
|
|
|
+ <div class="val">{{photoAmount}}</div>
|
|
|
</div>
|
|
|
- <div class="tips">点击图片可以查看详情,可多选</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="list">
|
|
|
- <customizeItem v-for="(item,index) in filifterClothing" type='clothing' @chooseSelect='chooseSelect' :id='item.id' :isChoose="checkChoose('clothing',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="containerTitle">
|
|
|
- <div class="titleTop" @click="chooseLevel('album')">
|
|
|
- <div class="name">选择相框</div>
|
|
|
- <div class="sub">{{chooseAlbumLevelInfo.levelName}}</div>
|
|
|
- <img src="/static/images/gouwuche_icon_zhankai.png" alt="">
|
|
|
+ <div class="num-item">
|
|
|
+ <div class="title">相册/放大数量</div>
|
|
|
+ <div class="val">{{fandaAmount+albumAmount}}</div>
|
|
|
</div>
|
|
|
- <div class="tips">点击图片可以查看详情,可多选</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="list">
|
|
|
- <customizeItem v-for="(item,index) in filifterAlbum" @chooseSelect='chooseSelect' :id='item.id' type='album' :isChoose="checkChoose('album',item.id)" :name='item.serviceName' :image='item.listImage' :key='index'></customizeItem>
|
|
|
</div>
|
|
|
|
|
|
<div class="tipsContnt">
|
|
|
<div class="title">不需要选择的服务</div>
|
|
|
<div class="content">
|
|
|
- <div v-for="(item,index) in mandatory" :key="index">{{item.serviceName}}</div>
|
|
|
+ <div v-for="(item,index) in baseService" :key="index">{{item.serviceName}}</div>
|
|
|
</div>
|
|
|
<div class="line"></div>
|
|
|
<div class="title">购买须知</div>
|
|
|
- <div class="content">1、购买后需联系客服预约档期(需提前15-40天) <br />2、用户若选择定金支付,剩余资金可在拍摄前线上支付,也可以线下门店支付 <br />3、最终用户选择的照片数量超过了套餐中标示的数量,则需要补齐相关差价</div>
|
|
|
+ <div class="content">
|
|
|
+ 1、购买后需联系客服预约档期(需提前15-40天)
|
|
|
+ <br />2、用户若选择定金支付,剩余资金可在拍摄前线上支付,也可以线下门店支付
|
|
|
+ <br />3、最终用户选择的照片数量超过了套餐中标示的数量,则需要补齐相关差价
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="subContent">
|
|
|
<span>总价:</span>
|
|
|
<span class="price">{{total}}</span>
|
|
|
<span class="detail" @click="showDetail=true">详情</span>
|
|
|
- <img src="/static/images/more.png" @click="showDetail=true" alt="">
|
|
|
+ <img src="/static/images/more.png" @click="showDetail=true" alt />
|
|
|
<div style="flex-grow:1"></div>
|
|
|
<button @click="submit">立即下单</button>
|
|
|
</div>
|
|
|
|
|
|
- <actionSheet :list='chooseList' label='levelName' :visible='showAction' @close='close'></actionSheet>
|
|
|
- <customizeDetail :list='allChooseInfo' :mandatory='mandatory' :visible='showDetail' @close="showDetail=false"></customizeDetail>
|
|
|
- <specificationsContent :visible='showSpecifications' type='customize' :productInfo='productInfo' @close='showSpecifications=false' :totalMoney='total' :chooseType='chooseSpecificationType' :chooseNum='1' @changeType='changeType' @changeChoose='changeChoose'></specificationsContent>
|
|
|
-
|
|
|
+ <actionSheet :list="chooseList" label="levelName" :visible="showAction" @close="close"></actionSheet>
|
|
|
+ <customizeDetail
|
|
|
+ :list="allChooseServiceInfo"
|
|
|
+ :mandatory="baseService"
|
|
|
+ :visible="showDetail"
|
|
|
+ @close="showDetail=false"
|
|
|
+ ></customizeDetail>
|
|
|
+ <specificationsContent
|
|
|
+ :visible="showSpecifications"
|
|
|
+ type="customize"
|
|
|
+ :productInfo="productInfo"
|
|
|
+ @close="showSpecifications=false"
|
|
|
+ :totalMoney="total"
|
|
|
+ :chooseType="chooseSpecificationType"
|
|
|
+ :chooseNum="1"
|
|
|
+ @changeType="changeType"
|
|
|
+ @changeChoose="changeChoose"
|
|
|
+ ></specificationsContent>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { mapState } from 'vuex';
|
|
|
-import customizeItem from '../../components/CustomizeItem';
|
|
|
-import actionSheet from '../../components/ActionSheet';
|
|
|
-import customizeDetail from '../../components/CustomizeDetail';
|
|
|
-import specificationsContent from '../../components/SpecificationsContent';
|
|
|
-import { all } from 'q';
|
|
|
-import calc from '../../calc';
|
|
|
+import { mapState } from "vuex";
|
|
|
+import customizeItem from "../../components/CustomizeItem";
|
|
|
+import actionSheet from "../../components/ActionSheet";
|
|
|
+import customizeDetail from "../../components/CustomizeDetail";
|
|
|
+import specificationsContent from "../../components/SpecificationsContent";
|
|
|
+import { all } from "q";
|
|
|
+import calc from "../../calc";
|
|
|
export default {
|
|
|
- name: '',
|
|
|
+ name: "",
|
|
|
data() {
|
|
|
return {
|
|
|
- storeServiceList: '',
|
|
|
- allPhotographer: [],
|
|
|
- allPhotographerLevel: [],
|
|
|
- choosePhotographerLevel: 0,
|
|
|
- allMakeupList: [],
|
|
|
- allMakeupLevel: [],
|
|
|
- chooseMakeupLevel: 0,
|
|
|
showAction: false,
|
|
|
chooseList: [],
|
|
|
- chooseType: '',
|
|
|
- allClothingList: [],
|
|
|
- allClothingLevel: [],
|
|
|
- chooseClothingLevel: '0',
|
|
|
- allAlbumList: [],
|
|
|
- allAlbumLevel: [],
|
|
|
- chooseAlbumLevel: 0,
|
|
|
- choosePhotographer: 0,
|
|
|
- chooseMakeup: 0,
|
|
|
- chooseClothing: [],
|
|
|
- chooseAlbum: [],
|
|
|
- mandatory: [],
|
|
|
+ allnameList: [],
|
|
|
+ allServiceList: [],
|
|
|
+ allLevelList: [],
|
|
|
+ allChooseLevel: [],
|
|
|
+ allChooseServiceList: [],
|
|
|
+ chooseIndex: 0,
|
|
|
showDetail: false,
|
|
|
- showSpecifications: false,
|
|
|
- chooseSpecificationType: 'all',
|
|
|
+ chooseSpecificationType: "all",
|
|
|
+ showSpecifications: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapState(['userInfo', 'storeId']),
|
|
|
- choosePhotographerLevelInfo() {
|
|
|
- var info = {};
|
|
|
- var list = [...this.allPhotographerLevel];
|
|
|
- list.forEach(item => {
|
|
|
- if (item.id == this.choosePhotographerLevel) {
|
|
|
- info = item;
|
|
|
- }
|
|
|
- });
|
|
|
- return info;
|
|
|
- },
|
|
|
- filifterPhotographer() {
|
|
|
+ ...mapState(["userInfo", "storeId"]),
|
|
|
+ allInfoList() {
|
|
|
var list = [];
|
|
|
- var allList = [...this.allPhotographer];
|
|
|
- allList.forEach(item => {
|
|
|
- if (
|
|
|
- item.typeLevel == this.choosePhotographerLevel ||
|
|
|
- this.choosePhotographerLevel == 0
|
|
|
- ) {
|
|
|
- list.push(item);
|
|
|
- }
|
|
|
+ var nameList = [...this.allnameList];
|
|
|
+ var serviceList = [...this.allServiceList];
|
|
|
+ var levelList = [...this.allLevelList];
|
|
|
+
|
|
|
+ list = nameList.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ children: [],
|
|
|
+ levelList: [
|
|
|
+ {
|
|
|
+ levelName: "全部" + item.name,
|
|
|
+ id: ""
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
});
|
|
|
- return list;
|
|
|
- },
|
|
|
- chooseMakeUpLevelInfo() {
|
|
|
- var info = {};
|
|
|
- var list = [...this.allMakeupLevel];
|
|
|
- list.forEach(item => {
|
|
|
- if (item.id == this.chooseMakeupLevel) {
|
|
|
- info = item;
|
|
|
- }
|
|
|
+
|
|
|
+ serviceList.forEach(item => {
|
|
|
+ list.forEach(k => {
|
|
|
+ if (item.typeFlag == k.id) {
|
|
|
+ k.children.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- return info;
|
|
|
- },
|
|
|
- filifterMakeUp() {
|
|
|
- var list = [];
|
|
|
- var allList = [...this.allMakeupList];
|
|
|
- allList.forEach(item => {
|
|
|
- if (
|
|
|
- item.typeLevel == this.chooseMakeupLevel ||
|
|
|
- this.chooseMakeupLevel == 0
|
|
|
- ) {
|
|
|
- list.push(item);
|
|
|
- }
|
|
|
+
|
|
|
+ levelList.forEach(item => {
|
|
|
+ list.forEach(k => {
|
|
|
+ if (item.typeFlag == k.id) {
|
|
|
+ k.levelList.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- return list;
|
|
|
- },
|
|
|
- chooseClothingLevelInfo() {
|
|
|
- var info = {};
|
|
|
- var list = [...this.allClothingLevel];
|
|
|
+ var _list = [];
|
|
|
+
|
|
|
list.forEach(item => {
|
|
|
- if (item.id == this.chooseClothingLevel) {
|
|
|
- info = item;
|
|
|
+ if (item.children.length > 0) {
|
|
|
+ _list.push(item);
|
|
|
}
|
|
|
});
|
|
|
- return info;
|
|
|
+
|
|
|
+ return _list;
|
|
|
},
|
|
|
- filifterClothing() {
|
|
|
+ baseService() {
|
|
|
var list = [];
|
|
|
- var allList = [...this.allClothingList];
|
|
|
- allList.forEach(item => {
|
|
|
- if (
|
|
|
- item.typeLevel == this.chooseClothingLevel ||
|
|
|
- this.chooseClothingLevel == 0
|
|
|
- ) {
|
|
|
- list.push(item);
|
|
|
+ var allList = [...this.allInfoList];
|
|
|
+ allList.forEach((item, index) => {
|
|
|
+ var info = { ...item };
|
|
|
+ if (item.basetype == "Y") {
|
|
|
+ item.children.forEach(k => {
|
|
|
+ list.push(k);
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
return list;
|
|
|
},
|
|
|
- chooseAlbumLevelInfo() {
|
|
|
- var info = {};
|
|
|
- var list = [...this.allAlbumLevel];
|
|
|
- list.forEach(item => {
|
|
|
- if (item.id == this.chooseAlbumLevel) {
|
|
|
- info = item;
|
|
|
- }
|
|
|
- });
|
|
|
- return info;
|
|
|
- },
|
|
|
- filifterAlbum() {
|
|
|
+ allIShowList() {
|
|
|
var list = [];
|
|
|
- var allList = [...this.allAlbumList];
|
|
|
- allList.forEach(item => {
|
|
|
- if (
|
|
|
- item.typeLevel == this.chooseAlbumLevel ||
|
|
|
- this.chooseAlbumLevel == 0
|
|
|
- ) {
|
|
|
- list.push(item);
|
|
|
- }
|
|
|
- });
|
|
|
- return list;
|
|
|
- },
|
|
|
- choosePhotographerInfo() {
|
|
|
- var info = {};
|
|
|
- var allList = [...this.allPhotographer];
|
|
|
- allList.forEach(item => {
|
|
|
- if (item.id == this.choosePhotographer) {
|
|
|
- info = item;
|
|
|
- }
|
|
|
- });
|
|
|
+ var allList = [...this.allInfoList];
|
|
|
+ var allChooseLevel = [...this.allChooseLevel];
|
|
|
+ var allChooseServiceList = [...this.allChooseServiceList];
|
|
|
+ allList.forEach((item, index) => {
|
|
|
+ var info = { ...item };
|
|
|
+ if (item.basetype == "N") {
|
|
|
+ var levelName = "";
|
|
|
+ item.levelList.forEach(k => {
|
|
|
+ if (k.id == allChooseLevel[index]) {
|
|
|
+ levelName = k.levelName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ var children = [];
|
|
|
+ if (allChooseLevel[index]) {
|
|
|
+ item.children.forEach(k => {
|
|
|
+ if (Number(k.typeLevel) == allChooseLevel[index]) {
|
|
|
+ children.push(k);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ children = item.children;
|
|
|
+ }
|
|
|
+ children.forEach(k => {
|
|
|
+ if (allChooseServiceList[index].indexOf(k.id) != -1) {
|
|
|
+ k.isChoose = true;
|
|
|
+ } else {
|
|
|
+ k.isChoose = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ info.children = children;
|
|
|
+ info.levelName = levelName;
|
|
|
+ info.index = index;
|
|
|
|
|
|
- return info;
|
|
|
- },
|
|
|
- chooseMakeupInfo() {
|
|
|
- var info = {};
|
|
|
- var allList = [...this.allMakeupList];
|
|
|
- allList.forEach(item => {
|
|
|
- if (item.id == this.chooseMakeup) {
|
|
|
- info = item;
|
|
|
+ list.push(info);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- return info;
|
|
|
+ return list;
|
|
|
},
|
|
|
- chooseClothingInfo() {
|
|
|
+ allChooseServceId() {
|
|
|
var list = [];
|
|
|
- var allList = [...this.allClothingList];
|
|
|
- allList.forEach(item => {
|
|
|
- if (this.chooseClothing.indexOf(item.id) != -1) {
|
|
|
- list.push(item);
|
|
|
- }
|
|
|
+ var allChooseServiceList = [...this.allChooseServiceList];
|
|
|
+ allChooseServiceList.forEach(item => {
|
|
|
+ item.forEach(k => {
|
|
|
+ list.push(k);
|
|
|
+ });
|
|
|
});
|
|
|
-
|
|
|
return list;
|
|
|
},
|
|
|
- chooseAlbumInfo() {
|
|
|
+ allChooseServiceInfo() {
|
|
|
var list = [];
|
|
|
- var allList = [...this.allAlbumList];
|
|
|
- allList.forEach(item => {
|
|
|
- if (this.chooseAlbum.indexOf(item.id) != -1) {
|
|
|
+
|
|
|
+ var allServiceList = [...this.allServiceList];
|
|
|
+ var allChooseServceId = [...this.allChooseServceId];
|
|
|
+ allServiceList.forEach(item => {
|
|
|
+ if (allChooseServceId.indexOf(item.id) != -1) {
|
|
|
list.push(item);
|
|
|
}
|
|
|
});
|
|
|
- return list;
|
|
|
- },
|
|
|
- allChooseInfo() {
|
|
|
- var list = [];
|
|
|
- if (this.choosePhotographerInfo.id) {
|
|
|
- list.push(this.choosePhotographerInfo);
|
|
|
- }
|
|
|
- if (this.chooseMakeupInfo.id) {
|
|
|
- list.push(this.chooseMakeupInfo);
|
|
|
- }
|
|
|
-
|
|
|
- list = list.concat(this.chooseClothingInfo);
|
|
|
- list = list.concat(this.chooseAlbumInfo);
|
|
|
|
|
|
return list;
|
|
|
},
|
|
|
total() {
|
|
|
var money = 0;
|
|
|
- var mandatory = [...this.mandatory];
|
|
|
+ var mandatory = [...this.baseService];
|
|
|
mandatory.forEach(item => {
|
|
|
money = calc.Add(money, item.price || 0);
|
|
|
});
|
|
|
-
|
|
|
- money = calc.Add(
|
|
|
- money,
|
|
|
- Number(this.choosePhotographerInfo.price || 0),
|
|
|
- );
|
|
|
- money = calc.Add(money, this.chooseMakeupInfo.price || 0);
|
|
|
-
|
|
|
- var chooseClothingList = [...this.chooseClothingInfo];
|
|
|
- chooseClothingList.forEach(item => {
|
|
|
- money = calc.Add(money, item.price || 0);
|
|
|
- });
|
|
|
-
|
|
|
- var chooseAlbumInfo = [...this.chooseAlbumInfo];
|
|
|
- chooseAlbumInfo.forEach(item => {
|
|
|
+ var service = [...this.allChooseServiceInfo];
|
|
|
+ service.forEach(item => {
|
|
|
money = calc.Add(money, item.price || 0);
|
|
|
});
|
|
|
return money;
|
|
|
},
|
|
|
productInfo() {
|
|
|
return {
|
|
|
- title: '私人定制套餐',
|
|
|
+ title: "私人定制套餐",
|
|
|
typeFlag: 0,
|
|
|
price: this.total,
|
|
|
- downPayment: this.total ? calc.Mul(this.total, 0.3) : 0,
|
|
|
+ downPayment: this.total ? calc.Mul(this.total, 0.3) : 0
|
|
|
};
|
|
|
},
|
|
|
- },
|
|
|
- onLoad() {
|
|
|
- this.refreash();
|
|
|
- this.getStoreService('photographer').then(res => {
|
|
|
- this.allPhotographer = res;
|
|
|
- });
|
|
|
- this.getStoreServiceLevel('photographer').then(res => {
|
|
|
- res.push({
|
|
|
- levelName: '全部摄影师',
|
|
|
- id: 0,
|
|
|
+ photoAmount() {
|
|
|
+ var amount = 0;
|
|
|
+ var allChooseServiceInfo = [...this.allChooseServiceInfo];
|
|
|
+ allChooseServiceInfo.forEach(item => {
|
|
|
+ if (
|
|
|
+ (item.typeFlag == "1" || item.typeFlag == "2") &&
|
|
|
+ amount < item.photoAmount
|
|
|
+ ) {
|
|
|
+ amount = item.photoAmount;
|
|
|
+ }
|
|
|
});
|
|
|
- this.allPhotographerLevel = res;
|
|
|
- });
|
|
|
|
|
|
- this.getStoreService('makeup_artist').then(res => {
|
|
|
- this.allMakeupList = res;
|
|
|
- });
|
|
|
- this.getStoreServiceLevel('makeup_artist').then(res => {
|
|
|
- res.push({
|
|
|
- levelName: '全部化妆师',
|
|
|
- id: 0,
|
|
|
+ return amount;
|
|
|
+ },
|
|
|
+ fandaAmount() {
|
|
|
+ var amount = 0;
|
|
|
+ var allChooseServiceInfo = [...this.allChooseServiceInfo];
|
|
|
+ allChooseServiceInfo.forEach(item => {
|
|
|
+ if (item.typeFlag == "4") {
|
|
|
+ amount += item.photoAmount;
|
|
|
+ }
|
|
|
});
|
|
|
- this.allMakeupLevel = res;
|
|
|
- });
|
|
|
|
|
|
- this.getStoreService('clothing').then(res => {
|
|
|
- this.allClothingList = res;
|
|
|
- });
|
|
|
- this.getStoreServiceLevel('clothing').then(res => {
|
|
|
- res.push({
|
|
|
- levelName: '全部服装道具',
|
|
|
- id: 0,
|
|
|
+ return amount;
|
|
|
+ },
|
|
|
+ albumAmount() {
|
|
|
+ var amount = 0;
|
|
|
+ var allChooseServiceInfo = [...this.allChooseServiceInfo];
|
|
|
+ allChooseServiceInfo.forEach(item => {
|
|
|
+ if (item.typeFlag == "8") {
|
|
|
+ amount += item.photoAmount;
|
|
|
+ }
|
|
|
});
|
|
|
- this.allClothingLevel = res;
|
|
|
- });
|
|
|
|
|
|
- this.getStoreService('album').then(res => {
|
|
|
- this.allAlbumList = res;
|
|
|
+ return amount;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.refreash();
|
|
|
+ this.$http.get("/storeServiceType/all", {}, {}, false).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.allnameList = res.data;
|
|
|
+ res.data.forEach(item => {
|
|
|
+ this.allChooseLevel.push("");
|
|
|
+ this.allChooseServiceList.push([]);
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
- this.getStoreServiceLevel('album').then(res => {
|
|
|
- res.push({
|
|
|
- levelName: '全部相框',
|
|
|
- id: 0,
|
|
|
- });
|
|
|
- this.allAlbumLevel = res;
|
|
|
+ this.$http.get("/storeService/all").then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.allServiceList = res.data;
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
- this.getStoreService('song').then(res => {
|
|
|
- this.mandatory = res;
|
|
|
+ this.$http.get("/storeServiceLevel/all", {}, {}, false).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.allLevelList = res.data;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
refreash() {
|
|
|
- this.storeServiceList = '';
|
|
|
- this.choosePhotographerLevel = 0;
|
|
|
- this.chooseMakeupLevel = 0;
|
|
|
- this.showAction = false;
|
|
|
- this.chooseList = [];
|
|
|
- this.chooseType = '';
|
|
|
- this.chooseClothingLevel = '0';
|
|
|
- this.chooseAlbumLevel = 0;
|
|
|
- this.choosePhotographer = 0;
|
|
|
- this.chooseMakeup = 0;
|
|
|
- this.chooseClothing = [];
|
|
|
- this.chooseAlbum = [];
|
|
|
- this.mandatory = [];
|
|
|
- this.showDetail = false;
|
|
|
+ this.allChooseLevel = [];
|
|
|
+ this.allChooseServiceList = [];
|
|
|
this.showSpecifications = false;
|
|
|
- this.chooseSpecificationType = 'all';
|
|
|
},
|
|
|
chooseSelect(info) {
|
|
|
- var type = info.type;
|
|
|
+ var index = info.index;
|
|
|
var id = info.id;
|
|
|
- switch (type) {
|
|
|
- case 'photographer':
|
|
|
- if (this.choosePhotographer == id) {
|
|
|
- this.choosePhotographer = 0;
|
|
|
- } else {
|
|
|
- this.choosePhotographer = id;
|
|
|
- }
|
|
|
- break;
|
|
|
- case 'makeup_artist':
|
|
|
- if (this.chooseMakeup == id) {
|
|
|
- this.chooseMakeup = 0;
|
|
|
- } else {
|
|
|
- this.chooseMakeup = id;
|
|
|
- }
|
|
|
- break;
|
|
|
- case 'clothing':
|
|
|
- if (this.chooseClothing.indexOf(id) == -1) {
|
|
|
- this.chooseClothing.push(id);
|
|
|
- } else {
|
|
|
- this.chooseClothing.splice(
|
|
|
- this.chooseClothing.indexOf(id),
|
|
|
- 1,
|
|
|
- );
|
|
|
- }
|
|
|
- break;
|
|
|
- case 'album':
|
|
|
- if (this.chooseAlbum.indexOf(id) == -1) {
|
|
|
- this.chooseAlbum.push(id);
|
|
|
- } else {
|
|
|
- this.chooseAlbum.splice(
|
|
|
- this.chooseAlbum.indexOf(id),
|
|
|
- 1,
|
|
|
- );
|
|
|
- }
|
|
|
- break;
|
|
|
+ var list = [...this.allChooseServiceList[index]];
|
|
|
+ if (info.isChoose) {
|
|
|
+ list.splice(list.indexOf(id), 1);
|
|
|
+ } else {
|
|
|
+ if (this.allnameList[index].multiple == "Y") {
|
|
|
+ list.push(id);
|
|
|
+ } else {
|
|
|
+ list = [id];
|
|
|
+ }
|
|
|
}
|
|
|
+ this.$set(this.allChooseServiceList, index, list);
|
|
|
},
|
|
|
close(value) {
|
|
|
- if (value != 'close') {
|
|
|
- switch (this.chooseType) {
|
|
|
- case 'photographer':
|
|
|
- this.choosePhotographerLevel = value;
|
|
|
- break;
|
|
|
- case 'makeup_artist':
|
|
|
- this.chooseMakeupLevel = value;
|
|
|
- break;
|
|
|
- case 'clothing':
|
|
|
- this.chooseClothingLevel = value;
|
|
|
- break;
|
|
|
- case 'album':
|
|
|
- this.chooseAlbumLevel = value;
|
|
|
- break;
|
|
|
- }
|
|
|
+ if (value != "close") {
|
|
|
+ console.log(value);
|
|
|
+ this.$set(this.allChooseLevel, this.chooseIndex, value);
|
|
|
}
|
|
|
this.showAction = false;
|
|
|
},
|
|
|
- chooseLevel(type) {
|
|
|
- var list = [];
|
|
|
- this.chooseType = type;
|
|
|
- switch (type) {
|
|
|
- case 'photographer':
|
|
|
- list = [...this.allPhotographerLevel];
|
|
|
- break;
|
|
|
- case 'makeup_artist':
|
|
|
- list = [...this.allMakeupLevel];
|
|
|
- break;
|
|
|
- case 'clothing':
|
|
|
- list = [...this.allClothingLevel];
|
|
|
- break;
|
|
|
- case 'album':
|
|
|
- list = [...this.allAlbumLevel];
|
|
|
- break;
|
|
|
- }
|
|
|
+ chooseLevel(list, index) {
|
|
|
+ console.log(list);
|
|
|
this.chooseList = list;
|
|
|
this.showAction = true;
|
|
|
+ this.chooseIndex = index;
|
|
|
},
|
|
|
checkChoose(type, id) {
|
|
|
var result = false;
|
|
|
switch (type) {
|
|
|
- case 'photographer':
|
|
|
+ case "photographer":
|
|
|
if (this.choosePhotographer == id) {
|
|
|
result = true;
|
|
|
}
|
|
|
break;
|
|
|
- case 'makeup_artist':
|
|
|
+ case "makeup_artist":
|
|
|
if (this.chooseMakeup == id) {
|
|
|
result = true;
|
|
|
}
|
|
|
break;
|
|
|
- case 'clothing':
|
|
|
+ case "clothing":
|
|
|
if (this.chooseClothing.indexOf(id) != -1) {
|
|
|
result = true;
|
|
|
}
|
|
|
break;
|
|
|
- case 'album':
|
|
|
+ case "album":
|
|
|
if (this.chooseAlbum.indexOf(id) != -1) {
|
|
|
result = true;
|
|
|
}
|
|
|
@@ -476,8 +369,8 @@ export default {
|
|
|
getStoreService(typeFlag) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$http
|
|
|
- .get('/storeService/all', {
|
|
|
- typeFlag: typeFlag,
|
|
|
+ .get("/storeService/all", {
|
|
|
+ typeFlag: typeFlag
|
|
|
})
|
|
|
.then(res => {
|
|
|
if (res.success) {
|
|
|
@@ -491,12 +384,12 @@ export default {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$http
|
|
|
.get(
|
|
|
- '/storeServiceLevel/all',
|
|
|
+ "/storeServiceLevel/all",
|
|
|
{
|
|
|
- typeFlag: typeFlag,
|
|
|
+ typeFlag: typeFlag
|
|
|
},
|
|
|
{},
|
|
|
- false,
|
|
|
+ false
|
|
|
)
|
|
|
.then(res => {
|
|
|
if (res.success) {
|
|
|
@@ -509,21 +402,26 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
submit() {
|
|
|
- if (!this.choosePhotographer) {
|
|
|
- wx.showToast({
|
|
|
- title: '请选择摄影师',
|
|
|
- icon: 'none',
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
- return;
|
|
|
+ var wrong = false;
|
|
|
+ var nameList = [...this.allnameList];
|
|
|
+ for (var i = 0; i < nameList.length; i++) {
|
|
|
+ var item = nameList[i];
|
|
|
+ if (
|
|
|
+ item.mustFlag == "Y" &&
|
|
|
+ item.basetype == "N" &&
|
|
|
+ this.allChooseServiceList[i].length == 0
|
|
|
+ ) {
|
|
|
+ wx.showToast({
|
|
|
+ title: "请选择" + item.name,
|
|
|
+ icon: "none",
|
|
|
+ duration: 1500
|
|
|
+ });
|
|
|
+ wrong = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if (!this.chooseMakeup) {
|
|
|
- wx.showToast({
|
|
|
- title: '请选化妆师',
|
|
|
- icon: 'none',
|
|
|
- duration: 1500,
|
|
|
- });
|
|
|
+ if (wrong) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -533,30 +431,28 @@ export default {
|
|
|
this.chooseSpecificationType = type;
|
|
|
},
|
|
|
changeChoose() {
|
|
|
- var idList = this.allChooseInfo.map(item => {
|
|
|
- return item.id;
|
|
|
- });
|
|
|
+ var idList = [...this.allChooseServceId]
|
|
|
idList = idList.concat(
|
|
|
- this.mandatory.map(item => {
|
|
|
+ this.baseService.map(item => {
|
|
|
return item.id;
|
|
|
- }),
|
|
|
+ })
|
|
|
);
|
|
|
|
|
|
wx.navigateTo({
|
|
|
url:
|
|
|
- '/pages/submit/submit?submitPage=customize&serviceList=' +
|
|
|
- idList.join(',') +
|
|
|
- '&typeFlag=' +
|
|
|
- (this.chooseSpecificationType == 'all' ? 0 : 1),
|
|
|
+ "/pages/submit/submit?submitPage=customize&serviceList=" +
|
|
|
+ idList.join(",") +
|
|
|
+ "&typeFlag=" +
|
|
|
+ (this.chooseSpecificationType == "all" ? 0 : 1)
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
components: {
|
|
|
customizeItem,
|
|
|
actionSheet,
|
|
|
customizeDetail,
|
|
|
- specificationsContent,
|
|
|
- },
|
|
|
+ specificationsContent
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
@@ -687,6 +583,34 @@ export default {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.numberList {
|
|
|
+ margin: 15px;
|
|
|
+ background: rgba(255, 255, 255, 1);
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 0 15px;
|
|
|
+ .num-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 60px;
|
|
|
+ justify-content: space-between;
|
|
|
+ .title {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ }
|
|
|
+
|
|
|
+ .val {
|
|
|
+ font-size: 16px;
|
|
|
+ color: rgba(0, 0, 0, 1);
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:not(:last-child) {
|
|
|
+ border-bottom: 1px solid #f2f4f5;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
|