Commit 2f70f58b by wangweidong

计量证书修改

parent bce6c3be
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<InstruMentEdit ref="InstruEdit"></InstruMentEdit> <InstruMentEdit ref="InstruEdit"></InstruMentEdit>
<operationModal ref="operationModal"></operationModal> <operationModal ref="operationModal"></operationModal>
<FileManage ref="FileManage"></FileManage> <FileManage ref="FileManage"></FileManage>
<assignPerson ref="userModal" is-change @on-result-change="_userData"></assignPerson>
<SelectOriTempRecordExcel ref="SelectOriTempRecordExcel" @on-result-change="_certificateSelectExcelBack"></SelectOriTempRecordExcel> <SelectOriTempRecordExcel ref="SelectOriTempRecordExcel" @on-result-change="_certificateSelectExcelBack"></SelectOriTempRecordExcel>
</div> </div>
</template> </template>
...@@ -82,6 +82,7 @@ import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook' ...@@ -82,6 +82,7 @@ import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook'
import { meterSample } from '../../../api' import { meterSample } from '../../../api'
import operationModal from '../../../components/operation/Operation' import operationModal from '../../../components/operation/Operation'
import SelectOriTempRecordExcel from '../../meter-send/sample-input/SelectOriTempRecordExcel' import SelectOriTempRecordExcel from '../../meter-send/sample-input/SelectOriTempRecordExcel'
import assignPerson from '../../../components/user-info-single/assignPerson'
import CreateReport from './CreateReport' import CreateReport from './CreateReport'
import CarManage from './CarManage' import CarManage from './CarManage'
import InstruMentEdit from './InstrumentEdit' import InstruMentEdit from './InstrumentEdit'
...@@ -90,6 +91,7 @@ export default { ...@@ -90,6 +91,7 @@ export default {
components: { components: {
CreateReport, CreateReport,
CarManage, CarManage,
assignPerson,
InstruMentEdit, InstruMentEdit,
SelectOriTempRecordExcel, SelectOriTempRecordExcel,
operationModal, operationModal,
...@@ -103,11 +105,11 @@ export default { ...@@ -103,11 +105,11 @@ export default {
formId: 'meterSubcontractorFormId', formId: 'meterSubcontractorFormId',
searchOpen: false, searchOpen: false,
btn: [ btn: [
// { {
// type: 'success', type: 'success',
// id: '', id: '',
// name: '生成' name: '提交至审核'
// }, },
{ {
type: 'success', type: 'success',
id: '', id: '',
...@@ -192,6 +194,9 @@ export default { ...@@ -192,6 +194,9 @@ export default {
case '提交': case '提交':
this._submitToCheck() this._submitToCheck()
break break
case '提交至审核':
this._selectToReportReview()
break
case '添加': case '添加':
this._editModal(false) this._editModal(false)
break break
...@@ -201,6 +206,43 @@ export default { ...@@ -201,6 +206,43 @@ export default {
} }
}) })
}, },
_selectToReportReview() {
const ids = this.selectIds
const data = this.selectData
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
for (let i = 0; i < data.length; i++) {
if (
data[i].onlineReported === undefined ||
data[i].onlineReported === '否'
) {
this.$Message.warning(
'您选择的样品编号为' + data[i].code + '暂未编制证书,无法提交!'
)
return false
}
}
this.$refs.userModal._open('salesman')
}
},
_userData(data, msg) {
if (msg === 'salesman') {
this._distributeCertificateCheck(data)
}
},
_distributeCertificateCheck: async function(data) {
const result = await meterSample.selectToReportCheck({
ids: this.selectIds,
userId: data.id,
user: data.realname
})
if (result) {
await this._page()
this.$Message.success('分配成功!')
}
},
_certificateSelectBack(data) { _certificateSelectBack(data) {
if (data) { if (data) {
// this.$refs.itemOriginalRecordModal._open( // this.$refs.itemOriginalRecordModal._open(
......
...@@ -73,49 +73,49 @@ export default { ...@@ -73,49 +73,49 @@ export default {
btn: [ btn: [
{ {
type: 'success', type: 'success',
id: 'meter-go-out-entrust-add', id: '',
name: '添加' name: '添加'
}, },
{ {
type: 'success', type: 'success',
id: 'meter-go-out-entrust-submit-review', id: '',
name: '提交评审' name: '提交评审'
}, },
{ {
type: 'success', type: 'success',
id: 'meter-go-out-entrust-submit', id: '',
name: '提交' name: '提交'
} }
], ],
iconMsg: [ iconMsg: [
{ {
type: 'md-create', type: 'md-create',
id: 'meter-go-out-entrust-edit-o', id: '',
name: '编辑' name: '编辑'
}, },
{ {
type: 'ios-beaker', type: 'ios-beaker',
id: 'meter-go-out-entrust-sample-manage-o', id: '',
name: '管理样品' name: '管理样品'
}, },
{ {
type: 'md-cloud', type: 'md-cloud',
id: 'meter-go-out-entrust-accessory-o', id: '',
name: '附件' name: '附件'
}, },
{ {
type: 'md-document', type: 'md-document',
id: 'meter-go-out-entrust-export-entrust-o', id: '',
name: '导出委托单' name: '导出委托单'
}, },
{ {
type: 'md-remove-circle', type: 'md-remove-circle',
id: 'meter-go-out-entrust-remove-o', id: '',
name: '删除' name: '删除'
}, },
{ {
type: 'ios-clock', type: 'ios-clock',
id: 'meter-go-out-entrust-record-o', id: '',
name: '操作日志' name: '操作日志'
} }
], ],
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit> <MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
<CertificateMakeLook ref="itemOriginalRecordLookModal" @on-result-change="_resultRecord"></CertificateMakeLook> <CertificateMakeLook ref="itemOriginalRecordLookModal" @on-result-change="_resultRecord"></CertificateMakeLook>
<SelectOriTempRecordExcel ref="SelectOriTempRecordExcel" @on-result-change="_certificateSelectExcelBack"></SelectOriTempRecordExcel> <SelectOriTempRecordExcel ref="SelectOriTempRecordExcel" @on-result-change="_certificateSelectExcelBack"></SelectOriTempRecordExcel>
<assignPerson ref="userModal" is-change @on-result-change="_userData"></assignPerson>
</div> </div>
</template> </template>
<script> <script>
...@@ -80,6 +81,7 @@ import SelEquip from '../../../components/select-equip/SelEquip' ...@@ -80,6 +81,7 @@ import SelEquip from '../../../components/select-equip/SelEquip'
import operationModal from '../../../components/operation/Operation' import operationModal from '../../../components/operation/Operation'
import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook' import CertificateMakeLook from '../../meter-certificate/CertificateMakeLook'
import SelectOriTempRecordExcel from '../../meter-send/sample-input/SelectOriTempRecordExcel' import SelectOriTempRecordExcel from '../../meter-send/sample-input/SelectOriTempRecordExcel'
import assignPerson from '../../../components/user-info-single/assignPerson'
import MeterSubcontractorEdit from './MeterGoOutTestEdit' import MeterSubcontractorEdit from './MeterGoOutTestEdit'
import CarManage from './CarManage' import CarManage from './CarManage'
import MeterPersonItemTaskManage from './MeterPersonItemTaskManage' import MeterPersonItemTaskManage from './MeterPersonItemTaskManage'
...@@ -89,6 +91,7 @@ import SelectOriTempRecord from './SelectOriTempRecord' ...@@ -89,6 +91,7 @@ import SelectOriTempRecord from './SelectOriTempRecord'
export default { export default {
components: { components: {
CertificateMake, CertificateMake,
assignPerson,
CertificateMakeLook, CertificateMakeLook,
SelectOriTempRecordExcel, SelectOriTempRecordExcel,
SelectOriTempRecord, SelectOriTempRecord,
...@@ -118,6 +121,11 @@ export default { ...@@ -118,6 +121,11 @@ export default {
}, },
{ {
type: 'success', type: 'success',
id: '',
name: '提交至审核'
},
{
type: 'success',
id: 'meter-out-personal-task-submit', id: 'meter-out-personal-task-submit',
name: '提交' name: '提交'
}, },
...@@ -229,6 +237,9 @@ export default { ...@@ -229,6 +237,9 @@ export default {
case '提交': case '提交':
this._submitToReportReview() this._submitToReportReview()
break break
case '提交至审核':
this._selectToReportReview()
break
case '提交至证书编制': case '提交至证书编制':
this._submitToReportMake() this._submitToReportMake()
break break
...@@ -238,6 +249,43 @@ export default { ...@@ -238,6 +249,43 @@ export default {
} }
}) })
}, },
_selectToReportReview() {
const ids = this.selectIds
const data = this.selectData
if (ids.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
for (let i = 0; i < data.length; i++) {
if (
data[i].onlineReported === undefined ||
data[i].onlineReported === '否'
) {
this.$Message.warning(
'您选择的样品编号为' + data[i].code + '暂未编制证书,无法提交!'
)
return false
}
}
this.$refs.userModal._open('salesman')
}
},
_userData(data, msg) {
if (msg === 'salesman') {
this._distributeCertificateCheck(data)
}
},
_distributeCertificateCheck: async function(data) {
const result = await meterSample.selectToReportCheck({
ids: this.selectIds,
userId: data.id,
user: data.realname
})
if (result) {
await this._page()
this.$Message.success('分配成功!')
}
},
_docimasy() { _docimasy() {
if (this.selectIds.length === 0) { if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!') this.$Message.warning('请至少选择一条数据!')
......
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