Compare commits

..

No commits in common. "266493081c6a3b58d63e97b3f30a8342f247cf97" and "79e959f3a5c2d0e934cde627724b51eb2a51fc12" have entirely different histories.

2 changed files with 7 additions and 44 deletions

View File

@ -264,10 +264,8 @@ export default {
/** 查询分类列表 */
getList() {
this.loading = true;
listDept(this.queryParams).then(response => {
console.log("response======",response.data)
listDept2({status: '0',pageNum:1,pageSize:999 }).then(response => {
this.deptList = this.handleTree(response.data, "classifyId");
console.log("deptList======",this.deptList)
this.loading = false;
});
},

View File

@ -69,28 +69,17 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
row-key="id"
:default-expand-all="isExpandAll"
:data="hardwareVersionList"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName">
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<el-table v-loading="loading" :data="hardwareVersionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键" align="center" prop="id" />-->
<el-table-column label="版本号" align="center" prop="version" />
<el-table-column label="生产时间" align="center" prop="productionTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productionTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="总量" width="80" align="center" prop="quantity" :formatter="formatNum" class-name="bold-text"/><!-- 手动 -->
<el-table-column label="已录入" width="80" align="center" prop="entered" :formatter="formatNum" class-name="bold-text"/>
<el-table-column label="已绑定" width="80" align="center" prop="bound" :formatter="formatNum" class-name="bold-text"/>
<el-table-column label="未绑定" width="80" align="center" prop="unBound" :formatter="formatNum" class-name="bold-text"/>
<el-table-column label="未录入" width="80" align="center" prop="notEnteredNum" :formatter="formatNum" class-name="bold-text"/><!-- 手动 -->
<el-table-column label="丢损" width="80" align="center" prop="lost" :formatter="formatNum" class-name="bold-text"/>
<el-table-column label="版本说明" width="280" align="center" prop="instructions" />
<el-table-column label="数量" align="center" prop="quantity" />
<el-table-column label="版本说明" align="center" prop="instructions" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -133,12 +122,9 @@
placeholder="请选择生产时间">
</el-date-picker>
</el-form-item>
<el-form-item v-if="form.parentId == 0" label="数量" prop="quantity">
<el-form-item label="数量" prop="quantity">
<el-input v-model="form.quantity" placeholder="请输入数量" />
</el-form-item>
<el-form-item v-if="form.parentId == 0" label="未录入" prop="notEnteredNum">
<el-input v-model="form.notEnteredNum" placeholder="请输入未录入数" />
</el-form-item>
<el-form-item label="版本说明" prop="instructions">
<el-input v-model="form.instructions" type="textarea" placeholder="请输入内容" />
</el-form-item>
@ -172,8 +158,6 @@ export default {
total: 0,
//
hardwareVersionList: [],
//
isExpandAll: true,
//
title: "",
//
@ -197,21 +181,11 @@ export default {
this.getList();
},
methods: {
tableRowClassName({row, rowIndex}) {
if (row.parentId === 0) {
return 'success-row';
}
return '';
},
formatNum(row, column, cellValue) {
return cellValue === 0 ? '' : cellValue;
},
/** 查询硬件版本列表 */
getList() {
this.loading = true;
listHardwareVersion(this.queryParams).then(response => {
this.hardwareVersionList = this.handleTree(response.rows, "id");
console.log("hardwareVersionList",this.hardwareVersionList)
this.hardwareVersionList = response.rows;
this.total = response.total;
this.loading = false;
});
@ -228,7 +202,6 @@ export default {
version: null,
productionTime: null,
quantity: null,
notEnteredNum: null,
instructions: null,
createTime: null
};
@ -305,11 +278,3 @@ export default {
}
};
</script>
<style lang="scss">
.el-table .success-row {
background: oldlace !important;
}
.bold-text .cell {
font-weight: bold;
}
</style>