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

添加异常订单查看详情

parent ce9f9fc6
......@@ -113,3 +113,11 @@ export function exportExcel(params) {
responseType: 'arraybuffer'
})
}
// 根据订ID获取订单异常结果
export function getOrderExcptionResult(query) {
return request({
url: '/ecw/order-exception-result/page',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -110,7 +110,8 @@
</el-table-column>
<el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<el-button v-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType!='order_no_quote_exception'" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-tag style="margin-left:10px" v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pay_exception'" v-hasPermi="['ecw:exception:pay']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
......
......@@ -89,7 +89,7 @@
<!-- {{orderExceptionData.orderExceptionDescVO?orderExceptionData.orderExceptionDescVO.descZh:''}} -->
{{$l(orderExceptionData.orderExceptionDescVO, 'desc')}}
</el-form-item>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">{{ $t('新增收款单') }}</el-button>
<el-button v-if="orderExceptionData.orderExceptionType=='order_pay_exception'&&orderExceptionData.orderExceptionStatus!=2" type="primary" plain icon="el-icon-plus" style="margin-left: 200px;" @click="handleAdd">{{ $t('新增收款单') }}</el-button>
</el-row>
<el-row v-if="orderExceptionData.orderExceptionDetails">
<el-form-item :label="$t('详细内容')+':'">
......@@ -303,7 +303,7 @@
</el-col>
</el-row>
<el-row :span="12" v-if="orderExceptionData.orderExceptionType=='order_doc_exception'">
<el-form-item :label="$t('报关资料')+':'" size="medium" :require="true">
<el-form-item v-if="orderExceptionData.orderExceptionStatus!=2" :label="$t('报关资料')+':'" size="medium" :require="true">
<file-upload v-model="handlerParams.fileList" :value="orderExceptionData.orderExceptionAttr" ></file-upload>
</el-form-item>
</el-row>
......@@ -317,7 +317,7 @@
<!--预付异常的备选需要根据接口数据过滤-->
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='not_customer_service_exception'">
<el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
<el-option :disabled="orderFee && orderFee.result && orderFee.result.indexOf(dict.value) ==-1" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template>
......@@ -326,7 +326,7 @@
</el-row>
<el-row v-else-if="orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'">
<el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange">
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange" :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
<el-option :disabled="dict.value=='pending'" :key="dict.value" :label="$l(dict, 'label')" :value="dict.value"/>
</template>
......@@ -349,6 +349,7 @@
>
<product-selector
:status="0"
:disabled="orderExceptionData.orderExceptionStatus==2"
@hook:mounted="onTableMounted"
v-model="productId2"
@change = "onProductChange($event)"
......@@ -371,6 +372,7 @@
lang="En"
:status="0"
v-model="productId1"
:disabled="orderExceptionData.orderExceptionStatus==2"
@change = "onProductChange($event)"
/>
</el-form-item>
......@@ -378,7 +380,7 @@
</div>
<el-row v-if="orderExceptionData.orderExceptionType=='not_customer_service_exception'&&handlerParams.orderExceptionHandlerResult=='allocate'">
<el-form-item :label="$t('移交客户经理')+':'" required>
<el-select v-model="handlerParams.customerService" :placeholder="$t('请选择客户经理')" clearable>
<el-select v-model="handlerParams.customerService" :placeholder="$t('请选择客户经理')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in customerServiceList"
:key="dict.id" :label="dict.nickname" :value="dict.id"/>
</el-select>
......@@ -387,7 +389,7 @@
<!-- 代收货款 时需要填写代收金额 -->
<el-row v-if="handlerParams.orderExceptionHandlerResult == 'cod'" >
<el-form-item :label="$t('代收金额')+':'" size="medium" required>
<el-input class="w-100" type="text" v-model="handlerParams.amount" />
<el-input class="w-100" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<!-- <el-select v-model="handlerParams.currency" clearable>
<el-option v-for="dict in getDictDatas('shipping_price_unit') "
:key="dict.value" :label="dict.label" :value="dict.value"/>
......@@ -398,8 +400,8 @@
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='order_pick_up_exception'&&handlerParams.orderExceptionHandlerResult=='cost_required'">
<el-form-item :label="$t('送货费用')+':'" size="medium">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2"/>
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
......@@ -407,14 +409,14 @@
</el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'&&orderExceptionData.orderExceptionType!='goods_add_exception'">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" :disabled="orderExceptionData.orderExceptionStatus==2" />
</el-form-item>
</el-row>
<div v-if="orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'">
<el-row >
<el-form-item :label="$t('状态')+':'">
<el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus">
<el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus" :disabled="orderExceptionData.orderExceptionStatus==2">
<el-radio label="1">{{$t('处理中')}}</el-radio>
<el-radio label="2">{{$t('已处理')}}</el-radio>
</el-radio-group>
......@@ -422,7 +424,7 @@
</el-row>
<el-row>
<el-form-item :label="$t('处理结果')+':'" required v-if="handlerParams.orderExceptionStatus==2">
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_don_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -430,8 +432,8 @@
</el-row>
<el-row >
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable>
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
......@@ -439,7 +441,7 @@
</el-row>
<el-row>
<el-form-item :label="$t('查明原因')+':'" required v-if="handlerParams.orderExceptionStatus==1">
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable>
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
......@@ -449,7 +451,7 @@
</el-form>
</el-card>
<!-- 只有不需要预付才需要审核 -->
<template v-if="showWorkFlow">
<template v-if="showWorkFlow&&orderExceptionData.orderExceptionStatus!=2">
<div class="page-title">{{$t('审批流程')}}</div>
<work-flow xmlkey="commission_config" v-model="handlerParams.ccIds" />
</template>
......@@ -463,6 +465,9 @@
<el-button plain type="primary" @click="cancelAudit">{{$t('取消审核')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template>
<template v-else-if="orderExceptionData.orderExceptionStatus==2">
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="submitForm">{{$t('提交')}}</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('取消')}}</el-button>
......@@ -480,7 +485,7 @@
import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview'
import { getCurrencyList } from '@/api/ecw/currency'
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById} from "@/api/ecw/orderException"
import {getExceptionById,handlerExceptionByExceptionId,getOrderItemById,getOrderFeeById,getOrderExcptionResult} from "@/api/ecw/orderException"
import {getFirstReceivableListByOrderId} from '@/api/ecw/financial'
import WorkFlow from '@/components/WorkFlow'
import {listByIds} from '@/api/ecw/region'
......@@ -579,7 +584,6 @@
// this.productId1 = this.handlerParams.productId
// this.productId2 = this.handlerParams.productId
}
console.log(this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId))
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId)
}
}
......@@ -617,6 +621,9 @@
that.getOrderFeeByIdData()
that.getPreExceptionData()
}
if(that.orderExceptionData.orderExceptionStatus==2){
that.getOrderExcptionResult()
}
});
},
......@@ -636,10 +643,33 @@
this.customerData = res.data
})
},
//获取异常结果
getOrderExcptionResult(){
getOrderExcptionResult({orderExceptionId:this.orderExceptionId}).then(res=>{
this.handlerParams = Object.assign(this.handlerParams,res.data.list[0])
if(!this.orderExceptionData.handlerTime){
this.orderExceptionData.handlerTime = this.handlerParams.handlerTime
}
if(this.handlerParams.handlerRemark){
this.$set(this.handlerParams,'orderExceptionHandlerRemark', this.handlerParams.handlerRemark)
}
if(this.handlerParams.handlerResult){
this.$set(this.handlerParams,'orderExceptionHandlerResult', this.handlerParams.handlerResult)
}
if(this.handlerParams.productId){
this.productId2 = this.productId1 = this.handlerParams.productId
}
})
},
getOrderFeeByIdData(){
getOrderFeeById({id:this.orderId}).then(response => {
this.orderFee = response.data
this.handlerParams.orderExceptionHandlerResult = this.orderFee.result[0]
if(this.orderExceptionData.orderExceptionStatus==2){
this.getOrderExcptionResult()
}
})
},
getPreExceptionData(){
......@@ -817,4 +847,7 @@
.red{
color: red;
}
.el-select{
width:300px !important;
}
</style>
......@@ -107,17 +107,33 @@
</template>
</el-table-column>
<el-table-column :label="$t('最后操作时间')" scope="handlerTime" />
</el-table>
</el-card>
<el-card>
<div slot="header" class="card-title">{{$t('处理结果')}}</div>
<el-descriptions :column="1">
<el-descriptions-item :label="$t('处理时间')">
{{parseTime(handlerParams.handlerTime)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('处理结果')">
{{handlerParams.handlerResult=='general_cargo'?$t('设为普货'):$t('设为已处理')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('备注')">
{{handlerParams.handlerRemark||"无"}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<div slot="footer" class="dialog-footer">
<div>
<div v-if="list.orderExceptionStatus!=2">
<el-button type="primary" @click="submit('general_cargo')">{{$t('设为普货')}}</el-button>
<el-button plain type="primary" @click="submit('process')">{{$t('设为已处理')}}</el-button>
</div>
<div v-else>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
</div>
<el-form :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
<el-form v-if="list.orderExceptionStatus!=2" :model="handlerParams" ref="queryForms" size="small" label-width="50px" class="card">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" />
</el-form-item>
......@@ -127,7 +143,7 @@
</template>
<script>
import {getExceptionById,handlerExceptionByExceptionId} from "@/api/ecw/orderException"
import {getExceptionById,handlerExceptionByExceptionId,getOrderExcptionResult} from "@/api/ecw/orderException"
import {DICT_TYPE} from '@/utils/dict'
import {getOrder} from '@/api/ecw/order'
import {getProductBrankPage} from '@/api/ecw/productBrank'
......@@ -171,6 +187,7 @@ export default {
getExceptionById(this.id).then(response => {
this.list = response.data;
this.loading = false;
this.getOrderExcptionResult()
this.getOrders()
});
},
......@@ -178,6 +195,14 @@ export default {
var brank = this.branklist.find(item=>item.id==id)
return brank.titleZh||''
},
//获取异常结果
getOrderExcptionResult(){
getOrderExcptionResult({orderExceptionId:this.id}).then(res=>{
this.handlerParams = res.data.list[0]
console.log(this.handlerParams)
})
},
checkCode(data){
if(data.indexOf('+')==-1){
return '+'+data
......
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