Browse Source

点击创建开票申请无反应

intex
yufei_wang 2 days ago
parent
commit
570967e42a
  1. 5
      src/api/wms/supplierinvoiceRequestDetail/index.ts
  2. 45
      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 = () => { export const importTemplate = () => {
return request.download({ url: '/wms/supplierinvoice-request-detail/get-import-template' }) 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 })
}

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

@ -70,6 +70,23 @@ const openForm =async (type: string, row?: any) => {
formRef.value.open(type, row) 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)=>{ const onChange = (field, cur, formRef)=>{
console.log('onChange',field, cur, formRef) console.log('onChange',field, cur, formRef)
@ -205,28 +222,32 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
}).then((res) => { }).then((res) => {
console.log(55,res) console.log(55,res)
tableData.value = res.list && res.list.length > 0 ?res.list : [] tableData.value = res.list && res.list.length > 0 ?res.list : []
initTableDataPrice()
})
// tableData.value = []
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
}
//
const initTableDataPrice = ()=>{
tableData.value.forEach(item=>{ tableData.value.forEach(item=>{
item['sumPrice'] = item['price'] + item['allocationPrice'] item['sumPrice'] = item['price'] + item['allocationPrice']
// *2 // *2
item['beforeTaxAmount'] = item['sumPrice']*item['qty'] item['beforeTaxAmount'] = item['sumPrice']*item['qty']
// taxAmount */100,2 // taxAmount */100,2
item['taxAmount'] = (item['beforeTaxAmount'] * formRef.formModel['taxRate'])/100 // item['taxAmount'] = (item['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //
// +,2 // +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] // item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
}) })
})
// tableData.value = []
}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
})
} }
@ -250,6 +271,6 @@ const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter(item => !selection.includes(item))
} }
defineExpose({openForm}) defineExpose({openForm,openFormTable})
</script> </script>
<style lang="scss" scoped></style> <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: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isTableForm: false,
table: { table: {
width: 150, width: 150,
fixed: 'right' fixed: 'right'

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

@ -131,10 +131,14 @@
:importTemplateData="importShareTemplateData" :importTemplateData="importShareTemplateData"
@success="importSuccess" @success="importSuccess"
/> />
<!-- 表单弹窗添加/修改 -->
<CustomerSaleInvoiceBasicForm ref="saleFormRef" @getList="getList" @buttonBaseClick="buttonBaseClick"/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import CustomerSaleInvoiceBasicForm from '@/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue'
import { import {
CustomerStatementMain, CustomerStatementMain,
CustomerStatementMainRules, CustomerStatementMainRules,
@ -299,6 +303,8 @@ const butttondata = (row, $index) => {
] ]
} }
const saleFormRef = ref()
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'rematch') { if (val == 'rematch') {
@ -315,6 +321,12 @@ const buttonTableClick = async (val, row) => {
handleConfirmShareMoney(row.id) handleConfirmShareMoney(row.id)
} else if (val == 'createTicketApply') { } 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) // handleConfirmShareMoney(row.id)
} else if (val == 'sendBack') { } else if (val == 'sendBack') {
// 退 // 退

Loading…
Cancel
Save