Commit ff8c0a39 by 黑潮

update: 排量发货联调

parent 7e94b0bf
<template>
<el-dialog :visible.sync="visible" title="批量发货" width="510px" @closed="$emit('close')">
<div>
<span><span style="color:#FF5152;margin-right:5px">*</span>导入文件:</span>
<div style="display:flex;position:relative">
<span style="flex-shrink:0;margin-top:10px"><span style="color:#FF5152;margin-right:5px">*</span>导入文件:</span>
<dm-upload-file
class="ml10 upload"
action="/api-welfare/delivery-order/batch-delivering"
width="70px"
:show-file-list="true"
:file-list="fileList"
:on-success="onSuccess"
:limit="1"
accept=".xls,.xlsx"
with-credentials
......@@ -15,10 +15,11 @@
<span slot="tip"></span>
<el-button icon="iconfont-components4 icon-cp-shangc upload-icon">上传</el-button>
</dm-upload-file>
<el-link class="ml20" type="primary" href="/static/批量发货模板.xlsx">下载批量发货的模版</el-link>
<el-link class="ml20" style="position:absolute;right:20px;top:10px" type="primary" href="/static/批量发货模板.xlsx">下载批量发货的模版</el-link>
</div>
<div class="mt10" style="margin-left:90px">
成功<span style="color:#2f54eb">{{successCount}}</span>条,失败<span style="color:#F5222d">{{failedCount}}</span>
<el-button class="ml10" type="text" @click="onViewDetail">查看详情</el-button>
</div>
<el-divider></el-divider>
<div style="color:#909399;font-size:12px">1.填入需要发货的发货单号、物流公司名称、物流公司编码、物流单号;</div>
......@@ -42,6 +43,7 @@ export default {
uploadHeader: {
isControl: true,
},
fileList: [],
};
},
mounted() {
......@@ -58,6 +60,17 @@ export default {
handleConfirm() {
this.visible = false;
},
onSuccess(res, fileList) {
this.fileList.push(fileList);
const { result } = res;
this.successCount = result.success;
this.failedCount = result.failure;
this.detailMessage = '';
this.$emit('refresh');
},
onViewDetail() {
this.$message.warning(this.detailMessage);
}
}
};
</script>
......
......@@ -14,7 +14,7 @@
<span class="ml120">
物流单号:
<span v-if="!isEditing">{{data.logisticsNo}}</span>
<dm-input-phone class="w160" v-else v-model="logisticsNo" placeholder="请输入"></dm-input-phone>
<dm-input-phone class="w160" v-else v-model="logisticsNo" placeholder="请输入" clearable></dm-input-phone>
</span>
<template v-if="logisticsList.length == 0">
<div v-if="!isEditing" class="fr">
......@@ -54,7 +54,7 @@
<script>
import fetch from '@/api/performance.js';
const { updateLogistics, getLogisticsInfo } = fetch;
const { delivering, getLogisticsInfo } = fetch;
export default {
props: {
......@@ -64,6 +64,8 @@ export default {
return {
visible: false,
logisticsList: [],
logisticsCompanyCode: '',
logisticsNo: '',
isEditing: false,
loading: false,
};
......@@ -73,18 +75,20 @@ export default {
this.getLogisticsInfo();
},
methods: {
handleConfirm() {
async handleConfirm() {
let logisticsCompany = {
'SF': '顺丰速递',
'STO': '中通快递'
};
this.loading = true;
updateLogistics({
await delivering({
companyName: logisticsCompany[this.logisticsCompanyCode],
companyCode: this.logisticsCompanyCode,
logisticsNo: this.logisticsNo,
deliveryId: this.data.deliveryId,
}).finally(() => this.loading = false);
this.visible = false;
this.$emit('refresh');
},
handleEdit() {
this.isEditing = true;
......@@ -94,8 +98,8 @@ export default {
async getLogisticsInfo() {
this.loading = true;
let { result } = await getLogisticsInfo({
companyCode: /* this.data.refundId */'YD',
logisticsNo: /* this.data.refundLogisticsNo */'4312317986451',
companyCode: this.data.logisticsCompanyCode/* 'YD' */,
logisticsNo: this.data.logisticsNo/* '4312317986451' */,
}).finally(() => this.loading = false);
this.logisticsList = result.traces || [];
this.logisticsList.reverse();
......
......@@ -66,14 +66,14 @@
trigger="hover">
<i class="iconfont-welfare4 icon-gengduo2" slot="reference"></i>
<div class="performance-order-info">
<div><span>退货单来源:</span><span>{{row.orderId}}</span></div>
<div><span>履约单号:</span><span>{{row.appName}}</span></div> // TODO
<div><span>退货单来源:</span><span>{{row.appName}}</span></div>
<div><span>履约单号:</span><span>{{row.orderId}}</span></div>
<template v-if="row.refundFlag === 0 && !row.refundLogisticsNo">
<div><span>退货原因:</span><span>{{row.refundReason}}</span></div>
<div><span>退货说明:</span><span>{{row.refundRemark}}</span></div>
</template>
<template v-else-if="row.refundFlag === 0 && row.refundLogisticsNo">
<div><span>寄回时间:</span><span>{{row.deliveryTime | formatDate}}</span></div> // TODO
<div><span>寄回时间:</span><span>{{row.deliveryTime | formatDate}}</span></div>
<div><span>退货原因:</span><span>{{row.refundReason}}</span></div>
<div><span>退货说明:</span><span>{{row.refundRemark}}</span></div>
</template>
......@@ -84,7 +84,7 @@
<div><span>退货说明:</span><span>{{row.refundRemark}}</span></div>
</template>
<template v-else-if="row.refundFlag === 2">
<div><span>操作人:</span><span>{{row.processTime}}</span></div> // TODO
<div><span>操作人:</span><span>{{row.processTime}}</span></div>
<div><span>操作时间:</span><span>{{row.processTime | formatDate}}</span></div>
<div><span>拒绝原因:</span><span>{{row.refuseReason}}</span></div>
<div><span>退货原因:</span><span>{{row.refundReason}}</span></div>
......@@ -92,7 +92,7 @@
</template>
<template v-else-if="row.refundFlag === 3">
<div><span>关闭时间:</span><span>{{row.cancelTime | formatDate}}</span></div>
<div><span>关闭原因:</span><span>{{row.cancelReason}}</span></div> // TODO
<div><span>关闭原因:</span><span>{{row.cancelReason}}</span></div>
</template>
</div>
</el-popover>
......@@ -333,8 +333,8 @@ export default {
this.row = row;
if(dialogName == 'logisticsDialog') {
let { result } = await getLogisticsInfo({
companyCode: /* row.refundId */'YD',
logisticsNo: /* row.refundLogisticsNo */'4312317986451',
companyCode: row.refundId/* 'YD' */,
logisticsNo: row.refundLogisticsNo/* '4312317986451' */,
});
this.logisticsDialog.logisticsList = result.traces || [];
this.logisticsDialog.logisticsList.reverse();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment