This commit is contained in:
BianLzhaoMin 2024-04-10 10:46:59 +08:00
commit f832eb9f35
8 changed files with 515 additions and 120 deletions

View File

@ -66,7 +66,6 @@ export function ApiGetMaterialList(query) {
// 删除
export function backApplyDelApi(query) {
console.log('query====', query);
return request({
url: '/material/backApply/del',
method: 'get',
@ -149,7 +148,7 @@ export function getBackReceiveList(query) {
params: query
})
}
// 退料审核新增
// 退料接收详情列表
export function receiveView(data) {
return request({
url: '/base/backReceive/receiveViewWeb',
@ -158,3 +157,57 @@ export function receiveView(data) {
})
}
// 退料接收弹窗详情
export function getBackMachine(query) {
return request({
url: '/base/backReceive/getBackMachine',
method: 'get',
params: query
})
}
// 退料接收 查看记录
export function backReceiveRecordWeb(data) {
return request({
url: 'base/backReceive/backReceiveRecordWeb ',
method: 'post',
data: data
})
}
// 退料接收 数量接收
export function setNumBack(data) {
return request({
url: 'base/backReceive/setNumBack',
method: 'post',
data: data
})
}
// 退料接收 编码接收
export function setCodeBack(data) {
return request({
url: 'base/backReceive/setCodeBack',
method: 'post',
data: data
})
}
// 退料接收 完成前判断是否存在记录
export function getRecord(query) {
return request({
url: 'base/backReceive/getRecord',
method: 'get',
params: query
})
}
// 退料接收 完成接收
export function endBack(data) {
return request({
url: 'base/backReceive/endBack',
method: 'post',
data: data
})
}

View File

@ -74,19 +74,19 @@ export const constantRoutes = [
}
]
},
// {
// path: '/dashboard',
// component: Layout,
// redirect: 'dashboard',
// children: [
// {
// path: 'dashboard',
// component: () => import('@/views/dashboard'),
// name: 'Dashboard',
// meta: { title: '数据大屏', icon: 'dashboard', breadcrumb: false}
// }
// ]
// },
{
path: '/dashboard',
component: Layout,
redirect: 'dashboard',
children: [
{
path: 'dashboard',
component: () => import('@/views/dashboard'),
name: 'Dashboard',
meta: { title: '数据大屏', icon: 'dashboard', breadcrumb: false}
}
]
},
{
path: '/user',
component: Layout,

View File

@ -150,7 +150,8 @@ export default {
init() {
let params = {
taskId: this.rowObj.taskId,
agreementId: this.rowObj.agreementId
agreementId: this.rowObj.agreementId,
badId:this.rowObj.badId,
}
materialReturnNoteByExamine(params).then(res => {
this.tableData = res.data

View File

@ -20,20 +20,16 @@
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input maxlength="50" v-model="queryParams.agreementCode" placeholder="请选择单位工程" disabled clearable style="width: 240px" />
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'typeName',
value: 'typeId',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
>
</el-cascader>
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="退料申请时间" prop="time">
<el-date-picker
@ -56,9 +52,7 @@
<el-option v-for="item in taskStatusList" :key="item.id" :label="item.name" :value="item.id" > </el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input maxlength="50" v-model="queryParams.agreementCode" placeholder="请选择协议号" clearable style="width: 240px" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button >
@ -336,6 +330,7 @@
</template>
<script>
import { listPartTypeApi } from "@/api/repairTest/repair";
import { listType, getType, delType, addType, updateType, refreshCache ,getUseTypeTree} from "@/api/system/dict/type";
import { ApiGetBackApplyList, getViewByApply, backApplyDelApi, submitBackApplyApi } from "@/api/claimAndRefund/return.js"
import {
@ -343,12 +338,13 @@ import {
} from "@/api/login";
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
import dialogForm from "./dialogForm.vue";
import Tree from './tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
name: "",
dicts: ['sys_normal_disable'],
components: { dialogForm, },
components: { dialogForm,Tree },
data() {
return {
fullscreenLoading: false,
@ -375,6 +371,7 @@ export default {
open: false,
//
dateRange: [],
deptList: [],
//
queryParams: {
pageNum: 1,
@ -433,8 +430,17 @@ export default {
// this.getList();
this.initSelectData()
this.InitIGetInfo()
this.getTree();
},
methods: {
getTree() {
listPartTypeApi().then(response => {
this.deptList = response.data
});
},
selectDrop(value) {
this.queryParams.typeId = value
},
// claimAndRefund/return/returnApplyAdd
// claimAndRefund/return/returnApplyAdd
/** 查询字典类型列表 startTime,结束日期endTime */
@ -483,6 +489,7 @@ export default {
this.dateRange = [];
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = '';
this.initSelectData()
this.handleQuery();
},
@ -649,7 +656,7 @@ export default {
// this.initGetUseTypeTree()
},
handleNodeClick(ev) {
console.log(ev)
},
initSelectData() {
this.GetUnitData()
@ -687,7 +694,7 @@ export default {
const res = await getAgreementInfoById(params)
// this.proList = res.data
this.queryParams.agreementCode = res.data.agreementCode
this.initGetUseTypeTree(res.data.agreementId)
// this.initGetUseTypeTree(res.data.agreementId)
},
getAgreementByUnitAndProId() {
this.InitGetAgreementInfoById()

View File

@ -716,7 +716,8 @@ export default {
agreementId: this.rowObj.agreementId,
pageNum: this.dialogQueryParams.pageNum,
pageSize: this.dialogQueryParams.pageSize,
keyWord:this.dialogQueryParams.keyWord
keyWord:this.dialogQueryParams.keyWord,
badId:this.rowObj.badId,
}
getViewByExamine(params).then(res => {
this.loadingList = res.rows
@ -750,8 +751,10 @@ export default {
}
let params = {
ids: this.rowObj.id
ids: this.rowObj.id,
returnDetailList:this.loadingList
}
// console.log(params)
ApiBackApplyAudit(params).then(res => {
if (res.code == 200) {
this.open = false

View File

@ -150,6 +150,7 @@
<el-table-column label="退料单号" align="center" prop="code" :show-overflow-tooltip="true"/>
<el-table-column label="退料单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="退料工程" align="center" prop="lotName" :show-overflow-tooltip="true"/>
<el-table-column label="退料机具" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="退料人员" align="center" prop="backPerson" :show-overflow-tooltip="true"/>
<el-table-column label="联系电话" align="center" prop="phone" :show-overflow-tooltip="true"/>
<el-table-column label="申请时间" align="center" prop="backTime" :show-overflow-tooltip="true"/>
@ -157,18 +158,21 @@
<el-table-column label="退料状态" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- 状态 37-待审核 38-已审核 -->
<el-button type="text" v-if="scope.row.applyStatus == '0'">
<el-button type="text" v-if="scope.row.taskStatus == '37'">
待审核
</el-button>
<el-button type="text" style="color: #67c23a" v-if="scope.row.applyStatus == '1'||scope.row.applyStatus == '3'">
退料通过
<el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '38'">
已审核
</el-button>
<el-button type="text" style="color: red" v-if="scope.row.applyStatus == '2'||scope.row.applyStatus == '4'">
退料驳回
<el-button type="text" v-if="scope.row.taskStatus == '39'">
退料核查
</el-button>
<el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '40'&& scope.row.applyStatus != '0'">
<el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '40'">
退料完成
</el-button>
<el-button type="text" style="color: #67c23a" v-if="scope.row.taskStatus == '101'">
退料驳回
</el-button>
</template>
</el-table-column>
@ -335,7 +339,7 @@
},
/** 查询列表 startTime,结束日期endTime */
async getList() {
this.loading = true;
// this.loading = true;
this.queryParams.startTime = this.dateRange[0]
this.queryParams.endTime = this.dateRange[1]
try {
@ -388,6 +392,7 @@
path:'/claimAndRefund/returnInDetail',
query:{
Id:row.id,
taskId:row.taskId
}
})

View File

@ -57,7 +57,7 @@
<el-col :span="1.5" v-if="!isView">
<el-button
type="primary"
size="mini"
size="mini" @click="completeBack"
>完成退料</el-button>
</el-col>
</el-row>
@ -68,11 +68,17 @@
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="合格数量" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="维修数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="预报废数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="审批数量" align="center" prop="preNum" :show-overflow-tooltip="true"/>
<el-table-column label="退料数量" align="center" prop="num" :show-overflow-tooltip="true" />
<!-- <el-table-column label="维修数量" align="center" prop="" :show-overflow-tooltip="true"/>
<el-table-column label="预报废数量" align="center" prop="" :show-overflow-tooltip="true"/> -->
<!-- <el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.status==0">待审批</span>
<span v-if="scope.row.status==1">进行中</span>
<span v-if="scope.row.status==2">已出库</span>
</template>
</el-table-column> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button size="mini" @click="handleViewCode(scope.row)" v-if="scope.row.manageType=='0'">
@ -81,10 +87,10 @@
<el-button size="mini" @click="handleViewNum(scope.row)" v-if="scope.row.manageType=='1'">
查看
</el-button>
<el-button size="mini" type="primary" @click="handleCodeReturn(scope.row)" v-if="!isView&&scope.row.manageType=='0'">
<el-button size="mini" type="primary" @click="handleCodeReturn(scope.row)" v-if="!isView&&scope.row.manageType=='0'&&scope.row.num>0">
编码退料
</el-button>
<el-button size="mini" type="primary" @click="handleNumReturn(scope.row)" v-if="!isView&&scope.row.manageType=='1'">
<el-button size="mini" type="primary" @click="handleNumReturn(scope.row)" v-if="!isView&&scope.row.manageType=='1'&&scope.row.num>0">
数量退料
</el-button>
<!-- <el-button size="mini" icon="el-icon-zoom-in">
@ -119,24 +125,30 @@
</el-form>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
>保存</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
size="mini"
:disabled="multiple"
@click="saveCodeBackBatch(1)"
>批量合格</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
:disabled="multiple"
@click="saveCodeBackBatch(2)"
>批量维修</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
size="mini"
:disabled="multiple"
@click="saveCodeBackBatch(3)"
>批量报废</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="codeList" height="500" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
@ -144,16 +156,16 @@
<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="maStatus" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!dialogIsView">
<el-table-column label="状态" align="center" prop="maStatus" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!dialogIsView" width="250">
<template slot-scope="scope">
<el-button size="mini" type="success" icon="el-icon-zoom-in">
<el-button size="mini" type="success" @click="saveCodeBack(scope.row,1)">
合格
</el-button>
<el-button size="mini" type="primary" icon="el-icon-zoom-in">
<el-button size="mini" type="primary" @click="saveCodeBack(scope.row,2)">
待维修
</el-button>
<el-button size="mini" type="warning" icon="el-icon-zoom-in">
<el-button size="mini" type="warning" @click="saveCodeBack(scope.row,3)">
预报废
</el-button>
</template>
@ -170,54 +182,80 @@
<!-- 数量退料弹窗 -->
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
<div style="margin-left: 40px;margin-bottom: 10px;">
退料数量{{returnNum}}
</div>
<el-row :gutter="10" class="mb8" v-if="!dialogIsView">
<el-col :span="1.5">
<el-button
type="primary"
size="mini"
v-if="returnNum>0"
@click="saveNumReturn"
>保存</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="numList" height="500">
<el-table-column label="序号" align="center" type="index" />
<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="" :show-overflow-tooltip="true" />
<el-table-column label="合格数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="待维修数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="待报废数量" align="center" prop="inputNum">
<el-table-column label="规格型号" align="center" prop="typeCode" :show-overflow-tooltip="true" />
<el-table-column label="退料数量" align="center" prop="backNum" :show-overflow-tooltip="true" />
<el-table-column label="合格数量" align="center" prop="qualifiedNum" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<el-input
v-model.number="scope.row.inputNum"
placeholder="请输入出库数量"
type="number" min="1"
@input="checkNum(scope.row)"
clearable
v-model.number="scope.row.qualifiedNum"
placeholder="请输入合格数量"
type="number" min="0"
clearable :disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="报废信息" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="待维修数量" align="center" prop="serviceNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.serviceNum"
placeholder="请输入待维修数量"
type="number" min="0"
clearable :disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<el-table-column label="待报废数量" align="center" prop="scrapNum">
<template slot-scope="scope">
<el-input
v-model.number="scope.row.scrapNum"
placeholder="请输入待报废数量"
type="number" min="0"
clearable :disabled="dialogIsView"
style="width: 100%"
/>
</template>
</el-table-column>
<!-- <el-table-column label="报废信息" align="center" prop="" :show-overflow-tooltip="true" /> -->
</el-table>
</el-dialog>
</div>
</template>
<script>
import { receiveView } from "@/api/claimAndRefund/return";
import { receiveView ,getBackMachine,backReceiveRecordWeb,setNumBack,setCodeBack, getRecord, endBack } from "@/api/claimAndRefund/return";
import { 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 { getInfo } from "@/api/login";
export default {
// name: "returnInDetail",
components: { Treeselect },
data() {
return {
createBy: '', //
//
loading: false,
//
ids: [],
codeSelectList: [],
//
single: true,
//
@ -267,13 +305,20 @@
this.isView = false
}
if (this.$route.query.Id) {
this.queryParams.id = this.$route.query.Id
this.queryParams.id = this.$route.query.Id;
}
if (this.$route.query.taskId) {
this.queryParams.taskId = this.$route.query.taskId;
}
this.getTypeList();
this.equipmentType();
this.getList();
getInfo().then(res => {
this.createBy = res.user.userId
})
},
methods: {
//
@ -327,31 +372,74 @@
this.resetForm("queryForm");
this.handleQuery();
},
//
back(){
this.$tab.closeOpenPage({ path: "/claimAndRefund/returnIn"});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
//退
async completeBack(){
let param1 = {
parentId:this.queryParams.id
}
const res1 = await getRecord(param1)
console.log(res1)
if(res1.code==200){
let param = {
createBy:this.createBy,
parentId:this.queryParams.id,
taskId:this.queryParams.taskId
}
endBack(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("操作成功");
this.back();
}
});
}
},
//
//
handleViewCode(row){
this.title = '查看';
this.openCode = true;
this.resetForm("codeQuery");
this.codeQuery.parentId = row.id;
this.codeQuery.typeId = row.modelId;
this.dialogIsView = true;
this.returnNum = Number(row.num);
this.handleCodeQuery()
},
//
handleViewNum(row){
let param = {
parentId:row.id,
typeId:row.modelId
}
backReceiveRecordWeb(param).then(res=>{
if(res.code==200){
this.title = '查看';
this.openNum = true;
this.dialogIsView = true;
this.numList=res.data.rows;
this.numList.forEach(item=>{
if(item.backStatus=='1'){item.qualifiedNum = item.backNum;item.serviceNum=0;item.scrapNum=0;}
if(item.backStatus=='2'){item.serviceNum = item.backNum;item.qualifiedNum=0;item.scrapNum=0;}
if(item.backStatus=='3'){item.scrapNum = item.backNum;item.qualifiedNum=0;item.serviceNum=0;}
})
}
})
},
//退
handleCodeReturn(row){
this.title = '编码退料';
this.openCode = true;
this.dialogIsView = false
this.resetForm("codeQuery");
this.codeQuery.parentId = row.id;
this.codeQuery.taskId = row.taskId;
this.codeQuery.typeId = row.modelId;
this.dialogIsView = false;
this.returnNum = Number(row.num);
this.handleCodeQuery()
},
//退
@ -361,21 +449,27 @@
this.dialogIsView = false
let obj = {}
this.$set(obj,'taskId',row.taskId)
this.$set(obj,'parentId',row.parentId)
this.$set(obj,'parentId',row.id)
this.$set(obj,'typeName',row.typeName)
this.$set(obj,'typeModelName',row.typeModelName)
this.$set(obj,'typeId',row.typeId)
// this.$set(obj,'alNum ',row.alNum)//
// this.$set(obj,'outNum',row.outNum)//
// this.$set(obj,'inputNum',1)//
this.outNumList = [obj]
this.$set(obj,'typeCode',row.typeCode)
this.$set(obj,'typeId',row.modelId)
this.$set(obj,'backNum',row.num)//退
this.returnNum = Number(row.num);
this.$set(obj,'qualifiedNum',0)//
this.$set(obj,'serviceNum',0)//
this.$set(obj,'scrapNum',0)//
this.numList = [obj]
// this.getNumList()
},
//退
handleCodeQuery() {
this.codeQuery.pageNum = 1;
if(this.dialogIsView){
this.getCodeViewList()
}else{
this.getCodeList();
}
},
//退
resetCodeQuery() {
@ -384,26 +478,153 @@
},
//退
getCodeList() {
console.log('获取退料编码列表')
// getLeaseAuditListDetail(this.codeQuery).then(response => {
// this.outCodeList = response.data.rows;
// this.outTotal = response.data.total;
// }
// );
getBackMachine(this.codeQuery).then(response => {
this.codeList = response.data.rows;
this.codeTotal = response.data.total;
});
},
//退
getNumList() {
console.log('获取退料数量列表')
// getLeaseAuditListDetail(this.codeQuery).then(response => {
// this.outCodeList = response.data.rows;
// this.outTotal = response.data.total;
// }
// );
//退
getCodeViewList() {
backReceiveRecordWeb(this.codeQuery).then(response => {
this.codeList = response.data.rows;
this.codeList
this.codeList.forEach(item=>{
item.typeModelName = item.typeCode
if(item.backStatus=='1'){item.maStatus = '合格'}
if(item.backStatus=='2'){item.maStatus = '维修'}
if(item.backStatus=='3'){item.maStatus = '报废'}
})
this.codeTotal = response.data.total;
});
},
/** 提交按钮 */
submitForm() {
/** 数量退料按钮 */
saveNumReturn() {
let data = this.numList[0]
let sumUnmber = data.qualifiedNum+data.serviceNum+data.scrapNum;
if(sumUnmber>this.returnNum){
this.$modal.msgError("退料总量已大于待退料数量!");
}else{
let arr = []
if(data.qualifiedNum>0){
let obj = {
parentId:data.parentId,
typeId:data.typeId,
manageType:1,
createBy:this.createBy,
backStatus:1,
backNum:data.qualifiedNum
}
arr.push(obj)
}
if(data.serviceNum>0){
let obj = {
parentId:data.parentId,
typeId:data.typeId,
manageType:1,
createBy:this.createBy,
backStatus:2,
backNum:data.serviceNum
}
arr.push(obj)
}
if(data.scrapNum>0){
let obj = {
parentId:data.parentId,
typeId:data.typeId,
manageType:1,
createBy:this.createBy,
backStatus:3,
backNum:data.scrapNum
}
arr.push(obj)
}
let param = {
taskId:data.taskId,
arr:arr
}
// console.log(arr)
// console.log(param)
setNumBack(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("操作成功");
this.openNum = false;
this.handleQuery();
}
});
}
},
/** 编码退料按钮 */
saveCodeBack(row,type){
if(this.returnNum==0){
this.$modal.msgError("退料数量为零,无法操作!");
}else{
let arr = [{
parentId:this.codeQuery.parentId,
typeId:row.typeId,
backNum:1,
backStatus:type,
manageType:0,
createBy:this.createBy,
maId:row.maId
}]
let param = {
taskId:this.codeQuery.taskId,
arr:arr
}
setCodeBack(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("操作成功");
// this.openCode = false;
this.returnNum = Number(this.returnNum)-1;
this.handleCodeQuery();
this.handleQuery();
}
});
}
},
//
handleSelectionChange(selection) {
this.codeSelectList = selection
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 编码退料 - 批量操作 */
saveCodeBackBatch(type){
if(this.codeSelectList.length>this.returnNum){
this.$modal.msgError("退料总量已大于待退料数量!");
}else{
let arr = [];
arr = this.codeSelectList.map(item=>{
return {
parentId:this.codeQuery.parentId,
typeId:item.typeId,
backNum:1,
backStatus:type,
manageType:0,
createBy:this.createBy,
maId:item.maId
}
})
let param = {
taskId:this.codeQuery.taskId,
arr:arr
}
// console.log(param)
setCodeBack(param).then(response => {
if(response.code==200){
this.$modal.msgSuccess("操作成功");
// this.openCode = false;
this.returnNum = Number(this.returnNum)-this.codeSelectList.length;
this.handleCodeQuery();
this.handleQuery();
}
});
}
}
}
};
</script>

View File

@ -0,0 +1,105 @@
<template>
<div>
<div v-clickoutside="closeTree">
<div @click="inputFocus">
<el-input
v-model="inputValue"
:style="'width:' + width + 'px'"
placeholder="请选择工机具类型"
></el-input>
</div>
<div class="treeModule">
<el-tree
class="ORGTree"
v-show="ishowTree"
ref="tree"
:data="dataList"
key="id"
node-key="id"
highlight-current
@node-click="handleNodeClick"
:props="defaultProps"
>
</el-tree>
</div>
</div>
</div>
</template>
<script>
import Clickoutside from "element-ui/src/utils/clickoutside";
export default {
directives: { Clickoutside },
props: {
dataList: {
type: Array,
default: () => {
return []
}
},
// name: {
// type: String,
// default: ''
// },
width: {
type: Number,
default: 300
}
},
watch: {
},
data() {
return {
mineStatusValue: [],
inputValue: '',
dataLists: [],
defaultProps: {
children: 'children',
label: 'label',
},
ishowTree: false,
}
},
mounted() {
},
// watch: {
// name: function () {
// this.inputValue = this.name
// }
// },
methods: {
inputFocus() {
if (this.ishowTree == true) {
this.ishowTree = false
} else {
this.ishowTree = true
}
},
//
closeTree() {
this.ishowTree = false
},
handleNodeClick(e) {
this.inputValue = e.label
this.$emit('changeId', e.id)
this.ishowTree = false
}
}
}
</script>
<style scoped>
.treeModule {
position: absolute; /*这里一定要设置*/
z-index: 999999; /*这里是该元素与显示屏的距离,据说越大越好,但是我也没有看到效果,因为没有它也是可以的*/
}
.ORGTree {
width: 240px;
height: 200px;
overflow: auto;
border: 1px solid #ccc7c7;
}
</style>