| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664 |
- <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" v-for="(item, index) in selectList" :key="index">
- <image class="item-icon" :src="item.cover" alt="" />
- <view class="item-info">
- <view class="info-line">
- <text class="item-name">{{ item.itemName }}</text>
- <text class="item-price">
- <text class="unit"></text>
- <text class="price">
- ¥{{ Number(item.bigCount)>0 ? parseFloat(item.bigPrice) : parseFloat(item.smallPrice) }}
- </text>
- </text>
- </view>
- <view style="text-align:right;position:relative;">
- <view class="open-bx" >
- <text class="num">
- <text v-if="item.bigCount > 0" style="font-size:30upx;font-weight:bold;color:#3385ff;">
- {{ item.bigCount }}{{item.bigUnit}}
- </text>
- <text v-if="item.smallCount > 0" style="font-size:30upx;">
- {{ item.smallCount }}{{item.smallUnit}}
- </text>
- </text>
- </view>
- </view>
- <text v-if="item.presell == 1" style="position:absolute;top:86upx;font-weight:bold;color:red;font-size:30upx;">预售花材下单不能退款</text>
- </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>
- <view class="module-com input-line-wrap">
- <block v-if="ghsInfo.pfLevel && ghsInfo.pfLevel == 1">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="ghsInfo.shopId == 14636">
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else-if="ghsInfo.shopId == 3">
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else-if="ghsInfo.shopId == 29136">
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else-if="ghsInfo.shopId == 86726">
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-else>
- <button class="admin-button-com middle" :class="[form.transType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(4)">同城配送</button>
- <button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(0)">德邦物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(1)">顺丰物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(2)">冷链物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;margin-right:11upx;font-size:23upx;" @click="changeTransType(3)">航空物流</button>
- <button class="admin-button-com middle" :class="[form.transType == 5 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;font-size:23upx;" @click="changeTransType(5)">到店自取</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view>
- <block v-if="ghsInfo.shopId == 21319">
- <view>
- <text style="width:100%;font-weight:bold;color:#3385FF;">所有打包费/运费,客服会一一同大家对接收取。客服微信 hzz252252</text>
- </view>
- </block>
- <block v-else>
- <view v-if="form.transType == 0 || form.transType == 1">
- <text style="color:red;width:100%;font-weight:bold;">送货上门</text>
- </view>
- <view v-if="form.transType == 2 || form.transType == 3">
- <text style="color:red;width:100%;font-weight:bold;">提货自理</text>
- </view>
- <view v-if="form.transType != 5">
- <text style="color:#3385FF;width:100%;font-weight:bold;">早班或晚班,指定发物流公司请备注。</text>
- </view>
- <view v-if="form.transType != 5">
- <text v-if="ghsInfo.shopId == 13398" style="color:red;width:100%;font-weight:bold;">本店昆明直发包邮到店,购买数量需要15扎以上,低于15扎请联系当地店长!</text>
- <text v-else-if="ghsInfo.shopId == 29136" style="color:red;width:100%;font-weight:bold;">运费、打包费请联系客服</text>
- <text v-else style="color:#3385FF;width:100%;font-weight:bold;">运费预收,根据实际产生物流费用,多退少补。有退款会原路退回。</text>
- </view>
- </block>
- </view>
- </tui-list-cell>
- </block>
- <block v-else>
- <block v-if="ghsInfo.shopId == 82200">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- </tui-list-cell>
- </block>
- <block v-else-if="ghsInfo.shopId == 87989">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- </tui-list-cell>
- </block>
- <block v-else-if="ghsInfo.shopId == 92086">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- </tui-list-cell>
- </block>
- <block v-else-if="ghsInfo.shopId == 91115">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
- </tui-list-cell>
- </block>
- <block v-else-if="ghsInfo.shopId == 36919">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)">送货上门</button>
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
- </tui-list-cell>
- </block>
- <block v-else-if="ghsInfo.shopId == 90985">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
- <button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(4)">快递</button>
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)">物流</button>
- </tui-list-cell>
- </block>
- <block v-else>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <button class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:32upx;" @click="changeSendType(0)" v-if="ghsInfo.shopId != 4608" >送货上门</button>
- <button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(1)">自取</button>
- <template v-if="ghsInfo.shopId != 14248">
- <view v-if="ghsInfo.openIntraCity==1" style="position:relative;display:inline-block;">
- <button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
- </view>
- <button v-else class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(2)">跑腿</button>
- </template>
- <button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(4)" v-if="ghsInfo.shopId != 14248">快递</button>
- <button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:115upx;height:100upx;line-height:60upx;" @click="changeSendType(3)" v-if="ghsInfo.shopId != 14248">物流</button>
- </tui-list-cell>
- </block>
- <tui-list-cell v-if="form.sendType != 2" class="line-cell" :hover="false" :arrow="false">
- <view v-if="form.sendType == 0">
- <block v-if="ghsInfo.shopId == 40312">
- <view style="color:red;width:100%;font-weight:bold;">市区如需配送请拍运费,(左下角运费服务专栏)县城寄货运费可到付</view>
- </block>
- <block v-else-if="ghsInfo.shopId == 4608">
- <view style="color:red;width:100%;font-weight:bold;">满500元,10公里内免费配送</view>
- <view style="color:red;width:100%;font-weight:bold;">满1000元,20公里内免费配送</view>
- <view style="color:#3385FF;width:100%;font-weight:bold;">请自行查询距离是否符合要求,符合要求再下单哦!</view>
- </block>
- <block v-else-if="ghsInfo.shopId == 82200">
- <view><text style="color:#3385FF;">满100元并且满15扎包邮</text></view>
- </block>
- <block v-else>
- <view><text style="color:#3385FF;">首次下单,请联系客服确认您是否在配送范围</text></view>
- <text style="color: #3385FF;width:100%;" v-if="ghsInfo.shopId && (ghsInfo.shopId == 520 || ghsInfo.shopId == 1489)">
- 在本店配送范围的,下单满200元免费送货上门
- </text>
- <text style="color: #3385FF;width:100%;" v-else>在本店配送范围的,免费送货上门</text>
- <view><text style="color: #3385FF;width:100%;" v-if="ghsInfo.shopId && ghsInfo.shopId == 14248">每天早上8:00左右(7:30截单)和下午1:00左右发车(12:30截单)截单后订单默认下一趟配送;市区最低满100元起送,远区最低满200元起送(不满默认不送);其他时间不免费配送。配送顺序根据线路安排,不支持催单哦,急单建议叫车配送,车费自行承担。</text></view>
- <view><text style="color: #09733e;width:100%;font-weight:bold;" v-if="ghsInfo.shopId && ghsInfo.shopId == 14248">理赔规则:1.鲜花是鲜活类产品,一旦送出后无质量问题,不接受任何理由的退货换货2.收到货请第一时间检查质量核对数量,有问题及时联系客服处理(12小时内反馈,超出时间不予受理)3所有花材10%为正常损耗不售后(基地玫瑰除外),超出的部分可以售后,轻微不影响使用的小问题也是不售后的4.基地玫瑰20%正常损耗,基地玫瑰会有夹支、畸形花头 断头4支以内 属于正常,如果介意可以提前询问客服</text></view>
- <view><text style="color:red;font-weight:bold">免费配送仅送货到楼下,不支持送货上楼</text></view>
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 520 || ghsInfo.shopId == 1489)"><text style="color:red;font-weight:bold">免费配送每天23:30发车,其它时间请用跑腿或自取</text></view>
- <view><text style="color:red;font-weight:bold">不在配送范围的,请勿选送货上门,否则运费自理</text></view>
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 11094 || ghsInfo.shopId == 11318)"><text style="color:red;font-weight:bold">所有彩玫瑰1扎损耗3支内不售后</text></view>
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 21486)"><text style="color:#3385FF;">收到货品后,3个小时之内可以申请售后,要求有图片!鲜花是生鲜产品,3个小时后不提供售后</text></view>
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 21486)"><text style="color:black;font-weight:bold;">寻菊花,玫瑰等单品,常年用量大且稳定的客户合作!有意向的联系客服</text></view>
- <view v-if="ghsInfo.shopId && (ghsInfo.shopId == 23281)"><text style="color:#3385FF;font-weight:bold">0:00-7:30下单当日配送,7:30-23:59下单次日配送</text></view>
- </block>
- </view>
- <view v-if="form.sendType == 1">
- <text style="color: #3385FF;width:100%;">到店自取、自己叫跑腿到店取货,选自取。</text>
- </view>
- <view v-if="form.sendType == 3">
- <text style="color: #3385FF;width:100%;">运费到付</text>
- </view>
- <view v-if="form.sendType == 4">
- <text style="color: #3385FF;width:100%;">运费到付</text>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="needAddPackCost == true">
- <view>
- <text style="color: red;width:100%;">
- 当天订单不满{{lackExpend}}元,加纸箱包装费{{ form.packCost }}元
- </text>
- </view>
- </tui-list-cell>
- <block v-if="$util.isEmpty(wlList)">
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
- <view class="tui-title">配送物流</view>
- <input type="text" placeholder="请填选物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
- </tui-list-cell>
- </block>
- <block v-else>
- <tui-list-cell class="line-cell" :arrow="true" v-if="form.sendType == 3">
- <div class="tui-title">配送物流</div>
- <picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
- <div v-if="form.wlId">{{ wlSelData.name }}</div>
- <div class="tui-placeholder" v-else>请选择</div>
- </picker>
- </tui-list-cell>
- </block>
- </block>
- <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 == true" @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 && 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="displaySendCost == true && 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>
- <text v-if="showDeliveryPolicy" class="delivery-policy-link" @click="showDeliveryPolicyModal">
- 免跑腿费条件
- </text>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true">
- <view class="tui-title">跑腿费</view>
- <view>
- <text :class="isFreeDelivery ? 'delivery-price-free' : 'delivery-price-normal'">¥{{ form.sendCost }}</text>
- <text v-if="isFreeDelivery" class="free-delivery-tag">¥0【免跑腿费】</text>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
- <view class="tui-title">包装费</view>
- <text style="color: #3385FF">¥{{ form.packCost }}</text>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <view class="tui-title">总金额</view>
- <text style="color: #3385FF">¥ {{ modifyPrice }}</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: 100upx" v-model="remark" placeholder="这里写备注"/>
- </tui-list-cell>
- </view>
- </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>
- </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>
- </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 appTimer from '@/components/app-timer'
- 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 } from "@/api/ghs";
- import { freight,createOrder } 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,
- appTimer,
- AppDatePicker,
- ModalModule
- },
- mixins: [productMins],
- data() {
- return {
- isModel: false,
- pageType: "cg",
- list:[],
- autoLoad: false,
- ghsInfo:'',
- sendTimeWant:'',
- remark:'',
- form: {
- debt:1,//结算方式 1欠款订单 0正常订单
- shopId: "",
- shopName: "",
- receiveProvince: "",
- receiveCity: "",
- receiveFloor: "",
- receiveAddress: "",
- receiveLong: "",
- receiveLat: "",
- sendType: 0,
- transType:4,
- sendSide: "2",
- sendDate: "",
- sendTimeWant: "",
- sendCost: 0,
- customId: "",
- product: "",
- hbId: '0',
- packCost:0,
- wlName:'',
- wlId:0
- },
- lackExpend:0,
- showCustomer: false,
- today:'',
- monthLater:'',
- hasHb:0,
- selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
- customData: {
- bigCount: 0,
- smallCount: 0
- },
- sendData:{},
- shopInfo:{
- lat:'',
- long:'',
- fullAddress:'',
- showAddress:'',
- address:''
- },
- wlList:[],
- wlSelData: {id:0,name:''},
- needAddPackCost:false,
- transCost:[],
- lackList:[],
- showDistance:0,
- deliveryQuotes: [], // 跑腿平台报价列表
- selectedDeliveryIndex: -1, // 选中的报价索引
- selectedDeliveryData: null, // 选中的报价数据
- deliveryPolicyList: [], // 包配送政策列表
- validAddress:false
- };
- },
- 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()
- }
- if(this.form.sendType == 2){
- //计算运费
- //this.calcFreight()
- if(this.displaySendCost == true){
- //各跑腿平台报价
- this.getDeliveryQuotes()
- }
- }
- //修改地址更新
- this.getCurrentShop()
- },
- computed: {
- ...mapGetters(["getMerchantInfo", "getLoginInfo","getDictionariesInfo"]),
- displayAddress(){
- if(this.form.sendType != 1){
- return true
- }
- if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
- return true
- }
- return false
- },
- /**
- * 显示跑腿费
- * @returns {boolean}
- */
- displaySendCost(){
- if(this.form.sendType == 2){
- if([0, 2].includes(this.ghsInfo.openIntraCity)){
- return false
- }else{
- return true
- }
- }
- // 这个要先去掉,后面再考虑
- // if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
- // return true
- // }
- return false
- },
- /**
- * 判断是否免跑腿费
- * @returns {boolean}
- */
- isFreeDelivery(){
- // 不显示跑腿费时,不需要判断
- if(this.displaySendCost == false){
- return false
- }
- //地址有问题时,不展示免费跑腿情况
- if(this.validAddress == false){
- return false
- }
- // 条件1: 比较距离与免费公里数
- // showDistance单位是米,hcFreeKm单位是千米
- const distanceInMeters = Number(this.showDistance) || 0
- const freeKmInMeters = (Number(this.ghsInfo.hcFreeKm) || 0) * 1000
-
- // 如果距离小于免费公里数,则免运费
- if(distanceInMeters < freeKmInMeters){
- return true
- }
-
- // 条件2: 如果距离大于免费公里数,判断hcMap
- if(distanceInMeters > freeKmInMeters){
- if(this.ghsInfo.hcMap && typeof this.ghsInfo.hcMap == 'string'){
- this.ghsInfo.hcMap = JSON.parse(this.ghsInfo.hcMap)
- }
- // 判断hcMap是否为空
- if(this.ghsInfo.hcMap && Array.isArray(this.ghsInfo.hcMap) && this.ghsInfo.hcMap.length > 0){
- // 获取花材数量和总价
- const flowerCount = this.allCountFun.bigLength || 0
- const flowerPrice = this.allPriceFun || 0
-
- // 遍历hcMap,检查是否满足免运费条件
- for(const rule of this.ghsInfo.hcMap){
- const ruleNum = Number(rule.num) || 0
- const rulePrice = Number(rule.price) || 0
- const ruleDistance = (Number(rule.distance) || 0) * 1000 // 转换为米
-
- // 如果花材数量大于num,花材总价大于price,距离小于distance,则免运费
- if(flowerCount >= ruleNum && flowerPrice >= rulePrice && distanceInMeters <= ruleDistance){
- console.log('满足免运费条件:',flowerCount,ruleNum,flowerPrice,rulePrice,distanceInMeters,ruleDistance)
- return true
- }
- }
- }else{
- if(this.ghsInfo.hcMap && Array.isArray(this.ghsInfo.hcMap) && this.ghsInfo.hcMap.length == 0){
- console.log('hcMap数据为空')
- return false
- }
-
- console.log('this.ghsInfo.hcMap: ',this.ghsInfo.hcMap)
- console.log('hcMap数据格式出问题了')
- }
- }
-
- return false
- },
- /**
- * 是否显示包配送政策
- */
- showDeliveryPolicy() {
- if (!this.ghsInfo) return false
-
- // 检查 hcFreeKm
- const hasFreeKm = this.ghsInfo.hcFreeKm ?Number(this.ghsInfo.hcFreeKm):0
-
- // 检查 hcMap
- let hasPolicy = false
- let mapData = this.ghsInfo.hcMap
- if(mapData && typeof mapData == 'string'){
- try {
- mapData = JSON.parse(mapData)
- } catch(e) {
- // 解析失败忽略
- }
- }
- if(mapData && Array.isArray(mapData) && mapData.length > 0){
- hasPolicy = true
- }
- if(hasFreeKm>0){
- hasPolicy = true
- }
- return hasPolicy
- },
- /**
- * 计算总金额
- * @returns {number}
- */
- modifyPrice(){
- let allPrice = this.allPrice.toFixed(2)
- allPrice = Number(allPrice)
- let price = allPrice
- // 判断是否需要加跑腿费
- if(this.displaySendCost == true){
- // 如果不是免跑腿费,则加上跑腿费
- if(!this.isFreeDelivery){
- price = price + this.form.sendCost
- }
- }
- this.needAddPackCost = false
- if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
- //不是同城配送的,不是到店自取的,并且不是第一次下单,才算打包费
- if(this.form.transType != 4 && this.form.transType != 5 && this.ghsInfo.needAddPackFreight == 1){
- //昆明发全国
- this.needAddPackCost = true
- price = price + this.form.packCost
- }
- }else{
- //同城配送
- if(this.form.sendType == 4){
- //设置了订单金额低200需要付包装费,当前只付一次
- if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
- price = price + this.form.packCost
- this.needAddPackCost = true
- }
- }
- }
- price = Number(price)
- price = price.toFixed(2)
- price = parseFloat(price)
- return price
- }
- },
- methods: {
- ...mapActions(["initMerchantInfo"]),
- changeWlFn(e) {
- this.wlSelData = this.wlList[e.detail.value];
- this.form.wlId = this.wlSelData.id
- this.form.wlName = this.wlSelData.name
- },
- // 展示包配送政策弹窗
- showDeliveryPolicyModal() {
- this.deliveryPolicyList = []
-
- // 1. hcFreeKm 规则
- if (this.ghsInfo.hcFreeKm && Number(this.ghsInfo.hcFreeKm) > 0) {
- this.deliveryPolicyList.push(`${Number(this.ghsInfo.hcFreeKm)}公里内免费配送`)
- }
-
- // 2. hcMap 规则
- let mapData = this.ghsInfo.hcMap
- if(mapData && typeof mapData == 'string'){
- try {
- mapData = JSON.parse(mapData)
- } catch(e) {
- mapData = []
- }
- }
- if(mapData && Array.isArray(mapData) && mapData.length > 0){
- mapData.forEach(rule => {
- const num = Number(rule.num) || 0
- const price = Number(rule.price) || 0
- const distance = Number(rule.distance) || 0
-
- this.deliveryPolicyList.push(`满${num}扎${price}元,${distance}公里内免费配送`)
- })
- }
-
- if (this.deliveryPolicyList.length === 0) {
- uni.showToast({
- title: '暂无详细配送政策',
- icon: 'none'
- })
- return
- }
-
- this.$refs.deliveryPolicyPopup.open()
- },
- closeDeliveryPolicy() {
- this.$refs.deliveryPolicyPopup.close()
- },
- closeRemind(){
- this.$refs.selectFlowerNumRef.close()
- this.lackList = []
- },
- changeTransType(num){
- let that = this
- this.form.transType = num
- this.form.sendCost = 0
- //第二次下单不算打包费和运费
- if(this.ghsInfo.needAddPackFreight == 0){
- this.form.sendCost = 0
- }else{
- if(this.transCost && !this.$util.isEmpty(this.transCost)){
- let weight = this.allCountFun.weight ? Number(this.allCountFun.weight) : 0
- let totalNum = this.allCountFun.bigLength ? Number(this.allCountFun.bigLength) : 0
- for (const ele of this.transCost) {
- if(ele.sign == num){
- if(num == 2){
- //冷链物流
- let llOption = ele.option ? ele.option : ''
- if(!this.$util.isEmpty(llOption)){
- let long = llOption.length
- let bigInfo = llOption[long-1]
- let bigNum = bigInfo.num
- let bigAmount = bigInfo.amount
- let bs = parseInt(totalNum/bigNum)
- if(bs > 0){
- this.form.sendCost = this.form.sendCost + (bs*bigAmount)
- this.form.sendCost = parseFloat(this.form.sendCost.toFixed(2))
- totalNum = totalNum - (bs*bigNum)
- totalNum = parseFloat(totalNum.toFixed(2))
- }
- for (const ele of llOption){
- if(Number(ele.num) >= Number(totalNum)){
- this.form.sendCost = Number(this.form.sendCost)+Number(ele.amount)
- break
- }
- }
- }
- }else{
- //其它物流
- let perKiloCost = ele.perKiloCost?Number(ele.perKiloCost):0
- let sendCost = weight*perKiloCost
- sendCost = parseFloat(sendCost.toFixed(2))
- this.form.sendCost = sendCost
- }
- break
- }
- }
- }
- }
- },
- changeSendType(num){
- this.form.sendType = num
- if(num == 2){
- //计算运费
- //this.calcFreight() //废弃
- if(this.displaySendCost && this.ghsInfo.openIntraCity == 1){
- if(!this.$util.isEmpty(this.shopInfo.lat) && !this.$util.isEmpty(this.shopInfo.long) && !this.$util.isEmpty(this.shopInfo.address)){
- this.getDeliveryQuotes()//各跑腿平台报价
- }
- }
- } else {
- // 切换到其他配送方式时清空报价数据
- this.deliveryQuotes = []
- this.selectedDeliveryIndex = -1
- this.selectedDeliveryData = null
- this.form.sendCost = 0
- }
- },
- // 获取跑腿平台报价
- 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()
- // this.getCurrentShop() //重复执行了,注释掉
- getWlList({id:this.option.id}).then(res=>{
- if(res.code == 1){
- that.wlList = res.data.list ? res.data.list : []
- }
- })
- },
- getCurrentShop(){
- 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
- }
- }
- })
- },
- calcFreight() {
- let weight = 0
- if(!this.$util.isEmpty(this.selectList)){
- this.selectList.forEach((item,idx,arr) => {
- if(Number(item.bigCount)>0){
- let add = Number(item.weight)*Number(item.bigCount)
- weight = Number(weight) + Number(add)
- }else{
- let unitWeight = item.weight/item.ratio
- let add = Number(unitWeight)*Number(item.smallCount)
- weight = Number(weight) + Number(add)
- }
- })
- }
- weight = Number(weight).toFixed(2)
- let params = {
- ghsId: this.options.id,
- weight:weight
- };
- freight(params).then(res => {
- if(res.code == 1){
- this.form.sendCost = res.data.fee?parseFloat(res.data.fee):0
- this.showDistance = res.data.showDistance?parseFloat(res.data.showDistance):0
- }
- });
- },
- 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 : ''
- //杭州斗南鲜花批发部不需要显示免费配送
- if(that.ghsInfo.shopId && Number(that.ghsInfo.shopId) == 4608){
- that.form.sendType = 1
- }
- //万花田济南仓默认自取
- if(that.ghsInfo.shopId && Number(that.ghsInfo.shopId) == 90985){
- that.form.sendType = 1
- }
- if(that.ghsInfo.shopId && Number(that.ghsInfo.shopId) == 36919){
- that.form.sendType = 1
- }
- if(res.data && res.data.shopId == 14636){
- //花瀚鲜花供应链默认冷链
- this.changeTransType(2)
- }else if(res.data && res.data.shopId == 3){
- //石头花艺
- this.changeTransType(2)
- }else if(res.data && res.data.shopId == 29136){
- this.changeTransType(0)
- }else{
- this.changeTransType(4)
- }
- });
- },
- 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);
- 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){
- if(this.form.sendType == 3){
- if (this.$util.isEmpty(this.form.wlName)){
- this.$msg('请填选物流')
- 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:'确认提交?'},() => {
- uni.showLoading({title: '加载中',mask:true})
- createOrder(params).then(res => {
- if(res.code == 1){
- uni.hideLoading()
- if(res.data.hasLackError && res.data.hasLackError == 1){
- this.lackList = res.data.lackList ? res.data.lackList : []
- this.$refs.selectFlowerNumRef.open('center')
- return true
- }
- const {orderSn,realPrice,id} = res.data
- self.pageTo({url: '/pagesPurchase/wechatPay',query:{orderSn,realPrice,id}, type: 2})
- setTimeout(() => {
- self.removeMemory(self.ghsInfo.id)
- }, 600)
- }
- })
- })
- },
- 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;
- background-color: #f0f2f6;
- .commodity-view {
- display: flex;
- flex-direction: column;
- .commodity-list {
- padding: 20upx;
- .commodity-item {
- display: flex;
- margin-bottom: 20upx;
- .item-icon {
- flex-shrink: 0;
- width: 140upx;
- height: 140upx;
- }
- .item-info {
- position: relative;
- display: flex;
- flex-direction: column;
- justify-content: center;
- flex: 1;
- margin-left: 20upx;
- .info-line {
- margin-bottom: 20upx;
- display: flex;
- justify-content: space-between;
- align-items: flex-end;
- .item-name {
- color: #333333;
- font-size: 32upx;
- font-weight:bold;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- width:400upx;
- }
- .item-price {
- color: #333;
- font-size: 22upx;
- .price {
- font-size: 32upx;
- font-weight: bold;
- }
- }
- .item-type {
- color: #999;
- font-size: 24upx;
- }
- .item-count {
- color: #666;
- font-size: 24upx;
- }
- }
- .open-bx {
- align-items: center;
- & .iconfont {
- color: #3385ff;
- font-size: 42upx;
- }
- .position{
- display: block;
- width: 70upx;
- text-align: center;
- }
- .iconcachu {
- margin: 0 6upx 0 20upx;
- color: #ccc;
- &.edit {
- color: #3385ff;
- }
- }
- & > .num {
- display: inline-block;
- width: 120upx;
- height:45upx;
- text-align:right;
- margin: 0 8upx;
- color: #868686;
- padding: 3upx 0;
- font-size: 25upx;
- }
- .change-input {
- width: 164upx;
- height: 60upx;
- line-height: 60upx;
- text-align: center;
- background: #ffffff;
- border: 1upx solid #dddddd;
- border-radius: 4upx;
- font-size: 25upx;
- }
- .btn-box{
- width: 100upx;
- height: 60upx;
- line-height: 60upx;
- color: #ffffff;
- background: #3385ff;
- text-align: center;
- border-radius: 10upx;
- }
- }
- }
- }
- }
- .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;
- }
- }
- }
- .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: 5upx;
- }
- .delivery-policy-link {
- color: rgb(201, 52, 52);
- font-size: 30upx;
- margin-left: 30upx;
- 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;
- }
- </style>
|