Browse Source

修改Q2中的验证

hella_online_20240823
parent
commit
4db5c4913b
  1. 56
      src/views/qms/inspectionQ2/index.vue

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

@ -150,6 +150,28 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
if (formField == 'lightItemCode') {
setV['lightItemCode'] = val[0].code
setV['lightItemName'] = val[0].name
 const params2 = {
        by: 'ASC',
        filters: [{ column: 'itemCode', action: '==', value: val[0].code }],
        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)
}
if (formField == 'q1Number') {
setV['q1Number'] = val[0].code
setV[formField] = val[0][searchField]
formRef.setValues(setV)
}
@ -218,22 +240,22 @@ 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
})
}
})
// 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)
@ -457,7 +479,7 @@ const formsSuccess = async (formType, data) => {
}
}
if (data.lightQty == 0) {
message.error('数量不能为0')
message.error('整灯数量不能为0')
return
}
if (data.activeTime == 0) data.activeTime = null

Loading…
Cancel
Save