Commit de6bdc75 authored by 15008242619's avatar 15008242619

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents 462f57ee f459ba3f
...@@ -79,7 +79,8 @@ export default { ...@@ -79,7 +79,8 @@ export default {
AssignCardItem: 'ShellacCardLacquer', AssignCardItem: 'ShellacCardLacquer',
AssignCardAlodine: 'ShellacCardAlodine' AssignCardAlodine: 'ShellacCardAlodine'
}, },
subTypeName: '' subTypeName: '',
shellacDeployLists: []
} }
}, },
computed: { computed: {
...@@ -394,8 +395,21 @@ export default { ...@@ -394,8 +395,21 @@ export default {
} }
] ]
} }
await post(`/ShellacDeploy/queryModel?param=${key}`, params) const requestUrl = key === 'baseModelNo' ? '/ShellacDeploy/search' : `/ShellacDeploy/queryModel?param=${key}`
await post(requestUrl, params)
.then(res => { .then(res => {
if (key === 'baseModelNo') {
if (res.items && res.items.content) {
this.shellacDeployLists = res.items.content
this.requestOp = res.items.content.map(item => {
return {
label: item.modelNo,
value: item.modelNo
}
})
this.form.baseModelNo && this.setDiluentModelNoOption(this.form.baseModelNo)
}
} else {
if (res.code === 0) { if (res.code === 0) {
this.requestOp = res.items.map(item => { this.requestOp = res.items.map(item => {
return { return {
...@@ -404,6 +418,7 @@ export default { ...@@ -404,6 +418,7 @@ export default {
} }
}) })
} }
}
}) })
}, },
changeEvent(value) { changeEvent(value) {
...@@ -422,6 +437,10 @@ export default { ...@@ -422,6 +437,10 @@ export default {
} else if (this.itemObj.attrKey === 'baseModelNo') { } else if (this.itemObj.attrKey === 'baseModelNo') {
this.$set(this.form, 'certificateNo', '') this.$set(this.form, 'certificateNo', '')
this.$set(this.form, 'lotNo', '') this.$set(this.form, 'lotNo', '')
this.setDiluentModelNoOption(value)
this.$set(this.form, 'diluentModelNo', '')
this.$set(this.form, 'certificateNum', '')
this.$set(this.form, 'diluentLotNo', '')
} else { } else {
this.$set(this.form, this.itemObj.attrKey, value) this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest() this.changeRequest()
...@@ -590,7 +609,7 @@ export default { ...@@ -590,7 +609,7 @@ export default {
this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo) this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo)
if (this.form.validityStart && this.form.freeTemperature) { if (this.form.validityStart && this.form.freeTemperature) {
const date = new Date(this.form.validityStart) const date = new Date(this.form.validityStart)
const data = this.form.freeTemperature === '-24' ? (this.form.storeUp ? Number(this.form.storeUp) : 21) : (this.form.storeUp ? Number(this.form.storeUpTo) : 30) const data = Number(this.form.freeTemperature) === -24 ? (!isNaN(this.form.storeUp) ? Number(this.form.storeUp) : 21) : (!isNaN(this.form.storeUpTo) ? Number(this.form.storeUpTo) : 30)
date.setDate(date.getDate() + data) date.setDate(date.getDate() + data)
this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString())) this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString()))
} }
...@@ -756,6 +775,21 @@ export default { ...@@ -756,6 +775,21 @@ export default {
this.setFormDataAttr(attrKey, 'options', this.requestOp) this.setFormDataAttr(attrKey, 'options', this.requestOp)
} }
}) })
},
setDiluentModelNoOption(value) {
const targetObj = this.shellacDeployLists.find(item => item.modelNo === value)
if (targetObj && targetObj.component) {
const diluentModelNoOption = this.splitByVerticalBar(targetObj.component).map(el => { return { value: el, label: el } })
this.setFormDataAttr('diluentModelNo', 'options', diluentModelNoOption || [])
}
},
splitByVerticalBar(str) {
// 正则表达式匹配中文竖线或英文竖线
const regex = /[\u3000\u007C\|]+/g
return str.split(regex).filter(function(item) {
// 去除空字符串
return item !== ''
})
} }
} }
} }
......
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
*/ */
getAddRecursion() { getAddRecursion() {
this.sortiesLoading = true this.sortiesLoading = true
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }] } const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] }
params.openProps = [{ name: 'aircraftType' }] params.openProps = [{ name: 'aircraftType' }]
this.$api this.$api
.searchApi('AircraftSorties', params) .searchApi('AircraftSorties', params)
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
this.sortiesData = [] this.sortiesData = []
this.sorties = null this.sorties = null
} }
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }] } const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] }
params.openProps = [{ name: 'aircraftType' }] params.openProps = [{ name: 'aircraftType' }]
this.$api this.$api
.searchApi('AircraftSorties', params) .searchApi('AircraftSorties', params)
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
sortable sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.outsideAmount }}</span> <span> {{ scope.row.actualAmount }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
*/ */
getAddRecursion() { getAddRecursion() {
this.sortiesLoading = true this.sortiesLoading = true
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }] } const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] }
params.openProps = [{ name: 'aircraftType' }] params.openProps = [{ name: 'aircraftType' }]
this.$api this.$api
.searchApi('AircraftSorties', params) .searchApi('AircraftSorties', params)
......
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