注册备案证号为空问题

dev
anthonywj 2 years ago
parent f0c24f83c6
commit c913a1554c

@ -140,7 +140,10 @@
<el-form :model="form"> <el-form :model="form">
<el-form-item label="" prop="isGive"> <el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert"> <el-radio-group v-model="currentCert">
<el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio> <el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{
item
}}
</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -170,6 +173,7 @@
import {addBizProduct} from "@/api/inout/orderDetailCode"; import {addBizProduct} from "@/api/inout/orderDetailCode";
import {filterCompanyProductRelevance} from "@/api/basic/udiRlSuptRelevance"; import {filterCompanyProductRelevance} from "@/api/basic/udiRlSuptRelevance";
import udiRlDetailDialog from "../purchase/purApply/purUdiRlDetailDialog"; import udiRlDetailDialog from "../purchase/purApply/purUdiRlDetailDialog";
import {isBlank} from "@/utils/strUtil";
export default { export default {
name: "stockOrderNewSelectProduct",// name: "stockOrderNewSelectProduct",//
@ -282,7 +286,7 @@ export default {
return; return;
} }
let str = this.currentRow.zczbhhzbapzbh; let str = this.currentRow.zczbhhzbapzbh;
if (this.str.search(",") != -1) { if (!isBlank(str) && str.search(",") != -1) {
this.currentCert = null; this.currentCert = null;
this.certList = str.split(','); this.certList = str.split(',');
this.dialogFormVisible = true; this.dialogFormVisible = true;

@ -1,440 +1,444 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<div> <div>
<el-form :inline="true" :model="listQuery" size="mini"> <el-form :inline="true" :model="listQuery" size="mini">
<el-row style="margin-top: 15px;width: 1000px"> <el-row style="margin-top: 15px;width: 1000px">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.udiCode" <el-input v-model="listQuery.udiCode"
style="width: 600px" style="width: 600px"
placeholder="请扫描或输入UDI码" placeholder="请扫描或输入UDI码"
clearable="true" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input> @keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码" <el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input> <el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input> <el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人" <el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input> <el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<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="search"></el-button> <el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="confirmSelect"></el-button> <el-button type="primary" icon="search" @click="confirmSelect"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
:data="dataList" :data="dataList"
style="width: 100%" style="width: 100%"
highlight-current-row="false" highlight-current-row="false"
v-loading="loading" v-loading="loading"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@current-change="handleChange" @current-change="handleChange"
ref="multipleTable" ref="multipleTable"
>
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<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"
show-overflow-tooltip
></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="操作" fixed="right" 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-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-dialog
title="耗材字典详情"
:visible.sync="udiRlDetailVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="udiRlDetailVisible"
> >
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog> <!-- <el-table-column-->
</el-dialog> <!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<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"
show-overflow-tooltip
></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="操作" fixed="right" 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-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-dialog
title="耗材字典详情"
:visible.sync="udiRlDetailVisible"
width="85%"
: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-dialog title="请选择对应的注册/备案证" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="" prop="isGive"> <el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert"> <el-radio-group v-model="currentCert">
<el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio> <el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{
</el-radio-group> item
</el-form-item> }}
</el-form> </el-radio>
<div slot="footer" class="dialog-footer"> </el-radio-group>
<el-button type="primary" @click="selectCert"> </el-button> </el-form-item>
<el-button @click="dialogFormVisible = false"> </el-button> </el-form>
</div> <div slot="footer" class="dialog-footer">
</el-dialog> <el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getStockOrderDetailInstrumentById, stockOrderDetailFilterProduct} from "../../../api/inout/stockOrder"; import {getStockOrderDetailInstrumentById, stockOrderDetailFilterProduct} from "../../../api/inout/stockOrder";
import store from "../../../store"; import store from "../../../store";
import udiRlDetailDialog from "./../../"; import udiRlDetailDialog from "./../../";
import {isBlank} from "@/utils/strUtil";
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,
},
}, },
data() { },
return {
listQuery: { data() {
udiCode: "", return {
unionCode: "", listQuery: {
cpmctymc: "", udiCode: "",
ggxh: "", unionCode: "",
ylqxzcrbarmc: "", cpmctymc: "",
thrPiId: "", ggxh: "",
page: 1, ylqxzcrbarmc: "",
limit: 10, thrPiId: "",
page: 1,
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 = {
udiCode: "",
unionCode: "",
cpmctymc: "",
ggxh: "",
ylqxzcrbarmc: "",
thrPiId: "",
page: 1,
limit: 10,
},
this.getList();
}, },
methods: { tableRowClassName({row}) {
onReset() { if (row.checked) return "warning-row";
// this.$router.push({ return "";
// path: "", },
// }); checkSelectable(row) {
this.listQuery = { return !row.check;
udiCode: "", },
unionCode: "", handleCurrentChange(val) {
cpmctymc: "", this.unionQuery.page = val;
ggxh: "", this.getList();
ylqxzcrbarmc: "", },
thrPiId: "", handleChange(val) {
page: 1, this.radioCheck = val.id;
limit: 10, this.currentRow = val;
}, this.multipleSelection = val
this.getList(); },
}, handleDetailClick(row) {
tableRowClassName({row}) { this.currentRow = row;
if (row.checked) return "warning-row"; this.udiRlDetailVisible = true;
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) {
this.listQuery.page = val;
this.getList();
},
keyup_submit(event) {
this.listQuery.page = 1;
this.getList();
event.target.select();
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.listQuery.customerId = store.getters.customerId;
if(this.listQuery.customerId==110 && this.data.formData!=null && this.data.formData!=undefined){
this.listQuery.companyName=this.data.formData.corpName
}
if(this.listQuery.customerId!=110 && this.data!=null && this.data!=undefined){
this.listQuery.companyName=this.data.corpName
}
stockOrderDetailFilterProduct(this.listQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else {
this.$message.error(response.message);
this.dataList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
confirmSelect() {
if (this.multipleSelection == null) {
this.$message.error('未选择产品');
return;
}
if (this.ids.length > 0) { },
for (var i = 0; i < this.ids.length; i++) { handleErpPageChange(val) {
if (this.ids[i] == this.multipleSelection.rlId) { this.listQuery.page = val;
this.$message.error("该产品已录入!"); this.getList();
return },
} keyup_submit(event) {
} this.listQuery.page = 1;
} this.getList();
event.target.select();
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
let str = this.multipleSelection.zczbhhzbapzbh; this.loading = true;
if (str.search(",") != -1) { this.listQuery.customerId = store.getters.customerId;
this.currentCert = null; if (this.listQuery.customerId == 110 && this.data.formData != null && this.data.formData != undefined) {
this.certList = str.split(','); this.listQuery.companyName = this.data.formData.corpName
this.dialogFormVisible = true; }
} else { if (this.listQuery.customerId != 110 && this.data != null && this.data != undefined) {
this.combine(); this.listQuery.companyName = this.data.corpName
} }
},
combine() { stockOrderDetailFilterProduct(this.listQuery)
this.loading = true; .then((response) => {
let tQuery = {
productId:this.multipleSelection.rlId,
productName:this.multipleSelection.cpmctymc,
count:1,
orderIdFk:this.pId,
supId:this.multipleSelection.customerId,
zczbhhzbapzbh:this.multipleSelection.zczbhhzbapzbh
};
addPlanDetail(tQuery).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog(response.data); this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else { } else {
if (response.code == 601) { this.$message.error(response.message);
this.$alert(response.message, "提示", { this.dataList = [];
confirmButtonText: "确定", this.pageTotal = 0;
});
} else
this.$message.error(response.message);
} }
}).catch(() => { })
.catch(() => {
this.loading = false; this.loading = false;
this.dataList = [];
this.pageTotal = 0;
}); });
},
intentBack() {
this.closeDialog();
},
},
selectCert() { confirmSelect() {
if (this.currentCert == null) { if (this.multipleSelection == null) {
this.$message.error("请先选择对应的注册证!"); this.$message.error('未选择产品');
} else { return;
this.multipleSelection.zczbhhzbapzbh = this.currentCert; }
this.combine();
} if (this.ids.length > 0) {
for (var i = 0; i < this.ids.length; i++) {
if (this.ids[i] == this.multipleSelection.rlId) {
this.$message.error("该产品已录入!");
return
}
}
}
}, let str = this.multipleSelection.zczbhhzbapzbh;
if (!isBlank(str) && str.search(",") != -1) {
this.currentCert = null;
this.certList = str.split(',');
this.dialogFormVisible = true;
} else {
this.combine();
}
}, },
components: {udiRlDetailDialog},
created() { combine() {
if (this.$isNotBlank(this.data)) { this.loading = true;
let tQuery = {
productId: this.multipleSelection.rlId,
productName: this.multipleSelection.cpmctymc,
count: 1,
orderIdFk: this.pId,
supId: this.multipleSelection.customerId,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh
};
addPlanDetail(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
// this.listQuery.nameCode = this.data.udi; },
// if (this.data.billType != null) {
// this.listQuery.billType = this.data.billType; selectCert() {
// } else if (this.currentCert == null) {
// this.listQuery.billType = this.data.formData.billType; this.$message.error("请先选择对应的注册证!");
} else {
this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine();
}
// if (this.data.formData != null) {
// this.listQuery.corpId = this.data.formData.corpId;
// }
// this.orderEditor = this.data.orderEditor;
// this.orderId = this.data.orderId;
this.ids = [];
if (this.data.stockOrderLists.length > 0) {
for (var i = 0; i < this.data.stockOrderLists.length; i++) {
this.ids.push(this.data.stockOrderLists[i].productId);
}
}
}
this.getList();
}, },
},
components: {udiRlDetailDialog},
created() {
if (this.$isNotBlank(this.data)) {
// this.listQuery.nameCode = this.data.udi;
// if (this.data.billType != null) {
// this.listQuery.billType = this.data.billType;
// } else
// this.listQuery.billType = this.data.formData.billType;
// if (this.data.formData != null) {
// this.listQuery.corpId = this.data.formData.corpId;
// }
// this.orderEditor = this.data.orderEditor;
// this.orderId = this.data.orderId;
this.ids = [];
if (this.data.stockOrderLists.length > 0) {
for (var i = 0; i < this.data.stockOrderLists.length; i++) {
this.ids.push(this.data.stockOrderLists[i].productId);
}
}
}
this.getList();
},
}; };
</script> </script>
<style scoped> <style scoped>
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
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>

@ -137,6 +137,7 @@ import {filterCompanyProductRelevance} from "../../../api/basic/udiRlSuptRelevan
import store from "../../../store"; import store from "../../../store";
import {addOrderDetail} from "@/api/purchase/purOrder" import {addOrderDetail} from "@/api/purchase/purOrder"
import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog"; import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog";
import {isBlank} from "@/utils/strUtil";
export default { export default {
name: "stockOrderNewSelectProduct", name: "stockOrderNewSelectProduct",
@ -339,7 +340,7 @@ export default {
} }
} }
let str = this.multipleSelection.zczbhhzbapzbh; let str = this.multipleSelection.zczbhhzbapzbh;
if (str.search(",") != -1) { if (!isBlank(str) && str.search(",") != -1) {
this.currentCert = null; this.currentCert = null;
this.certList = str.split(','); this.certList = str.split(',');
this.dialogFormVisible = true; this.dialogFormVisible = true;

@ -122,6 +122,7 @@ import {filterCompanyProductRelevance} from "../../../api/basic/udiRlSuptRelevan
import store from "../../../store"; import store from "../../../store";
import {addPlanDetail} from "@/api/purchase/purPlan" import {addPlanDetail} from "@/api/purchase/purPlan"
import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog"; import udiRlDetailDialog from "./../../purchase/purApply/purUdiRlDetailDialog";
import {isBlank} from "@/utils/strUtil";
export default { export default {
name: "stockOrderNewSelectProduct", name: "stockOrderNewSelectProduct",
@ -314,7 +315,7 @@ export default {
} }
} }
let str = this.multipleSelection.zczbhhzbapzbh; let str = this.multipleSelection.zczbhhzbapzbh;
if (str.search(",") != -1) { if (!isBlank(str) && str.search(",") != -1) {
this.currentCert = null; this.currentCert = null;
this.certList = str.split(','); this.certList = str.split(',');
this.dialogFormVisible = true; this.dialogFormVisible = true;

@ -1,158 +1,161 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<div> <div>
<el-form :inline="true" :model="listQuery" size="mini"> <el-form :inline="true" :model="listQuery" size="mini">
<el-row style="margin-top: 15px;width: 1000px"> <el-row style="margin-top: 15px;width: 1000px">
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.udiCode" <el-input v-model="listQuery.udiCode"
style="width: 600px" style="width: 600px"
placeholder="请扫描或输入UDI码" placeholder="请扫描或输入UDI码"
clearable="true" clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input> @keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码" <el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input> <el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input> <el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人" <el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="listQuery.thrPiId" placeholder="第三方物资编码" clearable="true"></el-input> <el-input v-model="listQuery.thrPiId" placeholder="第三方物资编码" clearable="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<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="search"></el-button> <el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="confirmSelect"></el-button> <el-button type="primary" icon="search" @click="confirmSelect"></el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
:data="dataList" :data="dataList"
style="width: 100%" style="width: 100%"
highlight-current-row="false" highlight-current-row="false"
v-loading="loading" v-loading="loading"
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@current-change="handleChange" @current-change="handleChange"
ref="multipleTable" ref="multipleTable"
>
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<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"
show-overflow-tooltip
></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="操作" fixed="right" 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-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-dialog
title="耗材字典详情"
:visible.sync="udiRlDetailVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
v-if="udiRlDetailVisible"
> >
<udiRlDetailDialog :editQuery="currentRow"></udiRlDetailDialog> <!-- <el-table-column-->
</el-dialog> <!-- type="selection"-->
<!-- width="55">-->
<!-- </el-table-column>-->
<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"
show-overflow-tooltip
></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="操作" fixed="right" 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-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-dialog
title="耗材字典详情"
:visible.sync="udiRlDetailVisible"
width="85%"
: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-dialog title="请选择对应的注册/备案证" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form"> <el-form :model="form">
<el-form-item label="" prop="isGive"> <el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert"> <el-radio-group v-model="currentCert">
<el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio> <el-radio style="width: 100%; margin-top: 10px;" :label="item" :key="item" v-for="item in certList">{{
</el-radio-group> item
</el-form-item> }}
</el-form> </el-radio>
<div slot="footer" class="dialog-footer"> </el-radio-group>
<el-button type="primary" @click="selectCert"> </el-button> </el-form-item>
<el-button @click="dialogFormVisible = false"> </el-button> </el-form>
</div> <div slot="footer" class="dialog-footer">
</el-dialog> <el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -160,282 +163,283 @@ import {getStockOrderDetailInstrumentById, stockOrderDetailFilterProduct} from "
import store from "../../../store"; import store from "../../../store";
import udiRlDetailDialog from "./../../"; import udiRlDetailDialog from "./../../";
import {addApplyDetail} from "@/api/purchase/purApply"; import {addApplyDetail} from "@/api/purchase/purApply";
import {isBlank} from "@/utils/strUtil";
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,
},
}, },
data() { },
return {
listQuery: { data() {
udiCode: "", return {
unionCode: "", listQuery: {
cpmctymc: "", udiCode: "",
ggxh: "", unionCode: "",
ylqxzcrbarmc: "", cpmctymc: "",
thrPiId: "", ggxh: "",
page: 1, ylqxzcrbarmc: "",
limit: 10, thrPiId: "",
page: 1,
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 = {
udiCode: "",
unionCode: "",
cpmctymc: "",
ggxh: "",
ylqxzcrbarmc: "",
thrPiId: "",
page: 1,
limit: 10,
},
this.getList();
}, },
methods: { tableRowClassName({row}) {
onReset() { if (row.checked) return "warning-row";
// this.$router.push({ return "";
// path: "", },
// }); checkSelectable(row) {
this.listQuery = { return !row.check;
udiCode: "", },
unionCode: "", handleCurrentChange(val) {
cpmctymc: "", this.unionQuery.page = val;
ggxh: "", this.getList();
ylqxzcrbarmc: "", },
thrPiId: "", handleChange(val) {
page: 1, this.radioCheck = val.id;
limit: 10, this.currentRow = val;
}, this.multipleSelection = val
this.getList(); },
}, handleDetailClick(row) {
tableRowClassName({row}) { this.currentRow = row;
if (row.checked) return "warning-row"; this.udiRlDetailVisible = true;
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) {
this.listQuery.page = val;
this.getList();
},
keyup_submit(event) {
this.listQuery.page = 1;
this.getList();
event.target.select();
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
this.listQuery.customerId = store.getters.customerId;
if(this.listQuery.customerId==110 && this.data.formData!=null && this.data.formData!=undefined){
this.listQuery.companyName=this.data.formData.corpName
}
if(this.listQuery.customerId!=110 && this.data!=null && this.data!=undefined){
this.listQuery.companyName=this.data.corpName
}
stockOrderDetailFilterProduct(this.listQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else {
this.$message.error(response.message);
this.dataList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
confirmSelect() {
if (this.multipleSelection == null) {
this.$message.error('未选择产品');
return;
}
if (this.ids.length > 0) { },
for (var i = 0; i < this.ids.length; i++) { handleErpPageChange(val) {
if (this.ids[i] == this.multipleSelection.rlId) { this.listQuery.page = val;
this.$message.error("该产品已录入!"); this.getList();
return },
} keyup_submit(event) {
} this.listQuery.page = 1;
} this.getList();
event.target.select();
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
let str = this.multipleSelection.zczbhhzbapzbh; this.loading = true;
if (str.search(",") != -1) { this.listQuery.customerId = store.getters.customerId;
this.currentCert = null; if (this.listQuery.customerId == 110 && this.data.formData != null && this.data.formData != undefined) {
this.certList = str.split(','); this.listQuery.companyName = this.data.formData.corpName
this.dialogFormVisible = true; }
} else { if (this.listQuery.customerId != 110 && this.data != null && this.data != undefined) {
this.combine(); this.listQuery.companyName = this.data.corpName
} }
},
combine() { stockOrderDetailFilterProduct(this.listQuery)
this.loading = true; .then((response) => {
let tQuery = {
productId:this.multipleSelection.rlId,
productName:this.multipleSelection.cpmctymc,
count:1,
orderIdFk:this.pId,
supId:this.multipleSelection.customerId,
zczbhhzbapzbh:this.multipleSelection.zczbhhzbapzbh
};
addPlanDetail(tQuery).then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog(response.data); this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else { } else {
if (response.code == 601) { this.$message.error(response.message);
this.$alert(response.message, "提示", { this.dataList = [];
confirmButtonText: "确定", this.pageTotal = 0;
});
} else
this.$message.error(response.message);
} }
}).catch(() => { })
.catch(() => {
this.loading = false; this.loading = false;
this.dataList = [];
this.pageTotal = 0;
}); });
},
intentBack() {
this.closeDialog();
},
},
selectCert() { confirmSelect() {
if (this.currentCert == null) { if (this.multipleSelection == null) {
this.$message.error("请先选择对应的注册证!"); this.$message.error('未选择产品');
} else { return;
this.multipleSelection.zczbhhzbapzbh = this.currentCert; }
this.combine();
} if (this.ids.length > 0) {
for (var i = 0; i < this.ids.length; i++) {
if (this.ids[i] == this.multipleSelection.rlId) {
this.$message.error("该产品已录入!");
return
}
}
}
}, let str = this.multipleSelection.zczbhhzbapzbh;
if (!isBlank(str) && str.search(",") != -1) {
this.currentCert = null;
this.certList = str.split(',');
this.dialogFormVisible = true;
} else {
this.combine();
}
}, },
components: {udiRlDetailDialog},
created() { combine() {
if (this.$isNotBlank(this.data)) { this.loading = true;
let tQuery = {
productId: this.multipleSelection.rlId,
productName: this.multipleSelection.cpmctymc,
count: 1,
orderIdFk: this.pId,
supId: this.multipleSelection.customerId,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh
};
addPlanDetail(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
// this.listQuery.nameCode = this.data.udi; },
// if (this.data.billType != null) {
// this.listQuery.billType = this.data.billType; selectCert() {
// } else if (this.currentCert == null) {
// this.listQuery.billType = this.data.formData.billType; this.$message.error("请先选择对应的注册证!");
} else {
this.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine();
}
// if (this.data.formData != null) {
// this.listQuery.corpId = this.data.formData.corpId;
// }
// this.orderEditor = this.data.orderEditor;
// this.orderId = this.data.orderId;
this.ids = [];
if (this.data.stockOrderLists.length > 0) {
for (var i = 0; i < this.data.stockOrderLists.length; i++) {
this.ids.push(this.data.stockOrderLists[i].productId);
}
}
}
this.getList();
}, },
},
components: {udiRlDetailDialog},
created() {
if (this.$isNotBlank(this.data)) {
// this.listQuery.nameCode = this.data.udi;
// if (this.data.billType != null) {
// this.listQuery.billType = this.data.billType;
// } else
// this.listQuery.billType = this.data.formData.billType;
// if (this.data.formData != null) {
// this.listQuery.corpId = this.data.formData.corpId;
// }
// this.orderEditor = this.data.orderEditor;
// this.orderId = this.data.orderId;
this.ids = [];
if (this.data.stockOrderLists.length > 0) {
for (var i = 0; i < this.data.stockOrderLists.length; i++) {
this.ids.push(this.data.stockOrderLists[i].productId);
}
}
}
this.getList();
},
}; };
</script> </script>
<style scoped> <style scoped>
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
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