Merge branch 'material-ui' of http://192.168.0.56:3000/bonus/bonus-ui into material-ui
This commit is contained in:
commit
5af69ea3bc
|
|
@ -0,0 +1,756 @@
|
|||
<template>
|
||||
<!-- 类型管理 -->
|
||||
<div class="app-container" id="toolsType">
|
||||
<el-row :gutter="20">
|
||||
<!--树数据-->
|
||||
<el-col :span="5" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="typeName"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container" style>
|
||||
<el-tree
|
||||
style="height: 700px; overflow: scroll"
|
||||
:data="treeOptions"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
:default-expand-all="false"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
<span
|
||||
class="custom-tree-node"
|
||||
slot-scope="{ node, data }"
|
||||
@mousemove="onMousemove(data)"
|
||||
@mouseleave="onMouseleave()"
|
||||
>
|
||||
<span v-if="isMousemoveId === data.id && node.label.length > 5">{{
|
||||
node.label.slice(0, 3) + "..."
|
||||
}}</span>
|
||||
<span v-else>{{ node.label }}</span>
|
||||
|
||||
<span class="btn-items" v-if="isMousemoveId === data.id">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-plus"
|
||||
@click.stop="() => appendTreeNode(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-edit-outline"
|
||||
style="color: #67c23a"
|
||||
v-if="data.id !== 0"
|
||||
@click.stop="() => editTreeNode(data)"
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
style="color: #f56c6c"
|
||||
v-if="data.id !== 0"
|
||||
@click.stop="() => removeTreeNode(data)"
|
||||
>
|
||||
</el-button>
|
||||
</span>
|
||||
</span>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--表格数据-->
|
||||
<el-col :span="19" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyword">
|
||||
<el-input
|
||||
v-model="queryParams.keyword"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataList"
|
||||
border
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{(queryParams.pageNum - 1) * 10 + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="类型编码"
|
||||
align="center"
|
||||
key="typeCode"
|
||||
prop="typeCode"
|
||||
show-overflow-tooltip
|
||||
v-if="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="仓库信息"
|
||||
align="center"
|
||||
key="houseName"
|
||||
prop="houseName"
|
||||
show-overflow-tooltip
|
||||
v-if="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="施工类型"
|
||||
align="center"
|
||||
key="itemType"
|
||||
prop="itemType"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="物资类型"
|
||||
align="center"
|
||||
key="materialType"
|
||||
prop="materialType"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="物资名称"
|
||||
align="center"
|
||||
key="materialName"
|
||||
prop="materialName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
key="typeName"
|
||||
prop="typeName"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['ma:type:query']"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['ma:type:edit']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['ma:type:remove']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" height="650px" :src="dialogImageUrl" alt />
|
||||
</el-dialog>
|
||||
|
||||
<!-- 新增弹框 -->
|
||||
<el-dialog
|
||||
:title="addTitle"
|
||||
:visible.sync="addShowVisible"
|
||||
v-if="addShowVisible"
|
||||
width="50%"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form
|
||||
label-width="80px"
|
||||
:model="addFormParams"
|
||||
:rules="addFormParamsRules"
|
||||
ref="addFormParamsRef"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12" v-if="addTitle === '新增'">
|
||||
<el-form-item label="所属上级">
|
||||
<el-input
|
||||
style="width: 100%"
|
||||
disabled
|
||||
v-model="addFormParams.label"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="typeName">
|
||||
<el-input style="width: 100%" v-model="addFormParams.typeName" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
<el-form-item>
|
||||
<el-button size="small" type="primary" style="color: #fff;" @click="onSubmit">确 定</el-button>
|
||||
<el-button size="small" @click="onCancel">取 消</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {
|
||||
getMaTypeList,
|
||||
getListByMaType,
|
||||
getMaType,
|
||||
queryKeeperDataApi,
|
||||
delMaType,
|
||||
addMaType,
|
||||
updateMaType,
|
||||
} from "@/api/ma/base";
|
||||
import { imgUpLoad } from "@/api/system/upload";
|
||||
|
||||
export default {
|
||||
name: "ToolsType",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
unitValueOptions: [{id:"0",name:"整数"},{id:"1",name:"小数"}],
|
||||
// 库管员用户数据
|
||||
// keeperDataRange: [],
|
||||
KeeperOptions: [],//选择库管员数据
|
||||
repairerOptions: [],//维修员用户数据
|
||||
// 类型名称
|
||||
typeName: undefined,
|
||||
// 左侧树-树选项
|
||||
treeOptions: undefined,
|
||||
treeTemp: [],
|
||||
//列表数据
|
||||
tableDataList: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
companyId: "",
|
||||
},
|
||||
levelTemp: undefined,
|
||||
idTemp: undefined,
|
||||
parentId: undefined,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
typeName: undefined,
|
||||
level: 0,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
// leasePrice: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "规格型号不能为空",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
},
|
||||
companyId: undefined,
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
/* 新增弹框等数据源定义 */
|
||||
addShowVisible: false,
|
||||
addTitle: "", // 新增弹框标题
|
||||
addFormParams: {
|
||||
label: "",
|
||||
typeName: "",
|
||||
companyId: 101,
|
||||
},
|
||||
addFormParamsRules: {
|
||||
typeName: [
|
||||
{
|
||||
required: true,
|
||||
message: "名称不能为空",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
isMousemoveId: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
typeName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getTreeData();
|
||||
},
|
||||
methods: {
|
||||
/** 查询新增页面-上级类型下拉树结构 */
|
||||
getTreeData() {
|
||||
getMaTypeList().then((response) => {
|
||||
this.treeOptions = response.data;
|
||||
console.log(this.treeOptions)
|
||||
if (this.treeOptions.length > 0 ){
|
||||
if(this.treeOptions[0].children&&this.treeOptions[0].children.length > 0) {
|
||||
const firstNode = this.treeOptions[0].children[0];
|
||||
this.queryParams.typeId = firstNode.id;
|
||||
this.queryParams.level = 1;
|
||||
this.queryParams.houseId = firstNode.houseId;
|
||||
this.getList();
|
||||
}else{
|
||||
this.queryParams.typeId = this.treeOptions[0].id;
|
||||
this.queryParams.level = 0;
|
||||
this.queryParams.houseId = this.treeOptions[0].id;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getListByMaType(this.queryParams).then((response) => {
|
||||
this.tableDataList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 筛选节点 - 左侧树
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
// 节点单击事件 - 左侧树
|
||||
async handleNodeClick(data, node) {
|
||||
if (data.level == 0) {
|
||||
this.queryParams.typeId = data.id;
|
||||
this.queryParams.level = data.level;
|
||||
this.queryParams.houseId = data.id;
|
||||
} else {
|
||||
this.queryParams.typeId = data.id;
|
||||
this.queryParams.level = data.level;
|
||||
this.queryParams.houseId = data.houseId;
|
||||
}
|
||||
this.handleQuery();
|
||||
if (node.level == 1) {
|
||||
this.form.keeperData = data.id;
|
||||
} else if (node.level == 2) {
|
||||
this.form.keeperDataPro = data.id;
|
||||
} else if (node.level == 3) {
|
||||
this.form.keeperDataPro = data.id;
|
||||
this.form.keeperDataMat = data.id;
|
||||
} else if (node.level == 4) {
|
||||
this.form.keeperDataPro = data.id;
|
||||
this.form.keeperDataMat = data.id;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.typeId = undefined;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.level = 0;
|
||||
this.$refs.tree.setCurrentKey(null);
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.typeId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = { parentId: ""};
|
||||
this.resetForm("form");
|
||||
},
|
||||
//查看
|
||||
handleView(row) {
|
||||
console.log(row)
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
// this.open = true;
|
||||
// this.title = "重命名文件";
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// const typeId = row.typeId;
|
||||
// this.$modal
|
||||
// .confirm("是否确认删除数据项?")
|
||||
// .then(function () {
|
||||
// return delMaType(typeId);
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// this.getList();
|
||||
// this.getTreeData();
|
||||
// })
|
||||
// .catch(() => {});
|
||||
},
|
||||
/** 导出按钮作 */
|
||||
handleExport() {
|
||||
let queryTemp = this.queryParams;
|
||||
// queryTemp.level = 0;
|
||||
this.download(
|
||||
"/material/ma_type/export",
|
||||
{
|
||||
...queryTemp,
|
||||
},
|
||||
`物资类型信息_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
// /* 树节点操作 */
|
||||
// treeChange(val) {
|
||||
// console.log(val, "树节点");
|
||||
// this.form.companyId = val.companyId;
|
||||
// },
|
||||
|
||||
/* 树节点增加 */
|
||||
appendTreeNode(data) {
|
||||
this.levelTemp = data.level;
|
||||
this.idTemp = data.id;
|
||||
if (data.level === 3) {
|
||||
this.reset();
|
||||
Object.assign(this.form, data);
|
||||
this.form.parentId = data.id;
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
} else {
|
||||
Object.assign(this.addFormParams, data);
|
||||
this.addFormParams.typeName = "";
|
||||
this.addTitle = "新增";
|
||||
this.addShowVisible = true;
|
||||
}
|
||||
},
|
||||
/* 树节点删除 */
|
||||
removeTreeNode(data) {
|
||||
this.$message.success('删除--')
|
||||
console.log(data, "删除时的数据源--");
|
||||
// const typeId = data.id;
|
||||
// this.$modal
|
||||
// .confirm("是否确认删除数据项?")
|
||||
// .then(function () {
|
||||
// return delMaType(typeId);
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// this.getTreeData();
|
||||
// })
|
||||
// .catch(() => {});
|
||||
},
|
||||
/* 树节点修改 */
|
||||
editTreeNode(data) {
|
||||
this.levelTemp = data.level;
|
||||
this.idTemp = data.id;
|
||||
this.parentId = data.parentId;
|
||||
console.log("data", data);
|
||||
Object.assign(this.addFormParams, data);
|
||||
this.addTitle = "修改";
|
||||
this.addFormParams.typeName = data.label;
|
||||
this.addShowVisible = true;
|
||||
},
|
||||
/* 确定 */
|
||||
onSubmit() {
|
||||
const { id, typeName } = this.addFormParams;
|
||||
console.log("level", this.levelTemp);
|
||||
console.log("idTemp", this.idTemp);
|
||||
const addParams = {
|
||||
parentId: this.levelTemp == 0 ? 0 : this.idTemp,
|
||||
typeName,
|
||||
level: this.levelTemp,
|
||||
houseId: this.levelTemp == 0 ? id : null,
|
||||
};
|
||||
|
||||
const editParams = {
|
||||
houseId: id,
|
||||
typeName,
|
||||
level: this.levelTemp,
|
||||
parentId: this.parentId,
|
||||
typeId: id,
|
||||
};
|
||||
|
||||
this.$refs["addFormParamsRef"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
if (this.addTitle === "新增") {
|
||||
const res = await addMaType(addParams);
|
||||
if (res.code === 200) {
|
||||
this.$message.success("新增成功!");
|
||||
this.addShowVisible = false;
|
||||
this.getList();
|
||||
this.getTreeData();
|
||||
}
|
||||
} else {
|
||||
const res = await updateMaType(editParams);
|
||||
if (res.code === 200) {
|
||||
this.$message.success("修改成功!");
|
||||
this.addShowVisible = false;
|
||||
this.getList();
|
||||
this.getTreeData();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/* 取消 */
|
||||
onCancel() {
|
||||
this.addShowVisible = false;
|
||||
},
|
||||
// 获取父级名称
|
||||
getParentName(list, id) {
|
||||
try {
|
||||
list.forEach((e) => {
|
||||
if (e.id == id) {
|
||||
this.form.label = e.label;
|
||||
throw new Error();
|
||||
} else {
|
||||
if (e.children && e.children.length > 0) {
|
||||
this.getParentName(e.children, id);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (error) {}
|
||||
},
|
||||
onMousemove(data) {
|
||||
this.isMousemoveId = data.id;
|
||||
},
|
||||
onMouseleave() {
|
||||
this.isMousemoveId = null;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::v-deep .btn-items .el-button + .el-button {
|
||||
margin-left: 6px;
|
||||
}
|
||||
.btn-items {
|
||||
margin-left: 4px;
|
||||
.el-button--text {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-tree .el-tree-node__expand-icon.expanded {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
::v-deep .el-tree .el-icon-caret-right:before {
|
||||
content: "\e783";
|
||||
font-size: 16px;
|
||||
}
|
||||
::v-deep
|
||||
.el-tree
|
||||
.el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
|
||||
content: "\e781";
|
||||
font-size: 16px;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
::v-deep .el-tree-node__content > .el-tree-node__expand-icon {
|
||||
color: #1890ff !important;
|
||||
}
|
||||
::v-deep .el-tree-node__expand-icon.is-leaf {
|
||||
color: transparent !important;
|
||||
}
|
||||
|
||||
::v-deep
|
||||
.el-tree--highlight-current
|
||||
.el-tree-node.is-current
|
||||
> .el-tree-node__content {
|
||||
background-color: #8decf1;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog {
|
||||
// 表单标签文字样式
|
||||
.el-form-item__label {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
// 输入框文字样式
|
||||
.el-input__inner {
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
|
||||
&::placeholder {
|
||||
font-size: 13px;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
}
|
||||
|
||||
// 单位文字样式
|
||||
span {
|
||||
font-size: 14px;
|
||||
// color: #606266;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
// 下拉选择框文字样式
|
||||
.el-select {
|
||||
.el-input__inner {
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
}
|
||||
}
|
||||
|
||||
// 只读输入框样式
|
||||
.el-input.is-disabled .el-input__inner {
|
||||
background-color: #f5f7fa;
|
||||
border-color: #e4e7ed;
|
||||
color: #606266;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
// 表格内文字样式
|
||||
::v-deep .el-table {
|
||||
font-size: 14px;
|
||||
|
||||
th {
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
td {
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
|
||||
// 按钮文字样式
|
||||
::v-deep .el-button {
|
||||
font-size: 14px;
|
||||
|
||||
&--text {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
// 树节点文字样式
|
||||
::v-deep .el-tree-node__label {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
// 搜索框文字样式
|
||||
::v-deep .el-input--small {
|
||||
.el-input__inner {
|
||||
font-size: 13px;
|
||||
|
||||
&::placeholder {
|
||||
font-size: 13px;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -260,7 +260,7 @@
|
|||
>
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;align-items: center;justify-content: center;">
|
||||
<el-upload ref="upload" :limit="1" :headers="upload.headers"
|
||||
<el-upload ref="upload" :limit="3" :headers="upload.headers"
|
||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess" :auto-upload="true">
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||
|
|
@ -331,7 +331,7 @@
|
|||
<el-table-column label="附件" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;align-items: center;justify-content: center;">
|
||||
<el-upload ref="upload" :limit="1" :headers="upload.headers"
|
||||
<el-upload ref="upload" :limit="3" :headers="upload.headers"
|
||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess2" :auto-upload="true">
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
v-model="maForm.taxRate"
|
||||
placeholder="请输入税率"
|
||||
clearable
|
||||
maxlength="50"
|
||||
maxlength="10"
|
||||
style="width: 240px"
|
||||
@input="taxRateChange"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@
|
|||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
:limit="3"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url"
|
||||
:show-file-list="false"
|
||||
|
|
@ -629,15 +629,25 @@
|
|||
<el-dialog
|
||||
title="数量维修"
|
||||
:visible.sync="openNum"
|
||||
width="1700px"
|
||||
width="1250px"
|
||||
append-to-body
|
||||
>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-button type="primary" size="mini">合格</el-button> -->
|
||||
<div style="margin-left: 32px">
|
||||
{{ typeNameTemp + "" + typeTemp }}
|
||||
<el-row :gutter="24" style="padding-bottom: 20px;border-bottom: 2px solid #dcdfe6;">
|
||||
<el-col :span="4">
|
||||
<div style="font-weight: 600;">
|
||||
物资名称: {{ typeNameTemp }}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="font-weight: 600;">
|
||||
物资名称: {{ typeTemp }}
|
||||
</div>
|
||||
<div style="margin-left: 32px">待维修数量:{{ disrepairNumTemp }}</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="font-weight: 600;">
|
||||
待维修数量: {{ disrepairNumTemp }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="dialog-content">
|
||||
<div class="left">
|
||||
|
|
@ -646,18 +656,18 @@
|
|||
ref="formLeft"
|
||||
:model="formLeft"
|
||||
:rules="rulesLeft"
|
||||
label-width="120px"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="内部维修数量" prop="repairNum">
|
||||
<el-form-item label="内部维修数量" prop="repairNum" label-width="120px">
|
||||
<el-input
|
||||
v-model.number="formLeft.repairNum"
|
||||
placeholder="请输入内部维修数量"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
min="0"
|
||||
style="width: 265px"
|
||||
style="width: 220px"
|
||||
@input="waitRepairCount"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -679,50 +689,43 @@
|
|||
:show-count="true"
|
||||
:expand-on-click-node="false"
|
||||
placeholder="请选择配件型号"
|
||||
style="width: 265px"
|
||||
style="width: 200px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="9">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="配件数量" prop="partNum">
|
||||
<el-input
|
||||
v-model.number="item.partNum"
|
||||
placeholder="请输入"
|
||||
maxlength="20" type="number" :min="0"
|
||||
style="width: 90px"
|
||||
style="width: 200px;"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item
|
||||
label="是否收费"
|
||||
prop="isCharge"
|
||||
label-width="90px"
|
||||
prop="isCharge"
|
||||
>
|
||||
<el-select
|
||||
v-model="item.isCharge"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 90px"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="2"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<el-col :span="6" style="margin-top: 10px;display: flex;justify-content: center;align-items: center;">
|
||||
<i
|
||||
class="el-icon-plus"
|
||||
style="font-size: 20px; color: blue"
|
||||
|
|
@ -747,18 +750,18 @@
|
|||
ref="formMiddle"
|
||||
:model="formMiddle"
|
||||
:rules="rulesMiddle"
|
||||
label-width="120px"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form-item label="返厂维修数量" prop="repairNum">
|
||||
<el-form-item label="返厂维修数量" prop="repairNum" label-width="120px">
|
||||
<el-input
|
||||
v-model.number="formMiddle.repairNum"
|
||||
placeholder="请输入返厂维修数量"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
min="0"
|
||||
style="width: 265px"
|
||||
min="0"
|
||||
style="width: 220px"
|
||||
@input="waitRepairCount"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -773,7 +776,7 @@
|
|||
placeholder="物资厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 265px"
|
||||
style="width: 260px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
|
|
@ -791,8 +794,8 @@
|
|||
class="dynamic-item"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="配件名称" prop="partName">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="配件名称" prop="partName" label-width="80px">
|
||||
<el-input
|
||||
v-model="item.partName"
|
||||
placeholder="请输入"
|
||||
|
|
@ -802,18 +805,18 @@
|
|||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-col :span="10">
|
||||
<el-form-item
|
||||
label="是否收费"
|
||||
prop="isCharge"
|
||||
label-width="90px"
|
||||
label-width="70px"
|
||||
>
|
||||
<el-select
|
||||
v-model="item.isCharge"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
style="width: 90px"
|
||||
style="width: 80px"
|
||||
>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
|
|
@ -823,7 +826,7 @@
|
|||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="9">
|
||||
<el-form-item label="配件数量" prop="partNum">
|
||||
<el-form-item label="配件数量" prop="partNum" label-width="80px" >
|
||||
<el-input
|
||||
v-model.number="item.partNum"
|
||||
placeholder="请输入配件数量"
|
||||
|
|
@ -835,18 +838,18 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="金额" prop="partPrice" label-width="90px">
|
||||
<el-form-item label="金额" prop="partPrice" label-width="70px">
|
||||
<el-input
|
||||
v-model.number="item.partPrice"
|
||||
placeholder="请输入"
|
||||
maxlength="20" type="number" :min="0"
|
||||
style="width: 90px"
|
||||
style="width: 95px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col
|
||||
:span="2"
|
||||
:span="6"
|
||||
style="
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
|
|
@ -880,16 +883,16 @@
|
|||
size="small"
|
||||
:rules="rulesRight"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-col :span="20">
|
||||
<el-form-item label="待报废数量" prop="scrapNum">
|
||||
<el-form-item label="待报废数量" prop="scrapNum" label-width="100px">
|
||||
<el-input
|
||||
v-model.number="formRight.scrapNum"
|
||||
placeholder="请输入待报废数量"
|
||||
maxlength="20"
|
||||
type="number"
|
||||
style="width: 250px"
|
||||
style="width: 220px"
|
||||
min="0"
|
||||
@input="waitRepairCount"
|
||||
/>
|
||||
|
|
@ -901,7 +904,7 @@
|
|||
placeholder="损坏原因"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 250px"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in damageReasonList"
|
||||
|
|
@ -918,7 +921,7 @@
|
|||
clearable
|
||||
maxlength="150"
|
||||
type="textarea"
|
||||
style="width: 300px"
|
||||
style="width: 240px"
|
||||
rows="4"
|
||||
>
|
||||
</el-input>
|
||||
|
|
@ -2104,6 +2107,8 @@ export default {
|
|||
}
|
||||
}
|
||||
.dialog-content {
|
||||
height: 600px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
|
|
@ -2113,11 +2118,11 @@ export default {
|
|||
.middle,
|
||||
.right {
|
||||
flex: 1;
|
||||
padding: 10px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.divider {
|
||||
width: 1px;
|
||||
width: 2px;
|
||||
background-color: #dcdfe6;
|
||||
height: 100%;
|
||||
margin: 0 10px;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
placeholder="请输入物资名称"
|
||||
clearable :maxlength="20"
|
||||
style="width: 220px"
|
||||
/>
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="typeModelName">
|
||||
<el-input
|
||||
|
|
@ -87,8 +87,9 @@
|
|||
|
||||
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="计量单位" align="center" prop="unit" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="入库人员" align="center" prop="inputUser" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="入库时间" align="center" prop="inputTime" :show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="入库单号" align="center" prop="inputCode" :show-overflow-tooltip="true">
|
||||
|
|
@ -157,10 +158,10 @@ export default {
|
|||
async getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
inputType: this.queryParams.inputType,
|
||||
typeName: this.queryParams.typeName,
|
||||
typeModelName: this.queryParams.typeModelName,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
pageSize: this.queryParams.pageSize,
|
||||
|
|
|
|||
|
|
@ -185,7 +185,8 @@ export default {
|
|||
time: null,
|
||||
keyWord: null,
|
||||
typeName: null, //物资名称
|
||||
typeModelName: null //
|
||||
typeModelName: null, //
|
||||
outStyle:null
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
@ -240,6 +241,8 @@ export default {
|
|||
proId: this.queryParams.proId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
outStyle: this.queryParams.outStyle,
|
||||
typeName: this.queryParams.typeName,
|
||||
typeModelName: this.queryParams.typeModelName,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
pageSize: this.queryParams.pageSize,
|
||||
|
|
@ -271,6 +274,8 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.unitId=[]
|
||||
this.projectId=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -246,6 +246,8 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.unitId=[]
|
||||
this.projectId=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
|
|||
|
|
@ -297,6 +297,8 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time=[]
|
||||
this.unitId=[]
|
||||
this.projectId=[]
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue