فهرست منبع

0803-0050-h01

Zory 2 روز پیش
والد
کامیت
2bf55fe6a5

+ 12 - 0
src/api/model/bank.js

@@ -0,0 +1,12 @@
+import config from "@/config";
+import http from "@/utils/request";
+
+export default {
+    list: {
+        url: `${config.API_URL}/bank/list`,
+        name: "-",
+        get: async function (data = {}) {
+            return await http.get(this.url, data);
+        },
+    },
+}

+ 12 - 0
src/api/model/merBank.js

@@ -0,0 +1,12 @@
+import config from "@/config";
+import http from "@/utils/request";
+
+export default {
+    list: {
+        url: `${config.API_URL}/merchant/bank/list`,
+        name: "-",
+        get: async function (data = {}) {
+            return await http.get(this.url, data);
+        },
+    },
+}

+ 13 - 6
src/api/model/merOrder.js

@@ -23,22 +23,29 @@ export default {
             return await http.get(this.url, params);
         },
     },
-    done: {
-        url: `${config.API_URL}/merchant/order/done`,
+    address: {
+        url: `${config.API_URL}/merchant/order/address`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);
         },
     },
-    address: {
-        url: `${config.API_URL}/merchant/order/address`,
+    save: {
+        url: `${config.API_URL}/merchant/order/save`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);
         },
     },
-    save: {
-        url: `${config.API_URL}/merchant/order/save`,
+    refund: {
+        url: `${config.API_URL}/merchant/unusual/refund`,
+        name: "-",
+        post: async function (params) {
+            return await http.post(this.url, params);
+        },
+    },
+    done: {
+        url: `${config.API_URL}/merchant/unusual/done`,
         name: "-",
         post: async function (params) {
             return await http.post(this.url, params);

+ 139 - 0
src/views/manage/finance/bills/components/search.vue

@@ -0,0 +1,139 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">条件筛选</el-tag>
+        </legend>
+        <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
+            <div class="search-form">
+                <div class="form-left">
+                    <el-row :gutter="10">
+                        <el-col :xs="12" :sm="12" :md="8" :lg="8" :xl="8">
+                            <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" :shortcuts="shortcutsDay" unlink-panels v-if="type=='1'" />
+                            <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="monthrange" range-separator="至" @change="searchForm" :shortcuts="shortcutsMon" unlink-panels v-if="type=='2'" />
+                        </el-col>
+                    </el-row>
+                </div>
+                <div class="form-line"></div>
+                <div class="form-right">
+                    <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
+                </div>
+            </div>
+        </el-form>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    props: {
+        type: { type: String, default: "1" },
+    },
+    data(){
+        return {
+            searchKey:{},
+            shortcutsDay:[
+                {
+                    text: '近7天',
+                    value: () => {
+                        const end = new Date()
+                        const start = new Date()
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
+                        return [start, end]
+                    },
+                },
+                {
+                    text: '近14天',
+                    value: () => {
+                        const end = new Date()
+                        const start = new Date()
+                        start.setTime(start.getTime() - 3600 * 1000 * 24 * 14)
+                        return [start, end]
+                    },
+                },
+                {
+                    text: '本月',
+                    value: () => {
+                        const now = new Date();
+                        const year = now.getFullYear();
+                        const month = now.getMonth(); // 当前月份(0-11)
+                        // 上个月第一天
+                        const start = new Date(year, month, 1);
+                        // 上个月最后一天(当前月份的第0天)
+                        const end = new Date(year, month+1, 0);
+                        return [start, end];
+                    },
+                },
+                {
+                    text: '上月',
+                    value: () => {
+                        const now = new Date();
+                        const year = now.getFullYear();
+                        const month = now.getMonth(); // 当前月份(0-11)
+                        // 上个月第一天
+                        const start = new Date(year, month - 1, 1);
+                        // 上个月最后一天(当前月份的第0天)
+                        const end = new Date(year, month, 0);
+                        return [start, end];
+                    },
+                },
+                {
+                    text: '近3月',
+                    value: () => {
+                        const end = new Date()
+                        const start = new Date()
+                        start.setMonth(start.getMonth() - 3)
+                        return [start, end]
+                    },
+                }
+            ],
+            shortcutsMon:[
+                {
+                    text: '本月',
+                    value: [new Date(), new Date()],
+                },
+                {
+                    text: '上月',
+                    value: () => {
+                        const now = new Date();
+                        const year = now.getFullYear();
+                        const month = now.getMonth(); // 当前月份(0-11)
+                        // 上个月第一天
+                        const start = new Date(year, month - 1, 1);
+                        // 上个月最后一天(当前月份的第0天)
+                        const end = new Date(year, month, 0);
+                        return [start, end];
+                    },
+                },
+                {
+                    text: '近3月',
+                    value: () => {
+                        const end = new Date()
+                        const start = new Date()
+                        start.setMonth(start.getMonth() - 3)
+                        return [start, end]
+                    },
+                }
+            ]
+        }
+    },
+    methods: {
+        selectStore(){
+            this.$nextTick(()=>{
+                this.$refs.storeData.open()
+            })
+        },
+        handleStore(data){
+            this.searchKey.poi_id = data.poi_id;
+            this.searchKey.poi_name = data.poi_name;
+            this.$emit("success",this.searchKey);
+        },
+        clearStore(){
+            this.searchKey.poi_id = "";
+            this.searchKey.poi_name = "";
+            this.$emit("success",this.searchKey);
+        },
+        searchForm(){
+            this.$emit("success",this.searchKey);
+        }
+    }
+}
+</script>

+ 57 - 0
src/views/manage/finance/bills/index.vue

@@ -0,0 +1,57 @@
+<template>
+    <el-container class="flex-column">
+        <div class="table-search">
+            <div class="first-title">财务对账</div>
+            <el-tabs v-model="activeName" class="demo-tabs" @tab-change="handleClick">
+                <el-tab-pane label="日汇总" name="day"></el-tab-pane>
+                <el-tab-pane label="月汇总" name="mon"></el-tab-pane>
+                <el-tab-pane label="自定义汇总" name="custom"></el-tab-pane>
+            </el-tabs>
+            <search @success="handleSuccess" :type="elType"></search>
+        </div>
+        <el-main class="nopadding">
+            
+        </el-main>
+    </el-container>
+</template>
+
+<script>
+import search from './components/search';
+export default {
+    components: {
+        search
+    },
+    data() {
+        return {
+            activeName:"day",
+            elType:"1"
+        }
+    },
+    methods: {
+        handleClick(event){
+            this.activeName = event;
+            if (event=='mon') {
+                this.elType = 2
+            } else {
+                this.elType = 1
+            }
+        },
+        handleSuccess(){
+            
+        }
+    }
+}
+</script>
+
+<style>
+.table-search{border-bottom: 0;}
+.first-title{
+    align-items: center;
+    color: #1d2129;
+    display: flex;
+    font-size: 20px;
+    font-weight: 600;
+    justify-content: space-between;
+    line-height: 28px;
+    margin-bottom: 20px;}
+</style>

+ 11 - 2
src/views/manage/order/index/components/table.vue

@@ -41,8 +41,8 @@
                         fit="cover"></el-image>
                     </div>
                     <div class="name">
-                        <span>{{ scope.row.product.product_name }}</span>
-                        <span class="dec">商品编码:{{ scope.row.product.product_id }}</span>
+                        <span>{{ scope.row.product?scope.row.product.product_name:'-' }}</span>
+                        <span class="dec">商品编码:{{ scope.row.product?scope.row.product.product_id:'-' }}</span>
                     </div>
                 </div>
             </template>
@@ -102,6 +102,15 @@
                 </div>
             </template>
         </el-table-column>
+        <el-table-column label="佣金" prop="types" width="140" align="right">
+            <template #default="scope">
+                <div class="order-name" v-if="scope.row.status==1 || scope.row.status==2 || scope.row.status==6">
+                    <span>服务费:{{ scope.row.life_fee?$TOOL.money(scope.row.life_fee):'-' }}</span>
+                    <span class="dec">达人佣金:{{ scope.row.star_fee?$TOOL.money(scope.row.star_fee):'-' }}</span>
+                </div>
+                <div v-else>无</div>
+            </template>
+        </el-table-column>
         <el-table-column label="发货状态" prop="types" width="160" align="left">
             <template #default="scope">
                 <div v-if="scope.row.status == 2">

+ 16 - 0
src/views/manage/service/user/components/table.vue

@@ -26,6 +26,12 @@
                 <div class="status-info" v-if="scope.row.type==3"><sc-status-indicator type="info"></sc-status-indicator> 客服帐号</div>
             </template>
         </el-table-column>
+        <el-table-column label="在线" prop="type" width="120" align="left">
+            <template #default="scope">
+                <div class="status-success" v-if="scope.row.is_line==1"><sc-status-indicator type="success"></sc-status-indicator> 在线</div>
+                <div class="status-danger" v-else><sc-status-indicator type="danger"></sc-status-indicator> 离线</div>
+            </template>
+        </el-table-column>
         <el-table-column label="登录时间" prop="login_at" width="180">
             <template #default="scope">
                 {{scope.row.login_at?scope.row.login_at:'-'}}
@@ -36,6 +42,16 @@
                 {{scope.row.login_ip?scope.row.login_ip:'-'}}
             </template>
         </el-table-column>
+        <el-table-column label="最后在线时间" prop="login_ip" width="180">
+            <template #default="scope">
+                {{scope.row.last_active_at?scope.row.last_active_at:'-'}}
+            </template>
+        </el-table-column>
+        <el-table-column label="最后消息时间" prop="login_ip" width="180">
+            <template #default="scope">
+                {{scope.row.last_msg_at?scope.row.last_msg_at:'-'}}
+            </template>
+        </el-table-column>
         <el-table-column label="登录次数" prop="login_num" width="180"></el-table-column>
         <el-table-column label="注册时间" prop="create_at" width="180"></el-table-column>
         <el-table-column label="注册IP" prop="create_ip" width="180"></el-table-column>

+ 135 - 0
src/views/merchant/finance/account/components/form.vue

@@ -0,0 +1,135 @@
+<template>
+    <el-drawer v-model="visible" size="800px" destroy-on-close :close-on-click-modal="false" :with-header="false">
+        <el-container class="flex-column">
+            <div class="drawer-detail-main">
+                <div class="drawer-detail-header">
+                    <div class="drawer-detail-header-body">
+                        <div class="drawer-detail-header-left">{{titleMap[mode]}}</div>
+                        <div class="drawer-detail-header-left">
+                            <el-button type="default" icon="el-icon-close" @click="visible=false"></el-button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <el-main>
+                <el-form ref="dialogForm" :model="formData" :rules="rules" label-width="100px" label-position="top">
+                    <el-form-item label="账户类型" prop="type">
+                        <el-select v-model="formData.type" clearable placeholder="请选择" :style="{width: '100%'}">
+                            <el-option :value="1" label="个人"></el-option>
+                            <el-option :value="2" label="企业"></el-option>
+                        </el-select>
+                        <div class="el-form-item-msg"></div>
+                    </el-form-item>
+                    <template v-if="formData.type==1">
+                        <el-form-item label="真实姓名" prop="truename">
+                            <el-input v-model="formData.truename" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg">必须为真实姓名,否则结算不成功</div>
+                        </el-form-item>
+                        <el-form-item label="身份证号码" prop="idcard">
+                            <el-input v-model="formData.idcard" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg"></div>
+                        </el-form-item>
+                        <el-form-item label="注册手机号" prop="mobile">
+                            <el-input v-model="formData.mobile" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg"></div>
+                        </el-form-item>
+                        <el-form-item label="证件有效期" prop="certTime">
+                            <el-date-picker v-model="formData.certTime" placeholder="请选择日期" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" unlink-panels range-separator="至" />
+                            <div class="el-form-item-msg"></div>
+                        </el-form-item>
+                        <el-form-item label="银行卡号" prop="cardId">
+                            <el-input v-model="formData.cardId" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg"></div>
+                        </el-form-item>
+                        <el-form-item label="开户地区" prop="idcard">
+                            <el-input v-model="formData.idcard" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg"></div>
+                        </el-form-item>
+                    </template>
+                    <template v-if="formData.type==2">
+                        <el-form-item label="企业名称" prop="truename">
+                            <el-input v-model="formData.truename" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg">必须为真实姓名,否则结算不成功</div>
+                        </el-form-item>
+                        <el-form-item label="营业执照编号" prop="idcard">
+                            <el-input v-model="formData.idcard" clearable placeholder="请输入"></el-input>
+                            <div class="el-form-item-msg"></div>
+                        </el-form-item>
+                    </template>
+                </el-form>
+            </el-main>
+            <el-footer>
+                <el-button @click="visible=false" size="large">取 消</el-button>
+                <el-button v-if="mode!='show'" size="large" type="primary" :loading="isSaveing" @click="submit()">保 存</el-button>
+            </el-footer>
+        </el-container>
+    </el-drawer>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            loading: false,
+            isSaveing: false,
+            mode:"add",
+            titleMap:{
+                add:"绑定新结算账户",
+                edit:"编辑结算账户"
+            },
+            visible:false,
+            formData:{
+                type:1
+            },
+            rules:{
+                type: [
+                    {required: true, message: '请选择'}
+                ],
+                truename: [
+                    {required: true, message: '请输入'}
+                ],
+                idcard: [
+                    {required: true, message: '请输入'}
+                ],
+                certTime: [
+                    {required: true, message: '请选择'}
+                ],
+                mobile: [
+                    {required: true, message: '请输入'}
+                ],
+                cardId: [
+                    {required: true, message: '请输入'}
+                ],
+            }
+        }
+    },
+    methods:{
+        open(mode = 'add'){
+            this.mode = mode;
+            this.visible = true;
+            return this
+        },
+        //表单注入数据
+        setData(data){
+            this.formData = JSON.parse(JSON.stringify(data));
+        },
+        async submit(){
+            var validate = await this.$refs.dialogForm.validate().catch(()=>{});
+            if(!validate){ return false }
+            this.isSaveing = true;
+            let submitData = JSON.parse(JSON.stringify(this.formData));
+            // var resp = await this.$API.merPlan.save.post(submitData);
+            // this.isSaveing = false;
+            // if (resp.code == 0) {
+            //     return this.$message.error(resp.msg);
+            // }
+            // this.$message.success(resp.msg);
+            // this.visible = false;
+            // this.formData = {};
+            // this.goodsData = [];
+            // this.starData = [];
+            // this.$emit("success");
+        }
+    }
+}
+</script>

+ 75 - 0
src/views/merchant/finance/account/components/option.vue

@@ -0,0 +1,75 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">按需操作</el-tag>
+        </legend>
+        <div class="op-header">
+            <div class="left-panel">
+                <el-button type="primary" icon="el-icon-plus" @click="table_add()">绑定新账户</el-button>
+            </div>
+        </div>
+    </fieldset>
+    <formMain ref="formMain" @success="handleSuccess"></formMain>
+</template>
+
+<script>
+import formMain from './form';
+export default {
+    components: {
+        formMain
+    },
+    props: {
+        dataSelect: { type: Array, default: () => [] },
+        dataSelectFull: { type: Array, default: () => [] }
+    },
+    data(){
+        return {
+
+        }
+    },
+    methods: {
+        table_add(){
+            this.$nextTick(() => {
+                this.$refs.formMain.open("add")
+            })
+        },
+        table_sync(){
+            this.$confirm(`发起同步后,请耐心等待1-2分钟后再刷新当前数据列表`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var resp = await this.$API.category.sync.get();
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        table_batch_status(status){
+            if (this.dataSelect.length == 0) {
+                return this.$message.error("请选择修改数据")
+            }
+            this.$confirm(`审核中的商品不支持该操作,请确认是否有勾选审核中的商品`, '提示', {
+                type: 'warning'
+            }).then(async () => {
+                var loading = this.$loading()
+                let submitData = {"id":this.dataSelect,"value":status,"field":"status","type":"batch"};
+                loading.close()
+                var resp = await this.$API.merGoods.batch.post(submitData);
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(() => {
+
+            })
+        },
+        handleSuccess(){
+            this.$emit("success");
+        }
+    }
+}
+</script>

+ 44 - 0
src/views/merchant/finance/account/components/search.vue

@@ -0,0 +1,44 @@
+<template>
+    <fieldset>
+        <legend>
+            <el-tag type="info">条件筛选</el-tag>
+        </legend>
+        <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
+            <div class="search-form">
+                <div class="form-left">
+                    <el-row :gutter="10">
+                        <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
+                            <el-select v-model="searchKey.type" clearable placeholder="请选择" @change="searchForm" :style="{width: '100%'}" class="diy-select">
+                                <el-option value="1" label="个人"></el-option>
+                                <el-option value="2" label="企业"></el-option>
+                                <template #prefix>类型</template>
+                            </el-select>
+                        </el-col>
+                        <el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="6">
+                            <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm"></el-date-picker>
+                        </el-col>
+                    </el-row>
+                </div>
+                <div class="form-line"></div>
+                <div class="form-right">
+                    <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
+                </div>
+            </div>
+        </el-form>
+    </fieldset>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            searchKey:{}
+        }
+    },
+    methods: {
+        searchForm(){
+            this.$emit("success",this.searchKey);
+        }
+    }
+}
+</script>

+ 160 - 0
src/views/merchant/finance/account/components/table.vue

@@ -0,0 +1,160 @@
+<template>
+    <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id" @dataChange="getTotal">
+        <el-table-column label="保证金流水号" width="220" prop="order_sn" fixed="left"></el-table-column>
+        <el-table-column label="交易金额" prop="id">
+            <template #default="scope">
+                <div class="price">{{ $TOOL.money(scope.row.money) }}</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="状态" prop="id">
+            <template #default="scope">
+                <div class="status-success" v-if="scope.row.status==1"><sc-status-indicator type="success"></sc-status-indicator> 已生效</div>
+                <div class="status-danger" v-if="scope.row.status==0"><sc-status-indicator type="danger"></sc-status-indicator> 待生效</div>
+                <div class="status-info" v-if="scope.row.status==2"><sc-status-indicator type="info"></sc-status-indicator> 核查中</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="时间" prop="create_at"></el-table-column>
+        <el-table-column label="交易类型" prop="type">
+            <template #default="scope">
+                <div class="status-success" v-if="scope.row.type==1"><sc-status-indicator type="success"></sc-status-indicator> 充值</div>
+                <div class="status-danger" v-if="scope.row.type==2"><sc-status-indicator type="danger"></sc-status-indicator> 商责赔付扣款</div>
+                <div class="status-success" v-if="scope.row.type==3"><sc-status-indicator type="danger"></sc-status-indicator> 商责赔付退款</div>
+                <div class="status-danger" v-if="scope.row.type==4"><sc-status-indicator type="danger"></sc-status-indicator> 商责扣罚扣款</div>
+                <div class="status-success" v-if="scope.row.type==5"><sc-status-indicator type="danger"></sc-status-indicator> 商责扣罚退款</div>
+                <div class="status-danger" v-if="scope.row.type==6"><sc-status-indicator type="danger"></sc-status-indicator> 保证金退回</div>
+            </template>
+        </el-table-column>
+        <!-- <el-table-column label="操作" width="180" align="right" fixed="right">
+            <template #default="scope">
+                <el-button-group>
+                    <el-button size="small" text @click="table_update(scope.row)">查看详情</el-button>
+                </el-button-group>
+            </template>
+        </el-table-column> -->
+    </scTable>
+</template>
+
+<script>
+export default {
+    data(){
+        return {
+            list: {
+                apiObj: this.$API.merDeposit.list
+            },
+            dataSelect:[],
+            dataSelectFull:[],
+            searchKey:{}
+        }
+    },
+    
+    methods: {
+        async getTotal(){
+            var resp = await this.$API.merDeposit.data.get();
+            if (resp.code == 1) {
+                this.$emit("total",resp.data);
+            }
+        },
+        table_auth(data){
+            this.$nextTick(() => {
+                this.$refs.comboMain.open("edit").setData(data)
+            })
+        },
+        table_update(data){
+            this.$confirm(`更新后可能数据没有变化,确定更新该达人的基础数据吗?`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.merStar.update.post({"id":data.id});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
+        },
+        table_life(data){
+            this.$confirm(`来客下架成功后,在小程序中将不展示该商品,同时也将无法二次上架`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.merGoods.off.post({"id":data.id});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(()=>{})
+        },
+        table_view(data){
+            this.$router.push({path:"/merchant/goods/edit",query:{"product_id":data.product_id,"id":data.id,"spm":(new Date()).getTime()}})
+        },
+        table_del(data){
+            this.$confirm(`删除店铺后,所有有关该店铺的门店、订单等信息都将删除,不可恢复,确定要执行删除吗`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.shop.del.post({"id":data.id});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$emit("success");
+            }).catch(()=>{})
+        },
+        refresh(){
+            this.$refs.table.refresh()
+        },
+        upData(data){
+            this.$refs.table.upData(data)
+        },
+        handleSuccess(){
+            this.$refs.table.refresh()
+        },
+        sortChange(event){
+            if (event.order) {
+                var data = {
+                    "field":event.prop,
+                    "order":event.order
+                }
+                this.$refs.table.upData(data)
+            } else {
+                this.$refs.table.reload(this.searchKey)
+            }
+            return ;
+        },
+        selectionChange(event){
+            this.dataSelect = [];
+            var arr = [];
+            var arrCompany = [];
+            event.forEach(function(val,index){
+                arr[index] = val.id;
+                arrCompany[index] = val;
+            });
+            this.dataSelectFull = arrCompany;
+            this.dataSelect = arr;
+            this.$emit("success",this.dataSelect);
+            this.$emit("successFull",this.dataSelectFull);
+        },
+        table_passwd(row){
+            this.$nextTick(() => {
+                this.$refs.userPasswd.open("edit").setData(row)
+            })
+        }
+    }
+}
+</script>
+
+<style>
+.goods-img{display: flex;gap: 5px;}
+.goods-img .name span{display: block;}
+.goods-img .name span.dec{color: #999;font-size: 12px;}
+.goods-price,.price{display: flex;align-items: center;gap: 5px;font-size: 14px;}
+.goods-price .del{text-decoration: line-through;}
+.goods-price span{background-color: #fff !important;
+    border: 1px solid #d3d9e0 !important;
+    border-radius: 4px;
+    box-sizing: border-box;
+    color: #6c737a !important;
+    display: inline-flex;
+    flex: none;
+    font-size: 12px;
+    line-height: 18px !important;
+    padding: 1px 6px !important;text-decoration: none;}
+</style>

+ 61 - 3
src/views/merchant/finance/account/index.vue

@@ -1,13 +1,71 @@
 <template>
-    
+    <el-container class="flex-column">
+        <div class="table-search">
+            <search @success="handleSuccess"></search>
+            <optionBtn @success="handleSuccess" :dataSelect="dataSelect" :dataSelectFull="dataSelectFull"></optionBtn>
+        </div>
+        <el-main class="nopadding">
+            <div class="table-container">
+                <tablePage ref="tablePage" @success="tableHandle" @successFull="tableHandleFull" @total="handleTotal"></tablePage>
+            </div>
+        </el-main>
+    </el-container>
 </template>
 
 <script>
+import search from './components/search';
+import optionBtn from './components/option';
+import tablePage from './components/table';
 export default {
+    components: {
+        search,tablePage,optionBtn
+    },
     data(){
         return {
-
+            totalLoading:false,
+            searchKey:{},
+            dataSelect:[],
+            dataSelectFull:[],
+            totalData:null,
+            searchData:null
+        }
+    },
+    methods: {
+        tips(){
+            this.$alert("请联系管理员获取相关流程后进行操作","保证金相关提醒",{
+                "show-close":false
+            })
+        },
+        handleTotal(data){
+            this.totalLoading = false;
+            this.totalData = data;
+        },
+        tableHandle(data){
+            this.dataSelect = data;
+        },
+        tableHandleFull(data){
+            this.dataSelectFull = data;
+        },
+        handleSuccess(data){
+            this.$refs.tablePage.upData(data)
+        },
+        handleClick(name){
+            this.activeName = name;
+            this.searchKey.type = name;
+            this.$refs.tablePage.upData(this.searchKey)
         }
     }
 }
-</script>
+</script>
+
+<style>
+.news-title{font-size: 16px;color: #000;font-weight: bold;margin-bottom: 10px;display: flex;align-items: center;}
+.news-title::before{content: "";width: 4px;height: 16px;display: block;background-color: var(--el-color-primary);;margin-right: 8px;}
+.news-title span{margin-left: 10px;font-weight: normal;color: #666;font-size: 12px;}
+.card-item-deposit{border: 1px solid #ebedf0;padding: 20px 20px 20px;border-radius: 12px;align-self:flex-start;display: flex;flex-direction: column;max-width: 330px;box-sizing: border-box;}
+.card-item-deposit .deposit-title{color: #6c737a;font-size: 14px;line-height: 22px;}
+.card-item-deposit .card-num{align-items: flex-end;display: flex;flex-direction: row;margin-top: 12px;color: #1d2129;font-size: 32px;font-weight: 700;line-height: 40px;}
+.card-item-deposit .card-num span{font-weight: normal;font-size: 12px;line-height: 32px;margin-left: 10px;}
+.card-item-deposit .card-btn{display: flex;align-items: center;margin-top: 10px;}
+.mb10{margin-bottom: 10px;}
+</style>

+ 1 - 1
src/views/merchant/order/index/components/table.vue

@@ -84,7 +84,7 @@
         <el-table-column label="发货状态" prop="types" width="160" align="left">
             <template #default="scope">
                 <div v-if="scope.row.status == 2">
-                    <div class="order-name" v-if="scope.row.express_status == 1">
+                    <div class="order-name" v-if="scope.row.express_status == 1 || scope.row.express_status == 0">
                         <span>待发货</span>
                     </div>
                     <div class="order-name" v-if="scope.row.express_status == 2">

+ 44 - 32
src/views/merchant/order/unusual/components/table.vue

@@ -36,28 +36,6 @@
                 </div>
             </template>
         </el-table-column>
-        <el-table-column label="下单用户" width="340" prop="name">
-            <template #default="scope">
-                <div class="goods-img">
-                    <div class="img">
-                        <el-image 
-                        style="width: 54px; height: 54px"
-                        :src="scope.row.user.avatar"
-                        :zoom-rate="1.2"
-                        :max-scale="7"
-                        :min-scale="0.2"
-                        :preview-src-list="[scope.row.user.avatar]"
-                        preview-teleported
-                        z-index="999"
-                        fit="cover"></el-image>
-                    </div>
-                    <div class="name">
-                        <span>{{ scope.row.user.nickname }}</span>
-                        <span class="dec">{{ scope.row.user.openid }}</span>
-                    </div>
-                </div>
-            </template>
-        </el-table-column>
         <el-table-column label="商品售价" prop="types" width="120" align="right">
             <template #default="scope">
                 <div class="order-name">
@@ -71,11 +49,6 @@
                 {{ scope.row.pay_money?$TOOL.money(scope.row.pay_money):'-' }}
             </template>
         </el-table-column>
-        <el-table-column label="留资号码" prop="types" width="120">
-            <template #default="scope">
-                {{ scope.row.mobile?scope.row.mobile:'-' }}
-            </template>
-        </el-table-column>
         <el-table-column label="订单状态" prop="types" width="160" align="left">
             <template #default="scope">
                 <div class="order-name" v-if="scope.row.status == 0">
@@ -87,7 +60,8 @@
                     <span>待使用</span>
                 </div>
                 <div class="order-name" v-if="scope.row.status == 2">
-                    <span>已完成</span>
+                    <span v-if="scope.row.is_error == 1" style="color: #f00;">异常</span>
+                    <span v-else>已完成</span>
                 </div>
                 <div class="order-name" v-if="scope.row.status == 3">
                     <span>已退款</span>
@@ -101,12 +75,16 @@
                     <span>已关闭</span>
                     <span class="dec">用户已取消</span>
                 </div>
+                <div class="order-name" v-if="scope.row.status == 6">
+                    <span>部分退款</span>
+                    <span class="dec">已退款 <em style="color: #f00;">{{ scope.row.refund_num }}</em> 份</span>
+                </div>
             </template>
         </el-table-column>
         <el-table-column label="发货状态" prop="types" width="160" align="left">
             <template #default="scope">
                 <div v-if="scope.row.status == 2">
-                    <div class="order-name" v-if="scope.row.express_status == 1">
+                    <div class="order-name" v-if="scope.row.express_status == 1 || scope.row.express_status == 0">
                         <span>待发货</span>
                     </div>
                     <div class="order-name" v-if="scope.row.express_status == 2">
@@ -119,6 +97,18 @@
                 <div v-else>待订单完成</div>
             </template>
         </el-table-column>
+        <el-table-column label="来源达人" prop="scene" width="260">
+            <template #default="scope">
+                <div class="goods-img" v-if="scope.row.star">
+                    <div class="name">
+                        <span>{{ scope.row.star?scope.row.star.nick_name:'-' }}</span>
+                        <span class="dec">抖音ID:{{ scope.row.star?scope.row.star.uid:'-' }}</span>
+                    </div>
+                </div>
+                <div v-else>-</div>
+            </template>
+        </el-table-column>
+        <el-table-column label="来源" prop="scene" width="160"></el-table-column>
         <el-table-column label="下单时间" prop="create_at" width="160"></el-table-column>
         <el-table-column label="支付时间" prop="pay_at" width="160">
             <template #default="scope">
@@ -128,8 +118,9 @@
         <el-table-column label="操作" width="140" align="left" fixed="right">
             <template #default="scope">
                 <el-button-group>
+                    <el-button type="warning" size="small" text @click="table_refund(scope.row)">同意退款</el-button>
+                    <el-button type="danger" size="small" text @click="table_done(scope.row)">核销</el-button>
                     <el-button size="small" text @click="table_view(scope.row)">详情</el-button>
-                    <el-button type="danger" size="small" text @click="table_view(scope.row)" v-if="trade==2">标记异常</el-button>
                 </el-button-group>
             </template>
         </el-table-column>
@@ -166,8 +157,29 @@ export default {
                 this.$refs.orderDetail.open("edit").setData(data)
             })
         },
-        table_del(data){
-            
+        table_refund(data){
+            this.$confirm(`同意退款后,消费者需在小程序中手动确认,也可以重新发起核销`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.merOrder.refund.post({"order":data.order_sn});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
+        },
+        table_done(data){
+            this.$confirm(`订单核销后,无法撤销以及退款`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.merOrder.done.post({"order":data.order_sn});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
         },
         refresh(){
             this.$refs.table.refresh()

+ 25 - 2
src/views/service/order/unusual/components/table.vue

@@ -128,6 +128,8 @@
         <el-table-column label="操作" width="140" align="left" fixed="right">
             <template #default="scope">
                 <el-button-group>
+                    <el-button type="warning" size="small" text @click="table_refund(scope.row)">同意退款</el-button>
+                    <el-button type="danger" size="small" text @click="table_done(scope.row)">核销</el-button>
                     <el-button size="small" text @click="table_view(scope.row)">详情</el-button>
                 </el-button-group>
             </template>
@@ -165,8 +167,29 @@ export default {
                 this.$refs.orderDetail.open("edit").setData(data)
             })
         },
-        table_del(data){
-            
+        table_refund(data){
+            this.$confirm(`同意退款后,消费者需在小程序中手动确认,也可以重新发起核销`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.merOrder.refund.post({"order":data.order_sn});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
+        },
+        table_done(data){
+            this.$confirm(`订单核销后,无法撤销以及退款`, '提示', {
+                type: 'warning'
+            }).then(async ()=>{
+                var resp = await this.$API.merOrder.done.post({"order":data.order_sn});
+                if (resp.code == 0) {
+                    return this.$message.error(resp.msg);
+                }
+                this.$message.success(resp.msg);
+                this.$refs.table.refresh()
+            }).catch(()=>{})
         },
         refresh(){
             this.$refs.table.refresh()