Browse Source

缺陷修复

intex
yufei_wang 2 days ago
parent
commit
56395c49ce
  1. 4
      src/views/wms/deliversettlementManage/customerSaleInvoiceRecordMain/index.vue
  2. 44
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
  3. 15
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  4. 21
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue

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

@ -99,7 +99,7 @@ const detailButtonBaseClick = async (val, item,tableObject) => {
loadStart()
const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceRecordDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}子表明细${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
@ -174,7 +174,7 @@ const handleExport = async () => {
loadStart()
const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceMainApi.exportCustomerSaleInvoiceRecordMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}主表${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()

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

@ -20,6 +20,50 @@
@submitForm="submitForm"
@inputNumberChange="inputNumberChange"
@onChange="onChange"
:sumFormDataByForm="
(
formRef,
formModel,
tableData,
formType,
originFormModel,
updateOriginFormModel,
sumFormDataHandle1
) => {
const {
taxRate = 0,
amount = 0,
taxAmount = 0,
beforeTaxAmount = 0,
totalTaxAmount = 0,
discountAmount1 = 0,
beforeTaxDiffAmount = 0,
taxAmountDiff = 0,
rebateTax=0,
} = formModel
// 2X*2
if (formType == 'update') {
//
console.log('taxRate', taxRate)
console.log('originFormModel', originFormModel.taxRate)
console.log('taxAmount', taxAmount)
if (taxRate != originFormModel.taxRate) {
if (originFormModel) {
sumFormDataHandle1()
}
updateOriginFormModel(formModel)
}
// 2. mainTaxAmount = */100
let mainTaxAmount = Number(Number(beforeTaxAmount*taxRate*0.01).toFixed(2))
formRef.value.setValues({
//
taxAmount:mainTaxAmount,
// mainAdTaxAmount =+
adTaxAmount:beforeTaxAmount+taxAmount
})
}
}
"
:sumFormDataByTableCustom="
(formRef, formModel, tableData) => {
const { taxRate = 0 } = formModel

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

@ -409,8 +409,10 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'allocationPrice',
sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
disabled: true
disabled: true,
precision: 2
}
},
tableForm: {
@ -424,6 +426,7 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'sumPrice',
sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
disabled: true
}
@ -437,6 +440,12 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '未税金额',
field: 'beforeTaxAmount',
sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
precision: 2
}
},
tableForm: {
type: 'InputNumber',
precision: 2,
@ -447,8 +456,8 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'taxAmount',
sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
type: 'InputNumber',
precision: 2,
disabled: true
}
@ -464,6 +473,7 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'afterTaxAmount',
sort: 'custom',
form: {
component: 'InputNumber',
componentProps: {
disabled: true,
precision: 2,
@ -472,6 +482,7 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
tableForm: {
disabled: true,
type: 'InputNumber',
precision: 2,
}
},
{

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

@ -57,6 +57,21 @@
:detailButtonIsShowDelete="false"
:detailButtonIsShowAdd="false"
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]"
:sumFormDataByForm="
(formRef, formModel) => {console.log('formModel====',formModel)
const { beforeTaxAmount = 0, taxAmount = 0 , qty=0,price,allocationPrice,taxRate=1} = formModel
formRef.value.setValues({
// = +,2
afterTaxAmount: Number((Number(beforeTaxAmount) + Number(taxAmount)).toFixed(2)),
// /-
allocationPrice: Number(Number(Number(beforeTaxAmount)/Number(qty)) - Number(price)),
// = +
sumPrice:Number(Number(price)+Number(allocationPrice)),
// taxAmount */100,2
taxAmount: Number((Number(beforeTaxAmount) * Number(taxRate)))/100 //
})
}
"
@buttonBaseClick="detailButtonBaseClick"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -117,7 +132,7 @@ const detailButtonBaseClick = async (val, item,tableObject) => {
loadStart()
const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceRequestDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}子表明细${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
@ -217,7 +232,7 @@ const buttonTableClick = async (val, row) => {
await message.confirm('确认要发布吗?')
tableObject.loading = true
CustomerSaleInvoiceMainApi.publish(row.id).then(() => {
message.success(t('common.updateSuccess'))
message.success('发布成功')
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
@ -265,7 +280,7 @@ const handleExport = async () => {
loadStart()
const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceMainApi.exportCustomerSaleInvoiceMain(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
download.excel(data, `${excelTitle.value}主表${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()

Loading…
Cancel
Save