|
|
@@ -2,6 +2,7 @@
|
|
|
@section('title','处理工单')
|
|
|
@section('head')
|
|
|
<link href="{{ mix('css/element-ui.css') }}" rel="stylesheet">
|
|
|
+ <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
|
@endsection
|
|
|
|
|
|
@section("content")
|
|
|
@@ -63,7 +64,7 @@
|
|
|
<span v-show="isStrandWorkOrder(item)"
|
|
|
class="badge badge-danger bg-warning text-break"
|
|
|
@click="showStoreProcessLog(item,i)">滞</span>
|
|
|
- @elsecan('订单管理-工单处理-承运商编辑')
|
|
|
+ @elsecan('订单管理-工单处理-承运商编辑')
|
|
|
@else
|
|
|
<span v-show="isStrandWorkOrder(item)"
|
|
|
class="badge badge-danger bg-warning text-break">滞</span>
|
|
|
@@ -83,6 +84,10 @@
|
|
|
<button class="btn btn-sm btn-outline-dark"
|
|
|
@click="showWorkOrderItem(item)">详情
|
|
|
</button>
|
|
|
+ <br>
|
|
|
+ <span class="badge btn-sm badge-info" style="cursor: default"
|
|
|
+ @click="showOrderCommoditiesInfo(item)">商品详情
|
|
|
+ </span>
|
|
|
</td>
|
|
|
<td>
|
|
|
@can('订单管理-订单问题件生成')
|
|
|
@@ -243,13 +248,16 @@
|
|
|
@include('order.workOrder._batch_edit_work_order')
|
|
|
@include('order.workOrder._edit_order_issue_log')
|
|
|
@include('order.workOrder._edit_process_log')
|
|
|
+ @include('order.workOrder._order_commodity_info')
|
|
|
</div>
|
|
|
@endsection()
|
|
|
|
|
|
@section("lastScript")
|
|
|
<script type="text/javascript" src="{{asset('js/queryForm/queryForm.js')}}"></script>
|
|
|
<script type="text/javascript" src="{{mix('js/queryForm/header.js')}}"></script>
|
|
|
- <script src="{{ mix('js/element-ui.js') }}"></script>
|
|
|
+ <script type="text/javascript" src="{{mix('js/element-ui.js') }}"></script>
|
|
|
+ <script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
|
+
|
|
|
<style>
|
|
|
.fade-enter-active {
|
|
|
transition: opacity .3s;
|
|
|
@@ -453,11 +461,12 @@
|
|
|
dialogShowOrderWorkVisible: false, // 工单详情
|
|
|
dialogBatchEditOrderIssueLogVisible: false, // 问题件日志
|
|
|
dialogProcessLogVisible: false, // 工单处理日志
|
|
|
+ dialogOrderCommoditiesVisible: false, // 订单商品详情
|
|
|
|
|
|
showProcessLogId: null, // workOrder->id
|
|
|
showAddDetailProcessLog: null, // workOrderDetail->ids
|
|
|
- showAddProcessLogFrom:null, //
|
|
|
- showAddProcessLogBtn:null,
|
|
|
+ showAddProcessLogFrom: null, //
|
|
|
+ showAddProcessLogBtn: null,
|
|
|
|
|
|
batchHandlerWorkOrder: {
|
|
|
issue_type_name: '',
|
|
|
@@ -468,7 +477,11 @@
|
|
|
select_id: '',
|
|
|
select_index: '',
|
|
|
content: '',
|
|
|
- }
|
|
|
+ },
|
|
|
+ orderInfo: {
|
|
|
+ commodities: [],
|
|
|
+ },
|
|
|
+ order_info_commodityes_key:1,
|
|
|
},
|
|
|
computed: {},
|
|
|
mounted() {
|
|
|
@@ -573,14 +586,15 @@
|
|
|
}
|
|
|
}],
|
|
|
},
|
|
|
- {name:'tags',type:'select',placeholder: '`新`,`滞`,`无`标签筛选',
|
|
|
+ {
|
|
|
+ name: 'tags', type: 'select', placeholder: '`新`,`滞`,`无`标签筛选',
|
|
|
data: [
|
|
|
- {name:3, value:'新'},
|
|
|
- {name:2, value:'滞'},
|
|
|
- {name:1, value:'无'},
|
|
|
+ {name: 3, value: '新'},
|
|
|
+ {name: 2, value: '滞'},
|
|
|
+ {name: 1, value: '无'},
|
|
|
],
|
|
|
},
|
|
|
- {name:'shop_name',type:'input',placeholder:'商铺名'},
|
|
|
+ {name: 'shop_name', type: 'input', placeholder: '商铺名'},
|
|
|
]];
|
|
|
this.form = new query({
|
|
|
el: '#form_div',
|
|
|
@@ -594,7 +608,7 @@
|
|
|
{name: 'work_type', value: '工单类型', neglect: true},
|
|
|
{name: 'process_progress', value: '当前进度', neglect: true},
|
|
|
|
|
|
- {name: 'shop_name' , value: '店铺名称'},
|
|
|
+ {name: 'shop_name', value: '店铺名称'},
|
|
|
{name: 'owner', value: '客户', neglect: true},
|
|
|
{name: 'client_no', value: '客户订单号'},
|
|
|
{name: 'logistic_name', value: '承运人'},
|
|
|
@@ -719,7 +733,7 @@
|
|
|
$(e.target).text("记录共" + orderIssue.logs.length + "条,点击展开");
|
|
|
}
|
|
|
},
|
|
|
- toggleWorkOrderLogs(item,e,index){
|
|
|
+ toggleWorkOrderLogs(item, e, index) {
|
|
|
if (item.log_is_show === false) {
|
|
|
item.log_is_show = true;
|
|
|
$(e.target).text('点击收起');
|
|
|
@@ -749,6 +763,24 @@
|
|
|
workOrder.owner_name = workOrder.owner ? workOrder.owner.name : '';
|
|
|
workOrder.logisitc_name = workOrder.logistic ? workOrder.logistic.name : '';
|
|
|
workOrder.order_client_code = workOrder.order ? workOrder.order.client_code : '';
|
|
|
+ workOrder.order_commodities = this.groupOrderPackageCommodities(workOrder);
|
|
|
+ },
|
|
|
+ groupOrderPackageCommodities(workOrder) {
|
|
|
+ let order_packages = workOrder.order ? workOrder.order.packages : [];
|
|
|
+ if (order_packages.length === 0) return [];
|
|
|
+ return order_packages.map(e => {
|
|
|
+ let commodities = e.commodities ? e.commodities : [];
|
|
|
+ return commodities.map(item => {
|
|
|
+ return {
|
|
|
+ logistic_number: e.logistic_number,
|
|
|
+ order_commodities_id: item.id,
|
|
|
+ commodity_id: item.commodity_id,
|
|
|
+ name: item.commodity ? item.commodity.name : '',
|
|
|
+ sku: item.commodity ? item.commodity.sku : '',
|
|
|
+ amount: item.amount,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ }).reduce((p, n) => (p ? p : []).concat(n ? n : []));
|
|
|
},
|
|
|
groupPendingDetail(workOrder) {
|
|
|
let details = workOrder.details.filter(item => {
|
|
|
@@ -1743,9 +1775,9 @@
|
|
|
this.dialogShowLogisticVisible = true;
|
|
|
}
|
|
|
},
|
|
|
- logisticCheckDamage(){
|
|
|
+ logisticCheckDamage() {
|
|
|
let {commodities} = this.logisticEditWorkOrder;
|
|
|
- return commodities.filter(e=>Number(e.price) === 0).length > 0;
|
|
|
+ return commodities.filter(e => Number(e.price) === 0).length > 0;
|
|
|
},
|
|
|
logisticEdit() {
|
|
|
let {issue_type_name, commodities, detail_id, process_progress} = this.logisticEditWorkOrder;
|
|
|
@@ -1773,7 +1805,7 @@
|
|
|
this.errorTempTip(res.message);
|
|
|
return;
|
|
|
}
|
|
|
- if (this.logisticCheckDamage(0)){
|
|
|
+ if (this.logisticCheckDamage(0)) {
|
|
|
this.errorTempTip('破损商待补充,工单暂不可修改');
|
|
|
return;
|
|
|
}
|
|
|
@@ -3102,7 +3134,7 @@
|
|
|
this.processLogs.select_id = item.id;
|
|
|
this.processLogs.select_index = index;
|
|
|
},
|
|
|
- formStoreProcessLog(work_order_detail_id,worK_order_id){
|
|
|
+ formStoreProcessLog(work_order_detail_id, worK_order_id) {
|
|
|
let url = "{{route('workOrder.processLog.storeApi')}}";
|
|
|
let data = {
|
|
|
id: worK_order_id,
|
|
|
@@ -3114,7 +3146,7 @@
|
|
|
if (res.data.success) {
|
|
|
this.pushProcessLog(res.data.data);
|
|
|
this.successTempTip('处理完成');
|
|
|
- this.showAddDiv('addWorkOrderProcessLogForm'+work_order_detail_id);
|
|
|
+ this.showAddDiv('addWorkOrderProcessLogForm' + work_order_detail_id);
|
|
|
this.$forceUpdate();
|
|
|
return;
|
|
|
}
|
|
|
@@ -3137,7 +3169,7 @@
|
|
|
if (res.data.success) {
|
|
|
this.pushProcessLog(res.data.data);
|
|
|
this.successTempTip('处理完成');
|
|
|
- if (this.dialogProcessLogVisible)this.dialogProcessLogVisible = false;
|
|
|
+ if (this.dialogProcessLogVisible) this.dialogProcessLogVisible = false;
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
@@ -3181,36 +3213,43 @@
|
|
|
if (has) {
|
|
|
this.workOrders[index]['process_logs'].unshift(process_log);
|
|
|
if (this.isBaoShi) {
|
|
|
- this.workOrders[index]['bao_shi_tag'] = '1'
|
|
|
+ this.workOrders[index]['bao_shi_tag'] = '1'
|
|
|
} else if (this.isLogistic) {
|
|
|
- this.workOrders[index]['logistic_tag'] = '1';
|
|
|
+ this.workOrders[index]['logistic_tag'] = '1';
|
|
|
} else if (this.isOwner) {
|
|
|
- this.workOrders[index]['owner_tag'] = '1';
|
|
|
+ this.workOrders[index]['owner_tag'] = '1';
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- destroyProcessLog(item,log,index){
|
|
|
- if(!confirm('是否删除当前记录'))return;
|
|
|
+ destroyProcessLog(item, log, index) {
|
|
|
+ if (!confirm('是否删除当前记录')) return;
|
|
|
let url = "{{route('workOrder.processLog.destroyApi')}}"
|
|
|
let data = {
|
|
|
- id:log.id
|
|
|
+ id: log.id
|
|
|
};
|
|
|
this.waitingTempTip('处理中');
|
|
|
- window.axios.post(url,data).then(res=>{
|
|
|
+ window.axios.post(url, data).then(res => {
|
|
|
window.tempTip.cancelWaitingTip()
|
|
|
- if (res.data.success){
|
|
|
+ if (res.data.success) {
|
|
|
this.successTempTip('处理完成');
|
|
|
- item.process_logs.splice(index,1);
|
|
|
+ item.process_logs.splice(index, 1);
|
|
|
this.$forceUpdate();
|
|
|
return;
|
|
|
}
|
|
|
- this.errorTempTip(res.data.message ?res.data.message :'处理异常刷新后重试');
|
|
|
- }).catch(err=>{
|
|
|
+ this.errorTempTip(res.data.message ? res.data.message : '处理异常刷新后重试');
|
|
|
+ }).catch(err => {
|
|
|
window.tempTip.cancelWaitingTip()
|
|
|
this.errorTempTip(err)
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ showOrderCommoditiesInfo(item){
|
|
|
+ this.dialogOrderCommoditiesVisible = true;
|
|
|
+ this.orderInfo.commodities = item.order_commodities;
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
});
|
|
|
</script>
|