|
@@ -3,107 +3,87 @@
|
|
<nav-bar title="确认订单"></nav-bar>
|
|
<nav-bar title="确认订单"></nav-bar>
|
|
<view class="contents">
|
|
<view class="contents">
|
|
<!-- <view > -->
|
|
<!-- <view > -->
|
|
- <view class="item">
|
|
|
|
- <view style="display: flex; justify-content: space-between">
|
|
|
|
- <image
|
|
|
|
- :src="$method.splitImgHost(detail.coverUrl)"
|
|
|
|
- style="height: 120rpx; width: 204rpx; border-radius: 16rpx"
|
|
|
|
- ></image>
|
|
|
|
- <view class="right_con" style="margin-left: 20rpx">
|
|
|
|
- <view style="color: #333333; font-size: 30rpx; font-weight: bold">
|
|
|
|
- {{ detail.goodsName }}
|
|
|
|
- </view>
|
|
|
|
- <view class="priceTag"> ¥ {{ detail.standPrice }} </view>
|
|
|
|
- <view
|
|
|
|
- class="input_c"
|
|
|
|
- v-if="detail.templateType != null && detail.goodsType == 1"
|
|
|
|
- >
|
|
|
|
- <view
|
|
|
|
- v-if="detail.templateType == 'class'"
|
|
|
|
- style="
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- height: 56rpx;
|
|
|
|
- padding: 8rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- "
|
|
|
|
- @click="openPopup(0)"
|
|
|
|
- >
|
|
|
|
- <view style="color: #666666; font-size: 24rpx">{{
|
|
|
|
- gradeIndex < 0 ? "选择班级" : gradeList[gradeIndex].className
|
|
|
|
- }}</view>
|
|
|
|
- <view
|
|
|
|
- ><u-icon name="arrow-right" color="#999999" size="28"></u-icon
|
|
|
|
- ></view>
|
|
|
|
- </view>
|
|
|
|
- <view
|
|
|
|
- v-if="detail.templateType == 'apply'"
|
|
|
|
- style="
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- height: 56rpx;
|
|
|
|
- padding: 8rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- "
|
|
|
|
- @click="openPopup(1)"
|
|
|
|
- >
|
|
|
|
- <view style="color: #666666; font-size: 24rpx">{{
|
|
|
|
- !applyAreas.areaName
|
|
|
|
- ? "报考地区"
|
|
|
|
- : examDate.examineName +
|
|
|
|
- "-" +
|
|
|
|
- applyAreas.areaName +
|
|
|
|
- "-" +
|
|
|
|
- applyAreas.cityName
|
|
|
|
- }}</view>
|
|
|
|
- <view
|
|
|
|
- ><u-icon name="arrow-right" color="#999999" size="28"></u-icon
|
|
|
|
- ></view>
|
|
|
|
|
|
+ <view v-for="(item, index) in goodsList" :key="item.id">
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view style="display: flex; justify-content: space-between">
|
|
|
|
+ <image
|
|
|
|
+ :src="$method.splitImgHost(item.coverUrl)"
|
|
|
|
+ style="height: 120rpx; width: 204rpx; border-radius: 16rpx"
|
|
|
|
+ ></image>
|
|
|
|
+ <view class="right_con" style="margin-left: 20rpx">
|
|
|
|
+ <view style="color: #333333; font-size: 30rpx; font-weight: bold">
|
|
|
|
+ {{ item.goodsName }}
|
|
|
|
+ <text v-if="item.sevenYear"> ({{ item.sevenYear }}) </text>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="input_c" v-if="detail.sevenYear">
|
|
|
|
|
|
+ <view class="priceTag"> ¥ {{ item.standPrice }} </view>
|
|
<view
|
|
<view
|
|
- style="
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- height: 56rpx;
|
|
|
|
- padding: 8rpx;
|
|
|
|
- border-radius: 8rpx;
|
|
|
|
- "
|
|
|
|
- @click="openPopup(2)"
|
|
|
|
|
|
+ class="input_c"
|
|
|
|
+ v-if="item.templateType != null && item.goodsType == 1"
|
|
>
|
|
>
|
|
<view
|
|
<view
|
|
- style="color: #666666; font-size: 24rpx"
|
|
|
|
- v-if="detail.selectYearList && detail.selectYearList.length"
|
|
|
|
|
|
+ v-if="item.templateType == 'class'"
|
|
|
|
+ style="
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ height: 56rpx;
|
|
|
|
+ padding: 8rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ "
|
|
|
|
+ @click="openPopup(0, item)"
|
|
>
|
|
>
|
|
- {{ detail.selectYearList.toString() }}
|
|
|
|
- </view>
|
|
|
|
- <view v-else style="color: #666666; font-size: 24rpx">
|
|
|
|
- 选择年份
|
|
|
|
|
|
+ <view style="color: #666666; font-size: 24rpx">{{
|
|
|
|
+ item.gradObj ? item.gradObj.className : "选择班级"
|
|
|
|
+ }}</view>
|
|
|
|
+ <view
|
|
|
|
+ ><u-icon
|
|
|
|
+ name="arrow-down"
|
|
|
|
+ color="#999999"
|
|
|
|
+ size="28"
|
|
|
|
+ ></u-icon
|
|
|
|
+ ></view>
|
|
</view>
|
|
</view>
|
|
- <view>
|
|
|
|
- <u-icon name="arrow-right" color="#999999" size="28">
|
|
|
|
- </u-icon>
|
|
|
|
|
|
+ <view
|
|
|
|
+ v-if="item.templateType == 'apply'"
|
|
|
|
+ style="
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ height: 56rpx;
|
|
|
|
+ padding: 8rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
+ "
|
|
|
|
+ @click="openPopup(1)"
|
|
|
|
+ >
|
|
|
|
+ <view style="color: #666666; font-size: 24rpx">{{
|
|
|
|
+ !applyAreas.areaName
|
|
|
|
+ ? "报考地区"
|
|
|
|
+ : examDate.examineName +
|
|
|
|
+ "-" +
|
|
|
|
+ applyAreas.areaName +
|
|
|
|
+ "-" +
|
|
|
|
+ applyAreas.cityName
|
|
|
|
+ }}</view>
|
|
|
|
+ <view
|
|
|
|
+ ><u-icon
|
|
|
|
+ name="arrow-down"
|
|
|
|
+ color="#999999"
|
|
|
|
+ size="28"
|
|
|
|
+ ></u-icon
|
|
|
|
+ ></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
<!-- </view> -->
|
|
<!-- </view> -->
|
|
</view>
|
|
</view>
|
|
<view class="bottomBox safeArea">
|
|
<view class="bottomBox safeArea">
|
|
<view class="sums">
|
|
<view class="sums">
|
|
<text class="all_sum">订单金额:</text>
|
|
<text class="all_sum">订单金额:</text>
|
|
- <text class="priceTag"
|
|
|
|
- >¥{{
|
|
|
|
- detail.standPrice *
|
|
|
|
- (detail.selectYearList ? detail.selectYearList.length || 1 : 1)
|
|
|
|
- }}</text
|
|
|
|
- >
|
|
|
|
|
|
+ <text class="priceTag">¥ {{ totalPrice }}</text>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view style="display: flex; color: #ffffff; align-items: center">
|
|
<view style="display: flex; color: #ffffff; align-items: center">
|
|
@@ -112,65 +92,6 @@
|
|
>
|
|
>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <u-popup v-model="show" mode="bottom" border-radius="40">
|
|
|
|
- <view class="popup_box">
|
|
|
|
- <view class="check_head">
|
|
|
|
- <!-- <view class="line1"></view> -->
|
|
|
|
- <view class="grade">选择班级</view>
|
|
|
|
- <u-icon
|
|
|
|
- name="close"
|
|
|
|
- color="#CFCFCF"
|
|
|
|
- size="30"
|
|
|
|
- @click="closePop(0)"
|
|
|
|
- ></u-icon>
|
|
|
|
- </view>
|
|
|
|
- <!-- <u-line color="#D6D6DB" /> -->
|
|
|
|
- <view class="check_con">
|
|
|
|
- <scroll-view scroll-y="true" style="height: 580rpx">
|
|
|
|
- <view>
|
|
|
|
- <u-radio-group v-model="gradeValue" @change="radioGroupChange">
|
|
|
|
- <view
|
|
|
|
- v-for="(item, index) in gradeList"
|
|
|
|
- :key="index"
|
|
|
|
- class="items_c"
|
|
|
|
- >
|
|
|
|
- <view class="border_c">
|
|
|
|
- <view>
|
|
|
|
- <u-radio
|
|
|
|
- shape="circle"
|
|
|
|
- active-color="#FC3F3F"
|
|
|
|
- :name="index"
|
|
|
|
- :disabled="
|
|
|
|
- item.studentNum > 0 &&
|
|
|
|
- item.studentNum == item.studentUpper
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <view
|
|
|
|
- :class="
|
|
|
|
- index == gradeValue
|
|
|
|
- ? 'white-box blue-box'
|
|
|
|
- : 'white-box'
|
|
|
|
- "
|
|
|
|
- >
|
|
|
|
- <view>
|
|
|
|
- <view class="blackTxt">{{ item.className }}</view>
|
|
|
|
- <Class-time-tip :classInfo="item"></Class-time-tip>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </u-radio>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </u-radio-group>
|
|
|
|
- </view>
|
|
|
|
- </scroll-view>
|
|
|
|
- </view>
|
|
|
|
- <view class="confrim-btn">
|
|
|
|
- <view class="okBtn" @click="okPopup(0)">确定</view>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- </u-popup>
|
|
|
|
<u-popup v-model="show1" mode="bottom" border-radius="40">
|
|
<u-popup v-model="show1" mode="bottom" border-radius="40">
|
|
<view class="popup_box">
|
|
<view class="popup_box">
|
|
<view class="check_head">
|
|
<view class="check_head">
|
|
@@ -238,47 +159,16 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
- <u-popup v-model="show2" mode="bottom" border-radius="40">
|
|
|
|
- <view class="popup_box" style="height: 500rpx">
|
|
|
|
- <view class="check_head">
|
|
|
|
- <view class="grade">选择年份</view>
|
|
|
|
- <u-icon
|
|
|
|
- name="close"
|
|
|
|
- color="#CFCFCF"
|
|
|
|
- size="30"
|
|
|
|
- @click="closePop(2)"
|
|
|
|
- ></u-icon>
|
|
|
|
- </view>
|
|
|
|
- <view>
|
|
|
|
- <scroll-view scroll-y="true" style="height: 236rpx">
|
|
|
|
- <view style="padding: 16rpx 30rpx">
|
|
|
|
- <u-checkbox-group :wrap="true">
|
|
|
|
- <u-checkbox
|
|
|
|
- shape="circle"
|
|
|
|
- v-for="(item, index) in yearList"
|
|
|
|
- :key="index"
|
|
|
|
- v-model="item.checked"
|
|
|
|
- :name="item.name"
|
|
|
|
- >
|
|
|
|
- {{ item.name }}
|
|
|
|
- </u-checkbox>
|
|
|
|
- </u-checkbox-group>
|
|
|
|
- </view>
|
|
|
|
- </scroll-view>
|
|
|
|
- </view>
|
|
|
|
- <view class="confrim-btn"
|
|
|
|
- ><view class="okBtn" @click="okPopup(2)">确定</view></view
|
|
|
|
- >
|
|
|
|
- </view>
|
|
|
|
- </u-popup>
|
|
|
|
|
|
+ <select-grade-box ref="grade" @submit="submitSelect" />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
|
|
import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
|
|
|
|
+import selectGradeBox from "@/components/common/selectGradeBox.vue";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
export default {
|
|
export default {
|
|
- components: { ClassTimeTip },
|
|
|
|
|
|
+ components: { ClassTimeTip, selectGradeBox },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
gradeValue: 0,
|
|
gradeValue: 0,
|
|
@@ -287,12 +177,9 @@ export default {
|
|
indicatorStyle: `height: 50px;`,
|
|
indicatorStyle: `height: 50px;`,
|
|
showArea: true,
|
|
showArea: true,
|
|
show1: false,
|
|
show1: false,
|
|
- show2: false,
|
|
|
|
- value1: "",
|
|
|
|
|
|
+ value: "",
|
|
show: false,
|
|
show: false,
|
|
detail: {},
|
|
detail: {},
|
|
- gradeList: [],
|
|
|
|
- yearList: [],
|
|
|
|
provinceList: [],
|
|
provinceList: [],
|
|
cityList: [],
|
|
cityList: [],
|
|
pAreaIndex: 0,
|
|
pAreaIndex: 0,
|
|
@@ -307,23 +194,34 @@ export default {
|
|
},
|
|
},
|
|
fromCart: "",
|
|
fromCart: "",
|
|
isBK: "", //是不是补考商品
|
|
isBK: "", //是不是补考商品
|
|
|
|
+ goodsList: [],
|
|
|
|
+ gradeListObj: {},
|
|
|
|
+ activeItem: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onPullDownRefresh() {},
|
|
onPullDownRefresh() {},
|
|
- onLoad(option) {
|
|
|
|
|
|
+ async onLoad(option) {
|
|
this.id = option.id;
|
|
this.id = option.id;
|
|
this.isBK = option.isBK;
|
|
this.isBK = option.isBK;
|
|
if (option.fromCart) {
|
|
if (option.fromCart) {
|
|
this.fromCart = option.fromCart;
|
|
this.fromCart = option.fromCart;
|
|
}
|
|
}
|
|
this.options = option;
|
|
this.options = option;
|
|
- this.disCode ? this.getFxDetail() : this.getDetail();
|
|
|
|
- },
|
|
|
|
- onShow() {
|
|
|
|
- /* if(this.current === 2 && this.$method.isLogin()){
|
|
|
|
- this.$refs.refMy.init();
|
|
|
|
- } */
|
|
|
|
|
|
+ if (this.id) {
|
|
|
|
+ this.goodsList = this.disCode
|
|
|
|
+ ? await this.getFxDetail()
|
|
|
|
+ : await this.getDetail();
|
|
|
|
+ } else {
|
|
|
|
+ this.goodsList = this.shoppingCartList;
|
|
|
|
+ }
|
|
|
|
+ this.goodsList.forEach((e, i) => {
|
|
|
|
+ if (e.templateType == "class") {
|
|
|
|
+ this.$set(e, "gradObj", {});
|
|
|
|
+ this.goodsGradeList(e);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
+ onShow() {},
|
|
methods: {
|
|
methods: {
|
|
getExamine(id) {
|
|
getExamine(id) {
|
|
let self = this;
|
|
let self = this;
|
|
@@ -355,22 +253,15 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ submitSelect(gradObj) {
|
|
|
|
+ this.$set(this.activeItem, "gradObj", gradObj);
|
|
|
|
+ },
|
|
//弹出框确定
|
|
//弹出框确定
|
|
okPopup(index) {
|
|
okPopup(index) {
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
if (!this.checkData()) {
|
|
if (!this.checkData()) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- this.gradeIndex = this.gradeValue;
|
|
|
|
- this.detail.gradObj = this.gradeList[this.gradeIndex];
|
|
|
|
- this.show = false;
|
|
|
|
- } else if (index == 2) {
|
|
|
|
- this.$set(
|
|
|
|
- this.detail,
|
|
|
|
- "selectYearList",
|
|
|
|
- this.yearList.filter((e) => e.checked).map((e) => e.name)
|
|
|
|
- );
|
|
|
|
- this.show2 = false;
|
|
|
|
} else {
|
|
} else {
|
|
if (!this.checkAreaData()) {
|
|
if (!this.checkAreaData()) {
|
|
return;
|
|
return;
|
|
@@ -424,53 +315,45 @@ export default {
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
checkData() {
|
|
checkData() {
|
|
- if (this.detail.templateType == "class" && this.detail.goodsType == 1) {
|
|
|
|
- if (this.gradeValue < 0) {
|
|
|
|
- uni.showModal({
|
|
|
|
- title: "提示",
|
|
|
|
- content: "请选择班级",
|
|
|
|
- showCancel: false,
|
|
|
|
- });
|
|
|
|
- return false;
|
|
|
|
|
|
+ this.goodsList.forEach((item) => {
|
|
|
|
+ if (item.templateType == "class" && item.goodsType == 1) {
|
|
|
|
+ if (!item.gradObj.className) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: "请选择班级",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- } else if (
|
|
|
|
- this.detail.templateType == "apply" &&
|
|
|
|
- this.detail.goodsType == 1
|
|
|
|
- ) {
|
|
|
|
- // if(!this.applyObj.applyAreasJson){
|
|
|
|
- // uni.showModal({
|
|
|
|
- // title: "提示",
|
|
|
|
- // content: '请选择报考地区',
|
|
|
|
- // showCancel: false
|
|
|
|
- // })
|
|
|
|
- // return false
|
|
|
|
- // }
|
|
|
|
- /* if(!this.applyObj.examDateJson){
|
|
|
|
- uni.showModal({
|
|
|
|
- title: "提示",
|
|
|
|
- content: '请选择考期',
|
|
|
|
- showCancel: false
|
|
|
|
- })
|
|
|
|
- return false
|
|
|
|
- } */
|
|
|
|
- }
|
|
|
|
|
|
+ if (item.templateType == "apply" && item.goodsType == 1) {
|
|
|
|
+ // if (!item.applyAreas.areaName) {
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: '提示',
|
|
|
|
+ // content: '请选择报考地区',
|
|
|
|
+ // showCancel: false
|
|
|
|
+ // });
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
radioGroupChange(e) {
|
|
radioGroupChange(e) {
|
|
console.log(e);
|
|
console.log(e);
|
|
},
|
|
},
|
|
- goodsGradeList() {
|
|
|
|
- this.$api.goodsGradeList({ goodsId: this.id }).then((res) => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- this.gradeList = res.data.rows;
|
|
|
|
- if (this.gradeList.length == 0) {
|
|
|
|
- let item = {
|
|
|
|
|
|
+ goodsGradeList(item) {
|
|
|
|
+ this.$api.goodsGradeList({ goodsId: item.goodsId }).then((res) => {
|
|
|
|
+ let { code, rows } = res.data;
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ let gradeList = rows;
|
|
|
|
+ if (gradeList.length == 0) {
|
|
|
|
+ gradeList.push({
|
|
className: "系统分班",
|
|
className: "系统分班",
|
|
gradeId: 0,
|
|
gradeId: 0,
|
|
- };
|
|
|
|
- this.gradeList.push(item);
|
|
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
- let isGradeFull = this.gradeList.every(
|
|
|
|
|
|
+ let isGradeFull = gradeList.every(
|
|
(item) =>
|
|
(item) =>
|
|
item.studentNum > 0 && item.studentNum == item.studentUpper
|
|
item.studentNum > 0 && item.studentNum == item.studentUpper
|
|
);
|
|
);
|
|
@@ -480,29 +363,39 @@ export default {
|
|
className: "系统分班",
|
|
className: "系统分班",
|
|
gradeId: 0,
|
|
gradeId: 0,
|
|
};
|
|
};
|
|
- this.gradeList.unshift(item);
|
|
|
|
|
|
+ gradeList.unshift(item);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.detail.gradObj = this.gradeList[this.gradeIndex];
|
|
|
|
|
|
+ this.$set(item, "gradObj", gradeList[0]);
|
|
|
|
+ this.gradeListObj[item.goodsId] = gradeList;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
goBuy() {
|
|
goBuy() {
|
|
- if (!this.checkData()) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (this.detail.sevenYear && !this.detail.selectYearList) {
|
|
|
|
|
|
+ if (this.goodsList.length == 0) {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: "提示",
|
|
title: "提示",
|
|
- content: "请选择年份",
|
|
|
|
|
|
+ content: "请选择商品",
|
|
showCancel: false,
|
|
showCancel: false,
|
|
});
|
|
});
|
|
- return false;
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
- let checkGoodsList = [];
|
|
|
|
- checkGoodsList.push(this.detail);
|
|
|
|
|
|
+ this.goodsList.forEach((item) => {
|
|
|
|
+ if (item.templateType == "class" && item.goodsType == 1) {
|
|
|
|
+ if (!item.gradObj.className) {
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: "提示",
|
|
|
|
+ content: "请选择班级",
|
|
|
|
+ showCancel: false,
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (item.templateType == "apply" && item.goodsType == 1) {
|
|
|
|
+ }
|
|
|
|
+ });
|
|
this.$store.commit("setShoppingCartList", {
|
|
this.$store.commit("setShoppingCartList", {
|
|
- shoppingCartList: checkGoodsList,
|
|
|
|
|
|
+ shoppingCartList: this.goodsList,
|
|
});
|
|
});
|
|
if (this.isBK == "1") {
|
|
if (this.isBK == "1") {
|
|
this.$navTo.togo("/pages2/order/confirm_pay", {
|
|
this.$navTo.togo("/pages2/order/confirm_pay", {
|
|
@@ -526,28 +419,28 @@ export default {
|
|
return data;
|
|
return data;
|
|
},
|
|
},
|
|
getDetail() {
|
|
getDetail() {
|
|
- let self = this;
|
|
|
|
- this.$api.commonGoodsDetail(this.id).then((res) => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- self.detail = res.data.data;
|
|
|
|
- if (self.detail.templateType != null && self.detail.goodsType == 1) {
|
|
|
|
- this.goodsGradeList();
|
|
|
|
- }
|
|
|
|
- self.getExamine(self.detail.projectId);
|
|
|
|
|
|
+ return this.$api.commonGoodsDetail(this.id).then((res) => {
|
|
|
|
+ let { code, data } = res.data;
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ this.detail = data;
|
|
|
|
+ this.goodsList = [data];
|
|
|
|
+ // self.getExamine(data.projectId);
|
|
|
|
+ return Promise.resolve([data]);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
getFxDetail() {
|
|
getFxDetail() {
|
|
- let self = this;
|
|
|
|
- this.$api
|
|
|
|
|
|
+ return this.$api
|
|
.fxGoodsDetail({
|
|
.fxGoodsDetail({
|
|
goodsId: this.id,
|
|
goodsId: this.id,
|
|
disCode: this.disCode,
|
|
disCode: this.disCode,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- if (res.data.code == 200) {
|
|
|
|
- self.detail = res.data.data;
|
|
|
|
- self.getExamine(self.detail.projectId);
|
|
|
|
|
|
+ let { code, data } = res.data;
|
|
|
|
+ if (code == 200) {
|
|
|
|
+ this.goodsList = [data];
|
|
|
|
+ // self.getExamine(self.detail.projectId);
|
|
|
|
+ return Promise.resolve([data]);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -565,18 +458,14 @@ export default {
|
|
this.cAreaIndex = e.detail.value[1];
|
|
this.cAreaIndex = e.detail.value[1];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- openPopup(index) {
|
|
|
|
|
|
+ openPopup(index, item) {
|
|
|
|
+ this.activeItem = item || {};
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
- this.show = true;
|
|
|
|
- } else if (index == 2) {
|
|
|
|
- this.show2 = true;
|
|
|
|
- let selectYearList = this.detail.selectYearList || "";
|
|
|
|
- this.yearList = this.detail.sevenYear.split(",").map((e) => {
|
|
|
|
- return {
|
|
|
|
- name: e,
|
|
|
|
- checked: selectYearList.includes(e),
|
|
|
|
- };
|
|
|
|
- });
|
|
|
|
|
|
+ // this.show = true;
|
|
|
|
+ this.$refs["grade"].open(
|
|
|
|
+ this.gradeListObj[item.goodsId],
|
|
|
|
+ item.gradObj.gradeId
|
|
|
|
+ );
|
|
} else {
|
|
} else {
|
|
this.getProvinceList();
|
|
this.getProvinceList();
|
|
this.show1 = true;
|
|
this.show1 = true;
|
|
@@ -585,8 +474,6 @@ export default {
|
|
closePop(index) {
|
|
closePop(index) {
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
this.show = false;
|
|
this.show = false;
|
|
- } else if (index == 2) {
|
|
|
|
- this.show2 = false;
|
|
|
|
} else {
|
|
} else {
|
|
this.show1 = false;
|
|
this.show1 = false;
|
|
}
|
|
}
|
|
@@ -594,16 +481,19 @@ export default {
|
|
},
|
|
},
|
|
onReachBottom() {},
|
|
onReachBottom() {},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(["userInfo"]),
|
|
|
|
|
|
+ ...mapGetters(["userInfo", "shoppingCartList"]),
|
|
disCode() {
|
|
disCode() {
|
|
return this.options.distributionCode;
|
|
return this.options.distributionCode;
|
|
},
|
|
},
|
|
|
|
+ totalPrice() {
|
|
|
|
+ return this.goodsList.reduce((a, b) => a + Number(b.standPrice), 0);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style>
|
|
<style>
|
|
page {
|
|
page {
|
|
- background-color: #fff;
|
|
|
|
|
|
+ background-color: #eaeef1;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -687,11 +577,6 @@ page {
|
|
margin: 0 auto;
|
|
margin: 0 auto;
|
|
margin-top: 15rpx;
|
|
margin-top: 15rpx;
|
|
}
|
|
}
|
|
-.popup_box1 {
|
|
|
|
- height: 400rpx;
|
|
|
|
- box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
|
|
|
|
- border-radius: 32rpx 32rpx 0rpx 0rpx;
|
|
|
|
-}
|
|
|
|
.popup_box {
|
|
.popup_box {
|
|
height: 824rpx;
|
|
height: 824rpx;
|
|
box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
|
|
box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
|
|
@@ -717,8 +602,9 @@ page {
|
|
.item {
|
|
.item {
|
|
width: 100%;
|
|
width: 100%;
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
- border-radius: 16rpx;
|
|
|
|
|
|
+ border-radius: 24rpx;
|
|
margin-bottom: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
|
|
+ padding: 15rpx;
|
|
}
|
|
}
|
|
.priceTag {
|
|
.priceTag {
|
|
font-size: 28rpx;
|
|
font-size: 28rpx;
|