| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744 |
- <template>
- <view class="affirm-page">
- <view class="affirm-view overscroll">
- <form>
- <view class="module-com">
- <view class="flex-space ghs-msg">
- {{ghsInfo.name}} {{ ghsInfo.telephone }}
- <i class="iconfont icondianhua1" @tap="toPhone(ghsInfo.telephone)"></i>
- </view>
- <view class="flex ghs-msg active">
- {{ ghsInfo.fullAddress }}
- </view>
- </view>
- <view class="module-com">
- <view class="commodity-view">
- <view class="commodity-list">
- <view class="commodity-item" :class="{'limit-exceed-item': isLimitExceededItem(item)}" v-for="(item, index) in selectList" :key="index">
- <image class="item-icon" :src="item.cover" mode="aspectFill" />
- <view class="item-info">
- <view class="item-row-top">
- <text class="item-name">{{ item.itemName }}</text>
- <view class="item-price-block">
- <view class="item-price-line">
- <text class="price-current">{{ affirmCommodityPriceParts[index].main }}</text>
- <text v-if="affirmCommodityPriceParts[index].showStrike" class="price-original">{{ affirmCommodityPriceParts[index].strike }}</text>
- </view>
- </view>
- </view>
- <view class="item-row-qty">
- <text v-if="item.bigCount > 0" class="qty-part qty-big">{{ item.bigCount }}{{ item.bigUnit }}</text>
- <text v-if="item.bigCount > 0 && item.smallCount > 0" class="qty-sep">·</text>
- <text v-if="item.smallCount > 0" class="qty-part qty-small">{{ item.smallCount }}{{ item.smallUnit }}</text>
- </view>
- <view v-if="isLimitExceededItem(item) || getLimitBuyPriceTip(item) || item.presell == 1" class="item-row-tips">
- <text v-if="isLimitExceededItem(item)" class="limit-exceed-tip">限购 {{ limitExceedLimitBuy }},超出 {{ limitExceedNum }}</text>
- <text v-if="getLimitBuyPriceTip(item)" class="limit-buy-price-tip">{{ getLimitBuyPriceTip(item) }}</text>
- <text v-if="item.presell == 1" class="presell-tip">预售花材下单不能退款</text>
- </view>
- </view>
- </view>
- </view>
- <view class="summary-bar">
- <view class="operate-view" @click="gobackEvent">
- <text class="iconfont icongouwuche"></text>返回修改
- </view>
- <view class="describe-view">
- <text class="price">共{{ allCountFun.bigLength }}扎,{{ allCountFun.weight }}公斤,合计 ¥{{ allPriceFun }}</text>
- </view>
- </view>
- </view>
- </view>
- <block v-if="ghsInfoLoaded">
- <view class="module-com input-line-wrap">
- <!-- 配送方式选择 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <button
- v-for="(item, index) in visibleMethodList"
- :key="item.style"
- class="admin-button-com middle sh-method-btn"
- :class="[
- selectedMethodIndex === index ? 'blue' : 'default',
- item.name && item.name.length <= 2 ? 'sh-method-btn--short' : 'sh-method-btn--long'
- ]"
- @click="selectMethodByIndex(index)"
- >{{ item.name }}</button>
- </tui-list-cell>
- <!-- 配送方式说明 -->
- <tui-list-cell
- v-if="currentMethodExplains.length > 0"
- class="line-cell"
- :hover="false"
- :arrow="false"
- >
- <view>
- <view v-for="(exp, index) in currentMethodExplains" :key="index">
- <text :style="'width:100%;color:' + (Number(exp.color) === 2 ? 'red' : Number(exp.color) === 3 ? '#3385FF' : '#333333') + ';font-weight:' + (Number(exp.fontWeight) === 2 ? 'bold' : 'normal') + ';'">{{ exp.explain }}</text>
- </view>
- </view>
- </tui-list-cell>
- <!-- 物流填写/选择 -->
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
- <view class="tui-title">配送物流</view>
- <view class="wl-field-row">
- <input
- type="text"
- placeholder="请填写物流"
- v-model="form.wlName"
- @focus="onWlNameFocus"
- @input="onWlNameInput"
- placeholder-class="tui-placeholder"
- class="wl-name-input"
- />
- <button
- v-if="wlList.length > 0"
- class="admin-button-com middle wl-select-btn"
- @click="openWlSelect"
- >选择物流</button>
- </view>
- </tui-list-cell>
- <!-- 未达标提示:加运费/加包装费/不能下单 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="showShMethodUnMeetWarning">
- <view>
- <text style="color: red;width:100%;font-weight: bold;font-size: 30upx;text-decoration: underline;">{{ shMethodUnMeetWarningText }}</text>
- </view>
- </tui-list-cell>
- <!-- 配送地址状态提示 -->
- <tui-list-cell v-if="form.sendType == 2 && ghsInfo.openIntraCity != 1" class="line-cell" :hover="false" :arrow="false">
- <view>
- <text v-if="ghsInfo.openIntraCity == 0" style="color: #3385FF;width:100%;font-size:30upx;font-weight:bold;">运费自理或到付(请联系客服)</text>
- <text v-if="ghsInfo.openIntraCity == 2" style="color: red;width:100%;font-size:30upx;font-weight:bold;">跑腿配送暂不可用,请选其它方式</text>
- </view>
- </tui-list-cell>
- <!-- 收货地址 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="displayAddress" @click="modifyAddress">
- <view class="tui-title">收花地址</view>
- <view v-if="validAddress || ghsInfo.shopId==10649 || ghsInfo.shopId ==33668">
- <view style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:420upx;"><text>{{ shopInfo.address }}</text></view>
- <view v-if="shopInfo.showAddress!=shopInfo.fullAddress" style="color:#848181;"><text>{{ shopInfo.showAddress }}</text></view>
- </view>
- <view v-else>
- <view><text style="color:red;font-weight:bold;font-size:30upx;">请填写您的地址</text></view>
- </view>
- </tui-list-cell>
- <!-- 跑腿平台报价列表 -->
- <tui-list-cell v-if="form.sendType == 2 && currentShMethod && Number(currentShMethod.calcType) == 0 && ghsInfo.openIntraCity == 1" class="line-cell" :hover="false">
- <view v-if="ghsInfo.openIntraCity == 1 && deliveryQuotes.length > 0" class="delivery-quotes-container">
- <view class="delivery-quotes-grid">
- <view
- v-for="(item, index) in deliveryQuotes"
- :key="index"
- class="delivery-quote-item"
- :class="{
- 'active': selectedDeliveryIndex === index,
- 'disabled': !item.isAble,
- 'fixed-width': deliveryQuotes.length <= 2
- }"
- @click="selectDelivery(item, index)"
- >
- <view class="platform-name">{{ item.displayName || item.name }}</view>
- <view class="platform-price">{{ item.priceText }}元</view>
- <view v-if="item.type" class="platform-type">{{ item.type }}</view>
- </view>
- </view>
- </view>
- <view v-else style="text-align: center; padding: 20upx 0;">
- <text v-if="validAddress">正在获取运费...</text>
- <text v-else style="color:red;font-weight:bold;font-size:32upx;" @click="modifyAddress">请完善收货地址</text>
- </view>
- </tui-list-cell>
- <!-- 距离展示 -->
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2 && Number(showDistance)>0">
- <view class="tui-title">距离</view>
- <text v-if="showDistance > 100" style="color: #3385FF">{{ (showDistance/1000).toFixed(1) }}公里</text>
- <text v-else style="color: #3385FF">{{ showDistance }} 米</text>
- </tui-list-cell>
- <!-- 跑腿费 -->
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 2">
- <view class="tui-title">跑腿费</view>
- <view>
- <text :class="isFreePt ? 'delivery-price-free' : 'delivery-price-normal'">¥{{ form.sendCost }}</text>
- <text v-if="isFreePt" class="free-delivery-tag">¥0</text>
- <text class="delivery-policy-link" @click="showDeliveryPolicyModal">免运费条件</text>
- </view>
- </tui-list-cell>
- <!-- 额外费用(包装费/运费) -->
- <tui-list-cell class="line-cell" :hover="false" v-if="showShMethodExtraFee">
- <view class="tui-title">{{ shMethodExtraFeeLabel }}</view>
- <text style="color: #3385FF">¥{{ shMethodExtraFeeAmount }}</text>
- </tui-list-cell>
- <!-- 总金额 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">总金额</view>
- <text style="color: #3385FF">¥ {{ panelTotalPrice }}</text>
- </tui-list-cell>
- <!-- 配送日期 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="true">
- <view class="tui-title">配送日期</view>
- <picker mode="date" :value="sendTimeWant" @change="bindDateChange" style="width:400upx;">
- <view class="uni-input" v-if="sendTimeWant==''" style="color:#CCCCCC;">请选日期,默认当天</view>
- <view class="uni-input">{{ sendTimeWant }}</view>
- </picker>
- </tui-list-cell>
- <!-- 备注 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <textarea style="height: 80upx" v-model="remark" placeholder="这里写备注"/>
- </tui-list-cell>
- </view>
- </block>
- </form>
- </view>
- <view class="under-bar">
- <view class="price-view">
- <text class="price-title">合计</text>
- <text class="price-number">¥<text class="large">{{ modifyPrice}}</text></text>
- <text v-if="allReachDiscountAmount > 0" class="price-discount-tip">省¥{{ parseFloat(allReachDiscountAmount) }}</text>
- </view>
- <button class="admin-button-com blue big" @click="affirmFormSubmit(0)">提交</button>
- </view>
- <uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
- <view style="font-size:32upx;margin:30upx 0 10upx 30upx;width:90vw;font-weight:bold;">以下库存不足,剩余的库存,是否都要?</view>
- <view v-if="!$util.isEmpty(lackList)" style="display:flex;padding:10upx 20upx 20upx 30upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:80vh;overflow:auto;width:90vw;font-size:32upx;">
- <view v-for="(item, index) in lackList" :key="index" style="width:100%;margin-top:10upx;">{{ item.name }}<text style="margin-left:20upx;font-weight:bold;color:red;">剩{{item.stock}}个</text></view>
- </view>
- <view style="width:90vw;margin:20upx 0 20upx 0;display:flex;align-items: center; justify-content: center;">
- <button class="admin-button-com big blue" style="width:190upx;" @click="gobackEvent">返回修改</button>
- <button class="admin-button-com big blue" style="width:190upx;" @click="closeRemind()">取消</button>
- <button class="admin-button-com big blue" style="width:190upx;" @click="affirmFormSubmit(1)">要</button>
- </view>
- </uni-popup>
- <uni-popup ref="deliveryPolicyPopup" type="center" background-color="#fff">
- <view class="policy-popup-content">
- <view class="policy-title">免运费条件</view>
- <scroll-view scroll-y="true" class="policy-scroll">
- <view class="policy-list">
- <block v-for="(item, index) in deliveryPolicyList" :key="index">
- <view class="policy-item">{{ item }}</view>
- </block>
- </view>
- </scroll-view>
- <view class="policy-btn" @click="closeDeliveryPolicy">知道了</view>
- </view>
- </uni-popup>
- <!-- 物流选择弹框:展示供货商配置的物流列表,选中后回填输入框 -->
- <uni-popup ref="wlPopupRef" background-color="#fff" type="center" :animation="false" class="wl-popup-wrap">
- <view class="wl-popup-content">
- <view class="wl-popup-title">请选择物流</view>
- <scroll-view scroll-y="true" class="wl-popup-scroll">
- <view class="wl-popup-list">
- <view v-for="(item, index) in wlList" :key="index" class="wl-popup-item">
- <button
- class="admin-button-com wl-option-btn"
- @click.stop="selectWl(item)"
- :class="{ selected: form.wlName === item.name }"
- >{{ item.name }}</button>
- </view>
- </view>
- </scroll-view>
- <view class="wl-popup-footer">
- <button class="admin-button-com big blue wl-popup-cancel-btn" @click="cancelWlSelect">取消</button>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import TuiListCell from "@/components/plugin/list-cell";
- import AppAvatarModule from "@/components/module/app-avatar";
- import SimpleAddress from "@/components/plugin/simple-address";
- import AppAreaSel from "@/components/app-area-sel";
- import AppCustomerSel from "@/components/app-customer-sel";
- import productMins from "@/mixins/cgProduct";
- import appFormRadioBtn from "@/components/app-formRadio-btn";
- import appAddressGroup from "@/components/app-address-group";
- import appFormSend from "@/components/app-form-send";
- import appSendTime from "@/components/app-send-time";
- const formUtil = require("@/utils/formValidation.js");
- import AppDatePicker from "@/components/app-date-picker";
- import { getGhsDataApi,getWlList,calcCustomPtFee } from "@/api/ghs";
- import { createOrder,getShMethod } from "@/api/purchase";
- import { mapActions, mapGetters } from "vuex";
- import { shopHouponHas } from '@/api/coupon'
- import {currentShop} from "@/api/shop"
- import { allDeliveryQuotes } from "@/api/express/delivery";
- import ModalModule from "@/components/plugin/modal";
- export default {
- name: "affirmGhs",
- components: {
- TuiListCell,
- AppAvatarModule,
- SimpleAddress,
- AppAreaSel,
- appSendTime,
- AppCustomerSel,
- appFormRadioBtn,
- appAddressGroup,
- appFormSend,
- AppDatePicker,
- ModalModule
- },
- mixins: [productMins],
- data() {
- return {
- isModel: false,
- pageType: "cg",
- ghsInfo:'',
- sendTimeWant:'',
- remark:'',
- form: {
- debt:1,//结算方式 1欠款订单 0正常订单
- shopId: "",
- shopName: "",
- receiveProvince: "",
- receiveCity: "",
- receiveFloor: "",
- receiveAddress: "",
- receiveLong: "",
- receiveLat: "",
- sendType: 0,
- transType:4,
- sendSide: "2",
- sendDate: "",
- sendCost: 0,
- customId: "",
- product: "",
- hbId: '0',
- packCost:0,
- wlName:'',
- wlId:0
- },
- lackExpend:0,
- hasHb:0,
- selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
- customData: {
- bigCount: 0,
- smallCount: 0
- },
- shopInfo:{
- lat:'',
- long:'',
- fullAddress:'',
- showAddress:'',
- address:''
- },
- wlList:[],
- wlSelData: {id:0,name:''},
- needAddPackCost:false,
- transCost:[],
- lackList:[],
- limitExceedProductId:'',
- limitExceedLimitBuy:'',
- limitExceedNum:'',
- showDistance:0,
- deliveryQuotes: [], // 跑腿平台报价列表
- selectedDeliveryIndex: -1, // 选中的报价索引
- selectedDeliveryData: null, // 选中的报价数据
- deliveryPolicyList: [], // 包配送政策列表
- validAddress:false,
- ghsInfoLoaded: false,
- methodList: [],
- /** 当前选中的配送方式下标,默认加载后选中第一项 */
- selectedMethodIndex: -1
- };
- },
- onLoad() {
- this.getGhsData(this.option.id)
- },
- onShow() {
- if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
- this.form.hbId = this.selectedHb.hbId
- }else{
- this.form.hbId = 0
- this.hasCoupon()
- }
- //修改地址重新返回页面时,重新获取当前门店信息
- this.modifyAddressToggle()
- },
- computed: {
- ...mapGetters(["getMerchantInfo", "getLoginInfo","getDictionariesInfo"]),
- visibleMethodList() {
- return (this.methodList || [])
- .filter(item => Number(item.status) === 1)
- .sort((a, b) => Number(a.sort) - Number(b.sort))
- },
- currentShMethod() {
- const list = this.visibleMethodList
- if (this.selectedMethodIndex >= 0 && this.selectedMethodIndex < list.length) {
- return list[this.selectedMethodIndex]
- }
- return null
- },
- showDeliveryPolicy() {
- const method = this.currentShMethod
- if (!method) return false
- let rules = method.reduceRules
- if (typeof rules === 'string') {
- try {
- rules = JSON.parse(rules)
- } catch (e) {
- rules = []
- }
- }
- return Array.isArray(rules) && rules.length > 0
- },
- showShMethodExtraFee() {
- const method = this.currentShMethod
- if (!method || !this.checkShMethodBelowMinimum(method)) {
- return false
- }
- const unMeet = Number(method.unMeet) || 0
- const fee = Number(method.unMeetFee) || 0
- return (unMeet === 0 || unMeet === 1) && fee > 0
- },
- /**
- * 未达配送方式最低消费时是否展示红色提示
- * unMeet:0 加运费、1 加包装费、2 不能下单
- */
- showShMethodUnMeetWarning() {
- const method = this.currentShMethod
- if (!method || !this.checkShMethodBelowMinimum(method)) {
- return false
- }
- const unMeet = Number(method.unMeet) || 0
- // 不能下单:直接提示
- if (unMeet === 2) {
- return true
- }
- // 加运费 / 加包装费:有费用时提示
- const fee = Number(method.unMeetFee) || 0
- return (unMeet === 0 || unMeet === 1) && fee > 0
- },
- shMethodExtraFeeLabel() {
- const method = this.currentShMethod
- if (!method) {
- return "包装费"
- }
- return Number(method.unMeet) === 1 ? "包装费" : "运费"
- },
- shMethodExtraFeeAmount() {
- if (!this.showShMethodExtraFee) {
- return 0
- }
- const method = this.currentShMethod
- return parseFloat(Number(method && method.unMeetFee) || 0)
- },
- /** 未达标红色文案:加运费/包装费金额,或不能下单 */
- shMethodUnMeetWarningText() {
- const method = this.currentShMethod
- if (!method) {
- return ""
- }
- const tips = []
- const minAmount = Number(method.minAmount) || 0
- const minNum = Number(method.minNum) || 0
- if (minAmount > 0) {
- tips.push("未满" + minAmount + "元")
- }
- if (minNum > 0) {
- tips.push("未满" + minNum + "扎")
- }
- const conditionText = tips.length > 0 ? tips.join("或") : "未达最低消费"
- const unMeet = Number(method.unMeet) || 0
- // unMeet=2:未满最低消费则禁止下单
- if (unMeet === 2) {
- return conditionText + ",不能下单"
- }
- // unMeet=0 加运费;unMeet=1 加包装费,并写出具体金额
- const fee = parseFloat(Number(method.unMeetFee) || 0)
- const feeLabel = unMeet === 1 ? "包装费" : "运费"
- return conditionText + ",加" + feeLabel + fee + "元"
- },
- currentMethodExplains() {
- const method = this.currentShMethod
- if (!method || !Array.isArray(method.explains)) {
- return []
- }
- return method.explains
- .filter(exp => exp && exp.explain)
- .sort((a, b) => Number(a.sort) - Number(b.sort))
- },
- runnerFeeAmount() {
- if (this.isFreePt) {
- return 0
- }
- return Number(this.form.sendCost) || 0
- },
- panelTotalPrice() {
- let price = Number(this.allPriceFun) || 0
- price += this.runnerFeeAmount
- price += this.shMethodExtraFeeAmount
- return parseFloat(price.toFixed(2))
- },
- /** 确认页列表每行价格展示(与 selectList 顺序一致) */
- affirmCommodityPriceParts() {
- const list = this.selectList || [];
- return list.map(item => this.getLimitBuyPriceDisplayParts(item));
- },
- displayAddress(){
- if(this.form.sendType != 1){
- return true
- }
- if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
- return true
- }
- return false
- },
- //判断是否免跑腿费
- isFreePt(){
- const method = this.currentShMethod
- if (!method) return false
- let rules = method.reduceRules
- if (typeof rules === 'string') {
- try {
- rules = JSON.parse(rules)
- } catch (e) {
- rules = []
- }
- }
- if (!Array.isArray(rules) || rules.length === 0) {
- return false
- }
- const flowerCount = Number(this.allCountFun.bigLength) || 0
- const flowerPrice = Number(this.allPriceFun) || 0
- const distanceInMeters = Number(this.showDistance) || 0
- for (const rule of rules) {
- const meetNum = Number(rule.meetNum) || 0
- const meetAmount = Number(rule.meetAmount) || 0
- const freeKm = Number(rule.freeKm) || 0
- const freeKmInMeters = freeKm * 1000
- if (freeKmInMeters > 0 && flowerCount >= meetNum && flowerPrice >= meetAmount && distanceInMeters <= freeKmInMeters) {
- return true
- }
- }
- return false
- },
- /**
- * 计算总金额
- * @returns {number}
- */
- modifyPrice(){
- return this.panelTotalPrice
- }
- },
- methods: {
- //初始化配送业务面板:拉取配送配置
- loadShMethods(ghsId) {
- getShMethod({ ghsId: ghsId }).then(res => {
- if (res.code == 1) {
- this.methodList = res.data && res.data.method ? res.data.method : []
- if (this.visibleMethodList.length > 0) {
- this.selectMethodByIndex(0)
- } else {
- this.selectedMethodIndex = -1
- }
- }
- })
- },
- checkShMethodBelowMinimum(method) {
- if (!method) {
- return false
- }
- const minAmount = Number(method.minAmount) || 0
- const minNum = Number(method.minNum) || 0
- if (minAmount <= 0 && minNum <= 0) {
- return false
- }
- const allPrice = Number(this.allPriceFun) || 0
- const bigLength = Number(this.allCountFun.bigLength) || 0
- return (minAmount > 0 && allPrice < minAmount) || (minNum > 0 && bigLength < minNum)
- },
- /** 按列表下标切换配送方式,并同步 sendType 供下单与条件展示 */
- selectMethodByIndex(index) {
- const list = this.visibleMethodList
- if (!list[index]) {
- return
- }
- this.selectedMethodIndex = index
- const sendType = Number(list[index].style)
- this.form.sendType = sendType
- //计算跑腿费,二种方式,一个通过跑腿接口,一个通过自定义计费
- this.calcPtFee()
- this.syncPackCostByMethod()
- },
- modifyAddressToggle(){
- currentShop().then(res=>{
- if(res.code == 1){
- this.shopInfo = res.data
- if(!this.$util.isEmpty(this.shopInfo.lat) && !this.$util.isEmpty(this.shopInfo.long) && !this.$util.isEmpty(this.shopInfo.address)){
- this.validAddress = true
- //计算跑腿费,二种方式,一个通过跑腿接口,一个通过自定义计费
- this.calcPtFee()
- }
- }
- })
- },
- //计算跑腿费,二种方式,一个通过跑腿接口,一个通过自定义计费
- calcPtFee(){
- if(this.form.sendType == 2 && this.validAddress && this.currentShMethod){
- if(Number(this.currentShMethod.calcType) == 0){
- this.getDeliveryQuotes()
- }else{
- this.getCustomPtFee()
- }
- }else{
- this.deliveryQuotes = []
- this.selectedDeliveryIndex = -1
- this.selectedDeliveryData = null
- this.form.sendCost = 0
- this.showDistance = 0
- }
- },
- /** 获取自定义计费跑腿费用与距离 */
- getCustomPtFee(){
- this.deliveryQuotes = []
- this.selectedDeliveryIndex = -1
- this.selectedDeliveryData = null
- const ghsId = this.option.id || (this.ghsInfo && this.ghsInfo.id) || 0
- calcCustomPtFee({ id: ghsId, sendType: 2 }).then(res => {
- if (res.code == 1 && res.data) {
- this.form.sendCost = parseFloat(res.data.sendCost) || 0
- this.showDistance = Number(res.data.distance) || 0
- } else {
- this.form.sendCost = 0
- this.showDistance = 0
- if (res.msg) {
- uni.showToast({ title: res.msg, icon: 'none' })
- }
- }
- }).catch(() => {
- this.form.sendCost = 0
- this.showDistance = 0
- uni.showToast({ title: '获取自定义运费失败', icon: 'none' })
- })
- },
- // 展示包配送政策弹窗
- showDeliveryPolicyModal() {
- this.deliveryPolicyList = []
- const method = this.currentShMethod
- if (method) {
- let rules = method.reduceRules
- if (typeof rules === 'string') {
- try {
- rules = JSON.parse(rules)
- } catch (e) {
- rules = []
- }
- }
- if (Array.isArray(rules) && rules.length > 0) {
- rules.forEach(rule => {
- const meetNum = Number(rule.meetNum) || 0
- const meetAmount = Number(rule.meetAmount) || 0
- const freeKm = Number(rule.freeKm) || 0
-
- let text = ''
- if (meetNum > 0 && meetAmount > 0) {
- text = `满${meetNum}扎和${meetAmount}元,${freeKm}公里内免跑腿费`
- } else if (meetNum > 0) {
- text = `满${meetNum}扎,${freeKm}公里内免跑腿费`
- } else if (meetAmount > 0) {
- text = `满${meetAmount}元,${freeKm}公里内免跑腿费`
- } else if (freeKm > 0) {
- text = `${freeKm}公里内免跑腿费`
- }
- if (text) {
- this.deliveryPolicyList.push(text)
- }
- })
- }
- }
-
- if (this.deliveryPolicyList.length === 0) {
- uni.showToast({
- title: '暂无详细配送政策',
- icon: 'none'
- })
- return
- }
-
- this.$refs.deliveryPolicyPopup.open()
- },
- syncPackCostByMethod() {
- const method = this.currentShMethod
- if (method && this.checkShMethodBelowMinimum(method)) {
- const unMeet = Number(method.unMeet) || 0
- const fee = parseFloat(Number(method.unMeetFee) || 0)
- if ((unMeet === 0 || unMeet === 1) && fee > 0) {
- this.form.packCost = fee
- return
- }
- }
- this.form.packCost = 0
- },
- /** 聚焦物流输入框时清空,便于重新填写 */
- onWlNameFocus() {
- this.form.wlName = ""
- this.form.wlId = 0
- this.wlSelData = { id: 0, name: "" }
- },
- /** 手动输入物流名称时清除已选物流 id,避免与列表选项不一致 */
- onWlNameInput() {
- this.form.wlId = 0
- this.wlSelData = { id: 0, name: "" }
- },
- /** 打开物流选择弹框 */
- openWlSelect() {
- if (!this.wlList.length) {
- uni.showToast({ title: "暂无物流可选", icon: "none" })
- return
- }
- this.$refs.wlPopupRef.open("center")
- },
- /** 弹框内选中物流后回填到输入框 */
- selectWl(item) {
- this.wlSelData = item || { id: 0, name: "" }
- this.form.wlId = this.wlSelData.id
- this.form.wlName = this.wlSelData.name
- this.$refs.wlPopupRef.close()
- },
- /** 关闭物流选择弹框 */
- cancelWlSelect() {
- this.$refs.wlPopupRef.close()
- },
- ...mapActions(["initMerchantInfo"]),
- closeDeliveryPolicy() {
- this.$refs.deliveryPolicyPopup.close()
- },
- closeRemind(){
- this.$refs.selectFlowerNumRef.close()
- this.lackList = []
- },
- // 获取跑腿平台报价
- getDeliveryQuotes() {
- this.deliveryQuotes = []
- this.selectedDeliveryIndex = -1
- this.selectedDeliveryData = null
-
- allDeliveryQuotes({
- ghsId: this.option.id,
- totalPrice: this.allPriceFun,
- weight: this.allCountFun.weight,
- selectList: this.selectList,
- weight: 1, // 固定重量1kg,请后期根据实际需求修改。测试过后,所有平台都能在5kg的重量下,不会产生额外费用。
- remark: '',
- }).then(res => {
- if (res.code === 1 && res.data && res.data.deliveryList) {
- // 处理报价数据
- this.deliveryQuotes = res.data.deliveryList
- .filter(item => item.isAble !== false)
- .map(item => {
- // 价格从分转换为元
- const price = item.price ? (item.price / 100).toFixed(1) : '0.0'
-
- // 提取平台名称(去掉括号内的内容)
- let displayName = item.name
- let bracketContent = ''
- if (displayName && displayName.includes('(')) {
- bracketContent = displayName.split('(')[1].replace(')', '')
- displayName = displayName.split('(')[0].trim()
- }
- //滴滴特殊处理,括号里的内容作为类型
- if(item.en_name == 'didi' && bracketContent != ''){
- item.type = bracketContent
- }
-
- return {
- ...item,
- displayName: displayName,
- priceText: price,
- priceNumber: parseFloat(price),
- bracketContent: bracketContent
- }
- })
-
- // 自动选中第一个可用的报价
- const firstAvailableIndex = this.deliveryQuotes.findIndex(item => item.isAble)
- if (firstAvailableIndex !== -1) {
- this.selectDelivery(this.deliveryQuotes[firstAvailableIndex], firstAvailableIndex)
- }
- } else {
- uni.showToast({ title: '暂无跑腿可用', icon: 'none' })
- }
- }).catch(err => {
- uni.showToast({ title: '没有获取到跑腿费用', icon: 'none' })
- })
- },
- // 选择跑腿平台
- selectDelivery(item, index) {
- this.selectedDeliveryIndex = index
- this.selectedDeliveryData = item
- this.form.sendCost = item.priceNumber
- this.showDistance = item.distance || 0
- },
- modifyAddress(){
- this.$util.pageTo({ url: '/admin/shop/add?id='+this.getLoginInfo.admin.currentShopId})
- },
- customUpdate(item) {
- if(item.variety == 0){
- if(item.stock<=0){
- uni.showToast({title:'没有货了',icon:'none'})
- return
- }
- this.customNum({ ...item, bigCount: item.bigCount, smallCount: item.smallCount })
- }else{
- this.$msg('多颜色请返回列表修改')
- }
- },
- //自定义数量
- customNum(info) {
- this.isModel = true;
- this.customData = info;
- this.$nextTick(()=>{
- this.customData.smallCount = this.customData.smallCount==0?null:this.customData.smallCount;
- this.customData.bigCount = this.customData.bigCount==0?null:this.customData.bigCount;
- this.isFocus = true;
- if(Number(info.smallCount)>0){
- this.globalUnitType = 1
- }else{
- this.globalUnitType = 0
- }
- })
- },
- modalCancel() {
- this.isModel = false;
- this.customData = {};
- },
- affirm(val) {
- this.isFocus = false;
- this.isFocusOne = false;
- this.$nextTick(()=>{
- //取消
- if (val.index === 0) {
- if(this.customData.bigCount>0 || this.customData.smallCount>0){
- }else{
- this.delAllEvent(this.customData)
- }
- this.modalCancel();
- return false
- }
- //二个都不是数值
- if(/(^[1-9]\d*$)/.test(this.customData.bigCount) == false && /(^[1-9]\d*$)/.test(this.customData.smallCount) == false){
- this.delAllEvent(this.customData)
- this.modalCancel();
- return;
- }
- if(/(^[1-9]\d*$)/.test(this.customData.bigCount)){
- if(this.customData.bigCount<=0){
- uni.showToast({title:"数量要大于0",icon:"none"})
- return;
- }
- }
- if(/(^[1-9]\d*$)/.test(this.customData.smallCount)){
- if(this.customData.smallCount<=0){
- uni.showToast({title:"数量要大于0",icon:"none"})
- return;
- }
- }
- const { bigCount,smallCount,bigNum,bigUnit,smallNum,smallUnit,ratio} = this.customData;
- const ratioNum = Number(ratio);
- //超过库存时 设置为库存最大值 1
- if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
- uni.showToast({
- title: '库存还剩'+bigNum,
- icon: "none"
- });
- } else {
- this.updateItemEvent(this.customData)
- this.modalCancel()
- }
- })
- },
- init() {
- let that = this
- this.getDetailData()
- getWlList({id:this.option.id}).then(res=>{
- if(res.code == 1){
- that.wlList = res.data.list ? res.data.list : []
- }
- })
- },
- addEvents(item) {
- if(item.variety == 0){
- const ratio = Number(item.ratio);
- if(this.offVerifyRepertory){
- if(item.stock<=0){
- uni.showToast({title:'没有货了',icon:'none'})
- return
- }
- if (Number(this.bigCount) * ratio + Number(this.smallCount) >Number(item.bigNum) * ratio + Number(item.smallNum)) {
- this.$msg("库存只剩"+item.bigNum);
- return
- }
- }
- this.addEvent(item)
- }else{
- this.$msg('多颜色请返回列表修改')
- }
- },
- delItem(item) {
- if(item.variety == 0){
- this.delEvent(item)
- }else{
- this.$msg('多颜色请返回列表修改')
- }
- },
- bindDateChange(e){
- let date = e.detail.value
- this.sendTimeWant = date
- },
- toPhone(phone){
- uni.makePhoneCall({
- phoneNumber: phone
- });
- },
- hasCoupon() {
- let amount = this.allPrice
- shopHouponHas({amount:amount,ghsId:this.option.id}).then(res => {
- this.hasHb = res.data.has
- }).catch(err => {})
- },
- getGhsData(id) {
- let that = this
- getGhsDataApi({id:id}).then(res => {
- that.ghsInfo = res.data
- that.transCost = that.ghsInfo.transCost ? that.ghsInfo.transCost : []
- if(that.ghsInfo.pfLevel && that.ghsInfo.pfLevel == 1){
- //昆明发货到全国
- let packCost = 0
- let weight = this.allCountFun.weight ? this.allCountFun.weight : 0
- if (that.ghsInfo.kmPackCost && !this.$util.isEmpty(that.ghsInfo.kmPackCost)){
- for (const ele of that.ghsInfo.kmPackCost) {
- let flagWeight = ele.num?ele.num:0
- if(Number(flagWeight)>=Number(weight)){
- that.form.packCost = ele.amount?parseFloat(Number(ele.amount)):0
- break
- }
- }
- }
- }else{
- //同城配送
- that.form.packCost = res.data.packCost?parseFloat(res.data.packCost):0
- }
- that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):0
- that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
- this.loadShMethods(id)
- that.ghsInfoLoaded = true
- })
- },
- countAllPrices(e){
- this.allPrices = this.allPrices+Number(this.form.sendCost)
- },
- getDetailData() {
- let data = uni.getStorageSync("modifyShopB")
- if (this.$util.isEmpty(data)){
- return
- }
- Object.keys(this.form).forEach((i, index) => {
- this.form[i] = data[i];
- });
- },
- confirmFn(options) {
- createOrder(options).then(res => {
- this.resetSelectInfoByType(this.pageType);
- this.resetLimitBuyInfoByType(this.pageType);
- const { data: { id, orderSn } } = res;
- let url = `/admin/billing/result?orderId=${id}&orderSn=${orderSn}`;
- uni.redirectTo({ url: url })
- });
- },
- affirmFormSubmit(direct){
- const product = this.selectList.map(ele => {
- return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId,weight:ele.weight,name:ele.name };
- })
- if(this.ghsInfo.pfLevel == 0){
-
- /** 提交前校验,失败时提示并返回 false */
- if (Number(this.form.sendType) === 3 && this.$util.isEmpty(this.form.wlName)) {
- this.$msg("请填选物流")
- return false
- }
- const method = this.currentShMethod
- if (method && Number(method.unMeet) === 2 && this.checkShMethodBelowMinimum(method)) {
- // 未满最低消费且不可下单时,提示具体需要的最低金额与数量
- const minAmount = Number(method.minAmount) || 0
- const minNum = Number(method.minNum) || 0
- const tips = []
- if (minAmount > 0) {
- tips.push(`满${minAmount}元`)
- }
- if (minNum > 0) {
- tips.push(`满${minNum}扎`)
- }
- const tipStr = tips.length > 0 ? `${tips.join("并且")}才能下单` : "未达到最低消费,不能下单"
- this.$msg(tipStr)
- return false
- }
-
- }
- //多颜色
- let xj = uni.getStorageSync("ghsColorItem"+this.ghsInfo.id)
- let getType = this.form.sendType == 2 ? 1 : 2
- //用于计划是否要包装费
- let itemTotalAmount = this.allPriceFun
- let params = {
- getType:getType,
- sendTimeWant:this.sendTimeWant,
- sendType:this.form.sendType,
- transType:this.form.transType,
- remark:this.remark,
- product:JSON.stringify(product),
- ghsId:this.ghsInfo.id,
- hbId: this.form.hbId,
- wlName:this.form.wlName,
- xj:JSON.stringify(xj),
- itemTotalAmount:itemTotalAmount,
- version:10,
- direct:direct
- }
-
- // 如果选择了跑腿配送并且有选中的平台数据,则添加配送平台信息
- if (this.form.sendType == 2 && this.selectedDeliveryData) {
- params.deliveryPlatform = this.selectedDeliveryData.en_name // 平台名称
- params.deliveryPrice = this.selectedDeliveryData.priceNumber // 报价金额
- params.deliveryDistance = this.showDistance // 配送距离
- params.deliveryBracketContent = this.selectedDeliveryData.bracketContent // 配送平台括号里的内容
- }
- let self = this;
- self.$util.confirmModal({content:'确认提交?'}, async () => {
- let pendingMsg = '';
- uni.showLoading({title: '加载中',mask:true})
- try {
- // hideError:避免 luch-request 在 showLoading 期间 showToast 被挡住
- const res = await createOrder(params, { hideError: true })
- if (!res || typeof res !== 'object') {
- pendingMsg = '提交失败,请重试'
- return
- }
- if(res.code == 1){
- this.limitExceedProductId = ''
- this.limitExceedLimitBuy = ''
- this.limitExceedNum = ''
- if(res.data.hasLackError && res.data.hasLackError == 1){
- this.lackList = res.data.lackList ? res.data.lackList : []
- this.$refs.selectFlowerNumRef.open('center')
- return
- }
- const {orderSn,realPrice,id} = res.data
- self.pageTo({url: '/pagesPurchase/wechatPay',query:{orderSn,realPrice,id}, type: 2})
- setTimeout(() => {
- self.removeMemory(self.ghsInfo.id)
- self.resetLimitBuyInfoByType(self.pageType)
- }, 600)
- return
- }
- if(res.code == -1 && res.data && String(res.data.productId || '') !== ''){
- this.limitExceedProductId = res.data.productId ? String(res.data.productId) : ''
- this.limitExceedLimitBuy = res.data.limitBuy ? String(res.data.limitBuy) : '0'
- this.limitExceedNum = res.data.exceed ? String(res.data.exceed) : '0'
- pendingMsg = res.msg || '累计已超出限购数'
- return
- }
- this.limitExceedProductId = ''
- this.limitExceedLimitBuy = ''
- this.limitExceedNum = ''
- if(res.msg){
- pendingMsg = res.msg
- }
- } catch (err) {
- pendingMsg = '提交失败,请重试'
- } finally {
- uni.hideLoading()
- if (pendingMsg) {
- // 小程序 hideLoading 后立即 showToast 可能不显示,需短暂延迟
- setTimeout(() => {
- self.$msg(pendingMsg)
- }, 100)
- }
- }
- })
- },
- isLimitExceededItem(item){
- if(!item || !this.limitExceedProductId){
- return false
- }
- return String(item.id) === String(this.limitExceedProductId)
- },
- numberAdd(arg1, arg2) {
- var r1, r2, m, n;
- try {
- r1 = arg1.toString().split(".")[1].length
- } catch (e) {
- r1 = 0
- }
- try {
- r2 = arg2.toString().split(".")[1].length
- } catch (e) {
- r2 = 0
- }
- m = Math.pow(10, Math.max(r1, r2))
- n = (r1 >= r2) ? r1 : r2;
- return ((arg1 * m + arg2 * m) / m).toFixed(n);
- },
- NumberSub(arg1, arg2) {
- var re1, re2, m, n;
- try {
- re1 = arg1.toString().split(".")[1].length;
- } catch (e) {
- re1 = 0;
- }
- try {
- re2 = arg2.toString().split(".")[1].length;
- } catch (e) {
- re2 = 0;
- }
- m = Math.pow(10, Math.max(re1, re2));
- n = (re1 >= re2) ? re1 : re2;
- return ((arg1 * m - arg2 * m) / m).toFixed(n);
- },
- // 表单验证
- async formSubmit(e) {
- try {
- // 进行表单检查
- let formData = this.form;
- const product = this.selectList.map(ele => {
- return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount };
- });
- formData.product = JSON.stringify(product);
- if (!this.getMerchantInfo) {
- await this.initMerchantInfo();
- }
- formData.shopId = this.getMerchantInfo.id;
- let checkRes = formUtil.validation(formData, []);
- // 验证通过!
- if (!checkRes) {
- this.confirmFn(formData);
- } else {
- this.$msg(checkRes);
- }
- } catch (error) {
- console.log(999999, error);
- }
- },
- gobackEvent() {
- this.$util.pageTo({url: "/pagesPurchase/ghsProduct?id="+this.options.id,type: 2})
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .admin-button-com {
- margin-right: 15upx;
- }
- .affirm-page {
- position: relative;
- height: 100%;
- display: flex;
- flex-direction: column;
- /* #ifdef APP-PLUS */
- padding-bottom: 100upx;
- /* #endif */
- .affirm-view {
- flex: 1;
- padding: 20upx 20upx 100upx 20upx;
- background-color: #f0f2f6;
- .commodity-view {
- display: flex;
- flex-direction: column;
- .commodity-list {
- padding: 20upx;
- .commodity-item {
- display: flex;
- margin-bottom: 20upx;
- &.limit-exceed-item {
- border: 2upx solid #ff4d4f;
- border-radius: 12upx;
- padding: 12upx;
- box-sizing: border-box;
- }
- .item-icon {
- flex-shrink: 0;
- width: 140upx;
- height: 140upx;
- border-radius: 4upx;
- background-color: #f5f5f5;
- }
- .item-info {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- flex: 1;
- margin-left: 20upx;
- min-width: 0;
- .item-row-top {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- }
- .item-name {
- flex: 1;
- min-width: 0;
- padding-right: 16upx;
- color: #333333;
- font-size: 30upx;
- font-weight: bold;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- line-height: 1.3;
- }
- .item-price-block {
- flex-shrink: 0;
- display: flex;
- flex-direction: row;
- align-items: baseline;
- max-width: 48%;
- }
- .item-price-line {
- display: flex;
- flex-direction: row;
- align-items: baseline;
- }
- .price-current {
- font-size: 32upx;
- font-weight: bold;
- color: #333333;
- white-space: nowrap;
- line-height: 1.2;
- }
- .price-original {
- margin-left: 12upx;
- margin-top: 0;
- font-size: 29upx;
- color: #999999;
- text-decoration: line-through;
- white-space: nowrap;
- line-height: 1.2;
- }
- .item-row-qty {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- align-items: center;
- margin-top: 10upx;
- flex-wrap: wrap;
- }
- .qty-sep {
- margin: 0 8upx;
- color: #cccccc;
- font-size: 28upx;
- }
- .qty-part {
- font-size: 28upx;
- color: #666666;
- }
- .qty-big {
- font-size: 30upx;
- font-weight: bold;
- color: #3385ff;
- }
- .item-row-tips {
- display: flex;
- flex-direction: column;
- margin-top: 10upx;
- }
- .limit-exceed-tip {
- margin-top: 4upx;
- color: #ff4d4f;
- font-size: 24upx;
- font-weight: bold;
- line-height: 1.45;
- }
- .limit-buy-price-tip {
- margin-top: 4upx;
- color: #ff7a00;
- font-size: 24upx;
- font-weight: bold;
- line-height: 1.45;
- }
- .presell-tip {
- margin-top: 4upx;
- color: #e53935;
- font-size: 26upx;
- font-weight: bold;
- line-height: 1.45;
- }
- }
- }
- }
- .summary-bar {
- padding: 0 20upx;
- height: 90upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-top: 1px solid #eeeeee;
- .operate-view {
- display: flex;
- align-items: center;
- color: #3385ff;
- font-size: 30upx;
- font-weight:bold;
- .iconfont {
- margin-right: 20upx;
- font-size: 40upx;
- }
- }
- .describe-view {
- display: flex;
- align-items: center;
- color: #333;
- font-size: 24upx;
- .price {
- font-weight: bold;
- font-size: 30upx;
- }
- }
- }
- }
- .module-com {
- background-color: #fff;
- margin-bottom: 20upx;
- border-radius: 10upx;
- overflow: hidden;
- padding-top: 20upx;
- .ghs-msg{
- padding: 0 20upx 20upx;
- font-size: 32upx;
- &.active{
- color: #868686;
- font-size: 24upx;
- }
- i{color: #62ed73;font-size: 48upx}
- }
- .member-wrap {
- .member-det {
- font-size: 24upx;
- margin-left: 20upx;
- }
- }
- .remark-wrap {
- align-items: flex-start;
- .remark {
- height: 240upx;
- }
- }
- }
- }
- .under-bar {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20upx;
- width: 100%;
- height: 100upx;
- background-color: #fff;
- box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
- /* #ifdef APP-PLUS */
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 999;
- /* #endif */
- /* #ifdef MP-WEIXIN */
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 999;
- /* #endif */
- .price-view {
- display: flex;
- align-items: center;
- font-size: 24upx;
- .price-title {
- color: #333;
- }
- .price-number {
- margin: 0 20upx;
- color: #ff2842;
- .large {
- font-size: 40upx;
- }
- }
- .price-discount-tip {
- font-size: 28upx;
- color: #ff7a00;
- font-weight: bold;
- white-space: nowrap;
- }
- }
- .admin-button-com {
- width: 200upx;
- }
- }
- .coupon_box{
- flex: 1;
- text-align: right;
- padding-right: 45upx;
- .has-hb{
- background:red;
- color:white;
- border:1upx solid red;
- border-radius: 30upx;
- font-size:20upx;
- padding:5upx 15upx 5upx 15upx;
- }
- .selected{
- color:red;
- float:left;
- }
- }
- .select-cmd_bx {
- & .kc {
- color: #999999;
- font-size: 28upx;
- font-weight: 400;
- margin-bottom: 60upx;
- text-align: center;
- margin-top: 10upx;
- }
- & .num_bx {
- display: flex;
- align-items: center;
- justify-content:center;
- margin-bottom: 80upx;
- & > input {
- width: 280upx;
- height: 80upx;
- border: 1px solid #dddddd;
- border-radius: 4upx;
- text-align: center;
- font-size: 40upx;
- }
- }
- }
- }
- /* 跑腿平台报价样式 */
- .delivery-quotes-container {
- width: 100%;
- margin-top: 20upx;
- }
- .delivery-quotes-grid {
- display: flex;
- flex-wrap: wrap;
- gap: 10upx;
- padding: 0;
- width: 100%;
- }
- .delivery-quote-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- flex: 0 0 calc(33% - 7upx);
- width: calc(33% - 7upx);
- min-height: 140upx;
- padding: 16upx 10upx;
- margin-bottom: 5upx;
- background: #FFFFFF;
- border: 2upx solid #DDDDDD;
- border-radius: 8upx;
- box-sizing: border-box;
- transition: all 0.3s;
-
- // 当只有1-2项时使用固定宽度
- &.fixed-width {
- flex: 0 0 220rpx;
- width: 220rpx;
- }
-
- .platform-name {
- font-size: 26upx;
- color: #333;
- font-weight: bold;
- margin-bottom: 8upx;
- text-align: center;
- line-height: 1.3;
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2;
- -webkit-box-orient: vertical;
- word-break: break-all;
- }
-
- .platform-price {
- font-size: 30upx;
- color: #333;
- font-weight: bold;
- margin-bottom: 4upx;
- }
-
- .platform-type {
- font-size: 20upx;
- color: #868686;
- margin-top: 4upx;
- text-align: center;
- line-height: 1.3;
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2;
- -webkit-box-orient: vertical;
- word-break: break-all;
- }
-
- // 选中状态
- &.active {
- background: #09C567;
- border-color: #09C567;
-
- .platform-name,
- .platform-price {
- color: #FFFFFF;
- }
-
- .platform-type {
- color: rgba(255, 255, 255, 0.85);
- }
- }
-
- // 不可用状态
- &.disabled {
- opacity: 0.5;
- background: #F5F5F5;
-
- .platform-name,
- .platform-price,
- .platform-type {
- color: #CCCCCC;
- }
- }
- }
- /* 跑腿费价格样式 */
- .delivery-price-normal {
- color: #3385FF;
- }
- .delivery-price-free {
- color: #999;
- text-decoration: line-through;
- }
- .free-delivery-tag {
- color: #3385FF;
- margin-left: 20upx;
- }
- .delivery-policy-link {
- color: rgb(201, 52, 52);
- font-size: 30upx;
- margin-left: 20upx;
- font-weight: bold;
- text-decoration: underline;
- }
- .policy-icon {
- font-size: 28upx;
- margin-left: 4upx;
- }
- .policy-popup-content {
- width: 600upx;
- background-color: #fff;
- border-radius: 20upx;
- padding: 30upx;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .policy-title {
- font-size: 34upx;
- font-weight: bold;
- color: #333;
- margin-bottom: 30upx;
- }
- .policy-scroll {
- width: 100%;
- max-height: 50vh;
- margin-bottom: 30upx;
- }
- .policy-list {
- width: 100%;
- }
- .policy-item {
- font-size: 30upx;
- color: #666;
- margin-bottom: 20upx;
- text-align: left;
- line-height: 1.5;
- display: list-item;
- list-style-type: disc;
- margin-left: 40upx;
- }
- .policy-btn {
- width: 50%;
- height: 80upx;
- line-height: 80upx;
- text-align: center;
- background-color: #3385ff;
- color: #fff;
- font-size: 32upx;
- border-radius: 40upx;
- }
- /* 配送业务面板样式 */
- .wl-field-row {
- display: flex;
- flex-direction: row;
- align-items: center;
- flex: 1;
- justify-content: flex-end;
- min-width: 0;
- }
- .wl-name-input {
- flex: 1;
- min-width: 0;
- text-align: left;
- }
- .wl-select-btn {
- margin-left: 16upx;
- flex-shrink: 0;
- }
- .wl-popup-content {
- width: 680upx;
- max-width: 90vw;
- background: #fff;
- border-radius: 20upx;
- overflow: hidden;
- }
- .wl-popup-title {
- padding: 30upx 30upx 10upx;
- font-size: 30upx;
- font-weight: bold;
- color: #333;
- }
- .wl-popup-scroll {
- max-height: 60vh;
- }
- .wl-popup-list {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- padding: 20upx 20upx 10upx;
- }
- .wl-popup-item {
- margin-bottom: 20upx;
- margin-right: 12upx;
- }
- .wl-option-btn {
- min-width: 160upx;
- padding: 0 27upx;
- height: 80upx;
- font-size: 32upx;
- font-weight: bold;
- border-radius: 16upx;
- background: #f0f2f6;
- color: #333;
- border: 2upx solid #e0e0e0;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .wl-option-btn.selected,
- .wl-option-btn:active {
- background: #3385ff;
- color: #fff;
- border-color: #3385ff;
- }
- .wl-popup-footer {
- padding: 10upx 0 30upx;
- text-align: center;
- }
- .wl-popup-cancel-btn {
- width: 210upx;
- }
- .sh-method-btn {
- width: 115upx;
- height: 100upx;
- margin-right: 15upx;
- }
- .sh-method-btn:last-child {
- margin-right: 0;
- }
- .sh-method-btn--short {
- line-height: 60upx;
- }
- .sh-method-btn--long {
- line-height: 32upx;
- }
- .wl-popup-wrap {
- z-index: 99999;
- }
- </style>
|