1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407 |
- <template>
- <app-layout>
- <view v-if="!search" class="tab-info">
- <view class='main-center tab'>
- <view @click="tabStatus(1)" :class="['tab-item','tab-left',`${status==1?'active': ''}`]">订单列表</view>
- <view @click="tabStatus(2)" :class="['tab-item','tab-right',`${status==2?'active': ''}`]">售后订单</view>
- </view>
- </view>
- <view v-if="search" class="search-item main-between cross-center">
- <view class="search-input">
- <image class="search-icon" src='/static/image/icon/icon-search.png'></image>
- <input :focus="!msg" @confirm='searchMethod' confirm-type='search' v-model='keyword' placeholder-style='color:#999999;font-size:13px;' @blur="getFocus=false" @focus="getFocus=true" placeholder='请输入订单号/商品名称/收货人姓名搜索'></input>
- <image v-if="getFocus && keyword.length > 0" @click="clearSearch" class="search-clear" src="../image/clear.png"></image>
- </view>
- <view @click="cancelSeacrch">取消</view>
- </view>
- <view v-if="!searchResult && search && list.length == 0" class="search-history">
- <view v-if="candidate.length != 0" class='main-between search-title'>
- <view>历史搜索</view>
- <view @click="clear">
- <image class="delete-icon" src="/static/image/icon/delete.png"></image>
- </view>
- </view>
- <view class='flex-wrap candidate-list'>
- <view @click="keywordSearch(item)" class="keyword-item box-grow-0" v-for="item in candidate" :key="item">
- <text class="t-omit">{{item}}</text>
- </view>
- </view>
- </view>
- <view v-if="!search" class="search-area main-between cross-center">
- <view class="search main-center" @click="toSearch">
- <image class="icon-search" src="/static/image/icon/icon-search.png"></image>
- <text>搜索</text>
- </view>
- <view class="choose" @click='toTime'>
- <text v-if="date_start == ''">汇总</text>
- <text v-else-if="date_start == today && date_end == today+' 23:59:59'">今日</text>
- <text v-else-if="date_start == yesterday && date_end == yesterday+' 23:59:59'">昨日</text>
- <text v-else-if="date_start == weekday && date_end == today+' 23:59:59'">7日</text>
- <text v-else>自定义</text>
- <image src='./../image/open.png'></image>
- </view>
- </view>
- <view v-if="!search && status==1" class="main-between navs-info">
- <view @click="tab(-1)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==-1?'active':'nav-text'}`]">全部</text>
- </view>
- <view @click="tab(0)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==0?'active':'nav-text'}`]">待付款</text>
- </view>
- <view @click="tab(1)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==1?'active':'nav-text'}`]">待发货</text>
- </view>
- <view @click="show=!show" v-if="active" class="box-grow-1 main-center navs more-navs">
- <text :class="[`${_num==active.value?'active':'nav-text'}`]">{{active.name}}</text>
- <image src="./../image/more-active.png"></image>
- </view>
- <view @click="show=!show" v-if="!active" class="box-grow-1 main-center navs more-navs">
- <text class="nav-text">更多状态</text>
- <image src="./../image/more.png"></image>
- </view>
- </view>
- <view v-if="!search && status==2" class="main-between navs-info">
- <view @click="tab(-1)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==-1?'active':'nav-text'}`]">全部</text>
- </view>
- <view @click="tab(0)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==0?'active':'nav-text'}`]">待审核</text>
- </view>
- <view @click="tab(1)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==1?'active':'nav-text'}`]">待买家处理</text>
- </view>
- <view @click="tab(2)" class="box-grow-1 main-center cross-center navs">
- <text :class="[`${_num==2?'active':'nav-text'}`]">待卖家处理</text>
- </view>
- </view>
- <view v-if="!search && show" class="more-menu">
- <view @click="chooseItem(item.value)" v-for="item in menu" :key="item.value">{{item.name}}</view>
- </view>
- <view v-if="!search" class="search-palce"></view>
- <!-- 订单信息 -->
- <view>
- <view class="order-item" v-for="item in list" :key="item.id">
- <view @click="toDetail(item.order_id,status)">
- <view class="main-between order-info" v-if="status ==1">
- <view style="width: 80%">
- <view>订单号 {{item.order_no}}</view>
- <view v-if="item.seller_remark && item.seller_remark != null" class="remark-info">商家备注 {{item.seller_remark}}</view>
- </view>
- <view v-if="item.is_sale == 1">已完成</view>
- <view v-else-if="item.cancel_status == 2">待退款</view>
- <view v-else-if="item.is_send == 0 && item.is_pay == 1 && item.detailExpress && item.detailExpress.length > 0">部分发货</view>
- <view v-else-if="item.is_pay == 0">待付款</view>
- <view v-else-if="item.is_send == 0">待发货</view>
- <view v-else-if="item.is_confirm == 0">待收货</view>
- <view v-else-if="item.is_confirm == 1">已收货</view>
- </view>
- <view class="main-between order-info" v-if="status ==2">
- <view>订单号 {{item.order_no}}</view>
- <view class="status-txt">{{item.refund_status_cn}}</view>
- </view>
- <view class="dir-left-nowrap cross-center order-user" v-if="status ==1">
- <view>{{item.name ? item.name : item.nickname}}</view>
- <view>{{item.mobile}}</view>
- <view v-if="item.mobile" @click.stop='toCall(item.mobile)' class="to-tel dir-left-nowrap cross-center">
- <image src='./../image/tel.png'></image>
- <text>联系收货人</text>
- </view>
- </view>
- <view class="dir-left-nowrap cross-center order-user" v-if="status ==2">
- <view>{{item.order.name}}</view>
- <view>{{item.order.mobile}}</view>
- <view v-if="item.order.mobile" @click.stop='toCall(item.order.mobile)' class="to-tel dir-left-nowrap cross-center">
- <image src='./../image/tel.png'></image>
- <text>联系收货人</text>
- </view>
- </view>
- <view v-for="goods in item.detail" class="goods" :key="goods.id">
- <image class="goods-img" :src='goods.goods_info.goods_attr.pic_url ? goods.goods_info.goods_attr.pic_url : goods.goods_info.goods_attr.cover_pic'></image>
- <view v-if="item.type == 1" class="goods-status">退货退款</view>
- <view v-if="item.type == 2" class="goods-status">换货</view>
- <view class='t-omit-two goods-name'>{{goods.goods_info.goods_attr.name}}</view>
- <view class="goods-attr t-omit">
- <text v-for="attr in goods.attr_list" :key="attr.attr_id">{{attr.attr_group_name}}:{{attr.attr_name}}</text>
- </view>
- <view class="goods-num">x{{goods.num}}</view>
- <view class="goods-price">¥{{goods.total_price}}</view>
- </view>
- <view class="dir-right-nowrap">
- <view class="price-info">
- <text class="other">合计</text>
- <text v-if="status == 1">¥{{item.total_pay_price}}</text>
- <text v-if="status == 2">¥{{item.refund_price}}</text>
- <text v-if="status == 1" class="other">(含运费¥{{item.express_price}})</text>
- </view>
- </view>
- </view>
- <view class="dir-right-nowrap menu-button">
- <view @click.stop="toAgreeCancel(item)" v-if="item.cancel_status == 2" class="handle-btn other">同意</view>
- <view @click.stop="beNotRefund(item)" v-if="item.cancel_status == 2" class="handle-btn">拒绝</view>
- <view @click.stop="toChange(item)" v-if="item.cancel_status == 0 && item.is_pay == 0 && item.is_send == 0" class="handle-btn other">修改价格</view>
- <view @click.stop="toConfirm(item)" v-if="item.cancel_status == 0 && item.is_confirm == 0 && item.is_send == 1 && item.is_confirm_show == 1" class="handle-btn other">确认收货</view>
- <view @click.stop="toExpress(item,2)" v-if="item.cancel_status == 0 && item.is_send == 1 && item.is_confirm == 0 && item.express_no" class="handle-btn other">修改物流信息</view>
- <view @click="toExpressInfo(item)" v-if="item.cancel_status == 0 && item.is_send == 1 && item.is_confirm == 0 && item.detailExpress.length > 0" class="handle-btn other">查看物流</view>
- <view @click.stop="toSend(item)" v-if="item.address && item.cancel_status == 0 && item.is_send == 0 && item.is_pay == 1" class="handle-btn other">发货</view>
- <view @click.stop="toSend(item)" v-else-if="item.is_send == 0 && item.is_pay == 1 && item.detailExpress && item.detailExpress.length > 0" class="handle-btn other">发货</view>
- <view @click.stop="toSend(item)" v-else-if="item.address && item.cancel_status == 0 && item.is_send == 0 && item.pay_type == 2" class="handle-btn other">发货</view>
- <view @click="toChangeAddress(item)" v-if="item.address && item.cancel_status == 0 && item.is_send == 0 && item.is_pay == 1" class="handle-btn">修改地址</view>
- <view @click.stop="toRefundOrder(item.order_no)" v-if="item.have_refund == 1 && status == 1 && item.is_sale == 0" class="handle-btn">售后中</view>
- <view @click.stop="toCancelorder(item)" v-if="item.sign != 'gift' && item.is_send == 0 && item.cancel_status == 0" class="handle-btn">取消订单</view>
- <view @click.stop="toConfirm(item)" v-if="item.status == 2 && item.is_send == 1 && item.is_confirm == 0 && status == 2 && item.type == 1" class="handle-btn other">确认收货</view>
- <view @click.stop="toRefund(item)" v-if="item.status == 2 && item.is_send == 1 && item.is_confirm == 1 && item.is_refund == 0 && status == 2 && item.type == 1" class="handle-btn other">退款</view>
- <view @click.stop="toSend(item)" data-send="1" v-if="item.is_confirm == 0 && status == 2 && item.is_send == 1 && item.type == 2" class="handle-btn other">发货</view>
- <view @click.stop="refundHandle(2,item,1)" v-if="item.status == 2 && status == 2 && item.status_cn != '换货 卖家已发货' && item.status_cn != '退货退款 卖家已退款'" :class="['handle-btn', `${_num == 1 || _num == -1?'other':''}`]">取消售后</view>
- <view @click="toExpressInfo(item)" v-if="status == 2 && item.detailExpress.length > 0 && item.status == 2" class="handle-btn">物流详情</view>
- <view @click.stop="refundHandle(1,item)" v-if="item.status == 1 && status == 2" class="handle-btn other">同意</view>
- <view @click.stop="refundHandle(2,item)" v-if="item.status == 1 && status == 2" class="handle-btn">拒绝</view>
- <view @click.stop="lookAbout(item)" v-if=" status == 2" class="handle-btn">售后理由</view>
- <view @click.stop="makeRemark(item)" class="handle-btn">备注</view>
- </view>
- </view>
- </view>
- <view class='no-tip' v-if="list.length == 0">
- <image :src='adminImg.no_order'></image>
- <view>没有任何订单哦~</view>
- </view>
- <view :class="['bottom-place', `${iphone_x? 'iphone_x':''}`]"></view>
- <view :class="['main-between bottom-tab', `${iphone_x? 'iphone_x':''}`]">
- <view class="box-grow-1 tab-nav-item" @click="toRedirect('/pages/app_admin/index/index')">
- <image class="tab-icon" src="./../image/index.png"></image>
- <view>首页</view>
- </view>
- <view class="box-grow-1 tab-nav-item active" @click="reload">
- <image class="tab-icon" src="./../image/order-active.png"></image>
- <view>订单</view>
- </view>
- <view class="box-grow-1 tab-nav-item" @click="toRedirect('/pages/app_admin/goods/goods')">
- <image class="tab-icon" src="./../image/goods.png"></image>
- <view>商品</view>
- </view>
- <view class="box-grow-1 tab-nav-item" @click="toRedirect('/pages/app_admin/setting/setting')">
- <image class="tab-icon" src="./../image/setting.png"></image>
- <view>设置</view>
- </view>
- </view>
- <view @touchmove.stop.prevent="" class="bg cross-center" v-if="chooseTime || isRefund || noRefund || changePrice || cancelOrder || callPhone || isSend || notRefund || isReason || openAddress || noAddress || beRemark || confirmOrder">
- <!-- 选时间 -->
- <view class="dialog" v-if="chooseTime">
- <view class="dialog-title">筛选时间</view>
- <view class="flex-wrap main-between time-area">
- <view @click="change(0)" data-time='0' :class="[`${time == 0 ? 'active':'' }`, 'dialog-choose-item']">汇总</view>
- <view @click="change(1)" data-time='1' :class="[`${time == 1 ? 'active':'' }`, 'dialog-choose-item']">今日</view>
- <view @click="change(2)" data-time='2' :class="[`${time == 2 ? 'active':'' }`, 'dialog-choose-item']">昨日</view>
- <view @click="change(3)" data-time='3' :class="[`${time == 3 ? 'active':'' }`, 'dialog-choose-item']">7日</view>
- <view @click="change(4)" data-time='4' :class="[`${time == 4 ? 'active':'' }`, 'dialog-choose-item']">自定义</view>
- <view class="dialog-choose-item" style='border: 0'></view>
- </view>
- <view class="choose-time" v-if="custom">
- <view class="time-title">起始时间</view>
- <view class="year-1">年</view>
- <view class="month-1">月</view>
- <view class="day-1">日</view>
- <view class="year-2">年</view>
- <view class="month-2">月</view>
- <view class="day-2">日</view>
- <picker-view :value="start" class="picker-view" @change="startChange">
- <picker-view-column>
- <view v-for="(item,idx) in years" :key="item"
- :class="[{
- 'sure-color': startVal[0] === idx,
- 'cardinal-color': startVal[0] === idx + 1 || startVal[0] === idx - 1,
- 'even-color': startVal[0] === idx + 2 || startVal[0] === idx - 2,
- }]">{{item}}</view>
- </picker-view-column>
- <picker-view-column>
- <view v-for="(item,idx) in months" :key="item"
- :class="[{
- 'sure-color': startVal[1] === idx,
- 'cardinal-color': startVal[1] === idx + 1 || startVal[1] === idx - 1,
- 'even-color': startVal[1] === idx + 2 || startVal[1] === idx - 2,
- }]">{{item}}</view>
- </picker-view-column>
- <picker-view-column>
- <view v-for="(item,idx) in days" :key="item"
- :class="[{
- 'sure-color': startVal[2] === idx,
- 'cardinal-color': startVal[2] === idx + 1 || startVal[2] === idx - 1,
- 'even-color': startVal[2] === idx + 2 || startVal[2] === idx - 2,
- }]">{{item}}</view>
- </picker-view-column>
- </picker-view>
- <view class="time-title">结束时间时间</view>
- <picker-view :value="end" indicator-style="height: 36px;color: #446dfd;font-size:14px;"class="picker-view" @change="endChange">
- <picker-view-column>
- <view v-for="(item,idx) in years" :key="item"
- :class="[{
- 'sure-color': endVal[0] === idx,
- 'cardinal-color': endVal[0] === idx + 1 || endVal[0] === idx - 1,
- 'even-color': endVal[0] === idx + 2 || endVal[0] === idx - 2,
- }]">{{item}}</view>
- </picker-view-column>
- <picker-view-column>
- <view v-for="(item,idx) in months" :key="item"
- :class="[{
- 'sure-color': endVal[1] === idx,
- 'cardinal-color': endVal[1] === idx + 1 || endVal[1] === idx - 1,
- 'even-color': endVal[1] === idx + 2 || endVal[1] === idx - 2,
- }]">{{item}}</view>
- </picker-view-column>
- <picker-view-column>
- <view v-for="(item,idx) in days" :key="item"
- :class="[{
- 'sure-color': endVal[2] === idx,
- 'cardinal-color': endVal[2] === idx + 1 || endVal[2] === idx - 1,
- 'even-color': endVal[2] === idx + 2 || endVal[2] === idx - 2,
- }]">{{item}}</view>
- </picker-view-column>
- </picker-view>
- </view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='toChoose'>确认</view>
- </view>
- </view>
- <!-- 退款 -->
- <view class="dialog" v-if="isRefund">
- <view class="dialog-title">退款</view>
- <view class="main-center refund-pay" v-if="status == 1">¥{{detail.total_pay_price}}</view>
- <view class="main-center cross-center refund-pay" v-if="status == 2">¥
- <input class="refund-price" type='digit' v-model="refund_price"></input>
- </view>
- <view class="main-center refund-tip">是否确认退款给买家</view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" v-if="status == 1" @click='cancelSubmit'>确认</view>
- <view class="submit-btn be-submit" v-if="status == 2" @click='agree'>确认</view>
- </view>
- </view>
- <view class="dialog-bg" :style="{'display': `${noRefund || notRefund ? 'block' : 'none'}`}"></view>
- <!-- 拒绝退款 -->
- <view class="dialog" v-if="noRefund || notRefund">
- <view v-if="noRefund" class="dialog-title">拒绝取消</view>
- <view v-if="notRefund" class="dialog-title">拒绝售后</view>
- <textarea fixed class="textarea" v-model="about" placeholder="请输入拒绝理由" placeholder-style="color:#999999;font-size:14px" auto-focus />
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view v-if="noRefund" class="submit-btn be-submit" @click='noCancel'>确认</view>
- <view v-if="notRefund" class="submit-btn be-submit" @click='decline(0)'>确认</view>
- </view>
- </view>
- <!-- 备注 -->
- <view class="dialog" v-if="beRemark">
- <view class="dialog-title">备注</view>
- <view class="remark-input">
- <input maxlength="15" v-model="remark" placeholder="请输入备注内容(限15个字符)">
- </view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='toRemark'>确认</view>
- </view>
- </view>
- <!-- 改价 -->
- <view class="dialog" v-if="changePrice">
- <view v-if="changePrice" class="dialog-title">修改价格</view>
- <view v-if="changePrice" class="dir-left-nowrap change-price-item">
- <view class="label">商品总价</view>
- <view class="money">¥</view>
- <input fixed type="digit" class="price-input" @input="priceInput" :focus="changePrice?true:false" v-model='price'></input>
- </view>
- <view v-if="changePrice" class="dir-left-nowrap change-price-item">
- <view class="label">运费</view>
- <view class="money">¥</view>
- <input fixed type="digit" class="price-input" @input="expressInput" focus v-model='express'></input>
- </view>
- <view v-if="changePrice" class="dir-left-nowrap change-price-item">
- <view class="label">合计</view>
- <view class="total-money">{{total}}</view>
- </view>
- <view v-if="changePrice" class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='submitChange'>确认</view>
- </view>
- </view>
- <!-- 取消订单 -->
- <view class="dialog" v-if="cancelOrder">
- <view class="main-center cancel-tip">确定取消该订单?</view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='cancelSubmit'>确认</view>
- </view>
- </view>
- <!-- 售后确认收货 -->
- <view class="dialog" v-if="confirmOrder">
- <view class="main-center cancel-tip">是否确认收货?</view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" v-if="status == 1" @click='beOrderConfirm'>确认</view>
- <view class="submit-btn be-submit" v-else @click='beConfirm'>确认</view>
- </view>
- </view>
- <!-- 打电话 -->
- <view class="dialog" v-if="callPhone">
- <view class="main-center cancel-tip">{{mobile}}</view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='call'>确认</view>
- </view>
- </view>
- <!-- 提示 -->
- <view class="dialog" v-if="noAddress">
- <view class="main-center dir-top-nowrap cancel-tip" style="text-align: center">
- <view>您还没有退货地址</view>
- <view>请先设置</view>
- </view>
- <view class="main-center btn-area">
- <view class="submit-btn" @click='noAddress=false'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='toRefundAdd'>去设置</view>
- </view>
- </view>
- <!-- 理由 -->
- <view class="dialog" v-if="isReason">
- <view class="dialog-title">售后理由</view>
- <view class="reason">
- <view class="reason-title">申请原因</view>
- <view class="reason-content">{{detail.remark}}</view>
- <view v-if="detail.pic_list.length > 0" class="reason-title">图片</view>
- <view class="dir-left-wrap reason-img" v-if="detail.pic_list.length > 0">
- <image @click='look(item)' v-for="item in detail.pic_list" :key="item" :src="item"></image>
- </view>
- </view>
- <view class="main-center btn-area other-btn-area">
- <view class="submit-btn be-submit" @click='cancel'>确认</view>
- </view>
- </view>
- <!-- 选地址 -->
- <view class="dialog" v-if="openAddress">
- <view class="dialog-title">选择退货地址</view>
- <view class="add-list">
- <view class="add-item" v-for="item in address" :key="item.id">
- <image v-if="item.id == addressId" @click='chooseAddress(item.id)' src="./../image/active.png"></image>
- <image v-else @click='chooseAddress(item.id)' src="/static/image/icon/form-er.png"></image>
- <view @click='chooseAddress(item.id)' class="add-info">
- <view class="main-between">
- <view class="add-name">{{item.name}}</view>
- <view>{{item.mobile}}</view>
- </view>
- <view>{{item.address}}{{item.address_detail}}</view>
- </view>
- </view>
- </view>
- <view class="main-center btn-area other-btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='decline(1)'>确认</view>
- </view>
- </view>
- <!-- 选择配送员 -->
- <view class="dialog" v-if="isSend && detail.send_type == 2">
- <view class="dialog-title">选择配送员</view>
- <view class="add-list">
- <view class="add-item delivery-item" v-for="item in cityList" :key="item.id">
- <view @click='chooseDelivery(item)' class="add-info">
- <view class="main-between">
- <view class="add-name">{{item.name}}</view>
- <image style="left: 0" v-if="item.id == deliveryId" @click='chooseDelivery(item)' src="./../image/active.png"></image>
- <image style="left: 0" v-else @click='chooseDelivery(item)' src="/static/image/icon/form-er.png"></image>
- </view>
- </view>
- </view>
- </view>
- <view class="main-center btn-area other-btn-area">
- <view class="submit-btn" @click='cancel'>取消</view>
- <view class="line"></view>
- <view class="submit-btn be-submit" @click='toSendType'>确认</view>
- </view>
- </view>
- </view>
- </app-layout>
- </template>
- <script>
- import { mapState } from "vuex";
- const date = new Date()
- const years = []
- const months = []
- const days = []
- for (let i = 2015; i <= date.getFullYear(); i++) {
- years.push(i)
- }
- for (let i = 1; i <= 12; i++) {
- months.push(i)
- }
- for (let i = 1; i <= 31; i++) {
- days.push(i)
- }
- export default {
- data() {
- return {
- cancelRefund: false,
- time_start: [],
- noAddress: false,
- years: years,
- months: months,
- days: days,
- status: '1',
- _num: '-1',
- getFocus: false,
- more_list: false,
- cityList: [],
- deliveryId: '0',
- delivery: '',
- addressId: '0',
- refund_price: 0,
- page: 1,
- notRefund: false,
- openAddress: false,
- isReason: false,
- menu: [
- {
- name: '待收货',
- value: '2'
- },
- {
- name: '待退款',
- value: '4'
- },
- {
- name: '已收货',
- value: '9'
- },
- {
- name: '已完成',
- value: '3'
- }
- ],
- active: null,
- show: false,
- start: [],
- end: [],
- startVal: [],
- endVal: [],
- search: false,
- keyword: '',
- list: [],
- candidate: [],
- date_start: '',
- date_end: '',
- time: 0,
- inSearch: false,
- address: [],
- today: '',
- yesterday: '',
- weekday: '',
- chooseTime: false,
- isRefund: false,
- noRefund: false,
- confirmOrder: false,
- beRemark: false,
- remark: null,
- cancelOrder: false,
- detail: {},
- changePrice: false,
- callPhone: false,
- custom: false,
- mobile: '',
- isSend: false,
- sendType: 0,
- price: 0,
- express: 0,
- msg: false,
- searchResult: false,
- total: 0,
- about: '',
- iphone_x: false,
- loading: false
- }
- },
- computed: {
- ...mapState({
- theme: state => state.mallConfig.theme,
- userInfo: state => state.user.info,
- adminImg: state => state.mallConfig.__wxapp_img.app_admin,
- })
- },
- methods: {
- clearSearch() {
- this.keyword = '';
- },
- reload() {
- uni.showLoading({
- title: '加载中...'
- });
- this.page = 1;
- this.list = [];
- this.getList();
- },
- makeRemark(data) {
- this.beRemark = true;
- this.detail = data;
- if(data.seller_remark) {
- this.remark = data.seller_remark
- }
- },
- toRemark() {
- let that = this;
- that.$request({
- url: that.$api.app_admin.sellerRemark,
- method: 'post',
- data: {
- order_id: that.detail.id,
- seller_remark: that.remark
- }
- }).then(response=>{
- if(response.code == 0) {
- that.detail.seller_remark = that.remark;
- that.cancel();
- }else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- });
- },
- toDetail(order_id,status) {
- uni.navigateTo({
- url: '/pages/app_admin/order-detail/order-detail?id='+order_id+'&status='+status
- })
- },
- toRefundAdd() {
- this.noAddress = false;
- uni.navigateTo({
- url: `/pages/address/address?manual_btn_bg=#446dfd&is_hide_default_btn=1&is_refund_address=1`,
- })
- },
- toRedirect(url) {
- uni.redirectTo({
- url: url
- })
- },
- toChangeAddress(item) {
- uni.navigateTo({
- url: '/pages/app_admin/change-add/change-add?order_no='+item.order_no
- })
- },
- toExpressInfo(item) {
- if(item.detail.length == 1 && item.detailExpress[0].express_no) {
- uni.navigateTo({
- url: '/pages/app_admin/express/express?id='+item.id+'&express='+item.detailExpress[0].express+'&express_no='+item.detailExpress[0].express_no+'&customer_name='+item.detailExpress[0].customer_name
- })
- }else {
- uni.navigateTo({
- url: '/pages/order/express-list/express-list?order_id='+item.id
- })
- }
- },
- // 取消
- cancel() {
- this.about = '';
- this.date_start = '';
- this.time = 0;
- this.date_end = '';
- this.isRefund = false;
- this.chooseTime = false;
- this.noRefund = false;
- this.changePrice = false;
- this.cancelOrder = false;
- this.custom = false;
- this.callPhone = false;
- this.isSend = false;
- this.notRefund = false;
- this.openAddress = false;
- this.isReason = false;
- this.confirmOrder = false;
- this.addressId = 0;
- this.beRemark = false;
- this.confirmOrder = false;
- this.remark = null;
- },
- // 切换类别
- tabStatus(e) {
- let that = this;
- that.status = e;
- that.active = null;
- that.list = [];
- that.date_start = '';
- that.date_end = '';
- that.keyword = '';
- that.show = false;
- that.time = 0;
- that._num = '-1';
- that.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- that.getList();
- },
- toCall(e) {
- this.mobile = e;
- this.callPhone = !this.callPhone;
- },
- call() {
- uni.makePhoneCall({
- phoneNumber: this.mobile
- })
- this.callPhone = !this.callPhone;
- },
- toSearch() {
- this.search = true;
- this.list = [];
- this.searchResult = false;
- this.candidate = uni.getStorageSync('keyword');
- this.inSearch = false;
- },
- keywordSearch(e) {
- this.keyword = e;
- this.searchResult = true;
- uni.showLoading({
- title: '加载中...'
- });
- this.page = 1;
- this.getList();
- },
- beOrderConfirm() {
- let that = this;
- that.$request({
- url: that.$api.app_admin.confirm,
- data: {
- order_id: that.detail.id
- },
- method: 'post'
- }).then(response=>{
- that.$hideLoading();
- if(response.code == 0) {
- uni.showToast({
- title: response.msg,
- duration: 1000,
- type: 'success',
- mask: false
- });
- that.cancel();
- setTimeout(v=>{
- that.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- that.getList();
- },1000)
- }else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- that.$hideLoading();
- });
- },
- beConfirm(item) {
- let that = this;
- that.$request({
- url: that.$api.app_admin.shou_huo,
- data: {
- refund_order_id: that.detail.id
- },
- method: 'post'
- }).then(response=>{
- that.$hideLoading();
- if(response.code == 0) {
- that.cancel();
- that.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- that.getList();
- }else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- that.$hideLoading();
- });
- },
- // 清除搜索记录
- clear() {
- let that = this;
- uni.removeStorage({
- key: 'keyword',
- success(res) {
- that.candidate = [];
- uni.showToast({
- title: '清理成功',
- duration: 1000,
- type: 'success',
- mask: false
- });
- }
- });
- },
- // 搜索
- searchMethod() {
- var value = uni.getStorageSync('keyword');
- if (this.keyword.length == 0) {
- return
- } else if (value.length > 0) {
- value.unshift(this.keyword)
- } else {
- value = [this.keyword]
- }
- uni.showLoading({
- title: '加载中...'
- });
- this.page = 1;
- this.getList();
- value.forEach(function(row, index) {
- if (value[0] == value[index] && index > 0) {
- value.splice(index, 1)
- }
- })
- uni.setStorage({
- key: "keyword",
- data: value
- })
- this.inSearch = true;
- this.searchResult = true;
- },
- // 取消搜索
- cancelSeacrch() {
- uni.showLoading({
- title: '加载中...'
- });
- this.search = false;
- this.keyword = '';
- // this.list = [];
- this.page = 1;
- this.getList();
- },
- change(e) {
- let that = this;
- that.time = e;
- that.custom = false;
- if (that.time == 4) {
- that.custom = true;
- that.date_end = that.today;
- that.date_start = that.today + ' 00:00:00';
- }
- },
- // 确认选择时间
- toChoose() {
- let that = this;
- uni.showLoading({
- title: '加载中...'
- });
- if (that.time != 4) {
- that.date_start = '';
- that.date_end = that.today + ' 23:59:59';
- switch (that.time.toString()) {
- case '0':
- that.date_start = '';
- that.date_end = '';
- break;
- case '1':
- that.date_start = that.today;
- break;
- case '2':
- that.date_start = that.yesterday;
- that.date_end = that.yesterday + ' 23:59:59';
- break;
- case '3':
- that.date_start = that.weekday;
- break;
- }
- setTimeout(function() {
- that.page = 1;
- that.getList();
- that.chooseTime = false;
- }, 300)
- } else {
- let endTime = that.date_end.substring(0, 10)
- let startTime = that.date_start.substring(0, 10)
- let end = endTime.split("-");
- let start = startTime.split("-");
- if (+end[0] < +start[0]) {
- uni.showToast({
- title: '结束时间不应早于开始时间',
- type: 'none',
- duration: 1000
- })
- } else if (+end[0] == +start[0]) {
- if (+end[1] < +start[1]) {
- uni.showToast({
- title: '结束时间不应早于开始时间',
- type: 'none',
- duration: 1000
- })
- } else if (+end[1] == +start[1]) {
- if (+end[2] < +start[2]) {
- uni.showToast({
- title: '结束时间不应早于开始时间',
- type: 'none',
- duration: 1000
- })
- } else {
- that.page = 1;
- that.getList();
- that.chooseTime = false;
- }
- } else {
- that.page = 1;
- that.getList();
- that.chooseTime = false;
- }
- } else {
- that.page = 1;
- that.getList();
- that.chooseTime = false;
- }
- }
- },
- startChange: function(e) {
- const val = e.detail.value;
- this.startVal = e.detail.value;
- let years = this.years;
- let year = this.years[val[0]];
- let month = this.months[val[1]];
- let day = this.days[val[2]];
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (day >= 1 && day <= 9) {
- day = "0" + day;
- }
- this.date_start = year + '-' + month + '-' + day;
- },
- endChange: function(e) {
- const val = e.detail.value;
- this.endVal = e.detail.value;
- let year = this.years[val[0]];
- let month = this.months[val[1]];
- let day = this.days[val[2]];
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (day >= 1 && day <= 9) {
- day = "0" + day;
- }
- this.date_end = year + '-' + month + '-' + day + " 23:59:59";
- },
- // 打开时间筛选
- toTime() {
- let that = this;
- that.start = [];
- that.end = [];
- let startDay;
- let endDay;
- if (that.date_start) {
- startDay = that.date_start;
- } else {
- startDay = that.today;
- }
- if (that.date_end) {
- endDay = that.date_end;
- } else {
- endDay = that.today;
- }
- that.years.forEach(function(row, index) {
- if (startDay.substring(0, 4) == that.years[index]) {
- that.start[0] = +index
- }
- })
- that.months.forEach(function(row, index) {
- if (startDay.substring(5, 7) == that.months[index]) {
- that.start[1] = +index
- }
- })
- that.days.forEach(function(row, index) {
- if (startDay.substring(8, 10) == that.days[index]) {
- that.start[2] = +index
- }
- })
- that.startVal = that.start;
- if (that.date_end) {
- endDay = that.date_end
- }
- that.years.forEach(function(row, index) {
- if (endDay.substring(0, 4) == that.years[index]) {
- that.end[0] = +index
- }
- })
- that.months.forEach(function(row, index) {
- if (endDay.substring(5, 7) == that.months[index]) {
- that.end[1] = +index
- }
- })
- that.days.forEach(function(row, index) {
- if (endDay.substring(8, 10) == that.days[index]) {
- that.end[2] = +index
- }
- })
- that.endVal = that.end;
- that.chooseTime = !that.chooseTime;
- that.show = false;
- },
- // 选择更多状态
- chooseItem(e) {
- let that = this;
- uni.showLoading({
- title: '加载中...'
- });
- that._num = e;
- that.menu.forEach(function(row, index) {
- if (row.value == that._num) {
- that.active = row;
- }
- })
- that.show = !that.show;
- that.page = 1;
- that.list = [];
- that.getList();
- },
- // 切换状态
- tab(e) {
- this._num = e;
- this.show = false;
- this.active = null;
- this.list = [];
- this.date_start = '';
- this.date_end = '';
- this.keyword = '';
- this.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- this.getList();
- },
- getList() {
- let that = this;
- if(that.loading) {
- return false
- }
- that.loading = true;
- that.about = '';
- let url;
- if (this.status == 1) {
- url = that.$api.app_admin.order
- } else if (this.status == 2) {
- url = that.$api.app_admin.refund
- }
- that.$request({
- url: url,
- data: {
- status: that._num,
- date_end: that.date_end,
- date_start: that.date_start,
- page: that.page,
- keyword: that.keyword
- }
- }).then(response=>{
- that.$hideLoading();
- uni.hideLoading();
- that.loading = false;
- if(response.code == 0) {
- let list = response.data.list;
- if (that.status == 2) {
- let status = [];
- list.forEach(function(row) {
- row.detail = [row.detail];
- status = row.status_cn.split(' ');
- row.refund_status_cn = status[status.length - 1];
- })
- let address = response.data.address;
- address.forEach(function(row, index) {
- row.address = row.address.replace(/"/g, '')
- row.address = row.address.replace(/,/g, '')
- row.address = row.address.replace('[', '')
- row.address = row.address.replace(']', '')
- })
- that.address = address;
- } else {
- list.forEach(function(row) {
- row.order_id = row.id;
- row.detail.forEach(function(res) {
- if (res.refund_status == 1 || res.refund_status == 2) {
- row.have_refund = 1;
- }
- })
- })
- }
- that.more_list = false;
- if (list.length == response.data.pagination.pageSize) {
- that.more_list = true;
- }
- if(that.page == 1) {
- that.list = list;
- }else {
- that.list = that.list.concat(list);
- }
- that.page++;
- that.$forceUpdate();
- }else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- that.loading = false;
- that.$hideLoading();
- uni.hideLoading();
- });
- },
- toCancelorder(e) {
- this.detail = e;
- this.cancelOrder = !this.cancelOrder;
- },
- cancelSubmit() {
- let that = this;
- uni.showLoading({
- title: '加载中...'
- });
- that.$request({
- url: that.$api.app_admin.cancel,
- data: {
- status: 1,
- remark: '',
- order_id: that.detail.id
- },
- method: 'post'
- }).then(response => {
- uni.hideLoading();
- if (response.code == 0) {
- uni.showToast({
- title: '取消成功',
- duration: 2000,
- type: 'success',
- mask: false
- });
- // that.list = [];
- that.isRefund = false;
- that.cancelOrder = false;
- that.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- that.getList();
- } else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- uni.showToast({
- title: response,
- icon: 'none',
- duration: 1000
- });
- });
- },
- toChange(e) {
- this.detail = e;
- this.changePrice = !this.changePrice;
- this.price = e.total_goods_price;
- this.express = e.express_price;
- this.total = '¥' + e.total_pay_price;
- },
- priceInput: function(e) {
- if (e.detail.value > -0.01) {
- this.total = '¥' + (+e.detail.value + +this.express).toFixed(2)
- } else {
- this.total = '数据有误'
- }
- },
- expressInput: function(e) {
- if (e.detail.value > -0.01) {
- this.total = '¥' + (+e.detail.value + +this.price).toFixed(2)
- } else {
- this.total = '数据有误'
- }
- },
- // 确认修改价格
- submitChange() {
- let that = this;
- uni.showLoading({
- title: '加载中...'
- });
- if (that.price > -0.01 && that.express > -0.01) {
- that.$request({
- url: that.$api.app_admin.update_price,
- data: {
- order_id: that.detail.id,
- total_price: that.price,
- express_price: that.express
- },
- method: 'post'
- }).then(response => {
- uni.hideLoading();
- if (response.code == 0) {
- uni.showToast({
- title: response.msg,
- duration: 2000,
- type: 'success',
- mask: false
- });
- that.page = 1;
- // that.list = [];
- that.changePrice = false;
- that.getList();
- } else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- uni.showToast({
- title: response,
- icon: 'none',
- duration: 1000
- });
- });
- } else {
- if (!that.price || typeof(that.price) != 'number') {
- uni.showToast({
- title: '商品总价必须大于等于0',
- icon: 'none',
- duration: 1000
- });
- } else if (!that.express || typeof(that.express) != 'number') {
- uni.showToast({
- title: '运费必须大于等于0',
- icon: 'none',
- duration: 1000
- });
- }
- }
- },
- toRefundOrder(e) {
- let that = this;
- that.list = [];
- that.more_list = false;
- that.keyword = e;
- that.status = 2;
- that.search = true;
- that.searchMethod();
- },
- toSend(e) {
- let that = this;
- that.detail = e;
- if(that.detail.send_type != 2) {
- if (that.detail.status_cn) {
- uni.navigateTo({
- url: '/pages/app_admin/send/send?order_refund_id=' + that.detail.id + '&id=' + that.detail.order_id
- })
- } else {
- uni.navigateTo({
- url: '/pages/app_admin/send/send?id=' + that.detail.id
- })
- }
- }else {
- that.isSend = true;
- }
- },
- toExpress(e,is_send) {
- let id = e.id;
- let order_refund_id = e.refund;
- if (id > 0) {
- uni.navigateTo({
- url: '/pages/app_admin/send/send?id=' + id + '&is_send=' + is_send
- })
- } else if (order_refund_id) {
- uni.navigateTo({
- url: '/pages/app_admin/send/send?order_refund_id=' + order_refund_id + '&is_send=' + is_send
- })
- }
- },
- toSendType() {
- let that = this;
- let para;
- if (that.sendType == 1 || that.detail.send_type == 2) {
- uni.showLoading({
- title: '加载中...'
- });
- para = {
- is_express: 0,
- words: '',
- order_id: that.detail.id
- };
- if(that.detail.send_type == 2) {
- para.man = that.delivery;
- }
- that.$request({
- url: that.$api.app_admin.send,
- data: para,
- method: 'post'
- }).then(response => {
- uni.hideLoading();
- if (response.code == 0) {
- uni.showToast({
- title: response.msg,
- type: 'success',
- mask: false,
- duration: 2000
- });
- // that.list = [];
- that.page = 1;
- that.isSend = false;
- that.sendType = 0;
- that.getList();
- } else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- uni.showToast({
- title: response,
- icon: 'none',
- duration: 1000
- });
- });
- }
- },
- look(e) {
- uni.previewImage({
- current: e, // 当前显示图片的http链接
- urls: [e] // 需要预览的图片http链接列表
- })
- },
- lookAbout(e) {
- this.detail = e;
- this.isReason = true;
- },
- toConfirm(e) {
- this.detail = e;
- this.confirmOrder = !this.confirmOrder;
- },
- toRefund(e) {
- this.detail = e;
- this.refund_price = e.refund_price;
- this.isRefund = !this.isRefund;
- },
- agree() {
- let that = this;
- uni.showLoading({
- title: '处理中...'
- });
- if (that.detail.refund_price > 0) {
- that.$request({
- url: that.$api.app_admin.refund_handle,
- data: {
- order_refund_id: that.detail.id,
- type: that.detail.type,
- is_agree: 1,
- refund_price: that.refund_price,
- merchant_remark: that.about
- },
- method: 'post'
- }).then(response => {
- uni.hideLoading();
- if (response.code == 0) {
- uni.showModal({
- title: '提示',
- content: response.msg,
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- // that.list = [];
- that.notRefund = false;
- that.openAddress = false;
- that.isRefund = false;
- that.addressId = 0;
- that.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- that.getList();
- }
- }
- });
- } else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- uni.showToast({
- title: response,
- icon: 'none',
- duration: 1000
- });
- });
- } else {
- uni.showToast({
- title: '退款金额需大于零',
- icon: 'none',
- duration: 1000
- });
- }
- },
- refundHandle(type,detail,cancel) {
- if (cancel == 1) {
- this.cancelRefund = true;
- }
- if (type == 1) {
- if (this.address.length == 0) {
- this.noAddress = true;
- } else {
- this.detail = detail;
- this.openAddress = true;
- }
- } else if (type == 2) {
- this.detail = detail;
- this.notRefund = true;
- }
- },
- toAgreeCancel(e) {
- this.detail = e;
- this.isRefund = !this.isRefund;
- },
- decline(type) {
- let that = this;
- if (type == 1) {
- if (that.addressId < 1) {
- uni.showToast({
- title: '请选择地址',
- icon: 'none',
- duration: 1000
- });
- return false;
- }
- }
- if (that.cancelRefund) {
- type = 2;
- }
- uni.showLoading({
- title: '处理中...'
- });
- that.$request({
- url: that.$api.app_admin.refund_handle,
- data: {
- order_refund_id: that.detail.id,
- type: that.detail.type,
- is_agree: type,
- address_id: that.addressId,
- refund_price: that.detail.refund_price,
- merchant_remark: that.about
- },
- method: 'post'
- }).then(response => {
- uni.hideLoading();
- if (response.code == 0) {
- uni.showModal({
- title: '提示',
- content: response.msg,
- showCancel: false,
- success: function (res) {
- if (res.confirm) {
- that.page = 1;
- // that.list = [];
- that.notRefund = false;
- that.cancelOrder = false;
- that.openAddress = false;
- that.addressId = 0;
- that.getList();
- }
- }
- });
- } else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- uni.showToast({
- title: response,
- icon: 'none',
- duration: 1000
- });
- });
- },
- chooseAddress(e) {
- if (this.addressId == e) {
- this.addressId = ''
- }else {
- this.addressId = e
- }
- },
- chooseDelivery(e) {
- if (this.getDeliveryId == e.id) {
- this.deliveryId = ''
- }else {
- this.deliveryId = e.id
- this.delivery = "(" + e.id + ")" + e.name;
- }
- },
- noCancel() {
- let that = this;
- uni.showLoading({
- title: '处理中...'
- });
- that.$request({
- url: that.$api.app_admin.cancel,
- data: {
- status: 2,
- remark: that.about,
- order_id: that.detail.id
- },
- method: 'post'
- }).then(response => {
- uni.hideLoading();
- if (response.code == 0) {
- uni.showToast({
- title: response.msg,
- type: 'success',
- mask: false,
- duration: 2000
- });
- // that.list = [];
- that.page = 1;
- that.noRefund = false;
- that.getList();
- } else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- uni.showToast({
- title: response,
- icon: 'none',
- duration: 1000
- });
- });
- },
- beNotRefund(e) {
- this.detail = e;
- this.noRefund = !this.noRefund;
- },
- },
- onReachBottom: function() {
- if (this.more_list) {
- this.getList();
- }
- },
- onShow: function() {
- // this.list = [];
- this.page = 1;
- this.getList();
- },
- onLoad(options) {
- let that = this;
- that.$showLoading({
- type: 'global',
- text: '加载中...'
- });
- that.status = '1';
- that._num = '-1';
- var myDate = new Date();
- // 今天
- let year = myDate.getFullYear();
- let month = myDate.getMonth() + 1;
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- let now = myDate.getDate();
- that.today = year + "-" + month + "-" + now;
- var timestamp = Date.parse(new Date());
- // 昨天
- let yesterTime = (timestamp / 1000 - 24 * 60 * 60) * 1000;
- let yesterDate = new Date(yesterTime)
- let yester_year = yesterDate.getFullYear();
- let yester_month = yesterDate.getMonth() + 1;
- if (yester_month >= 1 && yester_month <= 9) {
- yester_month = "0" + yester_month;
- }
- let yester_now = yesterDate.getDate();
- that.yesterday = yester_year + "-" + yester_month + "-" + yester_now;
- // 7天
- let weekTime = (timestamp / 1000 - 24 * 60 * 60 * 7) * 1000;
- let weekDate = new Date(weekTime)
- let week_year = weekDate.getFullYear();
- let week_month = weekDate.getMonth() + 1;
- if (week_month >= 1 && week_month <= 9) {
- week_month = "0" + week_month;
- }
- let week_now = weekDate.getDate();
- that.weekday = week_year + "-" + week_month + "-" + week_now;
- uni.getSystemInfo({
- success: function (res) {
- if(res.model.indexOf('iPhone X') > -1 || res.model.indexOf('iPhone 11') > -1 || res.model.indexOf('iPhone11') > -1 || res.model.indexOf('iPhone12') > -1 || res.model.indexOf('Unknown Device') > -1) {
- that.iphone_x = true;
- }
- }
- })
- that.$request({
- url: that.$api.app_admin.delivery
- }).then(response=>{
- if(response.code == 0) {
- this.cityList = response.data.list;
- this.deliveryId = response.data.list[0].id;
- this.delivery = "(" + response.data.list[0].id + ")" + response.data.list[0].name
- }else {
- uni.showToast({
- title: response.msg,
- icon: 'none',
- duration: 1000
- });
- }
- }).catch(response => {
- uni.hideLoading();
- });
- if(options.msg) {
- that.msg = true;
- }
- if(options.status > -1) {
- that._num = options.status
- }
- if(options.refund > 0) {
- that.status = 2
- }
- if (options.no) {
- if (options.no.slice(0, 2) == "RE") {
- that.status = 2;
- }
- that.search = true;
- that.inSearch = true;
- that.keyword = options.no;
- this.getList();
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .dialog-bg {
- width: 100%;
- height: 100%;
- position: fixed;
- background-color: rgba(0, 0, 0, 0.5);
- left: 0;
- top: 0;
- }
- .tab {
- margin: #{24rpx} auto;
- width: #{320rpx};
- height: #{56rpx};
- }
- .bottom-tab.iphone_x {
- height: #{146rpx};
- padding-bottom: #{50rpx};
- }
- .bottom-tab {
- width: 100%;
- height: #{96rpx};
- background-color: #fff;
- font-size: #{20rpx};
- color: #9096ad;
- padding-top: #{14rpx};
- z-index: 999;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- }
- .tab-nav-item {
- text-align: center;
- }
- .tab-icon {
- height: #{48rpx};
- width: #{48rpx};
- display: inline-block;
- }
- .tab-nav-item.active {
- color: #446dfd;
- }
- .tab-nav-item view {
- margin-top: #{-5rpx};
- }
- .tab-info {
- background-color: #fff;
- position: fixed;
- z-index: 2;
- top: 0;
- left: 0;
- right: 0;
- height: #{104rpx};
- }
- .tab-item {
- width: #{160rpx};
- text-align: center;
- height: #{56rpx};
- line-height: #{54rpx};
- background-color: #fff;
- color: #666;
- font-size: #{24rpx};
- display: block;
- }
- .tab-item.tab-left {
- border-top-left-radius: #{28rpx};
- border-bottom-left-radius: #{28rpx};
- border: #{2rpx} solid #446dfd;
- border-right: 0;
- }
- .tab-item.tab-right {
- border-top-right-radius: #{28rpx};
- border-bottom-right-radius: #{28rpx};
- border: #{2rpx} solid #446dfd;
- border-left: 0;
- }
- .tab-item.active {
- background-color: #446dfd;
- color: #fff;
- }
- .search-area {
- position: fixed;
- z-index: 3;
- top: #{104rpx};
- left: 0;
- right: 0;
- height: #{88rpx};
- line-height: #{88rpx};
- background-color: #efeff4;
- padding: 0 #{48rpx} 0 #{24rpx};
- }
- .search {
- height: #{56rpx};
- line-height: #{56rpx};
- border-radius: #{28rpx};
- background-color: #fff;
- color: #b2b2b2;
- width: #{528rpx};
- text-align: center;
- }
- .choose {
- color: #446dfd;
- font-size: #{26rpx};
- }
- .choose image {
- width: #{22rpx};
- height: #{12rpx};
- margin-left: #{12rpx};
- }
- .navs-info {
- background-color: #fff;
- border-bottom: #{1rpx} solid #e2e2e2;
- position: fixed;
- z-index: 2;
- top: #{182rpx};
- left: 0;
- right: 0;
- padding-top: #{10rpx};
- }
- .navs {
- height: #{100rpx};
- font-size: #{28rpx};
- color: #666;
- text-align: center;
- position: relative;
- }
- .navs.more-navs {
- line-height: #{100rpx};
- }
- .navs .active {
- color: #446dfd;
- display: inline-block;
- height: #{100rpx};
- line-height: #{102rpx};
- border-bottom: #{2rpx} solid #446dfd;
- }
- .navs image {
- height: #{16rpx};
- width: #{16rpx};
- margin-left: #{16rpx};
- display: block;
- float: right;
- margin-top: #{42rpx};
- }
- .order-item {
- background-color: #fff;
- padding: #{24rpx};
- margin: #{20rpx} #{24rpx} 0;
- border-radius: #{16rpx};
- display: block;
- }
- .order-info {
- font-size: #{24rpx};
- color: #353535;
- margin-bottom: #{24rpx};
- .remark-info {
- margin-top: #{8rpx};
- }
- }
- .order-user {
- height: #{72rpx};
- background-color: #f7f7f7;
- padding-left: #{28rpx};
- font-size: #{24rpx};
- color: #353535;
- }
- .order-user view:first-of-type {
- margin-right: #{32rpx};
- }
- .to-tel {
- color: #446dfd;
- font-size: #{24rpx};
- margin-left: #{20rpx};
- height: #{72rpx};
- line-height: #{72rpx};
- }
- .to-tel image {
- height: 14px;
- width: 14px;
- margin-right: #{12rpx};
- display: inline-block;
- }
- .goods {
- height: #{160rpx};
- margin-top: #{24rpx};
- position: relative;
- font-size: #{24rpx};
- color: #353535;
- margin-bottom: #{24rpx};
- .goods-status {
- height: #{40rpx};
- line-height: #{40rpx};
- color: #fff;
- width: #{160rpx};
- position: absolute;
- bottom: 0;
- left: 0;
- text-align: center;
- background-color: #446dfd;
- border-bottom-left-radius: #{4rpx};
- border-bottom-right-radius: #{4rpx};
- }
- .goods-img {
- height: #{160rpx};
- width: #{160rpx};
- float: left;
- margin-right: #{20rpx};
- border-radius: #{4rpx};
- }
- .goods-attr {
- font-size: #{24rpx};
- color: #999;
- position: absolute;
- top: #{78rpx};
- left: #{180rpx};
- width: 70%;
- text {
- margin-right: #{20rpx};
- }
- }
- .goods-num {
- font-size: #{24rpx};
- color: #999;
- position: absolute;
- top: #{126rpx};
- left: #{180rpx};
- }
- .goods-price {
- font-size: #{24rpx};
- color: #353535;
- position: absolute;
- bottom: 0;
- right: 0;
- }
- }
- .price-info {
- font-size: #{28rpx};
- color: #353535;
- }
- .price-info .other {
- font-size: #{24rpx};
- color: #999;
- }
- .handle-btn {
- height: #{48rpx};
- display: flex;
- align-items: center;
- padding: 0 #{24rpx};
- border-radius: #{24rpx};
- border: #{2rpx} solid #bbb;
- color: #353535;
- font-size: #{24rpx};
- margin-left: #{16rpx};
- }
- .handle-btn.other {
- border: #{2rpx} solid #446dfd;
- color: #446dfd;
- }
- .more-menu {
- position: fixed;
- z-index: 5;
- top: #{270rpx};
- padding-top: #{22rpx};
- right: #{22rpx};
- width: #{196rpx};
- background-color: #fff;
- font-size: #{28rpx};
- color: #666;
- border-bottom: #{1rpx} solid #e0e0e0;
- }
- .more-menu.go-out, .search-history.go-out {
- display: none;
- }
- .more-menu view {
- width: #{196rpx};
- height: #{68rpx};
- line-height: #{68rpx};
- text-align: center;
- border-left: #{1rpx} solid #e0e0e0;
- border-right: #{1rpx} solid #e0e0e0;
- }
- .search-item {
- height: #{96rpx};
- background-color: #efeff4;
- padding: 0 #{24rpx};
- font-size: #{28rpx};
- color: #00c203;
- }
- .search-input {
- height: #{64rpx};
- position: relative;
- width: #{620rpx};
- .search-clear {
- position: absolute;
- right: #{15rpx};
- top: #{21rpx};
- width: #{30rpx};
- height: #{30rpx};
- z-index: 100;
- }
- }
- .search-input .search-icon {
- height: #{22rpx};
- width: #{22rpx};
- position: absolute;
- top: #{21rpx};
- left: #{28rpx};
- z-index: 10;
- }
- .search-input input {
- padding-left: #{62rpx};
- padding-right: #{70rpx};
- background-color: #fff;
- border-radius: #{32rpx};
- height: #{64rpx};
- font-size: #{26rpx};
- color: #353535;
- }
- .search-history {
- position: absolute;
- top: #{96rpx};
- left: 0;
- right: 0;
- height: 100%;
- background-color: #fff;
- padding: #{24rpx} #{4rpx};
- font-size: #{28rpx};
- color: #666;
- z-index: 20;
- }
- .search-title {
- padding: 0 #{20rpx};
- margin-bottom: #{24rpx};
- }
- .keyword-item {
- height: #{64rpx};
- line-height: #{64rpx};
- padding: 0 #{20rpx};
- background-color: #f7f7f7;
- color: #333;
- border-radius: #{32rpx};
- font-size: #{28rpx};
- margin-left: #{20rpx};
- margin-bottom: #{20rpx};
- max-width: 90%;
- }
- .bg {
- background-color: rgba(0, 0, 0, 0.3);
- position: fixed;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- z-index: 100;
- }
- .dialog {
- width: #{620rpx};
- border-radius: #{16rpx};
- margin: 0 auto;
- background-color: #fff;
- z-index: 20;
- }
- .remark-input {
- padding: 0 #{32rpx};
- height: #{80rpx};
- margin-bottom: #{32rpx};
- color: #353535;
- input {
- border-radius: #{16rpx};
- background-color: #F7F7F7;
- height: #{80rpx};
- line-height: #{80rpx};
- padding: 0 #{24rpx};
- }
- }
- .dialog-title {
- font-size: #{32rpx};
- color: #353535;
- width: #{620rpx};
- margin: #{32rpx} auto #{40rpx};
- text-align: center;
- }
- .dialog-choose-item {
- width: #{170rpx};
- height: #{68rpx};
- line-height: #{68rpx};
- text-align: center;
- border-radius: #{34rpx};
- border: #{2rpx} solid #ddd;
- color: #666;
- font-size: #{28rpx};
- margin-bottom: #{16rpx};
- }
- .send-item {
- width: #{180rpx};
- height: #{68rpx};
- line-height: #{66rpx};
- text-align: center;
- border-radius: #{34rpx};
- border: #{2rpx} solid #ddd;
- color: #666;
- background-color: #fff;
- font-size: #{28rpx};
- margin: 0 #{30rpx} #{36rpx};
- }
- .send-item.active {
- color: #fff;
- border: #{2rpx} solid #446dfd;
- background-color: #446dfd;
- }
- .dialog-choose-item.active {
- color: #446dfd;
- border: #{2rpx} solid #446dfd;
- }
- .btn-area {
- height: #{88rpx};
- position: relative;
- border-top: #{2rpx} solid #e2e2e2;
- }
- .btn-area.other-btn-area {
- margin-top: #{10rpx};
- }
- .btn-area .line {
- height: #{32rpx};
- width: #{1rpx};
- background-color: #e2e2e2;
- position: absolute;
- top: #{28rpx};
- left: 0;
- right: 0;
- margin: 0 auto;
- }
- .submit-btn {
- height: #{88rpx};
- line-height: #{88rpx};
- font-size: #{32rpx};
- color: #666;
- width: #{310rpx};
- text-align: center;
- }
- .submit-btn.be-submit {
- color: #446dfd;
- }
- .textarea {
- height: #{252rpx};
- width: #{492rpx};
- padding: #{24rpx} #{32rpx};
- font-size: #{28rpx};
- border-radius: #{16rpx};
- border: #{2rpx} solid #e2e2e2;
- text-align: left;
- margin: #{32rpx} auto;
- }
- .change-price-item {
- position: relative;
- height: #{64rpx};
- line-height: #{64rpx};
- color: #353535;
- font-size: #{28rpx};
- margin-bottom: #{26rpx};
- }
- .change-price-item:first-of-type {
- margin-bottom: #{32rpx};
- }
- .change-price-item:last-of-type {
- margin: #{24rpx} 0 #{34rpx};
- }
- .label {
- height: #{64rpx};
- line-height: #{64rpx};
- text-align: right;
- width: #{178rpx};
- }
- .price-input {
- width: #{298rpx};
- height: #{64rpx};
- margin-left: #{24rpx};
- border-radius: #{32rpx};
- padding-left: #{62rpx};
- background-color: #f7f7f7;
- }
- .money {
- position: absolute;
- left: #{234rpx};
- }
- .time-title {
- margin-left: #{32rpx};
- color: #666;
- font-size: #{28rpx};
- margin-bottom: #{20rpx};
- }
- .choose-time {
- position: relative;
- }
- .year-1 {
- position: absolute;
- left: #{192rpx};
- top: #{146rpx};
- }
- .month-1 {
- position: absolute;
- left: #{380rpx};
- top: #{146rpx};
- }
- .day-1 {
- position: absolute;
- right: #{32rpx};
- top: #{146rpx};
- }
- .year-2 {
- position: absolute;
- left: #{192rpx};
- bottom: #{88rpx};
- }
- .month-2 {
- position: absolute;
- left: #{380rpx};
- bottom: #{88rpx};
- }
- .day-2 {
- position: absolute;
- right: #{32rpx};
- bottom: #{88rpx};
- }
- .reason {
- padding-left: #{32rpx};
- }
- .reason-title {
- font-size: #{28rpx};
- color: #999;
- margin-bottom: #{20rpx};
- }
- .reason-content {
- font-size: #{28rpx};
- color: #353535;
- width: #{556rpx};
- margin-bottom: #{26rpx};
- }
- .reason-img {
- margin-bottom: #{14rpx};
- }
- .reason-img image {
- height: #{180rpx};
- width: #{180rpx};
- margin: 0 #{8rpx} #{8rpx} 0;
- }
- .add-list {
- margin-top: #{50rpx};
- max-height: #{388rpx};
- overflow: auto;
- padding: 0 #{36rpx};
- }
- .add-item {
- padding: #{32rpx} 0;
- margin-left: #{64rpx};
- position: relative;
- font-size: #{28rpx};
- color: #353535;
- border-bottom: #{1rpx} solid #e2e2e2;
- }
- .add-item.delivery-item {
- padding-left: #{64rpx};
- margin-left: 0;
- }
- .add-item:last-of-type {
- border-bottom: 0;
- }
- .add-item image {
- height: #{36rpx};
- width: #{36rpx};
- position: absolute;
- left: #{-66rpx};
- top: 50%;
- margin-top: #{-18rpx};
- }
- .add-item .add-active {
- position: absolute;
- left: #{-64rpx};
- top: 50%;
- margin-top: #{-18rpx};
- }
- .add-item .add-name {
- width: #{220rpx};
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .add-item.delivery-item .add-name {
- width: #{400rpx};
- }
- .no-tip {
- position: fixed;
- top: #{400rpx};
- left: 0;
- right: 0;
- margin: 0 auto;
- color: #666666;
- font-size: #{24rpx};
- width: #{240rpx};
- text-align: center;
- }
- .no-tip image {
- height: #{240rpx};
- width: #{240rpx};
- margin-bottom: #{20rpx};
- }
- .refund-price {
- width: #{160rpx};
- border: #{2rpx} solid #e2e2e2;
- border-radius: #{5rpx};
- font-size: #{32rpx};
- padding: 0 #{5rpx};
- }
- .bottom-place {
- height: #{116rpx};
- }
- .bottom-place.iphone_x {
- height: #{166rpx};
- }
- .delete-icon {
- height: #{34rpx};
- width: #{28rpx};
- }
- .candidate-list {
- max-height: #{420rpx};
- overflow: hidden;
- }
- .icon-search {
- height: #{24rpx};
- width: #{24rpx};
- margin-top: #{16rpx};
- }
- .icon-search+text {
- color:#b2b2b2;
- font-size:#{24rpx};
- margin:0 #{5rpx};
- }
- .search-palce {
- height: #{292rpx};
- }
- .goods-name {
- padding-top: #{5rpx};
- }
- .menu-button {
- margin-top: #{24rpx};
- }
- .time-area {
- margin-bottom: #{24rpx};
- padding: 0 #{32rpx};
- }
- .picker-view {
- width: #{556rpx};
- height: #{216rpx};
- margin: 0 auto #{20rpx};
- text-align: center;
- .sure-color {
- color: #446dfd;
- }
- .cardinal-color {
- color: #999999;
- }
- .even-color {
- color: #cdcdcd;
- }
- }
- .picker-view view {
- line-height: #{72rpx};
- }
- .refund-pay {
- font-size: #{36rpx};
- color: #353535;
- font-weight: bold;
- }
- .refund-tip {
- font-size: #{32rpx};
- color: #353535;
- margin: #{4rpx} 0 #{45rpx};
- }
- .total-money {
- margin-left: #{56rpx};
- }
- .cancel-tip {
- font-size: #{32rpx};
- color: #353535;
- margin: #{74rpx} 0 #{60rpx};
- }
- .send-type {
- margin-bottom: #{24rpx};
- padding: 0 #{32rpx};
- }
- </style>
|