Browse Source

修改Q2通知单的销售价格取值方式 HL-5882

hella_online_20240906
YEJIAXING-PC\lenovo 3 months ago
parent
commit
b121c2f1e3
  1. 60
      src/views/qms/inspectionQ2/index.vue
  2. 2
      src/views/qms/inspectionQ2/inspectionQ2.data.ts

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

@ -108,6 +108,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import * as SalepriceApi from '@/api/wms/saleprice'
import { formatDate } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import * as SupplierApi from '@/api/wms/supplier'
@ -171,6 +172,29 @@ const clearSearchInput = (formField) => {
})
}
})
SalepriceApi.getSalepricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
basicFormRef.value.formRef.setValues({
standardCostPrice: priceObj.value.price
})
} else {
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
basicFormRef.value.formRef.setValues({
standardCostPrice: priceObj.value.price
})
} else {
formRef.setValues({
standardCostPrice: 0
})
}
})
}
})
}
}
//
@ -230,12 +254,25 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
sort: ''
}
params2.isSearch = true
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
SalepriceApi.getSalepricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
} else {
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
} else {
formRef.setValues({
standardCostPrice: 0
})
}
})
}
})
setV[formField] = val[0][searchField]
@ -304,8 +341,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
})
}
})
if (basicFormRef.value.formRef.formModel.lightItemCode == null||
basicFormRef.value.formRef.formModel.lightItemCode == ''
if (
basicFormRef.value.formRef.formModel.lightItemCode == null ||
basicFormRef.value.formRef.formModel.lightItemCode == ''
) {
setV['standardCostPrice'] = ''
setV['lightQty'] = 0
@ -322,12 +360,26 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
sort: ''
}
params2.isSearch = true
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
SalepriceApi.getSalepricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
} else {
StdcostpriceApi.getStdcostpricePage(params2).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
standardCostPrice: priceObj.value.price
})
} else {
formRef.setValues({
standardCostPrice: 0
})
}
})
}
})
}

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

@ -341,7 +341,7 @@ export const Q2 = useCrudSchemas(
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
searchListPlaceholder: '请选择整灯/分总成物料代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '物料基础信息', // 查询弹窗标题
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类

Loading…
Cancel
Save