|
@@ -1,4 +1,3 @@
|
|
|
-@@ -0,0 +1,320 @@
|
|
|
<template>
|
|
|
<div class="m-container">
|
|
|
<h2>
|
|
@@ -10,28 +9,17 @@
|
|
|
@click="onOrderExport"
|
|
|
v-permission="{child: 'export/orderList', parent: '/financeManager'}"
|
|
|
>报表导出</div>
|
|
|
+ <div class="newBand" v-permission="{child: 'routeOrder/add', parent: '/financeManager'}" @click="routeOrderStatus = true">添加订单</div>
|
|
|
<!-- 搜索类型 -->
|
|
|
<el-form :inline="true" class="searchForm" v-model.trim="searchForm">
|
|
|
<el-form-item>
|
|
|
- <el-input
|
|
|
- placeholder="交易流水号"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.transNo"
|
|
|
- ></el-input>
|
|
|
+ <el-input placeholder="交易流水号" type="text" v-model.trim="searchForm.transNo"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input
|
|
|
- placeholder="订单号"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.orderNo"
|
|
|
- ></el-input>
|
|
|
+ <el-input placeholder="订单号" type="text" v-model.trim="searchForm.orderNo"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-input
|
|
|
- placeholder="收款账户"
|
|
|
- type="text"
|
|
|
- v-model.trim="searchForm.merNos"
|
|
|
- ></el-input>
|
|
|
+ <el-input placeholder="收款账户" type="text" v-model.trim="searchForm.merNos"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-input
|
|
@@ -117,9 +105,12 @@
|
|
|
</el-form>
|
|
|
<!-- 列表 -->
|
|
|
<div style="font-size: 14px; color: #F85043; padding-bottom: 10px;">
|
|
|
- 营收金额:{{ totalRevenueAmount }}元<i style="width: 10px; display: inline-block"></i>
|
|
|
- 实收金额:{{ totalActualAmount }}元<i style="width: 10px; display: inline-block"></i>
|
|
|
- 预收金额:{{ totalAdvanceAmount }}元<i style="width: 10px; display: inline-block"></i>
|
|
|
+ 营收金额:{{ totalRevenueAmount }}元
|
|
|
+ <i style="width: 10px; display: inline-block"></i>
|
|
|
+ 实收金额:{{ totalActualAmount }}元
|
|
|
+ <i style="width: 10px; display: inline-block"></i>
|
|
|
+ 预收金额:{{ totalAdvanceAmount }}元
|
|
|
+ <i style="width: 10px; display: inline-block"></i>
|
|
|
预收余额:{{ totalUserBalance }}元
|
|
|
</div>
|
|
|
<div class="tableWrap">
|
|
@@ -135,10 +126,14 @@
|
|
|
<el-table-column align="center" prop="expectAmount" label="应付金额"></el-table-column>
|
|
|
<el-table-column align="center" prop="balancePaymentAmount" label="余额支付"></el-table-column>
|
|
|
<el-table-column align="center" prop="actualAmount" label="现金支付"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="routeAmount" label="分润金额"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="routeBalanceAmount" label="分润余额"></el-table-column>
|
|
|
<el-table-column align="center" label="学员姓名">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.user.username }}
|
|
|
- <span v-if="scope.row.user.username && scope.row.user.phone">/</span>
|
|
|
+ <span
|
|
|
+ v-if="scope.row.user.username && scope.row.user.phone"
|
|
|
+ >/</span>
|
|
|
{{ scope.row.user.phone }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -163,12 +158,60 @@
|
|
|
@pagination="getList"
|
|
|
/>
|
|
|
</div>
|
|
|
+
|
|
|
+ <el-dialog title="添加订单" :visible.sync="routeOrderStatus" @close="onFormClose('ruleForm')" width="500px">
|
|
|
+ <el-form :model="form" :rules="rules" ref="ruleForm">
|
|
|
+ <el-form-item label="所属分部" prop="organId" :label-width="formLabelWidth">
|
|
|
+ <el-select v-model.trim="form.organId" style="width: 100% !important;">
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in organList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="金额(元)" prop="actualAmount" :label-width="formLabelWidth">
|
|
|
+ <!-- <el-input-number
|
|
|
+ style="width: 100%;"
|
|
|
+ v-model="form.actualAmount"
|
|
|
+ :precision="0"
|
|
|
+ controls-position="right"
|
|
|
+ :min="1"
|
|
|
+ :max="999999999"
|
|
|
+ ></el-input-number> -->
|
|
|
+ <el-input v-model="form.actualAmount" type="number" v-number placeholder="请输入金额"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="交易流水号" prop="transNo" :label-width="formLabelWidth">
|
|
|
+ <el-input placeholder="请输入交易流水号" type="text" v-model.trim="form.transNo"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="收款账户" prop="merNos" :label-width="formLabelWidth">
|
|
|
+ <el-input placeholder="请输入收款账户" type="text" v-model.trim="form.merNos"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="交易日期" prop="payTime" :label-width="formLabelWidth">
|
|
|
+ <el-date-picker style="width: 100%;"
|
|
|
+ v-model="form.payTime"
|
|
|
+ type="datetime"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ placeholder="选择交易日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注" :label-width="formLabelWidth">
|
|
|
+ <el-input placeholder="请输入备注" v-model.trim="form.memo" type="textarea" :rows="2"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="routeOrderStatus = false">取 消</el-button>
|
|
|
+ <el-button @click="onOrderSubmit('ruleForm')" type="primary">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
-import { orderFinance } from "@/api/orderManager";
|
|
|
+import { routeOrderFinance, routeOrderAdd } from "@/api/orderManager";
|
|
|
import { getEmployeeOrgan } from "@/api/buildTeam";
|
|
|
// import store from '@/store'
|
|
|
import { orderStatus, dealStatus } from "@/utils/searchArray";
|
|
@@ -209,6 +252,34 @@ export default {
|
|
|
totalActualAmount: 0,
|
|
|
totalAdvanceAmount: 0,
|
|
|
totalRevenueAmount: 0,
|
|
|
+ formLabelWidth: "100px",
|
|
|
+ routeOrderStatus: false,
|
|
|
+ form: {
|
|
|
+ organId: null,
|
|
|
+ transNo: null,
|
|
|
+ type: "OTHER",
|
|
|
+ merNos: null,
|
|
|
+ actualAmount: null,
|
|
|
+ memo: null,
|
|
|
+ payTime: null
|
|
|
+ },
|
|
|
+ rules: {
|
|
|
+ organId: [
|
|
|
+ { required: true, message: "请选择所属分部", trigger: "change" }
|
|
|
+ ],
|
|
|
+ actualAmount: [
|
|
|
+ { required: true, message: "请输入金额", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ transNo: [
|
|
|
+ { required: true, message: "请输入交易流水号", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ merNos: [
|
|
|
+ { required: true, message: "请输入收款账户", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ payTime: [
|
|
|
+ { required: true, message: "选择交易日期", trigger: "change" }
|
|
|
+ ]
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -243,6 +314,36 @@ export default {
|
|
|
this.searchForm.routingOrganId = null;
|
|
|
}
|
|
|
},
|
|
|
+ onOrderSubmit(formName) { // 添加订单
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ routeOrderAdd(this.form).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message.success("添加成功");
|
|
|
+ this.routeOrderStatus = false;
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onFormClose(formName) {
|
|
|
+ this.form = {
|
|
|
+ organId: null,
|
|
|
+ transNo: null,
|
|
|
+ type: "OTHER",
|
|
|
+ merNos: null,
|
|
|
+ actualAmount: null,
|
|
|
+ memo: null,
|
|
|
+ payTime: null
|
|
|
+ }
|
|
|
+ // 关闭弹窗重置验证
|
|
|
+ this.$refs[formName].resetFields();
|
|
|
+ },
|
|
|
onOrderExport() {
|
|
|
// 报表导出
|
|
|
let url = "/api-web/export/orderList";
|
|
@@ -250,20 +351,20 @@ export default {
|
|
|
orderType: 3
|
|
|
};
|
|
|
let searchForm = this.searchForm;
|
|
|
- if(searchForm.orderNo) {
|
|
|
- data.orderNo = searchForm.orderNo
|
|
|
+ if (searchForm.orderNo) {
|
|
|
+ data.orderNo = searchForm.orderNo;
|
|
|
}
|
|
|
- if(searchForm.transNo) {
|
|
|
- data.transNo = searchForm.transNo
|
|
|
+ if (searchForm.transNo) {
|
|
|
+ data.transNo = searchForm.transNo;
|
|
|
}
|
|
|
- if(searchForm.merNos) {
|
|
|
- data.merNos = searchForm.merNos
|
|
|
+ if (searchForm.merNos) {
|
|
|
+ data.merNos = searchForm.merNos;
|
|
|
}
|
|
|
- if(searchForm.actualAmount) {
|
|
|
- data.actualAmount = searchForm.actualAmount
|
|
|
+ if (searchForm.actualAmount) {
|
|
|
+ data.actualAmount = searchForm.actualAmount;
|
|
|
}
|
|
|
- if(searchForm.balancePaymentAmount) {
|
|
|
- data.balancePaymentAmount = searchForm.balancePaymentAmount
|
|
|
+ if (searchForm.balancePaymentAmount) {
|
|
|
+ data.balancePaymentAmount = searchForm.balancePaymentAmount;
|
|
|
}
|
|
|
if (searchForm.paymentStatus) {
|
|
|
data.paymentStatus = searchForm.paymentStatus;
|
|
@@ -331,14 +432,16 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
getList() {
|
|
|
- let params = JSON.parse(JSON.stringify(this.searchForm))
|
|
|
+ let params = JSON.parse(JSON.stringify(this.searchForm));
|
|
|
params.rows = this.pageInfo.limit;
|
|
|
params.page = this.pageInfo.page;
|
|
|
- params.orderNo = params.orderNo ? params.orderNo : null
|
|
|
- params.transNo = params.transNo ? params.transNo : null
|
|
|
- params.merNos = params.merNos ? params.merNos : null
|
|
|
- params.actualAmount = params.actualAmount ? params.actualAmount : null
|
|
|
- params.balancePaymentAmount = params.balancePaymentAmount ? params.balancePaymentAmount : null
|
|
|
+ params.orderNo = params.orderNo ? params.orderNo : null;
|
|
|
+ params.transNo = params.transNo ? params.transNo : null;
|
|
|
+ params.merNos = params.merNos ? params.merNos : null;
|
|
|
+ params.actualAmount = params.actualAmount ? params.actualAmount : null;
|
|
|
+ params.balancePaymentAmount = params.balancePaymentAmount
|
|
|
+ ? params.balancePaymentAmount
|
|
|
+ : null;
|
|
|
if (this.orderDate && this.orderDate.length > 0) {
|
|
|
params.orderStartDate = this.orderDate[0];
|
|
|
params.orderEndDate = this.orderDate[1];
|
|
@@ -346,15 +449,23 @@ export default {
|
|
|
params.orderStartDate = null;
|
|
|
params.orderEndDate = null;
|
|
|
}
|
|
|
- orderFinance(params).then(res => {
|
|
|
+ routeOrderFinance(params).then(res => {
|
|
|
let result = res.data;
|
|
|
if (res.code == 200) {
|
|
|
this.tableList = result.rows;
|
|
|
this.pageInfo.total = result.total;
|
|
|
- this.totalUserBalance = result.totalUserBalance ? result.totalUserBalance : 0
|
|
|
- this.totalActualAmount = result.totalActualAmount ? result.totalActualAmount : 0
|
|
|
- this.totalAdvanceAmount = result.totalAdvanceAmount ? result.totalAdvanceAmount : 0
|
|
|
- this.totalRevenueAmount = result.totalRevenueAmount ? result.totalRevenueAmount : 0
|
|
|
+ this.totalUserBalance = result.totalUserBalance
|
|
|
+ ? result.totalUserBalance
|
|
|
+ : 0;
|
|
|
+ this.totalActualAmount = result.totalActualAmount
|
|
|
+ ? result.totalActualAmount
|
|
|
+ : 0;
|
|
|
+ this.totalAdvanceAmount = result.totalAdvanceAmount
|
|
|
+ ? result.totalAdvanceAmount
|
|
|
+ : 0;
|
|
|
+ this.totalRevenueAmount = result.totalRevenueAmount
|
|
|
+ ? result.totalRevenueAmount
|
|
|
+ : 0;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -388,4 +499,10 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
+.newBand {
|
|
|
+ display: inline-block;
|
|
|
+}
|
|
|
+/deep/.el-input-number.is-controls-right .el-input__inner {
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
</style>
|