Commit 8fb25d6ede3a14adbc327cf5c857acce56fbfe6e
1 parent
336d723d
优化相关bug
Showing
6 changed files
with
268 additions
and
331 deletions
src/components/contract/editContract.vue
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | width="70%" |
| 6 | 6 | :before-close="handleClose" |
| 7 | 7 | > |
| 8 | - <el-form :model="editContractInfo" label-width="120px" ref="editForm"> | |
| 8 | + <el-form :model="editContractInfo" label-width="120px" class="text-left" ref="editForm"> | |
| 9 | 9 | <el-row :gutter="20"> |
| 10 | 10 | <el-col :span="8"> |
| 11 | 11 | <el-form-item :label="$t('contractManage.edit.contractName')" prop="contractName" required> | ... | ... |
src/components/role/AddRoleStaff.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog | |
| 3 | - :title="$t('role.staff')" | |
| 4 | - :visible.sync="visible" | |
| 5 | - width="70%" | |
| 6 | - @close="resetForm" | |
| 7 | - > | |
| 8 | - <el-row> | |
| 9 | - <el-col :span="24"> | |
| 10 | - <el-input | |
| 11 | - v-model="searchForm.staffName" | |
| 12 | - :placeholder="$t('role.staffName')" | |
| 13 | - style="width: 300px; margin-right: 10px" | |
| 14 | - /> | |
| 15 | - <el-button type="primary" @click="queryStaffs"> | |
| 16 | - {{ $t('common.search') }} | |
| 17 | - </el-button> | |
| 18 | - </el-col> | |
| 19 | - </el-row> | |
| 20 | - | |
| 21 | - <el-table | |
| 22 | - :data="staffs" | |
| 23 | - style="width: 100%; margin-top: 15px" | |
| 24 | - @selection-change="handleSelectionChange" | |
| 25 | - > | |
| 26 | - <el-table-column | |
| 27 | - type="selection" | |
| 28 | - width="55" | |
| 29 | - align="center" | |
| 30 | - /> | |
| 31 | - <el-table-column | |
| 32 | - prop="userId" | |
| 33 | - :label="$t('role.staffName')" | |
| 34 | - align="center" | |
| 35 | - /> | |
| 36 | - <el-table-column | |
| 37 | - prop="name" | |
| 38 | - :label="$t('role.staffName')" | |
| 39 | - align="center" | |
| 40 | - /> | |
| 41 | - <el-table-column | |
| 42 | - prop="address" | |
| 43 | - :label="$t('role.address')" | |
| 44 | - align="center" | |
| 45 | - /> | |
| 46 | - </el-table> | |
| 47 | - | |
| 48 | - <el-pagination | |
| 49 | - :current-page="page.current" | |
| 50 | - :page-sizes="[10, 20, 30, 50]" | |
| 51 | - :page-size="page.size" | |
| 52 | - :total="page.total" | |
| 53 | - layout="total, sizes, prev, pager, next, jumper" | |
| 54 | - @size-change="handleSizeChange" | |
| 55 | - @current-change="handleCurrentChange" | |
| 56 | - /> | |
| 57 | - | |
| 58 | - <span slot="footer" class="dialog-footer"> | |
| 59 | - <el-button @click="visible = false">{{ $t('role.cancel') }}</el-button> | |
| 60 | - <el-button type="primary" @click="submit">{{ $t('role.save') }}</el-button> | |
| 61 | - </span> | |
| 62 | - </el-dialog> | |
| 63 | - </template> | |
| 64 | - | |
| 65 | - <script> | |
| 66 | - import { listStaffsNoRole, saveRoleStaff } from '@/api/role/roleApi' | |
| 67 | - | |
| 68 | - export default { | |
| 69 | - name: 'AddRoleStaff', | |
| 70 | - props: { | |
| 71 | - roleId: { | |
| 72 | - type: String, | |
| 73 | - required: true | |
| 2 | + <el-dialog :title="$t('role.staff')" :visible.sync="visible" width="70%" @close="resetForm"> | |
| 3 | + <el-row> | |
| 4 | + <el-col :span="24"> | |
| 5 | + <el-input v-model="searchForm.staffName" :placeholder="$t('role.staffName')" | |
| 6 | + style="width: 300px; margin-right: 10px" /> | |
| 7 | + <el-button type="primary" @click="queryStaffs"> | |
| 8 | + {{ $t('common.search') }} | |
| 9 | + </el-button> | |
| 10 | + </el-col> | |
| 11 | + </el-row> | |
| 12 | + | |
| 13 | + <el-table :data="staffs" style="width: 100%; margin-top: 15px" @selection-change="handleSelectionChange"> | |
| 14 | + <el-table-column type="selection" width="55" align="center" /> | |
| 15 | + <el-table-column prop="userId" :label="$t('role.staffName')" align="center" /> | |
| 16 | + <el-table-column prop="name" :label="$t('role.staffName')" align="center" /> | |
| 17 | + <el-table-column prop="address" :label="$t('role.address')" align="center" /> | |
| 18 | + </el-table> | |
| 19 | + | |
| 20 | + <el-pagination :current-page="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size" | |
| 21 | + :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" | |
| 22 | + @current-change="handleCurrentChange" /> | |
| 23 | + | |
| 24 | + <span slot="footer" class="dialog-footer"> | |
| 25 | + <el-button @click="visible = false">{{ $t('role.cancel') }}</el-button> | |
| 26 | + <el-button type="primary" @click="submit">{{ $t('role.save') }}</el-button> | |
| 27 | + </span> | |
| 28 | + </el-dialog> | |
| 29 | +</template> | |
| 30 | + | |
| 31 | +<script> | |
| 32 | +import { listStaffsNoRole, saveRoleStaff } from '@/api/role/roleApi' | |
| 33 | + | |
| 34 | +export default { | |
| 35 | + name: 'AddRoleStaff', | |
| 36 | + props: { | |
| 37 | + roleId: { | |
| 38 | + type: String, | |
| 39 | + required: true | |
| 40 | + } | |
| 41 | + }, | |
| 42 | + data() { | |
| 43 | + return { | |
| 44 | + visible: false, | |
| 45 | + searchForm: { | |
| 46 | + staffName: '' | |
| 47 | + }, | |
| 48 | + staffs: [], | |
| 49 | + selectedStaffs: [], | |
| 50 | + page: { | |
| 51 | + current: 1, | |
| 52 | + size: 10, | |
| 53 | + total: 0 | |
| 74 | 54 | } |
| 55 | + } | |
| 56 | + }, | |
| 57 | + methods: { | |
| 58 | + show() { | |
| 59 | + this.visible = true | |
| 60 | + this.queryStaffs() | |
| 75 | 61 | }, |
| 76 | - data() { | |
| 77 | - return { | |
| 78 | - visible: false, | |
| 79 | - searchForm: { | |
| 80 | - staffName: '' | |
| 81 | - }, | |
| 82 | - staffs: [], | |
| 83 | - selectedStaffs: [], | |
| 84 | - page: { | |
| 85 | - current: 1, | |
| 86 | - size: 10, | |
| 87 | - total: 0 | |
| 62 | + async queryStaffs() { | |
| 63 | + try { | |
| 64 | + const params = { | |
| 65 | + page: this.page.current, | |
| 66 | + row: this.page.size, | |
| 67 | + searchUserName: this.searchForm.staffName, | |
| 68 | + roleId: this.roleId | |
| 88 | 69 | } |
| 70 | + const res = await listStaffsNoRole(params) | |
| 71 | + this.staffs = res.data | |
| 72 | + this.page.total = res.total | |
| 73 | + } catch (error) { | |
| 74 | + this.$message.error(error.message) | |
| 89 | 75 | } |
| 90 | 76 | }, |
| 91 | - methods: { | |
| 92 | - show() { | |
| 93 | - this.visible = true | |
| 94 | - this.queryStaffs() | |
| 95 | - }, | |
| 96 | - async queryStaffs() { | |
| 97 | - try { | |
| 98 | - const params = { | |
| 99 | - page: this.page.current, | |
| 100 | - row: this.page.size, | |
| 101 | - userName: this.searchForm.staffName, | |
| 102 | - roleId: this.roleId | |
| 103 | - } | |
| 104 | - const res = await listStaffsNoRole(params) | |
| 105 | - this.staffs = res.data | |
| 106 | - this.page.total = res.total | |
| 107 | - } catch (error) { | |
| 108 | - this.$message.error(error.message) | |
| 109 | - } | |
| 110 | - }, | |
| 111 | - handleSelectionChange(val) { | |
| 112 | - this.selectedStaffs = val | |
| 113 | - }, | |
| 114 | - async submit() { | |
| 115 | - if (this.selectedStaffs.length === 0) { | |
| 116 | - this.$message.warning(this.$t('role.selectStaff')) | |
| 117 | - return | |
| 118 | - } | |
| 119 | - | |
| 120 | - try { | |
| 121 | - const staffs = this.selectedStaffs.map(item => ({ | |
| 122 | - staffId: item.userId, | |
| 123 | - staffName: item.name | |
| 124 | - })) | |
| 125 | - | |
| 126 | - await saveRoleStaff({ | |
| 127 | - roleId: this.roleId, | |
| 128 | - staffs | |
| 129 | - }) | |
| 130 | - | |
| 131 | - this.$message.success(this.$t('role.saveSuccess')) | |
| 132 | - this.$emit('success') | |
| 133 | - this.visible = false | |
| 134 | - } catch (error) { | |
| 135 | - this.$message.error(error.message) | |
| 136 | - } | |
| 137 | - }, | |
| 138 | - handleSizeChange(size) { | |
| 139 | - this.page.size = size | |
| 140 | - this.queryStaffs() | |
| 141 | - }, | |
| 142 | - handleCurrentChange(current) { | |
| 143 | - this.page.current = current | |
| 144 | - this.queryStaffs() | |
| 145 | - }, | |
| 146 | - resetForm() { | |
| 147 | - this.searchForm.staffName = '' | |
| 148 | - this.selectedStaffs = [] | |
| 77 | + handleSelectionChange(val) { | |
| 78 | + this.selectedStaffs = val | |
| 79 | + }, | |
| 80 | + async submit() { | |
| 81 | + if (this.selectedStaffs.length === 0) { | |
| 82 | + this.$message.warning(this.$t('role.selectStaff')) | |
| 83 | + return | |
| 149 | 84 | } |
| 85 | + | |
| 86 | + try { | |
| 87 | + const staffs = this.selectedStaffs.map(item => ({ | |
| 88 | + staffId: item.userId, | |
| 89 | + staffName: item.name | |
| 90 | + })) | |
| 91 | + | |
| 92 | + await saveRoleStaff({ | |
| 93 | + roleId: this.roleId, | |
| 94 | + staffs | |
| 95 | + }) | |
| 96 | + | |
| 97 | + this.$message.success(this.$t('role.saveSuccess')) | |
| 98 | + this.$emit('success') | |
| 99 | + this.visible = false | |
| 100 | + } catch (error) { | |
| 101 | + this.$message.error(error.message) | |
| 102 | + } | |
| 103 | + }, | |
| 104 | + handleSizeChange(size) { | |
| 105 | + this.page.size = size | |
| 106 | + this.queryStaffs() | |
| 107 | + }, | |
| 108 | + handleCurrentChange(current) { | |
| 109 | + this.page.current = current | |
| 110 | + this.queryStaffs() | |
| 111 | + }, | |
| 112 | + resetForm() { | |
| 113 | + this.searchForm.staffName = '' | |
| 114 | + this.selectedStaffs = [] | |
| 150 | 115 | } |
| 151 | 116 | } |
| 152 | - </script> | |
| 153 | 117 | \ No newline at end of file |
| 118 | +} | |
| 119 | +</script> | |
| 154 | 120 | \ No newline at end of file | ... | ... |
src/components/role/RoleStaff.vue
| 1 | 1 | <template> |
| 2 | - <div class="role-staff"> | |
| 3 | - <div class="search-wrapper"> | |
| 4 | - <el-input | |
| 5 | - v-model="searchForm.staffName" | |
| 6 | - :placeholder="$t('role.staffName')" | |
| 7 | - style="width: 200px; margin-right: 10px" | |
| 8 | - /> | |
| 9 | - <el-button type="primary" @click="queryStaffs"> | |
| 10 | - <i class="el-icon-search"></i> | |
| 11 | - {{ $t('common.search') }} | |
| 12 | - </el-button> | |
| 13 | - <el-button type="primary" @click="openAddModal"> | |
| 14 | - <i class="el-icon-plus"></i> | |
| 15 | - {{ $t('role.staff') }} | |
| 16 | - </el-button> | |
| 17 | - </div> | |
| 18 | - | |
| 19 | - <el-table | |
| 20 | - :data="staffs" | |
| 21 | - border | |
| 22 | - style="width: 100%; margin-top: 15px" | |
| 23 | - > | |
| 24 | - <el-table-column | |
| 25 | - prop="name" | |
| 26 | - :label="$t('role.staffName')" | |
| 27 | - align="center" | |
| 28 | - /> | |
| 29 | - <el-table-column | |
| 30 | - prop="tel" | |
| 31 | - :label="$t('role.tel')" | |
| 32 | - align="center" | |
| 33 | - /> | |
| 34 | - <el-table-column | |
| 35 | - prop="email" | |
| 36 | - :label="$t('role.email')" | |
| 37 | - align="center" | |
| 38 | - /> | |
| 39 | - <el-table-column | |
| 40 | - prop="address" | |
| 41 | - :label="$t('role.address')" | |
| 42 | - align="center" | |
| 43 | - /> | |
| 44 | - <el-table-column | |
| 45 | - :label="$t('role.sex')" | |
| 46 | - align="center" | |
| 47 | - > | |
| 48 | - <template slot-scope="scope"> | |
| 49 | - {{ scope.row.sex === 0 ? $t('role.male') : $t('role.female') }} | |
| 50 | - </template> | |
| 51 | - </el-table-column> | |
| 52 | - <el-table-column | |
| 53 | - :label="$t('role.operation')" | |
| 54 | - align="center" | |
| 55 | - width="200" | |
| 56 | - > | |
| 57 | - <template slot-scope="scope"> | |
| 58 | - <el-button | |
| 59 | - size="mini" | |
| 60 | - type="danger" | |
| 61 | - @click="openDeleteModal(scope.row)" | |
| 62 | - > | |
| 63 | - {{ $t('role.delete') }} | |
| 64 | - </el-button> | |
| 65 | - <el-button | |
| 66 | - size="mini" | |
| 67 | - type="primary" | |
| 68 | - @click="viewDetail(scope.row)" | |
| 69 | - > | |
| 70 | - {{ $t('role.detail') }} | |
| 71 | - </el-button> | |
| 72 | - </template> | |
| 73 | - </el-table-column> | |
| 74 | - </el-table> | |
| 75 | - | |
| 76 | - <el-pagination | |
| 77 | - :current-page="page.current" | |
| 78 | - :page-sizes="[10, 20, 30, 50]" | |
| 79 | - :page-size="page.size" | |
| 80 | - :total="page.total" | |
| 81 | - layout="total, sizes, prev, pager, next, jumper" | |
| 82 | - @size-change="handleSizeChange" | |
| 83 | - @current-change="handleCurrentChange" | |
| 84 | - /> | |
| 85 | - | |
| 86 | - <add-role-staff | |
| 87 | - ref="addRoleStaff" | |
| 88 | - :role-id="pgId" | |
| 89 | - @success="loadStaffs" | |
| 90 | - /> | |
| 91 | - <delete-role-staff | |
| 92 | - ref="deleteRoleStaff" | |
| 93 | - @success="loadStaffs" | |
| 94 | - /> | |
| 2 | + <div class="role-staff"> | |
| 3 | + <div class="search-wrapper"> | |
| 4 | + <el-input v-model="searchForm.staffName" :placeholder="$t('role.staffName')" | |
| 5 | + style="width: 200px; margin-right: 10px" /> | |
| 6 | + <el-button type="primary" @click="queryStaffs"> | |
| 7 | + <i class="el-icon-search"></i> | |
| 8 | + {{ $t('common.search') }} | |
| 9 | + </el-button> | |
| 10 | + <el-button type="primary" @click="openAddModal"> | |
| 11 | + <i class="el-icon-plus"></i> | |
| 12 | + {{ $t('role.staff') }} | |
| 13 | + </el-button> | |
| 95 | 14 | </div> |
| 96 | - </template> | |
| 97 | - | |
| 98 | - <script> | |
| 99 | - import { listRoleStaff } from '@/api/role/roleApi' | |
| 100 | - import AddRoleStaff from './AddRoleStaff' | |
| 101 | - import DeleteRoleStaff from './DeleteRoleStaff' | |
| 102 | - | |
| 103 | - export default { | |
| 104 | - name: 'RoleStaff', | |
| 105 | - components: { | |
| 106 | - AddRoleStaff, | |
| 107 | - DeleteRoleStaff | |
| 108 | - }, | |
| 109 | - props: { | |
| 110 | - pgId: { | |
| 111 | - type: String, | |
| 112 | - required: true | |
| 15 | + | |
| 16 | + <el-table :data="staffs" border style="width: 100%; margin-top: 15px"> | |
| 17 | + <el-table-column prop="name" :label="$t('role.staffName')" align="center" /> | |
| 18 | + <el-table-column prop="tel" :label="$t('role.tel')" align="center" /> | |
| 19 | + <el-table-column prop="email" :label="$t('role.email')" align="center" /> | |
| 20 | + <el-table-column prop="address" :label="$t('role.address')" align="center" /> | |
| 21 | + <el-table-column :label="$t('role.sex')" align="center"> | |
| 22 | + <template slot-scope="scope"> | |
| 23 | + {{ scope.row.sex === 0 ? $t('role.male') : $t('role.female') }} | |
| 24 | + </template> | |
| 25 | + </el-table-column> | |
| 26 | + <el-table-column :label="$t('role.operation')" align="center" width="200"> | |
| 27 | + <template slot-scope="scope"> | |
| 28 | + <el-button size="mini" type="danger" @click="openDeleteModal(scope.row)"> | |
| 29 | + {{ $t('role.delete') }} | |
| 30 | + </el-button> | |
| 31 | + <el-button size="mini" type="primary" @click="viewDetail(scope.row)"> | |
| 32 | + {{ $t('role.detail') }} | |
| 33 | + </el-button> | |
| 34 | + </template> | |
| 35 | + </el-table-column> | |
| 36 | + </el-table> | |
| 37 | + | |
| 38 | + <el-pagination :current-page="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size" | |
| 39 | + :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" | |
| 40 | + @current-change="handleCurrentChange" /> | |
| 41 | + | |
| 42 | + <add-role-staff ref="addRoleStaff" :role-id="pgId" @success="loadStaffs" /> | |
| 43 | + <delete-role-staff ref="deleteRoleStaff" @success="loadStaffs" /> | |
| 44 | + </div> | |
| 45 | +</template> | |
| 46 | + | |
| 47 | +<script> | |
| 48 | +import { listRoleStaff } from '@/api/role/roleApi' | |
| 49 | +import AddRoleStaff from './AddRoleStaff' | |
| 50 | +import DeleteRoleStaff from './DeleteRoleStaff' | |
| 51 | + | |
| 52 | +export default { | |
| 53 | + name: 'RoleStaff', | |
| 54 | + components: { | |
| 55 | + AddRoleStaff, | |
| 56 | + DeleteRoleStaff | |
| 57 | + }, | |
| 58 | + props: { | |
| 59 | + pgId: { | |
| 60 | + type: String, | |
| 61 | + required: true | |
| 62 | + } | |
| 63 | + }, | |
| 64 | + data() { | |
| 65 | + return { | |
| 66 | + searchForm: { | |
| 67 | + staffName: '' | |
| 68 | + }, | |
| 69 | + staffs: [], | |
| 70 | + page: { | |
| 71 | + current: 1, | |
| 72 | + size: 10, | |
| 73 | + total: 0 | |
| 113 | 74 | } |
| 114 | - }, | |
| 115 | - data() { | |
| 116 | - return { | |
| 117 | - searchForm: { | |
| 118 | - staffName: '' | |
| 119 | - }, | |
| 120 | - staffs: [], | |
| 121 | - page: { | |
| 122 | - current: 1, | |
| 123 | - size: 10, | |
| 124 | - total: 0 | |
| 75 | + } | |
| 76 | + }, | |
| 77 | + created() { | |
| 78 | + this.loadStaffs() | |
| 79 | + }, | |
| 80 | + methods: { | |
| 81 | + async loadStaffs() { | |
| 82 | + try { | |
| 83 | + const params = { | |
| 84 | + page: this.page.current, | |
| 85 | + row: this.page.size, | |
| 86 | + roleId: this.pgId, | |
| 87 | + userName: this.searchForm.staffName | |
| 125 | 88 | } |
| 89 | + const res = await listRoleStaff(params) | |
| 90 | + this.staffs = res.data | |
| 91 | + this.page.total = res.total | |
| 92 | + } catch (error) { | |
| 93 | + this.$message.error(error.message) | |
| 126 | 94 | } |
| 127 | 95 | }, |
| 128 | - created() { | |
| 96 | + queryStaffs() { | |
| 97 | + this.page.current = 1 | |
| 129 | 98 | this.loadStaffs() |
| 130 | 99 | }, |
| 131 | - methods: { | |
| 132 | - async loadStaffs() { | |
| 133 | - try { | |
| 134 | - const params = { | |
| 135 | - page: this.page.current, | |
| 136 | - row: this.page.size, | |
| 137 | - roleId: this.pgId, | |
| 138 | - userName: this.searchForm.staffName | |
| 139 | - } | |
| 140 | - const res = await listRoleStaff(params) | |
| 141 | - this.staffs = res.data | |
| 142 | - this.page.total = res.total | |
| 143 | - } catch (error) { | |
| 144 | - this.$message.error(error.message) | |
| 145 | - } | |
| 146 | - }, | |
| 147 | - queryStaffs() { | |
| 148 | - this.page.current = 1 | |
| 149 | - this.loadStaffs() | |
| 150 | - }, | |
| 151 | - openAddModal() { | |
| 152 | - this.$refs.addRoleStaff.show() | |
| 153 | - }, | |
| 154 | - openDeleteModal(staff) { | |
| 155 | - this.$refs.deleteRoleStaff.show(staff,this.pgId) | |
| 156 | - }, | |
| 157 | - viewDetail(staff) { | |
| 158 | - this.$router.push(`/staff/detail/${staff.userId}`) | |
| 159 | - }, | |
| 160 | - handleSizeChange(size) { | |
| 161 | - this.page.size = size | |
| 162 | - this.loadStaffs() | |
| 163 | - }, | |
| 164 | - handleCurrentChange(current) { | |
| 165 | - this.page.current = current | |
| 166 | - this.loadStaffs() | |
| 167 | - } | |
| 100 | + openAddModal() { | |
| 101 | + this.$refs.addRoleStaff.show() | |
| 102 | + }, | |
| 103 | + openDeleteModal(staff) { | |
| 104 | + this.$refs.deleteRoleStaff.show(staff, this.pgId) | |
| 105 | + }, | |
| 106 | + viewDetail(staff) { | |
| 107 | + this.$router.push(`/staff/detail/${staff.userId}`) | |
| 108 | + }, | |
| 109 | + handleSizeChange(size) { | |
| 110 | + this.page.size = size | |
| 111 | + this.loadStaffs() | |
| 112 | + }, | |
| 113 | + handleCurrentChange(current) { | |
| 114 | + this.page.current = current | |
| 115 | + this.loadStaffs() | |
| 168 | 116 | } |
| 169 | 117 | } |
| 170 | - </script> | |
| 171 | - | |
| 172 | - <style scoped> | |
| 173 | - .role-staff { | |
| 174 | - margin:15px; | |
| 175 | - | |
| 176 | - .search-wrapper { | |
| 177 | - margin-bottom: 15px; | |
| 178 | - text-align: right; | |
| 179 | - } | |
| 180 | - | |
| 181 | - .el-pagination { | |
| 182 | - margin-top: 15px; | |
| 183 | - margin-bottom: 15px; | |
| 184 | - text-align: right; | |
| 185 | - } | |
| 118 | +} | |
| 119 | +</script> | |
| 120 | + | |
| 121 | +<style scoped> | |
| 122 | +.role-staff { | |
| 123 | + margin: 15px; | |
| 124 | + | |
| 125 | + .search-wrapper { | |
| 126 | + margin-bottom: 15px; | |
| 127 | + text-align: right; | |
| 128 | + } | |
| 129 | + | |
| 130 | + .el-pagination { | |
| 131 | + margin-top: 15px; | |
| 132 | + margin-bottom: 15px; | |
| 133 | + text-align: right; | |
| 186 | 134 | } |
| 187 | - </style> | |
| 188 | 135 | \ No newline at end of file |
| 136 | +} | |
| 137 | +</style> | |
| 189 | 138 | \ No newline at end of file | ... | ... |
src/views/contract/addContractLang.js
| ... | ... | @@ -74,7 +74,10 @@ export const messages = { |
| 74 | 74 | contact: 'Contact', |
| 75 | 75 | submitSuccess: 'Submit successfully', |
| 76 | 76 | invalidFileType: 'Operation failed, please upload image or PDF format files', |
| 77 | - required: 'Required' | |
| 77 | + required: 'Required', | |
| 78 | + requiredOperator: 'Required, please fill in operator', | |
| 79 | + requiredOperatorPhone: 'Required, please fill in operator phone', | |
| 80 | + requiredContractAmount: 'Required, please fill in contract amount' | |
| 78 | 81 | } |
| 79 | 82 | }, |
| 80 | 83 | zh: { |
| ... | ... | @@ -152,7 +155,10 @@ export const messages = { |
| 152 | 155 | contact: '联系方式', |
| 153 | 156 | submitSuccess: '提交成功', |
| 154 | 157 | invalidFileType: '操作失败,请上传图片、PDF格式的文件', |
| 155 | - required: '必填' | |
| 158 | + required: '必填', | |
| 159 | + requiredOperator: '必填,请填写经办人', | |
| 160 | + requiredOperatorPhone: '必填,请填写联系电话', | |
| 161 | + requiredContractAmount: '必填,请填写合同金额' | |
| 156 | 162 | } |
| 157 | 163 | } |
| 158 | 164 | } |
| 159 | 165 | \ No newline at end of file | ... | ... |
src/views/contract/addContractList.vue
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | </el-button> |
| 10 | 10 | </div> |
| 11 | 11 | |
| 12 | - <el-form ref="form" :model="addContractInfo" label-width="120px"> | |
| 12 | + <el-form ref="form" :model="addContractInfo" label-width="120px" class="text-left" :rules="rules"> | |
| 13 | 13 | <!-- Parent Contract Info --> |
| 14 | 14 | <el-row v-if="addContractInfo.parentContractCode" :gutter="20"> |
| 15 | 15 | <el-col :span="8"> |
| ... | ... | @@ -103,17 +103,17 @@ |
| 103 | 103 | <el-row :gutter="20"> |
| 104 | 104 | <el-col :span="8"> |
| 105 | 105 | <el-form-item :label="$t('contract.operator')" prop="operator" required> |
| 106 | - <el-input v-model="addContractInfo.operator"></el-input> | |
| 106 | + <el-input v-model="addContractInfo.operator" :placeholder="$t('contract.requiredOperator')"></el-input> | |
| 107 | 107 | </el-form-item> |
| 108 | 108 | </el-col> |
| 109 | 109 | <el-col :span="8"> |
| 110 | 110 | <el-form-item :label="$t('contract.operatorPhone')" prop="operatorLink" required> |
| 111 | - <el-input v-model="addContractInfo.operatorLink"></el-input> | |
| 111 | + <el-input v-model="addContractInfo.operatorLink" :placeholder="$t('contract.requiredOperatorPhone')"></el-input> | |
| 112 | 112 | </el-form-item> |
| 113 | 113 | </el-col> |
| 114 | 114 | <el-col :span="8"> |
| 115 | 115 | <el-form-item :label="$t('contract.contractAmount')"> |
| 116 | - <el-input v-model="addContractInfo.amount"></el-input> | |
| 116 | + <el-input v-model="addContractInfo.amount" :placeholder="$t('contract.requiredContractAmount')"></el-input> | |
| 117 | 117 | </el-form-item> |
| 118 | 118 | </el-col> |
| 119 | 119 | </el-row> |
| ... | ... | @@ -278,7 +278,19 @@ export default { |
| 278 | 278 | staffName: '', |
| 279 | 279 | nextUserId: '' |
| 280 | 280 | }, |
| 281 | - communityId: '' | |
| 281 | + communityId: '', | |
| 282 | + rules: { | |
| 283 | + contractName: [{ required: true, message: this.$t('contract.requiredContractName'), trigger: 'blur' }], | |
| 284 | + contractCode: [{ required: true, message: this.$t('contract.requiredContractCode'), trigger: 'blur' }], | |
| 285 | + contractType: [{ required: true, message: this.$t('contract.requiredContractType'), trigger: 'blur' }], | |
| 286 | + operator: [{ required: true, message: this.$t('contract.requiredOperator'), trigger: 'blur' }], | |
| 287 | + operatorLink: [{ required: true, message: this.$t('contract.requiredOperatorPhone'), trigger: 'blur' }], | |
| 288 | + amount: [{ required: true, message: this.$t('contract.requiredContractAmount'), trigger: 'blur' }], | |
| 289 | + startTime: [{ required: true, message: this.$t('contract.requiredStartTime'), trigger: 'blur' }], | |
| 290 | + endTime: [{ required: true, message: this.$t('contract.requiredEndTime'), trigger: 'blur' }], | |
| 291 | + signingTime: [{ required: true, message: this.$t('contract.requiredSigningTime'), trigger: 'blur' }], | |
| 292 | + partyA: [{ required: true, message: this.$t('contract.requiredPartyA'), trigger: 'blur' }], | |
| 293 | + } | |
| 282 | 294 | } |
| 283 | 295 | }, |
| 284 | 296 | created() { | ... | ... |
src/views/report/reportFeeSummaryList.vue
| ... | ... | @@ -13,7 +13,8 @@ |
| 13 | 13 | <el-row :gutter="20"> |
| 14 | 14 | <el-col :span="4"> |
| 15 | 15 | <el-date-picker v-model="reportFeeSummaryInfo.conditions.startDate" type="date" |
| 16 | - :placeholder="$t('reportFeeSummary.selectStartDate')" style="width: 100%" @change="handleDateChange" /> | |
| 16 | + :placeholder="$t('reportFeeSummary.selectStartDate')" style="width: 100%" | |
| 17 | + @change="handleDateChange" /> | |
| 17 | 18 | </el-col> |
| 18 | 19 | <el-col :span="4"> |
| 19 | 20 | <el-date-picker v-model="reportFeeSummaryInfo.conditions.endDate" type="date" |
| ... | ... | @@ -111,7 +112,8 @@ |
| 111 | 112 | <el-table-column prop="preReceivedFee" :label="$t('reportFeeSummary.advancePayment')" align="center" /> |
| 112 | 113 | <el-table-column prop="receivedFee" :label="$t('reportFeeSummary.actualPayment')" align="center" /> |
| 113 | 114 | </el-table-column> |
| 114 | - <el-table-column prop="curReceivableFee" :label="$t('reportFeeSummary.currentReceivable')" align="center" /> | |
| 115 | + <el-table-column prop="curReceivableFee" :label="$t('reportFeeSummary.currentReceivable')" | |
| 116 | + align="center" /> | |
| 115 | 117 | <el-table-column :label="$t('reportFeeSummary.currentActual')" align="center"> |
| 116 | 118 | <template slot-scope="scope"> |
| 117 | 119 | {{ (scope.row.curReceivableFee - scope.row.curOweFee).toFixed(2) }} |
| ... | ... | @@ -239,7 +241,9 @@ export default { |
| 239 | 241 | page: 1, |
| 240 | 242 | row: 100, |
| 241 | 243 | ...this.reportFeeSummaryInfo.conditions, |
| 242 | - configIds: this.reportFeeSummaryInfo.configIds.join(',') | |
| 244 | + } | |
| 245 | + if (this.reportFeeSummaryInfo.configIds.length > 0) { | |
| 246 | + params.configIds = this.reportFeeSummaryInfo.configIds.join(','); | |
| 243 | 247 | } |
| 244 | 248 | |
| 245 | 249 | const { data } = await queryReportFeeSummary(params) |
| ... | ... | @@ -269,7 +273,7 @@ export default { |
| 269 | 273 | isDefault: 'F' |
| 270 | 274 | } |
| 271 | 275 | |
| 272 | - const data = await queryFeeConfigs(params) | |
| 276 | + const data = await queryFeeConfigs(params) | |
| 273 | 277 | this.reportFeeSummaryInfo.feeConfigs = data.feeConfigs |
| 274 | 278 | } catch (error) { |
| 275 | 279 | console.error('Failed to list fee configs:', error) | ... | ... |