解决页面插槽使用不规范问题
This commit is contained in:
parent
2a453c8f14
commit
72919c2ffa
|
|
@ -41,8 +41,8 @@ const user = {
|
|||
// 登录
|
||||
Login({ commit }, userInfo) {
|
||||
const username = userInfo.username.trim()
|
||||
// const password = encrypt(userInfo.password)
|
||||
const password = userInfo.password
|
||||
const password = encrypt(userInfo.password)
|
||||
// const password = userInfo.password
|
||||
const code = userInfo.code
|
||||
const uuid = userInfo.uuid
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
|
|
@ -317,7 +317,7 @@
|
|||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(codeQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
|
|
|
|||
|
|
@ -449,7 +449,7 @@
|
|||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(dialogQuery.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@
|
|||
width="80"
|
||||
type="index"
|
||||
>
|
||||
<template scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
(queryParams.pageNum - 1) * 10 + scope.$index + 1
|
||||
}}</span>
|
||||
|
|
@ -440,392 +440,389 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listType,
|
||||
getType,
|
||||
delType,
|
||||
addType,
|
||||
updateType,
|
||||
refreshCache,
|
||||
} from '@/api/system/dict/type'
|
||||
import {
|
||||
getRepairedList,
|
||||
getRepairedDetailList,
|
||||
inputByType,
|
||||
getTypeList,
|
||||
} from '@/api/store/warehousing'
|
||||
import { equipmentTypeTree } from '@/api/store/tools'
|
||||
import {
|
||||
listType,
|
||||
getType,
|
||||
delType,
|
||||
addType,
|
||||
updateType,
|
||||
refreshCache,
|
||||
} from '@/api/system/dict/type'
|
||||
import {
|
||||
getRepairedList,
|
||||
getRepairedDetailList,
|
||||
inputByType,
|
||||
getTypeList,
|
||||
} from '@/api/store/warehousing'
|
||||
import { equipmentTypeTree } from '@/api/store/tools'
|
||||
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
name: 'RepairWarehousing',
|
||||
dicts: ['sys_normal_disable'],
|
||||
components: {
|
||||
Treeselect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 总条数
|
||||
dialogTotal: 0,
|
||||
//搜索下拉数据
|
||||
typeList: [],
|
||||
modelList: [],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
showHandle: true,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined,
|
||||
keyWord: '',
|
||||
wxTime: '',
|
||||
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
|
||||
})
|
||||
export default {
|
||||
name: 'RepairWarehousing',
|
||||
dicts: ['sys_normal_disable'],
|
||||
components: {
|
||||
Treeselect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 总条数
|
||||
dialogTotal: 0,
|
||||
//搜索下拉数据
|
||||
typeList: [],
|
||||
modelList: [],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
showHandle: true,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined,
|
||||
keyWord: '',
|
||||
wxTime: '',
|
||||
deviceTypeId: '',
|
||||
},
|
||||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getRepairedList(this.queryParams).then((response) => {
|
||||
this.tableList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
query: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
keyWord: '',
|
||||
typeId: '',
|
||||
},
|
||||
|
||||
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()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
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',
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
dictName: [
|
||||
{
|
||||
...this.queryParams,
|
||||
required: true,
|
||||
message: '字典名称不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
`修试入库_${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);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
],
|
||||
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
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(to) {
|
||||
if (to.query.keyWord) {
|
||||
this.queryParams.keyWord = to.query.keyWord
|
||||
this.getList()
|
||||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getRepairedList(this.queryParams).then((response) => {
|
||||
this.tableList = response.rows
|
||||
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>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue