修改产品提的bug

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

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

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

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

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

Loading…
Cancel
Save