Commit facfe1db by lichengming

修改了试样照片查询

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