|
|
@@ -66,23 +66,30 @@
|
|
|
</button>
|
|
|
@endcan
|
|
|
@can('订单管理-工单处理-货主编辑')
|
|
|
- <button class="btn btn-sm btn-outline-secondary" @click="showFillModel(item,i)" v-if="item['issue_type']['name'] ==='快递丢件'">信息填充</button>
|
|
|
+ <button class="btn btn-sm btn-outline-secondary" @click="showFillModel(item,i)"
|
|
|
+ v-if="item['issue_type']['name'] ==='快递丢件'">信息填充
|
|
|
+ </button>
|
|
|
@endcan
|
|
|
@can('订单管理-工单处理-承运商编辑')
|
|
|
- <button class="btn btn-sm btn-outline-secondary" @click="showEditLog(item,i,2)" v-if="['快递丢件','破损'].includes(item['issue_type']['name'])">快递处理</button>
|
|
|
+ <button class="btn btn-sm btn-outline-secondary" @click="showEditLog(item,i,2)"
|
|
|
+ v-if="['快递丢件','破损'].includes(item['issue_type']['name'])">快递处理
|
|
|
+ </button>
|
|
|
@endcan
|
|
|
@can('订单管理-工单处理-宝时编辑')
|
|
|
- <button class="btn btn-sm btn-outline-secondary" @click="showEditLog(item,i,1)" v-if="['快递丢件','破损'].includes(item['issue_type']['name'])">宝时处理</button>
|
|
|
+ <button class="btn btn-sm btn-outline-secondary" @click="showEditLog(item,i,1)"
|
|
|
+ v-if="['快递丢件','破损'].includes(item['issue_type']['name'])">宝时处理
|
|
|
+ </button>
|
|
|
@endcan
|
|
|
</td>
|
|
|
<td class="text-center">
|
|
|
@can('订单管理-工单处理-宝时编辑')
|
|
|
<select class="form-control form-control-sm"
|
|
|
- :value="item['work_order_status']"
|
|
|
- @change="updateWorkOrderStatus(item,$event)"
|
|
|
- :disabled="item['work_order_status'] === '工单完成'">
|
|
|
+ :value="item['work_order_status']"
|
|
|
+ @change="updateWorkOrderStatus(item,$event)"
|
|
|
+ :disabled="item['work_order_status'] === '工单完成'">
|
|
|
<option value="">无</option>
|
|
|
- <option :value="status" v-for="status in workOrderStatus">@{{ status }}</option>
|
|
|
+ <option :value="status" v-for="status in workOrderStatus">@{{ status }}
|
|
|
+ </option>
|
|
|
</select>
|
|
|
@else
|
|
|
@{{ item.work_order_status }}
|
|
|
@@ -124,49 +131,130 @@
|
|
|
<div v-if="item['logistic_log']" class="alert alert-light">
|
|
|
<div>
|
|
|
承运商处理
|
|
|
- <button @click="selectLogisticLogId = null" v-show="selectLogisticLogId === item['logistic_log']['id']" class="btn btn-sm btn-outline-info">
|
|
|
+ <button @click="selectLogisticLogId = null"
|
|
|
+ v-show="selectLogisticLogId === item['logistic_log']['id']"
|
|
|
+ class="btn btn-sm btn-outline-info float-right">
|
|
|
隐藏
|
|
|
</button>
|
|
|
- <button @click="selectLogisticLogId = item['logistic_log']['id']" v-show="selectLogisticLogId !== item['logistic_log']['id']" class="btn btn-sm btn-outline-info">
|
|
|
+ <button @click="selectLogisticLogId = item['logistic_log']['id']"
|
|
|
+ v-show="selectLogisticLogId !== item['logistic_log']['id']"
|
|
|
+ class="btn btn-sm btn-outline-info float-right">
|
|
|
显示
|
|
|
</button>
|
|
|
</div>
|
|
|
- <div v-show="selectLogisticLogId === item['logistic_log']['id']">
|
|
|
- <div>是否赔偿: <span v-text="item['logistic_log']['is_indemnity']"></span></div>
|
|
|
- <div v-if="item['logistic_log']['is_indemnity'] === '是'">
|
|
|
- 赔偿金额: <span class="text-nowrap" v-text="item['logistic_log']['indemnity']"></span>
|
|
|
+ <transition name="fade">
|
|
|
+ <div v-show="selectLogisticLogId === item['logistic_log']['id']">
|
|
|
+ <div>
|
|
|
+ <span class="mr-2">是否赔偿:</span>
|
|
|
+ <span v-text="item['logistic_log']['is_indemnity']"
|
|
|
+ class="text-primary"></span>
|
|
|
+ </div>
|
|
|
+ <div v-if="item['logistic_log']['is_indemnity'] === '是'">
|
|
|
+ <span class="mr-2">赔偿金额:</span>
|
|
|
+ <span class="text-primary"
|
|
|
+ v-text="item['logistic_log']['indemnity']"></span>
|
|
|
+ </div>
|
|
|
+ <div v-if="item['logistic_log']['is_indemnity'] === '否'">
|
|
|
+ <span class="mr-2">不赔偿理由:</span>
|
|
|
+ <span v-text="item['logistic_log']['remark']"></span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-if="item['logistic_log']['is_indemnity'] === '否'">
|
|
|
- 不赔偿理由: <span class="mr-3 text-nowrap" v-text="item['logistic_log']['remark']"></span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </transition>
|
|
|
</div>
|
|
|
|
|
|
- <div v-if="item['process_log']" class="alert alert-light" >
|
|
|
+
|
|
|
+ <div v-if="item['process_log']" class="alert alert-light">
|
|
|
<div>
|
|
|
宝时处理
|
|
|
- <button @click="selectBaoShiLogId = null" v-if="selectBaoShiLogId === item['process_log']['id']" class="btn btn-sm btn-outline-info">
|
|
|
+ <button @click="selectBaoShiLogId = null"
|
|
|
+ v-if="selectBaoShiLogId === item['process_log']['id']"
|
|
|
+ class="btn btn-sm btn-outline-info float-right">
|
|
|
隐藏
|
|
|
</button>
|
|
|
- <button @click="selectBaoShiLogId = item['process_log']['id']" v-if="selectBaoShiLogId !== item['process_log']['id']" class="btn btn-sm btn-outline-info">
|
|
|
+ <button @click="selectBaoShiLogId = item['process_log']['id']"
|
|
|
+ v-if="selectBaoShiLogId !== item['process_log']['id']"
|
|
|
+ class="btn btn-sm btn-outline-info float-right">
|
|
|
显示
|
|
|
</button>
|
|
|
</div>
|
|
|
-
|
|
|
- <div v-show="selectBaoShiLogId === item['process_log']['id']">
|
|
|
- <div>是否赔偿: <span v-text="item['process_log']['is_indemnity']"></span></div>
|
|
|
- <div v-if="item['process_log']['is_indemnity'] === '是'">
|
|
|
- 赔偿方:<span class="text-nowrap" v-text="item['process_log']['indemnitor']"></span>
|
|
|
- </div>
|
|
|
- <div v-if="item['process_log']['is_indemnity'] === '是'">
|
|
|
- 赔偿金额: <span class="text-nowrap" v-text="item['process_log']['indemnity']"></span>
|
|
|
+ <transition name="fade">
|
|
|
+ <div v-show="selectBaoShiLogId === item['process_log']['id']">
|
|
|
+ <div>
|
|
|
+ <span>是否赔偿: </span>
|
|
|
+ <span v-text="item['process_log']['is_indemnity']"
|
|
|
+ class="ml-2 text-primary"></span></div>
|
|
|
+ <div v-if="item['process_log']['is_indemnity'] === '是'">
|
|
|
+ <span>赔偿方:</span>
|
|
|
+ <span class="text-primary"
|
|
|
+ v-text="item['process_log']['indemnitor']"></span>
|
|
|
+ </div>
|
|
|
+ <div v-if="item['process_log']['is_indemnity'] === '是'">
|
|
|
+ <span>赔偿金额:</span>
|
|
|
+ <span class="ml-2 text-primary"
|
|
|
+ v-text="item['process_log']['indemnity']"></span>
|
|
|
+ </div>
|
|
|
+ <div v-if="item['process_log']['is_indemnity'] === '否'">
|
|
|
+ <span>不赔偿理由:</span>
|
|
|
+ <span class="ml-2" v-text=" item['process_log']['remark']"></span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div v-if="item['process_log']['is_indemnity'] === '否'">
|
|
|
- 不赔偿理由: <span class="mr-3 text-nowrap" v-text=" item['process_log']['remark']"></span>
|
|
|
+ </transition>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {{-- 工单详情 --}}
|
|
|
+ <div v-if="item.details.length > 0" class="alert alert-light">
|
|
|
+ <div class="header-alert">
|
|
|
+ 工单详情
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-primary float-right"
|
|
|
+ v-show="selectDetailId !== item.id"
|
|
|
+ @click="selectDetailId = item.id">显示
|
|
|
+ </button>
|
|
|
+ <button type="button" class="btn btn-sm btn-outline-primary float-right"
|
|
|
+ v-show="selectDetailId === item.id"
|
|
|
+ @click="selectDetailId = null">隐藏
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="body-alert" v-if="selectDetailId === item.id">
|
|
|
+ <div v-for="(detail,i) in item.details">
|
|
|
+ {{-- 快递丢件工单详情 --}}
|
|
|
+ <div v-if="item['issue_type']['name'] === '快递丢件'">
|
|
|
+ <div v-if="detail['logistic_number']">
|
|
|
+ <span class="mr-3">丢件快递单号:</span>
|
|
|
+ <span v-text="detail['logistic_number']" class="text-primary"></span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="mr-3">丢件价值:</span>
|
|
|
+ <span v-text="detail['price']" class="text-primary"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ {{-- 破损工单详情 --}}
|
|
|
+ <div v-if="item['issue_type']['name'] === '破损'">
|
|
|
+ <div>
|
|
|
+ <span class="mr-3">破损sku数:</span>
|
|
|
+ <span class="text-primary" v-text="detail.sku_amount"></span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="mr-3">破损商品价值</span>
|
|
|
+ <span class="text-primary" v-text="detail.price"></span>
|
|
|
+ </div>
|
|
|
+ {{-- 工单登记商品详情 --}}
|
|
|
+ <div v-for="(item,i) in item.commodities">
|
|
|
+ <span class="mr-2">sku</span>
|
|
|
+ <span v-text="item.sku"></span>
|
|
|
+ <span class="mr-2">商品名</span>
|
|
|
+ <span v-text="item.commodity ? item.commodity.name : ''"></span>
|
|
|
+ <span class="mr-2">数量</span>
|
|
|
+ <span v-text="item.amount"></span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ 图片
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
</td>
|
|
|
<td class="text-center">
|
|
|
@can('订单管理-工单处理-审核')
|
|
|
@@ -312,47 +400,50 @@
|
|
|
selectTr: null,
|
|
|
form: null,
|
|
|
logistics: [
|
|
|
- @foreach($logistics as $logistic)
|
|
|
+ @foreach($logistics as $logistic)
|
|
|
{
|
|
|
name: {{$logistic->id}}, value: '{{$logistic->name}}'
|
|
|
},
|
|
|
@endforeach
|
|
|
],
|
|
|
orderIssueTypes: [
|
|
|
- @foreach($orderIssueTypes as $type)
|
|
|
+ @foreach($orderIssueTypes as $type)
|
|
|
{
|
|
|
name: '{{$type->id}}', value: "{{$type->name}}"
|
|
|
},
|
|
|
@endforeach
|
|
|
],
|
|
|
- owners:[
|
|
|
- @foreach($owners as $owner)
|
|
|
- {name:'{{$owner->id}}',value:'{{$owner->name}}'},
|
|
|
+ owners: [
|
|
|
+ @foreach($owners as $owner)
|
|
|
+ {
|
|
|
+ name: '{{$owner->id}}', value: '{{$owner->name}}'
|
|
|
+ },
|
|
|
@endforeach
|
|
|
],
|
|
|
- workOrder:{
|
|
|
- id:null,
|
|
|
- index:null,
|
|
|
- reissue_logistic_number:null, // 补发单号
|
|
|
- logistic_number:null, // 原单号
|
|
|
- refundImages:[], // 退款图
|
|
|
- dealImages:[], // 交易图
|
|
|
- },
|
|
|
- processLog:{
|
|
|
- id:null, // log->id
|
|
|
- index:'', // 下标
|
|
|
- work_order_id:null, // work_order_id
|
|
|
- type:null, // 类型
|
|
|
- is_indemnity:null, // 是否赔偿
|
|
|
- indemnity:null, // 金额
|
|
|
- remark:null,
|
|
|
- indemnitor:null, // 赔偿方
|
|
|
- },
|
|
|
- workOrderStatus:['信息未填写','信息已填写','快递已处理', '工单完成'],
|
|
|
+ workOrder: {
|
|
|
+ id: null,
|
|
|
+ index: null,
|
|
|
+ reissue_logistic_number: null, // 补发单号
|
|
|
+ logistic_number: null, // 丢件快递单号
|
|
|
+ refundImages: [], // 退款图
|
|
|
+ dealImages: [], // 交易图
|
|
|
+ },
|
|
|
+ processLog: {
|
|
|
+ id: null, // log->id
|
|
|
+ index: '', // 下标
|
|
|
+ work_order_id: null, // work_order_id
|
|
|
+ type: null, // 类型
|
|
|
+ is_indemnity: null, // 是否赔偿
|
|
|
+ indemnity: null, // 金额
|
|
|
+ remark: null,
|
|
|
+ indemnitor: null, // 赔偿方
|
|
|
+ },
|
|
|
+ workOrderStatus: ['信息未填写', '信息已填写', '快递已处理', '工单完成'],
|
|
|
selectOrderPackage: null,
|
|
|
selectOrder: null,
|
|
|
- selectLogisticLogId:null,
|
|
|
- selectBaoShiLogId:null,
|
|
|
+ selectLogisticLogId: null,
|
|
|
+ selectBaoShiLogId: null,
|
|
|
+ selectDetailId: null,
|
|
|
selectOrderIssue: null,
|
|
|
selectIssueType: '',
|
|
|
},
|
|
|
@@ -367,7 +458,7 @@
|
|
|
tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的承运商'],
|
|
|
placeholder: ['承运商', '定位或多选承运商']
|
|
|
},
|
|
|
- @can('订单管理-订单问题件生成')
|
|
|
+ @can('订单管理-订单问题件生成')
|
|
|
{
|
|
|
name: 'owner',
|
|
|
type: 'select_multiple_select',
|
|
|
@@ -375,8 +466,10 @@
|
|
|
tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的货主'],
|
|
|
placeholder: ['货主', '定位或多选货主']
|
|
|
},
|
|
|
- @endcan
|
|
|
- {name: 'logistic_number', type: 'input', placeholder: '快递单号'},
|
|
|
+ @endcan
|
|
|
+ {
|
|
|
+ name: 'logistic_number', type: 'input', placeholder: '快递单号'
|
|
|
+ },
|
|
|
{
|
|
|
name: 'is_issue_order',
|
|
|
type: 'select',
|
|
|
@@ -398,31 +491,34 @@
|
|
|
let column = [
|
|
|
{name: 'no', value: '序号', neglect: true},
|
|
|
{name: 'operation', value: '操作', neglect: true},
|
|
|
- {name: 'work_order_status', value: '工单状态',neglect: true},
|
|
|
- {name: 'status', value: '状态',neglect: true},
|
|
|
- {name: 'owner', value: '货主',neglect: true},
|
|
|
- {name: 'client_code', value: '订单号',neglect: true},
|
|
|
- {name: 'logisticName', value: '承运商',neglect: true},
|
|
|
+ {name: 'work_order_status', value: '工单状态', neglect: true},
|
|
|
+ {name: 'status', value: '状态', neglect: true},
|
|
|
+ {name: 'owner', value: '货主', neglect: true},
|
|
|
+ {name: 'client_code', value: '订单号', neglect: true},
|
|
|
+ {name: 'logisticName', value: '承运商', neglect: true},
|
|
|
{name: 'logisticNumber', value: '快递单号'},
|
|
|
{name: 'processLog', value: '处理日志'},
|
|
|
+ {name: 'workOrderDetails', value: '工单详情'},
|
|
|
{name: 'issueType', value: '问题件类型'},
|
|
|
- {name: 'workOrderInfo', value: '问题描述',neglect: true},
|
|
|
- {name: 'result_explain', value: '情况说明',neglect: true},
|
|
|
+ {name: 'workOrderInfo', value: '问题描述', neglect: true},
|
|
|
+ {name: 'result_explain', value: '情况说明', neglect: true},
|
|
|
{name: 'orderIssueType', value: '问题件类别'},
|
|
|
{
|
|
|
name: 'orderIssueProcessLogs', type: 'multi', title: "处理结果", rows: [
|
|
|
{value: "内容", col: "4"},
|
|
|
{value: "操作人", col: "4"},
|
|
|
{value: "时间", col: "4"},
|
|
|
- ],neglect: true
|
|
|
+ ], neglect: true
|
|
|
},
|
|
|
{name: 'Info', value: '物流跟踪信息', neglect: true},
|
|
|
- {name: 'creator', value: '创建人',neglect: true},
|
|
|
- {name: 'submit_at', value: '提交时间',neglect: true},
|
|
|
- {name: 'reviewer', value: '审核人',neglect: true},
|
|
|
- {name: 'review_at', value: '审核时间',neglect: true},
|
|
|
- @can('订单管理-工单处理-删除')
|
|
|
- {name: 'delete_operation', value: '其他操作',neglect: true},
|
|
|
+ {name: 'creator', value: '创建人', neglect: true},
|
|
|
+ {name: 'submit_at', value: '提交时间', neglect: true},
|
|
|
+ {name: 'reviewer', value: '审核人', neglect: true},
|
|
|
+ {name: 'review_at', value: '审核时间', neglect: true},
|
|
|
+ @can('订单管理-工单处理-删除')
|
|
|
+ {
|
|
|
+ name: 'delete_operation', value: '其他操作', neglect: true
|
|
|
+ },
|
|
|
@endcan()
|
|
|
];
|
|
|
|
|
|
@@ -437,14 +533,14 @@
|
|
|
$("#list").removeClass("d-none");
|
|
|
},
|
|
|
created() {
|
|
|
- this.workOrders.forEach(item=>{
|
|
|
+ this.workOrders.forEach(item => {
|
|
|
if (!item.order) return;
|
|
|
if (!item.order.packages) return;
|
|
|
this.sortOrder(item);
|
|
|
});
|
|
|
},
|
|
|
- filters:{
|
|
|
- dataTime:function(value) {
|
|
|
+ filters: {
|
|
|
+ dataTime: function (value) {
|
|
|
if (value !== null) {
|
|
|
return moment(value).format('yyyy-MM-DD');
|
|
|
}
|
|
|
@@ -460,16 +556,16 @@
|
|
|
workOrder.issue_order_type = workOrder['order_issue']['issue_type']['name'];
|
|
|
}
|
|
|
if (workOrder['order_issue'].logs) {
|
|
|
- workOrder.issue_logs = this.mapLogs(workOrder['order_issue'].logs);
|
|
|
+ workOrder.issue_logs = this.mapLogs(workOrder['order_issue'].logs);
|
|
|
}
|
|
|
}
|
|
|
if (!workOrder.order.packages) return;
|
|
|
- workOrder.order.packages.forEach(item=>{
|
|
|
+ workOrder.order.packages.forEach(item => {
|
|
|
this.sortTransfer(item)
|
|
|
})
|
|
|
},
|
|
|
- mapLogs(logs){
|
|
|
- return logs.map(item=>{
|
|
|
+ mapLogs(logs) {
|
|
|
+ return logs.map(item => {
|
|
|
return {
|
|
|
username: item.user ? item.user.name : '',
|
|
|
content: item.content,
|
|
|
@@ -526,14 +622,16 @@
|
|
|
window.tempTip.show(err)
|
|
|
});
|
|
|
},
|
|
|
- replaceWorkOrder(workOrders){
|
|
|
+ replaceWorkOrder(workOrders) {
|
|
|
let data = [];
|
|
|
- workOrders.forEach(workOrder=>{data[workOrder.id] = workOrder;});
|
|
|
- this.workOrders.forEach((workOrder,i)=>{
|
|
|
- if (data[workOrder.id]){
|
|
|
+ workOrders.forEach(workOrder => {
|
|
|
+ data[workOrder.id] = workOrder;
|
|
|
+ });
|
|
|
+ this.workOrders.forEach((workOrder, i) => {
|
|
|
+ if (data[workOrder.id]) {
|
|
|
let item = data[workOrder.id];
|
|
|
this.sortOrder(item);
|
|
|
- this.$set(this.workOrders,i,item);
|
|
|
+ this.$set(this.workOrders, i, item);
|
|
|
}
|
|
|
});
|
|
|
this.$forceUpdate();
|
|
|
@@ -563,7 +661,7 @@
|
|
|
if (!item.order) return '';
|
|
|
if (!item.order.packages) return '';
|
|
|
let message = '';
|
|
|
- let issue_type = item['issue_type']? item['issue_type'].name : '';
|
|
|
+ let issue_type = item['issue_type'] ? item['issue_type'].name : '';
|
|
|
switch (issue_type) {
|
|
|
case '拦截':
|
|
|
message = this.interceptMessage(item);
|
|
|
@@ -710,20 +808,20 @@
|
|
|
window.tempTip.show(err)
|
|
|
})
|
|
|
},
|
|
|
- destroy(item,i){
|
|
|
- let url = '{{url('apiLocal/workOrder/')}}'+'/'+item.id;
|
|
|
- if(!confirm('是否删除当前工单')) return ;
|
|
|
+ destroy(item, i) {
|
|
|
+ let url = '{{url('apiLocal/workOrder/')}}' + '/' + item.id;
|
|
|
+ if (!confirm('是否删除当前工单')) return;
|
|
|
window.tempTip.waitingTip('删除.........');
|
|
|
- window.axios.delete(url).then(res=>{
|
|
|
- if (res.data.success){
|
|
|
- this.$delete(this.workOrders,i);
|
|
|
+ window.axios.delete(url).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$delete(this.workOrders, i);
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
window.tempTip.showSuccess('删除成功');
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
window.tempTip.show(res.data.message ? res.data.message : '');
|
|
|
}
|
|
|
- }).catch(err=>{
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
window.tempTip.show(err);
|
|
|
})
|
|
|
@@ -732,7 +830,7 @@
|
|
|
let map = [];
|
|
|
for (let i = 0; i < e.target.files.length; i++) {
|
|
|
let image = e.target.files[i];
|
|
|
- if (this.imageExist(image,images)) {
|
|
|
+ if (this.imageExist(image, images)) {
|
|
|
map.push(image.name);
|
|
|
continue;
|
|
|
}
|
|
|
@@ -740,21 +838,21 @@
|
|
|
images.push({src: src, file: image});
|
|
|
}
|
|
|
e.target.value = '';
|
|
|
- if (map.length === 0)return ;
|
|
|
+ if (map.length === 0) return;
|
|
|
window.tempTip.setIndex(1999);
|
|
|
- window.tempTip.show(map.join('\n,')+'图片重复');
|
|
|
+ window.tempTip.show(map.join('\n,') + '图片重复');
|
|
|
},
|
|
|
spliceImage(i, images) {
|
|
|
if (!confirm('是否取消选择该图片')) return;
|
|
|
images.splice(i, 1);
|
|
|
},
|
|
|
- imageExist(image,images) {
|
|
|
+ imageExist(image, images) {
|
|
|
let arr = images.filter(item => {
|
|
|
return item.file.name === image.name;
|
|
|
});
|
|
|
return arr.length > 0;
|
|
|
},
|
|
|
- showFillModel(item,index){
|
|
|
+ showFillModel(item, index) {
|
|
|
this.workOrder.id = item.id;
|
|
|
this.workOrder.index = index;
|
|
|
this.workOrder.reissue_logistic_number = null; // 补发单号
|
|
|
@@ -763,15 +861,16 @@
|
|
|
this.workOrder.refundImages = []; // 退款图
|
|
|
$("#fill-loss-work-order-modal").modal('show');
|
|
|
},
|
|
|
- updateLossWorkOrder(){
|
|
|
+ updateLossWorkOrder() {
|
|
|
let formData = new FormData();
|
|
|
- formData.append('id',this.workOrder.id);
|
|
|
- formData.append('reissue_logistic_number',this.workOrder.reissue_logistic_number);
|
|
|
- formData.append('logistic_number',this.workOrder.logistic_number);
|
|
|
+ formData.append('id', this.workOrder.id);
|
|
|
+ formData.append('reissue_logistic_number', this.workOrder.reissue_logistic_number);
|
|
|
+ formData.append('logistic_number', this.workOrder.logistic_number);
|
|
|
+ formData.append('price', this.workOrder.price);
|
|
|
let dealImages = this.getImages(this.workOrder.dealImages);
|
|
|
let refundImages = this.getImages(this.workOrder.refundImages);
|
|
|
- this.setFormDataImagePrefix(formData,'dealImages',dealImages);
|
|
|
- this.setFormDataImagePrefix(formData,'refundImages',refundImages);
|
|
|
+ this.setFormDataImagePrefix(formData, 'dealImages', dealImages);
|
|
|
+ this.setFormDataImagePrefix(formData, 'refundImages', refundImages);
|
|
|
this.fillLossWorkOrder(formData);
|
|
|
},
|
|
|
setFormDataImagePrefix(formData, prefix, images) {
|
|
|
@@ -784,22 +883,22 @@
|
|
|
return item.file;
|
|
|
})
|
|
|
},
|
|
|
- fillLossWorkOrder(data){
|
|
|
+ fillLossWorkOrder(data) {
|
|
|
let url = "{{route('workOrder.lossApi')}}";
|
|
|
window.tempTip.setIndex(1999);
|
|
|
- window.axios.post(url,data,{'Content-Type': 'multipart/form-data'}).then(res=>{
|
|
|
- if (res.data.success){
|
|
|
+ window.axios.post(url, data, {'Content-Type': 'multipart/form-data'}).then(res => {
|
|
|
+ if (res.data.success) {
|
|
|
this.sortOrder(res.data.data);
|
|
|
- this.$set(this.workOrders,this.workOrder.index,res.data.data);
|
|
|
+ this.$set(this.workOrders, this.workOrder.index, res.data.data);
|
|
|
window.tempTip.showSuccess('工单信息填充成功');
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
window.tempTip.show(res.data.message);
|
|
|
}
|
|
|
- }).catch(err=>{
|
|
|
+ }).catch(err => {
|
|
|
window.template.show(err);
|
|
|
});
|
|
|
},
|
|
|
- showEditLog(item,index,type){
|
|
|
+ showEditLog(item, index, type) {
|
|
|
this.processLog.type = type;
|
|
|
this.processLog.index = index;
|
|
|
this.processLog.work_order_id = item.id;
|
|
|
@@ -809,102 +908,102 @@
|
|
|
this.processLog.indemnitor = null;
|
|
|
$("#work-order-process-log-modal").modal('show');
|
|
|
},
|
|
|
- storeLogisticProcessLog(){
|
|
|
+ storeLogisticProcessLog() {
|
|
|
let url = "{{route('workOrderProcessLog.logisticLogApi')}}";
|
|
|
let data = {
|
|
|
- indemnity:this.processLog.indemnity,
|
|
|
- work_order_id:this.processLog.work_order_id,
|
|
|
- is_indemnity:this.processLog.is_indemnity,
|
|
|
- remark:this.processLog.remark,
|
|
|
+ indemnity: this.processLog.indemnity,
|
|
|
+ work_order_id: this.processLog.work_order_id,
|
|
|
+ is_indemnity: this.processLog.is_indemnity,
|
|
|
+ remark: this.processLog.remark,
|
|
|
};
|
|
|
- if(!this.verifiedProcessLog())return;
|
|
|
+ if (!this.verifiedProcessLog()) return;
|
|
|
window.tempTip.setDuration(9999);
|
|
|
window.tempTip.setIndex(1999);
|
|
|
window.tempTip.waitingTip('操作中请稍后');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
window.tempTip.setIndex(1999);
|
|
|
window.tempTip.setDuration(2000);
|
|
|
- if (res.data.success){
|
|
|
+ if (res.data.success) {
|
|
|
window.tempTip.showSuccess('创建成功');
|
|
|
- this.$set(this.workOrders[this.processLog.index],'logistic_log',res.data.data);
|
|
|
+ this.$set(this.workOrders[this.processLog.index], 'logistic_log', res.data.data);
|
|
|
$('#work-order-process-log-modal').modal('hide');
|
|
|
- } else{
|
|
|
+ } else {
|
|
|
window.tempTip.show(res.data.message ? res.data.message : '创建异常,刷新页面重试');
|
|
|
}
|
|
|
- }).catch(err=>{
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.setIndex(1999);
|
|
|
window.tempTip.setDuration(2000);
|
|
|
window.tempTip.show(err);
|
|
|
});
|
|
|
},
|
|
|
- storeProcessLog(){
|
|
|
+ storeProcessLog() {
|
|
|
let url = "{{route('workOrderProcessLog.LogApi')}}";
|
|
|
let data = {
|
|
|
- indemnity:this.processLog.indemnity,
|
|
|
- work_order_id:this.processLog.work_order_id,
|
|
|
- is_indemnity:this.processLog.is_indemnity,
|
|
|
- remark:this.processLog.remark,
|
|
|
- indemnitor:this.processLog.indemnitor,
|
|
|
+ indemnity: this.processLog.indemnity,
|
|
|
+ work_order_id: this.processLog.work_order_id,
|
|
|
+ is_indemnity: this.processLog.is_indemnity,
|
|
|
+ remark: this.processLog.remark,
|
|
|
+ indemnitor: this.processLog.indemnitor,
|
|
|
};
|
|
|
- if(!this.verifiedProcessLog())return;
|
|
|
+ if (!this.verifiedProcessLog()) return;
|
|
|
window.tempTip.setDuration(9999);
|
|
|
window.tempTip.setIndex(1999);
|
|
|
window.tempTip.waitingTip('操作中请稍后');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
window.tempTip.setDuration(2000);
|
|
|
- if (res.data.success){
|
|
|
+ if (res.data.success) {
|
|
|
window.tempTip.showSuccess('创建成功');
|
|
|
- this.$set(this.workOrders[this.processLog.index],'process_log',res.data.data);
|
|
|
+ this.$set(this.workOrders[this.processLog.index], 'process_log', res.data.data);
|
|
|
$('#work-order-process-log-modal').modal('hide');
|
|
|
- } else{
|
|
|
+ } else {
|
|
|
window.tempTip.show(res.data.message ? res.data.message : '创建异常,刷新页面重试');
|
|
|
}
|
|
|
- }).catch(err=>{
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.setDuration(2000);
|
|
|
window.tempTip.show(err);
|
|
|
});
|
|
|
},
|
|
|
- updateWorkOrderStatus(item,e,i){
|
|
|
+ updateWorkOrderStatus(item, e, i) {
|
|
|
let url = "{{route('workOrder.updateWorkOrderStatusApi')}}";
|
|
|
let data = {
|
|
|
- id:item.id,
|
|
|
- work_order_status:e.target.value
|
|
|
+ id: item.id,
|
|
|
+ work_order_status: e.target.value
|
|
|
}
|
|
|
window.tempTip.waitingTip('处理中......');
|
|
|
window.tempTip.setDuration('1999');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
window.tempTip.setDuration('1999');
|
|
|
- if (res.data.success){
|
|
|
+ if (res.data.success) {
|
|
|
item.work_order_status = data.work_order_status;
|
|
|
window.tempTip.showSuccess('修改成功');
|
|
|
- return ;
|
|
|
+ return;
|
|
|
}
|
|
|
window.tempTip.show(res.data.message ? res.data.message : '修改失败');
|
|
|
- }).catch(err=>{
|
|
|
- window.tempTip.show('修饰异常:'+err);
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.show('修饰异常:' + err);
|
|
|
});
|
|
|
},
|
|
|
- verifiedProcessLog(){ // 校验处理信息
|
|
|
+ verifiedProcessLog() { // 校验处理信息
|
|
|
window.tempTip.setIndex(1999);
|
|
|
window.tempTip.setDuration(2000);
|
|
|
- if(this.processLog.is_indemnity === null){
|
|
|
+ if (this.processLog.is_indemnity === null) {
|
|
|
window.tempTip.show('选择处理方式');
|
|
|
return false;
|
|
|
}
|
|
|
- if (this.processLog.type === 1 && this.processLog.indemnitor == null){
|
|
|
+ if (this.processLog.type === 1 && this.processLog.indemnitor == null) {
|
|
|
window.tempTip.show('指定赔偿方');
|
|
|
return false;
|
|
|
}
|
|
|
- if(this.processLog.is_indemnity === '1'){
|
|
|
- if (!this.processLog.indemnity ){
|
|
|
+ if (this.processLog.is_indemnity === '1') {
|
|
|
+ if (!this.processLog.indemnity) {
|
|
|
window.tempTip.show('填写赔偿金额');
|
|
|
return false;
|
|
|
}
|
|
|
- }else if (this.processLog.is_indemnity === '2'){
|
|
|
- if (this.processLog.remark ===null || this.processLog.remark.trim(' ').length === 0){
|
|
|
+ } else if (this.processLog.is_indemnity === '2') {
|
|
|
+ if (this.processLog.remark === null || this.processLog.remark.trim(' ').length === 0) {
|
|
|
window.tempTip.show('填写不赔偿理由');
|
|
|
return false;
|
|
|
}
|