Commit cfdb8007 authored by dragondean@qq.com's avatar dragondean@qq.com

修复部分bug

parent 42a92dde
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" /> <dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button> </el-button>
<el-button type="primary" @click="cancelAudit">取消审核</el-button>
<el-button type="default" @click="closeDialog">返回</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -93,6 +95,8 @@ import { getCurrencyList } from '@/api/ecw/currency' ...@@ -93,6 +95,8 @@ import { getCurrencyList } from '@/api/ecw/currency'
import { getProductTypeList } from '@/api/ecw/productType' import { getProductTypeList } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {getDarkReturnCommission} from '@/api/ecw/customerCommission' import {getDarkReturnCommission} from '@/api/ecw/customerCommission'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
export default { export default {
name: "Commossion", name: "Commossion",
props: { props: {
...@@ -225,7 +229,21 @@ export default { ...@@ -225,7 +229,21 @@ export default {
}).then(res => { }).then(res => {
this.darkCommission = res.data?.darkCommission this.darkCommission = res.data?.darkCommission
}) })
} },
cancelAudit(){
this.$prompt(this.$t('请输入取消原因?'), this.$t("取消审批"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
return cancelProcessInstance(this.form.formId, value);
}).then(() => {
this.$modal.msgSuccess(this.$t("取消成功"));
this.closeDialog()
})
},
} }
} }
</script> </script>
...@@ -62,6 +62,8 @@ ...@@ -62,6 +62,8 @@
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" /> <dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button> </el-button>
<el-button type="primary" @click="cancelAudit">取消审核</el-button>
<el-button type="default" @click="closeDialog">返回</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -75,6 +77,8 @@ import {getChannelList} from "@/api/ecw/channel" ...@@ -75,6 +77,8 @@ import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import { getProductTypeList } from '@/api/ecw/productType' import { getProductTypeList } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
export default { export default {
name: "specialDiscount", name: "specialDiscount",
props: { props: {
...@@ -139,7 +143,21 @@ export default { ...@@ -139,7 +143,21 @@ export default {
}, },
closeDialog(){ closeDialog(){
this.$emit('close') this.$emit('close')
} },
cancelAudit(){
this.$prompt(this.$t('请输入取消原因?'), this.$t("取消审批"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
return cancelProcessInstance(this.form.formId, value);
}).then(() => {
this.$modal.msgSuccess(this.$t("取消成功"));
this.closeDialog()
})
},
}, },
computed: { computed: {
// 是否可以提交 // 是否可以提交
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<div v-if="order"> <div v-if="order">
<el-descriptions :column="3"> <el-descriptions :column="3">
<el-descriptions-item label="订单号">{{detail.orderNo}}</el-descriptions-item> <el-descriptions-item label="订单号">{{order.orderNo}}</el-descriptions-item>
<el-descriptions-item label="运输方式"> <el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="order.transportId" /> <dict-tag :type="DICT_TYPE.TRANSPORT_TYPE" :value="order.transportId" />
</el-descriptions-item> </el-descriptions-item>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- 调货 --> <!-- 调货 -->
<el-descriptions-item label="申请原因" v-if="applyType == 9"> <el-descriptions-item label="申请原因" v-if="applyType == 9">
{{detail.reason}} {{$l(detail, 'reason')}}
</el-descriptions-item> </el-descriptions-item>
<!-- 取消放货 --> <!-- 取消放货 -->
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
</template> </template>
<!-- 合单,拆单 --> <!-- 合单,拆单 -->
<template v-if=" (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState"> <template v-if=" (scope.row.status < 12 || (scope.row.status == 12 && scope.row.shipmentState == 314)) && !scope.row.abnormalState && scope.row.status">
<el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`/order/singleApply?orderNo=${scope.row.orderNo}`)" >{{$t('合单申请')}}</el-dropdown-item>
<el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push(`/order/splitApply?orderId=${scope.row.orderId}`)" >{{$t('拆单申请')}}</el-dropdown-item>
</template> </template>
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!-- 明佣+暗佣显示 --> <!-- 明佣+暗佣显示 -->
<div v-if="form.commissionType == 3"> <div v-if="form.commissionType == 3">
{{$t('成本价')}}{{Decimal(form.freight).minus(form.shadeCommissionAmount)}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }} {{$t('成本价')}}{{Decimal(form.freight || orderItem.oneSeaFreight).minus(form.shadeCommissionAmount)}} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}
</div> </div>
<!-- 暗佣显示 --> <!-- 暗佣显示 -->
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-link type="primary" @click.native="$router.push('/customer/customerCommission?customerId=' + order.customerId)">{{$t('去设置')}}</el-link> <el-link type="primary" @click.native="$router.push('/customer/customerCommission?customerId=' + order.customerId)">{{$t('去设置')}}</el-link>
</div> </div>
<div v-if="form.commissionType == 1 || form.commissionType == 3">{{$t('销售价')}}{{Decimal(form.freight).plus(form.lightCommissionAmount) }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div> <div v-if="form.commissionType == 1 || form.commissionType == 3">{{$t('销售价')}}{{Decimal(form.freight || orderItem.oneSeaFreight).plus(form.lightCommissionAmount) }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div>
<div v-if="form.commissionType == 3">{{$t('实际佣金返点')}}{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div> <div v-if="form.commissionType == 3">{{$t('实际佣金返点')}}{{form.shadeCommissionAmount + form.lightCommissionAmount }} {{ currencyMap[form.freightCurrency] }} / {{ unitMap[form.freightVolume] }}</div>
</div> </div>
...@@ -84,6 +84,8 @@ ...@@ -84,6 +84,8 @@
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" /> <dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button> </el-button>
<el-button type="primary" @click="cancelAudit">取消审核</el-button>
<el-button type="default" @click="closeDialog">返回</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -97,7 +99,7 @@ import { getProductType } from '@/api/ecw/productType' ...@@ -97,7 +99,7 @@ import { getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {getDarkReturnCommission} from '@/api/ecw/customerCommission' import {getDarkReturnCommission} from '@/api/ecw/customerCommission'
import Decimal from 'decimal.js' import Decimal from 'decimal.js'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
export default { export default {
name: "OrderSpecialCommission", name: "OrderSpecialCommission",
props: { props: {
...@@ -160,6 +162,7 @@ export default { ...@@ -160,6 +162,7 @@ export default {
}, },
methods: { methods: {
Decimal(n){ Decimal(n){
if(!n) return Decimal
return new Decimal(n) return new Decimal(n)
}, },
handleSubmit(){ handleSubmit(){
...@@ -196,7 +199,21 @@ export default { ...@@ -196,7 +199,21 @@ export default {
}).then(res => { }).then(res => {
this.darkCommission = res.data?.darkCommission this.darkCommission = res.data?.darkCommission
}) })
} },
cancelAudit(){
this.$prompt(this.$t('请输入取消原因?'), this.$t("取消审批"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
return cancelProcessInstance(this.form.formId, value);
}).then(() => {
this.$modal.msgSuccess(this.$t("取消成功"));
this.closeDialog()
})
},
}, },
computed: { computed: {
// 是否可以提交 // 是否可以提交
......
...@@ -64,6 +64,8 @@ ...@@ -64,6 +64,8 @@
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" /> <dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button> </el-button>
<el-button type="primary" @click="cancelAudit">取消审核</el-button>
<el-button type="default" @click="closeDialog">返回</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -74,7 +76,9 @@ import {getUnitList} from "@/api/ecw/unit" ...@@ -74,7 +76,9 @@ import {getUnitList} from "@/api/ecw/unit"
import {getChannel, getChannelList} from "@/api/ecw/channel" import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType' import { getProductType } from '@/api/ecw/productType'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
console.log({cancelProcessInstance})
export default { export default {
name: "OrderSpecialDiscount", name: "OrderSpecialDiscount",
props: { props: {
...@@ -114,7 +118,7 @@ export default { ...@@ -114,7 +118,7 @@ export default {
ccIdArr: [], ccIdArr: [],
form: { }, form: { },
rules:{ rules:{
seaFreight : {required: true, message: '运费不能为空'}, freight : {required: true, message: '运费不能为空'},
clearanceFreight: {required: true, message: '清关费不能为空'} clearanceFreight: {required: true, message: '清关费不能为空'}
}, },
productType: null, productType: null,
...@@ -143,6 +147,20 @@ export default { ...@@ -143,6 +147,20 @@ export default {
/* getProductTypeNameById(id){ /* getProductTypeNameById(id){
return this.$l(this.productTypeList.find(e => e.id === id), 'title') return this.$l(this.productTypeList.find(e => e.id === id), 'title')
}, */ }, */
cancelAudit(){
this.$prompt(this.$t('请输入取消原因?'), this.$t("取消审批"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
return cancelProcessInstance(this.form.formId, value);
}).then(() => {
this.$modal.msgSuccess(this.$t("取消成功"));
this.closeDialog()
})
},
closeDialog(){ closeDialog(){
this.$emit('close') this.$emit('close')
} }
...@@ -151,6 +169,9 @@ export default { ...@@ -151,6 +169,9 @@ export default {
// 是否可以提交 // 是否可以提交
submitable(){ submitable(){
let submitable = false; let submitable = false;
if(!this.form.freight || !this.form.clearanceFreight){
return false
}
[ [
['orgClearanceFreight', 'clearanceFreight'], ['orgClearanceFreight', 'clearanceFreight'],
['orgFreight', 'freight'] ['orgFreight', 'freight']
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)"> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" /> <dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button> </el-button>
<el-button type="primary" @click="cancelAudit">取消审核</el-button>
<el-button type="default" @click="closeDialog">返回</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -40,6 +43,8 @@ import {getChannel, getChannelList} from "@/api/ecw/channel" ...@@ -40,6 +43,8 @@ import {getChannel, getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency' import { getCurrencyList } from '@/api/ecw/currency'
import { getProductType } from '@/api/ecw/productType' import { getProductType } from '@/api/ecw/productType'
import WorkFlow from '@/components/WorkFlow' import WorkFlow from '@/components/WorkFlow'
import {cancelProcessInstance} from '@/api/bpm/processInstance'
export default { export default {
name: "OrderSpecialDiscount", name: "OrderSpecialDiscount",
props: { props: {
...@@ -93,7 +98,21 @@ export default { ...@@ -93,7 +98,21 @@ export default {
}, },
closeDialog(){ closeDialog(){
this.$emit('close') this.$emit('close')
} },
cancelAudit(){
this.$prompt(this.$t('请输入取消原因?'), this.$t("取消审批"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*[^\s][\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
return cancelProcessInstance(this.form.formId, value);
}).then(() => {
this.$modal.msgSuccess(this.$t("取消成功"));
this.closeDialog()
})
},
} }
} }
</script> </script>
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