新增单据管理,录入产品页面

prod
anthonywj 2 years ago
parent 60f6af9ddf
commit 50a9c3446b

@ -1,6 +1,15 @@
import axios from '@/utils/request'
export function getDraft(query) {
return axios({
url: "/udiwms/inout/order/draft",
method: "get",
params: query
});
}
export function orderList(query) {
return axios({
url: "/admin/warehouse/inout/order/list",

@ -0,0 +1,19 @@
import axios from '@/utils/request'
export function getDetailCodes(query) {
return axios({
url: "/udiwms/inout/order/draft/detailCode",
method: "get",
params: query
});
}
export function getDetailBizs(query) {
return axios({
url: "/udiwms/inout/order/draft/detailBiz",
method: "get",
params: query
});
}

@ -179,13 +179,16 @@
</el-form>
</el-card>
<el-tabs type="border-card" style="margin: 5px">
<el-tab-pane label="扫码明细">
<codesPanel :idQuery="idQuery"></codesPanel>
<el-tab-pane label="业务详情">
<biz-detail-panel :idQuery="idQuery" v-if="isCodeAlive"></biz-detail-panel>
</el-tab-pane>
<el-tab-pane label="扫码详情">
<codeDetailPanel :idQuery="idQuery" v-if="isCodeAlive"></codeDetailPanel>
</el-tab-pane>
<el-tab-pane label="业务详情">
<el-tab-pane label="扫码明细">
<codesPanel :idQuery="idQuery" v-if="isCodeAlive"></codesPanel>
</el-tab-pane>
</el-tabs>
@ -274,6 +277,8 @@ import {getLocalJoinByUser} from "../../api/basic/busType";
import codesPanel from "./IoCreateOrderCodes"
import codeDetailPanel from "./IoCreateOrderCodeDetail"
import bizDetailPanel from "./IoCreateOrderBizDetail"
import A from "../../plugins/KeyScaner"
import {isBlank} from "@/utils/strUtil";
import {filterDepts} from "@/api/auth/authDept";
@ -319,35 +324,11 @@ export default {
corpType: 0,
genUnit: false,
},
fromOptions: [],
isCodeAlive: true,
editCodeVisible: false,
billAction: null,
actionEnable: false,
// formData: {
// corpOrderId: "",
// code: "",
// actor: "",
// fromCorpId: "",
// fromCorp: null,
// fromType: 2,
// actDate: new Date(),
// action: null,
// locStorageCode: null,
// outChangeEnable: false,
// preCheck: false,
// batchNo: null,
// produceDate: null,
// expireDate: null,
// serialNo: null,
// invWarehouseCode: null,
// subInvCode: null,
// fromInvCode: null,
// codeFillCheck: null,
// vailInv: null,
// deptCode: null,
//
// },
editOriginCodeVisible: false,
curId: null,
storageList: [],
@ -367,7 +348,7 @@ export default {
formVisible: false,
deleteLoading: false,
orderNo: null,
fromOptions: [],
fromStorageOptions: [],
@ -389,7 +370,7 @@ export default {
components: {
draggable,
// DialogSelectUnit, selectRlDialog, editCodeDialog
codesPanel
codesPanel, codeDetailPanel, bizDetailPanel
},
methods: {
@ -438,13 +419,11 @@ export default {
page: 1,
limit: 20
};
if (this.curAction.corpType == 3) {//
cQuery.corpType = 4;
this.formData.fromCorpId = this.curAction.defaultUnit;
} else if (this.curAction.corpType == 2)//
if (this.curAction.corpType == 3) {//
cQuery.corpType = 3;
} else if (this.curAction.corpType == 2)//
{
cQuery.corpType = 1;
cQuery.outType = 2;
cQuery.corpType = 2;
} else if (this.curAction.corpType == 0) {
cQuery.corpType = 2;
} else return;
@ -529,6 +508,95 @@ export default {
this.$refs.inputRef.select();
},
//
addCodeSubmit(tQuery) {
addOrderWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.idQuery.id = response.data.orderId;
if (response.data.errMsg != null) {
this.$alert(response.data.errMsg, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
}
});
}
this.corpOrderIdDisabled = true;
this.refreshCodesPanel();
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
} else {
if (response.code == 502) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.refreshCodesPanel();
this.selectRlTitle = response.message;
this.bindRl(response.data);
} else if (response.code == 503) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.refreshCodesPanel();
this.selectUnitTitle = response.message;
this.handleUnitClick(response.data);
} else if (response.code == 504) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "忽略",
type: "error",
}).then(() => {
tQuery.ignoreExpire = true;
this.addCodeSubmit(tQuery)
}).catch(() => {
});
} else if (response.code == 505) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "忽略",
type: "warning",
}).then(() => {
tQuery.ignoreRecentExpire = true;
this.addCodeSubmit(tQuery)
}).catch(() => {
});
} else if (response.code == 507) {
this.editOriginCodeVisible = true;
this.editTitle = response.message;
this.formData.produceDate = response.data.produceDate;
this.formData.expireDate = response.data.expireDate;
this.formData.batchNo = response.data.batchNo;
this.formData.serialNo = response.data.serialNo;
this.$message({
type: 'error',
message: "提交失败!" + this.editTitle,
customClass: 'messageIndex'
});
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
}
});
}
}
this.loading = false;
});
},
refreshCodesPanel() {
this.isCodeAlive = false;
this.$nextTick(() => { //
this.isCodeAlive = true
})
},
submit(formName) {
if (this.total < 1) {
@ -669,86 +737,6 @@ export default {
this.addCodeSubmit(tQuery);
},
addCodeSubmit(tQuery) {
addOrderWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.idQuery.id = response.data.orderId;
if (response.data.errMsg != null) {
this.$alert(response.data.errMsg, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
}
});
}
this.corpOrderIdDisabled = true;
this.getCodeList();
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
} else {
if (response.code == 502) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.selectRlTitle = response.message;
this.bindRl(response.data);
} else if (response.code == 503) {
this.curRow = response.data;
this.idQuery.id = this.curRow.orderId;
this.getCodeList();
this.selectUnitTitle = response.message;
this.handleUnitClick(response.data);
} else if (response.code == 504) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "忽略",
type: "error",
}).then(() => {
tQuery.ignoreExpire = true;
this.addCodeSubmit(tQuery)
}).catch(() => {
});
} else if (response.code == 505) {
this.$confirm(response.message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "忽略",
type: "warning",
}).then(() => {
tQuery.ignoreRecentExpire = true;
this.addCodeSubmit(tQuery)
}).catch(() => {
});
} else if (response.code == 507) {
this.editOriginCodeVisible = true;
this.editTitle = response.message;
this.formData.produceDate = response.data.produceDate;
this.formData.expireDate = response.data.expireDate;
this.formData.batchNo = response.data.batchNo;
this.formData.serialNo = response.data.serialNo;
this.$message({
type: 'error',
message: "提交失败!" + this.editTitle,
customClass: 'messageIndex'
});
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
}
});
}
}
this.loading = false;
});
},
getInputFocus(event) {
@ -855,52 +843,39 @@ export default {
},
created() {
this.formData.code = '';
this.formData.actDate = new Date();
this.codeArray = [];
if (this.$isNotBlank(this.idQuery.id)) {
if (this.$isNotBlank(this.idQuery.billNo)) {
this.formData.actDate = new Date(this.idQuery.actDate);
this.formData.corpOrderId = this.idQuery.corpOrderId;
this.corpOrderIdDisabled = true;
this.formData.action = this.idQuery.action;
this.formData.fromCorp = this.idQuery.fromCorp;
this.formData.deptCode = this.idQuery.deptCode
this.formData.fromCorpId = this.idQuery.fromCorpId;
this.formData.locStorageCode = this.idQuery.locStorageCode;
this.formData.invWarehouseCode = this.idQuery.invWarehouseCode;
this.formData.invCode = this.idQuery.invCode;
this.formData.fromInvCode = this.idQuery.fromInvCode;
this.formData.outChangeEnable = this.idQuery.outChangeEnable;
this.formData.preCheck = this.idQuery.preCheck;
this.formData.remark = this.idQuery.remark;
this.actionEnable = true;
this.getCodeList();
this.findFromInvList(1);
this.refreshCodesPanel();
//
this.findInvByUser();
this.getBusTypeByInv();
this.findMethod(this.formData.fromCorp);
this.findFromInvList();
} else {
this.corpOrderIdDisabled = false;
if (JSON.stringify(this.$route.query) === '{}') {
// this.formData.corpOrderId = new Date().getTime() + (Math.ceil(Math.random() * 10 + 10) + '');
let date = new Date();
this.formData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10);
} else {
//
let query = this.$route.query;
this.orderNo = query.id;
this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit);
this.query.corpOrderId = query.id;
}
this.formData.invWarehouseCode = this.$store.getters.locSubInvCode;
this.formData.locStorageCode = this.$store.getters.locInvCode;
this.formData.actDate = new Date();
let date = new Date();
this.formData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10);
this.formData.invCode = this.$store.getters.locInvCode;
this.findInvByUser();
}
this.findInvByUser();
//
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
})
},
};
}
,
}
;
</script>

@ -1,15 +1,272 @@
<template>
<div>
<el-button-group style="display: flex">
<el-button
type="primary"
size="mini"
@click.native.stop="selectProductFunction()"
style="margin: 0px 60px 10px auto; height: 35px"
:loading="loading"
>产品录入
</el-button
>
</el-button-group>
<el-table v-loading="loading" :data="detailList" style="width: 100%;"
:row-class-name="tableRowClassName"
border
max-height="350" height="350" ref="multipleTable">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column width="150"
label="产品通用名"
prop="productName"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150"
label="规格型号"
prop="spec"
show-overflow-tooltip
></el-table-column>
<el-table-column width="150" label="批次号">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.batchNo"
:disabled="scope.row.index !== selectedIndex"
@input="scope.row.batchNo =scope.row.batchNo.replace(/[\W]/g, '')"
ref='inputBatchNoRef'
placeholder="请输入批次号" style="width: 80%"></el-input>
</template>
</el-table-column>
<el-table-column width="180" label="生产日期(yyMMdd)">
<template slot-scope="scope">
<el-input v-model="scope.row.productDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex"
type="number"
></el-input>
</template>
</el-table-column>
<el-table-column width="180" label="失效日期(yyMMdd)">
<template slot-scope="scope">
<el-input v-model="scope.row.expireDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)"
:disabled="scope.row.index !== selectedIndex"
type="number"
></el-input>
</template>
</el-table-column>
<el-table-column width="150" label="单据数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.count"
placeholder="请输入数量" style="width: 80%"
type='number'
:disabled="scope.row.index !== selectedIndex"
oninput="value=value.replace(/[^\d]/g,'')"></el-input>
</template>
</el-table-column>
<el-table-column width="150" label="价格">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.price"
type='number'
:disabled="scope.row.index !== selectedIndex"
placeholder="请输入价格" style="width: 80%"
></el-input>
</template>
</el-table-column>
<el-table-column width="250"
label="注册/备案凭证号"
prop="zczbhhzbapzbh"
show-overflow-tooltip
>
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.zczbhhzbapzbh"
:disabled="scope.row.index !== selectedIndex"
placeholder="请输入注册/备案凭证号" style="width: 100%"
></el-input>
</template>
</el-table-column>
<el-table-column width="150"
label="生产厂家"
prop="ylqxzcrbarmc"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="scope.row.index === selectedIndex"
@click.stop="true"
@click.native="rowChange(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="copyDetail(scope.row)"
>复制
</el-button
>
<el-button
type="text"
size="small"
@click.stop="true"
@click.native="deleteCodeArray(scope.$index, scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="业务详情-产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialog"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
<!-- <el-dialog-->
<!-- title="库存产品录入"-->
<!-- :visible.sync="selectInvProductVisible"-->
<!-- :close-on-click-modal="false"-->
<!-- :close-on-press-escape="false"-->
<!-- width="85%"-->
<!-- v-if="selectInvProductVisible"-->
<!-- :append-to-body='true'-->
<!-- >-->
<!-- <dialogInvProduct-->
<!-- :closeDialog="closeDialogC2"-->
<!-- :data="thisData"-->
<!-- :invQueryData="invQueryData"-->
<!-- ></dialogInvProduct>-->
<!-- </el-dialog>-->
</div>
</template>
<script>
import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
// import dialogInvProduct from "../inventory/DialogInvProduct"
import {getDetailBizs} from "@/api/inout/orderDetailCode";
export default {
name: "IoCreateOrderBizDetail"
name: "IoCreateOrderBizDetail",
props: {
idQuery: {
type: Object,
required: true,
},
},
data() {
return {
loading: false,
query: {
orderId: null,
code: "",
corpOrderId: "",
page: 1,
limit: 10,
},
detailList: [],
total: 0,
iCount: 0,
selectProductVisible: false,
thisData: {},
};
},
components: {
stockOrderNewSelectProduct,
// dialogInvProduct,
},
methods: {
getOrderDetails() {
this.loading = true;
this.query.orderId = this.idQuery.billNo;
getDetailBizs(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;
});
},
rowChange(val) {
this.currentRow = val;
this.selectedIndex = val.index;
},
closeDialog(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false;
},
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.relId)) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
tableRowClassName({row, rowIndex}) {
row.index = rowIndex;
},
selectProductFunction() {
this.selectProductVisible = true;
},
}
,
filters: {}
,
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
}
,
created() {
}
,
}
;
</script>
<style scoped>
.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>

@ -1,12 +1,98 @@
<template>
<div>
<el-table v-loading="loading" :data="detailList" style="width: 100%;" max-height="350" height="350"
border
ref="multipleTable">
<el-table-column type="index" label="序号" width="50"></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">
<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 label="价格" width="150" prop="price" show-overflow-tooltip></el-table-column>
<el-table-column label="生产厂家" width="150" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="150" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
</el-table>
<div class="block">
<pagination
v-show="total>0"
:total="total"
:page.sync="query.page"
:limit.sync="query.limit"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import {convertDate} from "@/utils/date";
import {getDetailCodes} from "@/api/inout/orderDetailCode";
export default {
name: "IoCreateOrderCodeDetail"
name: "IoCreateOrderCodeDetail",
props: {
idQuery: {
type: Object,
required: true,
},
},
data() {
return {
convertDateFun: convertDate,
loading: false,
query: {
orderId: null,
code: "",
corpOrderId: "",
page: 1,
limit: 10,
},
detailList: [],
total: 0,
selectRlVisible: false,
dialogTableVisible: false,
editCodeVisible: false,
}
},
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.$isNotBlank(row.supId) || !this.$isNotBlank(row.relId)) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
},
created() {
this.getOrderDetails();
},
}
</script>

@ -12,7 +12,7 @@
<el-table-column
label="UDI码"
prop="code"
width="250"
width="280"
show-overflow-tooltip
></el-table-column>
<el-table-column
@ -48,16 +48,16 @@
<el-table-column
label="扫码数量"
prop="count"
width="100"
width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="实际数量"
prop="reCount"
width="100"
width="80"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" width="180">
<el-table-column label="操作" width="240">
<template slot-scope="scope">
<el-button
type="text"
@ -133,7 +133,7 @@ export default {
methods: {
getCodeList() {
this.loading = true;
this.query.orderId = this.idQuery.id;
this.query.orderId = this.idQuery.billNo;
errorCodeList(this.query) //
.then((response) => {
this.codeArray = response.data.list || [];
@ -200,7 +200,6 @@ export default {
},
},
created() {
this.getCodeList();
},
}

@ -71,6 +71,7 @@
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
border
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
@ -109,7 +110,7 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button
type="text"
@ -209,7 +210,7 @@
<el-dialog
title="新增单据"
:visible.sync="addOrderVisible"
width="75%"
width="85%"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
@ -221,8 +222,6 @@
:idQuery="idQuery"
></addOrder>
</el-dialog>
<el-dialog
title="单号详情"
:visible.sync="codeDetailVisible"
@ -249,6 +248,7 @@
<script>
import {
getDraft,
filterOrder,
deleteByOrderId,
commitOrder,
@ -447,28 +447,9 @@ export default {
}
},
addOrders(row) {
this.idQuery.id = '';
this.idQuery.actDate = '';
this.idQuery.corpOrderId = '';
this.idQuery.outChangeEnable = row.outChangeEnable;
if (row.id !== null && row.id !== undefined && row.id !== '') {
this.idQuery.id = row.id;
this.idQuery.actDate = row.actDate;
this.idQuery.corpOrderId = row.corpOrderId;
this.idQuery.billType = row.action;
this.idQuery.locStorageCode = row.locStorageCode;
this.idQuery.invWarehouseCode = row.invWarehouseCode;
this.idQuery.fromSubInvCode = row.fromSubInvCode;
this.idQuery.deptCode = row.deptCode;
this.idQuery.preCheck = row.preCheck;
}
this.idQuery = {};
this.idQuery = row;
this.addOrderVisible = true;
this.idQuery.action = row.action;
this.idQuery.fromCorp = row.fromCorp;
this.idQuery.fromCorpId = row.fromCorpId;
this.idQuery.preCheck = row.preCheck;
},
errOrders() {
this.errOrderVisible = true;
@ -508,16 +489,7 @@ export default {
//
getList() {
this.loading = true;
// this.filterQuery.status = -1;
this.filterQuery.customerId = store.getters.customerId;
// this.filterQuery.status = 1;
// this.filterQuery.statusOrOne = -1;
if (isBlank(this.filterQuery.locStorageCode)) {
this.filterQuery.locStorageCode = this.$store.getters.locInvCode;
this.filterQuery.invWarehouseCode = this.$store.getters.locSubInvCode;
}
filterOrder(this.filterQuery)
getDraft(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
@ -606,7 +578,6 @@ export default {
.catch(() => {
});
},
deleteDialog(rowId) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
@ -619,7 +590,6 @@ export default {
.catch(() => {
});
},
onUpload(data) {
this.loading = true;
var idQuery = {
@ -645,7 +615,6 @@ export default {
.catch(() => {
});
},
handleErrorDetail(poistion) {
var mOrder = this.list[poistion];
var corpOrderId = mOrder.remark;
@ -653,7 +622,6 @@ export default {
this.errorDetail = mOrder.remark;
this.dialogVisible = true;
},
intentDetail(row) {
this.codeDetailVisible = true;
this.idQuery.id = row.id;
@ -672,7 +640,6 @@ export default {
.catch(() => {
});
},
getSubInvList() {
let query = {
// pcode: this.filterQuery.locStorageCode
@ -686,8 +653,6 @@ export default {
.catch(() => {
});
},
subInvChange() {
this.getBusType();
},

@ -0,0 +1,320 @@
<template>
<div>
<el-card class="el-card">
<div>
<el-form :model="listQuery" size="mini">
<el-row style="margin-top: 15px;width: 1000px">
<el-form-item class="query-form-item">
<el-input v-model="listQuery.udiCode"
style="width: 600px"
placeholder="请扫描或输入UDI码"
clearable="true"
@keyup.enter.native="keyup_submit($event)"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.unionCode" placeholder="DI/医保编码/商品条码"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.cpmctymc" placeholder="产品通用名" clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.ggxh" placeholder="规格型号" clearable="true"></el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.ylqxzcrbarmc" placeholder="生产企业/注册备案人"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="listQuery.thrPiId" placeholder="第三方产品编码" clearable="true"></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="search"></el-button>
<el-button type="primary" icon="search" @click="confirmSelect"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<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="qxlb"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="配送企业"
prop="companyName"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" width="160">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleDetailClick(scope.row)"
>详情
</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-dialog title="请选择对应的资质证书" :visible.sync="dialogFormVisible" append-to-body width="40%">
<el-form :model="form">
<el-form-item label="" prop="isGive">
<el-radio-group v-model="currentCert">
<el-radio :label="item" :key="item" v-for="item in certList">{{ item }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectCert"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {getUdiInfos} from "@/api/basic/product/udiRelevance";
export default {
name: "stockOrderNewSelectProduct",
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
filterType: {
type: Function,
required: true,
},
},
data() {
return {
loading: false,
listQuery: {
udiCode: null,
cpmctymc: null,
ggxh: null,
ylqxzcrbarmc: null,
thrPiId: null,
page: 1,
limit: 10,
},
dataList: [],
pageTotal: 1,
total: 1,
radioCheck: null,
currentRow: null,
//
dialogFormVisible: false,
currentCert: null,
certList: [],
};
},
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();
},
search() {
this.listQuery.page = 1;
this.getList();
},
getList() {
this.loading = true;
getUdiInfos(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 (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.multipleSelection.zczbhhzbapzbh = this.currentCert;
this.combine();
}
},
combine() {
let ids = [];
let data = {
relId: this.multipleSelection.rlId,
supId: this.multipleSelection.customerId
}
ids.push(data);
this.loading = true;
let tQuery = {
datas: ids,
zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh,
};
getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false;
if (response.code === 20000) {
this.closeDialog(response.data);
} else {
if (response.code == 601) {
this.$alert(response.message, "提示", {
confirmButtonText: "确定",
});
} else
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
},
},
components: {}
,
created() {
this.getList();
}
,
}
;
</script>
<style scoped>
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 5px;
}
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style>
Loading…
Cancel
Save