Commit fb29057f authored by 我在何方's avatar 我在何方

更新佣金规则

parent c0651547
......@@ -352,6 +352,15 @@ export function createOrderSpecial(data) {
})
}
// 特价申请
export function cancelOrderSpecial(orderApprovalId,data) {
return request({
url: '/ecw/order/cancel/approval/'+orderApprovalId,
method: 'get',
params:data
})
}
// 获得订单特价申请详情
export function getOrderSpecial(offerProdId, type = 1) {
return request({
......
......@@ -83,3 +83,12 @@ export function getOrderItemById(id) {
method: 'get'
})
}
// 根据订ID获取所有费用及比例
export function getOrderFeeById(query) {
return request({
url: '/ecw/order-exception/getOrderFeeById',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -303,7 +303,13 @@ export const constantRoutes = [
name: 'discount',
meta: {title: '订单优惠申请', icon: '', activeMenu: '/order/index'}
},
{
path: 'speciallight/:orderId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/light'),
props: true,
name: 'special-light',
meta: {title: '申请泡货优惠', icon: '', activeMenu: '/order/index'}
},
{
path: 'specialWeight/:orderId(\\d+)',
component: (resolve) => import('@/views/ecw/order/special/weight'),
......
......@@ -3,7 +3,7 @@
<el-card>
<div slot="header" class="header">
<div class="card-title">查看</div>
<el-button type="primary" icon="el-icon-arrow-left" @click="$router.back()">返回</el-button>
<el-button type="primary" icon="el-icon-arrow-left" @click="$store.dispatch('tagsView/delCurrentView')">返回</el-button>
</div>
<el-form :model="orderData" ref="queryForm" size="small" :inline="true" label-width="120px" class="card">
<el-row>
......@@ -32,12 +32,12 @@
<div v-if="orderExceptionData.orderExceptionType!='order_doc_exception'&&orderExceptionData.orderExceptionType!='order_consignor_exception'&&orderExceptionData.orderExceptionType!='order_other_exception'">
<el-row>
<el-form-item label="填单参数:">
{{(shopData.num||0)+''+(shopData.volume||0)+''+(shopData.weight||0)+'kg'}}
{{(shopData.num||0)+''+(shopData.volume||0)+''+(shopData.weight||0)+'kg '+(shopData.quantity||0)+''}}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="入仓参数:">
{{(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.cartonsNum:0)+''+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.volume:0)+''+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.weight:0)+'kg'}}
{{(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.cartonsNum:0)+''+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.volume:0)+''+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.weight:0)+'kg '+(shopData.warehouseInInfoVO?shopData.warehouseInInfoVO.quantityAll:0)+''}}
</el-form-item>
</el-row>
<el-row :span="12">
......@@ -47,8 +47,8 @@
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row>
<el-row>
<el-form-item label="入仓参数:">
<span>{{order.entryNum||0}}{{order.entryWeight||0}}Kg {{order.entryVolume||0}}</span>
<el-form-item label="收费参数:">
<span>{{orderData.entryNum||0}}{{orderData.entryVolume||0}}{{orderData.entryWeight||0}}Kg {{orderData.entryQuantity||0}}</span>
</el-form-item>
</el-row>
<!-- <el-row :span="12">
......@@ -58,7 +58,7 @@
<el-button v-if="orderExceptionData.orderExceptionStatus==3" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">新增收款单</el-button>
</el-row> -->
</div>
</el-form> {{order.entryNum}}{{order.entryWeight}}Kg {{order.entryVolume}}
</el-form>
<el-table v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" v-loading="loading" border :data="preException">
<el-table-column label="品名" align="center">
<template slot-scope="scope">
......@@ -127,52 +127,52 @@
<el-form :model="handlerParams" ref="queryForms" size="small" :inline="true" label-width="120px" class="card">
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item label="订单总金额:">
{{orderData.totalMoney}}
{{orderFee.totalAmount||0}}
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item label="应付预付金额:">
{{orderData.totalMoney}}
{{orderFee.totalPaymentAmount}}
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-col :span="6">
<el-form-item label="已核销预付金额:">
{{orderData.totalMoney}}
{{orderFee.writeOffAmount}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="已核销预付金额占总金额比例:" label-width="200px">
{{orderData.totalMoney}}
{{orderFee.writeOffAmountScale}}
</el-form-item>
</el-col>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" >
<el-col :span="6">
<el-form-item label="预付商品货值:">
{{orderData.totalMoney}}
{{orderFee.paymentGoodsWorth}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预付商品货值占佣金额比例:" label-width="200px">
{{orderData.totalMoney}}
{{orderFee.paymentGoodsWorthScale}}
</el-form-item>
</el-col>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item label="预付商品方数:">
{{orderData.totalMoney}}
{{orderFee.paymentGoodsVolume}}
</el-form-item>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-col :span="6">
<el-form-item label="订单总方数:">
{{orderData.totalMoney}}
{{orderFee.totalVolume}}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预付商品方数占总方数比例:" label-width="200px">
{{orderData.totalMoney}}
{{orderFee.paymentGoodsVolumeScale}}
</el-form-item>
</el-col>
</el-row>
......@@ -230,7 +230,7 @@
<div slot="footer" class="dialog-footer">
<div>
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain type="primary" @click="$router.back()">取消</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">取消</el-button>
</div>
<el-button v-if="orderExceptionData.orderExceptionStatus=='order_pay_exception'" type="primary" @click="submitForm">转交</el-button>
</div>
......@@ -241,7 +241,7 @@
import FileUpload from '@/components/FileUpload'
import {getDictData, getDictDatas} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById} from "@/api/ecw/orderException"
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
export default {
......@@ -269,7 +269,8 @@
consigneeData:[],
routerList:[],
multipleSelection:[],
preException:[]
preException:[],
orderFee:[]
};
},
created() {
......@@ -277,6 +278,7 @@
this.orderExceptionId = this.$route.query.id
this.handlerParams.orderExceptionId = this.$route.query.id
this.getList()
}
},
methods: {
......@@ -288,7 +290,7 @@
that.orderExceptionData = response.data;
// that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_pick_up_exception'
that.orderExceptionData.orderExceptionType = 'order_pay_exception'
// that.orderExceptionData.orderExceptionType = 'order_pay_exception'
that.loading = false;
that.orderId = response.data.orderId
that.getOrderData()
......@@ -296,6 +298,7 @@
that.getShopData(response.data.orderItemId)
}
that.getPreExceptionData()
that.getOrderFeeByIdData()
});
},
getOrderData(){
......@@ -303,7 +306,11 @@
this.orderData = response.data
});
},
getOrderFeeByIdData(){
getOrderFeeById({id:this.orderId}).then(response => {
this.orderFee = response.data
})
},
getPreExceptionData(){
getFirstReceivableListByOrderId({id:this.orderId}).then(response => {
this.preException = response.data
......@@ -336,7 +343,7 @@
}
handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess("提交成功");
this.$router.back()
this.$store.dispatch('tagsView/delCurrentView')
})
},
/** 跟进按钮操作 */
......
......@@ -143,10 +143,10 @@
<work-flow v-if='singleData.length>0' xmlkey="merge_order" v-model="selectedUsers"></work-flow>
<div slot="footer" class="card footer_btn" v-if="singleData.length>0">
<el-button v-if="orderData.inWarehouseState!=209" type="primary" @click="submitForm">提交申请</el-button>
<el-button v-if="orderData.inWarehouseState!=209" plain type="primary" @click="$router.back()">取消</el-button>
<el-button v-if="orderData.inWarehouseState==209" type="primary" disabled>审核中</el-button>
<el-button v-if="orderData.inWarehouseState!=209" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">取消</el-button>
<el-button v-if="orderData.inWarehouseState==209" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+bpmProcessId)">审核中</el-button>
<el-button v-if="orderData.inWarehouseState==209" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="orderData.inWarehouseState==209" plain type="primary" @click="$router.back()">返回</el-button>
<el-button v-if="orderData.inWarehouseState==209" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">返回</el-button>
</div>
<el-dialog
title="提示"
......@@ -196,6 +196,7 @@ export default {
selectedUsers:[],
total:0,
orderNos:'',
bpmProcessId:'',
reason:'',
dialogVisible:false
};
......@@ -215,7 +216,7 @@ export default {
getMergeListByOrderNo(this.queryParams).then(response => {
this.loading = false;
if(response.data.mergedList){
this.mergedList = response.data;
this.mergedList = response.data.mergedList;
}
if(response.data.unMergeList){
this.total = response.data.unMergeList.total;
......@@ -224,6 +225,9 @@ export default {
if(response.data.orderInfo){
this.orderData = response.data.orderInfo
}
if(response.data.bpmProcessId){
this.bpmProcessId = response.data.bpmProcessId
}
});
},
handleSelectionChange(val) {
......@@ -259,7 +263,7 @@ export default {
}
cancelMerge(params).then(res=>{
that.$message.success("取消成功");
that.$router.back()
that.$store.dispatch('tagsView/delCurrentView')
})
},
submitForm(){
......@@ -280,7 +284,7 @@ export default {
})
createMerge(params).then(res=>{
that.$message.success("修改成功");
that.$router.back()
that.$store.dispatch('tagsView/delCurrentView')
})
}
}
......
......@@ -4,60 +4,49 @@
<el-card>
<div slot="header" class="card-title">修改佣金规则-{{form.orderNo||''}}</div>
<el-form :model="form" ref="queryForms" label-width="120px" class="card">
<el-form-item label="商品类型">
<span>{{form.prodType }}</span>
<el-form-item label="商品类型:">
<span>{{getProductAttrNameById(form.prodType) }}</span>
</el-form-item>
<el-form-item label="商品名称">
<el-form-item label="商品名称:">
<span>{{ form.prodTitleZh }}</span>
</el-form-item>
<el-form-item label="英文名称">
<el-form-item label="英文名称:">
<span>{{ form.prodTitleEn }}</span>
</el-form-item>
<el-form-item label="线路">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${form.startTitleZh}】发往【${form.destTitleZh}】`}}
<el-form-item label="线路:">
{{ `【${getDictDataLabel(DICT_TYPE.TRANSPORT_TYPE, form.transportId)}】${ getChannelNameById(form.channelId) }从【${startTitleZh}】发往【${destTitleZh}】`}}
</el-form-item>
<el-form-item label="运费:" >
<span>{{ form.orgFreight }} {{ currentMap[form.orgFreightCurrency] }}</span>
<span>{{ form.subtotalFreight }} {{ currentMap[form.freightCurrency] }}</span>
</el-form-item>
<el-form-item label="清关费:">
<span>{{ form.orgClearanceFreight }} {{ currentMap[form.orgClearanceFreightCurrency] }}</span>
<span>{{ form.subtotalClearanceFreight }} {{ currentMap[form.clearanceFreightCurrency] }}</span>
</el-form-item>
<el-form-item label="佣金类型:">
<el-radio v-model="form.commissionType" v-for="dict in getDictDatas('commission_type')"
:key="dict.value" :label="dict.label" :value="dict.value">
</el-radio>
<el-radio-group v-model="form.commissionType" >
<el-radio :label="dict.value" v-for="dict in getDictDatas('commission_type')">{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.commissionType==3" label="暗佣佣金:">
<el-input style="width: 100px;" type="text" v-model="form.lightCommissionAmount" />
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in getDictDatas('shipping_price_unit')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in unitType"
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
<el-input style="width: 100px;" type="number" v-model="shadeCommissionAmount" />
<span style="margin-left: 10px;">{{ currentMap[form.freightCurrency] }}</span>
<span>/{{ volumeMap[form.freightVolume] }}</span>
</el-form-item >
<el-form-item v-if="form.commissionType==1||form.commissionType==3" label="明佣佣金:">
<el-input style="width: 100px;" type="text" v-model="form.lightCommissionAmount" />
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in getDictDatas('shipping_price_unit')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
<el-select v-model="form.commissionCurrencyId" style="width: 100px;margin-left: 10px;">
<el-option v-for="dict in unitType"
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
<el-input style="width: 100px;" type="number" v-model="lightCommissionAmount" />
<span style="margin-left: 10px;">{{ currentMap[form.freightCurrency] }}</span>
<span>/{{ volumeMap[form.freightVolume] }}</span>
</el-form-item >
<el-form-item v-if="form.commissionType==1" label="商品:">
<el-form-item v-if="form.commissionType!=0" label="商品:">
<span>{{form.prodTitleZh }}</span>
<span>销售价:{{11}}美元/千克</span>
<span v-if="form.commissionType==3">成本价:190美元/千克</span>
<span v-if="form.commissionType==2" style="color: #1E98D7;" @click="$router.phsh(`/customer/customerCommission`)">去设置</span>
<span v-if="form.commissionType==3">实际佣金返点:40美元/千克</span>
<span style="margin-left: 10px;" v-if="form.commissionType==3">成本价:{{parseInt(form.freight)-parseInt(shadeCommissionAmount)}}{{ currentMap[form.freightCurrency] }}/{{ volumeMap[form.freightVolume] }}</span>
<span style="margin-left: 10px;"> 销售价:{{form.commissionType!=2?(parseInt(form.freight)+parseInt(lightCommissionAmount)):form.freight}}{{ currentMap[form.freightCurrency] }}/{{ volumeMap[form.freightVolume] }}</span>
<span style="margin-left: 10px;color: #1E98D7;" v-if="form.commissionType==2" @click="$router.push(`/customer/customerCommission`)">去设置</span>
<span style="margin-left: 10px;" v-if="form.commissionType==3">实际佣金返点:{{parseInt(lightCommissionAmount)+parseInt(shadeCommissionAmount)}}{{ currentMap[form.freightCurrency] }}/{{ volumeMap[form.freightVolume] }}</span>
</el-form-item>
<el-form-item label="审核状态:">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus"></dict-tag>
<span>{{form.applyResult?('('+form.applyResult+')'):''}}</span>
</el-form-item>
</el-form>
</el-card>
......@@ -65,10 +54,10 @@
<work-flow xmlkey="commission_config" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" v-if="form.applyStatus==0" @click="submitForm">提交</el-button>
<el-button plain type="primary" v-if="form.applyStatus==0" @click="$router.back()">取消</el-button>
<el-button v-if="form.applyStatus==1" type="primary" disabled>审核中</el-button>
<el-button plain type="primary" v-if="form.applyStatus==0" @click="$store.dispatch('tagsView/delCurrentView')">取消</el-button>
<el-button v-if="form.applyStatus==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+form.formId)">审核中</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="$router.back()">返回</el-button>
<el-button v-if="form.applyStatus==1" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">返回</el-button>
</div>
<el-dialog
title="提示"
......@@ -91,11 +80,12 @@
<script>
import {getDictData, getDictDatas,DICT_TYPE,getDictDataLabel} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrder,getOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
import {getOrder,getOrderSpecial,cancelOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
import {getChannelList} from "@/api/ecw/channel"
import { getCurrencyList } from '@/api/ecw/currency'
import { getProductAttrList } from '@/api/ecw/productAttr'
import {getUnitList} from '@/api/ecw/unit'
import {openedRouterList} from "@/api/ecw/warehouse"
export default {
name: "specialCommission",
......@@ -116,7 +106,11 @@ export default {
channelList:[],
currencyList:[],
productAttrList:[],
unitType:[]
unitType:[],
startTitleZh:'',
destTitleZh:'',
shadeCommissionAmount:0,
lightCommissionAmount:0
};
},
created() {
......@@ -151,6 +145,25 @@ export default {
map[item.id] = item.titleZh
})
return map
},
volumeMap(){
let map = {}
this.unitType.forEach(item => {
map[item.id] = item.titleZh
})
return map
},
},
watch: {
'form.lineId'(val){
if (val){
openedRouterList({lineId: val}).then(r => {
if(r.data && r.data.length > 0){
this.startTitleZh = r.data[0].startTitleZh
this.destTitleZh = r.data[0].destTitleZh
}
})
}
}
},
methods: {
......@@ -162,7 +175,7 @@ export default {
})
},
getOrderData(){
getOrder(this.queryParams.orderId).then(response => {
getOrder(this.form.orderId).then(response => {
this.orderData = response.data
});
},
......@@ -173,20 +186,25 @@ export default {
getOrderSpecialData(){
getOrderSpecial(this.form.orderItemId,3).then(r => {
this.form = r.data
this.lightCommissionAmount = this.form.lightCommissionAmount
this.shadeCommissionAmount = this.form.shadeCommissionAmount
this.form.commissionType = this.form.commissionType.toString()
})
},
submitForm(){
createOrderSpecial({
applyType: this.form.applyType,
lineId: this.form.lineId,
commissionType: this.form.commissionType,
orderId: this.form.orderId,
orderNo: this.form.orderNo,
orderItemId: this.form.orderItemId,
prodId:this.form.prodId,
ccIds:this.selectedUsers.join(',')
}).then(r => {
this.form.applyType = 3
this.form.commissionType = parseInt(this.form.commissionType)
if(this.form.commissionType==1){
this.form.lightCommissionAmount = this.lightCommissionAmount
}
if(this.form.commissionType==3){
this.form.lightCommissionAmount = this.lightCommissionAmount
this.form.shadeCommissionAmount = this.shadeCommissionAmount
}
this.form.ccIds = this.selectedUsers.join(',')
createOrderSpecial(this.form).then(r => {
this.$message.success(r.msg || '提交成功')
this.$store.dispatch('tagsView/delCurrentView')
})
},
cancelSplit(){
......@@ -195,9 +213,9 @@ export default {
that.$message.error("请输入取消原因");
return
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
cancelOrderSpecial(that.form.orderApprovalId,{reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
that.$store.dispatch('tagsView/delCurrentView')
})
},
......
......@@ -88,7 +88,7 @@
<div style="text-align: center;margin-top: 80px">
<el-button type="primary" @click="toweight">申请重货优惠</el-button>
<el-button type="primary">申请泡货优惠</el-button>
<el-button type="primary" @click="tolight" >申请泡货优惠</el-button>
<el-button type="primary">关闭窗口</el-button>
</div>
</el-card>
......@@ -157,6 +157,11 @@ export default {
path:"/order/specialWeight/"+this.params.orderId,
})
},
tolight(){
this.$router.push({
path:"/order/specialLight/"+this.params.orderId,
})
},
getProductNamesByIds(ids){
const result = []
ids.split(',').forEach(e => {
......
......@@ -17,18 +17,18 @@
</el-row>
<el-row :span="8">
<el-form-item label="备注:" size="medium" label-width="150px">
<el-input style="width: 500px;" type="textarea" v-model="queryParams.orderExceptionHandlerRemark" />
<el-input style="width: 500px;" type="textarea" v-model="queryParams.remarks" />
</el-form-item>
</el-row>
</el-form>
</el-card>
<work-flow xmlkey="heavy_goods_discount" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button plain type="primary" @click="$router.back()">取消</el-button>
<!-- <el-button v-if="orderData.inWarehouseState==207" type="primary" disabled>审核中</el-button> -->
<!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">取消审核</el-button> -->
<!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="$router.back()">返回</el-button> -->
<el-button v-if="queryParams.applyStatus==0" type="primary" @click="submitForm">提交</el-button>
<el-button v-if="queryParams.applyStatus==0" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">取消</el-button>
<el-button v-if="queryParams.applyStatus==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+queryParams.formId)">审核中</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">返回</el-button>
</div>
<el-dialog
title="提示"
......@@ -51,10 +51,10 @@
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
import {getOrderSpecial,createOrderSpecial,cancelOrderSpecial} from '@/api/ecw/order'
export default {
name: "specialWeight",
name: "specialLight",
components: {
WorkFlow
},
......@@ -96,17 +96,11 @@ export default {
})
},
submitForm(){
createOrderSpecial({
applyType: this.queryParams.applyType,
lineId: this.queryParams.lineId,
vweight: this.queryParams.vweight,
orderId: this.queryParams.orderId,
orderNo: this.queryParams.orderNo,
orderItemId: this.queryParams.orderItemId,
prodId:this.queryParams.prodId,
ccIds:this.selectedUsers.join(',')
}).then(r => {
this.queryParams.applyType = 5
this.queryParams.ccIds = this.selectedUsers.join(',')
createOrderSpecial(this.queryParams).then(r => {
this.$message.success(r.msg || '提交成功')
this.$store.dispatch('tagsView/delCurrentView')
})
},
cancelSplit(){
......@@ -115,9 +109,9 @@ export default {
that.$message.error("请输入取消原因");
return
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
cancelOrderSpecial(that.queryParams.orderApprovalId,{reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
that.$store.dispatch('tagsView/delCurrentView')
})
},
......
......@@ -17,7 +17,7 @@
</el-row>
<el-row :span="8">
<el-form-item label="备注:" size="medium" label-width="150px">
<el-input style="width: 500px;" type="textarea" v-model="queryParams.orderExceptionHandlerRemark" />
<el-input style="width: 500px;" type="textarea" v-model="queryParams.remarks" />
</el-form-item>
</el-row>
</el-form>
......@@ -25,10 +25,10 @@
<work-flow xmlkey="heavy_goods_discount" v-model="selectedUsers" style="margin-top: 20px;"></work-flow>
<div slot="footer" class="card footer_btn">
<el-button type="primary" v-if="queryParams.applyStatus==0" @click="submitForm">提交</el-button>
<el-button plain type="primary" v-if="queryParams.applyStatus==0" @click="$router.back()">取消</el-button>
<el-button v-if="queryParams.applyStatus==1" type="primary" disabled>审核中</el-button>
<el-button plain type="primary" v-if="queryParams.applyStatus==0" @click="$store.dispatch('tagsView/delCurrentView')">取消</el-button>
<el-button v-if="queryParams.applyStatus==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+queryParams.formId)">审核中</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="$router.back()">返回</el-button>
<el-button v-if="queryParams.applyStatus==1" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">返回</el-button>
</div>
<el-dialog
title="提示"
......@@ -51,7 +51,7 @@
<script>
import {getDictData, getDictDatas,DICT_TYPE} from '@/utils/dict'
import WorkFlow from '@/components/WorkFlow'
import {getOrderSpecial,createOrderSpecial} from '@/api/ecw/order'
import {getOrderSpecial,createOrderSpecial,cancelOrderSpecial} from '@/api/ecw/order'
export default {
name: "specialWeight",
......@@ -97,17 +97,11 @@ export default {
})
},
submitForm(){
createOrderSpecial({
applyType: this.queryParams.applyType,
lineId: this.queryParams.lineId,
wvolume: this.queryParams.wvolume,
orderId: this.queryParams.orderId,
orderNo: this.queryParams.orderNo,
orderItemId: this.queryParams.orderItemId,
prodId:this.queryParams.prodId,
ccIds:this.selectedUsers.join(',')
}).then(r => {
this.queryParams.applyType = 4
this.queryParams.ccIds = this.selectedUsers.join(',')
createOrderSpecial(this.queryParams).then(r => {
this.$message.success(r.msg || '提交成功')
this.$store.dispatch('tagsView/delCurrentView')
})
},
cancelSplit(){
......@@ -116,9 +110,9 @@ export default {
that.$message.error("请输入取消原因");
return
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
cancelOrderSpecial(that.queryParams.orderApprovalId,{reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
that.$store.dispatch('tagsView/delCurrentView')
})
},
......
......@@ -177,10 +177,10 @@
<work-flow xmlkey="split_order" v-model="selectedUsers"></work-flow>
<div slot="footer" class="card footer_btn" v-if="orderData.status!=99">
<el-button v-if="orderData.inWarehouseState!=207" type="primary" @click="submitForm">提交申请</el-button>
<el-button v-if="orderData.inWarehouseState!=207" plain type="primary" @click="$router.back()">取消</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary" disabled>审核中</el-button>
<el-button v-if="orderData.inWarehouseState!=207" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">取消</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.formId)">审核中</el-button>
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">取消审核</el-button>
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="$router.back()">返回</el-button>
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">返回</el-button>
</div>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="新建拆单" :visible.sync="open" width="400px" append-to-body>
......@@ -280,6 +280,7 @@ export default {
dialogVisible:false,
orderData:{},
splitData:[],
orderApprovalBackVO:{},
splitIndex:0,
channelData:[],
tradeCityList:[],
......@@ -371,7 +372,11 @@ export default {
this.loading = true;
// 执行查询
getSplitList(this.queryParams).then(response => {
this.splitData = response.data
this.splitData = response.data.orderSplitBackVOList
if(response.data.orderApprovalBackVO){
this.orderApprovalBackVO = response.data.orderApprovalBackVO
}
this.loading = false;
});
},
......@@ -436,7 +441,7 @@ export default {
}
splitApply(params).then(res=>{
this.$modal.msgSuccess("申请成功");
this.$router.back()
this.$store.dispatch('tagsView/delCurrentView')
})
},
addShop(index){
......@@ -522,7 +527,7 @@ export default {
}
cancelApply({orderId:that.queryParams.orderId,reason:that.reason}).then(res=>{
that.$message.success("取消成功");
that.$router.back()
that.$store.dispatch('tagsView/delCurrentView')
})
},
shopCancel(){
......
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