|
|
@@ -433,8 +433,8 @@ export default {
|
|
|
current: 1,
|
|
|
max: 0,
|
|
|
total: 0,
|
|
|
- paginationIpt: 1
|
|
|
- , changeCodeDialog: false,
|
|
|
+ paginationIpt: 1,
|
|
|
+ changeCodeDialog: false,
|
|
|
newCheckCode: null,
|
|
|
selectedRow: null
|
|
|
}
|
|
|
@@ -617,7 +617,12 @@ export default {
|
|
|
_this.newFormData.staff_type
|
|
|
) {
|
|
|
_this.RandomCheckCode()
|
|
|
- postauth(_this.pathname, _this.newFormData)
|
|
|
+ // 后端存储的就是中文,直接提交
|
|
|
+ const submitData = {
|
|
|
+ ..._this.newFormData,
|
|
|
+ role: _this.newFormData.staff_type // 保存角色名称用于关联Role
|
|
|
+ }
|
|
|
+ postauth(_this.pathname, submitData)
|
|
|
.then((res) => {
|
|
|
_this.getList()
|
|
|
_this.newDataCancel()
|
|
|
@@ -666,6 +671,7 @@ export default {
|
|
|
var _this = this
|
|
|
_this.editMode = true
|
|
|
_this.editid = e.id
|
|
|
+ // 后端返回的就是中文,直接使用
|
|
|
_this.editFormData = {
|
|
|
staff_name: e.staff_name,
|
|
|
staff_type: e.staff_type
|
|
|
@@ -673,22 +679,12 @@ export default {
|
|
|
},
|
|
|
editDataSubmit () {
|
|
|
var _this = this
|
|
|
- if (_this.editFormData.staff_type === '经理') {
|
|
|
- _this.editFormData.staff_type = 'Manager'
|
|
|
- } else if (_this.editFormData.staff_type === '主管') {
|
|
|
- _this.editFormData.staff_type = 'Supervisor'
|
|
|
- } else if (_this.editFormData.staff_type === '收货组') {
|
|
|
- _this.editFormData.staff_type = 'Inbound'
|
|
|
- } else if (_this.editFormData.staff_type === '发货组') {
|
|
|
- _this.editFormData.staff_type = 'Outbound'
|
|
|
- } else if (_this.editFormData.staff_type === '库存控制') {
|
|
|
- _this.editFormData.staff_type = 'StockControl'
|
|
|
- } else if (_this.editFormData.staff_type === '客户') {
|
|
|
- _this.editFormData.staff_type = 'Customer'
|
|
|
- } else if (_this.editFormData.staff_type === '供应商') {
|
|
|
- _this.editFormData.staff_type = 'Supplier'
|
|
|
+ // 后端存储的就是中文,直接提交
|
|
|
+ const submitData = {
|
|
|
+ ..._this.editFormData,
|
|
|
+ role: _this.editFormData.staff_type // 保存角色名称用于关联Role
|
|
|
}
|
|
|
- putauth(_this.pathname + _this.editid + '/', _this.editFormData)
|
|
|
+ putauth(_this.pathname + _this.editid + '/', submitData)
|
|
|
.then((res) => {
|
|
|
_this.editDataCancel()
|
|
|
_this.getList()
|