Commit facfe1db by lichengming

修改了试样照片查询

parent eaf17188
......@@ -228,7 +228,12 @@ export default {
this._page()
})
},
_page: async function() {
_page: async function(fileName) {
if (fileName) {
this.formObj.fileName = fileName
} else {
this.formObj.fileName = undefined
}
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await meterEntrust.attachmentPage(
this.urlData.pageUrl,
......
......@@ -222,7 +222,7 @@ export default {
},
// 搜索
_search() {
this.$refs.fileModal._page()
this.$refs.fileModal._page(this.fileName)
}
}
}
......
......@@ -353,6 +353,7 @@ export default {
_editModal(edit, id) {
this.currentComponent = 'EntrustRegisterEdit'
if (edit) {
this.$refs.pageTable._showLoading()
// 编辑
this._getById(id)
} else {
......@@ -373,6 +374,9 @@ export default {
const result = await soilEntrust.getVOById(id)
if (result) {
this.$refs.refModal._openEdit(result)
this.$refs.pageTable._hideLoading()
} else {
this.$refs.pageTable._hideLoading()
}
},
_delete: async function(ids) {
......
......@@ -98,6 +98,8 @@ export default {
_selTestBasis(msg, data) {
if (msg === 'select') {
this.formObj.testBasis = data.name
} else if (msg === 'query') {
this.formObj.testBasis = data.name
}
},
channelInputLimit(e) {
......@@ -168,6 +170,7 @@ export default {
this.showModal = true
this.formObj = this.$resetFields(this.formObj)
this.sampleUnit = ''
this.formObj.testBasis = ''
this.$refs.footerModal._hideLoading()
this.ids = data
// 循环遍历数据
......@@ -212,7 +215,7 @@ export default {
this.$refs.formObj.validate(valid => {
if (valid) {
console.log(this.formObj)
const tempData = this.formObj
const tempData = this.$serializeForm(this.formObj)
tempData.ids = this.ids.join(',')
this._saveInfo(tempData)
} else {
......
......@@ -3,7 +3,7 @@
<Modal v-model="showModal" v-drag :mask-closable="false">
<p slot="header">填写制备信息</p>
<div>
<Form id="storage-location-form" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100">
<Form id="storage-location-form" :id="formId" ref="formObj" :model="formObj" :rules="ruleValidate" :label-width="100">
<Form-item label="制备方式:" prop="prepareWay">
<el-select :value="formObj.prepareWay" @change="selPrepareWay" style="width:100%" size="small">
<el-option v-for="item in prepareWayList" :value="item.name" :key="item.name">{{ item.name }}
......@@ -63,6 +63,7 @@ export default {
showModal: false,
formObj: {},
ruleValidate: {},
formId: '',
footerList: [
{ id: '', name: '取消', type: '' },
{ id: '', name: '保存', type: 'primary' }
......@@ -161,6 +162,7 @@ export default {
},
_open(data) {
this.showModal = true
this.formId = 'edit-form-batchEdit'
this.formObj = this.$resetFields(this.formObj)
this.sampleUnit = ''
this.$refs.footerModal._hideLoading()
......@@ -206,7 +208,8 @@ export default {
_ok() {
this.$refs.formObj.validate(valid => {
if (valid) {
this.$emit('on-result-change', this.formObj)
console.log('formObj', this.$serializeForm(this.formObj))
this.$emit('on-result-change', this.$serializeForm(this.formObj))
this.showModal = false
this.$refs.footerModal._hideLoading()
} else {
......
......@@ -591,6 +591,7 @@ export default {
this.$refs.pageTable._pageChange(1)
},
_pageByEntrustId: async function() {
this.selectIds = []
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj = this.$serializeForm(this.formObj)
this.formObj.entrustId = this.entrustId
......
......@@ -5,8 +5,8 @@
<Col span="24">
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="检测项目:">
<Input @on-enter="_formSearch" name="name" placeholder="请输入检测项目" clearable></Input>
<Form-item class="search-item" label="试样编号:">
<Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
......
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