|
|
@@ -65,7 +65,13 @@
|
|
|
审核
|
|
|
</button>
|
|
|
@endcan
|
|
|
- <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>
|
|
|
+
|
|
|
+ <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,1)" v-if="['快递丢件','破损'].includes(item['issue_type']['name'])">宝时处理</button>
|
|
|
+
|
|
|
</td>
|
|
|
<td class="text-center">@{{ item.status }}</td>
|
|
|
<td class="text-center">@{{ item.owner ? item.owner.name : '' }}</td>
|
|
|
@@ -217,7 +223,7 @@
|
|
|
@include('order.workOrder._edit_issue_type')
|
|
|
@endcan
|
|
|
@include('order.workOrder._fill_loss_work_order')
|
|
|
-
|
|
|
+ @include('order.workOrder._edit_process_log')
|
|
|
</div>
|
|
|
</div>
|
|
|
@endsection()
|
|
|
@@ -268,6 +274,15 @@
|
|
|
refundImages:[], // 退款图
|
|
|
dealImages:[], // 交易图
|
|
|
},
|
|
|
+ processLog:{
|
|
|
+ id:null, // log->id
|
|
|
+ index:'', // 下标
|
|
|
+ work_order_id:null, // work_order_id
|
|
|
+ type:null, // 类型
|
|
|
+ is_indemnity:null, // 是否赔偿
|
|
|
+ indemnity:null, // 金额
|
|
|
+ remark:null,
|
|
|
+ },
|
|
|
selectOrderPackage: null,
|
|
|
selectOrder: null,
|
|
|
selectOrderIssue: null,
|
|
|
@@ -719,8 +734,88 @@
|
|
|
}).catch(err=>{
|
|
|
window.template.show(err);
|
|
|
});
|
|
|
+ },
|
|
|
+ showEditLog(item,index,type){
|
|
|
+ this.processLog.type = type;
|
|
|
+ this.processLog.index = index;
|
|
|
+ this.processLog.work_order_id = item.id;
|
|
|
+ this.processLog.indemnity = null;
|
|
|
+ this.processLog.is_indemnity = null;
|
|
|
+ this.processLog.remark = null;
|
|
|
+ $("#work-order-process-log-modal").modal('show');
|
|
|
+ },
|
|
|
+ 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,
|
|
|
+ };
|
|
|
+ if(!this.verifiedProcessLog())return;
|
|
|
+ window.tempTip.setDuration(9999);
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.waitingTip('操作中请稍后');
|
|
|
+ window.axios.post(url,data).then(res=>{
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ if (res.data.success){
|
|
|
+ window.tempTip.showSuccess('创建成功');
|
|
|
+ this.$set(this.workOrders[this.processLog.index],'logisticLog',res.data.data);
|
|
|
+ } else{
|
|
|
+ window.tempTip.show(res.data.message ? res.data.message : '创建异常,刷新页面重试');
|
|
|
+ }
|
|
|
+ }).catch(err=>{
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.show(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 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,
|
|
|
+ };
|
|
|
+ if(!this.verifiedProcessLog())return;
|
|
|
+ window.tempTip.setDuration(9999);
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.waitingTip('操作中请稍后');
|
|
|
+ window.axios.post(url,data).then(res=>{
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ if (res.data.success){
|
|
|
+ window.tempTip.showSuccess('创建成功');
|
|
|
+ this.$set(this.workOrders[this.processLog.index],'processLog',res.data.data);
|
|
|
+ } else{
|
|
|
+ window.tempTip.show(res.data.message ? res.data.message : '创建异常,刷新页面重试');
|
|
|
+ }
|
|
|
+ }).catch(err=>{
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ window.tempTip.show(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ verifiedProcessLog(){
|
|
|
+ window.tempTip.setIndex(1999);
|
|
|
+ window.tempTip.setDuration(2000);
|
|
|
+ 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){
|
|
|
+ window.tempTip.show('填写不赔偿理由');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
});
|
|
|
</script>
|