|
@@ -0,0 +1,364 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <!-- 财务-提现申请 -->
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
|
|
|
|
|
+ <div class="card_pd">
|
|
|
|
|
+ <!-- 查询条件 -->
|
|
|
|
|
+ <Form ref="formValidate" inline :model="formValidate" :label-width="labelWidth"
|
|
|
|
|
+ :label-position="labelPosition" @submit.native.prevent>
|
|
|
|
|
+ <FormItem label="时间选择:">
|
|
|
|
|
+ <DatePicker :editable="false" @on-change="onchangeTime" :value="timeVal"
|
|
|
|
|
+ format="yyyy/MM/dd HH:mm" type="datetimerange" placement="bottom-end" placeholder="自定义时间"
|
|
|
|
|
+ class="input-width" :options="options"></DatePicker>
|
|
|
|
|
+ </FormItem>
|
|
|
|
|
+ <FormItem label="门店:">
|
|
|
|
|
+ <Select v-model="formValidate.store_id" clearable filterable @on-change="userSearchs"
|
|
|
|
|
+ class="input-add">
|
|
|
|
|
+ <Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
|
|
|
|
|
+ </Option>
|
|
|
|
|
+ </Select>
|
|
|
|
|
+ </FormItem>
|
|
|
|
|
+ <FormItem>
|
|
|
|
|
+ <!-- <Button type="primary" @click="selChange" class="btn-add">查询</Button> -->
|
|
|
|
|
+ <Button @click="exportExcel">导出</Button>
|
|
|
|
|
+ </FormItem>
|
|
|
|
|
+ </Form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Card>
|
|
|
|
|
+ <!-- <cards-data :cardLists="cardLists" v-if="extractStatistics"></cards-data> -->
|
|
|
|
|
+ <Card :bordered="false" dis-hover>
|
|
|
|
|
+ <!-- 表格 -->
|
|
|
|
|
+ <Table ref="table" :columns="formValidate.store_id == -2? columns: columnss" :data="tabList" class="ivu-mt" :loading="loading" no-data-text="暂无数据"
|
|
|
|
|
+ no-filtered-data-text="暂无筛选结果">
|
|
|
|
|
+ <template slot-scope="{ row, index }" slot="yue">
|
|
|
|
|
+ <span> {{ row.yue || 0 }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </Table>
|
|
|
|
|
+ </Card>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 编辑表单-->
|
|
|
|
|
+ <edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
|
|
|
|
|
+ <!-- 拒绝通过-->
|
|
|
|
|
+ <Modal v-model="modals" scrollable closable title="未通过原因" :mask-closable="false">
|
|
|
|
|
+ <Input v-model="fail_msg.message" type="textarea" :rows="4" placeholder="请输入未通过原因" />
|
|
|
|
|
+ <div slot="footer">
|
|
|
|
|
+ <Button type="primary" size="large" long :loading="modal_loading" @click="oks">确定</Button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </Modal>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+ import exportExcel from "@/utils/newToExcel.js";
|
|
|
|
|
+ import cardsData from "@/components/cards/cards";
|
|
|
|
|
+ import searchFrom from "@/components/publicSearchFrom";
|
|
|
|
|
+ import {
|
|
|
|
|
+ mapState
|
|
|
|
|
+ } from "vuex";
|
|
|
|
|
+ import {
|
|
|
|
|
+ getuserMoneyList,
|
|
|
|
|
+ cashEditApi,
|
|
|
|
|
+ refuseApi,
|
|
|
|
|
+ userMoneyExport,
|
|
|
|
|
+ orderExport
|
|
|
|
|
+ } from "@/api/finance";
|
|
|
|
|
+ import {
|
|
|
|
|
+ formatDate
|
|
|
|
|
+ } from "@/utils/validate";
|
|
|
|
|
+ import editFrom from "@/components/from/from";
|
|
|
|
|
+ import timeOptions from "@/utils/timeOptions";
|
|
|
|
|
+ import {
|
|
|
|
|
+ staffListInfo
|
|
|
|
|
+ } from "@/api/store";
|
|
|
|
|
+ export default {
|
|
|
|
|
+ name: "cashApply",
|
|
|
|
|
+ components: {
|
|
|
|
|
+ cardsData,
|
|
|
|
|
+ searchFrom,
|
|
|
|
|
+ editFrom
|
|
|
|
|
+ },
|
|
|
|
|
+ filters: {
|
|
|
|
|
+ formatDate(time) {
|
|
|
|
|
+ if (time !== 0) {
|
|
|
|
|
+ let date = new Date(time * 1000);
|
|
|
|
|
+ return formatDate(date, "yyyy-MM-dd hh:mm");
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ modal_loading: false,
|
|
|
|
|
+ options: timeOptions,
|
|
|
|
|
+ fail_msg: {
|
|
|
|
|
+ message: "输入信息不完整或有误!",
|
|
|
|
|
+ },
|
|
|
|
|
+ modals: false,
|
|
|
|
|
+ total: 0,
|
|
|
|
|
+ cardLists: [],
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ columns: [{
|
|
|
|
|
+ title: "时间",
|
|
|
|
|
+ key: "day",
|
|
|
|
|
+ width: 180,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "订单总金额",
|
|
|
|
|
+ key: "sum_order",
|
|
|
|
|
+ minWidth: 90,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "现金支付",
|
|
|
|
|
+ key: "cash",
|
|
|
|
|
+ minWidth: 180,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "余额支付",
|
|
|
|
|
+ slot: "yue",
|
|
|
|
|
+ minWidth: 90,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "汇付支付",
|
|
|
|
|
+ key: "huifu",
|
|
|
|
|
+ minWidth: 100,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "汇付手续费",
|
|
|
|
|
+ key: "huifu_fee",
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "趣豆使用",
|
|
|
|
|
+ key: "use_qudou",
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "趣豆抵扣",
|
|
|
|
|
+ key: "use_pay_price",
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // title: "添加时间",
|
|
|
|
|
+ // key: "add_time",
|
|
|
|
|
+ // minWidth: 100,
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
|
|
+ ],
|
|
|
|
|
+ columnss: [{
|
|
|
|
|
+ title: "时间",
|
|
|
|
|
+ key: "day",
|
|
|
|
|
+ width: 180,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "来源",
|
|
|
|
|
+ key: "name",
|
|
|
|
|
+ width: 180,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "订单总金额",
|
|
|
|
|
+ key: "sum_order",
|
|
|
|
|
+ minWidth: 90,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "现金支付",
|
|
|
|
|
+ key: "cash",
|
|
|
|
|
+ minWidth: 180,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "余额支付",
|
|
|
|
|
+ slot: "yue",
|
|
|
|
|
+ minWidth: 90,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "汇付支付",
|
|
|
|
|
+ key: "huifu",
|
|
|
|
|
+ minWidth: 100,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "汇付手续费",
|
|
|
|
|
+ key: "huifu_fee",
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "趣豆使用",
|
|
|
|
|
+ key: "use_qudou",
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: "趣豆抵扣",
|
|
|
|
|
+ key: "use_pay_price",
|
|
|
|
|
+ minWidth: 150,
|
|
|
|
|
+ },
|
|
|
|
|
+ // {
|
|
|
|
|
+ // title: "添加时间",
|
|
|
|
|
+ // key: "add_time",
|
|
|
|
|
+ // minWidth: 100,
|
|
|
|
|
+ // },
|
|
|
|
|
+
|
|
|
|
|
+ ],
|
|
|
|
|
+ tabList: [],
|
|
|
|
|
+ formValidate: {
|
|
|
|
|
+ data: "",
|
|
|
|
|
+ store_id: -2
|
|
|
|
|
+ },
|
|
|
|
|
+ extractStatistics: {},
|
|
|
|
|
+ timeVal: [],
|
|
|
|
|
+ FromData: null,
|
|
|
|
|
+ extractId: 0,
|
|
|
|
|
+ staffData: [],
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ $route() {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.$route.fullPath === "/finance/user_extract/index?status=0"
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.getPath();
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapState("admin/layout", ["isMobile"]),
|
|
|
|
|
+ labelWidth() {
|
|
|
|
|
+ return this.isMobile ? undefined : 96;
|
|
|
|
|
+ },
|
|
|
|
|
+ labelPosition() {
|
|
|
|
|
+ return this.isMobile ? "top" : "right";
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ this.staffList()
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ userSearchs(e) {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ staffList() {
|
|
|
|
|
+ staffListInfo()
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.staffData = res.data;
|
|
|
|
|
+ this.staffData = this.staffData.concat([{
|
|
|
|
|
+ id: 0,
|
|
|
|
|
+ name: '平台汇总'
|
|
|
|
|
+ },{
|
|
|
|
|
+ id: -1,
|
|
|
|
|
+ name: '门店汇总'
|
|
|
|
|
+ }])
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.$Message.error(err.msg);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ exportExcel() {
|
|
|
|
|
+ orderExport({
|
|
|
|
|
+ data: this.formValidate.data,
|
|
|
|
|
+ store_id: this.formValidate.store_id,
|
|
|
|
|
+ excal: 1
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ let data = res.data
|
|
|
|
|
+ exportExcel(data.header, data.filekey, data.fileName, data.export);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((res) => {
|
|
|
|
|
+ this.$Message.error(res.msg);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ getPath() {
|
|
|
|
|
+ // this.formValidate.page = 1;
|
|
|
|
|
+ this.formValidate.status = parseInt(this.$route.query.status);
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 具体日期
|
|
|
|
|
+ onchangeTime(e) {
|
|
|
|
|
+ this.timeVal = e;
|
|
|
|
|
+ this.formValidate.data = this.timeVal[0] ? this.timeVal.join("-") : "";
|
|
|
|
|
+ // this.formValidate.page = 1;
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 选择时间
|
|
|
|
|
+ selectChange(tab) {
|
|
|
|
|
+ // this.formValidate.page = 1;
|
|
|
|
|
+ this.formValidate.data = tab;
|
|
|
|
|
+ this.timeVal = [];
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 选择
|
|
|
|
|
+ selChange() {
|
|
|
|
|
+ // this.formValidate.page = 1;
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ reset() {
|
|
|
|
|
+ this.formValidate = {
|
|
|
|
|
+ status: "",
|
|
|
|
|
+ extract_type: "",
|
|
|
|
|
+ nireid: "",
|
|
|
|
|
+ data: "",
|
|
|
|
|
+ page: 1,
|
|
|
|
|
+ limit: 20
|
|
|
|
|
+ };
|
|
|
|
|
+ this.timeVal = [];
|
|
|
|
|
+ // this.$refs.formValidate.resetFields()
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 列表
|
|
|
|
|
+ getList() {
|
|
|
|
|
+ this.loading = true;
|
|
|
|
|
+ orderExport(this.formValidate)
|
|
|
|
|
+ .then(async (res) => {
|
|
|
|
|
+ let data = res.data;
|
|
|
|
|
+ this.tabList = data;
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((res) => {
|
|
|
|
|
+ this.loading = false;
|
|
|
|
|
+ this.$Message.error(res.msg);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ };
|
|
|
|
|
+</script>
|
|
|
|
|
+<style scoped lang="stylus">
|
|
|
|
|
+ .btn-add {
|
|
|
|
|
+ margin: 0 14px 0 -90px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .ivu-mt .type .item {
|
|
|
|
|
+ margin: 3px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .card_pd {
|
|
|
|
|
+ padding: 20px 20px 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .Refresh {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #1890FF;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .status>>>.item~.item {
|
|
|
|
|
+ margin-left: 6px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .status>>>.statusVal {
|
|
|
|
|
+ margin-bottom: 7px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* .ivu-mt >>> .ivu-table-header */
|
|
|
|
|
+ /* border-top:1px dashed #ddd!important */
|
|
|
|
|
+ .type {
|
|
|
|
|
+ padding: 3px 0;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .tabBox_img {
|
|
|
|
|
+ width: 36px;
|
|
|
|
|
+ height: 36px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|