From 31e87e7c6a4036e5a30604fec099a9de8eee04d4 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Tue, 2 Jul 2024 10:02:46 +0800 Subject: [PATCH] =?UTF-8?q?7/2=20=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/busType/bussinessType.vue | 11 +- src/views/inventory/InvSpaceManage.vue | 7 +- src/views/purchase/cert/supCertSet.vue | 1509 +++++++++-------- src/views/remind/addInvRemindSetDialog.vue | 6 +- src/views/system/dept/authDept.vue | 9 +- src/views/system/dept/invWarehouse.vue | 5 + src/views/system/dict/index.vue | 8 +- src/views/system/menu/index.vue | 8 +- src/views/system/param/BasicEntrutsRece.vue | 6 +- src/views/system/param/addhelpSettings.vue | 177 +- src/views/system/param/busTypeChange.vue | 11 +- src/views/system/param/busTypePre.vue | 13 +- .../system/ration/editRaationSetDialog.vue | 5 +- src/views/system/role/index.vue | 8 +- src/views/system/user/authUser.vue | 8 +- 15 files changed, 934 insertions(+), 857 deletions(-) diff --git a/src/views/basic/busType/bussinessType.vue b/src/views/basic/busType/bussinessType.vue index 465b7799..5e7b1f2f 100644 --- a/src/views/basic/busType/bussinessType.vue +++ b/src/views/basic/busType/bussinessType.vue @@ -147,7 +147,7 @@ <modifyDialog :inputQuery="inputQuery" :modifySubmit="onModifySubmit"></modifyDialog> <div style="text-align: center;margin-top: 12px"> <el-button type="primary" size="small" icon="search" @click="onModifySubmit" - :disabled="!configParams.typeScan" + :disabled="!configParams.typeScan" :loading="subLoading" >提交 </el-button > @@ -291,7 +291,8 @@ export default { uploadFileUrl: null, headers: {}, configParams: {}, - loading: false + loading: false, + subLoading: false, } }, @@ -448,10 +449,12 @@ export default { if(!(this.inputQuery.mainAction =='WareHouseIn' && this.inputQuery.actionType == 1)){ this.inputQuery.devInType = 0; } + this.subLoading = true updateBusType(this.inputQuery) .then((response) => { + this.subLoading = false if (response.code == 20000) { - this.loading = false + // this.loading = false this.cancelDialog() this.getList() } else { @@ -459,7 +462,7 @@ export default { } }) .catch(() => { - this.loading = false + this.subLoading = false this.cancelDialog() }) }, diff --git a/src/views/inventory/InvSpaceManage.vue b/src/views/inventory/InvSpaceManage.vue index 9c351979..bc6e5946 100644 --- a/src/views/inventory/InvSpaceManage.vue +++ b/src/views/inventory/InvSpaceManage.vue @@ -112,7 +112,7 @@ </el-col> </el-row> <div style="text-align: center"> - <el-button type="primary" size="small" icon="search" @click="saveSpace" + <el-button type="primary" size="small" icon="search" @click="saveSpace" :loading="saveSpaceLoading" >提交 </el-button > @@ -186,7 +186,8 @@ export default { {required: true, message: "请输入货位名称", trigger: "blur"} ], }, - modifySubInvList: [] + modifySubInvList: [], + saveSpaceLoading: false, }; }, watch: { @@ -303,7 +304,9 @@ export default { saveSpace() { this.$refs['formData'].validate((valid) => { if (valid) { + this.saveSpaceLoading = true saveSpace(this.formData, this.formName).then((res) => { + this.saveSpaceLoading = false if (res.code === 20000) { if ("add" === this.formName) { this.$message.success("新增成功"); diff --git a/src/views/purchase/cert/supCertSet.vue b/src/views/purchase/cert/supCertSet.vue index bfc7cb2e..84f17b1a 100644 --- a/src/views/purchase/cert/supCertSet.vue +++ b/src/views/purchase/cert/supCertSet.vue @@ -1,768 +1,791 @@ <template> - <div> - <el-card> - <div> - <p class="form-title">配送企业资质设置</p> - </div> - <div style=" float: right; text-align: right; margin-bottom: 8px;"> - <el-button type="primary" size="mini" icon="search" @click="addCert" style="text-align:right">添加设置</el-button> - </div> - <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row> - <el-table-column type="index" label="序号" width="50"></el-table-column> - <el-table-column label="证书名称" prop="name"></el-table-column> - <el-table-column label="是否必传" prop="require" s> - <template slot-scope="scope"> - <span>{{ enableMap[scope.row.need] }}</span> - </template> - </el-table-column> - <el-table-column label="说明" prop="remark"></el-table-column> - <el-table-column label="操作" width="200"> - <template slot-scope="scope"> - <el-button - type="text" - size="small" - @click="handleEdit(scope.row)" - >编辑 - </el-button> - - <el-button - type="text" - size="small" - @click="handleDel( scope.row)" - >删除 - </el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="query.page" - :limit.sync="query.limit" - @pagination="handleCurrentChange" - ></pagination> - - <el-dialog - :title="formMap[formName]" - :visible.sync="addDialogVisible" - width="60%" - :close-on-click-modal="false" - :close-on-press-escape="false" - v-if="addDialogVisible" - > - - <el-form :model="currentSup" :rules="formRules" label-width="100px" ref="dataForm"> - <el-row> - <el-col :span="11"> - <el-form-item label="证书名称:" prop="name"> - <el-input v-model="currentSup.name" style="width: 90%" auto-complete="off"></el-input> - </el-form-item> - </el-col> - - <el-col :span="11"> - <el-form-item label="是否必传:" prop="need"> - <el-select style="width: 90%" v-model="currentSup.need"> - <el-option label="是" :value=true></el-option> - <el-option label="否" :value=false></el-option> - </el-select> - </el-form-item> - </el-col> - </el-row> - <el-row> - <el-col :span="22"> - <el-form-item label="说明:" prop="remark"> - <el-input v-model="currentSup.remark" style="width: 95.5%" auto-complete="off" type="textarea" - autosize></el-input> - </el-form-item> - </el-col> - </el-row> - </el-form> - <div style="text-align: center"> - <el-button type="primary" size="small" icon="search" @click="onAddSubmit" - >提交 - </el-button - > - <el-button type="primary" size="small" icon="search" @click="cancelDialog" - >取消 - </el-button - > - </div> - - </el-dialog> - - </el-card> - - <el-card> - <div> - <p class="form-title">生产企业资质设置</p> - </div> - <div style=" float: right; + <div> + <el-card> + <div> + <p class="form-title">配送企业资质设置</p> + </div> + <div style=" float: right; text-align: right; margin-bottom: 8px;"> + <el-button type="primary" size="mini" icon="search" @click="addCert" style="text-align:right">添加设置 + </el-button> + </div> + <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row> + <el-table-column type="index" label="序号" width="50"></el-table-column> + <el-table-column label="证书名称" prop="name"></el-table-column> + <el-table-column label="是否必传" prop="require" s> + <template slot-scope="scope"> + <span>{{ enableMap[scope.row.need] }}</span> + </template> + </el-table-column> + <el-table-column label="说明" prop="remark"></el-table-column> + <el-table-column label="操作" width="200"> + <template slot-scope="scope"> + <el-button + type="text" + size="small" + @click="handleEdit(scope.row)" + >编辑 + </el-button> + + <el-button + type="text" + size="small" + @click="handleDel( scope.row)" + >删除 + </el-button> + </template> + </el-table-column> + </el-table> + + <pagination + v-show="total>0" + :total="total" + :page.sync="query.page" + :limit.sync="query.limit" + @pagination="handleCurrentChange" + ></pagination> + + <el-dialog + :title="formMap[formName]" + :visible.sync="addDialogVisible" + width="60%" + :close-on-click-modal="false" + :close-on-press-escape="false" + v-if="addDialogVisible" + > + + <el-form :model="currentSup" :rules="formRules" label-width="100px" ref="dataForm"> + <el-row> + <el-col :span="11"> + <el-form-item label="证书名称:" prop="name"> + <el-input v-model="currentSup.name" style="width: 90%" auto-complete="off"></el-input> + </el-form-item> + </el-col> + + <el-col :span="11"> + <el-form-item label="是否必传:" prop="need"> + <el-select style="width: 90%" v-model="currentSup.need"> + <el-option label="是" :value=true></el-option> + <el-option label="否" :value=false></el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="22"> + <el-form-item label="说明:" prop="remark"> + <el-input v-model="currentSup.remark" style="width: 95.5%" auto-complete="off" type="textarea" + autosize + ></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + <div style="text-align: center"> + <el-button type="primary" size="small" icon="search" @click="onAddSubmit" :loading="addLoading" + >提交 + </el-button + > + <el-button type="primary" size="small" icon="search" @click="cancelDialog" + >取消 + </el-button + > + </div> + + </el-dialog> + + </el-card> + + <el-card> + <div> + <p class="form-title">生产企业资质设置</p> + </div> + <div style=" float: right; text-align: right; - margin-bottom: 8px;"> - <el-button type="primary" size="mini" icon="search" @click="addManufacturerCert" style="text-align:right">添加设置</el-button> - </div> - - <el-table v-loading="loading" :data="manufacturerList" style="width: 100%" border highlight-current-row> - <el-table-column type="index" label="序号" width="50"></el-table-column> - <el-table-column label="证书名称" prop="name"></el-table-column> - <el-table-column label="产地" prop="foreign"> - <template slot-scope="scope"> - <span>{{ foreignMap[scope.row.foreign] }}</span> - </template> - </el-table-column> - <el-table-column label="说明" prop="remark"></el-table-column> - <el-table-column label="操作" width="200"> - <template slot-scope="scope"> - <el-button - type="text" - size="small" - @click="handleManufacturerEdit( scope.row)" - >编辑 - </el-button> - - <el-button - type="text" - size="small" - @click="handleManufacturerDel( scope.row)" - >删除 - </el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="manufacturerTotal>0" - :total="manufacturerTotal" - :page.sync="manufacturerQuery.page" - :limit.sync="manufacturerQuery.limit" - @pagination="handleManufacturerChange" - ></pagination> - - <el-dialog - :title="formManufacturerMap[formManufacturerName]" - :visible.sync="addManufacturerDialogVisible" - width="60%" - :close-on-click-modal="false" - :close-on-press-escape="false" - v-if="addManufacturerDialogVisible" - :isShow="false" - > - - <el-form :model="currentManufacturer" label-width="100px" :rules="formManufactureRules" ref="dataManufacturerForm"> - <el-row> - <el-col :span="11"> - <el-form-item label="证书名称:" prop="name"> - <el-input v-model="currentManufacturer.name" auto-complete="off" :disabled="currentManufacturer.need"></el-input> - </el-form-item> - </el-col> - - <el-col :span="11"> - <el-form-item label="产地:" prop="foreign"> - <el-select v-model="currentManufacturer.foreign" style="width: 100%" :disabled="currentManufacturer.need"> - <el-option label="全部" :value="1"></el-option> - <el-option label="国外" :value="2"></el-option> - <el-option label="国内" :value="3"></el-option> - </el-select> - </el-form-item> - </el-col> - </el-row> - <el-row> - <el-col :span="11" v-if="isShow"> - <el-form-item label="是否禁用:" prop="need"> - <el-select v-model="currentManufacturer.need" style="width: 100%"> - <el-option label="是" :value=true></el-option> - <el-option label="否" :value=false></el-option> - </el-select> - </el-form-item> - </el-col> - <el-col :span="11"> - <el-form-item label="说明:" prop="remark"> - <el-input v-model="currentManufacturer.remark" auto-complete="off" type="textarea" - autosize></el-input> - </el-form-item> - </el-col> - </el-row> - </el-form> - <div style="text-align: center"> - <el-button type="primary" size="small" icon="search" @click="onAddManufacturerSubmit" - >提交 - </el-button - > - <el-button type="primary" size="small" icon="search" @click="cancelDialog" - >取消 - </el-button - > - </div> - - </el-dialog> - - </el-card> - - <el-card> - <div> - <p class="form-title">产品资质设置</p> - </div> - <div style="float:right; + margin-bottom: 8px;" + > + <el-button type="primary" size="mini" icon="search" @click="addManufacturerCert" style="text-align:right"> + 添加设置 + </el-button> + </div> + + <el-table v-loading="loading" :data="manufacturerList" style="width: 100%" border highlight-current-row> + <el-table-column type="index" label="序号" width="50"></el-table-column> + <el-table-column label="证书名称" prop="name"></el-table-column> + <el-table-column label="产地" prop="foreign"> + <template slot-scope="scope"> + <span>{{ foreignMap[scope.row.foreign] }}</span> + </template> + </el-table-column> + <el-table-column label="说明" prop="remark"></el-table-column> + <el-table-column label="操作" width="200"> + <template slot-scope="scope"> + <el-button + type="text" + size="small" + @click="handleManufacturerEdit( scope.row)" + >编辑 + </el-button> + + <el-button + type="text" + size="small" + @click="handleManufacturerDel( scope.row)" + >删除 + </el-button> + </template> + </el-table-column> + </el-table> + + <pagination + v-show="manufacturerTotal>0" + :total="manufacturerTotal" + :page.sync="manufacturerQuery.page" + :limit.sync="manufacturerQuery.limit" + @pagination="handleManufacturerChange" + ></pagination> + + <el-dialog + :title="formManufacturerMap[formManufacturerName]" + :visible.sync="addManufacturerDialogVisible" + width="60%" + :close-on-click-modal="false" + :close-on-press-escape="false" + v-if="addManufacturerDialogVisible" + :isShow="false" + > + + <el-form :model="currentManufacturer" label-width="100px" :rules="formManufactureRules" + ref="dataManufacturerForm" + > + <el-row> + <el-col :span="11"> + <el-form-item label="证书名称:" prop="name"> + <el-input v-model="currentManufacturer.name" auto-complete="off" :disabled="currentManufacturer.need" + ></el-input> + </el-form-item> + </el-col> + + <el-col :span="11"> + <el-form-item label="产地:" prop="foreign"> + <el-select v-model="currentManufacturer.foreign" style="width: 100%" + :disabled="currentManufacturer.need" + > + <el-option label="全部" :value="1"></el-option> + <el-option label="国外" :value="2"></el-option> + <el-option label="国内" :value="3"></el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + <el-row> + <el-col :span="11" v-if="isShow"> + <el-form-item label="是否禁用:" prop="need"> + <el-select v-model="currentManufacturer.need" style="width: 100%"> + <el-option label="是" :value=true></el-option> + <el-option label="否" :value=false></el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="11"> + <el-form-item label="说明:" prop="remark"> + <el-input v-model="currentManufacturer.remark" auto-complete="off" type="textarea" + autosize + ></el-input> + </el-form-item> + </el-col> + </el-row> + </el-form> + <div style="text-align: center"> + <el-button type="primary" size="small" icon="search" @click="onAddManufacturerSubmit" :loading="onAddManufacturerSubmitLoading" + >提交 + </el-button + > + <el-button type="primary" size="small" icon="search" @click="cancelDialog" + >取消 + </el-button + > + </div> + + </el-dialog> + + </el-card> + + <el-card> + <div> + <p class="form-title">产品资质设置</p> + </div> + <div style="float:right; text-align: right; - margin-bottom: 8px;"> - <el-button type="primary" size="mini" icon="search" @click="addProductCert" style="text-align:right">添加设置</el-button> - </div> - - <el-table v-loading="productLoading" :data="productList" style="width: 100%" border highlight-current-row> - <el-table-column type="index" label="序号" width="50"></el-table-column> - <el-table-column label="证书名称" prop="name"></el-table-column> - <el-table-column label="产地" prop="imports"> - <template slot-scope="scope"> - <span>{{ foreignMap[scope.row.imports] }}</span> - </template> - </el-table-column> - <el-table-column label="产品类型" prop="cplx"> - </el-table-column> - <el-table-column label="产品类别" prop="hchzsb"> - </el-table-column> - - <el-table-column label="分类编码" prop="flbm"> - </el-table-column> - - <el-table-column label="说明" prop="remark"></el-table-column> - <el-table-column label="操作" width="200"> - <template slot-scope="scope"> - <el-button - type="text" - size="small" - @click="handleProductEdit( scope.row)" - >编辑 - - </el-button> - - <el-button - type="text" - size="small" - @click="handleProductDel( scope.row)" - >删除 - </el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="productTotal>0" - :total="productTotal" - :page.sync="productQuery.page" - :limit.sync="productQuery.limit" - @pagination="handleProductChange" - ></pagination> - - - <el-dialog - :title="formProductMap[formProductName]" - :visible.sync="addProductDialogVisible" - width="60%" - :close-on-click-modal="false" - :close-on-press-escape="false" - v-if="addProductDialogVisible" - :isShow="false" - > - - <el-form :model="currentProduct" label-width="100px" :rules="formRules" ref="dataForm"> - <el-row> - <el-col :span="11"> - <el-form-item label="证书名称" prop="name"> - <el-input v-model="currentProduct.name" style="width: 90%" auto-complete="off"></el-input> - </el-form-item> - </el-col> - - <el-col :span="11" v-if="isShow" > - <el-form-item label="是否禁用:" prop="need"> - <el-select v-model="currentProduct.need" style="width: 90%"> - <el-option label="禁用" :value=true></el-option> - <el-option label="启用" :value=false></el-option> - </el-select> - </el-form-item> - </el-col> - </el-row> - - - <el-row> - <el-col :span="11"> - <el-form-item label="产品类型:" prop="require"> - <el-select v-model="currentProduct.cplx" style="width: 90%"> - <el-option label="全部" key="全部" value="全部"></el-option> - <el-option label="器械" key="器械" value="器械"></el-option> - <el-option label="试剂" key="试剂" value="试剂"></el-option> - </el-select> - </el-form-item> - </el-col> - - <el-col :span="11"> - <el-form-item label="产品类别:" prop="require"> - <el-select v-model="currentProduct.hchzsb" style="width: 90%"> - <el-option label="全部" value="全部"></el-option> - <el-option label="耗材" value="耗材"></el-option> - <el-option label="设备" value="设备"></el-option> - </el-select> - </el-form-item> - </el-col> - - </el-row> - - <el-row> - <el-col :span="11"> - <el-form-item label="产地:" prop="imports"> - <el-select v-model="currentProduct.imports" style="width: 90%"> - <el-option label="全部" value="1"></el-option> - <el-option label="国外" value="2"></el-option> - <el-option label="国内" value="3"></el-option> - </el-select> - </el-form-item> - </el-col> - - <el-col :span="11"> - <el-form-item label="说明:" prop="remark"> - <el-input v-model="currentProduct.remark" style="width: 90%" auto-complete="off" type="textarea" - autosize></el-input> - </el-form-item> - </el-col> - </el-row> - - <el-row> - <el-col :span="11"> - <el-form-item label="分类编码:" prop="require"> - <el-select - v-model="currentProduct.flbmList" - filterable - remote - clearable="true" - style="width: 90%" - multiple - reserve-keyword - placeholder="请选择" - :remote-method="classifySearch" - :loading="loading" - > - <el-option - v-for="item in classifyList" - :key="item.code" - :label="item.name" - :value="item.code"> - <span>{{ item.code }}</span> - <span>{{ item.name }}</span> - </el-option> - </el-select> - - - </el-form-item> - </el-col> - </el-row> - </el-form> - <div style="text-align: center"> - <el-button type="primary" size="small" icon="search" @click="onAddProductSubmit" - >提交 - </el-button - > - <el-button type="primary" size="small" icon="search" @click="cancelDialog" - >取消 - </el-button - > - </div> - - </el-dialog> - - </el-card> - </div> + margin-bottom: 8px;" + > + <el-button type="primary" size="mini" icon="search" @click="addProductCert" style="text-align:right">添加设置 + </el-button> + </div> + + <el-table v-loading="productLoading" :data="productList" style="width: 100%" border highlight-current-row> + <el-table-column type="index" label="序号" width="50"></el-table-column> + <el-table-column label="证书名称" prop="name"></el-table-column> + <el-table-column label="产地" prop="imports"> + <template slot-scope="scope"> + <span>{{ foreignMap[scope.row.imports] }}</span> + </template> + </el-table-column> + <el-table-column label="产品类型" prop="cplx"> + </el-table-column> + <el-table-column label="产品类别" prop="hchzsb"> + </el-table-column> + + <el-table-column label="分类编码" prop="flbm"> + </el-table-column> + + <el-table-column label="说明" prop="remark"></el-table-column> + <el-table-column label="操作" width="200"> + <template slot-scope="scope"> + <el-button + type="text" + size="small" + @click="handleProductEdit( scope.row)" + >编辑 + + </el-button> + + <el-button + type="text" + size="small" + @click="handleProductDel( scope.row)" + >删除 + </el-button> + </template> + </el-table-column> + </el-table> + + <pagination + v-show="productTotal>0" + :total="productTotal" + :page.sync="productQuery.page" + :limit.sync="productQuery.limit" + @pagination="handleProductChange" + ></pagination> + + + <el-dialog + :title="formProductMap[formProductName]" + :visible.sync="addProductDialogVisible" + width="60%" + :close-on-click-modal="false" + :close-on-press-escape="false" + v-if="addProductDialogVisible" + :isShow="false" + > + + <el-form :model="currentProduct" label-width="100px" :rules="formRules" ref="dataForm"> + <el-row> + <el-col :span="11"> + <el-form-item label="证书名称" prop="name"> + <el-input v-model="currentProduct.name" style="width: 90%" auto-complete="off"></el-input> + </el-form-item> + </el-col> + + <el-col :span="11" v-if="isShow"> + <el-form-item label="是否禁用:" prop="need"> + <el-select v-model="currentProduct.need" style="width: 90%"> + <el-option label="禁用" :value=true></el-option> + <el-option label="启用" :value=false></el-option> + </el-select> + </el-form-item> + </el-col> + </el-row> + + + <el-row> + <el-col :span="11"> + <el-form-item label="产品类型:" prop="require"> + <el-select v-model="currentProduct.cplx" style="width: 90%"> + <el-option label="全部" key="全部" value="全部"></el-option> + <el-option label="器械" key="器械" value="器械"></el-option> + <el-option label="试剂" key="试剂" value="试剂"></el-option> + </el-select> + </el-form-item> + </el-col> + + <el-col :span="11"> + <el-form-item label="产品类别:" prop="require"> + <el-select v-model="currentProduct.hchzsb" style="width: 90%"> + <el-option label="全部" value="全部"></el-option> + <el-option label="耗材" value="耗材"></el-option> + <el-option label="设备" value="设备"></el-option> + </el-select> + </el-form-item> + </el-col> + + </el-row> + + <el-row> + <el-col :span="11"> + <el-form-item label="产地:" prop="imports"> + <el-select v-model="currentProduct.imports" style="width: 90%"> + <el-option label="全部" value="1"></el-option> + <el-option label="国外" value="2"></el-option> + <el-option label="国内" value="3"></el-option> + </el-select> + </el-form-item> + </el-col> + + <el-col :span="11"> + <el-form-item label="说明:" prop="remark"> + <el-input v-model="currentProduct.remark" style="width: 90%" auto-complete="off" type="textarea" + autosize + ></el-input> + </el-form-item> + </el-col> + </el-row> + + <el-row> + <el-col :span="11"> + <el-form-item label="分类编码:" prop="require"> + <el-select + v-model="currentProduct.flbmList" + filterable + remote + clearable="true" + style="width: 90%" + multiple + reserve-keyword + placeholder="请选择" + :remote-method="classifySearch" + :loading="loading" + > + <el-option + v-for="item in classifyList" + :key="item.code" + :label="item.name" + :value="item.code" + > + <span>{{ item.code }}</span> + <span>{{ item.name }}</span> + </el-option> + </el-select> + + + </el-form-item> + </el-col> + </el-row> + </el-form> + <div style="text-align: center"> + <el-button type="primary" size="small" icon="search" @click="onAddProductSubmit" :loading="scertLoading" + >提交 + </el-button + > + <el-button type="primary" size="small" icon="search" @click="cancelDialog" + >取消 + </el-button + > + </div> + + </el-dialog> + + </el-card> + </div> </template> <script> -import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet"; -import {filterClassify} from "@/api/purchase/classifyCode" +import { filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet } from '@/api/purchase/supCertSet' +import { filterClassify } from '@/api/purchase/classifyCode' export default { - data() { - return { - /**--------配送企业资质设置--------------*/ - query: { - type: 1, - page: 1, - limit: 20 - }, - list: [], - total: 0, - loading: false, - enableMap: { - true: "是", - false: "否", - }, - addDialogVisible: false, - currentSup: {}, - formName: "add", - formMap: { - add: "新增配送企业资质设置", - update: "编辑配送企业资质设置", - }, - - formRules: { - name: [ - {required: true, message: "证书名称", trigger: "blur"} - ], - need: [ - {required: true, message: "是否必传", trigger: "blur"} - ], - - }, - - /**--------生产企业资质设置 --------------*/ - manufacturerList: [], - manufacturerQuery: { - type: 2, - page: 1, - limit: 20 - }, - statusMap: { - true: "禁用", - false: "启用", - }, - foreignMap: { - "1": "全部", - "2": "国外", - "3": "国内", - - }, - manufacturerTotal: 0, - manufacturerLoading: false, - addManufacturerDialogVisible: false, - currentManufacturer: {}, - formManufacturerName: "add", - formManufacturerMap: { - add: "新增生产企业资质设置", - update: "编辑生产企业资质设置", - }, - - formManufactureRules: { - name: [ - {required: true, message: "请输入证书名称", trigger: "blur"} - ], - - }, - - /**--------产品资质设置--------------*/ - productList: [], - productQuery: { - type: 3, - page: 1, - limit: 20 - }, - productTotal: 0, - productLoading: false, - addProductDialogVisible: false, - currentProduct: {}, - formProductName: "add", - formProductMap: { - add: "新增产品资质设置", - update: "编辑产品资质设置", - }, - - classifyList: [], - mutilData: [], - inputKey: null, - - }; + data() { + return { + /**--------配送企业资质设置--------------*/ + query: { + type: 1, + page: 1, + limit: 20 + }, + list: [], + total: 0, + loading: false, + enableMap: { + true: '是', + false: '否' + }, + addDialogVisible: false, + currentSup: {}, + formName: 'add', + formMap: { + add: '新增配送企业资质设置', + update: '编辑配送企业资质设置' + }, + + formRules: { + name: [ + { required: true, message: '证书名称', trigger: 'blur' } + ], + need: [ + { required: true, message: '是否必传', trigger: 'blur' } + ] + + }, + + /**--------生产企业资质设置 --------------*/ + manufacturerList: [], + manufacturerQuery: { + type: 2, + page: 1, + limit: 20 + }, + statusMap: { + true: '禁用', + false: '启用' + }, + foreignMap: { + '1': '全部', + '2': '国外', + '3': '国内' + + }, + manufacturerTotal: 0, + manufacturerLoading: false, + addManufacturerDialogVisible: false, + currentManufacturer: {}, + formManufacturerName: 'add', + formManufacturerMap: { + add: '新增生产企业资质设置', + update: '编辑生产企业资质设置' + }, + + formManufactureRules: { + name: [ + { required: true, message: '请输入证书名称', trigger: 'blur' } + ] + + }, + + /**--------产品资质设置--------------*/ + productList: [], + productQuery: { + type: 3, + page: 1, + limit: 20 + }, + productTotal: 0, + productLoading: false, + addProductDialogVisible: false, + currentProduct: {}, + formProductName: 'add', + formProductMap: { + add: '新增产品资质设置', + update: '编辑产品资质设置' + }, + + classifyList: [], + mutilData: [], + inputKey: null, + addLoading: false, + onAddManufacturerSubmitLoading: false, + scertLoading: false, + + } + }, + methods: { + + /**--------配送企业资质设置--------------*/ + handleCurrentChange(val) { + this.query.page = val.page + this.getList() + }, + getList() { + this.loading = true + filterCertSet(this.query) + .then(response => { + this.loading = false + this.list = response.data.list || [] + this.total = response.data.total || 0 + }) + .catch(() => { + this.loading = false + this.list = [] + this.total = 0 + }) + }, + + handleEdit(row) { + this.formName = 'update' + this.currentSup = row + this.addDialogVisible = true + + }, + handleDel(row) { + let query = { + id: row.id + } + delSupCertCert(query) + .then((response) => { + this.getList() + }) + .catch(() => { + }) + }, + addCert() { + this.formName = 'add' + this.currentSup = {} + this.addDialogVisible = true }, - methods: { - - /**--------配送企业资质设置--------------*/ - handleCurrentChange(val) { - this.query.page = val.page; - this.getList(); - }, - getList() { - this.loading = true; - filterCertSet(this.query) - .then(response => { - this.loading = false; - this.list = response.data.list || []; - this.total = response.data.total || 0; - }) - .catch(() => { - this.loading = false; - this.list = []; - this.total = 0; - }); - }, - - - handleEdit(row) { - this.formName = "update"; - this.currentSup = row; - this.addDialogVisible = true; - - }, - handleDel(row) { - let query = { - id: row.id, - } - delSupCertCert(query) - .then((response) => { - this.getList(); - }) - .catch(() => { - }); - }, - addCert() { - this.formName = "add"; - this.currentSup = {}; - this.addDialogVisible = true; - }, - onAddSubmit() { - this.$refs["dataForm"].validate(valid => { - if (valid) { - this.addDialogVisible = false; - if (this.formName == "add") { - this.currentSup.type = 1; - addSupCertSet(this.currentSup) - .then((response) => { - if(response.code==20000){ - this.getList(); - }else{ - this.$message.error(response.message); - } - }) - .catch(() => { - }); - } else { - modifySupCertSet(this.currentSup).then((res) => { - if (res.code == 20000) { - this.getList(); - this.$message.success("保存成功!"); - } else { - this.getList(); - this.$message.error(res.message); - } - }) - } + onAddSubmit() { + this.$refs['dataForm'].validate(valid => { + if (valid) { + this.addDialogVisible = false + this.addLoading = true + if (this.formName == 'add') { + this.currentSup.type = 1 + addSupCertSet(this.currentSup) + .then((response) => { + this.addLoading = false + if (response.code == 20000) { + this.getList() + } else { + this.$message.error(response.message) } - }); - - - }, - cancelDialog() { - this.getList(); - this.getManufacturerList(); - this.getProductList(); - this.addDialogVisible = false; - this.addManufacturerDialogVisible = false; - this.addProductDialogVisible = false; - }, - - - /**--------生产企业资质设置--------------*/ - handleManufacturerChange(val) { - this.manufacturerQuery.page = val.page; - this.getManufacturerList(); - }, - getManufacturerList() { - this.manufacturerLoading = true; - filterCertSet(this.manufacturerQuery) - .then(response => { - this.manufacturerLoading = false; - this.manufacturerList = response.data.list || []; - this.manufacturerTotal = response.data.total || 0; - }) - .catch(() => { - this.manufacturerLoading = false; - this.manufacturerList = []; - this.manufacturerTotal = 0; - }); - }, - handleManufacturerEdit(row) { - this.formManufacturerName = "update"; - this.currentManufacturer = row; - this.addManufacturerDialogVisible = true; - - }, - handleManufacturerDel(row) { - let query = { - id: row.id, - } - delSupCertCert(query) - .then((response) => { - this.getManufacturerList(); - }) - .catch(() => { - }); - }, - addManufacturerCert() { - this.formManufacturerName = "add"; - this.currentManufacturer = {}; - this.addManufacturerDialogVisible = true; - }, - onAddManufacturerSubmit() { - - this.$refs["dataManufacturerForm"].validate(valid => { - if (valid) { - this.addManufacturerDialogVisible = false; - if (this.formManufacturerName == "add") { - this.currentManufacturer.type = 2; - addSupCertSet(this.currentManufacturer) - .then((response) => { - if(response.code==20000){ - this.getManufacturerList(); - }else{ - this.$message.error(response.message); - } - - }) - .catch(() => { - }); - } else { - modifySupCertSet(this.currentManufacturer).then((res) => { - if (res.code == 20000) { - this.getManufacturerList(); - this.$message.success("保存成功!"); - } else { - this.getManufacturerList(); - this.$message.error(res.message); - } - }) - } + }) + .catch(() => { + }) + } else { + modifySupCertSet(this.currentSup).then((res) => { + this.addLoading = false + if (res.code == 20000) { + this.getList() + this.$message.success('保存成功!') + } else { + this.getList() + this.$message.error(res.message) + } + }) + } + } + }) + + }, + cancelDialog() { + this.getList() + this.getManufacturerList() + this.getProductList() + this.addDialogVisible = false + this.addManufacturerDialogVisible = false + this.addProductDialogVisible = false + }, + + /**--------生产企业资质设置--------------*/ + handleManufacturerChange(val) { + this.manufacturerQuery.page = val.page + this.getManufacturerList() + }, + getManufacturerList() { + this.manufacturerLoading = true + filterCertSet(this.manufacturerQuery) + .then(response => { + this.manufacturerLoading = false + this.manufacturerList = response.data.list || [] + this.manufacturerTotal = response.data.total || 0 + }) + .catch(() => { + this.manufacturerLoading = false + this.manufacturerList = [] + this.manufacturerTotal = 0 + }) + }, + handleManufacturerEdit(row) { + this.formManufacturerName = 'update' + this.currentManufacturer = row + this.addManufacturerDialogVisible = true + + }, + handleManufacturerDel(row) { + let query = { + id: row.id + } + delSupCertCert(query) + .then((response) => { + this.getManufacturerList() + }) + .catch(() => { + }) + }, + addManufacturerCert() { + this.formManufacturerName = 'add' + this.currentManufacturer = {} + this.addManufacturerDialogVisible = true + }, + onAddManufacturerSubmit() { + + this.$refs['dataManufacturerForm'].validate(valid => { + if (valid) { + this.addManufacturerDialogVisible = false + this.onAddManufacturerSubmitLoading = true + if (this.formManufacturerName == 'add') { + this.currentManufacturer.type = 2 + addSupCertSet(this.currentManufacturer) + .then((response) => { + this.onAddManufacturerSubmitLoading = false + if (response.code == 20000) { + this.getManufacturerList() + } else { + this.$message.error(response.message) } - }); - - }, - - - /**--------产品资质设置--------------*/ - handleProductChange(val) { - this.productQuery.page = val.page; - this.getProductList(); - }, - getProductList() { - this.productLoading = true; - filterCertSet(this.productQuery) - .then(response => { - this.productLoading = false; - this.productList = response.data.list || []; - this.productTotal = response.data.total || 0; - }) - .catch(() => { - this.productLoading = false; - this.productList = []; - this.productTotal = 0; - }); - }, - handleProductEdit(row) { - this.formProductName = "update"; - this.currentProduct = row; - if (row.imports == '1') { - this.currentProduct.imports = '全部' - }else if (row.imports == '2'){ - this.currentProduct.imports = '国外' - }else if (row.imports == '3'){ - this.currentProduct.imports = '国内' - } - this.addProductDialogVisible = true; - - this.classifyFirstSearch(this.currentProduct.flbm); - - }, - handleProductDel(row) { - let query = { - id: row.id, - } - delSupCertCert(query) - .then((response) => { - this.getProductList(); - }) - .catch(() => { - }); - }, - addProductCert() { - this.formProductName = "add"; - this.currentProduct = {}; - this.addProductDialogVisible = true; - }, - onAddProductSubmit() { - this.$refs["dataForm"].validate(valid => { - if (valid) { - this.addProductDialogVisible = false; - if (this.formProductName == "add") { - this.currentProduct.type = 3; - addSupCertSet(this.currentProduct) - .then((response) => { - if(response.code==20000){ - this.getProductList(); - }else{ - this.$message.error(response.message); - } - }) - .catch(() => { - }); - } else { - modifySupCertSet(this.currentProduct).then((res) => { - if (res.code == 20000) { - this.getProductList(); - this.$message.success("保存成功!"); - } else { - this.getProductList(); - this.$message.error(res.message); - } - }) - } + + }) + .catch(() => { + }) + } else { + modifySupCertSet(this.currentManufacturer).then((res) => { + this.onAddManufacturerSubmitLoading = false + if (res.code == 20000) { + this.getManufacturerList() + this.$message.success('保存成功!') + } else { + this.getManufacturerList() + this.$message.error(res.message) + } + }) + } + } + }) + + }, + + /**--------产品资质设置--------------*/ + handleProductChange(val) { + this.productQuery.page = val.page + this.getProductList() + }, + getProductList() { + this.productLoading = true + filterCertSet(this.productQuery) + .then(response => { + this.productLoading = false + this.productList = response.data.list || [] + this.productTotal = response.data.total || 0 + }) + .catch(() => { + this.productLoading = false + this.productList = [] + this.productTotal = 0 + }) + }, + handleProductEdit(row) { + this.formProductName = 'update' + this.currentProduct = row + if (row.imports == '1') { + this.currentProduct.imports = '全部' + } else if (row.imports == '2') { + this.currentProduct.imports = '国外' + } else if (row.imports == '3') { + this.currentProduct.imports = '国内' + } + this.addProductDialogVisible = true + + this.classifyFirstSearch(this.currentProduct.flbm) + + }, + handleProductDel(row) { + let query = { + id: row.id + } + delSupCertCert(query) + .then((response) => { + this.getProductList() + }) + .catch(() => { + }) + }, + addProductCert() { + this.formProductName = 'add' + this.currentProduct = {} + this.addProductDialogVisible = true + }, + onAddProductSubmit() { + this.$refs['dataForm'].validate(valid => { + if (valid) { + this.addProductDialogVisible = false + this.scertLoading = true + if (this.formProductName == 'add') { + this.currentProduct.type = 3 + addSupCertSet(this.currentProduct) + .then((response) => { + this.scertLoading = false + if (response.code == 20000) { + this.getProductList() + } else { + this.$message.error(response.message) } + }) + .catch(() => { + this.scertLoading = false + }) + } else { + modifySupCertSet(this.currentProduct).then((res) => { + this.scertLoading = false + if (res.code == 20000) { + this.getProductList() + this.$message.success('保存成功!') + } else { + this.getProductList() + this.$message.error(res.message) + } }) + } + } + }) - }, - - - classifyFirstSearch(key) { - let query = { - inFilter: key, - } - filterClassify(query) - .then(response => { - this.loading = false; - this.classifyList = response.data.list || []; - }) - .catch(() => { - this.loading = false; - this.classifyList = []; - }); - }, - - classifySearch(key) { - let query = { - key: key, - } - filterClassify(query) - .then(response => { - this.loading = false; - this.classifyList = response.data.list || []; - }) - .catch(() => { - this.loading = false; - this.classifyList = []; - }); - }, }, - filters: {}, - mounted() { + + classifyFirstSearch(key) { + let query = { + inFilter: key + } + filterClassify(query) + .then(response => { + this.loading = false + this.classifyList = response.data.list || [] + }) + .catch(() => { + this.loading = false + this.classifyList = [] + }) }, - created() { - // 加载表格数据 - this.getList(); - this.getManufacturerList(); - this.getProductList(); + + classifySearch(key) { + let query = { + key: key + } + filterClassify(query) + .then(response => { + this.loading = false + this.classifyList = response.data.list || [] + }) + .catch(() => { + this.loading = false + this.classifyList = [] + }) } -}; + }, + filters: {}, + mounted() { + }, + created() { + // 加载表格数据 + this.getList() + this.getManufacturerList() + this.getProductList() + } +} </script> <style scoped > .form-title { - font-size: 16px; - font-family: Noto Sans SC; - font-weight: bold; - color: #303133; + font-size: 16px; + font-family: Noto Sans SC; + font-weight: bold; + color: #303133; } </style> diff --git a/src/views/remind/addInvRemindSetDialog.vue b/src/views/remind/addInvRemindSetDialog.vue index 1c61d4dc..6ab52ffb 100644 --- a/src/views/remind/addInvRemindSetDialog.vue +++ b/src/views/remind/addInvRemindSetDialog.vue @@ -120,7 +120,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" @click.native="queryProductList" icon="el-icon-search">搜索</el-button> - <el-button type="primary" @click.native="formSubmit" icon="el-icon-check">选入</el-button> + <el-button type="primary" @click.native="formSubmit" icon="el-icon-check" :loading="subLoading">选入</el-button> </el-button-group> </div> @@ -181,6 +181,7 @@ export default { formLoading: false, productVisible: false, loading: false, + subLoading: false, productQuery: { invCode: this.$store.getters.locInvCode, invSpaceCode: null, @@ -258,7 +259,9 @@ export default { relIdList: relIdList }; console.log(params) + this.subLoading = true batchAddInvRemindSet(params).then((res) => { + this.subLoading = false if (res.code === 20000) { this.$message.success("添加成功"); this.closeDialog(); @@ -266,6 +269,7 @@ export default { this.$message.error(res.message); } }).catch((error) => { + this.subLoading = false this.$message.error(error.message); this.closeDialog(); }) diff --git a/src/views/system/dept/authDept.vue b/src/views/system/dept/authDept.vue index f664cf80..88bd3498 100644 --- a/src/views/system/dept/authDept.vue +++ b/src/views/system/dept/authDept.vue @@ -206,7 +206,7 @@ </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" size="small" @click.native="formSubmit()" + <el-button type="primary" size="small" @click.native="formSubmit()" :loading="fromLoading" >提交 </el-button> <el-button @click.native="cancelDialog" size="small">取消</el-button> @@ -449,6 +449,7 @@ export default { invlist: [], invTotal: 0, invLoading: false, + fromLoading: false, }; }, filters: { @@ -516,10 +517,11 @@ export default { return; } // this.formData.statusIds = this.getMenuAllCheckedKeys(); + this.fromLoading = true if (this.formName == "add") { saveWarehouse(this.formData, "save") .then((response) => { - this.loading = false; + this.fromLoading = false this.cancelDialog(); this.getList(); if (response.code === 20000) { @@ -534,10 +536,12 @@ export default { .catch(() => { this.cancelDialog(); this.loading = false; + this.fromLoading = false }); } else if (this.formName == "edit") { saveWarehouse(this.formData, "edit") .then((response) => { + this.fromLoading = false this.loading = false; this.cancelDialog(); this.getList(); @@ -551,6 +555,7 @@ export default { } }) .catch(() => { + this.fromLoading = false this.cancelDialog(); this.loading = false; }); diff --git a/src/views/system/dept/invWarehouse.vue b/src/views/system/dept/invWarehouse.vue index e5d7ee50..62d4cb17 100644 --- a/src/views/system/dept/invWarehouse.vue +++ b/src/views/system/dept/invWarehouse.vue @@ -280,6 +280,7 @@ <el-button type="primary" @click.native="forInvSubmit()" + :loading="submitLoading" >提交 </el-button > @@ -492,6 +493,7 @@ export default { sysList: [], sysSubList: [], advanceTypese: [], + submitLoading: false, }; }, methods: { @@ -640,7 +642,9 @@ export default { forInvSubmit() { // 新增,编辑---提交 this.$refs["dataForm"].validate(valid => { if (valid) { + this.submitLoading = true saveSubWarehouse(this.subData, this.formName).then((response) => { + this.submitLoading = false this.subFormVisible = false; if (response.code == 20000) { this.getList(); @@ -648,6 +652,7 @@ export default { this.$message.error(response.message); } }).catch(() => { + this.submitLoading = false this.subFormVisible = false; }); } diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 4c28e11b..c72db8e5 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -170,7 +170,7 @@ </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">确 定</el-button> + <el-button type="primary" @click="submitForm" :loading="subLoading">确 定</el-button> <el-button @click="cancel">取 消</el-button> </div> </el-dialog> @@ -223,7 +223,8 @@ export default { dictType: [ { required: true, message: "字典类型不能为空", trigger: "blur" } ] - } + }, + subLoading: false, }; }, created() { @@ -293,8 +294,10 @@ export default { submitForm: function() { this.$refs['form'].validate(valid => { if (valid) { + this.subLoading = true if (this.form.dictId != undefined) { updateType(this.form).then(response => { + this.subLoading = false if (response.code == 20000) { this.$modal.msgSuccess('修改成功') this.open = false @@ -305,6 +308,7 @@ export default { }) } else { addType(this.form).then(response => { + this.subLoading = false if (response.code == 20000) { this.$modal.msgSuccess('新增成功') this.open = false diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index a98d5f09..4369865a 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -266,7 +266,7 @@ </el-row> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">确 定</el-button> + <el-button type="primary" @click="submitForm" :loading="confirmLoading">确 定</el-button> <el-button @click="cancel">取 消</el-button> </div> </el-dialog> @@ -326,7 +326,8 @@ export default { path: [ {required: true, message: "路由地址不能为空", trigger: "blur"} ] - } + }, + confirmLoading: false }; }, created() { @@ -429,8 +430,10 @@ export default { submitForm: function () { this.$refs["form"].validate(valid => { if (valid) { + this.confirmLoading = true if (this.form.menuId != undefined) { updateMenu(this.form).then(response => { + this.confirmLoading = false if (response.code == 20000) { this.$modal.msgSuccess("修改成功"); this.open = false; @@ -442,6 +445,7 @@ export default { }); } else { addMenu(this.form).then(response => { + this.confirmLoading = false if (response.code == 20000) { this.$modal.msgSuccess("新增成功"); this.open = false; diff --git a/src/views/system/param/BasicEntrutsRece.vue b/src/views/system/param/BasicEntrutsRece.vue index 854ede24..f58ddf2e 100644 --- a/src/views/system/param/BasicEntrutsRece.vue +++ b/src/views/system/param/BasicEntrutsRece.vue @@ -84,7 +84,7 @@ > <modifyDialog :inputQuery="inputQuery"></modifyDialog> <div style="text-align: center"> - <el-button type="primary" size="small" icon="search" @click="onModifySubmit" + <el-button type="primary" size="small" icon="search" @click="onModifySubmit" :loading="subLoading" >提交 </el-button > @@ -151,6 +151,7 @@ export default { uploadFileUrl: null, headers: {}, configParms: {}, + subLoading: false, }; @@ -210,13 +211,16 @@ export default { }, onModifySubmit() { + this.subLoading = true updateEntrustRece(this.inputQuery) .then((response) => { + this.subLoading = false this.loading = false; this.cancelDialog(); this.getList(); }) .catch(() => { + this.subLoading = false this.loading = false; this.cancelDialog(); }); diff --git a/src/views/system/param/addhelpSettings.vue b/src/views/system/param/addhelpSettings.vue index 8673c2c5..b3ee7aef 100644 --- a/src/views/system/param/addhelpSettings.vue +++ b/src/views/system/param/addhelpSettings.vue @@ -4,7 +4,8 @@ <el-card style="margin-top: -30px"> <el-button-group style="display: flex"> <el-button type="primary" @click.native="submitUpload()" style="margin: 0 60px 10px auto; height: 35px" - :loading="loading">提交 + :loading="subLoading" + >提交 </el-button> </el-button-group> <el-row> @@ -26,7 +27,8 @@ </el-col> <el-col :span="8"> <el-form-item prop="menuName"> - <el-input v-model="formData.menuName" auto-complete="off" :disabled="formData.auditStatus == 1"></el-input> + <el-input v-model="formData.menuName" auto-complete="off" :disabled="formData.auditStatus == 1" + ></el-input> </el-form-item> </el-col> </el-row> @@ -70,21 +72,18 @@ <span>状态:</span> </div> </el-col> - <el-col :span="8" type="flex"> - <el-form-item prop="userFlag"> - <el-radio-group v-model="formData.status" > - <el-radio :label="1">启用</el-radio> - <el-radio :label="0">禁用</el-radio> + <el-col :span="8" type="flex"> + <el-form-item prop="userFlag"> + <el-radio-group v-model="formData.status"> + <el-radio :label="1">启用</el-radio> + <el-radio :label="0">禁用</el-radio> - </el-radio-group> - </el-form-item> - </el-col> + </el-radio-group> + </el-form-item> + </el-col> </el-row> - - - <el-row> <el-col :span="3"> <div class="ao-text"> @@ -109,7 +108,8 @@ :on-error="uploadHandleError" :file-list="fileList" :data="{type:'image2'}" - :auto-upload="true"> + :auto-upload="true" + > <el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1"> {{ choiceFile }} </el-button> @@ -130,34 +130,34 @@ </template> <script> -import draggable from "vuedraggable"; -import store from "@/store"; -import {insertCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert"; -import {insertMenuHelp,updateMenuHelp} from "@/api/system/sysMenuHelp"; +import draggable from 'vuedraggable' +import store from '@/store' +import { insertCompanyCert, updateCompanyCert } from '@/api/purchase/companyCert' +import { insertMenuHelp, updateMenuHelp } from '@/api/system/sysMenuHelp' import { updateInv } from '@/api/auth/authAdmin' import { isBlank } from '@/utils/strUtil' export default { - name: "addhelpSettings", + name: 'addhelpSettings', props: { closeDialog: { type: Function, - required: true, + required: true }, from: { type: Object, - required: true, + required: true }, - formName:{ + formName: { type: Object, - required: true, + required: true } }, data() { return { BASE_URL: process.env.VUE_APP_BASE_API, - code: "", + code: '', formData: { type: 0, updateTime: null, @@ -165,103 +165,106 @@ export default { menuKey: null, menuName: null, filePath: null, - status: null, + status: null }, formRules: { menuKey: [ - {required: true, message: "请输入组件路径", trigger: "blur"} + { required: true, message: '请输入组件路径', trigger: 'blur' } ], menuName: [ - {required: true, message: "请输入菜单名称", trigger: "blur"} - ], + { required: true, message: '请输入菜单名称', trigger: 'blur' } + ] }, loading: false, - uploadUrl: "", + subLoading: false, + uploadUrl: '', fileList: [], headers: {}, - choiceFile: "选取文件", + choiceFile: '选取文件' - }; + } }, components: { - draggable, + draggable }, methods: { submitUpload() { - this.$refs["dataForm"].validate(valid => { + this.$refs['dataForm'].validate(valid => { if (valid) { if (this.$isBlank(this.formData.menuKey)) { - this.$message.error("组件路径不能为空!"); - return; + this.$message.error('组件路径不能为空!') + return } - if (this.$isBlank(this.formData.menuName)) { - this.$message.error("菜单名称不能为空!"); - return; - } - - if(this.formName==2){ - updateMenuHelp(this.formData).then((res) => { - if (res.code === 20000){ - this.$message.success( "修改状态成功"); - this.closeDialog(); - } + if (this.$isBlank(this.formData.menuName)) { + this.$message.error('菜单名称不能为空!') + return + } + this.subLoading = true + if (this.formName == 2) { + updateMenuHelp(this.formData).then((res) => { + this.subLoading = false + if (res.code === 20000) { + this.$message.success('修改状态成功') + this.closeDialog() + } - }) - } + }) + } insertMenuHelp(this.formData).then((res) => { - if (res.code === 20000){ - this.$message.success( "添加成功"); - this.closeDialog(); + this.subLoading = false + if (res.code === 20000) { + this.$message.success('添加成功') + this.closeDialog() } }) } - }); + }) }, uploadHandleRemove(file, fileList) { - console.log(file, fileList); + console.log(file, fileList) }, uploadHandlePreview(file) { - console.log(file); - console.log(this.fileList); + console.log(file) + console.log(this.fileList) }, uploadHandleExceed(files, fileList) { - this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); + this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`) }, uploadOnchange(file, fileList) { - let fileName = file.name; + let fileName = file.name let uid = file.uid - let pos = fileName.lastIndexOf("."); - let lastName = fileName.substring(pos, fileName.length); - if (lastName.toLowerCase() !== ".jpg" && lastName.toLowerCase() !== ".png" && lastName.toLowerCase() !== ".doc" && lastName.toLowerCase() !== ".pdf") { - this.$message.error("上传文件只能是 jpg,png,doc,pdf 格式"); + let pos = fileName.lastIndexOf('.') + let lastName = fileName.substring(pos, fileName.length) + if (lastName.toLowerCase() !== '.jpg' && lastName.toLowerCase() !== '.png' && lastName.toLowerCase() !== '.doc' && lastName.toLowerCase() !== '.pdf') { + this.$message.error('上传文件只能是 jpg,png,doc,pdf 格式') for (let i = 0; i < fileList.length; i++) {//从list删除 if (fileList[i].uid === uid) { fileList.splice(i, 1) } } - return; + return } // 限制上传文件的大小 - const isLt = file.size / 1024 / 1024 / 2 <= 1; + const isLt = file.size / 1024 / 1024 / 2 <= 1 if (!isLt) { - this.$message.error("上传文件大小不能超过 2MB"); + this.$message.error('上传文件大小不能超过 2MB') for (let i = 0; i < fileList.length; i++) { if (fileList[i].uid === uid) { fileList.splice(i, 1) } } } - return isLt; + return isLt }, uploadHandleSuccess(response, file, fileList) { if (response.code === 20000) { - this.formData.filePath = response.data.name; + this.formData.filePath = response.data.name } else { - this.$message.error("文件上传失败:" + response.message); + this.$message.error('文件上传失败:' + response.message) } }, uploadHandleError() { @@ -269,38 +272,38 @@ export default { }, toViewCompanyCert() { - this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - window.open(this.certFileUrl + this.formData.filePath); - }, + this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' + window.open(this.certFileUrl + this.formData.filePath) + } }, filters: {}, mounted() { - document.body.ondrop = function (event) { - event.preventDefault(); - event.stopPropagation(); - }; + document.body.ondrop = function(event) { + event.preventDefault() + event.stopPropagation() + } }, created() { - this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file"; + this.uploadUrl = this.BASE_URL + '/udiwms/upload/register/file' this.headers = { ADMINID: store.getters.adminId, - ADMINTOKEN: store.getters.token, - }; + ADMINTOKEN: store.getters.token + } - if( isBlank(this.from.id)){ + if (isBlank(this.from.id)) { - this.formData={}; - }else{ - //编辑页面 - this.formData=this.from; - } + this.formData = {} + } else { + //编辑页面 + this.formData = this.from + } if (this.formData.filePath != null) { - this.choiceFile = "更换文件"; + this.choiceFile = '更换文件' } else { - this.choiceFile = "选取文件"; + this.choiceFile = '选取文件' } - }, -}; + } +} </script> <style scoped> diff --git a/src/views/system/param/busTypeChange.vue b/src/views/system/param/busTypeChange.vue index b26b13ea..3e121e75 100644 --- a/src/views/system/param/busTypeChange.vue +++ b/src/views/system/param/busTypeChange.vue @@ -91,7 +91,7 @@ > <modifyDialog :inputQuery="inputQuery"></modifyDialog> <div slot="footer" class="dialog-footer"> - <el-button type="primary" size="small" @click="onAddSubmit" + <el-button type="primary" size="small" @click="onAddSubmit" :loading="addLoading" >提交 </el-button > @@ -169,6 +169,7 @@ export default { edit: "编辑单据生成设置", }, formName: null, + addLoading: false, }; }, @@ -254,8 +255,9 @@ export default { this.$message.error("单据类型名称不得为纯数字类型!"); return; } - + this.addLoading = true addBusTypeChange(this.inputQuery).then((res) => { + this.addLoading = false if (res.code === 20000) { this.cancelDialog(); this.loading = false; @@ -264,10 +266,12 @@ export default { this.$message.error(res.message); } }).catch((error) => { - this.loading = false; + this.addLoading = false }); } else { + this.addLoading = true updateBusTypeChange(this.inputQuery).then((res) => { + this.addLoading = false if (res.code === 20000) { this.loading = false; this.cancelDialog(); @@ -276,6 +280,7 @@ export default { this.$message.error(res.message); } }).catch((error) => { + this.addLoading = false this.loading = false; this.$message.error(error.message); this.cancelDialog(); diff --git a/src/views/system/param/busTypePre.vue b/src/views/system/param/busTypePre.vue index be5196d7..452d34c9 100644 --- a/src/views/system/param/busTypePre.vue +++ b/src/views/system/param/busTypePre.vue @@ -93,7 +93,7 @@ > <modifyDialog :inputQuery="inputQuery"></modifyDialog> <div slot="footer" class="dialog-footer"> - <el-button type="primary" size="small" @click="onAddSubmit" + <el-button type="primary" size="small" @click="onAddSubmit" :loading="addLoading" >提交 </el-button > @@ -176,6 +176,7 @@ export default { edit: "编辑出入库单据流转设置", }, formName: null, + addLoading: false, }; }, @@ -259,28 +260,32 @@ export default { this.$message.error("单据类型名称不得为纯数字类型!"); return; } + this.addLoading = true addBusTypePre(this.inputQuery).then((res) => { + this.addLoading = false if (res.code === 20000) { - this.loading = false; + // this.loading = false; this.cancelDialog(); this.getList(); } else { this.$message.error(res.message); } }).catch(() => { + this.addLoading = false }); } else { + this.addLoading = true updateBusTypePre(this.inputQuery).then((res) => { + this.addLoading = false if (res.code === 20000) { - this.loading = false; this.cancelDialog(); this.getList(); } else { this.$message.error(res.message); } }).catch((error) => { - this.loading = false; + this.addLoading = false this.$message.error(error.message); this.cancelDialog(); }); diff --git a/src/views/system/ration/editRaationSetDialog.vue b/src/views/system/ration/editRaationSetDialog.vue index cb7c9e7d..1baf8bc5 100644 --- a/src/views/system/ration/editRaationSetDialog.vue +++ b/src/views/system/ration/editRaationSetDialog.vue @@ -273,7 +273,7 @@ <div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'> - <el-button type="primary" @click="saveSet">提交</el-button> + <el-button type="primary" @click="saveSet" :loading="saveLoading">提交</el-button> <el-button type="primary" @click="closeDialog">取消</el-button> </div> </el-card> @@ -316,6 +316,7 @@ export default { ], }, loading: false, + saveLoading: false, } }, @@ -330,7 +331,9 @@ export default { this.$message.warning("请选择" + this.invTitle + "!"); return; } + this.saveLoading = true updateSet(data).then((response) => { + this.saveLoading = false if (response.code === 20000) { this.closeDialog(); } else { diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 6f2cb5c3..a3a46763 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -147,7 +147,7 @@ </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm" size="small">提交</el-button> + <el-button type="primary" @click="submitForm" size="small" :loading="submitLoading">提交</el-button> <el-button @click="cancel" size="small">取消</el-button> </div> </el-dialog> @@ -299,7 +299,8 @@ export default { roleSort: [ {required: true, message: "角色顺序不能为空", trigger: "blur"} ] - } + }, + submitLoading: false, }; }, @@ -541,6 +542,7 @@ export default { submitForm: function () { this.$refs["form"].validate(valid => { if (valid) { + this.submitLoading = true if (this.form.roleId != undefined) { this.form.menuIds = this.getMenuAllCheckedKeys(); if (this.form.menuIds.length == 0) { @@ -548,6 +550,7 @@ export default { return } updateRole(this.form).then(response => { + this.submitLoading = false if (response.code === 20000) { this.$modal.msgSuccess("修改成功"); this.open = false; @@ -563,6 +566,7 @@ export default { return } addRole(this.form).then(response => { + this.submitLoading = false this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); diff --git a/src/views/system/user/authUser.vue b/src/views/system/user/authUser.vue index 77e8e995..f57c8bee 100644 --- a/src/views/system/user/authUser.vue +++ b/src/views/system/user/authUser.vue @@ -242,6 +242,7 @@ type="primary" size="small" @click.native="formSubmit()" + :loading="formSubmitLoading" >提交 </el-button > @@ -366,7 +367,8 @@ export default { {required: true, message: "请输入密码", trigger: "blur"} ] }, - deleteLoading: false + deleteLoading: false, + formSubmitLoading: false, }; }, methods: { @@ -513,10 +515,10 @@ export default { } this.$refs["dataForm"].validate(valid => { if (valid) { - this.formLoading = true; + this.formSubmitLoading = true; let data = Object.assign({}, this.formData); authAdminSave(data, this.formName).then(response => { - this.formLoading = false; + this.formSubmitLoading = false; if (response.code !== 20000) { this.$message.error(response.message); return false;