Merge branch 'material-ui' of http://192.168.0.56:3000/bonus/bonus-ui into material-ui

This commit is contained in:
zzyuan 2024-12-31 17:51:58 +08:00
commit 19b7d58f45
4 changed files with 134 additions and 133 deletions

View File

@ -14,7 +14,7 @@
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
<el-button
<el-button
size="mini" style="margin: 0 10px;height: 32px;" type="primary"
@click.stop="() => addTreeMainType()">
新建分类
@ -80,20 +80,20 @@
<!-- <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-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="16" style="margin-bottom: 20px;">
<el-row :gutter="16" style="margin-bottom: 20px;">
<el-col :span="2">
<el-button type="primary" plain icon="el-icon-upload" size="mini" @click="openUpLoadDialog">上传</el-button>
</el-col>
<el-col :span="2">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">下载</el-button>
</el-col>
</el-col>
<el-col :span="2">
<el-button type="success" plain icon="el-icon-download" :disabled="single" size="mini" @click="handleReName">重命名</el-button>
</el-col>
@ -108,7 +108,7 @@
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item v-for="(item,index) in breadcrumbList" :key="item.id">
<span @click="breadClick(item,index)" style="cursor: pointer;">{{item.docName}}</span>
</el-breadcrumb-item>
</el-breadcrumb-item>
</el-breadcrumb>
</el-row>
<el-table v-loading="loading" :data="tableDataList" @selection-change="handleSelectionChange" row-key="detailsId">
@ -119,7 +119,7 @@
</template>
</el-table-column>
<el-table-column label="文件名称" align="left" prop="docName" show-overflow-tooltip width="300">
<template slot-scope="scope">
<template slot-scope="scope">
<i v-if="scope.row.docType=='文件夹'" class="el-icon-folder-opened"></i>
<span @click="getSubDetails(scope.row)" style="cursor: pointer;margin-left: 20px;">{{ scope.row.docName }}</span>
</template>
@ -189,15 +189,15 @@
<el-form-item label="所属上级">
<el-input style="width: 100%" disabled v-model="addFormParams.label"/>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row :gutter="24">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="名称" prop="archivesName">
<el-input style="width: 100%" v-model="addFormParams.archivesName" />
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-row style="text-align: right">
<el-form-item>
<el-button size="small" type="primary" style="color: #fff;" @click="onSubmit"> </el-button>
@ -214,9 +214,9 @@
<el-form-item label="旧的名称:">
<el-input style="width: 100%" disabled v-model="reNameForm.oldName"/>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row :gutter="24">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="新的名称" prop="newName">
<el-input style="width: 100%" v-model="reNameForm.newName" />
@ -235,10 +235,10 @@
</div>
</template>
<script>
<script>
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {
getArchivesTypeListApi,getAddArchivesTypeApi,updateArchivesTypeApi,delArchivesTypeApi,
getArchivesDetailsLstApi, addArchivesDetailsApi, updateArchivesDetailsApi, delArchivesDetailsApi
} from "@/api/archives/archives";
@ -262,37 +262,37 @@ export default {
//
total: 0,
unitValueOptions: [{id:"0",name:"整数"},{id:"1",name:"小数"}],
//
//
// keeperDataRange: [],
KeeperOptions: [],//
repairerOptions: [],//
repairerOptions: [],//
//
archivesName: undefined,
// -
treeOptions: undefined,
treeTemp: [],
treeTemp: [],
//
tableDataList: [],
//
open: false,
//
title: "",
title: "",
//
form: {
companyId: "",
},
},
levelTemp: undefined,
idTemp: undefined,
parentId: undefined,
parentId: undefined,
defaultProps: {
children: "children",
label: "label",
},
},
//
queryParams: {
pageNum: 1,
pageSize: 10
},
},
//
rules: {
// leasePrice: [
@ -310,10 +310,10 @@ export default {
addShowVisible: false,
addTitle: "", //
addFormParams: {
infoId: "",
level: "",
infoId: "",
level: "",
archivesName: ""
},
},
addFormParamsRules: {
archivesName: [
{
@ -330,7 +330,7 @@ export default {
reNameForm:{
oldName:"",
newName:""
},
},
reNameFormRules: {
newName: [
{
@ -363,7 +363,7 @@ export default {
},
},
created() {
this.getTreeData();
this.getTreeData();
},
methods: {
/** 查询新增页面-上级类型下拉树结构 */
@ -383,12 +383,12 @@ export default {
level:'',
docName:firstNode.label
}
this.breadcrumbList.push(obj)
this.breadcrumbList.push(obj)
this.getList();
}
// else{
// this.queryParams.typeId = this.treeOptions[0].id;
// this.queryParams.level = 0;
// this.queryParams.level = 0;
// this.getList();
// }
}
@ -408,15 +408,15 @@ export default {
}
});
} catch (error) {}
},
},
onMousemove(data) {
this.isMousemoveId = data.id;
},
onMouseleave() {
this.isMousemoveId = null;
},
},
// treeChange(val) {
// console.log(val, "");
// console.log(val, "");
// this.form.companyId = val.companyId;
// },
//
@ -429,20 +429,20 @@ export default {
appendTreeNode(data) {
console.log(data)
this.levelTemp = data.level;
this.idTemp = data.id;
this.parentId = data.parentId;
this.idTemp = data.id;
this.parentId = data.parentId;
Object.assign(this.addFormParams, data);
this.addFormParams.archivesName = "";
this.addTitle = "新增";
this.addShowVisible = true;
this.addShowVisible = true;
},
/* 树节点删除 */
removeTreeNode(data) {
// this.$message.success('--')
console.log(data, "删除时的数据源--");
console.log(data, "删除时的数据源--");
let delParam = {
infoId: data.id,
parentId: data.parentId,
infoId: data.id,
parentId: data.parentId,
}
this.$modal
.confirm("是否确认删除数据项?")
@ -459,7 +459,7 @@ export default {
editTreeNode(data) {
this.levelTemp = data.level;
this.idTemp = data.id;
this.parentId = data.parentId;
this.parentId = data.parentId;
Object.assign(this.addFormParams, data);
this.addTitle = "修改";
this.addFormParams.archivesName = data.label;
@ -470,35 +470,35 @@ export default {
const addParams = {
infoId: this.idTemp,
level: this.levelTemp,
parentId: this.parentId,
parentId: this.parentId,
archivesName:this.addFormParams.archivesName
};
};
const editParams = {
infoId: this.idTemp,
parentId: this.parentId,
infoId: this.idTemp,
parentId: this.parentId,
archivesName:this.addFormParams.archivesName
};
};
const addDetailsParam = {
infoId:this.queryParams.infoId,
detailsId:this.queryParams.detailsId,
level:this.queryParams.level,
docName:this.addFormParams.archivesName
};
};
this.$refs["addFormParamsRef"].validate(async (valid) => {
if (valid) {
if(this.addTitle === "新建类别"){ //tree-
const res = await getAddArchivesTypeApi({archivesName:this.addFormParams.archivesName});
if (res.code === 200) {
this.$message.success("新建成功!");
this.addShowVisible = false;
this.addShowVisible = false;
this.getTreeData();
}
}
}else if (this.addTitle === "新增") {//tree-
const res = await getAddArchivesTypeApi(addParams);
if (res.code === 200) {
this.$message.success("新增成功!");
this.addShowVisible = false;
this.addShowVisible = false;
this.getTreeData();
}
}else if (this.addTitle === "新建文件夹") {//table-
@ -506,13 +506,13 @@ export default {
if (res.code === 200) {
this.$message.success("新建成功!");
this.addShowVisible = false;
this.getList();
this.getList();
}
} else {
const res = await updateArchivesTypeApi(editParams);
if (res.code === 200) {
this.$message.success("修改成功!");
this.addShowVisible = false;
this.addShowVisible = false;
this.getTreeData();
}
}
@ -551,7 +551,7 @@ export default {
docName:row.docName,
}
this.breadcrumbList.push(obj)
this.getList()
this.getList()
}
},
// -
@ -560,7 +560,7 @@ export default {
if (data.level != 1) {
this.queryParams.infoId = data.id;
this.queryParams.detailsId=""
this.queryParams.level=""
this.queryParams.level=""
this.queryParams.pageNum = 1;
this.breadcrumbList=[]
let obj = {
@ -571,8 +571,8 @@ export default {
docName:data.label
}
this.breadcrumbList.push(obj)
this.getList();
}
this.getList();
}
},
// -
breadClick(item,index){
@ -583,21 +583,21 @@ export default {
this.queryParams.level=item.level;
this.queryParams.infoId=item.infoId;
this.queryParams.pageNum = 1;
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.getList()
}else{
this.queryParams.detailsId="";
this.queryParams.level="";
this.queryParams.infoId=item.infoId;
this.queryParams.pageNum = 1;
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.queryParams.pageNum = 1;
this.$set(this, 'breadcrumbList', this.breadcrumbList.slice(0,index+1));
this.getList()
}
},
//
handleAdd(){
this.addTitle = "新建文件夹";
this.addFormParams.archivesName="";
this.addFormParams.archivesName="";
this.addShowVisible = true;
},
/** 搜索按钮操作 */
@ -606,7 +606,7 @@ export default {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
resetQuery() {
this.resetForm("queryForm");
this.queryParams.infoId = undefined;
this.queryParams.pageNum = 1;
@ -623,7 +623,7 @@ export default {
},
//
handleView(row) {
console.log(row)
console.log(row)
},
handleReName(){
this.handleUpdate(this.ids[0])
@ -641,16 +641,17 @@ export default {
let param = {
detailsId:this.rowData.detailsId,
infoId:this.rowData.detailsId,
docName:this.reNameForm.newName
docName:this.reNameForm.newName,
parentId:this.rowData.parentId
}
this.$refs["reNameForm"].validate(async (valid) => {
if (valid) {
if (valid) {
const res = await updateArchivesDetailsApi(param);
if (res.code === 200) {
this.$message.success("修改成功!");
this.reNameShowVisible = false;
this.reNameShowVisible = false;
this.getList()
}
}
}
});
@ -659,7 +660,7 @@ export default {
handleDelete(row) {
let archivesDetailsList=[
{detailsId:row.detailsId}
]
]
this.$modal
.confirm("是否确认删除数据项?")
.then(function () {
@ -755,7 +756,7 @@ export default {
// },
// `_${new Date().getTime()}.xlsx`
// );
},
},
},

View File

@ -195,7 +195,7 @@
<el-button
size="mini"
type="warning"
@click="handleLld(scope.row)"
@click="handleLld(scope.row)"
>领料单</el-button
>
<el-button
@ -236,7 +236,7 @@
<el-input
v-model="queryOutInfo.keyWord"
placeholder="请输入规格型号"
clearable
clearable
maxlength="20"
/>
</el-form-item>
@ -340,7 +340,7 @@
<el-input
v-model="queryOutView.keyWord"
placeholder="请输入规格型号"
clearable
clearable
maxlength="20"
/>
</el-form-item>
@ -352,7 +352,7 @@
@click="handleQueryOutView"
>查询</el-button
>
<el-button
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQueryOutView"
@ -802,12 +802,12 @@
controls-position="right" type="number"
style="width: 100%" clearable placeholder="请输入出库数量"
:min="0" @input="checkNum(scope.row)"
></el-input>
></el-input>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 编码管理查看弹窗 -->
<el-dialog
:title="titleView"
@ -908,7 +908,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
time: null, //
time: null, //
taskStatus: "",
keyWord: "",
},
@ -987,9 +987,9 @@ export default {
const params = {
keyWord: this.queryParams.keyWord,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
pageNum: this.queryParams.pageNum,
};
if(!this.queryParams.taskStatus){
params.statusList=[3, 4, 5]
@ -1049,7 +1049,7 @@ export default {
// this.dialogTotal = response.
// this.loading = false;
});
},
},
//
handleQueryOutInfo() {
this.queryOutInfo.pageNum = 1;
@ -1059,7 +1059,7 @@ export default {
resetQueryOutInfo() {
this.queryOutInfo.keyWord=""
this.getDialogList();
},
},
/** 出库按钮操作 */
handleOut(row) {
@ -1220,9 +1220,9 @@ export default {
//
});
},
//
print() {
print() {
this.$refs.remarksPrintRef.print();
},
@ -1257,20 +1257,20 @@ export default {
},
//
checkNum(row) {
console.log(row)
checkNum(row) {
console.log(row)
let maxNum = row.outNum;
if(row.unitValue==1){
row.inputNum=Number(String(row.inputNum).replace(/[^\d.]/g,''))
}else{
row.inputNum=Number(String(row.inputNum).replace(/[^\d]/g,''))
}
}
if (row.inputNum <= 0) {
row.inputNum = 0;
}
if (row.inputNum > row.outNum) {
row.inputNum = maxNum;
}
}
},
printView() {
@ -1290,7 +1290,7 @@ export default {
// context.clearRect(0, 0, canvas.width, canvas.height);
//let text = "XXX";
//let companyName = "XXX";
//
let width = canvas.width / 2;
let height = canvas.height / 2;
@ -1299,10 +1299,10 @@ export default {
context.beginPath();
context.arc(width, height, 80, 0, Math.PI * 2); //
context.stroke();
//
this.create5star(context, width, height, 20, "#f00", 0);
//
context.font = "18px 宋体";
context.textBaseline = "middle"; //
@ -1310,7 +1310,7 @@ export default {
context.lineWidth = 1;
context.strokeStyle = "#ff2f2f";
context.strokeText(text, width, height + 50);
//
context.translate(width, height); // ,
context.font = "16px 宋体";
@ -1325,7 +1325,7 @@ export default {
} else {
context.rotate(angle);
}
context.save();
context.translate(65, 0); // ,x
context.rotate(Math.PI / 2); // 90,x
@ -1333,8 +1333,8 @@ export default {
context.strokeText(c, 0, 0); //
context.restore();
}
},
},
//
create5star(context, sx, sy, radius, color, rotato) {
context.save();

View File

@ -140,7 +140,7 @@
align="center"
prop="type"
:show-overflow-tooltip="true"
/>
/>
<el-table-column
label="维修单号"
align="center"
@ -156,7 +156,7 @@
<el-table-column
label="提交时间"
align="center"
prop="createTime"
prop="createTime"
:show-overflow-tooltip="true"
>
</el-table-column>
@ -222,7 +222,7 @@
</div>
</template>
<script>
<script>
import {
getScrapApplyListApi,
} from "@/api/repair/scrapManage";
@ -231,11 +231,11 @@ import {
} from "@/api/repair/repair";
export default {
name: "Home",
dicts: ['repair_task_status'],
dicts: ['repair_task_status'],
data() {
return {
//
loading: true,
loading: true,
//
ids: [],
//
@ -245,19 +245,19 @@ export default {
//
showSearch: true,
//
total: 0,
total: 0,
//
tableList: [],
tableList: [],
//
dateRange: [],
statusList: [{value:"0",label:"进行中"},{value:"1",label:"已审核"},{value:"2",label:"驳回"},],
dateRange: [],
statusList: [{value:"0",label:"进行中"},{value:"1",label:"已审核"},{value:"2",label:"驳回"},],
//
queryParams: {
pageNum: 1,
pageSize: 10,
time: null,
keyWord: "",
status: undefined,
status: undefined,
},
passTemp: [],
failTemp: [],
@ -298,7 +298,7 @@ export default {
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
pageNum: this.queryParams.pageNum,
};
getScrapApplyListApi(params).then((response) => {
this.tableList = response.rows;
@ -360,7 +360,7 @@ export default {
handleUpdate(row) {
this.$emit("addTools", row.taskId, row.id,row);
},
// ---------------------------------------
/** 删除按钮操作 */
handleDeletePurchase(row) {
@ -378,7 +378,7 @@ export default {
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
},
/** 导出按钮操作 */
handleExport() {
this.download(
@ -390,7 +390,7 @@ export default {
},
`修试审核_${new Date().getTime()}.xlsx`
);
},
},
},
};
</script>

View File

@ -1,4 +1,4 @@
<template>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="日期">
@ -12,7 +12,7 @@
start-placeholder="开始日期"
@change="onTimeChange"
></el-date-picker>
</el-form-item>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
@ -28,7 +28,7 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-form-item>
</el-form>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini">导出数据</el-button>
@ -49,8 +49,8 @@
</el-table-column>
<el-table-column label="标准箱名称" align="center" prop="boxName" show-overflow-tooltip/>
<el-table-column label="标准箱编码" align="center" prop="boxCode" show-overflow-tooltip/>
<el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip/>
<el-table-column label="创建日期" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column label="标准箱机具数" align="center" prop="devNum" show-overflow-tooltip/>
<el-table-column label="创建日期" align="center" prop="createTime" show-overflow-tooltip/>
<el-table-column label="操作" align="center" width="400">
<template slot-scope="{ row }">
<el-button size="mini" @click="handleView(row)">
@ -67,14 +67,14 @@
</el-button>
</template>
</el-table-column>
</el-table>
</el-table>
<pagination :total="total"
v-show="total > 0"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 标准箱设备明细 -->
<el-dialog title="标准箱设备明细" :visible.sync="open" width="1000px" append-to-body>
<el-form :model="queryDialogForm" ref="queryDialogForm" size="small" :inline="true" label-width="80px">
@ -99,9 +99,9 @@
<el-table-column label="物资类型" align="center" prop="typeName" show-overflow-tooltip/>
<el-table-column label="规格型号" align="center" prop="typeModelName" show-overflow-tooltip/>
<el-table-column label="设备编码" align="center" prop="maCode" show-overflow-tooltip/>
<el-table-column label="录入人" align="center" prop="createBy" show-overflow-tooltip/>
<el-table-column label="录入人" align="center" prop="createBy" show-overflow-tooltip/>
<!-- <el-table-column label="操作" align="center" width="120">
<template slot-scope="{ row }">
<template slot-scope="{ row }">
<el-button size="mini" type="danger">
删除
</el-button>
@ -113,14 +113,14 @@
:page.sync="queryDialogForm.pageNum"
:limit.sync="queryDialogForm.pageSize"
@pagination="getDialogList"
/>
</el-dialog>
/>
</el-dialog>
<!-- 二维码下载对话框 -->
<el-dialog title="标准箱二维码" :visible.sync="uploadOpen" width="450px" append-to-body :close-on-click-modal="false">
<div style="text-align: center" ref="codeBox">
<div class="uploadImg">
<div id="qrcode" class="qrcode" ref="codeItem"></div>
<div id="qrcode" class="qrcode" ref="codeItem"></div>
</div>
<div class="boxCode">编号{{ rowObj.boxCode }}</div>
</div>
@ -143,7 +143,7 @@ export default {
return {
total: 0, //
loading: false, //
showSearch: true, //
showSearch: true, //
tableList: [], //
queryTime: [], //
selectList: [], //
@ -164,7 +164,7 @@ export default {
pageSize: 10,
},
totalDialog:0,
tableListDialog:[],
tableListDialog:[],
uploadOpen: false,
rowObj:{},
boxCode:""
@ -187,7 +187,7 @@ export default {
},
//
async getList() {
this.loading = true
this.loading = true
const res = await getQrCodeBoxListApi(this.queryParams)
this.tableList = res.data.rows
this.total = res.data.total
@ -207,23 +207,23 @@ export default {
this.queryParams.pageSize = 10
this.queryParams.startTime = ''
this.getList()
},
},
handleAdd(){
console.log('新增')
console.log('新增')
addQrCodeBoxApi({}).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
}
this.getList()
});
},
},
//
handleView(row) {
handleView(row) {
this.rowObj = row
this.uploadOpen = true
this.uploadOpen = true
this.boxCode = row.boxCode
let str = row.boxCode
this.$nextTick(() => {
this.$nextTick(() => {
this.$refs.codeItem.innerHTML = ''
var qrcode = new QRCode(this.$refs.codeItem, {
text: str, //
@ -232,7 +232,7 @@ export default {
colorDark: '#000000',
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H,
})
})
}, 500)
},
//
@ -256,11 +256,11 @@ export default {
this.resetQueryDialog()
},
//
async getDialogList() {
async getDialogList() {
const res = await getBoxDetailListApi(this.queryDialogForm)
this.tableListDialog = res.rows
// this.tableListDialog = [{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""},{maType:"",typeName:"10t",maCode:"bg121334343",updateBy:""}]
this.totalDialog = res.total
this.totalDialog = res.total
this.totalDialog = 3
},
//
@ -269,9 +269,9 @@ export default {
this.getDialogList()
},
//
resetQueryDialog() {
resetQueryDialog() {
this.resetForm('queryDialogForm')
this.queryDialogForm.pageNum = 1
this.queryDialogForm.pageNum = 1
this.getDialogList()
},
@ -281,7 +281,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
}).then(() => {
let param = {
boxId:row.boxId
}
@ -290,7 +290,7 @@ export default {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
},
//
handleExport() {
console.log('数据导出')
@ -327,4 +327,4 @@ export default {
width: 60px !important;
margin-bottom: 10px;
}
</style>
</style>