Browse Source

可开票数量的输入限制

hella_online_20240913
yufei_wang 1 week ago
parent
commit
6c115349d5
  1. 2
      src/components/Detail/src/Detail.vue
  2. 3
      src/locales/en-US.ts
  3. 3
      src/locales/zh-CN.ts
  4. 37
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue

2
src/components/Detail/src/Detail.vue

@ -1070,7 +1070,7 @@ const openImage=(item)=>{
* @param cur 改变后值
*/
const detailBasicFormOnChange = (field, cur) => {
emit('detailBasicFormOnChange', field, cur)
emit('detailBasicFormOnChange', field, cur,detailData.value)
}
/**

3
src/locales/en-US.ts

@ -1288,7 +1288,8 @@ export default {
:'The production date cannot be greater than the current system date',
:'Return of invoice',
: 'The invoice has been successfully forwarded',
: 'Last Updated By'
: 'Last Updated By',
:'The range of invoices is'
},

3
src/locales/zh-CN.ts

@ -1284,7 +1284,8 @@ export default {
:'生产日期不能大于当前系统日期',
:'发票回转',
: '发票回转成功',
:'最后更新人'
:'最后更新人',
:'可开票数量范围是'
},
}

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

@ -178,6 +178,7 @@
@submitForm="submitForm"
@sumFormDataHandle="sumFormDataHandle"
@onChange="onChange"
@inputNumberChange="inputNumberChange"
>
<template #selectionsActionspoLine="{ selections }">
<div style="text-align: left; margin-right: 10px">
@ -313,6 +314,7 @@
:mainSubmitCreateApi="true"
@searchTableSuccessDetail="searchTableSuccessDetail"
@handleMainFefresh="handleMainFefresh"
@detailBasicFormOnChange="detailBasicFormOnChange"
>
<!-- 价税合计尾差 -->
<template #Descriptions_totalTaxDiffAmount="{ row }">
@ -454,6 +456,40 @@ const searchTableSuccessDetail = async (
// })
const detailBasicFormOnChange = (field, cur, detailData) => {
console.log('detailBasicFormOnChange',field, cur, detailData)
if (field == 'invoicableQuantity') {
// 0
// 0
if(detailData.maxInvoicableQuantity){
if(detailData.maxInvoicableQuantity>0){
if(cur<0||cur>detailData.maxInvoicableQuantity){
message.error(t('ts.可开票数量范围是')+`:0~${detailData.maxInvoicableQuantity}`)
}
}else{
if(cur>0||cur<detailData.maxInvoicableQuantity){
message.error(t('ts.可开票数量范围是')+`:${detailData.maxInvoicableQuantity}~0`)
}
}
}
}
}
const inputNumberChange = (field, index, row, val) => {
if (field == 'invoicableQuantity') {
// 0
// 0
console.log('inputNumberChange',field, index, row, val)
if(row.maxInvoicableQuantity>0){
if(row.invoicableQuantity<0||row.invoicableQuantity>row.maxInvoicableQuantity){
message.error(t('ts.可开票数量范围是')+`:0~${row.maxInvoicableQuantity}`)
}
}else{
if(row.invoicableQuantity>0||row.invoicableQuantity<row.maxInvoicableQuantity){
message.error(t('ts.可开票数量范围是')+`:${row.maxInvoicableQuantity}~0`)
}
}
}
}
const onChange = (field, cur) => {
console.log('onChange',field)
if(field=='orderType'){
@ -489,6 +525,7 @@ const searchTableSuccess = (formField, searchField, val, searchFormRef, type, ro
newRow['supplierCode'] = item['supplierCode']
newRow['singlePrice'] = item['purchasePrice'] // =
newRow['purchasePrice'] = item['purchasePrice']
newRow['maxInvoicableQuantity'] = item['invoicableQuantity']
newRow['invoicableQuantity'] = item['invoicableQuantity']
newRow['itemCode'] = item['itemCode']
newRow['deliveryDate'] = item['prhRcpDate']

Loading…
Cancel
Save