修改产品提的bug

Lvtianfang
李劲龙 2 years ago
parent b0964d407c
commit 6feabe587b

@ -3,7 +3,7 @@ import request from "@/utils/request";
//获取用户信息
export function getselfInfo() {
return request({
baseURL: location.origin,
// baseURL: location.origin,
url: "/api/admin/user/getSelfInfo",
method: "GET",
});

@ -9,28 +9,28 @@
<el-row>
<el-col :span="7">
<el-form-item label="产品名称">
<el-input v-model="form1.cpmc"></el-input>
<el-input v-model="form1.cpmc" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="备案编号">
<el-input v-model="form1.babm"></el-input>
<el-input v-model="form1.babm" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="生产企业">
<el-input v-model="form1.scqy"></el-input>
<el-input v-model="form1.scqy" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="注册证编号">
<el-input v-model="form1.name"></el-input>
<el-input v-model="form1.name" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="化妆品类型">
<el-form-item label="化妆品类型" placeholder="请输入">
<el-select
v-model="types"
placeholder="请选择化妆品类型"
@ -72,7 +72,7 @@
height="300"
:stripe="false"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="selection" width="35" align="center" />
<el-table-column
type="index"
label="序号"
@ -84,12 +84,12 @@
{{ scope.row.mc || scope.row.cpmc }}
</template>
</el-table-column>
<el-table-column :label="A2" align="center">
<el-table-column :label="A2" align="center" width="230">
<template slot-scope="scope">
{{ scope.row.bah || scope.row.pzrq }}
</template>
</el-table-column>
<el-table-column :label="A3" align="center">
<el-table-column :label="A3" align="center" width="230">
<template slot-scope="scope">
{{ scope.row.qy || scope.row.sf }}
</template>
@ -117,9 +117,10 @@
<pagination
v-show="total > 0"
:total="total"
:page="form1.current"
:limit="form1.size"
:page="form.current"
:limit="form.size"
@pagination="getPagination"
:current-page.sync="form.current"
></pagination>
</div>
</div>
@ -137,23 +138,23 @@ export default {
A1: "产品名称",
A2: "备案编码",
A3: "生产企业",
types: '1',
types: "1",
total: 0,
options: [
{
value: '1',
value: "1",
label: "国产化妆品",
},
{
value: '2',
value: "2",
label: "国产特殊化妆品",
},
{
value: '3',
value: "3",
label: "进口化妆品",
},
{
value: '4',
value: "4",
label: "进口特殊化妆品",
},
],
@ -162,47 +163,67 @@ export default {
cpmc: "",
name: "",
scqy: "",
},
form: {
size: 10,
current: 1,
},
jieliuShow: true,
};
},
mounted() {},
created() {
this.changeType('1');
this.changeType("1");
},
methods: {
jieliuFunc() {
if (this.jieliuShow) {
this.getData(this.types);
this.jieliuShow = false;
setTimeout(() => {
this.jieliuShow = true;
}, 3000);
} else {
this.$message("点击过快");
}
},
//
toDetail(e) {
let data = "";
if (this.types == '1') {
if (this.types == "1") {
data = e.bah;
} else if (this.types == '2') {
} else if (this.types == "2") {
data = e.zczh;
} else if (this.types == '3') {
} else if (this.types == "3") {
data = e.bah;
} else if (this.types == '4') {
} else if (this.types == "4") {
data = e.zczh;
}
//type
//flag
this.$router.push({
path: `/cosmeticsDetail`,
query: { type: '1', flag: this.types, data },
query: { type: "1", flag: this.types, data },
});
},
//
searchList() {
this.getData(this.types);
this.form.current = 1;
for (let i in this.form1) {
this.form[i] = this.form1[i];
}
this.jieliuFunc();
},
getPagination(e) {
console.log(e);
this.form1.current = e.page;
this.form1.size = e.limit;
this.form.current = e.page;
this.form.size = e.limit;
this.chinaCosmetics();
},
//
reset() {
this.types = "1";
this.form1 = {
babm: "",
cpmc: "",
@ -211,75 +232,79 @@ export default {
size: 10,
current: 1,
};
this.form = {
size: 10,
current: 1,
};
this.jieliuFunc();
},
//
async chinaCosmetics() {
this.loading = true;
let msg1 = await this.$api.cosmetics.domesticList(this.form1);
let msg1 = await this.$api.cosmetics.domesticList(this.form);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.form.size = msg1.data.size;
this.form.current = msg1.data.current;
this.loading = false;
},
//
async chinaSpecialCosmetics() {
this.loading = true;
let msg1 = await this.$api.cosmetics.specialList(this.form1);
let msg1 = await this.$api.cosmetics.specialList(this.form);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.form.size = msg1.data.size;
this.form.current = msg1.data.current;
this.loading = false;
},
//
async importCosmetics() {
this.loading = true;
let msg1 = await this.$api.cosmetics.importList(this.form1);
let msg1 = await this.$api.cosmetics.importList(this.form);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.form.size = msg1.data.size;
this.form.current = msg1.data.current;
this.loading = false;
},
//
async importSpecialCosmetics() {
this.loading = true;
let msg1 = await this.$api.cosmetics.importSpecialList(this.form1);
let msg1 = await this.$api.cosmetics.importSpecialList(this.form);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.form.size = msg1.data.size;
this.form.current = msg1.data.current;
this.loading = false;
},
async getData(e) {
if (e == '1') {
if (e == "1") {
this.A2 = "备案编码";
this.A3 = "生产企业";
this.chinaCosmetics();
} else if (e == '2') {
} else if (e == "2") {
this.A2 = "批准日期";
this.A3 = "省份";
this.chinaSpecialCosmetics();
} else if (e == '3') {
} else if (e == "3") {
this.A2 = "备案编码";
this.A3 = "生产企业";
this.importCosmetics();
} else if (e == '4') {
} else if (e == "4") {
this.A2 = "批准日期";
this.A3 = "省份";
this.importSpecialCosmetics();
}
},
async changeType(e) {
this.reset();
// this.reset();
this.getData(e);
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-select {
width: 100% !important;
@ -346,4 +371,7 @@ export default {
justify-content: space-between;
padding: 15px 20px;
}
</style>
::v-deep.el-table--medium .el-table__cell {
padding: 2.53px 0;
}
</style>

@ -9,7 +9,7 @@
<el-row>
<el-col :span="7">
<el-form-item label="产品名称">
<el-input v-model="form1.cpmc"></el-input>
<el-input v-model="form1.cpmc" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
@ -27,14 +27,14 @@
</el-col>
<el-col :span="7">
<el-form-item label="生产企业">
<el-input v-model="form1.scqy"></el-input>
<el-input v-model="form1.scqy" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="注册证编号或备案编号">
<el-input v-model="form1.zczh"></el-input>
<el-input v-model="form1.zczh" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -57,24 +57,53 @@
</div>
<section class="table-box">
<div class="table-item">
<el-table v-loading="loading" :data="tableData" border height="300" align="center">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" align="center" width="55" />
<el-table-column label="产品名称" prop="cpmc" align="center"> </el-table-column>
<el-table-column label="产品类型" prop="cplx" align="center"></el-table-column>
<el-table-column label="生产企业" prop="zcsqr" align="center"></el-table-column>
<el-table
v-loading="loading"
:data="tableData"
border
height="300"
align="center"
>
<el-table-column type="selection" width="35" align="center" />
<el-table-column
type="index"
label="序号"
align="center"
width="50"
/>
<el-table-column label="产品名称" prop="cpmc" align="center">
</el-table-column>
<el-table-column
label="产品类型"
prop="cplx"
align="center"
width="100"
></el-table-column>
<el-table-column
label="生产企业"
prop="zcsqr"
align="center"
></el-table-column>
<el-table-column
label="产品管理类别"
prop="cplb"
align="center"
width="100"
></el-table-column>
<el-table-column label="注册证编号/备案编号" prop="zczh" align="center">
<el-table-column
label="注册证编号/备案编号"
prop="zczh"
align="center"
width="200"
>
</el-table-column>
<el-table-column
label="操作"
class-name="small-padding fixed-width"
width="140"
width="120"
align="center"
>
<template slot-scope="scope">
<el-button
@ -93,9 +122,10 @@
<pagination
v-show="total > 0"
:total="total"
:page="form1.current"
:limit="form1.size"
:page="form.current"
:limit="form.size"
@pagination="getPagination"
:current-page.sync="form.current"
></pagination>
</div>
</div>
@ -129,6 +159,11 @@ export default {
size: 10,
current: 1,
},
form: {
size: 10,
current: 1,
},
jieliuShow: true,
};
},
mounted() {},
@ -136,20 +171,36 @@ export default {
this.chinaCosmetics();
},
methods: {
jieliuFunc() {
if (this.jieliuShow) {
this.chinaCosmetics();
this.jieliuShow = false;
setTimeout(() => {
this.jieliuShow = true;
}, 3000);
} else {
this.$message("点击过快");
}
},
//
toDetail(e) {
this.$router.push({
path: `/cosmeticsDetail`,
query: { type: '3', data:e.zczh },
query: { type: "3", data: e.zczh },
});
},
//
searchList() {
this.chinaCosmetics();
this.form.current = 1;
for (let i in this.form1) {
this.form[i] = this.form1[i];
}
this.jieliuFunc();
},
getPagination(e) {
this.form1.current = e.page;
this.form1.size = e.limit;
this.form.current = e.page;
this.form.size = e.limit;
this.chinaCosmetics();
},
//
@ -162,21 +213,25 @@ export default {
size: 10,
current: 1,
};
this.form = {
size: 10,
current: 1,
};
this.jieliuFunc();
},
async chinaCosmetics() {
this.loading = true;
let msg1 = await this.$api.apparatus.apparatusList(this.form1);
let msg1 = await this.$api.apparatus.apparatusList(this.form);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.form.size = msg1.data.size;
this.form.current = msg1.data.current;
this.loading = false;
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-select {
width: 100% !important;
@ -243,4 +298,7 @@ export default {
justify-content: space-between;
padding: 15px 20px;
}
</style>
::v-deep.el-table--medium .el-table__cell {
padding: 2.53px 0;
}
</style>

@ -9,17 +9,17 @@
<el-row>
<el-col :span="7">
<el-form-item label="产品名称">
<el-input v-model="form1.name"></el-input>
<el-input v-model="form1.name" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="药品分类">
<el-input v-model="form1.ypfl"></el-input>
<el-input v-model="form1.ypfl" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="批准文号">
<el-input v-model="form1.name"></el-input>
<el-input v-model="form1.pzwh" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -27,17 +27,17 @@
<el-row>
<el-col :span="7">
<el-form-item label="生产企业">
<el-input v-model="form1.name"></el-input>
<el-input v-model="form1.scqy" placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="剂型">
<el-select v-model="form1.types" placeholder="请选择剂型">
<el-select v-model="form1.jx" placeholder="请选择剂型">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
:value="item.label"
>
</el-option>
</el-select> </el-form-item
@ -71,22 +71,22 @@
width="50"
align="center"
/>
<el-table-column label="产品名称" align="center">
<el-table-column label="产品名称" align="center" width="230">
<template slot-scope="scope">
{{ scope.row.yptymc }}
</template>
</el-table-column>
<el-table-column label="批准文号" align="center">
<el-table-column label="批准文号" align="center" width="170">
<template slot-scope="scope">
{{ scope.row.yppzwh }}
</template>
</el-table-column>
<el-table-column label="药品分类" align="center" width="70">
<el-table-column label="药品分类" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.ypfl }}
</template>
</el-table-column>
<el-table-column label="剂型" align="center" width="70">
<el-table-column label="剂型" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.jx }}
</template>
@ -118,10 +118,10 @@
<pagination
v-show="total > 0"
:total="total"
:page="form1.current"
:limit="form1.size"
:page="form.current"
:limit="form.size"
@pagination="getPagination"
:current-page.sync="form1.current"
:current-page.sync="form.current"
></pagination>
</div>
</div>
@ -137,14 +137,40 @@ export default {
loading: false,
tableData: [],
total: 0,
options: [],
options: [
{
value: 1,
label: "全部",
},
{
value: 2,
label: "中药",
},
{
value: 3,
label: "辅料",
},
{
value: 4,
label: "生物制品",
},
{
value: 5,
label: "化学药品",
},
],
form1: {
types: "",
jx: "",
ypfl: "",
name: "",
pzwh: "",
scqy: "",
},
form: {
size: 10,
current: 1,
},
jieliuShow: true,
};
},
mounted() {},
@ -152,42 +178,63 @@ export default {
this.chinaCosmetics(1);
},
methods: {
jieliuFunc() {
if (this.jieliuShow) {
this.chinaCosmetics();
this.jieliuShow = false;
setTimeout(() => {
this.jieliuShow = true;
}, 3000);
} else {
this.$message("点击过快");
}
},
//
toDetail(e) {
this.$router.push({
path: `/cosmeticsDetail`,
query: { type: '2', data:e.yppzwh },
query: { type: "2", data: e.yppzwh },
});
},
//
searchList() {
this.form1.current = 1
this.chinaCosmetics();
this.form.current = 1;
for (let i in this.form1) {
this.form[i] = this.form1[i];
}
console.log(this.form);
this.jieliuFunc();
},
getPagination(e) {
console.log(e);
this.form1.current = e.page;
this.form1.size = e.limit;
this.chinaCosmetics();
this.form.current = e.page;
this.form.size = e.limit;
this.chinaCosmetics(1);
},
//
reset() {
this.form1 = {
name: "",
jx: "",
ypfl: "",
name: "",
pzwh: "",
scqy: "",
};
this.form = {
size: 10,
current: 1,
};
this.jieliuFunc();
},
//
async chinaCosmetics() {
this.loading = true;
let msg1 = await this.$api.cosmetics.vRdgYpwhGxwz(this.form1);
let msg1 = await this.$api.cosmetics.vRdgYpwhGxwz(this.form);
console.log(msg1);
this.tableData = msg1.data.records;
this.total = msg1.data.total;
this.form1.size = msg1.data.size;
this.form1.current = msg1.data.current;
this.form.size = msg1.data.size;
this.form.current = msg1.data.current;
this.loading = false;
},
},
@ -260,4 +307,7 @@ export default {
justify-content: space-between;
padding: 15px 20px;
}
::v-deep.el-table--medium .el-table__cell{
padding: 5.2px 0;
}
</style>

Loading…
Cancel
Save