Commit ced04935 authored by xioln's avatar xioln

入库修改

parent dfcf32df
<template> <template>
<div class="upload-files"> <div class="upload-files">
<dee-form app-name="tf-mom" label-position="top" :form="form" :form-data="formData1" /> <dee-form app-name="tf-mom" label-position="top" :form="form" :form-data="formData" />
</div> </div>
</template> </template>
<script> <script>
...@@ -11,6 +11,10 @@ export default { ...@@ -11,6 +11,10 @@ export default {
value: { value: {
type: Array, type: Array,
default: () => [] default: () => []
},
viewOrEdit: {
type: String,
default: () => 'edit'
} }
}, },
data() { data() {
...@@ -18,26 +22,7 @@ export default { ...@@ -18,26 +22,7 @@ export default {
form: { form: {
objFileLinks: [] objFileLinks: []
}, },
'formData': [ formData: [
{
'title': '',
'split': 3,
'data': [
{
'name': '上传附件',
'key': 'objFileLinks',
'parentKey': 'objFileLinks',
'component': {
'name': 'DeeUploadTable',
'url': '/dfs/fileManager/feign/uploadFile'
},
'width': 3
}
],
'labelPosition': 'right'
}
],
formData1: [
{ {
'title': '', 'title': '',
'split': 3, 'split': 3,
...@@ -51,7 +36,6 @@ export default { ...@@ -51,7 +36,6 @@ export default {
'hidden': false, 'hidden': false,
'component': { 'component': {
'name': 'DeeUploadTable', 'name': 'DeeUploadTable',
'appName': 'tf-mom',
'taleType': 'single', 'taleType': 'single',
'showFileList': true, 'showFileList': true,
'filterKey': 'contentType', 'filterKey': 'contentType',
...@@ -59,7 +43,8 @@ export default { ...@@ -59,7 +43,8 @@ export default {
'alimit': 1, 'alimit': 1,
'limit': 5, 'limit': 5,
'mrequired': true, 'mrequired': true,
'state': 'edit', // 'state': 'edit',
'state': this.viewOrEdit,
'masterTitle': '主内容', 'masterTitle': '主内容',
'appendTitle': '附件', 'appendTitle': '附件',
'masterFilter': ['MASTER_FILE', 'PRIMARY'], 'masterFilter': ['MASTER_FILE', 'PRIMARY'],
...@@ -77,13 +62,17 @@ export default { ...@@ -77,13 +62,17 @@ export default {
} }
}, },
watch: { watch: {
value: function(newForm, oldForm) {
if (newForm) {
this.$set(this.form, 'objFileLinks', newForm)
}
},
'form.objFileLinks': function(newForm, oldForm) { 'form.objFileLinks': function(newForm, oldForm) {
this.$emit('input', newForm) this.$emit('input', newForm)
} }
}, },
mounted() { mounted() {
const data = this.value // this.$set(this.form, 'objFileLinks', this.value)
this.form.objFileLinks = data
}, },
methods: { methods: {
} }
...@@ -98,7 +87,7 @@ export default { ...@@ -98,7 +87,7 @@ export default {
width: 100% !important; width: 100% !important;
.el-form-item__content { .el-form-item__content {
padding-left: 3.75rem; // padding-left: 3.75rem;
} }
} }
} }
......
...@@ -7,14 +7,16 @@ ...@@ -7,14 +7,16 @@
<template> <template>
<div class="equipmen-checkNo"> <div class="equipmen-checkNo">
<dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;margin-bottom: 12px;" /> <dee-tools :tools="tools" mode="normal" style="flex-direction: row-reverse;margin-bottom: 12px;" />
<el-form <el-form ref="form" :model="form" :rules="formRules">
ref="form"
:model="form"
:rules="formRules"
>
<el-col :span="8"> <el-col :span="8">
<el-form-item label-width="100px" label="验收单号" prop="testNo"> <el-form-item label-width="100px" label="验收单号" 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"
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">
...@@ -41,29 +43,17 @@ ...@@ -41,29 +43,17 @@
</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 <el-input v-model="form.guaranteePeriod" clearable placeholder="请输入保证期" />
v-model="form.guaranteePeriod"
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 <el-input v-model="form.firstTurnPeriod" clearable placeholder="请输入首翻期" />
v-model="form.firstTurnPeriod"
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 <el-input v-model="form.totalLife" clearable placeholder="请输入总寿命" />
v-model="form.totalLife"
clearable
placeholder="请输入总寿命"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
...@@ -74,7 +64,14 @@ ...@@ -74,7 +64,14 @@
<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.weight" placeholder="请输入重量" /> --> <!-- <el-input v-model="form.weight" placeholder="请输入重量" /> -->
<el-input v-model="form.weight" clearable type="number" placeholder="请输入重量" 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"
clearable
type="number"
placeholder="请输入重量"
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>
...@@ -126,7 +123,7 @@ ...@@ -126,7 +123,7 @@
clearable clearable
:min="0" :min="0"
placeholder="不合格数" placeholder="不合格数"
:disabled="form.isPass!=='N'" :disabled="form.isPass !== 'N'"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -347,14 +344,20 @@ export default { ...@@ -347,14 +344,20 @@ export default {
}) })
}) })
}, },
savePDF() {} savePDF() {
this.$api.apiDownloadFile(`JobResponseInTest/download/pdf?id=${this.basicData.id}&billType=AirEquipment`)
}
} }
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
.equipmen-checkNo{ .equipmen-checkNo {
.el-select{ .el-select {
width: 100%; width: 220px
} }
.el-input {
width: 220px
} }
}
</style> </style>
...@@ -316,9 +316,19 @@ export default { ...@@ -316,9 +316,19 @@ export default {
}) })
}) })
}, },
savePDF() {} savePDF() {
this.$api.apiDownloadFile(`JobResponseInTest/download/pdf?id=${this.basicData.id}&billType=OutSource`)
}
} }
} }
</script> </script>
<style lang='scss'> <style lang='scss'>
.outSource-checkNo{
.el-select {
width: 220px
}
.el-input {
width: 220px
}
}
</style> </style>
...@@ -123,6 +123,7 @@ export default { ...@@ -123,6 +123,7 @@ export default {
] ]
} }
post('JobResponseInTest/search', param).then(res => { post('JobResponseInTest/search', param).then(res => {
console.log('data', res)
const data = res.items.content[0] const data = res.items.content[0]
this.data = data this.data = data
this.type = type this.type = type
......
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