This commit is contained in:
2022-11-18 16:44:14 +08:00
23 changed files with 413 additions and 124 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

@@ -80,7 +80,7 @@
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" style="width: 200px;" />
</el-form-item>
<el-form-item label="部门" prop="dept.id">
<el-form-item label="部门" prop="dept.id" :rules="[{ required: true, message: '请选择部门', trigger: 'change' }]">
<treeselect
v-model="form.dept.id"
:options="depts"
@@ -89,7 +89,10 @@
placeholder="选择部门"
/>
</el-form-item>
<br v-if="!crud.status.add">
<el-form-item label="密码" prop="password" v-if="crud.status.add">
<el-input v-model="form.password" style="width: 200px;" show-password auto-complete="new-password"/>
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="form.gender" style="width: 178px">
<el-radio label="">男</el-radio>
@@ -168,16 +171,26 @@
<el-table-column
v-permission="['admin','user:edit','user:del']"
label="操作"
width="115"
width="200"
align="center"
fixed="right"
>
<template slot-scope="scope">
<udOperation
style="display: inline"
:data="scope.row"
:permission="permission"
:disabled-dle="scope.row.id === user.id"
/>
<el-button
v-permission="permission.edit"
type="text"
slot="left"
icon="el-icon-refresh-left"
@click="resetPassword(scope.row)"
>
重置密码
</el-button>
</template>
</el-table-column>
</el-table>
@@ -212,7 +225,8 @@ const defaultForm = {
enabled: 'true',
roles: [],
dept: { id: null },
phone: null
phone: null,
password: null
}
export default {
name: 'User',
@@ -256,7 +270,7 @@ export default {
])
},
created() {
this.crud.msg.add = '新增成功默认密码123456'
this.crud.msg.add = '新增成功'
},
mounted: function() {
const that = this
@@ -292,6 +306,7 @@ export default {
},
// 新增前将多选的值设置为空
[CRUD.HOOK.beforeToAdd]() {
this.form.password = '123456'
this.roleDatas = []
},
// 初始化编辑时候的角色与岗位
@@ -435,6 +450,28 @@ export default {
},
checkboxT(row, rowIndex) {
return row.id !== this.user.id
},
resetPassword(row) {
row.password = null
this.$prompt('', '重置密码', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPlaceholder: '请输入新的密码',
inputPattern: /^[A-Z|a-z|0-9|(._~!@#$^&*)]{6,20}$/,
inputErrorMessage: '密码格式不正确,只能是6-20位密码',
closeOnClickModal: false
}).then(({ value }) => {
row.password = value
crudUser.edit(row).then(res => {
this.crud.toQuery()
this.crud.notify('密码重置成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
})
})
}
}
}

View File

@@ -56,7 +56,7 @@
clearable
style="width: 220px"
size="mini"
placeholder="货位编码、名称或载具号"
placeholder="货位编码"
prefix-icon="el-icon-search"
class="filter-item"
/>
@@ -150,9 +150,12 @@ export default {
},
methods: {
open() {
crudSectattr.getSect({ is_materialstore: '1' }).then(res => {
crudSectattr.getSect({ is_productstore: '1' }).then(res => {
debugger
this.sects = res.content
})
this.query.source_bill_code = this.queryrow.source_bill_code
this.query.material_id = this.queryrow.material_id
},
queryStruct() {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(this.queryrow.assign_qty)