| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595 |
- <template>
- <view>
- <view>
- <u-navbar :is-back="false" :title="tit">
- <view class="slot">
- <!-- 我的 -->
- <view class="slot_left" @click="bindridermy">
- <image :src="avatar" style="border-radius: 50%"></image>
- </view>
- <!-- 下线 -->
- <view class="slot_content" v-show="seen">
- <image src="../../static/rider/icon_down.png"></image>
- </view>
- <!-- 上线 -->
- <view class="slot_content" v-show="!seen">
- <image src="../../static/rider/icon_up.png"></image>
- </view>
- </view>
- </u-navbar>
- <!-- tabs -->
- <u-tabs style="position: fixed; width: 100%; z-index: 999" :list="tab" :is-scroll="false" inactive-color="#333333" :current="current" @change="change"></u-tabs>
- <view class="content">
- <!-- 待取货和配送中搜索框 -->
- <view class="search-bar" v-show="current == 1 || current == 2">
- <view class="search-bar-box">
- <image class="search-span" src="../../static/image/sousuo.png" />
- <input type="text" v-model="keyword" placeholder="请输入收货地址或收货人手机号码" @input="searchKeyword" @confirm="shouhuiche" class="search-text" focus />
- </view>
- <!-- <input type="text" v-model="shoudanma" class="impute padding-lr" placeholder="请输入收货地址或收货人手机号码" @input="onInput" @confirm="shouhuiche" /> -->
- </view>
- <!-- 全选框和批量转单 -->
- <view class="kuang-bar" v-if="(current == 1 || current == 2) && lists.length > 0">
- <view class="kuang-padd" v-if="checkedz" @click="checkboxChanges()">
- <view class="kuang-li kuang-se">
- <image src="../../static/image/select.png" style="width: 34rpx; height: 24rpx; margin: 5px 0 0 4px"></image>
- </view>
- <view style="margin-left: 14rpx">全选</view>
- </view>
- <view class="kuang-padd" v-else @click="checkboxChanges()">
- <view class="kuang-li kuang-kong"></view>
- <view style="margin-left: 14rpx">全选</view>
- </view>
- <view class="kuang-btn noselect" @click="allZhuanNo" v-if="indentIds.length == 0">批量转单</view>
- <view class="kuang-btn selectpil" @click="allZhuan" v-else>批量转单</view>
- </view>
- <!-- 新任务,展示所有商家时 -->
- <view class="tabs_box" :class="{ dis: current == 0 }" v-if="!ifrenwu">
- <view class="list_box2" v-for="(item, index) in list_shanghu" :key="index" @click="dingdetails(item.shopId)">
- <view style="line-height: 40px; font-size: 20px; margin-left: 20px">
- {{ item.shopName }}
- <text style="font-size: 16px; margin-left: 80px">订单数:{{ item.countOfWaitAccept }}单</text>
- </view>
- </view>
- </view>
- <!-- 新任务 -->
- <view class="tabs_box" :class="{ dis: current == 0 }" v-if="ifrenwu">
- <view class="box_btn5" @click.stop="fanhuiShang">返回</view>
- <!-- 下线中 -->
- <view class="list_box" v-for="(item, index) in list_box" :key="index" v-show="seen" @click="binddetails(item.indentNumber, item.indentType)">
- <view class="order_title" v-if="item.expectDeliveryTime">预约订单:{{ item.expectDeliveryTime }}送达</view>
- <view class="part1">
- <view class="box_one" v-if="item.indentType == 1">帮我送</view>
- <view class="box_one" v-if="item.indentType == 2">帮我取</view>
- <view class="box_one" v-if="item.indentType == 3">同城帮买</view>
- <view class="box_one" v-if="item.indentType == 4">同城服务</view>
- <view class="box_one" v-if="item.indentType == 5">同城外卖</view>
- <view class="box_two" v-if="item.indentType == 4 && item.serviceType">{{ item.serviceType }}</view>
- <view class="box_two box_two1" v-if="item.itemType != null || item.itemWeight != null">{{ item.itemType }} {{ item.itemWeight }}</view>
- <view class="box_three" v-if="item.indentType == 4 && item.tool">{{ item.tool }}</view>
- </view>
- <view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderPaySequence">#{{ item.orderPaySequence }}</view>
- <view style="padding: 0 10rpx; color: #ff7f00">{{ item.shopName }}</view>
- <view style="padding: 0 10rpx">订单编号:{{ item.indentNumber }}</view>
- <!-- 同城服务 -->
- <view class="part2" v-if="item.indentType == 4">
- <view class="address_name">{{ item.userAddressDetail }}({{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }})</view>
- <!-- <view class="name">{{item.deliveryUserName}}<text>{{item.deliveryUserPhone}}</text></view> -->
- </view>
- <!-- 同城帮买 就近-->
- <view class="part2" v-if="item.indentType == 3 && item.buyType == 0">
- <view class="address_name">{{ item.userAddressDetail }}</view>
- <view class="name">
- <text>{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}</text>
- </view>
- </view>
- <!-- 同城帮买 指定 -->
- <view class="part2" v-if="item.indentType == 3 && item.buyType == 1">
- <view class="box_add">
- <view class="add_name">
- <view class="sh_name">
- {{ item.shopAddressDetail }}
- </view>
- <view class="xs_add">{{ item.shopProvince }}{{ item.shopCity }}{{ item.shopDistrict }}</view>
- </view>
- </view>
- <view class="jiantou">
- <image src="../../static/rider/jiantou.png"></image>
- </view>
- <view class="box_add">
- <view class="add_name">
- <view class="sh_name">
- {{ item.userAddressDetail }}
- </view>
- <view class="xs_add">{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}</view>
- </view>
- </view>
- </view>
- <!-- 帮送 帮区-->
- <view class="part2" v-if="item.indentType == 1 || item.indentType == 2">
- <view class="box_add">
- <view class="add_name">
- <view class="sh_name">
- {{ item.shopAddressDetail }}
- </view>
- <view class="xs_add">{{ item.shopProvince }}{{ item.shopCity }}{{ item.shopDistrict }}</view>
- </view>
- </view>
- <view class="jiantou">
- <image src="../../static/rider/jiantou.png"></image>
- </view>
- <view class="box_add">
- <view class="add_name">
- <view class="sh_name">{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}</view>
- </view>
- </view>
- </view>
- <!-- 同城外卖 -->
- <view class="part2" v-if="item.indentType == 5">
- <view class="address_name">{{ item.userAddressDetail }}({{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }})</view>
- <!-- <view class="name">{{item.deliveryUserName}}<text>{{item.deliveryUserPhone}}</text></view> -->
- </view>
- <!-- -->
- <view class="part3">
- <view class="three_left">
- <!-- <image src="../../static/rider/icon_data.png"></image> -->
- <!-- <text v-if="item.indentType==1 ||item.indentType==2">{{item.predictTime}}分钟内送达</text> -->
- <!-- <text v-if="item.indentType==3">{{item.buyTime}}分钟内送达</text> -->
- <!-- <text v-if="item.indentType==4">{{item.visitTime}}分钟内送达</text> -->
- </view>
- <view class="three_right">¥{{ item.errandMoney }}</view>
- </view>
- <view class="part4">
- <view class="box_btn" @click.stop="bindorder1">接单</view>
- </view>
- </view>
- <!-- 上线 -->
- <view class="list_box" v-for="(item, index) in list_box" :key="index" v-if="!seen" @click="binddetails(item.indentNumber, item.indentType)">
- <view class="part1">
- <view class="box_one" v-if="item.indentType == 1">帮我送</view>
- <view class="box_one" v-if="item.indentType == 2">帮我取</view>
- <view class="box_one" v-if="item.indentType == 3">同城帮买</view>
- <view class="box_one" v-if="item.indentType == 4">同城服务</view>
- <view class="box_one" v-if="item.indentType == 5">同城外卖</view>
- <view class="box_two" v-if="item.indentType == 4 && item.serviceType">{{ item.serviceType }}</view>
- <view class="box_two box_two1" v-if="item.itemType != null || item.itemWeight != null">{{ item.itemType }} {{ item.itemWeight }}</view>
- <view class="box_three" v-if="item.indentType == 4 && item.tool">{{ item.tool }}</view>
- <view class="box_two box_two1" v-if="item.indentType == 3">{{ item.buyType == 0 ? '就近购买' : '指定地点购买' }}</view>
- <view style="position: absolute; right: 0; font-size: 22rpx; color: #999">{{ item.createTime }}</view>
- </view>
- <view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderPaySequence">#{{ item.orderPaySequence }}</view>
- <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
- <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
- <!-- 同城服务 -->
- <view class="part2" v-if="item.indentType == 4">
- <view class="box_add">
- <view class="distance" v-if="item.distancessd != '0.0m'">
- <view>{{ item.distancessd }}</view>
- </view>
- <view class="add_name">
- <view class="address_name">{{ item.userAddressDetail }}({{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }})</view>
- <!-- <view class="name">{{item.deliveryUserName}}<text>{{item.deliveryUserPhone}}</text>
- </view> -->
- </view>
- </view>
- </view>
- <!-- 同城帮买 就近-->
- <view class="part2" v-if="item.indentType == 3 && item.buyType == 0">
- <view class="box_add">
- <view class="distance" v-if="item.distancessd != '0.0m'">
- <view>{{ item.distancessd }}</view>
- </view>
- <view class="add_name">
- <view class="address_name">{{ item.userAddressDetail }}</view>
- <view class="name">
- <text>{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}{{ item.userAddressDetail }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城帮买 指定 -->
- <view class="part2" v-if="item.indentType == 3 && item.buyType == 1">
- <view class="box_add">
- <view class="distance" v-if="item.distancess != '0.0m'">
- <view>{{ item.distancess }}</view>
- </view>
- <view class="add_name">
- <view class="sh_name">
- {{ item.shopAddressDetail }}
- <!-- {{item.shopProvince?item.shopProvince:''}}{{item.shopCity?item.shopCity:''}}{{item.shopDistrict?item.shopDistrict:''}} -->
- </view>
- <view class="xs_add">
- {{ item.shopProvince ? item.shopProvince : '' }}{{ item.shopCity ? item.shopCity : '' }}{{ item.shopDistrict ? item.shopDistrict : '' }}
- </view>
- </view>
- </view>
- <view class="jiantou">
- <image src="../../static/rider/jiantou.png"></image>
- <!-- <view>{{item.distance}}</view> -->
- </view>
- <view class="box_add">
- <view class="distance" v-if="item.distancessd != '0.0m'">
- <view>{{ item.distancessd }}</view>
- </view>
- <view class="add_name">
- <view class="sh_name">{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}{{ item.userAddressDetail }}</view>
- </view>
- </view>
- </view>
- <!-- 帮送 帮取-->
- <view class="part2" v-if="item.indentType == 1 || item.indentType == 2">
- <view class="box_add">
- <view class="distance" v-if="item.distancess != '0.0m'">
- <view>{{ item.distancess }}</view>
- </view>
- <view class="add_name">
- <view class="sh_name">
- {{ item.shopAddressDetail }}
- <!-- {{item.shopProvince?item.shopProvince:''}}{{item.shopCity?item.shopCity:''}}{{item.shopDistrict?item.shopDistrict:''}} -->
- </view>
- <view class="xs_add">
- {{ item.shopProvince ? item.shopProvince : '' }}{{ item.shopCity ? item.shopCity : '' }}{{ item.shopDistrict ? item.shopDistrict : '' }}
- </view>
- </view>
- </view>
- <view class="jiantou">
- <image src="../../static/rider/jiantou.png"></image>
- <!-- <view>{{item.distance}}</view> -->
- </view>
- <view class="box_add">
- <view class="distance" v-if="item.distancessd != '0.0m'">
- <view>{{ item.distancessd }}</view>
- </view>
- <view class="add_name">
- <view class="sh_name">{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}{{ item.userAddressDetail }}</view>
- </view>
- </view>
- </view>
- <!-- 同城外卖 -->
- <view class="part2" v-if="item.indentType == 5">
- <view class="box_add">
- <view class="distance" v-if="item.distancess != '0.0m'">
- <view>{{ item.distancess }}</view>
- </view>
- <view class="add_name">
- <view class="sh_name">
- {{ item.shopAddressDetail }}
- </view>
- <view class="xs_add">
- {{ item.shipAddress ? item.shipAddress : '' }}
- </view>
- </view>
- </view>
- <view class="jiantou">
- <image src="../../static/rider/jiantou.png"></image>
- <!-- <view>{{item.distance}}</view> -->
- </view>
- <view class="box_add">
- <view class="distance" v-if="item.distancessd != '0.0m'">
- <view>{{ item.distancessd }}</view>
- </view>
- <view class="add_name">
- <view class="sh_name">{{ item.userProvince }}{{ item.userCity }}{{ item.userDistrict }}{{ item.userAddressDetail }}</view>
- </view>
- </view>
- </view>
- <view></view>
- <!-- -->
- <view class="part3">
- <view class="three_left" v-if="item.indentType == 4">
- <image src="../../static/rider/icon_data.png"></image>
- <text>预约时间:{{ item.sendOutTime ? item.sendOutTime : '立即送达' }}</text>
- </view>
- <view class="three_left" v-if="item.indentType != 4">
- <image src="../../static/rider/icon_data.png"></image>
- <text>送达时间:{{ item.sendOutTime ? item.sendOutTime : '立即送达' }}</text>
- </view>
- <view class="three_right" v-if="item.riderMoney">
- ¥{{ item.riderMoney }}
- <!-- <text style="font-size: 20upx;">(<text
- v-if="item.prepayMoney">预付{{item.prepayMoney}}元</text>
- <text v-if="item.tip">小费{{item.tip}}元</text> 跑腿费{{item.errandMoney}}元)</text> -->
- </view>
- <view class="three_right" v-else>¥ 0</view>
- </view>
- <view class="part4">
- <view class="box_btn1" @click.stop="bindorder(item, index)">接单</view>
- </view>
- </view>
- <empty v-if="list_box.length == 0"></empty>
- </view>
- <!-- 待取货 -->
- <view class="tabs_box" :class="{ dis: current == 1 }">
- <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.indentId)">
- <view class="kuang-li kuang-se" style="float: left; margin-top: 35%" @click.stop="checkboxChange(item)" v-if="item.checkeds">
- <image src="../../static/image/select.png" style="width: 34rpx; height: 24rpx; margin: 5px 0 0 4px"></image>
- </view>
- <view class="kuang-li kuang-kong" @click.stop="checkboxChange(item)" v-else style="float: left; margin-top: 35%"></view>
- <!-- <u-checkbox class="kuang-li kuang-kong" @change.stop="checkboxChange(item)" v-model="item.checkeds" style="float: left;margin-top: 35%;"> -->
- <!-- </u-checkbox> -->
- <view class="kuang-line"></view>
- <view style="margin-left: 81rpx">
- <view class="order_success" v-if="item.indentState == '2'">
- <view class="order_name">待支付领取</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '3'">
- <view class="order_name">待取货</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '4'">
- <view class="order_name">配送中</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '5'">
- <view class="order_name">已送达,客户待确认</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '6'">
- <view class="order_name">客户已确认</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '7'">
- <view class="order_name">已完成</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '9'">
- <view class="order_name">已取消</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <u-line color="#E6E6E6" />
- <view class="order_city">
- <view class="city_type">
- <view class="type_name" v-if="item.indentType == 1">帮我送</view>
- <view class="type_name" v-if="item.indentType == 2">帮我取</view>
- <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
- <view class="type_name" v-if="item.indentType == 4">同城服务</view>
- <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
- <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
- </view>
- <view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderPaySequence">#{{ item.orderPaySequence }}</view>
- <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
- <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
- <!-- 帮我送/帮我取 地址 -->
- <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
- <view class="fh_box">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城帮买 指定位置 -->
- <view class="city_address" v-if="item.indentType == 3">
- <view class="fh_box" v-if="item.buy_type == 1">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城服务 -->
- <view class="city_address" v-if="item.indentType == 4">
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城外卖 -->
- <view class="city_address" v-if="item.indentType == 5">
- <view class="fh_box">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-line color="#E6E6E6" />
- <view class="order_btn">
- <view class="btn1" v-if="item.indentState == '3'" @click.stop="quxiao(item.indentNumber, index)">取消订单</view>
- <view class="btn7" v-if="item.indentState == '3'" @click.stop="zhuanOrder(item.indentId)">转单</view>
- <view class="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId, index)">确认取货</view>
- </view>
- </view>
- </view>
- <empty v-if="lists.length == 0"></empty>
- </view>
- <!-- 配送中-->
- <view class="tabs_box" :class="{ dis: current == 2 }">
- <view class="order_box" v-for="(item, index) in lists" :key="index" @click="bindorderDetail(item.indentNumber, item.indentId)">
- <view class="kuang-li kuang-se" style="float: left; margin-top: 35%" @click.stop="checkboxChange(item)" v-if="item.checkeds">
- <image src="../../static/image/select.png" style="width: 34rpx; height: 24rpx; margin: 5px 0 0 4px"></image>
- </view>
- <view class="kuang-li kuang-kong" @click.stop="checkboxChange(item)" v-else style="float: left; margin-top: 35%"></view>
- <view class="kuang-line"></view>
- <view style="margin-left: 81rpx">
- <view class="order_success" v-if="item.indentState == '2'">
- <view class="order_name">待支付领取</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '3'">
- <view class="order_name">待取货</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '4'">
- <view class="order_name">配送中</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '5'">
- <view class="order_name">已送达,客户待确认</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '6'">
- <view class="order_name">客户已确认</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '7'">
- <view class="order_name">已完成</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '9'">
- <view class="order_name">已取消</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <u-line color="#E6E6E6" />
- <view class="order_city">
- <view class="city_type">
- <view class="type_name" v-if="item.indentType == 1">帮我送</view>
- <view class="type_name" v-if="item.indentType == 2">帮我取</view>
- <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
- <view class="type_name" v-if="item.indentType == 4">同城服务</view>
- <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
- <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
- </view>
- <view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderPaySequence">#{{ item.orderPaySequence }}</view>
- <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
- <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
- <!-- 帮我送/帮我取 -->
- <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
- <view class="fh_box">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;">#9</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城帮买 -->
- <view class="city_address" v-if="item.indentType == 3">
- <view class="fh_box" v-if="item.buy_type == 1">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城服务 -->
- <view class="city_address" v-if="item.indentType == 4">
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城外卖 -->
- <view class="city_address" v-if="item.indentType == 5">
- <view class="fh_box">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-line color="#E6E6E6" />
- <view class="order_btn">
- <view class="btn1" v-if="item.indentState == '3'" @click.stop="quxiao(item.indentNumber, index)">取消订单</view>
- <view class="btn1" v-if="item.indentState == '6'">客户待确认</view>
- <view class="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId, index)">确认取货</view>
- <!-- <view class="flex"
- v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1 &&item.deliveryImgs==null">
- <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
- </view> -->
- <view class="flex" v-if="item.indentState == '4' || (item.indentState == '7' && item.deliveryImgs == null)">
- <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
- </view>
- <view class="btn7" style="margin-left: 10px" v-if="item.indentState == '4'" @click.stop="zhuanOrder(item.indentId)">转单</view>
- <view class="btn2" v-if="item.indentState == '4'" @click.stop="shouhuo(item, index)">确认送达</view>
- <view class="btn2" v-if="item.indentState == '9'">已取消</view>
- </view>
- </view>
- </view>
- <empty v-if="lists.length == 0"></empty>
- </view>
- </view>
- <!-- tabbar -->
- <view class="tabbar">
- <view class="tabbar_type" @click="onshow" v-if="current == 0">
- <view class="type_image">
- <image src="../../static/rider/type.png"></image>
- </view>
- 接单设置
- </view>
- <view class="tabbar_btn" @click="bindup">
- <view class="btn" v-show="seen">开始接单</view>
- <view class="btn3" v-show="!seen">停止接单</view>
- </view>
- </view>
- <!-- 单个订单转单 -->
- <u-popup v-model="showOrder" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle" close-icon-size="45" width="580rpx" height="600rpx">
- <view class="receipt_code">
- <view class="code_title">填写转单信息(二选一即可)</view>
- <u-input v-model="phone" type="number" placeholder="填写转单人手机号码" :border="border" />
- <u-input v-model="zhuanName" type="text" placeholder="填写转单人姓名" :border="border" />
- <view class="sure" style="margin-top: 40rpx" @click="zhuandan">确定</view>
- </view>
- </u-popup>
- <!-- 一键转单弹框 -->
- <u-popup v-model="showsZhuan" mode="center" border-radius="18" :closeable="closeable" close-icon-size="45" width="690rpx" height="1110rpx">
- <view class="receipt_zhuan">
- <view class="zhuan_title">转单确认</view>
- <view class="zhuan-mode">
- <view class="zhuan-title">待转订单</view>
- <view class="zhuan-que">
- <scroll-view style="height: 670rpx" :scroll-y="true" class="block-main block-two-level block-pad" @scrolltolower="scrolltolowerDai">
- <view class="zhuan-ding" v-for="(item, index) in listDai" :key="index">
- <view class="ding-1">
- <view class="ding-shop">{{ item.shopName }}</view>
- <view class="ding-xuhao">#{{ item.orderPaySequence }}</view>
- <image
- src="../../static/image/shan.png"
- @click.stop="deleteDing(item, index)"
- style="width: 48rpx; height: 48rpx; float: right; margin: -10rpx 20rpx 0 0"
- ></image>
- </view>
- <view class="ding-2">
- <view class="ding-shop">{{ item.userName }}</view>
- <view class="ding-xuhao">{{ item.userPhone }}</view>
- </view>
- <view class="ding-2">
- {{ item.userAddressDetail }}
- </view>
- </view>
- <u-loadmore icon :status="statusDai" />
- </scroll-view>
- </view>
- <view class="zhuan-title">选择转单人</view>
- <view style="position: relative; margin: 22rpx 0 0 25rpx; height: 60rpx">
- <view class="zhuan-btu1" @click="selectPeople">选择</view>
- <view class="zhuan-text">{{ riderName }}</view>
- <image v-if="riderName" @click="deleteRider" src="../../static/image/delete.png" style="width: 30rpx; height: 30rpx; margin: 15rpx 0 0 10rpx"></image>
- </view>
- <view style="position: relative; margin: 36rpx 20rpx 0 20rpx; height: 90rpx">
- <view class="zhuan-btu2" @click="quxiaoZhuan">取消</view>
- <view class="zhuan-btu3" @click="transformOrder">确认</view>
- </view>
- </view>
- </view>
- </u-popup>
- <!-- 选择转单人弹框 -->
- <u-popup v-model="showsSelect" mode="center" border-radius="18" :closeable="closeable" close-icon-size="45" width="690rpx" height="399px">
- <view class="receipt_zhuan">
- <view class="zhuan_title">选择转单人</view>
- <view class="zhuan-mode">
- <view class="search-bar-box">
- <image class="search-span" src="../../static/image/sousuo.png" />
- <input type="text" v-model="keywordRider" placeholder="请输入手机号码或骑手姓名" class="search-text" @input="searchKeywordRider" focus />
- </view>
- <view class="zhuan-que">
- <scroll-view style="height: 670rpx" :scroll-y="true" class="block-main block-two-level block-pad" @scrolltolower="scrolltolower">
- <view class="xuan-list" v-for="(item, index) in listRider" :key="index" @click="getRider(item)">
- <image :src="item.avatar" style="width: 80rpx; height: 80rpx; float: left; margin: 30rpx 0 0 30rpx; border-radius: 50%"></image>
- <view class="xuan-right">
- <view class="ding-3">
- <view class="ding-shop">{{ item.userName }}</view>
- <view class="ding-xuhao">{{ item.phone }}</view>
- </view>
- <view class="ding-2" style="margin: 0 0 0 0">
- {{ item.stationName }}
- </view>
- </view>
- <u-line color="#E6E6E6" />
- </view>
- <!-- <view class="xuan-list2">
- <image src="../../static/logo.png" style="width: 80rpx;height: 80rpx;float: left;margin: 30rpx 0 0 30rpx;"></image>
- <view class="xuan-right">
- <view class="ding-3">
- <view class="ding-shop">张力离</view>
- <view class="ding-xuhao">12378325632</view>
- </view>
- <view class="ding-2" style="margin: 0 0 0 0;">
- 墨轩湖校区骑手团队
- </view>
- </view>
- <u-line color="#E6E6E6" />
- </view> -->
- <!-- 状态:加载更多、没有更多了... -->
- <u-loadmore icon :status="status" />
- </scroll-view>
- </view>
- </view>
- </view>
- </u-popup>
- <!-- 接单设置弹框 -->
- <u-popup v-model="show" mode="bottom" height="600rpx" :closeable="true" close-icon="close-circle" close-icon-size="50" close-icon-color="#CCCCCC" @close="closePopup()">
- <view class="popup_box">
- <view class="title">当前接单模式</view>
- <!-- <view class="part_one">
- <view class="left">
- <view class="gotype">近单模式</view>
- <view class="tit">推单范围{{distance?distance:'0'}}</view>
- </view>
- <view class="right">
- <u-switch v-model="checked" size="40" inactive-color="#CCCCCC" active-color="#FF6A04"
- @change="switch1">
- </u-switch>
- </view>
- </view>
- <view class="part_one">
- <view class="left">
- <view class="gotype">同城模式</view>
- <view class="tit">推单范围{{distance?distance:'0'}}</view>
- </view>
- <view class="right">
- <u-switch v-model="check" size="40" inactive-color="#CCCCCC" active-color="#FF6A04"
- @change="switch2"></u-switch>
- </view>
- </view> -->
- <view class="part_two">
- <view class="two_left">接单类型</view>
- <view class="two_right" @click="showModals()">
- {{ indentTypeName }}
- <u-icon name="arrow-right" color="#999999"></u-icon>
- </view>
- </view>
- <view class="part_two">
- <view class="two_left">常驻送货区域</view>
- <view class="two_right" @click="dizhis()">
- {{ quyu }}
- <u-icon name="arrow-right" color="#999999"></u-icon>
- </view>
- </view>
- <view class="part_one" v-if="checkxdd != '否'">
- <view class="left">
- <view class="gotype">新订单通知</view>
- <view class="tit">开启后{{ xddNumber }}KM内,系统自动推送新订单通知</view>
- </view>
- <view class="right">
- <u-switch v-model="xddcheck" size="40" inactive-color="#CCCCCC" active-color="#FF6A04" @change="switchxdd"></u-switch>
- </view>
- </view>
- <view class="part_two">
- <view class="two_left">同时接单量</view>
- <view class="two_right">
- 最大({{ orderNum }}单)
- <!-- <u-icon name="arrow-right" color="#999999"></u-icon> -->
- </view>
- </view>
- <view class="part_two">
- <view class="two_left">骑手所在站点</view>
- <view class="two_right">
- {{ qiZhandian }}
- <!-- <u-icon name="arrow-right" color="#999999"></u-icon> -->
- </view>
- </view>
- </view>
- </u-popup>
- <u-popup v-model="Authorization" mode="center" close-icon="close-circle" close-icon-pos="top-right" close-icon-color="#8f9298" close-icon-size="50">
- <view class="contentview">
- <view class="title">隐私保护指引</view>
- <view class="des" @click="openPrivacyContract">
- 在使用当前小程序服务之前,请仔细阅读
- <text style="color: #ff7f00">{{ privacyContractName }}</text>
- 。如你同意{{ privacyContractName }},请点击“同意”开始使用。
- </view>
- <view class="btns">
- <button class="item reject" @click="exitMiniProgram">拒绝</button>
- <button id="agree-btn" class="item agree" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
- </view>
- </view>
- </u-popup>
- <!-- 类型选择-->
- <u-modal v-model="showModal" title="选择订单类型" :show-cancel-button="true" @confirm="confirm()">
- <view class="slot-content">
- <u-radio-group v-model="indentTypeName" @change="radioGroupChange" width="50%">
- <u-radio v-for="(item, index) in indentTypeList" :key="index" :name="item.name" :disabled="item.disabled" @change="radioChange">
- {{ item.name }}
- </u-radio>
- </u-radio-group>
- </view>
- </u-modal>
- <!-- 收货码弹框 -->
- <u-popup v-model="shows" mode="center" border-radius="18" :closeable="closeable" close-icon="close-circle" close-icon-size="45" width="580rpx" height="400rpx">
- <view class="receipt_code">
- <view class="code_title">填写收货码</view>
- <u-input v-model="shouhuoma" type="text" placeholder="请输入收货码" :border="true" />
- <view class="sure" @click="querenSh">确定</view>
- </view>
- </u-popup>
- <!-- 确认收货弹出框 -->
- <u-popup
- v-model="alertPhone"
- mode="center"
- border-radius="18"
- :closeable="closeable"
- close-icon="close-circle"
- close-icon-size="45"
- width="680rpx"
- height="540rpx"
- @close="onclose"
- >
- <view class="receipt_code">
- <view class="phone_title">图片凭证</view>
- <view class="phone_title2">请在确认外卖送达后、通过拍照,进行现场还原</view>
- <view>
- <view class="flex" style="overflow: hidden; flex-wrap: wrap">
- <view v-if="goodsPicture.length">
- <view class="margin-top flex margin-right-sm flex-wrap">
- <view
- class="flex"
- style="width: 200rpx; height: 200rpx; margin-right: 2rpx; position: relative"
- v-for="(image, index) in goodsPicture"
- :key="index"
- >
- <image :src="image" style="width: 100%; height: 100%"></image>
- <view style="z-index: 9; position: absolute; top: -15rpx; right: -15rpx" @click="removeImg(index, 'lb')">
- <u-icon name="close-circle-fill" color="#FCD202" size="50rpx"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <view class="margin-top" @click="addImages(1)" v-if="goodsPicture.length <= 1">
- <view style="width: 200rpx; height: 200rpx; background: #f4f5f6" class="flex justify-center align-center">
- <view>
- <view class="text-center">
- <image :src="Tupian('/duanxin/addimg.png')" style="width: 65rpx; height: 55rpx"></image>
- </view>
- <view class="text-center text-black">添加图片</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- <view class="receipt_code" v-if="alertduan">
- <view class="code_title">是否确认送达</view>
- <view class="code_title2">已选订单:1单</view>
- <view class="code_title2">通知形式:短信</view>
- <view class="code_title2">通知内容:{{duanxin[0].templateContent.substring(0, 21)}}{{qiPhone}}</view>
- <view class="sure" @click="querenSh">确认送达</view>
- </view> -->
- <view class="sure" @click="querenduanxin">确认拍照</view>
- </view>
- </u-popup>
- <!-- 确认收货选择短信框 -->
- <u-popup
- v-model="alertduan"
- v-if="alertduan"
- mode="center"
- border-radius="18"
- :closeable="closeable"
- close-icon="close-circle"
- close-icon-size="45"
- width="680rpx"
- height="600rpx"
- @close="onclose2"
- >
- <view class="receipt_code">
- <view class="code_title">是否确认送达</view>
- <view class="code_title2">已选订单:1单</view>
- <view class="code_title2">通知形式:短信</view>
- <view class="code_title2">通知内容:{{ duanxin[0].templateContent.substring(0, 21) }}{{ qiPhone }}</view>
- <view class="sure" @click="querenSh">确认送达</view>
- </view>
- </u-popup>
- <!-- 当前订单无法接的筛选条件 -->
- <u-popup v-model="jiedanNo" mode="center" border-radius="18" width="680rpx" height="600rpx">
- <view style="margin-top: 30%; margin-left: 34%">
- <image style="width: 200rpx; height: 200rpx" :src="Tupian('/qishou/wufajie.png')"></image>
- <view>当前订单无法接单</view>
- </view>
- </u-popup>
- <!-- 当前订单已接收 -->
- <u-popup v-model="saomaPeisong" v-if="saomaPeisong" mode="center" border-radius="18" width="680rpx" height="600rpx">
- <view>
- <view class="order_box" v-for="(item, index) in list2" :key="index" @click="bindorderDetail(item.indentNumber, item.indentId)">
- <view class="order_success" v-if="item.indentState == '2'">
- <view class="order_name">待支付领取</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '3'">
- <view class="order_name">待取货</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '4'">
- <view class="order_name">配送中</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '5'">
- <view class="order_name">已送达,客户待确认</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '6'">
- <view class="order_name">客户已确认</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '7'">
- <view class="order_name">已完成</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <view class="order_success" v-if="item.indentState == '9'">
- <view class="order_name">已取消</view>
- <view class="order_data">{{ item.receivingTime }}</view>
- </view>
- <u-line color="#E6E6E6" />
- <view class="order_city">
- <view class="city_type">
- <view class="type_name" v-if="item.indentType == 1">帮我送</view>
- <view class="type_name" v-if="item.indentType == 2">帮我取</view>
- <view class="type_name" v-if="item.indentType == 3">同城帮买</view>
- <view class="type_name" v-if="item.indentType == 4">同城服务</view>
- <view class="type_name" v-if="item.indentType == 5">同城外卖</view>
- <view class="city_text" v-if="item.itemType">{{ item.itemType }}</view>
- </view>
- <view style="padding: 0 30rpx; font-size: 20px" v-if="item.orderPaySequence">#{{ item.orderPaySequence }}</view>
- <view style="padding: 0 30rpx; color: #ff7f00">{{ item.shopName }}</view>
- <view style="padding: 0 30rpx">订单编号:{{ item.indentNumber }}</view>
- <!-- 帮我送/帮我取 -->
- <view class="city_address" v-if="item.indentType == 1 || item.indentType == 2">
- <view class="fh_box">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;">#9</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城帮买 -->
- <view class="city_address" v-if="item.indentType == 3">
- <view class="fh_box" v-if="item.buy_type == 1">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城服务 -->
- <view class="city_address" v-if="item.indentType == 4">
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 同城外卖 -->
- <view class="city_address" v-if="item.indentType == 5">
- <view class="fh_box">
- <view class="fh_image">
- <image src="../../static/image/icon_f.png"></image>
- </view>
- <view class="box">
- <!-- <view style="padding:0 30rpx;font-size: 20px;" v-if="item.orderPaySequence">#{{item.orderPaySequence}}</view> -->
- <view class="fh_name">{{ item.shopAddressDetail }}</view>
- <view class="fh_type">
- {{ item.shopName }}
- <text>{{ item.shopPhone }}</text>
- </view>
- </view>
- </view>
- <view class="sh_box">
- <view class="sh_image">
- <image src="../../static/image/icon_s.png"></image>
- </view>
- <view class="box">
- <view class="sh_name">{{ item.userAddressDetail }}</view>
- <view class="sh_type">
- {{ item.userName }}
- <text>{{ item.userPhone }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <u-line color="#E6E6E6" />
- <view class="order_btn">
- <view class="btn1" v-if="item.indentState == '3'" @click.stop="quxiao(item.indentNumber, index)">取消订单</view>
- <view class="btn1" v-if="item.indentState == '6'">客户待确认</view>
- <view class="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId, index)">确认取货</view>
- <!-- <view class="flex"
- v-if="item.status == 3&&item.orderType==2&&item.autoSendOrder ==1 &&item.deliveryImgs==null">
- <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
- </view> -->
- <view class="flex" v-if="item.indentState == '4' || (item.indentState == '7' && item.deliveryImgs == null)">
- <view class="btn_pai" @click.stop="paiOrder(item)">拍照</view>
- </view>
- <view class="btn7" style="margin-left: 10px" v-if="item.indentState == '4'" @click.stop="zhuanOrder(item.indentId)">转单</view>
- <view class="btn2" v-if="item.indentState == '4'" @click.stop="shouhuo(item, index)">确认送达</view>
- <view class="btn2" v-if="item.indentState == '9'">已取消</view>
- </view>
- </view>
- <empty v-if="list2.length == 0"></empty>
- </view>
- </u-popup>
- </view>
- <!-- 悬浮球 -->
- <view style="width: 140rpx; height: 140rpx; position: fixed; bottom: 130px; right: 20rpx">
- <!-- 上线 -->
- <image v-if="!seen" :src="Tupian('/qishou/sao.png')" style="width: 100%; height: 100%" @click="saoma()" mode=""></image>
- <!-- 下线 -->
- <image v-if="seen" :src="Tupian('/qishou/sao.png')" style="width: 100%; height: 100%" @click="bindorder1()" mode=""></image>
- <image v-if="!seen" :src="Tupian('/qishou/lu.png')" style="width: 100%; height: 100%" @click="luma()" mode=""></image>
- <image v-if="seen" :src="Tupian('/qishou/lu.png')" style="width: 100%; height: 100%" @click="bindorder1()" mode=""></image>
- </view>
- <!-- 用于图片压缩的canvas画布 -->
- <canvas
- :style="{
- width: cw + 'px',
- height: cw + 'px',
- position: 'absolute',
- zIndex: -1,
- left: '-10000rpx',
- top: '-10000rpx'
- }"
- canvas-id="zipCanvas"
- ></canvas>
- <!--画布结束-->
- </view>
- </template>
- <script>
- import empty from '@/components/empty'
- import { requestAndroidPermission, gotoAppPermissionSetting } from '@/components/permission.js'
- import configdata from '@/common/config.js'
- import getLessLimitSizeImage from '@/utils/imageCompress.js'
- export default {
- components: {
- empty
- },
- onShareAppMessage(res) {
- //发送给朋友
- return {
- title: this.tuiguang,
- path: '/pages/index/index',
- imageUrl: this.tuiguangImg
- }
- },
- onShareTimeline(res) {
- //分享到朋友圈
- return {
- title: this.tuiguang,
- path: '/pages/index/index',
- imageUrl: this.tuiguangImg
- }
- },
- data() {
- return {
- Authorization: false,
- alertPhone: false, //确认收货拍照弹出框
- alertduan: false, //确认收货选择短信框
- saomaPeisong: false, //扫码后配送中的单
- privacyContractName: '',
- checkxdd: '否',
- xddNumber: 0,
- xddcheck: true,
- avatar: '', //头像
- // 接单设置弹框
- show: false,
- tuiguang: '',
- tuiguangImg: '',
- closeable: true,
- checked: false,
- check: true,
- showModal: false,
- // head
- tit: '休息中',
- seen: true,
- tab: [
- {
- name: '接单池'
- },
- {
- name: '待取货'
- },
- {
- name: '配送中'
- },
- {
- name: '我的订单'
- }
- ],
- current: 0,
- page1: 1,
- page2: 1,
- page3: 1,
- list_shanghu: [],
- list_box: [],
- list_tip: [],
- take_list: [],
- longitude: '', //经度
- latitude: '', //纬度
- indentType: null, //订单类型
- indentTypeName: '全部',
- indentTypeList: [
- {
- name: '全部',
- disabled: false
- },
- {
- name: '帮我取',
- disabled: false
- },
- {
- name: '帮我送',
- disabled: false
- },
- {
- name: '同城帮买',
- disabled: false
- },
- {
- name: '同城服务',
- disabled: false
- },
- {
- name: '同城外卖',
- disabled: false
- }
- ],
- quyu: '设置自己的常在位置',
- quyuLongitude: '',
- quyuLatitude: '',
- totalCount1: 0, //最后一页
- totalCount2: 0, //最后一页
- totalCount3: 0, //最后一页
- indentState: 3,
- // lists: {
- // list: []
- // },
- lists: [],
- shows: false,
- shouhuoma: '',
- userId: '', //用户id
- checkCertification: '', //是否实名认证
- receivingPettern: '2', //1近单模式 2同城模式
- province: '',
- city: '',
- district: '',
- time: '',
- distance: '',
- jiedanSuccess: '',
- jiedan: '',
- arr: [],
- showModal111: true,
- orderNum: 0,
- qiZhandian: '',
- goodsPicture: [],
- count: 3,
- duanxin: [], //发送的短信
- qiPhone: '', //骑手电话
- ifrenwu: false,
- shopId: '',
- shoudanma: '', //收单码
- jiedanNo: false, //当前不能接
- list2: [],
- //画板边长默认是屏幕宽度,正方形画布
- cw: uni.getSystemInfoSync().windowWidth,
- tianToken: '', //天地图token
- showOrder: false, //单个订单转单弹框
- phone: '',
- zhuanName: '', //转单人姓名
- indentId: '',
- keyword: '', //收货地址或收货人手机号码订单搜索
- showsZhuan: false, //一键转单弹框
- showsSelect: false, //选择转单人弹框
- indentIds: [], //选择的订单id数组
- checkedz: false, //是否全部选中
- riderId: '', //被转单骑手id
- riderName: '', //被转单骑手姓名
- //待转单列表
- statusDai: 'loadmore', // 状态-正在加载中
- pageDai: 1, // 当前页
- sizeDai: 10, // 每页数量
- pageCountDai: '', // 总页数
- listDai: [], //待转订单
- // 骑手转单人列表
- status: 'loadmore', // 状态-正在加载中
- pageRider: 1, // 当前页
- sizeRider: 10, // 每页数量
- pageCountRider: '', // 总页数
- keywordRider: '', //搜索关键字
- listRider: []
- }
- },
- onHide() {
- clearInterval(this.time)
- },
- onLoad() {
- console.log(this.shouhuoma, '码')
- uni.showLoading({
- title: '加载中...',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- var dizhi = uni.getStorageSync('dizhi')
- if (dizhi.longitude) {
- this.longitude = dizhi.longitude
- this.latitude = dizhi.latitude
- }
- this.getShanglist()
- // this.taskData()
- let that = this
- this.time = setInterval(() => {
- // this.getShanglist()
- // that.taskData()
- that.getLocation()
- }, 5000)
- // #ifdef MP-WEIXIN
- try {
- wx.getPrivacySetting({
- success: (res) => {
- console.log('是否需要授权:', res.needAuthorization, '隐私协议的名称为:', res.privacyContractName)
- if (res.needAuthorization) {
- that.privacyContractName = res.privacyContractName
- // this.$refs.popusAuthorization.open();
- that.Authorization = true
- }
- },
- fail: () => {},
- complete: () => {}
- })
- } catch (e) {
- //TODO handle the exception
- }
- // #endif
- },
- onShow() {
- let that = this
- that.getOrderNum()
- that.getZhandian()
- //获取天地图token
- that.$Request.getT('/app/common/type/417').then((res) => {
- if (res.code === 0) {
- that.tianToken = res.data.value
- }
- })
- //是否开启骑手新订单推送 340
- that.$Request.getT('/app/common/type/340').then((res) => {
- if (res.code === 0) {
- that.checkxdd = res.data.value
- }
- })
- //骑手新订单通知范围(km) 339
- that.$Request.getT('/app/common/type/339').then((res) => {
- if (res.code === 0) {
- that.xddNumber = res.data.value
- }
- })
- that.$Request.getT('/app/common/type/331').then((res) => {
- if (res.code === 0) {
- uni.setStorageSync('tuiguang', res.data.value)
- that.tuiguang = res.data.value
- }
- })
- that.$Request.getT('/app/common/type/332').then((res) => {
- if (res.code === 0) {
- uni.setStorageSync('tuiguangImg', res.data.value)
- that.tuiguangImg = res.data.value
- }
- })
- // 自动派单距离
- that.$Request.getT('/app/common/type/303').then((res) => {
- if (res.code === 0) {
- if (res.data.value > 1000) {
- that.distance = res.data.value / 1000 + '公里'
- } else if (res.data.value > 100) {
- that.distance = res.data.value + 'm'
- }
- }
- })
- //骑手端接单成功通知
- that.$Request.getT('/app/common/type/310').then((res) => {
- if (res.code === 0) {
- // this.jiedan = res.data.value
- that.arr.push(res.data.value)
- }
- })
- //骑手端订单完成通知
- that.$Request.getT('/app/common/type/311').then((res) => {
- if (res.code === 0) {
- // this.jiedanSuccess = res.data.value
- that.arr.push(res.data.value)
- }
- })
- //用户端骑手转单订单通知 338
- that.$Request.getT('/app/common/type/338').then((res) => {
- if (res.code === 0) {
- that.arr.push(res.data.value)
- }
- })
- //用户端骑手转单订单通知 335
- // that.$Request.getT('/app/common/type/335').then(res => {
- // if (res.code === 0) {
- // that.arr.push(res.data.value)
- // }
- // });
- that.avatar = uni.getStorageSync('avatar') ? uni.getStorageSync('avatar') : '../../static/logo.png'
- that.userId = uni.getStorageSync('userId')
- if (that.userId) {
- console.log(that.userId, '用户id')
- uni.getLocation({
- type: 'gcj02', //返回可以用于uni.openLocation的经纬度
- success: function (res) {
- console.log('当前位置的经度:' + res.longitude)
- console.log('当前位置的纬度:' + res.latitude)
- // uni.request({
- // url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
- // success: res => {
- // console.log(res,'ppp运行')
- // that.province = res.data.result.addressComponent.province
- // that.city = res.data.result.addressComponent.city
- // that.district = res.data.result.addressComponent.county
- // },
- // fail: err => {
- // console.log("请求超时");
- // console.log(err);
- // },
- // // complete: () => { //无论成功都会调用
- // // uni.hideLoading()
- // // }
- // })
- // let data = {
- // lat: res.latitude,
- // lng: res.longitude
- // }
- // that.$Request.getT('/app/Login/selectCity', data).then((res) => {
- // if (res.code == 0) {
- // console.log(res,'天天')
- // that.province = res.data.province
- // that.city = res.data.city
- // that.district = res.data.district
- // }
- // })
- },
- fail(e) {
- uni.hideLoading()
- uni.showModal({
- title: '温馨提示',
- content: '您的定位权限未开启,请开启后再来操作吧!',
- showCancel: true,
- cancelText: '取消',
- confirmText: '确认',
- success: (res) => {
- if (res.confirm) {
- // #ifdef MP-WEIXIN
- uni.openSetting({
- // 打开设置页
- success(rea) {
- console.log(rea.authSetting)
- }
- })
- // #endif
- // #ifdef APP-PLUS
- gotoAppPermissionSetting()
- // #endif
- }
- }
- })
- }
- })
- that.getUserInfo()
- }
- // #ifdef MP-WEIXIN
- //订阅
- if (that.userId) {
- if (that.showModal111) {
- that.openMsg()
- }
- }
- // #endif
- },
- methods: {
- //扫码取单,订单直接变为配送中
- saoma() {
- uni.showLoading({
- title: '扫码中...',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- var that = this
- wx.scanCode({
- onlyFromCamera: false, // 只允许从相机扫码
- success(res) {
- console.log('扫码成功:' + JSON.stringify(res) + res.result)
- that.shoudanma = res.result
- setTimeout(function () {
- that.saomaCha()
- }, 700)
- //扫码成功并且有订单接单成功,变为配送中
- //扫码成功后调用收单接口,判断是否成功和是否为配送中
- // that.current = 2
- // console.log(that.current,'that.current')
- //当前订单无法接
- // that.jiedanNo=true
- // 扫码成功后 在此处理接下来的逻辑
- // that.setData({
- // shoudanma: res.result
- // })
- }
- })
- uni.hideLoading()
- },
- //录码收单
- luma() {
- uni.navigateTo({
- url: '/pages/index/luma'
- })
- },
- // 扫码查询订单列表
- saomaCha() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- var that = this
- that.list2 = []
- that.$Request
- .getT(`/app/tbindent/get-by-code/${that.shoudanma}`, {
- ///app/tbindent/selectTbIndentPage
- // page: 1,
- // limit: 10,
- // acquireCode: that.shoudanma
- })
- .then((res) => {
- console.log(res, 'lk')
- uni.hideLoading()
- if (res.data) {
- if (res.data.length > 0) {
- for (var i = 0; i < res.data.length; i++) {
- if (res.data.distancess > 1000) {
- res.data.distancess = Number(res.data.distancess / 1000).toFixed(2) + 'km'
- } else {
- if (res.data.distancess == '0') {
- res.data.distancess = '0m'
- } else {
- res.data.distancess = Number(res.data.distancess).toFixed(1) + 'm'
- }
- }
- if (res.data.distancessd > 1000) {
- res.data.distancessd = Number(res.data.distancessd / 1000).toFixed(2) + 'km'
- } else {
- if (res.data.distancessd == '0') {
- res.data.distancessd = '0m'
- } else {
- res.data.distancessd = Number(res.data.distancessd).toFixed(1) + 'm'
- }
- }
- }
- }
- var saomajie = []
- saomajie.push(res.data)
- that.list2.push(res.data)
- console.log(saomajie, '列表')
- // if (that.list2.length > 0) {
- if (that.list2[0].indentState == '2' || that.list2[0].indentState == '3') {
- //收单
- that.shouorder()
- } else if (that.list2[0].indentState == '4') {
- that.saomaPeisong = true
- } else {
- that.jiedanNo = true
- that.shoudanma = ''
- }
- // } else {
- // // that.saomaPeisong=true
- // that.jiedanNo = true
- // that.shoudanma = ''
- // }
- } else if (res.msg == '当前订单无法接单') {
- that.jiedanNo = true
- that.shoudanma = ''
- }
- that.$forceUpdate()
- uni.stopPullDownRefresh()
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- // 收单
- shouorder() {
- let that = this
- if (that.checkCertification == 0) {
- uni.showToast({
- title: '实名认证审核中,无法收单',
- icon: 'none'
- })
- return
- }
- if (that.checkCertification == 2) {
- uni.showToast({
- title: '实名认证未通过,无法收单',
- icon: 'none'
- })
- return
- }
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- console.log('用户点击确定')
- that.$Request
- .putJson(`/app/tbindent/receive/${that.shoudanma}`, {
- ///app/tbindent/orderIndentReceiving
- // acquireCode: that.shoudanma
- })
- .then((res) => {
- console.log(res, 'ppp')
- if (res.code == 0) {
- uni.showToast({
- title: '收单成功',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.current = 2
- that.indentState = 4
- that.taskDataJ()
- }, 1200)
- } else {
- console.log('失败:', res.data)
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- // that.taskData()
- }
- // 加载提示关闭
- uni.hideLoading()
- that.shouhuoma = ''
- })
- },
- // 打开隐私协议页面
- openPrivacyContract() {
- let that = this
- wx.openPrivacyContract({
- fail: () => {
- that.$queue.showToast('遇到错误无法打开!')
- }
- })
- },
- // 拒绝隐私协议
- exitMiniProgram() {
- // 直接退出小程序
- wx.exitMiniProgram()
- },
- // 同意隐私协议
- handleAgreePrivacyAuthorization() {
- // this.$refs.popusAuthorization.close();
- this.Authorization = false
- let that = this
- uni.getLocation({
- type: 'gcj02', //返回可以用于uni.openLocation的经纬度
- success: function (res) {
- console.log('当前位置的经度:' + res.longitude)
- console.log('当前位置的纬度:' + res.latitude)
- // uni.request({
- // url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
- // success: res => {
- // console.log(res,'ppp运行')
- // that.province = res.data.result.addressComponent.province
- // that.city = res.data.result.addressComponent.city
- // that.district = res.data.result.addressComponent.county
- // },
- // fail: err => {
- // console.log("请求超时");
- // console.log(err);
- // },
- // // complete: () => { //无论成功都会调用
- // // uni.hideLoading()
- // // }
- // })
- // let data = {
- // lat: res.latitude,
- // lng: res.longitude
- // }
- // that.$Request.getT('/app/Login/selectCity', data).then((res) => {
- // if (res.code == 0) {
- // that.province = res.data.province
- // that.city = res.data.city
- // that.district = res.data.district
- // }
- // })
- },
- fail(e) {
- uni.hideLoading()
- uni.showModal({
- title: '温馨提示',
- content: '您的定位权限未开启,请开启后再来操作吧!',
- showCancel: true,
- cancelText: '取消',
- confirmText: '确认',
- success: (res) => {
- if (res.confirm) {
- // #ifdef MP-WEIXIN
- uni.openSetting({
- // 打开设置页
- success(rea) {
- console.log(rea.authSetting)
- }
- })
- // #endif
- // #ifdef APP-PLUS
- gotoAppPermissionSetting()
- // #endif
- }
- }
- })
- }
- })
- },
- //获取最大接单数
- getOrderNum() {
- // orderNum
- this.$Request.get('/app/common/type/342').then((res) => {
- if (res.code == 0 && res.data.value) {
- this.orderNum = res.data.value
- }
- })
- },
- //获取骑手所在站点
- getZhandian() {
- let data = {
- userId: uni.getStorageSync('userId')
- }
- this.$Request.get('/admin/riderStation/getRiderStationName', data).then((res) => {
- console.log('骑手站点', this.userId, res)
- if (res.code == 0 && res.data.stationName) {
- this.qiZhandian = res.data.stationName
- }
- })
- },
- // 上传骑手位置
- getLocation() {
- if (this.userId) {
- let data = {
- lng: this.longitude,
- lat: this.latitude,
- userId: this.userId,
- province: this.province,
- city: this.city,
- district: this.district
- }
- this.$Request.getT('/timedtask/riderLocation', data).then((res) => {
- if ((res.code = 0)) {
- console.log('上传骑手位置')
- }
- })
- }
- },
- switchxdd(e) {
- this.xddcheck = e
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- let isSendMsg = 1
- if (!this.xddcheck) {
- isSendMsg = 2
- }
- let data = {
- isSendMsg: isSendMsg
- }
- this.$Request.postJson('/app/user/updateUser', data).then((res) => {
- if (res.code == 0) {
- }
- })
- },
- //获取用户信息
- getUserInfo() {
- let that = this
- that.$Request.getT('/app/userinfo/findUserInfoById').then((res) => {
- if (res.code == 0 && res.data) {
- that.seen = res.data.onLineFlag == 1 ? false : true
- // that.xddcheck = res.data.isSendMsg == 2 ? false : true;
- that.checkCertification = res.data.checkCertification
- this.qiPhone = res.data.phone
- uni.setStorageSync('phone', res.data.phone)
- uni.setStorageSync('checkCertification', res.data.checkCertification)
- if (that.seen) {
- that.tit = '休息中'
- } else {
- that.tit = '接单中'
- // that.locationUpdate()
- }
- uni.getLocation({
- type: 'wgs84',
- success: (res) => {
- console.log('当前位置的经度:' + res.longitude)
- console.log('当前位置的纬度:' + res.latitude)
- that.longitude = res.longitude
- that.latitude = res.latitude
- that.locationUpdate(that.longitude, that.latitude)
- if (that.current == 0) {
- if (!that.ifrenwu) {
- this.getShanglist()
- } else {
- that.taskData()
- }
- //
- } else if (that.current == 1) {
- that.indentState = 3
- that.taskDataJ()
- this.indentIds = []
- this.checkedz = false
- } else if (that.current == 2) {
- that.indentState = 4
- that.taskDataJ()
- this.indentIds = []
- this.checkedz = false
- }
- }
- })
- }
- })
- },
- // 顶部tab切换
- change(index) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- this.current = index
- if (index == 0) {
- //接单池
- uni.showLoading({
- title: '加载中...',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- this.page1 = 1
- this.ifrenwu = false
- this.getShanglist()
- // this.taskData()
- } else if (index == 1) {
- //待取货
- uni.showLoading({
- title: '加载中...',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- this.page3 = 1
- this.indentState = 3
- this.taskDataJ()
- this.indentIds = []
- this.checkedz = false
- } else if (index == 2) {
- //配送中
- uni.showLoading({
- title: '加载中...',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- this.page3 = 1
- this.indentState = 4
- this.taskDataJ()
- this.indentIds = []
- this.checkedz = false
- } else if (index == 3) {
- //全部订单
- // uni.showLoading({
- // title: '加载中...',
- // mask: true, // 是否显示透明蒙层,防止触摸穿透
- // })
- this.current = 0
- uni.navigateTo({
- url: '/pages/riderMy/order'
- })
- }
- },
- // 上下线
- bindup() {
- let that = this
- if (!that.userId) {
- uni.navigateTo({
- url: '/pages/login/login'
- })
- return
- }
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- let content = ''
- if (that.seen) {
- content = '确认开始接单吗'
- } else {
- content = '确认停止接单吗'
- }
- uni.showModal({
- title: '提示',
- content: content,
- success: function (res) {
- if (res.confirm) {
- that.$Request
- .postT('/app/userinfo/updateOnLine', {
- onLineFlag: that.seen ? 1 : 2
- })
- .then((res) => {
- that.getUserInfo()
- })
- }
- }
- })
- },
- // 更新骑手位置信息
- locationUpdate(lng, lat) {
- let that = this
- // setInterval(function() {
- that.$Request
- .postT('/app/userinfo/updateCoordinate', {
- lng: lng,
- lat: lat
- })
- .then((res) => {
- console.log('位置信息更新', res)
- if (!that.ifrenwu) {
- this.getShanglist()
- } else {
- that.taskData()
- }
- // that.taskData()
- })
- // }, 600000)
- },
- //跳转某商家订单
- dingdetails(shopId) {
- this.shopId = shopId
- this.ifrenwu = true
- this.taskData()
- },
- //返回商户
- fanhuiShang() {
- this.ifrenwu = false
- this.getShanglist()
- },
- // 跳转订单详情
- binddetails(id, types) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- console.log('```', id, types)
- if (types == 1 || types == 2 || types == 3 || types == 5) {
- uni.navigateTo({
- url: '/pages/index/buyOrder/buyOrder?id=' + id
- })
- } else {
- uni.navigateTo({
- url: '/pages/index/cityOrder/cityOrder?id=' + id
- })
- }
- },
- // 接单
- bindorder(item, index) {
- let that = this
- if (!that.userId) {
- uni.showModal({
- title: '提示',
- content: '请先登录后再接单',
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定')
- uni.navigateTo({
- url: '/pages/login/login'
- })
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- return
- }
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- if (that.checkCertification == null) {
- uni.showModal({
- title: '提示',
- content: '请先实名认证后再接单',
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定')
- uni.navigateTo({
- url: '/pages/riderMy/approve/approve'
- })
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- return
- }
- if (that.checkCertification == 0) {
- uni.showToast({
- title: '实名认证审核中,无法接单',
- icon: 'none'
- })
- return
- }
- if (that.checkCertification == 2) {
- uni.showToast({
- title: '实名认证未通过,无法接单',
- icon: 'none'
- })
- return
- }
- uni.showModal({
- title: '提示',
- content: '确认接单吗',
- success: function (res) {
- if (res.confirm) {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- console.log('用户点击确定', item.indentNumber)
- that.$Request
- .postT('/app/tbindent/indentReceiving', {
- indentNumber: item.indentNumber
- })
- .then((res) => {
- console.log(res, 'kkk')
- if (res.code == 0) {
- // that.page1 = 1
- // this.getShanglist()
- // that.taskData()
- uni.showToast({
- title: '接单成功',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- //刷新当前列,不返回分页的第一条
- that.list_box.splice(index, 1)
- }, 1200)
- } else {
- console.log('失败:', res.data)
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- if (!that.ifrenwu) {
- that.page1 = 1
- that.getShanglist()
- } else {
- that.page2 = 1
- that.taskData()
- }
- }, 1200)
- // that.getShanglist()
- // that.taskData()
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- },
- // 未登录接单
- bindorder1() {
- uni.showToast({
- title: '上线后方可接单',
- icon: 'none'
- })
- },
- bindridermy() {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- uni.navigateTo({
- url: '/pages/riderMy/riderMy'
- })
- },
- onshow() {
- console.log('第一个')
- this.show = true
- },
- //获取接单池各商家列表
- getShanglist() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- uni.request({
- url:
- this.config('ROOAA') +
- 'geocoder?postStr={%27ver%22:%221%22,%22lon%22:' +
- this.longitude +
- ',%22lat%22:' +
- this.latitude +
- '}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
- success: (res) => {
- console.log(res, 'ppp运行')
- if (res.data.result) {
- this.province = res.data.result.addressComponent.province
- this.city = res.data.result.addressComponent.city
- this.district = res.data.result.addressComponent.county
- }
- var daa = {
- buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
- indentType: this.indentType,
- limit: 10,
- page: this.page1,
- receivingPattern: this.receivingPettern,
- riderLat: this.latitude,
- riderLng: this.longitude,
- city: this.city
- }
- console.log('之前', daa)
- this.$Request
- .postJson('/app/tbindent/find-new-indent-group-by-shop', {
- buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
- indentType: this.indentType,
- limit: 10,
- page: this.page1,
- receivingPattern: this.receivingPettern,
- riderLat: this.latitude,
- riderLng: this.longitude,
- city: this.city
- })
- .then((res) => {
- uni.hideLoading()
- console.log('接单池商家', res)
- if (res.data) {
- if (res.data.list.length > 0) {
- }
- this.totalCount1 = res.data.totalCount
- if (this.page1 == 1) {
- this.list_shanghu = res.data.list
- } else {
- this.list_shanghu = this.list_shanghu.concat(res.data.list)
- }
- console.log(this.list_shanghu, 'this.list_shanghu')
- }
- this.$forceUpdate()
- uni.stopPullDownRefresh()
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- fail: (err) => {
- console.log('请求超时')
- console.log(err)
- var daa = {
- buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
- indentType: this.indentType,
- limit: 10,
- page: this.page1,
- receivingPattern: this.receivingPettern,
- riderLat: this.latitude,
- riderLng: this.longitude,
- city: this.city
- }
- console.log('之前', daa)
- this.$Request
- .postJson('/app/tbindent/find-new-indent-group-by-shop', {
- buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
- indentType: this.indentType,
- limit: 10,
- page: this.page1,
- receivingPattern: this.receivingPettern,
- riderLat: this.latitude,
- riderLng: this.longitude,
- city: this.city
- })
- .then((res) => {
- uni.hideLoading()
- console.log('接单池商家', res)
- if (res.data) {
- if (res.data.list.length > 0) {
- }
- this.totalCount1 = res.data.totalCount
- if (this.page1 == 1) {
- this.list_shanghu = res.data.list
- } else {
- this.list_shanghu = this.list_shanghu.concat(res.data.list)
- }
- console.log(this.list_shanghu, 'this.list_shanghu')
- }
- this.$forceUpdate()
- uni.stopPullDownRefresh()
- // 加载提示关闭
- uni.hideLoading()
- })
- }
- // complete: () => { //无论成功都会调用
- // uni.hideLoading()
- // }
- })
- },
- // 获取新任务数据
- taskData() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- this.$Request
- .postJson('/app/tbindent/find-new-indent', {
- buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
- page: this.page2,
- limit: 10,
- receivingPattern: this.receivingPettern,
- indentType: this.indentType,
- shopId: this.shopId,
- riderLat: this.latitude,
- riderLng: this.longitude,
- city: this.city
- })
- .then((res) => {
- uni.hideLoading()
- if (res.data) {
- if (res.data.list.length > 0) {
- for (var i = 0; i < res.data.list.length; i++) {
- if (res.data.list[i].distancess > 1000) {
- res.data.list[i].distancess = Number(res.data.list[i].distancess / 1000).toFixed(2) + 'km'
- } else {
- if (res.data.list[i].distancess == '0') {
- res.data.list[i].distancess = '0m'
- } else {
- res.data.list[i].distancess = Number(res.data.list[i].distancess).toFixed(1) + 'm'
- }
- }
- // if (res.data.list[i].distance > 1000) {
- // res.data.list[i].distance = Number((res.data.list[i].distance / 1000)).toFixed(2) + "km"
- // } else {
- // if (res.data.list[i].distance == 0) {
- // res.data.list[i].distance = "0m";
- // } else {
- // res.data.list[i].distance = Number(res.data.list[i].distance).toFixed(1) + "m";
- // }
- // }
- if (res.data.list[i].distancessd > 1000) {
- res.data.list[i].distancessd = Number(res.data.list[i].distancessd / 1000).toFixed(2) + 'km'
- } else {
- if (res.data.list[i].distancessd == '0') {
- res.data.list[i].distancessd = '0m'
- } else {
- res.data.list[i].distancessd = Number(res.data.list[i].distancessd).toFixed(1) + 'm'
- }
- }
- }
- }
- this.totalCount2 = res.data.totalCount
- if (this.page2 == 1) {
- this.list_box = res.data.list
- } else {
- this.list_box = this.list_box.concat(res.data.list)
- }
- console.log('list_box', this.list_box)
- }
- this.$forceUpdate()
- uni.stopPullDownRefresh()
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- // 获取待取货和配送中订单
- taskDataJ() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- console.log('this.keyword', this.keyword)
- this.$Request
- .getT('/app/tbindent/findRiderIndent', {
- page: this.page3,
- limit: 10,
- indentState: this.indentState,
- keyword: this.keyword //收货地址或收货人手机号
- // ol: this.longitude,
- // od: this.latitude
- })
- .then((res) => {
- this.totalCount3 = res.data.totalCount
- if (this.page3 == 1) {
- this.lists = res.data.list
- } else {
- this.lists = this.lists.concat(res.data.list)
- }
- for (var i in this.lists) {
- if (this.lists[i].distanceInitial > 1000) {
- this.lists[i].distanceInitials = (Number(this.lists[i].distanceInitial) / 1000).toFixed(2)
- }
- if (this.lists[i].distance > 1000) {
- this.lists[i].distances = (Number(this.lists[i].distance) / 1000).toFixed(2)
- }
- }
- this.lists.map((item) => {
- item.checkeds = false
- })
- console.log('lists', this.lists)
- uni.stopPullDownRefresh()
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- switch1(e) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- this.checked = e
- this.check = !this.check
- if (e == true) {
- this.receivingPettern = '1'
- }
- if (e == false) {
- // this.checked = false
- // this.check = true
- this.receivingPettern = '2'
- }
- console.log(e)
- },
- switch2(e) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- console.log(e)
- this.check = e
- this.checked = !this.check
- if (e == true) {
- // this.checked = true
- // this.check = false
- this.receivingPettern = '2'
- }
- if (e == false) {
- // this.checked = false
- // this.check = true
- this.receivingPettern = '1'
- }
- },
- // 打开类型选择模态框
- showModals() {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- this.showModal = true
- },
- radioChange(e) {
- // console.log(e);
- },
- radioGroupChange(e) {
- console.log('······2', e)
- this.indentTypeName = e
- },
- // 点击确定按钮
- confirm() {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- if (this.indentTypeName == '全部') {
- this.indentType = null
- }
- if (this.indentTypeName == '帮我取') {
- this.indentType = 2
- }
- if (this.indentTypeName == '帮我送') {
- this.indentType = 1
- }
- if (this.indentTypeName == '同城帮买') {
- this.indentType = 3
- }
- if (this.indentTypeName == '同城服务') {
- this.indentType = 4
- }
- if (this.indentTypeName == '同城外卖') {
- this.indentType = 5
- }
- },
- // 获取地址
- dizhis() {
- var that = this
- uni.chooseLocation({
- success: function (res) {
- console.log(res, 'pgy')
- uni.setStorageSync('dizhi', res)
- that.quyu = res.name
- that.quyuLongitude = res.longitude
- that.quyuLatitude = res.latitude
- }
- })
- },
- // 关闭底部弹出层
- closePopup() {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- if (this.quyuLongitude != '') {
- this.longitude = this.quyuLongitude
- this.latitude = this.quyuLatitude
- }
- if (!this.ifrenwu) {
- this.page1 = 1
- this.getShanglist()
- } else {
- this.page2 = 1
- this.taskData()
- }
- },
- // 订单详情
- bindorderDetail(indentNumber, orderId) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- console.log(indentNumber, orderId)
- uni.navigateTo({
- url: '/pages/index/orderdetail/orderdetail?orderId=' + orderId + '&id=' + indentNumber
- })
- },
- // 取消订单
- quxiao(indentNumber, index) {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- let that = this
- uni.showModal({
- title: '提示',
- content: '取消订单将会被扣保证金',
- success: function (res) {
- if (res.confirm) {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- console.log('用户点击确定')
- that.$Request
- .postT('/app/tbindent/riderCancleIndent', {
- indentNumber: indentNumber
- })
- .then((res) => {
- console.log(res)
- if (res.code == 0) {
- uni.showToast({
- title: '订单已取消',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- //刷新当前列,不返回分页的第一条
- that.lists.splice(index, 1)
- }, 1200)
- // that.taskDataJ()
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.taskDataJ()
- }, 1200)
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- },
- quhuo(indentId, index) {
- let that = this
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- uni.showModal({
- title: '提示',
- content: '确认到取货吗',
- success: function (res) {
- if (res.confirm) {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- that.$Request
- .postJson('/app/tbindent/riderBuyGoods', {
- indentId: indentId,
- indentState: '4'
- })
- .then((res) => {
- console.log(res)
- if (res.code == 0) {
- uni.showToast({
- title: '确认取货成功',
- icon: 'none'
- })
- // that.indentState = 4
- setTimeout(function () {
- // that.taskDataJ()
- //刷新当前列,不返回分页的第一条
- that.lists.splice(index, 1)
- // that.current = 2
- }, 1200)
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- setTimeout(function () {
- that.taskDataJ()
- // that.current = 2
- }, 1200)
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- } else {
- }
- }
- })
- },
- //拍照
- paiOrder(e) {
- if (this.shoudanma != '') {
- this.saomaPeisong = false
- this.indentNumber = e.indentNumber
- this.orderId = e.orderId
- this.alertPhone = true
- return
- }
- this.indentNumber = e.indentNumber
- this.orderId = e.orderId
- this.alertPhone = true
- },
- shouhuo(e, index) {
- if (this.shoudanma != '') {
- this.saomaPeisong = false
- this.orderId = e.orderId
- this.querenduanxinList()
- //需拍照的弹出框
- this.alertduan = true
- return
- }
- this.indentNumber = e.indentNumber
- // if(e.indentType==5){
- // this.querenSh()
- // }
- if (e.itemCodeFlag == 0 && e.indentType != 5) {
- this.shows = true
- } else {
- this.orderId = e.orderId
- this.querenduanxinList()
- //需拍照的弹出框
- this.alertduan = true
- // this.querenSh()
- }
- },
- // 图片上传
- addImages(e) {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- if (e == 1) {
- var num = this.goodsPicture.length
- this.count = 2 - num
- }
- let that = this
- uni.chooseImage({
- count: this.count,
- sourceType: ['camera', 'album'],
- success: (res) => {
- for (let i = 0; i < res.tempFiles.length; i++) {
- //这里的id和页面中写的html代码的canvas的id要一致
- let canvasId = 'zipCanvas'
- //原图的路径
- let imagePath = res.tempFiles[i].path
- //大小限制
- let limitSize = 1024 * 2
- //初始绘画区域是画布自身的宽度也就是屏幕宽度
- let drawWidth = uni.getSystemInfoSync().windowWidth
- let that = this
- let token = uni.getStorageSync('token')
- getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
- uni.showLoading({
- title: '上传中'
- })
- uni.uploadFile({
- url: that.config('APIHOST1') + '/app/new-file/upload',
- filePath: resPath,
- header: {
- token: token
- },
- name: 'file',
- success: (uploadFileRes) => {
- if (e == 1) {
- if (that.goodsPicture.length < 2) {
- that.goodsPicture.push(JSON.parse(uploadFileRes.data).data)
- }
- }
- uni.hideLoading()
- },
- fail: () => {
- uni.showToast({
- title: '上传失败',
- icon: 'error'
- })
- }
- })
- })
- }
- }
- })
- },
- // 图片删除
- removeImg(index, texts) {
- if (texts == 'lb') {
- this.goodsPicture.splice(index, 1)
- }
- },
- config: function (name) {
- var info = null
- if (name) {
- var name2 = name.split('.') //字符分割
- if (name2.length > 1) {
- info = configdata[name2[0]][name2[1]] || null
- } else {
- info = configdata[name] || null
- }
- if (info == null) {
- let web_config = cache.get('web_config')
- if (web_config) {
- if (name2.length > 1) {
- info = web_config[name2[0]][name2[1]] || null
- } else {
- info = web_config[name] || null
- }
- }
- }
- }
- return info
- },
- // 监听拍照框关闭
- onclose() {
- this.alertPhone = false
- this.alertduan = false
- this.goodsPicture = []
- },
- //确认上传图片
- querenduanxin() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- var tupian = this.goodsPicture.toString()
- var indentNumber = this.indentNumber
- this.$Request
- .putT(`/app/tbindent/delivery-img/${indentNumber}`, {
- userId: uni.getStorageSync('userId'),
- // indentNumber:this.indentNumber,
- imgs: tupian
- })
- .then((res) => {
- console.log(res, 'img')
- if (res.code == 0) {
- if (this.shoudanma != '') {
- this.alertPhone = false
- this.saomaCha()
- // this.saomaPeisong=true
- }
- this.alertPhone = false
- uni.showToast({
- title: '图片上传完成',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {}, 1200)
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- // 获取确认送达短信模板
- querenduanxinList() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- // this.$Request.postT('/app/tb-indent-sms/template', {
- this.$Request
- .getT('/app/tb-indent-sms/template', {
- // indentNumber: this.indentNumber,
- // itemCode: this.shouhuoma
- })
- .then((res) => {
- console.log(res)
- this.duanxin = res.data.list
- if (res.code == 0) {
- this.page1 = 1
- this.page2 = 1
- this.page3 = 1
- // this.alertPhone = false
- this.alertduan = true
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- querenSh() {
- // #ifdef MP-WEIXIN
- if (uni.getStorageSync('sendMsg')) {
- uni.requestSubscribeMessage({
- tmplIds: this.arr,
- success(re) {
- // console.log(re,'**********')
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- }
- // #endif
- let that = this
- // var date = new Date();
- // var year = date.getFullYear();
- // let Rcode = year + that.shouhuoma
- // that.$Request.postT('/app/tbindent/riderDelivery', {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- if (this.shoudanma != '') {
- console.log('1aaaaa')
- this.$Request
- .postJson('/app/tbindent/finish-order', {
- ///app/tbindent/orderRiderDelivery
- smsTemplateId: that.duanxin[0].id,
- // indentNumber: that.indentNumber,
- acquireCode: that.shoudanma
- // imgs:'',
- // itemCode: Rcode
- // itemCode: that.shouhuoma
- })
- .then((res) => {
- console.log(res)
- if (res.code == 0) {
- uni.showToast({
- title: '订单完成',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.alertduan = false
- that.taskDataJ()
- }, 1200)
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- // 加载提示关闭
- uni.hideLoading()
- that.shouhuoma = ''
- })
- return
- }
- console.log('2bbbbb')
- this.$Request
- .postJson('/app/tbindent/riderDelivery', {
- smsTemplateId: this.duanxin[0].id,
- indentNumber: that.indentNumber,
- // itemCode: Rcode
- itemCode: that.shouhuoma
- })
- .then((res) => {
- console.log(res)
- that.shouhuoma = ''
- if (res.code == 0) {
- this.alertduan = false
- // this.alertduan = false
- this.shows = false
- uni.showToast({
- title: '订单完成',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.alertduan = false
- // this.alertduan = false
- that.shows = false
- that.taskDataJ()
- }, 1200)
- // this.lists = []
- // that.taskDataJ()
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.taskDataJ()
- }, 1200)
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- // 开启订阅消息
- openMsg() {
- console.log('订阅消息')
- var that = this
- uni.getSetting({
- withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
- success(ret) {
- console.log(ret.subscriptionsSetting, '------------------')
- // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
- if (ret.subscriptionsSetting.itemSettings) {
- uni.setStorageSync('sendMsg', true)
- uni.openSetting({
- // 打开设置页
- success(rea) {
- console.log(rea.authSetting)
- }
- })
- } else {
- // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
- uni.setStorageSync('sendMsg', false)
- uni.showModal({
- title: '提示',
- content: '为了更好的体验,请绑定消息推送',
- confirmText: '确定',
- cancelText: '取消',
- success: function (res) {
- if (res.confirm) {
- wx.requestSubscribeMessage({
- tmplIds: that.arr,
- success(re) {
- var datas = JSON.stringify(re)
- if (datas.indexOf('accept') != -1) {
- console.log(re)
- // uni.setStorageSync('sendMsg', true)
- }
- },
- fail: (res) => {
- console.log(res)
- }
- })
- // uni.setStorageSync('sendMsg', true)
- that.showModal111 = false
- } else if (res.cancel) {
- console.log('取消')
- // uni.setStorageSync('sendMsg', false)
- that.showModal111 = true
- }
- }
- })
- }
- }
- })
- },
- //单个订单转单
- zhuanOrder(indentId) {
- this.saomaPeisong = false
- this.phone = ''
- this.zhuanName = ''
- this.indentId = indentId
- this.showOrder = true
- },
- zhuandan() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- this.$Request
- .postT('/app/tbindent/transferOfOrder', {
- indentId: this.indentId,
- phone: this.phone,
- realName: this.zhuanName
- })
- .then((res) => {
- if (res.code == 0) {
- this.phone = ''
- this.$queue.setData('zhuandan', this.indentId)
- uni.showToast({
- title: '转单成功',
- icon: 'none'
- })
- setTimeout((d) => {
- //刷新当前列,不返回分页的第一条
- that.lists.splice(index, 1)
- }, 1000)
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- //收货地址或收货人手机号搜索
- searchKeyword(e) {
- this.keyword = e.detail.value
- // this.taskDataJ()
- },
- //搜索框回车
- shouhuiche() {
- this.taskDataJ()
- },
- //一键批量转单弹框
- allZhuan() {
- this.pageDai = 1
- this.showsZhuan = true
- this.getDaizhuan()
- },
- //未选择时转单
- allZhuanNo() {
- uni.showToast({
- title: '请先选择需要转的订单!',
- icon: 'none'
- })
- },
- // 选中某个复选框时,触发
- checkboxChange(e) {
- e.checkeds = !e.checkeds
- if (this.indentIds.indexOf(e.indentId) == -1) {
- //如果没有选中则把indentId增加到数组中
- this.indentIds.push(e.indentId)
- } else {
- //如果找到了则把indentId删除
- this.indentIds.splice(this.indentIds.indexOf(e.indentId), 1)
- }
- if (this.indentIds.length == this.lists.length) {
- //判断是否全部选中
- this.checkedz = true
- } else {
- this.checkedz = false
- }
- console.log(this.indentIds, 'this.indentIds111')
- },
- //全选
- checkboxChanges() {
- this.indentIds = []
- if (this.checkedz == false) {
- //全选(把总复选框选中并把goodsid赋给数组)
- this.checkedz = true
- this.lists.map((item) => {
- item.checkeds = true
- this.indentIds.push(item.indentId)
- })
- console.log(this.lists)
- console.log(this.indentIds, 'this.indentIds')
- } else {
- //全不选
- this.checkedz = false
- this.lists.map((item) => {
- item.checkeds = false
- })
- }
- },
- //待转单分页数据
- getDaizhuan() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- console.log('listDaiaaaaa', this.pageDai, this.sizeDai, this.indentIds.join(','))
- this.$Request
- .getT('/app/tbindent/findRiderIndentByIds', {
- page: this.pageDai,
- limit: this.sizeDai,
- indentIds: this.indentIds.join(',') //待转单订单indentid
- })
- .then((res) => {
- console.log('listDai', res)
- this.pageCountDai = res.data.totalCount
- if (this.pageDai == 1) {
- this.listDai = res.data.list
- } else {
- this.listDai = this.listDai.concat(res.data.list)
- }
- // console.log('listDai', this.listDai)
- // res.page -- 后端返回的当前页,
- // res.pageCount -- 后端返回的总页数
- if (this.listDai.length == 0 || res.data.currPage == res.data.totalPage) {
- this.statusDai = 'nomore'
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- // 待转单数据滚动到底部
- scrolltolowerDai(e) {
- if (this.listDai.length < this.pageCountDai) {
- this.pageDai++
- this.getDaizhuan()
- } else {
- this.statusDai = 'nomore'
- }
- },
- //删除待转单
- deleteDing(e, index) {
- let that = this
- //删除当前列,不返回分页的第一条
- that.listDai.splice(index, 1) //this.indentIds.indexOf(e.indentId)
- that.indentIds.splice(index, 1)
- if (that.indentIds.length == 0) {
- that.lists.map((item) => {
- item.checkeds = false
- })
- that.checkedz = false
- } else {
- that.lists.map((item) => {
- if (item.indentId == e.indentId) {
- item.checkeds = false
- }
- })
- that.checkedz = false
- }
- },
- //批量转单
- transformOrder() {
- let that = this
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- if (that.indentIds.length == 0) {
- uni.showToast({
- title: '待转订单不能为空!',
- icon: 'none'
- })
- } else if (that.riderId == '') {
- uni.showToast({
- title: '请选择骑手!',
- icon: 'none'
- })
- } else {
- var daa = {
- indentIds: that.indentIds, //数据ID集合
- riderId: that.riderId //被转单骑手ID
- }
- console.log('转单之前', daa)
- that.$Request
- .postJson('/app/tbindent/transferOfOrders', {
- indentIds: that.indentIds, //数据ID集合
- riderId: that.riderId //被转单骑手ID
- })
- .then((res) => {
- if (res.code == 0) {
- uni.showToast({
- title: '批量转单成功',
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.riderId = ''
- that.riderName = ''
- that.indentIds = []
- that.checkedz = false
- that.showsZhuan = false
- that.taskDataJ()
- }, 1200)
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- // 在toast显示2000毫秒(2秒)后执行操作
- setTimeout(function () {
- that.riderId = ''
- that.riderName = ''
- that.indentIds = []
- that.checkedz = false
- that.showsZhuan = false
- that.taskDataJ()
- }, 1200)
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- }
- },
- //取消转单
- quxiaoZhuan() {
- this.riderId = ''
- this.riderName = ''
- this.indentIds = []
- this.checkedz = false
- this.showsZhuan = false
- },
- //选择转单人弹框
- selectPeople() {
- this.showsSelect = true
- this.getRiders()
- },
- //骑手关键字搜索
- searchKeywordRider(e) {
- this.keywordRider = e.detail.value
- this.getRiders()
- },
- //被转单骑手分页数据
- getRiders() {
- uni.showLoading({
- title: '加载中',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- console.log('listRideraaaaa', this.pageRider, this.sizeRider)
- this.$Request
- .getT('/app/user/findRiders', {
- page: this.pageRider,
- limit: this.sizeRider,
- keyword: this.keywordRider //手机号或骑手姓名
- })
- .then((res) => {
- console.log('listRider', res)
- this.pageCountRider = res.data.totalCount
- if (this.pageRider == 1) {
- this.listRider = res.data.list
- } else {
- this.listRider = this.listRider.concat(res.data.list)
- }
- // console.log('listRider', this.listRider)
- // res.page -- 后端返回的当前页,
- // res.pageCount -- 后端返回的总页数
- if (this.listRider.length == 0 || res.data.currPage == res.data.totalPage) {
- this.status = 'nomore'
- }
- // 加载提示关闭
- uni.hideLoading()
- })
- },
- // 骑手数据滚动到底部
- scrolltolower(e) {
- if (this.listRider.length < this.pageCountRider) {
- this.pageRider++
- this.getRiders()
- } else {
- this.status = 'nomore'
- }
- },
- //选择骑手
- getRider(e) {
- this.riderId = e.userId
- this.riderName = e.userName
- this.showsSelect = false
- },
- //删除已选骑手
- deleteRider() {
- this.riderId = ''
- this.riderName = ''
- }
- },
- // 上拉加载
- onReachBottom: function () {
- if (this.current == 0) {
- if (!this.ifrenwu) {
- console.log(this.list_shanghu.length, this.totalCount1, 'list_shanghu')
- if (this.list_shanghu.length < this.totalCount1) {
- this.page1 = this.page1 + 1
- this.getShanglist()
- } else {
- uni.showToast({
- title: '已经最后一页啦',
- icon: 'none'
- })
- }
- } else {
- console.log(this.list_box.length, this.totalCount2, 'jjj')
- if (this.list_box.length < this.totalCount2) {
- this.page2 = this.page2 + 1
- this.taskData()
- this.checkedz = false
- } else {
- uni.showToast({
- title: '已经最后一页啦',
- icon: 'none'
- })
- }
- }
- } else if (this.current == 1) {
- //配送中
- if (this.lists.length < this.totalCount3) {
- this.page3 = this.page3 + 1
- this.indentState = 3
- this.taskDataJ()
- this.checkedz = false
- } else {
- uni.showToast({
- title: '已经最后一页啦',
- icon: 'none'
- })
- }
- } else if (this.current == 2) {
- //全部订单
- if (this.lists.length < this.totalCount3) {
- this.page3 = this.page3 + 1
- this.indentState = 4
- this.taskDataJ()
- } else {
- uni.showToast({
- title: '已经最后一页啦',
- icon: 'none'
- })
- }
- }
- },
- onPullDownRefresh: function () {
- if (this.current == 0) {
- if (!this.ifrenwu) {
- this.page1 = 1
- this.getShanglist()
- } else {
- this.page2 = 1
- this.taskData()
- }
- } else if (this.current == 1) {
- this.page3 = 1
- this.indentState = 3
- this.taskDataJ()
- } else if (this.current == 2) {
- this.page3 = 1
- this.indentState = 4
- this.taskDataJ()
- }
- }
- }
- </script>
- <style>
- body {
- background: #f5f5f5;
- }
- .privacy {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 9999999;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .contentview {
- width: 632rpx;
- padding: 48rpx;
- box-sizing: border-box;
- background: #fff;
- border-radius: 16rpx;
- }
- .contentview .title {
- text-align: center;
- color: #333;
- font-weight: bold;
- font-size: 32rpx;
- }
- .contentview .des {
- font-size: 26rpx;
- color: #666;
- margin-top: 40rpx;
- text-align: justify;
- line-height: 1.6;
- }
- .contentview .des .link {
- color: #07c160;
- text-decoration: underline;
- }
- button::after {
- border: none;
- }
- .btns {
- margin-top: 48rpx;
- display: flex;
- }
- .btns .item {
- justify-content: space-between;
- width: 244rpx;
- height: 80rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 16rpx;
- box-sizing: border-box;
- border: none;
- }
- .btns .reject {
- background: #f4f4f5;
- color: #909399;
- }
- .btns .agree {
- background: #07c160;
- color: #fff;
- }
- .content {
- margin-top: 100rpx;
- min-height: 100vh; /* 设置最小高度为视口高度 */
- }
- /* 待取货和配送中搜索框 */
- // 搜索框
- .search-bar {
- position: relative;
- width: 100%;
- height: 100rpx;
- margin-top: 20rpx;
- }
- .search-bar-box {
- display: flex;
- margin: 0 auto;
- width: 670rpx;
- height: 90rpx;
- background: rgba(255, 255, 255, 1);
- border: 1px solid rgba(255, 141, 26, 1);
- border-radius: 7rpx;
- }
- .search-span {
- width: 38rpx;
- height: 38rpx;
- margin-top: 27rpx;
- margin-left: 20rpx;
- }
- .search-text {
- width: 100%;
- margin-top: 20rpx;
- margin-left: 20rpx;
- font-size: 30rpx;
- color: rgba(166, 166, 166, 1);
- }
- .impute {
- text-align: center;
- margin-left: 4%;
- margin-top: 20rpx;
- width: 690rpx;
- height: 90rpx;
- opacity: 1;
- border-radius: 7rpx;
- background: rgba(255, 255, 255, 1);
- border: 1px solid rgba(255, 141, 26, 1);
- }
- /* 全选框和批量转单 */
- .kuang-bar {
- position: relative;
- margin-left: 5%;
- width: 90%;
- height: 70rpx;
- margin-top: 20rpx;
- }
- .kuang-padd {
- float: left;
- width: 20%;
- display: flex;
- margin: 10rpx auto;
- font-size: 28rpx;
- font-weight: 400;
- line-height: 50rpx;
- color: rgba(166, 166, 166, 1);
- }
- .kuang-li {
- margin: 0 0 0 4%;
- width: 50rpx;
- height: 50rpx;
- }
- .kuang-kong {
- opacity: 1;
- border-radius: 6rpx;
- border: 1rpx solid rgba(166, 166, 166, 1);
- }
- .kuang-se {
- opacity: 1;
- border-radius: 6rpx;
- background: rgba(255, 141, 26, 1);
- }
- .kuang-line {
- float: left;
- margin-left: 5px;
- margin-right: 5px;
- width: 0px;
- height: 220px;
- border: 0.5px solid rgba(230, 230, 230, 1);
- }
- .kuang-btn {
- float: right;
- width: 163rpx;
- height: 70rpx;
- border-radius: 13rpx;
- font-size: 28rpx;
- font-weight: 400;
- line-height: 70rpx;
- text-align: center;
- }
- .selectpil {
- background: rgba(255, 141, 26, 1);
- color: rgba(255, 255, 255, 1);
- }
- .noselect {
- background: #cccccc;
- color: rgba(0, 0, 0, 0.6);
- }
- .slot-wrap {
- display: flex;
- justify-content: center;
- align-items: center;
- /* 如果您想让slot内容占满整个导航栏的宽度 */
- /* flex: 1; */
- /* 如果您想让slot内容与导航栏左右有空隙 */
- /* padding: 0 30rpx; */
- }
- .u-title {
- color: #000000 !important;
- font-size: 31rpx !important;
- font-weight: bold !important;
- }
- .solt {
- position: relative;
- }
- .slot_left {
- width: 60rpx;
- height: 60rpx;
- position: absolute;
- top: 15rpx;
- left: 20rpx;
- }
- .slot_left image {
- width: 60rpx;
- height: 60rpx;
- }
- .slot_content {
- width: 35rpx;
- height: 35rpx;
- position: absolute;
- top: 26rpx;
- left: 280rpx;
- }
- .slot_content image {
- width: 35rpx;
- height: 35rpx;
- }
- /* tabs */
- .u-tab-item {
- color: #333333 !important;
- /* font-size: 26rpx !important; */
- letter-spacing: 2rpx;
- }
- .u-tab-bar {
- width: 65rpx !important;
- height: 8rpx !important;
- background-color: #ff7f00 !important;
- border-radius: 0rpx !important;
- position: absolute !important;
- bottom: 0rpx !important;
- left: -14rpx !important;
- }
- .tabs_box {
- display: none;
- padding-bottom: 120rpx;
- }
- .dis {
- display: block;
- width: 100%;
- margin-bottom: 190rpx;
- }
- .list_box1 {
- width: 90%;
- margin: 0 auto;
- height: auto;
- background: #ffffff;
- border-radius: 23rpx;
- box-shadow: 0rpx 5rpx 5rpx 0rpx rgba(198, 186, 181, 0.2);
- margin-top: 20rpx;
- padding-bottom: 20rpx;
- }
- .list_box {
- width: 90%;
- margin: 0 auto;
- height: auto;
- background: #ffffff;
- border-radius: 23rpx;
- box-shadow: 0rpx 5rpx 5rpx 0rpx rgba(198, 186, 181, 0.2);
- margin-top: 20rpx;
- padding-bottom: 20rpx;
- }
- .list_box2 {
- width: 90%;
- margin: 0 auto;
- height: auto;
- background: #ffffff;
- border-radius: 23rpx;
- box-shadow: 0rpx 5rpx 5rpx 0rpx rgba(198, 186, 181, 0.2);
- margin-top: 20rpx;
- }
- .order_title {
- width: 90%;
- margin: 0 auto;
- border-radius: 14px 14px, 0px, 0px;
- background: rgba(255, 239, 222, 1);
- height: 40upx;
- color: rgba(255, 141, 26, 1);
- font-size: 24upx;
- line-height: 40upx;
- text-align: center;
- }
- .part1 {
- width: 90%;
- margin: 0 auto;
- justify-content: left;
- align-items: center;
- display: flex;
- height: 100rpx;
- position: relative;
- }
- .box_one {
- background: #c4e2ff;
- color: #359cff;
- /* width: 60px;
- height: 45rpx; */
- padding: 0px 10px;
- font-size: 26rpx;
- text-align: center;
- line-height: 45rpx;
- border-radius: 5rpx;
- }
- .box_four {
- color: #666666;
- border: 1rpx solid #666666;
- font-size: 22rpx;
- width: 95px;
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- border-radius: 5rpx;
- margin-left: 20rpx;
- }
- .box_two {
- color: #666666;
- border: 1rpx solid #666666;
- font-size: 22rpx;
- /* width: 60px; */
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- border-radius: 5rpx;
- margin-left: 20rpx;
- padding: 0 10rpx;
- }
- .box_two1 {
- width: auto;
- padding: 0 10rpx;
- }
- .box_three {
- color: #666666;
- border: 1rpx solid #666666;
- font-size: 22rpx;
- width: 75px;
- height: 40rpx;
- text-align: center;
- line-height: 40rpx;
- border-radius: 5rpx;
- margin-left: 20rpx;
- }
- .part2 {
- width: 90%;
- margin: 0 auto;
- }
- /* 下线 */
- .address_name {
- font-size: 28rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
- /* line-height: 60rpx; */
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- overflow: hidden;
- }
- .name {
- color: #999999;
- font-size: 21rpx;
- }
- .name text {
- /* margin-left: 10rpx; */
- }
- /* 上线 */
- .box_add {
- display: flex;
- }
- .distance {
- flex: 1;
- /* text-align: center; */
- font-size: 28rpx;
- display: flex;
- justify-content: left;
- align-items: center;
- }
- .a {
- font-size: 16rpx;
- }
- .add_name {
- /* display: flex; */
- flex: 4;
- }
- .sh_name {
- font-size: 28rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
- }
- .sh_name1 {
- font-size: 28rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
- color: #999999;
- }
- .xs_add {
- color: #999999;
- font-size: 21rpx;
- margin-top: 10rpx;
- }
- .jiantou {
- margin-left: 43rpx;
- display: flex;
- /* justify-content: space-between; */
- align-items: center;
- height: 40px;
- line-height: 40px;
- }
- .jiantou image {
- width: 20rpx;
- height: 40rpx;
- }
- .jiantou > view {
- margin-left: 10rpx;
- }
- .part3 {
- width: 90%;
- margin: 0 auto;
- display: flex;
- }
- .three_left {
- flex: 1;
- height: 100rpx;
- display: flex;
- justify-content: left;
- align-items: center;
- }
- .three_left image {
- width: 20px;
- height: 20px;
- }
- .three_left text {
- color: #ff7f00;
- font-size: 25rpx;
- margin-left: 10rpx;
- }
- .three_right {
- /* flex: 1; */
- height: 100rpx;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- color: #ff7f00;
- font-size: 32rpx;
- font-weight: bold;
- }
- .part4 {
- width: 90%;
- margin: 0 auto;
- }
- .box_btn {
- width: 100%;
- background: #cccccc;
- height: 70rpx;
- color: white;
- text-align: center;
- line-height: 70rpx;
- font-size: 26rpx;
- letter-spacing: 2rpx;
- border-radius: 8rpx;
- }
- .box_btn1 {
- width: 100%;
- background: #ff7f00;
- height: 80rpx;
- color: white;
- text-align: center;
- line-height: 80rpx;
- font-size: 31rpx;
- letter-spacing: 2rpx;
- border-radius: 8rpx;
- }
- .box_btn5 {
- width: 16%;
- margin-left: 40rpx;
- background: #ff7f00;
- height: 60rpx;
- color: white;
- text-align: center;
- line-height: 60rpx;
- font-size: 31rpx;
- letter-spacing: 2rpx;
- border-radius: 8rpx;
- }
- .part_six {
- width: 90%;
- margin: 0 auto;
- display: flex;
- }
- .phone {
- flex: 1;
- }
- .phone image {
- width: 29rpx;
- height: 33rpx;
- margin-left: 30rpx;
- }
- .conmm {
- font-size: 19rpx;
- text-align: center;
- letter-spacing: 5rpx;
- }
- .box_btn2 {
- flex: 5;
- width: 100%;
- background: #ff7f00;
- height: 70rpx;
- color: white;
- text-align: center;
- line-height: 70rpx;
- font-size: 26rpx;
- letter-spacing: 2rpx;
- border-radius: 6rpx;
- }
- /* tabbar */
- .tabbar {
- position: fixed;
- bottom: 0rpx;
- left: 0rpx;
- right: 0rpx;
- width: 100%;
- height: 100rpx;
- background: #ffffff;
- display: flex;
- }
- .tabbar_type {
- flex: 1;
- text-align: center;
- font-size: 22rpx;
- margin-top: 10rpx;
- }
- .type_image {
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .type_image image {
- width: 47rpx;
- height: 47rpx;
- }
- .tabbar_btn {
- flex: 4;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .btn {
- width: 90%;
- height: 80rpx;
- background: #ff7f00;
- color: white;
- text-align: center;
- line-height: 80rpx;
- font-size: 26rpx;
- letter-spacing: 2rpx;
- border-radius: 8rpx;
- }
- .btn3 {
- width: 90%;
- height: 80rpx;
- background: #cccccc;
- color: white;
- text-align: center;
- line-height: 80rpx;
- font-size: 26rpx;
- letter-spacing: 2rpx;
- border-radius: 8rpx;
- }
- /* 接单设置弹框 */
- .u-drawer-bottom {
- background-color: #f5f5f5 !important;
- }
- .popup_box {
- width: 90%;
- margin: 0 auto;
- margin-top: 35rpx;
- }
- .title {
- font-size: 29rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
- }
- .part_one {
- width: 100%;
- background: #ffffff;
- margin-top: 18rpx;
- border-radius: 20rpx;
- display: flex;
- height: 120rpx;
- }
- .left {
- flex: 3;
- line-height: 40rpx;
- margin-left: 20rpx;
- margin-top: 20rpx;
- }
- .gotype {
- font-size: 26rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
- }
- .tit {
- color: #999999;
- font-size: 22rpx;
- letter-spacing: 2rpx;
- }
- .right {
- flex: 1;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- margin-right: 30rpx;
- }
- .part_two {
- width: 100%;
- margin: 0 auto;
- background: #ffffff;
- border-radius: 20rpx;
- margin-top: 20rpx;
- height: 130rpx;
- display: flex;
- }
- .two_left {
- flex: 1;
- display: flex;
- justify-content: left;
- align-items: center;
- margin-left: 30rpx;
- font-size: 29rpx;
- font-weight: bold;
- letter-spacing: 2rpx;
- }
- .two_right {
- flex: 1;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- margin-right: 30rpx;
- color: #999999;
- font-size: 25rpx;
- letter-spacing: 2rpx;
- }
- .slot-content {
- padding: 30rpx;
- }
- /* */
- .tabs_box {
- display: none;
- }
- .dis {
- display: block;
- width: 100%;
- }
- .u-tab-item {
- /* font-size: 26upx !important; */
- /* color: #666666 !important; */
- }
- .success_box {
- width: 100%;
- }
- .order_box {
- position: relative;
- width: 90%;
- height: 100%;
- margin: 0 auto;
- /* height: 420rpx; */
- background: #ffffff;
- margin-top: 20rpx;
- border-radius: 16px;
- }
- .order_success {
- width: 90%;
- margin: 0 auto;
- display: flex;
- height: 80upx;
- }
- .order_name {
- flex: 1;
- display: flex;
- justify-content: left;
- align-items: center;
- font-weight: bold;
- font-size: 29rpx;
- letter-spacing: 1upx;
- }
- .order_data {
- flex: 1;
- color: #999999;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- font-size: 26rpx;
- }
- .city_type {
- width: 90%;
- margin: 0 auto;
- height: 60upx;
- line-height: 60upx;
- display: flex;
- justify-content: left;
- align-items: center;
- }
- .type_name {
- font-size: 27rpx;
- }
- .city_text {
- width: 70rpx;
- line-height: 36rpx;
- color: #49a5ff;
- background: #c4e2ff;
- text-align: center;
- font-size: 19rpx;
- margin-left: 20rpx;
- }
- .city_address {
- width: 92%;
- margin: 0 auto;
- margin-top: -10rpx;
- }
- /* 发货地址 */
- .fh_box {
- display: flex;
- /* height: 80upx; */
- margin-top: 20upx;
- }
- .fh_image {
- flex: 1;
- display: flex;
- /* justify-content: left;
- align-items: center; */
- }
- .box {
- flex: 9;
- }
- .fh_name {
- font-size: 26rpx;
- font-weight: 600;
- letter-spacing: 2upx;
- }
- .fh_type {
- color: #999999;
- font-size: 22upx;
- }
- .fh_type text {
- margin-left: 20upx;
- }
- /* 送货地址 */
- .sh_box {
- display: flex;
- margin-bottom: 14upx;
- margin-top: 14rpx;
- }
- .sh_image {
- flex: 1;
- display: flex;
- /* justify-content: left;
- align-items: center; */
- }
- .sh_name {
- font-size: 28rpx;
- font-weight: 600;
- letter-spacing: 2upx;
- }
- .sh_type {
- color: #999999;
- font-size: 22upx;
- }
- .sh_type text {
- margin-left: 20upx;
- }
- .fh_image image {
- width: 40rpx;
- height: 40rpx;
- }
- .sh_image image {
- width: 40rpx;
- height: 40rpx;
- }
- .order_btn {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- height: 100upx;
- line-height: 100upx;
- /* margin-top: 8upx; */
- }
- .btn1 {
- width: 170upx;
- font-size: 28rpx;
- line-height: 60upx;
- text-align: center;
- border: 1upx solid #9c9c9c;
- border-radius: 20upx;
- color: #9c9c9c;
- margin-right: 30upx;
- }
- .btn7 {
- width: 170upx;
- font-size: 28rpx;
- line-height: 60upx;
- text-align: center;
- border-radius: 20upx;
- background: rgba(0, 186, 173, 1);
- color: rgba(255, 255, 255, 1);
- margin-right: 30upx;
- }
- /* 拍照 */
- .btn_pai {
- width: 150rpx;
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- background: rgba(255, 201, 189, 1);
- font-size: 28rpx;
- border: 2rpx solid rgba(255, 201, 189, 1);
- color: #333333;
- border-radius: 20upx;
- font-weight: 700;
- margin-left: 15rpx;
- }
- .btn2 {
- width: 170upx;
- line-height: 60upx;
- color: white;
- background: #ff6a04;
- font-size: 28rpx;
- text-align: center;
- margin-right: 30upx;
- border-radius: 20upx;
- }
- /* 一键转单弹框 */
- .receipt_zhuan {
- width: 100%;
- margin: 0 auto;
- }
- .zhuan_title {
- width: 100%;
- line-height: 100rpx;
- font-size: 28rpx;
- font-weight: bold;
- text-align: center;
- letter-spacing: 2rpx;
- margin-top: 21rpx;
- margin-bottom: 25rpx;
- }
- .zhuan-mode {
- background-color: rgba(247, 247, 247, 1);
- width: 100%;
- }
- .zhuan-title {
- margin-left: 18rpx;
- font-size: 32rpx;
- font-weight: 600;
- letter-spacing: 0px;
- line-height: 46rpx;
- color: rgba(0, 0, 0, 1);
- }
- .zhuan-que {
- width: 100%;
- height: 670rpx;
- overflow-y: auto;
- }
- .zhuan-ding {
- display: grid;
- position: relative;
- margin: 10rpx 0 0 20rpx;
- width: 650rpx;
- opacity: 1;
- border-radius: 1rpx;
- background: rgba(255, 255, 255, 1);
- }
- .ding-1 {
- position: relative;
- margin: 11rpx 0 0 28rpx;
- padding-top: 11rpx;
- font-size: 28rpx;
- font-weight: 600;
- letter-spacing: 0px;
- line-height: 41rpx;
- color: rgba(0, 0, 0, 1);
- }
- .ding-shop {
- float: left;
- }
- .ding-xuhao {
- float: left;
- margin-left: 30rpx;
- }
- .ding-2 {
- position: relative;
- margin: 11rpx 0 0 28rpx;
- font-size: 28rpx;
- font-weight: 400;
- letter-spacing: 0px;
- line-height: 41rpx;
- color: rgba(102, 102, 102, 1);
- }
- .zhuan-btu1 {
- float: left;
- width: 120rpx;
- height: 60rpx;
- opacity: 1;
- border-radius: 5rpx;
- background: rgba(255, 141, 26, 1);
- font-size: 28rpx;
- font-weight: 400;
- letter-spacing: 0rpx;
- line-height: 60rpx;
- color: rgba(255, 255, 255, 1);
- text-align: center;
- }
- .zhuan-text {
- float: left;
- margin-left: 30rpx;
- font-size: 28rpx;
- font-weight: 400;
- letter-spacing: 0px;
- line-height: 60rpx;
- color: rgba(0, 0, 0, 1);
- }
- .zhuan-btu2 {
- float: left;
- width: 305rpx;
- height: 90rpx;
- opacity: 1;
- border-radius: 9rpx;
- border: 1rpx solid rgba(255, 141, 26, 1);
- font-size: 28rpx;
- font-weight: 400;
- letter-spacing: 0px;
- line-height: 90rpx;
- color: rgba(255, 141, 26, 1);
- text-align: center;
- }
- .zhuan-btu3 {
- float: right;
- width: 305rpx;
- height: 90rpx;
- opacity: 1;
- border-radius: 9rpx;
- background: rgba(255, 141, 26, 1);
- font-size: 28rpx;
- font-weight: 400;
- letter-spacing: 0px;
- line-height: 90rpx;
- color: rgba(255, 255, 255, 1);
- text-align: center;
- }
- /* 选择转单人弹框 */
- .xuan-list {
- position: relative;
- width: 100%;
- height: 140rpx;
- background: rgba(255, 255, 255, 1);
- }
- .xuan-list2 {
- position: relative;
- width: 100%;
- height: 140rpx;
- background: rgba(255, 246, 237, 1);
- }
- .xuan-right {
- float: left;
- margin-left: 22rpx;
- }
- .ding-3 {
- position: relative;
- margin-top: 31rpx;
- height: 40rpx;
- font-size: 28rpx;
- font-weight: 600;
- letter-spacing: 0px;
- line-height: 41rpx;
- color: rgba(0, 0, 0, 1);
- }
- /* 收货码弹框 */
- .receipt_code {
- width: 90%;
- margin: 0 auto;
- }
- .code_title {
- width: 100%;
- line-height: 100rpx;
- font-size: 31rpx;
- font-weight: bold;
- text-align: center;
- letter-spacing: 2rpx;
- margin-top: 21rpx;
- margin-bottom: 25rpx;
- }
- .u-input--border {
- border: 1px solid #f2f2f2 !important;
- background: #f2f2f2 !important;
- color: #999999 !important;
- font-weight: 500 !important;
- letter-spacing: 2rpx !important;
- }
- .u-input__input {
- font-size: 30rpx;
- font-weight: bold;
- flex: 1;
- color: #999999 !important;
- min-height: 85rpx !important;
- margin-top: 7rpx;
- }
- .sure {
- width: 100%;
- height: 80rpx;
- background: #ff7f00;
- color: white;
- border-radius: 46rpx;
- text-align: center;
- line-height: 80rpx;
- margin-top: 30rpx;
- letter-spacing: 2rpx;
- }
- /* 确认送达拍照框 */
- .phone_title {
- margin-top: 10px;
- width: 100%;
- height: 40px;
- /* background-color: #FF7F00; */
- text-align: center;
- line-height: 40px;
- /* color:#FFFFFF; */
- }
- .phone_title2 {
- margin-top: 10px;
- text-align: center;
- color: #9d9d9d;
- }
- .code_title2 {
- width: 100%;
- line-height: 50rpx;
- text-align: center;
- letter-spacing: 2rpx;
- margin-top: 21rpx;
- margin-bottom: 25rpx;
- }
- </style>
|