|
|
@@ -3,107 +3,93 @@
|
|
|
<nav-bar title="确认订单"></nav-bar>
|
|
|
<view class="contents">
|
|
|
<!-- <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-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"
|
|
|
>
|
|
|
- <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>
|
|
|
+ </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 class="priceTag"> ¥ {{ item.standPrice }} </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)"
|
|
|
+ class="input_c"
|
|
|
+ v-if="item.templateType != null && item.goodsType == 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>
|
|
|
- </view>
|
|
|
- <view class="input_c" v-if="detail.sevenYear">
|
|
|
- <view
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- height: 56rpx;
|
|
|
- padding: 8rpx;
|
|
|
- border-radius: 8rpx;
|
|
|
- "
|
|
|
- @click="openPopup(2)"
|
|
|
- >
|
|
|
- <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>
|
|
|
- <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, item)"
|
|
|
+ >
|
|
|
+ <view
|
|
|
+ v-if="item.applyAreas"
|
|
|
+ style="color: #666666; font-size: 24rpx"
|
|
|
+ >{{
|
|
|
+ item.examDate.examineName +
|
|
|
+ "-" +
|
|
|
+ item.applyAreas.areaName +
|
|
|
+ "-" +
|
|
|
+ item.applyAreas.cityName
|
|
|
+ }}</view
|
|
|
+ >
|
|
|
+ <view v-else style="color: #666666; font-size: 24rpx">
|
|
|
+ 报考地区
|
|
|
+ </view>
|
|
|
+ <view
|
|
|
+ ><u-icon
|
|
|
+ name="arrow-down"
|
|
|
+ color="#999999"
|
|
|
+ size="28"
|
|
|
+ ></u-icon
|
|
|
+ ></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
<!-- </view> -->
|
|
|
</view>
|
|
|
<view class="bottomBox safeArea">
|
|
|
<view class="sums">
|
|
|
<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 style="display: flex; color: #ffffff; align-items: center">
|
|
|
@@ -112,65 +98,6 @@
|
|
|
>
|
|
|
</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">
|
|
|
<view class="popup_box">
|
|
|
<view class="check_head">
|
|
|
@@ -234,51 +161,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="confrim-btn">
|
|
|
- <view class="okBtn" @click="okPopup(1)">确定</view>
|
|
|
+ <view class="okBtn" @click="okPopup">确定</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</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>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import ClassTimeTip from "../../components/common/ClassTimeTip.vue";
|
|
|
+import selectGradeBox from "@/components/common/selectGradeBox.vue";
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
- components: { ClassTimeTip },
|
|
|
+ components: { ClassTimeTip, selectGradeBox },
|
|
|
data() {
|
|
|
return {
|
|
|
gradeValue: 0,
|
|
|
@@ -287,12 +183,9 @@ export default {
|
|
|
indicatorStyle: `height: 50px;`,
|
|
|
showArea: true,
|
|
|
show1: false,
|
|
|
- show2: false,
|
|
|
- value1: "",
|
|
|
+ value: "",
|
|
|
show: false,
|
|
|
detail: {},
|
|
|
- gradeList: [],
|
|
|
- yearList: [],
|
|
|
provinceList: [],
|
|
|
cityList: [],
|
|
|
pAreaIndex: 0,
|
|
|
@@ -307,23 +200,34 @@ export default {
|
|
|
},
|
|
|
fromCart: "",
|
|
|
isBK: "", //是不是补考商品
|
|
|
+ goodsList: [],
|
|
|
+ gradeListObj: {},
|
|
|
+ activeItem: {},
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {},
|
|
|
- onLoad(option) {
|
|
|
+ async onLoad(option) {
|
|
|
this.id = option.id;
|
|
|
this.isBK = option.isBK;
|
|
|
if (option.fromCart) {
|
|
|
this.fromCart = option.fromCart;
|
|
|
}
|
|
|
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: {
|
|
|
getExamine(id) {
|
|
|
let self = this;
|
|
|
@@ -355,41 +259,28 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ submitSelect(gradObj) {
|
|
|
+ this.$set(this.activeItem, "gradObj", gradObj);
|
|
|
+ },
|
|
|
//弹出框确定
|
|
|
okPopup(index) {
|
|
|
- if (index == 0) {
|
|
|
- if (!this.checkData()) {
|
|
|
- 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 {
|
|
|
- if (!this.checkAreaData()) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.examDate = this.examine[this.examIndex];
|
|
|
- let pData = this.provinceList[this.pAreaIndex];
|
|
|
- let cData = this.cityList[this.cAreaIndex];
|
|
|
- this.applyAreas = {
|
|
|
- areaName: pData.areaName,
|
|
|
- areaId: pData.areaId,
|
|
|
- cityId: cData.areaId,
|
|
|
- cityName: cData.areaName,
|
|
|
- };
|
|
|
- this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas);
|
|
|
- this.applyObj.examDateJson = JSON.stringify(this.examDate);
|
|
|
- this.detail.examDate = this.examDate;
|
|
|
- this.detail.applyAreas = this.applyAreas;
|
|
|
- this.show1 = false;
|
|
|
+ if (!this.checkAreaData()) {
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.examDate = this.examine[this.examIndex];
|
|
|
+ let pData = this.provinceList[this.pAreaIndex];
|
|
|
+ let cData = this.cityList[this.cAreaIndex];
|
|
|
+ this.applyAreas = {
|
|
|
+ areaName: pData.areaName,
|
|
|
+ areaId: pData.areaId,
|
|
|
+ cityId: cData.areaId,
|
|
|
+ cityName: cData.areaName,
|
|
|
+ };
|
|
|
+ this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas);
|
|
|
+ this.applyObj.examDateJson = JSON.stringify(this.examDate);
|
|
|
+ this.activeItem.examDate = this.examDate;
|
|
|
+ this.activeItem.applyAreas = this.applyAreas;
|
|
|
+ this.show1 = false;
|
|
|
},
|
|
|
|
|
|
checkAreaData() {
|
|
|
@@ -413,64 +304,64 @@ export default {
|
|
|
this.detail.goodsType == 1
|
|
|
) {
|
|
|
/* if(!this.applyObj.examDateJson){
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: '请选择考期',
|
|
|
- showCancel: false
|
|
|
- })
|
|
|
- return false
|
|
|
- } */
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: '请选择考期',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ } */
|
|
|
}
|
|
|
return true;
|
|
|
},
|
|
|
checkData() {
|
|
|
- if (this.detail.templateType == "class" && this.detail.goodsType == 1) {
|
|
|
- if (this.gradeValue < 0) {
|
|
|
- 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 (this.goodsList.length == 0) {
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "请选择商品",
|
|
|
+ showCancel: false,
|
|
|
+ });
|
|
|
+ return false;
|
|
|
}
|
|
|
- return true;
|
|
|
+ return this.goodsList.some((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) {
|
|
|
+ // if (!item.applyAreas.areaName) {
|
|
|
+ // uni.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: '请选择报考地区',
|
|
|
+ // showCancel: false
|
|
|
+ // });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ });
|
|
|
},
|
|
|
radioGroupChange(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: "系统分班",
|
|
|
gradeId: 0,
|
|
|
- };
|
|
|
- this.gradeList.push(item);
|
|
|
+ });
|
|
|
} else {
|
|
|
- let isGradeFull = this.gradeList.every(
|
|
|
+ let isGradeFull = gradeList.every(
|
|
|
(item) =>
|
|
|
item.studentNum > 0 && item.studentNum == item.studentUpper
|
|
|
);
|
|
|
@@ -480,10 +371,11 @@ export default {
|
|
|
className: "系统分班",
|
|
|
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;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -491,18 +383,8 @@ export default {
|
|
|
if (!this.checkData()) {
|
|
|
return;
|
|
|
}
|
|
|
- if (this.detail.sevenYear && !this.detail.selectYearList) {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "请选择年份",
|
|
|
- showCancel: false,
|
|
|
- });
|
|
|
- return false;
|
|
|
- }
|
|
|
- let checkGoodsList = [];
|
|
|
- checkGoodsList.push(this.detail);
|
|
|
this.$store.commit("setShoppingCartList", {
|
|
|
- shoppingCartList: checkGoodsList,
|
|
|
+ shoppingCartList: this.goodsList,
|
|
|
});
|
|
|
if (this.isBK == "1") {
|
|
|
this.$navTo.togo("/pages2/order/confirm_pay", {
|
|
|
@@ -526,28 +408,27 @@ export default {
|
|
|
return data;
|
|
|
},
|
|
|
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];
|
|
|
+ return Promise.resolve([data]);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
getFxDetail() {
|
|
|
- let self = this;
|
|
|
- this.$api
|
|
|
+ return this.$api
|
|
|
.fxGoodsDetail({
|
|
|
goodsId: this.id,
|
|
|
disCode: this.disCode,
|
|
|
})
|
|
|
.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]);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -557,27 +438,24 @@ export default {
|
|
|
},
|
|
|
bindChange(e) {
|
|
|
const val = e.detail.value;
|
|
|
- if (this.pAreaIndex != e.detail.value[0]) {
|
|
|
- this.pAreaIndex = e.detail.value[0];
|
|
|
+ if (this.pAreaIndex != val[0]) {
|
|
|
+ this.pAreaIndex = val[0];
|
|
|
this.getCityList(this.provinceList[this.pAreaIndex].areaId);
|
|
|
}
|
|
|
- if (this.cAreaIndex != e.detail.value[1]) {
|
|
|
- this.cAreaIndex = e.detail.value[1];
|
|
|
+ if (this.cAreaIndex != val[1]) {
|
|
|
+ this.cAreaIndex = val[1];
|
|
|
}
|
|
|
},
|
|
|
- openPopup(index) {
|
|
|
+ openPopup(index, item) {
|
|
|
+ this.activeItem = item || {};
|
|
|
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.$refs["grade"].open(
|
|
|
+ this.gradeListObj[item.goodsId],
|
|
|
+ item.gradObj.gradeId
|
|
|
+ );
|
|
|
} else {
|
|
|
+ this.getExamine(100);
|
|
|
this.getProvinceList();
|
|
|
this.show1 = true;
|
|
|
}
|
|
|
@@ -585,8 +463,6 @@ export default {
|
|
|
closePop(index) {
|
|
|
if (index == 0) {
|
|
|
this.show = false;
|
|
|
- } else if (index == 2) {
|
|
|
- this.show2 = false;
|
|
|
} else {
|
|
|
this.show1 = false;
|
|
|
}
|
|
|
@@ -594,56 +470,67 @@ export default {
|
|
|
},
|
|
|
onReachBottom() {},
|
|
|
computed: {
|
|
|
- ...mapGetters(["userInfo"]),
|
|
|
+ ...mapGetters(["userInfo", "shoppingCartList"]),
|
|
|
disCode() {
|
|
|
return this.options.distributionCode;
|
|
|
},
|
|
|
+ totalPrice() {
|
|
|
+ return this.goodsList.reduce((a, b) => a + Number(b.standPrice), 0);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style>
|
|
|
page {
|
|
|
- background-color: #fff;
|
|
|
+ background-color: #eaeef1;
|
|
|
}
|
|
|
</style>
|
|
|
<style scoped lang="scss">
|
|
|
.confirms {
|
|
|
width: 100%;
|
|
|
height: 100vh;
|
|
|
+
|
|
|
// background: #fff;
|
|
|
.contents {
|
|
|
padding: 32rpx 32rpx 132rpx 32rpx;
|
|
|
}
|
|
|
+
|
|
|
.right_con {
|
|
|
width: 450rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.picker-item {
|
|
|
height: 50px;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.picker-view {
|
|
|
width: 100%;
|
|
|
height: 420rpx;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.topTxt {
|
|
|
font-size: 30rpx;
|
|
|
color: #666666;
|
|
|
text-align: center;
|
|
|
padding: 20rpx 0;
|
|
|
}
|
|
|
+
|
|
|
.blackTxt {
|
|
|
font-size: 30rpx;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: bold;
|
|
|
color: #333333;
|
|
|
}
|
|
|
+
|
|
|
.blue-box {
|
|
|
background: #ebf5ff;
|
|
|
}
|
|
|
+
|
|
|
.white-box {
|
|
|
width: 646rpx;
|
|
|
border-radius: 24rpx;
|
|
|
@@ -651,6 +538,7 @@ page {
|
|
|
display: flex;
|
|
|
padding-left: 15rpx;
|
|
|
}
|
|
|
+
|
|
|
.okBtn {
|
|
|
width: 232rpx;
|
|
|
height: 92rpx;
|
|
|
@@ -662,6 +550,7 @@ page {
|
|
|
font-size: 32rpx;
|
|
|
font-weight: 500;
|
|
|
}
|
|
|
+
|
|
|
.confrim-btn {
|
|
|
// border-top:1px solid #eee;
|
|
|
height: 98rpx;
|
|
|
@@ -670,6 +559,7 @@ page {
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
+
|
|
|
.grade {
|
|
|
// height: 23rpx;
|
|
|
font-size: 32rpx;
|
|
|
@@ -679,6 +569,7 @@ page {
|
|
|
font-weight: 500;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.line1 {
|
|
|
width: 80rpx;
|
|
|
height: 8rpx;
|
|
|
@@ -687,15 +578,12 @@ page {
|
|
|
margin: 0 auto;
|
|
|
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 {
|
|
|
height: 824rpx;
|
|
|
box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
|
|
|
border-radius: 28rpx 28rpx 0rpx 0rpx;
|
|
|
+
|
|
|
.check_head {
|
|
|
padding: 0rpx 32rpx;
|
|
|
display: flex;
|
|
|
@@ -704,9 +592,11 @@ page {
|
|
|
height: 104rpx;
|
|
|
background: #f2f2f2;
|
|
|
}
|
|
|
+
|
|
|
.items_c {
|
|
|
padding: 0rpx 32rpx;
|
|
|
}
|
|
|
+
|
|
|
.border_c {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -714,12 +604,15 @@ page {
|
|
|
border-bottom: 1rpx solid #f2f2f2;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.item {
|
|
|
width: 100%;
|
|
|
background: #ffffff;
|
|
|
- border-radius: 16rpx;
|
|
|
+ border-radius: 24rpx;
|
|
|
margin-bottom: 20rpx;
|
|
|
+ padding: 15rpx;
|
|
|
}
|
|
|
+
|
|
|
.priceTag {
|
|
|
font-size: 28rpx;
|
|
|
font-family: PingFang SC;
|
|
|
@@ -728,9 +621,11 @@ page {
|
|
|
margin-top: 6rpx;
|
|
|
margin-bottom: 16rpx;
|
|
|
}
|
|
|
+
|
|
|
.input_c {
|
|
|
background: #f8f8f8;
|
|
|
}
|
|
|
+
|
|
|
.btn2 {
|
|
|
width: 232rpx;
|
|
|
height: 92rpx;
|
|
|
@@ -741,10 +636,12 @@ page {
|
|
|
// background: linear-gradient(0deg, #015EEA, #00C0FA);
|
|
|
text-align: center;
|
|
|
line-height: 92rpx;
|
|
|
+
|
|
|
&.able {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.bottomBox {
|
|
|
position: fixed;
|
|
|
bottom: 0;
|
|
|
@@ -757,12 +654,15 @@ page {
|
|
|
align-items: center;
|
|
|
box-sizing: unset;
|
|
|
box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
|
|
|
+
|
|
|
> view {
|
|
|
margin: 0 30rpx;
|
|
|
}
|
|
|
+
|
|
|
.sums {
|
|
|
display: flex;
|
|
|
}
|
|
|
+
|
|
|
.all_sum {
|
|
|
font-size: 28rpx;
|
|
|
font-weight: 500;
|