Browse Source

细节

intex
yufei_wang 4 days ago
parent
commit
62286aa64f
  1. 11
      src/api/wms/customerSaleInvoiceDetail/index.ts
  2. 41
      src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts
  3. 28
      src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue
  4. 2
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  5. 2
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue

11
src/api/wms/customerSaleInvoiceDetail/index.ts

@ -60,7 +60,7 @@ export const deleteCustomerSaleInvoiceDetail = async (id: number) => {
} }
// 导出客户销售开票子信息表(WMS) Excel // 导出客户销售开票子信息表(WMS) Excel
export const exportCustomerSaleInvoiceDetail = async (params) => { export const exportCustomerSaleInvoiceRequestDetail = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = { ...params } const data = { ...params }
return await request.downloadPost({ url: `/wms/customer-sale-invoice-detail/export-excel-senior`, data }) return await request.downloadPost({ url: `/wms/customer-sale-invoice-detail/export-excel-senior`, data })
@ -68,6 +68,15 @@ export const exportCustomerSaleInvoiceDetail = async (params) => {
return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params }) return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params })
} }
} }
// 导出客户销售开票子信息表(WMS) Excel
export const exportCustomerSaleInvoiceRecordDetail = async (params) => {
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/wms/customer-sale-invoice-record-detail/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/customer-sale-invoice-record-detail/export-excel`, params })
}
}
// 下载用户导入模板 // 下载用户导入模板
export const importTemplate = () => { export const importTemplate = () => {

41
src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts

@ -79,6 +79,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'customerCode', field: 'customerCode',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isDetail:false,
form: { form: {
componentProps: { componentProps: {
disabled:true disabled:true
@ -113,6 +114,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
isDetail:false,
table:{ table:{
width:150 width:150
} }
@ -202,21 +204,30 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'remark', field: 'remark',
sort: 'custom', sort: 'custom',
}, },
// { {
// label: '创建时间', label: '创建时间',
// field: 'createTime', field: 'createTime',
// sort: 'custom', sort: 'custom',
// formatter: dateFormatter, formatter: dateFormatter,
// search: { isTable:false,
// component: 'DatePicker', isDetail:true,
// componentProps: { detail: {
// valueFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat : 'YYYY-MM-DD HH:mm:ss'
// type: 'daterange', },
// defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] isForm: false,
// } },
// }, {
// isForm: false, label: '最后更新时间',
// }, field: 'updateTime',
sort: 'custom',
formatter: dateFormatter,
isTable:false,
isDetail:true,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
isForm: false,
},
])) ]))
// 表单校验 // 表单校验
export const CustomerSaleInvoiceDetailRules = reactive({ export const CustomerSaleInvoiceDetailRules = reactive({

28
src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue

@ -47,6 +47,9 @@
:apiUpdate="CustomerSaleInvoiceDetailApi.updateCustomerSaleInvoiceDetail" :apiUpdate="CustomerSaleInvoiceDetailApi.updateCustomerSaleInvoiceDetail"
:apiPage="CustomerSaleInvoiceDetailApi.getCustomerSaleInvoiceRecordDetailPage" :apiPage="CustomerSaleInvoiceDetailApi.getCustomerSaleInvoiceRecordDetailPage"
:apiDelete="CustomerSaleInvoiceDetailApi.deleteCustomerSaleInvoiceDetail" :apiDelete="CustomerSaleInvoiceDetailApi.deleteCustomerSaleInvoiceDetail"
:detailButtonIsShowAdd="false"
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-record-main:export` })]"
@buttonBaseClick="detailButtonBaseClick"
:Echo="Echo" :Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
/> />
@ -84,7 +87,28 @@ const { tableObject, tableMethods } = useTable({
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = 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.exportCustomerSaleInvoiceRecordDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
}
// //
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => { nextTick(() => {
@ -108,8 +132,8 @@ const Echo = []
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultImportBtn({hasPermi:`wms:customer-sale-invoice-main:import` }), // defaultButtons.defaultImportBtn({hasPermi:`wms:customer-sale-invoice-record-main:import` }), //
defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-main:export` }), // defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-record-main:export` }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //

2
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts

@ -103,6 +103,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled:true disabled:true
} }
}, },
isDetail:false,
search:{ search:{
component:'Select', component:'Select',
value:custormList.length>1?[custormList[0]['customerCode']]:[], value:custormList.length>1?[custormList[0]['customerCode']]:[],
@ -132,6 +133,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
isDetail:false,
table:{ table:{
width:150 width:150
} }

2
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue

@ -116,7 +116,7 @@ const detailButtonBaseClick = async (val, item,tableObject) => {
// //
loadStart() loadStart()
const excelTitle = ref(route.meta.title) const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceDetail(tableObject.params) const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceRequestDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {

Loading…
Cancel
Save