Commit 3d11dfbd authored by lixy's avatar lixy

1087、1114、对公支付审核

parent 09f7ddfc
...@@ -68,3 +68,24 @@ export function getItemByType(obj) { ...@@ -68,3 +68,24 @@ export function getItemByType(obj) {
}); });
} }
/**
* 对公支付审核
*/
export function updatePayStatus(obj) {
return fetch({
url: '/api/website/orderInfo/updatePayStatus',
method: 'post',
data: obj
});
}
/**
* 对公支付信息
*/
export function getCompanyInfoByType(query) {
return fetch({
url: 'api/website/commonInfo/web/app/unauth/getByType',
method: 'get',
params: query
});
}
...@@ -38,6 +38,10 @@ export function convertDate2Str(object) { ...@@ -38,6 +38,10 @@ export function convertDate2Str(object) {
export function timestamp2Date(timestamp) { export function timestamp2Date(timestamp) {
let str = timestamp + ''
if( str.length == 10){
timestamp = timestamp * 1000
}
const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000 const date = new Date(timestamp); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
return formatDate(date, 'yyyy-MM-dd hh:mm:ss'); return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="下单时间" label-width="130px"> <el-form-item label="下单时间">
<el-date-picker <el-date-picker
v-model="times" v-model="times"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<div v-for="iitem in item.orderItemList" :key="iitem.itemId" class="flex-aic goods-ii"> <div v-for="iitem in item.orderItemList" :key="iitem.itemId" class="flex-aic goods-ii">
<div class="flex-aic-jcb" style="width: 100%;"> <div class="flex-aic-jcb" style="width: 100%;">
<div class="flex-aic"> <div class="flex-aic">
<img style="width: 84px;height: 62px;border-radius: 8px;object-fit: cover;" :src="iitem.itemPic"> <img style="width: 84px;height: 62px;border-radius: 8px;object-fit: cover;margin-right: 6px;" :src="iitem.itemPic">
<span v-if="iitem.type != 1">{{iitem.name}}</span> <span v-if="iitem.type != 1">{{iitem.name}}</span>
<div v-else> <div v-else>
<p>卫星:{{iitem.detailJson.imageSatelliteType}}</p> <p>卫星:{{iitem.detailJson.imageSatelliteType}}</p>
...@@ -118,13 +118,15 @@ ...@@ -118,13 +118,15 @@
</td> </td>
<td class="goods-remark">{{item.remark?item.remark:item.customerJson?item.customerJson.descr:''}}</td> <td class="goods-remark">{{item.remark?item.remark:item.customerJson?item.customerJson.descr:''}}</td>
<td class="send-way-item">{{item.sendType==1?'线上':item.sendType==2?'线下':'线上'}}</td> <td class="send-way-item">{{item.sendType==1?'线上':item.sendType==2?'线下':'线上'}}</td>
<td class="pay-way-item">{{item.payType}}</td> <td class="pay-way-item" :style="item.payType==3?'color:#f6b725;':item.payType==2?'color:#13a8ff;':'color:#73d721;'">{{item.payType==1?'微信支付':item.payType==2?'支付宝':item.payType==3?'对公支付':item.payType}}</td>
<td class="amount-item">{{item.totalAmount}}</td> <td class="amount-item">{{item.totalAmount}}</td>
<td class="order-status-item" :style="item.status==4?'color:#f6b725;':item.status==5?'color:#0493fe;':item.status==6?'color:#2fd96f;':item.status==2?'color:#e83328;':''">{{item.status==2?'待付款':item.status==4?'待发货':item.status==5?'待收货':item.status==6?'已完成':item.status==-2?'已取消':item.status==-1?'已删除':item.status}}</td> <td class="order-status-item" v-if="item.payType==3" :style="item.status==4?'color:#f6b725;':item.status==5?'color:#0493fe;':item.status==6?'color:#2fd96f;':item.status==2&& !item.payImg?'color:#e83328;':item.status==2&& item.payImg?'color:#13a8ff;':''">{{item.status==2 && !item.payImg?'待付款':item.status==2 && item.payImg && !item.auditStatus?'待审核':item.status==2 && item.payImg && item.auditStatus==2?'已拒绝':item.status==4?'待发货':item.status==5?'待收货':item.status==6?'已完成':item.status==-2?'已取消':item.status==-1?'已删除':item.status}}</td>
<td class="order-status-item" v-else :style="item.status==4?'color:#f6b725;':item.status==5?'color:#0493fe;':item.status==6?'color:#2fd96f;':item.status==2?'color:#e83328;':''">{{item.status==2?'待付款':item.status==4?'待发货':item.status==5?'待收货':item.status==6?'已完成':item.status==-2?'已取消':item.status==-1?'已删除':item.status}}</td>
<td style="padding: 20px;border-right: none;"> <td style="padding: 20px;border-right: none;">
<span class="normal-btn" v-if="item.status==5 || item.status == 6" @click="handleSee(item)">查看</span> <span class="normal-btn" v-if="item.status==5 || item.status == 6" @click="handleSee(item)">查看</span>
<span class="normal-btn" v-if="item.status==4 && item.shippingStatus == 0 && item.type == 1" @click="handleSend(item)">发货</span> <span class="normal-btn" v-if="item.status==4 && item.shippingStatus == 0 && item.type == 1" @click="handleSend(item)">发货</span>
<span class="normal-btn" v-if="item.status==4 && item.type == 2" @click="handleData(item)">选择数据</span> <span class="normal-btn" v-if="item.status==4 && item.type == 2" @click="handleData(item)">选择数据</span>
<span class="normal-btn" style="border: 1px solid #13a8ff;color: #13a8ff;" v-if="item.status==2 && item.payType == 3" @click="handleAudit(item)">{{item.auditStatus?'查看':'待审核'}}</span>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -147,11 +149,56 @@ ...@@ -147,11 +149,56 @@
<send v-if="sendVisible" :one-row="oneRow" v-on:sendEvent="sendEvent" :title="title"></send> <send v-if="sendVisible" :one-row="oneRow" v-on:sendEvent="sendEvent" :title="title"></send>
<!--定制数据-选择数据--> <!--定制数据-选择数据-->
<select-data-dialog v-if="selectDataVisible" :one-row="oneRow" v-on:selectDataEvent="selectDataEvent"></select-data-dialog> <select-data-dialog v-if="selectDataVisible" :one-row="oneRow" v-on:selectDataEvent="selectDataEvent"></select-data-dialog>
<!--对公支付审核-->
<el-dialog :visible="auditVisible" title="对公支付审核" @close="cancel">
<label style="color: red">转账信息</label>
<div v-if="companyAccountInfo.detail" style="border: 1px solid #eee;padding: 16px;margin: 20px 0;">
<div style="margin-bottom: 20px;">户名:{{companyAccountInfo.detail.accountName}}</div>
<div style="margin-bottom: 20px;">账号:{{companyAccountInfo.detail.account}}</div>
<div>开户行:{{companyAccountInfo.detail.openBank}}</div>
</div>
<label style="color: red">上传信息</label>
<div style="border: 1px solid #eee;padding: 16px;margin-top: 20px;">
<div class="flex-aic">
<label>支付凭证:</label>
<el-image
style="width: 100px; height: 100px;"
:src="oneRow.payImg"
:preview-src-list="[oneRow.payImg]">
</el-image>
</div>
</div>
<el-form label-width="80px" style="margin-top: 20px;" ref="form" :rules="rules" :model="form" v-if="!oneRow.auditStatus">
<el-row>
<el-form-item label="审核结果" prop="auditStatus">
<el-radio v-model="form.auditStatus" :label="1" @change="checkValid">通过</el-radio>
<el-radio v-model="form.auditStatus" :label="2" @change="checkValid">拒绝</el-radio>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="拒绝原因" prop="auditReason" v-if="form.auditStatus == 2">
<el-input type="textarea" v-model="form.auditReason" placeholder="请输入拒绝原因" :maxlength="400" :row="4"></el-input>
</el-form-item>
</el-row>
</el-form>
<div v-else>
<div style="margin-bottom: 20px;margin-top: 20px;">审核状态:{{ oneRow.auditStatus == 1?'已通过':'已拒绝' }}</div>
<div style="margin-bottom: 20px;">拒绝原因:{{ oneRow.auditReason }}</div>
</div>
<div slot="footer" class="dialog-footer" v-if="!oneRow.auditStatus">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="!isClick" @click="okSend('form')">确 定</el-button>
<el-button type="primary" v-else style="opacity: 0.6;" disabled>确 定</el-button>
</div>
<div slot="footer" class="dialog-footer" v-else>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
<script type="javascript"> <script type="javascript">
import {getOrderList} from "api/website/order/index"; import {getOrderList, updatePayStatus, getCompanyInfoByType} from "api/website/order/index";
import orderSendDetail from "./orderSendDetail"; import orderSendDetail from "./orderSendDetail";
import selectDataDialog from './selectDataDialog' import selectDataDialog from './selectDataDialog'
import send from './send' import send from './send'
...@@ -174,6 +221,8 @@ ...@@ -174,6 +221,8 @@
{id: -2, name: '已取消'}, {id: -2, name: '已取消'},
// {id: -3, name: '退款'} // {id: -3, name: '退款'}
], ],
isClick: false, // 是否已点击审核
auditVisible: false, // 对公支付审核
listQuery: { listQuery: {
name: undefined, // 商品名称 name: undefined, // 商品名称
page: 1, page: 1,
...@@ -184,6 +233,15 @@ ...@@ -184,6 +233,15 @@
keywords: undefined, // 订单搜索 keywords: undefined, // 订单搜索
status: undefined, // 订单状态:0、定制订单无价格 1--创建订单,2--待付款,3--已支付,4--已发货, 5--已收货, 6、已完成 -1、删除,-2、取消, -3 退款 status: undefined, // 订单状态:0、定制订单无价格 1--创建订单,2--待付款,3--已支付,4--已发货, 5--已收货, 6、已完成 -1、删除,-2、取消, -3 退款
}, },
form:{
auditStatus: undefined, // 审核状态: 1、审核通过,2、审核拒绝
auditReason: undefined, // 审核理由
orderNo: undefined // 订单号
},
rules: {
auditReason: { required: true, message: '请输入拒绝原因', trigger: 'blur' },
auditStatus: {required: true, message: '请选择审核结果', trigger: 'change' }
},
listLoading: false, listLoading: false,
times: [], // 时间 times: [], // 时间
list: [], list: [],
...@@ -192,11 +250,13 @@ ...@@ -192,11 +250,13 @@
sendVisible: false, // 发货弹窗 sendVisible: false, // 发货弹窗
oneRow: {}, // 当前操作项 oneRow: {}, // 当前操作项
selectDataVisible: false, // 选择数据 selectDataVisible: false, // 选择数据
companyAccountInfo: {}, // 对公信息
}; };
}, },
created() { created() {
this.listQuery.keywords = this.$route.query.orderNo; this.listQuery.keywords = this.$route.query.orderNo;
this.getList() this.getList()
this.companyInfoByType() // 获取对公信息
}, },
methods: { methods: {
handleFilter() { handleFilter() {
...@@ -211,12 +271,99 @@ ...@@ -211,12 +271,99 @@
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
}, },
/**
* 取消审核
*/
cancel(){
this.auditVisible = false
},
/**
* 对公支付-待审核
*/
handleAudit(row){
this.oneRow = row
this.form = {
auditStatus: undefined, // 审核状态: 1、审核通过,2、审核拒绝
auditReason: undefined, // 审核理由
orderNo: row.orderNo // 订单号
}
this.auditVisible = true;
},
/**
* 检测填写状态
*/
checkValid(){
this.$refs['form'].validateField('auditStatus', picError => { //审核结果
if (!picError) {
console.log('审核结果-已选择')
} else {
return false;
}
});
},
/**
* 提交审核
*/
okSend(formName){
let _this = this
if(this.isClick){
return
}
this.isClick = true
setTimeout(function(){
_this.isClick = false
}, 2000)
const set = this.$refs;
set[formName].validate((valid) => {
if (valid) {
updatePayStatus(this.form).then((response) => {
if(response.status == 200){
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000
});
this.auditVisible = false
this.getList()
} else {
this.$notify({
title: '失败',
message: response.message,
type: 'error',
duration: 2000
})
}
});
}
})
},
/** /**
* 查看弹窗关闭 * 查看弹窗关闭
*/ */
detailEvent(){ detailEvent(){
this.orderSendDetailVisible = false this.orderSendDetailVisible = false
}, },
/**
* 获取对公信息
*/
companyInfoByType(){
getCompanyInfoByType({type: 2}).then((res) => {
if(res.status == 200){
if(res.data.length>0){
res.data[0].detail = res.data[0].detail?JSON.parse(res.data[0].detail):{}
this.companyAccountInfo = res.data[0]
}
} else {
this.$notify({
title: "失败",
message: res.message,
type: "error",
duration: 2000,
});
}
});
},
/** /**
* 选择数据-关闭弹窗 * 选择数据-关闭弹窗
*/ */
...@@ -376,6 +523,7 @@ ...@@ -376,6 +523,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
img{object-fit: cover;}
.amount-item{ .amount-item{
width: 10%; width: 10%;
height: 100%; height: 100%;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-form-item label="用户ID"> <el-form-item label="用户ID">
<el-input v-model="listQuery.userId" placeholder="请输入用户ID"></el-input> <el-input v-model="listQuery.userId" placeholder="请输入用户ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="注册时间">
<el-date-picker <el-date-picker
v-model="times" v-model="times"
type="datetimerange" type="datetimerange"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!-- <img style="width: 40px;height: 40px;border-radius: 50%;" :src="scope.row.headimgurl" @click.stop="showPreview(scope.row.headimgurl)"/>--> <!-- <img style="width: 40px;height: 40px;border-radius: 50%;" :src="scope.row.headimgurl" @click.stop="showPreview(scope.row.headimgurl)"/>-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="创建时间"> <el-table-column align="center" label="注册时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.crtTimeStr}} {{scope.row.crtTimeStr}}
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment