|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template> |
|
|
|
|
<div class="pageContent" v-loading="form.Pageloading" element-loading-text="页面正在初始化中..."> |
|
|
|
|
<div class="pageContent" v-loading="form.Pageloading" element-loading-text="正在加载中..."> |
|
|
|
|
<!-- 菜单 --> |
|
|
|
|
<div class="placeholder"> |
|
|
|
|
<el-tabs |
|
|
|
@ -81,7 +81,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<template v-for="(item, index) in form.PackageList" :key="index + item.packageCode"> |
|
|
|
|
<template v-for="(item, index) in form.PackageList" :key="index"> |
|
|
|
|
<div class="el_Package"> |
|
|
|
|
<div class="Package"> |
|
|
|
|
<span class="Number"> {{ index + 1 }}</span> |
|
|
|
@ -90,7 +90,12 @@
|
|
|
|
|
:rules="ruleForm.packageCode" |
|
|
|
|
label="包条码" |
|
|
|
|
> |
|
|
|
|
<el-input v-model="item.packageCode" placeholder="请输入包条码" clearable /> |
|
|
|
|
<el-input |
|
|
|
|
@change="ChangePackageInfo(item)" |
|
|
|
|
v-model="item.packageCode" |
|
|
|
|
placeholder="请输入包条码" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
@ -130,12 +135,19 @@
|
|
|
|
|
:prop="`PackageList[${index}.brandName]`" |
|
|
|
|
:rules="ruleForm.brandName" |
|
|
|
|
> |
|
|
|
|
<el-input v-model="item.brandName" placeholder="请输入品牌" clearable /> |
|
|
|
|
<el-input |
|
|
|
|
v-model="item.brandName" |
|
|
|
|
placeholder="品牌(有则自动带出)" |
|
|
|
|
disabled |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<!-- 按钮 --> |
|
|
|
|
<div class="el_activPackage_btton"> |
|
|
|
|
<el-button @click="ViewhistoricalPackages">查看历史包件</el-button> |
|
|
|
|
<el-button v-if="item.history" @click="ViewhistoricalPackages(item)" |
|
|
|
|
>查看历史包件</el-button |
|
|
|
|
> |
|
|
|
|
<el-button v-if="index" type="primary" @click="Removepackage(index)" |
|
|
|
|
>移除</el-button |
|
|
|
|
> |
|
|
|
@ -159,12 +171,13 @@
|
|
|
|
|
v-model="form.trainNumber" |
|
|
|
|
placeholder="请选择车次号" |
|
|
|
|
style="width: 100%" |
|
|
|
|
@change="DeliveryTrainnumber(form.trainNumber)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Trainoptions" |
|
|
|
|
v-for="item in form.Trainoptions" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
:label="item.trainNumber" |
|
|
|
|
:value="item.trainNumber" |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
@ -257,7 +270,8 @@
|
|
|
|
|
> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.typeServiceName" |
|
|
|
|
placeholder="合作模式(自动带出)" |
|
|
|
|
placeholder="合作模式(有则自动带出)" |
|
|
|
|
disabled |
|
|
|
|
clearable |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
@ -357,6 +371,7 @@
|
|
|
|
|
style="width: 100%" |
|
|
|
|
clearable |
|
|
|
|
filterable |
|
|
|
|
@change="ResponsiblePartychange(item)" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="items in item.Responsibleoptions" |
|
|
|
@ -389,8 +404,8 @@
|
|
|
|
|
<el-option |
|
|
|
|
v-for="items in item.ResponsibleoNameptions" |
|
|
|
|
:key="items.value" |
|
|
|
|
:label="items.label" |
|
|
|
|
:value="items.value" |
|
|
|
|
:label="items.name" |
|
|
|
|
:value="items.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -449,7 +464,7 @@
|
|
|
|
|
v-loading="form.Packageloading" |
|
|
|
|
> |
|
|
|
|
<el-tab-pane label="处理结果-理赔金额" name="0"> |
|
|
|
|
<el-form-item label=""> |
|
|
|
|
<el-form-item label="" prop="result"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.result" |
|
|
|
|
placeholder="请选择处理结果类型" |
|
|
|
@ -472,7 +487,11 @@
|
|
|
|
|
<div class="el_Processingresults_box"> |
|
|
|
|
<span class="el_title">{{ item.title }}</span> |
|
|
|
|
<div class="el_Processingresults_box_list"> |
|
|
|
|
<el-form-item label="金额"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="金额" |
|
|
|
|
:prop="`Claimamount[${index}.money]`" |
|
|
|
|
:rules="ruleForm.packageCode" |
|
|
|
|
> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="item.money" |
|
|
|
|
:min="0" |
|
|
|
@ -482,10 +501,18 @@
|
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="支付单位"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="支付单位" |
|
|
|
|
:prop="`Claimamount[${index}.paymentUnit]`" |
|
|
|
|
:rules="ruleForm.packageCode" |
|
|
|
|
> |
|
|
|
|
<el-input v-model="item.paymentUnit" placeholder="请输入支付单位" clearable /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="理赔支付时间"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="理赔支付时间" |
|
|
|
|
:prop="`Claimamount[${index}.compensationTime]`" |
|
|
|
|
:rules="ruleForm.packageCode" |
|
|
|
|
> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="item.compensationTime" |
|
|
|
|
type="datetime" |
|
|
|
@ -495,7 +522,11 @@
|
|
|
|
|
size="default" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="支付方式"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="支付方式" |
|
|
|
|
:prop="`Claimamount[${index}.compensationMethod]`" |
|
|
|
|
:rules="ruleForm.packageCode" |
|
|
|
|
> |
|
|
|
|
<el-select |
|
|
|
|
v-model="item.compensationMethod" |
|
|
|
|
placeholder="请选择支付方式" |
|
|
|
@ -515,11 +546,37 @@
|
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
|
|
<!-- 照片上传 --> |
|
|
|
|
<el-tabs |
|
|
|
|
v-model="form.responsibilities" |
|
|
|
|
class="demo-tabs responsibilities" |
|
|
|
|
@tab-click="handleClick" |
|
|
|
|
v-loading="form.Packageloading" |
|
|
|
|
> |
|
|
|
|
<el-form-item label=""> |
|
|
|
|
<el-tab-pane label="照片" name="0"> |
|
|
|
|
<el-upload |
|
|
|
|
v-model:file-list="form.fileList" |
|
|
|
|
:action="action" |
|
|
|
|
:headers="headers" |
|
|
|
|
:on-success="ImgSuccess" |
|
|
|
|
:before-upload="beforeAvatarUpload" |
|
|
|
|
list-type="picture-card" |
|
|
|
|
> |
|
|
|
|
<el-icon><Plus /></el-icon> |
|
|
|
|
</el-upload> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-tabs> |
|
|
|
|
</el-tabs> |
|
|
|
|
<!-- 操作按钮 --> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button type="primary" icon="Refresh" @click="resetFormData">重置</el-button> |
|
|
|
|
<el-button type="primary" icon="Position" @click="onSubmit">保存</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-button type="primary" @click="onSubmit">提交</el-button> |
|
|
|
|
</div> |
|
|
|
|
<!-- 历史包件弹窗 --> |
|
|
|
|
<el-dialog v-model="form.historydialog" title="查看历史包件" width="500"> |
|
|
|
@ -528,21 +585,21 @@
|
|
|
|
|
<el-select v-model="form.discoveryNode" placeholder="历史包件选择" style="width: 100%"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in form.Historicalpackage" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
:key="item.workOrderId" |
|
|
|
|
:label="item.workOrderNumber" |
|
|
|
|
:value="item.workOrderId" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-button>查看详情</el-button> |
|
|
|
|
<el-button @click="Viewdetails(form.discoveryNode)">查看详情</el-button> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<template #footer> |
|
|
|
|
<!-- <template #footer> |
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
<el-button @click="form.historydialog = false"> 取消</el-button> |
|
|
|
|
<el-button type="primary" @click="historyPush">查看</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</template> --> |
|
|
|
|
</el-dialog> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -559,8 +616,12 @@ import {
|
|
|
|
|
$_getAbnormalPackage, |
|
|
|
|
$_shippingInformation, |
|
|
|
|
} from '@/api/aftersales/aftersalesWorkOrder'; |
|
|
|
|
import { useRouter, useRoute } from 'vue-router'; |
|
|
|
|
import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //处理方 |
|
|
|
|
import { deepClone } from '@/utils/util'; |
|
|
|
|
import { getToken } from '@/utils/auth'; |
|
|
|
|
const $router = useRouter(); |
|
|
|
|
const formCopy = ref({}); //用于重置表单 |
|
|
|
|
const form = ref({ |
|
|
|
|
TabactiveName: '0', //工单类型菜单 |
|
|
|
|
activPackage: '0', //包件信息菜单 |
|
|
|
@ -605,8 +666,10 @@ const form = ref({
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
Trainoptions: [], //车次号 |
|
|
|
|
// 理赔金额 |
|
|
|
|
Claimamount: [], |
|
|
|
|
fileList: [], //照片 |
|
|
|
|
}); |
|
|
|
|
const ruleForm = reactive({ |
|
|
|
|
workOrderType: [{ required: true, message: '请选择异常类型', trigger: ['bulr', 'change'] }], |
|
|
|
@ -616,7 +679,7 @@ const ruleForm = reactive({
|
|
|
|
|
orderCode: [{ required: true, message: '请输入订单自编号', trigger: ['bulr', 'change'] }], |
|
|
|
|
first: [{ required: true, message: '请输入一级品', trigger: ['bulr', 'change'] }], |
|
|
|
|
secondary: [{ required: true, message: '请输入二级品', trigger: ['bulr', 'change'] }], |
|
|
|
|
brandName: [{ required: true, message: '请输入品牌', trigger: ['bulr', 'change'] }], |
|
|
|
|
brandName: [{ required: false, message: '请输入品牌', trigger: ['bulr', 'change'] }], |
|
|
|
|
trainNumber: [{ required: true, message: '请选择车次号', trigger: ['bulr', 'change'] }], |
|
|
|
|
deliveryTime: [{ required: true, message: '请输入配送时间', trigger: ['bulr', 'change'] }], |
|
|
|
|
deliveryDriver: [{ required: true, message: '请输入配送司机', trigger: ['bulr', 'change'] }], |
|
|
|
@ -625,7 +688,7 @@ const ruleForm = reactive({
|
|
|
|
|
warehousingTime: [{ required: true, message: '请选择入库时间', trigger: ['bulr', 'change'] }], |
|
|
|
|
discoveryTime: [{ required: true, message: '请选择发现时间', trigger: ['bulr', 'change'] }], |
|
|
|
|
waybillMall: [{ required: true, message: '请输入运单商场', trigger: ['bulr', 'change'] }], |
|
|
|
|
typeServiceName: [{ required: true, message: '请输入合作模式', trigger: ['bulr', 'change'] }], |
|
|
|
|
typeServiceName: [{ required: false, message: '请输入合作模式', trigger: ['bulr', 'change'] }], |
|
|
|
|
processor: [{ required: true, message: '请输入处理方', trigger: ['bulr'] }], |
|
|
|
|
investigationPocess: [{ required: true, message: '请输入调查经过', trigger: ['bulr', 'change'] }], |
|
|
|
|
businessName: [{ required: true, message: '请选择责任方', trigger: ['bulr', 'change'] }], |
|
|
|
@ -633,6 +696,13 @@ const ruleForm = reactive({
|
|
|
|
|
responsibilityRatio: [{ required: true, message: '请输入占比', trigger: ['bulr', 'change'] }], |
|
|
|
|
tripartite: [{ required: true, message: '请输入三方责任人', trigger: ['bulr', 'change'] }], |
|
|
|
|
description: [{ required: true, message: '请输入说明', trigger: ['bulr', 'change'] }], |
|
|
|
|
money: [{ required: true, message: '请输入金额', trigger: ['bulr', 'change'] }], |
|
|
|
|
paymentUnit: [{ required: true, message: '请输入支付单位', trigger: ['bulr', 'change'] }], |
|
|
|
|
compensationTime: [{ required: true, message: '请输选择支付时间', trigger: ['bulr', 'change'] }], |
|
|
|
|
compensationMethod: [ |
|
|
|
|
{ required: true, message: '请输选择支付方式', trigger: ['bulr', 'change'] }, |
|
|
|
|
], |
|
|
|
|
result: [{ required: true, message: '请输选择处理结果', trigger: ['bulr'] }], |
|
|
|
|
}); |
|
|
|
|
const ResponsibleParty = ref([]); //提货责任方 |
|
|
|
|
const ruleFormRef = ref(); //表单示例 |
|
|
|
@ -710,11 +780,11 @@ const PageState = () => {
|
|
|
|
|
first: '', //一级品 |
|
|
|
|
secondary: '', //二级品 |
|
|
|
|
brandName: '', //品牌 |
|
|
|
|
history: true, //是否有历史包间 |
|
|
|
|
history: false, //是否有历史包间 |
|
|
|
|
id: 1, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
formCopy.value = deepClone(form.value); //用于拷贝一份重置数据 |
|
|
|
|
//理赔金额 |
|
|
|
|
|
|
|
|
|
// form.value.Claimamount = [ |
|
|
|
@ -781,6 +851,8 @@ const Addpackages = () => {
|
|
|
|
|
first: '', //一级品 |
|
|
|
|
secondary: '', //二级品 |
|
|
|
|
brandName: '', //品牌 |
|
|
|
|
history: false, //是否有历史包件 |
|
|
|
|
HistoricalPackageList: [], //历史包件存储 |
|
|
|
|
id: form.value.PackageList.length + 1, |
|
|
|
|
}; |
|
|
|
|
form.value.PackageList.push(data); |
|
|
|
@ -808,7 +880,8 @@ const Removepackage = index => {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 历史包件查看 |
|
|
|
|
const ViewhistoricalPackages = () => { |
|
|
|
|
const ViewhistoricalPackages = item => { |
|
|
|
|
form.value.Historicalpackage = item.HistoricalPackageList; |
|
|
|
|
form.value.historydialog = true; //打开弹窗 |
|
|
|
|
}; |
|
|
|
|
// 新增责任方 |
|
|
|
@ -883,7 +956,6 @@ const CompanyProportionInput = value => {
|
|
|
|
|
const Claimssettlement = value => { |
|
|
|
|
console.log(value, '理赔金额'); |
|
|
|
|
console.log(Processingresultsoptions.value, '参数列表'); |
|
|
|
|
let toa = ['1', '2']; |
|
|
|
|
let data = []; |
|
|
|
|
value.forEach(item => { |
|
|
|
|
let _data = Processingresultsoptions.value.find(res => res.value == item); |
|
|
|
@ -892,26 +964,271 @@ const Claimssettlement = value => {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
console.log(data, '筛选出来的值'); |
|
|
|
|
form.value.Claimamount = []; |
|
|
|
|
if (data && data.length) { |
|
|
|
|
form.value.Claimamount = []; |
|
|
|
|
data.forEach(item => { |
|
|
|
|
form.value.Claimamount.push({ |
|
|
|
|
title: item.label, //标题 |
|
|
|
|
money: 0, //金额 |
|
|
|
|
paymentUnit: '', //支付单位 |
|
|
|
|
compensationTime: '', //理赔支付时间 |
|
|
|
|
compensationTime: '', //理赔支付时间 |
|
|
|
|
compensationMethod: '', //支付方式 |
|
|
|
|
Paymentmethod: [...JSON.parse(JSON.stringify(Paymentmethodoptions.value))], |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 图片上传必须携带TOKEN |
|
|
|
|
const headers = computed(() => { |
|
|
|
|
return { 'Blade-Auth': 'Bearer ' + getToken() }; |
|
|
|
|
}); |
|
|
|
|
// 图片上传接口 |
|
|
|
|
const action = computed(() => { |
|
|
|
|
return '/api/blade-resource/oss/endpoint/put-file'; |
|
|
|
|
}); |
|
|
|
|
// 上传图片规则 |
|
|
|
|
const beforeAvatarUpload = rawFile => { |
|
|
|
|
console.log(rawFile, '图片上传前回调'); |
|
|
|
|
if (rawFile.type !== 'image/png' && rawFile.type !== 'image/jpeg') { |
|
|
|
|
ElMessage.error('只能上传格式为PNG/JPG的图片!'); |
|
|
|
|
return false; |
|
|
|
|
} else if (rawFile.size / 1024 / 1024 > 3) { |
|
|
|
|
ElMessage.error('图片大小不能大于3MB!'); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
// 图片上传成功回调函数 |
|
|
|
|
const ImgSuccess = (response, uploadFile) => { |
|
|
|
|
if (response.success === true) { |
|
|
|
|
console.log(response); |
|
|
|
|
console.log(form.value); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
const historyPush = () => {}; |
|
|
|
|
// 重置 |
|
|
|
|
const resetFormData = () => { |
|
|
|
|
// 尝试使用 HTML 字符串 |
|
|
|
|
const message = `重置表单会造成<span style="color: red;">数据丢失!</span>是否继续?`; |
|
|
|
|
ElMessageBox.confirm(message, '警告', { |
|
|
|
|
dangerouslyUseHTMLString: true, // 如果组件支持,启用此选项以解析 HTML |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(async () => { |
|
|
|
|
form.value.Pageloading = true; //开启页面加载 |
|
|
|
|
form.value = await deepClone(formCopy.value); //重置数据 |
|
|
|
|
ruleFormRef.value.resetFields(); |
|
|
|
|
let _time = setTimeout(() => { |
|
|
|
|
form.value.Pageloading = false; //开启页面加载 |
|
|
|
|
clearTimeout(_time); |
|
|
|
|
}, 300); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 包条码查询信息 |
|
|
|
|
const ChangePackageInfo = async item => { |
|
|
|
|
console.log(item, 'item'); |
|
|
|
|
if (!item.packageCode) { |
|
|
|
|
item.waybillNumber = ''; //运单号 |
|
|
|
|
item.orderCode = ''; //订单自编码 |
|
|
|
|
item.first = ''; //一级品 |
|
|
|
|
item.secondary = ''; //二级品 |
|
|
|
|
item.brandName = ''; //品牌 |
|
|
|
|
let data = form.value.PackageList.find(res => res.packageCode); //判断是否已经查询了运单商场 |
|
|
|
|
if (!data) { |
|
|
|
|
form.value.waybillMall = ''; //运单商场 |
|
|
|
|
form.value.typeServiceName = ''; //合作模式 |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 判断输入的包条码是否一样 |
|
|
|
|
if (form.value.PackageList.length > 1) { |
|
|
|
|
let packageCodeState = await form.value.PackageList.find(res => { |
|
|
|
|
// 排除当前项,只匹配其他项的包条码 |
|
|
|
|
return res.packageCode === item.packageCode && res !== item; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 查找是否已经存在相同包条码 |
|
|
|
|
if (packageCodeState) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '已经存在相同包条码,请勿重复添加!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let data = { |
|
|
|
|
packageCode: item.packageCode, //输入框参数 |
|
|
|
|
}; |
|
|
|
|
$_getAbnormalPackage(data).then(async res => { |
|
|
|
|
console.log(res, '查询包条'); |
|
|
|
|
let packageData = {}; |
|
|
|
|
if (res.data.code == 200 && res.data && res.data.data.length) { |
|
|
|
|
packageData = res.data.data[0]; //取第一个值,内容相同 |
|
|
|
|
// 判断输入的是否为同一批货 |
|
|
|
|
let state = await form.value.PackageList.find(res => res.orderCode || res.brandName); |
|
|
|
|
if (state) { |
|
|
|
|
if (state.orderCode != packageData.orderCode || state.brandName != packageData.brandName) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择相同订单自编号和品牌的包条码!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '查询成功', |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
item.waybillNumber = packageData.waybillNumber || ''; //运单号 |
|
|
|
|
item.orderCode = packageData.orderCode || ''; //订单自编码 |
|
|
|
|
item.first = packageData.firsts || ''; //一级品 |
|
|
|
|
item.secondary = packageData.second || ''; //二级品 |
|
|
|
|
item.brandName = packageData.brandName || ''; //品牌 |
|
|
|
|
form.value.waybillMall = packageData.mallName || ''; //运单商场 |
|
|
|
|
form.value.typeServiceName = packageData.typeServiceName || ''; //合作模式 |
|
|
|
|
|
|
|
|
|
// 是否显示历史包件按钮,存在多个包件则展示 |
|
|
|
|
const results = res.data.data.filter(item => { |
|
|
|
|
return item.workOrderId && item.workOrderNumber; |
|
|
|
|
}); |
|
|
|
|
// 存储历史订单 |
|
|
|
|
if (results.length) { |
|
|
|
|
item.history = true; |
|
|
|
|
item.HistoricalPackageList = results; |
|
|
|
|
} else { |
|
|
|
|
item.history = false; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '暂无查询内容,请检查参数是否正确!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// 判断发现节点(干线车次号、车辆线路处理) |
|
|
|
|
if (form.value.discoveryNode == '3') { |
|
|
|
|
let addedTrainNumbers = []; // 临时变量存储已经添加过的车次号 |
|
|
|
|
res.data.data.forEach(item => { |
|
|
|
|
item.trunklines.forEach(itemChid => { |
|
|
|
|
if (!addedTrainNumbers.includes(itemChid.trainNumber)) { |
|
|
|
|
form.value.Trainoptions.push({ |
|
|
|
|
trainNumber: itemChid.trainNumber, // 车次号 |
|
|
|
|
vehicleRoute: itemChid.vehicleRoute, // 车辆线路 |
|
|
|
|
}); |
|
|
|
|
addedTrainNumbers.push(itemChid.trainNumber); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// item.mallName = packageData.mallName; //运单商场 |
|
|
|
|
|
|
|
|
|
// Indexform.value.waybillMall = packageData.mallName; //客户名称(运单商场) |
|
|
|
|
// Indexform.value.typeServiceName = packageData.typeServiceName |
|
|
|
|
// ? packageData.typeServiceName |
|
|
|
|
// : ''; //合作模式 |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 查看历史包件详情 |
|
|
|
|
const Viewdetails = value => { |
|
|
|
|
if (!value) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '请选择要查看的数据', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 筛选出来输入框值 |
|
|
|
|
let data = form.value.Historicalpackage.find(res => res.workOrderId == value); |
|
|
|
|
$router.push({ |
|
|
|
|
path: '/aftersales/aftersalesWorkOrderInfo', |
|
|
|
|
query: { |
|
|
|
|
id: data.workOrderId, |
|
|
|
|
name: data.workOrderId + '-信息查看', |
|
|
|
|
routerState: 'view', |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 责任人查询>获取当前责任方的责任人 |
|
|
|
|
const ResponsiblePartychange = item => { |
|
|
|
|
let data = { |
|
|
|
|
warehouseId: item.businessName, |
|
|
|
|
}; |
|
|
|
|
// 清空责任人 |
|
|
|
|
item.personResponsibleName = ''; |
|
|
|
|
$_getBusinessDepartmentUser(data).then(res => { |
|
|
|
|
console.log(res, '获取责任人列表'); |
|
|
|
|
if (res.data.code == 200 && res.data.data && res.data.data.length) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '查询成功', |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
item.ResponsibleoNameptions = res.data.data; |
|
|
|
|
} else { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '暂未查询到责任人', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
item.ResponsibleoNameptions = []; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 车次号带出车辆线路 |
|
|
|
|
const DeliveryTrainnumber = value => { |
|
|
|
|
if (value) { |
|
|
|
|
if(form.value.Trainoptions.length){ |
|
|
|
|
let data = form.value.Trainoptions.find(res => res.trainNumber == value); |
|
|
|
|
form.value.vehicleRoute = data.vehicleRoute; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
// 提交 |
|
|
|
|
const onSubmit = () => { |
|
|
|
|
console.log(form.value); |
|
|
|
|
ruleFormRef.value.validate(valid => { |
|
|
|
|
console.log(valid, '123123'); |
|
|
|
|
if (!valid) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '有遗漏信息未填写,请根据提示填写完整!', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const message = `注意信息填写正确!点击确定将<span style="color: red;">提交工单</span>是否继续?`; |
|
|
|
|
ElMessageBox.confirm(message, '提示', { |
|
|
|
|
dangerouslyUseHTMLString: true, // 如果组件支持,启用此选项以解析 HTML |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(async () => { |
|
|
|
|
form.value.Pageloading = true; //开启页面加载 |
|
|
|
|
|
|
|
|
|
// 关闭页面加载 |
|
|
|
|
let _time = setTimeout(() => { |
|
|
|
|
form.value.Pageloading = false; //开启页面加载 |
|
|
|
|
clearTimeout(_time); |
|
|
|
|
}, 300); |
|
|
|
|
|
|
|
|
|
console.log(valid, '校验状态'); |
|
|
|
|
if (!form.value.fileList || !form.value.fileList.length) { |
|
|
|
|
console.log('请上传图片'); |
|
|
|
|
return; |
|
|
|
|
} else if (form.value.fileList || form.value.fileList.length) { |
|
|
|
|
let state = form.value.fileList.every( |
|
|
|
|
item => item.response && item.response.data && item.response.data.link |
|
|
|
|
); |
|
|
|
|
if (!state) { |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '图片未上传成功,请重新上传', |
|
|
|
|
type: 'warning', |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
const TabactiveClick = (a, b) => { |
|
|
|
@ -1068,13 +1385,13 @@ const TabactiveClick = (a, b) => {
|
|
|
|
|
:deep(.el_Investigation) { |
|
|
|
|
flex: 1; |
|
|
|
|
} |
|
|
|
|
:deep(.is-error) { |
|
|
|
|
.el-input--suffix { |
|
|
|
|
.el-textarea__inner:focus { |
|
|
|
|
box-shadow: 0 0 0 1px #ff0000 inset !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// :deep(.is-error) { |
|
|
|
|
// .el-input--suffix { |
|
|
|
|
// .el-textarea__inner:focus { |
|
|
|
|
// box-shadow: 0 0 0 1px #ff0000 inset !important; |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.responsibilities { |
|
|
|
@ -1114,6 +1431,7 @@ const TabactiveClick = (a, b) => {
|
|
|
|
|
align-items: center; |
|
|
|
|
justify-content: center; |
|
|
|
|
border-radius: 50%; |
|
|
|
|
margin-top: 2px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1161,9 +1479,21 @@ const TabactiveClick = (a, b) => {
|
|
|
|
|
.el_title { |
|
|
|
|
display: flex; |
|
|
|
|
width: fit-content; |
|
|
|
|
padding: 0 2px; |
|
|
|
|
padding: 0 10px; |
|
|
|
|
margin-bottom: 4px; |
|
|
|
|
border-left: 3px solid #172e60; |
|
|
|
|
// 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; |
|
|
|
@ -1171,6 +1501,10 @@ const TabactiveClick = (a, b) => {
|
|
|
|
|
align-items: center; |
|
|
|
|
margin-right: 11px; |
|
|
|
|
.el-form-item { |
|
|
|
|
width: 24%; |
|
|
|
|
.el-input-number { |
|
|
|
|
width: 100% !important; |
|
|
|
|
} |
|
|
|
|
.el-form-item__label { |
|
|
|
|
margin-bottom: 0; |
|
|
|
|
} |
|
|
|
@ -1179,4 +1513,17 @@ const TabactiveClick = (a, b) => {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.pageContent { |
|
|
|
|
height: 100vh; |
|
|
|
|
} |
|
|
|
|
.flex-c-c { |
|
|
|
|
position: fixed; |
|
|
|
|
bottom: 20px; |
|
|
|
|
left: 50%; |
|
|
|
|
} |
|
|
|
|
:deep(.el-loading-mask) { |
|
|
|
|
position: fixed; |
|
|
|
|
left: 12%; |
|
|
|
|
top: 11%; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|