|
|
@@ -73,10 +73,18 @@
|
|
|
批量修改退回状态
|
|
|
</button>
|
|
|
@endcan
|
|
|
+ @can('订单管理-工单处理-宝时编辑')
|
|
|
+ <button type="button" class="ml-1 btn btn-outline-primary btn-sm"
|
|
|
+ v-show="checkData.length > 0"
|
|
|
+ @click="showBatchOthersExpressRemission">
|
|
|
+ 批量处理赔偿金额与事故责任方
|
|
|
+ </button>
|
|
|
+ @endcan
|
|
|
|
|
|
</div>
|
|
|
<div>
|
|
|
- <table class="table table-sm table-striped table-hover table-bordered td-min-width-80 " id="table" :class="tableClass">
|
|
|
+ <table class="table table-sm table-striped table-hover table-bordered td-min-width-80 " id="table"
|
|
|
+ :class="tableClass">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th style="min-width: 100px">
|
|
|
@@ -95,7 +103,6 @@
|
|
|
<th style="min-width: 120px">承运人</th>
|
|
|
<th style="min-width: 120px">快递单号</th>
|
|
|
<th style="min-width: 120px">当前处理人</th>
|
|
|
- <th style="min-width: 120px">创建人</th>
|
|
|
<th style="min-width: 150px">情况说明</th>
|
|
|
<th style="min-width: 50px;max-width: 50px" v-text="hideRejectedBills ? '隐藏' :'展开' ">展开</th>
|
|
|
|
|
|
@@ -119,6 +126,8 @@
|
|
|
<th style="min-width: 75px">删除</th>
|
|
|
@endcan
|
|
|
<th style="min-width: 300px">资料</th>
|
|
|
+ <th style="min-width: 120px">创建人</th>
|
|
|
+
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
@@ -283,12 +292,11 @@
|
|
|
<td v-text="item.order_client_code"></td>
|
|
|
<td v-text="item.logisitc_name"></td>
|
|
|
<td>
|
|
|
- <div v-for="logistic_number in item.logistic_numbers">
|
|
|
- <span v-text="logistic_number"></span>
|
|
|
- </div>
|
|
|
+ <span class="m-0 p-0 d-inline-block"
|
|
|
+ v-for="logistic_number in item.logistic_numbers"
|
|
|
+ v-text="logistic_number"></span>
|
|
|
</td>
|
|
|
<td v-text="item.status"></td>
|
|
|
- <td v-text="item.creator ? item.creator.name : ''"></td>
|
|
|
<td v-text="item.result_explain ? item.result_explain: item.remark"></td>
|
|
|
<td class="p-0 m-0 w-50" style="width:30px;" v-if="i===0"
|
|
|
:rowspan="workOrders.length">
|
|
|
@@ -461,6 +469,7 @@
|
|
|
<td class="container" style="min-width: 500px">
|
|
|
@include('order.workOrder._work_order_details')
|
|
|
</td>
|
|
|
+ <td v-text="item.creator ? item.creator.name : ''"></td>
|
|
|
</tr>
|
|
|
</template>
|
|
|
</tbody>
|
|
|
@@ -483,6 +492,7 @@
|
|
|
@include('order.workOrder._order_commodity_info')
|
|
|
@include('order.workOrder._rejected_item_equals_order_commodity')
|
|
|
@include('order.workOrder._custom_rejected_status')
|
|
|
+ @include('order.workOrder._batch_order_dispose')
|
|
|
</div>
|
|
|
@endsection()
|
|
|
|
|
|
@@ -512,14 +522,16 @@
|
|
|
width: 100%;
|
|
|
}
|
|
|
|
|
|
- .logistic-table{
|
|
|
+ .logistic-table {
|
|
|
min-width: 775px;
|
|
|
max-width: 900px
|
|
|
}
|
|
|
- .owner-table{
|
|
|
+
|
|
|
+ .owner-table {
|
|
|
min-width: 775px;
|
|
|
max-width: 900px;
|
|
|
}
|
|
|
+
|
|
|
.baoShi-table {
|
|
|
min-width: 900px;
|
|
|
}
|
|
|
@@ -763,14 +775,20 @@
|
|
|
hideRejectedBills: false,
|
|
|
tableHeader: null,
|
|
|
toggleBtnHeight: 0,
|
|
|
+ batchOthers: {
|
|
|
+ logistic_express_remission: '',
|
|
|
+ bao_shi_express_remission: '',
|
|
|
+ userWorkGroupIds: [],
|
|
|
+ },
|
|
|
+ expressRemission: ['原单减免', '补发减免', '全部减免'],
|
|
|
},
|
|
|
computed: {
|
|
|
tableClass() {
|
|
|
- if(this.isBaoShi){
|
|
|
+ if (this.isBaoShi) {
|
|
|
return 'baoShi-table'
|
|
|
- }else if(this.isLogistic){
|
|
|
+ } else if (this.isLogistic) {
|
|
|
return 'logistic-table';
|
|
|
- } else if(this.isOwner){
|
|
|
+ } else if (this.isOwner) {
|
|
|
return 'owner-table';
|
|
|
}
|
|
|
}
|
|
|
@@ -932,6 +950,15 @@
|
|
|
{name: '超量退回', value: '超量退回'},
|
|
|
]
|
|
|
}
|
|
|
+ ], [
|
|
|
+ {
|
|
|
+ name: 'custom_rejected_status', type: 'select', placeholder: '退回标记',
|
|
|
+ data: [
|
|
|
+ {name: '无', value: '无'},
|
|
|
+ {name: '待退回', value: '待退回'},
|
|
|
+ {name: '退回中', value: '退回中'},
|
|
|
+ ]
|
|
|
+ },
|
|
|
]];
|
|
|
this.form = new query({
|
|
|
el: '#form_div',
|
|
|
@@ -1220,7 +1247,7 @@
|
|
|
return new Array(...logistic_numbers);
|
|
|
},
|
|
|
groupProcessLogs(workOrder) {
|
|
|
- return workOrder.details.map(e => e.process_logs ? e.process_logs : []).reduce((a, b) => a = [...a, ...b], []).sort((pre, cur) => cur.id - pre.id);
|
|
|
+ return workOrder.details.map(e => e.process_logs ? e.process_logs : []).reduce((a, b) => [...a, ...b], []).sort((pre, cur) => cur.id - pre.id);
|
|
|
},
|
|
|
createOrderIssue(item, tag) { // 生成问题件
|
|
|
let url = '{{route('workOrder.buildOrderIssueApi')}}';
|
|
|
@@ -1269,7 +1296,7 @@
|
|
|
}
|
|
|
return this.workOrders.filter((item) => {
|
|
|
if (!item.order || !item.order.packages) return false;
|
|
|
- return selected.includes(item.id + '');
|
|
|
+ return selected.includes(item.id);
|
|
|
});
|
|
|
},
|
|
|
exportText() {
|
|
|
@@ -3440,9 +3467,11 @@
|
|
|
},
|
|
|
formStoreProcessLog(work_order_detail_id, worK_order_id) {
|
|
|
let url = "{{route('workOrder.processLog.storeApi')}}";
|
|
|
+ let tagDoc = document.getElementById(work_order_detail_id + '_log_check');
|
|
|
let data = {
|
|
|
id: worK_order_id,
|
|
|
content: document.getElementById('addWorkOrderProcessLogFormInput_' + work_order_detail_id).value,
|
|
|
+ tag: tagDoc ? tagDoc.value : 0
|
|
|
};
|
|
|
this.waitingTempTip('处理中');
|
|
|
window.axios.post(url, data).then(res => {
|
|
|
@@ -3451,6 +3480,8 @@
|
|
|
this.pushProcessLog(res.data.data);
|
|
|
this.successTempTip('处理完成');
|
|
|
this.showAddDiv('addWorkOrderProcessLogForm' + work_order_detail_id);
|
|
|
+ document.getElementById('addWorkOrderProcessLogFormInput_' + work_order_detail_id).value = '';
|
|
|
+ if(tagDoc)tagDoc = false;
|
|
|
this.$forceUpdate();
|
|
|
return;
|
|
|
}
|
|
|
@@ -3524,6 +3555,7 @@
|
|
|
this.workOrders.forEach((e, index) => {
|
|
|
let has = e.details.filter(detail => `${detail.id}` === `${work_order_detail_id}`).length > 0;
|
|
|
if (has) {
|
|
|
+ process_log.tag = process_log.tag + '';
|
|
|
this.workOrders[index]['process_logs'].unshift(process_log);
|
|
|
if (this.isBaoShi) {
|
|
|
this.workOrders[index]['bao_shi_tag'] = '1'
|
|
|
@@ -3786,6 +3818,70 @@
|
|
|
checkAll(e) {
|
|
|
this.checkData = e.target.checked ? this.workOrders.map(e => e.id) : []
|
|
|
},
|
|
|
+
|
|
|
+ workOrderProcessLogTagApi(item) {
|
|
|
+ let url = "{{route('workOrder.processLog.tagApi')}}"
|
|
|
+ let data = {
|
|
|
+ id: item.id
|
|
|
+ }
|
|
|
+ window.tempTip.waitingTip('处理中')
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip()
|
|
|
+ if (res.data.success) {
|
|
|
+ item.tag = '1';
|
|
|
+ this.successTempTip('标记成功');
|
|
|
+ } else {
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常');
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip()
|
|
|
+ this.errorTempTip(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showBatchOthersExpressRemission() {
|
|
|
+ if (this.checkData.length === 0) {
|
|
|
+ this.errorTempTip('请勾选需要处理工单')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ $("#batchOthersModel").modal('show');
|
|
|
+ },
|
|
|
+ batchOthersExpressRemission() {
|
|
|
+ let {logistic_express_remission, bao_shi_express_remission, userWorkGroupIds} = this.batchOthers;
|
|
|
+ let url = "{{route('workOrder.batchOthersApi')}}";
|
|
|
+ let data = {
|
|
|
+ ids: this.checkData,
|
|
|
+ logistic_express_remission: logistic_express_remission,
|
|
|
+ bao_shi_express_remission: bao_shi_express_remission,
|
|
|
+ userWorkGroupIds: userWorkGroupIds,
|
|
|
+ }
|
|
|
+
|
|
|
+ let userWorkGroupArray = this.userOwnerGroup.filter(e => {
|
|
|
+ return userWorkGroupIds.includes(e.id);
|
|
|
+ })
|
|
|
+ window.tempTip.waitingTip('处理中')
|
|
|
+ axios.post(url, data).then(res => {
|
|
|
+ window.tempTip.cancelWaitingTip();
|
|
|
+ if (res.data.success) {
|
|
|
+ this.successTempTip('处理完成')
|
|
|
+ this.workOrders.forEach(e => {
|
|
|
+ if (this.checkData.includes(e.id)) {
|
|
|
+ if (logistic_express_remission) e.logistic_express_remission = logistic_express_remission;
|
|
|
+ if (bao_shi_express_remission) e.bao_shi_express_remission = bao_shi_express_remission
|
|
|
+ if (userWorkGroupIds) e.user_work_groups = e.user_work_groups.concat(userWorkGroupArray)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.batchOthers.logistic_express_remission = ''
|
|
|
+ this.batchOthers.bao_shi_express_remission = ''
|
|
|
+ this.batchOthers.userWorkGroupIds = []
|
|
|
+ } else {
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理出现异常');
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ window.tempTip.cancelWaitingTip()
|
|
|
+ this.errorTempTip(err)
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
});
|
|
|
</script>
|