|
|
@@ -0,0 +1,173 @@
|
|
|
+<template>
|
|
|
+ <scTable ref="table" :apiObj="list.apiObj" :params="searchKey" @selectionChange="selectionChange" row-key="id" :row-class-name="tableRowClassName">
|
|
|
+ <el-table-column type="selection" width="50" fixed="left"></el-table-column>
|
|
|
+ <el-table-column label="订单编号" width="180" fixed="left" prop="title"></el-table-column>
|
|
|
+ <el-table-column label="结算状态" prop="id" width="120">
|
|
|
+ <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==2"><sc-status-indicator type="danger"></sc-status-indicator> 结算中</div>
|
|
|
+ <div class="status-info" v-if="scope.row.status==0"><sc-status-indicator type="info"></sc-status-indicator> 待结算</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="结算完成日期" prop="id" width="180">
|
|
|
+ <template #default="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.end_day?scope.row.end_day:'-' }}
|
|
|
+ <span v-if="scope.row.status!==1">(预计)</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="核销总额(元)" prop="id" width="180" align="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.order_money?$TOOL.money(scope.row.order_money):'-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="核销订单(笔)" prop="id" width="120" align="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.order_num?scope.row.order_num:'-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="商家应得(元)" prop="id" width="180" align="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.store_money?$TOOL.money(scope.row.store_money):'-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="达人佣金(元)" prop="id" width="180" align="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.star_fee_total?$TOOL.money(scope.row.star_fee_total):'-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="服务费(元)" prop="id" width="180" align="left">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.sys_fee?$TOOL.money(scope.row.sys_fee):'-' }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="140" align="left" fixed="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button-group>
|
|
|
+ <el-button size="small" text @click="table_view(scope.row)">详情</el-button>
|
|
|
+ </el-button-group>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </scTable>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ trade: { type: String, default: "0" },
|
|
|
+ },
|
|
|
+ data(){
|
|
|
+ return {
|
|
|
+ list: {
|
|
|
+ apiObj: this.$API.bills.list
|
|
|
+ },
|
|
|
+ dataSelect:[],
|
|
|
+ dataSelectFull:[],
|
|
|
+ searchKey:{}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ tableRowClassName(row, rowIndex) {
|
|
|
+ if (row.row.is_error === 1) {
|
|
|
+ return 'error-row';
|
|
|
+ } else {
|
|
|
+ return 'success-row';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ orderSuccess(){
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ },
|
|
|
+ table_view(data){
|
|
|
+ this.$nextTick(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ table_del(data){
|
|
|
+
|
|
|
+ },
|
|
|
+ table_cancel(data){
|
|
|
+ this.$confirm(`取消该笔订单的核销,并非是直接退款,订单状态将恢复到【待使用】状态`, '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ var resp = await this.$API.merOrder.save.post({"order":data.out_order_no,"field":'status',"val":1});
|
|
|
+ if (resp.code == 0) {
|
|
|
+ return this.$message.error(resp.msg);
|
|
|
+ }
|
|
|
+ this.$message.success(resp.msg);
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ table_error(data){
|
|
|
+ this.$confirm(`订单标记异常后,该笔订单只能通过【异常订单】中进行下一步的操作,并且需等待24小时后系统判定后方可操作`, '提示', {
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ var resp = await this.$API.merOrder.save.post({"order":data.out_order_no,"field":'is_error',"val":1});
|
|
|
+ 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()
|
|
|
+ },
|
|
|
+ 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);
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+.order-name span{display: block;}
|
|
|
+.order-name span.dec{color: #999;font-size: 12px;}
|
|
|
+.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>
|