|
|
@@ -29,7 +29,7 @@
|
|
|
@can('订单管理-工单处理-宝时编辑')
|
|
|
<button type="button"
|
|
|
class="ml-1 btn btn-outline-info btn-sm"
|
|
|
- @click="batchEdit()">批量复制单号
|
|
|
+ @click="batchEdit()">批量编辑工单
|
|
|
</button>
|
|
|
@endcan
|
|
|
|
|
|
@@ -58,7 +58,9 @@
|
|
|
<span v-text="item.id"></span>
|
|
|
<br v-show="item.is_issue_order">
|
|
|
<a :href="'{{url("order/issue/index")}}'+'?orderCode='+item.orderno"
|
|
|
- target="order/issue/index?addtime=15">
|
|
|
+ target="order/issue/index?addtime=15"
|
|
|
+ v-show="item.is_issue_order">
|
|
|
+
|
|
|
<span class="badge badge-primary">问题件</span>
|
|
|
</a>
|
|
|
<br>
|
|
|
@@ -116,14 +118,6 @@
|
|
|
</button>
|
|
|
<br v-show="canLogisticEdit(item)">
|
|
|
|
|
|
- <button class="btn btn-sm"
|
|
|
- style="background-color:#bf674e;color: #FFFFFF;border-color: #9a3d23"
|
|
|
- v-show="canLogisticEdit(item)"
|
|
|
- @click="logisticShowEdit(item,i)">
|
|
|
- 重新编辑
|
|
|
- </button>
|
|
|
- <br v-show="canLogisticEdit(item)">
|
|
|
-
|
|
|
|
|
|
<button
|
|
|
class="btn btn-sm"
|
|
|
@@ -225,6 +219,7 @@
|
|
|
@include('order.workOrder._bao_shi_fill_work_order_modal')
|
|
|
@include('order.workOrder._logistic_fill_work_order_modal')
|
|
|
@include('order.workOrder._owner_fill_work_order_modal')
|
|
|
+ @include('order.workOrder._batch_edit_work_order');
|
|
|
</div>
|
|
|
@endsection()
|
|
|
|
|
|
@@ -432,6 +427,7 @@
|
|
|
dialogShowLogisticVisible: false,
|
|
|
dialogEditLogisticVisible: false,
|
|
|
dialogShowOrderWorkVisible: false,
|
|
|
+ dialogBatchEditBaoShiVisible: false,
|
|
|
batchEditWorkOrder: {
|
|
|
TypeName: '',
|
|
|
process_progress: '',
|
|
|
@@ -2737,9 +2733,11 @@
|
|
|
return false;
|
|
|
},
|
|
|
batchEdit() {
|
|
|
- let editWorkOrders = this.workOrders.forEach(e => checkData.includes(e.id));
|
|
|
+ let editWorkOrders = this.workOrders.filter(e => {
|
|
|
+ return checkData.includes(`${e.id}`);
|
|
|
+ });
|
|
|
let editWorkOrder = editWorkOrders.find(e => e);
|
|
|
- let count = editWorkOrders.filter(e => e.status === editWorkOrder.status && e.issue_type_name === editWorkOrder.issue_type_name);
|
|
|
+ let count = editWorkOrders.filter(e => e.status !== editWorkOrder.status || e.current_issue_type !== editWorkOrder.current_issue_type).length;
|
|
|
if (count > 0) {
|
|
|
this.errorTempTip('当前勾选工单部分状态,类型不符合');
|
|
|
return;
|
|
|
@@ -2749,48 +2747,59 @@
|
|
|
p_process_progress: editWorkOrder.process_progress,
|
|
|
process_progress: '',
|
|
|
};
|
|
|
-
|
|
|
- $("#edit-work-order-modal").modal("show")
|
|
|
+ this.dialogBatchEditBaoShiVisible = true;
|
|
|
},
|
|
|
- getEditWorkOrderProcessProgress() {
|
|
|
+ getEditWorkOrderProcessProgress(batchEditWorkOrder) {
|
|
|
+ let {p_process_progress, TypeName} = batchEditWorkOrder;
|
|
|
let editWorkOrderProcessProgressObj = [{
|
|
|
name: '拦截', options: {
|
|
|
success: ['成功已退回,不赔偿', '拦截在途丢件,赔偿'],
|
|
|
- filed: ['无法拦截'],},
|
|
|
- }, {name: '信息更改', options: {
|
|
|
+ filed: ['无法拦截'],
|
|
|
+ },
|
|
|
+ }, {
|
|
|
+ name: '信息更改', options: {
|
|
|
success: ['更改成功'],
|
|
|
filed: ['更改失败'],
|
|
|
- },}];
|
|
|
- let processProgressObj = editWorkOrderProcessProgressObj.find(e=>this.batchEditWorkOrder.TypeName === e.name);
|
|
|
- if (processProgressObj.name === '拦截'){
|
|
|
- if (this.batchEditWorkOrder.process_progress === '已处理') return processProgressObj.success;
|
|
|
- if (this.batchEditWorkOrder.process_progress === '已签收') return processProgressObj.filed;
|
|
|
- } else if (processProgressObj.name === '信息更改') {
|
|
|
- if (this.batchEditWorkOrder.process_progress === '已处理') return processProgressObj.success;
|
|
|
- if (this.batchEditWorkOrder.process_progress === '无法更改') return processProgressObj.filed;
|
|
|
+ },
|
|
|
+ }];
|
|
|
+ let processProgressObj = editWorkOrderProcessProgressObj.find(e => TypeName === e.name);
|
|
|
+ let {options, name} = processProgressObj;
|
|
|
+ let option = [];
|
|
|
+ if (name === '拦截') {
|
|
|
+ if (p_process_progress === '拦截退回中') option = options.success;
|
|
|
+ if (p_process_progress === '拦截失败') option = options.filed;
|
|
|
+ } else if (name === '信息更改') {
|
|
|
+ if (p_process_progress === '已处理') option = options.success;
|
|
|
+ if (p_process_progress === '无法更改') option = options.filed;
|
|
|
}
|
|
|
- return [];
|
|
|
+ return option;
|
|
|
},
|
|
|
- batchEditWorkOrderFunc(){
|
|
|
- let {TypeName,process_progress} = this.batchEditWorkOrder;
|
|
|
- if (!process_progress){
|
|
|
+ batchEditWorkOrderFunc() {
|
|
|
+ let {TypeName, process_progress} = this.batchEditWorkOrder;
|
|
|
+ if (!process_progress) {
|
|
|
this.errorTempTip('选择处理结果');
|
|
|
return;
|
|
|
}
|
|
|
let url = null;
|
|
|
- if ("拦截" === TypeName){
|
|
|
+ if ("拦截" === TypeName) {
|
|
|
url = '{{route('workOrder.intercept.baoShi.batchReviewApi')}}';
|
|
|
+ } else if ('信息更改' === TypeName){
|
|
|
+ url = '{{route('workOrder.informationChange.baoShi.batchReviewApi')}}'
|
|
|
}
|
|
|
- let data = {ids:checkData,process_progress:process_progress};
|
|
|
+ let data = {ids: checkData, process_progress: process_progress};
|
|
|
this.waitingTempTip('处理中');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
- if (res.data.success){
|
|
|
- this.successTempTip('处理完成');
|
|
|
+ if (res.data.success) {
|
|
|
+ this.successTempTip('处理完成,刷新页面展示');
|
|
|
+ this.dialogBatchEditBaoShiVisible = false;
|
|
|
+ this.workOrders.forEach(e=>{
|
|
|
+ if (checkData.includes(`${e.id}`))e.process_progress = process_progress;
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
this.waitingTempTip(res.data.message ? res.data.message : '处理异常');
|
|
|
- }).catch(err=>{
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.cancelWaitingTip();
|
|
|
this.errorTempTip(err);
|
|
|
});
|