Commit c80ed920 by zhangquan

v3.6.0 核销审批

1 parent 7599e5b3
......@@ -170,8 +170,7 @@ const orderVerfication = params => {
url: '/rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: false
sign: true
})
}
......@@ -211,4 +210,5 @@ const finishOrderStatus = params => {
})
}
export default { getInstallInfo, orderVerfication, signerOrder, getListApi, getCountApi, getOrderDetailApi, orderExportApi, writeOffApi, crowdFundWriteOffApi, crowdFundRefundApi, addDeliveryApi, examineDetailApi, examineAllowApi, confirmReceiptGoodsApi, updateOrderType, batchRefundOrder, importCrowdFundingOrder, finishOrderStatus }
......@@ -19,13 +19,12 @@
v-model="searchForm.requestSource"
@tab-click="handleTabClick"
>
<template v-for="(i,index) in requestSourceList">
<el-tab-pane
:label="i"
:name="index"
:key="index"
v-for="(i,index) in requestSourceList"
></el-tab-pane>
</template>
</el-tabs>
</div>
<div class="btn-group">
......@@ -363,13 +362,23 @@
<GLDialog
v-if="writeOffApprovalVisible"
title="核销审批"
width="400px"
mode="mid"
:width="approvalInfo.verificationVoucher ? '':'400px'"
:visible.sync="writeOffApprovalVisible"
@onCancel="handleApprovalClose"
@onOk="handleApprovalComfirm"
@onOk="handleApprovalConfirm"
:okText="approvalInfo.verificationVoucher ? '审批通过': '确定'"
:cancelText="approvalInfo.verificationVoucher ? '不通过': '取消'"
:orderCode="orderCode"
>
<ul>
<ul v-if="approvalInfo.verificationVoucher" class="approvalWrap">
<li v-for="item in userInfo" :key="item.key" class="approvalInfoItem">
{{ item.label }}
<span v-if="item.key!='verificationVoucher'">{{ approvalInfo[item.key] || '--' }}</span>
<el-image v-else style="width: 100px; height: 100px" :src="approvalInfo[item.key]" :preview-src-list="[approvalInfo[item.key]]"></el-image>
</li>
</ul>
<ul v-else>
<li class="approvalInfoTips">
<img
class="tips-img"
......@@ -381,6 +390,16 @@
<li class="approvalInfoItem">提交时间: {{ approvalInfo.confirmInstallTime }}</li>
</ul>
</GLDialog>
<GLDialog title="审批不通过" mode="mid" :visible.sync="isCancelVisible" @onOk="confirmNoPass(1)" @onCancel="closePassDialog">
<div class="noPassDialog">
<span class="tip">请输入审批不通过的原因</span>
<el-form class="form" ref="cancelRef" label-width="154px" :rules="cancelRules" :model="cancelForm">
<el-form-item label="原因说明:" prop="reasonsForFailure">
<el-input style="width: 432px;" :size="size" type="textarea" v-model="cancelForm.reasonsForFailure" placeholder="请输入审批不通过说明" maxlength="50" rows="3" show-word-limit></el-input>
</el-form-item>
</el-form>
</div>
</GLDialog>
<!-- :selectedCrowdList="JSON.parse(JSON.stringify(customerDataList[0].list))" -->
<!-- <GLDialog :bigTitle="'选择成员'"
mode="big"
......@@ -543,8 +562,31 @@
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
import { utils } from 'glsx-common'
import { dateFormat } from '../../utils/index'
import selectStaff from './components/selectStaff.vue'
import { businessType, orderManageStatusList, afterSaleStatusList, orderSourceList, deliveryTypeList, exportFn } from '@/common/constant'
const userInfo = [
{
label: '员工名称:',
key: 'shareStaffName'
},
{
label: '提交时间:',
key: 'confirmInstallTime'
},
{
label: '活动名称:',
key: 'activityName'
},
{
label: '应付尾款:',
key: 'tailPrice'
},
{
label: '尾款凭证:',
key: 'verificationVoucher'
},
]
export default {
name: 'orderManage',
components: {
......@@ -553,6 +595,26 @@ export default {
},
data () {
return {
userInfo,
isCancelVisible: false,
cancelForm: {
reasonsForFailure: ''
},
cancelRules: {
reasonsForFailure: [
{
required: true,
validator: (rule, value, callback) => {
if (!value || (value && !value.trim())) {
return callback(new Error('请输入审批不通过说明'))
} else {
return callback()
}
},
trigger: 'change'
}
]
},
isStaffVisible: false,
size: 'small',
url: url,
......@@ -698,7 +760,7 @@ export default {
fn: '退款'
},
condition: row => {
return row.orderSource == 4 && [2, 6, 21].includes(+row.orderStatus) && row.isOffline != 0
return row.orderSource == 4 && [2, 6, 21, 22].includes(+row.orderStatus) && row.isOffline != 0
},
listeners: {
click: row => {
......@@ -1418,28 +1480,66 @@ export default {
})
}
},
//取消弹框,如果没有凭证,直接关闭
handleApprovalClose () {
this.writeOffApprovalVisible = !this.writeOffApprovalVisible
if(this.approvalInfo.verificationVoucher){
this.openPassDialog()
}else{
this.writeOffApprovalVisible = false
}
},
// 确认不通过审批
confirmNoPass(){
this.$refs?.cancelRef?.validate(valid => {
if(valid) this.handleApprovalConfirm(1)
})
},
handleApprovalComfirm () {
this.$apis.orderManage.orderVerfication({ orderCode: this.orderCode }).then(result => {
this.handleApprovalClose()
// 确认通过审批
handleApprovalConfirm (type) {
let params = { orderCode: this.orderCode }
if(type==1) {
params.reasonsForFailure = this.cancelForm.reasonsForFailure
params.failureflag = true
}
this.$apis.orderManage.orderVerfication(params).then(result => {
this.writeOffApprovalVisible = false
this.closePassDialog()
this.handleSearch()
})
},
//关闭不通过弹窗
closePassDialog() {
this.isCancelVisible = false
this.cancelForm = {
reasonsForFailure: ''
}
},
// 打开不通过弹窗
openPassDialog() {
this.$refs?.cancelRef?.clearValidate()
this.writeOffApprovalVisible = false
this.isCancelVisible = true
},
// 核销审批
handleWriteOffApproval (val) {
this.orderCode = val.orderCode
this.$apis.orderManage
.getInstallInfo({
subOrderCode: val.orderCode
// subOrderCode: 'S2211111603132050'
.getOrderDetailApi({
orderCode: 'S2110081902337632'
// orderCode: val.orderCode
})
.then(result => {
this.approvalInfo = result
// console.log(result)
})
this.handleApprovalClose()
if(result){
if(result.verificationVoucher){
result.confirmInstallTime = result.confirmInstallTime ? dateFormat(result.confirmInstallTime) : ''
result.crowdFundingPrice = result.crowdFundingPrice || 0
result.payPrice = result.payPrice || 0
result.tailPrice = (result.crowdFundingPrice - result.payPrice) + '元'
this.approvalInfo = result
this.writeOffApprovalVisible = true
}
}
})
},
// 订单指派
handlerAssign (item) {
......@@ -1946,6 +2046,7 @@ export default {
.approvalInfoItem {
margin-left: 20px;
margin-bottom: 10px;
display: flex;
}
.refund-dialog {
.refund-item {
......@@ -2003,4 +2104,27 @@ export default {
margin-left: 8px;
}
}
.approvalWrap{
margin-left: 84px;
}
.noPassDialog{
.tip{
margin-left: 72px;
width: 522px;
font-weight: 400;
font-size: 14px;
color: #666666;
}
.form{
margin-top: 16px;
.el-form-item__label{
height: 32px;
line-height: 32px;
padding-right: 10px;
}
.el-textarea__inner{
font-family: auto;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!