|
|
@ -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'] |
|
|
|