| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786 |
- <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="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="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="btn2" v-if="item.indentState == '3'" @click.stop="quhuo(item.indentId, index)">确认取货</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="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="btn2" style="margin-left: 10px" 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="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="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="btn2" style="margin-left: 10px" 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
- }
- },
- 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.$Request
- .getT('/app/tbindent/selectTbIndentPage', {
- page: 1,
- limit: 10,
- acquireCode: that.shoudanma
- })
- .then((res) => {
- console.log(res, 'lk')
- 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].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'
- }
- }
- }
- }
- var saomajie = []
- saomajie = res.data.list
- that.list2 = res.data.list
- 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
- .postT('/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()
- } else if (that.current == 2) {
- that.indentState = 4
- that.taskDataJ()
- }
- }
- })
- }
- })
- },
- // 顶部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()
- } else if (index == 2) {
- //配送中
- uni.showLoading({
- title: '加载中...',
- mask: true // 是否显示透明蒙层,防止触摸穿透
- })
- this.page3 = 1
- this.indentState = 4
- this.taskDataJ()
- } 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 // 是否显示透明蒙层,防止触摸穿透
- })
- var daa = {
- buyTpye: '', // 购买类型 0:骑手就近购买;1:用户指定地址购买"
- indentType: this.indentType,
- limit: 10,
- page: this.page1,
- receivingPattern: this.receivingPettern,
- riderLat: this.latitude,
- riderLng: this.longitude
- }
- 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()
- 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()
- })
- },
- // 获取新任务数据
- 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 // 是否显示透明蒙层,防止触摸穿透
- })
- this.$Request
- .getT('/app/tbindent/findRiderIndent', {
- page: this.page3,
- limit: 10,
- indentState: this.indentState
- // 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)
- }
- }
- 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)
- 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
- getLessLimitSizeImage(canvasId, imagePath, limitSize, drawWidth, that, (resPath) => {
- uni.showLoading({
- title: '上传中'
- })
- uni.uploadFile({
- url: that.config('APIHOST1') + '/alioss/upload',
- filePath: resPath,
- 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/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
- }, 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
- }, 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
- }
- }
- })
- }
- }
- })
- }
- },
- // 上拉加载
- 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()
- } 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()
- } 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; /* 设置最小高度为视口高度 */
- }
- .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 {
- width: 90%;
- 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;
- }
- /* 拍照 */
- .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_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>
|