Commit 3670cd3c authored by zhengke's avatar zhengke

修改

parent 23637475
...@@ -484,12 +484,10 @@ ...@@ -484,12 +484,10 @@
<style> <style>
.Inventory_more{ .Inventory_more{
display: inline-block; float:left;
width: 10px; width: 10px;
height: 50px; height: 50px;
line-height: 50px; line-height: 50px;
position: relative;
top: -25px;
} }
.InventoryDetail .dateList .el-date-editor .el-range__icon { .InventoryDetail .dateList .el-date-editor .el-range__icon {
line-height: 24px; line-height: 24px;
...@@ -551,7 +549,7 @@ ...@@ -551,7 +549,7 @@
.Inven_imgList { .Inven_imgList {
width: 50px; width: 50px;
height: 50px; height: 50px;
display: inline-block; float:left;
margin-right: 5px; margin-right: 5px;
} }
......
...@@ -101,16 +101,25 @@ ...@@ -101,16 +101,25 @@
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="CheckEmpName" title="盘点人/时间"> <vxe-table-column field="CheckEmpName" title="盘点人/时间">
<template v-slot="{ row }"> <template v-slot="{ row }">
<p v-if="row.CheckEmpName!=''">{{row.CheckEmpName}}</p> <div v-if="row.CheckEmpName!=''">{{row.CheckEmpName}}</div>
<p v-if="row.CheckDate!=''">{{row.CheckDate}}</p> <div v-if="row.CheckDate!=''">{{row.CheckDate}}</div>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="UpdateBy" title="操作人/时间"> <vxe-table-column field="UpdateBy" title="操作人/时间">
<template v-slot="{ row }"> <template v-slot="{ row }">
<p v-if="row.UpdateBy!=''">{{row.UpdateBy}}</p> <div v-if="row.UpdateBy!=''">{{row.UpdateBy}}</div>
<p v-if="row.UpdateDate!=''">{{row.UpdateDate}}</p> <div v-if="row.UpdateDate!=''">{{row.UpdateDate}}</div>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="ImageList" title="图片" width="210">
<template v-slot="{row}">
<div class="Inven_imgList" v-for="(item,index) in row.ImageList" :key="index" v-if="index<3">
<img :src="item" @click="getImgView(row.ImageList)" />
</div>
<div v-if="row.ImageList.length>3" class="Inventory_more">...</div>
</template>
</vxe-table-column>
<vxe-table-column field="address" title="操作"> <vxe-table-column field="address" title="操作">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-tooltip class="item" effect="dark" content="盘点" placement="top" > <el-tooltip class="item" effect="dark" content="盘点" placement="top" >
...@@ -119,6 +128,12 @@ ...@@ -119,6 +128,12 @@
<el-tooltip class="item" effect="dark" content="盘亏" placement="top" > <el-tooltip class="item" effect="dark" content="盘亏" placement="top" >
<img v-if="row.CheckStatus==1" @click="SetType(row,2,'盘亏')" style="width:24px;height:24px" src="../../assets/img/czrz.png" alt="" /> <img v-if="row.CheckStatus==1" @click="SetType(row,2,'盘亏')" style="width:24px;height:24px" src="../../assets/img/czrz.png" alt="" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item" style="display:inline-block;position:relative;top:-2px;" effect="dark" content="上传图片" placement="top" >
<el-upload :http-request="uploadFileBtn" :multiple="false" :show-file-list="false" action>
<img style="width:24px;height:20px" @click="getRow(row)" src="../../assets/img/pic.png" alt="" />
</el-upload>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="盘点并审核" placement="top" > <el-tooltip class="item" effect="dark" content="盘点并审核" placement="top" >
<img v-if="row.CheckStatus==1 && row.AuditStatus==1" @click="SetType(row,3,'盘点并审核')" style="width:24px;height:24px" src="../../assets/img/pdsh.png" alt="" /> <img v-if="row.CheckStatus==1 && row.AuditStatus==1" @click="SetType(row,3,'盘点并审核')" style="width:24px;height:24px" src="../../assets/img/pdsh.png" alt="" />
</el-tooltip> </el-tooltip>
...@@ -186,6 +201,14 @@ ...@@ -186,6 +201,14 @@
<el-dialog top="0" title="资产详情" :visible.sync="CheckDetailState" width="1150px"> <el-dialog top="0" title="资产详情" :visible.sync="CheckDetailState" width="1150px">
<CheckDetails ref="mychild"></CheckDetails> <CheckDetails ref="mychild"></CheckDetails>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="isShowImageDialog" @closed="clearImg">
<el-carousel indicator-position="outside" height="600px">
<el-carousel-item v-for="(src,index) in InvimageList" :key="index">
<img :src="src" style="max-width: 100%;max-height: 100%;display: block; margin: 0 auto;" />
</el-carousel-item>
</el-carousel>
</el-dialog>
</div> </div>
</template> </template>
...@@ -200,6 +223,9 @@ export default { ...@@ -200,6 +223,9 @@ export default {
}, },
data() { data() {
return { return {
isShowImageDialog:false,
//预览图
InvimageList:[],
CheckDetailState: false, CheckDetailState: false,
addMsg: { addMsg: {
CheckDetailId: 0, CheckDetailId: 0,
...@@ -253,6 +279,12 @@ export default { ...@@ -253,6 +279,12 @@ export default {
BranchList: [], BranchList: [],
PropertyId:'', PropertyId:'',
checkList:[], checkList:[],
//上传图片msg
imgMsg:{
CheckDetailId:0,
ImageList:[]
},
commonId:0
}; };
}, },
created(){ created(){
...@@ -267,6 +299,10 @@ export default { ...@@ -267,6 +299,10 @@ export default {
this.getCheckStatus(); this.getCheckStatus();
}, },
methods: { methods: {
//关闭预览图片
clearImg() {
this.InvimageList = null
},
SetEnd(item){ SetEnd(item){
let that=this; let that=this;
let msg={}; let msg={};
...@@ -462,15 +498,84 @@ export default { ...@@ -462,15 +498,84 @@ export default {
}, },
null null
); );
},
uploadFileBtn(file) {
//上传
if (file.file.size > 1024 * 1024 * 10) {
this.$message.warning("文件大小不能超过10M!");
return;
} }
// 1 文档 2 数据 3 图片
let typeArr = [{
stringArr: "GIF|JPG|JPEG|PNG|BMP",
type: 3
}];
let ft = file.file.name
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase();
let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach(x => {
if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type;
typeOk = true;
}
});
if (!typeOk) return this.$message.error("请上传图片!");
let newArr = [];
newArr.push(file.file);
let path = "/Upload/Temporary";
this.$message.info("上传中...");
this.UploadSelfFileT(path, newArr, x => {
let fileSize =
file.file.size < 1024 ?
file.file.size :
(file.file.size / 1024).toFixed(0);
this.tableData.forEach(y => {
if (y.Id == this.commonId) {
y.ImageList.push(
this.domainManager().ViittoFileUrl + x.data.FilePath
)
this.saveImg(y.Id,y.ImageList)
}
})
this.saveRemark();
});
},
//上传图片
getRow(row){
this.commonId = row.Id;
},
//保存图片
saveImg(Id,ImageList){
let msg={
CheckDetailId:Id,
ImageList:ImageList
}
this.apiJavaPost("/api/property/SetPropertyCheckImage",msg,
res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
},
null
);
},
//点击图片进行预览
getImgView(imglist){
this.isShowImageDialog=true;
this.InvimageList=imglist;
}
} }
}; };
</script> </script>
<style> <style>
.InventoryMan .MyEditForm .dateList .el-input__inner{
/* width:300px; */
}
.InventoryMan .dateList .el-date-editor .el-range__icon{ .InventoryMan .dateList .el-date-editor .el-range__icon{
line-height: 24px; line-height: 24px;
...@@ -514,4 +619,22 @@ export default { ...@@ -514,4 +619,22 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.Inven_imgList {
width: 50px;
height: 50px;
float:left;
margin-right: 5px;
}
.Inven_imgList img {
width: 100%;
height: 100%;
}
.Inventory_more{
float:left;
width: 10px;
height: 50px;
line-height: 50px;
}
</style> </style>
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