diff --git a/src/views/emis/emisCreditCustomer/emisCreditCustomerForm.vue b/src/views/emis/emisCreditCustomer/emisCreditCustomerForm.vue index 0edd6119..16e74b00 100644 --- a/src/views/emis/emisCreditCustomer/emisCreditCustomerForm.vue +++ b/src/views/emis/emisCreditCustomer/emisCreditCustomerForm.vue @@ -3,8 +3,8 @@ - - + + @@ -40,16 +40,7 @@ - + @@ -67,12 +58,6 @@ - @@ -120,8 +105,8 @@ export default { id: [ { required: true, message: "id不能为空", trigger: "blur" } ], - customerCode: [ - { required: true, message: "客户编码不能为空", trigger: "blur" } + monthlyPayCode: [ + { required: true, message: "月结客户不能为空", trigger: "blur" } ], creditMoney: [ { required: true, message: "信用额度不能为空", trigger: "blur" } @@ -176,6 +161,7 @@ export default { // this.getTreeselect(); }, onMonthpayAccountChange(item){ + this.form.customerCode=item.payee; this.form.payee=item.payee; this.form.salesmen=item.salesmen; }, @@ -189,6 +175,7 @@ export default { this.form = { id: null, customerCode: null, + monthlyPayCode:null, curMoney: null, curMoneyRate: null, creditMoney: null, diff --git a/src/views/emis/emisCreditCustomerRecord/emisCreditCustomerRecordForm.vue b/src/views/emis/emisCreditCustomerRecord/emisCreditCustomerRecordForm.vue index 223a50ca..39f91edd 100644 --- a/src/views/emis/emisCreditCustomerRecord/emisCreditCustomerRecordForm.vue +++ b/src/views/emis/emisCreditCustomerRecord/emisCreditCustomerRecordForm.vue @@ -48,7 +48,7 @@ 确 定 取 消 - + @@ -107,7 +107,7 @@ export default { methods: { initData() { - + if(this.id !=null) { this.loading = true; getEmisCreditCustomerRecord(this.id).then(response => { diff --git a/src/views/emis/emisUser/index.vue b/src/views/emis/emisUser/index.vue index 54dffe1f..f50312ba 100644 --- a/src/views/emis/emisUser/index.vue +++ b/src/views/emis/emisUser/index.vue @@ -58,8 +58,11 @@ slot-scope="slotProps" :height="(slotProps.contentHeight)+'px'" - v-loading="loading" border size="mini" + ref="refTable" + + v-loading="loading" border size="mini" :data="userList" + storageName="emisUser_main" :showSearch.sync="showSearch" @@ -137,7 +140,7 @@ v-hasPermi="['system:user:import']" >导入 --> - + @@ -337,6 +340,8 @@ export default { openForm: false, titleForm: "", + selectionList:null, + // 部门树选项 deptOptions: undefined, // 是否显示弹出层 @@ -476,6 +481,7 @@ export default { this.ids = selection.map(item => item.userId); this.single = selection.length != 1; this.multiple = !selection.length; + this.selectionList = selection; }, // 更多操作触发 handleCommand(command, row) { @@ -544,12 +550,80 @@ export default { this.$modal.msgSuccess("删除成功"); }).catch(() => {}); }, - /** 导出按钮操作 */ - handleExport() { - // this.download('system/user/export', { - // ...this.queryParams - // }, `user_${new Date().getTime()}.xlsx`) + /** 导出按钮操作 */ + handleExport() { + const loadingInstance = this.$loading({ + text: '正在导出...' + }) + + if(this.selectionList&&this.selectionList.length>0){ + this.exportData(this.selectionList,loadingInstance); + } + else{ + let qExportParam = {...this.queryParams}; + qExportParam.pageNum=1; + qExportParam.pageSize=20000; + qExportParam=this.addDateRange(qExportParam, this.dateRange); + + listUser(qExportParam).then(response => { + if (response.code === 200) { + this.exportData(response.rows,loadingInstance); + } + }); + } }, + exportData(selData,loadingInstance){ + const curList =selData + import('@/vendor/Export2Excel').then(excel => { + const exportParam=this.$refs.refTable.getExportParam(); + const tHeader = exportParam.header; + const filterVal = exportParam.filter; + const data = this.formatJson(filterVal, curList, selData) + excel.export_json_to_excel({ + header: tHeader, + data, + filename: '员工列表', + autoWidth: true + }) + loadingInstance.close() + }) + }, + formatJson(filterVal, jsonData, resData) { + let index = 0 + return jsonData.map(v => filterVal.map(j => { + + if (j === 'index') { + return ++index + } + + + if (j === 'blLock') { + if(v[j]=='1'){ + return '是'; + }else{ + return '否'; + } + } + + if (j === 'blComputid') { + if(v[j]=='1'){ + return '是'; + }else{ + return '否'; + } + } + + if (j === 'dept.deptName') { + return v['dept']['deptName']; + } + + if (j === 'blOpen') { + return this.selectDictLabel(this.dict.type.sys_biz_enable_status,v[j]); + } + return v[j] + })) + }, + /** 导入按钮操作 */ handleImport() { this.upload.title = "用户导入";