Commit 15d04078 by yangzhi

Merge branch 'dev'

parents e3a47f83 431fcb43
...@@ -53,6 +53,18 @@ const routes = [ ...@@ -53,6 +53,18 @@ const routes = [
name: 'system_user', name: 'system_user',
meta: { title: '用户管理' }, meta: { title: '用户管理' },
}, },
{
path: '/saas/currency',
component: () => import('@/views/basics/currency.vue'),
name: 'basics_currency',
meta: { title: '汇率币种' },
},
{
path: '/saas/timed_task',
component: () => import('@/views/system/timed_task.vue'),
name: 'system_timed_task',
meta: { title: '定时任务' },
},
], ],
}, },
] ]
......
<template>
<div class="wraper">
<div class="table_wrap" v-loading="loading">
<table-vue
:sourceData="sourceData"
ref="multipleTable"
:tableColumns="tableColumns"
@currentChange="currentTabFn"
:rowClassName="cellClass"
@selectionChange="selectionChange"
></table-vue>
</div>
<div class="pagination">
<el-pagination
layout="sizes, total, prev, pager, next, jumper"
background
:total="paginationOptions.total"
:page-size="paginationOptions.pageSize"
:current-page="paginationOptions.currentPage"
@size-change="sizeChange"
@current-change="onCurrentChange"
>
</el-pagination>
</div>
<!-- 弹出层 -->
<el-dialog
:close-on-click-modal="false"
:title="is_title == 1 ? '新增' : '编辑'"
:visible.sync="dialogVisible"
width="800px"
>
<el-form
label-position="right"
label-width="140px"
size="mini"
:inline="true"
:model="addcurrencyform"
:rules="addrules"
ref="addcurrencyform"
>
<el-form-item label="币种代码" prop="currencyCode">
<el-input
v-model="addcurrencyform.currencyCode"
placeholder="请输入币种代码"
></el-input>
</el-form-item>
<el-form-item label="币种名称" prop="currencyName">
<el-input
v-model="addcurrencyform.currencyName"
placeholder="请输入币种名称"
></el-input>
</el-form-item>
<el-form-item
label="对人民币汇率"
prop="exchangeCnyRate"
>
<el-input
v-model="addcurrencyform.exchangeCnyRate"
placeholder="对人民币汇率"
></el-input>
</el-form-item>
<el-form-item
label="对美元汇率"
prop="exchangeUsdRate"
>
<el-input
v-model="addcurrencyform.exchangeUsdRate"
placeholder="对美元汇率"
></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="addcurrencyform.remark"
placeholder="请输入备注"
></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button
@click="dialogVisible = false"
size="mini"
style="width: 100px"
>
取消
</el-button>
<el-button
type="primary"
@click="addCurrency()"
size="mini"
style="width: 100px"
>
确认
</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import axios from '../../common/api/axios'
import tableVue from '@/common/components/base/tableView.vue'
export default {
name: 'basics_currency',
components: {
tableVue,
},
data() {
return {
is_title: 1,
select: '',
sourceData: [],
searchForm: {},
dialogVisible: false,
addcurrencyform: {
id: '',
currencyCode: '',
currencyName: '',
exchangeUsdRate: '',
exchangeCnyRate: '',
remark: '',
},
addcurrencyform2: null,
formId: null,
addrules: {
exchangeUsdRate: [
{
required: true,
message: '请输入汇率',
trigger: 'blur',
},
{
pattern: /^(\d+)?(\.\d+)?$/,
message: '只能输入数字',
},
],
exchangeCnyRate: [
{
required: true,
message: '请输入汇率',
trigger: 'blur',
},
{
pattern: /^(\d+)?(\.\d+)?$/,
message: '只能输入数字',
},
],
currencyCode: [
{
required: true,
message: '请输入币种代码',
trigger: 'blur',
},
],
currencyName: [
{
required: true,
message: '请输入币种名称',
trigger: 'blur',
},
],
},
paginationOptions: {
pageSize: 100,
currentPage: 1,
total: 0,
},
loading: false,
}
},
created() {
this.getList()
this.addcurrencyform2 = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
},
computed: {
tableColumns() {
return [
{
label: '币种代码',
key: 'currencyCode',
},
{
label: '币种名称',
key: 'currencyName',
},
{
label: '对人民币汇率',
key: 'exchangeCnyRate',
align: 'center',
},
{
label: '对美元汇率',
key: 'exchangeUsdRate',
align: 'center',
},
]
},
},
methods: {
onCurrentChange(currentPage) {
this.paginationOptions.currentPage = currentPage
this.getList()
},
sizeChange(pageSize) {
this.paginationOptions.pageSize = pageSize
this.getList()
},
cellClass({ row }) {
if (row.authAuditFlag === 1) {
return 'first'
} else {
return ''
}
},
selectionChange(selection) {
if (selection.length > 0) {
this.select = selection
}
},
search() {
this.paginationOptions.currentPage = 1
this.getList()
},
currentTabFn(val) {
if (val.row) {
this.formId = val.row.id
}
},
// 修改新增
addDialog(i, v = null) {
if (i === 2) {
if (v) this.formId = v.id
if (!this.formId) {
return this.$message('请勾选至少一条记录')
}
this.selectSection()
} else {
this.$nextTick(() => {
this.addcurrencyform = JSON.parse(
JSON.stringify(this.addcurrencyform2),
)
})
this.is_title = i
this.dialogVisible = true
}
if (this.$refs.addcurrencyform) {
this.$refs.addcurrencyform.resetFields()
}
},
addCurrency() {
if (this.is_title === 1) {
this.addSection()
} else {
this.upSection()
}
},
setpaginationOptions(opt) {
for (const key in opt) {
this.paginationOptions[key] = opt[key]
}
this.getList()
},
// 查询
getList() {
this.loading = true
const {
pageSize,
currentPage,
} = this.paginationOptions
axios
.post('manage/rest/exchangeRateListPage', {
pageSize,
currentPage,
...this.searchForm,
})
.then(res => {
this.loading = false
if (res.code === 200) {
this.sourceData = res.data.records
this.paginationOptions.total = res.data.total
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
},
// 修改
upSection() {
const url = 'platform/user/update'
this.$refs.addcurrencyform.validate(valid => {
if (valid) {
const data = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
let roleIds = this.addcurrencyform.funcRoleIds.concat(
this.addcurrencyform.dataRoleIds,
)
roleIds = roleIds.join()
data.roleIds = roleIds
axios.post(url, data).then(res => {
if (res.code === 200) {
this.dialogVisible = false
this.$message({
message: '修改成功',
type: 'success',
})
this.getList(
this.paginationOptions.currentPage,
)
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
}
})
},
// 新增
addSection() {
const url = 'baseExchangeRateCur/add'
this.$refs.addcurrencyform.validate(valid => {
if (valid) {
const data = JSON.parse(
JSON.stringify(this.addcurrencyform),
)
let roleIds = this.addcurrencyform.funcRoleIds.concat(
this.addcurrencyform.dataRoleIds,
)
roleIds = roleIds.join()
data.roleIds = roleIds
axios.post(url, data).then(res => {
if (res.code === 200) {
this.dialogVisible = false
this.$alert(
'添加成功\n\r 用户密码为:' +
res.data?.passWord || '',
)
this.getList()
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
}
})
},
// 删除
deleteSection(v) {
let arr = []
if (v) arr.push(v)
else arr = this.select
const leng = arr.length
if (leng === 0) {
return this.$message('请勾选至少一条记录')
}
let ids = []
ids = arr.map(v => {
return v.id
})
ids = ids.join()
this.$confirm('确定删除选中的信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
axios
.get('platform/user/delete', {
params: {
ids: ids,
},
})
.then(res => {
if (res.code === 200) {
this.$message({
type: 'success',
message: '删除成功!',
})
this.getList()
} else {
this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true,
})
}
})
})
.catch(() => {})
},
},
}
</script>
<style scoped>
.wraper {
display: flex;
flex-direction: column;
height: 100%;
}
.table_wrap {
flex: 1;
}
.circle {
display: inline-block;
height: 10px;
width: 10px;
border-radius: 5px;
margin-right: 5px;
}
.my-table >>> .first {
background-color: red !important;
color: #fff !important;
}
</style>
\ No newline at end of file
...@@ -179,6 +179,22 @@ export default { ...@@ -179,6 +179,22 @@ export default {
index: 'user', index: 'user',
children: [], children: [],
}, },
{
id: 4,
path: '',
label: '汇率币种',
icon: 'el-icon-bank-card',
index: '/saas/currency',
children: [],
},
// {
// id: 4,
// path: '',
// label: '定时任务',
// icon: 'el-icon-message-solid',
// index: '/saas/timed_task',
// children: [],
// },
], ],
}, },
], ],
......
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
<el-tree <el-tree
:data="treeData" :data="treeData"
:props="defaultProps" :props="defaultProps"
ref="tree"
highlight-current highlight-current
:node-key="'statusCode'" :node-key="'statusCode'"
:expand-on-click-node="false" :expand-on-click-node="false"
current-node-key="PRE_HANDLING"
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
> >
...@@ -42,11 +42,17 @@ ...@@ -42,11 +42,17 @@
v-model="searchForm.prop" v-model="searchForm.prop"
placeholder="请选择" placeholder="请选择"
clearable clearable
style="width:100px" style="width: 100px"
> >
<el-option label="开始时间" value="startTime"></el-option> <el-option
<el-option label="创建时间" value="createTime"></el-option> label="开始时间"
</el-select> value="startTime"
></el-option>
<el-option
label="创建时间"
value="createTime"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<choose-time-period <choose-time-period
...@@ -450,6 +456,7 @@ import assignWork from '@/assets/work/assign.png' ...@@ -450,6 +456,7 @@ import assignWork from '@/assets/work/assign.png'
import startWork from '@/assets/work/start.png' import startWork from '@/assets/work/start.png'
import archiveWork from '@/assets/work/archive.png' import archiveWork from '@/assets/work/archive.png'
import completeWork from '@/assets/work/complete.png' import completeWork from '@/assets/work/complete.png'
import rejectWork from '@/assets/work/reject.png'
export default { export default {
name: 'task_center', name: 'task_center',
...@@ -482,7 +489,11 @@ export default { ...@@ -482,7 +489,11 @@ export default {
selections: [], selections: [],
is_tab: '1', is_tab: '1',
statusCode: 'PRE_HANDLING', statusCode: 'PRE_HANDLING',
searchForm: { timeProp: 'create_time', leaders: [], prop: 'createTime' }, searchForm: {
timeProp: 'create_time',
leaders: [],
prop: 'createTime',
},
isEdit: false, isEdit: false,
sourceData: [], sourceData: [],
currentRowId: '', currentRowId: '',
...@@ -609,8 +620,7 @@ export default { ...@@ -609,8 +620,7 @@ export default {
align: 'center', align: 'center',
render: (item) => ( render: (item) => (
<span> <span>
{(item.orderStatus === 'PRE_HANDLING' || {
item.orderStatus === 'IN_COMPLETE') && (
<span <span
title="详情" title="详情"
class="icon-view icon-tools-view" class="icon-view icon-tools-view"
...@@ -620,7 +630,7 @@ export default { ...@@ -620,7 +630,7 @@ export default {
onClick={() => this.showDetail(item)} onClick={() => this.showDetail(item)}
></i> ></i>
</span> </span>
)} }
{item.orderStatus === 'TO_BE_ASSIGN' && ( {item.orderStatus === 'TO_BE_ASSIGN' && (
<span title="指派给" class="icon-view"> <span title="指派给" class="icon-view">
<img <img
...@@ -663,6 +673,16 @@ export default { ...@@ -663,6 +673,16 @@ export default {
/> />
</span> </span>
)} )}
{item.orderStatus === 'IN_COMPLETE' && (
<span title="驳回" class="icon-view">
<img
width="24"
height="24"
src={rejectWork}
onClick={() => this.reject(item)}
/>
</span>
)}
</span> </span>
), ),
}, },
...@@ -731,7 +751,6 @@ export default { ...@@ -731,7 +751,6 @@ export default {
this.centerPageOptions.currentPage = currentPage this.centerPageOptions.currentPage = currentPage
this.getlist() this.getlist()
}, },
operation() {},
async getSystemUserList() { async getSystemUserList() {
try { try {
const res = await getSystemUserList() const res = await getSystemUserList()
...@@ -769,6 +788,9 @@ export default { ...@@ -769,6 +788,9 @@ export default {
if (res.code === 200) { if (res.code === 200) {
this.treeData = [res.data] this.treeData = [res.data]
} }
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.statusCode)
})
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
...@@ -805,16 +827,21 @@ export default { ...@@ -805,16 +827,21 @@ export default {
) )
if (res.code === 200) { if (res.code === 200) {
this.assignVisible = false this.assignVisible = false
this.getlist()
this.getOrderTree() this.getOrderTree()
this.getlist()
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }
}, },
handleNodeClick(data) { handleNodeClick(data) {
if (data.statusCode === 'IN_PROGRESS') {
this.$set(this.searchForm, 'leaders', [
this.userInfo.id,
])
}
if (data.statusCode !== 'IN_PROGRESS') { if (data.statusCode !== 'IN_PROGRESS') {
this.searchForm.leaders = '' this.searchForm.leaders = []
} }
this.statusCode = data.statusCode this.statusCode = data.statusCode
this.getlist() this.getlist()
...@@ -831,11 +858,16 @@ export default { ...@@ -831,11 +858,16 @@ export default {
startTime: this.periodTime && this.periodTime[0], startTime: this.periodTime && this.periodTime[0],
endTime: this.periodTime && this.periodTime[1], endTime: this.periodTime && this.periodTime[1],
...this.searchForm, ...this.searchForm,
leaders: this.searchForm.leaders && this.searchForm.leaders.join(','), leaders:
this.searchForm.leaders &&
this.searchForm.leaders.join(','),
}) })
.then((res) => { .then((res) => {
if (res.code !== 200) return
this.sourceData = res.data.records this.sourceData = res.data.records
this.centerPageOptions.total = res.data.total this.centerPageOptions.total = res.data.total
})
.finally(() => {
this.loading = false this.loading = false
}) })
}, },
...@@ -879,6 +911,15 @@ export default { ...@@ -879,6 +911,15 @@ export default {
console.error(e) console.error(e)
} }
}, },
async reject() {
try {
await this.$confirm('确定驳回吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {}
},
async submitTime() { async submitTime() {
if (!this.estimateCompleteTime) { if (!this.estimateCompleteTime) {
return this.$message.warning('请选择预计完成时间') return this.$message.warning('请选择预计完成时间')
...@@ -935,19 +976,6 @@ export default { ...@@ -935,19 +976,6 @@ export default {
this.textarea = '' this.textarea = ''
}, },
}, },
watch: {
statusCode(val) {
if (val === 'IN_PROGRESS') {
this.$set(
this.searchForm,
'leaders',
[this.userInfo.id],
)
} else {
this.$set(this.searchForm, 'leaders', [])
}
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment