| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138 |
- <?php
- /**
- * @link:http://www.goodmall.com/
- * @copyright: Copyright (c) 2020
- * Created by PhpStorm
- * Author: ganxiaohao
- * Date: 2020-05-08
- * Time: 16:11
- */
- //Yii::$app->loadPluginComponentView('stock-goods-edit');
- use common\helpers\ComponentHelper;
- $diyPath = dirname(__DIR__) . '/components';
- ComponentHelper::loadComponentView('price-difference-gift-package-list', $diyPath);
- ComponentHelper::loadComponentView('com-export-dialog', '@backend/views/components/common');
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" style="min-width: 1000px;">
- <div slot="header" class="title">
- <span>订单列表</span>
- <com-export-dialog :field_list='exportList' :action_url="export_url" :params="searchData"></com-export-dialog>
- </div>
- <div class="table-body">
- <el-tabs v-model="activeName" @tab-click="handleClick" type="card">
- <el-tab-pane label="会员买货订单列表" name="first">
- <div class="head" style="display: flex;">
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun1" v-model="search1.keyword" placeholder="请输入会员昵称/id"></el-input>
- <el-input clearable style="width: 125px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun1" v-model="search1.id" placeholder="请输入订单id"></el-input>
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" @keyup.enter.native="searchFun1" v-model="search1.goods_name" placeholder="请输入商品名称"></el-input>
- <el-date-picker
- style="margin-right: 20px;"
- size="small"
- v-model="search1.selectDate"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :default-time="['00:00:00', '23:59:59']"
- :picker-options="pickerOptions">
- </el-date-picker>
- <el-select v-model="search1.payment_type" placeholder="请选择" style="width: 200px;margin-right: 20px;" size="small">
- <el-option v-for="(val, key) in payment_type_arr" :key="key" :label="val" :value="key">
- </el-option>
- </el-select>
- <el-button type="primary" icon="el-icon-search" style="padding: 0 10px !important;" @click="searchFun1">搜索</el-button>
- </div>
- <el-table
- size="small"
- :data="list"
- style="width: 100%"
- v-loading="listLoading">
- <el-table-column label="会员" width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">ID:{{scope.row.user_id}}</div>
- <div style="color:#000;">昵称:{{scope.row.user.nickname}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="id"
- label="订单id"
- align="center"
- min-width="70"
- >
- </el-table-column>
- <el-table-column
- prop="order_no"
- label="订单编号"
- align="center"
- min-width="200"
- >
- <template slot-scope="scope">
- <el-tooltip class="item" effect="dark" content="点击查看订单详情" placement="top">
- <el-button @click="goOrder(scope.row.order.id)" size="mini" type="primary" effect="dark">{{scope.row.order && scope.row.order.order_no}}</el-button>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column
- prop="name"
- label="商品名称"
- min-width="200"
- >
- <template slot-scope="scope">
- <div style="display: flex;align-items: center;">
- <div style="margin-right:10px;" ><img :src="scope.row.goods.cover_pic" style="width: 40px;height: 40px;display: block;" /></div>
- <div>
- <div style="text-align: left;line-height: 16px;">{{scope.row.goods && scope.row.goods.goods_name}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column
- prop="num"
- label="商品数量"
- align="center"
- min-width="80"
- >
- </el-table-column>
- <el-table-column
- label="补货上级"
- min-width="200"
- >
- <template slot-scope="scope">
- <div class="table-info-img-text"
- v-if="scope.row.from_user && scope.row.from_user.length > 0"
- v-for="item in scope.row.from_user">
- <el-image class="default-avatar" :src="item.avatar_url"
- style="width: 50px;height: 50px;">
- <div slot="error" class="image-slot">
- <com-image src="resources/img/mall/default_avatar_url.png"
- style="width: 50px;height: 50px;"></com-image>
- </div>
- </el-image>
- <div class="table-info-text" style="width: 100px;">
- <div style="color:#000;">ID:{{item.id}}</div>
- <div style="color:#000;">昵称:{{item.nickname}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="created_at"
- label="订单创建时间"
- align="center"
- min-width="150"
- >
- <template slot-scope="scope">
- {{formatTime(scope.row.created_at)}}
- </template>
- </el-table-column>
- <!-- <el-button size="small" type="text" @click="handle('detail',item)">详情</el-button>-->
- <el-table-column
- prop="total_price"
- label="实际支付金额(元)(未扣分佣前)"
- align="center"
- min-width="100"
- >
- <template slot-scope="scope">
- <div>
- <div style="text-align: left;line-height: 16px;">{{scope.row.order && scope.row.order.pay_money}}</div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="after_distribution_price"
- label="货款金额(元)"
- align="center"
- min-width="100"
- >
- </el-table-column>
- <el-table-column
- prop="payment_type"
- align="center"
- min-width="100"
- label="支付方式"
- >
- <template slot-scope="scope">
- <el-tag size="small" type="warning">{{scope.row.order && payment_type_list[scope.row.order.payment_type]}}</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- prop="id"
- align="center"
- min-width="100"
- label="订单状态">
- <template slot-scope="scope">
- <!-- 订单状态;1已完成;2未完成;3已退款 -->
- <el-tag v-if="scope.row.order && scope.row.order.order_status == 0" type="success">{{computedType(scope.row.order && scope.row.order.order_status)}}</el-tag>
- <el-tag v-if="scope.row.order && scope.row.order.order_status == 1" type="success">{{computedType(scope.row.order && scope.row.order.order_status)}}</el-tag>
- <el-tag v-if="scope.row.order && scope.row.order.order_status == 2" type="danger">{{computedType(scope.row.order && scope.row.order.order_status)}}</el-tag>
- <el-tag v-if="scope.row.order && scope.row.order.order_status == 3" type="warning">{{computedType(scope.row.order && scope.row.order.order_status)}}</el-tag>
- <el-tag v-if="scope.row.order && scope.row.order.order_status == 4" type="warning">{{computedType(scope.row.order && scope.row.order.order_status)}}</el-tag>
- </template>
- </el-table-column>
- <!-- <el-table-column
- align="center"
- label="操作"
- min-width="150">
- <template slot-scope="scope">
- <el-button type="primary" size="mini" @click="seeDetail">查看详情</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- <!-- 代理库存页面 end -->
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination
- @current-change="pagination1"
- background
- layout="prev, pager, next"
- :page-count="pageCount1">
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="代理商补货列表" name="second">
- <div class="head" style="display: flex;margin-bottom: 20px;">
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" v-model="search2.keyword" @keyup.enter.native="searchFun2" placeholder="请输入会员昵称/id/手机号"></el-input>
- <el-input clearable style="width: 130px;margin-right: 20px;" size="small" type="text" v-model="search2.id" @keyup.enter.native="searchFun2" placeholder="请输入订单id"></el-input>
- <el-date-picker
- style="margin-right: 20px;"
- size="small"
- v-model="search2.selectDate"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :default-time="['00:00:00', '23:59:59']"
- :picker-options="pickerOptions">
- </el-date-picker>
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text" v-model="search2.goods_name" @keyup.enter.native="searchFun2" placeholder="请输入商品名称"></el-input>
- <el-select v-model="search2.payment_type" placeholder="请选择" style="width: 200px;margin-right: 20px;" size="small">
- <el-option v-for="(val, key) in payment_type_arr" :key="key" :label="val" :value="key">
- </el-option>
- </el-select>
- <el-select v-model="search2.is_pay" clearable placeholder="是否支付" style="width: 200px;margin-right: 20px;" size="small">
- <el-option v-for="(val, key) in is_pay_option" :key="key" :label="val" :value="key">
- </el-option>
- </el-select>
- <el-button type="primary" icon="el-icon-search" style="padding: 0 10px !important;" @click="searchFun2">搜索</el-button>
- </div>
- <el-table
- size="small"
- :data="list"
- style="width: 100%"
- v-loading="listLoading">
- <el-table-column label="代理商" width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">ID:{{scope.row.user_id}}</div>
- <div style="color:#000;">昵称:{{scope.row.user.nickname}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="id"
- label="订单id"
- align="center"
- min-width="70"
- >
- </el-table-column>
- <el-table-column prop="order_no" label="订单编号/支付流水号" align="center" min-width="250" >
- <template slot-scope="scope">
- <div class="no-box">
- <el-link type="primary" :underline="false">{{ scope.row.order_no }}</el-link>
- <span class="trade-no">{{ scope.row.trade_no ? scope.row.trade_no : '--' }}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="name"
- label="商品名称"
- min-width="200"
- >
- <template slot-scope="scope">
- <div style="display: flex;align-items: center;">
- <div style="margin-right:10px;" ><img :src="scope.row.goods.cover_pic" style="width: 40px;height: 40px;display: block;" /></div>
- <div>
- <div style="text-align: left;line-height: 16px;">{{scope.row.goods.goods_name}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- </el-table-column>
- <el-table-column
- prop="num"
- label="补货数量"
- align="center"
- min-width="120"
- >
- </el-table-column>
- <el-table-column
- label="补货上级"
- min-width="200"
- >
- <template slot-scope="scope">
- <div class="table-info-img-text"
- v-if="scope.row.from_user && scope.row.from_user.length > 0"
- v-for="item in scope.row.from_user">
- <el-image class="default-avatar" :src="item.avatar_url"
- style="width: 50px;height: 50px;">
- <div slot="error" class="image-slot">
- <com-image src="resources/img/mall/default_avatar_url.png"
- style="width: 50px;height: 50px;"></com-image>
- </div>
- </el-image>
- <div class="table-info-text" style="width: 100px;">
- <div style="color:#000;">ID:{{item.id}}</div>
- <div style="color:#000;">昵称:{{item.nickname}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- prop="created_at"
- label="订单创建时间"
- align="center"
- min-width="200"
- >
- <template slot-scope="scope">
- {{formatTime(scope.row.created_at)}}
- </template>
- </el-table-column>
- <el-table-column
- prop="pay_money"
- label="实际支付金额(元)"
- align="center"
- min-width="100"
- >
- </el-table-column>
- <el-table-column
- prop="payment_type"
- align="center"
- min-width="100"
- label="支付方式"
- >
- <template slot-scope="scope">
- <el-tag size="small" type="warning" v-if="scope.row.is_pay == 1">{{payment_type_list[scope.row.payment_type]}}</el-tag>
- </template>
- </el-table-column>
- <el-table-column
- prop="rand_fee"
- label="随机减金额(元)"
- align="center"
- min-width="100"
- >
- </el-table-column>
- <el-table-column
- prop="pay_money"
- label="是否支付"
- align="center"
- min-width="100"
- >
- <template slot-scope="scope">
- <el-tag v-if="scope.row.is_pay == 1" type="success">已支付</el-tag>
- <el-tag v-if="scope.row.is_pay == 0" type="danger">未支付</el-tag>
- </template>
- </el-table-column>
- <!-- <el-table-column
- align="center"
- label="操作"
- min-width="150">
- <template slot-scope="scope">
- <el-button type="primary" size="mini" @click="seeDetail">查看详情</el-button>
- </template>
- </el-table-column> -->
- </el-table>
- <!-- 代理库存页面 end -->
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination
- @current-change="pagination1"
- background
- layout="prev, pager, next"
- :page-count="pageCount1">
- </el-pagination>
- </div>
- </el-tab-pane>
- <el-tab-pane label="价差礼包列表" name="third">
- <price-difference-gift-package-list ref="price_difference_gift_package_list" @change-export-list="changeExportList"></price-difference-gift-package-list>
- </el-tab-pane>
- <el-tab-pane label="代理商配货列表" name="five">
- <div class="head" style="display: flex;">
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text"
- @keyup.enter.native="searchFun1" v-model="search4.goods_name"
- placeholder="请输入商品名称"></el-input>
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text"
- @keyup.enter.native="searchFun1" v-model="search4.order_no"
- placeholder="请输入订单编号"></el-input>
- <el-input clearable style="width: 200px;margin-right: 20px;" size="small" type="text"
- @keyup.enter.native="searchFun1" v-model="search4.keyword"
- placeholder="请输入代理商ID/昵称"></el-input>
- <el-select v-model="search4.type" placeholder="请选择配货类型"
- style="width: 200px;margin-right: 20px;" size="small">
- <el-option v-for="(val, key) in type_arr" :key="key" :label="val" :value="key">
- </el-option>
- </el-select>
- <el-date-picker
- style="margin-right: 20px;"
- size="small"
- v-model="search4.selectDate"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- :default-time="['00:00:00', '23:59:59']"
- :picker-options="pickerOptions">
- </el-date-picker>
- <el-button type="primary" icon="el-icon-search" style="padding: 0 10px !important;"
- @click="searchFun4">搜索
- </el-button>
- </div>
- <el-table
- size="small"
- :data="list"
- style="width: 100%"
- v-loading="listLoading">
- <el-table-column label="代理商" width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">ID:{{scope.row.user.id}}</div>
- <div style="color:#000;">昵称:{{scope.row.user.nickname}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="order_no" label="订单编号" align="center" min-width="200">
- </el-table-column>
- <el-table-column
- prop="name"
- label="商品信息"
- min-width="200"
- >
- <template slot-scope="scope">
- <div style="display: flex;align-items: center;">
- <div style="margin-right:10px;"><img :src="scope.row.goods.cover_pic"
- style="width: 40px;height: 40px;display: block;"/>
- </div>
- <div>
- <div style="text-align: left;line-height: 16px;">
- {{scope.row.goods.goods_name}}
- </div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="num" label="商品数量" align="center" min-width="80"></el-table-column>
- <el-table-column prop="money" label="配货商品金额" align="center"
- min-width="150"></el-table-column>
- <el-table-column label="配货下级" min-width="200">
- <template slot-scope="scope">
- <div class="table-info-img-text"
- v-if="scope.row.from_user && scope.row.from_user.length > 0"
- v-for="item in scope.row.from_user">
- <el-image class="default-avatar" :src="item.avatar_url"
- style="width: 50px;height: 50px;">
- <div slot="error" class="image-slot">
- <com-image src="resources/img/mall/default_avatar_url.png"
- style="width: 50px;height: 50px;"></com-image>
- </div>
- </el-image>
- <div class="table-info-text" style="width: 100px;">
- <div style="color:#000;">ID:{{item.id}}</div>
- <div style="color:#000;">昵称:{{item.nickname}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="type_text" label="配货类型" align="center"
- min-width="80"></el-table-column>
- <el-table-column
- prop="created_at"
- label="订单创建时间"
- align="center"
- min-width="150"
- >
- <template slot-scope="scope">
- {{formatTime(scope.row.created_at)}}
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="操作"
- min-width="150">
- <template slot-scope="scope">
- <el-button type="primary" size="mini" @click="seeCommissionDetail(scope.row.id)">
- 分润明细
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination
- @current-change="pagination1"
- background
- layout="prev, pager, next"
- :page-count="pageCount1">
- </el-pagination>
- </div>
- </el-tab-pane>
- </el-tabs>
- </div>
- </el-card>
- <el-dialog
- center
- title="库存详情"
- :visible.sync="dialogVisible"
- width="50%"
- >
- <el-table
- size="small"
- :data="tableData2"
- style="width: 100%;padding-bottom: 30px;">
- <el-table-column
- label="商品名称"
- >
- <template slot-scope="scope">
- <div style="display: flex;align-items: center;">
- <img :src="scope.row.huiyuan.img" style="width: 35px;height: 35px;display: block;margin-right: 5px;" />
- <div>{{scope.row.huiyuan.name}}</div>
- </div>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- label="拿货价"
- >
- <template slot-scope="scope">
- ¥{{scope.row.id}}
- </template>
- </el-table-column>
- <el-table-column
- prop="id"
- align="center"
- label="库存">
- </el-table-column>
- </el-table>
- </el-dialog>
- <el-dialog :close-on-click-modal="false" class="fenRunData" title="分润明细"
- :visible.sync="dialogTableVisible_fenRun">
- <el-table :data="fenRunData">
- <el-table-column label="用户">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.avatar_url">
- <div slot="error" class="image-slot">
- <el-image class="table-info-img"
- src="/resources/img/common/default-avatar.png"></el-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div>{{scope.row.nickname}}</div>
- <div>{{scope.row.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column property="change_num" label="佣金">
- <template slot-scope="scope">
- <span v-if="scope.row.change_type=='add'"
- style="color:green;">+{{scope.row.change_num}}</span>
- <span v-else style="color:red;">-{{scope.row.change_num}}</span>
- </template>
- </el-table-column>
- <el-table-column property="is_frozen" label="状态"></el-table-column>
- <el-table-column property="desc" label="类型">
- <template slot-scope="scope">
- {{scope.row.capital_type_text}} : {{scope.row.desc}}
- </template>
- </el-table-column>
- </el-table>
- </el-dialog>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- edit:{
- show:false,
- id:0,
- },
- list: [],
- keyword: '',
- listLoading: false,
- page: 1,
- level:1,
- pageCount1: 0,
- condition_type_list: {
- 1: '下线用户数',
- 2: '累计佣金',
- 3: '已提现佣金'
- },
- price_type_list: {
- 1: '%',
- 2: '元'
- },
- dialogVisible:false,
- activeName: 'first',
- selectData:'',
- search1:{
- keyword:'',
- goods_name:'',
- start:'',
- end:'',
- selectDate:'',
- id:'',
- payment_type:'',
- },
- search2:{
- keyword:'',
- goods_name:'',
- start:'',
- end:'',
- id:'',
- selectDate:'',
- payment_type:'',
- is_pay:undefined,
- },
- search4: {
- keyword: '',
- goods_name: '',
- start: '',
- end: '',
- order_no: '',
- selectDate: '',
- type: '',
- },
- jiaJianKuncun: [
- {
- name: '减库存',
- level: 1
- }, {
- name: '加库存',
- level: 2
- }],
- jiaJianKuncunValue: '',
- tableData2: [],
- agentLevelList: [],
- exportList: {},
- export_url: 'cloud-stock/order/index',
- searchData:{},
- payment_type_list:{},
- payment_type_arr: {
- '0': "请选择",
- '1': "微信",
- '2': "支付宝",
- '3': "银联卡",
- '5': "余额支付",
- '7': "汇聚支付",
- '8': "汇聚快捷支付",
- '12': "积分支付",
- '15': "银典支付",
- '16': "通联支付",
- },
- type_arr: {
- '0': "请选择",
- '1': "上级配货",
- '2': "平台充值",
- },
- is_pay_option: {
- '0': "未支付",
- '1': "已支付",
- },
- pickerOptions: {
- shortcuts: [{
- text: '今日',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setHours(0, 0, 0, 0);
- end.setHours(23, 59, 59, 999);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '本月',
- onClick(picker) {
- const today = new Date();
- const start = new Date(today.getFullYear(), today.getMonth(), 1);
- const end = new Date(today.getFullYear(), today.getMonth() + 1, 0, 23, 59, 59);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '近七天',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- dialogTableVisible_fenRun: false,
- fenRunData: [],
- };
- },
- mounted: function () {
- if (getQuery('list_type') == 'dispense_order') {
- this.activeName = 'five'
- this.search4.keyword = getQuery('keyword');
- this.search4.start = getQuery('start');
- this.search4.end = getQuery('end');
- this.getList4();
- } else {
- this.getList();
- }
- },
- methods: {
- changeExportList(Object){
- this.exportList = Object.export_list
- this.searchData={...Object.search_data,list_type:'diff_order',}
- },
- goOrder(id){
- let params = {
- r: 'mall/order/detail'
- };
- if (id) params = Object.assign(params, {
- id: id
- });
- navigateTo(params);
- },
- searchFun1(){
- if(this.search1.selectDate && this.search1.selectDate[0]){
- this.search1.start = this.search1.selectDate[0];
- this.search1.end = this.search1.selectDate[1];
- }else{
- this.search1.start = '';
- this.search1.end = '';
- }
- this.page = 1;
- this.getList();
- },
- searchFun2(){
- if(this.search2.selectDate && this.search2.selectDate[0]){
- this.search2.start = this.search2.selectDate[0];
- this.search2.end = this.search2.selectDate[1];
- }else{
- this.search2.start = '';
- this.search2.end = '';
- }
- this.page = 1;
- this.getList2();
- },
- computedType(type) {//订单状态;1已完成;2未完成;3已退款
- if (type == 0) {
- return "待支付"
- } else if (type == 1) {
- return "待发货(已付款)"
- } else if (type == 2) {
- return "已发货"
- } else if (type == 3) {
- return "已收货"
- } else if (type == 4) {
- return "已完成"
- }
- },
- handleClick(tab, event) {
- // console.log(tab)
- //console.log("event="+event)
- // console.log('activeName='+this.activeName)
- if(this.activeName == 'first'){
- this.page = 1;
- this.pageCount1 = 0;
- this.getList();
- }else if(this.activeName == 'second'){
- this.page = 1;
- this.pageCount1 = 0;
- this.getList2();
- }else if(this.activeName == 'third'){
- this.page = 1;
- this.$refs.price_difference_gift_package_list.getlist(this.page);
- } else if (this.activeName == 'five') {
- this.page = 1;
- this.pageCount1 = 0;
- this.getList4();
- }
- },
- search() {
- this.page = 1;
- this.getList();
- },
- pagination1(currentPage) {
- /* let self = this; */
- this.page = currentPage;
- if(this.activeName == 'first'){
- this.getList();
- } else if (this.activeName == 'second') {
- this.getList2();
- } else if (this.activeName == 'third') {
- this.getList3();
- } else if (this.activeName == 'fourth') {
- this.$refs.price_difference_gift_package_list.getlist(this.page);
- } else if (this.activeName == 'five') {
- this.getList4();
- }
- },
- getList() {
- let self = this;
- self.listLoading = true;
- // console.log('会员买货订单列表page='+self.page)
- // console.log('会员买货订单列表search1='+JSON.stringify(this.search1))
- this.searchData = {
- list_type:'order',
- goods_name:this.search1.goods_name,
- keyword:this.search1.keyword,
- start:this.search1.start,
- end:this.search1.end,
- id:this.search1.id,
- payment_type:this.search1.payment_type,
- }
- request({
- params: {
- r: 'cloud-stock/order/index',//会员买货订单列表
- page:self.page,
- limit: 10,
- ...this.searchData
- },
- method: 'get',
- }).then(e => {
- //console.log('会员买货订单列表=',e)
- self.listLoading = false;
- if(e.data.code == 0){
- self.list = e.data.data.list;
- self.payment_type_list = e.data.data.payment_type_list;
- self.pageCount1 = e.data.data.page_count;
- self.exportList = e.data.data.export_list;
- }
- }).catch(e => {
- console.log(e);
- });
- },
- getList2(){
- this.listLoading = true;
- // console.log('补货订单列表page='+this.page)
- // console.log('补货订单列表this.search2='+JSON.stringify(this.search2))
- this.searchData = {
- list_type:'fill_order',
- goods_name:this.search2.goods_name,
- keyword:this.search2.keyword,
- start:this.search2.start,
- end:this.search2.end,
- id:this.search2.id,
- payment_type:this.search2.payment_type,
- is_pay:this.search2.is_pay
- };
- request({
- params: {
- r: 'cloud-stock/order/index',//plugin/cloud_stock/mall/fill-order/get-list补货订单列表
- page:this.page,
- limit: 10,
- ...this.searchData
- },
- method: 'get',
- }).then(e => {
- //console.log('补货订单列表='+JSON.stringify(e))
- this.listLoading = false;
- if(e.data.code == 0){
- this.list = e.data.data.list;
- this.pageCount1 = e.data.data.page_count;
- this.exportList = e.data.data.export_list;
- }
- }).catch(e => {
- console.log(e);
- });
- },
- switchStatus(row) {
- let self = this;
- self.listLoading = true;
- request({
- params: {
- r: 'cloud-stock/level/switch-status',
- },
- method: 'post',
- data: {
- id: row.id,
- }
- }).then(e => {
- self.listLoading = false;
- if (e.data.code === 0) {
- self.$message.success(e.data.msg);
- } else {
- self.$message.error(e.data.msg);
- }
- self.getList();
- }).catch(e => {
- console.log(e);
- });
- },
- editClick(id){
- if (id){
- this.edit.id=id;
- this.edit.show=true;
- this.edit.title="编辑商品"
- }else {
- this.edit.show=true;
- this.edit.title="添加商品"
- }
- },
- levelDelete(row, index) {
- let self = this;
- self.$confirm('删除该库存商品, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- self.listLoading = true;
- request({
- params: {
- r: 'cloud-stock/goods/delete',
- },
- method: 'post',
- data: {
- id: row.id,
- }
- }).then(e => {
- self.listLoading = false;
- if (e.data.code === 0) {
- self.$message.success(e.data.msg);
- self.list.splice(index, 1);
- } else {
- self.$message.error(e.data.msg);
- }
- }).catch(e => {
- console.log(e);
- });
- }).catch(() => {
- self.$message.info('已取消删除')
- });
- },
- seeCommissionDetail(id) {
- this.dialogTableVisible_fenRun = true
- this.getCapitalLog(id);
- },
- formatTime(timeStamp) {
- var date = new Date();
- date.setTime(timeStamp * 1000);
- var y = date.getFullYear();
- var m = date.getMonth() + 1;
- m = m < 10 ? ('0' + m) : m;
- var d = date.getDate();
- d = d < 10 ? ('0' + d) : d;
- var h = date.getHours();
- h = h < 10 ? ('0' + h) : h;
- var minute = date.getMinutes();
- var second = date.getSeconds();
- minute = minute < 10 ? ('0' + minute) : minute;
- second = second < 10 ? ('0' + second) : second;
- return y + '-' + m + '-' + d +' '+ h + ':' + minute + ':' + second;
- },
- getList4() {
- this.listLoading = true;
- this.searchData = {
- list_type: 'dispense_order',
- goods_name: this.search4.goods_name,
- keyword: this.search4.keyword,
- start: this.search4.start,
- end: this.search4.end,
- order_no: this.search4.order_no,
- type: this.search4.type
- };
- request({
- params: {
- r: 'cloud-stock/order/index',//plugin/cloud_stock/mall/fill-order/get-list补货订单列表
- page: this.page,
- limit: 10,
- ...this.searchData
- },
- method: 'get',
- }).then(e => {
- //console.log('补货订单列表='+JSON.stringify(e))
- this.listLoading = false;
- if (e.data.code == 0) {
- this.list = e.data.data.list;
- console.log('===', this.list);
- this.pageCount1 = e.data.data.page_count;
- this.exportList = e.data.data.export_list;
- }
- }).catch(e => {
- console.log(e);
- });
- },
- searchFun4() {
- if (this.search4.selectDate && this.search4.selectDate[0]) {
- this.search4.start = this.search4.selectDate[0];
- this.search4.end = this.search4.selectDate[1];
- } else {
- this.search4.start = '';
- this.search4.end = '';
- }
- this.page = 1;
- this.getList4();
- },
- getCapitalLog(orderId) {
- request({
- params: {
- r: 'cloud-stock/dispense-order/commission-list',
- order_id: orderId
- },
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.fenRunData = e.data.data.list;
- } else {
- self.$message.error(e.data.msg);
- }
- }).catch(e => {
- console.log(e);
- });
- },
- }
- });
- </script>
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .input-item {
- display: inline-block;
- width: 250px;
- margin: 0 0 20px;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- /* .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- } */
- .el-table thead{
- font-size: 14px;
- color: #333;
- }
- .el-table__footer-wrapper, .el-table__header-wrapper{
- border-bottom: 1.4px solid #D6D6D6;
- }
- .el-date-editor .el-range-separator{/* 设置选择日期框的中间的 ‘至’ 的宽度 */
- width: 8%;
- }
- .title{
- font-size: 18px;
- font-weight: bold;
- display: flex;
- align-items: center;
- height: 40px;
- display: flex;
- justify-content: space-between;
- }
- .no-box {
- display: flex;
- flex-direction: column;
- }
- .no-box span.trade-no {
- font-size: 12px;
- color: #bdbdbd;
- }
- </style>
|