|
@@ -94,7 +94,8 @@
|
|
|
<!--插槽:table标题-->
|
|
|
<template #tableTitle>
|
|
|
<a-button type="primary" v-auth="'saleCode:sale_invoice:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
|
|
|
- <a-button type="primary" v-auth="'saleCode:sale_invoice:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
|
|
|
+ <a-button type="primary" v-auth="'saleCode:sale_invoice:exportXls'" preIcon="ant-design:export-outlined" @click="ccc">
|
|
|
+ <!-- <a-button type="primary" v-auth="'saleCode:sale_invoice:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> -->
|
|
|
导出(export)</a-button
|
|
|
>
|
|
|
<a-button type="primary" @click="submit"> 提交(submit)</a-button>
|
|
@@ -175,7 +176,7 @@
|
|
|
import { useMethods } from '/@/hooks/system/useMethods';
|
|
|
const { handleExportXlsx, } = useMethods();
|
|
|
const formRef = ref();
|
|
|
- const queryParam = reactive<any>({});
|
|
|
+ var queryParam = reactive<any>({});
|
|
|
var viewType = ref('');
|
|
|
//注册model
|
|
|
var [registerModal, { openModal}] = useModal();
|
|
@@ -430,6 +431,18 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ async function ccc(){
|
|
|
+ if(queryParam.billDate&&queryParam.billDate.length!==0){
|
|
|
+ var bv = Object.assign({}, queryParam);
|
|
|
+ var obj = await setRangeQuery()
|
|
|
+ Object.assign(queryParam, obj);
|
|
|
+ delete queryParam.billDate
|
|
|
+ await onExportXls()
|
|
|
+ queryParam.billDate = [bv.billDate[0],bv.billDate[1]]
|
|
|
+ }else{
|
|
|
+ await onExportXls()
|
|
|
+ }
|
|
|
+ }
|
|
|
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
|
|
const toggleSearchStatus = ref<boolean>(false);
|
|
|
const labelCol = reactive({
|
|
@@ -465,6 +478,7 @@
|
|
|
*/
|
|
|
async function setRangeQuery() {
|
|
|
let queryParamClone = cloneDeep(queryParam);
|
|
|
+
|
|
|
if (rangeField) {
|
|
|
let fieldsValue = rangeField.split(',');
|
|
|
fieldsValue.forEach((item) => {
|