Browse Source

Q2修改价格

hella_online_20240823
parent
commit
87639f2b88
  1. 42
      src/views/qms/inspectionQ2/index.vue
  2. 1
      src/views/qms/inspectionQ2/inspectionQ2.data.ts

42
src/views/qms/inspectionQ2/index.vue

@ -159,6 +159,15 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if (formField == 'lightItemCode') { if (formField == 'lightItemCode') {
setV['lightItemCode'] = val[0].code setV['lightItemCode'] = val[0].code
setV['lightItemName'] = val[0].name setV['lightItemName'] = val[0].name
setV['standardCostPrice'] = ''
setV['lightQty'] = 0
setV['claimAmount'] = ''
setV['otherClaimAmount'] = 0
setV['summaryAmount'] = 0
setV['disbursementAmount'] = 0
setV['remainingAmount'] = 0
setV['purchaseReceiptNumber'] = ''
 const params2 = {  const params2 = {
        by: 'ASC',         by: 'ASC',
        filters: [{ column: 'itemCode', action: '==', value: val[0].code }],         filters: [{ column: 'itemCode', action: '==', value: val[0].code }],
@ -195,14 +204,6 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
setV['SupplierCode'] = '' setV['SupplierCode'] = ''
setV['SupplierName'] = '' setV['SupplierName'] = ''
setV['itemName'] = '' 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 setV['uom'] = val[0].supplierUom
Q2Api.getEmail().then((res) => { Q2Api.getEmail().then((res) => {
@ -248,24 +249,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] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
} }
@ -273,6 +256,8 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
} }
const onChange = (field, e) => { const onChange = (field, e) => {
console.log('onChange',field)
console.log(basicFormRef.value.formRef.formModel)
if (field == 'lightQty') { if (field == 'lightQty') {
basicFormRef.value.formRef.formModel.claimAmount = ( basicFormRef.value.formRef.formModel.claimAmount = (
parseFloat(basicFormRef.value.formRef.formModel.lightQty) * parseFloat(basicFormRef.value.formRef.formModel.lightQty) *
@ -281,7 +266,7 @@ const onChange = (field, e) => {
).toFixed(6) ).toFixed(6)
basicFormRef.value.formRef.formModel.summaryAmount = ( basicFormRef.value.formRef.formModel.summaryAmount = (
parseFloat(basicFormRef.value.formRef.formModel.claimAmount) + parseFloat(basicFormRef.value.formRef.formModel.claimAmount) +
parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount) parseFloat(basicFormRef.value.formRef.formModel.otherClaimAmount||0)
).toFixed(6) ).toFixed(6)
basicFormRef.value.formRef.formModel.remainingAmount = ( basicFormRef.value.formRef.formModel.remainingAmount = (
parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) - parseFloat(basicFormRef.value.formRef.formModel.summaryAmount) -
@ -333,6 +318,7 @@ const onChange = (field, e) => {
if (field == 'supplierCode') { if (field == 'supplierCode') {
basicFormRef.value.formRef.formModel.supplierName = '' basicFormRef.value.formRef.formModel.supplierName = ''
basicFormRef.value.formRef.formModel.purchaseReceiptNumber = ''
const paramsCustomer = { const paramsCustomer = {
by: 'ASC', by: 'ASC',
filters: [ filters: [
@ -523,7 +509,7 @@ const formsSuccess = async (formType, data) => {
return return
} }
if (!data.standardCostPrice) { if (!data.standardCostPrice) {
message.error('整灯数量不能为0或空数据') message.error('标准成本价格不能为0或空')
return return
} }
if (data.activeTime == 0) data.activeTime = null if (data.activeTime == 0) data.activeTime = null

1
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -470,7 +470,6 @@ export const Q2 = useCrudSchemas(
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
enterSearch: true, enterSearch: true,
multiple: true,
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本 searchListPlaceholder: '请选择Q1通知单', // 输入框占位文本
searchField: 'number', // 查询弹窗赋值字段 searchField: 'number', // 查询弹窗赋值字段

Loading…
Cancel
Save