Merge remote-tracking branch 'origin/master'

prod
schry 2 years ago
commit abaa200ed9

@ -41,6 +41,14 @@ export function updateById(data) {
}); });
} }
export function updateBizById(data) {
return axios({
url: "/udiwms/inout/bizDetail/updateById",
method: "post",
data: data
});
}
export function insertInvoice(params) { export function insertInvoice(params) {
return axios({ return axios({
url: "/udiwms/inout/biz/insertInvoice", url: "/udiwms/inout/biz/insertInvoice",

@ -141,17 +141,18 @@
:limit="1" :limit="1"
:headers="headers" :headers="headers"
:on-exceed="uploadHandleExceed" :on-exceed="uploadHandleExceed"
accept=".jpg,.png,.pdf,.doc" accept=".jpg,.png"
:on-change="uploadOnchange" :on-change="uploadOnchange"
:on-success="uploadHandleSuccess" :on-success="uploadHandleSuccess"
:on-error="uploadHandleError" :on-error="uploadHandleError"
:on-before="uploadHandleBefore"
:file-list="fileList" :file-list="fileList"
:data="{type:'image2'}" :data="{type:'image2'}"
:auto-upload="true"> :auto-upload="true">
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1"> <el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile }} {{ choiceFile }}
</el-button> </el-button>
<div>只能上传 jpg,png,pdf,doc 文件且不超过 10 MB</div> <div>只能上传 jpg,png 文件且不超过 10 MB</div>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@ -172,6 +173,61 @@
</el-row> </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-card>
</el-form> </el-form>
@ -181,8 +237,7 @@
<script> <script>
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import store from "@/store"; import store from "@/store";
import {updateById} from '@/api/inout/orderDetailBiz' import {updateBizById, updateById} from '@/api/inout/orderDetailBiz'
import {updateOrderDetailBiz} from '@/api/inout/order'
import {previewImage} from '@/api/purchase/supCompany' import {previewImage} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -208,9 +263,10 @@ export default {
data() { data() {
return { return {
imgList: [], imgList: [],
imgListCold:[],
imgViewerVisible: false, imgViewerVisible: false,
imgViewerVisibleCold:false,
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
IMAGE_URL: process.env.VUE_APP_SYNC_API,
code: "", code: "",
formData: { formData: {
ggxh: "", ggxh: "",
@ -235,6 +291,7 @@ export default {
fileList: [], fileList: [],
headers: {}, headers: {},
choiceFile: "选取文件", choiceFile: "选取文件",
choiceFile1: "选取文件",
}; };
}, },
@ -243,7 +300,7 @@ export default {
}, },
methods: { methods: {
submitUpload() { submitUpload() {
updateById(this.inputQuery).then((res) => { updateBizById(this.inputQuery).then((res) => {
if (res.code == 20000) { if (res.code == 20000) {
this.$message({ this.$message({
type: "success", type: "success",
@ -303,6 +360,11 @@ export default {
this.inputQuery.checkFileName = null; this.inputQuery.checkFileName = null;
console.log(file, fileList); console.log(file, fileList);
}, },
uploadHandleRemove1(file, fileList) {
this.inputQuery.coldFilePath = null;
this.inputQuery.checkColdFileName = null;
console.log(file, fileList);
},
uploadHandlePreview(file) { uploadHandlePreview(file) {
console.log(file); console.log(file);
console.log(this.fileList); console.log(this.fileList);
@ -337,6 +399,33 @@ export default {
} }
return isLt; 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) { uploadHandleSuccess(response, file, fileList) {
if (response.code === 20000) { if (response.code === 20000) {
this.inputQuery.filePath = response.data.name; this.inputQuery.filePath = response.data.name;
@ -345,10 +434,26 @@ export default {
this.$message.error("文件上传失败:" + response.message); 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() { uploadHandleError() {
}, },
uploadHandleBefore(file) {
console.log(file)
let isJPG = file.type === 'image/jpeg';
let isPNG = file.type === 'image/png';
if (!isJPG && !isPNG) {
this.$message.error('只能上传jpg或png格式');
}
return isJPG || isPNG;
},
showImgViewer(row) { showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList = []; this.imgList = [];
@ -366,6 +471,24 @@ export default {
document.addEventListener("touchmove", m, false); // 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() { closeImgViewer() {
this.imgViewerVisible = false; this.imgViewerVisible = false;
const m = (e) => { const m = (e) => {
@ -375,6 +498,12 @@ export default {
document.removeEventListener("touchmove", m, true); 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: {}, filters: {},
@ -403,10 +532,16 @@ export default {
} else { } else {
this.choiceFile = "选取检验报告"; this.choiceFile = "选取检验报告";
} }
if (this.inputQuery.coldFilePath != null) {
this.choiceFile1 = "更换冷链报告";
} else {
this.choiceFile1 = "选取冷链报告";
}
}, },
}; };
</script> </script>
<style scoped> <style>
.ao-text { .ao-text {
width: 100%; width: 100%;

@ -655,7 +655,7 @@ export default {
this.curInvOptions.length > 0 && this.curInvOptions.length > 0 &&
this.orderFormData.invWarehouseCode == null this.orderFormData.invWarehouseCode == null
) { ) {
this.orderFormData.invCode = this.curInvOptions[0].code; //this.orderFormData.invCode = this.curInvOptions[0].code;
this.getBusTypeByInv(); this.getBusTypeByInv();
this.findCurSpaceList(this.orderFormData.invCode); this.findCurSpaceList(this.orderFormData.invCode);
} }
@ -1362,7 +1362,6 @@ export default {
if (this.$isNotBlank(this.orderFormData.checkPreInOrders)) { if (this.$isNotBlank(this.orderFormData.checkPreInOrders)) {
this.checkPreInArray = this.orderFormData.split(","); this.checkPreInArray = this.orderFormData.split(",");
} }
this.refreshCodesPanel(); this.refreshCodesPanel();
// //
this.findInvListByUser(); this.findInvListByUser();

@ -199,13 +199,13 @@
<el-button type="text" :disabled="scope.row.checkStatus==1" size="small" <el-button type="text" :disabled="scope.row.checkStatus==1" size="small"
@click.native.stop="determine(scope.row)">确认 @click.native.stop="determine(scope.row)">确认
</el-button> </el-button>
<!--<el-button--> <el-button
<!-- type="text"--> type="text"
<!-- size="small"--> size="small"
<!-- @click.native.stop="InvoiceRegister1(scope.row)"--> @click.native.stop="InvoiceRegister1(scope.row)"
<!--&gt;发票登记--> >发票登记
<!--</el-button--> </el-button
<!--&gt;--> >
<el-button <el-button
type="text" type="text"
@click="getNewInv(scope.row)" @click="getNewInv(scope.row)"

@ -273,6 +273,40 @@
prop="manufacturer" prop="manufacturer"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></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> </el-table>
<pagination <pagination
v-show="bizTotal>0" v-show="bizTotal>0"
@ -364,6 +398,27 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </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 <el-dialog
title="根据当前单据生成新单据" title="根据当前单据生成新单据"
@ -397,6 +452,10 @@ import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getCodeList} from "@/api/inout/code"; import {getCodeList} from "@/api/inout/code";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint" import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import DialogcChangeNewOrder from "@/views/inout/DialogcChangeNewOrder"; import DialogcChangeNewOrder from "@/views/inout/DialogcChangeNewOrder";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import DialogCheck from "@/views/inout/DialogCheck";
const formJson = { const formJson = {
@ -410,7 +469,14 @@ export default {
name: "IoAuditedOrder", name: "IoAuditedOrder",
data() { data() {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API,
imgViewerVisible:false,
imgViewerVisibleCold:false,
currentManufacturer:{},
imgList:[],
imgListCold:[],
showSearch: true, showSearch: true,
Upinvoice:false,
filterQuery: { filterQuery: {
id: "", id: "",
billNo: null, billNo: null,
@ -529,7 +595,7 @@ export default {
curRow: null, curRow: null,
}; };
}, },
components: {DialogcChangeNewOrder}, components: {DialogcChangeNewOrder,ElImageViewer,DialogCheck},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
@ -572,6 +638,72 @@ export default {
this.filterQuery.page = 1; this.filterQuery.page = 1;
this.getList(); 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() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },

@ -259,13 +259,25 @@
<el-table-column <el-table-column
label="检验报告" label="检验报告"
width="160" width="160"
prop="checkFileName" prop="filePath"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div> <div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div>
</template> </template>
</el-table-column> </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"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -281,6 +293,9 @@
</el-table> </el-table>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/> <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 <pagination
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
@ -526,7 +541,9 @@ export default {
data() { data() {
return { return {
imgList: [], imgList: [],
imgListCold:[],
imgViewerVisible: false, imgViewerVisible: false,
imgViewerVisibleCold:false,
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
IMAGE_URL: process.env.VUE_APP_SYNC_API, IMAGE_URL: process.env.VUE_APP_SYNC_API,
showSearch: true, showSearch: true,
@ -722,6 +739,22 @@ export default {
document.addEventListener("touchmove", m, false); // 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() { closeImgViewer() {
this.imgViewerVisible = false; this.imgViewerVisible = false;
const m = (e) => { const m = (e) => {
@ -731,6 +764,13 @@ export default {
document.removeEventListener("touchmove", m, true); 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() { invChange() {
this.filterQuery.action = null; this.filterQuery.action = null;
this.busTypes = []; this.busTypes = [];

@ -246,20 +246,34 @@
<el-table-column <el-table-column
label="检验报告" label="检验报告"
width="160" width="160"
prop="checkFileName" prop="filePath"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div> <div style="color: #1890ff;" @click="showImgViewer(scope.row)">{{ scope.row.checkFileName }}</div>
</template> </template>
</el-table-column> </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"> <el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="upload(scope.row)" @click.native.stop="upload(scope.row)"
>检验报告 >预览
</el-button </el-button
> >
</template> </template>
@ -354,10 +368,12 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/> <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 <el-dialog
title="编辑" title="检验报告"
:visible.sync="Upinvoice" :visible.sync="Upinvoice"
:before-close="freshen" :before-close="freshen"
width="60%" width="60%"
@ -422,7 +438,9 @@ export default {
return { return {
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
imgList: [], imgList: [],
imgListCold:[],
imgViewerVisible: false, imgViewerVisible: false,
imgViewerVisibleCold:false,
showSearch: true, showSearch: true,
Upinvoice: false, Upinvoice: false,
currentManufacturer: {}, currentManufacturer: {},
@ -615,6 +633,24 @@ export default {
document.addEventListener("touchmove", m, false); // 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() { closeImgViewer() {
this.imgViewerVisible = false; this.imgViewerVisible = false;
const m = (e) => { const m = (e) => {
@ -624,15 +660,24 @@ export default {
document.removeEventListener("touchmove", m, true); 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) { upload(row) {
this.currentManufacturer = row; this.currentManufacturer = row;
this.Upinvoice = true; this.Upinvoice = true;
}, },
closeCheckDialog() { closeCheckDialog() {
this.Upinvoice = false; this.Upinvoice = false;
this.getOrderDetails(); this.getOrderDetails();
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow.billNo = val.billNo; this.currentRow.billNo = val.billNo;
this.getOrderDetails(); this.getOrderDetails();
@ -857,6 +902,7 @@ export default {
this.Upinvoice = false; this.Upinvoice = false;
this.getOrderDetails(); this.getOrderDetails();
}, },
onResultReset() { onResultReset() {
this.resultQuery = { this.resultQuery = {
orderId: null, orderId: null,

@ -74,16 +74,44 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="采购说明:" prop="billNo"> <el-form-item
<el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input> prop="supId"
label="供应商:"
>
<el-select
v-model="formData.supId"
filterable
remote
:disabled="corpOrderIdDisabled"
clearable
reserve-keyword
style="width: 90%"
placeholder="请选择供应商"
:remote-method="findMethod"
>
<el-option
v-for="item in fromOptions"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
</el-row>
<el-row> <el-row>
<el-col :span="11">
<el-form-item label="采购说明:" prop="remark">
<el-input v-model="formData.remark" auto-complete="off" type="textarea" autosize></el-input>
</el-form-item>
</el-col>
<el-col :span="11" v-show="formData.status==4"> <el-col :span="11" v-show="formData.status==4">
<el-form-item label="拒绝原因:"> <el-form-item label="拒绝原因:">
<el-input v-model="formData.auditRemark" auto-complete="off" :disabled="true"></el-input> <el-input v-model="formData.auditRemark" auto-complete="off" :disabled="true"></el-input>
@ -91,14 +119,16 @@
</el-col> </el-col>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button-group style="display: flex"> <el-button-group style="display: flex">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button> <el-button type="primary" @click.native.stop="selectProductFunction()" :loading="loading">产品录入</el-button>
<!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入采购单</el-button>--> <!-- <el-button type="primary" :loading="loading" @click.native.stop="selectApply()">选入采购单</el-button>-->
</el-button-group> </el-button-group>
@ -151,6 +181,7 @@
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:purType="1" :purType="1"
:pId="pId" :pId="pId"
:supId="formData.supId"
:data="thisData" :data="thisData"
></purOrderProducts> ></purOrderProducts>
</el-dialog> </el-dialog>
@ -187,6 +218,7 @@ import {
import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {filterSubByInv} from "@/api/system/invSubWarehouse";
import SelectPlanListDialog from "@/views/purchase/purPlan/selectPlanListDialog"; import SelectPlanListDialog from "@/views/purchase/purPlan/selectPlanListDialog";
import {parseTime} from "@/utils/coTools"; import {parseTime} from "@/utils/coTools";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
export default { export default {
name: "idQuery", name: "idQuery",
@ -221,9 +253,11 @@ export default {
deptCode: null, deptCode: null,
locStorageCode: null, locStorageCode: null,
invWarehouseCode: null, invWarehouseCode: null,
supId: null,
}, },
pId: null, pId: null,
formRules: {}, formRules: {},
fromOptions: [],
codeArray: [], codeArray: [],
total: 0, total: 0,
loading: false, loading: false,
@ -254,7 +288,9 @@ export default {
storageList: [], storageList: [],
invCodeList: [], invCodeList: [],
invQueryData: {}, invQueryData: {},
selectApplyVisible: false selectApplyVisible: false,
corpOrderIdDisabled: false,
}; };
}, },
watch: { watch: {
@ -341,6 +377,10 @@ export default {
}) })
}, },
selectProductFunction() { selectProductFunction() {
if (this.$isBlank(this.formData.supId)) {
this.$message.warning("请先选择供应商!");
return;
}
this.selectProductVisible = true; this.selectProductVisible = true;
//idid //idid
if (this.pId == null) { if (this.pId == null) {
@ -365,9 +405,11 @@ export default {
} }
selectOrderDetail(this.query) // selectOrderDetail(this.query) //
.then((response) => { .then((response) => {
console.log(response)
this.codeArray = response.data.list || []; this.codeArray = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
if (this.total > 0) {
this.corpOrderIdDisabled = true;
}
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
@ -482,6 +524,28 @@ export default {
}) })
} }
}, },
//
findMethod(query) {
this.fromOptions = [];
let cQuery = {
key: query,
corpType: 2,
outType: null,
page: 1,
limit: 20,
};
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
}, },
filters: {}, filters: {},
mounted() { mounted() {
@ -499,7 +563,9 @@ export default {
this.formData = this.idQuery.formData; this.formData = this.idQuery.formData;
this.orderEditor = true; this.orderEditor = true;
this.sValue = this.formData.corpName; this.sValue = this.formData.corpName;
this.findMethod(this.formData.supId);
this.getStockOrderDetailList(); this.getStockOrderDetailList();
this.corpOrderIdDisabled = true;
} else { } else {
var date = new Date(); var date = new Date();
this.formData = { this.formData = {

@ -5,12 +5,14 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="UDI码:" class="query-form-item"> <el-form-item label="UDI码:" class="query-form-item">
<el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true" @keyup.enter.native="keyup_submit($event)"></el-input> <el-input v-model="listQuery.udiCode" style="width: 96%" placeholder="请扫描或输入UDI码" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第三方物资编码:" class="query-form-item"> <el-form-item label="第三方物资编码:" class="query-form-item">
<el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方物资编码" clearable="true"></el-input> <el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方物资编码"
clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -18,12 +20,14 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="物品编码:" class="query-form-item"> <el-form-item label="物品编码:" class="query-form-item">
<el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码" clearable="true"></el-input> <el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="产品通用名:" class="query-form-item"> <el-form-item label="产品通用名:" class="query-form-item">
<el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名" clearable="true"></el-input> <el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入产品通用名"
clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -50,7 +54,8 @@
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row :row-class-name="tableRowClassName" @current-change="handleChange" ref="multipleTable"> <el-table :data="dataList" style="width: 100%" v-loading="loading" border highlight-current-row
:row-class-name="tableRowClassName" @current-change="handleChange" ref="multipleTable">
<el-table-column label width="45"> <el-table-column label width="45">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
@ -137,6 +142,10 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
supId: {
type: Object,
required: true,
},
}, },
data() { data() {
@ -159,7 +168,7 @@ export default {
erpName: "", erpName: "",
keys: [], keys: [],
}, },
ids:[], ids: [],
radioCheck: null, radioCheck: null,
dataList: [], dataList: [],
pageTotal: 1, pageTotal: 1,
@ -271,6 +280,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
this.listQuery.customerId = store.getters.customerId; this.listQuery.customerId = store.getters.customerId;
this.listQuery.unitFk = this.supId;
filterCompanyProductRelevance(this.listQuery) filterCompanyProductRelevance(this.listQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
@ -300,9 +310,9 @@ export default {
return; return;
} }
if(this.ids.length>0){ if (this.ids.length > 0) {
for(var i=0;i<this.ids.length;i++){ for (var i = 0; i < this.ids.length; i++) {
if(this.ids[i]==this.multipleSelection.rlId){ if (this.ids[i] == this.multipleSelection.rlId) {
this.$message.error("该产品已录入!"); this.$message.error("该产品已录入!");
return return
} }
@ -321,12 +331,12 @@ export default {
combine() { combine() {
this.loading = true; this.loading = true;
let tQuery = { let tQuery = {
productId:this.multipleSelection.rlId, productId: this.multipleSelection.rlId,
productName:this.multipleSelection.cpmctymc, productName: this.multipleSelection.cpmctymc,
count:1, count: 1,
orderIdFk:this.pId, orderIdFk: this.pId,
supId:this.multipleSelection.customerId, supId: this.multipleSelection.customerId,
zczbhhzbapzbh:this.multipleSelection.zczbhhzbapzbh zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh
}; };
addOrderDetail(tQuery).then((response) => { addOrderDetail(tQuery).then((response) => {
this.loading = false; this.loading = false;
@ -349,7 +359,7 @@ export default {
selectCert() { selectCert() {
if (this.currentCert == null) { if (this.currentCert == null) {
this.$message.error("请先选择对应的注册证!"); this.$message.error("请先选择对应的注册证!");
}else{ } else {
this.multipleSelection.zczbhhzbapzbh = this.currentCert; this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine(); this.combine();
} }
@ -361,9 +371,9 @@ export default {
created() { created() {
console.log(this.data) console.log(this.data)
if (this.$isNotBlank(this.data)) { if (this.$isNotBlank(this.data)) {
this.ids=[]; this.ids = [];
if(this.data.stockOrderLists.length>0){ if (this.data.stockOrderLists.length > 0) {
for(var i=0;i<this.data.stockOrderLists.length;i++){ for (var i = 0; i < this.data.stockOrderLists.length; i++) {
this.ids.push(this.data.stockOrderLists[i].productId); this.ids.push(this.data.stockOrderLists[i].productId);
} }
} }

Loading…
Cancel
Save