Browse Source

细节

intex
yufei_wang 1 week 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
export const exportCustomerSaleInvoiceDetail = async (params) => {
export const exportCustomerSaleInvoiceRequestDetail = async (params) => {
if (params.isSearch) {
const data = { ...params }
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 })
}
}
// 导出客户销售开票子信息表(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 = () => {

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

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

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

@ -47,6 +47,9 @@
:apiUpdate="CustomerSaleInvoiceDetailApi.updateCustomerSaleInvoiceDetail"
:apiPage="CustomerSaleInvoiceDetailApi.getCustomerSaleInvoiceRecordDetailPage"
:apiDelete="CustomerSaleInvoiceDetailApi.deleteCustomerSaleInvoiceDetail"
:detailButtonIsShowAdd="false"
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-record-main:export` })]"
@buttonBaseClick="detailButtonBaseClick"
:Echo="Echo"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -84,7 +87,28 @@ const { tableObject, tableMethods } = useTable({
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.exportCustomerSaleInvoiceRecordDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
@ -108,8 +132,8 @@ const Echo = []
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultImportBtn({hasPermi:`wms:customer-sale-invoice-main:import` }), //
defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-main:export` }), //
defaultButtons.defaultImportBtn({hasPermi:`wms:customer-sale-invoice-record-main:import` }), //
defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-record-main:export` }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(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
}
},
isDetail:false,
search:{
component:'Select',
value:custormList.length>1?[custormList[0]['customerCode']]:[],
@ -132,6 +133,7 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true
}
},
isDetail:false,
table:{
width:150
}

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

@ -116,7 +116,7 @@ const detailButtonBaseClick = async (val, item,tableObject) => {
//
loadStart()
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`)
} catch {

Loading…
Cancel
Save