From 98e7a7b2642fe7d6fd168e38baaf6b05791c5379 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Tue, 2 Jul 2024 09:16:32 +0800 Subject: [PATCH] =?UTF-8?q?7/2=20=E5=9F=BA=E7=A1=80=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/consume/materialCategory.vue | 6 +- src/views/basic/corpMaintain/corpMaintain.vue | 2 +- src/views/basic/destiny/addDestinyProcess.vue | 6 +- src/views/basic/destiny/destinyModelEdit.vue | 8 +- .../basic/destiny/destinySelectProduct.vue | 8 +- src/views/basic/product/bindProduct.vue | 11 +- src/views/basic/product/product.vue | 5 + src/views/basic/product/productAdd.vue | 7 +- src/views/basic/product/productCategory.vue | 7 + src/views/basic/product/productEdit.vue | 6 +- src/views/basic/product/productUdiType.vue | 5 + .../inventory/inner/innerOrderEditDialog.vue | 10 +- .../inner/innerOrderSelectProduct.vue | 8 +- src/views/thirdSys/busType/index.vue | 12 +- src/views/thirdSys/inv/index.vue | 3 +- src/views/thirdSys/product/thrProductsAdd.vue | 490 +++++++++--------- 16 files changed, 343 insertions(+), 251 deletions(-) diff --git a/src/views/basic/consume/materialCategory.vue b/src/views/basic/consume/materialCategory.vue index 6cf64107..40bce69d 100644 --- a/src/views/basic/consume/materialCategory.vue +++ b/src/views/basic/consume/materialCategory.vue @@ -102,7 +102,7 @@ </el-col> <el-col :span="4" :offset="14" > <el-button-group > - <el-button type="primary" @click.native="save()" :loading="loading">保存</el-button> + <el-button type="primary" @click.native="save()" :loading="saveLoading">保存</el-button> </el-button-group> </el-col> </el-row> @@ -153,13 +153,16 @@ export default { children: "children", label: "label" }, + saveLoading: false, } }, methods: { save(){ this.addData.deptCategory = this.getDeptAllCheckedKeys() + this.saveLoading = true updateBindCategory(this.addData).then((response) => { if (response.code == 20000) { + this.saveLoading = false this.selectDialog = !this.selectDialog this.getData(this.query.deptCode) this.$message.success("保存成功"); @@ -167,6 +170,7 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.saveLoading = false this.$message.error("保存失败"); }); }, diff --git a/src/views/basic/corpMaintain/corpMaintain.vue b/src/views/basic/corpMaintain/corpMaintain.vue index aef5f606..020131a9 100644 --- a/src/views/basic/corpMaintain/corpMaintain.vue +++ b/src/views/basic/corpMaintain/corpMaintain.vue @@ -30,7 +30,7 @@ <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> <el-button type="primary" icon="el-icon-plus" @click.native="handleForm(null, null)" - :disabled="!configParms.basicCorp">新增 + :disabled="!configParms.basicCorp" >新增 </el-button> <el-button type="primary" icon="el-icon-bottom-right" @click="intentDetail">选入往来单位信息</el-button> </el-button-group> diff --git a/src/views/basic/destiny/addDestinyProcess.vue b/src/views/basic/destiny/addDestinyProcess.vue index daad9624..3b93fd59 100644 --- a/src/views/basic/destiny/addDestinyProcess.vue +++ b/src/views/basic/destiny/addDestinyProcess.vue @@ -3,7 +3,7 @@ <el-card> <el-button-group style="display: flex"> <el-button type="primary" @click.native="submitUpload()" style="margin: 0 60px 10px auto; height: 35px" - :loading="loading">提交 + :loading="submitLoading">提交 </el-button> </el-button-group> <el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-if="showSearch"> @@ -215,6 +215,7 @@ export default { }, ], }, + submitLoading: false, }; }, methods: { @@ -390,7 +391,9 @@ export default { var query = { billNo: this.filterQuery.billNo } + this.submitLoading = true addDestinyProcess(query).then((response) => { + this.submitLoading = false if (response.code == 20000) { this.closeDialogpr() } else { @@ -398,6 +401,7 @@ export default { } }) .catch(() => { + this.submitLoading = false this.$message.error(response.message); }); } diff --git a/src/views/basic/destiny/destinyModelEdit.vue b/src/views/basic/destiny/destinyModelEdit.vue index 12e6d155..c0da1cf3 100644 --- a/src/views/basic/destiny/destinyModelEdit.vue +++ b/src/views/basic/destiny/destinyModelEdit.vue @@ -43,7 +43,7 @@ </el-col> </el-row> <div style="text-align: center; margin-top: 10px;"> - <el-button type="primary" size="small" icon="search" @click="onModifySubmit">提交</el-button> + <el-button type="primary" size="small" icon="search" @click="onModifySubmit" :loading="submitLoading">提交</el-button> <el-button type="primary" size="small" icon="search" @click="closeDialog">取消</el-button> </div> </el-card> @@ -81,6 +81,7 @@ export default { code: null, remark: null, }, + submitLoading: false }; }, methods: { @@ -91,25 +92,30 @@ export default { if (isBlank(this.editLogin.code)) { return this.$message.error("模板编号不能为空"); } + this.submitLoading = true if (this.editLogin.id != null) { editModeldestiny(this.editLogin).then(res => { + this.submitLoading = false if (res.code == 20000) { this.closeDialog(); } else { this.$message.error(res.message); } }).catch(() => { + this.submitLoading = false this.$message.error("编辑失败!"); }); } else { this.editLogin.type = this.type addModeldestiny(this.editLogin).then(res => { + this.submitLoading = false if (res.code == 20000) { this.closeDialog(); } else { this.$message.error(res.message); } }).catch(() => { + this.submitLoading = false this.$message.error("提交失败!"); }); } diff --git a/src/views/basic/destiny/destinySelectProduct.vue b/src/views/basic/destiny/destinySelectProduct.vue index 053fcf88..a4d61827 100644 --- a/src/views/basic/destiny/destinySelectProduct.vue +++ b/src/views/basic/destiny/destinySelectProduct.vue @@ -78,7 +78,7 @@ <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> - <el-button type="primary" icon="el-icon-plus" @click="confirmSelect">确定</el-button> + <el-button type="primary" icon="el-icon-plus" @click="confirmSelect" :loading="confirmLoading">确定</el-button> </el-button-group> </div> <el-divider style="margin: 15px"></el-divider> @@ -305,16 +305,16 @@ export default { this.combine(); }, combine() { - this.loading = true; + this.confirmLoading = true; addModeldestinyProduct({pId: this.editQuery.id, list: this.lists}).then((response) => { - this.loading = false; + this.confirmLoading = false; if (response.code === 20000) { this.closeDialog(response.data); } else { this.$message.error(response.message); } }).catch(() => { - this.loading = false; + this.confirmLoading = false; }); }, }, diff --git a/src/views/basic/product/bindProduct.vue b/src/views/basic/product/bindProduct.vue index 10048d34..42096dde 100644 --- a/src/views/basic/product/bindProduct.vue +++ b/src/views/basic/product/bindProduct.vue @@ -70,8 +70,8 @@ <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> <el-button type="primary" icon="el-icon-search" @click="submit">查询</el-button> - <el-button type="primary" icon="el-icon-plus" @click="instentProduct">选入</el-button> - <el-button type="primary" icon="el-icon-search" @click="SelectInstentProduct">查询选入</el-button> + <el-button type="primary" icon="el-icon-plus" @click="instentProduct" :loading="instentLoading">选入</el-button> + <el-button type="primary" icon="el-icon-search" @click="SelectInstentProduct" :loading="SelectInstentLoading">查询选入</el-button> </el-button-group> @@ -135,6 +135,8 @@ export default { }, productList: [], loading: false, + instentLoading: false, + SelectInstentLoading: false, showSearch: true, productType: null, editQuery: null, @@ -188,6 +190,7 @@ export default { } this.filterQuery.page = 1; + this.SelectInstentLoading = true this.getselectList(); }, @@ -226,6 +229,7 @@ export default { getselectList(){ SelectproductList(this.filterQuery) .then((res) =>{ + this.SelectInstentLoading = false if(res.code == 20000){ this.$message.success("选入成功!"); this.closeDialog(); @@ -259,7 +263,9 @@ export default { } var ids = this.productList.map((item) => item.id) var data = {code: this.rId, ids: ids} + this.instentLoading = true saveRel(data).then((response) => { + this.instentLoading = false if (response.code == 20000) { this.$message.success("选入成功!"); this.closeDialog(); @@ -267,6 +273,7 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.instentLoading = false }); }, diff --git a/src/views/basic/product/product.vue b/src/views/basic/product/product.vue index 477f408d..32bd8c69 100644 --- a/src/views/basic/product/product.vue +++ b/src/views/basic/product/product.vue @@ -1684,6 +1684,7 @@ size="small" icon="search" @click="onAddSubmit(false)" + :loading="onAddLoading" >提交 </el-button> <el-button @@ -2035,6 +2036,7 @@ export default { useNumEnable: true, vueRouteSource: 1, //路由来源 1:耗材字典:2:第三方产品信息上传 isSelect: false, + onAddLoading: false, }; }, filters: { @@ -2513,8 +2515,10 @@ export default { onAddSubmit(relSubmit) { this.editFormat.relSubmit = relSubmit; console.log(this.editFormat); + this.onAddLoading = true updatetUdiInfos(this.editFormat) .then((response) => { + this.onAddLoading = false if (response.code == 20000) { this.getList(); this.cancelDialog(); @@ -2524,6 +2528,7 @@ export default { } }) .catch(() => { + this.onAddLoading = false this.cancelDialog(); }); }, diff --git a/src/views/basic/product/productAdd.vue b/src/views/basic/product/productAdd.vue index f28f6c81..16483883 100644 --- a/src/views/basic/product/productAdd.vue +++ b/src/views/basic/product/productAdd.vue @@ -162,7 +162,7 @@ </el-col> </el-row> <div style="text-align: center; margin-bottom: 10px;"> - <el-button type="primary" @click="saveNewProduct">提交</el-button> + <el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button> <el-button type="primary" @click="closeAddDialog">取消</el-button> </div> </el-form> @@ -205,6 +205,7 @@ export default { }, thirdSys: [], classifyList: [], + saveLoading: false, } }, @@ -279,8 +280,9 @@ export default { this.$message.warning('产品属性不能为空!') return } - + this.saveLoading = true addProduct(this.newProductData).then((res) => { + this.saveLoading = false if (res.code == 20000) { this.$message.success('添加成功') //清空弹窗数据 @@ -289,6 +291,7 @@ export default { this.$message.error(res.message) } }).catch((error) => { + this.saveLoading = false this.$message.error(error.message) }) }, diff --git a/src/views/basic/product/productCategory.vue b/src/views/basic/product/productCategory.vue index cd5b1030..1a159f6f 100644 --- a/src/views/basic/product/productCategory.vue +++ b/src/views/basic/product/productCategory.vue @@ -519,6 +519,7 @@ <el-button type="primary" @click.native="forInvSubmit()" + :loading="subLoading" >提交 </el-button > @@ -1574,6 +1575,7 @@ export default { limit: 20, zczbhhzbapzbh: null, }, + subLoading: false, }; }, filters: {}, @@ -1797,8 +1799,10 @@ export default { this.$message.error("名称不能为空!"); return } + this.subLoading = true if (this.subData.id != null) { uodateBasicHospType(this.subData).then((response) => { + this.subLoading = false if (response.code == 20000) { this.subFormVisible = false; this.getTerrList(); @@ -1806,10 +1810,12 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.subLoading = false this.subFormVisible = false; }); } else { saveBasicHospType(this.subData).then((response) => { + this.subLoading = false if (response.code == 20000) { this.subFormVisible = false; this.getTerrList(); @@ -1817,6 +1823,7 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.subLoading = false this.subFormVisible = false; }); } diff --git a/src/views/basic/product/productEdit.vue b/src/views/basic/product/productEdit.vue index 5f453366..5b2d8ea2 100644 --- a/src/views/basic/product/productEdit.vue +++ b/src/views/basic/product/productEdit.vue @@ -739,7 +739,7 @@ ></product-single-edit> <div style="text-align: center;margin-top: 12px"> - <el-button type="primary" size="small" icon="search" @click="onAddSingleSubmit(false)" + <el-button type="primary" size="small" icon="search" @click="onAddSingleSubmit(false)" :loading="addLoading" >提交 </el-button> <el-button type="primary" size="small" icon="search" @click="cancelDialog" @@ -824,6 +824,7 @@ export default { nameCode: null }, classifyList: [], + addLoading: false, } }, components: { @@ -970,8 +971,10 @@ export default { this.editSingleDiDialogVisible = true; }, onAddSingleSubmit() { + this.addLoading = true updatetSingleUdiInfo(this.editSingleFormat) .then((response) => { + this.addLoading = false if (response.code == 20000) { let ttquery = { id: this.relevanceEdit.id @@ -983,6 +986,7 @@ export default { } }) .catch(() => { + this.addLoading = false this.cancelDialog(); }); }, diff --git a/src/views/basic/product/productUdiType.vue b/src/views/basic/product/productUdiType.vue index 37f54eda..ac7e713f 100644 --- a/src/views/basic/product/productUdiType.vue +++ b/src/views/basic/product/productUdiType.vue @@ -92,6 +92,7 @@ <el-button type="primary" @click.native="forInvSubmit()" + :loading="submitLoading" >提交 </el-button > @@ -193,6 +194,7 @@ export default { subTotal: 0, sysList: [], sysSubList: [], + submitLoading: false, }; }, methods: { @@ -266,7 +268,9 @@ export default { return } if(this.subData.id!=null){ + this.submitLoading = true uodateBasicHospType(this.subData).then((response) => { + this.submitLoading = false if (response.code == 20000) { this.subFormVisible = false; this.getList(); @@ -274,6 +278,7 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.submitLoading = false this.subFormVisible = false; }); }else{ diff --git a/src/views/inventory/inner/innerOrderEditDialog.vue b/src/views/inventory/inner/innerOrderEditDialog.vue index 0d7636b7..2fd6d654 100644 --- a/src/views/inventory/inner/innerOrderEditDialog.vue +++ b/src/views/inventory/inner/innerOrderEditDialog.vue @@ -6,7 +6,7 @@ <el-button type="primary" @click.native="saveOrder('1')" - :loading="loading" + :loading="saveLoading" >提交单据 </el-button > @@ -184,6 +184,7 @@ export default { pId:null, billNo:null, loading: false, + saveLoading: false, index: null, formLoading: false, formVisible: false, @@ -236,6 +237,7 @@ export default { } } if (status == "1") { + this.saveLoading = true this.submitFunction(status); } else { if (this.codeArray.length < 1) { @@ -271,6 +273,9 @@ export default { } inserThrOrderWeb(tQuery) .then(response => { + if (status == '1'){ + this.saveLoading = false + } this.loading = false; if (response.code === 20000) { this.$message.success(tMessage + "成功"); @@ -280,6 +285,9 @@ export default { } }) .catch(() => { + if (status == '1'){ + this.saveLoading = false + } this.loading = false; }) }, diff --git a/src/views/inventory/inner/innerOrderSelectProduct.vue b/src/views/inventory/inner/innerOrderSelectProduct.vue index ba209aea..8b8db378 100644 --- a/src/views/inventory/inner/innerOrderSelectProduct.vue +++ b/src/views/inventory/inner/innerOrderSelectProduct.vue @@ -54,7 +54,7 @@ <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button> <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> - <el-button type="primary" icon="el-icon-plus" @click="confirmSelect">确定</el-button> + <el-button type="primary" icon="el-icon-plus" @click="confirmSelect" :loading="commitLoding">确定</el-button> </el-button-group> </div> <el-divider style="margin: 15px"></el-divider> @@ -114,7 +114,7 @@ </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="selectCert">确 定</el-button> + <el-button type="primary" @click="selectCert" >确 定</el-button> <el-button @click="dialogFormVisible = false">取 消</el-button> </div> </el-dialog> @@ -225,6 +225,7 @@ export default { dialogFormVisible: false, multipleSelection: null, nameCode:null, + commitLoding:false }; }, @@ -347,7 +348,9 @@ export default { supId: this.multipleSelection.customerId, zczbhhzbapzbh: this.multipleSelection.zczbhhzbapzbh }; + this.commitLoding = true addOrderDetail(tQuery).then((response) => { + this.commitLoding = false this.loading = false; if (response.code === 20000) { this.closeDialog(response.data); @@ -360,6 +363,7 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.commitLoding = false this.loading = false; }); diff --git a/src/views/thirdSys/busType/index.vue b/src/views/thirdSys/busType/index.vue index d223b1cc..6b4191f4 100644 --- a/src/views/thirdSys/busType/index.vue +++ b/src/views/thirdSys/busType/index.vue @@ -80,7 +80,7 @@ > <modifyDialog :inputQuery="inputQuery"></modifyDialog> <div slot="footer" class="dialog-footer"> - <el-button type="primary" size="small" icon="search" @click="onAddSubmit" + <el-button type="primary" size="small" icon="search" @click="onAddSubmit" :loading="addLoading" >提交 </el-button > @@ -100,7 +100,7 @@ > <modifyDialog :inputQuery="inputQuery"></modifyDialog> <div slot="footer" class="dialog-footer"> - <el-button type="primary" size="small" icon="search" @click="onModifySubmit" + <el-button type="primary" size="small" icon="search" @click="onModifySubmit" :loading="upLoading" >提交 </el-button > @@ -167,6 +167,8 @@ export default { loading: false, thirdSysDetail: {}, configParms: {}, + addLoading: false, + upLoading: false, }; }, @@ -276,8 +278,10 @@ export default { return; } + this.addLoading = true insertBussinessType(this.inputQuery) .then((response) => { + this.addLoading = false if (response.code === 20000) { this.loading = false; this.cancelDialog(); @@ -287,6 +291,7 @@ export default { } }) .catch(() => { + this.addLoading = false this.loading = false; this.cancelDialog(); }); @@ -312,8 +317,10 @@ export default { return; } + this.upLoading = true updateBussinessType(this.inputQuery) .then((response) => { + this.upLoading = false if (response.code === 20000) { this.loading = false; this.cancelDialog(); @@ -323,6 +330,7 @@ export default { } }) .catch(() => { + this.upLoading = false this.loading = false; this.cancelDialog(); }); diff --git a/src/views/thirdSys/inv/index.vue b/src/views/thirdSys/inv/index.vue index 4e5d28cd..345f3d54 100644 --- a/src/views/thirdSys/inv/index.vue +++ b/src/views/thirdSys/inv/index.vue @@ -262,7 +262,7 @@ <el-button type="primary" @click.native="forSubSubmit()" - :loading="formLoading" + :loading="forLoading" >提交 </el-button > @@ -343,6 +343,7 @@ export default { false: "仓库", }, formLoading: false, + forLoading: false, subFormVisible: false, formVisible: false, formData: formJson, diff --git a/src/views/thirdSys/product/thrProductsAdd.vue b/src/views/thirdSys/product/thrProductsAdd.vue index a2780392..0cbc8ac8 100644 --- a/src/views/thirdSys/product/thrProductsAdd.vue +++ b/src/views/thirdSys/product/thrProductsAdd.vue @@ -1,248 +1,274 @@ <template> - <el-form :model="newProductData" label-width="120px"> - <el-row type="flex"> - <el-col :span="11" type="flex"> - <el-form-item label="第三方系统" prop="thirdSysFk"> - <el-select - style="width: 90%" - v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统" - > - <el-option - v-for="item in thirdSys" - :key="item.value" - :label="item.thirdName" - :value="item.thirdId"> - <span style="float: left">{{ item.thirdName }}</span> - <span style="float: right; color: #8492a6; font-size: 13px">{{ - item.thirdId - }}</span> - </el-option> - </el-select> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" type="flex"> - <el-form-item label="产品编码:" prop="code"> - <el-input style="width: 90%" size="small" placeholder="请输入产品编码" v-model.trim="newProductData.code"></el-input></el-form-item> - </el-col> - <el-col :span="11" type="flex"> - <el-form-item label="产品名称:" prop="name"> - <el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name"></el-input> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" class="el-col"> - <el-form-item label="规格型号:" prop="spec"> - <el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec"></el-input> - </el-form-item> - </el-col> - <el-col :span="11" class="el-col"> - <el-form-item label="计量单位:" prop="measname"> - <el-input style="width: 90%" size="small" placeholder="请输入计量单位" v-model.trim="newProductData.measname"></el-input> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" class="el-col"> - <el-form-item label="生产企业:" prop="manufactory"> - <el-input style="width: 90%" size="small" placeholder="请输入生产企业" v-model.trim="newProductData.manufactory"></el-input> - </el-form-item> - </el-col> - <el-col :span="11" class="el-col"> - <el-form-item label="注册证号:" prop="registerNo"> - <el-input style="width: 90%" size="small" placeholder="请输入注册证号" v-model.trim="newProductData.registerNo"></el-input> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" class="el-col"> - <el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc"> - <el-input style="width: 90%" size="small" placeholder="请输入医疗器械注册人" v-model.trim="newProductData.ylqxzcrbarmc"></el-input> - </el-form-item> - </el-col> - <el-col :span="11" class="el-col"> - <el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc"> - <el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称" v-model.trim="newProductData.ylqxzcrbarywmc"></el-input> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" class="el-col"> - <el-form-item label="产品类别:" prop="cplb"> - <el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb"></el-input> - </el-form-item> - </el-col> - <el-col :span="11" class="el-col"> - <el-form-item label="分类编码:" prop="flbm"> - <el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm"></el-input> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" class="el-col"> - <el-form-item label="商品条码:" prop="sptm"> - <el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm"></el-input> - </el-form-item> - </el-col> - <el-col :span="11" class="el-col"> - <el-form-item label="医保编码:" prop="ybbm"> - <el-input style="width: 90%" size="small" placeholder="请输入医保编码" v-model.trim="newProductData.ybbm"></el-input> - </el-form-item> - </el-col> - </el-row> - <el-row type="flex"> - <el-col :span="11" class="el-col"> - <el-form-item label="统一社会信用号:" prop="tyshxydm"> - <el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号" v-model.trim="newProductData.tyshxydm"></el-input> - </el-form-item> - </el-col> - <el-col :span="11" class="el-col"> - <el-form-item label="器械类别:" prop="qxlb"> - <el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb"></el-input> - </el-form-item> - </el-col> - </el-row> + <el-form :model="newProductData" label-width="120px"> + <el-row type="flex"> + <el-col :span="11" type="flex"> + <el-form-item label="第三方系统" prop="thirdSysFk"> + <el-select + style="width: 90%" + v-model="newProductData.thirdSysFk" placeholder="请选择第三方系统" + > + <el-option + v-for="item in thirdSys" + :key="item.value" + :label="item.thirdName" + :value="item.thirdId" + > + <span style="float: left">{{ item.thirdName }}</span> + <span style="float: right; color: #8492a6; font-size: 13px">{{ + item.thirdId + }}</span> + </el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" type="flex"> + <el-form-item label="产品编码:" prop="code"> + <el-input style="width: 90%" size="small" placeholder="请输入产品编码" v-model.trim="newProductData.code" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" type="flex"> + <el-form-item label="产品名称:" prop="name"> + <el-input style="width: 90%" size="small" placeholder="请输入产品名称" v-model.trim="newProductData.name" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" class="el-col"> + <el-form-item label="规格型号:" prop="spec"> + <el-input style="width: 90%" size="small" placeholder="请输入规格型号" v-model.trim="newProductData.spec" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" class="el-col"> + <el-form-item label="计量单位:" prop="measname"> + <el-input style="width: 90%" size="small" placeholder="请输入计量单位" v-model.trim="newProductData.measname" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" class="el-col"> + <el-form-item label="生产企业:" prop="manufactory"> + <el-input style="width: 90%" size="small" placeholder="请输入生产企业" + v-model.trim="newProductData.manufactory" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" class="el-col"> + <el-form-item label="注册证号:" prop="registerNo"> + <el-input style="width: 90%" size="small" placeholder="请输入注册证号" + v-model.trim="newProductData.registerNo" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" class="el-col"> + <el-form-item label="医疗器械注册人:" prop="ylqxzcrbarmc"> + <el-input style="width: 90%" size="small" placeholder="请输入医疗器械注册人" + v-model.trim="newProductData.ylqxzcrbarmc" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" class="el-col"> + <el-form-item label="注册人英文名称:" prop="ylqxzcrbarywmc"> + <el-input style="width: 90%" size="small" placeholder="请输入注册人英文名称" + v-model.trim="newProductData.ylqxzcrbarywmc" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" class="el-col"> + <el-form-item label="产品类别:" prop="cplb"> + <el-input style="width: 90%" size="small" placeholder="请输入产品类别" v-model.trim="newProductData.cplb" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" class="el-col"> + <el-form-item label="分类编码:" prop="flbm"> + <el-input style="width: 90%" size="small" placeholder="请输入分类编码" v-model.trim="newProductData.flbm" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" class="el-col"> + <el-form-item label="商品条码:" prop="sptm"> + <el-input style="width: 90%" size="small" placeholder="请输入商品条码" v-model.trim="newProductData.sptm" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" class="el-col"> + <el-form-item label="医保编码:" prop="ybbm"> + <el-input style="width: 90%" size="small" placeholder="请输入医保编码" v-model.trim="newProductData.ybbm" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <el-row type="flex"> + <el-col :span="11" class="el-col"> + <el-form-item label="统一社会信用号:" prop="tyshxydm"> + <el-input style="width: 90%" size="small" placeholder="请输入统一社会信用号" + v-model.trim="newProductData.tyshxydm" + ></el-input> + </el-form-item> + </el-col> + <el-col :span="11" class="el-col"> + <el-form-item label="器械类别:" prop="qxlb"> + <el-input style="width: 90%" size="small" placeholder="请输入器械类别" v-model.trim="newProductData.qxlb" + ></el-input> + </el-form-item> + </el-col> + </el-row> - <el-row type="flex"> - <el-col :span="23" class="el-col"> - <el-form-item label="产品描述:" prop="cpms"> - <el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述" v-model.trim="newProductData.cpms"></el-input> - </el-form-item> - </el-col> - </el-row> - <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-row type="flex"> + <el-col :span="23" class="el-col"> + <el-form-item label="产品描述:" prop="cpms"> + <el-input style="width: 92%" type="textarea" size="mini" rows="3" placeholder="请输入产品描述" + v-model.trim="newProductData.cpms" + ></el-input> + </el-form-item> + </el-col> + </el-row> + <div style="text-align: center; margin-bottom: 10px;"> + <el-button type="primary" @click="saveNewProduct" :loading="saveLoading">提交</el-button> + <el-button type="primary" @click="closeAddDialog">取消</el-button> + </div> + </el-form> </template> <script> -import {saveNewProduct} from "@/api/thrsys/thrProducts"; +import { saveNewProduct } from '@/api/thrsys/thrProducts' - -import {getBasicThirdSys} from "@/api/thrsys/basicThirdSys"; -import {addProduct} from "@/api/thrsys/thrProductsAdd"; +import { getBasicThirdSys } from '@/api/thrsys/basicThirdSys' +import { addProduct } from '@/api/thrsys/thrProductsAdd' export default { - name: "ThrProductsAdd", - props: { - newType: { - type: Object, - required: true, - }, - closeAddDialog: { - type: Function, - required: true, - }, - }, - data() { - return { - 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, - cplx:null, - cpms: null, - thirdSysFk: null, - cpdls: null - }, - thirdSys: [], - } - + name: 'ThrProductsAdd', + props: { + newType: { + type: Object, + required: true }, - methods: { - saveNewProduct() { - this.addProductVisible = false; - if (this.$isBlank(this.newProductData.thirdSysFk)) { - this.$message.warning("第三方系统不能为空!"); - return; - } - if (this.$isBlank(this.newProductData.code)) { - this.$message.warning("产品编码为空!"); - return; - } - if (this.$isBlank(this.newProductData.name)) { - this.$message.warning("产品名称不能为空!"); - return; - } + closeAddDialog: { + type: Function, + required: true + } + }, + data() { + return { + 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, + cplx: null, + cpms: null, + thirdSysFk: null, + cpdls: null + }, + thirdSys: [], + saveLoading: false, + } - if (this.$isBlank(this.newProductData.spec)) { - this.$message.warning("规格型号不能为空"); - return; - } - if (this.$isBlank(this.newProductData.measname)) { - this.$message.warning("计量单位不能为空!"); - return; - } - if (this.$isBlank(this.newProductData.manufactory)) { - this.$message.warning("生产企业不能为空!"); - return; - } - if (this.$isBlank(this.newProductData.registerNo)) { - this.$message.warning("注册证号不能为空!"); - return; - } + }, + methods: { + saveNewProduct() { + this.addProductVisible = false + if (this.$isBlank(this.newProductData.thirdSysFk)) { + this.$message.warning('第三方系统不能为空!') + return + } + if (this.$isBlank(this.newProductData.code)) { + this.$message.warning('产品编码为空!') + return + } + if (this.$isBlank(this.newProductData.name)) { + this.$message.warning('产品名称不能为空!') + return + } + if (this.$isBlank(this.newProductData.spec)) { + this.$message.warning('规格型号不能为空') + return + } + if (this.$isBlank(this.newProductData.measname)) { + this.$message.warning('计量单位不能为空!') + return + } + if (this.$isBlank(this.newProductData.manufactory)) { + this.$message.warning('生产企业不能为空!') + return + } + if (this.$isBlank(this.newProductData.registerNo)) { + this.$message.warning('注册证号不能为空!') + return + } + this.saveLoading = true + if (this.newType == 1) { + saveNewProduct(this.newProductData).then((res) => { + this.saveLoading = false + if (res.code == 20000) { + this.$message.success('添加成功') + //清空弹窗数据 + this.$emit('closeAddDialog', true) + this.closeAddDialog(true) + } else { + this.$message.error(res.message) + } + }).catch((error) => { + this.saveLoading = false + // this.$message.error(error.message); + }) + } else if (this.newType == 2) { + addProduct(this.newProductData).then((res) => { + this.saveLoading = false + if (res.code == 20000) { + this.$message.success('添加成功') + //清空弹窗数据 + this.closeAddDialog(true) + } else { + this.$message.error(res.message) + } + }).catch((error) => { + this.saveLoading = false + // this.$message.error(error.message); + }) + } - if (this.newType == 1) { - saveNewProduct(this.newProductData).then((res) => { - if (res.code == 20000) { - this.$message.success("添加成功"); - //清空弹窗数据 - this.$emit("closeAddDialog", true); - this.closeAddDialog(true); - } else { - this.$message.error(res.message); - } - }).catch((error) => { - // this.$message.error(error.message); - }) - } else if (this.newType == 2) { - addProduct(this.newProductData).then((res) => { - if (res.code == 20000) { - this.$message.success("添加成功"); - //清空弹窗数据 - this.closeAddDialog(true); - }else { - this.$message.error(res.message); - } - }).catch((error) => { - // this.$message.error(error.message); - }) - } - - }, - getBasicThirdSys() { - let query = { - enabled: true, - }; - getBasicThirdSys(query) - .then((response) => { - this.thirdSys = response.data.list || []; - }) - .catch(() => { - this.loading = false; - this.list = []; - }); - }, - }, - created() { - this.getBasicThirdSys(); }, + getBasicThirdSys() { + let query = { + enabled: true + } + getBasicThirdSys(query) + .then((response) => { + this.thirdSys = response.data.list || [] + }) + .catch(() => { + this.loading = false + this.list = [] + }) + } + }, + created() { + this.getBasicThirdSys() + } } </script>