master
李劲龙 1 year ago
parent fc44d69e22
commit 2295643a7e

@ -110,4 +110,20 @@ export default {
method: "get",
});
},
//新增或者修改药品以及化妆品关联的消息
productInto(data) {
return request({
url: `/pharmaceuticals/productInto`,
method: "post",
data
});
},
//通过批准文号-备案号查询单条药品以及化妆品关联的消息
findByApproveNo(params) {
return request({
url: `/pharmaceuticals/productInto/findByApproveNo`,
method: "get",
params
});
},
};

@ -0,0 +1,250 @@
<template>
<div class="my--descriptions" :class="changeStyle ? 'my--descriptionsChange' : ''">
<el-descriptions class="margin-top" :column="column" :size="size" :border="border" :colon="!changeStyle"
:labelClassName="width ? 'descriptions-labelWidth-style' : changeStyle ? 'descriptions-labelChange-style' : 'descriptions-label-style'"
:contentClassName="width ? 'descriptions-contentWidth-style' : changeStyle ? 'descriptions-contentChange-style' : 'descriptions-content-style'">
<el-descriptions-item v-for="item in tablist" :key="item.id" :span="item.span ? item.span : 1">
<template slot="label">
{{ item.label }}
</template>
<div class="mybox">
<div v-show="!item.show" class="showcharacters">{{ item.value || "-" }}</div>
<el-input v-model="item.value" placeholder="请输入" v-show="item.show" clearable @change="inputchang"></el-input>
<el-button size="mini"
v-show="urlA.leixing == 'ggfw' && (item.label == '工艺流程信息' || item.label == '处方信息' || item.label == '生产标准信息')"
type="primary" @click="editBtn(item)">
{{ item.show ? '确定' : '编辑' }}</el-button>
</div>
</el-descriptions-item>
</el-descriptions>
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
name: 'myDescriptions',
props: {
descriptions: {
type: Array,
required: true
},
size: {
type: String,
default: 'mini'
},
column: {
type: Number,
default: 2
},
width: {
type: Boolean,
default: false,
},
border: {
type: Boolean,
default: true,
},
changeStyle: {
type: Boolean,
default: false,
}
},
data() {
return {
input: "",
inputShow: false,
tablist: [],
id: undefined
}
},
methods: {
async editBtn(item) {
console.log(798, this.id);
this.huoqulist(1)
if (item.show) {
let data = {}
if (item.label == "工艺流程信息") {
data = {
"approveNo": this.urlA.data,
"gylcxx": item.value,
id: this.id
}
} else if (item.label == "处方信息") {
data = {
"approveNo": this.urlA.data,
"cfxx": item.value,
id: this.id
}
} else if (item.label == "生产标准信息") {
data = {
"approveNo": this.urlA.data,
"scbzxx": item.value,
id: this.id
}
}
let requst = await this.$api.frimCenter.productInto(data)
console.log(requst);
console.log("确定");
} else {
console.log("编辑");
}
item.show = !item.show
},
inputchang(value) {
},
async huoqulist(type) {
let requst = await this.$api.frimCenter.findByApproveNo({ approveNo: this.urlA.data })
if (requst.code == 200 && requst.data) {
let obj = requst.data
console.log(8888, this.tablist);
if (this.tablist[0].label == "工艺流程信息" && type == 0) {
this.tablist[0].value = obj.gylcxx
}
if (this.tablist[0].label == "处方信息" && type == 0) {
this.tablist[0].value = obj.cfxx
}
if (this.tablist[0].label == "生产标准信息" && type == 0) {
this.tablist[0].value = obj.scbzxx
}
console.log(999, this.tablist);
console.log(requst);
this.id = requst.data.id
console.log(152, this.id);
}
}
},
mounted() {
this.tablist = this.descriptions
this.huoqulist(0)
},
computed: {
...mapState({
urlA: (state) => state.app.urlA,
}),
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/styles/utils.scss";
.my--descriptions {
::v-deep .descriptions-label-style {
background-color: #F5F7FA;
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 400;
color: #6A6C6F;
width: vw(246);
}
::v-deep .descriptions-labelWidth-style {
background-color: #F5F7FA;
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 400;
color: #6A6C6F;
width: vw(306);
}
::v-deep .descriptions-content-style {
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 400;
color: #292F38;
width: vw(610);
}
::v-deep .descriptions-contentWidth-style {
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 400;
width: vw(450);
color: #292F38;
}
}
.my--descriptionsChange {
background-color: #F7FAFC;
padding: vh(25) 0;
.margin-top {
::v-deep .el-descriptions__body {
background-color: #F7FAFC;
.descriptions-labelChange-style {
background-color: #F7FAFC;
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 400;
color: #6A6C6F;
width: vw(246);
display: inline-block;
text-align: right;
}
.descriptions-contentChange-style {
background-color: #F7FAFC;
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 400;
color: #292F38;
width: vw(610);
}
}
}
}
::v-deep .el-descriptions--mini.is-bordered .el-descriptions-item__cell {
padding: vh(15) vw(10);
}
.mybox {
display: flex;
align-items: center;
}
::v-deep.el-input--medium {
width: vw(200);
margin: vw(0) vw(10);
}
//
::v-deep .el-input__inner {
height: vh(33);
}
//
::v-deep .el-input__suffix {
height: vh(33);
}
//
::v-deep .el-input .el-input__suffix {
.el-input__suffix-inner {
.el-icon-circle-close.el-input__clear {
line-height: vh(33);
height: vh(33);
}
}
}
//
.showcharacters {
margin-right: vw(10);
}
</style>

@ -200,7 +200,7 @@
<block-header :title="item.label" style="min-height: 13vh" v-for="item in listthree" :key="item.id"
v-show="obj.type == item.type || item.label == '生产标准信息'">
<div v-loading="loading">
<my-descriptions :descriptions="item.children"></my-descriptions>
<descriptionsbianji :descriptions="item.children"></descriptionsbianji>
</div>
</block-header>
</div>
@ -208,6 +208,7 @@
<script>
import blockHeader from "@/views/firmContent/components/blockHeader/index.vue";
import myDescriptions from "@/views/firmContent/components/descriptions/index.vue";
import descriptionsbianji from "@/views/firmContent/components/descriptionsbianji/index.vue";
export default {
/*
@ -228,6 +229,7 @@ export default {
label: "生产标准信息",
value: "",
data: "yptymc",
show:false
},
],
},
@ -241,6 +243,7 @@ export default {
label: "工艺流程信息",
value: "",
data: "yptymc",
show:false
},
],
},
@ -254,6 +257,7 @@ export default {
label: "处方信息",
value: "",
data: "yptymc",
show:false
},
],
},
@ -836,7 +840,7 @@ export default {
bz: "-",
};
},
components: { blockHeader, myDescriptions },
components: { blockHeader, myDescriptions,descriptionsbianji },
props: ["transinformation"],
created() {
this.obj = this.$store.state.app.urlA;
@ -962,7 +966,7 @@ export default {
let msg1 = await this.$api.cosmetics.getChinaSpecial(e);
this.$emit("getCPName", {
key: "国产特殊化妆品名称",
value: msg1.data.cpmc,
value: msg1.data.cpmc,
code: msg1.data.zczh,
name: msg1.data.cpmc,
type: 4

Loading…
Cancel
Save