9 changed files with 809 additions and 186 deletions
@ -0,0 +1,77 @@ |
|||
import request from '@/utils/request' |
|||
// 入库导入的记录
|
|||
export default { |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/listPage', |
|||
method: 'post', |
|||
data: params |
|||
}) |
|||
}, |
|||
// 保存列表
|
|||
sealrecordSave: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 提交列表
|
|||
sealrecordSubmit: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/submit', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 保存列表
|
|||
sealrecordSave: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
// 根据SID获取一条记录
|
|||
fetchDetailsBySid: function(sid) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/fetchDetailsBySid/' + sid, |
|||
method: 'get', |
|||
}) |
|||
}, |
|||
// 根据SID获取一条记录
|
|||
delBySids: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/delBySids', |
|||
method: 'post', |
|||
data: data, |
|||
}) |
|||
}, |
|||
// 根据SID获取一条记录
|
|||
complete: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/complete', |
|||
method: 'post', |
|||
data: data, |
|||
}) |
|||
}, |
|||
// 根据SID获取一条记录
|
|||
upload: function(data) { |
|||
return request({ |
|||
url: '/enterprisecentre/v1/sealrecord/upload', |
|||
method: 'post', |
|||
data: data, |
|||
}) |
|||
}, |
|||
} |
@ -0,0 +1,249 @@ |
|||
<template> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()" |
|||
>返回</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="dataForm" :model="purchaseForm" label-position="top" label-width="190px" class="formadd"> |
|||
<div class="title" style="display: flex;align-items: center;justify-content: space-between;height:40px"> |
|||
<div style="margin-left: 15px;">主体信息</div> |
|||
</div> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">项目名称:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item" prop="purchaseNo"> |
|||
<span>{{purchaseForm.project_name}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请日期:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.applicant_date}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">审批编号:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item prop="supplier" class="trightb_item"> |
|||
<span>{{purchaseForm.code}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">申请人:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.applicant_name}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
|
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用印人:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.user_name}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用印事由:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.use_reason}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">使用日期:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.use_date}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用印文件名称:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.use_file_name}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">用印文件(附件):</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.file_path}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
|
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">加盖何种公章:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.seal_type}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="trightb"> |
|||
<el-form-item class="trightb_item"> |
|||
<span slot="label">备注:</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-form-item class="trightb_item"> |
|||
<span>{{purchaseForm.remarks}}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/Yjsq/index' |
|||
export default { |
|||
data() { |
|||
return { |
|||
viewTitle: "印鉴详细信息", |
|||
purchaseForm: {}, |
|||
activeNames: ['1'], |
|||
storehouseList:[] |
|||
} |
|||
}, |
|||
mounted() { |
|||
}, |
|||
created() {}, |
|||
methods: { |
|||
handleReturn() { |
|||
this.$emit("reloadlist"); |
|||
this.$emit("doback"); |
|||
}, |
|||
showInfo(row) { |
|||
req.fetchDetailsBySid(row).then((res)=>{ |
|||
if(res.code==200){ |
|||
this.purchaseForm=res.data |
|||
} |
|||
}).catch(() => { |
|||
|
|||
}) |
|||
|
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-collapse-item__header { |
|||
height: 40px; |
|||
font-weight: bold; |
|||
font-size: 16px; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
background-color: #0294d7; |
|||
} |
|||
|
|||
/deep/ .el-collapse-item__content { |
|||
padding-bottom: 0; |
|||
} |
|||
.trightb { |
|||
display: flex; |
|||
align-items: center; |
|||
text-align: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.trightb_item { |
|||
padding-top: 5px; |
|||
} |
|||
|
|||
.span { |
|||
margin-left: 50px; |
|||
font-size: 15px; |
|||
font-weight: 400; |
|||
} |
|||
.formadd { |
|||
padding: 10px 40px 0 40px; |
|||
font-size: 16px; |
|||
} |
|||
.formadd .title { |
|||
font-weight: bold; |
|||
font-size: 16px; |
|||
background-color: #0294d7; |
|||
text-align: left; |
|||
color: #ffffff; |
|||
} |
|||
.first_row{ |
|||
border-top: 1px solid #e0e3eb; |
|||
} |
|||
.formadd .el-row { |
|||
display: flex; |
|||
flex-wrap: wrap; |
|||
border-left: 1px solid #e0e3eb; |
|||
} |
|||
.formadd .el-row .el-col { |
|||
border-right: 1px solid #e0e3eb; |
|||
border-bottom: 1px solid #e0e3eb; |
|||
padding: 0 15px; |
|||
min-height: 42px; |
|||
line-height: 1; |
|||
} |
|||
.formadd .el-row .el-col .el-form-item { |
|||
margin-bottom: 0; |
|||
line-height: 42px; |
|||
} |
|||
.addinputw { |
|||
width: 80%; |
|||
line-height: 42px; |
|||
} |
|||
.el-input__inner { |
|||
height: 36px; |
|||
} |
|||
</style> |
@ -0,0 +1,233 @@ |
|||
<template> |
|||
<div> |
|||
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" |
|||
:accept="accept" list-type="picture-card" :file-list="files" :on-remove="removeImage" |
|||
:on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" |
|||
:on-error="uploadError" :on-success="uploadImgSuccess_FuJian"> |
|||
<i class="el-icon-plus avatar-uploader-icon" /> |
|||
</el-upload> |
|||
<el-dialog :visible.sync="dialogVisible" title="查看图片"> |
|||
<img width="100%" :src="dialogImageUrl" alt=""> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
model: { |
|||
prop: 'name', |
|||
event: 'change' |
|||
}, |
|||
props: { |
|||
placeholder: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
bucket: { |
|||
type: String, |
|||
default: 'abc' |
|||
}, |
|||
// 长度 |
|||
width: { |
|||
type: String, |
|||
default: '270px' |
|||
}, |
|||
// limit: { |
|||
// type: Number, |
|||
// default: '' |
|||
// }, |
|||
accept: { |
|||
type: String, |
|||
default: '.jpg,.jpeg,.png,.JPG,.JPEG,' |
|||
}, |
|||
// 文件名称 |
|||
name: { |
|||
type: Array, |
|||
required: true |
|||
}, |
|||
uploadData: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
MinetList: { |
|||
type: Array, |
|||
default: function () { |
|||
return [] |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogImageUrl: '', |
|||
dialogVisible: false, |
|||
accessToken: null, |
|||
fileList_FuJian: [], |
|||
enclosure: '', |
|||
file_add: '', |
|||
file_catch: '', |
|||
files: [], |
|||
files_list: [], |
|||
filedUrl: '', |
|||
isview: false, |
|||
nameArr: '', |
|||
loadding: false, |
|||
uploadFile: |
|||
"http://supervise.yxtsoft.com/enterprisecentre/v1/sealrecord/upload", |
|||
} |
|||
}, |
|||
watch: { |
|||
name: { |
|||
deep: true, |
|||
immediate: true, |
|||
handler(newVal, oldVal) { |
|||
this.files = newVal |
|||
} |
|||
}, |
|||
MinetList: { |
|||
deep: true, |
|||
immediate: true, |
|||
handler(newVal, oldVal) { |
|||
let copy = newVal.slice(); |
|||
console.log(copy); |
|||
if (copy !== undefined) { |
|||
// this.files = [] |
|||
for (var i = 0; i < copy.length; i++) { |
|||
this.files.push({ |
|||
url: copy[i] |
|||
}) |
|||
|
|||
} |
|||
} |
|||
} |
|||
}, |
|||
}, |
|||
mounted() { |
|||
// this.Init() |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
showImg(imgList) { |
|||
this.files = imgList |
|||
}, |
|||
view() { |
|||
// window.open(this.filedUrl) |
|||
}, |
|||
// 页面第一次加载 |
|||
Init() { |
|||
|
|||
}, |
|||
handlePictureCardPreview(file) { |
|||
this.dialogVisible = true |
|||
this.dialogImageUrl = file.url |
|||
}, |
|||
// 上传方案--成功后执行 |
|||
uploadImgSuccess_FuJian(response, file, fileList) { |
|||
console.log('您选择的file:', file) |
|||
if (file.response.code === '200') { |
|||
this.loadding = false |
|||
// 返显图片 |
|||
this.filedUrl = file.response.data |
|||
// var uid = file.response.data |
|||
|
|||
this.files.push({ |
|||
url: file.response.data, |
|||
name: file.name, |
|||
size: file.size, |
|||
// sid: file.response.data.sid |
|||
}) |
|||
console.log( this.files); |
|||
this.$emit('change', this.files) |
|||
this.$emit('eett', this.files) |
|||
} |
|||
}, |
|||
|
|||
removeImage(file, ImageFileList) { |
|||
this.files.splice(this.files.indexOf(file), 1) |
|||
const imgFiles = [] |
|||
this.files.forEach((o) => { |
|||
imgFiles.push(o.url) |
|||
}) |
|||
this.$emit('fileChange', this.files) |
|||
console.log(this.files); |
|||
}, |
|||
handleRemove(file, fileList) { |
|||
console.log('file:' + JSON.stringify(file)) |
|||
console.log('fileList:' + JSON.stringify(fileList)) |
|||
this.enclosure = '' |
|||
// 1. 保存新增文件id(this.file_add) |
|||
this.getNewFileId(fileList) |
|||
// 2. 保存数据库读取的已有文件id(this.file_catch) |
|||
this.getCatchFileId(file) |
|||
// 3. 保存并拼接id |
|||
this.getFileId() |
|||
// 4. 返回拼接id |
|||
this.$emit('change', this.enclosure) |
|||
}, |
|||
// 返回this.file_add(新上传文件的id拼接集合) |
|||
getNewFileId(fileList) { |
|||
// debugger |
|||
this.file_add = '' |
|||
for (var i = 0; i < fileList.length; i++) { |
|||
if (fileList[i].response && fileList[i].response.code === '200') { |
|||
this.file_add = this.file_add + fileList[i].response.data + ',' |
|||
} |
|||
} |
|||
if (this.file_add !== '') { |
|||
this.file_add = this.file_add.substring(0, this.file_add.length - 1) |
|||
} |
|||
// console.log('1. this.file_add: ' + this.file_add) |
|||
}, |
|||
// 返回this.file_catch(数库一寸照的文件的id的拼接集合) |
|||
getCatchFileId(file) { |
|||
for (var i = 0; i < this.files_list.length; i++) { |
|||
if (this.file_catch !== '') { |
|||
// 1. 检查当前删除的文件是否是修改文件列表里面的,如果是,将修改列表里去除此id |
|||
if (this.files_list[i].name === file.name) { |
|||
// 2. 拆开file_catch到fils_arry |
|||
var fils_arry = this.file_catch.split(',') |
|||
// 3. 从fils_arry去除 this.files_list[i].id |
|||
var arry = [] |
|||
fils_arry.forEach((element) => { |
|||
// 不加载文件里面的 |
|||
if (element !== this.files_list[i].id) { |
|||
arry.push(element) |
|||
} |
|||
}) |
|||
// 4. 重新拼接成file_catch |
|||
this.file_catch = arry.join(',') |
|||
} |
|||
} |
|||
} |
|||
// console.log('2. this.file_catch:' + this.file_catch) |
|||
}, |
|||
// 保存并拼接id |
|||
getFileId() { |
|||
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add) |
|||
if (this.file_catch !== '') { |
|||
if (this.file_add !== '') { |
|||
this.enclosure = this.file_catch + ',' + this.file_add |
|||
} else { |
|||
this.enclosure = this.file_catch |
|||
} |
|||
} else { |
|||
this.enclosure = this.file_add |
|||
} |
|||
}, |
|||
// 上传失败 |
|||
uploadError() { |
|||
this.loadding = false |
|||
}, |
|||
uploadProgrees(event, file, fileList) { |
|||
if (Number(event.percent) > 0) { |
|||
this.loadding = true |
|||
} |
|||
// console.log('event:', event) |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style scoped></style> |
|||
|
Loading…
Reference in new issue