Commit bc63c865 authored by jingnan's avatar jingnan 👀

物料台账导入模板上传 及入场验收单展示涉及组件修改

parent d15cfd92
...@@ -15,9 +15,14 @@ export default { ...@@ -15,9 +15,14 @@ export default {
viewOrEdit: { viewOrEdit: {
type: String, type: String,
default: () => 'edit' default: () => 'edit'
},
allDisabled: {
type: Boolean,
required: false
} }
}, },
data() { data() {
const that = this
return { return {
form: { form: {
objFileLinks: [] objFileLinks: []
...@@ -44,6 +49,7 @@ export default { ...@@ -44,6 +49,7 @@ export default {
'limit': 5, 'limit': 5,
'mrequired': true, 'mrequired': true,
// 'state': 'edit', // 'state': 'edit',
'readOnly': that.allDisabled,
'state': this.viewOrEdit, 'state': this.viewOrEdit,
'masterTitle': '主内容', 'masterTitle': '主内容',
'appendTitle': '附件', 'appendTitle': '附件',
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-input <el-input
v-model="form.testNo" v-model="form.testNo"
placeholder="请输入验收单号" placeholder="请输入验收单号"
:disabled="subTypeNameDisabled" :disabled="subTypeNameDisabled ||allDisabled"
clearable clearable
onchange="this.value=this.value.toUpperCase()" onchange="this.value=this.value.toUpperCase()"
/> />
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
v-model="form.storagePeriod" v-model="form.storagePeriod"
type="date" type="date"
clearable clearable
:disabled="allDisabled"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期" placeholder="选择日期"
/> />
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
v-model="form.qualityPeriod" v-model="form.qualityPeriod"
clearable clearable
type="date" type="date"
:disabled="allDisabled"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期" placeholder="选择日期"
/> />
...@@ -43,22 +45,22 @@ ...@@ -43,22 +45,22 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label=" 保证期"> <el-form-item label-width="100px" label=" 保证期">
<el-input v-model="form.guaranteePeriod" clearable placeholder="请输入保证期" /> <el-input v-model="form.guaranteePeriod" :disabled="allDisabled" clearable placeholder="请输入保证期" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label=" 首翻期"> <el-form-item label-width="100px" label=" 首翻期">
<el-input v-model="form.firstTurnPeriod" clearable placeholder="请输入首翻期" /> <el-input v-model="form.firstTurnPeriod" :disabled="allDisabled" clearable placeholder="请输入首翻期" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label=" 总寿命"> <el-form-item label-width="100px" label=" 总寿命">
<el-input v-model="form.totalLife" clearable placeholder="请输入总寿命" /> <el-input v-model="form.totalLife" :disabled="allDisabled" clearable placeholder="请输入总寿命" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="检验依据"> <el-form-item label-width="100px" label="检验依据">
<el-input v-model="form.checkBill" clearable placeholder="请输入检验依据" /> <el-input v-model="form.checkBill" :disabled="allDisabled" clearable placeholder="请输入检验依据" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -67,6 +69,7 @@ ...@@ -67,6 +69,7 @@
<el-input <el-input
v-model="form.weight" v-model="form.weight"
clearable clearable
:disabled="allDisabled"
type="number" type="number"
placeholder="请输入重量" placeholder="请输入重量"
onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');" onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');"
...@@ -78,7 +81,7 @@ ...@@ -78,7 +81,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="质量证明文件"> <el-form-item label-width="100px" label="质量证明文件">
<el-select v-model="form.qualityCert" clearable placeholder="请选择"> <el-select v-model="form.qualityCert" clearable :disabled="allDisabled" placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -86,7 +89,7 @@ ...@@ -86,7 +89,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="配套件检查"> <el-form-item label-width="100px" label="配套件检查">
<el-select v-model="form.accessoryCheck" clearable placeholder="请选择"> <el-select v-model="form.accessoryCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -94,7 +97,7 @@ ...@@ -94,7 +97,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="标识检查"> <el-form-item label-width="100px" label="标识检查">
<el-select v-model="form.flagCheck" clearable placeholder="请选择"> <el-select v-model="form.flagCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -102,7 +105,7 @@ ...@@ -102,7 +105,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="外观质量检查"> <el-form-item label-width="100px" label="外观质量检查">
<el-select v-model="form.performCheck" clearable placeholder="请选择"> <el-select v-model="form.performCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -110,7 +113,7 @@ ...@@ -110,7 +113,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="是否合格" prop="isPass"> <el-form-item label-width="100px" label="是否合格" prop="isPass">
<el-select v-model="form.isPass" clearable placeholder="请选择"> <el-select v-model="form.isPass" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -123,13 +126,13 @@ ...@@ -123,13 +126,13 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass !== 'N'" :disabled="form.isPass !== 'N'||allDisabled"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="处理方式"> <el-form-item label-width="100px" label="处理方式">
<el-select v-model="form.disposeType" clearable placeholder="请选择"> <el-select v-model="form.disposeType" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="原样使用" value="OriginalSampleTest" /> <el-option label="原样使用" value="OriginalSampleTest" />
<el-option label="报废" value="Scrap" /> <el-option label="报废" value="Scrap" />
<el-option label="返修" value="Rework" /> <el-option label="返修" value="Rework" />
...@@ -141,7 +144,7 @@ ...@@ -141,7 +144,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="是否封闭"> <el-form-item label-width="100px" label="是否封闭">
<el-select v-model="form.isClosure" clearable placeholder="请选择"> <el-select v-model="form.isClosure" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="是" :value="true" /> <el-option label="是" :value="true" />
<el-option label="否" :value="false" /> <el-option label="否" :value="false" />
</el-select> </el-select>
...@@ -149,7 +152,7 @@ ...@@ -149,7 +152,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="130px" label="不合格品审理单号"> <el-form-item label-width="130px" label="不合格品审理单号">
<el-input v-model="form.noPassReviewNo" clearable placeholder="请输入不合格品审理单号" /> <el-input v-model="form.noPassReviewNo" :disabled="allDisabled" clearable placeholder="请输入不合格品审理单号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
...@@ -159,6 +162,7 @@ ...@@ -159,6 +162,7 @@
type="textarea" type="textarea"
resize="none" resize="none"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10 }" :autosize="{ minRows: 9, maxRows: 10 }"
placeholder="入场验收问题描述:" placeholder="入场验收问题描述:"
/> />
...@@ -171,6 +175,7 @@ ...@@ -171,6 +175,7 @@
type="textarea" type="textarea"
resize="none" resize="none"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10 }" :autosize="{ minRows: 9, maxRows: 10 }"
placeholder="相关单位意见:" placeholder="相关单位意见:"
/> />
...@@ -182,6 +187,7 @@ ...@@ -182,6 +187,7 @@
v-model="form.checkRemark" v-model="form.checkRemark"
type="textarea" type="textarea"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 3.6, maxRows: 7 }" :autosize="{ minRows: 3.6, maxRows: 7 }"
placeholder="检验备注:" placeholder="检验备注:"
resize="none" resize="none"
...@@ -190,7 +196,7 @@ ...@@ -190,7 +196,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<upload-files v-model="form.objFileLinks" /> <upload-files v-model="form.objFileLinks" :all-disabled="allDisabled" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -212,6 +218,7 @@ export default { ...@@ -212,6 +218,7 @@ export default {
} }
}, },
data() { data() {
const that = this
// var checkAge = (rule, value, callback) => { // var checkAge = (rule, value, callback) => {
// if (value > this.basicData.afterExperimentAmount) { // if (value > this.basicData.afterExperimentAmount) {
// callback(new Error(`不合格数不能大于${this.basicData.afterExperimentAmount}`)) // callback(new Error(`不合格数不能大于${this.basicData.afterExperimentAmount}`))
...@@ -220,6 +227,7 @@ export default { ...@@ -220,6 +227,7 @@ export default {
// } // }
// } // }
return { return {
allDisabled: that.basicData.allDisabled,
disabled: false, disabled: false,
// 验收单号是否禁用 // 验收单号是否禁用
subTypeNameDisabled: false, subTypeNameDisabled: false,
...@@ -275,11 +283,16 @@ export default { ...@@ -275,11 +283,16 @@ export default {
// { validator: checkAge, trigger: ['blur', 'change'] } // { validator: checkAge, trigger: ['blur', 'change'] }
// ] // ]
}, },
uploadVisble: false, uploadVisble: false
tools: [ }
},
computed: {
tools() {
const allTools = [
{ {
name: '保存', name: '保存',
icon: '/icons/components/new/add.png', icon: '/icons/components/new/add.png',
show: !this.allDisabled,
handler: { handler: {
click: () => { click: () => {
this.onSubmit() this.onSubmit()
...@@ -289,6 +302,7 @@ export default { ...@@ -289,6 +302,7 @@ export default {
{ {
name: '下载', name: '下载',
icon: '/icons/components/new/addAffectedData.png', icon: '/icons/components/new/addAffectedData.png',
show: true,
handler: { handler: {
click: () => { click: () => {
this.savePDF() this.savePDF()
...@@ -296,10 +310,9 @@ export default { ...@@ -296,10 +310,9 @@ export default {
} }
} }
] ]
return allTools.filter(el => el.show)
} }
}, },
computed: {
},
watch: { watch: {
'form.isPass': { 'form.isPass': {
handler: function(v) { handler: function(v) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<el-input <el-input
v-model="form.testNo" v-model="form.testNo"
placeholder="请输入验收单号" placeholder="请输入验收单号"
:disabled="subTypeNameDisabled" :disabled="subTypeNameDisabled||allDisabled"
clearable clearable
onchange="this.checkvalue=this.checkvalue.toUpperCase()" onchange="this.checkvalue=this.checkvalue.toUpperCase()"
/> />
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
v-model="form.maskPeriod" v-model="form.maskPeriod"
clearable clearable
type="date" type="date"
:disabled="allDisabled"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
/> />
...@@ -35,6 +36,7 @@ ...@@ -35,6 +36,7 @@
<el-date-picker <el-date-picker
v-model="form.qualityPeriod" v-model="form.qualityPeriod"
clearable clearable
:disabled="allDisabled"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -46,6 +48,7 @@ ...@@ -46,6 +48,7 @@
<el-date-picker <el-date-picker
v-model="form.longPeriod" v-model="form.longPeriod"
clearable clearable
:disabled="allDisabled"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -57,6 +60,7 @@ ...@@ -57,6 +60,7 @@
<el-input <el-input
v-model="form.spotCheckPeriod" v-model="form.spotCheckPeriod"
clearable clearable
:disabled="allDisabled"
type="number" type="number"
placeholder="整型数字" placeholder="整型数字"
onkeypress="return( /[\d]/.test(String.fromCharCode(event.keyCode)))" onkeypress="return( /[\d]/.test(String.fromCharCode(event.keyCode)))"
...@@ -120,7 +124,7 @@ ...@@ -120,7 +124,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="质量证明文件" label-width="130px"> <el-form-item label="质量证明文件" label-width="130px">
<el-select v-model="form.qualityCert" clearable placeholder="请选择"> <el-select v-model="form.qualityCert" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -128,7 +132,7 @@ ...@@ -128,7 +132,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="标识检查" label-width="130px"> <el-form-item label="标识检查" label-width="130px">
<el-select v-model="form.flagCheck" clearable placeholder="请选择"> <el-select v-model="form.flagCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -136,7 +140,7 @@ ...@@ -136,7 +140,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="外观质量检查" label-width="130px"> <el-form-item label="外观质量检查" label-width="130px">
<el-select v-model="form.performCheck" clearable placeholder="请选择"> <el-select v-model="form.performCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -144,7 +148,7 @@ ...@@ -144,7 +148,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="尺寸检验" label-width="130px"> <el-form-item label="尺寸检验" label-width="130px">
<el-select v-model="form.isSizeCheck" clearable placeholder="请选择"> <el-select v-model="form.isSizeCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="是" :value="true" /> <el-option label="是" :value="true" />
<el-option label="否" :value="false" /> <el-option label="否" :value="false" />
</el-select> </el-select>
...@@ -153,23 +157,23 @@ ...@@ -153,23 +157,23 @@
<el-col v-if="form.isSizeCheck" :span="8"> <el-col v-if="form.isSizeCheck" :span="8">
<div class="radio-input"> <div class="radio-input">
<el-form-item label="抽样数" label-width="130px"> <el-form-item label="抽样数" label-width="130px">
<el-input-number v-model="form.sampleAmount" clearable :min="0" placeholder="抽样数量" /> <el-input-number v-model="form.sampleAmount" :disabled="allDisabled" clearable :min="0" placeholder="抽样数量" />
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检验依据" label-width="130px"> <el-form-item label="检验依据" label-width="130px">
<el-input v-model="form.checkBill" clearable placeholder="请输入检验依据" /> <el-input v-model="form.checkBill" :disabled="allDisabled" clearable placeholder="请输入检验依据" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="备注" label-width="130px"> <el-form-item label="备注" label-width="130px">
<el-input v-model="form.remark" clearable placeholder="备注" /> <el-input v-model="form.remark" :disabled="allDisabled" clearable placeholder="备注" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="处理方式" label-width="130px"> <el-form-item label="处理方式" label-width="130px">
<el-select v-model="form.disposeType" clearable placeholder="请选择"> <el-select v-model="form.disposeType" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="原样使用" value="OriginalSampleTest" /> <el-option label="原样使用" value="OriginalSampleTest" />
<el-option label="报废" value="Scrap" /> <el-option label="报废" value="Scrap" />
<el-option label="返修" value="Rework" /> <el-option label="返修" value="Rework" />
...@@ -181,7 +185,7 @@ ...@@ -181,7 +185,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否合格" prop="isPass" label-width="130px"> <el-form-item label="是否合格" prop="isPass" label-width="130px">
<el-select v-model="form.isPass" clearable placeholder="请选择"> <el-select v-model="form.isPass" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -195,14 +199,14 @@ ...@@ -195,14 +199,14 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass !== 'N'" :disabled="form.isPass !== 'N'||allDisabled"
/> />
</el-form-item> </el-form-item>
</div> </div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否封闭" label-width="130px"> <el-form-item label="是否封闭" label-width="130px">
<el-select v-model="form.isClosure" clearable placeholder="请选择"> <el-select v-model="form.isClosure" clearable :disabled="allDisabled" placeholder="请选择">
<el-option label="是" :value="true" /> <el-option label="是" :value="true" />
<el-option label="否" :value="false" /> <el-option label="否" :value="false" />
</el-select> </el-select>
...@@ -210,17 +214,17 @@ ...@@ -210,17 +214,17 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="不合格品审理单号" label-width="130px"> <el-form-item label="不合格品审理单号" label-width="130px">
<el-input v-model="form.noPassReviewNo" clearable placeholder="请输入不合格品审理单号" /> <el-input v-model="form.noPassReviewNo" :disabled="allDisabled" clearable placeholder="请输入不合格品审理单号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="超期复验报告" label-width="130px"> <el-form-item label="超期复验报告" label-width="130px">
<el-input v-model="form.overdueReport" clearable placeholder="请输入超期复验报告编号" /> <el-input v-model="form.overdueReport" :disabled="allDisabled" clearable placeholder="请输入超期复验报告编号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label=" 结论" label-width="130px"> <el-form-item label=" 结论" label-width="130px">
<el-input v-model="form.conclusion" placeholder="请输入复验报告结论" /> <el-input v-model="form.conclusion" :disabled="allDisabled" placeholder="请输入复验报告结论" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -228,6 +232,7 @@ ...@@ -228,6 +232,7 @@
<el-date-picker <el-date-picker
v-model="form.delayTo" v-model="form.delayTo"
clearable clearable
:disabled="allDisabled"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
...@@ -238,25 +243,25 @@ ...@@ -238,25 +243,25 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="尺寸检验项目" label-width="130px"> <el-form-item label="尺寸检验项目" label-width="130px">
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[0].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[0].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[1].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[1].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[2].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[2].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[3].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[3].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[4].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[4].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[5].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[5].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-input v-model="jobTestCheckItems[6].itemDescription" clearable type="text" placeholder="录入" /> <el-input v-model="jobTestCheckItems[6].itemDescription" :disabled="allDisabled" clearable type="text" placeholder="录入" />
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="要求尺寸" label-width="130px"> <el-form-item label="要求尺寸" label-width="130px">
...@@ -265,6 +270,7 @@ ...@@ -265,6 +270,7 @@
v-model="jobTestCheckItems[0].jobTestCheckItemDetails[0].checkvalue" v-model="jobTestCheckItems[0].jobTestCheckItemDetails[0].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -273,6 +279,7 @@ ...@@ -273,6 +279,7 @@
v-model="jobTestCheckItems[1].jobTestCheckItemDetails[0].checkvalue" v-model="jobTestCheckItems[1].jobTestCheckItemDetails[0].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -281,6 +288,7 @@ ...@@ -281,6 +288,7 @@
v-model="jobTestCheckItems[2].jobTestCheckItemDetails[0].checkvalue" v-model="jobTestCheckItems[2].jobTestCheckItemDetails[0].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -289,6 +297,7 @@ ...@@ -289,6 +297,7 @@
v-model="jobTestCheckItems[3].jobTestCheckItemDetails[0].checkvalue" v-model="jobTestCheckItems[3].jobTestCheckItemDetails[0].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -297,6 +306,7 @@ ...@@ -297,6 +306,7 @@
v-model="jobTestCheckItems[4].jobTestCheckItemDetails[0].checkvalue" v-model="jobTestCheckItems[4].jobTestCheckItemDetails[0].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -305,6 +315,7 @@ ...@@ -305,6 +315,7 @@
v-model="jobTestCheckItems[5].jobTestCheckItemDetails[0].checkvalue" v-model="jobTestCheckItems[5].jobTestCheckItemDetails[0].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -314,6 +325,7 @@ ...@@ -314,6 +325,7 @@
clearable clearable
type="text" type="text"
placeholder="录入" placeholder="录入"
:disabled="allDisabled"
/> />
</el-col> </el-col>
</el-form-item> </el-form-item>
...@@ -323,6 +335,7 @@ ...@@ -323,6 +335,7 @@
v-model="jobTestCheckItems[0].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[0].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -331,6 +344,7 @@ ...@@ -331,6 +344,7 @@
v-model="jobTestCheckItems[1].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[1].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -338,6 +352,7 @@ ...@@ -338,6 +352,7 @@
<el-input <el-input
v-model="jobTestCheckItems[2].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[2].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -346,6 +361,7 @@ ...@@ -346,6 +361,7 @@
<el-input <el-input
v-model="jobTestCheckItems[3].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[3].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -354,6 +370,7 @@ ...@@ -354,6 +370,7 @@
<el-input <el-input
v-model="jobTestCheckItems[4].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[4].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -362,6 +379,7 @@ ...@@ -362,6 +379,7 @@
<el-input <el-input
v-model="jobTestCheckItems[5].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[5].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -371,6 +389,7 @@ ...@@ -371,6 +389,7 @@
v-model="jobTestCheckItems[6].jobTestCheckItemDetails[1].checkvalue" v-model="jobTestCheckItems[6].jobTestCheckItemDetails[1].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -381,6 +400,7 @@ ...@@ -381,6 +400,7 @@
v-model="jobTestCheckItems[0].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[0].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
type="text" type="text"
:disabled="allDisabled"
placeholder="录入" placeholder="录入"
/> />
</el-col> </el-col>
...@@ -388,6 +408,7 @@ ...@@ -388,6 +408,7 @@
<el-input <el-input
v-model="jobTestCheckItems[1].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[1].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -396,6 +417,7 @@ ...@@ -396,6 +417,7 @@
<el-input <el-input
v-model="jobTestCheckItems[2].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[2].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -404,6 +426,7 @@ ...@@ -404,6 +426,7 @@
<el-input <el-input
v-model="jobTestCheckItems[3].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[3].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -412,6 +435,7 @@ ...@@ -412,6 +435,7 @@
<el-input <el-input
v-model="jobTestCheckItems[4].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[4].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -420,6 +444,7 @@ ...@@ -420,6 +444,7 @@
<el-input <el-input
v-model="jobTestCheckItems[5].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[5].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -428,6 +453,7 @@ ...@@ -428,6 +453,7 @@
<el-input <el-input
v-model="jobTestCheckItems[6].jobTestCheckItemDetails[2].checkvalue" v-model="jobTestCheckItems[6].jobTestCheckItemDetails[2].checkvalue"
clearable clearable
:disabled="allDisabled"
type="text" type="text"
placeholder="录入" placeholder="录入"
/> />
...@@ -441,6 +467,7 @@ ...@@ -441,6 +467,7 @@
type="textarea" type="textarea"
resize="none" resize="none"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10 }" :autosize="{ minRows: 9, maxRows: 10 }"
placeholder="入场验收问题描述" placeholder="入场验收问题描述"
/> />
...@@ -453,6 +480,7 @@ ...@@ -453,6 +480,7 @@
v-model="form.relevantOpinions" v-model="form.relevantOpinions"
type="textarea" type="textarea"
clearable clearable
:disabled="allDisabled"
resize="none" resize="none"
:autosize="{ minRows: 9, maxRows: 10 }" :autosize="{ minRows: 9, maxRows: 10 }"
placeholder="相关单位意见" placeholder="相关单位意见"
...@@ -461,12 +489,12 @@ ...@@ -461,12 +489,12 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="检验备注" label-width="130px"> <el-form-item label="检验备注" label-width="130px">
<el-input v-model="form.checkRemark" clearable type="textarea" placeholder="检验备注" resize="none" /> <el-input v-model="form.checkRemark" :disabled="allDisabled" clearable type="textarea" placeholder="检验备注" resize="none" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label-width="130px"> <el-form-item label-width="130px">
<upload-files v-model="form.objFileLinks" /> <upload-files v-model="form.objFileLinks" :all-disabled="allDisabled" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -498,7 +526,9 @@ export default { ...@@ -498,7 +526,9 @@ export default {
callback() callback()
} }
} }
const that = this
return { return {
allDisabled: that.basicData.allDisabled,
// pRowData: '', // pRowData: '',
loading: false, loading: false,
// 验收单编号 // 验收单编号
...@@ -729,10 +759,16 @@ export default { ...@@ -729,10 +759,16 @@ export default {
sampleAmount: [{ type: 'number', message: '抽样数必须为数字值' }], sampleAmount: [{ type: 'number', message: '抽样数必须为数字值' }],
noPassAmount: [{ validator: checkAge, trigger: ['blur', 'change'] }] noPassAmount: [{ validator: checkAge, trigger: ['blur', 'change'] }]
}, },
tools: [ chemicalDisplay: false
}
},
computed: {
tools() {
const allTools = [
{ {
name: '保存', name: '保存',
icon: '/icons/components/new/add.png', icon: '/icons/components/new/add.png',
show: !this.allDisabled,
handler: { handler: {
click: () => { click: () => {
this.onSubmit() this.onSubmit()
...@@ -742,17 +778,17 @@ export default { ...@@ -742,17 +778,17 @@ export default {
{ {
name: '下载', name: '下载',
icon: '/icons/components/new/addAffectedData.png', icon: '/icons/components/new/addAffectedData.png',
show: true,
handler: { handler: {
click: () => { click: () => {
this.savePDF() this.savePDF()
} }
} }
} }
], ]
chemicalDisplay: false return allTools.filter(el => el.show)
} }
}, },
computed: {},
watch: { watch: {
'form.isPass': { 'form.isPass': {
handler: function(v) { handler: function(v) {
......
...@@ -10,34 +10,34 @@ ...@@ -10,34 +10,34 @@
<el-form ref="form" :model="form" class="checkNo-container" :rules="formRules"> <el-form ref="form" :model="form" class="checkNo-container" :rules="formRules">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="验收单号" label-width="100px" prop="testNo"> <el-form-item label="验收单号" label-width="100px" prop="testNo">
<el-input v-model="form.testNo" placeholder="请输入验收单号" :disabled="subTypeNameDisabled" clearable onchange="this.value=this.value.toUpperCase()" /> <el-input v-model="form.testNo" placeholder="请输入验收单号" :disabled="subTypeNameDisabled||allDisabled" clearable onchange="this.value=this.value.toUpperCase()" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label=" 保质期/贮存期" label-width="100px"> <el-form-item label=" 保质期/贮存期" label-width="120px">
<el-date-picker v-model="form.qualityPeriod" clearable type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" /> <el-date-picker v-model="form.qualityPeriod" clearable :disabled="allDisabled" type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label=" 保证期" label-width="100px"> <el-form-item label=" 保证期" label-width="100px">
<el-input v-model="form.guaranteePeriod" clearable placeholder="请输入保证期" style="width: 100%;" /> <el-input v-model="form.guaranteePeriod" :disabled="allDisabled" clearable placeholder="请输入保证期" style="width: 100%;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检验依据" label-width="100px"> <el-form-item label="检验依据" label-width="100px">
<el-input v-model="form.checkBill" clearable placeholder="检验依据" /> <el-input v-model="form.checkBill" clearable :disabled="allDisabled" placeholder="检验依据" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="重量" label-width="100px"> <el-form-item label="重量" label-width="100px">
<el-input v-model="form.weight" type="number" placeholder="请输入重量" clearable onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');" onafterpaste="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');"> <el-input v-model="form.weight" type="number" :disabled="allDisabled" placeholder="请输入重量" clearable onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');" onafterpaste="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');">
<template slot="append">Kg</template> <template slot="append">Kg</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="质量证明文件" label-width="100px"> <el-form-item label="质量证明文件" label-width="100px">
<el-select v-model="form.qualityCert" clearable placeholder="请选择"> <el-select v-model="form.qualityCert" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="散件检查" label-width="100px"> <el-form-item label="散件检查" label-width="100px">
<el-select v-model="form.bulkCheck" clearable placeholder="请选择"> <el-select v-model="form.bulkCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
<el-option label="不适用/无" value="W" /> <el-option label="不适用/无" value="W" />
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="标识检查" label-width="100px"> <el-form-item label="标识检查" label-width="100px">
<el-select v-model="form.flagCheck" clearable placeholder="请选择"> <el-select v-model="form.flagCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否关键件" label-width="100px"> <el-form-item label="是否关键件" label-width="100px">
<el-select v-model="form.isKeyPart" clearable placeholder="请选择"> <el-select v-model="form.isKeyPart" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="是" :value="true" /> <el-option label="是" :value="true" />
<el-option label="否" :value="false" /> <el-option label="否" :value="false" />
</el-select> </el-select>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="外观质量检查" label-width="100px"> <el-form-item label="外观质量检查" label-width="100px">
<el-select v-model="form.performCheck" clearable placeholder="请选择"> <el-select v-model="form.performCheck" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="接收检验AO" label-width="100px"> <el-form-item label="接收检验AO" label-width="100px">
<el-input v-model="form.ao" clearable placeholder="请输入接收检验AO" /> <el-input v-model="form.ao" :disabled="allDisabled" clearable placeholder="请输入接收检验AO" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="处理方式" label-width="100px"> <el-form-item label="处理方式" label-width="100px">
<el-select v-model="form.disposeType" clearable placeholder="请选择"> <el-select v-model="form.disposeType" :disabled="allDisabled" clearable placeholder="请选择">
<el-option label="原样使用" value="OriginalSampleTest" /> <el-option label="原样使用" value="OriginalSampleTest" />
<el-option label="报废" value="Scrap" /> <el-option label="报废" value="Scrap" />
<el-option label="返修" value="Rework" /> <el-option label="返修" value="Rework" />
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否合格" prop="isPass" label-width="100px"> <el-form-item label="是否合格" prop="isPass" label-width="100px">
<el-select v-model="form.isPass" clearable placeholder="请选择"> <el-select v-model="form.isPass" clearable :disabled="allDisabled" placeholder="请选择">
<el-option label="合格" value="Y" /> <el-option label="合格" value="Y" />
<el-option label="不合格" value="N" /> <el-option label="不合格" value="N" />
</el-select> </el-select>
...@@ -108,30 +108,31 @@ ...@@ -108,30 +108,31 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass!=='N'" :disabled="form.isPass!=='N'||allDisabled"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="是否封闭" label-width="100px"> <el-form-item label="是否封闭" label-width="100px">
<el-select v-model="form.isClosure" clearable placeholder="请选择"> <el-select v-model="form.isClosure" clearable :disabled="allDisabled" placeholder="请选择">
<el-option label="是" :value="true" /> <el-option label="是" :value="true" />
<el-option label="否" :value="false" /> <el-option label="否" :value="false" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="不合格品审理单号" label-width="120px"> <el-form-item label="不合格品审理单号" label-width="130px">
<el-input v-model="form.noPassReviewNo" clearable placeholder="请输入不合格品审理单号" /> <el-input v-model="form.noPassReviewNo" :disabled="allDisabled" clearable placeholder="请输入不合格品审理单号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="入场验收问题描述" label-width="120px"> <el-form-item label="入场验收问题描述" label-width="130px">
<el-input <el-input
v-model="form.acceptanceProblem" v-model="form.acceptanceProblem"
type="textarea" type="textarea"
resize="none" resize="none"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10}" :autosize="{ minRows: 9, maxRows: 10}"
placeholder="入场验收问题描述" placeholder="入场验收问题描述"
/> />
...@@ -144,6 +145,7 @@ ...@@ -144,6 +145,7 @@
type="textarea" type="textarea"
resize="none" resize="none"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10}" :autosize="{ minRows: 9, maxRows: 10}"
placeholder="相关单位意见" placeholder="相关单位意见"
/> />
...@@ -155,6 +157,7 @@ ...@@ -155,6 +157,7 @@
v-model="form.checkRemark" v-model="form.checkRemark"
type="textarea" type="textarea"
clearable clearable
:disabled="allDisabled"
:autosize="{ minRows: 3.6, maxRows: 7 }" :autosize="{ minRows: 3.6, maxRows: 7 }"
placeholder="检验备注:" placeholder="检验备注:"
resize="none" resize="none"
...@@ -163,7 +166,7 @@ ...@@ -163,7 +166,7 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item> <el-form-item>
<upload-files v-model="form.objFileLinks" /> <upload-files v-model="form.objFileLinks" :all-disabled="allDisabled" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -192,7 +195,9 @@ export default { ...@@ -192,7 +195,9 @@ export default {
// callback() // callback()
// } // }
// } // }
const that = this
return { return {
allDisabled: that.basicData.allDisabled,
disabled: false, disabled: false,
// 验收单号是否禁用 // 验收单号是否禁用
subTypeNameDisabled: false, subTypeNameDisabled: false,
...@@ -248,11 +253,16 @@ export default { ...@@ -248,11 +253,16 @@ export default {
{ validator: 1, trigger: ['blur', 'change'] } { validator: 1, trigger: ['blur', 'change'] }
] ]
}, },
uploadVisble: false, uploadVisble: false
tools: [ }
},
computed: {
tools() {
const allTools = [
{ {
name: '保存', name: '保存',
icon: '/icons/components/new/add.png', icon: '/icons/components/new/add.png',
show: !this.allDisabled,
handler: { handler: {
click: () => { click: () => {
this.onSubmit() this.onSubmit()
...@@ -262,6 +272,7 @@ export default { ...@@ -262,6 +272,7 @@ export default {
{ {
name: '下载', name: '下载',
icon: '/icons/components/new/addAffectedData.png', icon: '/icons/components/new/addAffectedData.png',
show: true,
handler: { handler: {
click: () => { click: () => {
this.savePDF() this.savePDF()
...@@ -269,9 +280,9 @@ export default { ...@@ -269,9 +280,9 @@ export default {
} }
} }
] ]
return allTools.filter(el => el.show)
} }
}, },
computed: {},
watch: { watch: {
'form.isPass': { 'form.isPass': {
handler: function(v) { handler: function(v) {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
<template> <template>
<div class="jobResponseInTest-process"> <div class="jobResponseInTest-process">
<div class="sub-title" style="padding-bottom: 12px;"> <div v-if="!allDisabled" class="sub-title" style="padding-bottom: 12px;">
物料检验详情 物料检验详情
</div> </div>
<equipmen-check-no v-if="type==='AirEquipment'" ref="AirEquipment" :basic-data="basicData" :job-response-in-test-data="data" /> <equipmen-check-no v-if="type==='AirEquipment'" ref="AirEquipment" :basic-data="basicData" :job-response-in-test-data="data" />
...@@ -31,11 +31,13 @@ export default { ...@@ -31,11 +31,13 @@ export default {
} }
}, },
data() { data() {
const that = this
return { return {
type: '', type: '',
data: null, data: null,
basicDataId: null, basicDataId: null,
inventoryReqId: null inventoryReqId: null,
allDisabled: that.basicData.allDisabled
} }
}, },
computed: {}, computed: {},
......
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