Commit 86f4dbf5 authored by dragondean@qq.com's avatar dragondean@qq.com

完善订单列表撤销拆单申请,审核中查看,取消

parent c67ae120
......@@ -684,3 +684,38 @@ export function splitCancelApply(data){
data
})
}
// 撤销拆单
export function orderSplitRevoke(data){
return request({
url: '/order/split/revoke',
method: 'put',
data
})
}
/*根据订单ID获取撤销拆单详情*/
export function splitRevoke(orderId){
return request({
url: '/order/split/revoke/' + orderId,
method: 'get'
})
}
/*根据审批ID获取撤销拆单详情*/
export function splitRevokeApply(approvalId){
return request({
url: '/order/split/revoke/apply/' + approvalId,
method: 'get'
})
}
/*取消撤销拆单*/
export function cancelSplitRevoke(data){
return request({
url: '/order/split/cancel/revoke',
method: 'put',
data
})
}
......@@ -386,6 +386,11 @@ export default {
component: ()=>import('@/views/ecw/financial/components/commissionPaymentDetails.vue'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
/*撤销拆单*/
split_revoke:{
component: () => import("@/views/ecw/order/components/SplitRevokeDetail"),
id: this.processInstance.businessKey
}
}
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
......
<template>
<el-dialog :visible="true" title="撤销拆单" :before-close="close">
<el-form :model="form" label-width="100px">
<!--<el-form-item label="申请理由">
<el-input v-model="form.reason"></el-input>
</el-form-item>-->
<el-form-item label="抄送">
<work-flow v-model="form.ccIds" xmlkey="revoke_split_order"></work-flow>
</el-form-item>
</el-form>
<div slot="footer">
<template v-if="formId" >
<el-button type="primary" @click="toBpmDetail">审核中</el-button>
<el-button type="default" @click="cancelApproval">取消审核</el-button>
</template>
<el-button v-else type="primary" @click="submit" :loading="submitting" :disabled="submitting">确认</el-button>
</div>
</el-dialog>
</template>
<script>
import WorkFlow from "@/components/WorkFlow";
import {cancelSplitRevoke, orderSplitRevoke, splitRevoke} from '@/api/ecw/order'
export default {
name: "SplitRevoke",
components: { WorkFlow},
props:{
orderId: Number
},
data(){
return {
formId: null, // 审批ID
submitting: false,
form: {
ccIds: []
}
}
},
created() {
splitRevoke(this.orderId).then(res =>{
console.log(res)
if(res.data.formId){
this.formId = res.data.formId
}
})
},
methods:{
submit(){
console.log('提交')
if(this.submitting) return
this.submitting = true
orderSplitRevoke({
orderId: this.orderId,
copyUserId: this.form.ccIds
}).then(res => {
this.$message.success(res.msg || '操作成功')
this.close()
}).finally(() =>{
this.submitting = false
})
},
close(){
this.$emit('close')
},
toBpmDetail(){
this.$router.push(`/bpm/process-instance/detail?id=${this.formId}`)
this.close()
},
// 取消审核
cancelApproval(){
this.$prompt(this.$t("请输入取消原因")).then(res => {
return cancelSplitRevoke({orderId: this.orderId, reason: res.value})
}).then(res => {
this.$message.success(res.msg || this.$t('操作成功'))
this.close()
})
}
}
}
</script>
<style scoped>
</style>
<!--拆单审核中的申请信息部分-->
<template>
<div v-if="orders">
<el-table :data="orders">
<el-table-column :label="$t('订单编号')">
<template slot-scope="scope">{{scope.row.orderNo}}</template>
</el-table-column>
<el-table-column :label="$t('唛头')">
<template slot-scope="{row}">{{row.marks}}</template>
</el-table-column>
<el-table-column label="状态">
<template slot-scope="{row}">{{row.statusMsg}}</template>
</el-table-column>
<el-table-column :label="$t('填单统计')">
<template slot-scope="{row}">
{{row.costVO.totalNum}}{{$t('')}}<br/>{{row.costVO.totalVolume}}<br/>{{row.costVO.totalWeight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('入仓统计')">
<template slot-scope="{row}">
{{row.sumNum}}{{$t('')}}<br/>{{row.sumVolume}}<br/>{{row.sumWeight}}kg
</template>
</el-table-column>
<el-table-column :label="$t('入仓时间')">
<template slot-scope="{row}">
{{row.rucangTime|parseTime}}
</template>
</el-table-column>
<el-table-column :label="$t('运输方式')">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
</template>
</el-table-column>
<el-table-column :label="$t('出货渠道')">
<template slot-scope="{row}">
{{getChannelName(row.channelId)}}
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')">
<template slot-scope="{row}">{{jsonParse(row.departureVO.departure).titleZh}}</template>
</el-table-column>
<el-table-column :label="$t('目的仓')">
<template slot-scope="{row}">
{{jsonParse(row.objectiveVO.objective).titleZh}}
</template>
</el-table-column>
<el-table-column :label="$t('发货人')">
<template slot-scope="{row}">
{{row.consignorVO.name}}
</template>
</el-table-column>
<el-table-column :label="$t('收货人')">
<template slot-scope="{row}">
{{row.consigneeVO.name}}
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {getApproval, getOrder} from '@/api/ecw/order'
import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi'
export default {
name: 'SplitRevokeDetail',
filters: {parseTime},
props:{
id: [String, Number]
},
data(){
return {
orders: null,
channels: []
}
},
watch:{
id(){
this.getData()
}
},
computed:{
jsonParse(){
return d => {
return JSON.parse(d)
}
},
getChannelName(){
return id => {
let channel = this.channels.find(item => item.channelId == id)
return channel ? channel.nameZh : '/'
}
}
},
created(){
if(this.id){
this.getData()
}
},
methods:{
getData(){
getMergeListByMergeId({id: this.id}).then(res => {
this.orders = res.data
this.getChannels()
})
},
getChannels(){
let ids = []
this.orders.forEach(order => {
if(order.channelId){
ids.push(order.channelId)
}
})
if(!ids.length) return false
getChannelListByIds({ids: ids.join(',')}).then(res => {
this.channels = res.data
})
}
}
}
</script>
<style scoped lang="scss">
.title{
padding: 10px 0;
span{
font-size: 14px;
font-weight: bold;
}
}
</style>
......@@ -317,8 +317,8 @@
</template>
<!--撤销拆单,拆单的子订单,预装前显示,预装后变灰不可点击-->
<template v-if="scope.row.parentOrderId">
<el-dropdown-item @click.native="cancelSplit(scope.row)" v-hasPermi="['ecw:order:cancel_split']">{{$t('撤销拆单')}}</el-dropdown-item>
<template v-if="scope.row.parentOrderId && scope.row.status < 11">
<el-dropdown-item @click.native="splitRevoke(scope.row)" v-hasPermi="['ecw:order:split_revoke']">{{$t('撤销拆单')}}</el-dropdown-item>
</template>
......@@ -462,6 +462,7 @@
<fee-application :order-id="orderId" :currencys="JSON.stringify(currencyList)" :dialog-visible.sync="feeApplicationBol"></fee-application>
<merge-log :order-no="showMergedLogOrderNo" v-if="showMergedLogOrderNo !== null" @close="showMergedLogOrderNo=null" />
<pickup-log v-if="showPickupLogOrderNo" :order-no="showPickupLogOrderNo" @close="showPickupLogOrderNo=null" @delete="getList" />
<SplitRevoke v-if="splitRevokeOrderId" :order-id="splitRevokeOrderId" @close="splitRevokeOrderId=null;getList()"></SplitRevoke>
</div>
</template>
......@@ -471,7 +472,6 @@ import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import { getTradeCityList } from '@/api/ecw/region'
import {
createOrder,
updateOrder,
......@@ -497,7 +497,7 @@ import {
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload, splitCancelApply
exportUnload, splitCancelApply, orderSplitRevoke
} from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag'
......@@ -512,6 +512,7 @@ import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
export default {
name: "EcwOrderIndex",
components: {
......@@ -520,6 +521,7 @@ export default {
BatchSingleApplication,
MergeLog,
PickupLog,
SplitRevoke,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
props: {
......@@ -583,6 +585,8 @@ export default {
},
currencyList:[],
statistics: null ,// 统计数据
splitRevokeOrderId: null, // 撤销拆单的订单ID
};
},
watch:{
......@@ -646,7 +650,7 @@ export default {
}
},
activated(){
this.handleQuery()
this.getList()
},
created() {
this.getTransportFromRoute()
......@@ -659,13 +663,8 @@ export default {
},
methods: {
// 取消拆单申请
cancelSplit(row){
this.$prompt('请输入撤销理由').then(res =>{
console.log("res", res)
return splitCancelApply({ orderId: row.orderId, reason: res.value})
}).then(() => {
this.getList()
})
splitRevoke(row){
this.splitRevokeOrderId = row.orderId
},
// 获得导出函数
getExportFunc(){
......
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