+
+
+
+
+
+ 允许未发货的有效订单提交检测(不可取消)
+
+
+ 允许已发货小时订单提交论文检测
+
-
-
@@ -273,11 +281,14 @@ export default {
pddSettingActiveName: '1',
pddSettingConfirmText: '导出拼多多发货订单',
pddExportUid: '0',
+ pddDeliveredDelayedSubmitHour: 1,
+ selectAllowPddDeliveredDelayedSubmit: false,
}
},
mounted() {
this.getOrderList()
+ // this.
},
methods: {
getFilterParams(){
@@ -397,23 +408,6 @@ export default {
}).catch(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) {
// 匹配 RFC 5987 编码的文件名(如 filename*=utf8''xxx)
@@ -484,19 +478,8 @@ export default {
},
// 弹框相关方法---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,
+ this.$http('POST', '/agentnew/get_pdd_setting', {
+
}, {
headers: {
'Auth': this.token
@@ -504,8 +487,11 @@ export default {
}).then(response => {
this.$nextTick(() => {
if (response.status) {
- this.$Message.success(response.info);
- this.dialogVisibleDelReport = false;
+ this.dialogVisiblePddSetting = true;
+ if (response.data.pdd_delivered_delayed_submit_hour > 0) {
+ this.pddDeliveredDelayedSubmitHour = response.data.pdd_delivered_delayed_submit_hour;
+ this.selectAllowPddDeliveredDelayedSubmit = true;
+ }
} else {
this.$Message.error(response.info);
}
@@ -514,6 +500,69 @@ export default {
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() {
console.log(this.pddSettingActiveName);
if (this.pddSettingActiveName == 1) {