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 })
}
}
// 查询客户对账单子信息明细表(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)详情
export const getCustomerStatementDetail = async (id: number) => {
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{
openForm('create')
}
} else if (val == 'export') {
//
emit('buttonBaseClick',val, item,tableObject)
} else if (val == 'refresh') {
//
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.setToken(res)
if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){
await ElMessageBox.alert(
'<strong>系统迁移,请移步至</strong>' +
`<a href=${getSystermUpdateUrl()} target="_blank">${getSystermUpdateUrl()}</a>`,
'重要提示',
{
dangerouslyUseHTMLString: true,
}
)
}
// if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){
// await ElMessageBox.alert(
// '<strong></strong>' +
// `<a href=${getSystermUpdateUrl()} target="_blank">${getSystermUpdateUrl()}</a>`,
// '',
// {
// dangerouslyUseHTMLString: true,
// }
// )
// }
if (!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: '背番',
field: 'articleName',
field: 'backNumber',
sort: 'custom',
isSearch: true,
isForm: false,
},
{
label: '出荷日期',
field: 'checkTime',
field: 'dischargingTime',
sort: 'custom',
formatter: dateFormatter,
isSearch: true,
@ -283,7 +283,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
},
{
label: '验收日期',
field: 'uom',
field: 'checkTime',
sort: 'custom',
isForm: false,
},
@ -306,7 +306,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
},
{
label: '数量差异',
field: 'amount',
field: 'quantityVariance',
sort: 'custom',
},
{
@ -322,7 +322,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
{
label: '单价差异',
field: 'amount',
sort: 'custom',
sort: 'priceVariance',
},
{
label: '金额-INTEX',
@ -336,7 +336,7 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive<CrudSchem
},
{
label: '金额差异',
field: 'amount',
field: 'amountVariance',
sort: 'custom',
},
{

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

@ -60,7 +60,7 @@
:tableObjectExtend="tableObjectExtend"
@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>
</template>
<template #amount="{row}" v-if="tabCurrent.prop == 'ShareReconciliation'">
@ -169,13 +169,13 @@ const butttondata = (row, $index) => {
// defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), //
{
label: t('ts.重新对'),
label: t('ts.重新对'),
name: 'rematch',
hide: isShowMainButton(row, ['2']),
type: 'primary',
icon: '',
color: '',
hasPermi: '',
hasPermi: 'wms:customer-statement-main:recontrast',
link: true //
},
{
@ -185,7 +185,7 @@ const butttondata = (row, $index) => {
type: 'primary',
icon: '',
color: '',
hasPermi: '',
hasPermi: 'wms:customer-statement-main:confirmationContrast',
link: true //
},
{
@ -194,7 +194,7 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['3','4']),
type: 'primary',
color: '',
hasPermi: '',
hasPermi: 'wms:customer-statement-main:import',
link: true //
},
{
@ -203,7 +203,7 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['4']),
type: 'primary',
color: '',
hasPermi: '',
hasPermi: 'wms:customer-statement-main:confirmationShare',
link: true //
},
{
@ -215,8 +215,8 @@ const butttondata = (row, $index) => {
hasPermi: '',
link: true //
},
defaultButtons.mainSendBackBtn({ hide: isShowMainButton(row, ['3','4','5']) }), // 退
defaultButtons.mainListCancelBtn({ hide: isShowMainButton(row, ['2','3','4','5'])}), //
defaultButtons.mainSendBackBtn({hasPermi: 'wms:customer-statement-main:sendBack', hide: isShowMainButton(row, ['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
otherHeadButttonData.value = [{
label: t(`ts.导出`).replace('ts.', ''),
name: 'exportDetail',
name: 'export',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
hasPermi: 'wms:customer-statement-main:export'
}]
} else if (item.prop == 'Reconciliation') {
//
@ -459,7 +459,7 @@ const changeTabs = async (item) => {
value: chooseRow.value.id
}]
DetailAllSchemas.value = CustomerStatementReconciliation.allSchemas
apiPage.value = CustomerStatementMainApi.getCustomerStatementMainPage
apiPage.value = CustomerStatementDetailApi.getCustomerStatementReconciliationPage
otherHeadButttonData.value = [
{
label: t(`ts.导出`).replace('ts.', ''),
@ -468,24 +468,24 @@ const changeTabs = async (item) => {
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
hasPermi: 'wms:customer-statement-main:export'
},
{
label: t('ts.重新对比'),
name: 'againContrast',
hide: false,
hide: isShowMainButton( chooseRow.value, ['2']),
type: 'primary',
color: '',
float:'left',
hasPermi: ''
hasPermi: 'wms:customer-statement-main:recontrast'
},{
label: t('ts.确认对比结果'),
name: 'confirmResults',
hide: false,
hide: isShowMainButton( chooseRow.value, ['2']),
type: 'primary',
color: '',
float:'left',
hasPermi: ''
hasPermi: 'wms:customer-statement-main:confirmationContrast'
}]
} else if (item.prop == 'ShareReconciliation') {
//
@ -505,16 +505,16 @@ const changeTabs = async (item) => {
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
hasPermi: 'wms:customer-statement-main:export'
},
{
label: t('ts.确认分摊金额'),
name: 'confirmShareMoney',
hide: false,
hide: isShowMainButton(chooseRow.value, ['4']),
type: 'primary',
color: '',
float:'left',
hasPermi: ''
hasPermi: 'wms:customer-statement-main:confirmationShare'
}]
} else{
tableObjectExtend.value = []
@ -524,9 +524,17 @@ const changeTabs = async (item) => {
}
}
//
const detailButtonBaseClick = (val, item) => {
if (val == 'exportReconciliation') {
//
const detailButtonBaseClick = (val, item,detailTableObject) => {
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 == 'confirmResults') {
@ -536,6 +544,34 @@ const detailButtonBaseClick = (val, item) => {
}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) => {

Loading…
Cancel
Save