Browse Source

销售开票问题

intex_online20241228
王宇飞 3 months ago
parent
commit
485efcda90
  1. 7
      src/api/wms/customerSaleInvoiceDetail/index.ts
  2. 8
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/CustomerSaleInvoiceBasicForm.vue
  3. 22
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/customerSaleInvoiceRequestMain.data.ts
  4. 42
      src/views/wms/deliversettlementManage/customerSaleInvoiceRequestMain/index.vue

7
src/api/wms/customerSaleInvoiceDetail/index.ts

@ -61,7 +61,12 @@ export const deleteCustomerSaleInvoiceDetail = async (id: number) => {
// 导出客户销售开票子信息表(WMS) Excel
export const exportCustomerSaleInvoiceDetail = async (params) => {
return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params })
if (params.isSearch) {
const data = { ...params }
return await request.downloadPost({ url: `/wms/customer-sale-invoice-detail/export-excel-senior`, data })
} else {
return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params })
}
}
// 下载用户导入模板

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

@ -91,6 +91,9 @@ const inputNumberChange = (field, index, row, val) => {
// /-
row['allocationPrice'] = row['beforeTaxAmount']/row['qty'] - row['price']
// taxAmount */100,2
row['taxAmount'] = (row['beforeTaxAmount'] * formRef.value.formRef.formModel['taxRate'])/100 //
}
@ -205,12 +208,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
item['sumPrice'] = item['price'] + item['allocationPrice']
// *2
item['beforeTaxAmount'] = item['sumPrice']*item['qty']
// +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
// taxAmount */100,2
item['taxAmount'] = (item['beforeTaxAmount'] * formRef.formModel['taxRate'])/100 //
// +,2
item['afterTaxAmount'] = item['beforeTaxAmount'] + item['taxAmount'] //
})

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

@ -53,7 +53,14 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
dictClass: 'string',
table:{
width:120
}
},
search:{
component:'Select',
componentProps: {
multiple:true,
}
},
},
{
label: '客户对账单',
@ -200,6 +207,9 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
@ -232,6 +242,16 @@ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x',
}
},
isForm: false,
table:{
width:180

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

@ -56,6 +56,8 @@
:detailButtonIsShowAddStatusArray="['0']"
:detailButtonIsShowDelete="false"
:detailButtonIsShowAdd="false"
:otherHeadButttonData = "[defaultButtons.defaultExportBtn({hasPermi:`wms:customer-sale-invoice-request-main:export` })]"
@buttonBaseClick="detailButtonBaseClick"
@searchTableSuccessDetail="searchTableSuccessDetail"
/>
@ -75,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as AreabasicApi from '@/api/wms/areabasic'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import { status } from 'nprogress'
const { loadStart, loadDone } = usePageLoading()
//
defineOptions({ name: 'customerSaleInvoiceMain' })
@ -102,7 +105,28 @@ const updataTableColumns = (val) => {
tableColumns.value = val
}
//
const detailButtonBaseClick = async (val, item,tableObject) => {
if (val == 'export') {
//
console.log('子表导出',val, tableObject)
try {
//
await message.exportConfirm()
//
loadStart()
const excelTitle = ref(route.meta.title)
const data = await CustomerSaleInvoiceDetailApi.exportCustomerSaleInvoiceDetail(tableObject.params)
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
loadDone()
}
}
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => {
nextTick(() => {
@ -276,6 +300,22 @@ const searchFormClick = (searchData) => {
}
const seachRef = ref()
const onSearchChange = (field, value)=>{
console.log('onSearchChange',field,value)
if(field=='status'){
//
if(value.length>0){
if(value[value.length-1]==''){
//
seachRef.value.setFormValues({
status:['']
})
}else{
seachRef.value.setFormValues({
status:value.filter(item=>item!='')
})
}
}
}
if(field=='customerCode'){
if(value.length>0){
if(value[value.length-1]=='ALL'){
@ -293,7 +333,7 @@ const onSearchChange = (field, value)=>{
}
const searchClick = async (data)=>{
console.log('查询',data)
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL')})
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')})
}
/** 初始化 **/
onMounted(async () => {

Loading…
Cancel
Save