Commit 19703862 authored by jingnan's avatar jingnan 👀

漆料批次号带出,胶漆记录卡合格证查询增加参数并去重

parent 8975e016
...@@ -354,6 +354,12 @@ export default { ...@@ -354,6 +354,12 @@ export default {
if (this.itemObj.attrKey === 'certificateNo') { if (this.itemObj.attrKey === 'certificateNo') {
const obj = this.form.inventory.find(item => item.testNo === value) const obj = this.form.inventory.find(item => item.testNo === value)
this.$set(this.form, 'lotNo', obj.lotNo) this.$set(this.form, 'lotNo', obj.lotNo)
if (this.subTypeName === 'AssignCardPaint') {
const lotNoArr = obj.lotNo && obj.lotNo.split('/')
this.$set(this.form, 'baseLotNo', lotNoArr[0] || '')
this.$set(this.form, 'curingLotNo', lotNoArr[1] || '')
this.$set(this.form, 'diluentLotNo', lotNoArr[2] || '')
}
} else if (this.itemObj.attrKey === 'certificateNum') { } else if (this.itemObj.attrKey === 'certificateNum') {
const obj = this.form.inventory.find(item => item.testNo === value) const obj = this.form.inventory.find(item => item.testNo === value)
this.$set(this.form, 'diluentLotNo', obj.lotNo) this.$set(this.form, 'diluentLotNo', obj.lotNo)
...@@ -596,6 +602,33 @@ export default { ...@@ -596,6 +602,33 @@ export default {
}) })
}, },
getCertificateNo(query, attrKey) { getCertificateNo(query, attrKey) {
let paramsItems = []
if (this.subTypeName === 'AssignCardPaint' || this.subTypeName === 'AssignCardLacquer') {
paramsItems = [{
'fieldName': 'remark',
'operator': 'LIKE',
'value': this.form.realityMark || ''
},
{
'fieldName': 'modelNo',
'operator': 'EQ',
'value': this.form.modelNo || ''
}]
} else {
if (this.itemObj.attrKey === 'certificateNum') {
paramsItems = [{
'fieldName': 'modelNo',
'operator': 'EQ',
'value': this.form.diluentModelNo || ''
}]
} else {
paramsItems = [{
'fieldName': 'modelNo',
'operator': 'EQ',
'value': this.form.baseModelNo || ''
}]
}
}
const params = { const params = {
'pageFrom': 1, 'pageFrom': 1,
'pageSize': 20, 'pageSize': 20,
...@@ -609,15 +642,24 @@ export default { ...@@ -609,15 +642,24 @@ export default {
{ {
'fieldName': 'lotNo', 'fieldName': 'lotNo',
'operator': 'NOTNULL' 'operator': 'NOTNULL'
} },
...paramsItems
] ]
} }
} }
post(`/Inventory/search`, params).then(res => { post(`/Inventory/search`, params).then(res => {
this.loading = false this.loading = false
if (res.code === 0) { if (res.code === 0) {
this.form.inventory = res.items.content const resDeduplicate = []
this.requestOp = res.items.content.map(item => { // 去重
res.items.content.forEach(m => {
if (!resDeduplicate.find(d => d.testNo === m.testNo)) {
resDeduplicate.push(m)
}
})
this.form.inventory = resDeduplicate
this.requestOp = resDeduplicate.map(item => {
let disabled = false let disabled = false
if (item.qualityPeriod) { if (item.qualityPeriod) {
disabled = new Date().getTime() > Date.parse(item.qualityPeriod) disabled = new Date().getTime() > Date.parse(item.qualityPeriod)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment