Browse Source

点击创建开票申请无反应

intex
yufei_wang 2 days ago
parent
commit
570967e42a
  1. 5
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  2. 49
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
  3. 1
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  4. 12
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

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

@ -80,3 +80,8 @@ export const exportSupplierinvoiceRequestDetail = async (params) => {
export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-detail/get-import-template' })
}
// 模具分摊单价
export const handleAllocationPrice = async (data) => {
return await request.post({ url: `/wms/supplierinvoice-request-detail/handleAllocationPrice`, data })
}

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

@ -70,6 +70,23 @@ const openForm =async (type: string, row?: any) => {
formRef.value.open(type, row)
}
const openFormTable =async (type: string, row?: any, list?:any) => {
row['customerStatementNumber'] = row['number'] //
CustomerSaleInvoiceMain.allSchemas.formSchema.forEach((item) => {
if(item.field == 'customerStatementNumber'){
item.componentProps.disabled = true
item.componentProps.isSearchList = false
item.componentProps.enterSearch = false
}
})
tableData.value = list //
formRef.value.open(type, row)
nextTick(()=>{
initTableDataPrice()
})
}
const onChange = (field, cur, formRef)=>{
console.log('onChange',field, cur, formRef)
@ -205,19 +222,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}).then((res) => {
console.log(55,res)
tableData.value = res.list && res.list.length > 0 ?res.list : []
tableData.value.forEach(item=>{
item['sumPrice'] = item['price'] + item['allocationPrice']
// *2
item['beforeTaxAmount'] = item['sumPrice']*item['qty']
// taxAmount */100,2
item['taxAmount'] = (item['beforeTaxAmount'] * formRef.formModel['taxRate'])/100 //
// +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
})
initTableDataPrice()
})
// tableData.value = []
@ -229,6 +234,22 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
})
}
//
const initTableDataPrice = ()=>{
tableData.value.forEach(item=>{
item['sumPrice'] = item['price'] + item['allocationPrice']
// *2
item['beforeTaxAmount'] = item['sumPrice']*item['qty']
// taxAmount */100,2
item['taxAmount'] = (item['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //
// +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
})
}
const tableData = ref([])
const tableFormKeys = {}
@ -250,6 +271,6 @@ const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item))
}
defineExpose({openForm})
defineExpose({openForm,openFormTable})
</script>
<style lang="scss" scoped></style>

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

@ -478,6 +478,7 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
label: '操作',
field: 'action',
isForm: false,
isTableForm: false,
table: {
width: 150,
fixed: 'right'

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

@ -131,10 +131,14 @@
:importTemplateData="importShareTemplateData"
@success="importSuccess"
/>
<!-- 表单弹窗添加/修改 -->
<CustomerSaleInvoiceBasicForm ref="saleFormRef" @getList="getList" @buttonBaseClick="buttonBaseClick"/>
</template>
<script setup lang="ts">
import download from '@/utils/download'
import CustomerSaleInvoiceBasicForm from '@/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue'
import {
CustomerStatementMain,
CustomerStatementMainRules,
@ -299,6 +303,8 @@ const butttondata = (row, $index) => {
]
}
const saleFormRef = ref()
// -
const buttonTableClick = async (val, row) => {
if (val == 'rematch') {
@ -315,6 +321,12 @@ const buttonTableClick = async (val, row) => {
handleConfirmShareMoney(row.id)
} else if (val == 'createTicketApply') {
//
let mainRes = await CustomerStatementMainApi.getCustomerStatementMain(row.id)
let detailRes = await CustomerStatementDetailApi.pageInvoice(row.id)
console.log('创建开票申请',mainRes)
console.log('创建开票申请11',detailRes)
saleFormRef.value.openFormTable('create',mainRes,detailRes?.list)
// handleConfirmShareMoney(row.id)
} else if (val == 'sendBack') {
// 退

Loading…
Cancel
Save