界面修改,发票登记相关问题

ywj_dev
anthonywj 2 years ago
parent 49e159b946
commit 89fb04f56e

@ -113,6 +113,7 @@
<el-button type="primary" icon="el-icon-bottom-right" style="margin-left: 15px">导入器械信息</el-button> <el-button type="primary" icon="el-icon-bottom-right" style="margin-left: 15px">导入器械信息</el-button>
</el-upload> </el-upload>
</div> </div>
<el-divider style="margin: 15px"></el-divider>
<el-table <el-table
:data="udidlList" :data="udidlList"
style="width: 100%" style="width: 100%"

@ -1,291 +1,291 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :model="query" class="query-form" size="mini" label-width="100px" v-show="showSearch"> <el-form :model="query" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="记录ID:"> <el-form-item label="记录ID:">
<el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input> <el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="处理状态:"> <el-form-item label="处理状态:">
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择处理状态"> <el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择处理状态">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="处理中" value="1"></el-option> <el-option label="处理中" value="1"></el-option>
<el-option label="已处理" value="3"></el-option> <el-option label="已处理" value="3"></el-option>
<el-option label="异常" value="2"></el-option> <el-option label="异常" value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="getList"></el-button>
<el-upload :action="uploadFileUrl" multiple :limit="1" :data="uploadData" :show-file-list="false" :on-success="handleChange" :file-list="fileList"> <el-upload :action="uploadFileUrl" multiple :limit="1" :data="uploadData" :show-file-list="false"
<el-button icon="el-icon-upload2" type="primary">导入器械信息</el-button> :on-success="handleChange" :file-list="fileList">
</el-upload> <el-button icon="el-icon-upload2" type="primary">导入器械信息</el-button>
</el-button-group> </el-upload>
</div> </el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-divider style="margin: 15px"></el-divider> <el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border
highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column>
<el-table-column label="来源" prop="fromType" show-overflow-tooltip>
</el-table-column>
<el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column>
<el-table-column label="状态" prop="status" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="导入信息" prop="remark" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table v-loading="loading" :data="list" style="width: 100%" @selection-change="handleSelectionChange" border highlight-current-row> <el-dialog
<el-table-column label="序号" type="index"></el-table-column> title="器械信息导入详情"
<el-table-column label="记录ID" prop="genKey" show-overflow-tooltip></el-table-column> :visible.sync="udiImportDetailVisible"
<el-table-column label="来源" prop="fromType" show-overflow-tooltip> width="80%"
</el-table-column> :close-on-click-modal="false"
<el-table-column label="更新日期" prop="updateTime" show-overflow-tooltip></el-table-column> :close-on-press-escape="false"
<el-table-column label="状态" prop="status" show-overflow-tooltip> v-if="udiImportDetailVisible"
<template slot-scope="scope"> >
<el-tag :type="statusFilterType(scope.row.status)">{{ status[scope.row.status] }}</el-tag> <udiInfoImportDetail :currentRow="currentRow" :closeDialog="cancelDialog"></udiInfoImportDetail>
</template> </el-dialog>
</el-table-column>
<el-table-column label="导入信息" prop="remark" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button type="text" @click.native.stop="deleteDialog(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
<el-dialog v-show="total>0"
title="器械信息导入详情" :total="total"
:visible.sync="udiImportDetailVisible" :limit.sync="filterQuery.limit"
width="80%" :page.sync="filterQuery.page"
:close-on-click-modal="false" @pagination="handleCurrentChange"
:close-on-press-escape="false" ></pagination>
v-if="udiImportDetailVisible" </el-card>
> </div>
<udiInfoImportDetail :currentRow="currentRow" :closeDialog="cancelDialog"></udiInfoImportDetail>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template> </template>
<script> <script>
import axios from "axios"; import axios from "axios";
import {filterDetail, filterLog, deleteLog, downloadSmp} from "@/api/basic/udiinfoImport"; import {filterDetail, filterLog, deleteLog, downloadSmp} from "@/api/basic/udiinfoImport";
import {getBasicThirdSys} from "@/api/basic/basicThirdSys"; import {getBasicThirdSys} from "@/api/basic/basicThirdSys";
import udiInfoImportDetail from "./udiInfoImportDetail"; import udiInfoImportDetail from "./udiInfoImportDetail";
export default { export default {
data() { data() {
return { return {
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
status: null, status: null,
fromType: null, fromType: null,
page: 1, page: 1,
limit: 20, limit: 20,
thirdSysFk: null, thirdSysFk: null,
}, },
udiImportDetailVisible: false, udiImportDetailVisible: false,
checked: false, checked: false,
list: [], list: [],
detailList: [], detailList: [],
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
total: 0, total: 0,
currentRow: null, currentRow: null,
editQuery: null, editQuery: null,
fromStatus: { fromStatus: {
0: "产品信息", 0: "产品信息",
1: "库存信息", 1: "库存信息",
2: "异常第三方上传" 2: "异常第三方上传"
}, },
status: { status: {
0: "等待处理", 0: "等待处理",
1: "正在处理", 1: "正在处理",
2: "处理异常", 2: "处理异常",
3: "处理完成" 3: "处理完成"
}, },
uploadFileUrl: null, uploadFileUrl: null,
uploadData: { uploadData: {
thirdSys: "thirdId", thirdSys: "thirdId",
}, },
templateDlUrl: null, templateDlUrl: null,
}; };
}, },
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
fromType: null, fromType: null,
genKey: null, genKey: null,
status: null, status: null,
page: 1, page: 1,
limit: 20, limit: 20,
thirdSysFk: null, thirdSysFk: null,
}; };
this.getList(); this.getList();
}, },
getList() { getList() {
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
genInCode() { genInCode() {
this.selectBasicUdiVisible = true; this.selectBasicUdiVisible = true;
}, },
handleDetailClick(row) { handleDetailClick(row) {
this.currentRow = row; this.currentRow = row;
console.log(this.currentRow.genKey) console.log(this.currentRow.genKey)
this.udiImportDetailVisible = true; this.udiImportDetailVisible = true;
}, },
cancelDialog() { cancelDialog() {
this.udiImportDetailVisible = false; this.udiImportDetailVisible = false;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val.page; this.filterQuery.page = val.page;
this.getList(); this.getList();
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm("此操作将删除该产品信息, 是否继续?", "提示", { this.$confirm("此操作将删除该产品信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let dQuery = { let dQuery = {
id: rowId, id: rowId,
}; };
deleteLog(dQuery) deleteLog(dQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { .catch(() => {
}); });
}, },
getBasicThirdSys() { getBasicThirdSys() {
let query = { let query = {
enabled: true, enabled: true,
}; };
getBasicThirdSys(query) getBasicThirdSys(query)
.then((response) => { .then((response) => {
this.thirdSys = response.data.list || []; this.thirdSys = response.data.list || [];
// this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId; // this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => { axios.get("./config.json").then(res => {
let response = res.data.BASE_URL; let response = res.data.BASE_URL;
this.uploadFileUrl = response + "/udiwms/products/importLog/upload"; this.uploadFileUrl = response + "/udiwms/products/importLog/upload";
}); });
axios.get("./config.json").then(res => { axios.get("./config.json").then(res => {
let response = res.data.SERVER_IP; let response = res.data.SERVER_IP;
this.templateDlUrl = response + "/已对照产品信息模板.xlsx"; this.templateDlUrl = response + "/已对照产品信息模板.xlsx";
}); });
}, },
jumpDl() { jumpDl() {
window.open(this.templateDlUrl, '_blank'); window.open(this.templateDlUrl, '_blank');
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
console.log(response); console.log(response);
if (response.code != 20000) { if (response.code != 20000) {
this.$message.error(response.message); this.$message.error(response.message);
} else { } else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); // console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.getList(); this.getList();
this.$message.success(response.data); this.$message.success(response.data);
} }
}, },
statusFilterType(status) { statusFilterType(status) {
const statusMap = { const statusMap = {
0: "warning", 0: "warning",
1: "warning", 1: "warning",
2: "danger", 2: "danger",
3: "success", 3: "success",
}; };
return statusMap[status]; return statusMap[status];
}, },
dlSmp() { dlSmp() {
this.loading = true; this.loading = true;
downloadSmp() downloadSmp()
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.$message.success(response.data); this.$message.success(response.data);
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
} }
}, },
mounted() { mounted() {
}, },
components: {udiInfoImportDetail}, components: {udiInfoImportDetail},
created() { created() {
this.getBasicThirdSys(); this.getBasicThirdSys();
this.getList(); this.getList();
}, },
}; };
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -185,7 +185,7 @@
<!--单据业务详情--> <!--单据业务详情-->
<el-tab-pane> <el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-单据详情</span> <span slot="label">单据 {{ currentRow.billNo }}-单据详情</span>
<el-table v-loading="bizDetailLoading" :data="codeDetailList" style="width: 100%" border <el-table :data="codeDetailList" style="width: 100%" border
@current-change="BizDetail" @current-change="BizDetail"
row-key="id" highlight-current-row row-key="id" highlight-current-row
> >
@ -273,66 +273,66 @@
</el-tabs> </el-tabs>
<el-tabs type="border-card" style="margin: 15px"> <el-tabs type="border-card" style="margin: 15px">
<!--单据业务详情--> <!--单据业务详情-->
<el-tab-pane> <el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-发票信息</span> <span slot="label">单据 {{ currentRow.billNo }}-发票信息</span>
<el-table v-loading="bizDetailLoading" :data="bizDetailList" style="width: 100%" border <el-table :data="bizDetailList" style="width: 100%" border
row-key="id" row-key="id"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="规格型号" label="物资名称"
prop="ggxh" prop="cpmctymc" width="150"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="物资名称" label="规格型号" width="150"
prop="cpmctymc" prop="ggxh"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="批次号" label="批次号" width="100"
prop="batchNo" prop="batchNo"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="机器编码" label="机器编码" width="150"
prop="machineNo" prop="machineNo"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="发票代码" label="发票代码" width="150"
prop="invoiceCode" prop="invoiceCode"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="发票编码" label="发票编码" width="150"
prop="invoiceEncode" prop="invoiceEncode"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="开票日期" label="开票日期" width="150"
prop="invoiceDate" prop="invoiceDate"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="发票价格" label="发票价格"
prop="price" prop="price" width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="生产日期" label="生产日期" width="100"
prop="productDate" prop="productDate"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="失效日期" label="失效日期"
prop="expireDate" prop="expireDate" width="100"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="备注" label="备注"
prop="remark" prop="remark" width="140"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column label="操作" width="160"> <el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -440,8 +440,6 @@ 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";
const formJson = { const formJson = {
site_id: "", site_id: "",
site_name: "", site_name: "",
@ -531,7 +529,7 @@ export default {
billNo: "" billNo: ""
}, },
actDateRange: [], actDateRange: [],
auditDateRange:[], auditDateRange: [],
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
{ {
@ -591,6 +589,7 @@ export default {
resultDetailList: [], resultDetailList: [],
acceptQuery: null, acceptQuery: null,
acceptOrderVisible: false, acceptOrderVisible: false,
subRow: null,
}; };
}, },
components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer}, components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer},
@ -614,17 +613,27 @@ export default {
this.getList(); this.getList();
}, },
InvoiceRegister(row) { InvoiceRegister(row) {
insertInvoice(row)
.then(response => { this.$confirm('是否登记新的发票?', '提示', {
if (response.code === 20000) { confirmButtonText: '确认',
this.closeInvoice(row); cancelButtonText: '取消',
} else { type: 'warning'
}).then(() => {
this.insertInvoice(row)
.then(response => {
if (response.code === 20000) {
this.closeInvoice(row);
} else {
this.$message.error(response.message);
}
})
.catch((response) => {
this.$message.error(response.message); this.$message.error(response.message);
} });
}) }).catch(() => {
.catch((response) => { });
this.$message.error(response.message);
});
}, },
onSubmit() { onSubmit() {
this.loading = true; this.loading = true;
@ -704,7 +713,7 @@ export default {
}, },
deleteInvoice(row) { deleteInvoice(row) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", { this.$confirm("此操作将永久删除该发票信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
@ -714,7 +723,7 @@ export default {
deleteById(params) deleteById(params)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.getBizDetailList(); this.getBizDetailList(this.subRow);
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
@ -911,7 +920,8 @@ export default {
} }
this.bizDetailLoading = true; this.bizDetailLoading = true;
this.bizQuery.orderIdFk = this.currentRow.billNo; this.bizQuery.orderIdFk = this.currentRow.billNo;
this.bizQuery.bizIdFk = row.id; this.bizQuery.batchNo = row.batchNo;
this.bizQuery.relId = row.bindRlFk;
filterListInvoice(this.bizQuery).then((res) => { filterListInvoice(this.bizQuery).then((res) => {
this.bizDetailLoading = false; this.bizDetailLoading = false;
if (res.code === 20000) { if (res.code === 20000) {
@ -929,13 +939,10 @@ export default {
this.bizTotal = 0; this.bizTotal = 0;
}) })
}, },
BizDetail(row) {
BizDetail(val){ this.bizQuery.page = 1;
debugger this.subRow = row;
this.bizQuery.page=1; this.getBizDetailList(row);
this.bizQuery.productName=val.coName;
this.bizQuery.batchNo=val.batchNo;
this.getBizDetailList();
}, },

@ -1,376 +1,386 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="listQuery" label-width="120px" v-show="showSearch"> <el-form :model="listQuery" label-width="120px" v-show="showSearch">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="18">
<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"
</el-form-item> @keyup.enter.native="keyup_submit($event)"></el-input>
</el-col> </el-form-item>
<el-col :span="6"> </el-col>
<el-form-item label="第三方产品编码:" class="query-form-item">
<el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方产品编码" clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row> </el-row>
<el-col :span="6">
<el-form-item label="物品编码:" class="query-form-item">
<el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物资名称:" class="query-form-item">
<el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入物资名称" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:" class="query-form-item">
<el-input v-model="listQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="生产企业:" class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect"></el-button>
</el-button-group>
</div>
<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-row>
<el-table-column label width="45"> <el-col :span="8">
<template slot-scope="scope"> <el-form-item label="第三方产品编码:" class="query-form-item">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio> <el-input v-model="listQuery.thrPiId" style="width: 90%" placeholder="请输入第三方产品编码"
</template> clearable="true"></el-input>
</el-table-column> </el-form-item>
<el-table-column label="序号" type="index"></el-table-column> </el-col>
<el-table-column label="最小销售产品标识" prop="nameCode" width="140" show-overflow-tooltip></el-table-column> <el-col :span="8">
<el-table-column label="产品编码" prop="thirdId" show-overflow-tooltip></el-table-column> <el-form-item label="物品编码:" class="query-form-item">
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc"></el-table-column> <el-input v-model="listQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码"
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column> clearable="true"></el-input>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column> </el-form-item>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column> </el-col>
<el-table-column label="器械类别" prop="qxlb" show-overflow-tooltip></el-table-column> </el-row>
<el-table-column label="配送企业" prop="companyName" show-overflow-tooltip></el-table-column> <el-row>
<el-table-column label="操作" width="160">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="handleDetailClick(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
<pagination <el-col :span="8">
v-show="pageTotal>0" <el-form-item label="物资名称:" class="query-form-item">
:total="pageTotal" <el-input v-model="listQuery.cpmctymc" style="width: 90%" placeholder="请输入物资名称"
:page.sync="listQuery.page" clearable="true"></el-input>
:limit.sync="listQuery.limit" </el-form-item>
@pagination="handleErpPageChange" </el-col>
<el-col :span="8">
<el-form-item label="规格型号:" class="query-form-item">
<el-input v-model="listQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产企业:" class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
></pagination> <div class="top-right-btn">
</el-card> <el-button-group style="display:flex;">
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmSelect"></el-button>
</el-button-group>
</div>
<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-column label width="45">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="最小销售产品标识" prop="nameCode" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="产品编码" prop="thirdId" show-overflow-tooltip></el-table-column>
<el-table-column label="医疗器械注册人" prop="ylqxzcrbarmc"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="器械类别" prop="qxlb" show-overflow-tooltip></el-table-column>
<el-table-column label="配送企业" prop="companyName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="160">
<template slot-scope="scope">
<el-button type="text" size="small" @click.native.stop="handleDetailClick(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog <pagination
title="耗材字典详情" v-show="pageTotal>0"
:visible.sync="udiRlDetailVisible" :total="pageTotal"
width="80%" :page.sync="listQuery.page"
:close-on-click-modal="false" :limit.sync="listQuery.limit"
:close-on-press-escape="false" @pagination="handleErpPageChange"
append-to-body
v-if="udiRlDetailVisible"
>
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog>
</el-dialog>
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%"> ></pagination>
<el-form :model="form"> </el-card>
<el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert">
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div>
<el-dialog
title="耗材字典详情"
:visible.sync="udiRlDetailVisible"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="udiRlDetailVisible"
>
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog>
</el-dialog>
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form">
<el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert">
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
import {filterCompanyProductRelevance} from "../../../api/basic/udiRlSuptRelevance"; import {filterCompanyProductRelevance} from "../../../api/basic/udiRlSuptRelevance";
import {addApplyDetail,addApply} from "../../../api/purchase/purApply"; import {addApplyDetail, addApply} from "../../../api/purchase/purApply";
import store from "../../../store"; import store from "../../../store";
import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog"; import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog";
import {addOrderDetail} from "@/api/inventory/innerOrder"; import {addOrderDetail} from "@/api/inventory/innerOrder";
export default { export default {
name: "stockOrderNewSelectProduct", name: "stockOrderNewSelectProduct",
props: { props: {
data: { data: {
type: Object, type: Object,
required: true, required: true,
}, },
closeDialog: { closeDialog: {
type: Function, type: Function,
required: true, required: true,
}, },
purType: { purType: {
type: Object, type: Object,
required: true, required: true,
}, },
pId: { pId: {
type: Object, type: Object,
required: true, required: true,
},
}, },
},
data() { data() {
return { return {
showSearch: true, showSearch: true,
listQuery: { listQuery: {
purType: null, purType: null,
udiCode: null, udiCode: null,
unicode: null, unicode: null,
cpmctymc: null, cpmctymc: null,
ggxh: null, ggxh: null,
ylqxzcrbarmc: null, ylqxzcrbarmc: null,
thrPiId: null, thrPiId: null,
page: 1, page: 1,
limit: 10, limit: 10,
},
combineQuery: {
thirdId: "",
relId: "",
erpName: "",
keys: [],
},
ids: [],
radioCheck: null,
dataList: [],
pageTotal: 1,
total: 1,
currentRow: null,
loading: false,
udiRlDetailVisible: false,
thirdSys: [],
thirdSysFk: null,
busTypes: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
}, },
combineQuery: { },
thirdId: "", {
relId: "", text: "最近一个月",
erpName: "", onClick(picker) {
keys: [], const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
}, },
ids:[], },
radioCheck: null, {
dataList: [], text: "最近三个月",
pageTotal: 1, onClick(picker) {
total: 1, const end = new Date();
currentRow: null, const start = new Date();
loading: false, start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
udiRlDetailVisible: false, picker.$emit("pick", [start, end]);
thirdSys: [],
thirdSysFk: null,
busTypes: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
}, },
orderEditor: false, },
orderId: "", ],
currentCert: null, },
certList: [], orderEditor: false,
dialogFormVisible: false, orderId: "",
multipleSelection: null, currentCert: null,
}; certList: [],
dialogFormVisible: false,
multipleSelection: null,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.listQuery = {
purType: null,
udiCode: null,
unicode: null,
cpmctymc: null,
ggxh: null,
ylqxzcrbarmc: null,
thrPiId: null,
page: 1,
limit: 10
}
this.multipleSelection = [];
this.radioCheck = null;
this.currentRow = null;
this.getList();
}, },
methods: { hideSearch() {
onReset() { this.showSearch = !this.showSearch;
this.$router.push({ },
path: "", tableRowClassName({row}) {
}); if (row.checked) return "warning-row";
this.listQuery = { return "";
purType: null, },
udiCode: null, checkSelectable(row) {
unicode: null, return !row.check;
cpmctymc: null, },
ggxh: null, handleCurrentChange(val) {
ylqxzcrbarmc: null, this.unionQuery.page = val;
thrPiId: null, this.getList();
page: 1, },
limit: 10 handleChange(val) {
} this.radioCheck = val.id;
this.multipleSelection = []; this.currentRow = val;
this.radioCheck = null; this.multipleSelection = val
this.currentRow = null; },
this.getList(); handleDetailClick(row) {
}, this.currentRow = row;
hideSearch() { this.udiRlDetailVisible = true;
this.showSearch = !this.showSearch;
},
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
checkSelectable(row) {
return !row.check;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
handleChange(val) {
this.radioCheck = val.id;
this.currentRow = val;
this.multipleSelection = val
},
handleDetailClick(row) {
this.currentRow = row;
this.udiRlDetailVisible = true;
}, },
handleErpPageChange(val) { handleErpPageChange(val) {
this.listQuery.page = val.page; this.listQuery.page = val.page;
this.getList(); this.getList();
}, },
keyup_submit(event) { keyup_submit(event) {
this.listQuery.page = 1; this.listQuery.page = 1;
this.getList(); this.getList();
event.target.select(); event.target.select();
}, },
search() { search() {
this.listQuery.page = 1; this.listQuery.page = 1;
this.getList(); this.getList();
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.listQuery.customerId = store.getters.customerId; this.listQuery.customerId = store.getters.customerId;
filterCompanyProductRelevance(this.listQuery) filterCompanyProductRelevance(this.listQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.dataList = response.data.list || []; this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0; this.pageTotal = response.data.total || 0;
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
this.dataList = []; this.dataList = [];
this.pageTotal = 0; this.pageTotal = 0;
} }
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.dataList = []; this.dataList = [];
this.pageTotal = 0; this.pageTotal = 0;
}); });
}, },
intentBack() { intentBack() {
this.closeDialog(); this.closeDialog();
}, },
confirmSelect() { confirmSelect() {
if (this.multipleSelection == null) { if (this.multipleSelection == null) {
this.$message.error('未选择产品'); this.$message.error('未选择产品');
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
} }
} }
} }
let str = this.multipleSelection.zczbhhzbapzbh; let str = this.multipleSelection.zczbhhzbapzbh;
if (str.search(",") != -1) { if (str.search(",") != -1) {
this.currentCert = null; this.currentCert = null;
this.certList = str.split(','); this.certList = str.split(',');
this.dialogFormVisible = true; this.dialogFormVisible = true;
} else { } else {
this.combine(); this.combine();
} }
}, },
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;
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog(response.data); this.closeDialog(response.data);
} else { } else {
if (response.code == 601) { if (response.code == 601) {
this.$alert(response.message, "提示", { this.$alert(response.message, "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
}); });
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
}, },
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();
} }
},
}, },
components: {udiRlDetailDialog}, },
components: {udiRlDetailDialog},
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);
}
}
} }
}
}
}, },
}; };
</script> </script>
@ -378,10 +388,10 @@ export default {
div /deep/ .el-table .warning-row { div /deep/ .el-table .warning-row {
background: #bebebe; background: #bebebe;
} }
div /deep/ .el-table .success-row { div /deep/ .el-table .success-row {
background: #ffffff; background: #ffffff;
} }
</style> </style>

Loading…
Cancel
Save