desc: 修改权限字段
This commit is contained in:
parent
1e3486efc6
commit
5e8089cacd
@ -165,11 +165,14 @@ export default {
|
||||
});
|
||||
postFindPermission(arr).then(res => {
|
||||
this.isGoods = false;
|
||||
if (res.data && res.data.goodsId) {
|
||||
if (res.data && res.data.id) {
|
||||
this.isGoods = true;
|
||||
this.addModel.name = res.data.prdName;
|
||||
this.addModel.price = res.data.prdPrice;
|
||||
this.addModel.name = res.data.name;
|
||||
this.addModel.price = res.data.prdPrice || 0.01;
|
||||
this.addModel.remarks = res.data.remarks;
|
||||
this.addModel.tryUse = this.addModel.forever;
|
||||
this.addModel.tryUseTime = this.addModel.tryUseTime;
|
||||
this.addModel.tryUseTimeUnit = this.addModel.tryUseTimeUnit;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -202,11 +205,14 @@ export default {
|
||||
});
|
||||
postFindPermission(arr).then(res => {
|
||||
this.isGoods = false;
|
||||
if (res.data && res.data.goodsId) {
|
||||
if (res.data && res.data.id) {
|
||||
this.isGoods = true;
|
||||
this.addModel.name = res.data.prdName;
|
||||
this.addModel.price = res.data.prdPrice;
|
||||
this.addModel.name = res.data.name;
|
||||
this.addModel.price = res.data.prdPrice || 0.01;
|
||||
this.addModel.remarks = res.data.remarks;
|
||||
this.addModel.tryUse = this.addModel.forever;
|
||||
this.addModel.tryUseTime = this.addModel.tryUseTime;
|
||||
this.addModel.tryUseTimeUnit = this.addModel.tryUseTimeUnit;
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -333,22 +339,18 @@ export default {
|
||||
} else if (this.addModel.type == '02') {
|
||||
this.$refs.formData.validate((valid) => {
|
||||
if (valid) { // 判断是否有重复万能权限 有的话使用有的权限
|
||||
const goodNameNew = this.addModel.name;
|
||||
const remarksNew = this.addModel.remarks;
|
||||
postFindPermission(arr).then(res => {
|
||||
this.addModel['relPermissions'] = arr;
|
||||
if (res.data) {
|
||||
this.addModel['id'] = res.data.id;
|
||||
}
|
||||
if (this.isGoods) { // 有商品传值
|
||||
this.addModel.name = res.data.name;
|
||||
this.addModel.remarks = res.data.remarks;
|
||||
const good = {
|
||||
id: res.data.goodsId,
|
||||
permissionId: res.data.id,
|
||||
name: goodNameNew,
|
||||
name: this.addModel.name,
|
||||
price: this.addModel.price,
|
||||
remarks: remarksNew,
|
||||
remarks: this.addModel.remarks,
|
||||
tryUse: this.addModel.forever,
|
||||
tryUseTime: this.addModel.tryUseTime,
|
||||
tryUseTimeUnit: this.addModel.tryUseTimeUnit,
|
||||
@ -357,18 +359,14 @@ export default {
|
||||
this.$emit('permissionNextOrder', this.addModel, good);
|
||||
} else {
|
||||
// 创建万能权限商品 接口
|
||||
if (res.data && res.data.name) {
|
||||
this.addModel.name = res.data.name;
|
||||
this.addModel.remarks = res.data.remarks;
|
||||
}
|
||||
const good = {
|
||||
name: goodNameNew,
|
||||
name: this.addModel.name,
|
||||
permissionId: '',
|
||||
tryUse: this.addModel.forever,
|
||||
tryUseTime: this.addModel.tryUseTime,
|
||||
tryUseTimeUnit: this.addModel.tryUseTimeUnit,
|
||||
price: this.addModel.price,
|
||||
remarks: remarksNew,
|
||||
remarks: this.addModel.remarks,
|
||||
list: this.ruleList
|
||||
};
|
||||
this.$emit('permissionNextOrder', this.addModel, good);
|
||||
|
Loading…
Reference in New Issue
Block a user