Commit ade4d48f by lichengming

修改了试验委托登记试验项目列表

parent 4c5ba0a1
......@@ -11,6 +11,8 @@ export default {
pageRegHis: data =>
http.post('soil/v1/entrust/page_reg_his', data).then(res => res),
pageItem: data => http.post('soil/v1/experiment/page', data).then(res => res),
pageItemByEntrustId: data =>
http.post('soil/v1/experiment/page_by_entrust', data).then(res => res),
pageReview: data =>
http.post('soil/v1/entrust/page_review', data).then(res => res),
pageSampleReceive: data =>
......
......@@ -124,6 +124,7 @@ export default {
btn: [],
iconMsg: [{ type: 'pt-a-end', id: '', name: '删除' }],
sampleId: '', // 样品id
entrustId: '',
showModal: false,
modalTitle: '管理检测项目',
selectIds: [],
......@@ -163,7 +164,8 @@ export default {
formObj: {
name: undefined,
sampleId: undefined,
groupName: undefined
groupName: undefined,
entrustId: undefined
}
}
},
......@@ -449,6 +451,14 @@ export default {
this.$refs.pageTable._hideLoading()
this._page()
},
_openByEntrustId(id) {
this.formObj = this.$resetFields(this.formObj)
this.dateList = []
this.showModal = true
this.entrustId = id // 委托id
this.$refs.pageTable._hideLoading()
this._pageByEntrustId()
},
_openRecord(id) {
this.formObj = this.$resetFields(this.formObj)
this.dateList = []
......@@ -461,6 +471,19 @@ export default {
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_pageByEntrustId: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj = this.$serializeForm(this.formObj)
this.formObj.entrustId = this.entrustId
const result = await soilEntrust.pageItemByEntrustId(
this.$serializeForm(this.formObj)
)
if (result) {
this.$refs.pageTable._hideLoading()
this.getPage = result
console.log(result)
}
},
_page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams())
this.formObj = this.$serializeForm(this.formObj)
......
......@@ -242,7 +242,7 @@ export default {
},
_itemManage(data) {
// 管理样品
this.$refs.itemManageModal._open(data)
this.$refs.itemManageModal._openByEntrustId(data)
},
_submitToReview() {
this._submitByContractIds('委托评审')
......
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