|
@ -1,7 +1,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<!-- 搜索工作栏 --> |
|
|
<!-- 搜索工作栏 --> |
|
|
<Search :schema="CustomerSaleInvoiceMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
<Search ref="seachRef" :schema="CustomerSaleInvoiceMain.allSchemas.searchSchema" @search="searchClick" @reset="searchClick" @onChange="onSearchChange"/> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
<!-- 列表头部 --> |
|
@ -41,8 +41,9 @@ |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="formRef" |
|
|
ref="formRef" |
|
|
:isOpenSearchTable="true" |
|
|
:isShowButton="false" |
|
|
fieldTableColumn="itemCode" |
|
|
:isShowReduceButton="false" |
|
|
|
|
|
:isShowReduceButtonSelection="false" |
|
|
:rules="CustomerSaleInvoiceMainRules" |
|
|
:rules="CustomerSaleInvoiceMainRules" |
|
|
:formAllSchemas="CustomerSaleInvoiceMain.allSchemas" |
|
|
:formAllSchemas="CustomerSaleInvoiceMain.allSchemas" |
|
|
:tableAllSchemas="CustomerSaleInvoiceDetail.allSchemas" |
|
|
:tableAllSchemas="CustomerSaleInvoiceDetail.allSchemas" |
|
@ -53,7 +54,6 @@ |
|
|
:isBusiness="true" |
|
|
:isBusiness="true" |
|
|
@handleAddTable="handleAddTable" |
|
|
@handleAddTable="handleAddTable" |
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
:isShowReduceButtonSelection="true" |
|
|
|
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
@ -72,11 +72,11 @@ |
|
|
let mainTaxAmount = Number(Number(mainBeforeTaxAmount*taxRate*0.01).toFixed(2)) |
|
|
let mainTaxAmount = Number(Number(mainBeforeTaxAmount*taxRate*0.01).toFixed(2)) |
|
|
const sumObject = { |
|
|
const sumObject = { |
|
|
// 主数据未税金额 |
|
|
// 主数据未税金额 |
|
|
mainBeforeTaxAmount, |
|
|
beforeTaxAmount:mainBeforeTaxAmount, |
|
|
// 主数据税额 |
|
|
// 主数据税额 |
|
|
mainTaxAmount, |
|
|
taxAmount:mainTaxAmount, |
|
|
// 主数据价税合计金额:mainAdTaxAmount =未税金额+税额 |
|
|
// 主数据价税合计金额:mainAdTaxAmount =未税金额+税额 |
|
|
mainAdTaxAmount:mainBeforeTaxAmount+mainTaxAmount |
|
|
adTaxAmount:mainBeforeTaxAmount+mainTaxAmount |
|
|
} |
|
|
} |
|
|
formRef.value.setValues(sumObject) |
|
|
formRef.value.setValues(sumObject) |
|
|
} |
|
|
} |
|
@ -95,6 +95,9 @@ |
|
|
:apiPage="CustomerSaleInvoiceDetailApi.getCustomerSaleInvoiceDetailPage" |
|
|
:apiPage="CustomerSaleInvoiceDetailApi.getCustomerSaleInvoiceDetailPage" |
|
|
:apiDelete="CustomerSaleInvoiceDetailApi.deleteCustomerSaleInvoiceDetail" |
|
|
:apiDelete="CustomerSaleInvoiceDetailApi.deleteCustomerSaleInvoiceDetail" |
|
|
:Echo="Echo" |
|
|
:Echo="Echo" |
|
|
|
|
|
:detailButtonIsShowAddStatusArray="['0']" |
|
|
|
|
|
:detailButtonIsShowDelete="false" |
|
|
|
|
|
:detailButtonIsShowAdd="false" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
@ -284,71 +287,17 @@ const butttondata = (row,$index) => { |
|
|
// defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:customer-sale-invoice-request-main:submit`}), // 提交审批 |
|
|
// defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:customer-sale-invoice-request-main:submit`}), // 提交审批 |
|
|
// defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:customer-sale-invoice-request-main:reject`}), // 驳回 |
|
|
// defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:customer-sale-invoice-request-main:reject`}), // 驳回 |
|
|
// defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:customer-sale-invoice-request-main:agree`}), // 审批通过 |
|
|
// defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:`wms:customer-sale-invoice-request-main:agree`}), // 审批通过 |
|
|
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:`wms:customer-sale-invoice-request-main:publish`}), // 发布 |
|
|
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['0']),hasPermi:`wms:customer-sale-invoice-request-main:publish`}), // 发布 |
|
|
// defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:`wms:customer-sale-invoice-request-main:resetting`}), // 重置 |
|
|
// defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:`wms:customer-sale-invoice-request-main:resetting`}), // 重置 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:`wms:customer-sale-invoice-request-main:update`}), // 编辑 |
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['0']),hasPermi:`wms:customer-sale-invoice-request-main:update`}), // 编辑 |
|
|
defaultButtons.mainListCancelBtn({hide: isShowMainButton(row,['5']),hasPermi:'wms:customer-sale-invoice-request-main:cancel'}), //作废 |
|
|
defaultButtons.mainListCancelBtn({hide: isShowMainButton(row,['0']),hasPermi:'wms:customer-sale-invoice-request-main:cancel'}), //作废 |
|
|
|
|
|
|
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'mainPlanOpe') { // 打开 |
|
|
if (val == 'mainPlanPub') { // 发布 |
|
|
tableObject.loading = true |
|
|
|
|
|
CustomerSaleInvoiceMainApi.open(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainPlanClo') { // 关闭 |
|
|
|
|
|
await message.confirm('确认要关闭吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
CustomerSaleInvoiceMainApi.close(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainPlanSub') { // 提交审批 |
|
|
|
|
|
await message.confirm('确认要提交审批吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
CustomerSaleInvoiceMainApi.submit(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainPlanTur') { // 驳回 |
|
|
|
|
|
await message.confirm('确认要驳回吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
CustomerSaleInvoiceMainApi.reject(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainPlanApp') { // 审批通过 |
|
|
|
|
|
await message.confirm('确认要审批通过吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
CustomerSaleInvoiceMainApi.agree(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'mainPlanPub') { // 发布 |
|
|
|
|
|
await message.confirm('确认要发布吗?') |
|
|
await message.confirm('确认要发布吗?') |
|
|
tableObject.loading = true |
|
|
tableObject.loading = true |
|
|
CustomerSaleInvoiceMainApi.publish(row.id).then(() => { |
|
|
CustomerSaleInvoiceMainApi.publish(row.id).then(() => { |
|
@ -360,11 +309,11 @@ const buttonTableClick = async (val, row) => { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
} else if (val == 'cancel') { // 作废 |
|
|
} else if (val == 'cancel') { // 作废 |
|
|
tableObject.loading = true |
|
|
|
|
|
try { |
|
|
try { |
|
|
await message.confirm('确认要作废吗?') |
|
|
await message.confirm('确认要作废吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
await CustomerSaleInvoiceMainApi.nodeAbrogate(row.id) |
|
|
await CustomerSaleInvoiceMainApi.nodeAbrogate(row.id) |
|
|
await message.success(t('ts.作废成功')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
//exportLoading.value = true |
|
|
//exportLoading.value = true |
|
|
} catch { |
|
|
} catch { |
|
@ -372,27 +321,22 @@ const buttonTableClick = async (val, row) => { |
|
|
// 刷新列表 |
|
|
// 刷新列表 |
|
|
buttonBaseClick('refresh',null) |
|
|
buttonBaseClick('refresh',null) |
|
|
} |
|
|
} |
|
|
} else if (val == 'mainPlanRes') { // 重置 |
|
|
|
|
|
await message.confirm('确认要重置吗?') |
|
|
|
|
|
tableObject.loading = true |
|
|
|
|
|
CustomerSaleInvoiceMainApi.resetting(row.masterId).then(() => { |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
tableObject.loading = false |
|
|
|
|
|
console.log(err) |
|
|
|
|
|
}) |
|
|
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
} else if (val == 'edit') { // 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
|
|
handleDelete(row.masterId) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
/** 添加/修改操作 */ |
|
|
const formRef = ref() |
|
|
const formRef = ref() |
|
|
const openForm =async (type: string, row?: number) => { |
|
|
const openForm =async (type: string, row?: any) => { |
|
|
|
|
|
CustomerSaleInvoiceMain.allSchemas.formSchema.forEach((item) => { |
|
|
|
|
|
if(item.field == 'customerStatementNumber'){ |
|
|
|
|
|
item.componentProps.disabled = type=='update' |
|
|
|
|
|
item.componentProps.isSearchList = type!='update' |
|
|
|
|
|
item.componentProps.enterSearch = type!='update' |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
tableData.value = [] // 重置明细数据 |
|
|
tableData.value = [] // 重置明细数据 |
|
|
formRef.value.open(type, row) |
|
|
formRef.value.open(type, row) |
|
|
} |
|
|
} |
|
@ -577,7 +521,27 @@ const searchFormClick = (searchData) => { |
|
|
} |
|
|
} |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
const seachRef = ref() |
|
|
|
|
|
const onSearchChange = (field, value)=>{ |
|
|
|
|
|
if(field=='customerCode'){ |
|
|
|
|
|
if(value.length>0){ |
|
|
|
|
|
if(value[value.length-1]=='ALL'){ |
|
|
|
|
|
//全选 |
|
|
|
|
|
seachRef.value.setFormValues({ |
|
|
|
|
|
customerCode:['ALL'] |
|
|
|
|
|
}) |
|
|
|
|
|
}else{ |
|
|
|
|
|
seachRef.value.setFormValues({ |
|
|
|
|
|
customerCode:value.filter(item=>item!='ALL') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
const searchClick = async (data)=>{ |
|
|
|
|
|
console.log('查询',data) |
|
|
|
|
|
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')}) |
|
|
|
|
|
} |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|