Browse Source

Merge remote-tracking branch 'remotes/origin/intex_online20250410' into intex_online20250427

intex_online20250427
songguoqiang 3 days ago
parent
commit
13f2cecd4e
  1. 5
      src/api/wms/customerStatementMain/index.ts
  2. 3
      src/components/Form/src/Form.vue
  3. 5
      src/locales/en-US.ts
  4. 3
      src/locales/zh-CN.ts
  5. 133
      src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/customerSaleInvoiceRecordMain.data.ts
  6. 56
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
  7. 91
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  8. 85
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

5
src/api/wms/customerStatementMain/index.ts

@ -96,7 +96,10 @@ export const publish = async (id: number) => {
export const confirmationShare = async (id: number) => { export const confirmationShare = async (id: number) => {
return await request.get({ url: `/wms/customer-statement-main/confirmationShare?id=` + id}) return await request.get({ url: `/wms/customer-statement-main/confirmationShare?id=` + id})
} }
// 根据对账单主id点击确认不分摊
export const confirmationNoShare = async (id: number) => {
return await request.get({ url: `/wms/customer-statement-main/confirmationNoShare?id=` + id })
}
// 客户对账单查询客户代码 // 客户对账单查询客户代码
export const getCustomerList = async () => { export const getCustomerList = async () => {
return await request.get({ url: `/wms/customer-statement-main/confirmationShare`}) return await request.get({ url: `/wms/customer-statement-main/confirmationShare`})

3
src/components/Form/src/Form.vue

@ -496,4 +496,7 @@ export default defineComponent({
::v-deep(.el-select-v2 .el-icon) { ::v-deep(.el-select-v2 .el-icon) {
display: inline-flex; display: inline-flex;
} }
::v-deep(.el-input-number){
width: 100%;
}
</style> </style>

5
src/locales/en-US.ts

@ -1313,13 +1313,16 @@ export default {
: 'Re comparison successful', : 'Re comparison successful',
: 'Confirm the comparison results', : 'Confirm the comparison results',
: 'Confirmed successful', : 'Confirmed successful',
: 'Confirm successful non allocation',
: 'Confirm the shared amount', : 'Confirm the shared amount',
: 'Confirm not to allocate',
: 'Import mold allocation statement', : 'Import mold allocation statement',
: 'Do you want to re compare?', : 'Do you want to re compare?',
: 'Are you sure about the comparison results?', : 'Are you sure about the comparison results?',
"是否退回所选中数据?": 'Do you want to return the selected data?', "是否退回所选中数据?": 'Do you want to return the selected data?',
退: 'Returned successfully', 退: 'Returned successfully',
: 'Do you want to confirm the allocation amount?', : 'Are you sure about the allocation amount?',
: 'Are you sure not to allocate?',
: 'Create an invoice request?', : 'Create an invoice request?',
:'Detail', :'Detail',
退:'Return', 退:'Return',

3
src/locales/zh-CN.ts

@ -1313,13 +1313,16 @@ export default {
: '重新对比成功', : '重新对比成功',
: '确认对比结果', : '确认对比结果',
: '确认成功', : '确认成功',
: '确认不分摊成功',
: '确认分摊金额', : '确认分摊金额',
: '确认不分摊',
: '导入模具分摊对账单', : '导入模具分摊对账单',
: '是否重新对比?', : '是否重新对比?',
"是否确认对比结果": "是否确认对比结果?", "是否确认对比结果": "是否确认对比结果?",
"是否退回所选中数据?": '是否退回所选中数据?', "是否退回所选中数据?": '是否退回所选中数据?',
退: '退回成功', 退: '退回成功',
: '是否确认分摊金额?', : '是否确认分摊金额?',
: '是否确认不分摊?',
: '创建开票申请', : '创建开票申请',
:'作废成功', :'作废成功',
退: '退回', 退: '退回',

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

@ -5,6 +5,7 @@ import {
} from '../moldAllocation/customerStatement/customerStatementMain.data' } from '../moldAllocation/customerStatement/customerStatementMain.data'
import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain' import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
import { accountantFormart } from '@/utils/formatter'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -166,6 +167,138 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
width:150 width:150
} }
}, },
{
label: '模具未税金额',
field: 'moldUntaxedAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '模具税额',
field: 'moldTaxAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '模具含税金额',
field: 'moldTaxTotal',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料未税金额',
field: 'materialsUntaxedAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料税额',
field: 'materialsTaxAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{
label: '材料含税金额',
field: 'materialsTaxTotal',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
}, {
label: '模具未税尾差',
field: 'allocationDifferenceBeforeTax',
formatter: accountantFormart,
table: {
width: 160
},
form: {
component: 'InputNumber',
componentProps: {
precision: 2,
disabled: true,
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
}
},
{ {
label: '金税票号', label: '金税票号',
field: 'goldenTaxInvoiceNumber', field: 'goldenTaxInvoiceNumber',

56
src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue

@ -41,6 +41,8 @@
beforeTaxDiffAmount = 0, beforeTaxDiffAmount = 0,
taxAmountDiff = 0, taxAmountDiff = 0,
rebateTax = 0, rebateTax = 0,
moldUntaxedAmount=0,
materialsUntaxedAmount=0
} = formModel } = formModel
// 2X*2 // 2X*2
if (formType == 'update') { if (formType == 'update') {
@ -56,11 +58,29 @@
} }
// 2. mainTaxAmount = */100 // 2. mainTaxAmount = */100
let mainTaxAmount = Number(beforeTaxAmount*taxRate*0.01).toFixed(2) let mainTaxAmount = Number(beforeTaxAmount*taxRate*0.01).toFixed(2)
// 4 moldTaxAmount = */100
let moldTaxAmount = Number(Number(moldUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// 6 materialsTaxAmount = */100
let materialsTaxAmount = Number(Number(materialsUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// *
let allAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['allocationPrice'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
formRef.value.setValues({ formRef.value.setValues({
// //
taxAmount:mainTaxAmount, taxAmount:mainTaxAmount,
// mainAdTaxAmount =+ // mainAdTaxAmount =+
adTaxAmount:beforeTaxAmount+parseFloat(taxAmount) adTaxAmount: (beforeTaxAmount + parseFloat(taxAmount)).toFixed(2),
//
moldTaxAmount:moldTaxAmount,
// - = +
moldTaxTotal: (Number(moldUntaxedAmount) + Number(moldTaxAmount)).toFixed(2),
// -
materialsTaxAmount: materialsTaxAmount,
// -= +
materialsTaxTotal: (Number(materialsUntaxedAmount) + Number(materialsTaxAmount)).toFixed(2),
// allocationDifferenceBeforeTax : *
// allocationDifferenceBeforeTax: (Number(moldUntaxedAmount) - Number(allAmount)).toFixed(2),
}) })
} }
} }
@ -70,15 +90,40 @@
const { taxRate = 0 } = formModel const { taxRate = 0 } = formModel
// 1 mainBeforeTaxAmount : // 1 mainBeforeTaxAmount :
let mainBeforeTaxAmount = tableData.reduce((prev, item) =>prev + Number(item['beforeTaxAmount'].toFixed(2)),0).toFixed(2) let mainBeforeTaxAmount = tableData.reduce((prev, item) =>prev + Number(item['beforeTaxAmount'].toFixed(2)),0).toFixed(2)
// 2. mainTaxAmount = */100 // 2 mainTaxAmount = */100
let mainTaxAmount = Number(mainBeforeTaxAmount * taxRate * 0.01).toFixed(2) let mainTaxAmount = Number(mainBeforeTaxAmount * taxRate * 0.01).toFixed(2)
// 3 moldUntaxedAmount : moldUntaxedAmount
let moldUntaxedAmount = tableData[0].moldUntaxedAmount
// 4 moldTaxAmount = */100
let moldTaxAmount = Number(Number(moldUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// 5 materialsUntaxedAmount : *
let materialsUntaxedAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['price'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
// 6 materialsTaxAmount = */100
let materialsTaxAmount = Number(Number(materialsUntaxedAmount) * Number(taxRate) * 0.01).toFixed(2)
// *
let allAmount = tableData.reduce((prev, item) =>prev + Number((Number(item['allocationPrice'])*Number(item['qty'])).toFixed(2)),0).toFixed(2)
const sumObject = { const sumObject = {
// //
beforeTaxAmount:mainBeforeTaxAmount, beforeTaxAmount:mainBeforeTaxAmount,
// //
taxAmount:mainTaxAmount, taxAmount:mainTaxAmount,
// mainAdTaxAmount =+ // mainAdTaxAmount =+
adTaxAmount:(Number(mainBeforeTaxAmount)+Number(mainTaxAmount)).toFixed(2) adTaxAmount:(Number(mainBeforeTaxAmount)+Number(mainTaxAmount)).toFixed(2),
// -
moldUntaxedAmount: moldUntaxedAmount,
// -
moldTaxAmount:moldTaxAmount,
// - = +
moldTaxTotal: (Number(moldUntaxedAmount) + Number(moldTaxAmount)).toFixed(2),
// -
materialsUntaxedAmount: materialsUntaxedAmount,
// -
materialsTaxAmount: materialsTaxAmount,
// -= +
materialsTaxTotal: (Number(materialsUntaxedAmount) + Number(materialsTaxAmount)).toFixed(2),
// allocationDifferenceBeforeTax : *
allocationDifferenceBeforeTax: (Number(moldUntaxedAmount) - Number(allAmount)).toFixed(2),
} }
formRef.value.setValues(sumObject) formRef.value.setValues(sumObject)
} }
@ -267,7 +312,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
setV['customerName'] = val[0]['customerName'] setV['customerName'] = val[0]['customerName']
CustomerStatementDetailApi.getCustomerStatementDetailPage({ CustomerStatementDetailApi.getCustomerStatementDetailPage({
pageNo:1, pageNo:1,
pageSize: 5000, pageSize: 50000,
masterId:val[0]['id'] masterId:val[0]['id']
}).then((res) => { }).then((res) => {
console.log(55,res) console.log(55,res)
@ -323,4 +368,5 @@ const tableSelectionDelete = (selection) => {
defineExpose({openForm,openFormTable}) defineExpose({openForm,openFormTable})
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
</style>

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

@ -6,6 +6,7 @@ import {
import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain' import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
import { DICT_TYPE, getDictOptions } from '@/utils/dict' import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import { accountantFormart } from '@/utils/formatter'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
const invoiceType = [{label:'全部',value:''},...getDictOptions(DICT_TYPE.INVOICE_TYPE)] const invoiceType = [{label:'全部',value:''},...getDictOptions(DICT_TYPE.INVOICE_TYPE)]
console.log(888, invoiceType) console.log(888, invoiceType)
@ -212,6 +213,96 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
width:150 width:150
} }
}, },
{
label: '模具未税金额',
field: 'moldUntaxedAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '模具税额',
field: 'moldTaxAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '模具含税金额',
field: 'moldTaxTotal',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '材料未税金额',
field: 'materialsUntaxedAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '材料税额',
field: 'materialsTaxAmount',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
},
{
label: '材料含税金额',
field: 'materialsTaxTotal',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
}, {
label: '模具未税尾差',
field: 'allocationDifferenceBeforeTax',
formatter: accountantFormart,
table: {
width: 160
},
form: {
componentProps: {
disabled: true,
}
},
},
{ {
label: '金税票号', label: '金税票号',
field: 'goldenTaxInvoiceNumber', field: 'goldenTaxInvoiceNumber',

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

@ -291,6 +291,15 @@ const butttondata = (row, $index) => {
hasPermi: 'wms:customer-statement-main:confirmationShare', hasPermi: 'wms:customer-statement-main:confirmationShare',
link: true // link: true //
}, },
{
label: t('ts.确认不分摊'),
name: 'confirmationNoShare',
hide: row.isNoShare!='1',
type: 'primary',
color: '',
hasPermi: 'wms:customer-statement-main:confirmationShare',
link: true //
},
{ {
label: t('ts.创建开票申请'), label: t('ts.创建开票申请'),
name: 'createTicketApply', name: 'createTicketApply',
@ -327,6 +336,9 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'confirmShareMoney') { } else if (val == 'confirmShareMoney') {
// //
handleConfirmShareMoney(row.id) handleConfirmShareMoney(row.id)
} else if (val == 'confirmationNoShare') {
//
handleConfirmationNoShare(row.id)
} else if (val == 'createTicketApply') { } else if (val == 'createTicketApply') {
// //
let mainRes = await CustomerStatementMainApi.getCustomerStatementMain(row.id) let mainRes = await CustomerStatementMainApi.getCustomerStatementMain(row.id)
@ -572,6 +584,26 @@ const handleConfirmShareMoney = async (id: number) => {
await getList() await getList()
} }
} }
//
const handleConfirmationNoShare = async (id: number) => {
try {
await message.confirm(t('ts.是否确认不分摊'))
await CustomerStatementMainApi.confirmationNoShare(id)
// chooseRow.value = 5
let res = await CustomerStatementMainApi.getCustomerStatementMainPage({
id:chooseRow.value.id,
pageSize:20,
pageNo:1
})
if(res&&res.list&&res.list.length>0){
chooseRow.value = res.list[0]
}
await message.success(t('ts.确认不分摊成功'))
} finally {
//
await getList()
}
}
// //
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) { if (val.indexOf(row.status) > -1) {
@ -580,6 +612,14 @@ const isShowMainButton = (row, val) => {
return true return true
} }
} }
//
const isShowMainButton1 = (row, val) => {
if (val.indexOf(row.isNoShare) > -1) {
return false
} else {
return true
}
}
const tabCurrent = ref({}) const tabCurrent = ref({})
const changeTabs = async (item) => { const changeTabs = async (item) => {
tabCurrent.value = item tabCurrent.value = item
@ -684,6 +724,16 @@ console.log(555,DetailAllSchemas.value)
float: 'left', float: 'left',
disabled: chooseRow.value.isShare == 0 ? true : false, disabled: chooseRow.value.isShare == 0 ? true : false,
hasPermi: 'wms:customer-statement-main:confirmationShare' hasPermi: 'wms:customer-statement-main:confirmationShare'
},
{
label: t('ts.确认不分摊'),
name: 'confirmationNoShare',
hide: isShowMainButton1(chooseRow.value, ['1']),
type: 'primary',
color: '',
float: 'left',
disabled: chooseRow.value.isNoShare == 0 ? true : false,
hasPermi: 'wms:customer-statement-main:confirmationShare'
} }
] ]
} else { } else {
@ -747,6 +797,23 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => {
} }
] ]
} catch {} } catch {}
}else if (val == 'confirmationNoShare') {
//
try {
await handleConfirmationNoShare(chooseRow.value.id)
detailRef.value.submitUpdateList()
otherHeadButttonData.value = [
{
label: t(`ts.导出`).replace('ts.', ''),
name: 'export',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: 'wms:customer-statement-main:export'
}
]
} catch {}
} }
} }
// //
@ -833,6 +900,15 @@ const handleDetailSubmitForm = async (formType, data) => {
disabled:true, disabled:true,
float: 'left', float: 'left',
hasPermi: 'wms:customer-statement-main:confirmationShare' hasPermi: 'wms:customer-statement-main:confirmationShare'
}, {
label: t('ts.确认不分摊'),
name: 'confirmationNoShare',
hide: isShowMainButton1(chooseRow.value, ['1']),
type: 'primary',
color: '',
float: 'left',
disabled:true,
hasPermi: 'wms:customer-statement-main:confirmationShare'
} }
] ]
} else { } else {
@ -855,6 +931,15 @@ const handleDetailSubmitForm = async (formType, data) => {
disabled:false, disabled:false,
float: 'left', float: 'left',
hasPermi: 'wms:customer-statement-main:confirmationShare' hasPermi: 'wms:customer-statement-main:confirmationShare'
} ,{
label: t('ts.确认不分摊'),
name: 'confirmationNoShare',
hide: isShowMainButton1(chooseRow.value, ['1']),
type: 'primary',
color: '',
float: 'left',
disabled: false,
hasPermi: 'wms:customer-statement-main:confirmationShare'
} }
] ]
} }

Loading…
Cancel
Save