|
@@ -10,7 +10,15 @@
|
|
|
<el-input v-model="table.where.order_no" placeholder="请输入订单号" clearable/>
|
|
<el-input v-model="table.where.order_no" placeholder="请输入订单号" clearable/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :md="4" :sm="12">
|
|
|
|
|
|
|
+ <el-col :md="6" :sm="12">
|
|
|
|
|
+ <el-form-item label="类型:">
|
|
|
|
|
+ <el-select v-model="table.where.type" placeholder="请选择" class="ele-fluid">
|
|
|
|
|
+ <el-option label="购买订单" value="1"/>
|
|
|
|
|
+ <el-option label="出售订单" value="2"/>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :md="6" :sm="12">
|
|
|
<el-form-item label="订单状态:">
|
|
<el-form-item label="订单状态:">
|
|
|
<el-select v-model="table.where.status" placeholder="请选择" class="ele-fluid">
|
|
<el-select v-model="table.where.status" placeholder="请选择" class="ele-fluid">
|
|
|
<el-option label="全部" value="0"/>
|
|
<el-option label="全部" value="0"/>
|
|
@@ -25,7 +33,7 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :md="4" :sm="12">
|
|
|
|
|
|
|
+ <el-col :md="6" :sm="12">
|
|
|
<el-form-item label="异常状态:">
|
|
<el-form-item label="异常状态:">
|
|
|
<el-select v-model="table.where.exception_status" placeholder="请选择" class="ele-fluid">
|
|
<el-select v-model="table.where.exception_status" placeholder="请选择" class="ele-fluid">
|
|
|
<el-option label="全部" value="0"/>
|
|
<el-option label="全部" value="0"/>
|
|
@@ -34,8 +42,9 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
-
|
|
|
|
|
- <el-col :md="4" :sm="12">
|
|
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-row :gutter="15">
|
|
|
|
|
+ <el-col :md="8" :sm="12">
|
|
|
<el-form-item label="起止日期:" prop="date">
|
|
<el-form-item label="起止日期:" prop="date">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
v-model="table.where.date"
|
|
v-model="table.where.date"
|
|
@@ -43,11 +52,11 @@
|
|
|
placeholder="选择出生日期"
|
|
placeholder="选择出生日期"
|
|
|
size="small"
|
|
size="small"
|
|
|
value-format="yyyy-MM-dd"
|
|
value-format="yyyy-MM-dd"
|
|
|
- format="yyyy-MM-dd">
|
|
|
|
|
|
|
+ format="yyyy-MM-dd" >
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col :md="12" :sm="12">
|
|
|
|
|
|
|
+ <el-col :md="16" :sm="12">
|
|
|
<div class="ele-form-actions">
|
|
<div class="ele-form-actions">
|
|
|
<el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
|
|
<el-button type="primary" @click="$refs.table.reload()" icon="el-icon-search"
|
|
|
class="ele-btn-icon">查询
|
|
class="ele-btn-icon">查询
|
|
@@ -56,7 +65,7 @@
|
|
|
@click="(table.where={type: '1',status: '0', exception_status: '0'})&&$refs.table.reload()">
|
|
@click="(table.where={type: '1',status: '0', exception_status: '0'})&&$refs.table.reload()">
|
|
|
重置
|
|
重置
|
|
|
</el-button>
|
|
</el-button>
|
|
|
-<!-- <el-button @click="exportData" icon="el-icon-download" type="success" class="ele-btn-icon" v-if="permission.includes('sys:buyorder:export')">导出</el-button>-->
|
|
|
|
|
|
|
+ <el-button @click="exportData" icon="el-icon-download" type="success" class="ele-btn-icon" v-if="permission.includes('sys:myorder:export')">导出</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -147,12 +156,6 @@
|
|
|
v-if="(row.status<=2 || row.status==7 || (row.status == 3 && $store.state.user.user.user_type==1)) && permission.includes('sys:buyorder:edit')">
|
|
v-if="(row.status<=2 || row.status==7 || (row.status == 3 && $store.state.user.user.user_type==1)) && permission.includes('sys:buyorder:edit')">
|
|
|
取消订单
|
|
取消订单
|
|
|
</el-link>
|
|
</el-link>
|
|
|
-
|
|
|
|
|
- <el-link @click="showReassign(row, index)" icon="el-icon-edit" type="warning"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- v-if="$store.state.user.user.user_type==1 && (row.status<4 || row.status==7 || row.status == 5) && permission.includes('sys:buyorder:edit')">
|
|
|
|
|
- 重新派单
|
|
|
|
|
- </el-link>
|
|
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</template>
|
|
</template>
|
|
@@ -222,55 +225,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <!-- 详情 -->
|
|
|
|
|
- <el-dialog :title="'重新派单'" :visible.sync="showReassignEdit" width="700px"
|
|
|
|
|
- @closed="editForm={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
|
|
|
|
|
- <el-form :model="editForm" ref="editForm" label-width="120px">
|
|
|
|
|
- <el-row :gutter="15">
|
|
|
|
|
- <el-col :sm="15">
|
|
|
|
|
- <el-form-item label="客户:">
|
|
|
|
|
- <span>{{ editForm.c_username }}</span>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="订单号:">
|
|
|
|
|
- <span>{{ editForm.order_no }}</span>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="交易数量:">
|
|
|
|
|
- <span>{{ editForm.num }} <img class="usdt" src="../../../assets/usdt.png" alt=""></span>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="交易价格:">
|
|
|
|
|
- <span>{{ editForm.price }} USDT/CNY</span>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="交易金额:">
|
|
|
|
|
- <span>{{ editForm.total }}</span>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="当前派单用户:">
|
|
|
|
|
- <span>{{ editForm.username }}</span>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-col :sm="24">
|
|
|
|
|
- <el-form-item label="重新派单给:">
|
|
|
|
|
- <el-select v-model="editForm.new_business_id" filterable
|
|
|
|
|
- remote
|
|
|
|
|
- reserve-keyword
|
|
|
|
|
- placeholder="请输入关键词"
|
|
|
|
|
- :remote-method="getReassign"
|
|
|
|
|
- :loading="loading" class="ele-fluid reassign">
|
|
|
|
|
- <el-option v-for="(v,k) in reassigns" :key="k" :label="v.username" :value="v.id">
|
|
|
|
|
- <span class="label"
|
|
|
|
|
- :title="'ID:'+v.id+', USDT:'+v.usdt_num">{{ v.username }}</span>
|
|
|
|
|
- <span class="credit">信誉:{{ v.credit }}分</span>
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-form>
|
|
|
|
|
- <div slot="footer">
|
|
|
|
|
- <el-button @click="showReassignEdit=false">取消</el-button>
|
|
|
|
|
- <el-button type="success" @click="reassign(editForm,editForm.index)">确定重新派单</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
<!-- 打款信息 -->
|
|
<!-- 打款信息 -->
|
|
|
<el-dialog :title="'打款信息'" :visible.sync="showPayEdit" width="700px"
|
|
<el-dialog :title="'打款信息'" :visible.sync="showPayEdit" width="700px"
|
|
|
@closed="editForm={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
|
|
@closed="editForm={}" :destroy-on-close="true" custom-class="ele-dialog-form" :lock-scroll="false">
|
|
@@ -543,7 +497,7 @@ export default {
|
|
|
name: "SysUser",
|
|
name: "SysUser",
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- table: {url: '/tradeorder/index', where: {type: '1', status: '0', exception_status: '0'}}, // 表格配置
|
|
|
|
|
|
|
+ table: {url: '/advertorder/index', where: {type: '1', status: '0', exception_status: '0'}}, // 表格配置
|
|
|
choose: [], // 表格选中数据
|
|
choose: [], // 表格选中数据
|
|
|
reassigns: [],
|
|
reassigns: [],
|
|
|
loading: false,
|
|
loading: false,
|
|
@@ -642,20 +596,14 @@ export default {
|
|
|
this.editForm.index = index;
|
|
this.editForm.index = index;
|
|
|
this.showEdit = true;
|
|
this.showEdit = true;
|
|
|
},
|
|
},
|
|
|
- // 派单窗口
|
|
|
|
|
- showReassign(row, index) {
|
|
|
|
|
- this.editForm = Object.assign({}, row);
|
|
|
|
|
- this.editForm.index = index;
|
|
|
|
|
- this.showReassignEdit = true;
|
|
|
|
|
- // 获取可派单用户
|
|
|
|
|
- this.getReassign();
|
|
|
|
|
- },
|
|
|
|
|
// 直接确认收款完成
|
|
// 直接确认收款完成
|
|
|
- collection(data, index) {
|
|
|
|
|
- this.$confirm('确定已收款,并完成该订单?', '提示', {type: 'danger'}).then(() => {
|
|
|
|
|
|
|
+ pay() {
|
|
|
|
|
+ this.$confirm('确定已付款?', '提示', {type: 'danger'}).then(() => {
|
|
|
this.$message.closeAll();
|
|
this.$message.closeAll();
|
|
|
const loading = this.$loading({lock: true});
|
|
const loading = this.$loading({lock: true});
|
|
|
- this.$http.post('/tradeorder/collection', {id: data.id, status: 4}).then(res => {
|
|
|
|
|
|
|
+ let params = JSON.parse(JSON.stringify(this.editForm))
|
|
|
|
|
+ params.status = 3;
|
|
|
|
|
+ this.$http.post('/advertorder/pay', params).then(res => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
if (res.data.success === true) {
|
|
if (res.data.success === true) {
|
|
|
this.showPayEdit = false
|
|
this.showPayEdit = false
|
|
@@ -670,14 +618,15 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 直接取消订单
|
|
|
|
|
- cancel(data, index) {
|
|
|
|
|
- this.$confirm('确定取消该订单,该操作不可逆谨慎操作?', '提示', {type: 'danger'}).then(() => {
|
|
|
|
|
|
|
+ // 直接确认收款完成
|
|
|
|
|
+ collection(data, index) {
|
|
|
|
|
+ this.$confirm('确定已收款,并完成该订单?', '提示', {type: 'danger'}).then(() => {
|
|
|
this.$message.closeAll();
|
|
this.$message.closeAll();
|
|
|
const loading = this.$loading({lock: true});
|
|
const loading = this.$loading({lock: true});
|
|
|
- this.$http.post('/tradeorder/cancel', {id: data.id, status: 8}).then(res => {
|
|
|
|
|
|
|
+ this.$http.post('/advertorder/collection', {id: data.id, status: 4}).then(res => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
if (res.data.success === true) {
|
|
if (res.data.success === true) {
|
|
|
|
|
+ this.showCollectionEdit = false
|
|
|
this.$message({type: 'success', message: res.data.msg});
|
|
this.$message({type: 'success', message: res.data.msg});
|
|
|
this.$refs.table.reload();
|
|
this.$refs.table.reload();
|
|
|
} else {
|
|
} else {
|
|
@@ -689,32 +638,14 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 异常取消
|
|
|
|
|
- exceptionCancel(status, refund_status) {
|
|
|
|
|
- if (this.showCatchNextEdit) {
|
|
|
|
|
- if (this.editForm.exception_sub_type <= 0) {
|
|
|
|
|
- this.$message({type: 'danger', message: '请选择异常处理类型'});
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.editForm.exception_img == '') {
|
|
|
|
|
- this.$message({type: 'danger', message: '请上传异常凭证'});
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- if (this.editForm.exception_remark == '') {
|
|
|
|
|
- this.$message({type: 'danger', message: '请填写异常备注'});
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- this.$confirm((status == 5 ? '确定申请' : '确定') + '异常处理该订单,该操作不可逆谨慎操作?', '提示', {type: 'danger'}).then(() => {
|
|
|
|
|
|
|
+ // 直接取消订单
|
|
|
|
|
+ cancel(data, index) {
|
|
|
|
|
+ this.$confirm('确定取消该订单,该操作不可逆谨慎操作?', '提示', {type: 'danger'}).then(() => {
|
|
|
this.$message.closeAll();
|
|
this.$message.closeAll();
|
|
|
const loading = this.$loading({lock: true});
|
|
const loading = this.$loading({lock: true});
|
|
|
- this.editForm.status = status;
|
|
|
|
|
- this.editForm.refund_status = refund_status;
|
|
|
|
|
- this.$http.post('/tradeorder/cancel', this.editForm).then(res => {
|
|
|
|
|
|
|
+ this.$http.post('/advertorder/cancel', {id: data.id, status: 8}).then(res => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
if (res.data.success === true) {
|
|
if (res.data.success === true) {
|
|
|
- this.showCatchEdit = false;
|
|
|
|
|
- this.showCatchNextEdit = false;
|
|
|
|
|
this.$message({type: 'success', message: res.data.msg});
|
|
this.$message({type: 'success', message: res.data.msg});
|
|
|
this.$refs.table.reload();
|
|
this.$refs.table.reload();
|
|
|
} else {
|
|
} else {
|
|
@@ -726,8 +657,8 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 异常处理
|
|
|
|
|
- exceptionConfirm(status) {
|
|
|
|
|
|
|
+ // 异常取消
|
|
|
|
|
+ exception(status, refund_status) {
|
|
|
if (this.showCatchNextEdit) {
|
|
if (this.showCatchNextEdit) {
|
|
|
if (this.editForm.exception_sub_type <= 0) {
|
|
if (this.editForm.exception_sub_type <= 0) {
|
|
|
this.$message({type: 'danger', message: '请选择异常处理类型'});
|
|
this.$message({type: 'danger', message: '请选择异常处理类型'});
|
|
@@ -745,10 +676,13 @@ export default {
|
|
|
this.$confirm((status == 5 ? '确定申请' : '确定') + '异常处理该订单,该操作不可逆谨慎操作?', '提示', {type: 'danger'}).then(() => {
|
|
this.$confirm((status == 5 ? '确定申请' : '确定') + '异常处理该订单,该操作不可逆谨慎操作?', '提示', {type: 'danger'}).then(() => {
|
|
|
this.$message.closeAll();
|
|
this.$message.closeAll();
|
|
|
const loading = this.$loading({lock: true});
|
|
const loading = this.$loading({lock: true});
|
|
|
- this.editForm.status = status;
|
|
|
|
|
- this.$http.post('/tradeorder/collection', this.editForm).then(res => {
|
|
|
|
|
|
|
+ let params = JSON.parse(JSON.stringify(this.editForm))
|
|
|
|
|
+ params.status = status;
|
|
|
|
|
+ params.refund_status = refund_status;
|
|
|
|
|
+ this.$http.post('/advertorder/exception', params).then(res => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
if (res.data.success === true) {
|
|
if (res.data.success === true) {
|
|
|
|
|
+ this.showCatchEdit = false;
|
|
|
this.showCatchNextEdit = false;
|
|
this.showCatchNextEdit = false;
|
|
|
this.$message({type: 'success', message: res.data.msg});
|
|
this.$message({type: 'success', message: res.data.msg});
|
|
|
this.$refs.table.reload();
|
|
this.$refs.table.reload();
|
|
@@ -761,53 +695,6 @@ export default {
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- // 派单用户
|
|
|
|
|
- getReassign(keyword) {
|
|
|
|
|
- const loading = this.$loading({lock: true});
|
|
|
|
|
- this.$http.post('/tradeorder/reassignList', {
|
|
|
|
|
- keyword: keyword,
|
|
|
|
|
- userId: this.editForm.business_id,
|
|
|
|
|
- num: this.editForm.num,
|
|
|
|
|
- type: this.editForm.type
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- if (res.data.success === true) {
|
|
|
|
|
- this.reassigns = res.data.data;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error(res.data.msg);
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(e => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.error(e.message);
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- // 重新派单
|
|
|
|
|
- reassign(data, index) {
|
|
|
|
|
- if (data.new_business_id <= 0) {
|
|
|
|
|
- this.$message({type: 'danger', message: '请选择重新派单的用户'});
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- this.$confirm('确定重新派单给该用户?', '提示', {type: 'danger'}).then(() => {
|
|
|
|
|
- this.$message.closeAll();
|
|
|
|
|
- const loading = this.$loading({lock: true});
|
|
|
|
|
- this.$http.post('/tradeorder/reassign', {
|
|
|
|
|
- id: data.id,
|
|
|
|
|
- business_id: data.new_business_id,
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- if (res.data.success === true) {
|
|
|
|
|
- this.showReassignEdit = false;
|
|
|
|
|
- this.$message({type: 'success', message: res.data.msg});
|
|
|
|
|
- this.$refs.table.reload();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message.error(res.data.msg);
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(e => {
|
|
|
|
|
- loading.close();
|
|
|
|
|
- this.$message.error(e.message);
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
/* 导出数据 */
|
|
/* 导出数据 */
|
|
|
exportData() {
|
|
exportData() {
|
|
|
let array = [['提交时间','提交用户', '订单号', '交易量', '单价(¥)', '交易总额(¥)', '收款人信息', '交易状态', '备注', '操作时间']];
|
|
let array = [['提交时间','提交用户', '订单号', '交易量', '单价(¥)', '交易总额(¥)', '收款人信息', '交易状态', '备注', '操作时间']];
|
|
@@ -815,7 +702,7 @@ export default {
|
|
|
const loading = this.$loading({lock: true});
|
|
const loading = this.$loading({lock: true});
|
|
|
let params = this.table.where;
|
|
let params = this.table.where;
|
|
|
params.pageSize = 2000;
|
|
params.pageSize = 2000;
|
|
|
- this.$http.post('/tradeorder/index', params).then(res => {
|
|
|
|
|
|
|
+ this.$http.post('/advertorder/index', params).then(res => {
|
|
|
loading.close();
|
|
loading.close();
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
let statusArr = ['未知','待付款','待付款','已打款','交易完成','异常订单','退款订单','超时订单','已取消'];
|
|
let statusArr = ['未知','待付款','待付款','已打款','交易完成','异常订单','退款订单','超时订单','已取消'];
|
|
@@ -920,6 +807,6 @@ export default {
|
|
|
color: #fbb52c;
|
|
color: #fbb52c;
|
|
|
}
|
|
}
|
|
|
.el-date-editor--daterange.el-input__inner {
|
|
.el-date-editor--daterange.el-input__inner {
|
|
|
- width: 230px;
|
|
|
|
|
|
|
+ width: auto;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|