Browse Source

销售开票申请

intex_online20241111
yufei_wang 3 weeks ago
parent
commit
a723e8cfda
  1. 77
      src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts
  2. 20
      src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue

77
src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts

@ -7,10 +7,13 @@ import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
// 表单校验 // 表单校验
export const CustomerSaleInvoiceMainRules = reactive({ export const CustomerSaleInvoiceMainRules = reactive({
beforeTaxAmount: [required], customerStatementNumber: [required],
customerCode: [required],
customerName: [required],
mainBeforeTaxAmount: [required],
taxRate: [required], taxRate: [required],
taxAmount: [required], mainTaxAmount: [required],
adTaxAmount: [required], mainAdTaxAmount: [required],
}) })
export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([ export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
@ -185,9 +188,48 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm: false, isForm: false,
tableForm: { // tableForm:{
disabled:true // disabled:true,
} // multiple:true,
// isInpuFocusShow: true, // 开启查询弹窗
// searchListPlaceholder: '请选择物料代码',
// searchField: 'code',
// searchTitle: '物料基础信息',
// searchAllSchemas: Itembasic.allSchemas,
// searchPage: CustomerStatementDetailApi.getCustomerStatementDetailPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }],
// verificationPage: ItembasicApi.getItemListByCodes, // 失去焦点校验输入框的数据内容存在
// isShowTableFormSearch: true,
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: 'true',
// isFormModel: true
// }], // 失去焦点校验参数
// },
// form: {
// // labelMessage: '信息提示说明!!!',
// componentProps: {
// isSearchList: true, // 开启查询弹窗
// searchListPlaceholder: '请选择物料代码',
// searchField: 'code',
// searchTitle: '物料基础信息',
// searchAllSchemas: Itembasic.allSchemas,
// searchPage: ItembasicApi.getItembasicPage,
// searchCondition: [{
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }]
// }
// }
}, },
{ {
label: '品号', label: '品号',
@ -217,6 +259,10 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
isMainValue: false isMainValue: false
}] }]
} }
},
tableForm: {
type: 'InputNumber',
precision: 2,
} }
}, },
{ {
@ -228,6 +274,9 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
},
tableForm: {
type: 'InputNumber',
} }
}, },
{ {
@ -238,6 +287,9 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
},
tableForm: {
type: 'InputNumber',
} }
}, },
{ {
@ -248,12 +300,19 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
},
tableForm: {
disabled: true,
type: 'InputNumber',
} }
}, },
{ {
label: '未税金额', label: '未税金额',
field: 'beforeTaxAmount', field: 'beforeTaxAmount',
sort: 'custom', sort: 'custom',
tableForm: {
type: 'InputNumber',
}
}, },
{ {
label: '税额', label: '税额',
@ -263,6 +322,9 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
},
tableForm: {
type: 'InputNumber',
} }
}, },
{ {
@ -273,6 +335,9 @@ export const CustomerSaleInvoiceDetail = useCrudSchemas(reactive<CrudSchema[]>([
componentProps: { componentProps: {
disabled: true disabled: true
} }
},
tableForm: {
type: 'InputNumber',
} }
}, },

20
src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue

@ -57,6 +57,15 @@
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
@inputNumberChange="inputNumberChange"
:sumFormDataByTableCustom="
(formRef, formModel, tableData) => {
tableData.forEach(item=>{
})
}
"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -134,7 +143,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row[formField] = item[searchField] row[formField] = item[searchField]
newRow['uom'] = item['customerUom'] newRow['uom'] = item['customerUom']
newRow['id'] = item['id'] newRow['id'] = item['id']
.push(newRow) tableData.value.push(newRow)
}) })
}else{ }else{
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
@ -157,6 +166,10 @@ 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 : []
tableData.value.forEach(item=>{
item['sumPrice'] = item['price'] + item['allocationPrice']
})
}) })
// tableData.value = [] // tableData.value = []
@ -406,6 +419,11 @@ const handleDeleteTable = (item, index) => {
const tableSelectionDelete = (selection) => { const tableSelectionDelete = (selection) => {
tableData.value = tableData.value.filter(item => !selection.includes(item)) tableData.value = tableData.value.filter(item => !selection.includes(item))
} }
const inputNumberChange = (field, index, row, val) => {
console.log('inputNumberChange',field, index, row, val)
row['sumPrice'] = row['price'] + row['allocationPrice']
}
//true0 //true0
const flag = ref(false) const flag = ref(false)

Loading…
Cancel
Save