8/02 药品

20240912_adapter_z
wangwei 1 year ago
parent d061ea69c2
commit 8339b4f557

@ -415,7 +415,7 @@
</el-form>
<div style="text-align: center; margin-top: 20px;">
<el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
<el-button @click="closeAddDialog"></el-button>
</div>
<el-dialog
@ -610,7 +610,7 @@ export default {
} else {
this.newProductData.requireScanCode = 0
}
this.saveLoading = true
if (this.detailList.length <= 0) {
this.$message.error('请先添加药品层级标识')
return
@ -637,6 +637,7 @@ export default {
this.newProductData.drugLevelLists = this.detailList;
}
this.saveLoading = true
addDrug(this.newProductData).then((res) => {
this.saveLoading = false
if (res.code == 20000) {

@ -0,0 +1,945 @@
<template>
<div>
<el-card>
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" label-width="120px">
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
clearable>
<el-option
v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[`${item.columnName}`]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option
v-for="item in options[item.clickFuc]"
:key="item.code"
:label="item.label"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="dateRange"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd HH:mm:ss"
:disabled="executeEval(null,item.disabledFuc,false)"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item>
</template>
</el-row>
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="供应商:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.unitFk"-->
<!-- style="width: 90%"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="请选择供应商"-->
<!-- :remote-method="findMethod"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in fromOptions"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.erpId"-->
<!-- >-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="物资编码:">-->
<!-- <el-input v-model="filterQuery.unionCode" style="width: 90%" placeholder="请输入DI/医保编码/商品条码"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="物资名称:">-->
<!-- <el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入物资名称"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="规格型号:">-->
<!-- <el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="对照条件:">-->
<!-- <el-select v-model="filterQuery.filterType" style="width: 90%" placeholder="请选择过滤对照条件">-->
<!-- <el-option-->
<!-- v-for="item in filterList"-->
<!-- :key="item.filterType"-->
<!-- :label="item.sysName"-->
<!-- :value="item.filterType">-->
<!-- <span style="float: left">{{ item.sysName }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="生产企业:">-->
<!-- <el-input v-model="filterQuery.ylqxzcrbarmc" style="width: 90%" placeholder="请输入生产企业/注册备案人"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="第三方物资编码:">-->
<!-- <el-input v-model="filterQuery.thrPiId" style="width: 90%" placeholder="请输入第三方物资编码"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="状态:" v-if="isSpCombine">-->
<!-- <el-select v-model="filterQuery.lockStatus" style="width: 90%" placeholder="状态">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="未提交" value="1"></el-option>-->
<!-- <el-option label="已提交" value="2"></el-option>-->
<!-- <el-option label="已锁定" value="3"></el-option>-->
<!-- </el-select>-->
<!-- </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-bottom-right" @click="selectProduct()"></el-button>-->
<el-button type="primary" icon="search" @click="lockProducts('3')" v-if="isSpCombine"></el-button>
<el-button type="primary" icon="search" @click="lockProducts('1')" v-if="isSpCombine">退</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" key="1" @selection-change="handleSelectionChange" style="width: 100%"
border>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{
item.lableRuleObj[scope.row[item.columnName]]
}}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag
:type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{
item.lableRuleObj ? item.lableRuleObj[scope.row[item.columnName]] : scope.row[item.columnName]
}}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{
scope.row[item.columnName]
}}</span>
</template>
</el-table-column>
</template>
<!-- <el-table-column type="selection" width="55"></el-table-column>-->
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="供应商" prop="companyName" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="最小销售产品标识" prop="nameCode" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="主系统物资编码" prop="mainId" 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="price" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="物资分类" prop="classifyName" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column-->
<!-- v-if="isSpCombine"-->
<!-- label="状态"-->
<!-- prop="lockStatus"-->
<!-- width="80"-->
<!-- show-overflow-tooltip-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- {{ lockStatusMap[scope.row.lockStatus] }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column width="120" label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="text" @click.native.stop="handleModifyClick(scope.row)">详情</el-button>-->
<!-- <el-button type="text" @click.native.stop="handleDeleteClick(scope.row.id)">移除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<el-dialog
title="药品信息详情"
:visible.sync="editDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="60%"
v-if="editDialogVisible"
>
<selectDetail
:detailQuery="detailQuery"
:relevanceEdit="relevanceEdit"
:checked="checked"
@closeUdi="closeUdi"
>
</selectDetail>
</el-dialog>
<el-dialog
title="选入产品信息"
:visible.sync="selectProductVisible"
width="85%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="selectProductVisible"
>
<selectProduct
:closeSelDialog="closeDialog"
:uuid="uuid"
:unitFk="filterQuery.unitFk"
></selectProduct>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</el-card>
</div>
</template>
<script>
import {
getUdiInfos,
deletetUdiInfos,
updatetUdiInfos,
updateErpProduct,
uploadSmp,
thirdSysDetail,
removeRl, sysFilter, sysFilterOptimize, spcombie, lockStatus
} from "@/api/basic/udiRelevance";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {filterByUuid, filterCompany} from "@/api/basic/udiInfo";
import {filterCompanyProductRelevance, deleteCompanyProductRelevance} from "@/api/basic/udiRlSuptRelevance";
import {getBasicUnitMaintainsOptimize} from "@/api/basic/basicUnitMaintain"
// import selectProduct from "./basicCompanyProductsImport";
// import selectUdi from "./udiInfoRelevance.vue";
// import selectErp from "./udiInfoselectErpUdi";
// import selectLocalUdi from "./UdiInfoSelectLocalUdi";
import selectDetail from "./drugInfoManageSpDetail";
import {executeFuc, getHead} from "@/utils/customConfig";
export default {
data() {
return {
showSearch: true,
filterQuery: {
lockStatus: null,
unionCode: null,
udiCode: null,
ylqxzcrbarmc: "",
cpmctymc: "",
nameCode: "",
ggxh: null,
page: 1,
limit: 20,
addType: 1,
thrPiId: null,
filterType: null,
companyName: null,
unitFk: null,
productsType: 2
},
fromOptions: [],
editQuery: null,
relevanceEdit: {
id: null,
thirdId: "",
isDisable: null,
isUseDy: false,
isLock: null,
isAdavence: null,
},
detailQuery: null,
defaultSys: null,
isImport: false,
isImportUdi: false,
isUploadSmp: false,
isSpCombine: false,
isImportFile: false,
uploadFileUrl: null,
checked: false,
list: [],
detailList: [],
sysList: [],
filterList: [],
options: {
findMethod: [],
getSysFilter: [],
},
queryList: [],
tableHeader: [],
fromList: [],
total: 0,
thirdNo: "",
uuid: "111",
originUuid: null,
thirdId: null,
relId: "",
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null
},
selectProductVisible: false,
multipleSelection: [],
editDialogVisible: false, //
selectUdiDialogVisible: false, //
selectErpDialogVisible: false, //ERP
selectLocalVisible: false, //UDI
selectVersionVisible: false,
isUseDyCheck: false,
lockStatusMap: {"1": "未提交", "2": "已提交", "3": "已锁定"},
loading: false,
activeNames: ['1']
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
lockStatus: null,
unionCode: null,
udiCode: null,
ylqxzcrbarmc: "",
cpmctymc: "",
thrPiId: null,
nameCode: "",
ggxh: null,
page: 1,
limit: 20,
addType: 1,
productsType: 2
};
this.total = 0;
this.list = [];
this.getList();
},
search() {
this.filterQuery.page = 1;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
// if (this.$isBlank(this.filterQuery.unitFk)) {
// this.$message.error("");
// return;
// }
this.loading = true;
filterCompanyProductRelevance(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
keyup_submit(event) {
this.filterQuery.page = 1;
this.getList();
event.target.select();
},
handleDetail(row) {
this.editQuery = row;
},
deleteOrders(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deletetUdiInfos(tquery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
},
selectProduct() {
if (this.$isBlank(this.filterQuery.unitFk)) {
this.$message.error("请先选择供应商!");
return;
}
this.selectProductVisible = true;
},
intentDetail() {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
},
addSelectErp(row) {
this.defaultSys = row.sysId;
this.isImport = false;
this.selectErpDialogVisible = true;
},
removeErp(row) {
this.$confirm("此操作将解除该绑定产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
relId: this.editQuery.id,
thirdSys: row.sysId
};
removeRl(query)
.then((response) => {
if (response.code == 20000) {
this.getThirdSysDetail()();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
})
.catch(() => {
});
},
intentSelectErp(val) {
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = false;
this.thisData = val;
this.selectErpDialogVisible = true;
},
intentImportErp(val) {
this.defaultSys = null;
this.uuid = val.uuid;
this.relId = val.id;
this.isImport = true;
this.thisData = val;
this.selectErpDialogVisible = true;
},
uploadSMP() {
var selectData = this.multipleSelection;
var keys = [];
selectData.forEach((obj) => {
keys.push(obj.id);
});
var tquery = {
keys: keys,
};
uploadSmp(tquery)
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: "上传成功!",
});
} else {
this.$message({
type: "error",
message: response.message,
});
}
})
.catch(() => {
this.$message({
type: "error",
message: "上传失败",
});
});
},
intentSelectUdi(val) {
this.relId = val.id;
this.isImportUdi = true;
this.thisData = val;
this.selectLocalVisible = true;
},
intentImportUdi() {
this.relId = null;
this.selectLocalVisible = true;
},
handleSelectionChange( val) {
this.multipleSelection = val;
},
cancelDialog() {
this.editDialogVisible = false;
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
handleModifyClick(_this, row) {
_this.uuid = row.uuid;
_this.relId = row.rlId;
_this.isImport = false;
_this.thisData = row;
_this.editDialogVisible = true;
_this.detailQuery = row;
_this.relevanceEdit = {
id: row.rlId,
// thirdId: row.thirdId,
isUseDy: row.isUseDy,
isDisable: row.isDisable,
isLock: row.isLock,
isAdavence: row.isAdavence,
};
_this.checked = row.isUseDy == 1;
},
handleDeleteClick(_this, row) {
_this.$confirm("此操作将删除该供应商器械信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: row.id,
};
deleteCompanyProductRelevance(dQuery)
.then((response) => {
_this.loading = false;
if (response.code == 20000) {
_this.$message.success("删除成功");
} else {
_this.$message.error(response.message);
}
_this.getList();
})
.catch(() => {
_this.loading = false;
});
})
.catch(() => {
});
},
lockProducts(status) {
let selectData = this.multipleSelection;
console.log("dayin dangqian",this.multipleSelection)
let postQuery = {
ids: [],
lockStatus: status,
}
selectData.forEach((row) => {
postQuery.ids.push(row.rlId);
});
if (postQuery.ids.length <= 0) {
this.$message.error("请先选择产品!");
return
}
lockStatus(postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$message.success(response.data);
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
},
closeUdi(val) {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.getThirdSysDetail();
if (val) {
this.getList();
}
},
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
getSysFilter(_this, query) {
sysFilterOptimize()
.then((response) => {
_this.loading = false;
_this.options.getSysFilter = response.data.list || [];
})
.catch(() => {
_this.loading = false;
_this.options.getSysFilter = []
});
},
uploadErpProduct() {
updateErpProduct()
.then((response) => {
if (response.code == 20000) {
this.$message({
type: "success",
message: response.data,
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
selectVersion() {
this.selectVersionVisible = true;
this.uuid = this.editQuery.uuid;
this.originUuid = this.editQuery.originUuid;
},
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.selectVersionVisible = false;
this.selectProductVisible = false;
this.getList();
},
onAddSubmit() {
if (this.checked == true) {
this.relevanceEdit.isUseDy = 1;
} else {
this.relevanceEdit.isUseDy = 0;
}
this.relevanceEdit.isDisable = this.editQuery.isDisable;
this.relevanceEdit.isLock = this.editQuery.isLock;
this.relevanceEdit.isAdavence = this.editQuery.isAdavence;
updatetUdiInfos(this.relevanceEdit)
.then((response) => {
this.loading = false;
this.getList();
this.cancelDialog();
})
.catch(() => {
this.loading = false;
this.cancelDialog();
});
},
selectSysParam() {
let query = {
paramKey: "smp_isUploadProuct",
};
spcombie().then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isSpCombine = true;
} else {
this.isSpCombine = false;
}
}
});
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isUploadSmp = true;
} else {
this.isUploadSmp = false;
}
}
});
let query1 = {
paramKey: "upload_pi_file_enabled",
};
selectSysParamByKey(query1).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isImportFile = true;
}
}
});
let query2 = {
paramKey: "upload_pi_file_url",
};
selectSysParamByKey(query2).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.paramValue;
}
});
},
findMethod(_this, query) {
let cQuery = {
key: query,
corpType: 2,
page: 1,
limit: 10,
};
getBasicUnitMaintainsOptimize(cQuery)
.then((response) => {
_this.loading = false;
_this.options.findMethod = response.data.list || [];
})
.catch(() => {
_this.loading = false;
_this.options.findMethod = [];
});
},
executeFuc(row, type, clickFuc, value) {
return executeFuc(this, row, type, clickFuc, value);
},
executeEval(row, expression, defaultRet) {
if (expression) {
return eval(expression);
}
return defaultRet;
}
}
,
mounted() {
}
,
components: {
// selectUdi,
// selectErp,
// selectLocalUdi,
// selectProduct,
selectDetail
}
,
created() {
getHead("basicCompanyDrugProducts", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList()
});
this.selectSysParam();
this.getSysFilter(this, "");
this.findMethod(this, "");
}
,
}
;
</script>
<style scoped>
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
padding-bottom: 17px;
padding-top: 17px;
}
</style>

@ -0,0 +1,365 @@
<template>
<div>
<el-card>
<!--<el-table :data="sysList" style="width: 100%" key="2" border>-->
<!-- <el-table-column label="序号" type="index"></el-table-column>-->
<!-- <el-table-column label="系统名称" prop="sysName" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="药品编码" prop="thirdId" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="药品名称" prop="thirdName" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="批准文号" prop="registerNo" show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>-->
<!--</el-table>-->
<el-table v-loading="loading" :data="detailList" style="width: 100%; margin-top: 20px" border key="3" @current-change="handleDetail">
<el-table-column label="层级标识" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column label="包装级别" prop="packLevel" show-overflow-tooltip></el-table-column>
<el-table-column label="层级单位" prop="packUnit" show-overflow-tooltip></el-table-column>
<el-table-column label="上级标识" prop="sjcpbm" show-overflow-tooltip></el-table-column>
<el-table-column label="下级标识" prop="bhxjcpbm" show-overflow-tooltip></el-table-column>
<el-table-column label="下级数量" prop="bhxjsl" show-overflow-tooltip></el-table-column>
</el-table>
<el-form :model="detailQuery" :rules="rules" ref="detailQuery" label-width="100px" style="margin-top: 20px">
<el-collapse v-model="activeNames">
<el-collapse-item name="2">
<template slot="title">
<p class="form-title">药品基本信息</p>
</template>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>药品名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="detailQuery.cpmctymc"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>药品标识:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.nameCode"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>规格型号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.ggxh"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装规格:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.bzgg"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>制剂规格:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.prepnSpec"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>制剂单位:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.prepnUnit"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>商品条码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.sptm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医保编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.ybbm"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>统一社会信用号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.tyshxydm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>批准文号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.zczbhhzbapzbh"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>生产企业:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.manufactory"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>药品描述:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="detailQuery.cpms"
></el-input>
</div>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
</el-form>
</el-card>
</div>
</template>
<script>
import {filterDetail} from "@/api/basic/udiinfoImport";
import {thirdSysDetail} from "@/api/basic/udiRelevance";
import {filterByUuid} from "@/api/basic/udiInfo";
export default {
name: "drugInfoManageSpDetail",
props: {
detailQuery: {
type: Object,
required: true,
},
relevanceEdit: {
type: Object,
required: true,
},
checked:{
type: Boolean,
required: true,
},
},
data() {
return {
sysList: [],
detailList:[],
relevanceEdit: {
id: null,
thirdId: "",
isDisable: null,
isUseDy: false,
isLock: null,
isAdavence: null,
},
activeNames: ["2"]
}
},
methods: {
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
},
getDetailList() {
let ttquery = {
id: this.detailQuery.rlId
};
this.loading = true;
filterByUuid(ttquery)
.then((response) => {
this.isUseDyCheck = false;
this.loading = false;
this.detailList = response.data || [];
this.detailList.forEach((item, index, array) => {
if (item.zxxsbzbhsydysl > 1) {
this.isUseDyCheck = true;
}
});
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
},
},
created() {
console.log("detailQuery",this.detailQuery)
this.getThirdSysDetail();
this.getDetailList(this.detailQuery.id);
}
}
</script>
<style scoped>
.itemTag {
float: left;
text-align: right;
margin-top: 5px;
padding-right: 10px;
width: 35%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
.edit-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 0px;
}
.el-row {
display: flex;
flex-wrap: wrap;
margin-bottom: 6px;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
.el-table .cell.el-tooltip {
white-space: pre-wrap;
}
.form-title {
font-size: 16px;
font-family: Noto Sans SC;
font-weight: bold;
color: #303133;
padding-bottom: 17px;
padding-top: 17px;
}
</style>

@ -96,8 +96,8 @@
<el-table-column label="药品通用名称" prop="cpmctymc" width="160"></el-table-column>
<el-table-column label="制剂规格" prop="prepnSpec" width="90"></el-table-column>
<el-table-column label="制剂单位" prop="prepnUnit" width="90"></el-table-column>
<el-table-column label="包装规格" prop="ggxh" width="100"></el-table-column>
<el-table-column label="包装单位" prop="prepnUnit" width="90"></el-table-column>
<el-table-column label="包装规格" prop="bzgg" width="100"></el-table-column>
<el-table-column label="包装单位" prop="packUnit" width="90"></el-table-column>
<el-table-column label="包装比例" prop="packRatio" width="90"></el-table-column>
<el-table-column label="价格" prop="price" width="90"></el-table-column>
<el-table-column label="批准文号" prop="zczbhhzbapzbh" width="90"></el-table-column>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,836 @@
<template>
<div>
<el-card class="el-card">
<el-form
:model="filterQuery"
size="mini"
label-width="100px"
v-if="showSearch"
>
<el-row>
<el-col :span="8">
<el-form-item label="预验收单号:">
<el-input
v-model="filterQuery.billNo"
placeholder="请输入单号"
style="width: 90%"
clearable="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="往来单位:">
<el-select v-model="filterQuery.fromCorp"
filterable
remote
reserve-keyword
placeholder="请选择往来单位" clearable style="width: 90%">
<el-option
v-for="item in fromInvOptions"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="过滤已选入">
<el-select v-model="filterQuery.filterSelected" style="width: 90%">
<el-option :value="true" label="是"></el-option>
<el-option :value="false" label="否"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预验收带回">
<el-select v-model="filterQuery.inPreInBack" clearable style="width: 90%">
<el-option :value="1" label="带回"></el-option>
<el-option :value="2" label="不带回"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 90%"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注:">
<el-input
v-model="filterQuery.remark"
placeholder="请输入备注"
style="width: 90%"
clearable="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<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="onSubmit"
>查询
</el-button>
<el-button
type="primary"
size="mini"
icon="el-icon-bottom-right"
@click="combine"
:loading="combineLoading"
@close="closeLocalDialog"
>选入
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table
ref="multipleTable"
@select-all="handleAll"
:header-cell-class-name="leftheaderStyle"
@selection-change="handleSelectionChange"
@current-change="getOrderDetails"
v-loading="loading"
:data="list"
style="width: 100%"
highlight-current-row
border
>
<el-table-column
type="selection"
:selectable="checkSelection"
width="45"
></el-table-column>
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column
label="单据号"
prop="billNo"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
width="140"
label="单据类型"
prop="billTypeName"
></el-table-column>
<el-table-column label="往来单位" prop="fromName" width="180">
</el-table-column>
<el-table-column label="所属部门" prop="deptName" width="90">
</el-table-column>
<el-table-column label="所属仓库" prop="invName" width="90">
</el-table-column>
<el-table-column
label="来源订单号"
prop="corpOrderId"
width="140"
show-overflow-tooltip
></el-table-column>
<el-table-column label="来源" prop="fromType" width="120">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column
label="所属科室"
prop="deptName"
width="120"
v-if="enableDept"
>
</el-table-column>
<el-table-column
label="创建时间"
prop="createTime" width="140"
show-overflow-tooltip
>
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column label="校验状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status ===-1 ) | statusFilterType">{{-->
<!-- checkStatus[scope.row.status]-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" width="150" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="printOrder(scope.row)"-->
<!-- >打印-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="rollback(scope.row)"-->
<!-- >撤回-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total > 0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<!--单据业务详情-->
<el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-单据详情</span>
<el-form :inline="true" :model="bizQuery" class="query-form" size="mini">
<el-form-item label="物资名称:">
<el-input
v-model="bizQuery.productName"
placeholder="请输入物资名称"
clearable
>
</el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onBizReset"
>重置
</el-button>
<el-button type="primary" @click="onBizSubmit"
icon="el-icon-search"
>查询
</el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="bizDetailLoading" :data="bizDetailList" style="width: 100%" border
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="物资名称"
prop="coName" width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号" width="160"
prop="spec"
></el-table-column>
<el-table-column
label="批次号" width="120"
prop="batchNo"
></el-table-column>
<el-table-column
label="生产日期" width="120"
prop="productDate"
></el-table-column>
<el-table-column
label="失效日期"
prop="expireDate" width="120"
></el-table-column>
<el-table-column
label="单据数量" width="100"
prop="count"
></el-table-column>
<el-table-column
label="扫码数量"
prop="reCount" width="100"
></el-table-column>
<el-table-column
label="价格" width="100"
prop="price"
></el-table-column>
<el-table-column
label="生产企业" width="180"
prop="manufacturer"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案号"
prop="certCode" width="180"
show-overflow-tooltip
></el-table-column>
</el-table>
<pagination
v-show="bizTotal>0"
:total="bizTotal"
:page.sync="bizQuery.page"
:limit.sync="bizQuery.limit"
@pagination="getBizDetailList"
/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import {
deleteInvByBillNo,
getOrderFilter,
rollbackOrder,
} from "@/api/inout/order";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getResultDetailList} from "@/api/inout/orderDetailResult";
import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getCodeList} from "@/api/inout/code";
import {
inspectionOrderPDFFromTemplateFile,
orderPDFFromTemplateFile,
} from "@/api/itextpdf/orderPrint";
import {selectCorpList} from "@/api/basic/basicUnitMaintain";
const formJson = {
site_id: "",
site_name: "",
describe: "",
ads: [],
};
export default {
name: "IoAuditedOrder",
props: {
closeDialogtwo: {
type: Function,
required: true,
},
checkPreInOrders: {
type: Array,
required: true,
},
},
data() {
return {
showSearch: true,
filterQuery: {
id: "",
billNo: null,
mainAction: null,
action: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
filterSelected: true,
inPreInBack: 1,
},
fromInvOptions: [],
checkStatus: {
1: "草稿",
2: "等待处理",
3: "等待校验",
4: "处理异常",
5: "待核对",
6: "校验异常",
7: "已审核",
8: "审核拒绝",
9: "正在处理", 10: "待审核", 11: "待配货",
},
invList: [],
list: [],
total: 0,
loading: false,
index: null,
enableDept: false,
fromTypeMap: {
1: "UDIMS平台",
2: "网页新增",
3: "pda即时校验",
4: "pda未校验",
5: "pc端扫码精灵",
6: "流转自动补单",
7: "UDI供应商平台",
8: "平衡补录单据",
10: "手动补单",
11: "仓库盘点",
12: "采购计划",
13: "领用单据",
14: "第三方系统单据",
},
deleteData: {
id: "",
status: 10,
},
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
formData: formJson,
deleteLoading: false,
busTypes: [],
currentRow: {},
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]);
},
},
],
},
bizQuery: {
productName: null,
orderIdFk: null,
page: 1,
limit: 10,
},
bizTotal: 0,
bizDetailLoading: false,
bizDetailList: [],
codeQuery: {
orderIdFk: null,
page: 1,
limit: 10,
},
codeTotal: 0,
codeDetailLoading: false,
codeDetailList: [],
resultQuery: {
orderId: null,
code: null,
page: 1,
limit: 10,
},
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
multipleSelection: [],
selectbox: [],
selectRow: null,
combineLoading: false
};
},
components: {},
methods: {
//
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
id: "",
billNo: null,
mainAction: null,
action: null,
page: 1,
limit: 10,
startTime: null,
endTime: null,
filterSelected: true,
inPreInBack: 1,
};
this.actDateRange = null
this.getList();
},
//
onSubmit() {
this.loading = true;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
this.filterQuery.page = 1;
this.getList();
},
//
combine() {
this.combineLoading = true
this.closeDialogtwo();
this.$emit("giveselectbox", this.selectbox);
this.combineLoading = false
},
//
checkSelection(row, index) {
let flag = true;
if (this.checkPreInOrders.length === 0) {
flag = true;
} else {
if (this.checkPreInOrders.includes(row.billNo)) {
flag = false;
} else {
flag = true;
}
}
return flag;
},
//
closeLocalDialog() {
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getBusType() {
let query = {
code: this.filterQuery.invCode,
enabled: true,
};
getLocalJoinByUser(query)
.then((response) => {
this.busTypes = response.data.list || [];
})
.catch(() => {
});
},
//
handleSelectionChange(val) {
let checkboxs = JSON.parse(JSON.stringify(val));
this.multipleSelection = checkboxs.map((item) => {
return item.billNo;
});
let hebin = [...this.checkPreInOrders, ...this.multipleSelection];
let boxarry = Array.from(new Set(hebin));
this.selectbox = boxarry;
},
//
handleAll(selection) {
if (selection.length == 0) {
this.$refs.multipleTable.clearSelection()
}
},
//
getOrderDetails(val) {
this.currentRow = val;
this.bizQuery.page = 1;
this.codeQuery.page = 1;
this.resultQuery.page = 1;
this.getBizDetailList();
// this.getCodeDetailList();
// this.getResultDetailList();
},
//
getList() {
this.loading = true;
this.currentRow = {billNo: ""};
getOrderFilter(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch((error) => {
this.$message.error(error.message);
this.loading = false;
this.list = [];
this.total = 0;
});
},
deleteOrders(data) {
this.loading = true;
this.deleteData.billNo = data.billNo;
deleteInvByBillNo(this.deleteData)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else if (response.code == 520) {
this.$message.error("新增扫码单据列表已不存在该扫码单据!");
this.getList();
}
})
.catch(() => {
});
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(row);
})
.catch(() => {
});
},
invChange() {
this.filterQuery.action = null;
this.getBusType();
},
getInvList() {
getInvListByUser()
.then((response) => {
this.invList = response.data || [];
})
.catch(() => {
});
},
checkOrder(orderId) {
},
onBizReset() {
this.bizQuery = {
productName: null,
orderIdFk: null,
page: 1,
limit: 10,
};
this.getBizDetailList();
},
onBizSubmit() {
this.bizQuery.page = 1;
this.getBizDetailList();
},
getBizDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!");
return;
}
this.bizDetailLoading = true;
this.bizQuery.orderIdFk = this.currentRow.billNo;
getResultDetailList(this.bizQuery)
.then((res) => {
this.bizDetailLoading = false;
if (res.code === 20000) {
this.bizDetailList = res.data.list || [];
this.bizTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.bizDetailList = [];
this.bizTotal = 0;
}
})
.catch((error) => {
this.bizDetailLoading = false;
this.$message.error(error.message);
this.bizDetailList = [];
this.bizTotal = 0;
});
},
editBizDialog(row) {
},
onCodeReset() {
this.codeQuery = {
orderIdFk: null,
page: 1,
limit: 10,
};
this.getCodeDetailList();
},
onCodeSubmit() {
this.codeQuery.page = 1;
this.getCodeDetailList();
},
getCodeDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!");
return;
}
this.codeQuery.orderIdFk = this.currentRow.billNo;
this.codeDetailLoading = true;
getCodeDetailList(this.codeQuery)
.then((res) => {
this.codeDetailLoading = false;
if (res.code === 20000) {
this.codeDetailList = res.data.list || [];
this.codeTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.codeDetailList = [];
this.codeTotal = 0;
}
})
.catch((error) => {
this.codeDetailLoading = true;
this.$message.error(error.message);
this.codeDetailList = [];
this.codeTotal = 0;
});
},
editCodeDialog(row) {
},
printOrder(row) {
let tQuery = {
action: row.action,
moduleId: 1,
};
this.loading = true;
inspectionOrderPDFFromTemplateFile(tQuery)
.then((response) => {
if (response.code === 20000) {
tQuery = {
templateId: response.data,
orderIdFk: row.billNo,
action: row.action,
moduleId: 1,
};
orderPDFFromTemplateFile(tQuery)
.then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url); //pdf
})
.catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
},
onResultReset() {
this.resultQuery = {
orderId: null,
code: null,
page: 1,
limit: 10,
};
this.getResultDetailList();
},
onResultSubmit() {
this.resultQuery.page = 1;
this.getResultDetailList();
},
findFromInvList(val) {
let cQuery = {};
selectCorpList(cQuery)
.then((response) => {
this.fromInvOptions = response.data || [];
})
.catch(() => {
});
},
getResultDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!");
return;
}
this.resultQuery.orderId = this.currentRow.billNo;
this.resultDetailLoading = true;
getCodeList(this.resultQuery)
.then((res) => {
this.resultDetailLoading = false;
if (res.code === 20000) {
this.resultDetailList = res.data.list || [];
this.resultTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.resultDetailList = [];
this.resultTotal = 0;
}
})
.catch((error) => {
this.resultDetailLoading = false;
this.$message.error(error.message);
this.resultDetailList = [];
this.resultTotal = 0;
});
},
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "warning",
};
return statusMap[status];
},
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
},
created() {
this.getInvList();
this.findFromInvList();
this.getBusType();
this.getList();
},
};
</script>

@ -0,0 +1,216 @@
<template>
<div>
<el-form :model="editData" :rules="formRules" ref="dataForm" label-width="100px">
<el-row :gutter="20">
<el-col :span="20">
<el-form-item label="UDI码:" prop="code">
<el-input
v-model="editData.code"
clearable
disabled
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="11">
<el-form-item prop="productDate" label="生产日期">
<el-input v-model="editData.produceDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
type="number"
:disabled="editType!=1 || !isProduceDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="expireDate" label="失效日期">
<el-input v-model="editData.expireDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
type="number"
:disabled="editType!=1 || !isExpireDate"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="11">
<el-form-item prop="batchNo" label="批次号">
<el-input v-model="editData.batchNo" auto-complete="off" :disabled="editType!=1 || !isBatchNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="serialNo" label="序列号">
<el-input v-model="editData.serialNo" auto-complete="off" :disabled="editType!=1 || !isSerialNo"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="11">
<el-form-item prop="count" label="扫码数量">
<el-input v-model="editData.count" auto-complete="off"
type="number"
min="1"
disabled
:disabled="editData.serialNo!=null && editData.serialNo!='' "></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item>
<el-checkbox v-model="isUseDyCheck" disabled>是否以使用单元数量出入库</el-checkbox>
</el-form-item>
</el-col>
</el-row>
<div style="text-align: right;margin-top: 20px">
<el-button @click="cancelDialog"> </el-button>
<el-button type="primary" @click="saveCode()" :loading="determineLoading"> </el-button>
</div>
</el-form>
</div>
</template>
<script>
import {
checkTempCode,
findByCode,
saveCode, tabCode
} from "@/api/inout/code";
import {isBlank} from "@/utils/strUtil";
export default {
name: "editCode",
props: {
editType: {
type: Object,
required: true,
},
closeCodeDialog: {
type: Function,
required: true,
},
repeatAddCode: {
type: Function,
required: false,
},
codeDetail: {
type: Object,
required: true,
},
editData: null
},
data() {
return {
xlhEnable: false,
isUseDyCheck: false,
isProduceDate: false,
isExpireDate: false,
isBatchNo: false,
isSerialNo: false,
determineLoading: false,
};
},
methods: {
saveCode() {
this.determineLoading = true
if (this.editType == 1) {
//
if (!isBlank(this.editData.serialNo)) {
checkTempCode(this.editData).then((response) => {
this.determineLoading = false
if (response.code === 20000) {
this.repeatAddCode(this.editData);
return
} else {
this.$message.error(response.message);
return
}
});
} else {
this.determineLoading = false
this.repeatAddCode(this.editData);
}
// tabCode(this.editData)
// .then((response) => {
// console.log(response)
// if (response.code === 20000) {
// this.$message.success("");
// } else {
// this.$message.error(response.message);
// }
// this.loading = false;
// });
} else {
saveCode(this.editData)
.then((response) => {
this.determineLoading = false
console.log(response)
if (response.code === 20000) {
this.$message.success("提交成功");
this.codeDetail = this.editData;
this.closeCodeDialog();
} else {
this.$message.error(response.message);
}
this.loading = false;
this.determineLoading = false
});
}
}
,
cancelDialog() {
this.closeCodeDialog();
}
,
findByCode() {
let query = {udiCode: this.editData.code};
findByCode(query)
.then((response) => {
if (response.code === 20000) {
if (response.data.scbssfbhxlh == "否") {
this.xlhEnable = true;
}
if (response.data.zxxsbzbhsydysl > 1) {
this.isUseDyCheck = true;
}
let allowNoSerial = response.data.allowNoSerial ?? true;
if (isBlank(this.editData.serialNo) && !allowNoSerial) {
this.isSerialNo = true
}
} else {
}
this.loading = false;
});
}
}
,
created() {
this.editData = JSON.parse(JSON.stringify(this.codeDetail));
this.findByCode();
//
if (isBlank(this.editData.produceDate)) {
this.isProduceDate = true
}
if (isBlank(this.editData.expireDate)) {
this.isExpireDate = true
}
if (isBlank(this.editData.batchNo)) {
this.isBatchNo = true
}
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,402 @@
<template>
<div>
<el-card>
<el-form :model="filterQuery" size="mini" label-width="100px" v-if="showSearch">
<el-row>
<el-col :span="6">
<el-form-item label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物资名称:">
<el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入物资名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="批次号:">
<el-input v-model="filterQuery.batchNo" style="width: 90%" placeholder="请输入批次号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="生产企业:" class="query-form-item">
<el-input v-model="filterQuery.manufactory" style="width: 100%" 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="filterQuery.category" style="width: 100%" placeholder="请输入物资分类名称"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-if="productRemarkSet.remarkEnable1">
<el-form-item :label="productRemarkSet.remarkTitle1+':'" class="query-form-item">
<el-input v-model="filterQuery.basicPrductRemak1" style="width: 100%"
:placeholder="productRemarkSet.remarkTitle1"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6" v-if="productRemarkSet.remarkEnable2">
<el-form-item :label="productRemarkSet.remarkTitle2 +':'" class="query-form-item">
<el-input v-model="filterQuery.basicPrductRemak2" style="width: 100%"
:placeholder="productRemarkSet.remarkTitle2"
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="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="combine"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="false" border
@current-change="handleChange"
ref="multipleTable">
<el-table-column label width="45" v-if="type==3 ">
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column type="selection" width="55" v-if="type!=3"></el-table-column>
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="120" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="160"></el-table-column>
<el-table-column label="包装规格" prop="bzgg" width="100"></el-table-column>
<el-table-column label="计量单位" prop="measname" width="90"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="90"></el-table-column>
<el-table-column label="价格" prop="price"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="90"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="90"></el-table-column>
<el-table-column label="入库数量" prop="inCount" width="90"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="90"></el-table-column>
<el-table-column label="结余数量" prop="reCount" width="90"></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" width="180"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="180"></el-table-column>
<el-table-column label="供应商" prop="supName" width="180"></el-table-column>
</el-table>
</el-card>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="handleCurrentChange"
></pagination>
</div>
</template>
<script>
import {
getInvProduct, getInvProductStock, getProduct,
} from "@/api/inventory/invPorduct";
import {addDetail} from "@/api/inout/receiveOrder";
import {addBizProduct} from "@/api/inout/orderDetailCode";
import {getInvPreInProduct, getInvPreInProductStock} from "@/api/inventory/invPreInSearch";
import {getInvPreProduct, getInvPreProductStock} from "@/api/inventory/invPreProduct";
import {finProductSet} from "@/api/param/systemParamConfig";
export default {
name: "DialogInvProduct",
props: {
closeDialog: {
type: Function,
required: true,
},
invQueryData: {
type: Object,
required: true,
},
codeArray: {
type: Object,
required: true,
},
orderQuery: {},
type: { //1.2
type: Object,
required: true,
}
},
data() {
return {
showSearch: true,
filterQuery: {
cpmctymc: null,
nameCode: null,
relIdFk: null,
batchNo: null,
page: 1,
limit: 10,
customerId: null,
supId: null,
unitFk: null,
invCode: this.invQueryData.invCode,
},
detailQuery: {
code: null,
productIdFk: null,
page: 1,
limit: 20,
},
list: [],
total: 0,
loading: true,
index: null,
dialogTableVisible: false,
formLoading: false,
dialogVisible: false,
deleteLoading: false,
busTypes: [],
idQuery: null,
showSup: false,
fromOptions: [],
productRemarkSet: {},
currentRow: null,
radioCheck: null,
};
},
components: {},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
cpmctymc: null,
nameCode: null,
relIdFk: null,
batchNo: null,
customerId: null,
unitFk: null,
supId: null,
page: 1,
limit: 10,
};
this.getList();
},
onSubmit() {
this.loading = true;
this.filterQuery.page = 1;
this.getList();
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val.page;
this.getList();
},
closeDetailDialog(val) {
this.codeDetailVisible = false;
},
getList() {
this.loading = true;
if (this.type == 1) {
this.filterQuery.invCode = this.invQueryData.targetInvCode;
} else
this.filterQuery.invCode = this.invQueryData.invCode;
this.filterQuery.filterNoInv = 1;
//
if (this.invQueryData.advanceType == 3) {
getInvPreProductStock(this.filterQuery)
.then((response) => {
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
//
} else if (this.invQueryData.advanceType == 2) {
getInvPreInProductStock(this.filterQuery)
.then((response) => {
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
} else {
getProduct(this.filterQuery)
.then((response) => {
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
}
},
hideSearch() {
this.showSearch = !this.showSearch;
},
combine() {
if (this.type == 3) {
let nameCode = this.currentRow.nameCode ?? '';
let productionDate = this.currentRow.productionDate ?? '';
let expireDate = this.currentRow.expireDate ?? '';
let batchNo = this.currentRow.batchNo ?? '';
let udiCode = "#" + nameCode
+ "#" + productionDate
+ "#" + expireDate +
"#" + batchNo + "#" + "#" + "#";
this.closeDialog(udiCode);
} else {
let selection = this.$refs.multipleTable.selection;
if (selection.length < 1) {
this.$message.error('未选择产品');
return;
}
var idster = [];
if (this.codeArray != null || this.codeArray != undefined) {
if (this.codeArray.length > 0) {
for (var i = 0; i < this.codeArray.length; i++) {
idster.push(this.codeArray[i].relIdFk);
}
}
if (idster.length > 0) {
for (var i = 0; i < idster.length; i++) {
for (var j = 0; j < selection.length; j++) {
if (idster[i] == selection[j].relIdFk) {
this.$message.error("该产品已录入!");
return
}
}
}
}
}
var ids = [];
selection.forEach((obj, index) => {
let data = {
relId: obj.relIdFk,
batchNo: obj.batchNo,
productDate: obj.productionDate,
expireDate: obj.expireDate,
supId: obj.supId,
price: obj.price,
nameCode: obj.nameCode,
}
ids.push(data);
});
if (this.type == 2) { //
let data = {
datas: ids,
orderEntity: this.orderQuery,
}
this.loading = true;
addBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
} else {
this.loading = true;
let tQuery = {
datas: ids,
purReceiveEntity: this.invQueryData,
};
addDetail(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
}
}
},
findBasicProductSet() {
finProductSet().then((response) => {
if (response.code == 20000) {
this.productRemarkSet = response.data;
}
});
},
handleChange(val) {
this.currentRow = val;
this.radioCheck = val.id
},
},
filters: {
statusFilterType(status) {
const statusMap = {
false: "success",
true: "danger",
};
return statusMap[status];
}
,
}
,
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}
,
created() {
this.findBasicProductSet();
//
this.getList();
}
,
}
;
</script>
<style type="text/scss" lang="scss">
</style>

@ -0,0 +1,373 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="listQuery" size="mini" label-width="100px" v-if="showSearch">
<el-row>
<el-col :span="18">
<el-form-item class="query-form-item" label="UDI码:">
<el-input v-model="listQuery.udiCode"
style="width: 97%"
placeholder="请扫描或输入UDI码"
clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="产品编码:">
<el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="产品通用名:">
<el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"
style="width: 90%"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="规格型号:">
<el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"
style="width: 90%"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="注册备案人:">
<el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="外部产品编码:">
<el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<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-check" @click="confirmSelect"></el-button>
</el-button-group>
</div>
<el-table
:data="dataList"
style="width: 100%"
highlight-current-row="false"
v-loading="loading"
border
@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"
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="price"
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>
<pagination
v-show="pageTotal>0"
:total="pageTotal"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList"
/>
</el-card>
<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 style="width: 100%; margin-top: 10px;" :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>
<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>
</div>
</template>
<script>
import {addBizProduct} from "@/api/inout/orderDetailCode";
import {filterCompanyProductRelevance} from "@/api/basic/udiRlSuptRelevance";
import udiRlDetailDialog from "../pharmaceuticals/purApplyDrug/purUdiRlDetailDialog";
import {isBlank} from "@/utils/strUtil";
export default {
name: "stockOrderNewSelectProduct",//
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
filterType: {
type: Function,
required: true,
},
},
data() {
return {
loading: false,
showSearch: true,
listQuery: {
udiCode: null,
cpmctymc: null,
action: null,
ggxh: null,
ylqxzcrbarmc: null,
thrPiId: null,
unitFk: null,
page: 1,
limit: 10,
},
dataList: [],
pageTotal: 1,
total: 1,
radioCheck: null,
currentRow: null,
//
dialogFormVisible: false,
currentCert: null,
certList: [],
udiRlDetailVisible: false,
};
},
methods: {
onReset() {
this.listQuery = {
udiCode: null,
cpmctymc: null,
ggxh: null,
ylqxzcrbarmc: null,
thrPiId: null,
page: 1,
limit: 10,
}
this.radioCheck = null;
this.currentRow = null;
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
// if (this.data.fromCorp != null) {
// this.listQuery.unitFk = this.data.fromCorp;
// }
if (this.data.action != null) {
this.listQuery.action = this.data.action;
}
filterCompanyProductRelevance(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;
});
},
keyup_submit(event) {
this.listQuery.page = 1;
this.getList();
event.target.select();
},
handleChange(val) {
this.radioCheck = val.id;
this.currentRow = val;
},
confirmSelect() {
if (this.radioCheck == null) {
this.$message.error('未选择产品');
return;
}
let str = this.currentRow.zczbhhzbapzbh;
if (!isBlank(str) && str.search(",") != -1) {
this.currentCert = null;
this.certList = str.split(',');
this.dialogFormVisible = true;
} else {
this.combine();
}
},
selectCert() {
if (this.currentCert == null) {
this.$message.error("请先选择对应的注册证!");
} else {
this.currentRow.zczbhhzbapzbh = this.currentCert;
this.combine();
}
},
combine() {
let data = {
relId: this.currentRow.rlId,
supId: this.currentRow.customerId,
zczbhhzbapzbh: this.currentRow.zczbhhzbapzbh,
orderEntity: this.data,
}
this.loading = true;
addBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
handleDetailClick(row) {
this.currentRow = row;
this.udiRlDetailVisible = true;
},
},
components: {udiRlDetailDialog}
,
created() {
this.getList();
console.log(this.data);
}
,
}
;
</script>
<style scoped>
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style>

@ -0,0 +1,900 @@
<template>
<div>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
height="500"
border
>
<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 width="120" label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleModifyClick(scope.row)"
>详情
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="bindId(scope.row)"
>选入绑定
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="产品信息详情"
:visible.sync="editDialogVisible"
:close-on-click-modal="false"
append-to-body
:close-on-press-escape="false"
width="70%"
v-if="editDialogVisible"
>
<el-table :data="sysList" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="系统名称"
prop="sysName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品编码"
prop="thirdId"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品名称"
prop="thirdName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" prop="registerNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" show-overflow-tooltip></el-table-column>
</el-table>
<el-table
v-loading="loading"
:data="detailList"
style="width: 100%; margin-top: 20px"
border
@current-change="handleDetail"
>
<el-table-column
label="产品标识"
prop="nameCode"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="产品通用名"
prop="cpmctymc"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装级别"
prop="packLevel"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装层级"
prop="bzcj"
show-overflow-tooltip
></el-table-column>
</el-table>
<el-form
:model="editQuery"
:rules="rules"
ref="editQuery"
label-width="100px"
style="margin-top: 20px"
>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.cpmctymc"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品标识:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.nameCode"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>规格型号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ggxh"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>器械类别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.qxlb"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>产品类别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.cplb"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>分类编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.flbm"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>商品条码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.sptm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医保编码:&nbsp;</span>
</div>
<el-input
style="width: 65%" :disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ybbm"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>医疗器械注册人:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="ylqxzcrbarmc"
v-model="editQuery.ylqxzcrbarmc"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册人英文名称:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.ylqxzcrbarywmc"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>统一社会信用号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.tyshxydm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>注册证/备案号:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.zczbhhzbapzbh"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>上级产品编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="true"
size="small"
splaceholder="请输入内容"
v-model="editQuery.sjcpbm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装级别:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.packLevel"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包装层级:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
v-model="editQuery.bzcj"
:disabled="true"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级包装数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
splaceholder="请输入内容"
:disabled="true"
v-model="editQuery.bhxjsl"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含下级产品编码:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
:disabled="true"
splaceholder="请输入内容"
v-model="editQuery.bhxjcpbm"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>包含最小销售包装数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
size="small"
:disabled="true"
splaceholder="请输入内容"
v-model="editQuery.bhzxxsbzsl"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>最小包装单元内包含使用单元数量:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
v-model="editQuery.zxxsbzbhsydysl"
></el-input>
</div>
</el-col>
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>生产企业:&nbsp;</span>
</div>
<el-input
style="width: 65%"
:disabled="!checked"
size="small"
splaceholder="请输入内容"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="24" class="el-col">
<div style="margin-top: 18px;margin-bottom: 18px">
<el-checkbox v-model="checked" disabled
>以使用单元数量入库
</el-checkbox>
<el-checkbox v-model="editQuery.isDisable" disabled
>是否禁用
</el-checkbox>
<el-checkbox v-model="editQuery.isAdavence" disabled
>是否寄售
</el-checkbox>
<el-checkbox v-model="editQuery.allowNoBatch" disabled
>允许无批次号
</el-checkbox>
<el-checkbox v-model="editQuery.allowNoExpire" disabled
>允许无失效日期
</el-checkbox>
<el-checkbox v-model="editQuery.allowNoProduct" disabled
>允许无生产日期
</el-checkbox>
</div>
</el-col>
</el-row>
</el-form>
<div style="text-align: center">
<el-button type="primary" size="small" icon="search" disabled @click="onAddSubmit"
>提交
</el-button>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getUdiInfos,
deletetUdiInfos,
thirdSysDetail,
removeRl, sysFilter, getMutiUdiInfos
} from "@/api/basic/udiRelevance";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {filterByUuid} from "@/api/basic/udiInfo";
import {updateBind} from "@/api/inout/order"
export default {
name: "DialogSelectRl",
props: {
type: {
type: Object,
required: true,
},
curRow: {
type: Object,
required: true,
},
closeBindDialog: {
type: Function,
required: true,
},
fromCorp: {
type: Object,
required: true,
},
},
data() {
return {
filterQuery: {
nameCode: null,
bindRlIds: null,
page: 1,
limit: 20,
},
editQuery: null,
relevanceEdit: {
id: null,
thirdId: "",
isDisable: null,
isUseDy: false,
isLock: null,
},
defaultSys: null,
isImport: false,
isImportUdi: false,
isUploadSmp: false,
isImportFile: false,
uploadFileUrl: null,
checked: false,
list: [],
detailList: [],
sysList: [],
filterList: [],
total: 0,
thirdNo: "",
uuid: "111",
thirdId: null,
relId: "",
thisData: {
nameCode: null,
cpmctymc: null,
ggxh: null
},
multipleSelection: [],
editDialogVisible: false, //
selectUdiDialogVisible: false, //
selectErpDialogVisible: false, //ERP
selectLocalVisible: false, //UDI
isUseDyCheck: false,
loading: false,
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
udiCode: null,
nameCode: null,
unitFk: null,
page: 1,
limit: 20,
};
this.getList();
},
getList() {
this.loading = true;
this.filterQuery.udiCode = this.curRow.code;
this.filterQuery.nameCode = this.curRow.nameCode;
this.filterQuery.bindRlIds = this.curRow.bindRlIds;
this.filterQuery.unitFk = this.fromCorp;
this.filterQuery.key = this.curRow.key;
getMutiUdiInfos(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
keyup_submit(event) {
this.filterQuery.page = 1;
this.getList();
event.target.select();
}
,
getDetailList(detailQuery) {
this.loading = true;
filterByUuid(detailQuery)
.then((response) => {
this.isUseDyCheck = false;
this.loading = false;
this.detailList = response.data || [];
this.detailList.forEach((item, index, array) => {
if (item.zxxsbzbhsydysl > 1) {
this.isUseDyCheck = true;
}
});
})
.catch(() => {
this.loading = false;
this.detailList = [];
});
}
,
handleDetail(row) {
this.editQuery = row;
console.log(row);
}
,
deleteOrders(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deletetUdiInfos(tquery)
.then((response) => {
if (response.code == 20000) {
this.getList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}
,
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteOrders(rowId);
})
.catch(() => {
});
}
,
intentDetail() {
this.isImportUdi = false;
this.selectUdiDialogVisible = true;
}
,
addSelectErp(row) {
this.defaultSys = row.sysId;
this.isImport = false;
this.selectErpDialogVisible = true;
}
,
removeErp(row) {
this.$confirm("此操作将解除该绑定产品信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let query = {
relId: this.editQuery.relId,
thirdSys: row.sysId
};
removeRl(query)
.then((response) => {
if (response.code == 20000) {
this.getThirdSysDetail()();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
})
.catch(() => {
});
}
,
bindId(val) {
if (this.curRow.code != null || this.type == 1) {
this.$emit("selectBindRl", val);
} else {
let query = {
id: this.curRow.id,
bindStatus: 0,
bindRlFk: val.id,
mySupId: this.curRow.unitFk,
};
updateBind(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.closeBindDialog(this.curRow.id);
} else {
this.$message.error("-----503码" + response.message);
if (response.code == 503) {
this.closeBindDialog(503);
}
this.this.$message.error(response.message);
}
}).catch(() => {
});
}
}
,
cancelDialog() {
this.editDialogVisible = false;
}
,
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
}
,
handleModifyClick(row) {
this.uuid = row.uuid;
this.relId = row.relId;
this.isImport = false;
this.thisData = row;
this.editDialogVisible = true;
this.editQuery = row;
this.relevanceEdit = {
id: row.id,
// thirdId: row.thirdId,
isUseDy: row.isUseDy,
isDisable: row.isDisable,
isLock: row.isLock,
};
this.checked = row.isUseDy == 1;
let ttquery = {
uuid: row.uuid,
page: 1,
limit: 10,
};
console.log("this.editQuery.isUseDy = " + this.editQuery.isUseDy);
this.getDetailList(ttquery);
this.getThirdSysDetail();
}
,
closeUdi(val) {
this.selectUdiDialogVisible = false;
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
this.getThirdSysDetail();
if (val) {
this.getList();
}
}
,
getThirdSysDetail() {
let query = {
id: this.relevanceEdit.id,
};
thirdSysDetail(query)
.then((response) => {
this.loading = false;
this.sysList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.sysList = [];
});
}
,
getSysFilter() {
sysFilter()
.then((response) => {
this.loading = false;
this.filterList = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.filterList = [];
});
}
,
closeDialog() {
this.selectErpDialogVisible = false;
this.selectLocalVisible = false;
}
,
selectSysParam() {
let query = {
paramKey: "smp_isUploadProuct",
};
selectSysParamByKey(query).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isUploadSmp = true;
}
}
});
let query1 = {
paramKey: "upload_pi_file_enabled",
};
selectSysParamByKey(query1).then((response) => {
if (response.code == 20000) {
if (response.data.paramValue == "1") {
this.isImportFile = true;
}
}
});
let query2 = {
paramKey: "upload_pi_file_url",
};
selectSysParamByKey(query2).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.paramValue;
}
});
}
,
}
,
mounted() {
}
,
components: {}
,
created() {
if(this.curRow.selectSupId!=null){
if(this.curRow.selectSupId!=false){
this.fromCorp=this.curRow.selectSupId
}else{
this.fromCorp=''
}
}
this.getList();
}
,
}
;
</script>
<style scoped>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 25%;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
</style>

@ -0,0 +1,91 @@
<template>
<div>
<el-table
v-loading="loading"
:data="spaceCodeList"
style="width: 100%"
highlight-current-row
height="500"
border
@current-change="handleDetail"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="UDI码"
prop="code"
width="220"
show-overflow-tooltip
></el-table-column>
<el-table-column label="仓库" prop="invName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="120"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>
<el-table-column label="物资名称" prop="productName" width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="150" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="计量单位" prop="expireDate" width="120"></el-table-column>
<el-table-column label="注册备案号" prop="zczbhhzbapzbh" show-overflow-tooltip
width="200"></el-table-column>
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip
width="200"></el-table-column>
<el-table-column label="供应商" prop="supName" show-overflow-tooltip
width="200"></el-table-column>
<el-table-column width="200" label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="selectSpace(scope.row)"
>选入绑定
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {selectMutiPlace} from "@/api/inventory/invPlaceOrder";
export default {
name: "DialogSelectSpace",
props: {
spaceCodeList: {
type: Object,
required: true,
},
},
data() {
return {
loading: false,
list: [],
filterQuery: {
invCode: null,
code: null,
},
}
},
methods: {
selectSpace(row) {
this.$emit("selectSpaceBind", row.invSpaceCode);
this.$emit("closeBindDialog", true);
},
},
created() {
this.list = this.spaceCodeList;
},
mounted() {
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,148 @@
<template>
<div>
<!-- <el-form :inline="true" :model="unitquery" class="query-form" size="mini">-->
<!-- <el-form-item class="query-form-item" label="关键字搜索:">-->
<!-- <el-input v-model="unitquery.key" placeholder="搜索"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-search"-->
<!-- @click.native.stop="getUnitList()"-->
<!-- >查询-->
<!-- </el-button-->
<!-- >-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-table
v-loading="loading"
:data="unitlist"
style="width: 100%"
highlight-current-row
height="500"
border
@current-change="handleDetail"
>
<el-table-column
label="往来单位ID"
prop="erpId"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="往来单位名称"
prop="name"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="往来单位简写"
prop="spell"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="地址"
prop="addr"
show-overflow-tooltip
></el-table-column>
<el-table-column width="200" label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="selectUnit(scope.row)"
>选入绑定
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {getBasicUnitMaintains, getCorpFilter} from "@/api/basic/basicUnitMaintain";
export default {
name: "DialogSelectUnit",
props: {
codeId: {
type: Object,
required: true,
},
fromCorp: {
type: Object,
required: true,
},
},
data() {
return {
loading: false,
unitquery: {key: "", page: 1, limit: 20},
unitlist: [],
unitUpdateQuery: {
id: "",
fromCorpId: "",
fromCorp: "",
},
}
},
methods: {
getUnitList() {
this.loading = true;
getBasicUnitMaintains(this.unitquery)
.then((response) => {
this.loading = false;
this.unitlist = response.data.page.list || [];
})
.catch(() => {
this.loading = false;
});
},
getUnitListByCode(row) {
let query = {
udiRlIdFk: row.relId,
unitFk: this.fromCorp,
}
getCorpFilter(query)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.unitlist = response.data || [];
} else {
this.$message.warning(response.message);
}
})
.catch(() => {
this.loading = false;
});
},
handleDetail(row) {
this.curUnitRow = row;
},
selectUnit(row) {
this.$emit("selectSupUnit", row);
this.$emit("closeBindDialog", true);
},
},
created() {
},
mounted() {
if (this.codeId != null) {
if (this.codeId.bindRlFk != null) {
this.codeId.relId = this.codeId.bindRlFk;
}
this.getUnitListByCode(this.codeId)
}
}
}
</script>
<style scoped>
</style>

@ -400,7 +400,7 @@ import {
deleteByOrderId,
getOrderList, submitCodes
} from "../../api/inout/order";
import addOrder from "@/views/inout/DialogCreateOrder";
import addOrder from "./DialogCreateDrugOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser,getLocalJoinByUserOptimize} from "@/api/basic/busType";

@ -203,8 +203,8 @@
</template>
<script>
import stockOrderNewSelectProduct from "./DialogSelectProduct";
import dialogInvProduct from "./DialogSelectInvProduct";
import stockOrderNewSelectProduct from "../inout/DialogSelectProduct";
import dialogInvProduct from "../inout/DialogSelectInvProduct";
import {addBizProduct, getDetailBizs, updateBizProduct, delBizProduct} from "@/api/inout/orderDetailCode";
import {updateBizBind} from "@/api/inout/order";
import selectRlDialog from "@/views/inout/DialogSelectRl";

@ -0,0 +1,416 @@
<template>
<div>
<el-table v-loading="loading" :data="detailList" style="width: 100%" border
:row-style="rowStyle"
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="药品通用名" width="150"
prop="coName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="包装规格" width="150"
prop="spec"
></el-table-column>
<el-table-column label="批次号" header-align="center">
<el-table-column header-align="center"
label="手录" width="100"
prop="bbatchNo"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="扫码"
prop="sbatchNo" width="100"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="生产日期" header-align="center">
<el-table-column header-align="center"
label="手录" width="100"
prop="bproductDate"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="扫码" width="100"
prop="sproductDate"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="失效日期" header-align="center">
<el-table-column header-align="center"
label="手录" width="100"
prop="bexpireDate"
show-overflow-tooltip
></el-table-column>
<el-table-column header-align="center"
label="扫码" width="100"
prop="sexpireDate"
show-overflow-tooltip
></el-table-column>
</el-table-column>
<el-table-column label="数量" header-align="center">
<el-table-column
header-align="center"
label="单据数量" width="100"
prop="count"
></el-table-column>
<el-table-column
header-align="center"
label="扫码数量" width="100"
prop="scanCount"
></el-table-column>
</el-table-column>
<el-table-column
label="价格"
prop="price" width="100"
></el-table-column>
<el-table-column width="100" label="计量单位" prop="measname">
</el-table-column>
<el-table-column
label="生产企业"
prop="manufacturer" width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="批准文号" width="160"
prop="certCode"
show-overflow-tooltip
></el-table-column>
</el-table>
</div>
</template>
<script>
import stockOrderNewSelectProduct from "./DialogSelectProduct";
import dialogInvProduct from "./DialogSelectInvProduct";
import {addBizProduct, getDetailBizs, updateBizProduct, delBizProduct} from "@/api/inout/orderDetailCode";
import {updateBizBind} from "@/api/inout/order";
import selectRlDialog from "@/views/inout/DialogSelectRl";
import DialogSelectUnit from "@/views/inout/DialogSelectUnit";
import {getCheckDetailList} from "@/api/inout/orderDetailBiz";
export default {
name: "PanelCreateOrderCheckDrug",
props: {
idQuery: {
type: Object,
required: true,
},
refreshPanel: {
type: Function,
required: true,
},
refreshOrder: {
type: Function,
required: true,
},
viewType: {
type: Object,
required: true,
},
curBustype: {
type: Object,
required: true,
},
},
data() {
return {
bizType: 1,
loading: false,
query: {
orderId: null,
code: "",
corpOrderId: "",
},
detailList: [],
total: 0,
iCount: 0,
selectProductVisible: false,
selectInvProductVisible: false,
thisData: {},
selectedIndex: null,
invQueryData: {
invCode: null,
},
selectRlVisible: false,
dialogTableVisible: false,
curRow: null,
};
},
components: {
selectRlDialog, DialogSelectUnit,
stockOrderNewSelectProduct,
dialogInvProduct,
},
methods: {
getOrderDetails() {
this.loading = true;
this.query.orderIdFk = this.idQuery.billNo;
getCheckDetailList(this.query) //
.then((response) => {
this.detailList = response.data || [];
this.total = response.data || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
rowChange(val) {
this.currentRow = val;
if (this.currentRow.batchNo == '')
this.currentRow.batchNo = null;
this.selectedIndex = val.index;
},
closeDialog(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false;
this.idQuery = rData;
this.getOrderDetails();
},
closeDialogC2(rData) {
this.idQuery = rData;
this.selectInvProductVisible = false;
this.getOrderDetails();
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.bindRlFk)) {
rowBackground.color = '#f60303';
return rowBackground;
}
if (this.viewType == 1)
return null;
if (!row.checkSuccess) {
rowBackground.color = '#f60303';
}
if (row.count != row.scanCount) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
selectProductFunction() {
this.thisData = this.idQuery;
if (this.$isBlank(this.idQuery.action)) {
this.$message.error("单据类型不能为空!")
return;
}
if (this.$isBlank(this.idQuery.invCode)) {
this.$message.error("当前仓库不能为空!");
return;
}
if (this.$isBlank(this.idQuery.fromCorp) && this.$isBlank(this.idQuery.fromInvCode)) {
this.$message.error("往来信息不能为空!");
return;
}
if (this.curBustype.corpType == 3) {//
this.invQueryData.invCode = this.idQuery.invCode;
this.selectInvProductVisible = true;
} else if (this.curBustype.corpType == 2) { //
this.selectProductVisible = true;
} else if (this.curBustype.corpType === 1) {//
this.invQueryData.invCode = this.idQuery.invCode;
this.selectInvProductVisible = true;
}
},
saveChange(row) {
if (row.batchNo == '') {
row.batchNo = null;
}
updateBizProduct(row)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
this.refreshPanel();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
copyDetail(row) {
let data = {
relId: row.bindRlFk,
supId: row.supId,
zczbhhzbapzbh: row.certCode,
orderEntity: this.idQuery,
}
this.loading = true;
addBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.getOrderDetails();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
deleteDetail(row) {
let data = {
id: row.id,
}
this.loading = true;
delBizProduct(data)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.getOrderDetails();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
bindRl(val) {
this.curRow = val;
this.selectRlVisible = true;
},
handleUnitClick(row) {
this.curRow = row;
this.dialogTableVisible = true;
},
selectBindRl(row) {
let query = {
id: this.curRow.id,
bindRlFk: row.id,
};
updateBizBind(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.getOrderDetails();
} else
this.$message.error(response.message);
}
).catch(() => {
});
},
selectSupUnit(row) {
let query = {
id: this.curRow.id,
supId: row.erpId,
};
updateBizBind(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.getOrderDetails();
} else {
this.$message.error(response.message);
}
}).catch(() => {
});
}
,
closeBindDialog() {
this.selectRlVisible = false;
this.dialogTableVisible = false;
this.refreshPanel();
}
,
}
,
filters: {}
,
watch: {
'idQuery.billNo':
{
handler() {
this.refreshOrder(this.idQuery);
}
,
}
}
,
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}
,
created() {
if (this.idQuery.billNo != null)
this.getOrderDetails();
}
,
}
;
</script>
<style scoped>
.el-table_fixed, el-table__fixed-right {
height: 80% !important;
}
.el-table__fixed-body-wrapper {
height: 80% !important;
}
.ao-text {
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
float: right;
text-align: right;
margin-top: 10px;
}
/**
解决el-input输入框 type=number时输入中文光标上移问题
*/
.el-input__inner {
line-height: 1px !important;
}
</style>

@ -0,0 +1,173 @@
<template>
<div>
<el-table v-loading="loading" :data="detailList" style="width: 100%;" max-height="350" height="350"
border
:row-style="rowStyle"
ref="multipleTable">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column
label="药品编码" width="150"
prop="nameCode"
show-overflow-tooltip
></el-table-column>
<el-table-column label="药品名称名称" width="150" prop="coName" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" width="150" prop="spec" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" width="150" prop="batchNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产日期" width="120" prop="productDate" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ convertDateFun(scope.row.productDate) }}</span>
</template>
</el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip>
<template slot-scope="scope"12
>
<span>{{ convertDateFun(scope.row.expireDate) }}</span>
</template>
</el-table-column>
<el-table-column label="扫码数量" width="80" prop="count" show-overflow-tooltip></el-table-column>
<el-table-column label="实际数量" width="80" prop="reCount" show-overflow-tooltip></el-table-column>
<!-- <el-table-column width="120" label="价格"-->
<!-- v-if="curAction.mainAction=='WareHouseIn' && curAction.corpType==2">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.price"-->
<!-- type='number'-->
<!-- :disabled="scope.row.index !== selectedIndex"-->
<!-- placeholder="请输入价格"-->
<!-- ></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="价格" width="120" prop="price" show-overflow-tooltip-->
<!-- v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType==2)"></el-table-column>-->
<el-table-column label="价格" width="150" prop="price" show-overflow-tooltip></el-table-column>
<el-table-column width="100" label="计量单位" prop="measname">
</el-table-column>
<el-table-column label="生产企业" width="150" prop="manufacturer" show-overflow-tooltip></el-table-column>
<el-table-column label="批准文号" width="150" prop="certCode" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="160" fixed="right"
v-if="curAction.mainAction=='WareHouseIn' && curAction.corpType==2">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.index == selectedIndex" @click.stop="true"
@click.native="saveChange(scope.row)">保存
</el-button>
<el-button type="text" size="small" v-if="scope.row.index != selectedIndex" @click.stop="true"
@click.native="rowChange(scope.row)">编辑
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import {getDetailCodes, updateBizProduct, updateCodeProduct} from "@/api/inout/orderDetailCode";
export default {
name: "IoCreateOrderCodeDetail",
props: {
idQuery: {
type: Object,
required: true,
},
viewType: {
type: Object,
required: true,
},
curAction: {
type: Object,
required: true,
},
},
data() {
return {
convertDateFun: convertDate,
loading: false,
query: {
orderId: null,
code: "",
corpOrderId: "",
},
detailList: [],
total: 0,
selectRlVisible: false,
dialogTableVisible: false,
editCodeVisible: false,
}
},
watch: {
"curAction": {
handler(newVal, oldVal) {
},
immediate: true
}
},
methods: {
getOrderDetails() {
this.loading = true;
this.query.orderId = this.idQuery.billNo;
getDetailCodes(this.query) //
.then((response) => {
this.detailList = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (this.viewType == 3 && !row.checkSuccess) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
saveChange(row) {
if (row.batchNo == '') {
row.batchNo = null;
}
updateCodeProduct(row)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
this.refreshPanel();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
rowChange(val) {
this.currentRow = val;
if (this.currentRow.batchNo == '')
this.currentRow.batchNo = null;
this.selectedIndex = val.index;
},
},
created() {
if (this.idQuery.billNo != null)
this.getOrderDetails();
},
}
</script>
<style scoped>
</style>

@ -0,0 +1,430 @@
<template>
<div>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;" max-height="350" height="350"
:row-style="rowStyle"
border
ref="multipleTable">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column
label="UDI码"
prop="code"
width="280"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="物资名称"
prop="productName"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="ggxh"
width="160"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="批次号"
prop="batchNo"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="价格"
prop="price"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="扫码数量"
prop="count"
width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="实际数量"
prop="reCount"
width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产日期"
prop="produceDate"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="失效日期"
prop="expireDate"
width="120"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="序列号"
prop="serialNo"
width="120"
show-overflow-tooltip
></el-table-column>
<!-- <el-table-column-->
<!-- label="供应商"-->
<!-- prop="supName"-->
<!-- width="180"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<el-table-column label="操作" width="220" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="deleteCode(scope.$index, scope.row)"
>减一
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.relId!=null"
@click.native.stop="bindRl(scope.row)"
>绑定产品
</el-button
>
<el-button
type="text"
size="small"
:disabled="scope.row.supId!=null"
@click.native.stop="handleUnitClick(scope.row)"
>绑定供应商
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="editCode(scope.row)"
>编辑
</el-button
>
</template>
</el-table-column>
</el-table>
<el-row v-if="viewType==7">
<el-col span="10">
<div style="float: left">
<td>
<div style="background-color: #FC4A45;width: 10px;height: 10px"></div>
</td>
<td><span>红色:多余条码</span></td>
<td>
<div style="background-color: #F4BD25;width: 10px;height: 10px;margin-left: 15px"></div>
</td>
<td>
<span>黄色:包含多余条码</span>
</td>
</div>
</el-col>
</el-row>
<div class="block">
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="getCodeList"
/>
</div>
<!-- 绑定产品-->
<el-dialog
:title="selectRlTitle"
:visible.sync="selectRlVisible"
width="80%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="selectRlVisible"
append-to-body
>
<selectRlDialog
:curRow="curRow"
:fromCorp="fromCorp"
v-on:selectBindRl="selectBindRl"
v-on:closeBindDialog="closeBindDialog"
></selectRlDialog>
</el-dialog>
<!-- 绑定供应商-->
<el-dialog
:title="selectUnitTitle"
:visible.sync="dialogTableVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="dialogTableVisible"
width="80%"
append-to-body
>
<DialogSelectUnit
:codeId="curRow"
:fromCorp="fromCorp"
v-on:selectSupUnit="selectSupUnit"
v-on:closeBindDialog="closeBindDialog"
></DialogSelectUnit>
</el-dialog>
<el-dialog
:title="editTitle"
:visible.sync="editCodeVisible"
append-to-body width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="editCodeVisible"
>
<editCodeDialog
editType="2"
:closeCodeDialog="closeCodeDialog"
:codeDetail="codeDetail">
</editCodeDialog>
</el-dialog>
</div>
</template>
<script>
import {deleteCodesTempById, errorCodeList, updateCodeBindSup} from "@/api/inout/order";
import selectRlDialog from "./DialogSelectRl";
import DialogSelectUnit from "./DialogSelectUnit";
import editCodeDialog from "./DialogEditCode";
import {parseTime} from "@/utils/coTools";
import {getCheckDetailCodes} from "@/api/inout/orderDetailCode";
export default {
name: "IoAddCodeDetail",
props: {
idQuery: {
type: Object,
required: true,
},
refreshPanel: {
type: Function,
required: true,
},
selectRlTitle: {
type: Object,
required: true,
},
selectUnitTitle: {
type: Object,
required: true,
},
editTitle: {
type: Object,
required: true,
},
viewType: {
type: Object,
required: true,
}
},
data() {
return {
loading: false,
query: {
code: "",
corpOrderId: "",
},
codeDetail: null,
codeArray: [],
total: 0,
curRow: null,
selectRlVisible: false,
dialogTableVisible: false,
editCodeVisible: false,
editOriginCodeVisible: false,
fromCorp: null,
}
},
methods: {
getCodeList() {
this.loading = true;
this.query.orderId = this.idQuery.billNo;
if (this.viewType == 7) {
//
getCheckDetailCodes(this.query) //
.then((response) => {
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
})
.catch(() => {
this.loading = false;
this.detailList = [];
this.total = 0;
});
} else {
errorCodeList(this.query) //
.then((response) => {
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
for (let i = 0; i < this.codeArray.length; i++) {
this.codeArray[i].fromType = this.formData.fromType;
this.codeArray[i].billType = this.formData.billType;
}
this.tableSelection();
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
}
},
deleteCode(index, row) {
this.$confirm("是否确定移除一个条码?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.loading = true;
let tQuery = {
id: row.id
}
deleteCodesTempById(tQuery)
.then((response) => {
if (response.code === 20000) {
this.refreshPanel();
} else {
this.$message.error(response.message);
}
this.loading = false;
});
}).catch(() => {
});
},
bindRl(val) {
this.curRow = val;
this.fromCorp = this.idQuery.fromCorp;
this.selectRlVisible = true;
},
handleUnitClick(row) {
this.curRow = row;
this.dialogTableVisible = true;
},
editCode(row) {
this.editTitle = "编辑条码";
this.codeDetail = row;
this.editCodeVisible = true;
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.relId)) {
rowBackground.color = '#f60303';
}
if (row.checkStatus == 2) {
rowBackground.color = '#F7BB29';
} else if (row.checkStatus == 1) {
rowBackground.color = '#FC4A45';
}
return rowBackground;
},
selectBindRl(row) {
let query = {
id: this.curRow.id,
relId: row.id,
mySupId: row.unitFk,
};
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.orderFormData.id = this.curRow.orderId;
this.closeBindDialog();
this.getCodeList();
} else {
if (response.code == 503) {
this.curRow = response.data;
this.orderFormData.id = this.curRow.orderId;
this.getCodeList();
this.selectUnitTitle = response.message;
this.handleUnitClick(response.data);
} else
this.$message.error(response.message);
}
}).catch(() => {
});
},
selectSupUnit(row) {
let query = {
id: this.curRow.id,
supId: row.erpId,
};
updateCodeBindSup(query).then((response) => {
if (response.code == 20000) {
this.$message.success("绑定成功");
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.refreshPanel();
} else {
this.$message.error(response.message);
}
}).catch(() => {
});
},
closeBindDialog() {
this.selectRlVisible = false;
this.dialogTableVisible = false;
this.refreshPanel();
},
closeCodeDialog() {
this.editCodeVisible = false;
this.editOriginCodeVisible = false;
this.refreshPanel();
},
repeatAddCode(editData) {
let tQuery = editData;
tQuery.orderId = this.orderFormData.id;
tQuery.actDate = parseTime(this.orderFormData.actDate, '{y}-{m}-{d} {h}:{i}:{s}');
tQuery.action = this.orderFormData.action;
this.closeCodeDialog();
},
},
created() {
if (this.idQuery.billNo != null)
this.getCodeList();
},
components: {
selectRlDialog, DialogSelectUnit, editCodeDialog
},
}
</script>
<style scoped>
</style>

@ -199,9 +199,9 @@
<script>
import {deleteCodesTempById, errorCodeList, updateCodeBindSup} from "@/api/inout/order";
import selectRlDialog from "./DialogSelectRl";
import DialogSelectUnit from "./DialogSelectUnit";
import editCodeDialog from "./DialogEditCode";
import selectRlDialog from "../inout/DialogSelectRl";
import DialogSelectUnit from "../inout/DialogSelectUnit";
import editCodeDialog from "../inout/DialogEditCode";
import {parseTime} from "@/utils/coTools";
import {getCheckDetailCodes} from "@/api/inout/orderDetailCode";

@ -0,0 +1,162 @@
<template>
<div>
<el-form :model="filterQuery" label-width="90px">
<el-row>
<el-col :span="6">
<el-form-item label="产品编码:">
<el-input v-model="filterQuery.unionCode" style="width: 100%" placeholder="请输入DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品通用名:">
<el-input v-model="filterQuery.cpmctymc" style="width: 100%" placeholder="请输入产品通用名"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="规格型号:">
<el-input v-model="filterQuery.ggxh" style="width: 100%" placeholder="请输入规格型号"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-button-group>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-button type="primary" icon="el-icon-refresh" @click="getList"></el-button>
</el-button-group>
</el-col>
</el-row>
</el-form>
<el-table :data="list" style="width: 100%" border
max-height="350" height="350"
highlight-current-row>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="处方编码" prop="prescribeCode" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="DI标识" prop="diCode" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="产品通用名" prop="thrName" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="计量单位" prop="measureUnit" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" header-align="center">
<el-table-column label="处方数量" prop="measureCount" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="扫码数量" prop="realCount" width="100" show-overflow-tooltip></el-table-column>
</el-table-column>
<el-table-column label="价格" header-align="center">
<el-table-column label="处方金额" prop="amount" width="100" show-overflow-tooltip></el-table-column>
<el-table-column label="实际金额" prop="realPrice" width="100" show-overflow-tooltip></el-table-column>
</el-table-column>
<el-table-column label="注册/备案凭证" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="160" show-overflow-tooltip></el-table-column>
<el-table-column width="60" label="操作" fixed="right">
<template slot-scope="scope">
<el-button type="text" @click.native.stop="handleModifyClick(scope.row)">详情</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {dlOrFilter, skPrescribeCheck, skPrescribeDi} from "@/api/basic/sicker/skPersonApi";
export default {
name: "skPrescribeDi",
props: {
perscribeData: {
type: Object,
required: true,
},
sickerAdNum: {
type: Object,
required: true,
},
},
data() {
return {
filterQuery: {
cpmctymc: null,
unionCode: null,
billNo: null,
adNum: null,
page: 1,
limit: 10,
ggxh: null,
},
total: 0,
loading: false,
list: [],
showSearch: true,
}
},
methods: {
getList() {
this.loading = true;
this.filterQuery.adNum = this.sickerAdNum;
this.filterQuery.billNo = this.perscribeData.billNo;
skPrescribeCheck(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data || [];
// this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
// this.list = [];
// this.total = 0;
});
},
dlList(sickerAdNum) {
this.loading = true;
this.filterQuery.adNum = sickerAdNum;
dlOrFilter(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
page: 1,
limit: 10,
};
this.getList();
},
},
created() {
this.getList();
},
watch: {
sickerAdNum: function (val) {
this.dlList(val);
}
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save