| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169 |
- <template>
- <view class="app-content">
- <view class="affirm-page">
- <view class="affirm-view overscroll">
- <form>
- <view class="module-com">
- <view class="commodity-view">
- <view class="commodity-list">
- <template v-if="!$util.isEmpty(selectList)">
- <view class="commodity-item" v-for="(item, index) in selectList" :key="index">
- <!-- #ifdef APP-PLUS -->
- <image class="item-icon" :src="item.cover" />
- <!-- #endif -->
- <!-- #ifdef MP-WEIXIN -->
- <image class="item-icon" :src="item.cover" />
- <!-- #endif -->
- <view class="item-info">
- <view class="info-line">
- <text class="item-name">
- {{ item.name||'' }}
- <text v-if="item.variety && item.variety ==1" class="show-color"></text>
- </text>
- <text class="item-price">
- <text class="unit">¥</text>
- <text class="price">{{ parseFloat(item.userPrice)||0 }}</text>
- </text>
- </view>
- <view style="text-align:right;position: relative;">
- <text style="position: absolute;right:300upx;top:2upx;font-size:28upx;color:green;font-weight:bold;" v-if="item.bigCount > 0">¥{{ parseFloat((Number(item.bigCount)*Number(item.userPrice)).toFixed(2)) }}</text>
- <text style="position: absolute;right:300upx;top:2upx;font-size:28upx;color:green;font-weight:bold;" v-else>¥{{ parseFloat((Number(item.smallCount)*Number(item.userPrice)).toFixed(2)) }}</text>
- <view class="open-bx" >
- <i class="iconfont iconjian" @click="reduceItemFn(item)" v-if="item.bigCount > 0 || item.smallCount > 0"></i>
- <text class="num" @click="showAddModelFn(item)">
- <text v-if="item.bigCount > 0" style="font-size:24upx;font-weight:bold;color:#3385ff;">{{ item.bigCount }}</text>
- <text v-if="item.smallCount > 0" style="font-size:24upx;">{{ item.smallCount }}</text>
- </text>
- <i class="iconfont iconzeng" @click="addItemFn(item)"></i>
- </view>
- </view>
- </view>
- </view>
- </template>
- </view>
- <view class="summary-bar">
- <view class="operate-view" v-if="isScanEnv" @click="removeFromSave(option.customId)"> <text class="iconfont iconshanchu1"></text>清除花材 </view>
- <view class="operate-view" v-else @click="gobackEvent" style="font-size:32upx;font-weight:bold;"><text class="iconfont icongouwuche" style="margin-right:5upx;"></text>返回修改</view>
- <view class="describe-view">
- <text>合计 ¥{{ allPrice }}</text>
- </view>
- </view>
- <view class="summary-bar">
- <view class="operate-view" v-if="isScanEnv"><text class="iconfont iconzeng"></text>手动添加花材</view>
- <view class="operate-view" v-if="isScanEnv == false"><text> </text></view>
- <view class="describe-view">
- <text>{{ selectList.length }}种</text>
- <text v-if="Number(allCount.bigLength)>0">,{{allCount.bigLength?parseFloat(allCount.bigLength):0}}扎</text>
- <text v-if="Number(allCount.smallLength)>0">,{{allCount.smallLength?parseFloat(allCount.smallLength):0}}支</text>
- <text v-if="Number(allCount.weight)>0">,{{allCount.weight?parseFloat(allCount.weight):0}}公斤</text>
- </view>
- </view>
- </view>
- </view>
- <modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
- <template slot="customContent">
- <view class="select-cmd_bx" v-if="customData">
- <view class="kc">
- <text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text>
- <text class="unit_price" v-if="customData.property==1 || (customData.property==0 && customData.priceType==1)"> ¥{{ parseFloat(customData.price) }}</text>
- <text class="unit_price" v-else>--</text>
- </view>
- <view class="num_bx">
- <input style="width: 430upx" v-model="customData.userPrice" @focus="customData.userPrice = null" type="number" placeholder="单价" :disabled="false" />
- <text style="font-size:35upx;font-weight:bold;color:#666666;">元</text>
- </view>
- <view class="num_bx">
- <!-- #ifdef APP-PLUS -->
- <input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
- <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">扎</text>
- <input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="number" />
- <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">支</text>
- <!-- #endif -->
- <!-- #ifdef MP-WEIXIN -->
- <input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" :focus="isAddInputFocus" type="number" />
- <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">扎</text>
- <input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
- <text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">支</text>
- <!-- #endif -->
- <!-- 只有花材 property == 1 才给显示切换功能 -->
- <image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" v-if="customData.property == 1"
- style="width:86upx;height:86upx;position:relative;top:-60upx;right:0upx;" mode="widthFix"></image>
- </view>
- </view>
- </template>
- </modal-module>
- <view class="module-com input-line-wrap">
- <view>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">客户</view>
- <view class="tui-input">
- {{ form.customName||'请选择' }}
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="Number(customInfo.balance)>0">
- <view class="tui-title">余额</view>
- <view class="tui-input" style="color:#3385FF;font-weight:bold;">
- ¥{{ parseFloat(customInfo.balance) }}
- <text v-if="Number(customInfo.balance)>Number(modifyPrice)" style="margin-left:30upx;">余额充足,已用余额支付</text>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">收款方式</view>
- <button style="margin-right:10upx;height:70upx;line-height:46upx;" @click="form.hasPay = 0" class="admin-button-com mini-btn" :class="form.hasPay == 0 ? 'blue' : 'default'">扫码</button>
- <button style="margin-right:10upx;height:70upx;line-height:46upx;" @click="form.hasPay = 4" class="admin-button-com mini-btn" :class="form.hasPay == 4 ? 'blue' : 'default'">余额</button>
- <button style="margin-right:10upx;height:70upx;line-height:46upx;" @tap="form.hasPay = 1" class="admin-button-com mini-btn" :class="form.hasPay == 1 ? 'blue' : 'default'">线下</button>
- <button style="margin-right:0upx;height:70upx;line-height:46upx;" @click="form.hasPay = 2" class="admin-button-com mini-btn" :class="form.hasPay == 2 ? 'blue' : 'default'">挂账</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :arrow="false" v-if="form.hasPay == 0">
- <view class="tui-title">扫码</view>
- <view class="tui-input" style="color:#3385ff;">扫码付款、分享小程序付款 选扫码</view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :arrow="false" v-if="form.hasPay == 2">
- <view class="tui-title">挂账</view>
- <view class="tui-input" style="color:#3385ff;">客户要赊账欠款的 选挂账</view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :arrow="false" v-if="form.hasPay == 4">
- <view class="tui-title">余额</view>
- <view class="tui-input" style="color:#3385ff;">使用余额支付</view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="form.hasPay == 1">
- <view class="tui-title">线下渠道</view>
- <picker mode="selector" :value="payWayindex" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input">
- <view class="uni-input" v-if="form.payWay == 0">线下微信(收款码)</view>
- <view class="uni-input" v-else-if="form.payWay == 1">线下支付宝(收款码)</view>
- <view class="uni-input" v-else-if="form.payWay == 4">现金</view>
- <view class="uni-input" v-else-if="form.payWay == 5">银行卡</view>
- <view class="uni-input" v-else style="color:#CCCCCC;">请选择</view>
- </picker>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">配送方式</view>
- <button style="margin-right:10upx;height:70upx;line-height:46upx;" @tap="setSendType(1)" class="admin-button-com mini-btn" :class="form.sendType == 1 ? 'blue' : 'default'">自取</button>
- <button style="margin-right:10upx;height:70upx;line-height:46upx;" @tap="setSendType(0)" class="admin-button-com mini-btn" :class="form.sendType == 0 ? 'blue' : 'default'">自配送</button>
- <button style="margin-right:10upx;height:70upx;line-height:46upx;" @click="setSendType(2)" class="admin-button-com mini-btn" :class="form.sendType == 2 ? 'blue' : 'default'">跑腿</button>
- <button style="margin-right:0upx;height:70upx;line-height:46upx;" @click="setSendType(3)" class="admin-button-com mini-btn" :class="form.sendType == 3 ? 'blue' : 'default'">物流</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="form.sendType == 1">
- <view class="tui-title">取货状态</view>
- <button @tap="form.getGoods = 1" class="admin-button-com middle" style="width:140upx;" :class="form.getGoods == 1? 'blue' : 'default'">已取货</button>
- <button @click="form.getGoods = 0" class="admin-button-com middle" style="width:140upx;" :class="form.getGoods == 0 ? 'blue' : 'default'">未取货</button>
- </tui-list-cell>
- <view v-if="form.sendType == 2">
- <view v-if="openIntraCity == 1" class="delivery-section">
- <!-- 客户地址信息 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click.stop="updateCustomAddress()">
- <view class="tui-title" style="width:120upx;">客户地址</view>
- <view class="address-box">
- <view v-if="$util.isEmpty(customInfo.long) || $util.isEmpty(customInfo.lat) || $util.isEmpty(customInfo.address)" class="addr-main" style="color:red;font-size:29upx;font-weight:bold;">
- 地址不完整,请修改
- </view>
- <view v-else>
- <view class="addr-main">{{ customInfo.address }}</view>
- <view class="addr-sub">{{ customInfo.showAddress }}</view>
- </view>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false">
- <view v-if="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 class="empty-quotes-view">
- <text v-if="$util.isEmpty(customInfo.long) || $util.isEmpty(customInfo.lat) || $util.isEmpty(customInfo.address)" style="color:red;" @click.stop="updateCustomAddress()">请先修改客户地址</text>
- <text v-else>正在获取运费...</text>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false">
- <view class="tui-title">距离</view>
- <view class="distance-box">
- <text v-if="showDistance > 100" class="blue-text">{{ (showDistance/1000).toFixed(1) }}公里</text>
- <text v-else class="blue-text">{{ showDistance }} 米</text>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title title-reduction" style="width: 150upx;">满减规则</view>
- <button @tap="changeReductionRule(0)" class="admin-button-com mini-btn btn-reduction" :class="form.reductionRule == 0 ? 'active' : 'default'">没有</button>
- <button @tap="changeReductionRule(1)" class="admin-button-com mini-btn btn-reduction" :class="form.reductionRule == 1 ? 'active' : 'default'">花材满减</button>
- <button @tap="changeReductionRule(2)" class="admin-button-com mini-btn btn-reduction-last" :class="form.reductionRule == 2 ? 'active' : 'default'">花束满减</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">运费</view>
- <view v-if="form.reductionRule == 1 && isHcMapRule()">
- <input type="digit" placeholder="请填写运费" v-model="form.customSendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:300upx;height:70upx;text-align:center;" />
- </view>
- <view v-else-if="form.reductionRule == 2">
- <view v-if="isHsMapRule()">
- <input type="digit" placeholder="请填写运费" v-model="form.customSendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:300upx;height:70upx;text-align:center;" />
- </view>
- <view v-else>
- <input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:300upx;height:70upx;text-align:center;" />
- </view>
- </view>
- <view v-else>
- <input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder" style="border:1upx solid #eee;color:#3385FF;width:300upx;height:70upx;text-align:center;" />
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">呼叫跑腿</view>
- <button @tap="form.callErrand = 0" class="admin-button-com middle btn-call" :class="form.callErrand == 0? 'active' : 'default'">先不要叫</button>
- <button @tap="form.callErrand = 1" class="admin-button-com middle btn-call" :class="form.callErrand == 1 ? 'active' : 'default'">现在就叫</button>
- </tui-list-cell>
- <tui-list-cell v-if="form.callErrand == 1" class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">取件时间</view>
- <view class="time-action-view" @click.stop="openTimePicker">
- <text>{{ pickupTime.label || '立即取件' }}</text>
- <text class="iconfont iconxiangyou icon-arrow-right"></text>
- </view>
- </tui-list-cell>
- <tui-list-cell v-if="form.callErrand == 1" class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">重量</view>
- <view>
- <WeightInput v-model="form.weight" />
- </view>
- </tui-list-cell>
- <tui-list-cell v-if="form.callErrand == 1" class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">跑腿备注</view>
- <RemarkInput v-model="form.deliveryRemark" />
- </tui-list-cell>
- </view>
- <view v-else class="delivery-section">
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">运费</view>
- <input type="digit" placeholder="请填写运费" v-model="form.sendCost" />
- </tui-list-cell>
- </view>
- </view>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">打印小票</view>
- <button @tap="form.needPrint = 2" class="admin-button-com middle" style="width:140upx;" :class="form.needPrint == 2? 'blue' : 'default'">不打印</button>
- <button @click="form.needPrint = 1" class="admin-button-com middle" style="width:140upx;" :class="form.needPrint == 1 ? 'blue' : 'default'">打印</button>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="hasAvailableHb">
- <view class="tui-title">红包</view>
- <hb-select
- :hbData="hbData"
- :totalPrice="preDiscountPrice"
- v-model="selectedHbId"
- @change="(hb) => { selectedHb = hb }"
- ></hb-select>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <view class="tui-title">
- <text>合计金额</text>
- </view>
- <text style="color: #3385FF;width:170upx;">¥{{parseFloat(systemPrice)}}</text>
- <button @tap="showDiscount()" class="admin-button-com middle default" style="width:140upx;">打折</button>
- <text v-if="discountValue>0 && discountValue<1">{{ (Number(discountValue)*10).toFixed(1) }}折</text>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" >
- <view v-if="form.hasPay == 2" class="tui-title">应收金额</view>
- <view v-else-if="form.hasPay == 3" class="tui-title">余额扣减</view>
- <view v-else class="tui-title">{{form.forward==0?'实收':'实付'}}金额</view>
- <input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;" type="digit" @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
- <text v-if="modifyPrice > 0 && modifyPrice > systemPrice" style="font-size:25upx;margin-left:20upx;color:red;">人工包装费 ¥{{parseFloat((modifyPrice-systemPrice).toFixed(2))}}</text>
- <text v-if="modifyPrice > 0 && modifyPrice < systemPrice" style="font-size:25upx;margin-left:20upx;color:green;">优惠 ¥{{parseFloat((systemPrice-modifyPrice).toFixed(2))}}</text>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="true">
- <view class="tui-title" v-if="form.sendType == 1">取花日期</view>
- <view class="tui-title" v-else>配送日期</view>
- <view class="uni-input" v-if="form.reachDate==''" @click="bindReachDateChange">
- <view style="width:410upx;font-size:32upx;color:#CCCCCC;">默认当天</view>
- </view>
- <view class="uni-input" @click="bindReachDateChange">
- <view style="width:410upx;font-size:32upx;">{{form.reachDate}}</view>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="true">
- <view class="tui-title" v-if="form.sendType == 1">取花时间</view>
- <view class="tui-title" v-else>配送时间</view>
- <view class="uni-input" style="width:450upx;font-size:32upx;" @click="openTimePopup">{{form.reachPeriod}}</view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :arrow="true">
- <div class="tui-title">开单人</div>
- <picker mode="selector" :value="form.getStaffId" :range="staffList" range-key="name" @change="kdChange" class="tui-input" >
- <input v-model="form.getStaffId" name="getStaffId" type="text" hidden />
- <div style="padding:6upx 0 6upx 0;" v-if="form.getStaffName!=''">{{form.getStaffName}}</div>
- <div v-else style="padding:6upx 0 6upx 0;color:#CCCCCC;">默认本人</div>
- </picker>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="true">
- <view class="tui-title">账单日期</view>
- <view class="uni-input" v-if="form.historyDate==''" @click="bindHistoryDateChange">
- <view style="width:410upx;font-size:32upx;color:#CCCCCC;">默认当天</view>
- </view>
- <view class="uni-input" @click="bindHistoryDateChange">
- <view style="width:410upx;font-size:32upx;">{{form.historyDate}}</view>
- </view>
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
- <view class="tui-title">备注</view>
- <textarea style="height:80upx;z-index:0" v-model="form.remark" placeholder-class="remark-class" placeholder="选填" />
- </tui-list-cell>
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="reduceStock == 0">
- <view class="tui-title">通知制作</view>
- <button @tap="form.needWork = 0;" class="admin-button-com middle" style="width:170upx;" :class="form.needWork == 0? 'blue' : 'default'">不要</button>
- <button @click="form.needWork = 1;" class="admin-button-com middle" style="width:170upx;" :class="form.needWork == 1 ? 'blue' : 'default'">需要</button>
- </tui-list-cell>
- <!-- 如果是扣除库存方式开单,不显示售后付款选项 -->
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="reduceStock == 0">
- <view class="tui-title">订单类型</view>
- <button @tap="form.forward = 0;" class="admin-button-com middle" style="width:170upx;" :class="form.forward == 0? 'blue' : 'default'">收入订单</button>
- <button @click="form.forward = 1;" class="admin-button-com middle" style="width:170upx;" :class="form.forward == 1 ? 'blue' : 'default'">红冲订单</button>
- </tui-list-cell>
- </view>
- </view>
- </form>
- </view>
- <view class="under-bar">
- <view class="price-view">
- <text class="price-title">
- <text></text>
- </text>
- <text class="price-number"><text class="large">{{form.forward==0?'':'-'}}¥{{ modifyPrice }}</text></text>
- </view>
- <!-- <text style="font-size:30upx;right:100upx;">当前在<text style="font-weight:bold;color:red;margin-left:5upx;font-size:32upx;">{{currentShop.shopName}}</text></text> -->
- <button class="admin-button-com blue big" @click="confirmSubmit">提交</button>
- </view>
- <view v-if="isScanEnv" @click="changeGet" style="width:125upx;height:125upx;display:flex;justify-content:center;align-items:center;font-size:60upx;
- background:#3385ff;color:white;z-index:9999;position:fixed;bottom:230upx;right:40upx;border-radius:60upx;">{{calc=='add'?'+':'-'}}</view>
- <uni-popup ref="diffPriceRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
- <view style="display:flex;padding:40upx 20upx 20upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
- <block v-if="!$util.isEmpty(diffPriceList)">
- <view v-for="(item, index) in diffPriceList" :key="index"
- style="font-size:32upx;color:red;font-weight:bold;margin-top:10upx;">
- <text>{{item.name}}</text>
- <text style="margin-left:25upx;">系统售价 ¥{{item.price?parseFloat(item.price):0}}</text>
- <text style="margin-left:25upx;">您开价 ¥{{item.kdPrice?parseFloat(item.kdPrice):0}}</text>
- </view>
- </block>
- <view style="margin-top:20upx;font-size:28upx;font-weight:bold;">
- <view>以上花材,开单价和系统售价不一样,确认提交吗?</view>
- </view>
- <view style="text-align:center;margin-top:30upx;width:100%;">
- <button class="admin-button-com big default" @click="returnCheck()">返回修改</button>
- <button style="margin-left:20upx;" @click="forceCommit()" class="admin-button-com big blue">确认提交</button>
- </view>
- </view>
- </uni-popup>
- <!-- 配送时间选择弹框 -->
- <uni-popup ref="timePopup" type="bottom" background-color="#fff">
- <view class="time-picker-popup">
- <view class="popup-header">
- <text class="popup-title">选择配送时间</text>
- <text class="popup-close" @click="closeTimePopup">×</text>
- </view>
-
- <view class="time-sections">
- <!-- 小时选择 -->
- <view class="time-section">
- <view class="section-title">小时</view>
- <view class="hours-wrapper">
- <scroll-view
- scroll-y="true"
- class="hours-scroll"
- enhanced="true"
- show-scrollbar="true"
- >
- <view class="hours-buttons">
- <button
- v-for="(hour, index) in timeOptions[0]"
- :key="index"
- class="time-button"
- :class="{ active: selectedHour == hour }"
- @click="selectedHour = hour"
- >{{ hour }}</button>
- </view>
- </scroll-view>
- </view>
- </view>
-
- <!-- 分钟选择 -->
- <view class="time-section">
- <view class="section-title">分钟</view>
- <view class="minutes-wrapper">
- <scroll-view
- scroll-y="true"
- class="minutes-scroll"
- enhanced="true"
- show-scrollbar="true"
- >
- <view class="minutes-buttons">
- <button
- v-for="(minute, index) in timeOptions[1]"
- :key="index"
- class="time-button"
- :class="{ active: selectedMinute == minute }"
- @click="selectedMinute = minute"
- >{{ minute }}</button>
- </view>
- </scroll-view>
- </view>
- </view>
- </view>
-
- <!-- 操作按钮 -->
- <view class="popup-footer">
- <button class="footer-button default" @click="closeTimePopup">取消</button>
- <button class="footer-button blue" @click="confirmTime">确认</button>
- </view>
- </view>
- </uni-popup>
- <uni-popup ref="discountRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
- <view class="discount-popup-container">
- <!-- 标题 -->
- <view class="discount-popup-title">选择打折</view>
-
- <!-- 快捷折扣按钮 -->
- <view class="discount-quick-buttons">
- <button
- v-for="(item, index) in discountList"
- :key="index"
- @click="setDiscount(item.value)"
- :class="['discount-quick-btn', { active: discountValue === item.value }]"
- >
- {{ item.name }}
- </button>
- </view>
-
- <!-- 分割线 -->
- <view class="discount-divider"></view>
-
- <!-- 自定义输入 -->
- <view class="discount-custom-section">
- <view class="discount-custom-label">自定义折扣</view>
- <view class="discount-custom-input-group">
- <input v-model="customDiscount" type="digit" placeholder="85折请填0.85" class="discount-custom-input" />
- <button class="admin-button-com middle blue" @click="setCustomDiscount">确认</button>
- </view>
- </view>
-
- <!-- 操作按钮 -->
- <view class="discount-action-buttons">
- <button class="admin-button-com middle default" @click="cancelDiscount" > 取消 </button>
- </view>
- </view>
- </uni-popup>
- <uni-popup ref="remindForwardRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
- <view class="forward-popup-content">
- <view class="popup-title">
- 确认售后付款单
- </view>
-
- <view class="option-group">
- <view class="option-label">退货方式</view>
- <view class="button-group">
- <button @click="form.forwardStock = 1" class="admin-button-com big" :class="form.forwardStock == 1 ? 'blue' : 'default'">货不退回</button>
- <button @tap="form.forwardStock = 0" class="admin-button-com big" :class="form.forwardStock == 0? 'blue' : 'default'">货退回来</button>
- </view>
- </view>
-
- <view class="option-group">
- <view class="option-label">线下付款方式</view>
- <view class="button-group">
- <button @tap="forwardPayWay = 0" class="admin-button-com middle" :class="forwardPayWay == 0? 'blue' : 'default'">微信</button>
- <button @click="forwardPayWay = 1" class="admin-button-com middle" :class="forwardPayWay == 1 ? 'blue' : 'default'">支付宝</button>
- <button @tap="forwardPayWay = 4" class="admin-button-com middle" :class="forwardPayWay == 4? 'blue' : 'default'">现金</button>
- <button @click="forwardPayWay = 5" class="admin-button-com middle" :class="forwardPayWay == 5 ? 'blue' : 'default'">银行卡</button>
- </view>
- <view class="payment-notice">
- 请线下转账给客户
- </view>
- </view>
-
- <view class="popup-footer">
- <button class="admin-button-com big default" @click="cancelForward()">取消</button>
- <button class="admin-button-com big blue" @click="confirmForward()">确认</button>
- </view>
- </view>
- </uni-popup>
- <!-- 账单日期选择器蒙板 -->
- <view v-if="showPicker" class="date-picker-mask" @click="showPicker = false"></view>
-
- <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="showPicker = false" />
- <!-- 配送日期选择器蒙板 -->
- <view v-if="reachDatePickerShow" class="date-picker-mask" @click="reachDatePickerShow = false"></view>
- <mx-date-picker :show="reachDatePickerShow" format="yyyy-mm-dd" type="date" :value="reachDatePickerValue" :show-tips="true" @confirm="confirmReachDatePicker" @cancel="reachDatePickerShow = false" />
- <!-- 取件时间选择器 -->
- <TimePicker ref="timePicker" :bottomOffset="80" @confirm="handleTimeConfirm" />
- </view>
- </view>
- </template>
- <script>
- import TuiListCell from "@/components/plugin/list-cell";
- import productMins from "@/mixins/product";
- import { createOrder } from "@/api/order/index";
- import { getAllStaff } from "@/api/shop-admin"
- import { mapActions, mapGetters } from "vuex";
- import { getCustomInfo} from "@/api/custom"
- import { quickOrderAllDeliveryQuotes } from '@/api/express/delivery'
- import { getAvailableHb } from "@/api/hb"
- import ModalModule from "@/components/plugin/modal"
- import MxDatePicker from '@/components/mx-datepicker/mx-datepicker.vue';
- import TimePicker from '@/components/plugin/TimePicker';
- import WeightInput from '@/components/delivery-input/weight-input.vue';
- import RemarkInput from '@/components/delivery-input/remark-input.vue';
- import HbSelect from './components/hb-select.vue';
- import dayjs from 'dayjs';
- export default {
- name: "affirm",
- components: {
- TuiListCell,
- ModalModule,
- MxDatePicker,
- TimePicker,
- WeightInput,
- RemarkInput,
- HbSelect
- },
- mixins: [productMins],
- data () {
- return {
- defaultPickerDate:'',
- showPicker: false,
- reachDatePickerShow: false,
- reachDatePickerValue: '',
- discountList:[{name:'1折',value:0.1},{name:'2折',value:0.2},{name:'3折',value:0.3},{name:'4折',value:0.4},{name:'5折',value:0.5},{name:'6折',value:0.6},{name:'7折',value:0.7},{name:'8折',value:0.8},{name:'9折',value:0.9},{name:'不打折',value:1}],
- discountValue:0,
- customDiscount:'',
- autoLoad: false,
- staffList:[],
- payWayList:[{name:"线下微信",id:0},{name:"线下支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
- payWayindex:0,
- form: {
- shopId: "",
- shopName: "",
- receiveProvince: "",
- receiveCity: "",
- receiveFloor: "",
- receiveAddress: "",
- receiveLong: "",
- receiveLat: "",
- sendType: 1,
- sendSide: "2",
- sendDate: "",
- reachDate: "",
- reachPeriod: "12:00",
- historyDate:"",
- sendCost: "", //系统默认运费
- customSendCost: 0, //自设置的运费
- customId: "",
- packCost:"",
- product: "",
- remark:"",
- payWay:0,
- needPrint:2,
- getGoods:1,
- hasPay:0,
- getStaffName:'',
- dealPrice:0,
- forward:0,
- needWork:0,
- forwardStock:1,
- fromType:1,//门店来的订单
- reductionRule: 0,
- callErrand: 0, //现在呼叫 0 晚点呼叫 1
- weight: 1,
- deliveryRemark: '',
- },
- showCustomer: false,
- customInfo:{discount:1,balance:0},
- isUpdateAddress: false,
- customData: { bigCount: 0, smallCount: 0, userPrice: 0 },
- isAddModel:false,
- checkStock:true,
- xjData:{},
- xjDataInfo:{},
- modifyPrice:'',
- isScanEnv:false,
- calc:'add',
- diffPriceList:[],
- currentShop:{default:0},
- openIntraCity: 0,
- hcFreeKm: 0, //跑腿免费公里数
- hcMap: [], //花材满减规则
- hsFreeKm: 0, //花束免费公里数
- hsAddFee: 0, //花束满减规则
- deliveryQuotes: [], // 跑腿平台报价列表
- selectedDeliveryIndex: -1,
- selectedDeliveryData: null,
- showDistance: 0,
- forwardPayWay:0,//不影响原有的form.payWay方式,重新定义一个
- reduceStock:0,
- timeOptions: [['00', '01', '02','03','04','05','06','07','08','09','10','11','12','13', '14','15','16','17','18','19','20','21','22','23'],['00', '05', '10','15','20','25','30','35','40','45','50','55']],
- selectedHour: '12', // 选中的小时
- selectedMinute: '00', // 选中的分钟
- pickupTime: {
- label: '立即取件',
- value: dayjs().format('YYYY-MM-DD HH:mm'),
- },
- hbData:[], // 可用红包数据
- selectedHbId: null, // 选中的红包ID
- selectedHb: null, // 选中的红包对象
- //-------------
- // 重量输入防抖定时器
- weightDebounceTimer: null,
- };
- },
- onLoad (option) {
- this.option = option
- this.kdType = option.kdType
- let that = this
- this.initMerchantInfo().then((data) => {
- uni.setNavigationBarTitle({ title: data.name })
- that.currentShop = data.shopInfo
- that.openIntraCity = data.openIntraCity
- that.hcFreeKm = data.hcFreeKm
- try {
- that.hcMap = typeof data.hcMap === 'string' ? JSON.parse(data.hcMap) : data.hcMap
- } catch (e) {
- that.hcMap = []
- }
- that.hsFreeKm = data.hsFreeKm
- try {
- that.hsAddFee = data.hsAddFee
- } catch (e) {
- that.hsAddFee = 0
- }
- })
- if(Number(option.customId) > 0){
- this.form.customId = option.customId
- this.getCustomDetail();
- //用于混入product的已选中花材!!!!!
- this.selectJobId = option.customId
- this.selectJobType = 'bill'
- }
- //默认欠款是首选项
- this.form.hasPay = 0
- // 初始化支付方式索引
- this.payWayindex = 0
- // #ifdef APP-PLUS
- if(this.$util.isScanEnv()){
- this.isScanEnv = true
- }
- //#endif
- //如果是扣除库存方式开单,不显示售后付款选项
- this.reduceStock = this.option.reduceStock?this.option.reduceStock:0
- //如果扣除库存方法,付款方式默认选择挂账,这样方便提交
- if(this.reduceStock == 1){
- this.form.hasPay = 2
- }
- },
- onShow(){
- if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
- this.showCustomer = true;
- }
- //获取所有在职员工
- getAllStaff().then(res=>{
- if(res.code == 1){
- this.staffList = res.data.list
- }
- })
- //获取跑腿平台报价
- if(this.openIntraCity == 1 && this.form.sendType == 2){
- if(this.isUpdateAddress){
- this.getCustomDetail().then(() => {
- this.getDeliveryQuotes()
- });
- }else{
- this.getDeliveryQuotes()
- }
- }
- //获取可用红包数据
- this.getHbData()
- },
- onUnload(){
- uni.removeStorageSync('newClient')
- uni.$off('listenGetScanCode')
- // 页面卸载时清除定时器
- if (this.weightDebounceTimer) {
- clearTimeout(this.weightDebounceTimer);
- this.weightDebounceTimer = null;
- }
- },
- watch: {
- // 监听重量变化
- 'form.weight'(newVal) {
- // 清除之前的定时器
- if (this.weightDebounceTimer) {
- clearTimeout(this.weightDebounceTimer);
- this.weightDebounceTimer = null;
- }
-
- // 如果有运力列表且值变化了,清空运力列表
- if (this.deliveryQuotes.length > 0) {
- this.clearDeliveryList();
- }
-
- // 设置新的定时器,1秒后自动加载运力
- this.weightDebounceTimer = setTimeout(() => {
- // 只有当重量值有效时才自动加载
- if (newVal && Number(newVal) > 0 && this.form.sendType == 2) {
- this.handleLoadDelivery();
- }
- }, 1000);
- },
- // 监听取件时间变化
- pickupTime: {
- handler() {
- if (this.deliveryQuotes.length > 0) {
- this.clearDeliveryList();
- }
- if (this.form.sendType == 2) {
- this.getDeliveryQuotes();
- }
- },
- deep: true
- },
- // 监听备注变化
- 'form.deliveryRemark'() {
- if (this.deliveryQuotes.length > 0) {
- this.clearDeliveryList();
- }
- if (this.form.sendType == 2) {
- this.getDeliveryQuotes();
- }
- },
- systemPrice: {
- handler(val) {
- this.modifyPrice = val
- },
- immediate: true
- }
- },
- computed: {
- ...mapGetters(["getMerchantInfo", "getMyShopInfo", "getLoginInfo"]),
- // 计算不含红包的总价(含运费)
- preDiscountPrice() {
- let totalPrice = this.allPrice.toFixed(2)
- let finalPrice = Number(totalPrice)
- if(this.form.sendType == 2){
- const sendCost = Number(this.form.sendCost)
-
- if(this.form.reductionRule == 0){
- finalPrice = finalPrice + sendCost
- }else if(this.form.reductionRule == 1){
- if(this.isHcMapRule()){
- finalPrice = finalPrice + Number(this.form.customSendCost)
- }else{
- finalPrice = finalPrice + sendCost
- }
- }else if(this.form.reductionRule == 2){
- if(this.isHsMapRule()){
- finalPrice = finalPrice + Number(this.form.customSendCost)
- }else{
- finalPrice = finalPrice + sendCost
- }
- }
- }
- return parseFloat(finalPrice.toFixed(2))
- },
- // 是否有可用红包
- hasAvailableHb() {
- if (!this.hbData || this.hbData.length === 0) return false
- const price = this.preDiscountPrice
- return this.hbData.some(item => {
- const min = Number(item.minConsume) || 0
- return price >= min
- })
- },
- // 合计金额
- systemPrice(){
- let finalPrice = this.preDiscountPrice
- // 减去红包金额
- if(this.hasAvailableHb && this.selectedHb){
- finalPrice = finalPrice - Number(this.selectedHb.amount)
- }
- if(finalPrice < 0) finalPrice = 0
- return parseFloat(finalPrice.toFixed(2))
- },
- // labourCost(){
- // let cost = 0
- // if(Number(this.modifyPrice) > Number(this.systemPrice)){
- // cost = Number(this.modifyPrice) - Number(this.systemPrice)
- // cost = Number(cost).toFixed(2)
- // }
- // return cost
- // }
- },
- methods: {
- init () {},
- ...mapActions(["initMerchantInfo"]),
- checkMapRule(type){
- const distanceInMeters = Number(this.showDistance) || 0
- const freeKm = type === 'hc' ? this.hcFreeKm : this.hsFreeKm
- const freeKmInMeters = (Number(freeKm) || 0) * 1000
- if(distanceInMeters <= freeKmInMeters){
- console.log('满足免费公里数条件', type,distanceInMeters,freeKmInMeters)
- return true
- }
- let map = type === 'hc' ? this.hcMap : ''
- if(map && Array.isArray(map) && map.length > 0){
- const flowerCount = this.allCount.bigLength || 0
- const flowerPrice = this.allPrice || 0
- for(const rule of map){
- const ruleNum = Number(rule.num) || 0
- const rulePrice = Number(rule.price) || 0
- const ruleDistance = (Number(rule.distance) || 0) * 1000
- if(flowerCount >= ruleNum && flowerPrice >= rulePrice && distanceInMeters <= ruleDistance){
- console.log('满足满减条件',flowerCount,ruleNum,flowerPrice, rulePrice,distanceInMeters,ruleDistance)
- return true
- }
- }
- }else{
- const addFee = distanceInMeters - freeKmInMeters
- if(addFee > 0){
- //花束满减规则 -- 每超出1公里,加收 hsAddFee 元(不足1公里按1公里计算)
- const addFeePrice = Math.ceil(addFee / 1000) * this.hsAddFee
- console.log('addFeePrice---', addFeePrice)
- //this.form.sendCost = addFeePrice
- return false
- }
- return true
- }
- return false
- },
- isHcMapRule(){
- return this.checkMapRule('hc')
- },
- isHsMapRule(){
- return this.checkMapRule('hs')
- },
- changeReductionRule(rule) {
- this.form.reductionRule = rule;
- if(rule == 0){
- // 选中报价卡片
- this.form.sendCost = this.selectedDeliveryData.priceNumber
- }else if(rule == 1){
- if(this.isHcMapRule()){
- this.form.sendCost = this.selectedDeliveryData.priceNumber
- }else{
- this.form.sendCost = 0
- }
- }else if(rule == 2) {
- const distanceInMeters = Number(this.showDistance) || 0
- const freeKmInMeters = (Number(this.hsFreeKm) || 0) * 1000
- const diff = distanceInMeters - freeKmInMeters
- let addFeePrice = 0
- if(diff > 0){
- addFeePrice = Math.ceil(diff / 1000) * this.hsAddFee
- }
- this.form.sendCost = addFeePrice
- }
- },
- setSendType (type) {
- this.form.sendType = type
- if (type !== 2) {
- this.form.sendCost = ""
- // 切换到其他配送方式时清空报价数据
- this.deliveryQuotes = []
- this.selectedDeliveryIndex = -1
- this.selectedDeliveryData = null
- } else {
- // 如果切换回跑腿,且之前有获取过但被清空了,可能需要重新获取,或者保持现状等待用户操作
- // 这里根据 affirmGhs 的逻辑,如果在此处重新获取,可能需要在 onShow 或其他地方触发
- if(this.openIntraCity == 1 && type == 2){
- this.getDeliveryQuotes()
- }
- }
- },
- bindHistoryDateChange(){
- this.showPicker = true
- },
- confirmPicker(e) {
- this.form.historyDate = e.value
- this.showPicker = false
- },
- bindReachDateChange(){
- this.reachDatePickerShow = true
- this.reachDatePickerValue = this.form.reachDate
- },
- confirmReachDatePicker(e) {
- this.form.reachDate = e.value
- this.reachDatePickerShow = false
- },
- bindDateChange(e){
- let date = e.detail.value
- this.form.reachDate = date
- },
- bindTimeChange(event){
- let val = event.detail.value
- let before = Number(val[0])
- let after = Number(val[1])
- let timeOptions = this.timeOptions
- this.form.reachPeriod = timeOptions[0][before]+':'+timeOptions[1][after]
- },
- openTimePopup() {
- // 初始化为当前选中的时间
- const [hour, minute] = this.form.reachPeriod.split(':')
- this.selectedHour = hour
- this.selectedMinute = minute
- this.$refs.timePopup.open()
- },
- // 关闭时间选择弹框
- closeTimePopup() {
- this.$refs.timePopup.close()
- },
- // 确认时间选择
- confirmTime() {
- this.form.reachPeriod = `${this.selectedHour}:${this.selectedMinute}`
- this.closeTimePopup()
- },
- showDiscount(){
- this.$refs.discountRef.open('center')
- },
- setDiscount(num){
- this.discountValue = Number(num)
- let price = Number(this.systemPrice)*Number(num)
- price = parseFloat(price.toFixed(2))
- this.modifyPrice = price
- this.customDiscount = ''
- this.$refs.discountRef.close()
- },
- setCustomDiscount(){
- const value = parseFloat(this.customDiscount)
- if(isNaN(value) || value < 0 || value > 1){
- this.$msg('请输入0到1之间的有效折扣值')
- return
- }
- this.setDiscount(value)
- },
- cancelDiscount(){
- this.customDiscount = ''
- this.$refs.discountRef.close()
- },
- beginScan(){
- console.log('beginScan')
- let that = this
- uni.scanCode({
- scanType: ['barCode'],
- success: function (res) {
- that.takeItem(res.result)
- }
- })
- },
- changeGet(){
- this.calc = this.calc == 'add' ? 'sub' : 'add'
- },
- reduceItemFn(item) {
- if(item && item.variety == 1 && this.selectJobType == 'bill'){
- this.$msg('多颜色花材,请返回修改')
- return false
- }
- this.kdType = 'HIT';
- this.replaceItemFn(item,0,'sub')
- },
- addItemFn (item) {
- if(item && item.variety == 1 && this.selectJobType == 'bill'){
- this.$msg('多颜色花材,请返回修改')
- return false
- }
- this.kdType = 'HIT';
- this.replaceItemFn(item,0,'add')
- },
- kdChange(e){
- let index = e.detail.value
- if(!this.$util.isEmpty(this.staffList)){
- if(this.staffList[index]){
- this.form.getStaffName = this.staffList[index].name
- this.form.getStaffId = this.staffList[index].id
- }
- }
- },
- payWayChange(e){
- let index = e.detail.value
- this.payWayindex = index
- this.form.payWay = this.payWayList[index].id
- },
- // 根据支付方式ID更新索引
- updatePayWayIndex(){
- const index = this.payWayList.findIndex(item => item.id === this.form.payWay)
- this.payWayindex = index >= 0 ? index : 0
- },
- setPayWay(payWay){
- this.form.payWay = payWay
- this.updatePayWayIndex()
- },
- forceCommit(){
- this.form.dealPrice = 1
- this.formSubmit()
- },
- showForward(){
- this.$refs.remindForwardRef.open('center')
- },
- cancelForward(){
- this.$refs.remindForwardRef.close()
- },
- confirmForward(){
- //售后付款单,只能走线下模式
- this.form.hasPay = 1
- this.form.payWay = this.forwardPayWay
- this.submitOrder()
- },
- confirmSubmit(){
- if(this.form.forward == 1){
- this.showForward()
- }else{
- this.submitOrder()
- }
- },
- submitOrder() {
- let self = this;
- let name = '确认提交'
- if(this.form.hasPay == 0){
- name = '确认扫码?'
- }else if(this.form.hasPay == 1){
- name = '确认线下付款?'
- if(this.form.forward == 1){
- name = '确认开售后付款单?'
- }
- }else if(this.form.hasPay == 2){
- name = '确认挂账?'
- }else if(this.form.hasPay == 4){
- name = '确认余额支付?'
- }else{
- name = '确认提交'
- }
- self.$util.confirmModal({content:name},() => {
- self.formSubmit()
- })
- },
- validateForm() {
- if(Number(this.modifyPrice) <= 0){
- this.$msg('收款金额必须大于0');
- return false
- }
- return true
- },
- async formSubmit () {
- if(!this.validateForm()) return;
- let that = this
- let formData = this.form;
- const product = this.selectList.map((ele) => {
- let unitType = Number(ele.bigCount)>0 ? 0 : 1
- let num = Number(ele.bigCount)>0 ? Number(ele.bigCount) : Number(ele.smallCount)
- let unitPrice = ele.userPrice ? ele.userPrice : 0
- return {productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount, classId: ele.classId,
- itemId: ele.itemId, unitPrice:unitPrice,remark:ele.remark,property:ele.property,unitType:unitType,num:num}
- }
- );
- formData.product = JSON.stringify(product);
- if (!this.getMerchantInfo) {
- await this.initMerchantInfo();
- }
- formData.shopId = this.getMerchantInfo.id;
- let params = {...formData,modifyPrice: this.modifyPrice}; //labourCost:this.labourCost
- // 如果选择了跑腿配送并且有选中的平台数据,则添加配送平台信息
- 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 // 配送平台括号里的内容
- params.deliveryAllParams = this.selectedDeliveryData; // 配送平台所有参数
- if(this.form.callErrand == 1){
- params.pickupTime = this.pickupTime.value
- }
- }
- if(this.form.callErrand == 1){
- if(this.form.sendType == 2 && this.form.hasPay == 0){
- this.$msg('待付款,暂不支持马上发跑腿')
- return false
- }
- if (this.$util.isEmpty(this.customInfo.long) || this.$util.isEmpty(this.customInfo.lat) || this.$util.isEmpty(this.customInfo.address)) {
- this.$msg('客户地址不完整,不支持马上发跑腿')
- return false
- }
- }
- // 添加红包ID
- if(this.hasAvailableHb && this.selectedHbId){
- params.hbId = this.selectedHbId
- params.hbAmount = this.selectedHb.amount
- }
- //多颜色
- let xj = uni.getStorageSync("xj"+this.option.customId)
- //orderType 开单类型,1商品开单 2花材开单
- params = {...params,xj:JSON.stringify(xj),orderType:2}
- //扣减库存
- let orderId = this.option.orderId ? this.option.orderId : 0
- let book = this.option.book ? this.option.book : 0
- let reduceStock = this.option.reduceStock?this.option.reduceStock:0
- params = {...params,orderId:orderId,book:book,reduceStock:reduceStock,version:3}
- //console.log(params)
- uni.showLoading({mask:true})
- createOrder(params).then((res) => {
- uni.hideLoading()
- if(res.code == 1){
- if(res.data.respondType && res.data.respondType == 'priceError'){
- that.diffPriceList = res.data.diff
- that.$refs.diffPriceRef.open('bottom')
- return
- }
- this.removeFromSaveDirect()
- if(res.data && res.data.id){
- const {data: { id, orderSn,actPrice }} = res;
- if(this.form.hasPay == 0){
- this.$util.pageTo({ url: '/admin/billing/toPay',type:2,query: {orderId:id,orderSn:orderSn,actPrice:actPrice}})
- }else{
- if(this.form.forward == 1){
- this.$util.pageTo({ url: '/admin/refund/shPayRemind?orderId='+id,type:2})
- }else{
- this.$util.pageTo({ url: '/admin/billing/result?orderId='+id,type:2})
- }
- }
- }else{
- this.$msg('提交失败')
- }
- }
- })
- },
- returnCheck(){
- this.$refs.diffPriceRef.close()
- },
- gobackEvent () {
- let customId = this.option.customId ? this.option.customId : 0
- let customName = this.option.customName ? this.option.customName : ''
- let reduceStock = this.option.reduceStock?this.option.reduceStock:0
- let orderId = this.option.orderId ? this.option.orderId : 0
- let book = this.option.book ? this.option.book : 0
- let fromType = this.option.fromType ? this.option.fromType : 'item'
- if(fromType == 'item'){
- this.$util.pageTo({url: '/admin/billing/index2?customId='+customId+'&customName='+customName+'&orderId='+orderId+'&book='+book+'&reduceStock='+reduceStock,type:2})
- }else{
- this.$util.pageTo({url: '/admin/billing/hs?customId='+customId+'&customName='+customName+'&orderId='+orderId+'&book='+book+'&reduceStock='+reduceStock,type:2})
- }
-
- },
- getDeliveryQuotes(){
- //如果客户地址缺少经纬度或地址,任何一个,则不要请求后端询价接口
- if (this.$util.isEmpty(this.customInfo.long) || this.$util.isEmpty(this.customInfo.lat) || this.$util.isEmpty(this.customInfo.address)) {
- return;
- }
- this.deliveryQuotes = []
- this.selectedDeliveryIndex = -1
- this.selectedDeliveryData = null
- quickOrderAllDeliveryQuotes({
- totalPrice: this.allPrice,
- weight: this.form.weight,
- remark: this.form.deliveryRemark,
- customId: this.option.customId,
- pickupTime: this.pickupTime.value,
- }).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.indexOf('(') !== -1) {
- const parts = displayName.split('(');
- if(parts.length > 1) {
- displayName = parts[0].trim();
- bracketContent = parts[1].replace(')', '');
- }
- }
- //滴滴特殊处理,括号里的内容作为类型
- 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=>{
- this.$msg('获取跑腿平台报价失败')
- console.log('获取跑腿平台报价失败:', err)
- this.deliveryQuotes = []
- })
- },
- // 选择跑腿平台
- selectDelivery(item, index) {
- this.selectedDeliveryIndex = index
- this.selectedDeliveryData = item
- this.form.sendCost = item.priceNumber
- this.showDistance = item.distance || 0
- },
- openTimePicker() {
- this.$refs.timePicker.open();
- },
- handleTimeConfirm(time) {
- this.pickupTime = time;
- },
- getCustomDetail(){
- let that = this
- return getCustomInfo({ id: that.option.customId }).then(res => {
- that.form.customName = res.data.custom.name
- that.customInfo = res.data.custom
- that.$forceUpdate()
- if(Number(that.customInfo.balance)>Number(that.modifyPrice) && that.form.hasPay!=4){
- //客户余额充足,自动切换使用余额
- that.form.hasPay = 4
- }
- })
- },
- updateCustomAddress(){
- this.isUpdateAddress = true;
- this.$util.pageTo({ url: '/admin/member/modify?id='+this.customInfo.id+'&name='+this.customInfo.name })
- },
- handleLoadDelivery() {
- // 校验重量是否填写
- if (!this.form.weight || Number(this.form .weight) <= 0) {
- this.$msg('请先填写货物重量');
- return;
- }
- // 执行加载运力
- this.getDeliveryQuotes();
- },
- // 清空运力列表
- clearDeliveryList() {
- this.deliveryQuotes = [];
- this.selectedDeliveryIndex = -1;
- this.selectedDeliveryData = null;
- },
- getHbData(){
- getAvailableHb({customId:this.option.customId, shopId:this.currentShop.id}).then(res=>{
- if(res.code == 1){
- this.hbData = res.data
- }
- })
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .discount-quick-btn {
- width: 120upx;
- height: 120upx;
- border-radius: 12upx;
- border: 2upx solid #ddd;
- background-color: #f9f9f9;
- font-size: 32upx;
- font-weight: 500;
- color: #333;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.2s ease;
- padding: 0;
- line-height: 1;
- white-space: nowrap;
-
- &.active {
- border-color: #3385ff;
- background-color: #3385ff;
- color: #fff;
- }
- }
- .discount-popup-container {
- width: 600upx;
- padding: 30upx;
- box-sizing: border-box;
- }
- .discount-popup-title {
- font-size: 32upx;
- font-weight: bold;
- margin-bottom: 30upx;
- text-align: center;
- color: #333;
- }
- .discount-quick-buttons {
- display: flex;
- flex-wrap: wrap;
- justify-content: center;
- gap: 15upx;
- margin-bottom: 30upx;
- }
- .discount-divider {
- height: 1upx;
- background-color: #f0f0f0;
- margin: 20upx 0;
- }
- .discount-custom-section {
- margin-bottom: 30upx;
- }
- .discount-custom-label {
- font-size: 28upx;
- font-weight: 500;
- margin-bottom: 15upx;
- color: #333;
- }
- .discount-custom-input-group {
- display: flex;
- gap: 10upx;
- align-items: center;
- }
- .discount-custom-input {
- flex: 1;
- border: 1upx solid #ddd;
- border-radius: 8upx;
- padding: 12upx;
- font-size: 28upx;
- box-sizing: border-box;
- min-height: 70upx;
- line-height: 45upx;
- }
- .discount-action-buttons {
- display: flex;
- gap: 15upx;
- justify-content: center;
- }
- .admin-button-com {
- margin-right: 30upx;
- &.active {
- background-color: #09C567 !important;
- color: #fff !important;
- border: 1upx solid #09C567 !important;
- }
- }
- .payment-buttons {
- display: flex;
- flex-direction: column;
- gap: 20upx;
- width: 100%;
-
- .button-row {
- display: flex;
- justify-content: flex-start;
- gap: 30upx;
-
- .admin-button-com {
- flex: 0 0 180upx;
- margin-right: 0;
- }
- }
- }
- .affirm-page {
- position: relative;
- height: 100%;
- display: flex;
- flex-direction: column;
- .affirm-view {
- flex: 1;
- margin-bottom:90upx;
- 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 {
- 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: 28upx;
- font-weight:bold;
- .show-color{
- display:inline-block;
- width:25upx;
- height:25upx;
- background-color:rgb(9, 199, 9);
- border-radius:15upx;
- border:none;
- margin-left:16upx;
- }
- }
- .item-price {
- color: #333;
- font-size: 22upx;
- .price {
- font-size: 32upx;
- font-weight: bold;
- }
- }
- }
- & .open-bx {
- align-items: center;
- & .iconfont {
- color: #3385ff;
- font-size: 50upx;
- }
- & > .num {
- display: inline-block;
- width: 120upx;
- height:45upx;
- text-align:center;
- margin: 0 8upx;
- color: #868686;
- border-radius: 22upx;
- background-color: #f5f5f5;
- padding: 3upx 0;
- font-size: 25upx;
- }
- }
- }
- }
- }
- .summary-bar {
- padding: 0 20upx;
- height: 90upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-top: 1upx solid #eeeeee;
- .operate-view {
- display: flex;
- align-items: center;
- color: #3385ff;
- font-size: 26upx;
- .iconfont {
- margin-right: 20upx;
- font-size: 40upx;
- }
- }
- .describe-view {
- display: flex;
- align-items: center;
- color: #333;
- font-size: 28upx;
- font-weight:bold;
- .price {
- margin-left:8upx;
- color:red;
- }
- }
- }
- }
- .module-com {
- background-color: #fff;
- margin-bottom: 20upx;
- border-radius: 10upx;
- overflow: hidden;
- }
- }
- .under-bar {
- z-index:99999;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 10upx;
- position: fixed;
- bottom:0;
- @media screen and (max-width: 1100px) {
- width: 100%;
- }
- height: 100upx;
- background-color: #fff;
- box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
- .price-view {
- display: flex;
- align-items: center;
- font-size: 24upx;
- .price-title {
- color: #333;
- }
- .price-number {
- margin: 0 8upx;
- color: #ff2842;
- .large {
- font-size:34upx;
- font-weight:bold;
- }
- }
- }
- .admin-button-com {
- width: 200upx;
- }
- }
- .select-cmd_bx {
- & .kc {
- color: #999999;
- font-size: 28upx;
- font-weight: 400;
- margin-bottom: 40upx;
- text-align: center;
- margin-top: 30upx;
- .unit_price{
- padding-right:25upx;
- }
- }
- & .num_bx {
- display: flex;
- align-items: center;
- margin-bottom: 40upx;
- & > input {
- width: 212upx;
- height: 80upx;
- border: 1upx solid #dddddd;
- border-radius: 4upx;
- text-align: center;
- margin-right: 24upx;
- font-size: 40upx;
- }
- }
- }
- }
- .class-popup-style{
- z-index:99999;
- }
- .forward-popup-content {
- padding: 40upx;
- min-width: 700upx;
-
- .popup-title {
- font-size: 34upx;
- font-weight: bold;
- color: #333;
- text-align: center;
- margin-bottom: 40upx;
- line-height: 1.4;
- }
-
- .option-group {
- margin-bottom: 40upx;
-
- .option-label {
- font-size: 28upx;
- color: #666;
- margin-bottom: 20upx;
- font-weight: 500;
- }
-
- .button-group {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- gap: 15upx;
-
- .admin-button-com {
- margin-right: 0;
- flex: 1;
- min-width: 140upx;
-
- &:first-child {
- margin-left: 0;
- }
-
- &:last-child {
- margin-right: 0;
- }
- }
- }
-
- .payment-notice {
- text-align: center;
- font-size: 34upx;
- margin-top: 30upx;
- padding: 15upx 20upx;
- background-color: #f5f5f5;
- border-radius: 8upx;
- }
- }
-
- .popup-footer {
- display: flex;
- justify-content: center;
- gap: 60upx;
- margin-top: 40upx;
- padding-top: 30upx;
- border-top: 1upx solid #eee;
-
- .admin-button-com {
- margin-right: 0;
- min-width: 160upx;
- }
- }
- }
- .remark-class{
- z-index:0;
- color:#CCCCCC;
- }
- .warning-price{
- color:red;
- }
- /* 日期选择器蒙板 */
- .date-picker-mask {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- z-index: 99;
- animation: fadeIn 0.3s ease-in-out;
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @keyframes fadeOut {
- from {
- opacity: 1;
- }
- to {
- opacity: 0;
- }
- }
- /* 时间选择弹窗样式 */
- .time-picker-popup {
- width: 100%;
- background: #fff;
- border-radius: 20upx 20upx 0 0;
- display: flex;
- flex-direction: column;
- max-height: 99vh;
- padding:0 0 110upx 0;
- }
- .popup-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 0;
- padding: 30upx 20upx 20upx 20upx;
- border-bottom: 2upx solid #f0f2f6;
- flex-shrink: 0;
- }
- .popup-title {
- font-size: 36upx;
- color: #333;
- font-weight: bold;
- }
- .popup-close {
- font-size: 48upx;
- color: #999;
- line-height: 1;
- cursor: pointer;
- }
- .time-sections {
- display: flex;
- flex-direction: column;
- gap: 20upx;
- margin-bottom: 0;
- flex: 1;
- padding: 20upx 20upx 0 20upx;
- overflow: hidden;
- }
- .time-section {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-height: 200upx;
-
- .section-title {
- font-size: 28upx;
- color: #333;
- font-weight: 600;
- margin-bottom: 12upx;
- text-align: left;
- }
- }
- .hours-wrapper {
- width: 100%;
- flex: 1;
- background: #f8f9fa;
- border: 2upx solid #e9ecef;
- border-radius: 8upx;
- position: relative;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- min-height: 150upx;
- }
- .minutes-wrapper {
- width: 100%;
- flex: 1;
- background: #f8f9fa;
- border: 2upx solid #e9ecef;
- border-radius: 8upx;
- position: relative;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- min-height: 150upx;
- }
- .hours-scroll,
- .minutes-scroll {
- width: 100%;
- height: 100%;
- padding: 8upx;
- box-sizing: border-box;
- }
- .hours-buttons,
- .minutes-buttons {
- display: flex;
- flex-wrap: wrap;
- gap: 8upx;
- justify-content: flex-start;
- }
- .time-button {
- width: calc(25% - 6upx);
- height: 73upx;
- display: flex;
- align-items: center;
- justify-content: center;
- background: #ffffff;
- border: 2upx solid #e9ecef;
- border-radius: 6upx;
- font-size: 26upx;
- color: #666;
- box-sizing: border-box;
- transition: all 0.2s;
- flex-shrink: 0;
-
- &.active {
- background: #3385FF;
- border-color: #3385FF;
- color: #fff;
- font-weight: 500;
- }
-
- &:active {
- background: #e8f5ff;
- }
- }
- .popup-footer {
- display: flex;
- gap: 12upx;
- padding: 15upx 20upx 20upx 20upx;
- border-top: 2upx solid #f0f2f6;
- flex-shrink: 0;
-
- .footer-button {
- flex: 1;
- height: 93upx;
- display: flex;
- align-items: center;
- justify-content: center;
- border: none;
- border-radius: 8upx;
- font-size: 28upx;
- font-weight: 500;
- transition: all 0.2s;
-
- &.default {
- background: #f5f5f5;
- color: #666;
- }
-
- &.blue {
- background: #3385FF;
- color: #fff;
- }
-
- &:active {
- opacity: 0.8;
- }
- }
- }
- /* 跑腿平台报价样式 */
- .delivery-quotes-container {
- width: 100%;
- margin-top: 10upx;
- }
- .delivery-quotes-scroll {
- /* 滚动已移除 */
- }
- .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: 12upx 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 220upx;
- width: 220upx;
- }
-
- .platform-name {
- font-size: 24upx;
- 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: 25upx;
- color: #333;
- font-weight: bold;
- margin-bottom: 4upx;
- }
-
- .platform-type {
- font-size: 19upx;
- 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;
- }
- .delivery-section {
- border: 4upx solid #2ECE7E;
- margin: 8upx 20upx;
- border-radius: 8upx;
- }
- .empty-quotes-view {
- height: 50upx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
- .error-tips {
- color: red;
- font-weight: bold;
- font-size: 32upx;
- }
- .distance-box {
- display: flex;
- align-items: center;
- }
- .blue-text {
- color: #3385FF;
- }
- .title-reduction {
- width: 150upx;
- }
- .btn-reduction {
- margin-right: 12upx;
- height: 70upx;
- line-height: 46upx;
- }
- .btn-reduction-last {
- margin-right: 0upx;
- height: 70upx;
- line-height: 46upx;
- }
- .strike-through {
- text-decoration: line-through;
- }
- .btn-call {
- width: 170upx;
- }
- .time-action-view {
- display: flex;
- align-items: center;
- color: #049E2C;
- font-size: 28upx;
- }
- .icon-arrow-right {
- font-size: 24upx;
- color: #049E2C;
- margin-left: 5upx;
- }
- .address-box {
- flex: 1;
- text-align: center;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- .addr-main {
- font-size: 32upx;
- color: #333;
- }
- .addr-sub {
- font-size: 28upx;
- color: #999;
- margin-top: 6upx;
- }
- }
- </style>
|