冷链报告

ywj_dev
wangwei 2 years ago
parent 507394e825
commit b712310ad7

@ -173,6 +173,61 @@
</el-row>
<el-row>
<el-col :span="3">
<div class="ao-text">
<span>冷链报告上传</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item>
<el-upload
:disabled="formData.auditStatus == 1"
class="upload-demo"
ref="upload"
:action="this.uploadUrl"
:on-preview="uploadHandlePreview"
:on-remove="uploadHandleRemove1"
:limit="1"
:headers="headers"
:on-exceed="uploadHandleExceed"
accept=".jpg,.png"
:on-change="uploadOnchange1"
:on-success="uploadHandleSuccess1"
:on-error="uploadHandleError"
:on-before="uploadHandleBefore"
:file-list="fileList"
:data="{type:'image2'}"
:auto-upload="true">
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile1 }}
</el-button>
<div>只能上传 jpg,png 文件且不超过 10 MB</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text" v-if="this.inputQuery.coldFilePath!=null">
<span>冷链报告预览</span>
</div>
</el-col>
<el-col :span="8">
<el-button type="primary" size="mini" icon="search" v-if="this.inputQuery.coldFilePath!=null"
style="text-align:right" @click="showImgViewerCold">
冷链报告预览
</el-button>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/>
</el-col>
</el-row>
</el-card>
</el-form>
@ -183,7 +238,6 @@
import draggable from "vuedraggable";
import store from "@/store";
import {updateBizById, updateById} from '@/api/inout/orderDetailBiz'
import {updateOrderDetailBiz} from '@/api/inout/order'
import {previewImage} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -209,7 +263,9 @@ export default {
data() {
return {
imgList: [],
imgListCold:[],
imgViewerVisible: false,
imgViewerVisibleCold:false,
BASE_URL: process.env.VUE_APP_BASE_API,
code: "",
formData: {
@ -235,6 +291,7 @@ export default {
fileList: [],
headers: {},
choiceFile: "选取文件",
choiceFile1: "选取文件",
};
},
@ -303,6 +360,11 @@ export default {
this.inputQuery.checkFileName = null;
console.log(file, fileList);
},
uploadHandleRemove1(file, fileList) {
this.inputQuery.coldFilePath = null;
this.inputQuery.checkColdFileName = null;
console.log(file, fileList);
},
uploadHandlePreview(file) {
console.log(file);
console.log(this.fileList);
@ -337,6 +399,33 @@ export default {
}
return isLt;
},
uploadOnchange1(file, fileList) {
this.inputQuery.checkColdFileName = file.name;
let fileName = file.name;
let uid = file.uid
let pos = fileName.lastIndexOf(".");
let lastName = fileName.substring(pos, fileName.length);
if (lastName.toLowerCase() !== ".jpg" && lastName.toLowerCase() !== ".png" && lastName.toLowerCase() !== ".doc" && lastName.toLowerCase() !== ".pdf") {
this.$message.error("上传文件只能是 jpg,png,doc,pdf 格式");
for (let i = 0; i < fileList.length; i++) {//list
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
return;
}
//
const isLt = file.size / 1024 / 1024 / 30 <= 1;
if (!isLt) {
this.$message.error("上传文件大小不能超过 30MB");
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].uid === uid) {
fileList.splice(i, 1)
}
}
}
return isLt;
},
uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) {
this.inputQuery.filePath = response.data.name;
@ -345,6 +434,14 @@ export default {
this.$message.error("文件上传失败:" + response.message);
}
},
uploadHandleSuccess1(response, file, fileList) {
if (response.code === 20000) {
this.inputQuery.coldFilePath = response.data.name;
// this.onSubmit();
} else {
this.$message.error("文件上传失败:" + response.message);
}
},
uploadHandleError() {
},
@ -374,6 +471,24 @@ export default {
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = [];
previewImage({imageUrl: this.inputQuery.coldFilePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;
const m = (e) => {
@ -383,6 +498,12 @@ export default {
document.removeEventListener("touchmove", m, true);
},
closeImgViewerCold(){
this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
},
filters: {},
@ -411,6 +532,12 @@ export default {
} else {
this.choiceFile = "选取检验报告";
}
if (this.inputQuery.coldFilePath != null) {
this.choiceFile1 = "更换冷链报告";
} else {
this.choiceFile1 = "选取冷链报告";
}
},
};
</script>

@ -319,13 +319,26 @@
<el-table-column
label="检验报告"
width="160"
prop="checkFileName"
prop="filePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div>
</template>
</el-table-column>
<el-table-column
label="冷链报告"
width="160"
prop="coldFilePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewerCold(scope.row)">{{ scope.row.checkColdFileName }}</div>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
@ -333,7 +346,16 @@
size="small"
@click="showImgViewer(scope.row)"
:disabled="scope.row.filePath == null"
>预览
>检验报告预览
</el-button
>
<el-button
type="text"
size="small"
@click="showImgViewerCold(scope.row)"
:disabled="scope.row.coldFilePath == null"
>冷链报告预览
</el-button
>
</template>
@ -341,6 +363,9 @@
</el-table>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/>
<pagination
v-show="bizTotal>0"
:total="bizTotal"
@ -567,7 +592,9 @@ export default {
data() {
return {
imgList:[],
imgListCold:[],
imgViewerVisible:false,
imgViewerVisibleCold:false,
BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true,
filterQuery: {
@ -763,6 +790,22 @@ export default {
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl+"========");
this.imgListCold=[];
previewImage({imageUrl:row.coldFilePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold=response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer(){
this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() };
@ -770,6 +813,13 @@ export default {
document.removeEventListener("touchmove", m, true);
},
closeImgViewerCold(){
this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
invChange() {
this.filterQuery.action = null;
this.busTypes = [];

@ -294,47 +294,95 @@
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="物资名称"
prop="coName" width="160"
prop="coName"
width="150"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号" width="160"
label="规格型号"
width="150"
prop="spec"
></el-table-column>
<el-table-column
label="批次号" width="120"
label="批次号"
width="100"
prop="batchNo"
></el-table-column>
<el-table-column
label="生产日期" width="120"
prop="productDate"
label="数量"
prop="count"
width="100"
></el-table-column>
<el-table-column
label="失效日期"
prop="expireDate" width="120"
label="扫码数量"
prop="reCount"
width="100"
></el-table-column>
<el-table-column
label="单据数量" width="100"
prop="count"
label="价格"
prop="price"
width="100"
></el-table-column>
<el-table-column
label="扫码数量"
prop="scanCount" width="100"
label="生产日期"
prop="productDate"
width="100"
></el-table-column>
<el-table-column
label="价格" width="100"
prop="price"
label="失效日期"
prop="expireDate"
width="100"
></el-table-column>
<el-table-column width="100" label="计量单位" prop="measname">
</el-table-column>
<el-table-column
label="生产企业" width="180"
label="生产企业"
prop="manufacturer"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案号"
prop="certCode" width="180"
width="160"
prop="certCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="检验报告"
width="160"
prop="filePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div>
</template>
</el-table-column>
<el-table-column
label="冷链报告"
width="160"
prop="coldFilePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewerCold(scope.row)">{{ scope.row.checkColdFileName }}</div>
</template>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="upload(scope.row)"
v-if="scope.row.checkFileName != null"
>预览
</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="bizTotal>0"
@ -512,6 +560,25 @@
</el-tab-pane>
</el-tabs>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/>
<el-dialog
title="检验报告"
:visible.sync="Upinvoice"
:before-close="freshen"
width="60%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="Upinvoice"
>
<DialogCheck
:closeDialog="closeCheckDialog"
:inputQuery="currentManufacturer"
></DialogCheck>
</el-dialog>
<el-dialog
title="单据验收"
:visible.sync="acceptOrderVisible"
@ -545,6 +612,11 @@ import {getCodeList} from "@/api/inout/code";
import AcceptOrder from "@/views/inout/DialogReviewOrder";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import { previewImage } from '@/api/purchase/supCompany'
import DialogCheck from "@/views/inout/DialogCheck";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
const formJson = {
@ -558,6 +630,13 @@ export default {
name: "IoCheckSuccessOrder",
data() {
return {
imgViewerVisible:false,
imgViewerVisibleCold:false,
imgList:[],
imgListCold:[],
BASE_URL: process.env.VUE_APP_BASE_API,
currentManufacturer:{},
Upinvoice:false,
showSearch: true,
filterQuery: {
id: "",
@ -692,7 +771,7 @@ export default {
acceptOrderVisible: false,
};
},
components: {AcceptOrder},
components: {AcceptOrder,DialogCheck,ElImageViewer},
methods: {
onReset() {
this.$router.push({
@ -737,6 +816,71 @@ export default {
this.filterQuery.page = 1;
this.getList();
},
showImgViewer(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl+"========");
this.imgList=[];
previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList=response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl+"========");
this.imgListCold=[];
previewImage({imageUrl:row.coldFilePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold=response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer(){
this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
closeImgViewerCold(){
this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
upload(row){
this.currentManufacturer = row;
this.Upinvoice = true;
},
freshen(){
this.Upinvoice = false;
this.getOrderDetails();
},
closeCheckDialog(){
this.Upinvoice = false;
this.getOrderDetails();
},
hideSearch() {
this.showSearch = !this.showSearch;
},

@ -263,20 +263,32 @@
<el-table-column
label="检验报告"
width="160"
prop="checkFileName"
prop="filePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div>
</template>
</el-table-column>
<el-table-column
label="冷链报告"
width="160"
prop="coldFilePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewerCold(scope.row)">{{ scope.row.checkColdFileName }}</div>
</template>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="upload(scope.row)"
>检验报告
>预览
</el-button
>
</template>
@ -372,10 +384,11 @@
</el-tab-pane>
</el-tabs>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/>
<el-dialog
title="编辑"
title="检验报告"
:visible.sync="Upinvoice"
:before-close="freshen"
width="60%"
@ -389,6 +402,7 @@
></DialogCheck>
</el-dialog>
<el-dialog
title="送货单核对"
:visible.sync="acceptOrderVisible"
@ -440,7 +454,9 @@ export default {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
imgList:[],
imgListCold:[],
imgViewerVisible:false,
imgViewerVisibleCold:false,
showSearch: true,
Upinvoice:false,
currentManufacturer:{},
@ -634,12 +650,34 @@ export default {
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl+"========");
this.imgListCold=[];
previewImage({imageUrl:row.coldFilePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold=response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer(){
this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
closeImgViewerCold(){
this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
@ -651,6 +689,7 @@ export default {
this.Upinvoice = false;
this.getOrderDetails();
},
handleSelectionChange(val) {
this.currentRow.billNo=val.billNo;
this.getOrderDetails();

@ -304,13 +304,26 @@
<el-table-column
label="检验报告"
width="160"
prop="checkFileName"
prop="filePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div>
</template>
</el-table-column>
<el-table-column
label="冷链报告"
width="160"
prop="coldFilePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewerCold(scope.row)">{{ scope.row.checkColdFileName }}</div>
</template>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button
@ -318,7 +331,7 @@
size="small"
@click.native.stop="upload(scope.row)"
v-if="scope.row.checkFileName != null"
>检验报告
>预览
</el-button
>
</template>
@ -416,9 +429,12 @@
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/>
<el-dialog
title="编辑"
title="检验报告"
:visible.sync="Upinvoice"
:before-close="freshen"
width="60%"
@ -464,6 +480,7 @@ import {getCodeList} from "@/api/inout/code";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import AcceptOrder from "@/views/inout/DialogReviewOrder";
import DialogCheck from "@/views/inout/DialogCheck";
import {getDeptListByUser} from "@/api/auth/authDept";
import { previewImage } from '@/api/purchase/supCompany'
import { getBizDetailList } from '@/api/inout/orderDetailBiz'
@ -483,7 +500,9 @@ export default {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
imgViewerVisible:false,
imgViewerVisibleCold:false,
imgList:[],
imgListCold:[],
showSearch: true,
currentManufacturer:{},
Upinvoice:false,
@ -674,6 +693,23 @@ export default {
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl+"========");
this.imgListCold=[];
previewImage({imageUrl:row.coldFilePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold=response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer(){
this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() };
@ -681,21 +717,31 @@ export default {
document.removeEventListener("touchmove", m, true);
},
closeImgViewerCold(){
this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
upload(row){
this.currentManufacturer = row;
this.Upinvoice = true;
},
closeCheckDialog(){
this.Upinvoice = false;
this.getOrderDetails();
},
freshen(){
this.Upinvoice = false;
this.getOrderDetails();
},
hideSearch() {
this.showSearch = !this.showSearch;
},

@ -288,7 +288,7 @@
<el-table-column
label="检验报告"
width="160"
prop="checkFileName"
prop="filePath"
show-overflow-tooltip
>
<template slot-scope="scope">
@ -296,6 +296,18 @@
</template>
</el-table-column>
<el-table-column
label="冷链报告"
width="160"
prop="coldFilePath"
show-overflow-tooltip
>
<template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewerCold(scope.row)">{{ scope.row.checkColdFileName }}</div>
</template>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
@ -303,9 +315,11 @@
type="text"
size="small"
@click.native.stop="upload(scope.row)"
>检验报告
>预览
</el-button
>
</template>
</el-table-column>
@ -402,9 +416,12 @@
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
<el-image-viewer v-if="imgViewerVisibleCold" style="z-index:9999" :on-close="closeImgViewerCold" :url-list="imgListCold"/>
<el-dialog
title="编辑"
title="检验报告"
:visible.sync="Upinvoice"
:before-close="freshen"
width="60%"
@ -469,7 +486,9 @@ export default {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
imgList: [],
imgListCold:[],
imgViewerVisible: false,
imgViewerVisibleCold:false,
showSearch: true,
Upinvoice: false,
currentManufacturer: {},
@ -661,6 +680,22 @@ export default {
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl+"========");
this.imgListCold=[];
previewImage({imageUrl:row.coldFilePath,certFileUrl:this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold=response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); //
},
closeImgViewer() {
this.imgViewerVisible = false;
const m = (e) => {
@ -669,6 +704,14 @@ export default {
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
closeImgViewerCold(){
this.imgViewerVisibleCold = false;
const m = (e) => { e.preventDefault() };
document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true);
},
upload(row) {
this.currentManufacturer = row;
this.Upinvoice = true;
@ -976,6 +1019,11 @@ export default {
this.getOrderDetails();
},
freshenCold(){
this.coldUpinvoice = false;
this.getOrderDetails();
},
//
closeAcceptDialog() {
this.acceptOrderVisible = false;

Loading…
Cancel
Save