Browse Source

供应商发票有价差

hella_online_20240829
zhang_li 5 months ago
parent
commit
21340805a7
  1. 27
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts
  2. 32
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue
  3. 52
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

27
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/supplierinvoiceRecordMain.data.ts

@ -144,6 +144,7 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm:false,
isTableForm:false
},
{
label: '系统税额',
field: 'taxAmount',
@ -190,6 +191,32 @@ export const SupplierinvoiceRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm:false,
isTableForm:false
},
{
label: '是否有价差',
field: 'balanceStatementStatus',
dictType: DICT_TYPE.INVOICE_BALANCE_STATEMENT_STATUS,
dictClass: 'string',
isTable: true,
isForm:false,
isSearch:false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:3,
},
{
label: '价差说明',
field: 'balanceStatement',
isTable: false,
isForm:false,
isSearch:false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:5,
},
{
label: '系统价税合计',//税后金额
field: 'afterTaxAmount',

32
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

@ -131,7 +131,15 @@
:footButttondata="undefined"
@success="submitFormFinance"
/>
<!-- 采购通过窗口-->
<BasicForm
ref="formPurchasePassRef"
:rules="PurchasePassRules"
:formAllSchemas="PurchasePass.allSchemas"
:isBusiness="false"
:footButttondata="undefined"
@success="submitPurchasePass"
/>
<!-- 详情 -->
<Detail
ref="detailRef"
@ -234,7 +242,9 @@ import dayjs from 'dayjs'
SupplierinvoiceRequestDetail,
SupplierinvoiceRequestDetailRules,
SupplierinvoiceRequestFinance,
SupplierinvoiceRequestFinanceRules
SupplierinvoiceRequestFinanceRules,
PurchasePass,
PurchasePassRules
} from './supplierinvoiceRequestMain.data'
import * as SupplierinvoiceRequestMainApi from '@/api/wms/supplierinvoiceRequestMain'
import * as SupplierinvoiceRequestDetailApi from '@/api/wms/supplierinvoiceRequestDetail'
@ -270,7 +280,7 @@ import dayjs from 'dayjs'
searchTablePage: SupplierApi.getSupplierPage
}
])
const formPurchasePassRef = ref()
const searchList = (model)=>{
selectionRows.value = []
setSearchParams(model)
@ -522,7 +532,12 @@ const handleImport = () => {
} else if (val == 'open_detail') { //
openDetail(row, '单据号', row.number)
}else if (val == 'purchase_mainPlanSub') { //
handleApp(row.id)
// handleApp(row.id)
if(row.balanceStatementStatus){
formPurchasePassRef.value.open('update', row,null,'采购审批通过','采购审批通过')
}else{
submitPurchasePass(row.id)
}
} else if (val == 'purchase_mainPlanTur') { //
resonSubmit(val, row)
// handleTur(row.id)
@ -777,15 +792,20 @@ const handleImport = () => {
}
/** 采购审批通过按钮操作 */
const handleApp = async (id : number) => {
const submitPurchasePass = async (id, submitData) => {
console.log(submitData)
const id1 =submitData?.id || id
console.log(id1)
try {
//
await message.confirm(t('ts.是否审批通过所选中数据?'))
tableObject.loading = true
//
await SupplierinvoiceRequestMainApi.appSupplierinvoiceRequestMain(id)
await SupplierinvoiceRequestMainApi.appSupplierinvoiceRequestMain(id1,submitData?.balanceStatement)
message.success(t('ts.审批通过成功!'))
tableObject.loading = false
formPurchasePassRef.value.dialogVisible = false
//
await getList()
} catch { }finally{

52
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -459,6 +459,32 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
},
isTableForm:false,
},
{
label: '是否有价差',
field: 'balanceStatementStatus',
dictType: DICT_TYPE.INVOICE_BALANCE_STATEMENT_STATUS,
dictClass: 'string',
isTable: true,
isForm:false,
isSearch:false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:5,
},
{
label: '价差说明',
field: 'balanceStatement',
isTable: false,
isForm:false,
isSearch:false,
sort: 'custom',
table: {
width: 150
},
sortTableDefault:5,
},
{
label: '未税差额',
field: 'beforeTaxDiffAmount',
@ -861,7 +887,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'supplierCreator',
sort: 'custom',
isTable:false,
isTable:false,
isDetail:false,
sortTableDefault:1006,
table: {
@ -874,7 +899,6 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'supplierCreatorName',
sort: 'custom',
isTable:false,
isTable:false,
isDetail:true,
sortTableDefault:1006,
table: {
@ -1576,3 +1600,27 @@ export const SupplierinvoiceRequestDetailRules = reactive({
{ validator: validateSinglePrice, trigger: 'change' }
],
})
// 采购通过
export const PurchasePass = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '价差通过说明',
field: 'balanceStatement',
sort: 'custom',
table: {
width: 180
},
isTable:false,
form: {
componentProps:{
type:'textarea'
}
},
},
]))
//表单校验
export const PurchasePassRules = reactive({
balanceStatement: [
{ required: true, message: '请输入价差通过说明', trigger: 'blur'},
{ max: 100, message: '最多100字符', trigger: 'blur'}
],
})

Loading…
Cancel
Save