web-retail-h5/pages/other/index.vue

1258 lines
31 KiB
Vue
Raw Normal View History

2025-03-23 09:29:40 +08:00
<!--
* @Descripttion:
* @version:
2025-03-23 09:29:40 +08:00
* @Author: kBank
* @Date: 2022-11-21 15:11:22
-->
<template>
2025-04-08 17:51:03 +08:00
<view class="content">
<view class="context">
2025-06-09 17:22:32 +08:00
<!-- <view class="subTxt">
2025-04-08 17:51:03 +08:00
<view class="subTxt1">{{ '会员信息' }}</view>
2025-06-09 17:22:32 +08:00
</view> -->
2025-04-08 17:51:03 +08:00
<u-form :model="form" labelWidth="75" :rules="rules" ref="uForm">
<!-- <u-form-item :label="'发货方式'" borderBottom>
2025-03-23 09:29:40 +08:00
<view class="pickerHui">
<u-input v-model="form.deliveryName"
disabled
:placeholder="'请选择发货方式'"
2025-03-23 09:29:40 +08:00
border="none"></u-input>
<u-icon name="arrow-down"></u-icon>
</view>
</u-form-item> -->
<view>
2025-04-08 17:51:03 +08:00
<u-form-item
:label="'会员编号'"
required
borderBottom
prop="upgradeMemberCode"
>
<u-input v-model="form.upgradeMemberCode" disabled border="none" />
2025-04-08 17:51:03 +08:00
</u-form-item>
<u-form-item
:label="'会员姓名'"
required
borderBottom
prop="upgradeMemberName"
>
<u-input v-model="form.upgradeMemberName" disabled border="none" />
</u-form-item>
</view>
2025-03-23 09:29:40 +08:00
<!-- <u-form-item
2025-04-08 17:51:03 +08:00
:label="'发货方式'"
required
borderBottom
@click="userInfo.pkSettleCountry != 1 ? (isDelivery = true) : ''"
prop="deliveryWayLabel"
>
<view class="disFlex justBwn">
<u-input
v-model="form.deliveryWayLabel"
:disabled="userInfo.pkSettleCountry == 1"
border="none"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item> -->
<!-- <u-form-item
2025-04-08 17:51:03 +08:00
:label="'运输方式'"
:required="isDeliveryWay"
borderBottom
@click="userInfo.pkSettleCountry != 1 ? (isTrans = true) : ''"
prop="transTypeLabel"
>
<view class="disFlex justBwn">
<u-input
v-model="form.transTypeLabel"
:disabled="userInfo.pkSettleCountry == 1"
border="none"
/>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item> -->
2025-04-08 17:51:03 +08:00
<view class="subTxt" v-if="isDeliveryWay">
<view class="subTxt1">{{ '收货人信息' }}</view>
<span class="subTxt2" @click="addAdress">
<u-icon color="#fff" name="plus-circle-fill"></u-icon>
<view>{{ '添加' }}</view>
</span>
</view>
<view v-if="isDeliveryWay">
<u-form-item :label="'收货人'" borderBottom prop="recName">
<u-input
v-model.trim="form.recName"
border="none"
:maxlength="40"
:placeholder="'请输入收货人'"
/>
</u-form-item>
<u-form-item
:label="'收货电话'"
borderBottom
prop="recPhone"
v-if="pkCountry == 1"
>
<u-input
v-model.trim="form.recPhone"
border="none"
type="number"
:maxlength="11"
:placeholder="'请输入收货电话'"
/>
</u-form-item>
<u-form-item :label="'收货电话'" borderBottom prop="recPhone" v-else>
<u-input
v-model.trim="form.recPhone"
border="none"
:maxlength="30"
:placeholder="'请输入收货电话'"
/>
</u-form-item>
<u-form-item
:label="'收货地址'"
borderBottom
prop="diqu"
@click="getDiqu"
>
<view class="disFlex justBwn">
<u-input
v-model.trim="form.diqu"
:placeholder="'请选收货地址'"
border="none"
></u-input>
<u-icon name="arrow-right"></u-icon>
</view>
</u-form-item>
<u-form-item :label="'详细地址'" borderBottom prop="recAddress">
<u-input
v-model.trim="form.recAddress"
border="none"
maxlength="200"
:placeholder="'请输入详细地址'"
/>
</u-form-item>
<u-form-item :label="'邮费'" borderBottom>
<u-input disabled border="none" v-model="form.postage" />
</u-form-item>
<u-form-item :label="'备注'" borderBottom>
<u-input
v-model="form.remark"
border="none"
:placeholder="'请输入备注'"
/>
</u-form-item>
</view>
</u-form>
<view class="heng"> </view>
<view class="subTxt" v-show="isDeliveryWay">
<view>{{ '历史地址' }}</view>
</view>
<u-radio-group
v-model="moren"
v-show="isDeliveryWay"
shape="circle"
placement="column"
@change="checkRadio"
>
<view
v-for="item in addressList"
:key="item.pkId"
class="disFlex address_a"
>
<u-radio activeColor="#005BAC" :name="item.pkId"></u-radio>
2025-04-08 17:51:03 +08:00
<view class="address_r">
<view class="disFlex justBwn">
<view class="disFlex">
<view>{{ item.recName }}</view>
<view class="mr" v-show="item.isDefault == 1">{{
'默认'
2025-03-23 09:29:40 +08:00
}}</view>
2025-04-08 17:51:03 +08:00
</view>
<view class="disFlex">
<u-icon
name="edit-pen"
@click="editAddress(item)"
style="margin-right: 20rpx"
color="#999999"
size="20"
></u-icon>
<u-icon
name="trash"
@click="delAds(item.pkId)"
color="#999999"
size="20"
></u-icon>
</view>
</view>
<view class="address_rc">{{ item.recPhone }}</view>
<view class="tit3">{{ item.recArea }}{{ item.recAddress }}</view>
</view>
</view>
</u-radio-group>
<view
v-for="(item, index) in allGoodsData.orderItemsParams"
:key="index"
class="goodList"
>
<view class="goodList_i">
<view class="goodList_it">
<img :src="item.cover1" class="cover" alt="" />
<view class="goodList_ir">
<view class="goodList_ib">
<view class="tit1">
{{ item.waresName }}
</view>
<view class="tit5"> x{{ item.quantity }} </view>
</view>
<view class="goodList_ib">
<view class="tit2">
{{ item.price | numberToCurrency | isLocal }}
</view>
<view class="tit3"
>业绩: {{ item.achieve | numberToCurrency | isLocal }}</view
2025-04-08 17:51:03 +08:00
>
</view>
</view>
</view>
<view
v-for="(stem, sndex) in item.waresItemsParamList"
:key="sndex"
v-if="item.energySilo != 1"
class="product_i"
>
<img :src="stem.specCover" alt="" />
<view class="product_il">
<view class="tit4"
>{{ stem.productName }} {{ stem.skuInfo }}</view
>
<view class="tit5">x{{ stem.quantity }}</view>
</view>
</view>
<view class="fen">
<view class="disFlex justBwn">
<view class="tit3">{{ '商品业绩' }}</view>
2025-04-08 17:51:03 +08:00
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
item.achieveAmount | numberToCurrency
}}</view>
2025-04-08 17:51:03 +08:00
</view>
<view class="disFlex justBwn">
<view class="tit3">{{ '金额小计' }}</view>
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
item.priceAmount | numberToCurrency
}}</view>
2025-04-08 17:51:03 +08:00
</view>
</view>
</view>
</view>
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
<view class="pad">
<view class="disFlex justBwn">
<view class="tit3">{{ '商品金额总计' }}(¥)</view>
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
allGoodsData.priceAmount | numberToCurrency | isLocal
}}</view>
2025-04-08 17:51:03 +08:00
</view>
<view class="disFlex justBwn">
<view class="tit3">{{ '邮费' }}</view>
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
form.postage | numberToCurrency | isLocal
}}</view>
2025-04-08 17:51:03 +08:00
</view>
<view class="disFlex justBwn">
<view class="tit3">{{ '总价' }}</view>
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
totalAmont | numberToCurrency | isLocal
}}</view>
2025-04-08 17:51:03 +08:00
</view>
<view class="disFlex justBwn">
<view class="tit3">{{ '业绩' }}</view>
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
allGoodsData.achieveAmount | numberToCurrency
}}</view>
2025-04-08 17:51:03 +08:00
</view>
<view class="disFlex justBwn" v-if="specialArea == 13">
<view class="tit3">BV</view>
<view class="tit1">{{
2025-03-23 09:29:40 +08:00
allGoodsData.assAchieveAmount | numberToCurrency
}}</view>
2025-04-08 17:51:03 +08:00
</view>
</view>
</view>
<!-- 占空 -->
<view style="height: 296rpx"></view>
<!-- 底部 -->
<view class="footer_f">
<view class="footer">
<view class="footer_l">
<!-- <u-checkbox-group
2025-04-08 17:51:03 +08:00
v-model="agreementShow"
shape="circle"
2025-04-22 17:47:02 +08:00
activeColor="#005BAC"
2025-04-08 17:51:03 +08:00
@change="checkboxChange"
>
<u-checkbox :name="1"> </u-checkbox>
</u-checkbox-group> -->
<!-- <view class="tit3">{{ '请阅读并同意' }}</view> -->
<!-- <view class="tit2" @click="toAgree" v-if="specialArea != 30">
2025-04-08 17:51:03 +08:00
{{ '购买协议' }}</view
> -->
<!-- <view
2025-04-08 17:51:03 +08:00
class="tit2"
@click="toAgree"
v-if="specialArea == 30 && userInfo.isDealer == 1"
>
推广人员服务协议</view
> -->
<!-- <view
2025-04-08 17:51:03 +08:00
class="tit2"
@click="toAgree"
v-if="specialArea == 30 && userInfo.isDealer == 0"
>
经销商合同</view
> -->
2025-04-08 17:51:03 +08:00
</view>
<view class="tit2 cen" v-if="specialArea == 30"
>该礼包一旦购买不能退换</view
>
<view class="footer_r">
<u-button
type="success"
class="uBtn"
shape="circle"
:loading="isLoading"
:loadingText="'购买中'"
@tap="goBuy"
2025-04-22 17:47:02 +08:00
color="linear-gradient(to right, #005BAC, #005BAC )"
2025-04-08 17:51:03 +08:00
>{{ '购买' }}</u-button
>
</view>
</view>
</view>
<!-- 发货方式 -->
<u-picker
:show="isDelivery"
@cancel="isDelivery = false"
@confirm="sureDelivery"
:columns="deliList"
keyName="label"
></u-picker>
<!-- 运输方式 -->
<u-picker
:show="isTrans"
@cancel="isTrans = false"
@confirm="sureTrans"
:columns="transList"
keyName="label"
></u-picker>
2025-05-09 16:09:55 +08:00
2025-04-08 17:51:03 +08:00
<!-- 强制阅读协议 -->
<mustAgreeMent :waresCodeList="waresCodeList"></mustAgreeMent>
<agreement ref="agreement"></agreement>
<!-- 经销商合同 -->
<jxsht ref="jxsht"></jxsht>
<!-- 推广服务协议 -->
<tgfuxy ref="tgfuxy"></tgfuxy>
<u-modal
:show="delAddress"
showConfirmButton
showCancelButton
:content="'确定要删除该收货地址吗' + ''"
confirmColor="#DE3932"
@confirm="toDel"
@cancel="delAddress = false"
ref="uModal"
:asyncClose="true"
></u-modal>
<v-address
ref="address"
:defaultCode="defaultCode"
@addressData="addressData"
></v-address>
</view>
2025-03-23 09:29:40 +08:00
</template>
<script>
2025-04-08 17:51:03 +08:00
import address from '@/components/address.vue'
import * as api from '@/config/regiest'
import mustAgreeMent from '@/components/mustAgreeMent.vue'
import agreement from '@/components/agreement.vue'
import jxsht from '@/components/jxsht.vue'
import tgfuxy from '@/components/tgfuxy.vue'
2025-06-09 17:22:32 +08:00
import {
REGIEST_AREA,
UPGRADE_AREA,
REPURCHASE_AREA,
REISSUE_AREA,
} from '@/util/specialAreaMap'
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
export default {
components: {
'v-address': address,
mustAgreeMent,
agreement,
jxsht,
tgfuxy,
},
data() {
return {
isDeliveryWay: true,
isDp: false,
storehouseList: [],
isCk: false,
strTitle: '',
delAddress: false,
waresCodeList: [],
defaultCode: [],
moren: '',
addressList: [],
deliList: [],
transList: [],
bankList: [],
isDelivery: false,
isBank: false,
isTrans: false,
countryIndex: 0,
isCountry: false,
userInfo: '',
countryList: [],
isClick: 0,
specialArea: '',
shoppingArr: [],
allGoodsData: {
deleteList: [],
},
pageList: {
mail: false,
card: false,
bankName: false,
bankNo: false,
accountBranch: false,
},
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
form: {
deliveryName: '快递发货',
deliveryWay: 1,
postage: 0,
transType: 1,
pkGradeVal: '',
},
deliList: [],
diqu: '',
allData: [],
goodsNum: 1,
agreementShow: [1],
2025-04-08 17:51:03 +08:00
priceAmount: 0, //商品总价
achiveAmount: 0, //总业绩
totalAmont: 0,
orderItemsParams: [],
isLoading: false,
centerCodeId: '',
rules: {
upgradeMemberCode: [
{
required: true,
trigger: ['blur'],
},
],
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
recName: [
{
required: true,
message: '请输入收货人',
trigger: ['change', 'blur'],
},
],
recPhone: [
{
required: true,
validator: this.checkRecPhone,
trigger: ['change', 'blur'],
},
],
diqu: [
{
required: true,
message: '请选择收货地址',
trigger: ['change', 'blur'],
},
],
recAddress: [
{
required: true,
message: '请输入详细地址',
trigger: ['change', 'blur'],
},
],
transTypeLabel: [
{
validator: this.transPass,
trigger: ['change'],
},
],
deliveryWayLabel: [
{
required: true,
message: '请选择发货方式',
trigger: ['change'],
},
],
makerSpaceMemberLabel: [
{
required: true,
message: '请选择',
trigger: ['change'],
},
],
},
delId: '',
isSpace: false,
checkObj: {},
selTable: [],
pkCountry: '',
howSure: false,
ishowSure: false,
queryCardList: [],
}
},
onLoad(options) {
this.pkCountry = uni.getStorageSync('pkCountry')
this.specialArea = options.specialArea
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
this.shoppingArr = JSON.parse(options.shoppArr)
if (options.selTable) {
let a = JSON.parse(options.selTable)
let b = a.map(item => {
return {
waresCode: item.waresCode,
quantity: item.quantity,
waresItemsParamList: item.productGroup,
waresName: item.waresName,
achieve: 0,
achieveAmount: 0,
price: 0,
priceAmount: 0,
cover1: item.cover1,
energySilo: 1,
}
})
b.forEach(item => {
item.waresItemsParamList = item.waresItemsParamList.map(ctem => {
return {
pkWaresSpecsSku: ctem.pkProductSku,
quantity: ctem.quantity,
}
})
})
this.selTable = b
}
// 获取购物车详情
this.getCatDetail()
// 获取页面权限
this.getPageList()
// 幂等性
this.getGenerate()
// 登录信息
this.userInfo = uni.getStorageSync('User')
this.form.upgradeMemberCode = this.userInfo.memberCode
this.form.upgradeMemberName = this.userInfo.memberName
// this.getUserName()
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
if (this.specialArea == 30) {
this.agreementShow = [1]
this.$forceUpdate()
}
2025-06-09 19:50:44 +08:00
this.setPageTitle(this.specialArea)
2025-04-08 17:51:03 +08:00
},
onShow() {
// 获取地址
this.getAddressList()
},
methods: {
2025-06-09 17:22:32 +08:00
setPageTitle(areaId) {
const areaList = [
REGIEST_AREA,
UPGRADE_AREA,
REISSUE_AREA,
REPURCHASE_AREA,
]
const title = areaList.find(item => item.id == areaId)?.name
uni.setNavigationBarTitle({
title,
})
},
2025-04-08 17:51:03 +08:00
toAgree() {
// agreeMent
if (this.specialArea == 30) {
if (this.userInfo.isDealer == 1) {
this.$refs.tgfuxy.openDig()
} else {
this.$refs.jxsht.openDig()
}
// tgfuxy
} else {
this.$refs.agreement.openDig()
}
},
getMember() {
let deleteList = []
this.shoppingArr.forEach(item => {
deleteList.push({
shoppingId: item,
})
})
this.allGoodsData.deleteList = deleteList
this.allGoodsData.upgradeMemberCode = this.form.upgradeMemberCode
if (this.specialArea == 2) {
let howSure = this.allGoodsData.orderItemsParams.some(
item => item.isMakerGift == 4 || item.isMakerGift == 0
)
this.howSure = howSure
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
api.memLevel(this.allGoodsData).then(res => {
if (res.data.isEnough) {
console.log(res.data, 'res.data...memLevel')
2025-04-08 17:51:03 +08:00
this.form.pkGradeVal = res.data.pkGradeVal
} else {
this.isLoading.close()
}
})
},
addAdress() {
uni.navigateTo({
url: '/pages/address/index',
})
},
editAddress(item) {
uni.navigateTo({
url: '/pages/address/index?pkId=' + item.pkId,
})
},
delAds(id) {
this.delId = id
this.delAddress = true
},
toDel() {
api.delAddress(this.delId).then(res => {
uni.showToast({
title: '删除成功',
icon: 'none',
})
this.getAddressList()
})
this.delAddress = false
},
getPageList() {
api.registerList().then(res => {
res.data.forEach(item => {
if (item.field == 'MAILBOX') {
this.pageList.mail = true
} else if (item.field == 'CREDENTIALS') {
this.pageList.card = true
} else if (item.field == 'BANK_NAME') {
this.pageList.bankName = true
} else if (item.field == 'BANK_NO') {
this.pageList.bankNo = true
} else if (item.field == 'Account_Branch') {
this.pageList.accountBranch = true
}
})
})
},
getCatDetail() {
api
.shoppingWaresDetail({
shoppingIds: this.shoppingArr,
specialArea: this.specialArea,
})
.then(res => {
this.allGoodsData = res.data
this.waresCodeList = res.data.orderItemsParams.map(item => {
return item.waresCode
})
this.allGoodsData.specialArea = this.specialArea
this.selTable.forEach(item => {
this.allGoodsData.orderItemsParams.push(item)
})
this.totalAmont = this.allGoodsData.priceAmount
let orderItemsParams = []
this.waresCodeList.forEach(item => {
orderItemsParams.push({
waresCode: item,
})
})
this.checkObj = {
specialArea: this.specialArea,
orderItemsParams: orderItemsParams,
}
// 获取运输方式
this.getTransList()
// 获取发货方式
this.getDeliveryList()
if (
this.specialArea == 2 ||
this.specialArea == 25 ||
this.specialArea == 27
) {
this.getMember()
}
// 判断特殊商品
if (this.specialArea == 3) {
this.checkGoods()
}
})
},
checkGoods() {
// 判断特殊商品
api.makerList().then(res => {
if (res.data.length > 0) {
let isYes = 0
res.data.forEach(item => {
if (
this.allGoodsData.orderItemsParams.some(
ctem => ctem.waresCode == item
)
) {
isYes++
}
})
}
})
},
transPass(rule, value, callback) {
if (this.isDeliveryWay) {
if (!value) {
callback(new Error('请选择运输方式'))
} else {
callback()
}
} else {
callback()
}
},
checkAddress() {},
checkRecPhone(rule, value, callback) {
if (!value) {
callback(new Error('请输入联系方式'))
} else {
if (this.userInfo.pkSettleCountry == 1) {
let patrn = /^(1\d{10})$/
if (patrn.test(value)) {
callback()
} else {
callback(new Error('请输入正确联系方式'))
}
} else {
let patrn = /^(1\d{10})$/
if (value.length >= 1 && value.length <= 30) {
callback()
} else {
callback(new Error('请输入正确联系方式'))
}
}
}
},
2025-04-08 17:51:03 +08:00
sureCk(e) {
const { value } = e
this.form.pkStorehouse = value[0].id
this.form.pkStorehouseLabel = value[0].label
this.isCk = false
},
sureDp(e) {
const { value } = e
this.form.pkMemberStore = value[0].id
this.form.pkMemberStoreLabel = value[0].label
this.isDp = false
},
getAddressList() {
api.addressList().then(res => {
this.addressList = res.data
this.addressList.forEach(item => {
if (item.isDefault == 1) {
this.moren = item.pkId
this.checkRadio()
}
})
})
},
getUserName() {
api
.upgRel({
upgradeMemberCode: this.form.upgradeMemberCode,
})
.then(res => {
if (res.code == 200) {
this.form.upgradeMemberName = res.data.upgradeMemberName
this.$forceUpdate()
}
})
},
checkboxChange(e) {},
checkRadio() {
let arr = []
this.addressList.forEach(item => {
if (item.pkId == this.moren) {
this.form.recName = item.recName
this.form.nameList = item.recArea
this.form.recPhone = item.recPhone
this.form.recAddress = item.recAddress
this.form.recProvince = item.recProvince
this.form.recCity = item.recCity
if (item.recCounty) {
this.form.diqu = `${item.recProvinceVal}-${item.recCityVal}-${item.recCountyVal}`
this.form.recCounty = item.recCounty
} else {
this.form.diqu = `${item.recProvinceVal}-${item.recCityVal}`
this.form.recCounty = ''
}
this.defaultCode = [
item.recProvince,
item.recCity,
item.recCounty || '',
]
}
})
// this.allGoodsData.deliveryWay = this.form.deliveryWay
// this.allGoodsData.transType = this.form.transType
setTimeout(() => {
this.getPostAge()
this.$forceUpdate()
}, 50)
},
getPostAge() {
let deleteList = []
this.shoppingArr.forEach(item => {
deleteList.push({
shoppingId: item,
})
})
// this.allGoodsData.deliveryWay = this.form.deliveryWay
// this.allGoodsData.transType = this.form.transType
this.allGoodsData.deleteList = deleteList
this.allGoodsData.shopList = deleteList
2025-04-08 17:51:03 +08:00
api
.queryPostage(
Object.assign(
{
specialArea: this.specialArea,
recName: this.form.recName,
recPhone: this.form.recPhone,
recAddress: this.form.recAddress,
recProvince: this.form.recProvince,
recCity: this.form.recCity,
recCounty: this.form.recCounty,
transType: this.form.transType,
deliveryWay: this.form.deliveryWay,
},
this.allGoodsData
)
)
.then(res => {
this.form.postage = Number(res.data.postage).toFixed(2)
this.totalAmont =
parseFloat(this.allGoodsData.priceAmount) +
parseFloat(res.data.postage)
})
},
getTransList() {
api.transportList().then(res => {
let data = res.data.map(item => {
return {
id: item.value,
label: item.label,
}
})
this.transList = [data]
if (this.userInfo.pkSettleCountry == 1) {
this.form.transType = 1
data.forEach(item => {
if (item.id == 1) {
this.form.transTypeLabel = item.label
}
})
}
})
},
getDeliveryList() {
api.deliveryList().then(res => {
let data = res.data.map(item => {
return {
id: item.value,
label: item.label,
}
})
this.deliList = [data]
if (this.userInfo.pkSettleCountry == 1) {
this.form.deliveryWay = 1
data.forEach(item => {
if (item.id == 1) {
this.form.deliveryWayLabel = item.label
}
})
}
})
},
2025-04-08 17:51:03 +08:00
surehowSure(e) {
const { value } = e
this.form.makerSpaceMember = value[0].id
this.form.makerSpaceMemberLabel = value[0].label
this.ishowSure = false
},
sureTrans(e) {
const { value } = e
this.form.transType = value[0].id
this.form.transTypeLabel = value[0].label
this.isTrans = false
},
sureDelivery(e) {
const { value } = e
this.form.deliveryWay = value[0].id
this.form.deliveryWayLabel = value[0].label
if (value[0].id == 2 || value[0].id == 3) {
this.isDeliveryWay = false
} else {
this.isDeliveryWay = true
}
this.isDelivery = false
},
getGenerate() {
api.generate().then(res => {
uni.setStorageSync('mToken', res.msg)
})
},
goBuy() {
this.$refs.uForm.validate().then(res => {
if (this.agreementShow.length == 0) {
uni.showToast({
title: '请阅读并同意购买协议',
icon: 'none',
duration: 1500,
})
return
}
2025-04-08 17:51:03 +08:00
this.isLoading = true
let deleteList = []
this.shoppingArr.forEach(item => {
deleteList.push({
shoppingId: item,
})
})
let url
2025-03-23 09:29:40 +08:00
api
.confirmOthOrder(
Object.assign({}, this.form, this.allGoodsData, {
deleteList: deleteList,
buyMemberCode: this.userInfo.memberCode,
2025-04-08 17:51:03 +08:00
})
)
.then(res => {
this.isLoading = false
if (res.code == 200) {
const params = {
...res.data,
specialArea: this.specialArea,
}
uni.redirectTo({
url:
'/pages/pay/index?paramsPost=' +
JSON.stringify(params) +
'&businessType=1',
})
}
})
2025-04-08 17:51:03 +08:00
})
},
getDiqu() {
this.$refs.address.setShow()
},
confirmPopup() {},
addressData(diqu, obj) {
this.form.diqu = diqu
this.form.recProvince = obj.province + ''
this.form.recCity = obj.city + ''
this.form.recCounty = obj.county + ''
this.$forceUpdate()
this.getPostAge()
// this.queryAdressPostage()
},
},
}
2025-03-23 09:29:40 +08:00
</script>
<style lang="scss" scoped>
2025-04-08 17:51:03 +08:00
.content {
.con_top {
width: 100%;
position: fixed;
display: flex;
background: #005bac;
2025-04-08 17:51:03 +08:00
font-size: 28rpx;
font-weight: 400;
color: #ffffff;
padding: 24rpx 0;
z-index: 1;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.con_top_i {
flex: 1;
text-align: center;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.bai {
width: 52rpx;
height: 6rpx;
background: #ffffff;
margin: 0 auto;
margin-top: 10rpx;
}
}
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.zhan {
height: 96rpx;
}
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.countImg {
width: 62rpx;
height: 41rpx;
margin-right: 20rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.context {
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
::v-deep .u-form-item__body {
padding: 10px 20px;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
::v-deep .u-input__content {
padding: 0px 20rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
::v-deep .u-form-item__body__right__message {
margin-left: 105px !important;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.disFlex {
display: flex;
align-items: center;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.justBwn {
width: 100%;
justify-content: space-between;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.goodList {
display: flex;
padding: 20rpx;
border-bottom: 1px solid #eee;
background: #fff;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.cover {
width: 136rpx;
height: 136rpx;
background: #ffffff;
border: 1px solid #eeeeee;
border-radius: 10rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.goodList_i {
flex: 1;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.goodList_it {
display: flex;
padding: 0rpx 0 20rpx 0rpx;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.goodList_ir {
margin-left: 20rpx;
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.goodList_ib {
display: flex;
align-items: center;
justify-content: space-between;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
img {
width: 56rpx;
height: 56rpx;
}
}
}
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.product_i {
display: flex;
align-items: center;
background: #f6f6f6;
padding: 28rpx;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.product_il {
display: flex;
align-items: center;
flex: 1;
justify-content: space-between;
margin-left: 20rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
img {
width: 50rpx;
height: 50rpx;
background: #ffffff;
border: 1px solid #dddddd;
border-radius: 10rpx;
}
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.fen {
background: #f6f6f6;
padding: 0 28rpx 28rpx 28rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.pad {
padding: 28rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.footer_f {
position: fixed;
bottom: 0;
width: 100%;
z-index: 10;
background: #f2f2f2;
// height: 296rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.footer {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 20rpx 24rpx 40rpx 20rpx;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.footer_l {
display: flex;
justify-content: center;
margin: 30rpx 0 20rpx 0;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.footer_r {
// flex: 1;
display: flex;
align-items: center;
font-size: 20rpx;
font-weight: 500;
color: #333333;
}
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.tit1 {
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.tit2 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: bold;
2025-04-23 11:51:12 +08:00
color: #f82c1a;
2025-04-08 17:51:03 +08:00
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.cen {
text-align: center;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.tit3 {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.tit4 {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #333333;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.tit5 {
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #999999;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.heng {
height: 20rpx;
background: #f2f2f2;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.subTxt {
background: #005bac;
2025-04-08 17:51:03 +08:00
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #fff;
padding: 35rpx 27rpx;
display: flex;
align-items: center;
justify-content: space-between;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.subTxt1 {
border-left: 4px solid #fff;
padding: 0 20rpx;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.subTxt2 {
display: flex;
align-items: center;
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
view {
margin-left: 20rpx;
}
}
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.address_a {
padding: 27rpx;
border-bottom: 2rpx solid #eee;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.address_r {
flex: 1;
margin-left: 20rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: bold;
color: #333333;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.address_rc {
margin: 6rpx 0;
}
2025-03-23 09:29:40 +08:00
2025-04-08 17:51:03 +08:00
.mr {
margin-left: 20rpx;
background: #181818;
border-radius: 16rpx;
font-size: 20rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #ffffff;
padding: 6rpx 16rpx;
border-radius: 20px;
}
</style>