优化测试bug
This commit is contained in:
parent
02d87beddb
commit
1c89edaa77
|
|
@ -652,12 +652,12 @@
|
|||
countCost(list) {
|
||||
let arrCost = 0
|
||||
list.forEach((item) => {
|
||||
arrCost += parseInt(item.costs)
|
||||
// arrCost += parseInt(item.costs)
|
||||
|
||||
// console.log(item)
|
||||
// if (item.partType != 0 && item.scrapType != 0) {
|
||||
// arrCost = arrCost + Number(item.costs)
|
||||
// }
|
||||
console.log(item)
|
||||
if (item.partType != 0 && item.scrapType != 0) {
|
||||
arrCost = arrCost + Number(item.costs)
|
||||
}
|
||||
})
|
||||
return arrCost.toFixed(2)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,8 +2,13 @@
|
|||
<!-- 库存日志 -->
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
|
||||
<el-form-item label="模块名称" prop="userName">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
>
|
||||
<!-- <el-form-item label="模块名称" prop="userName">
|
||||
<el-input
|
||||
placeholder="请输入模块名称"
|
||||
clearable
|
||||
|
|
@ -46,16 +51,28 @@
|
|||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="tableList" border>
|
||||
<el-table-column align="center" label="序号" type="index" width="60" />
|
||||
<el-table-column align="center" prop="modelTitle" label="模块名称" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="60"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
prop="modelTitle"
|
||||
label="模块名称"
|
||||
/>
|
||||
<el-table-column align="center" prop="method" label="请求方式" />
|
||||
<el-table-column align="center" prop="task" label="实例" />
|
||||
<el-table-column align="center" prop="id" label="机具名称" />
|
||||
|
|
@ -74,7 +91,10 @@
|
|||
<el-table-column align="center" prop="remark" label="备注" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="text" @click="previewLogsDetails(row.id)"
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="previewLogsDetails(row.id)"
|
||||
>详情</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
@ -103,9 +123,12 @@
|
|||
:labelStyle="commonStyle"
|
||||
:contentStyle="commonStyle"
|
||||
>
|
||||
<el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v">
|
||||
<el-descriptions-item
|
||||
v-for="(item, v) in detailsLabelList"
|
||||
:key="v"
|
||||
>
|
||||
<template slot="label"> {{ item.label }} </template>
|
||||
{{ logsDetailsInfoDemo[item.content] || "" }}
|
||||
{{ logsDetailsInfoDemo[item.content] || '' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
|
|
@ -113,9 +136,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { getLogsListApi, getLogsDetailsApi } from "@/api/inventoryLogs";
|
||||
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
|
||||
export default {
|
||||
name: "myInventoryLogs",
|
||||
name: 'myInventoryLogs',
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
|
|
@ -127,66 +150,66 @@ export default {
|
|||
logsDetailsInfo: null /* 日志详情 */,
|
||||
logsDetailsDialogVisible: false,
|
||||
commonStyle: {
|
||||
"text-align": "center",
|
||||
'text-align': 'center',
|
||||
},
|
||||
/* 日志详情label以及内容 */
|
||||
detailsLabelList: [
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: "占位", content: "vdDemo" },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
{ label: '占位', content: 'vdDemo' },
|
||||
],
|
||||
logsDetailsInfoDemo: {
|
||||
vdDemo: "123",
|
||||
vdDemo: '123',
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 查询列表 */
|
||||
async getList() {
|
||||
const { data: res } = await getLogsListApi();
|
||||
this.tableList = res.rows;
|
||||
this.total = res.total;
|
||||
console.log(res, "=======日志列表");
|
||||
const { data: res } = await getLogsListApi()
|
||||
this.tableList = res.rows
|
||||
this.total = res.total
|
||||
console.log(res, '=======日志列表')
|
||||
},
|
||||
/* 搜索按钮 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
/* 重置按钮 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.getList();
|
||||
this.resetForm('queryForm')
|
||||
this.getList()
|
||||
},
|
||||
/* 查看详情 */
|
||||
async previewLogsDetails(id) {
|
||||
// const { data: res } = await getLogsDetailsApi(id)
|
||||
// console.log(res, '=======日志详情')
|
||||
|
||||
this.logsDetailsDialogVisible = true;
|
||||
this.logsDetailsDialogVisible = true
|
||||
// this.logsDetailsInfo = res
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table :empty::before {
|
||||
content: "-";
|
||||
content: '-';
|
||||
color: gray;
|
||||
}
|
||||
.margin-top {
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@
|
|||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['delete:user']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<!-- <el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
placeholder="审核状态"
|
||||
|
|
@ -298,6 +298,20 @@
|
|||
:value="model.partId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="机具类型" prop="typeId">
|
||||
<treeselect
|
||||
v-model="query.typeId"
|
||||
default-expand-all
|
||||
:options="equipmentTypeList"
|
||||
placeholder="请选择规格型号"
|
||||
:disable-branch-nodes="true"
|
||||
style="width: 240px"
|
||||
noChildrenText="没有数据了"
|
||||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
|
|
@ -595,12 +609,16 @@
|
|||
checkInputAccessory,
|
||||
accessoryWarehousingEntry,
|
||||
} from '@/api/store/newBuy'
|
||||
import { equipmentTypeTree } from '@/api/store/tools'
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
// name: "AccessoryWarehousing",
|
||||
dicts: ['sys_normal_disable'],
|
||||
components: { vueEasyPrint },
|
||||
components: { vueEasyPrint, Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -667,11 +685,13 @@
|
|||
},
|
||||
],
|
||||
},
|
||||
equipmentTypeList: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getTypeList()
|
||||
this.equipmentType()
|
||||
},
|
||||
methods: {
|
||||
getTypeList() {
|
||||
|
|
@ -927,6 +947,38 @@
|
|||
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);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -228,51 +228,66 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
placeholder="审核状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="未审核" value="0" />
|
||||
<el-option label="已入库" value="1" />
|
||||
<el-option label="驳回" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="deviceTypeId">
|
||||
<el-select
|
||||
v-model="query.deviceTypeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typeList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeId">
|
||||
<el-select
|
||||
<!-- <el-form-item label="状态" prop="status"> -->
|
||||
<!-- <el-select -->
|
||||
<!-- v-model="query.status" -->
|
||||
<!-- placeholder="审核状态" -->
|
||||
<!-- clearable -->
|
||||
<!-- filterable -->
|
||||
<!-- style="width: 240px" -->
|
||||
<!-- > -->
|
||||
<!-- <el-option label="未审核" value="0" /> -->
|
||||
<!-- <el-option label="已入库" value="1" /> -->
|
||||
<!-- <el-option label="驳回" value="2" /> -->
|
||||
<!-- </el-select> -->
|
||||
<!-- </el-form-item> -->
|
||||
|
||||
<el-form-item label="机具类型" prop="typeId">
|
||||
<treeselect
|
||||
v-model="query.typeId"
|
||||
default-expand-all
|
||||
:options="equipmentTypeList"
|
||||
placeholder="请选择规格型号"
|
||||
clearable
|
||||
filterable
|
||||
:disable-branch-nodes="true"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="model in modelList"
|
||||
:key="model.typeId"
|
||||
:label="model.typeName"
|
||||
:value="model.typeId"
|
||||
noChildrenText="没有数据了"
|
||||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="设备类型" prop="deviceTypeId"> -->
|
||||
<!-- <el-select -->
|
||||
<!-- v-model="query.deviceTypeId" -->
|
||||
<!-- placeholder="请选择设备类型" -->
|
||||
<!-- clearable -->
|
||||
<!-- filterable -->
|
||||
<!-- style="width: 240px" -->
|
||||
<!-- > -->
|
||||
<!-- <el-option -->
|
||||
<!-- v-for="typeItem in typeList" -->
|
||||
<!-- :key="typeItem.typeId" -->
|
||||
<!-- :label="typeItem.typeName" -->
|
||||
<!-- :value="typeItem.typeId" -->
|
||||
<!-- /> -->
|
||||
<!-- </el-select> -->
|
||||
<!-- </el-form-item> -->
|
||||
<!-- <el-form-item label="规格型号" prop="typeId"> -->
|
||||
<!-- <el-select -->
|
||||
<!-- v-model="query.typeId" -->
|
||||
<!-- placeholder="请选择规格型号" -->
|
||||
<!-- clearable -->
|
||||
<!-- filterable -->
|
||||
<!-- style="width: 240px" -->
|
||||
<!-- > -->
|
||||
<!-- <el-option -->
|
||||
<!-- v-for="model in modelList" -->
|
||||
<!-- :key="model.typeId" -->
|
||||
<!-- :label="model.typeName" -->
|
||||
<!-- :value="model.typeId" -->
|
||||
<!-- /> -->
|
||||
<!-- </el-select> -->
|
||||
<!-- </el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -434,10 +449,17 @@
|
|||
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'
|
||||
|
||||
export default {
|
||||
name: 'RepairWarehousing',
|
||||
dicts: ['sys_normal_disable'],
|
||||
components: {
|
||||
Treeselect,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -501,11 +523,13 @@
|
|||
},
|
||||
],
|
||||
},
|
||||
equipmentTypeList: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.getTypeList()
|
||||
this.equipmentType()
|
||||
},
|
||||
methods: {
|
||||
getTypeList() {
|
||||
|
|
@ -742,6 +766,38 @@
|
|||
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);
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue