Commit c79dc093 authored by 仇晓婷's avatar 仇晓婷

部门加属性字段

parent 40a5e8f6
......@@ -35,7 +35,7 @@
<Radio label="1"></Radio>
<Radio label="0"></Radio>
</RadioGroup>-->
<CheckboxGroup v-model="entity.isProduction">
<CheckboxGroup v-model="entity.property">
<Checkbox label="1">生产班组</Checkbox>
<Checkbox label="2">排产资源</Checkbox>
</CheckboxGroup>
......@@ -94,13 +94,19 @@ export default {
handleSubmit() {
this.$refs["form"].validate(value => {
if (value) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
} else {
this.entity.isProduction = 0;
}
let paramsdata = {
name: this.entity.title02, //部门名称
parent_Id: this.entity.id, //上级部门 [id]
code: this.entity.departcode, //部门编号
organization_Id: this.entity.organization_Id, //组织类型 [id]
location: this.entity.location, //省市县
isProduction: this.entity.isProduction //是否生产班组:1是,0否
isProduction: this.entity.isProduction, //是否生产班组:1是,0否
property: this.entity.property //属性
};
Api.create(paramsdata)
.then(r => {
......
......@@ -84,6 +84,11 @@ export default {
handleSubmit() {
this.$refs["form"].validate(value => {
if (value) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
} else {
this.entity.isProduction = 0;
}
let location;
if (this.entity.location) {
location = this.entity.location.join(",");
......@@ -96,7 +101,8 @@ export default {
code: this.entity.departcode, //部门编号
organization_Id: this.entity.organization_Id, //组织类型 [id]
location: location, //省市县
isProduction: this.entity.isProduction //是否生产班组:1是,0否
isProduction: this.entity.isProduction, //是否生产班组:1是,0否
property: this.entity.property //属性
};
Api.create(paramsdata)
.then(r => {
......
......@@ -87,6 +87,11 @@ export default {
handleSubmit() {
this.$refs["form"].validate(value => {
if (value) {
if (this.entity.property[0] == 1 || this.entity.property[1] == 1) {
this.entity.isProduction = 1;
} else {
this.entity.isProduction = 0;
}
let paramsdata = {
id: this.entity.id,
name: this.entity.name, //部门名称
......@@ -95,7 +100,8 @@ export default {
organizationType: this.entity.organizationType, //组织类型 [name]
organization_Id: this.entity.organization_Id, //组织类型 [id]
location: this.city_level.join(","), //省市县
isProduction: this.entity.isProduction //是否生产班组:1是,0否
isProduction: this.entity.isProduction, //是否生产班组:1是,0否
property: this.entity.property //属性
};
Api.update(paramsdata)
.then(r => {
......
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