You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3702 lines
114 KiB
3702 lines
114 KiB
<template> |
|
<el-card class="box-card" v-loading="Pageloading" element-loading-text="Loading..."> |
|
<div class="contemtMax"> |
|
<div class="left"> |
|
<el-tabs type="border-card" class="topClass" v-model="identifying"> |
|
<el-tab-pane label="订单信息" :name="1" :disabled="identifying == 2"></el-tab-pane> |
|
<el-tab-pane label="零担信息" :name="2" :disabled="identifying == 1"></el-tab-pane> |
|
</el-tabs> |
|
|
|
<el-form :model="endFrom" :rules="ruleForm" ref="ruleFormRef"> |
|
<div class="el_top"> |
|
<el-form-item label="异常类型" class="el_inputTop"> |
|
<el-select v-model="endFrom.workOrderType" disabled style="width: 240px"> |
|
<el-option |
|
v-for="item in IndexException" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
|
|
<el-form-item label="发现节点" class="el_inputTop"> |
|
<el-select v-model="endFrom.discoveryNode" disabled style="width: 240px"> |
|
<el-option |
|
v-for="item in DiscoveringNodes" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
|
|
<el-form-item label="异常工单号" class="el_inputTop el_Workordernumber"> |
|
<el-input |
|
v-model="endFrom.workOrderNumber" |
|
disabled |
|
:placeholder="endFrom.workOrderNumber ? endFrom.workOrderNumber : '暂未生成工单号'" |
|
clearable |
|
/> |
|
</el-form-item> |
|
<el-form-item label="创建时间" class="el_inputTop el_Workordernumber"> |
|
<el-input v-model="endFrom.createTime" disabled clearable /> |
|
</el-form-item> |
|
</div> |
|
<el-tabs type="border-card" class="PackageInformation"> |
|
<el-tab-pane label="包件信息"> |
|
<div class="ResponsibilityBoxS"> |
|
<div class="el_btbox" v-for="(item, index) in PackageInfo" :key="index"> |
|
<div class="leftbox"> |
|
<el-form-item label="包条码" v-if="identifying == 1"> |
|
<el-tooltip :content="item.packageCode" placement="top"> |
|
<el-input v-model="item.packageCode" disabled /> |
|
</el-tooltip> |
|
</el-form-item> |
|
|
|
<el-form-item label="运单号"> |
|
<el-tooltip :content="item.waybillNumber" placement="top"> |
|
<el-input v-model="item.waybillNumber" disabled /> |
|
</el-tooltip> |
|
</el-form-item> |
|
|
|
<el-form-item label="订单自编码"> |
|
<el-tooltip :content="item.orderCode" placement="top"> |
|
<el-input v-model="item.orderCode" disabled /> |
|
</el-tooltip> |
|
</el-form-item> |
|
|
|
<el-form-item label="一级品"> |
|
<el-input v-model="item.first" disabled /> |
|
</el-form-item> |
|
|
|
<el-form-item label="二级品"> |
|
<el-input v-model="item.secondary" disabled /> |
|
</el-form-item> |
|
|
|
<el-form-item label="品牌"> |
|
<el-input v-model="item.brandName" disabled /> |
|
</el-form-item> |
|
</div> |
|
</div> |
|
<div class="NumTotal"> |
|
<span>总件数:{{ PackageInfo.length }}</span> |
|
</div> |
|
</div> |
|
</el-tab-pane> |
|
</el-tabs> |
|
|
|
<el-tabs type="border-card" class="Basic_information"> |
|
<el-tab-pane label="基础信息"> |
|
<div class="el_information"> |
|
<div class="el_information_row"> |
|
<el-form-item label="车次号" v-if="displaySettings.trainNumber"> |
|
<el-tooltip :content="endFrom.trainNumber" placement="top"> |
|
<el-input v-model="endFrom.trainNumber" disabled /> |
|
</el-tooltip> |
|
</el-form-item> |
|
|
|
<el-form-item label="配送时间" v-if="displaySettings.deliveryTime"> |
|
<el-date-picker |
|
v-model="endFrom.deliveryTime" |
|
type="datetime" |
|
format="YYYY-MM-DD" |
|
disabled |
|
/> |
|
</el-form-item> |
|
|
|
<el-form-item |
|
label="配送司机" |
|
prop="deliveryDriver" |
|
v-if="displaySettings.deliveryDriver" |
|
> |
|
<el-select |
|
v-model="endFrom.deliveryDriver" |
|
filterable |
|
default-first-option |
|
:reserve-keyword="false" |
|
disabled |
|
> |
|
<el-option |
|
v-for="item in DeliveryDriver" |
|
:key="item.value" |
|
:label="item.driverName + '-' + item.trainNumber" |
|
:value="item.id" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
|
|
<el-form-item label="车辆路线" v-if="displaySettings.vehicleRoute"> |
|
<el-input v-model="endFrom.vehicleRoute" disabled /> |
|
</el-form-item> |
|
|
|
<el-form-item label="发货时间" v-if="displaySettings.deliverGoodsTime"> |
|
<el-date-picker |
|
v-model="endFrom.deliverGoodsTime" |
|
type="datetime" |
|
format="YYYY-MM-DD" |
|
disabled |
|
/> |
|
</el-form-item> |
|
|
|
<el-form-item label="发现时间" v-if="displaySettings.discoveryTime"> |
|
<el-date-picker |
|
v-model="endFrom.discoveryTime" |
|
type="datetime" |
|
format="YYYY-MM-DD" |
|
value-format="YYYY-MM-DD" |
|
disabled |
|
/> |
|
</el-form-item> |
|
|
|
<el-form-item label="入库时间" v-if="displaySettings.warehousingTime"> |
|
<el-date-picker |
|
v-model="endFrom.warehousingTime" |
|
type="datetime" |
|
format="YYYY-MM-DD" |
|
value-format="YYYY-MM-DD" |
|
disabled |
|
/> |
|
</el-form-item> |
|
<!-- 必填 --> |
|
<el-form-item label="运单商场" v-if="displaySettings.waybillMall"> |
|
<el-input v-model="endFrom.waybillMall" disabled /> |
|
</el-form-item> |
|
|
|
<el-form-item label="合作模式" v-if="displaySettings.typeServiceName"> |
|
<el-input |
|
v-model="endFrom.typeServiceName" |
|
:placeholder=" |
|
endFrom.typeServiceName ? endFrom.typeServiceName : '暂未查询到合作模式' |
|
" |
|
disabled |
|
/> |
|
</el-form-item> |
|
|
|
<!-- 干线卸车 --> |
|
<el-form-item |
|
label="责任方" |
|
class="processor_box" |
|
style="width: 42%" |
|
v-if="displaySettings.processorEntityList" |
|
> |
|
<el-select |
|
v-model="endFrom.processorEntityList" |
|
placeholder="请选择责任方" |
|
disabled |
|
multiple |
|
filterable |
|
clearable |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
|
|
<el-form-item |
|
class="processor_box" |
|
label="处理方" |
|
v-if="displaySettings.processor" |
|
style="width: 42%" |
|
> |
|
<el-select |
|
v-model="endFrom.processor" |
|
multiple |
|
filterable |
|
allow-create |
|
default-first-option |
|
:reserve-keyword="false" |
|
disabled |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
|
|
<el-form-item |
|
style="min-width: 100%" |
|
label="调查经过" |
|
v-if="displaySettings.investigationProcess" |
|
> |
|
<el-input v-model="endFrom.investigationProcess" disabled /> |
|
</el-form-item> |
|
</div> |
|
</div> |
|
</el-tab-pane> |
|
</el-tabs> |
|
|
|
<el-tabs type="border-card" class="Responsible_box" v-if="FangAddList.length"> |
|
<el-tab-pane label="内部责任划分"> |
|
<div class="ResponsibilityBox"> |
|
<div></div> |
|
<div class="el_btbox" v-for="(item, index) in FangAddList" :key="index"> |
|
<div class="leftbox"> |
|
<div class="maxBox"> |
|
<span class="title">责任方:</span> |
|
<!-- 提货环节 --> |
|
<el-select |
|
v-model="item.businessName" |
|
clearable |
|
placeholder="请选提货择责任方" |
|
v-if="groundlineType == 1" |
|
disabled |
|
> |
|
<el-option |
|
v-for="item in responsible" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
|
|
<el-select |
|
v-else |
|
v-model="item.businessName" |
|
filterable |
|
disabled |
|
placeholder="请选择责任方" |
|
@change="ResponsiblePartychange(item.businessName, index)" |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</div> |
|
|
|
<div class="maxBox"> |
|
<span class="title">责任人:</span> |
|
<el-select |
|
v-model="item.personResponsibleName" |
|
clearable |
|
filterable |
|
placeholder="请选责任人" |
|
disabled |
|
@change="personResponsiblechange(item.personResponsibleName, index)" |
|
> |
|
<el-option |
|
v-for="item in personResponsibleList" |
|
:key="item.id" |
|
:label="item.name" |
|
:value="item.id" |
|
/> |
|
</el-select> |
|
</div> |
|
<div class="maxBox"> |
|
<span class="title">金额(元)</span> |
|
<el-input |
|
v-model="item.responsibilityRatio" |
|
placeholder="请输入占比 " |
|
clearable |
|
:rows="2" |
|
disabled |
|
@input="ProportionInput" |
|
/> |
|
</div> |
|
<div class="maxBox"> |
|
<span class="title">三方责任人:</span> |
|
<el-input v-model="item.tripartite" disabled /> |
|
</div> |
|
<div class="maxBox" style="flex: 1"> |
|
<span class="title">说明:</span> |
|
<el-input |
|
v-model="item.description" |
|
placeholder="请输入说明 " |
|
clearable |
|
:rows="2" |
|
disabled |
|
/> |
|
</div> |
|
</div> |
|
</div> |
|
<!-- <div class="Proportion"> |
|
<span class="title">公司占比:{{ companyProportion }}%</span> |
|
</div> --> |
|
</div> |
|
</el-tab-pane> |
|
</el-tabs> |
|
<!-- 处理结果 --> |
|
<div class="Improveinformation"> |
|
<div class="selector"> |
|
<div class="el-form-item selector"> |
|
<el-tabs type="border-card" style="width: 100%"> |
|
<el-tab-pane label="处理结果"> |
|
<el-select |
|
v-model="endFrom.result" |
|
multiple |
|
filterable |
|
default-first-option |
|
:reserve-keyword="false" |
|
placeholder="请选择处理结果" |
|
@change="changeProcessingResults" |
|
:disabled="!PermissionButton.Processing_result_disabled" |
|
> |
|
<el-option |
|
v-for="item in ProcessingResults" |
|
:key="item.dictKey" |
|
:label="item.dictValue" |
|
:value="item.dictKey" |
|
/> |
|
</el-select> |
|
|
|
<div class="ProcessingResults" v-if="ProcessingList.length"> |
|
<div class="title">处理结果-理赔金额</div> |
|
<!-- 处理结果循环列表 --> |
|
<div class="el_Processingresults"> |
|
<template v-for="(item, index) in ProcessingList" :key="index + item.title"> |
|
<div class="el_Processingresults_box"> |
|
<span class="el_title">{{ item.title }}</span> |
|
<div class="el_Processingresults_box_list"> |
|
<el-form-item label="金额"> |
|
<el-input-number |
|
v-model="item.money" |
|
:min="0" |
|
:controls="false" |
|
:value-on-clear="0" |
|
:precision="2" |
|
@change="Totalamount" |
|
:disabled="!PermissionButton.Processing_result_disabled" |
|
/> |
|
</el-form-item> |
|
|
|
<el-form-item label="支付单位"> |
|
<el-input |
|
v-model="item.paymentUnit" |
|
placeholder="请输入支付单位" |
|
clearable |
|
:disabled="!PermissionButton.Processing_result_disabled" |
|
/> |
|
</el-form-item> |
|
<el-form-item label="理赔支付时间"> |
|
<el-date-picker |
|
v-model="item.compensationTime" |
|
type="datetime" |
|
format="YYYY-MM-DD" |
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
placeholder="理赔支付时间" |
|
size="default" |
|
:disabled="!PermissionButton.Processing_result_disabled" |
|
/> |
|
</el-form-item> |
|
<el-form-item label="支付方式"> |
|
<el-select |
|
v-model="item.compensationMethod" |
|
placeholder="请选择支付方式" |
|
style="width: 100%" |
|
clearable |
|
:disabled="!PermissionButton.Processing_result_disabled" |
|
> |
|
<el-option |
|
v-for="items in item.Paymentmethod" |
|
:key="items.value" |
|
:label="items.label" |
|
:value="items.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
</div> |
|
</div> |
|
</template> |
|
</div> |
|
|
|
<!-- 处理结果说明 --> |
|
<el-form-item label="处理结果说明" class="el_resj"> |
|
<el-input |
|
v-model="endFrom.resultDescription" |
|
placeholder="请输入处理结果说明" |
|
clearable |
|
:autosize="{ minRows: 3, maxRows: 4 }" |
|
:disabled="!PermissionButton.Processing_result_disabled" |
|
type="textarea" |
|
/> |
|
</el-form-item> |
|
<div class="el_tool"> |
|
<span>总金额:{{ TotalClaimAmount }}元</span> |
|
</div> |
|
</div> |
|
</el-tab-pane> |
|
</el-tabs> |
|
</div> |
|
</div> |
|
<el-form :disabled="PermissionButton.Completed_presentation"> |
|
<el-tabs |
|
type="border-card" |
|
class="demo-tabs el-endtabs" |
|
v-if="PermissionButton.Completed_submission" |
|
> |
|
<el-tab-pane> |
|
<template #label> |
|
<span class="custom-tabs-label"> |
|
<el-icon><calendar /></el-icon> |
|
<span>完结信息</span> |
|
</span> |
|
</template> |
|
|
|
<div class="el-ckbtn" v-if="!PermissionButton.Completed_presentation"> |
|
<div class="Compensationamount"> |
|
<el-button type="primary" @click="AddCompensation">添加赔款方</el-button> |
|
<span>{{ CompensationNum }}</span> |
|
</div> |
|
<div class="Compensationamount"> |
|
<el-button type="primary" @click="AddPayee">添加受款方</el-button> |
|
<span>{{ PayeeNum }}</span> |
|
</div> |
|
</div> |
|
|
|
<div |
|
class="payanindemnity" |
|
v-for="(item, index) in CompensationParty" |
|
:key="index" |
|
> |
|
<div style="display: flex"> |
|
<el-form-item |
|
:class="{ |
|
payanindemnity_title: item.state == 0, |
|
payanindemnity_titlecheck: item.warehouseIdcheck, |
|
}" |
|
:label="item.state == 0 ? '赔款方' : '受款方'" |
|
> |
|
<el-select |
|
style="width: 200px" |
|
v-model="item.warehouseId" |
|
filterable |
|
placeholder="请选择仓库" |
|
@change="warehouseChange(item, index)" |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
|
|
<el-form-item label="责任人" v-if="item.state == 0"> |
|
<el-input |
|
v-model="item.compensationPersonnel" |
|
placeholder="请填写责任人" |
|
:rows="2" |
|
/> |
|
</el-form-item> |
|
|
|
<el-form-item |
|
label="原 . 因" |
|
:class="{ |
|
payanindemnity_reason: item.state == 0, |
|
payanindemnity_reasoncheck: item.reasoncheck, |
|
}" |
|
> |
|
<el-input |
|
v-model="item.reason" |
|
placeholder="请填写原因" |
|
@blur="reasonChange(item, index)" |
|
/> |
|
</el-form-item> |
|
|
|
<el-form-item label="金额(元)"> |
|
<el-input-number |
|
v-model="item.num" |
|
:min="0" |
|
:controls="false" |
|
:value-on-clear="0" |
|
:precision="2" |
|
@change="amountMoney" |
|
/> |
|
</el-form-item> |
|
</div> |
|
<div style="display: flex"> |
|
<div class="el_cwBtn"> |
|
<!-- <el-button |
|
type="primary" |
|
v-if="item.state == 0 && UserPermissions != '职能客服' && item.accounting!='1'" |
|
@click="accountingBtn(item)" |
|
> |
|
财务处理 |
|
</el-button> --> |
|
<el-button |
|
type="primary" |
|
v-if="item.button && !PermissionButton.Completed_presentation" |
|
@click="payremove(item, index)" |
|
> |
|
移除 |
|
</el-button> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="paySum"> |
|
<span> |
|
<el-icon><Coin /></el-icon>赔款金额总和:<b>{{ |
|
TotalamountCompensation |
|
}}</b></span |
|
> |
|
<span> |
|
<el-icon><Coin /></el-icon>受款金额总和:<b>{{ TotalamountReceived }}</b></span |
|
> |
|
</div> |
|
</el-tab-pane> |
|
</el-tabs> |
|
|
|
<!-- 仲裁原因说明 --> |
|
<div class="arbitrate" v-if="PermissionButton.Completed_submission"> |
|
<el-tabs |
|
type="border-card" |
|
:class="{ |
|
Reason_arbitration_tip: ReasonarbClass, |
|
'demo-tabs Reason_arbitration': true, |
|
}" |
|
> |
|
<el-tab-pane> |
|
<template #label> |
|
<span class="custom-tabs-label"> |
|
<el-icon><calendar /></el-icon> |
|
<span>仲裁原因</span> |
|
</span> |
|
</template> |
|
|
|
<el-input |
|
v-model="endFrom.arbitrate" |
|
type="textarea" |
|
:autosize="{ minRows: 5, maxRows: 4 }" |
|
placeholder="请输入仲裁原因" |
|
/> |
|
</el-tab-pane> |
|
</el-tabs> |
|
</div> |
|
</el-form> |
|
<!-- 图片 --> |
|
<el-tabs |
|
class="Transport_damage_photos" |
|
type="border-card" |
|
style="width: 100%" |
|
v-if="endFrom.packageImage.length" |
|
> |
|
<el-tab-pane label="照片"> |
|
<el-upload |
|
disabled |
|
v-model:file-list="endFrom.packageImage" |
|
list-type="picture-card" |
|
:on-preview="pictureList" |
|
:on-remove="ImgListRemove" |
|
:action="doubledCount" |
|
:on-success="ImgSuccess" |
|
:before-upload="beforeAvatarUpload" |
|
:headers="headers" |
|
multiple |
|
drag |
|
> |
|
<el-icon><Plus /></el-icon> |
|
</el-upload> |
|
|
|
<el-dialog v-model="dialogImgList" width="30%"> |
|
<el-image |
|
:src="amplifyurl" |
|
:zoom-rate="1.2" |
|
:max-scale="7" |
|
:min-scale="0.2" |
|
:preview-src-list="amplifysrcList" |
|
:initial-index="4" |
|
fit="cover" |
|
/> |
|
</el-dialog> |
|
</el-tab-pane> |
|
</el-tabs> |
|
|
|
<!-- 视频预览弹窗 --> |
|
<el-dialog v-model="VideoPreviewStatus" title="视频预览" width="40%"> |
|
<video height="360" controls class="video-player"> |
|
<source :src="videoUrl" type="video/mp4" /> |
|
</video> |
|
</el-dialog> |
|
</div> |
|
|
|
<div class="el_sub"> |
|
<el-button |
|
v-if="PermissionButton.Headquarters_completion" |
|
type="primary" |
|
class="button" |
|
@click="resultreturnedFun" |
|
>结果驳回</el-button |
|
> |
|
<el-button |
|
v-if="PermissionButton.Headquarters_completion" |
|
type="primary" |
|
class="button" |
|
@click="submitCompletion" |
|
>完结提交</el-button |
|
> |
|
<el-button |
|
v-if="PermissionButton.Submission_results" |
|
type="primary" |
|
class="button" |
|
@click="submitresults(1)" |
|
>处理结果提交</el-button |
|
> |
|
<el-button |
|
v-if="PermissionButton.Save_results" |
|
type="primary" |
|
class="button" |
|
@click="submitresults(2)" |
|
>处理结果保存</el-button |
|
> |
|
|
|
<el-button |
|
v-if="PermissionButton.Processing_result_modification" |
|
type="primary" |
|
class="button" |
|
@click="submitresults(3)" |
|
>处理结果提交</el-button |
|
> |
|
<el-button |
|
v-if="PermissionButton.Processing_result_modification" |
|
type="primary" |
|
class="button" |
|
@click="submitresults(4)" |
|
>处理结果修改保存</el-button |
|
> |
|
<el-button |
|
type="primary" |
|
v-if="PermissionButton.information_editing" |
|
@click="EditInformation" |
|
>修改内部责任划分</el-button |
|
> |
|
<!-- <el-button |
|
@click="DetermineStorage" |
|
v-if="$route.query.RouteIndexs != '0'" |
|
type="primary" |
|
class="button" |
|
>确定</el-button |
|
> --> |
|
|
|
<el-button |
|
v-if="PermissionButton.Arbitration_completed" |
|
type="primary" |
|
class="button" |
|
@click="CustomerServiceCompleted" |
|
>客服仲裁完结</el-button |
|
> |
|
<el-button type="primary" v-if="PermissionButton.repulse" @click="BatchReturn" |
|
>完结打回</el-button |
|
> |
|
<el-button |
|
type="primary" |
|
v-if="PermissionButton.Processing_confirmation" |
|
@click="ResultConfirmation" |
|
>完结审核确认</el-button |
|
> |
|
<el-button |
|
type="primary" |
|
v-if="PermissionButton.Appeal_establishment_button" |
|
@click="AppealEstablished" |
|
>申诉成立</el-button |
|
> |
|
<el-button |
|
type="primary" |
|
v-if="PermissionButton.Appeal_rejection_button" |
|
@click="AppealRejection" |
|
>申诉驳回</el-button |
|
> |
|
<!-- <el-button |
|
v-if="$route.query.RouteIndexs == '0' && $route.query.workOrderStatus != '21'" |
|
type="primary" |
|
class="button" |
|
@click="ElProcessingResults" |
|
>处理结果</el-button |
|
> --> |
|
</div> |
|
</el-form> |
|
</div> |
|
|
|
<el-affix :offset="msgTop"> |
|
<div class="right"> |
|
<el-tabs type="border-card"> |
|
<div class="content"> |
|
<el-tab-pane label="调查记录"> |
|
<div class="el_header-top"> |
|
<div class="el_Processingparty"> |
|
<el-select |
|
v-model="MessageResponsibility" |
|
multiple |
|
filterable |
|
default-first-option |
|
:reserve-keyword="false" |
|
placeholder="请选择处理方" |
|
@change="Msgresponsibility" |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</div> |
|
|
|
<div class="el_Refresh" @click="Chatrefresh"> |
|
<el-button type="primary">刷新</el-button> |
|
</div> |
|
</div> |
|
<div class="ovhe" :style="{ height: msgHight + 'px' }" ref="scrollContainer"> |
|
<el-timeline> |
|
<el-timeline-item |
|
v-for="(item, index) in MessageContent" |
|
:key="index" |
|
placement="top" |
|
> |
|
<el-card> |
|
<div class="header-top"> |
|
<div class="e_ico"> |
|
<el-icon><User /></el-icon>: |
|
<h4>{{ item.username }}【{{ item.name }}】</h4> |
|
</div> |
|
<div class="e_ico e_time"> |
|
<h4>{{ item.time }}</h4> |
|
</div> |
|
<el-tag |
|
:class="{ |
|
identifyingC1: item.difference == '1', |
|
identifyingC2: item.difference == '2', |
|
identifyingC3: item.difference == '3', |
|
'mx-1': true, |
|
}" |
|
effect="dark" |
|
>{{ |
|
item.difference == '1' |
|
? ' 调查记录' |
|
: item.difference == '2' |
|
? '指定记录' |
|
: item.difference == '3' |
|
? '操作记录' |
|
: '' |
|
}} |
|
</el-tag> |
|
</div> |
|
|
|
<div class="e_ico"> |
|
<el-icon><ChatRound /></el-icon>:<span> {{ item.content }}</span> |
|
</div> |
|
|
|
<div class="img" v-if="item.img"> |
|
<el-image |
|
v-for="(item, index) in item.imgList" |
|
:key="index" |
|
:src="item" |
|
:zoom-rate="1.2" |
|
:max-scale="7" |
|
:min-scale="0.2" |
|
:preview-src-list="[item]" |
|
:initial-index="4" |
|
fit="cover" |
|
/> |
|
</div> |
|
<div class="mp4" @click="AddVideoPreview(index)" v-if="item.mp4"> |
|
<span |
|
>视频: <el-icon><VideoPlay /></el-icon>点击预览 |
|
</span> |
|
</div> |
|
|
|
<div class="file" v-if="item.file" @click="FileDownload(index)"> |
|
<a :href="item.file"> |
|
<span |
|
>文件: <el-icon><FolderOpened /></el-icon> 点击下载 |
|
</span> |
|
</a> |
|
</div> |
|
<div class="identifying"> |
|
<!-- <div class="e_ico"> |
|
<el-icon><Timer /></el-icon>: |
|
<p>{{ item.time }}</p> |
|
</div> --> |
|
<div |
|
class="tag" |
|
v-if=" |
|
(msgState == 1 || msgState == 2 || msgState == 3) && item.identifying |
|
" |
|
> |
|
<el-tag class="mx-1" effect="dark" |
|
>{{ |
|
msgState == 1 |
|
? ' 待回复' |
|
: msgState == 2 |
|
? '已回复' |
|
: msgState == 3 |
|
? '已超时' |
|
: '' |
|
}} |
|
</el-tag> |
|
</div> |
|
</div> |
|
</el-card> |
|
</el-timeline-item> |
|
</el-timeline> |
|
</div> |
|
<!-- 输入框 --> |
|
<div class="inputMax" v-loading="Msgloadinga" element-loading-text="Loading..."> |
|
<div class="inputfell"> |
|
<div class="inputbtn"> |
|
<div class="inputleft"> |
|
<el-upload |
|
ref="fileDom" |
|
class="upload-demo" |
|
:action="doubledCount" |
|
:headers="headers" |
|
:on-success="fellSuccess" |
|
:limit="4" |
|
multiple |
|
> |
|
<template #trigger> |
|
<el-button type="primary" class="el-fil">上传附件</el-button> |
|
<!-- <div class="felltis" v-if="KFfeel.length">上传成功</div> --> |
|
</template> |
|
</el-upload> |
|
|
|
<!-- <el-select |
|
v-model="separateMessageResponsibility" |
|
multiple |
|
filterable |
|
default-first-option |
|
:reserve-keyword="false" |
|
placeholder="指定处理方" |
|
@change="Msgresponsibility" |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
:disabled="item.disabled" |
|
/> |
|
</el-select> --> |
|
</div> |
|
<!-- <el-button type="primary" class="el_next" @click="NextRecord()"> |
|
下一条 |
|
</el-button> --> |
|
</div> |
|
|
|
<el-input |
|
v-model="Msgtextarea" |
|
:rows="5" |
|
type="textarea" |
|
placeholder="请输入要回复的内容" |
|
@input="appoint(Msgtextarea)" |
|
/> |
|
<div class="msgHf"> |
|
<el-button type="primary" @click="replyMessage()"> 回复 </el-button> |
|
</div> |
|
</div> |
|
</div> |
|
</el-tab-pane> |
|
</div> |
|
|
|
<!-- <el-tab-pane label="菜单2"></el-tab-pane> --> |
|
</el-tabs> |
|
</div> |
|
</el-affix> |
|
</div> |
|
|
|
<el-dialog v-model="dialogHistoricalPackage" title="查看历史包件" width="30%"> |
|
<el-form-item label="历史包件选择"> |
|
<el-select v-model="HistoricalPackageinput" clearable filterable placeholder="请选择包件"> |
|
<el-option |
|
v-for="item in HistoricalPackageList" |
|
:key="item.value" |
|
:label="item.workOrderNumber" |
|
:value="item.workOrderId" |
|
/> |
|
</el-select> |
|
<el-button @click="ViewPackageDetails(HistoricalPackageinput)">查看详情</el-button> |
|
</el-form-item> |
|
<template #footer> |
|
<span class="dialog-footer"> |
|
<el-button @click="dialogHistoricalPackage = false">取消</el-button> |
|
<el-button type="primary" @click="HistoricalPackage(HistoricalPackageinput)"> |
|
确定选择 |
|
</el-button> |
|
</span> |
|
</template> |
|
</el-dialog> |
|
|
|
<!-- 财务处理弹窗 --> |
|
<!-- 弹出框 --> |
|
|
|
<el-dialog v-model="accountingLodading" title="财务是否处理" width="30%"> |
|
<div class="cw_load"> |
|
<el-radio-group v-model="accountingValue" class="ml-4"> |
|
<el-radio label="1" size="large">已处理</el-radio> |
|
<el-radio label="2" size="large">未处理</el-radio> |
|
</el-radio-group> |
|
</div> |
|
<template #footer> |
|
<span class="dialog-footer"> |
|
<el-button @click="accountingLodading = false">取消</el-button> |
|
<el-button type="primary" @click="accountingFn"> 确定 </el-button> |
|
</span> |
|
</template> |
|
</el-dialog> |
|
<!-- 结果打回弹窗 --> |
|
<el-dialog v-model="dialogReturn" title="结果驳回" width="40%" draggable class="plAllret"> |
|
<el-form |
|
v-loading="repulse" |
|
element-loading-text="正在打回中..." |
|
label-position="top" |
|
label-width="100px" |
|
:model="BatchFrom" |
|
> |
|
<el-form-item label="打回原因"> |
|
<el-input v-model="BatchFrom.txt" type="textarea" :rows="4" /> |
|
</el-form-item> |
|
|
|
<el-form-item label="流转营业部"> |
|
<el-select |
|
v-model="BatchFrom.businessDepartment" |
|
multiple |
|
filterable |
|
default-first-option |
|
:reserve-keyword="false" |
|
placeholder="请选择活动区域" |
|
> |
|
<el-option |
|
v-for="item in warehouseData" |
|
:key="item.value" |
|
:label="item.label" |
|
:value="item.value" |
|
/> |
|
</el-select> |
|
</el-form-item> |
|
</el-form> |
|
<template #footer> |
|
<span class="dialog-footer"> |
|
<el-button @click="dialogReturn = false">取消</el-button> |
|
<el-button type="primary" @click="ConfirmReturn" :disabled="repulse"> 确定 </el-button> |
|
</span> |
|
</template> |
|
</el-dialog> |
|
</el-card> |
|
</template> |
|
<script> |
|
export default { |
|
name: '/aftersales/aftersalesWorkOrderend', |
|
}; |
|
</script> |
|
|
|
<script setup> |
|
import { ElMessage } from 'element-plus'; |
|
import { ElMessageBox } from 'element-plus'; |
|
import { ref, reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue'; |
|
import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //处理方 |
|
import { |
|
$_getInfo, |
|
$_addSubmit, |
|
$_addCompletionEnd, |
|
$_getBusinessDepartmentUser, |
|
$_savaSurveyRecord, |
|
$_addProcessingResults, |
|
$_getSurveyRecord, |
|
$_getAbnormalPackage, |
|
$_getTrackRecord, |
|
$_accounting, |
|
$_getList, |
|
$_batchReturn, |
|
$_getProcessor, |
|
$_updateWorkOrderStatus, |
|
$_updateManagerConfirmed, |
|
$_updateProcessingParty, |
|
$_batchRepulseCompleted, |
|
$_Cancelappeal, |
|
} from '@/api/aftersales/aftersalesWorkOrder'; |
|
import { columnList, recordList } from '@/option/aftersales/vueTvemp.js'; |
|
import { getToken } from '@/utils/auth'; |
|
import { useRoute, useRouter } from 'vue-router'; |
|
import { getDictionaryBiz } from '@/api/system/dict'; |
|
import { computeNumber, isNumber, AddressClosed, deepClone } from '@/utils/util'; |
|
import { compressImageBlob } from '@/components/IMGcompressor/imgcompressor.js'; |
|
import { useStore } from 'vuex'; |
|
// 获取vuex仓库 |
|
const $useStore = useStore(); |
|
const identifying = ref(1); //订单类型 |
|
const ZFdialog = ref(false); //支付方式弹出 |
|
const $route = useRoute(); |
|
|
|
const $router = useRouter(); |
|
|
|
const Paymentmethod = ref([]); //支付方式 |
|
const ZFname = ref(''); //支付名字预留状态 |
|
const routeData = ref(false); //路由参数 |
|
const groundlineType = ref(''); //责任方状态 |
|
const routerState = ref(''); //路由状态 |
|
const TotalamountCompensation = ref(0); //赔款金额合计 |
|
const fileDom = ref(null); //文件上传节点 |
|
const personResponsibleList = ref([]); //责任人列表 |
|
const msgHight = ref(100); //聊天框消息高度 |
|
const msgTop = ref(10); //聊天框吸顶距离 |
|
const paymentUnit = ref(''); //支付单位 |
|
const scrollContainer = ref(null); //客服实例 |
|
const KFfeel = ref([]); //附件链接 |
|
const MessageResponsibility = ref([]); //消息的处理方选择 |
|
const separateMessageResponsibility = ref([]); //消息的处理方单独选择 |
|
const Msgtextarea = ref(''); //回复框消息 |
|
const ruleFormRef = ref(null); //表单实例 |
|
const msgState = ref(0); //回复消息状态 |
|
const Msgloading = ref(false); //消息回复的加载效果 |
|
const companyProportion = ref(0); //公司占比 |
|
const HistoricalPackageList = ref([]); //历史包件数组 |
|
const dialogHistoricalPackage = ref(false); //包件弹窗 |
|
const HistoricalPackageinput = ref(''); //历史包件选择 |
|
const UserPermissions = ref(''); //操作权限 |
|
const ReasonarbClass = ref(false); |
|
const accountingLodading = ref(false); //财务是否处理 |
|
const accountingValue = ref(''); //财务处理结果 |
|
const accountingID = ref(); //财务处理当id前值 |
|
const dialogImgList = ref(false); //图片预览弹窗 |
|
const amplifyurl = ref(''); //当前点击的图片 |
|
const amplifysrcList = ref([]); //图片循环列表 |
|
const Replycopy = ref([]); //拷贝一份回复方 |
|
const Mydata = ref(); //当前登录人信息 |
|
const DiscoveringNodes = ref([]); //发现节点 |
|
const IndexException = ref([]); //异常类型 |
|
const Pageloading = ref(false); //页面加载load |
|
const TotalClaimAmount = ref(0); //理赔总金额 |
|
const TotalamountReceived = ref(0); //收款金额合计 |
|
const dialogReturn = ref(false); |
|
const repulse = ref(false); |
|
const BatchFrom = ref({}); |
|
const userInfo = ref({}); //用户信息 |
|
const ruleForm = reactive({ |
|
reason: [{ required: true, message: '请填写原因', trigger: ['blur', 'change'] }], |
|
warehouseId: [{ required: true, message: '请选择仓库', trigger: ['blur', 'change'] }], |
|
}); |
|
const getRuleswarehouse = item => { |
|
return item.state == 0 ? ruleForm.warehouseId : []; |
|
}; |
|
|
|
const getRulesreason = item => { |
|
// 根据 item.state 动态返回规则 |
|
return item.state == 0 ? ruleForm.reason : []; |
|
}; |
|
const PackageInfo = ref([ |
|
//包件信息 |
|
{ packageCode: '', orderCode: '', waybillNumber: '' }, |
|
]); |
|
// 提货责任方 |
|
const responsible = ref([ |
|
{ |
|
value: '1', |
|
label: '工厂', |
|
}, |
|
{ |
|
value: '2', |
|
label: '外包搬运', |
|
}, |
|
{ |
|
value: '3', |
|
label: '物流', |
|
}, |
|
]); |
|
const endFrom = ref({ |
|
packageImage: [ |
|
//图片 |
|
], |
|
videoUrl: {}, //视频 |
|
result: [], |
|
}); |
|
const viodUrl = ref({}); |
|
const videoUrl = ref(null); //视频预览 |
|
const VideoPreviewStatus = ref(false); //视频预览状态 |
|
const Paymentmethodoptions = ref([]); //支付方式下拉菜单 |
|
const warehouseData = ref([]); //处理方 |
|
|
|
const MessageContent = ref([]); |
|
const CompensationParty = ref([ |
|
{ |
|
name: '', |
|
state: 0, |
|
num: 0, |
|
reason: '', |
|
cld: 1, |
|
warehouseId: '', |
|
compensationPersonnel: '', |
|
button: false, |
|
warehouseIdcheck: false, //仓库校验 |
|
reasoncheck: false, //原因校验 |
|
}, //赔款方 |
|
// explains: '' |
|
{ |
|
name: '', |
|
state: 1, |
|
num: 0, |
|
reason: '', |
|
cld: 1, |
|
warehouseId: '', |
|
compensationPersonnel: '', |
|
button: true, |
|
}, //受款方 |
|
// explains: '' |
|
]); //收/赔 |
|
const ProcessingList = ref([]); //处理结果已经选择的列表 |
|
// 责任方列表 |
|
const FangAddList = ref([ |
|
{ |
|
businessName: '', |
|
personResponsibleName: '', |
|
responsibilityRatio: '', |
|
description: '', |
|
tripartite: '', |
|
}, |
|
]); |
|
const TransportlossList = ref([ |
|
//运损发现节点 |
|
]); //运损发现节点 |
|
const ProcessingResults = ref([]); //处理结果列表选项 |
|
// 运损触发事件 |
|
const details = reactive({ |
|
/** 是否开启搜索 */ |
|
search: false, |
|
/** 表格搜索条件 */ |
|
query: {}, |
|
/** 时间快捷选择设置 */ |
|
shortcuts: [ |
|
{ |
|
text: '最近一周', |
|
value: () => { |
|
const end = new Date(); |
|
const start = new Date(); |
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); |
|
return [start, end]; |
|
}, |
|
}, |
|
{ |
|
text: '最近一个月', |
|
value: () => { |
|
const end = new Date(); |
|
const start = new Date(); |
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); |
|
return [start, end]; |
|
}, |
|
}, |
|
{ |
|
text: '最近三个月', |
|
value: () => { |
|
const end = new Date(); |
|
const start = new Date(); |
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); |
|
return [start, end]; |
|
}, |
|
}, |
|
], |
|
/** 列表 */ |
|
columnList: deepClone(columnList), |
|
|
|
/** 列表数据 */ |
|
data: [], |
|
// 处理记录 |
|
recordList: deepClone(recordList), |
|
// 处理记录数据 |
|
recorddata: [], |
|
/** 页面loading */ |
|
loadingObj: { |
|
/** 列表加载loading */ |
|
list: false, |
|
packageListLoading: false, |
|
}, |
|
/** 列表复选框选中的数据 */ |
|
selectionList: [], |
|
/** 是否显示设置表格 */ |
|
drawerShow: false, |
|
/** 分页参数 */ |
|
page: { |
|
currentPage: 1, |
|
pageSize: 5, |
|
total: 0, |
|
}, |
|
|
|
/** 弹出层显示 */ |
|
popUpShow: { |
|
/** 包件明细 */ |
|
packageOrderListlVisited: false, |
|
/** 二维码 */ |
|
QRCodeVisible: false, |
|
/** 修改客户信息 */ |
|
editClientInfoVisible: false, |
|
}, |
|
/** 列表Dom节点 */ |
|
listNode: '', |
|
form: {}, |
|
/** 全屏 */ |
|
fullscreenObj: { |
|
/** 包明细 */ |
|
packageOrderListlVisited: false, |
|
}, |
|
}); |
|
const Useridentity = { |
|
Warehouse_customer_service: '仓库客服', |
|
Headquarters_customer_service: '总部客服', |
|
Headquarters_Manager: '总部客服经理', |
|
}; |
|
const warehouseIdState = ref(false); //当前订单仓库状态 |
|
// 字典公共函数 |
|
async function updateDictionary(targetArray, dictionaryType) { |
|
await getDictionaryBiz(dictionaryType).then(res => { |
|
console.log(res, '字典'); |
|
res.data.data.forEach(item => { |
|
targetArray.push({ |
|
value: item.dictKey, |
|
label: item.dictValue, |
|
}); |
|
}); |
|
}); |
|
} |
|
|
|
//完结展示权限 |
|
const Completedsubmission = () => { |
|
if (UserPermissions.value == Useridentity.Warehouse_customer_service && endFrom.value.arbitrate) { |
|
return true; |
|
} |
|
|
|
if ( |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
return true; |
|
} |
|
return false; |
|
}; |
|
const CompletedPresentation = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['30'].includes($route.query.workOrderStatus)) { |
|
return false; |
|
} |
|
} |
|
return true; |
|
}; |
|
// 处理结果提交权限 |
|
const Submissionresults = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Warehouse_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['10', '20'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 处理结果保存权限 |
|
const Saveresults = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Warehouse_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['10', '20'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 处理结果编辑提交 |
|
const Processingresultmodification = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Warehouse_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['90', '21'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
|
|
// 客服仲裁完结 |
|
const Arbitrationcompleted = () => { |
|
return false |
|
if ( |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
//总部客服、总部客服经理 |
|
if ($route.query.workOrderStatus == '10') { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 处理结果是否可以填写 |
|
|
|
const Processingresultdisabled = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Warehouse_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['10', '20', '90'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 修改提交权限 |
|
const isInformationEditing = () => { |
|
if (UserPermissions.value == Useridentity.Warehouse_customer_service && warehouseIdState.value) { |
|
// 仓库客服 |
|
if (['10', '20', '90'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 完结审核打回权限 |
|
const isRepulse = () => { |
|
if (UserPermissions.value == Useridentity.Headquarters_Manager) { |
|
// 总部客服经理 |
|
if (['40', '80'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 完结待审核确定权限 |
|
const isProcessingConfirmation = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['40'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 完结提交权限 |
|
const Headquarterscompletion = () => { |
|
if ( |
|
UserPermissions.value == Useridentity.Headquarters_customer_service || |
|
UserPermissions.value == Useridentity.Headquarters_Manager |
|
) { |
|
if (['30'].includes($route.query.workOrderStatus)) { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
//申诉驳回 |
|
const AppealRejectionButton = () => { |
|
if (UserPermissions.value == Useridentity.Headquarters_Manager) { |
|
if ($route.query.typesOf == '0') { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 申诉成立 |
|
const AppealEstablishmentButton = () => { |
|
if (UserPermissions.value == Useridentity.Headquarters_Manager) { |
|
if ($route.query.typesOf == '0') { |
|
return true; |
|
} |
|
} |
|
return false; |
|
}; |
|
// 权限按钮 |
|
const PermissionButton = computed(() => ({ |
|
Headquarters_completion: Headquarterscompletion(), |
|
Completed_submission: Completedsubmission(), //完结信息查看 |
|
Completed_presentation: CompletedPresentation(), //完结输入框禁止/展示 |
|
Submission_results: Submissionresults(), //处理结果提交 |
|
Save_results: Saveresults(), //处理结果保存 |
|
Arbitration_completed: Arbitrationcompleted(), //客服仲裁完结 |
|
Processing_result_modification: Processingresultmodification(), //处理结果编辑提交 |
|
Processing_result_disabled: Processingresultdisabled(), //处理结果是否可以填写 |
|
information_editing: isInformationEditing(), //修改提交 |
|
repulse: isRepulse(), //完结审核打回 |
|
Processing_confirmation: isProcessingConfirmation(), // 待审核确定 |
|
Appeal_rejection_button: AppealRejectionButton(), //申诉驳回 |
|
Appeal_establishment_button: AppealEstablishmentButton(), //申诉成立 |
|
})); |
|
|
|
// 页面初始化数据 |
|
const onLoad = async () => { |
|
Pageloading.value = true; //开启页面加载 |
|
if (localStorage.getItem('my_data')) { |
|
Mydata.value = JSON.parse(localStorage.getItem('my_data')); //获取本地仓库信息 |
|
} |
|
updateDictionary(IndexException.value, 'pc_work_order'); //异常类型 |
|
updateDictionary(DiscoveringNodes.value, 'pc_discovery_node'); //发现环节 |
|
updateDictionary(Paymentmethodoptions.value, 'payment_method'); //支付方式 |
|
getDictionaryBiz('result_handling').then(res => { |
|
ProcessingResults.value = res.data.data; |
|
}); //处理结果 |
|
// 获取角色权限 |
|
getDictionaryBiz('after_sales_visits') |
|
.then(async res => { |
|
console.log(res, '角色字典'); |
|
// 获取用户角色信息,并拆分为数组 |
|
const roleNames = JSON.parse(localStorage.getItem('TWMS-userInfo')).content.role_name.split( |
|
',' |
|
); |
|
// 根据角色名称查找匹配项目 |
|
const matchingItem = res.data.data.find(item => roleNames.includes(item.dictValue)); |
|
if (matchingItem) { |
|
UserPermissions.value = matchingItem.dictValue; |
|
} else { |
|
UserPermissions.value = '仓库客服'; |
|
} |
|
console.log(UserPermissions.value, '当前角色权限'); |
|
Chathistory(); //聊天的历史记录 |
|
// 获取页面参数 |
|
if ($route.query.id) { |
|
let userInfo = await JSON.parse(localStorage.getItem('TWMS-userInfo')); //获取当然登录人信息 |
|
console.log($route.query); |
|
routerState.value = $route.query.RouterState; //当前是新增记录 |
|
console.log(routerState.value, '当前状态'); |
|
$_getInfo({ id: $route.query.id }).then(res => { |
|
console.log(res, '回显返回值参数'); |
|
endFrom.value = res.data.data; |
|
console.log(endFrom.value, '存储起来的参数'); |
|
endFrom.value.result = []; |
|
endFrom.value.processor = []; |
|
endFrom.value.packageImage = []; |
|
if (res.data.data.createUser == userInfo.content.user_id) { |
|
// 判断订单是否是当前登陆人发起的,用于修改订单信息(必须是待处理) |
|
warehouseIdState.value = true; |
|
} else { |
|
warehouseIdState.value = false; |
|
} |
|
//订单类型赋值 |
|
identifying.value = res.data.data.identifying; |
|
//图片处理回显 |
|
if (res.data.data.discoveryNode == '1') { |
|
groundlineType.value = '1'; |
|
} else { |
|
groundlineType.value = 'null'; |
|
} |
|
res.data.data.decreaseImageVOList.forEach(res => { |
|
amplifysrcList.value.push(res.imagePath); |
|
endFrom.value['packageImage'].push({ |
|
name: res.imageName, |
|
url: res.imagePath, |
|
}); |
|
}); |
|
// 包件回显 |
|
PackageInfo.value = res.data.data.abnormalPackageVOList; |
|
console.log(PackageInfo.value, ' PackageInfo.value'); |
|
|
|
PackageInfo.value[0].packageCode ? (identifying.value = 1) : (identifying.value = 2); |
|
// 要修改 |
|
// 责任方回显 |
|
FangAddList.value = res.data.data.processorVOList |
|
.filter(item => item && item.typesOf && item.typesOf === '1') |
|
.map(item => { |
|
return { businessName: item.businessId }; |
|
}); |
|
// 干线卸车责任方回显 |
|
if (res.data.data.discoveryNode == '3') { |
|
endFrom.value.processorEntityList = []; |
|
res.data.data.processorVOList.forEach(item => { |
|
if (item) { |
|
if (item.typesOf == '1') { |
|
// 责任方回显 |
|
endFrom.value.processorEntityList.push(item.businessId); |
|
} |
|
} |
|
}); |
|
} |
|
|
|
if (res.data.data.personResponsibleVOS?.length) { |
|
let factorydata = res.data.data.personResponsibleVOS.find(item => item.typesOf); |
|
if (factorydata && factorydata.typesOf) { |
|
groundlineType.value = true; //切换处理方模式 |
|
} |
|
FangAddList.value = res.data.data.personResponsibleVOS.map(res => { |
|
console.log(groundlineType.value, '当前责任方状态'); |
|
return { |
|
businessName: res.businessName, //责任方ID |
|
personResponsibleName: res.personResponsibleName, //责任人名称 |
|
responsibilityRatio: res.responsibilityRatio, //占比 |
|
description: res.description, //说明 |
|
tripartite: res.tripartite, //三方责任人 |
|
}; |
|
}); |
|
} |
|
|
|
if (res.data.data.processorVOList?.length) { |
|
// 要修改 |
|
res.data.data.processorVOList.forEach(item => { |
|
if (item) { |
|
if (item.typesOf == '2') { |
|
// 处理方 |
|
endFrom.value.processor.push(item.businessId); |
|
MessageResponsibility.value.push(item.businessId); |
|
Replycopy.value.push(item.businessId); //拷贝一份要回复的 |
|
} |
|
} |
|
}); |
|
} |
|
|
|
console.log(JSON.parse(localStorage.getItem('my_data')).id); |
|
if (UserPermissions.value == '仓库客服') { |
|
if (localStorage.getItem('my_data')) { |
|
MessageResponsibility.value.push(JSON.parse(localStorage.getItem('my_data')).id); |
|
// MessageResponsibility.value = MessageResponsibility.value.filter( |
|
// item => item !== JSON.parse(localStorage.getItem('my_data')).id |
|
// ); //过滤掉当前登录人的仓库 |
|
} |
|
MessageResponsibility.value = [...new Set(MessageResponsibility.value)]; //对回复方去重 |
|
} |
|
|
|
// 公司占比回显计算 |
|
let sum = 0; |
|
if (FangAddList.value.length) { |
|
// FangAddList.value.forEach(item => { |
|
// if (item.responsibilityRatio) { |
|
// item.responsibilityRatio = item.responsibilityRatio.replace(/%/g, ''); |
|
// sum = Number(item.responsibilityRatio) + sum; |
|
// } |
|
// }); |
|
// FangAddList.value.forEach(item => { |
|
// item.responsibilityRatio = item.responsibilityRatio |
|
// ? item.responsibilityRatio + '%' |
|
// : item.responsibilityRatio; |
|
// }); |
|
} |
|
// companyProportion.value = 100 - sum; |
|
// 处理结果回显 |
|
if (res.data.data.processingResultsVO.processingMoneyEntityList) { |
|
ProcessingList.value = res.data.data.processingResultsVO.processingMoneyEntityList.map( |
|
item => { |
|
endFrom.value.result.push(item.resultType); |
|
return { |
|
title: item.resultTypeName, //标题 |
|
money: Number(item.money), //金额 |
|
paymentUnit: item.paymentUnit, //支付单位 |
|
compensationTime: item.compensationTime, //理赔时间 |
|
compensationMethod: item.compensationMethod, //支付方式Value |
|
compensationMethodName: item.compensationMethodName, //支付方式lable |
|
resultName: item.resultName, //处理方式lable |
|
resultType: item.resultType, //处理方式Value |
|
typesOf: 1, //固定参数 |
|
Paymentmethod: [...JSON.parse(JSON.stringify(Paymentmethodoptions.value))], |
|
}; |
|
} |
|
); |
|
} |
|
// 总金额回显 |
|
TotalClaimAmount.value = res.data.data.processingResultsVO.money; |
|
// 处理结果说明回显 |
|
endFrom.value.resultDescription = res.data.data.processingResultsVO.resultDescription; |
|
|
|
// 赔款方 |
|
if (res.data.data.completionRecordEntities.length) { |
|
CompensationParty.value = []; |
|
res.data.data.completionRecordEntities.forEach((item, index) => { |
|
TotalamountCompensation.value += Number(item.money); |
|
CompensationParty.value.push({ |
|
state: 0, //状态 |
|
num: item.money, //金额 |
|
name: item.indemnitor, //受款方名字 |
|
reason: item.reason, //受款方原因 |
|
cld: index + 1, |
|
id: item.id, |
|
accounting: item.accounting ? item.accounting : '', |
|
warehouseId: item.warehouseId, //仓库 |
|
compensationPersonnel: item.compensationPersonnel, //赔款人员 |
|
button: !index ? false : true, |
|
}); |
|
}); |
|
} |
|
// 完结信息回显 |
|
// 受款方 |
|
if (res.data.data.completionRecipientEntityList.length) { |
|
res.data.data.completionRecipientEntityList.forEach((item, index) => { |
|
TotalamountReceived.value += Number(item.money); |
|
CompensationParty.value.push({ |
|
state: 1, //状态 |
|
num: item.money, //金额 |
|
name: item.recipient, //受款方名字 |
|
reason: item.reasonReceivingPayment, //受款方原因 |
|
warehouseId: item.warehouseId, //仓库 |
|
cld: index + 1, |
|
id: item.id, |
|
button: true, |
|
}); |
|
}); |
|
} |
|
|
|
endFrom.value.arbitrate = res.data.data.reasonArbitration; //完结说明 |
|
Pageloading.value = false; |
|
}); |
|
} |
|
console.log(endFrom.value, '表单信息'); |
|
await getDeptWarehouse({}).then(res => { |
|
// 验证本地仓库用于回复选择,自己不能选择自己仓库 |
|
console.log(res, '处理方'); |
|
console.log(localStorage.getItem('WarehouseName'), '当前本地仓库'); |
|
res.data.data.forEach(item => { |
|
warehouseData.value.push({ |
|
value: item.id, |
|
label: item.name, |
|
disabled: item.name == localStorage.getItem('WarehouseName'), |
|
}); |
|
}); |
|
}); |
|
}) |
|
.catch(error => { |
|
console.log(error, 'error'); |
|
Pageloading.value = false; |
|
}); |
|
}; |
|
onMounted(() => { |
|
watch( |
|
$route.fullPath, |
|
(newRoute, oldRoute) => { |
|
if (oldRoute) { |
|
console.log(newRoute, 'newRoute'); |
|
console.log(oldRoute, 'oldRoute'); |
|
|
|
if (newRoute.fullPath === oldRoute.fullPath) { |
|
console.log('当前页面和上一个页面相同'); |
|
} else { |
|
console.log('当前页面和上一个页面不同'); |
|
onLoad(); |
|
} |
|
} else { |
|
console.log('这是初始渲染,没有上一个页面'); |
|
onLoad(); |
|
} |
|
}, |
|
{ immediate: true, deep: true } |
|
); |
|
}); |
|
|
|
// 获取初始化数据 |
|
|
|
// 文件识别 |
|
const Fileidentifier = val => { |
|
if (val) { |
|
const url = val; |
|
// 获取文件名 |
|
const fileName = url.substring(url.lastIndexOf('/') + 1); |
|
// 获取文件扩展名 |
|
const extension = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase(); |
|
|
|
// 判断文件类型 |
|
if (extension === 'mp4') { |
|
return 'mp4'; |
|
} |
|
if (extension === 'png' || extension === 'jpg' || extension === 'jpeg') { |
|
return 'image'; // 可以将 'png' 改为 'image' 来统一表示图片类型 |
|
} |
|
if (extension === 'docx') { |
|
return 'docx'; |
|
} |
|
|
|
// 针对其他扩展名的情况返回 undefined |
|
return undefined; |
|
} |
|
}; |
|
// 聊天记录获取 |
|
// 聊天记录获取 |
|
const Chathistory = res => { |
|
Msgloading.value = true; //开启加载效果 |
|
// MessageResponsibility.value = []; //清空选择内容 |
|
Msgtextarea.value = ''; //清空输入框消息 |
|
MessageContent.value = []; //先清空内容,防止内容重复叠加 |
|
|
|
// const updateMessageContent = (records, identifying) => { |
|
// records.forEach(item => { |
|
// const filetype = Fileidentifier(item.pictureUrl); |
|
// console.log(filetype, '文件类型'); |
|
|
|
// MessageContent.value.push({ |
|
// time: item.createTime, //时间 |
|
// content: item.processingResults, //消息内容 |
|
// name: item.addDepartment, //营业部名称 |
|
// username: item.processorName, //用户名 |
|
// img: filetype === 'png' ? item.pictureUrl : '', |
|
// file: filetype === 'docx' ? item.pictureUrl : '', |
|
// mp4: filetype === 'mp4' ? item.pictureUrl : '', |
|
// imgList: [filetype === 'png' ? item.pictureUrl : ''], |
|
// difference: item.difference, |
|
// identifying: identifying, //是否显示待回复按钮 |
|
// }); |
|
// }); |
|
// console.log( MessageContent.value,' MessageContent.value'); |
|
|
|
// setTimeout(() => { |
|
// const container = scrollContainer.value; |
|
// if (container) { |
|
// container.scrollTop = container.scrollHeight; |
|
// } |
|
// }, 0); |
|
// }; |
|
const updateMessageContent = (records, identifying) => { |
|
records.forEach(item => { |
|
const filetype = Fileidentifier(item.pictureUrl); |
|
console.log(filetype, '文件类型'); |
|
|
|
// 处理图片列表,根据分隔符(假设是 ';')拆分 |
|
let imgList = []; |
|
if (filetype === 'image') { |
|
// 如果包含多个图片URL,拆分处理 |
|
if (item.pictureUrl.includes(',')) { |
|
imgList = item.pictureUrl.split(',').filter(url => url.trim() !== ''); |
|
} else { |
|
// 单个图片的情况 |
|
imgList = [item.pictureUrl]; |
|
} |
|
} |
|
|
|
// 构造消息内容 |
|
MessageContent.value.push({ |
|
time: item.createTime, // 时间 |
|
content: item.processingResults, // 消息内容 |
|
name: item.addDepartment, // 营业部名称 |
|
username: item.processorName, // 用户名 |
|
img: imgList.length > 0 ? imgList[0] : '', // 只显示第一个图片(如果有多个) |
|
file: filetype === 'docx' ? item.pictureUrl : '', |
|
mp4: filetype === 'mp4' ? item.pictureUrl : '', |
|
imgList: imgList, // 包含所有图片的列表 |
|
difference: item.difference, |
|
identifying: identifying, // 是否显示待回复按钮 |
|
}); |
|
}); |
|
|
|
console.log(MessageContent.value, 'MessageContent.value'); |
|
|
|
// 滚动到容器底部 |
|
setTimeout(() => { |
|
const container = scrollContainer.value; |
|
if (container) { |
|
container.scrollTop = container.scrollHeight; |
|
} |
|
}, 0); |
|
}; |
|
const handleError = error => { |
|
console.log(error, 'error'); |
|
}; |
|
|
|
const handleFinally = () => { |
|
Msgloading.value = false; //关闭加载效果 |
|
}; |
|
|
|
if (UserPermissions.value !== '仓库客服') { |
|
console.log(UserPermissions.value, '当前不是仓库客服'); |
|
$_getTrackRecord({ id: $route.query.id }) |
|
.then(res => { |
|
console.log(res, 'res调查记录'); |
|
updateMessageContent(res.data.data.surveyRecordEntities, false); |
|
console.log(res, '聊天记录'); |
|
}) |
|
.catch(handleError) |
|
.finally(handleFinally); |
|
} else { |
|
$_getSurveyRecord({ id: $route.query.id }) |
|
.then(res => { |
|
console.log(res, '聊天返回值'); |
|
const processorVOList = res.data.data.processorVOList; |
|
if (processorVOList && processorVOList.length) { |
|
msgState.value = processorVOList[0].processingStatus; //获取聊天状态 |
|
} |
|
updateMessageContent(res.data.data.surveyRecordEntities, true); |
|
console.log(res, '聊天记录'); |
|
}) |
|
.catch(handleError) |
|
.finally(handleFinally); |
|
} |
|
}; |
|
// 页面初始化 |
|
onMounted(() => { |
|
msgHight.value = window.innerHeight * 0.76; |
|
console.log(msgHight.value, '处理好的页面高度'); |
|
msgTop.value = window.innerHeight * 0.1; |
|
// 滚动到最后 |
|
setTimeout(() => { |
|
const container = scrollContainer.value; |
|
if (container) { |
|
container.scrollTop = container.scrollHeight; |
|
} |
|
}, 0); |
|
}); |
|
// 处理结果事件 |
|
const changeProcessingResults = value => { |
|
// 重置总金额 |
|
TotalClaimAmount.value = 0; |
|
// 重置循环列表 |
|
ProcessingList.value = []; |
|
console.log(value, 'value'); |
|
if (value.length) { |
|
let data = []; |
|
value.forEach(item => { |
|
let _data = ProcessingResults.value.find(res => res.dictKey == item); |
|
if (_data) { |
|
data.push(_data); |
|
} |
|
}); |
|
if (data && data.length) { |
|
data.forEach(item => { |
|
ProcessingList.value.push({ |
|
title: item.dictValue, //标题 |
|
money: 0, //金额 |
|
paymentUnit: '', //支付单位 |
|
compensationTime: '', //理赔时间 |
|
compensationMethod: '', //支付方式Value |
|
compensationMethodName: '', //支付方式lable |
|
resultName: '', //处理方式lable |
|
resultType: '', //处理方式Value |
|
typesOf: 1, //固定参数 |
|
Paymentmethod: [...JSON.parse(JSON.stringify(Paymentmethodoptions.value))], |
|
}); |
|
}); |
|
} |
|
console.log(ProcessingList.value, '处理好的值'); |
|
} |
|
}; |
|
|
|
const displaySettings = computed(() => { |
|
const discoveryNode = endFrom.value.discoveryNode; |
|
const includesDiscoveryNode = values => values.includes(discoveryNode); |
|
return { |
|
trainNumber: includesDiscoveryNode(['3', '5', '7', '6']), //车次号 |
|
deliveryTime: includesDiscoveryNode(['5', '7', '6']), //配送时间 |
|
deliveryDriver: includesDiscoveryNode(['5', '7', '6']), //配送司机 |
|
vehicleRoute: includesDiscoveryNode(['3']), //车辆线路 |
|
deliverGoodsTime: includesDiscoveryNode(['2']), //发货时间 |
|
warehousingTime: includesDiscoveryNode(['4']), //入库时间 |
|
discoveryTime: includesDiscoveryNode(['4', '5', '6', '7']), //发现时间 |
|
processorEntityList: includesDiscoveryNode(['3']), //干线卸车责任方 |
|
waybillMall: true, //运单商场 |
|
typeServiceName: true, //合作模式 |
|
processor: true, //处理方 |
|
investigationProcess: true, //调查经过 |
|
}; |
|
}); |
|
|
|
// 配款方数量 |
|
const CompensationNum = computed(() => { |
|
let sum = CompensationParty.value.filter(res => { |
|
return !res.state; |
|
}); |
|
return sum.length; |
|
}); |
|
|
|
// 受款方数量 |
|
const PayeeNum = computed(() => { |
|
let sum = CompensationParty.value.filter(res => { |
|
return res.state; |
|
}); |
|
return sum.length; |
|
}); |
|
//处理方 |
|
const ProcessingParty = val => { |
|
console.log(endFrom.value.processor); |
|
}; |
|
// 图片上传必须携带TOKEN |
|
const headers = computed(() => { |
|
return { 'Blade-Auth': 'Bearer ' + getToken() }; |
|
}); |
|
// 图片上传接口 |
|
const doubledCount = computed(() => { |
|
return '/api/blade-resource/oss/endpoint/put-file'; |
|
}); |
|
// 图片上传成功回调函数 |
|
const ImgSuccess = (response, uploadFile) => { |
|
if (response.success == true) { |
|
console.log(response); |
|
console.log(endFrom.value['packageImage'], '图片列表'); |
|
} |
|
}; |
|
|
|
// 附件上传成功 |
|
const fellSuccess = (response, uploadFile) => { |
|
console.log('上传成功'); |
|
console.log(response, uploadFile); |
|
if (response.data.link) { |
|
KFfeel.value.push(response.data.link); |
|
console.log(KFfeel.value, '已经上传的附件地址'); |
|
} |
|
}; |
|
|
|
// 视频上传成功 |
|
const ViodSuccess = response => { |
|
if (response.success == true) { |
|
console.log(response, '视频上传成功'); |
|
console.log(videoUrl.value, '预览视频添加前'); |
|
videoUrl.value = response.data.link; //放入预览视频中 |
|
console.log(videoUrl.value, '预览视频添加后'); |
|
viodUrl.value = { nmae: response.data.originalName, url: response.data.link }; |
|
console.log(viodUrl.value, '视频对象'); |
|
} |
|
}; |
|
// 上传图片规则 |
|
const beforeAvatarUpload = async rawFile => { |
|
if (!/^image\/(png|jpeg|gif)$|^video\/mp4$/.test(rawFile.type)) { |
|
ElMessage.error('上传格式只支持 png、jpeg、gif、image 和 mp4 类型!'); |
|
return false; |
|
} else if (rawFile.size / 1024 / 1024 > 40) { |
|
ElMessage.error('上传大小不能超过 40MB!'); |
|
return false; |
|
} |
|
const res = await compressImageBlob(rawFile); |
|
return res; |
|
}; |
|
// 点击图片列表回调 |
|
const pictureList = val => { |
|
dialogImgList.value = true; |
|
amplifyurl.value = val.url; |
|
console.log(val, '图片列表'); |
|
}; |
|
|
|
// 点击图片移除 |
|
const ImgListRemove = val => { |
|
console.log(val, '移除图片'); |
|
}; |
|
// 查看已上传视频列表 |
|
const Clickviod = () => { |
|
console.log('点击了预览'); |
|
VideoPreviewStatus.value = true; //开启预览视频弹窗 |
|
}; |
|
// 添加赔款方 |
|
const AddCompensation = () => { |
|
let data = { |
|
state: 0, //赔款方 |
|
warehouseId: '', //仓库 |
|
reason: '', //原因 |
|
num: 0, //金额 |
|
compensationPersonnel: '', //责任人 |
|
button: true, //按钮可移除 |
|
warehouseIdcheck: false, |
|
reasoncheck: false, |
|
}; |
|
CompensationParty.value.splice( |
|
CompensationParty.value.map(item => item.state).lastIndexOf(0) + 1, |
|
0, |
|
data |
|
); |
|
}; |
|
// 添加受款方 |
|
const AddPayee = () => { |
|
let data = { |
|
state: 1, //赔款方 |
|
warehouseId: '', //仓库 |
|
reason: '', //原因 |
|
num: 0, //金额 |
|
compensationPersonnel: '', //责任人 |
|
button: true, //按钮可移除 |
|
}; |
|
|
|
// 找到最后一个状态为假的条目索引 |
|
let lastIndex = CompensationParty.value.reduce((acc, item, index) => { |
|
return item.state === 0 ? index : acc; |
|
}, -1); |
|
|
|
// 在最后一个状态为假的条目后面插入新的数据条目 |
|
CompensationParty.value.splice(lastIndex + 1, 0, data); |
|
}; |
|
|
|
// 总金额计算 |
|
const Totalamount = () => { |
|
TotalClaimAmount.value = parseFloat( |
|
ProcessingList.value |
|
.map(res => res.money) |
|
.reduce((accumulator, currentValue) => accumulator + currentValue, 0) |
|
.toFixed(2) |
|
); |
|
}; |
|
// 移除按钮 |
|
const payremove = (item, index) => { |
|
console.log(item, 'item'); |
|
console.log(index, 'index'); |
|
const cleanedItem = item.state ? '受款方' : '赔款方'; |
|
// 尝试使用 HTML 字符串 |
|
const message = `是否移除当前<span style="color: red; font-weight: bold">${cleanedItem}</span>?`; |
|
ElMessageBox.confirm(message, '提示', { |
|
dangerouslyUseHTMLString: true, // 如果组件支持,启用此选项以解析 HTML |
|
confirmButtonText: '确认', |
|
cancelButtonText: '取消', |
|
type: 'warning', |
|
}) |
|
.then(() => { |
|
CompensationParty.value.splice(index, 1); |
|
amountMoney(); |
|
}) |
|
.catch(() => {}); |
|
}; |
|
// 公司占比计算 |
|
const ProportionInput = val => { |
|
console.log(FangAddList.value, '公司占比'); |
|
let sum = 0; |
|
FangAddList.value.forEach(item => { |
|
sum = Number(item.responsibilityRatio) + sum; |
|
}); |
|
sum = 100 - sum; |
|
companyProportion.value = sum; |
|
console.log(sum, '公司占比'); |
|
}; |
|
|
|
// 财务处理 |
|
const accountingBtn = item => { |
|
accountingLodading.value = true; //开启财务确定弹窗 |
|
accountingID.value = item.id; |
|
console.log(accountingID.value, '当前财务处理的ID'); |
|
}; |
|
const accountingFn = () => { |
|
let data = { |
|
id: accountingID.value, |
|
accounting: accountingValue.value, |
|
}; |
|
console.log(data, '处理好的值'); |
|
$_accounting(data).then(res => { |
|
console.log(res, '财务处理'); |
|
accountingLodading.value = false; //关闭财务确定弹窗 |
|
if (res.data.code) { |
|
ElMessage({ |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
} |
|
onLoad(); |
|
}); |
|
}; |
|
|
|
// 金额输入汇总 |
|
const amountMoney = () => { |
|
// 计算赔款金额总数 |
|
TotalamountCompensation.value = 0; |
|
TotalamountReceived.value = 0; |
|
CompensationParty.value.forEach(item => { |
|
const _num = isNumber(item.num) ? item.num : 0; |
|
// 统计赔款方【0】 |
|
if (item.state == 0) { |
|
TotalamountCompensation.value = computeNumber( |
|
TotalamountCompensation.value, |
|
'+', |
|
_num |
|
).result; |
|
} |
|
// 统计受款方金额【1】 |
|
if (item.state == 1) { |
|
TotalamountReceived.value = computeNumber(TotalamountReceived.value, '+', _num).result; |
|
} |
|
}); |
|
}; |
|
|
|
// 回复消息@事件 |
|
const appoint = val => { |
|
if (val == '@') { |
|
console.log('触发了指定选择'); |
|
} |
|
}; |
|
// 新视频预览 |
|
const AddVideoPreview = val => { |
|
VideoPreviewStatus.value = true; //开启视频查看弹窗 |
|
videoUrl.value = MessageContent.value[val].mp4; |
|
}; |
|
const FileDownload = val => { |
|
console.log(MessageContent.value[val].file, '文件地址'); |
|
}; |
|
// 责任方添加 |
|
const responsibleParty = () => { |
|
FangAddList.value.push({ |
|
businessName: '', |
|
personResponsibleName: '', |
|
responsibilityRatio: '', |
|
description: '', |
|
}); |
|
}; |
|
// 责任移除 |
|
const ResponsibilityRemoval = val => { |
|
FangAddList.value.splice(val, 1); //移除当前点击的按钮 |
|
}; |
|
// 消息责任方选择 |
|
const Msgresponsibility = val => { |
|
MessageResponsibility.value = val; |
|
console.log(MessageResponsibility.value, '已经选择的责任方'); |
|
}; |
|
// 聊天刷新 |
|
const Chatrefresh = () => { |
|
Chathistory(); |
|
}; |
|
// 获取当前责任方的责任人 |
|
const ResponsiblePartychange = (val, index) => { |
|
console.log(val, '选择的责任方'); |
|
FangAddList.value[index].personResponsibleName = null; //清空当前选择的责任人 |
|
$_getBusinessDepartmentUser({ |
|
warehouseId: val, |
|
}).then(res => { |
|
console.log(res, '获取责任人列表'); |
|
personResponsibleList.value = res.data.data; |
|
}); |
|
}; |
|
// 责任人选择 |
|
const personResponsiblechange = (val, index) => { |
|
console.log(val, index); |
|
}; |
|
// 支付方式选择 |
|
const PaymentSelection = val => { |
|
if ($route.query.RouteIndexs == '0' || $route.query.RouteIndexs == '2') { |
|
return; |
|
} |
|
console.log(val, '支付'); |
|
console.log(Paymentmethod.value); |
|
if (val.payment) { |
|
//支付方式回显 |
|
let data = Paymentmethod.value.find(item => item.dictKey == val.payment); |
|
endFrom.value.compensationMethod = data.dictKey; |
|
} else { |
|
endFrom.value.compensationMethod = null; //清空上一次选择 |
|
} |
|
ZFdialog.value = true; //展开支付方式选择弹窗 |
|
ZFname.value = val.name; //存放的当前点击的名字 |
|
}; |
|
|
|
// 处理结果提交 |
|
const submitresults = async value => { |
|
let _title = value == 1 ? '提交' : '保存'; |
|
let _message = `注意信息填写正确!点击确定将<span style="color: red;">${_title}处理结果</span>是否继续?`; |
|
ElMessageBox.confirm(_message, '提示', { |
|
dangerouslyUseHTMLString: true, //启用此选项以解析 HTML |
|
confirmButtonText: '确认', |
|
cancelButtonText: '取消', |
|
type: 'warning', |
|
}) |
|
.then(async () => { |
|
// 处理结果填写 |
|
let data = { |
|
resultIdentification: value == 1 ? '1' : '2', //1为直接提交不需要外部确定,2为保存需要外部确定 |
|
aftersalesProcessingResultsDTO: { |
|
processingMoneyEntityList: [], //处理结果 |
|
}, |
|
}; |
|
// 当选择了处理结果内容才进行处理 |
|
if (endFrom.value.result) { |
|
if (ProcessingList.value?.length) { |
|
//确保循环内容有参数 |
|
ProcessingList.value.forEach(item => { |
|
let _DATA = item.Paymentmethod.find(res => res.value == item.compensationMethod); |
|
data.aftersalesProcessingResultsDTO['processingMoneyEntityList'].push({ |
|
resultType: |
|
ProcessingResults.value.find(res => res.dictValue == item.title)?.dictKey || '', //赔方式的key |
|
resultName: item.title, //处理结果名字 |
|
money: item.money, //金额 |
|
compensationMethod: item.compensationMethod, //支付方式Value |
|
compensationMethodName: _DATA ? _DATA.label : '', //支付方式lable |
|
compensationTime: item.compensationTime, //支付时间 |
|
paymentUnit: item.paymentUnit, //支付付单位 |
|
typesOf: 1, //固定参数 |
|
}); |
|
}); |
|
// 支付方式拼接 |
|
data.aftersalesProcessingResultsDTO.compensationMethod = |
|
data.aftersalesProcessingResultsDTO['processingMoneyEntityList'] |
|
.map(res => res.compensationMethodName) |
|
.join(','); |
|
// 支付单位拼接 |
|
data.aftersalesProcessingResultsDTO.paymentUnit = data.aftersalesProcessingResultsDTO[ |
|
'processingMoneyEntityList' |
|
] |
|
.map(res => res.paymentUnit) |
|
.join(','); |
|
//处理结果说明 |
|
data.aftersalesProcessingResultsDTO.resultDescription = endFrom.value.resultDescription; |
|
// 赔付方式拼接 |
|
data.aftersalesProcessingResultsDTO.resultType = data.aftersalesProcessingResultsDTO[ |
|
'processingMoneyEntityList' |
|
] |
|
.map(res => res.resultName) |
|
.join(','); |
|
// 总金额 |
|
data.aftersalesProcessingResultsDTO.money = TotalClaimAmount.value; |
|
} |
|
} |
|
//异常工单ID |
|
data.aftersalesProcessingResultsDTO.workOrderId = $route.query.id; |
|
//仓库ID |
|
data.aftersalesProcessingResultsDTO.warehouseId = endFrom.value.warehouseId; |
|
//工单ID |
|
data.id = $route.query.id; |
|
if (value == 2) { |
|
data.claimIdentification = '1'; |
|
} |
|
// 提交||保存接口 |
|
Pageloading.value = true; |
|
if (value == 1 || value == 2) { |
|
console.log(data, '要提交的参数'); |
|
$_addProcessingResults(data) |
|
.then(res => { |
|
if (res.data.code == 200) { |
|
ElMessage({ |
|
showClose: true, |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
// 传递要刷新的菜单 |
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrder', status: true }); //要刷新的页面 |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); //要刷新的菜单 |
|
AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 |
|
$router.push('/aftersales/aftersalesWorkOrder'); |
|
} |
|
}) |
|
.catch(error => { |
|
console.log(error, 'error'); |
|
}) |
|
.finally(res => { |
|
Pageloading.value = false; |
|
}); |
|
} else { |
|
data.aftersalesProcessingResultsDTO.id = $route.query.subId; |
|
// 处理结果修改提交 |
|
if (value == 3) { |
|
(data.resultIdentification = 1), //保存提交标识 |
|
delete data.claimIdentification; //删除字段 |
|
} |
|
// 处理结果修改保存 |
|
if (value == 4) { |
|
(data.resultIdentification = 2), //编辑提交标识 |
|
(data.claimIdentification = '1'); //提交到理赔金额 |
|
} |
|
console.log(data, '要提交数据'); |
|
$_addProcessingResults(data).then(res => { |
|
if (res.data.code == 200) { |
|
ElMessage({ |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
|
|
// 传递要刷新的菜单 |
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrder', status: true }); //要刷新的页面 |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); //要刷新的菜单 |
|
$router.push('/aftersales/aftersalesWorkOrder'); |
|
AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 |
|
} |
|
}); |
|
} |
|
}) |
|
.catch(error => { |
|
console.log(error, 'error'); |
|
}); |
|
}; |
|
const warehouseChange = (item, index) => { |
|
if (item.warehouseId) { |
|
item.warehouseIdcheck = false; |
|
} |
|
}; |
|
const reasonChange = (item, index) => { |
|
if (item.reasoncheck) { |
|
item.reasoncheck = false; |
|
} |
|
}; |
|
// 完结信息提交() |
|
const submitCompletion = async () => { |
|
console.log(CompensationParty.value, 'CompensationParty'); |
|
let _flag = CompensationParty.value.filter(item => item.state == 0); |
|
console.log(_flag, '_flag'); |
|
_flag.forEach(item => { |
|
if (!item.warehouseId) { |
|
item.warehouseIdcheck = true; |
|
} |
|
if (!item.reason) { |
|
item.reasoncheck = true; |
|
} |
|
}); |
|
let _result = _flag.every(item => item.warehouseId && item.reason); |
|
console.log(_result, '_result'); |
|
if (!endFrom.value.arbitrate) { |
|
ReasonarbClass.value = true; |
|
} else { |
|
ReasonarbClass.value = false; |
|
} |
|
if (!_result || !endFrom.value.arbitrate) { |
|
ElMessage({ |
|
message: '完结信息必填项未填写完整!', |
|
type: 'warning', |
|
}); |
|
return; |
|
} |
|
|
|
// state:0赔款方 |
|
// state:1受款方 |
|
// let _warehouseId = CompensationParty.value |
|
// .filter(item => item.state === 0) |
|
// .find(res => !res.warehouseId); |
|
// if (_warehouseId) { |
|
// ElMessage({ |
|
// message: `有赔款方未选择仓库`, |
|
// type: 'warning', |
|
// }); |
|
// return; |
|
// } |
|
ElMessageBox.confirm('是否提交完结信息?', '完结', { |
|
confirmButtonText: '确定', |
|
cancelButtonText: '取消', |
|
type: 'warning', |
|
}) |
|
.then(() => { |
|
console.log(CompensationParty.value); |
|
console.log(CompensationParty.value, 'CompensationParty'); |
|
let info = JSON.parse(JSON.stringify(endFrom.value)); //拷贝要提交的数据 |
|
console.log(info, 'info'); |
|
let data = [ |
|
{ |
|
id: $route.query.id, |
|
completionRecipientEntities: [], //受款方 |
|
completionRecordEntities: [], //赔款方 |
|
reasonArbitration: endFrom.value.arbitrate, //完结说明 |
|
}, |
|
]; |
|
console.log('赔款总计金额', TotalamountCompensation.value); |
|
console.log('收款总计金额', TotalamountReceived.value); |
|
if (CompensationParty.value.length) { |
|
CompensationParty.value.forEach(item => { |
|
if (item.state == 0) { |
|
let warehouseName_A = warehouseData.value.find(res => res.value == item.warehouseId); |
|
console.log(warehouseData.value, 'warehouseData.value'); |
|
console.log(item.warehouseId, 'item.warehouseId.value'); |
|
console.log(warehouseName_A, 'warehouseName'); |
|
// 赔款 |
|
data[0]['completionRecordEntities'].push({ |
|
indemnitor: warehouseName_A ? warehouseName_A.label : '', |
|
reason: item.reason, //原因 |
|
money: item.num, //金额 |
|
compensationPersonnel: item.compensationPersonnel, //责任人(手动填写) |
|
warehouseId: item.warehouseId, //赔款方是那个仓库(传入ID) |
|
workOrderId: info.id, //异常工单 |
|
}); |
|
} |
|
if (item.state == 1) { |
|
let warehouseName_B = warehouseData.value.find(res => res.value == item.warehouseId); |
|
// 受款方 |
|
console.log(warehouseName_B); |
|
data[0]['completionRecipientEntities'].push({ |
|
indemnitor: warehouseName_B ? warehouseName_B.label : '', |
|
reasonReceivingPayment: item.reason, //受款原因 |
|
money: item.num, //金额 |
|
responsibleParty: FangAddList.value |
|
.map(aItem => |
|
warehouseData.value |
|
.filter(bItem => bItem.value === aItem.businessName) |
|
.map(match => match.label) |
|
.join(',') |
|
) |
|
.join(','), |
|
warehouseId: item.warehouseId, //赔款方是那个仓库(传入ID) |
|
workOrderNumber: info.workOrderNumber, //工单号 |
|
workOrderId: info.id, //异常工单 |
|
}); |
|
} |
|
}); |
|
} |
|
console.log(data, '处理好的值'); |
|
// 赔款方 |
|
Pageloading.value = true; //开启页面加载 |
|
$_addCompletionEnd(data) |
|
.then(res => { |
|
console.log(res, '完结成功返回值'); |
|
if (res.data.code == 200) { |
|
ElMessage({ |
|
showClose: true, |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
|
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrder', status: true }); //要刷新的页面 |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); //要刷新的菜单 |
|
$router.push('/aftersales/aftersalesWorkOrder'); |
|
AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 |
|
} |
|
}) |
|
.catch(error => { |
|
Pageloading.value = false; //关闭页面加载 |
|
console.log(error, '提交失败'); |
|
}); |
|
}) |
|
.catch(() => {}); |
|
}; |
|
// 消息回复 |
|
const replyMessage = () => { |
|
console.log(KFfeel.value, '附件列表'); |
|
console.log(endFrom.value, 'endFrom.value'); |
|
console.log(endFrom.value.workOrderType, '类型'); |
|
if (!Msgtextarea.value) { |
|
ElMessage({ |
|
message: '请输入回复内容', |
|
type: 'warning', |
|
}); |
|
return; |
|
} |
|
|
|
console.log(MessageContent.value, '当前的聊天记录'); |
|
console.log(warehouseData.value, '参数1212312312312312'); |
|
console.log(MessageResponsibility, '责任方'); |
|
console.log(MessageResponsibility.value, '当前处理方信息'); |
|
console.log(separateMessageResponsibility.value); |
|
|
|
if (!MessageResponsibility.value.length && !separateMessageResponsibility.value.length) { |
|
ElMessage({ |
|
message: '请选择至少一个处理方', |
|
type: 'warning', |
|
}); |
|
return; |
|
} |
|
let msgData = { |
|
processorEntityList: [], |
|
}; //初始化参数 |
|
msgData.surveyRecordDTO = { |
|
content: Msgtextarea.value, //内容' |
|
workOrderId: $route.query.id, //工单ID |
|
pictureUrl: KFfeel.value.join(','), //附件路径 |
|
remark: '', //备注 |
|
}; |
|
|
|
msgData.id = $route.query.id; //异常工单ID |
|
// 责任方处理 MessageResponsibility 已经选择的处理方 |
|
MessageResponsibility.value.forEach(item => { |
|
msgData['processorEntityList'].push({ |
|
businessName: warehouseData.value.find(obj => obj.value == item).label, //名称 |
|
businessId: warehouseData.value.find(obj => obj.value == item).value, //ID |
|
workOrderId: $route.query.id, //异常工单ID |
|
typesOf: 2, //1 责任方 2 处理方 |
|
warehouseId: $route.query.warehouseId, //仓库ID |
|
}); |
|
}); |
|
|
|
console.log(msgData, '处理好的参数'); |
|
$_savaSurveyRecord(msgData).then(res => { |
|
console.log(res, '消息回复成功'); |
|
if (res.data.code == 200) { |
|
Chathistory(); //回复消息成功,调用消息刷新显示最新消息 |
|
fileDom.value.clearFiles(); //清空已上传的文件 |
|
ElMessage({ |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
} |
|
}); |
|
}; |
|
// 下一条跳转 |
|
const Nextjump = res => { |
|
if (res.data) { |
|
if (res.data.data.records.length) { |
|
let dataInfo = res.data.data.records[0]; |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrderend', |
|
query: { |
|
id: dataInfo.id, |
|
name: dataInfo.workOrderNumber + '-回复', |
|
businessId: dataInfo.workOrderNumber, |
|
RouterState: 'determine', |
|
index: '0', |
|
}, |
|
}); |
|
} |
|
} |
|
}; |
|
const EditInformation = () => { |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrdermodify', |
|
query: { |
|
id: $route.query.id, |
|
name: $route.query.workOrderNumber + '-编辑', |
|
businessId: $route.query.businessId, |
|
warehouseId: $route.query.warehouseId, |
|
workOrderNumber: $route.query.workOrderNumber, |
|
RouterState: 'Infoedit', |
|
workOrderStatus: $route.query.workOrderStatus, //当前单子状态 |
|
}, |
|
}); |
|
}; |
|
// 处理方数据公共函数 |
|
const ProcessingPartyFun = val => { |
|
let data = { |
|
...val, |
|
}; |
|
data.current = Nextpage.value; //页码 |
|
data.size = 1; //条数 |
|
$_getProcessor(data).then(res => { |
|
console.log(res, '点击下一条'); |
|
Nextjump(res); |
|
}); |
|
}; |
|
// 页面初始化数据 |
|
const IndexTable = val => { |
|
let data = { |
|
...val, |
|
}; |
|
data.current = Nextpage.value; //页码 |
|
data.size = 1; //条数 |
|
$_getList(data).then(res => { |
|
console.log(res, '点击下一条返回值'); |
|
Nextjump(res); |
|
}); |
|
}; |
|
const Nextpage = ref(0); |
|
// 下一条 |
|
const NextRecord = () => { |
|
Nextpage.value++; |
|
let data = {}; |
|
console.log(UserPermissions.value, '当前登录人身份'); |
|
if (UserPermissions.value == '仓库客服') { |
|
ProcessingPartyFun(data); |
|
} else { |
|
data.workOrderStatus = 50; |
|
IndexTable(data); |
|
} |
|
}; |
|
// 历史包件里面的查看 |
|
const ViewPackageDetails = val => { |
|
if (!val) { |
|
ElMessage({ |
|
message: '请选择要查看的数据', |
|
type: 'warning', |
|
}); |
|
return; |
|
} |
|
console.log(val); |
|
let info = HistoricalPackageList.value.find(obj => obj.workOrderId == val); |
|
console.log(info, '筛选的值'); |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrderInfo', |
|
query: { |
|
id: info.workOrderId, |
|
name: info.workOrderId + '-信息查看', |
|
routerState: 'view', |
|
}, |
|
}); |
|
dialogHistoricalPackage.value = false; //打开历史包件弹窗 |
|
}; |
|
// 处理结果跳转按钮 |
|
const ElProcessingResults = () => { |
|
$router.push({ |
|
path: '', |
|
query: { |
|
id: $route.query.id, |
|
name: $route.query.businessId + '-添加异常记录', |
|
businessId: $route.query.workOrderNumber, |
|
RouterState: 'determine', |
|
RouteIndexs: $route.query.RouteIndexs, |
|
}, |
|
}); |
|
$useStore.commit('DEL_TAG_CURRENT'); |
|
}; |
|
// 客服完结完结 |
|
const CustomerServiceCompleted = () => { |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrdermodify', |
|
query: { |
|
id: $route.query.id, |
|
name: $route.query.businessId + '-客服仲裁完结', |
|
businessId: $route.query.businessId, |
|
warehouseId: $route.query.warehouseId ? $route.query.warehouseId : '', |
|
workOrderNumber: $route.query.workOrderNumber, |
|
RouteIndexs: $route.query.RouteIndexs, |
|
RouterState: 'Kfend', |
|
index: '1', |
|
}, |
|
}); |
|
$useStore.commit('DEL_TAG_CURRENT'); |
|
}; |
|
|
|
// 处理结果打回 |
|
const resultreturnedFun = () => { |
|
BatchFrom.value.businessDepartment = []; |
|
BatchFrom.value.txt = null; |
|
dialogReturn.value = true; |
|
}; |
|
// 处理结果打回确定 |
|
const ConfirmReturn = async () => { |
|
// 批量打回确定按钮 |
|
let data = { |
|
processorList: [], |
|
}; |
|
// 过滤满足条件的对象 |
|
if (BatchFrom.value.businessDepartment.length) { |
|
let foundObjs = warehouseData.value.filter(obj => |
|
BatchFrom.value.businessDepartment.includes(obj.value) |
|
); |
|
data['businessId'] = foundObjs.map(item => item.value).join(','); |
|
data['businessName'] = foundObjs.map(item => item.label).join(','); |
|
// 营业部处理 |
|
foundObjs.forEach(item => { |
|
data['processorList'].push({ id: item.value, name: item.label }); |
|
}); |
|
} |
|
data.reasonReturn = BatchFrom.value.txt; //打回原因 |
|
data.workOrderIds = [$route.query.id]; //异常工单 |
|
console.log(data, '处理好的值'); |
|
data.typesOf = '1'; //普通打回 |
|
repulse.value = true; //开启加载并关闭按钮 |
|
dialogReturn.value = false; //关闭打回弹窗 |
|
await $_batchReturn(data) |
|
.then(res => { |
|
console.log(res, '批量打回返回值'); |
|
if (res.data.code == 200) { |
|
ElMessage({ |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
// 传递要刷新的菜单 |
|
$useStore.commit('EDIT_REFRESHITEM', { title: 'aftersalesWorkOrder', status: true }); //要刷新的页面 |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); //要刷新的菜单 |
|
$router.push('/aftersales/aftersalesWorkOrder'); |
|
AddressClosed('/aftersales/aftersalesWorkOrderend'); //删除当前页面 |
|
} |
|
}) |
|
.catch(error => { |
|
console.log(error, 'error'); |
|
}) |
|
.finally(() => { |
|
repulse.value = false; //关闭加载并关闭按钮 |
|
dialogReturn.value = false; //关闭打回弹窗 |
|
}); |
|
}; |
|
// 完结打回 |
|
const BatchReturn = () => { |
|
ElMessageBox.prompt('请输入打回原因', { |
|
confirmButtonText: '确定', |
|
cancelButtonText: '取消', |
|
inputPattern: /^(?!\s*$).+/, |
|
inputErrorMessage: '内容不能为空哦', |
|
}) |
|
.then(async ({ value }) => { |
|
Pageloading.value = true; |
|
await $_batchRepulseCompleted({ |
|
workOrderIds: [$route.query.id], |
|
reasonReturn: value, |
|
}) |
|
.then(res => { |
|
if (res.data.code == 200) { |
|
ElMessage({ |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
$useStore.commit('EDIT_REFRESHITEM', { |
|
title: 'aftersalesWorkOrder', |
|
status: true, |
|
}); |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); //要刷新的菜单 |
|
$useStore.commit('DEL_TAG_CURRENT'); //关闭当前页面 |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrder', |
|
}); |
|
} |
|
}) |
|
.catch(error => { |
|
console.log(error); |
|
}) |
|
.finally(() => { |
|
Pageloading.value = false; |
|
}); |
|
}) |
|
.catch(() => {}); |
|
}; |
|
// 待审核确认审核(经理审核) |
|
const ResultConfirmation = async () => { |
|
ElMessageBox.confirm('是否确认审核?请注意查验数据正确性!', '提示', { |
|
confirmButtonText: '确认', |
|
cancelButtonText: '取消', |
|
type: 'warning', |
|
}) |
|
.then(async () => { |
|
const data = { |
|
assignList: [$route.query.id], |
|
}; |
|
|
|
if ($route.query.workOrderStatus !== '40') { |
|
ElMessage({ |
|
message: '状态错误', |
|
type: 'warning', |
|
}); |
|
return; |
|
} |
|
|
|
Pageloading.value = true; // 开启页面加载 |
|
|
|
try { |
|
const res = await $_updateManagerConfirmed(data); |
|
if (res.data.code === 200) { |
|
ElMessage({ |
|
message: res.data.msg, |
|
type: 'success', |
|
}); |
|
} |
|
$useStore.commit('EDIT_REFRESHITEM', { |
|
title: 'aftersalesWorkOrder', |
|
status: true, |
|
}); |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); // 要刷新的菜单 |
|
$useStore.commit('DEL_TAG_CURRENT'); // 关闭当前页面 |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrder', |
|
}); |
|
} catch (error) { |
|
console.log('错误信息:', error); |
|
} finally { |
|
Pageloading.value = false; // 关闭页面加载 |
|
} |
|
}) |
|
.catch(() => {}); |
|
}; |
|
|
|
// 申诉驳回 |
|
const AppealRejection = () => { |
|
ElMessageBox.prompt('请填写驳回原因', '提示', { |
|
confirmButtonText: '确定', |
|
cancelButtonText: '取消', |
|
inputPattern: /^(?!\s*$).+/, |
|
inputErrorMessage: '内容不能为空哦', |
|
}) |
|
.then(async ({ value }) => { |
|
try { |
|
let data = { |
|
id: $route.query.workOrderId, //取消申诉ID |
|
typesOf: '2', //申诉状态 |
|
workOrderId: $route.query.id, //异常工单ID |
|
handlingReason: value, //驳回原因 |
|
}; |
|
let _res = await $_Cancelappeal(data); |
|
if (_res.data.code == 200) { |
|
ElMessage({ |
|
message: _res.data.msg, |
|
type: 'success', |
|
}); |
|
$useStore.commit('EDIT_REFRESHITEM', { |
|
title: 'aftersalesWorkOrder', |
|
status: true, |
|
}); |
|
$useStore.commit('Customer_Menu', Number($route.query.RouteIndexs)); //要刷新的菜单 |
|
$useStore.commit('DEL_TAG_CURRENT'); //关闭当前页面 |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrder', |
|
}); |
|
} |
|
} catch (e) { |
|
} finally { |
|
} |
|
}) |
|
.catch(() => {}); |
|
}; |
|
// 申诉成立 |
|
const AppealEstablished = () => { |
|
$router.push({ |
|
path: '/aftersales/aftersalesWorkOrdermodify', |
|
query: { |
|
id: $route.query.id, //这里的id是workOrderId是有申诉列表带入的 |
|
name: $route.query.workOrderNumber + '-申诉编辑', |
|
RouterState: 'Kfend', |
|
workOrderStatus: $route.query.workOrderStatus, //当前单子状态 |
|
Appealeditor: 'appeal', //申诉编辑 |
|
appealID: $route.query.workOrderId, //提交需要的申诉ID |
|
typesOf: $route.query.typesOf, //申诉工单状态0待处理,1成立,2驳回 |
|
}, |
|
}); |
|
}; |
|
</script> |
|
|
|
<style scoped lang="scss"> |
|
.card-header { |
|
display: flex; |
|
justify-content: space-between; |
|
align-items: center; |
|
} |
|
|
|
.text { |
|
font-size: 14px; |
|
} |
|
|
|
.item { |
|
margin-bottom: 18px; |
|
} |
|
|
|
.box-card { |
|
width: 100%; |
|
height: 100%; |
|
} |
|
.el-form { |
|
display: flex; |
|
flex-wrap: wrap; |
|
justify-content: flex-start; |
|
:deep(.el-form-item) { |
|
display: flex; |
|
margin: 0; |
|
.el-select { |
|
width: 100%; |
|
} |
|
} |
|
:deep(.el-form-item__label) { |
|
justify-content: flex-start; |
|
} |
|
:deep(.el-input--prefix) { |
|
width: 100%; |
|
height: 100% !important; |
|
} |
|
} |
|
.el_Transport { |
|
width: 100%; |
|
} |
|
.DingTalk { |
|
width: 100%; |
|
} |
|
.selector { |
|
width: 100%; |
|
:deep(.el-select) { |
|
width: 100%; |
|
} |
|
} |
|
.ProcessingResults { |
|
width: 100%; |
|
min-height: 260px; |
|
border: 1px solid #ccc; |
|
position: relative; |
|
padding: 26px; |
|
box-sizing: border-box; |
|
margin-top: 3%; |
|
color: #606266; |
|
display: flex; |
|
flex-direction: column; |
|
justify-content: space-between; |
|
margin-bottom: 16px; |
|
border-radius: 16px; |
|
box-shadow: 0px 0px 6px 0px #00000029; |
|
.title { |
|
position: absolute; |
|
top: -20px; |
|
left: 20px; |
|
font-size: 26px; |
|
background-color: #fff; |
|
} |
|
.Listadmiration { |
|
display: flex; |
|
flex-wrap: wrap; |
|
margin-top: 26px; |
|
justify-content: space-between; |
|
.name { |
|
display: flex; |
|
margin-bottom: 20px; |
|
height: 30px; |
|
width: 100%; |
|
justify-content: space-between; |
|
span { |
|
display: block; |
|
width: 140px; |
|
color: #606266; |
|
font-size: 16px; |
|
} |
|
} |
|
} |
|
|
|
.lptime, |
|
.ZFlptime { |
|
display: flex; |
|
.name { |
|
width: 10%; |
|
color: #606266; |
|
} |
|
.el-input { |
|
width: auto; |
|
} |
|
:deep(.el-input--prefix) { |
|
width: 200px; |
|
} |
|
} |
|
.ZFlptime { |
|
margin: 10px 0; |
|
} |
|
} |
|
.notes { |
|
width: 100%; |
|
margin-top: 40px; |
|
} |
|
|
|
.upload-demo { |
|
width: 100%; |
|
} |
|
.box-card { |
|
overflow-y: scroll; |
|
} |
|
.void { |
|
margin-top: 10px; |
|
:deep(.el-upload-list) { |
|
display: none; |
|
} |
|
.title { |
|
width: 100px; |
|
} |
|
} |
|
.PreviewVoid { |
|
font-weight: bold; |
|
color: #172e60; |
|
} |
|
|
|
.video-player { |
|
width: 100%; |
|
} |
|
.ProcessingRecords { |
|
margin-top: 20px; |
|
.title { |
|
font-size: 16px; |
|
color: #606266; |
|
width: 100px; |
|
} |
|
:deep(.custom-tabs-label) { |
|
display: flex; |
|
align-items: center; |
|
} |
|
} |
|
.el-row { |
|
height: 300px; |
|
} |
|
:deep(.maboxhi) { |
|
height: 300px !important; |
|
} |
|
.Improveinformation { |
|
margin-top: 32px; |
|
width: 100%; |
|
|
|
:deep(.custom-tabs-label) { |
|
display: flex; |
|
align-items: center; |
|
} |
|
:deep(.selector) { |
|
margin-bottom: 40px; |
|
.is-active { |
|
font-weight: bold; |
|
} |
|
} |
|
.el_pklab { |
|
width: 50px; |
|
} |
|
|
|
.el_pkLi { |
|
width: 96%; |
|
display: flex; |
|
justify-content: flex-start; |
|
} |
|
} |
|
.payanindemnity { |
|
display: flex; |
|
align-items: center; |
|
margin-top: 20px; |
|
justify-content: space-between; |
|
.title { |
|
width: 126px; |
|
height: 100%; |
|
display: flex; |
|
display: block; |
|
align-items: center; |
|
} |
|
.sk_input { |
|
margin: 0 5px; |
|
margin-left: 20px; |
|
width: 20%; |
|
display: flex; |
|
span { |
|
width: 70px; |
|
font-size: 16px; |
|
font-weight: 300; |
|
display: flex; |
|
align-items: center; |
|
justify-content: flex-start; |
|
} |
|
} |
|
.el-button { |
|
border: none; |
|
} |
|
:deep(.el-form-item) { |
|
margin-right: 8px; |
|
} |
|
.payanindemnity_title::before { |
|
content: '*'; |
|
color: #f00; |
|
margin-top: 4px; |
|
position: absolute; |
|
left: 4px; |
|
} |
|
.payanindemnity_reason { |
|
position: relative; |
|
} |
|
.payanindemnity_reason::before { |
|
content: '*'; |
|
color: #f00; |
|
margin-right: 6px; |
|
margin-top: 4px; |
|
position: absolute; |
|
left: -7px; |
|
} |
|
:deep(.payanindemnity_titlecheck) { |
|
.el-select__wrapper { |
|
border: 1px solid #f00; |
|
border-radius: 2px; |
|
box-shadow: none !important; |
|
} |
|
.el-select__wrapper::before { |
|
content: '请选择仓库'; |
|
color: #f00; |
|
position: absolute; |
|
bottom: -19px; |
|
font-size: 11px; |
|
font-family: '黑体'; |
|
left: 0; |
|
} |
|
.is-focused { |
|
box-shadow: none !important; |
|
border: 1px solid #f00; |
|
} |
|
} |
|
:deep(.payanindemnity_reasoncheck) { |
|
position: relative; |
|
.el-input__wrapper { |
|
border: 1px solid #f00; |
|
box-shadow: none !important; |
|
} |
|
.el-input__wrapper::before { |
|
content: '请填写原因'; |
|
color: #f00; |
|
position: absolute; |
|
bottom: -25px; |
|
font-size: 11px; |
|
font-family: '黑体'; |
|
left: 0; |
|
} |
|
} |
|
} |
|
.arbitrate { |
|
width: 100%; |
|
margin-top: 20px; |
|
} |
|
.ZFname { |
|
font-size: 16px; |
|
} |
|
.Paymentname { |
|
display: flex; |
|
justify-content: center; |
|
align-items: center; |
|
border: 1px solid #bfbfbf; |
|
margin-left: 2px; |
|
border-radius: 4px; |
|
width: 100px; |
|
font-size: 14px; |
|
padding: 10px; |
|
cursor: pointer; |
|
width: 190px; |
|
margin: 0 4px; |
|
} |
|
.Paymentname:hover { |
|
border: 1px solid #172e60; |
|
} |
|
:deep(.ZFfsLoad) { |
|
.el-radio { |
|
padding: 0 8px; |
|
} |
|
.el-radio-group { |
|
width: 100%; |
|
justify-content: center; |
|
align-items: center; |
|
} |
|
} |
|
.paySum { |
|
margin-top: 36px; |
|
font-size: 14px; |
|
display: flex; |
|
span { |
|
margin-right: 30px; |
|
display: flex; |
|
align-items: center; |
|
} |
|
} |
|
// 数字输入框 |
|
:deep(.el-input-number) { |
|
width: 160px; |
|
} |
|
.contemtMax { |
|
display: flex; |
|
justify-content: space-between; |
|
|
|
.left { |
|
width: 68%; |
|
border: 1px solid #dcdfe6; |
|
box-sizing: border-box; |
|
} |
|
:deep(.el-affix) { |
|
width: 30% !important; |
|
} |
|
.right { |
|
width: 100%; |
|
:deep(.el-card__body) { |
|
padding: 10px !important; |
|
} |
|
:deep(.el-timeline) { |
|
padding: 0; |
|
} |
|
.content { |
|
position: relative; |
|
} |
|
} |
|
:deep(.el-card) { |
|
box-shadow: -1px -1px 4px 0px #e3e3e3; |
|
border-top-left-radius: 20px; |
|
border-bottom: 1px solid #d5d5d563 !important; |
|
border-right: 1px solid #d5d5d563 !important; |
|
} |
|
} |
|
.ResponsibilityBox { |
|
width: 100%; |
|
display: flex; |
|
flex-direction: column; |
|
.leftbox { |
|
width: 100%; |
|
display: flex; |
|
justify-content: space-between; |
|
.title { |
|
width: 40px; |
|
} |
|
.maxBox { |
|
margin-right: 10px; |
|
} |
|
} |
|
.maxBox { |
|
display: flex; |
|
align-items: center; |
|
width: 30%; |
|
.title { |
|
width: 120px; |
|
font-size: 14px; |
|
color: #606266; |
|
} |
|
.el-select { |
|
width: 100%; |
|
} |
|
} |
|
.el-btn { |
|
margin-left: 5%; |
|
border: none; |
|
} |
|
.el_btbox { |
|
display: flex; |
|
margin-top: 10px; |
|
|
|
.maxBox { |
|
flex-direction: column; |
|
align-items: flex-start; |
|
width: 14%; |
|
} |
|
} |
|
.leftbox { |
|
justify-content: flex-start !important; |
|
.title { |
|
width: 80px; |
|
} |
|
} |
|
} |
|
.el_dcl { |
|
display: flex; |
|
width: 100%; |
|
} |
|
.Proportion { |
|
font-size: 14px; |
|
color: #606266; |
|
margin-top: 30px; |
|
.title { |
|
border: 1px solid #ccc; |
|
padding: 2px 8px; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
width: max-content; |
|
color: #000; |
|
} |
|
} |
|
.el_tool { |
|
border: 1px solid #ccc; |
|
padding: 2px 8px; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
width: max-content; |
|
color: #000; |
|
margin-top: 10px; |
|
span { |
|
font-size: 14px; |
|
} |
|
} |
|
.msgHf { |
|
display: flex; |
|
align-items: flex-end; |
|
justify-content: space-between; |
|
position: absolute; |
|
right: 0; |
|
bottom: 0; |
|
:deep(.el-button) { |
|
} |
|
} |
|
.ovhe { |
|
position: relative; |
|
overflow-y: scroll; |
|
scroll-behavior: smooth; |
|
.e_ico { |
|
display: flex; |
|
align-items: center; |
|
} |
|
.e_time { |
|
color: #999; |
|
font-size: 12px; |
|
} |
|
.img { |
|
width: 100%; |
|
height: 20%; |
|
overflow: scroll; |
|
.el-image { |
|
width: 20%; |
|
height: 100%; |
|
|
|
margin: 4px; |
|
} |
|
img { |
|
width: 100%; |
|
height: 50px; |
|
} |
|
} |
|
.mp4 { |
|
margin-top: 2px; |
|
span { |
|
display: flex; |
|
align-items: center; |
|
vertical-align: bottom; |
|
cursor: pointer; |
|
} |
|
} |
|
.tag { |
|
display: flex; |
|
justify-content: flex-end; |
|
} |
|
.file { |
|
span { |
|
display: flex; |
|
align-items: center; |
|
vertical-align: bottom; |
|
cursor: pointer; |
|
} |
|
} |
|
.header-top { |
|
display: flex; |
|
align-items: center; |
|
justify-content: space-between; |
|
height: 23px; |
|
:deep(.el-tag) { |
|
width: 70px; |
|
} |
|
} |
|
} |
|
.inputMax { |
|
position: absolute; |
|
bottom: 0; |
|
left: 0; |
|
} |
|
:deep(.el-timeline) { |
|
margin-bottom: 120px; |
|
} |
|
.inputMax { |
|
background-color: #fff; |
|
display: flex; |
|
width: 100%; |
|
justify-content: space-between; |
|
.inputfell { |
|
width: 100%; |
|
.inputbtn { |
|
display: flex; |
|
justify-content: space-between; |
|
align-items: center; |
|
:deep(.upload-demo) { |
|
width: auto; |
|
margin-right: 4px; |
|
display: flex; |
|
justify-content: space-between; |
|
align-items: center; |
|
} |
|
.inputleft { |
|
display: flex; |
|
:deep(.el-fil) { |
|
background-color: #409eff; |
|
border: none; |
|
} |
|
} |
|
:deep(.el_next) { |
|
background-color: #409eff; |
|
border: none; |
|
} |
|
:deep(.el_next:hover) { |
|
background-color: #409eff; |
|
} |
|
} |
|
:deep(.el-textarea) { |
|
margin-top: 6px; |
|
} |
|
} |
|
} |
|
.el_cwBtn { |
|
display: flex; |
|
justify-content: flex-end; |
|
} |
|
.PackageInformation { |
|
width: 100%; |
|
margin-bottom: 10px; |
|
} |
|
.ResponsibilityBoxS { |
|
width: 100%; |
|
display: flex; |
|
flex-direction: column; |
|
margin-bottom: 10px; |
|
justify-content: flex-start; |
|
.leftbox { |
|
width: 100%; |
|
display: flex; |
|
justify-content: space-between; |
|
flex-wrap: wrap; |
|
.el-form-item { |
|
flex-direction: column; |
|
align-items: flex-start; |
|
flex: none; |
|
width: 16.4%; |
|
} |
|
} |
|
|
|
.maxBox { |
|
display: flex; |
|
align-items: center; |
|
width: 30%; |
|
.title { |
|
width: 140px; |
|
color: #606266; |
|
font-size: 14px; |
|
} |
|
.el-select { |
|
width: 100%; |
|
} |
|
} |
|
.el-btn { |
|
margin-left: 5%; |
|
border: none; |
|
display: flex; |
|
} |
|
.el_btbox { |
|
display: flex; |
|
margin-top: 10px; |
|
} |
|
} |
|
.NumTotal { |
|
width: 30%; |
|
margin-top: 16px; |
|
display: flex; |
|
align-items: center; |
|
|
|
span { |
|
width: 120px; |
|
font-size: 14px; |
|
width: 30%; |
|
margin-top: 4px; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
padding: 2px 0; |
|
border: 1px solid #dcdfe6; |
|
} |
|
} |
|
.el_sub { |
|
width: 100%; |
|
display: flex; |
|
justify-content: flex-end; |
|
margin: 4px 0; |
|
} |
|
|
|
.el_lab { |
|
margin-right: 10px !important; |
|
} |
|
.cw_load { |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
} |
|
.el_Processingparty { |
|
width: 100%; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
font-size: 12px; |
|
box-shadow: -1px 2px 2px 0px #f5f5f5; |
|
padding: 0 4px; |
|
box-sizing: border-box; |
|
border-radius: 4px; |
|
height: 40px; |
|
span { |
|
width: 40px; |
|
} |
|
:deep(.el-select) { |
|
width: 100%; |
|
} |
|
} |
|
.el-endtabs { |
|
margin-top: 26px; |
|
} |
|
.el_PaymentUnit { |
|
display: flex; |
|
align-items: center; |
|
span { |
|
display: flex; |
|
width: 80px !important; |
|
align-items: center; |
|
} |
|
:deep(.el-input) { |
|
width: 150px; |
|
} |
|
} |
|
.identifying { |
|
display: flex; |
|
justify-content: space-between; |
|
align-items: center; |
|
height: 23px; |
|
.el-tag { |
|
width: 70px; |
|
} |
|
} |
|
.identifyingC1 { |
|
background-color: #409eff; |
|
border: none; |
|
} |
|
.identifyingC2 { |
|
background-color: #10d070; |
|
border: none; |
|
} |
|
.identifyingC3 { |
|
background-color: #d3832a; |
|
border: none; |
|
} |
|
.el_header-top { |
|
display: flex; |
|
align-items: center; |
|
justify-content: space-between; |
|
} |
|
|
|
:deep(.Transport_damage_photos) { |
|
.el-upload { |
|
display: none; |
|
} |
|
.is-active { |
|
font-weight: bold; |
|
} |
|
} |
|
:deep(.topClass) { |
|
border-bottom: none; |
|
|
|
.el-tabs__content { |
|
padding: 0; |
|
} |
|
|
|
.is-active { |
|
font-weight: bold; |
|
} |
|
} |
|
.el_top { |
|
width: 100%; |
|
padding: 6px; |
|
display: flex; |
|
justify-content: space-between; |
|
:deep(.el-form-item) { |
|
display: flex; |
|
flex-direction: row; |
|
align-items: center; |
|
width: 22%; |
|
} |
|
} |
|
:deep(.el_resj) { |
|
width: 100%; |
|
margin-top: 10px; |
|
flex-direction: column; |
|
align-items: flex-start; |
|
font-weight: bold; |
|
.el-form-item__content { |
|
width: 100% !important; |
|
} |
|
} |
|
|
|
.Basic_information { |
|
width: 100%; |
|
:deep(.is-active) { |
|
font-weight: bold; |
|
} |
|
.el_information { |
|
width: 100%; |
|
display: flex; |
|
flex-wrap: wrap; |
|
|
|
:deep(.el-form-item) { |
|
width: 16%; |
|
height: auto; |
|
display: flex; |
|
align-items: flex-start; |
|
flex-direction: column; |
|
flex: none; |
|
margin-right: 4px; |
|
margin-bottom: 0; |
|
.el-form-item__label { |
|
margin-left: 0; |
|
} |
|
.el-form-item__content { |
|
width: 100% !important; |
|
} |
|
} |
|
.el_information_row { |
|
width: 100%; |
|
display: flex; |
|
flex-wrap: wrap; |
|
} |
|
} |
|
.el-select { |
|
width: 100; |
|
} |
|
} |
|
:deep(.el_Processingresults) { |
|
display: flex; |
|
flex-wrap: wrap; |
|
flex-direction: column; |
|
.el_Processingresults_box { |
|
display: flex; |
|
flex-direction: column; |
|
width: 100%; |
|
.el_title { |
|
display: flex; |
|
width: fit-content; |
|
padding: 0 10px; |
|
margin-bottom: 4px; |
|
// border-left: 3px solid #172e60; |
|
position: relative; |
|
} |
|
.el_title::after { |
|
position: absolute; |
|
content: ''; |
|
width: 6px; |
|
height: 6px; |
|
border-radius: 50%; |
|
left: 0; |
|
top: 50%; |
|
transform: translate(0, -50%); |
|
background-color: #172e60; |
|
} |
|
.el_Processingresults_box_list { |
|
display: flex; |
|
justify-content: space-between; |
|
align-items: center; |
|
margin-right: 11px; |
|
.el-form-item { |
|
width: 24%; |
|
height: auto; |
|
display: flex; |
|
flex-direction: row; |
|
.el-form-item__content { |
|
width: 100% !important; |
|
} |
|
.el-input-number { |
|
width: 100% !important; |
|
} |
|
|
|
.el-form-item__label { |
|
margin-bottom: 0; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
:deep(.Responsible_box) { |
|
width: 100%; |
|
margin-top: 10px; |
|
.is-active { |
|
font-weight: bold; |
|
} |
|
} |
|
.el-endtabs { |
|
width: 100%; |
|
margin-top: 10px; |
|
:deep(.is-active) { |
|
font-weight: bold; |
|
} |
|
} |
|
:deep(.el-loading-mask) { |
|
position: fixed; |
|
left: 12%; |
|
top: 10%; |
|
} |
|
:deep(.payanindemnity_title) { |
|
.el-form-item__label { |
|
color: #f00; |
|
} |
|
} |
|
.el-ckbtn { |
|
display: flex; |
|
align-items: center; |
|
margin-bottom: 16px; |
|
margin-top: 20px; |
|
.Compensationamount { |
|
position: relative; |
|
margin-right: 20px; |
|
span { |
|
position: absolute; |
|
top: -8px; |
|
right: -8px; |
|
width: 24px; |
|
height: 24px; |
|
background-color: #f00; |
|
color: #fff; |
|
border-radius: 50%; |
|
display: flex; |
|
align-items: center; |
|
justify-content: center; |
|
font-size: 14px; |
|
} |
|
} |
|
} |
|
:deep(.Reason_arbitration) { |
|
.el-tabs__item::before { |
|
content: '*'; |
|
color: #f00; |
|
} |
|
} |
|
:deep(.Reason_arbitration_tip) { |
|
.el-textarea__inner { |
|
box-shadow: none; |
|
border: 1px solid #f00; |
|
} |
|
} |
|
:deep(.plAllret) { |
|
.el-form { |
|
flex-direction: column; |
|
.el-form-item { |
|
flex-direction: column; |
|
} |
|
.el-form-item__content { |
|
flex-direction: column; |
|
} |
|
.el-form-item__label { |
|
font-weight: bold; |
|
} |
|
} |
|
.el-select { |
|
width: 100%; |
|
} |
|
.el-loading-mask { |
|
position: absolute; |
|
left: 0; |
|
top: 0; |
|
} |
|
} |
|
</style>
|
|
|