Commit bc63c865 authored by jingnan's avatar jingnan 👀

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

parent d15cfd92
......@@ -15,9 +15,14 @@ export default {
viewOrEdit: {
type: String,
default: () => 'edit'
},
allDisabled: {
type: Boolean,
required: false
}
},
data() {
const that = this
return {
form: {
objFileLinks: []
......@@ -44,6 +49,7 @@ export default {
'limit': 5,
'mrequired': true,
// 'state': 'edit',
'readOnly': that.allDisabled,
'state': this.viewOrEdit,
'masterTitle': '主内容',
'appendTitle': '附件',
......
......@@ -13,7 +13,7 @@
<el-input
v-model="form.testNo"
placeholder="请输入验收单号"
:disabled="subTypeNameDisabled"
:disabled="subTypeNameDisabled ||allDisabled"
clearable
onchange="this.value=this.value.toUpperCase()"
/>
......@@ -25,6 +25,7 @@
v-model="form.storagePeriod"
type="date"
clearable
:disabled="allDisabled"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期"
/>
......@@ -36,6 +37,7 @@
v-model="form.qualityPeriod"
clearable
type="date"
:disabled="allDisabled"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期"
/>
......@@ -43,22 +45,22 @@
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
......@@ -67,6 +69,7 @@
<el-input
v-model="form.weight"
clearable
:disabled="allDisabled"
type="number"
placeholder="请输入重量"
onkeyup="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/,'$1$2.$3');"
......@@ -78,7 +81,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -86,7 +89,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -94,7 +97,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -102,7 +105,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -110,7 +113,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -123,13 +126,13 @@
clearable
:min="0"
placeholder="不合格数"
:disabled="form.isPass !== 'N'"
:disabled="form.isPass !== 'N'||allDisabled"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<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="Scrap" />
<el-option label="返修" value="Rework" />
......@@ -141,7 +144,7 @@
</el-col>
<el-col :span="8">
<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="false" />
</el-select>
......@@ -149,7 +152,7 @@
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="24">
......@@ -159,6 +162,7 @@
type="textarea"
resize="none"
clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10 }"
placeholder="入场验收问题描述:"
/>
......@@ -171,6 +175,7 @@
type="textarea"
resize="none"
clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10 }"
placeholder="相关单位意见:"
/>
......@@ -182,6 +187,7 @@
v-model="form.checkRemark"
type="textarea"
clearable
:disabled="allDisabled"
:autosize="{ minRows: 3.6, maxRows: 7 }"
placeholder="检验备注:"
resize="none"
......@@ -190,7 +196,7 @@
</el-col>
<el-col :span="24">
<el-form-item>
<upload-files v-model="form.objFileLinks" />
<upload-files v-model="form.objFileLinks" :all-disabled="allDisabled" />
</el-form-item>
</el-col>
</el-form>
......@@ -212,6 +218,7 @@ export default {
}
},
data() {
const that = this
// var checkAge = (rule, value, callback) => {
// if (value > this.basicData.afterExperimentAmount) {
// callback(new Error(`不合格数不能大于${this.basicData.afterExperimentAmount}`))
......@@ -220,6 +227,7 @@ export default {
// }
// }
return {
allDisabled: that.basicData.allDisabled,
disabled: false,
// 验收单号是否禁用
subTypeNameDisabled: false,
......@@ -275,11 +283,16 @@ export default {
// { validator: checkAge, trigger: ['blur', 'change'] }
// ]
},
uploadVisble: false,
tools: [
uploadVisble: false
}
},
computed: {
tools() {
const allTools = [
{
name: '保存',
icon: '/icons/components/new/add.png',
show: !this.allDisabled,
handler: {
click: () => {
this.onSubmit()
......@@ -289,6 +302,7 @@ export default {
{
name: '下载',
icon: '/icons/components/new/addAffectedData.png',
show: true,
handler: {
click: () => {
this.savePDF()
......@@ -296,10 +310,9 @@ export default {
}
}
]
return allTools.filter(el => el.show)
}
},
computed: {
},
watch: {
'form.isPass': {
handler: function(v) {
......
......@@ -10,34 +10,34 @@
<el-form ref="form" :model="form" class="checkNo-container" :rules="formRules">
<el-col :span="8">
<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-col>
<el-col :span="8">
<el-form-item label=" 保质期/贮存期" label-width="100px">
<el-date-picker v-model="form.qualityPeriod" clearable type="date" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" />
<el-form-item label=" 保质期/贮存期" label-width="120px">
<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-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -45,7 +45,7 @@
</el-col>
<el-col :span="8">
<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="N" />
<el-option label="不适用/无" value="W" />
......@@ -54,7 +54,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -62,7 +62,7 @@
</el-col>
<el-col :span="8">
<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="false" />
</el-select>
......@@ -70,7 +70,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -78,12 +78,12 @@
</el-col>
<el-col :span="8">
<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-col>
<el-col :span="8">
<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="Scrap" />
<el-option label="返修" value="Rework" />
......@@ -95,7 +95,7 @@
</el-col>
<el-col :span="8">
<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="N" />
</el-select>
......@@ -108,30 +108,31 @@
clearable
:min="0"
placeholder="不合格数"
:disabled="form.isPass!=='N'"
:disabled="form.isPass!=='N'||allDisabled"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<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="false" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="不合格品审理单号" label-width="120px">
<el-input v-model="form.noPassReviewNo" clearable placeholder="请输入不合格品审理单号" />
<el-form-item label="不合格品审理单号" label-width="130px">
<el-input v-model="form.noPassReviewNo" :disabled="allDisabled" clearable placeholder="请输入不合格品审理单号" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="入场验收问题描述" label-width="120px">
<el-form-item label="入场验收问题描述" label-width="130px">
<el-input
v-model="form.acceptanceProblem"
type="textarea"
resize="none"
clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10}"
placeholder="入场验收问题描述"
/>
......@@ -144,6 +145,7 @@
type="textarea"
resize="none"
clearable
:disabled="allDisabled"
:autosize="{ minRows: 9, maxRows: 10}"
placeholder="相关单位意见"
/>
......@@ -155,6 +157,7 @@
v-model="form.checkRemark"
type="textarea"
clearable
:disabled="allDisabled"
:autosize="{ minRows: 3.6, maxRows: 7 }"
placeholder="检验备注:"
resize="none"
......@@ -163,7 +166,7 @@
</el-col>
<el-col :span="24">
<el-form-item>
<upload-files v-model="form.objFileLinks" />
<upload-files v-model="form.objFileLinks" :all-disabled="allDisabled" />
</el-form-item>
</el-col>
</el-form>
......@@ -192,7 +195,9 @@ export default {
// callback()
// }
// }
const that = this
return {
allDisabled: that.basicData.allDisabled,
disabled: false,
// 验收单号是否禁用
subTypeNameDisabled: false,
......@@ -248,11 +253,16 @@ export default {
{ validator: 1, trigger: ['blur', 'change'] }
]
},
uploadVisble: false,
tools: [
uploadVisble: false
}
},
computed: {
tools() {
const allTools = [
{
name: '保存',
icon: '/icons/components/new/add.png',
show: !this.allDisabled,
handler: {
click: () => {
this.onSubmit()
......@@ -262,6 +272,7 @@ export default {
{
name: '下载',
icon: '/icons/components/new/addAffectedData.png',
show: true,
handler: {
click: () => {
this.savePDF()
......@@ -269,9 +280,9 @@ export default {
}
}
]
return allTools.filter(el => el.show)
}
},
computed: {},
watch: {
'form.isPass': {
handler: function(v) {
......
......@@ -6,7 +6,7 @@
*/
<template>
<div class="jobResponseInTest-process">
<div class="sub-title" style="padding-bottom: 12px;">
<div v-if="!allDisabled" class="sub-title" style="padding-bottom: 12px;">
物料检验详情
</div>
<equipmen-check-no v-if="type==='AirEquipment'" ref="AirEquipment" :basic-data="basicData" :job-response-in-test-data="data" />
......@@ -31,11 +31,13 @@ export default {
}
},
data() {
const that = this
return {
type: '',
data: null,
basicDataId: null,
inventoryReqId: null
inventoryReqId: null,
allDisabled: that.basicData.allDisabled
}
},
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