|
|
@ -56,6 +56,8 @@ |
|
|
|
:detailButtonIsShowAddStatusArray="['0']" |
|
|
|
:detailButtonIsShowDelete="false" |
|
|
|
:detailButtonIsShowAdd="false" |
|
|
|
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]" |
|
|
|
@buttonBaseClick="detailButtonBaseClick" |
|
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
|
/> |
|
|
|
|
|
|
@ -75,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as AreabasicApi from '@/api/wms/areabasic' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
import { status } from 'nprogress' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
// 销售开票申请 |
|
|
|
defineOptions({ name: 'customerSaleInvoiceMain' }) |
|
|
@ -102,7 +105,28 @@ const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
|
} |
|
|
|
|
|
|
|
// 点击子表按钮事件 |
|
|
|
const detailButtonBaseClick = async (val, item,tableObject) => { |
|
|
|
if (val == 'export') { |
|
|
|
// 子表导出 |
|
|
|
console.log('子表导出',val, tableObject) |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
loadStart() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceDetail(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
|
|
|
|
} finally { |
|
|
|
loadDone() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// 查询页面返回——详情 |
|
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
nextTick(() => { |
|
|
@ -276,6 +300,22 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
const seachRef = ref() |
|
|
|
const onSearchChange = (field, value)=>{ |
|
|
|
console.log('onSearchChange',field,value) |
|
|
|
if(field=='status'){ |
|
|
|
// 状态 |
|
|
|
if(value.length>0){ |
|
|
|
if(value[value.length-1]==''){ |
|
|
|
//全选 |
|
|
|
seachRef.value.setFormValues({ |
|
|
|
status:[''] |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
seachRef.value.setFormValues({ |
|
|
|
status:value.filter(item=>item!='') |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(field=='customerCode'){ |
|
|
|
if(value.length>0){ |
|
|
|
if(value[value.length-1]=='ALL'){ |
|
|
@ -293,7 +333,7 @@ const onSearchChange = (field, value)=>{ |
|
|
|
} |
|
|
|
const searchClick = async (data)=>{ |
|
|
|
console.log('查询',data) |
|
|
|
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')}) |
|
|
|
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')}) |
|
|
|
} |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|