Browse Source

订单列表

master
rainbro 2 days ago
parent
commit
5de46a9dbb
  1. 97
      src/views/agent/checkOrderList.vue

97
src/views/agent/checkOrderList.vue

@ -6,7 +6,7 @@
<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>
@ -18,11 +18,19 @@
</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,7 +478,27 @@ export default {
}, },
// ---end // ---end
showPddSetting() { showPddSetting() {
this.$http('POST', '/agentnew/get_pdd_setting', {
}, {
headers: {
'Auth': this.token
}
}).then(response => {
this.$nextTick(() => {
if (response.status) {
this.dialogVisiblePddSetting = true; 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);
}
})
}).catch(error => {
console.error(error, 'error')
})
}, },
// //
closePddSetting() { closePddSetting() {
@ -495,8 +509,41 @@ export default {
}, },
// //
pddSetting() { pddSetting() {
this.$http('POST', '/agentnew/ajax_del_report', { if (this.pddSettingActiveName == 1) {
saleid: this.delReportId, 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: { headers: {
'Auth': this.token 'Auth': this.token
@ -513,6 +560,8 @@ export default {
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')
}) })
}
}, },
handleClick() { handleClick() {
console.log(this.pddSettingActiveName); console.log(this.pddSettingActiveName);

Loading…
Cancel
Save