Authored by lzhy

交易账务明细

@@ -6,6 +6,7 @@ import print from './print'; @@ -6,6 +6,7 @@ import print from './print';
6 import stock from './stock'; 6 import stock from './stock';
7 import invoice from './invoice'; 7 import invoice from './invoice';
8 import withdraw from './withdraw'; 8 import withdraw from './withdraw';
  9 +import transaction from './transaction';
9 export default { 10 export default {
10 clearing, 11 clearing,
11 payment, 12 payment,
@@ -15,4 +16,5 @@ export default { @@ -15,4 +16,5 @@ export default {
15 stock, 16 stock,
16 invoice, 17 invoice,
17 withdraw, 18 withdraw,
  19 + transaction,
18 }; 20 };
  1 +export default {
  2 + path: '/list.html',
  3 + name: 'list',
  4 + component: () => import(/* webpackChunkName: "transaction.list" */ './views/list'),
  5 + meta: {
  6 + pageName: '交易账务明细',
  7 + },
  8 +};
  1 +<template>
  2 + <div>
  3 + <layout-body>
  4 + <p slot="title">交易服务明细</p>
  5 + <layout-filter ref="filter" :model="filters" class="box-filter" :inline="true" :col="1">
  6 + <filter-item label="起止时间">
  7 + <Date-picker
  8 + v-model="filters.createTime.model"
  9 + type="datetimerange"
  10 + format="yyyy-MM-dd"
  11 + placeholder="选择日期和时间"
  12 + @on-change="createTimeChange"
  13 + ></Date-picker>
  14 + <div class="quick">
  15 + <template v-for="(option, key) in quickOptions">
  16 + <a :key="key" href="javascript:;" @click="timeFlag(key)">{{ option }}</a>
  17 + </template>
  18 + </div>
  19 + <div class="select-container">
  20 + <Select v-model.trim="filters.status.model" :placeholder="filters.status.label" clearable>
  21 + <Option v-for="(option, key) in filters.status.options" :key="key" :value="+key">
  22 + {{ option }}
  23 + </Option>
  24 + </Select>
  25 + </div>
  26 + </filter-item>
  27 + <filter-item>
  28 + <div class="select-container">
  29 + <Input v-model.trim="filters.orderCode.model" :placeholder="filters.orderCode.label" />
  30 + </div>
  31 + <div class="select-container">
  32 + <Input v-model.trim="filters.productSku.model" :placeholder="filters.productSku.label" />
  33 + </div>
  34 + <div class="select-container">
  35 + <Input v-model.trim="filters.productName.model" :placeholder="filters.productName.label" />
  36 + </div>
  37 + <div class="select-container">
  38 + <Button type="primary" @click="search">查询</Button>
  39 + <Button type="primary" @click="reset">全部</Button>
  40 + <Button type="warning" @click="exportList">导出</Button>
  41 + </div>
  42 + </filter-item>
  43 + </layout-filter>
  44 + <layout-list>
  45 + <Table border :columns="tableCols" :data="tableData"></Table>
  46 + <Page
  47 + :total="pageData.total"
  48 + :current="pageData.current"
  49 + :page-size="pageData.pageSize"
  50 + show-total
  51 + @on-change="pageChange"
  52 + ></Page>
  53 + </layout-list>
  54 + </layout-body>
  55 + </div>
  56 +</template>
  57 +
  58 +<script>
  59 +import _ from 'lodash';
  60 +import moment from 'moment';
  61 +import qs from 'querystringify';
  62 +import FinanceService from 'services/finance/finance-service';
  63 +
  64 +export default {
  65 + data() {
  66 + return {
  67 + filters: {
  68 + createTime: {
  69 + label: '创建时间',
  70 + model: '',
  71 + },
  72 + beginTime: {
  73 + model: '',
  74 + },
  75 + endTime: {
  76 + model: '',
  77 + },
  78 + timeFlag: {
  79 + label: '时间标志',
  80 + model: '',
  81 + },
  82 + status: {
  83 + label: '提现状态',
  84 + model: '',
  85 + options: {
  86 + '0': '冻结中',
  87 + '1': '可提现',
  88 + '2': '提现中',
  89 + '3': '提现成功',
  90 + '-1': '提现失败',
  91 + },
  92 + },
  93 + orderCode: {
  94 + label: '订单号',
  95 + model: '',
  96 + },
  97 + productSku: {
  98 + label: 'SKU',
  99 + model: '',
  100 + },
  101 + productName: {
  102 + label: '商品名称',
  103 + model: '',
  104 + },
  105 + pageNo: 1,
  106 + pageSize: 10,
  107 + },
  108 + tableCols: [
  109 + {
  110 + title: '账务ID',
  111 + key: 'id',
  112 + width: 60,
  113 + align: 'center',
  114 + },
  115 + {
  116 + title: '结算时间',
  117 + key: 'businessTime',
  118 + align: 'center',
  119 + render(h, params) {
  120 + const time = moment.unix(params.row.businessTime);
  121 + return (
  122 + <div>
  123 + <div>{time.format('YYYY/MM/DD')}</div>
  124 + <div>{time.format('HH:mm:ss')}</div>
  125 + </div>
  126 + );
  127 + },
  128 + },
  129 + {
  130 + title: '订单号',
  131 + key: 'orderCode',
  132 + align: 'center',
  133 + },
  134 + {
  135 + title: 'SKU',
  136 + key: 'productSku',
  137 + align: 'center',
  138 + },
  139 + {
  140 + title: '数量',
  141 + key: 'quantity',
  142 + align: 'center',
  143 + },
  144 + {
  145 + title: '商品名称',
  146 + key: 'productName',
  147 + align: 'center',
  148 + },
  149 + {
  150 + title: '账务类型',
  151 + key: 'billTypeDesc',
  152 + align: 'center',
  153 + },
  154 + {
  155 + title: '业务描述',
  156 + key: 'clearingTypeName',
  157 + align: 'center',
  158 + },
  159 + {
  160 + title: '成交价/优惠价',
  161 + key: 'lastPrice',
  162 + align: 'center',
  163 + },
  164 + {
  165 + title: '商家应收/分摊比例',
  166 + key: 'clearingDiscount',
  167 + align: 'center',
  168 + },
  169 + {
  170 + title: '商家应收',
  171 + key: 'shopDeserveAmount',
  172 + align: 'center',
  173 + },
  174 + {
  175 + title: '提现服务费',
  176 + key: 'withdrawServiceAmount',
  177 + align: 'center',
  178 + },
  179 + {
  180 + title: '商家实收',
  181 + key: 'shopNetAmount',
  182 + align: 'center',
  183 + },
  184 + {
  185 + title: '提现状态',
  186 + key: 'statusName',
  187 + align: 'center',
  188 + },
  189 + {
  190 + title: '可提现日期',
  191 + key: 'withdrawalTime',
  192 + align: 'center',
  193 + render(h, params) {
  194 + if (!params.row.withdrawalTime) {
  195 + return '';
  196 + }
  197 + const appSuTime = moment.unix(params.row.withdrawalTime);
  198 + return (
  199 + <div>
  200 + <div>{appSuTime.format('YYYY/MM/DD')}</div>
  201 + <div>{appSuTime.format('HH:mm:ss')}</div>
  202 + </div>
  203 + );
  204 + },
  205 + },
  206 + {
  207 + title: '提现申请日期',
  208 + key: 'withdrawApplyTime',
  209 + align: 'center',
  210 + render(h, params) {
  211 + if (!params.row.withdrawApplyTime) {
  212 + return '';
  213 + }
  214 + const applyTime = moment.unix(params.row.withdrawApplyTime);
  215 + return (
  216 + <div>
  217 + <div>{applyTime.format('YYYY/MM/DD')}</div>
  218 + <div>{applyTime.format('HH:mm:ss')}</div>
  219 + </div>
  220 + );
  221 + },
  222 + },
  223 + ],
  224 + tableData: [],
  225 + pageData: {
  226 + total: 0,
  227 + current: 1,
  228 + pageSize: 10,
  229 + },
  230 + quickOptions: {
  231 + 1: '今天',
  232 + 2: '昨天',
  233 + 3: '最近7天',
  234 + 4: '最近30天',
  235 + },
  236 + };
  237 + },
  238 + created() {
  239 + this.financeService = new FinanceService();
  240 + this.search();
  241 + },
  242 + methods: {
  243 + filterValues() {
  244 + const queryParams = {};
  245 + if (this.enableFilter) {
  246 + _.each(this.filters, (value, key) => {
  247 + queryParams[key] = value.model;
  248 + });
  249 + }
  250 + const { current, pageSize } = this.pageData;
  251 + return { ...queryParams, pageNo: current, pageSize };
  252 + },
  253 + search() {
  254 + this.enableFilter = true;
  255 + this.pageData.current = 1;
  256 + this.list();
  257 + },
  258 + reset() {
  259 + this.enableFilter = false;
  260 + this.pageData.current = 1;
  261 + this.list();
  262 + },
  263 + timeFlag(flag) {
  264 + this.enableFilter = false;
  265 + this.timeFlag.model = flag;
  266 + this.pageData.current = 1;
  267 + this.list();
  268 + },
  269 + createTimeChange(time) {
  270 + if (!_.isArray(time)) {
  271 + time = time.split(' - ');
  272 + }
  273 + if ((time[0] + '').length) {
  274 + this.filters.beginTime.model = moment(time[0]).format('YYYY-MM-DD');
  275 + this.filters.endTime.model = moment(time[1]).format('YYYY-MM-DD');
  276 + } else {
  277 + this.filters.beginTime.model = '';
  278 + this.filters.endTime.model = '';
  279 + }
  280 + },
  281 + pageChange(page) {
  282 + this.pageData.current = page;
  283 + this.list();
  284 + },
  285 + list() {
  286 + const params = this.filterValues();
  287 + this.financeService.shopBillList(params).then(ret => {
  288 + this.tableData = _.get(ret, 'data.records', []);
  289 + this.pageData.total = _.get(ret, 'data.totalCount', 0);
  290 + this.pageData.current = _.get(ret, 'data.pageNo', 1);
  291 + });
  292 + },
  293 + //导出列表
  294 + exportList() {
  295 + const queryString = qs.stringify(this.filterValues, true);
  296 + const href = `${FinanceService.exportSettlementDetail}${queryString}`;
  297 + window.open(href, '_blank');
  298 + },
  299 + },
  300 +};
  301 +</script>
  302 +
  303 +<style lang="scss">
  304 +.layout-container {
  305 + min-height: 200px;
  306 + margin: 15px;
  307 + overflow: hidden;
  308 + background: #fff;
  309 + border-radius: 4px;
  310 +
  311 + .layout-filter .line {
  312 + border-top: none;
  313 + margin-bottom: 0;
  314 + }
  315 +}
  316 +
  317 +.shop-card {
  318 + margin-top: 10px;
  319 + margin-bottom: 10px;
  320 +}
  321 +
  322 +.box-title {
  323 + font-weight: 700;
  324 + color: #495060;
  325 + font-size: 16px;
  326 + line-height: 22px;
  327 + margin: 5px;
  328 +
  329 + &:before {
  330 + content: ' ';
  331 + display: inline-block;
  332 + width: 5px;
  333 + margin-right: 2px;
  334 + height: 22px;
  335 + vertical-align: top;
  336 + background-color: #999;
  337 + }
  338 +}
  339 +
  340 +.box-item {
  341 + width: 90%;
  342 + height: 50px;
  343 + padding: 0 0 0 15px;
  344 + line-height: 50px;
  345 + font-size: 14px;
  346 + overflow: hidden;
  347 + border-radius: 5px;
  348 + color: #fff;
  349 + margin-bottom: 10px;
  350 +
  351 + .box-item-label {
  352 + display: inline-block;
  353 + min-width: 75px;
  354 + vertical-align: top;
  355 + font-weight: normal;
  356 + }
  357 +
  358 + .box-item-value {
  359 + font-size: 20px;
  360 + font-weight: 600;
  361 + }
  362 +
  363 + i {
  364 + display: inline-block;
  365 + width: 20px;
  366 + height: 20px;
  367 + font-size: 22px;
  368 + text-align: center;
  369 + margin-top: -7px;
  370 + vertical-align: middle;
  371 + margin-right: 3px;
  372 + }
  373 +}
  374 +
  375 +.box-filter {
  376 + .ivu-date-picker {
  377 + margin-left: 0;
  378 + width: 220px !important;
  379 + }
  380 +
  381 + .quick {
  382 + display: inline-block;
  383 + margin-left: 20px;
  384 + margin-right: 50px;
  385 +
  386 + a {
  387 + margin-right: 5px;
  388 + }
  389 + }
  390 +
  391 + .select-container {
  392 + display: inline-block;
  393 + width: 200px;
  394 + margin-right: 15px;
  395 + margin-top: 5px;
  396 + }
  397 +}
  398 +
  399 +.ivu-table-cell {
  400 + padding-left: 6px;
  401 + padding-right: 6px;
  402 +}
  403 +
  404 +.action-column {
  405 + .cell-action-row {
  406 + margin-top: 10px;
  407 +
  408 + &:last-child {
  409 + margin-bottom: 10px;
  410 + }
  411 + }
  412 +}
  413 +</style>
@@ -18,6 +18,7 @@ const apiUrl = { @@ -18,6 +18,7 @@ const apiUrl = {
18 shopWithdrawApply: '/erp/shopWithdrawApply', 18 shopWithdrawApply: '/erp/shopWithdrawApply',
19 sendShopVerifyCode: '/erp/sendShopVerifyCode', 19 sendShopVerifyCode: '/erp/sendShopVerifyCode',
20 verifySmsCode: '/erp/verifySmsCode', 20 verifySmsCode: '/erp/verifySmsCode',
  21 + queryShopBillList: '/erp/queryShopBillList',
21 }; 22 };
22 23
23 class FinanceService extends Service { 24 class FinanceService extends Service {
@@ -165,6 +166,15 @@ class FinanceService extends Service { @@ -165,6 +166,15 @@ class FinanceService extends Service {
165 verifySmsCode(params) { 166 verifySmsCode(params) {
166 return this.post(apiUrl.verifySmsCode, params); 167 return this.post(apiUrl.verifySmsCode, params);
167 } 168 }
  169 +
  170 + /**
  171 + * 交易账务明细新
  172 + * @param params
  173 + * @returns {Promise<unknown>}
  174 + */
  175 + shopBillList(params) {
  176 + return this.post(apiUrl.queryShopBillList, params);
  177 + }
168 } 178 }
169 179
170 FinanceService.exportBalanceList = '/Api/erp/exportBalanceList'; // 导出对账单列表, 结算单列表 180 FinanceService.exportBalanceList = '/Api/erp/exportBalanceList'; // 导出对账单列表, 结算单列表
@@ -129,6 +129,7 @@ const domainApis = { @@ -129,6 +129,7 @@ const domainApis = {
129 shopWithdrawApply: '/erp-gateway-web/shop/withdraw/apply', //资金操作明细-申请提现 129 shopWithdrawApply: '/erp-gateway-web/shop/withdraw/apply', //资金操作明细-申请提现
130 sendShopVerifyCode: '/erp-gateway-web/sms/sendVerificationCode', //获取短信验证码 130 sendShopVerifyCode: '/erp-gateway-web/sms/sendVerificationCode', //获取短信验证码
131 verifySmsCode: '/erp-gateway-web/sms/verifySmsCode', // 验证短信验证码 131 verifySmsCode: '/erp-gateway-web/sms/verifySmsCode', // 验证短信验证码
  132 + queryShopBillList: '/erp-gateway-web/shop/bill/list', //交易账务明细(新)
132 }, 133 },
133 platform: { 134 platform: {
134 queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid', 135 queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',