解决页面插槽使用不规范问题
This commit is contained in:
parent
2a453c8f14
commit
72919c2ffa
|
|
@ -41,8 +41,8 @@ const user = {
|
||||||
// 登录
|
// 登录
|
||||||
Login({ commit }, userInfo) {
|
Login({ commit }, userInfo) {
|
||||||
const username = userInfo.username.trim()
|
const username = userInfo.username.trim()
|
||||||
// const password = encrypt(userInfo.password)
|
const password = encrypt(userInfo.password)
|
||||||
const password = userInfo.password
|
// const password = userInfo.password
|
||||||
const code = userInfo.code
|
const code = userInfo.code
|
||||||
const uuid = userInfo.uuid
|
const uuid = userInfo.uuid
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@
|
||||||
width="80"
|
width="80"
|
||||||
type="index"
|
type="index"
|
||||||
>
|
>
|
||||||
<template scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
@ -317,7 +317,7 @@
|
||||||
width="80"
|
width="80"
|
||||||
type="index"
|
type="index"
|
||||||
>
|
>
|
||||||
<template scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
(codeQuery.pageNum - 1) * 10 + scope.$index + 1
|
(codeQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
|
||||||
|
|
@ -449,7 +449,7 @@
|
||||||
width="80"
|
width="80"
|
||||||
type="index"
|
type="index"
|
||||||
>
|
>
|
||||||
<template scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
(dialogQuery.pageNum - 1) * 10 + scope.$index + 1
|
(dialogQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@
|
||||||
width="80"
|
width="80"
|
||||||
type="index"
|
type="index"
|
||||||
>
|
>
|
||||||
<template scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{
|
<span>{{
|
||||||
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
@ -440,392 +440,389 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
listType,
|
listType,
|
||||||
getType,
|
getType,
|
||||||
delType,
|
delType,
|
||||||
addType,
|
addType,
|
||||||
updateType,
|
updateType,
|
||||||
refreshCache,
|
refreshCache,
|
||||||
} from '@/api/system/dict/type'
|
} from '@/api/system/dict/type'
|
||||||
import {
|
import {
|
||||||
getRepairedList,
|
getRepairedList,
|
||||||
getRepairedDetailList,
|
getRepairedDetailList,
|
||||||
inputByType,
|
inputByType,
|
||||||
getTypeList,
|
getTypeList,
|
||||||
} from '@/api/store/warehousing'
|
} from '@/api/store/warehousing'
|
||||||
import { equipmentTypeTree } from '@/api/store/tools'
|
import { equipmentTypeTree } from '@/api/store/tools'
|
||||||
|
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RepairWarehousing',
|
name: 'RepairWarehousing',
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
components: {
|
components: {
|
||||||
Treeselect,
|
Treeselect,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 总条数
|
// 总条数
|
||||||
dialogTotal: 0,
|
dialogTotal: 0,
|
||||||
//搜索下拉数据
|
//搜索下拉数据
|
||||||
typeList: [],
|
typeList: [],
|
||||||
modelList: [],
|
modelList: [],
|
||||||
// 表格数据
|
// 表格数据
|
||||||
tableList: [],
|
tableList: [],
|
||||||
detailTableList: [],
|
detailTableList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: '',
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
showHandle: true,
|
showHandle: true,
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
dictName: undefined,
|
dictName: undefined,
|
||||||
dictType: undefined,
|
dictType: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
keyWord: '',
|
keyWord: '',
|
||||||
wxTime: '',
|
wxTime: '',
|
||||||
deviceTypeId: '',
|
deviceTypeId: '',
|
||||||
},
|
|
||||||
query: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
keyWord: '',
|
|
||||||
typeId: '',
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
dictName: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '字典名称不能为空',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
dictType: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: '字典类型不能为空',
|
|
||||||
trigger: 'blur',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
equipmentTypeList: [],
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList()
|
|
||||||
this.getTypeList()
|
|
||||||
this.equipmentType()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getTypeList() {
|
|
||||||
getTypeList({ level: '3' }).then((response) => {
|
|
||||||
this.typeList = response.data
|
|
||||||
})
|
|
||||||
getTypeList({ level: '4' }).then((response) => {
|
|
||||||
this.modelList = response.data
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
/** 查询字典类型列表 */
|
query: {
|
||||||
getList() {
|
pageNum: 1,
|
||||||
this.loading = true
|
pageSize: 10,
|
||||||
getRepairedList(this.queryParams).then((response) => {
|
keyWord: '',
|
||||||
this.tableList = response.rows
|
typeId: '',
|
||||||
this.total = response.total
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
// 表单参数
|
||||||
getDialogTable() {
|
form: {},
|
||||||
this.loading = true
|
// 表单校验
|
||||||
getRepairedDetailList(this.query).then((response) => {
|
rules: {
|
||||||
this.detailTableList = response.rows
|
dictName: [
|
||||||
this.dialogTotal = response.total
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false
|
|
||||||
this.reset()
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
dictId: undefined,
|
|
||||||
dictName: undefined,
|
|
||||||
dictType: undefined,
|
|
||||||
status: '0',
|
|
||||||
remark: undefined,
|
|
||||||
}
|
|
||||||
this.resetForm('form')
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1
|
|
||||||
this.getList()
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleDialogQuery() {
|
|
||||||
this.query.pageNum = 1
|
|
||||||
this.getDialogTable()
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm('queryForm')
|
|
||||||
this.queryParams.keyWord = ''
|
|
||||||
this.handleQuery()
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
// this.reset();
|
|
||||||
this.open = true
|
|
||||||
this.title = '添加字典类型'
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map((item) => item)
|
|
||||||
this.single = selection.length != 1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
// this.reset();
|
|
||||||
this.query.keyWord = ''
|
|
||||||
this.query.taskId = row.id
|
|
||||||
this.getDialogTable()
|
|
||||||
this.open = true
|
|
||||||
this.showHandle = true
|
|
||||||
this.title = '审核'
|
|
||||||
},
|
|
||||||
//查看
|
|
||||||
handleView(row) {
|
|
||||||
this.query.keyWord = ''
|
|
||||||
this.query.taskId = row.id
|
|
||||||
this.getDialogTable()
|
|
||||||
this.open = true
|
|
||||||
this.showHandle = false
|
|
||||||
this.title = '查看'
|
|
||||||
},
|
|
||||||
pass(row) {
|
|
||||||
console.log(row)
|
|
||||||
console.log(this.query.taskId)
|
|
||||||
row.taskId = this.query.taskId
|
|
||||||
let obj = {
|
|
||||||
taskId: this.query.taskId,
|
|
||||||
id: row.id,
|
|
||||||
checkType: '1', //1 审核通过 2 驳回 -必填
|
|
||||||
type: row.manageType, //0.编号 1.计数
|
|
||||||
maId: row.maId,
|
|
||||||
typeId: row.typeId,
|
|
||||||
remark: row.remark,
|
|
||||||
repairNum: row.repairNum,
|
|
||||||
}
|
|
||||||
|
|
||||||
let param = {
|
|
||||||
params: JSON.stringify([obj]),
|
|
||||||
}
|
|
||||||
console.log(param)
|
|
||||||
inputByType(param).then((response) => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess('审批成功')
|
|
||||||
this.getDialogTable()
|
|
||||||
this.getList()
|
|
||||||
} else {
|
|
||||||
this.$modal.msgSuccess('审批失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
passAll() {
|
|
||||||
console.log(this.query.taskId)
|
|
||||||
console.log(this.ids)
|
|
||||||
this.ids.forEach((item) => {
|
|
||||||
item.taskId = this.query.taskId
|
|
||||||
item.checkType = '1'
|
|
||||||
item.type = item.manageType //0.编号 1.计数
|
|
||||||
})
|
|
||||||
let param = {
|
|
||||||
params: JSON.stringify(this.ids),
|
|
||||||
}
|
|
||||||
inputByType(param).then((response) => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess('审批成功')
|
|
||||||
this.getDialogTable()
|
|
||||||
this.getList()
|
|
||||||
} else {
|
|
||||||
this.$modal.msgSuccess('审批失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
refused(row) {
|
|
||||||
console.log(row)
|
|
||||||
console.log(this.query.taskId)
|
|
||||||
row.taskId = this.query.taskId
|
|
||||||
let obj = {
|
|
||||||
taskId: this.query.taskId,
|
|
||||||
id: row.id,
|
|
||||||
checkType: '2', //1 审核通过 2 驳回 -必填
|
|
||||||
type: row.manageType, //0.编号 1.计数
|
|
||||||
maId: row.maId,
|
|
||||||
typeId: row.typeId,
|
|
||||||
remark: row.remark,
|
|
||||||
repairNum: row.repairNum,
|
|
||||||
}
|
|
||||||
let param = {
|
|
||||||
params: JSON.stringify([obj]),
|
|
||||||
}
|
|
||||||
inputByType(param).then((response) => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess('审批成功')
|
|
||||||
this.getDialogTable()
|
|
||||||
this.getList()
|
|
||||||
} else {
|
|
||||||
this.$modal.msgSuccess('审批失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
refusedAll() {
|
|
||||||
console.log(this.query.taskId)
|
|
||||||
console.log(this.ids)
|
|
||||||
this.ids.forEach((item) => {
|
|
||||||
item.taskId = this.query.taskId
|
|
||||||
item.checkType = '2'
|
|
||||||
item.type = item.manageType
|
|
||||||
})
|
|
||||||
let param = {
|
|
||||||
params: JSON.stringify(this.ids),
|
|
||||||
}
|
|
||||||
inputByType(param).then((response) => {
|
|
||||||
if (response.code == 200) {
|
|
||||||
this.$modal.msgSuccess('审批成功')
|
|
||||||
this.getDialogTable()
|
|
||||||
this.getList()
|
|
||||||
} else {
|
|
||||||
this.$modal.msgSuccess('审批失败')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm: function () {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.dictId != undefined) {
|
|
||||||
updateType(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功')
|
|
||||||
this.open = false
|
|
||||||
this.getList()
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
addType(this.form).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功')
|
|
||||||
this.open = false
|
|
||||||
this.getList()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
// const dictIds = row.dictId || this.ids;
|
|
||||||
// this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
|
||||||
// return delType(dictIds);
|
|
||||||
// }).then(() => {
|
|
||||||
// this.getList();
|
|
||||||
// this.$modal.msgSuccess("删除成功");
|
|
||||||
// }).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download(
|
|
||||||
'material/RepairTestInput/export',
|
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
required: true,
|
||||||
|
message: '字典名称不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
`修试入库_${new Date().getTime()}.xlsx`,
|
],
|
||||||
)
|
dictType: [
|
||||||
},
|
{
|
||||||
/** 刷新缓存按钮操作 */
|
required: true,
|
||||||
handleRefreshCache() {
|
message: '字典类型不能为空',
|
||||||
refreshCache().then(() => {
|
trigger: 'blur',
|
||||||
this.$modal.msgSuccess('刷新成功')
|
},
|
||||||
this.$store.dispatch('dict/cleanDict')
|
],
|
||||||
})
|
|
||||||
},
|
|
||||||
//规格型号
|
|
||||||
equipmentType() {
|
|
||||||
equipmentTypeTree().then((response) => {
|
|
||||||
this.equipmentTypeList = response.data
|
|
||||||
this.equipmentTypeList.forEach((item, index) => {
|
|
||||||
if (item.children && item.children.length > 0) {
|
|
||||||
item.children.forEach((item2, index2) => {
|
|
||||||
if (
|
|
||||||
item2.children &&
|
|
||||||
item2.children.length > 0
|
|
||||||
) {
|
|
||||||
item2.children.forEach((item3) => {
|
|
||||||
if (
|
|
||||||
item3.children &&
|
|
||||||
item3.children.length > 0
|
|
||||||
) {
|
|
||||||
item3.children.forEach((item4) => {
|
|
||||||
item4.machineTypeName =
|
|
||||||
item3.typeName
|
|
||||||
item4.specificationType =
|
|
||||||
item4.typeName
|
|
||||||
// this.$set(item4, 'purchasePrice', 0);
|
|
||||||
// this.$set(item4, 'purchaseNum', 1);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
equipmentTypeList: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
this.getTypeList()
|
||||||
|
this.equipmentType()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getTypeList() {
|
||||||
|
getTypeList({ level: '3' }).then((response) => {
|
||||||
|
this.typeList = response.data
|
||||||
|
})
|
||||||
|
getTypeList({ level: '4' }).then((response) => {
|
||||||
|
this.modelList = response.data
|
||||||
|
})
|
||||||
},
|
},
|
||||||
watch: {
|
/** 查询字典类型列表 */
|
||||||
$route: {
|
getList() {
|
||||||
handler(to) {
|
this.loading = true
|
||||||
if (to.query.keyWord) {
|
getRepairedList(this.queryParams).then((response) => {
|
||||||
this.queryParams.keyWord = to.query.keyWord
|
this.tableList = response.rows
|
||||||
this.getList()
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getDialogTable() {
|
||||||
|
this.loading = true
|
||||||
|
getRepairedDetailList(this.query).then((response) => {
|
||||||
|
this.detailTableList = response.rows
|
||||||
|
this.dialogTotal = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
dictId: undefined,
|
||||||
|
dictName: undefined,
|
||||||
|
dictType: undefined,
|
||||||
|
status: '0',
|
||||||
|
remark: undefined,
|
||||||
|
}
|
||||||
|
this.resetForm('form')
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleDialogQuery() {
|
||||||
|
this.query.pageNum = 1
|
||||||
|
this.getDialogTable()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.queryParams.keyWord = ''
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
// this.reset();
|
||||||
|
this.open = true
|
||||||
|
this.title = '添加字典类型'
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item)
|
||||||
|
this.single = selection.length != 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
// this.reset();
|
||||||
|
this.query.keyWord = ''
|
||||||
|
this.query.taskId = row.id
|
||||||
|
this.getDialogTable()
|
||||||
|
this.open = true
|
||||||
|
this.showHandle = true
|
||||||
|
this.title = '审核'
|
||||||
|
},
|
||||||
|
//查看
|
||||||
|
handleView(row) {
|
||||||
|
this.query.keyWord = ''
|
||||||
|
this.query.taskId = row.id
|
||||||
|
this.getDialogTable()
|
||||||
|
this.open = true
|
||||||
|
this.showHandle = false
|
||||||
|
this.title = '查看'
|
||||||
|
},
|
||||||
|
pass(row) {
|
||||||
|
console.log(row)
|
||||||
|
console.log(this.query.taskId)
|
||||||
|
row.taskId = this.query.taskId
|
||||||
|
let obj = {
|
||||||
|
taskId: this.query.taskId,
|
||||||
|
id: row.id,
|
||||||
|
checkType: '1', //1 审核通过 2 驳回 -必填
|
||||||
|
type: row.manageType, //0.编号 1.计数
|
||||||
|
maId: row.maId,
|
||||||
|
typeId: row.typeId,
|
||||||
|
remark: row.remark,
|
||||||
|
repairNum: row.repairNum,
|
||||||
|
}
|
||||||
|
|
||||||
|
let param = {
|
||||||
|
params: JSON.stringify([obj]),
|
||||||
|
}
|
||||||
|
console.log(param)
|
||||||
|
inputByType(param).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('审批成功')
|
||||||
|
this.getDialogTable()
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgSuccess('审批失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
passAll() {
|
||||||
|
console.log(this.query.taskId)
|
||||||
|
console.log(this.ids)
|
||||||
|
this.ids.forEach((item) => {
|
||||||
|
item.taskId = this.query.taskId
|
||||||
|
item.checkType = '1'
|
||||||
|
item.type = item.manageType //0.编号 1.计数
|
||||||
|
})
|
||||||
|
let param = {
|
||||||
|
params: JSON.stringify(this.ids),
|
||||||
|
}
|
||||||
|
inputByType(param).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('审批成功')
|
||||||
|
this.getDialogTable()
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgSuccess('审批失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
refused(row) {
|
||||||
|
console.log(row)
|
||||||
|
console.log(this.query.taskId)
|
||||||
|
row.taskId = this.query.taskId
|
||||||
|
let obj = {
|
||||||
|
taskId: this.query.taskId,
|
||||||
|
id: row.id,
|
||||||
|
checkType: '2', //1 审核通过 2 驳回 -必填
|
||||||
|
type: row.manageType, //0.编号 1.计数
|
||||||
|
maId: row.maId,
|
||||||
|
typeId: row.typeId,
|
||||||
|
remark: row.remark,
|
||||||
|
repairNum: row.repairNum,
|
||||||
|
}
|
||||||
|
let param = {
|
||||||
|
params: JSON.stringify([obj]),
|
||||||
|
}
|
||||||
|
inputByType(param).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('审批成功')
|
||||||
|
this.getDialogTable()
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgSuccess('审批失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refusedAll() {
|
||||||
|
console.log(this.query.taskId)
|
||||||
|
console.log(this.ids)
|
||||||
|
this.ids.forEach((item) => {
|
||||||
|
item.taskId = this.query.taskId
|
||||||
|
item.checkType = '2'
|
||||||
|
item.type = item.manageType
|
||||||
|
})
|
||||||
|
let param = {
|
||||||
|
params: JSON.stringify(this.ids),
|
||||||
|
}
|
||||||
|
inputByType(param).then((response) => {
|
||||||
|
if (response.code == 200) {
|
||||||
|
this.$modal.msgSuccess('审批成功')
|
||||||
|
this.getDialogTable()
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$modal.msgSuccess('审批失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function () {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.dictId != undefined) {
|
||||||
|
updateType(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功')
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addType(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功')
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
deep: true,
|
})
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
// const dictIds = row.dictId || this.ids;
|
||||||
|
// this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
||||||
|
// return delType(dictIds);
|
||||||
|
// }).then(() => {
|
||||||
|
// this.getList();
|
||||||
|
// this.$modal.msgSuccess("删除成功");
|
||||||
|
// }).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
'material/RepairTestInput/export',
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`修试入库_${new Date().getTime()}.xlsx`,
|
||||||
|
)
|
||||||
|
},
|
||||||
|
/** 刷新缓存按钮操作 */
|
||||||
|
handleRefreshCache() {
|
||||||
|
refreshCache().then(() => {
|
||||||
|
this.$modal.msgSuccess('刷新成功')
|
||||||
|
this.$store.dispatch('dict/cleanDict')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//规格型号
|
||||||
|
equipmentType() {
|
||||||
|
equipmentTypeTree().then((response) => {
|
||||||
|
this.equipmentTypeList = response.data
|
||||||
|
this.equipmentTypeList.forEach((item, index) => {
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
item.children.forEach((item2, index2) => {
|
||||||
|
if (item2.children && item2.children.length > 0) {
|
||||||
|
item2.children.forEach((item3) => {
|
||||||
|
if (
|
||||||
|
item3.children &&
|
||||||
|
item3.children.length > 0
|
||||||
|
) {
|
||||||
|
item3.children.forEach((item4) => {
|
||||||
|
item4.machineTypeName =
|
||||||
|
item3.typeName
|
||||||
|
item4.specificationType =
|
||||||
|
item4.typeName
|
||||||
|
// this.$set(item4, 'purchasePrice', 0);
|
||||||
|
// this.$set(item4, 'purchaseNum', 1);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route: {
|
||||||
|
handler(to) {
|
||||||
|
if (to.query.keyWord) {
|
||||||
|
this.queryParams.keyWord = to.query.keyWord
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep.el-table .fixed-width .el-button--mini {
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
width: 60px !important;
|
width: 60px !important;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue