|
@@ -893,32 +893,18 @@ export default {
|
|
|
},
|
|
|
// 价格低于成本校验提示,继续审核
|
|
|
vaildPriceOk (type) {
|
|
|
- console.log(type, this.isSupAudit)
|
|
|
- if (type == 'confirm') {
|
|
|
- this.auditOrder('AUDIT_PASS')
|
|
|
+ // 审核通过或不通过
|
|
|
+ if (type == 'AUDIT_PASS' || type == 'AUDIT_REJECT') {
|
|
|
+ this.auditOrder(type)
|
|
|
return
|
|
|
}
|
|
|
- // 不通过,调用
|
|
|
- if (type == 'AUDIT_REJECT') { // 价格低于成本审核不通过
|
|
|
- this.auditOrder(type)
|
|
|
- } else if (type == 'AUDIT_UP_REJECT') { // 待上级审核不通过
|
|
|
- this.spinning = true
|
|
|
- salesWriteUpAuditReject({
|
|
|
- salesBillSn: this.bizSn || this.$route.params.sn
|
|
|
- }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.$message.success(res.message)
|
|
|
- this.closeVaildPrice()
|
|
|
- this.handleBack()
|
|
|
- }
|
|
|
- this.$refs.vaildPriceModal.spinning = false
|
|
|
- this.spinning = false
|
|
|
- })
|
|
|
- } else { // 通过审核,业务状态变更 待上级审核
|
|
|
+ // 上级审核,不通过或通过
|
|
|
+ if (type == 'AUDIT_UP_PASS' || type == 'AUDIT_UP_REJECT') {
|
|
|
+ const upFun = type == 'AUDIT_UP_PASS' ? salesWriteUpAuditPass : salesWriteUpAuditReject
|
|
|
this.spinning = true
|
|
|
- salesWriteUpAuditPass({
|
|
|
+ upFun({
|
|
|
salesBillSn: this.bizSn || this.$route.params.sn,
|
|
|
- billStatus: type
|
|
|
+ billStatus: type == 'AUDIT_UP_PASS' ? 'AUDIT_PASS' : undefined
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
this.$message.success(res.message)
|