|
@ -1,8 +1,33 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="main-content12"> |
|
|
<div class="main-content12"> |
|
|
<!-- page header --> |
|
|
<!-- page header --> |
|
|
<div class="pageheader"> |
|
|
<div class="pageheader flex-between"> |
|
|
<span class="pagetitle">查重订单</span> |
|
|
<span class="pagetitle">查重订单</span> |
|
|
|
|
|
<GuipButton size="table" type="ignore" @click="showPddSetting">拼多多发货</GuipButton> |
|
|
|
|
|
|
|
|
|
|
|
<GuipDialog :dialogVisible="dialogVisiblePddSetting" title="" :confirmText="pddSettingConfirmText" cancelText="取消" |
|
|
|
|
|
:show-close-button="false" :show-cancel-button="true" @confirm="confirmDelReport" @cancel="closePddSetting" |
|
|
|
|
|
@close="closePddSetting" @dialogVisibleChange="dialogVisibleChange"> |
|
|
|
|
|
<!-- 自定义内容 --> |
|
|
|
|
|
<el-form> |
|
|
|
|
|
<el-tabs v-model="pddSettingActiveName" @tab-click="handleClick"> |
|
|
|
|
|
<el-tab-pane label="拼多多手工发货" name="1"> |
|
|
|
|
|
<PromptText text='导出待发货订单excel,到拼多多导入该excel进行发货' :type="1" /> |
|
|
|
|
|
<GuipSelect class="mt-16" label="选择站点" v-model="pddExportUid" @change="selectPddExportSite()" :options="searchSiteList" valueKey="uid" labelKey="name" |
|
|
|
|
|
:extraItem="{label:'请选择站点',value:'0'}" placeholder="" clearable width="300px" /> |
|
|
|
|
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
<el-tab-pane label="拼多多自动发货" name="2"> |
|
|
|
|
|
<div class="flex-wrap"> |
|
|
|
|
|
<div class="flex-left"> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="flex-line borderNone"></div> |
|
|
|
|
|
<div class="flex-right"></div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-tab-pane> |
|
|
|
|
|
</el-tabs> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</GuipDialog> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="elementWrap mb-10"> |
|
|
<div class="elementWrap mb-10"> |
|
@ -244,6 +269,11 @@ export default { |
|
|
dialogVisibleDelReport: false, |
|
|
dialogVisibleDelReport: false, |
|
|
delReportId: '', |
|
|
delReportId: '', |
|
|
|
|
|
|
|
|
|
|
|
dialogVisiblePddSetting: false, |
|
|
|
|
|
pddSettingActiveName: '1', |
|
|
|
|
|
pddSettingConfirmText: '导出拼多多发货订单', |
|
|
|
|
|
pddExportUid: '0', |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
@ -341,9 +371,23 @@ export default { |
|
|
this.$http('GET', '/agentnew/export_order', params, { |
|
|
this.$http('GET', '/agentnew/export_order', params, { |
|
|
headers: { |
|
|
headers: { |
|
|
'Auth': this.token |
|
|
'Auth': this.token |
|
|
} |
|
|
}, |
|
|
|
|
|
responseType: 'blob' |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
console.log(response) |
|
|
console.log(response) |
|
|
|
|
|
console.log(response.headers) |
|
|
|
|
|
const blob = new Blob([response], { type: 'application/force-download' }); |
|
|
|
|
|
const downloadUrl = window.URL.createObjectURL(blob); |
|
|
|
|
|
|
|
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
|
link.href = downloadUrl; |
|
|
|
|
|
link.setAttribute('download', 'filename.xls'); |
|
|
|
|
|
|
|
|
|
|
|
document.body.appendChild(link); |
|
|
|
|
|
link.click(); |
|
|
|
|
|
|
|
|
|
|
|
document.body.removeChild(link); |
|
|
|
|
|
window.URL.revokeObjectURL(downloadUrl); |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
@ -365,6 +409,15 @@ export default { |
|
|
|
|
|
|
|
|
// location.href = url; |
|
|
// location.href = url; |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 从响应头解析文件名 |
|
|
|
|
|
getFilenameFromHeaders(headers) { |
|
|
|
|
|
const disposition = headers['content-disposition']; |
|
|
|
|
|
if (!disposition) return null; |
|
|
|
|
|
|
|
|
|
|
|
// 匹配形如:attachment; filename="example.txt" |
|
|
|
|
|
const matches = disposition.match(/filename="?([^"]+)"?/i); |
|
|
|
|
|
return matches && matches[1] ? matches[1] : null; |
|
|
|
|
|
}, |
|
|
getPayImg(pay_type) { |
|
|
getPayImg(pay_type) { |
|
|
return require('@/assets/pay/pay_' + pay_type + '.svg'); |
|
|
return require('@/assets/pay/pay_' + pay_type + '.svg'); |
|
|
}, |
|
|
}, |
|
@ -422,6 +475,45 @@ export default { |
|
|
console.log(data, 'data098908090'); |
|
|
console.log(data, 'data098908090'); |
|
|
}, |
|
|
}, |
|
|
// 弹框相关方法---end |
|
|
// 弹框相关方法---end |
|
|
|
|
|
showPddSetting() { |
|
|
|
|
|
this.dialogVisiblePddSetting = true; |
|
|
|
|
|
}, |
|
|
|
|
|
// 关闭弹框事件 |
|
|
|
|
|
closePddSetting() { |
|
|
|
|
|
this.dialogVisiblePddSetting = false; |
|
|
|
|
|
}, |
|
|
|
|
|
selectPddExportSite() { |
|
|
|
|
|
console.log(this.pddExportUid) |
|
|
|
|
|
}, |
|
|
|
|
|
// 确认按钮事件 |
|
|
|
|
|
pddSetting() { |
|
|
|
|
|
this.$http('POST', '/agentnew/ajax_del_report', { |
|
|
|
|
|
saleid: this.delReportId, |
|
|
|
|
|
}, { |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Auth': this.token |
|
|
|
|
|
} |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
if (response.status) { |
|
|
|
|
|
this.$Message.success(response.info); |
|
|
|
|
|
this.dialogVisibleDelReport = false; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$Message.error(response.info); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleClick() { |
|
|
|
|
|
console.log(this.pddSettingActiveName); |
|
|
|
|
|
if (this.pddSettingActiveName == 1) { |
|
|
|
|
|
this.pddSettingConfirmText = '导出拼多多发货订单'; |
|
|
|
|
|
} else if (this.pddSettingActiveName == 2) { |
|
|
|
|
|
this.pddSettingConfirmText = '确定'; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
handlePageChange({ page, endPage, direction }) { |
|
|
handlePageChange({ page, endPage, direction }) { |
|
|
console.log(endPage, 'endPage==='); |
|
|
console.log(endPage, 'endPage==='); |
|
@ -445,6 +537,7 @@ export default { |
|
|
|
|
|
|
|
|
this.getOrderList(params) |
|
|
this.getOrderList(params) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
}, |
|
|
}, |
|
@ -494,6 +587,9 @@ export default { |
|
|
z-index: 1; |
|
|
z-index: 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.mt-16 { |
|
|
|
|
|
margin-top: 16px; |
|
|
|
|
|
} |
|
|
.mb-10 { |
|
|
.mb-10 { |
|
|
margin-bottom: 10px; |
|
|
margin-bottom: 10px; |
|
|
} |
|
|
} |
|
|