|
@ -142,10 +142,62 @@ const clearSearchInput = (formField) => { |
|
|
item.componentProps.options = [] |
|
|
item.componentProps.options = [] |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
if (basicFormRef.value.formRef.formModel.lightItemCode) { |
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
lightQty: 0, |
|
|
|
|
|
claimAmount: '', |
|
|
|
|
|
otherClaimAmount: 0, |
|
|
|
|
|
summaryAmount: 0, |
|
|
|
|
|
disbursementAmount: 0, |
|
|
|
|
|
remainingAmount: 0 |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const params2 = { |
|
|
|
|
|
by: 'ASC', |
|
|
|
|
|
filters: [ |
|
|
|
|
|
{ |
|
|
|
|
|
column: 'itemCode', |
|
|
|
|
|
action: '==', |
|
|
|
|
|
value: basicFormRef.value.formRef.formModel.lightItemCode |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
pageSize: 500, |
|
|
|
|
|
sort: '' |
|
|
|
|
|
} |
|
|
|
|
|
params2.isSearch = true |
|
|
|
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
|
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
params2.isSearch = true |
|
|
|
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
|
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: 0 |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: '' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
if (formField == 'lightItemCode') { |
|
|
if (formField == 'lightItemCode') { |
|
|
basicFormRef.value.formRef.setValues({ |
|
|
basicFormRef.value.formRef.setValues({ |
|
|
standardCostPrice: '', |
|
|
|
|
|
lightItemName: '', |
|
|
lightItemName: '', |
|
|
lightQty: 0, |
|
|
lightQty: 0, |
|
|
claimAmount: '', |
|
|
claimAmount: '', |
|
@ -154,47 +206,47 @@ const clearSearchInput = (formField) => { |
|
|
disbursementAmount: 0, |
|
|
disbursementAmount: 0, |
|
|
remainingAmount: 0 |
|
|
remainingAmount: 0 |
|
|
}) |
|
|
}) |
|
|
const params2 = { |
|
|
|
|
|
by: 'ASC', |
|
|
if (basicFormRef.value.formRef.formModel.itemCode) { |
|
|
filters: [ |
|
|
const params2 = { |
|
|
{ column: 'itemCode', action: '==', value: basicFormRef.value.formRef.formModel.itemCode } |
|
|
by: 'ASC', |
|
|
], |
|
|
filters: [ |
|
|
pageNo: 1, |
|
|
{ column: 'itemCode', action: '==', value: basicFormRef.value.formRef.formModel.itemCode } |
|
|
pageSize: 500, |
|
|
], |
|
|
sort: '' |
|
|
pageNo: 1, |
|
|
} |
|
|
pageSize: 500, |
|
|
params2.isSearch = true |
|
|
sort: '' |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
|
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: priceObj.value.price |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
params2.isSearch = true |
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
priceObj.value = res.list[0] |
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
basicFormRef.value.formRef.setValues({ |
|
|
standardCostPrice: priceObj.value.price |
|
|
standardCostPrice: priceObj.value.price |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
params2.isSearch = true |
|
|
if (res.list?.length > 0) { |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
priceObj.value = res.list[0] |
|
|
if (res.list?.length > 0) { |
|
|
|
|
|
priceObj.value = res.list[0] |
|
|
|
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
basicFormRef.value.formRef.setValues({ |
|
|
standardCostPrice: priceObj.value.price |
|
|
standardCostPrice: priceObj.value.price |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
formRef.setValues({ |
|
|
basicFormRef.value.formRef.setValues({ |
|
|
standardCostPrice: 0 |
|
|
standardCostPrice: 0 |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
|
|
standardCostPrice: '' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 查询页面返回 |
|
|
// 查询页面返回 |
|
@ -261,6 +313,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
standardCostPrice: priceObj.value.price |
|
|
standardCostPrice: priceObj.value.price |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
params2.isSearch = true |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
priceObj.value = res.list[0] |
|
|
priceObj.value = res.list[0] |
|
@ -360,14 +413,16 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
sort: '' |
|
|
sort: '' |
|
|
} |
|
|
} |
|
|
params2.isSearch = true |
|
|
params2.isSearch = true |
|
|
|
|
|
console.log(123) |
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
SalepriceApi.getSalepricePage(params2).then((res) => { |
|
|
|
|
|
console.log(456) |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
priceObj.value = res.list[0] |
|
|
priceObj.value = res.list[0] |
|
|
formRef.setValues({ |
|
|
formRef.setValues({ |
|
|
standardCostPrice: priceObj.value.price |
|
|
standardCostPrice: priceObj.value.price |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
params2.isSearch = true |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
StdcostpriceApi.getStdcostpricePage(params2).then((res) => { |
|
|
if (res.list?.length > 0) { |
|
|
if (res.list?.length > 0) { |
|
|
priceObj.value = res.list[0] |
|
|
priceObj.value = res.list[0] |
|
|