Commit 5d48dd6f by wangweidong

土工试验Lims

parent aa0dc916
...@@ -17,6 +17,8 @@ export default { ...@@ -17,6 +17,8 @@ export default {
http.post('soil/v1/entrust/page_review', data).then(res => res), http.post('soil/v1/entrust/page_review', data).then(res => res),
pageSampleReceive: data => pageSampleReceive: data =>
http.post('soil/v1/entrust/page_sample_receive', data).then(res => res), http.post('soil/v1/entrust/page_sample_receive', data).then(res => res),
pageSampleTake: data =>
http.post('soil/v1/entrust/page_sample_take', data).then(res => res),
pageSampleReceiveHis: data => pageSampleReceiveHis: data =>
http.post('soil/v1/entrust/page_sample_receive_his', data).then(res => res), http.post('soil/v1/entrust/page_sample_receive_his', data).then(res => res),
pageSamplePrepare: data => pageSamplePrepare: data =>
......
...@@ -151,24 +151,6 @@ export default { ...@@ -151,24 +151,6 @@ export default {
sendData.personId = data.userId sendData.personId = data.userId
} }
switch (msg) { switch (msg) {
case 'contractSendMan':
// 一键发放
this.$store.dispatch('FoodContract/oneKeySend', sendData).then(() => {
this._resultChange('发放成功')
})
break
case 'contractReceiveSendMan':
// 一键接收并发放
this.$store
.dispatch('FoodContract/oneKeyReceiveSend', sendData)
.then(() => {
this._resultChange('一键接收并发放成功')
})
break
case 'sampleSendScanMan':
// 扫码发放
this.$refs.refModal._open('扫码发放', data)
break
case 'sampleReceiveSendScanMan': case 'sampleReceiveSendScanMan':
// 扫码接收并发放 // 扫码接收并发放
this.$refs.refModal._open('扫码接收发放', data) this.$refs.refModal._open('扫码接收发放', data)
...@@ -221,122 +203,6 @@ export default { ...@@ -221,122 +203,6 @@ export default {
case '扫码接收并发放': case '扫码接收并发放':
this._scanSend('sampleReceiveSendScanMan') this._scanSend('sampleReceiveSendScanMan')
break break
case '信息维护':
this._maintainInfo()
break
case '登记协议':
this._editModals(msg)
break
}
},
// 扫码接收并发放
_scanSend(msg) {
if (msg === 'sampleReceiveSendScanMan' || msg === 'sampleSendScanMan') {
// 扫码接收并发放判断是够选人
if (this.acceptSelectUserValue === '是') {
this.$refs.userModal._open(msg, '请选择领样人')
} else {
this.$refs.refModal._open('扫码发放')
}
} else {
// 其他
this.$refs.userModal._open(msg, '请选择领样人')
}
},
// 一键接收并发放
_oneKeyReceiveSend() {
if (this.selectIds.length === 0) {
this.$msgTip('warning', '请至少选择一条数据!')
} else {
// 根据字典是否选择人员
// eslint-disable-next-line no-lonely-if
if (this.acceptSelectUserValue === '是') {
// 选择人员接收并发放
this.$store
.dispatch('FoodContract/oneKeyReceiveSendCheck', {
ids: this.selectIds.join(',')
})
.then(() => {
const result = this.$store.state.FoodContract.success
if (result) {
// 验证成功
this.$refs.userModal._open(
'contractReceiveSendMan',
'请选择领样人'
)
}
})
} else {
// 不选择人员
this.$store
.dispatch('FoodContract/oneKeyReceiveSend', {
ids: this.selectIds.join(',')
})
.then(() => {
this._resultChange('一键接收并发放成功')
})
}
}
},
// 一键发放
_oneKeySend() {
if (this.selectIds.length === 0) {
this.$msgTip('warning', '请至少选择一条数据!')
} else {
// 一键发放判断是否选人
// eslint-disable-next-line no-lonely-if
if (this.acceptSelectUserValue === '是') {
this.$store
.dispatch('FoodContract/oneKeySendCheck', {
ids: this.selectIds.join(',')
})
.then(() => {
if (this.$store.state.FoodContract.success) {
this.$refs.userModal._open('contractSendMan', '请选择领样人')
}
})
} else {
// 一键发放
this.$store
.dispatch('FoodContract/oneKeySend', {
ids: this.selectIds.join(',')
})
.then(() => {
this._resultChange('发放成功')
})
}
}
},
// 一键接收
_oneKeyReceive() {
if (this.selectIds.length === 0) {
this.$msgTip('warning', '请至少选择一条数据!')
} else {
this.$Modal.confirm({
title: '提示',
content:
'确定要一键接收这 ' + this.selectIds.length + ' 条委托下的样品?',
onOk: () => {
this.$store
.dispatch('FoodContract/oneKeyReceive', {
ids: this.selectIds.join(',')
})
.then(() => {
this._resultChange('接收成功')
})
}
})
}
},
// 信息维护
_maintainInfo() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
this.currentComponent = 'MaintainInfoModal'
this.$nextTick(() => {
this.$refs.refModal._open(this.selectIds, 1)
})
} }
}, },
_iconClick(res, data, currentComponent) { _iconClick(res, data, currentComponent) {
...@@ -398,9 +264,6 @@ export default { ...@@ -398,9 +264,6 @@ export default {
}, },
_tableResultChange(msg, data) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
case 'page':
this.getPage = this.$store.state.FoodContract.page
break
case 'selectIds': case 'selectIds':
this.selectIds = data this.selectIds = data
break break
...@@ -417,7 +280,7 @@ export default { ...@@ -417,7 +280,7 @@ export default {
}, },
_page: async function() { _page: async function() {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
const result = await soilEntrust.pageSampleReceive( const result = await soilEntrust.pageSampleTake(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
...@@ -176,14 +176,6 @@ export default { ...@@ -176,14 +176,6 @@ export default {
sendData.personId = data.userId sendData.personId = data.userId
} }
switch (msg) { switch (msg) {
case 'relReceiveSendMan':
// 一键接收并发放
this.$store
.dispatch('FoodSample/sampleReceiveSend', sendData)
.then(() => {
this._resultSampleChange('接收并发放成功')
})
break
case 'relReceiveSendScanMan': case 'relReceiveSendScanMan':
// 扫码接收并发放 // 扫码接收并发放
this.$refs.refModal._open('扫码接收发放', data) this.$refs.refModal._open('扫码接收发放', data)
......
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
Object.assign(this.formObj, this.$refs.pageTable._searchParams()) Object.assign(this.formObj, this.$refs.pageTable._searchParams())
console.log('this.formObj', this.formObj) console.log('this.formObj', this.formObj)
this.formObj.entrustId = this.entrustId this.formObj.entrustId = this.entrustId
const result = await soilEntrust.pageReceive( const result = await soilEntrust.pageTake(
this.$serializeForm(this.formObj) this.$serializeForm(this.formObj)
) )
if (result) { if (result) {
......
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