更新
This commit is contained in:
@@ -33,3 +33,87 @@ export function getTableData3(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 表1 编辑
|
||||||
|
export function editType(num1, num2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `update [基础数据_设备工位点检表] set 点检表类型 = ${num1} where ID = ${num2}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function confirmEdit1(num1, num2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `update [基础数据_点检类型名称] set 点检表类型名称 = '${num1}' where 点检表类型流水号 = ${num2}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function confirmEdit2(num1, num2, num3) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `update 基础数据_点检内容 set 保养周期 = ${num1} ,保养项目 = '${num2}' where ID = ${num3}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function openDelete1(num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `delete 基础数据_点检类型名称 where 点检表类型流水号 = ${num1}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function selectCount(num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '3',
|
||||||
|
name: `SELECT 工位号 FROM [基础数据_设备工位点检表] where 点检表类型 = ${num1}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function openDelete2(num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `delete 基础数据_点检内容 where ID = ${num1}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function submit1(num1) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: `insert into 基础数据_点检类型名称 (点检表类型名称) values ('${num1}')`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function submit2(num1, num2, num3) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '4',
|
||||||
|
name: ` declare @id int = 0
|
||||||
|
SELECT top 1 @id = ID FROM [ERPTOOL_GJ].[dbo].基础数据_点检内容 order by ID desc
|
||||||
|
set @id = @id + 1
|
||||||
|
insert into 基础数据_点检内容 (点检任务编号,点检表类型,保养项目,保养周期) values (@id,${num1},'${num2}',${num3})`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
1
src/icons/svg/maintainInformation.svg
Normal file
1
src/icons/svg/maintainInformation.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="1557552071193" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2463" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M938.666667 810.666667V85.333333H106.666667v448h21.333333v64h64v85.333334h42.666667v-85.333334h64v-64h21.333333V298.666667h362.666667v512h-106.666667v-85.333334h-170.666667v85.333334h-106.666666v-85.333334H128v85.333334H42.666667v128h938.666666v-128zM256 554.666667H170.666667v-21.333334h85.333333z m21.333333-298.666667v234.666667H149.333333V128h746.666667v682.666667h-170.666667V256z m170.666667 512h85.333333v42.666667h-85.333333zM170.666667 768h85.333333v42.666667H170.666667z m768 128H85.333333v-42.666667h853.333334z" p-id="2464" fill="#1296db"></path><path d="M661.333333 192m-42.666666 0a42.666667 42.666667 0 1 0 85.333333 0 42.666667 42.666667 0 1 0-85.333333 0Z" p-id="2465" fill="#1296db"></path><path d="M277.333333 170.666667h298.666667v42.666666H277.333333zM789.333333 597.333333h42.666667v170.666667h-42.666667zM789.333333 469.333333h42.666667v85.333334h-42.666667zM789.333333 341.333333h42.666667v85.333334h-42.666667z" p-id="2466" fill="#1296db"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -21,7 +21,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="点检表类型" min-width="150">
|
<el-table-column align="center" label="点检表类型" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="tableData1[scope.$index].点检表类型流水号" filterable size="small" placeholder="点检表类型" style="margin:3px 10px;width: 150px" @change="editType">
|
<el-select v-model="tableData1[scope.$index].点检表类型流水号" filterable size="small" placeholder="点检表类型" style="margin:3px 10px;width: 150px" @change="editType(scope.row)">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in 点检表类型"
|
v-for="item in 点检表类型"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -39,7 +39,21 @@
|
|||||||
<el-table-column align="center" label="序号" type="index" width="50"/>
|
<el-table-column align="center" label="序号" type="index" width="50"/>
|
||||||
<el-table-column align="center" label="点检类型名称" min-width="150">
|
<el-table-column align="center" label="点检类型名称" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.点检表类型名称 }}
|
<template v-if="scope.row.edit">
|
||||||
|
<el-input v-model="scope.row.点检表类型名称" style="width:120px;margin-right:3px" clearable size="mini" width="120"/>
|
||||||
|
</template>
|
||||||
|
<span v-else>{{ scope.row.点检表类型名称 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="160">
|
||||||
|
<template slot="header" slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd1('form1')">新增</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit1(scope.row)">确定</el-button>
|
||||||
|
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit1(scope.$index, scope.row)">取消</el-button>
|
||||||
|
<el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||||
|
<el-button v-if="!scope.row.edit" type="danger" size="mini" plain icon="el-icon-delete" @click="openDelete1(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -49,26 +63,83 @@
|
|||||||
<el-table-column align="center" label="序号" type="index" width="50"/>
|
<el-table-column align="center" label="序号" type="index" width="50"/>
|
||||||
<el-table-column align="center" label="保养周期" min-width="110">
|
<el-table-column align="center" label="保养周期" min-width="110">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.保养周期 === 1">天</span>
|
<template v-if="scope.row.edit">
|
||||||
|
<el-select v-model="tableData3[scope.$index].保养周期" filterable size="small" placeholder="点检表类型" style="margin:3px 10px;width: 150px" @change="editType(scope.row)">
|
||||||
|
<el-option
|
||||||
|
v-for="item in 保养周期"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
<template v-else slot-scope="scope">
|
||||||
|
<span v-if="scope.row.保养周期 === 1">日</span>
|
||||||
<span v-if="scope.row.保养周期 === 7">周</span>
|
<span v-if="scope.row.保养周期 === 7">周</span>
|
||||||
<span v-if="scope.row.保养周期 === 30">月</span>
|
<span v-if="scope.row.保养周期 === 30">月</span>
|
||||||
<span v-if="scope.row.保养周期 === 90">季</span>
|
<span v-if="scope.row.保养周期 === 90">季</span>
|
||||||
<span v-if="scope.row.保养周期 === 365">年</span>
|
<span v-if="scope.row.保养周期 === 365">年</span>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="保养项目" min-width="250">
|
<el-table-column align="center" label="保养项目" min-width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.保养项目 }}
|
<template v-if="scope.row.edit">
|
||||||
|
<el-input v-model="scope.row.保养项目" style="width: 90%;margin-right:3px" clearable size="mini" width="120"/>
|
||||||
|
</template>
|
||||||
|
<span v-else>{{ scope.row.保养项目 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="160">
|
||||||
|
<template slot="header" slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-circle-plus-outline" @click="handleAdd2('form2')">新增</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-if="scope.row.edit" type="text" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit2(scope.row)">确定</el-button>
|
||||||
|
<el-button v-if="scope.row.edit" class="cancel-btn" size="mini" type="text" @click="cancelEdit2(scope.$index, scope.row)">取消</el-button>
|
||||||
|
<el-button v-else type="text" size="mini" icon="el-icon-edit" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||||
|
<el-button v-if="!scope.row.edit" type="danger" size="mini" plain icon="el-icon-delete" @click="openDelete2(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible1" title="新增" center width="500px">
|
||||||
|
<el-form ref="form1" :model="form1" :rules="rules" label-position="right" label-width="160px">
|
||||||
|
<el-form-item label="点检类型名称" prop="点检类型名称">
|
||||||
|
<el-input v-model="form1.点检类型名称" placeholder="点检类型名称" clearable size="small" style="width:180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="callOff1('form1')">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submit1('form1')" >确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible2" title="新增" center width="500px">
|
||||||
|
<el-form ref="form2" :model="form2" :rules="rules" label-position="right" label-width="160px">
|
||||||
|
<el-form-item label="保养项目" prop="保养项目">
|
||||||
|
<el-input v-model="form2.保养项目" placeholder="保养项目" clearable size="small" style="width:180px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保养周期" prop="保养周期">
|
||||||
|
<el-select v-model="form2.保养周期" filterable size="small" placeholder="保养周期" style="width: 180px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in 保养周期"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="callOff2('form2')">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submit2('form2')" >确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTableData1, getTableData2, getTableData3 } from '@/api/ManufacturingCenter/maintainInformation'
|
import { getTableData1, getTableData2, getTableData3, editType, confirmEdit1, confirmEdit2, selectCount, openDelete1, openDelete2, submit1, submit2 } from '@/api/ManufacturingCenter/maintainInformation'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -78,8 +149,39 @@ export default {
|
|||||||
loading1: false,
|
loading1: false,
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
loading2: false,
|
loading2: false,
|
||||||
|
点检表类型流水号: '',
|
||||||
|
保养周期: [{
|
||||||
|
value: 1,
|
||||||
|
label: '日'
|
||||||
|
}, {
|
||||||
|
value: 7,
|
||||||
|
label: '周'
|
||||||
|
}, {
|
||||||
|
value: 30,
|
||||||
|
label: '月'
|
||||||
|
}, {
|
||||||
|
value: 90,
|
||||||
|
label: '季'
|
||||||
|
}, {
|
||||||
|
value: 365,
|
||||||
|
label: '年'
|
||||||
|
}],
|
||||||
tableData3: [],
|
tableData3: [],
|
||||||
loading3: false
|
loading3: false,
|
||||||
|
form1: {
|
||||||
|
点检类型名称: ''
|
||||||
|
},
|
||||||
|
dialogFormVisible1: false,
|
||||||
|
form2: {
|
||||||
|
保养项目: '',
|
||||||
|
保养周期: ''
|
||||||
|
},
|
||||||
|
dialogFormVisible2: false,
|
||||||
|
rules: { // 表单验证规则
|
||||||
|
点检类型名称: [{ required: true, message: '请输入点检类型名称', trigger: 'blur' }],
|
||||||
|
保养项目: [{ required: true, message: '请输入保养项目', trigger: 'blur' }],
|
||||||
|
保养周期: [{ required: true, message: '请选择保养周期', trigger: 'change' }]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -88,14 +190,20 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTableData1() {
|
getTableData1() {
|
||||||
|
this.tableData1 = []
|
||||||
this.loading1 = true
|
this.loading1 = true
|
||||||
getTableData1().then(response => {
|
getTableData1().then(response => {
|
||||||
this.tableData1 = response.data
|
this.tableData1 = response.data
|
||||||
this.loading1 = false
|
this.loading1 = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 编辑 表1
|
||||||
|
editType(row) {
|
||||||
|
editType(row.点检表类型流水号, row.ID)
|
||||||
|
},
|
||||||
getTableData2() {
|
getTableData2() {
|
||||||
this.点检表类型 = []
|
this.点检表类型 = []
|
||||||
|
this.tableData2 = []
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
getTableData2().then(response => {
|
getTableData2().then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
@@ -104,19 +212,200 @@ export default {
|
|||||||
value: response.data[i].点检表类型流水号
|
value: response.data[i].点检表类型流水号
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.tableData2 = response.data
|
if (response.data.length !== 0) {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.tableData2.push({
|
||||||
|
点检表类型流水号: response.data[i].点检表类型流水号,
|
||||||
|
点检表类型名称: response.data[i].点检表类型名称,
|
||||||
|
点检表类型流水号_原: response.data[i].点检表类型流水号,
|
||||||
|
点检表类型名称_原: response.data[i].点检表类型名称,
|
||||||
|
edit: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
this.loading2 = false
|
this.loading2 = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 取消编辑
|
||||||
|
cancelEdit1(index, row) {
|
||||||
|
row.edit = false
|
||||||
|
row.点检表类型名称 = this.tableData2[index].点检表类型名称_原
|
||||||
|
this.$message('取消修改')
|
||||||
|
},
|
||||||
|
// 编辑 表2
|
||||||
|
confirmEdit1(row) {
|
||||||
|
confirmEdit1(row.点检表类型名称, row.点检表类型流水号).then(response => {
|
||||||
|
row.edit = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除 表2
|
||||||
|
openDelete1(row) {
|
||||||
|
this.$confirm('此操作将永久删除该行信息, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
selectCount(row.点检表类型流水号).then(response => {
|
||||||
|
if (response.data.length === 0) {
|
||||||
|
openDelete1(row.点检表类型流水号).then(() => {
|
||||||
|
this.tableData3 = []
|
||||||
|
this.getTableData2()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
var message
|
||||||
|
message = '工位:'
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
if (i === response.data.length - 1) {
|
||||||
|
message = message + response.data[i].工位号
|
||||||
|
} else {
|
||||||
|
message = message + response.data[i].工位号 + '、'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
message = message + '占用,请先将以上工位改为其他点检类型'
|
||||||
|
this.$message.error(message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 新增 表2
|
||||||
|
handleAdd1(formName) {
|
||||||
|
if (this.$refs[formName] !== undefined) {
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
|
}
|
||||||
|
this.form1.点检类型名称 = ''
|
||||||
|
this.dialogFormVisible1 = true
|
||||||
|
},
|
||||||
|
callOff1() {
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
},
|
||||||
|
submit1(formName) {
|
||||||
|
this.$refs[formName].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
submit1(this.form1.点检类型名称).then(response => {
|
||||||
|
this.getTableData2()
|
||||||
|
this.dialogFormVisible1 = false
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
getTableData3(row) {
|
getTableData3(row) {
|
||||||
|
this.点检表类型流水号 = row.点检表类型流水号
|
||||||
|
this.tableData3 = []
|
||||||
this.loading3 = true
|
this.loading3 = true
|
||||||
getTableData3(row.点检表类型流水号).then(response => {
|
getTableData3(row.点检表类型流水号).then(response => {
|
||||||
this.tableData3 = response.data
|
if (response.data.length !== 0) {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.tableData3.push({
|
||||||
|
ID: response.data[i].ID,
|
||||||
|
保养周期: response.data[i].保养周期,
|
||||||
|
保养项目: response.data[i].保养项目,
|
||||||
|
保养周期_原: response.data[i].保养周期,
|
||||||
|
保养项目_原: response.data[i].保养项目,
|
||||||
|
edit: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
this.loading3 = false
|
this.loading3 = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
editType() {
|
// 取消编辑
|
||||||
console.log(1)
|
cancelEdit2(index, row) {
|
||||||
|
row.edit = false
|
||||||
|
row.保养周期 = this.tableData3[index].保养周期_原
|
||||||
|
row.保养项目 = this.tableData3[index].保养项目_原
|
||||||
|
this.$message('取消修改')
|
||||||
|
},
|
||||||
|
// 编辑 表3
|
||||||
|
confirmEdit2(row) {
|
||||||
|
confirmEdit2(row.保养周期, row.保养项目, row.ID).then(response => {
|
||||||
|
row.edit = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除 表3
|
||||||
|
openDelete2(row) {
|
||||||
|
this.$confirm('此操作将永久删除该行信息, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
openDelete2(row.ID).then(() => {
|
||||||
|
this.tableData3 = []
|
||||||
|
this.loading3 = true
|
||||||
|
getTableData3(this.点检表类型流水号).then(response => {
|
||||||
|
if (response.data.length !== 0) {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.tableData3.push({
|
||||||
|
ID: response.data[i].ID,
|
||||||
|
保养周期: response.data[i].保养周期,
|
||||||
|
保养项目: response.data[i].保养项目,
|
||||||
|
保养周期_原: response.data[i].保养周期,
|
||||||
|
保养项目_原: response.data[i].保养项目,
|
||||||
|
edit: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.loading3 = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 新增 表3
|
||||||
|
handleAdd2(formName) {
|
||||||
|
if (this.$refs[formName] !== undefined) {
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
|
}
|
||||||
|
this.form2.保养项目 = ''
|
||||||
|
this.form2.保养周期 = ''
|
||||||
|
if (this.点检表类型流水号) {
|
||||||
|
this.dialogFormVisible2 = true
|
||||||
|
} else {
|
||||||
|
this.$message.error('请先选择一个点检类型')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callOff2() {
|
||||||
|
this.dialogFormVisible2 = false
|
||||||
|
},
|
||||||
|
submit2(formName) {
|
||||||
|
this.$refs[formName].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.点检表类型流水号) {
|
||||||
|
submit2(this.点检表类型流水号, this.form2.保养项目, this.form2.保养周期).then(response => {
|
||||||
|
this.tableData3 = []
|
||||||
|
this.loading3 = true
|
||||||
|
getTableData3(this.点检表类型流水号).then(response => {
|
||||||
|
if (response.data.length !== 0) {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.tableData3.push({
|
||||||
|
ID: response.data[i].ID,
|
||||||
|
保养周期: response.data[i].保养周期,
|
||||||
|
保养项目: response.data[i].保养项目,
|
||||||
|
保养周期_原: response.data[i].保养周期,
|
||||||
|
保养项目_原: response.data[i].保养项目,
|
||||||
|
edit: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.loading3 = false
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.dialogFormVisible2 = false
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user