|
@@ -11,45 +11,98 @@
|
|
<a-form-item v-show="false">
|
|
<a-form-item v-show="false">
|
|
<a-input v-decorator="['id']" type="hidden"/>
|
|
<a-input v-decorator="['id']" type="hidden"/>
|
|
<a-input v-decorator="['sbId']" type="hidden"/>
|
|
<a-input v-decorator="['sbId']" type="hidden"/>
|
|
- <a-input v-decorator="['part']" type="hidden"/>
|
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
<row-list :col="2">
|
|
<row-list :col="2">
|
|
<row-item>
|
|
<row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
- label="检定单号"
|
|
|
|
|
|
+ label="检定设备"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
>
|
|
>
|
|
<a-input
|
|
<a-input
|
|
- v-decorator="['no', {rules: [{required: false, message: '检定单号不能为空'}]}]"/>
|
|
|
|
|
|
+ style="width: 70%"
|
|
|
|
+ v-decorator="['sbName', {rules: [{required: false, message: '检定设备不能为空'}]}]"/>
|
|
|
|
+ <a-button type="primary" style="width: 30%" @click="handleSbSelect">选择</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</row-item>
|
|
</row-item>
|
|
<row-item>
|
|
<row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
- label="检定日期"
|
|
|
|
|
|
+ label="设备编号"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
>
|
|
>
|
|
- <a-date-picker
|
|
|
|
- style="width: 100%"
|
|
|
|
- :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
- v-decorator="['lastDate', {rules: [{required: false, message: '检定日期不能为空'}]}]" />
|
|
|
|
|
|
+ <a-input
|
|
|
|
+ disabled
|
|
|
|
+ v-decorator="['sbNo']"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</row-item>
|
|
</row-item>
|
|
-<!-- <row-item>
|
|
|
|
|
|
+ <row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
- label="检查部位"
|
|
|
|
|
|
+ label="设备型号"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:labelCol="BaseTool.Constant.labelCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
:wrapperCol="BaseTool.Constant.wrapperCol"
|
|
>
|
|
>
|
|
<a-input
|
|
<a-input
|
|
disabled
|
|
disabled
|
|
- style="width: 80%"
|
|
|
|
- v-decorator="['partName', {rules: [{required: false, message: '检查部位不能为空'}]}]"/>
|
|
|
|
- <a-button type="primary" style="width: 20%" @click="handlePartSelect">选择</a-button>
|
|
|
|
|
|
+ v-decorator="['sbModel']"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
|
|
+ <row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="上次检定日期"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-input
|
|
|
|
+ disabled
|
|
|
|
+ v-decorator="['checkDate']"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
|
|
+ <row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="检定有效期"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-input
|
|
|
|
+ disabled
|
|
|
|
+ v-decorator="['nextCheckDate']"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
|
|
+ <row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="检定周期"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-input
|
|
|
|
+ suffix='月'
|
|
|
|
+ v-decorator="['checkPeriod']"/>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
|
|
+ <row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="检定单号"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-input
|
|
|
|
+ v-decorator="['no', {rules: [{required: true, message: '检定单号不能为空'}]}]"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
- </row-item>-->
|
|
|
|
|
|
+ </row-item>
|
|
|
|
+ <row-item>
|
|
|
|
+ <a-form-item
|
|
|
|
+ label="检定日期"
|
|
|
|
+ :labelCol="BaseTool.Constant.labelCol"
|
|
|
|
+ :wrapperCol="BaseTool.Constant.wrapperCol"
|
|
|
|
+ >
|
|
|
|
+ <a-date-picker
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
|
|
|
|
+ v-decorator="['lastDate', {rules: [{required: true, message: '检定日期不能为空'}]}]" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </row-item>
|
|
<row-item>
|
|
<row-item>
|
|
<a-form-item
|
|
<a-form-item
|
|
label="检定人"
|
|
label="检定人"
|
|
@@ -279,7 +332,7 @@
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
<a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
|
|
</template>
|
|
</template>
|
|
- <part-info-select-modal ref="partInfoSelectModal" @selected="handlePartSelected"/>
|
|
|
|
|
|
+ <sb-info-select-modal ref="sbInfoSelectModal" @selected="handleSbSelectd"/>
|
|
</a-modal>
|
|
</a-modal>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -290,7 +343,7 @@ import { addCheckStandard, updateCheckStandard } from '@/api/sb/measurelog'
|
|
import BaseTool from '../../../../utils/tool'
|
|
import BaseTool from '../../../../utils/tool'
|
|
import { queryUser } from '@/api/upms/user'
|
|
import { queryUser } from '@/api/upms/user'
|
|
import { uploadUrl } from '@/api/upms/file'
|
|
import { uploadUrl } from '@/api/upms/file'
|
|
-import PartInfoSelectModal from '@/views/part/info/modules/PartInfoSelectModal'
|
|
|
|
|
|
+import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
|
|
|
|
|
@@ -299,7 +352,7 @@ export default {
|
|
components: {
|
|
components: {
|
|
STable,
|
|
STable,
|
|
Ellipsis,
|
|
Ellipsis,
|
|
- PartInfoSelectModal
|
|
|
|
|
|
+ SbInfoSelectModal
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -447,8 +500,12 @@ export default {
|
|
'no',
|
|
'no',
|
|
'type',
|
|
'type',
|
|
'period',
|
|
'period',
|
|
- 'part',
|
|
|
|
- 'partName',
|
|
|
|
|
|
+ 'sbName',
|
|
|
|
+ 'sbModel',
|
|
|
|
+ 'sbNo',
|
|
|
|
+ 'checkDate',
|
|
|
|
+ 'nextCheckDate',
|
|
|
|
+ 'checkPeriod',
|
|
'checkUserId',
|
|
'checkUserId',
|
|
'periodType',
|
|
'periodType',
|
|
'actionType',
|
|
'actionType',
|
|
@@ -597,21 +654,6 @@ export default {
|
|
console.log(newParam, 'newparam')
|
|
console.log(newParam, 'newparam')
|
|
return newParam
|
|
return newParam
|
|
},
|
|
},
|
|
- handlePartSelect () {
|
|
|
|
- const sbId = this.form.getFieldValue('sbId')
|
|
|
|
- this.$refs.partInfoSelectModal.base({ sbId })
|
|
|
|
- },
|
|
|
|
- handlePartSelected (keys, rows) {
|
|
|
|
- const [ key ] = keys
|
|
|
|
- const [ row ] = rows
|
|
|
|
- const { form: { setFieldsValue } } = this
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- setFieldsValue(Object.assign({
|
|
|
|
- 'part': key,
|
|
|
|
- 'partName': row.name
|
|
|
|
- }))
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
handleCheckImgChange (info) {
|
|
handleCheckImgChange (info) {
|
|
this.defaultCheckImgList = info.fileList
|
|
this.defaultCheckImgList = info.fileList
|
|
this.checkImgList = this.setFileList(info, 31)
|
|
this.checkImgList = this.setFileList(info, 31)
|
|
@@ -631,6 +673,26 @@ export default {
|
|
this.$message.error('上传失败')
|
|
this.$message.error('上传失败')
|
|
return null
|
|
return null
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ handleSbSelect () {
|
|
|
|
+ this.$refs.sbInfoSelectModal.base({}, { useType: this.DictCache.VALUE.SB_USE_TYPE.BGCL })
|
|
|
|
+ },
|
|
|
|
+ handleSbSelectd (keys, rows) {
|
|
|
|
+ const [ key ] = keys
|
|
|
|
+ const [ row ] = rows
|
|
|
|
+ const { form: { setFieldsValue } } = this
|
|
|
|
+ // 日期处理
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ setFieldsValue(Object.assign({
|
|
|
|
+ 'sbId': key,
|
|
|
|
+ 'sbName': row.name,
|
|
|
|
+ 'sbNo': row.no,
|
|
|
|
+ 'sbModel': row.model,
|
|
|
|
+ 'checkDate': row.checkDate,
|
|
|
|
+ 'checkPeriod': row.checkPeriod,
|
|
|
|
+ 'nextCheckDate': row.nextCheckDate
|
|
|
|
+ }))
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|