|
@ -6,23 +6,31 @@ |
|
|
<GuipButton size="table" type="ignore" @click="showPddSetting">拼多多发货</GuipButton> |
|
|
<GuipButton size="table" type="ignore" @click="showPddSetting">拼多多发货</GuipButton> |
|
|
|
|
|
|
|
|
<GuipDialog :dialogVisible="dialogVisiblePddSetting" title="" :confirmText="pddSettingConfirmText" cancelText="取消" |
|
|
<GuipDialog :dialogVisible="dialogVisiblePddSetting" title="" :confirmText="pddSettingConfirmText" cancelText="取消" |
|
|
:show-close-button="false" :show-cancel-button="true" @confirm="confirmDelReport" @cancel="closePddSetting" |
|
|
:show-close-button="false" :show-cancel-button="true" @confirm="pddSetting" @cancel="closePddSetting" |
|
|
@close="closePddSetting" @dialogVisibleChange="dialogVisibleChange"> |
|
|
@close="closePddSetting" @dialogVisibleChange="dialogVisibleChange"> |
|
|
<!-- 自定义内容 --> |
|
|
<!-- 自定义内容 --> |
|
|
<el-form> |
|
|
<el-form> |
|
|
<el-tabs v-model="pddSettingActiveName" @tab-click="handleClick"> |
|
|
<el-tabs v-model="pddSettingActiveName" @tab-click="handleClick"> |
|
|
<el-tab-pane label="拼多多手工发货" name="1"> |
|
|
<el-tab-pane label="拼多多手工发货" name="1"> |
|
|
<PromptText text='导出待发货订单excel,到拼多多导入该excel进行发货' :type="1" /> |
|
|
<PromptText text='导出待发货订单excel,到拼多多导入该excel进行发货' :type="1" /> |
|
|
<GuipSelect class="mt-16" label="选择站点" v-model="pddExportUid" @change="selectPddExportSite()" :options="searchSiteList" valueKey="uid" labelKey="name" |
|
|
<GuipSelect class="mt-16" label="选择站点" v-model="pddExportUid" @change="selectPddExportSite()" :options="searchSiteList" valueKey="uid" labelKey="name" |
|
|
:extraItem="{label:'请选择站点',value:'0'}" placeholder="" clearable width="300px" /> |
|
|
:extraItem="{label:'请选择站点',value:'0'}" placeholder="" clearable width="300px" /> |
|
|
|
|
|
|
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
<el-tab-pane label="拼多多自动发货" name="2"> |
|
|
<el-tab-pane label="拼多多自动发货" name="2"> |
|
|
<div class="flex-wrap"> |
|
|
<PromptText text='需要自己在拼多多购买自动发货软件,并设置下方规则' :type="1" /> |
|
|
<div class="flex-left"> |
|
|
<div class="flex-wrap mt-16"> |
|
|
|
|
|
<div class="mb-16"> |
|
|
|
|
|
<p>提交规则</p> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="mt-16"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<el-checkbox checked disabled><span class="fontblue">允许未发货的有效订单提交检测(不可取消)</span></el-checkbox> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="mt-16"> |
|
|
|
|
|
<el-checkbox v-model="selectAllowPddDeliveredDelayedSubmit">允许已发货<el-input v-model="pddDeliveredDelayedSubmitHour" style="width:50px;height:30px"></el-input>小时订单提交论文检测</el-checkbox> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex-line borderNone"></div> |
|
|
|
|
|
<div class="flex-right"></div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
@ -273,11 +281,14 @@ export default { |
|
|
pddSettingActiveName: '1', |
|
|
pddSettingActiveName: '1', |
|
|
pddSettingConfirmText: '导出拼多多发货订单', |
|
|
pddSettingConfirmText: '导出拼多多发货订单', |
|
|
pddExportUid: '0', |
|
|
pddExportUid: '0', |
|
|
|
|
|
pddDeliveredDelayedSubmitHour: 1, |
|
|
|
|
|
selectAllowPddDeliveredDelayedSubmit: false, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.getOrderList() |
|
|
this.getOrderList() |
|
|
|
|
|
// this. |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getFilterParams(){ |
|
|
getFilterParams(){ |
|
@ -397,23 +408,6 @@ export default { |
|
|
}).catch(error => { |
|
|
}).catch(error => { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
// var stime = ''; |
|
|
|
|
|
// var etime = ''; |
|
|
|
|
|
// if (this.searchDate && this.searchDate.length > 0) { |
|
|
|
|
|
// stime = this.searchDate[0]; |
|
|
|
|
|
// etime = this.searchDate[1]; |
|
|
|
|
|
// } |
|
|
|
|
|
// var url = '/agentnew/export_order'; |
|
|
|
|
|
// if (stime) url += '/stime/' + stime; |
|
|
|
|
|
// if (etime) url += '/etime/' + etime; |
|
|
|
|
|
// if (this.searchStatus) url += '/status/' + this.searchStatus; |
|
|
|
|
|
// if (this.searchType) url += '/type/' + this.searchType; |
|
|
|
|
|
// if (this.searchUid) url += '/uid/' + this.searchUid; |
|
|
|
|
|
|
|
|
|
|
|
// location.href = url; |
|
|
|
|
|
}, |
|
|
}, |
|
|
decodeRFC5987Filename(header) { |
|
|
decodeRFC5987Filename(header) { |
|
|
// 匹配 RFC 5987 编码的文件名(如 filename*=utf8''xxx) |
|
|
// 匹配 RFC 5987 编码的文件名(如 filename*=utf8''xxx) |
|
@ -484,19 +478,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 弹框相关方法---end |
|
|
// 弹框相关方法---end |
|
|
showPddSetting() { |
|
|
showPddSetting() { |
|
|
this.dialogVisiblePddSetting = true; |
|
|
this.$http('POST', '/agentnew/get_pdd_setting', { |
|
|
}, |
|
|
|
|
|
// 关闭弹框事件 |
|
|
|
|
|
closePddSetting() { |
|
|
|
|
|
this.dialogVisiblePddSetting = false; |
|
|
|
|
|
}, |
|
|
|
|
|
selectPddExportSite() { |
|
|
|
|
|
console.log(this.pddExportUid) |
|
|
|
|
|
}, |
|
|
|
|
|
// 确认按钮事件 |
|
|
|
|
|
pddSetting() { |
|
|
|
|
|
this.$http('POST', '/agentnew/ajax_del_report', { |
|
|
|
|
|
saleid: this.delReportId, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
headers: { |
|
|
headers: { |
|
|
'Auth': this.token |
|
|
'Auth': this.token |
|
@ -504,8 +487,11 @@ export default { |
|
|
}).then(response => { |
|
|
}).then(response => { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
if (response.status) { |
|
|
if (response.status) { |
|
|
this.$Message.success(response.info); |
|
|
this.dialogVisiblePddSetting = true; |
|
|
this.dialogVisibleDelReport = false; |
|
|
if (response.data.pdd_delivered_delayed_submit_hour > 0) { |
|
|
|
|
|
this.pddDeliveredDelayedSubmitHour = response.data.pdd_delivered_delayed_submit_hour; |
|
|
|
|
|
this.selectAllowPddDeliveredDelayedSubmit = true; |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.$Message.error(response.info); |
|
|
this.$Message.error(response.info); |
|
|
} |
|
|
} |
|
@ -514,6 +500,69 @@ export default { |
|
|
console.error(error, 'error') |
|
|
console.error(error, 'error') |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 关闭弹框事件 |
|
|
|
|
|
closePddSetting() { |
|
|
|
|
|
this.dialogVisiblePddSetting = false; |
|
|
|
|
|
}, |
|
|
|
|
|
selectPddExportSite() { |
|
|
|
|
|
console.log(this.pddExportUid) |
|
|
|
|
|
}, |
|
|
|
|
|
// 确认按钮事件 |
|
|
|
|
|
pddSetting() { |
|
|
|
|
|
if (this.pddSettingActiveName == 1) { |
|
|
|
|
|
this.$http('GET', '/agentnew/export_pdd_tids', { |
|
|
|
|
|
uid: this.pddExportUid, |
|
|
|
|
|
},{ |
|
|
|
|
|
returnFullResponse: true , |
|
|
|
|
|
headers: { |
|
|
|
|
|
'Auth': this.token, |
|
|
|
|
|
}, |
|
|
|
|
|
responseType: 'blob' |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
const { |
|
|
|
|
|
headers, // 响应头(headers) |
|
|
|
|
|
data, // 响应体数据 |
|
|
|
|
|
} = response; |
|
|
|
|
|
const filename = this.decodeRFC5987Filename(headers['content-disposition']); |
|
|
|
|
|
// console.log(headers,data,filename,'ajax_get_check_order_list====='); |
|
|
|
|
|
|
|
|
|
|
|
const blob = new Blob([data], { type: 'application/force-download' }); |
|
|
|
|
|
const downloadUrl = window.URL.createObjectURL(blob); |
|
|
|
|
|
|
|
|
|
|
|
const link = document.createElement('a'); |
|
|
|
|
|
link.href = downloadUrl; |
|
|
|
|
|
link.setAttribute('download', filename); |
|
|
|
|
|
|
|
|
|
|
|
document.body.appendChild(link); |
|
|
|
|
|
link.click(); |
|
|
|
|
|
|
|
|
|
|
|
document.body.removeChild(link); |
|
|
|
|
|
window.URL.revokeObjectURL(downloadUrl); |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error, 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (this.pddSettingActiveName == 2) { |
|
|
|
|
|
this.$http('POST', '/agentnew/ajax_set_pdd_delivered_delayed_submit_hour', { |
|
|
|
|
|
hour: this.selectAllowPddDeliveredDelayedSubmit===true ? this.pddDeliveredDelayedSubmitHour : 0, |
|
|
|
|
|
}, { |
|
|
|
|
|
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() { |
|
|
handleClick() { |
|
|
console.log(this.pddSettingActiveName); |
|
|
console.log(this.pddSettingActiveName); |
|
|
if (this.pddSettingActiveName == 1) { |
|
|
if (this.pddSettingActiveName == 1) { |
|
|