123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593 |
- <template>
- <app-layout>
- <scroll-view @scrolltolower="getMore" scroll-y :style="{'height':`${windowHeight}px`}">
- <!-- 订单切换 -->
- <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='请输入订单号/商品名称/收货人姓名搜索' />
- <image v-if="getFocus && keyword.length > 0" @click.stop="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="time == 0">汇总</text>
- <text v-else-if="time == 1">今日</text>
- <text v-else-if="time == 2">昨日</text>
- <text v-else-if="time == 3">7日</text>
- <text v-else>自定义</text>
- <image src='./../image/open.png'></image>
- </view>
- </view>
- <!-- 普通订单tab栏 -->
- <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>
- <!-- 售后订单tab栏 -->
- <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>
- <!-- 更多隐藏tab栏 -->
- <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.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)' 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)' class="to-tel dir-left-nowrap cross-center">
- <image src='./../image/tel.png'></image>
- <text>联系收货人</text>
- </view>
- </view>
- <view v-for="(goods, dIndex) 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="status ==2" class="goods-status">{{item.type == 3 ? '仅退款' : item.refund_type_text}}</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">
- <span v-if="item.plugin_data.exchange_list && item.plugin_data.exchange_list.length">{{item.plugin_data.exchange_list[dIndex].value}}{{item.plugin_data.price_name}}+</span>
- ¥{{goods.total_price}}
- </view>
- </view>
- <view class="dir-right-nowrap">
- <view class="price-info">
- <text class="other">合计</text>
- <span v-if="status == 1">
- <text v-if="item.plugin_data.exchange_count">{{item.plugin_data.exchange_count}}{{item.plugin_data.price_name}}+</text>
- <text>¥{{item.total_pay_price}}</text>
- </span>
- <text v-if="status == 2">¥{{item.refund_price}}</text>
- <text v-if="status == 1 && item.is_show_express === 1" class="other">(含运费¥{{item.express_price}})</text>
- </view>
- </view>
- </view>
- <view class="menu-button">
- <order-menu @change="cancel" :address="address" @to="toRefundOrder" :status="status" @update="update" :item="item"></order-menu>
- </view>
- </view>
- </view>
- <view class='no-tip' v-if="list.length === 0 && !loading">
- <image :src='adminImg.no_order'></image>
- <view>没有任何订单哦~</view>
- </view>
- <view class="safe-area-inset-bottom">
- <view class="u-bottom-height"></view>
- </view>
- <view class="safe-area-inset-bottom u-bottom-fixed">
- <view :class="['main-between bottom-tab']">
- <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>
- </scroll-view>
- <app-time-screening theme="admin" @click="toChoose" @cancel="cancel" v-if="chooseTime" :time="time" :start-date="date_start" :end-date="date_end"></app-time-screening>
- </app-layout>
- </template>
- <script>
- import appTimeScreening from "../../../components/page-component/app-time-screening/app-time-screening.vue";
- import orderMenu from "../components/order-menu.vue";
- import { mapState } from "vuex";
- export default {
- data() {
- return {
- status: '1',
- _num: '-1',
- getFocus: false,
- more_list: false,
- cityList: [],
- deliveryId: '0',
- delivery: '',
- addressId: '0',
- refund_price: 0,
- page: 1,
- menu: [
- {
- name: '待收货',
- value: '2'
- },
- {
- name: '待退款',
- value: '4'
- },
- {
- name: '已收货',
- value: '9'
- },
- {
- name: '已完成',
- value: '3'
- }
- ],
- active: null,
- show: false,
- search: false,
- keyword: '',
- list: [],
- candidate: [],
- date_start: '',
- date_end: '',
- time: 0,
- inSearch: false,
- address: [],
- chooseTime: false,
- msg: false,
- searchResult: false,
- total: 0,
- about: '',
- iphone_x: false,
- loading: false
- }
- },
- components: {
- "app-time-screening": appTimeScreening,
- "order-menu": orderMenu
- },
- computed: {
- ...mapState({
- userInfo: state => state.user.info,
- adminImg: state => state.mallConfig.__wxapp_img.app_admin,
- windowHeight : state=>state.gConfig.systemInfo.windowHeight
- })
- },
- methods: {
- cancel(e) {
- if(e && e.id) {
- for(let i in this.list) {
- if(this.list[i].id == e.id) {
- this.list[i] = e;
- this.$forceUpdate();
- }
- }
- }
- this.chooseTime = false;
- },
- toCall(e) {
- e.showMobile = true;
- },
- update(row) {
- if(row == 0) {
- this.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- this.getList();
- }else {
- for(let index in this.list) {
- if(this.list[index].id == row.id) {
- this.list[index] = row;
- this.$forceUpdate();
- }
- }
- }
- },
- clearSearch() {
- this.keyword = '';
- },
- reload() {
- uni.showLoading({
- title: '加载中...'
- });
- this.page = 1;
- this.list = [];
- this.getList();
- },
- toDetail(order_id,status) {
- uni.navigateTo({
- url: '/pages/app_admin/order-detail/order-detail?id='+order_id+'&status='+status
- })
- },
- toRedirect(url) {
- uni.redirectTo({
- url: url
- })
- },
- // 切换类别
- tabStatus(e) {
- let that = this;
- that.status = e;
- that.active = null;
- that.list = [];
- that.date_start = '';
- that.date_end = '';
- that.keyword = '';
- that.time = 0;
- that.show = false;
- that._num = '-1';
- that.page = 1;
- uni.showLoading({
- title: '加载中...'
- });
- that.getList();
- },
- 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();
- },
- // 清除搜索记录
- clear() {
- let that = this;
- uni.removeStorage({
- key: 'keyword',
- success() {
- that.candidate = [];
- uni.showToast({
- title: '清理成功',
- duration: 1000,
- type: 'success',
- mask: false
- });
- }
- });
- },
- // 搜索
- searchMethod() {
- let 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.page = 1;
- this.getList();
- },
- // 确认选择时间
- toChoose(date_start,date_end,time) {
- let that = this;
- uni.showLoading({
- title: '加载中...'
- });
- that.date_start = date_start;
- that.date_end = date_end;
- that.time = time;
- that.page = 1;
- that.getList();
- that.chooseTime = false;
- },
- // 打开时间筛选
- toTime() {
- let that = this;
- 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.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((row) => {
- 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.showMobile = false;
- 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(() => {
- that.loading = false;
- that.$hideLoading();
- uni.hideLoading();
- });
- },
- toRefundOrder(e) {
- let that = this;
- that.list = [];
- that.more_list = false;
- that.keyword = e;
- that.status = 2;
- that.search = true;
- that.searchMethod();
- },
- getMore() {
- if (this.more_list) {
- this.getList();
- }
- },
- 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.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.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(detail.type == 3) {
- this.refundOnly = true;
- this.detail = detail;
- }else if(detail.order.send_type != 0){
- this.cityRefund = true;
- this.detail = detail;
- }else {
- 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.isReason = !this.isReason;
- this.noRefund = false;
- },
- decline(type) {
- let that = this;
- let para = {
- order_refund_id: that.detail.id,
- type: that.detail.type,
- is_agree: type != 0 ? 1 : 0,
- refund_price: that.detail.refund_price,
- merchant_remark: that.about
- }
- if (type == 1) {
- if (that.addressId < 1) {
- uni.showToast({
- title: '请选择地址',
- icon: 'none',
- duration: 1000
- });
- return false;
- }else {
- para.address_id = that.addressId
- }
- }
- if(type == 4) {
- para.refund = 1
- }
- if (that.cancelRefund) {
- type = 2;
- para.is_agree = 2
- }
- uni.showLoading({
- title: '处理中...'
- });
- that.$request({
- url: that.$api.app_admin.refund_handle,
- data: para,
- 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.notRefund = false;
- that.cancelOrder = false;
- that.openAddress = false;
- that.refundOnly = false;
- that.cityRefund = 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.page = 1;
- that.noRefund = false;
- that.isReason = 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.isReason = !this.isReason
- this.noRefund = !this.noRefund;
- }
- },
- onShow: function() {
- this.page = 1;
- this.getList();
- },
- onLoad(options) {
- let that = this;
- that.$showLoading({
- type: 'global',
- text: '加载中...'
- });
- that.status = '1';
- that._num = '-1';
- let 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;
- let 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;
- 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">
- .no-tip {
- position: fixed;
- top: #{400rpx};
- left: 0;
- right: 0;
- margin: 0 auto;
- color: #666666;
- font-size: #{24rpx};
- width: #{240rpx};
- text-align: center;
- image {
- height: #{240rpx};
- width: #{240rpx};
- margin-bottom: #{20rpx};
- }
- }
- .tab {
- margin: #{24rpx} auto;
- width: #{320rpx};
- height: #{56rpx};
- }
- .bottom-tab {
- width: 100%;
- height: #{96rpx};
- background-color: #fff;
- font-size: #{20rpx};
- color: #9096ad;
- padding-top: #{14rpx};
- }
- .u-bottom-fixed {
- z-index: 999;
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background-color: #ffffff;
- }
- .tab-nav-item {
- text-align: center;
- &.active {
- color: #446dfd;
- }
- view {
- margin-top: #{-5rpx};
- }
- }
- .tab-icon {
- height: #{48rpx};
- width: #{48rpx};
- display: inline-block;
- }
- .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-left {
- border-top-left-radius: #{28rpx};
- border-bottom-left-radius: #{28rpx};
- border: #{2rpx} solid #446dfd;
- border-right: 0;
- }
- &.tab-right {
- border-top-right-radius: #{28rpx};
- border-bottom-right-radius: #{28rpx};
- border: #{2rpx} solid #446dfd;
- border-left: 0;
- }
- &.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};
- 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;
- &.more-navs {
- line-height: #{100rpx};
- }
- .active {
- color: #446dfd;
- display: inline-block;
- height: #{100rpx};
- line-height: #{102rpx};
- border-bottom: #{2rpx} solid #446dfd;
- }
- 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;
- view:first-of-type {
- margin-right: #{32rpx};
- }
- }
- .to-tel {
- color: #446dfd;
- font-size: #{24rpx};
- margin-left: #{20rpx};
- height: #{72rpx};
- line-height: #{72rpx};
- 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;
- .other {
- font-size: #{24rpx};
- color: #999;
- }
- }
- .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;
- view {
- width: #{196rpx};
- height: #{68rpx};
- line-height: #{68rpx};
- text-align: center;
- border-left: #{1rpx} solid #e0e0e0;
- border-right: #{1rpx} solid #e0e0e0;
- }
- }
- .more-menu.go-out, .search-history.go-out {
- display: none;
- }
- .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-icon {
- height: #{22rpx};
- width: #{22rpx};
- position: absolute;
- top: #{21rpx};
- left: #{28rpx};
- z-index: 10;
- }
- 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;
- &.get-top {
- margin-top: #{-60rpx};
- }
- }
- .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};
- }
- .reason {
- padding-left: #{32rpx};
- max-height: 600#{rpx};
- overflow: scroll;
- margin-bottom: 40#{rpx};
- &+textarea {
- height: #{186rpx};
- width: #{556rpx};
- }
- }
- .reason-title {
- font-size: #{28rpx};
- color: #999;
- margin-bottom: #{14rpx};
- }
- .reason-content {
- font-size: #{28rpx};
- color: #353535;
- width: #{556rpx};
- margin-bottom: #{20rpx};
- word-break: break-all;
- &.two-line {
- overflow: hidden;
- //#ifdef MP-ALIPAY
- height: #{64rpx};
- //#endif
- // #ifndef MP-ALIPAY
- height: #{76rpx};
- // #endif
- margin-bottom: #{10rpx};
- }
- }
- .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};
- }
- .u-bottom-height {
- height: 116upx;
- }
- .delete-icon {
- height: #{34rpx};
- width: #{28rpx};
- }
- .candidate-list {
- max-height: #{420rpx};
- overflow: hidden;
- }
- .icon-search {
- height: #{24rpx};
- width: #{24rpx};
- margin-top: #{16rpx};
- &+text {
- color:#b2b2b2;
- font-size:#{24rpx};
- margin:0 #{5rpx};
- }
- }
- .search-palce {
- height: #{292rpx};
- }
- .goods-name {
- padding-top: #{5rpx};
- }
- .menu-button {
- margin-top: #{24rpx};
- }
- </style>
|