|
|
@ -57,6 +57,7 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
" |
|
|
|
:hiddenFilterBtnFields="['purchaseReceiptNumber']" |
|
|
|
:rules="Q2Rules" |
|
|
|
:formAllSchemas="Q2.allSchemas" |
|
|
|
:apiUpdate="Q2Api.updateQ2" |
|
|
@ -158,6 +159,14 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
if (formField == 'lightItemCode') { |
|
|
|
setV['lightItemCode'] = val[0].code |
|
|
|
setV['lightItemName'] = val[0].name |
|
|
|
|
|
|
|
setV['standardCostPrice'] = '' |
|
|
|
setV['lightQty'] = 0 |
|
|
|
setV['claimAmount'] = '' |
|
|
|
setV['otherClaimAmount'] = 0 |
|
|
|
setV['summaryAmount'] = 0 |
|
|
|
setV['disbursementAmount'] = 0 |
|
|
|
setV['remainingAmount'] = 0 |
|
|
|
const params2 = { |
|
|
|
by: 'ASC', |
|
|
|
filters: [{ column: 'itemCode', action: '==', value: val[0].code }], |
|
|
@ -194,14 +203,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
setV['SupplierCode'] = '' |
|
|
|
setV['SupplierName'] = '' |
|
|
|
setV['itemName'] = '' |
|
|
|
setV['standardCostPrice'] = '' |
|
|
|
setV['lightQty'] = 0 |
|
|
|
setV['claimAmount'] = '' |
|
|
|
setV['otherclaimAmount'] = 0 |
|
|
|
setV['summaryAmount'] = 0 |
|
|
|
setV['disbursementAmount'] = 0 |
|
|
|
setV['remainingAmount'] = 0 |
|
|
|
setV['purchaseReceiptNumber'] = '' |
|
|
|
setV['uom'] = val[0].supplierUom |
|
|
|
|
|
|
|
Q2Api.getEmail().then((res) => { |
|
|
@ -247,24 +248,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// const params2 = { |
|
|
|
// by: 'ASC', |
|
|
|
// filters: [{ column: 'itemCode', action: '==', value: val[0].itemCode }], |
|
|
|
// pageNo: 1, |
|
|
|
// pageSize: 500, |
|
|
|
// sort: '' |
|
|
|
// } |
|
|
|
// params2.isSearch = true |
|
|
|
// StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
// if (res.list?.length > 0) { |
|
|
|
// priceObj.value = res.list[0] |
|
|
|
// formRef.setValues({ |
|
|
|
// standardCostPrice: priceObj.value.price |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
|
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
@ -272,6 +255,8 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
|
} |
|
|
|
|
|
|
|
const onChange = (field, e) => { |
|
|
|
console.log('onChange',field) |
|
|
|
console.log(basicFormRef.value.formRef.formModel) |
|
|
|
if (field == 'lightQty') { |
|
|
|
basicFormRef.value.formRef.formModel.claimAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.lightQty) * |
|
|
@ -280,7 +265,7 @@ const onChange = (field, e) => { |
|
|
|
).toFixed(6) |
|
|
|
basicFormRef.value.formRef.formModel.summaryAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount||0) |
|
|
|
).toFixed(6) |
|
|
|
basicFormRef.value.formRef.formModel.remainingAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - |
|
|
@ -295,17 +280,17 @@ const onChange = (field, e) => { |
|
|
|
).toFixed(6) |
|
|
|
basicFormRef.value.formRef.formModel.summaryAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) |
|
|
|
).toFixed(6) |
|
|
|
basicFormRef.value.formRef.formModel.remainingAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.disbursementAmount) |
|
|
|
).toFixed(6) |
|
|
|
} |
|
|
|
if (field == 'otherclaimAmount') { |
|
|
|
if (field == 'otherClaimAmount') { |
|
|
|
basicFormRef.value.formRef.formModel.summaryAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) |
|
|
|
).toFixed(6) |
|
|
|
basicFormRef.value.formRef.formModel.remainingAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - |
|
|
@ -315,7 +300,7 @@ const onChange = (field, e) => { |
|
|
|
if (field == 'claimAmount') { |
|
|
|
basicFormRef.value.formRef.formModel.summaryAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherclaimAmount) |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) |
|
|
|
).toFixed(6) |
|
|
|
basicFormRef.value.formRef.formModel.remainingAmount = ( |
|
|
|
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - |
|
|
@ -332,6 +317,7 @@ const onChange = (field, e) => { |
|
|
|
|
|
|
|
if (field == 'supplierCode') { |
|
|
|
basicFormRef.value.formRef.formModel.supplierName = '' |
|
|
|
basicFormRef.value.formRef.formModel.purchaseReceiptNumber = '' |
|
|
|
const paramsCustomer = { |
|
|
|
by: 'ASC', |
|
|
|
filters: [ |
|
|
@ -466,7 +452,8 @@ const openForm = (type: string, row?: any) => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
if(!row || !row.claimAmount){ |
|
|
|
nextTick(() => { |
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
@ -502,7 +489,6 @@ const openForm = (type: string, row?: any) => { |
|
|
|
) |
|
|
|
uploadFile['componentProps']['modelValue'] = row.filePathListView |
|
|
|
} |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
// form表单提交 |
|
|
@ -521,6 +507,10 @@ const formsSuccess = async (formType, data) => { |
|
|
|
message.error('整灯数量不能为0') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!data.standardCostPrice) { |
|
|
|
message.error('标准成本价格不能为0或空') |
|
|
|
return |
|
|
|
} |
|
|
|
if (data.activeTime == 0) data.activeTime = null |
|
|
|
if (data.expireTime == 0) data.expireTime = null |
|
|
|
|
|
|
|