1.产品信息查询页面增加新增按钮

master
MrZhai 3 years ago
parent edbdb99f81
commit 84ca59a200

@ -31,6 +31,7 @@ export function downloadAll(query) {
params: query
});
}
export function productsDlAll(query) {
return axios({
url: "/udiwms/thrsys/products/productsDlAll",
@ -39,3 +40,10 @@ export function productsDlAll(query) {
});
}
export function saveNewProduct(data) {
return axios({
url: '/udiwms/udiinfo/erp/products/saveProduct',
method: 'post',
data: data
})
}

@ -5,31 +5,31 @@
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.code"
placeholder="产品编码/商品条码/医保编码" clearable="true"
placeholder="产品编码/商品条码/医保编码" clearable
@keyup.enter.native="keyupErp_submit($event)"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.name" clearable="true"
v-model="filterQuery.name" clearable
placeholder="产品名称"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.spec" clearable="true"
v-model="filterQuery.spec" clearable
placeholder="规格型号"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.registerNo" clearable="true"
v-model="filterQuery.registerNo" clearable
placeholder="注册/备案凭证"
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.manufactory" clearable="true"
v-model="filterQuery.manufactory" clearable
placeholder="生产厂家"
></el-input>
</el-form-item>
@ -49,6 +49,7 @@
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button>
<el-button type="primary" @click="addProductVisible=true"></el-button>
<!--<el-button type="primary" icon="search" @click="clearAll"></el-button>-->
<!--<el-upload-->
<!--v-if="!this.thirdSysDetail.enabled"-->
@ -107,11 +108,258 @@
:data="thisData"
></thrProductsDetail>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
:close-on-press-escape="false"
title="新增产品信息"
:visible.sync="addProductVisible"
width="85%"
v-if="addProductVisible"
@close="closeAddDialog"
>
<el-card class="el-card">
<el-form :inline="true" :model="newProductData" size="mini">
<div style="margin-bottom: 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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.name"
></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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.code"
></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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.registerNo"
></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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.manufactory"
></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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.spec"
></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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.measname"
></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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.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: 60%"
size="small"
placeholder="请输入内容"
v-model="newProductData.qxlb"
></el-input>
</div>
</el-col>
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="20" class="el-col" style="margin-top: 12px">
<div class="text item">
<div class="itemTag">
<span>产品描述:&nbsp;</span>
</div>
<el-input
style="width: 85%"
type="textarea"
size="mini"
rows="4"
placeholder="请输入内容"
v-model="newProductData.cpms"
></el-input>
</div>
</el-col>
</el-row>
</div>
<div style='text-align: center; margin-bottom: 10px;'>
<el-button type="primary" @click="saveNewProduct"></el-button>
<el-button type="primary" @click="closeAddDialog"></el-button>
</div>
</el-form>
</el-card>
</el-dialog>
</div>
</template>
<script>
import {
getThrProducts, delThrProducts, delAll, downloadAll
getThrProducts, delThrProducts, delAll, downloadAll, saveNewProduct
} from "../../api/thrsys/thrProducts";
import {getInvbasdoc} from "../../api/basic/getErps";
import {getBasicThirdSys, filterDetailByKey} from "../../api/basic/basicThirdSys";
@ -142,7 +390,25 @@
},
thrProductsDetailVisible: false,
thisData: null,
loading: false
loading: false,
addProductVisible: false,
newProductData: {
name: '',
code: null,
registerNo: null,
manufactory: null,
spec: null,
measname: null,
ylqxzcrbarmc: null,
ylqxzcrbarywmc: null,
cplb: null,
flbm: null,
sptm: null,
ybbm: null,
tyshxydm: null,
qxlb: null,
cpms: null
}
};
},
@ -319,7 +585,22 @@
});
},
saveNewProduct() {
this.addProductVisible = false;
saveNewProduct(this.newProductData).then((res) => {
if (res.code == 20000) {
this.$message.success("添加成功");
//
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
}
}).catch((error) => {
this.$message.error(error.message);
})
},
closeAddDialog() {
this.addProductVisible = false;
Object.keys(this.newProductData).forEach(key => this.newProductData[key] = null);
}
},
components: {
thrProductsDetail

Loading…
Cancel
Save