|
|
@@ -38,6 +38,10 @@
|
|
|
<button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="batchStoreLogsModel">
|
|
|
批量处理说明
|
|
|
</button>
|
|
|
+ <span class="ml-1">
|
|
|
+ <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="batchOthersModel">
|
|
|
+ 批量处理赔偿金额与事故责任方
|
|
|
+ </button>
|
|
|
</span>
|
|
|
@endcan
|
|
|
<span class="ml-1">
|
|
|
@@ -54,9 +58,14 @@
|
|
|
@cannot('订单管理-问题件-客户不可见')
|
|
|
@can('订单管理-问题件-财务确认')
|
|
|
<span class="ml-1">
|
|
|
- <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="financeConfirm">
|
|
|
+ <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="financeConfirm('是')">
|
|
|
批量财务确认
|
|
|
</button>
|
|
|
+ </span>
|
|
|
+ <span class="ml-1">
|
|
|
+ <button type="button" class="btn btn-outline-dark btn-sm form-control-sm tooltipTarget" @click="financeConfirm('否')">
|
|
|
+ 批量财务确认取消
|
|
|
+ </button>
|
|
|
</span>
|
|
|
@endcan
|
|
|
@can('订单管理-问题件-批量归档')
|
|
|
@@ -151,7 +160,7 @@
|
|
|
<th class="three-layer align-middle" rowspan="2" style="min-width: 120px">宝时赔偿金额</th>
|
|
|
<th class="three-layer align-middle" rowspan="2" style="min-width: 120px">宝时快递减免</th>
|
|
|
@cannot('订单管理-问题件-客户不可见')
|
|
|
- <th class="three-layer align-middle" rowspan="2" style="min-width: 120px">事故责任方</th>
|
|
|
+ <th class="three-layer align-middle" rowspan="2" style="min-width: 200px">事故责任方</th>
|
|
|
<th class="align-middle" rowspan="2" style="min-width: 120px">操作</th>
|
|
|
@endcannot
|
|
|
</tr>
|
|
|
@@ -533,10 +542,38 @@
|
|
|
</td>
|
|
|
@cannot('订单管理-问题件-客户不可见')
|
|
|
<td class="child-layer-3">
|
|
|
- <select class="form-control form-control-sm" :value="orderIssue.user_workgroup_id" @change="updateOrderIssue(orderIssue,'user_workgroup_id',$event)">
|
|
|
- <option value></option>
|
|
|
- <option v-for="item in userWorkGroup" :value="item.name">@{{ item.value }}</option>
|
|
|
- </select>
|
|
|
+ <table class="table table-sm">
|
|
|
+ <tr colspan="2">
|
|
|
+ <td colspan="2">
|
|
|
+ <select class="form-control form-control-sm" @change="addUserWorkgroup(orderIssue,'user_workgroup_id',$event)">
|
|
|
+ <option value></option>
|
|
|
+ <option v-for="item in userWorkGroup" :value="item.name">@{{ item.value }}</option>
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(user_workgroup,j) in orderIssue.user_workgroups" v-if="j<2 || orderIssue.is_show_user_workgroup">
|
|
|
+ <td>@{{ user_workgroup.name }}</td>
|
|
|
+ <td>
|
|
|
+ <button class="btn btn-sm btn-outline-danger"
|
|
|
+ @click="deleteUserWorkgroup(user_workgroup,j,orderIssue)">
|
|
|
+ 删除
|
|
|
+ </button>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="2" v-if="orderIssue.user_workgroups.length > 2">
|
|
|
+ <div class="row" @click="showUserWorkgroup(orderIssue)" v-if="orderIssue.user_workgroups.length > 2">
|
|
|
+ <label class="text-center mt-0 p-0 cursor-pointer offset-5">
|
|
|
+ <span class="fa"
|
|
|
+ :class="orderIssue.is_show_user_workgroup ? 'fa-angle-double-down' : 'fa-angle-double-right'"></span>
|
|
|
+ <span v-if="orderIssue.is_show_user_workgroup">收起</span><span
|
|
|
+ v-if="!orderIssue.is_show_user_workgroup">展开</span>共@{{ orderIssue.user_workgroups.length }} 条
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
</td>
|
|
|
<td>
|
|
|
@can('订单管理-问题件-编辑')
|
|
|
@@ -574,6 +611,46 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="modal fade" id="batchOthersModel" tabindex="-1" role="dialog" aria-labelledby="othersLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog modal-dialog-centered">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5 class="modal-title" id="othersLabel">承运商赔偿金额</h5>
|
|
|
+ <input type="number" v-model="edit.batchOthers.logistic_indemnity_money" class="form-control form-control-sm">
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5 class="modal-title" id="othersLabel">承运商快递减免</h5>
|
|
|
+ <select class="form-control form-control-sm" v-model="edit.batchOthers.logistic_express_remission">
|
|
|
+ <option disabled value="">请选择</option>
|
|
|
+ <option v-for="item in expressRemission" :value="item">@{{ item }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5 class="modal-title" id="othersLabel">宝时赔偿金额</h5>
|
|
|
+ <input type="number" v-model="edit.batchOthers.baoshi_indemnity_money" class="form-control form-control-sm">
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5 class="modal-title" id="othersLabel">宝时快递减免</h5>
|
|
|
+ <select class="form-control form-control-sm" v-model="edit.batchOthers.baoshi_express_remission">
|
|
|
+ <option disabled value="">请选择</option>
|
|
|
+ <option v-for="item in expressRemission" :value="item">@{{ item }}</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="modal-body" >
|
|
|
+ <h5 class="modal-title" id="logsLabel">事故责任方</h5>
|
|
|
+ <span v-for="item in userWorkGroup">
|
|
|
+ <input v-model="edit.batchOthers.userWorkGroupIds" type="checkbox" name="vehicle" :value="item.name" /> @{{ item.value }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
|
|
|
+ <button type="button" class="btn btn-primary" data-dismiss="modal" @click="batchOthers()">确认</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
{{--delete OrderIssue--}}
|
|
|
<div class="modal fade" id="alertModal" tabindex="-1" role="dialog" aria-labelledby="alertModalLabel"
|
|
|
@@ -723,6 +800,13 @@
|
|
|
message:{},
|
|
|
edit:{
|
|
|
batchStoreLogs:'',
|
|
|
+ batchOthers:{
|
|
|
+ logistic_indemnity_money: null ,
|
|
|
+ logistic_express_remission: null,
|
|
|
+ baoshi_indemnity_money: null,
|
|
|
+ baoshi_express_remission: null,
|
|
|
+ userWorkGroupIds: []
|
|
|
+ },
|
|
|
isShow:[],
|
|
|
addSendOrderIssueID:'',
|
|
|
orderIssue: {id: null,showId:''},
|
|
|
@@ -735,6 +819,7 @@
|
|
|
_this.regroupOrder(orderIssue.second_order);
|
|
|
_this.regroupRejectedBill(orderIssue);
|
|
|
_this.regroupLogs(orderIssue);
|
|
|
+ _this.regroupUserGroup(orderIssue);
|
|
|
});
|
|
|
},
|
|
|
mounted: function () {
|
|
|
@@ -777,6 +862,7 @@
|
|
|
},
|
|
|
{name: 'logistic_number_return', type: 'input', tip: '退回单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '退回单号'},
|
|
|
{name: 'send_client_code', type: 'input', tip: '二次订单号:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '二次订单号'},
|
|
|
+ {name: 'finance_confirm', type: 'select', tip: '财务却认', placeholder: '财务却认是/否', data:[{name: '是',value:'是'},{name: '否',value:'否'}]},
|
|
|
], [
|
|
|
{name: 'created_at_end', type: 'dateTime', tip: '登记结束日期'},
|
|
|
{name: 'consignee_name', type: 'input', tip: '收货人名称:前或后加百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '收货人名称'},
|
|
|
@@ -785,6 +871,7 @@
|
|
|
{name: 'good_name', type: 'input', tip: '商品名:前或后加 百分号为单个模糊搜索,否则为多条件精确搜索', placeholder: '商品名'},
|
|
|
{name: 'id_quality_label', type: 'select', tip: '是否正品', placeholder: '是否正品', data: this.qualityLabel},
|
|
|
{name: 'is_imported', type: 'select', tip: '是否导入处理', placeholder: '是否导入处理', data: imported_status},
|
|
|
+ {name: 'user_workgroups', type: 'select_multiple_select', tip: ['事故责任方',''], placeholder: ['事故责任方',''], data: this.userWorkGroup},
|
|
|
],[
|
|
|
@cannot('订单管理-问题件-客户不可见')
|
|
|
{name: 'logistic_indemnity_money', type: 'select', tip: '承运商赔偿金额', placeholder: '承运商赔偿金额',data:[{name: '是',value:'是'},{name: '否',value:'否'}]},
|
|
|
@@ -893,6 +980,9 @@
|
|
|
orderIssue.log_is_show = false;
|
|
|
}
|
|
|
},
|
|
|
+ regroupUserGroup(orderIssue){
|
|
|
+ orderIssue.is_show_user_workgroup = false;
|
|
|
+ },
|
|
|
displayDelBtn(bool,e){
|
|
|
if(bool)$(e.target).next().removeClass('d-none');
|
|
|
else {
|
|
|
@@ -1332,6 +1422,14 @@
|
|
|
}
|
|
|
$("#batchStoreLogsModel").modal('show');
|
|
|
},
|
|
|
+ batchOthersModel(){
|
|
|
+ if(this.checkData.length === 0){
|
|
|
+ tempTip.setDuration(2000)
|
|
|
+ tempTip.show('没有勾选内容')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $("#batchOthersModel").modal('show');
|
|
|
+ },
|
|
|
batchStoreLogs(){
|
|
|
let _this = this;
|
|
|
let data = {orderIssueIds:this.checkData,content:this.edit.batchStoreLogs};
|
|
|
@@ -1358,6 +1456,32 @@
|
|
|
tempTip.show('处理结果添加异常:'+error)
|
|
|
})
|
|
|
},
|
|
|
+ batchOthers(){
|
|
|
+ let _this = this;
|
|
|
+ let data = {
|
|
|
+ orderIssueIds:this.checkData,
|
|
|
+ logistic_indemnity_money: this.edit.batchOthers.logistic_indemnity_money,
|
|
|
+ logistic_express_remission: this.edit.batchOthers.logistic_express_remission,
|
|
|
+ baoshi_indemnity_money: this.edit.batchOthers.baoshi_indemnity_money,
|
|
|
+ baoshi_express_remission: this.edit.batchOthers.baoshi_express_remission,
|
|
|
+ userWorkGroupIds: this.edit.batchOthers.userWorkGroupIds,
|
|
|
+ };
|
|
|
+ window.tempTip.postBasicRequest('{{url("apiLocal/order/issue/batchOthers")}}', data, res => {
|
|
|
+ if (_this.edit.batchOthers.logistic_indemnity_money) {
|
|
|
+ _this.orderIssuesEdit(_this.checkData, "logistic_indemnity_money", _this.edit.batchOthers.logistic_indemnity_money);
|
|
|
+ }
|
|
|
+ if (_this.edit.batchOthers.logistic_express_remission) {
|
|
|
+ _this.orderIssuesEdit(_this.checkData, "logistic_express_remission", _this.edit.batchOthers.logistic_express_remission);
|
|
|
+ }
|
|
|
+ if (_this.edit.batchOthers.baoshi_indemnity_money) {
|
|
|
+ _this.orderIssuesEdit(_this.checkData, "baoshi_indemnity_money", _this.edit.batchOthers.baoshi_indemnity_money);
|
|
|
+ }
|
|
|
+ if (_this.edit.batchOthers.baoshi_express_remission) {
|
|
|
+ _this.orderIssuesEdit(_this.checkData, "baoshi_express_remission", _this.edit.batchOthers.baoshi_express_remission);
|
|
|
+ }
|
|
|
+ return "批量修改完成";
|
|
|
+ });
|
|
|
+ },
|
|
|
editSecondClientNo(orderIssue,e){
|
|
|
let value = $(e.target).val()
|
|
|
let data = {id:orderIssue.id,secondClientNo:value}
|
|
|
@@ -1464,23 +1588,32 @@
|
|
|
tempTip.show('处理导入出现异常'+error)
|
|
|
})
|
|
|
},
|
|
|
- financeConfirm(){
|
|
|
+ financeConfirm(flag){
|
|
|
let _this= this
|
|
|
if(this.checkData.length === 0){
|
|
|
tempTip.setDuration(2000)
|
|
|
tempTip.show('没有勾选内容')
|
|
|
return;
|
|
|
}
|
|
|
- if(!confirm('是否进行财务确认'))return;
|
|
|
+ if (flag=='是') {
|
|
|
+ if (!confirm('是否进行财务确认')) return;
|
|
|
+ }else{
|
|
|
+ if (!confirm('是否取消财务确认')) return;
|
|
|
+ }
|
|
|
let data = {ids:this.checkData};
|
|
|
tempTip.setDuration(9999);
|
|
|
tempTip.waitingTip('处理中.......');
|
|
|
+ data.flag = flag;
|
|
|
axios.post('{{url('apiLocal/order/issue/financeConfirm')}}',data)
|
|
|
.then(function(response){
|
|
|
tempTip.cancelWaitingTip();
|
|
|
if(response.data.success){
|
|
|
tempTip.setDuration(2000);
|
|
|
- tempTip.showSuccess('确认成功');
|
|
|
+ if (flag=='是') {
|
|
|
+ tempTip.showSuccess('确认成功');
|
|
|
+ }else{
|
|
|
+ tempTip.showSuccess('取消成功');
|
|
|
+ }
|
|
|
_this.orderIssuesEdit(data.ids,'finance_confirm','是');
|
|
|
return;
|
|
|
}
|
|
|
@@ -1626,6 +1759,30 @@
|
|
|
tempTip.setDuration(2000);
|
|
|
tempTip.show(error);
|
|
|
});
|
|
|
+ },
|
|
|
+ addUserWorkgroup(orderIssue,user_workgroup_id,e) {
|
|
|
+ let value = $(e.target).val()
|
|
|
+ window.tempTip.postBasicRequest("{{url('apiLocal/order/issue/userWorkgroups/add')}}", {
|
|
|
+ orderIssueId: orderIssue.id,
|
|
|
+ userWorkgroupId: value
|
|
|
+ }, res => {
|
|
|
+ orderIssue.user_workgroups.unshift(res);
|
|
|
+ return "添加事故责任方成功!";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deleteUserWorkgroup(user_workgroup,index,orderIssue) {
|
|
|
+ window.tempTip.postBasicRequest("{{url('apiLocal/order/issue/userWorkgroups/delete')}}", {
|
|
|
+ orderIssueId: orderIssue.id,
|
|
|
+ userWorkgroupId: user_workgroup.id
|
|
|
+ }, res => {
|
|
|
+ orderIssue.user_workgroups.splice(index, 1);
|
|
|
+ this.$forceUpdate();
|
|
|
+ return "删除事故责任方成功!";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ showUserWorkgroup(orderIssue) {
|
|
|
+ orderIssue.is_show_user_workgroup = !orderIssue.is_show_user_workgroup;
|
|
|
+ this.$forceUpdate();
|
|
|
}
|
|
|
}
|
|
|
})
|