Merge branch 'master' of ssh://192.168.1.149:29418/高精2.0
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">新增</el-button>
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd('department_Form')">新增</el-button>
|
||||||
<el-button type="warning" icon="el-icon-edit" size="small" @click="handleEdit()">编辑</el-button>
|
<el-button type="warning" icon="el-icon-edit" size="small" @click="handleEdit()">编辑</el-button>
|
||||||
<el-button type="danger" icon="el-icon-delete" size="small" @click="deleteTable()">删除</el-button>
|
<el-button type="danger" icon="el-icon-delete" size="small" @click="deleteTable()">删除</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -187,8 +187,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="cancel">取消</el-button>
|
<el-button @click="cancel">取消</el-button>
|
||||||
<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd">确定</el-button>
|
<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd('department_Form')">确定</el-button>
|
||||||
<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit">确定</el-button>
|
<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit('department_Form')">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -353,7 +353,8 @@ export default {
|
|||||||
Title: [{ required: true, message: '请输入', trigger: 'change' }],
|
Title: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||||
PositionStatus: [{ required: true, message: '请输入', trigger: 'change' }],
|
PositionStatus: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||||
Education: [{ required: true, message: '请输入', trigger: 'change' }],
|
Education: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||||
Post: [{ required: true, message: '请输入', trigger: 'change' }]
|
Post: [{ required: true, message: '请输入', trigger: 'change' }],
|
||||||
|
DepartmentName: [{ required: true, message: '请输入', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
SexData: [{
|
SexData: [{
|
||||||
value: 1,
|
value: 1,
|
||||||
@@ -365,7 +366,9 @@ export default {
|
|||||||
EducationDate: [],
|
EducationDate: [],
|
||||||
PostData: [],
|
PostData: [],
|
||||||
multipleSelection: [],
|
multipleSelection: [],
|
||||||
nodeName1: []
|
nodeName1: [],
|
||||||
|
count1: 0,
|
||||||
|
count2: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -418,10 +421,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd(formName) {
|
||||||
this.department_Title = '新增部门'
|
this.department_Title = '新增部门'
|
||||||
this.department_DFV = true
|
this.department_DFV = true
|
||||||
this.addForm('department_Form')
|
this.department_Form.DepartmentName = ''
|
||||||
|
this.count1 = this.count1 + 1
|
||||||
|
if (this.count1 !== 1) {
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleEdit() {
|
handleEdit() {
|
||||||
this.addForm('department_Form')
|
this.addForm('department_Form')
|
||||||
@@ -433,44 +440,75 @@ export default {
|
|||||||
this.$message.warning(`请选择要修改的部门`)
|
this.$message.warning(`请选择要修改的部门`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitAdd() {
|
submitAdd(formName) {
|
||||||
this.department_DFV = false
|
this.$refs[formName].validate((valid) => {
|
||||||
if (this.id) {
|
if (valid) {
|
||||||
addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => {
|
this.department_DFV = false
|
||||||
console.log(response.data[0].result === '1')
|
if (this.id) {
|
||||||
if (response.data[0].result === '1') {
|
addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => {
|
||||||
this.getTreeData()
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('添加成功')
|
this.getTreeData()
|
||||||
|
this.$message.success('添加成功')
|
||||||
|
} else {
|
||||||
|
this.$message.error('添加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('添加失败')
|
addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.getTreeData()
|
||||||
|
this.$message.success('添加成功')
|
||||||
|
} else {
|
||||||
|
this.$message.error('添加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
} else {
|
|
||||||
addDepartmentName(0, this.department_Form.DepartmentName, 0).then(response => {
|
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.getTreeData()
|
|
||||||
this.$message.success('添加成功')
|
|
||||||
} else {
|
|
||||||
this.$message.error('添加失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
submitEdit() {
|
|
||||||
this.department_DFV = false
|
|
||||||
editList(this.id, this.department_Form.DepartmentName).then(response => {
|
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.getTreeData()
|
|
||||||
this.$message.success('编辑成功')
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('编辑失败')
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitEdit(formName) {
|
||||||
|
this.$refs[formName].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.department_DFV = false
|
||||||
|
editList(this.id, this.department_Form.DepartmentName).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.getTreeData()
|
||||||
|
this.$message.success('编辑成功')
|
||||||
|
} else {
|
||||||
|
this.$message.error('编辑失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deleteTable() {
|
deleteTable() {
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
this.deleteRow(delList, this.id, function() { this.getTreeData() })
|
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||||
this.i = 1
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
delList(this.id).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.getTreeData()
|
||||||
|
this.i = 1
|
||||||
|
this.id = ''
|
||||||
|
this.$message({
|
||||||
|
message: '已被成功删除',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(`请选择部门`)
|
this.$message.warning(`请选择部门`)
|
||||||
}
|
}
|
||||||
@@ -508,6 +546,7 @@ export default {
|
|||||||
if (this.id) {
|
if (this.id) {
|
||||||
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
|
this.i = 1
|
||||||
this.handleNodeClick()
|
this.handleNodeClick()
|
||||||
this.$message.success('添加成功')
|
this.$message.success('添加成功')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -167,16 +167,16 @@
|
|||||||
<!--</el-input>-->
|
<!--</el-input>-->
|
||||||
<!--</template>-->
|
<!--</template>-->
|
||||||
<!--</el-table-column>-->
|
<!--</el-table-column>-->
|
||||||
<el-table-column label="操作" width="300px" fixed="right" align="center">
|
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
|
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
|
||||||
<el-button
|
<!--<el-button-->
|
||||||
size="mini"
|
<!--size="mini"-->
|
||||||
type="primary"
|
<!--type="primary"-->
|
||||||
@click="handleDele(scope.$index, scope.row, 'form1')">打回</el-button>
|
<!--@click="handleDele(scope.$index, scope.row, 'form1')">打回</el-button>-->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -53,8 +53,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" min-width="200px">
|
<el-table-column label="操作" align="center" min-width="200px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
<el-button :disabled="scope.row.单据状态==='成交'" type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button :disabled="scope.row.单据状态==='成交'" type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
Reference in New Issue
Block a user