Browse Source

客户对账单接口方法

syhx
张立 4 months ago
parent
commit
5c1030c892
  1. 11
      src/api/wms/customerStatementDetail/index.ts
  2. 3
      src/components/Detail/src/Detail.vue
  3. 2
      src/locales/zh-CN.ts
  4. 20
      src/views/login/components/LoginForm.vue
  5. 12
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts
  6. 80
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

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

@ -45,7 +45,16 @@ export const getCustomerStatementDetailPage = async (params) => {
return await request.get({ url: `/wms/customer-statement-detail/page`, params }) return await request.get({ url: `/wms/customer-statement-detail/page`, params })
} }
} }
// 查询客户对账单子信息明细表(WMS)列表或者查询客户对账单对账差异列表 二者共用一个
export const getCustomerStatementReconciliationPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = { ...params }
return await request.post({ url: '/wms/customer-statement-detail/senior', data })
} else {
return await request.get({ url: `/wms/customer-statement-detail/page`, params })
}
}
// 查询客户对账单子信息表(WMS)详情 // 查询客户对账单子信息表(WMS)详情
export const getCustomerStatementDetail = async (id: number) => { export const getCustomerStatementDetail = async (id: number) => {
return await request.get({ url: `/wms/customer-statement-detail/get?id=` + id }) return await request.get({ url: `/wms/customer-statement-detail/get?id=` + id })

3
src/components/Detail/src/Detail.vue

@ -912,6 +912,9 @@ const buttonBaseClick = (val, item) => {
}else{ }else{
openForm('create') openForm('create')
} }
} else if (val == 'export') {
//
emit('buttonBaseClick',val, item,tableObject)
} else if (val == 'refresh') { } else if (val == 'refresh') {
// //
getList() getList()

2
src/locales/zh-CN.ts

@ -1301,7 +1301,7 @@ export default {
: '发票回转成功', : '发票回转成功',
:'最后更新人', :'最后更新人',
: '可开票数量范围是', : '可开票数量范围是',
: '重新对', : '重新对',
: '确认对比结果', : '确认对比结果',
: '确认分摊金额', : '确认分摊金额',
: '导入模具分摊对账单', : '导入模具分摊对账单',

20
src/views/login/components/LoginForm.vue

@ -307,16 +307,16 @@
authUtil.removeLoginForm() authUtil.removeLoginForm()
} }
authUtil.setToken(res) authUtil.setToken(res)
if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){ // if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){
await ElMessageBox.alert( // await ElMessageBox.alert(
'<strong>系统迁移,请移步至</strong>' + // '<strong></strong>' +
`<a href=${getSystermUpdateUrl()} target="_blank">${getSystermUpdateUrl()}</a>`, // `<a href=${getSystermUpdateUrl()} target="_blank">${getSystermUpdateUrl()}</a>`,
'重要提示', // '',
{ // {
dangerouslyUseHTMLString: true, // dangerouslyUseHTMLString: true,
} // }
) // )
} // }
if (!redirect.value) { if (!redirect.value) {
redirect.value = '/' redirect.value = '/'
} }

12
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts

@ -253,14 +253,14 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
}, },
{ {
label: '背番', label: '背番',
field: 'articleName', field: 'backNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
}, },
{ {
label: '出荷日期', label: '出荷日期',
field: 'checkTime', field: 'dischargingTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: true, isSearch: true,
@ -283,7 +283,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
}, },
{ {
label: '验收日期', label: '验收日期',
field: 'uom', field: 'checkTime',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
}, },
@ -306,7 +306,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
}, },
{ {
label: '数量差异', label: '数量差异',
field: 'amount', field: 'quantityVariance',
sort: 'custom', sort: 'custom',
}, },
{ {
@ -322,7 +322,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
{ {
label: '单价差异', label: '单价差异',
field: 'amount', field: 'amount',
sort: 'custom', sort: 'priceVariance',
}, },
{ {
label: '金额-INTEX', label: '金额-INTEX',
@ -336,7 +336,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
}, },
{ {
label: '金额差异', label: '金额差异',
field: 'amount', field: 'amountVariance',
sort: 'custom', sort: 'custom',
}, },
{ {

80
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

@ -60,7 +60,7 @@
:tableObjectExtend="tableObjectExtend" :tableObjectExtend="tableObjectExtend"
@buttonBaseClick="detailButtonBaseClick" @buttonBaseClick="detailButtonBaseClick"
> >
<template #qty="{row}"> <template #qty="{row}" v-if="tabCurrent.prop == 'ShareReconciliation'">
<span :style="{color:row.qty>0?'red':row.qty<0?'#409eff':'#000'}">{{ row.qty }}</span> <span :style="{color:row.qty>0?'red':row.qty<0?'#409eff':'#000'}">{{ row.qty }}</span>
</template> </template>
<template #amount="{row}" v-if="tabCurrent.prop == 'ShareReconciliation'"> <template #amount="{row}" v-if="tabCurrent.prop == 'ShareReconciliation'">
@ -169,13 +169,13 @@ const butttondata = (row, $index) => {
// defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), //
{ {
label: t('ts.重新对'), label: t('ts.重新对'),
name: 'rematch', name: 'rematch',
hide: isShowMainButton(row, ['2']), hide: isShowMainButton(row, ['2']),
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: 'wms:customer-statement-main:recontrast',
link: true // link: true //
}, },
{ {
@ -185,7 +185,7 @@ const butttondata = (row, $index) => {
type: 'primary', type: 'primary',
icon: '', icon: '',
color: '', color: '',
hasPermi: '', hasPermi: 'wms:customer-statement-main:confirmationContrast',
link: true // link: true //
}, },
{ {
@ -194,7 +194,7 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['3','4']), hide: isShowMainButton(row, ['3','4']),
type: 'primary', type: 'primary',
color: '', color: '',
hasPermi: '', hasPermi: 'wms:customer-statement-main:import',
link: true // link: true //
}, },
{ {
@ -203,7 +203,7 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['4']), hide: isShowMainButton(row, ['4']),
type: 'primary', type: 'primary',
color: '', color: '',
hasPermi: '', hasPermi: 'wms:customer-statement-main:confirmationShare',
link: true // link: true //
}, },
{ {
@ -215,8 +215,8 @@ const butttondata = (row, $index) => {
hasPermi: '', hasPermi: '',
link: true // link: true //
}, },
defaultButtons.mainSendBackBtn({ hide: isShowMainButton(row, ['3','4','5']) }), // 退 defaultButtons.mainSendBackBtn({hasPermi: 'wms:customer-statement-main:sendBack', hide: isShowMainButton(row, ['3','4','5']) }), // 退
defaultButtons.mainListCancelBtn({ hide: isShowMainButton(row, ['2','3','4','5'])}), // defaultButtons.mainListCancelBtn({ hasPermi: 'wms:customer-statement-main:publish',hide: isShowMainButton(row, ['2','3','4','5'])}), //
] ]
@ -443,12 +443,12 @@ const changeTabs = async (item) => {
DetailAllSchemas.value = CustomerStatementDetail.allSchemas DetailAllSchemas.value = CustomerStatementDetail.allSchemas
otherHeadButttonData.value = [{ otherHeadButttonData.value = [{
label: t(`ts.导出`).replace('ts.', ''), label: t(`ts.导出`).replace('ts.', ''),
name: 'exportDetail', name: 'export',
hide: false, hide: false,
type: 'success', type: 'success',
icon: 'ep:download', icon: 'ep:download',
color: '', color: '',
hasPermi: '' hasPermi: 'wms:customer-statement-main:export'
}] }]
} else if (item.prop == 'Reconciliation') { } else if (item.prop == 'Reconciliation') {
// //
@ -459,7 +459,7 @@ const changeTabs = async (item) => {
value: chooseRow.value.id value: chooseRow.value.id
}] }]
DetailAllSchemas.value = CustomerStatementReconciliation.allSchemas DetailAllSchemas.value = CustomerStatementReconciliation.allSchemas
apiPage.value = CustomerStatementMainApi.getCustomerStatementMainPage apiPage.value = CustomerStatementDetailApi.getCustomerStatementReconciliationPage
otherHeadButttonData.value = [ otherHeadButttonData.value = [
{ {
label: t(`ts.导出`).replace('ts.', ''), label: t(`ts.导出`).replace('ts.', ''),
@ -468,24 +468,24 @@ const changeTabs = async (item) => {
type: 'success', type: 'success',
icon: 'ep:download', icon: 'ep:download',
color: '', color: '',
hasPermi: '' hasPermi: 'wms:customer-statement-main:export'
}, },
{ {
label: t('ts.重新对比'), label: t('ts.重新对比'),
name: 'againContrast', name: 'againContrast',
hide: false, hide: isShowMainButton( chooseRow.value, ['2']),
type: 'primary', type: 'primary',
color: '', color: '',
float:'left', float:'left',
hasPermi: '' hasPermi: 'wms:customer-statement-main:recontrast'
},{ },{
label: t('ts.确认对比结果'), label: t('ts.确认对比结果'),
name: 'confirmResults', name: 'confirmResults',
hide: false, hide: isShowMainButton( chooseRow.value, ['2']),
type: 'primary', type: 'primary',
color: '', color: '',
float:'left', float:'left',
hasPermi: '' hasPermi: 'wms:customer-statement-main:confirmationContrast'
}] }]
} else if (item.prop == 'ShareReconciliation') { } else if (item.prop == 'ShareReconciliation') {
// //
@ -505,16 +505,16 @@ const changeTabs = async (item) => {
type: 'success', type: 'success',
icon: 'ep:download', icon: 'ep:download',
color: '', color: '',
hasPermi: '' hasPermi: 'wms:customer-statement-main:export'
}, },
{ {
label: t('ts.确认分摊金额'), label: t('ts.确认分摊金额'),
name: 'confirmShareMoney', name: 'confirmShareMoney',
hide: false, hide: isShowMainButton(chooseRow.value, ['4']),
type: 'primary', type: 'primary',
color: '', color: '',
float:'left', float:'left',
hasPermi: '' hasPermi: 'wms:customer-statement-main:confirmationShare'
}] }]
} else{ } else{
tableObjectExtend.value = [] tableObjectExtend.value = []
@ -524,9 +524,17 @@ const changeTabs = async (item) => {
} }
} }
// //
const detailButtonBaseClick = (val, item) => { const detailButtonBaseClick = (val, item,detailTableObject) => {
if (val == 'exportReconciliation') { if (val == 'export') {
// //
if (tabCurrent.value.prop == 'Detail') {
handleExportDetail(detailTableObject)
} else if (tabCurrent.value.prop == 'Reconciliation') {
//
handleExportReconciliation(detailTableObject)
} {
}
}else if (val == 'againContrast') { }else if (val == 'againContrast') {
// //
}else if (val == 'confirmResults') { }else if (val == 'confirmResults') {
@ -536,6 +544,34 @@ const detailButtonBaseClick = (val, item) => {
}else if (val == 'confirmShareMoney') { }else if (val == 'confirmShareMoney') {
// //
} }
}
//
const handleExportDetail = async (detailTableObject) => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerStatementDetailApi.exportCustomerStatementDetail(detailTableObject.params)
download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
}
//
const handleExportReconciliation = async (detailTableObject) => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerStatementDetailApi.exportCustomerStatementCompareDetail(detailTableObject.params)
download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
}
} }
// //
const openDetailForm = (row) => { const openDetailForm = (row) => {

Loading…
Cancel
Save