diff --git a/app/admin/controller/mall/User.php b/app/admin/controller/mall/User.php index 08abf4a..b3c43a0 100644 --- a/app/admin/controller/mall/User.php +++ b/app/admin/controller/mall/User.php @@ -92,6 +92,9 @@ class User extends Backend $data = $this->applyInputFilter($data); $data = $this->excludeFields($data); + //保存管理员admin_id + $data['admin_id'] = $this->auth->id; + $result = false; $this->model->startTrans(); try { diff --git a/web/src/lang/backend/zh-cn/mall/user.ts b/web/src/lang/backend/zh-cn/mall/user.ts index 1326d8d..3d3c76f 100644 --- a/web/src/lang/backend/zh-cn/mall/user.ts +++ b/web/src/lang/backend/zh-cn/mall/user.ts @@ -7,8 +7,8 @@ export default { daily_claim: '每日限额', daily_claim_use: '每日限额(已使用)', available_for_withdrawal: '可提现金额', - admin_id: '归属管理员', - admin__username: '用户名', + admin_id: '归属管理员id', + admin__username: '归属管理员', create_time: '创建时间', update_time: '修改时间', 'quick Search Fields': 'ID', diff --git a/web/src/views/backend/mall/user/index.vue b/web/src/views/backend/mall/user/index.vue index 1110acd..daabb9f 100644 --- a/web/src/views/backend/mall/user/index.vue +++ b/web/src/views/backend/mall/user/index.vue @@ -47,21 +47,61 @@ const baTable = new baTableClass( column: [ { type: 'selection', align: 'center', operator: false }, { label: t('mall.user.id'), prop: 'id', align: 'center', width: 70, operator: 'RANGE', sortable: 'custom' }, - { label: t('mall.user.username'), prop: 'username', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' }, + { + label: t('mall.user.username'), + prop: 'username', + align: 'center', + operatorPlaceholder: t('Fuzzy query'), + sortable: false, + operator: 'LIKE', + }, { label: t('mall.user.phone'), prop: 'phone', align: 'center', operatorPlaceholder: t('Fuzzy query'), sortable: false, operator: 'LIKE' }, { label: t('mall.user.score'), prop: 'score', align: 'center', sortable: false, operator: 'RANGE' }, { label: t('mall.user.daily_claim'), prop: 'daily_claim', align: 'center', sortable: false, operator: 'RANGE' }, { label: t('mall.user.daily_claim_use'), prop: 'daily_claim_use', align: 'center', sortable: false, operator: 'RANGE' }, { label: t('mall.user.available_for_withdrawal'), prop: 'available_for_withdrawal', align: 'center', sortable: false, operator: 'RANGE' }, - { label: t('mall.user.admin__username'), prop: 'admin.username', align: 'center', operatorPlaceholder: t('Fuzzy query'), render: 'tags', operator: 'LIKE', comSearchRender: 'string' }, - { label: t('mall.user.create_time'), prop: 'create_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', sortable: 'custom', width: 160, timeFormat: 'yyyy-mm-dd hh:MM:ss' }, - { label: t('mall.user.update_time'), prop: 'update_time', align: 'center', render: 'datetime', operator: 'RANGE', comSearchRender: 'datetime', sortable: 'custom', width: 160, timeFormat: 'yyyy-mm-dd hh:MM:ss' }, + { + label: t('mall.user.admin__username'), + prop: 'admin.username', + align: 'center', + operatorPlaceholder: t('Fuzzy query'), + render: 'tags', + operator: 'LIKE', + comSearchRender: 'string', + }, + { + label: t('mall.user.create_time'), + prop: 'create_time', + align: 'center', + render: 'datetime', + operator: 'RANGE', + comSearchRender: 'datetime', + sortable: 'custom', + width: 160, + timeFormat: 'yyyy-mm-dd hh:MM:ss', + }, + { + label: t('mall.user.update_time'), + prop: 'update_time', + align: 'center', + render: 'datetime', + operator: 'RANGE', + comSearchRender: 'datetime', + sortable: 'custom', + width: 160, + timeFormat: 'yyyy-mm-dd hh:MM:ss', + }, { label: t('Operate'), align: 'center', width: 100, render: 'buttons', buttons: optButtons, operator: false }, ], dblClickNotEditColumn: [undefined], }, { - defaultItems: {}, + defaultItems: { + score: 0, + daily_claim: 100, + daily_claim_use: 0, + available_for_withdrawal: 0, + }, } ) diff --git a/web/src/views/backend/mall/user/popupForm.vue b/web/src/views/backend/mall/user/popupForm.vue index 3d5ab52..2dcf999 100644 --- a/web/src/views/backend/mall/user/popupForm.vue +++ b/web/src/views/backend/mall/user/popupForm.vue @@ -17,7 +17,7 @@