Merge branch 'master' of http://192.168.1.149:10010/r/高精2.0
This commit is contained in:
1
src/icons/svg/MaterialManagement.svg
Normal file
1
src/icons/svg/MaterialManagement.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1539331081532" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2108" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M357.856 506.24L230.72 434.4a22.4 22.4 0 0 0-29.664 6.976 19.744 19.744 0 0 0 7.392 27.936l127.136 71.872a22.4 22.4 0 0 0 29.664-6.976 19.776 19.776 0 0 0-7.392-27.968z" p-id="2109"></path><path d="M906.048 407.52c-11.968 0-21.632 9.12-21.632 20.384v251.584l-363.552 193.408V516.544c0-1.568-0.608-2.944-0.928-4.416l371.328-198.272a19.808 19.808 0 0 0-0.96-35.904L508.928 98.272a22.944 22.944 0 0 0-19.328 0L108.224 277.952a19.296 19.296 0 0 0-10.464 23.424 18.336 18.336 0 0 0-1.44 6.752v383.296c0 7.168 3.968 13.76 10.432 17.44l381.376 216.352 0.16 0.064c0.256 0.128 0.576 0.128 0.8 0.288a22.976 22.976 0 0 0 8.608 2.304c0.992 0.064 1.952-0.096 2.944-0.16a22.08 22.08 0 0 0 7.456-1.76c0.608-0.256 1.184-0.128 1.792-0.448l406.816-216.384a20.16 20.16 0 0 0 11.008-17.728v-263.488c-0.032-11.232-9.728-20.384-21.664-20.384zM477.664 871.712L139.488 679.872v-348.8l339.104 181.056c-0.352 1.472-0.928 2.848-0.928 4.416v355.168zM834.656 297.28l-335.392 179.072L163.904 297.28l335.328-158.016L834.656 297.28z" p-id="2110"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
@@ -14,11 +14,6 @@
|
||||
height="580"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="材料编号" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料流水号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="材料名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
@@ -58,7 +53,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="新增材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
|
||||
<el-input v-model="form.MaterialName" size="small" style="width:200px"/>
|
||||
<el-input v-model="form.MaterialName" clearable size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -68,14 +63,14 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="编辑材料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName" style="display: inline-block">
|
||||
<el-input v-model="form.MaterialName" size="small" style="width:200px"/>
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="材料名称" prop="MaterialName2" style="display: inline-block">
|
||||
<el-input v-model="form2.MaterialName2" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="editMaterial('form')">确定</el-button>
|
||||
<el-button type="primary" size="small" @click="editMaterial('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -98,8 +93,12 @@ export default {
|
||||
form: {
|
||||
MaterialName: ''
|
||||
},
|
||||
form2: {
|
||||
MaterialName2: ''
|
||||
},
|
||||
rules: {
|
||||
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
|
||||
MaterialName: [{ required: true, message: '请输入材料名称', trigger: 'blur' }],
|
||||
MaterialName2: [{ required: true, message: '请输入材料名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -130,17 +129,18 @@ export default {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.MaterialName = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
addMaterial(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addMaterial(this.form.MaterialName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.featchMaterial()
|
||||
this.$message.success('添加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.form = {}
|
||||
this.featchMaterial()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.form = {}
|
||||
@@ -150,7 +150,6 @@ export default {
|
||||
})
|
||||
},
|
||||
delMaterial(row) {
|
||||
console.log(row)
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@@ -168,18 +167,18 @@ export default {
|
||||
})
|
||||
},
|
||||
Edit(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.form.MaterialName = row.材料
|
||||
this.form2.MaterialName2 = row.材料
|
||||
this.ID = row.材料流水号
|
||||
},
|
||||
editMaterial(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
editMaterial(form2) {
|
||||
this.$refs[form2].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dialogFormVisible2 = false
|
||||
editMaterial(this.ID, this.form.MaterialName).then(response => {
|
||||
editMaterial(this.ID, this.form2.MaterialName2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.featchMaterial()
|
||||
this.$message.success('编辑成功')
|
||||
@@ -197,10 +196,4 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -385,9 +385,12 @@ export default {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTechnologicalRequirementsOfProcessNum(row) {
|
||||
this.expands = []
|
||||
this.expands.push(row.工艺编号)
|
||||
searchTechnologicalRequirementsOfProcessNum(row, expandedRows) {
|
||||
// this.expands = []
|
||||
// this.expands.push(row.工艺编号)
|
||||
if (expandedRows.length > 1) {
|
||||
expandedRows.shift()
|
||||
}
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
|
||||
Reference in New Issue
Block a user