修复新增申购单据:没有配送企业的产品无法录入

prod
1178634255 2 years ago
parent f194e0840b
commit 68ab5246a9

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

Loading…
Cancel
Save