Browse Source

Q2通知单功能完善 HL-5740

hella_online_20240904
YEJIAXING-PC\lenovo 3 months ago
parent
commit
33f76087a3
  1. 127
      src/views/qms/inspectionQ2/index.vue

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

@ -127,17 +127,25 @@ const route = useRoute() // 路由信息
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(Q2.allSchemas.tableColumns)
const clearSearchInput = (formField) => {
if (formField == 'itemCode') {
basicFormRef.value.formRef.setValues({
itemName: '',
SupplierCode: '',
SupplierName: ''
supplierCode: '',
supplierName: '',
purchaseReceiptNumber: ''
})
Q2.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.options = []
}
})
}
if (formField == 'lightItemCode') {
basicFormRef.value.formRef.setValues({
standardCostPrice: '',
lightItemName: '',
lightQty: 0,
claimAmount: '',
otherClaimAmount: 0,
@ -147,7 +155,9 @@ const clearSearchInput = (formField) => {
})
const params2 = {
by: 'ASC',
filters: [{ column: 'itemCode', action: '==', value: basicFormRef.value.formRef.formModel.itemCode }],
filters: [
{ column: 'itemCode', action: '==', value: basicFormRef.value.formRef.formModel.itemCode }
],
pageNo: 1,
pageSize: 500,
sort: ''
@ -212,22 +222,22 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
setV['summaryAmount'] = 0
setV['disbursementAmount'] = 0
setV['remainingAmount'] = 0
 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
          })
        }
      })
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)
}
@ -245,8 +255,8 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
}
if (formField == 'itemCode') {
setV['SupplierCode'] = ''
setV['SupplierName'] = ''
setV['supplierCode'] = ''
setV['supplierName'] = ''
setV['itemName'] = ''
setV['uom'] = val[0].supplierUom
@ -293,8 +303,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
})
}
})
if (val[0].lightItemCode == null) {
if (basicFormRef.value.formRef.formModel.lightItemCode == null||
basicFormRef.value.formRef.formModel.lightItemCode == ''
) {
setV['standardCostPrice'] = ''
setV['lightQty'] = 0
setV['claimAmount'] = ''
@ -403,6 +414,76 @@ const onChange = (field, e) => {
}
})
}
// if (field == 'itemCode') {
// basicFormRef.value.formRef.formModel.supplierCode = ''
// basicFormRef.value.formRef.formModel.supplierName = ''
// basicFormRef.value.formRef.formModel.itemName = ''
// Q2Api.getEmail().then((res) => {
// if (res) {
// basicFormRef.value.formRef.formModel.cashierEmail =res
// }
// })
// const supplieritemParams = {
// by: 'ASC',
// filters: [{ column: 'itemCode', action: '==', value: basicFormRef.value.formRef.formModel.itemCode }],
// pageNo: 1,
// pageSize: 500,
// sort: ''
// }
// supplieritemParams.isSearch = true
// SupplieritemApi.getSupplieritemPage(supplieritemParams).then((res) => {
// if (res.list?.length > 0) {
// basicFormRef.value.formRef.formModel.supplierCode = res.list[0].supplierCode
// basicFormRef.value.formRef.formModel.supplierName = res.list[0].supplierName
// Q2.allSchemas.formSchema.forEach((item) => {
// if (item.field == 'supplierCode') {
// item.componentProps.options = res.list
// }
// })
// }
// })
// const itembasicParams = {
// by: 'ASC',
// filters: [{ column: 'code', action: '==', value: basicFormRef.value.formRef.formModel.itemCode }],
// pageNo: 1,
// pageSize: 500,
// sort: ''
// }
// itembasicParams.isSearch = true
// ItembasicApi.getItembasicPage(itembasicParams).then((res) => {
// if (res.list?.length > 0) {
// basicFormRef.value.formRef.formModel.itemName = res.list[0].name
// }
// })
// if (basicFormRef.value.formRef.formModel.lightItemCode == null) {
// basicFormRef.value.formRef.formModel.standardCostPrice = ''
// basicFormRef.value.formRef.formModel.lightQty = 0
// basicFormRef.value.formRef.formModel.claimAmount= ''
// basicFormRef.value.formRef.formModel.otherClaimAmount = 0
// basicFormRef.value.formRef.formModel.summaryAmount= 0
// basicFormRef.value.formRef.formModel.disbursementAmount = 0
// basicFormRef.value.formRef.formModel.remainingAmount = 0
// const params2 = {
// by: 'ASC',
// filters: [{ column: 'itemCode', action: '==', value: basicFormRef.value.formRef.formModel.itemCode }],
// pageNo: 1,
// pageSize: 500,
// sort: ''
// }
// params2.isSearch = true
// StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
// if (res.list?.length > 0) {
// priceObj.value = res.list[0]
// basicFormRef.value.formRef.formModel.standardCostPrice = priceObj.value.price
// }
// })
// }
// }
}
//

Loading…
Cancel
Save