Commit 49c0b93e by lichengming

修改了开土制备试验项目列表

parent 810ffa2a
...@@ -29,6 +29,8 @@ export default { ...@@ -29,6 +29,8 @@ export default {
getVOById: data => http.get('soil/v1/entrust/vo/' + data).then(res => res), getVOById: data => http.get('soil/v1/entrust/vo/' + data).then(res => res),
deleteById: data => deleteById: data =>
http.delete('soil/v1/entrust/?ids=' + data).then(res => res), http.delete('soil/v1/entrust/?ids=' + data).then(res => res),
experimentDeleteById: data =>
http.delete('soil/v1/experiment/?ids=' + data).then(res => res),
// 保存 // 保存
save: data => save: data =>
https https
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
<Form-item label="试验科室:" class="search-item"> <Form-item label="试验科室:" class="search-item">
<Input v-model="formObj.groupName" @on-enter="_formSearch" placeholder="请输入试验科室" clearable /> <Input v-model="formObj.groupName" @on-enter="_formSearch" placeholder="请输入试验科室" clearable />
</Form-item> </Form-item>
<Form-item label="试验编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入试样编号" clearable />
</Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary"> <Button @click="_formSearch" type="primary">
搜索 搜索
...@@ -129,6 +132,11 @@ export default { ...@@ -129,6 +132,11 @@ export default {
type: 'success', type: 'success',
id: '', id: '',
name: '批量填写试验项目信息' name: '批量填写试验项目信息'
},
{
type: 'error',
id: '',
name: '删除'
} }
], ],
iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }], iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }],
...@@ -182,6 +190,7 @@ export default { ...@@ -182,6 +190,7 @@ export default {
name: undefined, name: undefined,
sampleId: undefined, sampleId: undefined,
groupName: undefined, groupName: undefined,
sampleCode: undefined,
entrustId: undefined entrustId: undefined
} }
} }
...@@ -372,7 +381,7 @@ export default { ...@@ -372,7 +381,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data) const result = await soilEntrust.pageItemEdit(data)
if (result) { if (result) {
this.$message.success('保存成功') this.$message.success('保存成功')
this._page() this._pageByEntrustId()
} else { } else {
this.$message.warning('保存失败') this.$message.warning('保存失败')
} }
...@@ -381,7 +390,7 @@ export default { ...@@ -381,7 +390,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data) const result = await soilEntrust.pageItemEdit(data)
if (result) { if (result) {
this.$message.success('保存成功') this.$message.success('保存成功')
this._page() this._pageByEntrustId()
} else { } else {
this.$message.warning('保存失败') this.$message.warning('保存失败')
} }
...@@ -390,7 +399,7 @@ export default { ...@@ -390,7 +399,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data) const result = await soilEntrust.pageItemEdit(data)
if (result) { if (result) {
this.$message.success('保存成功') this.$message.success('保存成功')
this._page() this._pageByEntrustId()
} else { } else {
this.$message.warning('保存失败') this.$message.warning('保存失败')
} }
...@@ -399,7 +408,7 @@ export default { ...@@ -399,7 +408,7 @@ export default {
const result = await soilEntrust.pageItemEdit(data) const result = await soilEntrust.pageItemEdit(data)
if (result) { if (result) {
this.$message.success('保存成功') this.$message.success('保存成功')
this._page() this._pageByEntrustId()
} else { } else {
this.$message.warning('保存失败') this.$message.warning('保存失败')
} }
...@@ -541,7 +550,7 @@ export default { ...@@ -541,7 +550,7 @@ export default {
this.showModal = true this.showModal = true
this.sampleId = id // 委托id this.sampleId = id // 委托id
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this._page() this._pageByEntrustId()
}, },
_openByEntrustId(id) { _openByEntrustId(id) {
this.formObj = this.$resetFields(this.formObj) this.formObj = this.$resetFields(this.formObj)
...@@ -560,7 +569,7 @@ export default { ...@@ -560,7 +569,7 @@ export default {
this.sampleId = id // 委托id this.sampleId = id // 委托id
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
this.showOption = false this.showOption = false
this._page() this._pageByEntrustId()
}, },
_formSearch() { _formSearch() {
this.$refs.pageTable._pageChange(1) this.$refs.pageTable._pageChange(1)
...@@ -602,7 +611,7 @@ export default { ...@@ -602,7 +611,7 @@ export default {
}, },
_deleteOk: async function(ids) { _deleteOk: async function(ids) {
const result = await soilEntrust.deleteById(ids) const result = await soilEntrust.experimentDeleteById(ids)
if (result) { if (result) {
this._resultChange('删除成功! ') this._resultChange('删除成功! ')
} }
...@@ -654,10 +663,10 @@ export default { ...@@ -654,10 +663,10 @@ export default {
} }
}, },
_search() { _search() {
this._page() this._pageByEntrustId()
}, },
_resultChange(msg) { _resultChange(msg) {
this._page() this._pageByEntrustId()
this.$Message.success(msg) this.$Message.success(msg)
this.$emit('on-result-change') this.$emit('on-result-change')
}, },
......
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