Browse Source

优化归档页面

master
李磊 3 years ago
parent
commit
56875b5fe8
  1. 46
      src/views/archive/archive_info.vue
  2. 7
      src/views/archive/archive_scan.vue
  3. 9
      src/views/archive/list.vue

46
src/views/archive/archive_info.vue

@ -1,42 +1,46 @@
<template> <template>
<el-dialog :visible.sync="dialog" append-to-body title="归档详情" width="50%"> <el-dialog :visible.sync="dialog" append-to-body title="归档详情" width="50%">
<el-form :model="archive" size="small" label-width="100px"> <el-form :model="archive" size="small" label-width="100px">
<el-form-item label="归档单号" prop="archiveNum"> <el-row :gutter="20">
<el-input v-model="archive.archiveNum" disabled style="width: 200px;" /> <el-col :span="12">
</el-form-item> <el-form-item label="归档单号" prop="archiveNum">
<el-row :gutter="16"> <el-input v-model="archive.archiveNum" disabled />
<el-col :span="8">
<el-form-item label="归档人员" prop="archiveUser">
<el-input v-model="archive.archiveUser" disabled style="width: 150px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> </el-row>
<el-form-item label="归档日期" prop="archiveDate"> <el-row :gutter="20">
<el-input v-model="archive.archiveDate" disabled style="width: 150px;" /> <el-col :span="9">
<el-form-item label="归档人员" prop="createBy">
<el-input v-model="archive.createBy" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="归档日期" prop="createTime">
<el-input v-model="archive.createTime" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="16"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="9">
<el-form-item label="归档架号" prop="frameNum"> <el-form-item label="归档架号" prop="frameNum">
<el-input v-model="archive.frameNum" disabled style="width: 150px;" /> <el-input v-model="archive.frameNum" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="9">
<el-form-item label="列" prop="columnNum"> <el-form-item label="列" prop="columnNum">
<el-input v-model="archive.columnNum" disabled style="width: 150px;" /> <el-input v-model="archive.columnNum" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="16"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="9">
<el-form-item label="归档盒号" prop="boxNum"> <el-form-item label="归档盒号" prop="boxNum">
<el-input v-model="archive.boxNum" disabled style="width: 150px;" /> <el-input v-model="archive.boxNum" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="9">
<el-form-item label="报告数量" prop="archiveCount"> <el-form-item label="报告数量" prop="archiveCount">
<el-input v-model="archive.archiveCount" disabled style="width: 150px;" /> <el-input v-model="archive.archiveCount" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -84,6 +88,8 @@ export default {
} }
}).then(data => { }).then(data => {
this.archive = data.archive this.archive = data.archive
this.archive.createBy = this.formatter.getChineseName(null, null, this.archive.createBy)
this.archive.createTime = this.formatter.dateFormat('YYYY-MM-dd', new Date(this.archive.createTime))
this.paramList = data.paramList this.paramList = data.paramList
}) })
} }

7
src/views/archive/archive_scan.vue

@ -36,7 +36,7 @@
<el-table-column align="center" label="注册代码" prop="zhucedaima" /> <el-table-column align="center" label="注册代码" prop="zhucedaima" />
<el-table-column align="center" label="使用登记证编号" prop="shiyongdengjibianhao" /> <el-table-column align="center" label="使用登记证编号" prop="shiyongdengjibianhao" />
<el-table-column align="center" label="产品编号" prop="chanpinbianhao" /> <el-table-column align="center" label="产品编号" prop="chanpinbianhao" />
<el-table-column align="center" label="操作" min-width="65"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!scope.row.archiveId" type="danger" size="small" icon="el-icon-delete" @click="removeInfo(scope.$index)" /> <el-button v-if="!scope.row.archiveId" type="danger" size="small" icon="el-icon-delete" @click="removeInfo(scope.$index)" />
</template> </template>
@ -161,11 +161,10 @@ export default {
this.api({ this.api({
url: '/archive', url: '/archive',
method: 'post', method: this.isAppend ? 'put' : 'post',
data: { data: {
archive: this.archive, archive: this.archive,
params: archiveParamList, params: archiveParamList
isAppend: this.isAppend
} }
}).then(() => { }).then(() => {
this.$message.success('添加成功。') this.$message.success('添加成功。')

9
src/views/archive/list.vue

@ -50,15 +50,15 @@
</el-form> </el-form>
</div> </div>
<el-table ref="list" :data="list" size="mini" border fit highlight-current-row stripe width="100%" @row-click="onRowClick" @selection-change="handleSelectionChange"> <el-table ref="list" :data="list" size="mini" border fit highlight-current-row stripe width="100%" @row-click="onRowClick" @selection-change="handleSelectionChange">
<el-table-column type="selection" min-width="15" /> <el-table-column align="center" type="selection" />
<el-table-column type="index" fixed="left" align="center" label="序号" min-width="30" /> <el-table-column type="index" fixed="left" align="center" label="序号" min-width="30" />
<el-table-column align="center" label="归档单号" prop="archiveNum" /> <el-table-column align="center" label="归档单号" prop="archiveNum" />
<el-table-column align="center" label="归档架号" prop="frameNum" /> <el-table-column align="center" label="归档架号" prop="frameNum" />
<el-table-column align="center" label="列" prop="columnNum" /> <el-table-column align="center" label="列" prop="columnNum" />
<el-table-column align="center" label="归档盒号" prop="boxNum" /> <el-table-column align="center" label="归档盒号" prop="boxNum" />
<el-table-column align="center" label="报告数量" prop="archiveCount" /> <el-table-column align="center" label="报告数量" prop="archiveCount" />
<el-table-column align="center" label="归档人" prop="archiveUser" /> <el-table-column :formatter="formatter.getChineseName" align="center" label="归档人" prop="createBy" />
<el-table-column align="center" label="归档日期" prop="archiveDate" min-width="40" /> <el-table-column :formatter="formatterDate" align="center" label="归档日期" prop="createTime" />
<el-table-column align="center" label="操作" min-width="50"> <el-table-column align="center" label="操作" min-width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="showAddDialog(scope.row.id)"> <el-button type="text" size="small" @click="showAddDialog(scope.row.id)">
@ -166,6 +166,9 @@ export default {
this.archiveId = id this.archiveId = id
this.$refs.archive_scan.dialog = true this.$refs.archive_scan.dialog = true
this.$refs.archive_scan.doInit() this.$refs.archive_scan.doInit()
},
formatterDate(row, column, cellValue) {
return this.formatter.dateFormat('YYYY-MM-dd', new Date(cellValue))
} }
} }
} }

Loading…
Cancel
Save