This commit is contained in:
parent
9d8bd6d94b
commit
2a4b8420f6
|
|
@ -0,0 +1,55 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 退料申请列表
|
||||
export function ApiGetBackApplyList(query) {
|
||||
return request({
|
||||
url: '/material/backApply/getBackApplyList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 退料审核新增
|
||||
export function ApiSubmitBackApply(query) {
|
||||
return request({
|
||||
url: '/material/backApply/submitBackApply',
|
||||
method: 'post',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 详情查看或编辑
|
||||
export function ApiGetView(query) {
|
||||
return request({
|
||||
url: '/material/backApply/getView',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 详情查看或编辑
|
||||
export function ApiSetModify(query) {
|
||||
return request({
|
||||
url: '/material/backApply/setModify',
|
||||
method: 'post',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 详情查看或编辑
|
||||
export function ApiGetMaterialList(query) {
|
||||
return request({
|
||||
url: '/material/backApply/getMaterialList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,143 @@
|
|||
/** 退料ID */
|
||||
@ApiModelProperty(value = "退料ID")
|
||||
private Long id;
|
||||
|
||||
/** 退料ID-字符串 */
|
||||
@ApiModelProperty(value = "退料ID-字符串")
|
||||
private String ids;
|
||||
|
||||
/** 退料单号 */
|
||||
@Excel(name = "退料单号")
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
private String code;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Integer taskId;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
private Integer taskType;
|
||||
|
||||
/** 签订日期 */
|
||||
@ApiModelProperty(value = "签订日期")
|
||||
private String signTime;
|
||||
|
||||
/** 退料人员 */
|
||||
@Excel(name = "退料人员")
|
||||
@ApiModelProperty(value = "退料人员")
|
||||
private String backPerson;
|
||||
|
||||
/** 联系电话 */
|
||||
@Excel(name = "退料人联系电话")
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
/** 机具公司审核人 */
|
||||
@ApiModelProperty(value = "机具公司审核人")
|
||||
private Integer directAuditBy;
|
||||
|
||||
/** 机具公司审批时间 */
|
||||
@ApiModelProperty(value = "机具公司审批时间")
|
||||
private String directAuditTime;
|
||||
|
||||
/** 机具公司审批备注 */
|
||||
@ApiModelProperty(value = "机具公司审批备注")
|
||||
private String directAuditRemark;
|
||||
|
||||
|
||||
/** 创建者 */
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private String updateBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
@ApiModelProperty(value = "工程id")
|
||||
private Integer lotId;
|
||||
|
||||
@Excel(name = "退料工程名称")
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String lotName;
|
||||
|
||||
@ApiModelProperty(value = "单位id")
|
||||
private Integer unitId;
|
||||
|
||||
@Excel(name = "退料单位名称")
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "退料申请时间")
|
||||
@ApiModelProperty(value = "退料日期")
|
||||
private String backTime;
|
||||
|
||||
@Excel(name = "协议号")
|
||||
@ApiModelProperty(value = "协议编号")
|
||||
private String agreementCode;
|
||||
|
||||
@Excel(name = "退料状态")
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "协议id")
|
||||
private Integer agreementId;
|
||||
|
||||
@ApiModelProperty(value = "类型id")
|
||||
private String typeId;
|
||||
|
||||
@Excel(name = "退料工机具类型")
|
||||
@ApiModelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格编号")
|
||||
private String typeCode;
|
||||
|
||||
@ApiModelProperty(value = "数量")
|
||||
private String num;
|
||||
|
||||
@ApiModelProperty(value = "详情id和数量")
|
||||
private String detailsIdByNum;
|
||||
|
||||
@ApiModelProperty(value = "类型id和数量")
|
||||
private String typeIdByNum;
|
||||
|
||||
@ApiModelProperty(value = "详情id")
|
||||
private String detailsId;
|
||||
|
||||
@ApiModelProperty(value = "编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "在用数量")
|
||||
private String useNum;
|
||||
|
||||
@ApiModelProperty(value = "操作人")
|
||||
private String createName;
|
||||
|
||||
@ApiModelProperty(value = "审核人")
|
||||
private String examineName;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
|
@ -1,452 +1,184 @@
|
|||
<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="关键字" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="单位名称" prop="unitId">
|
||||
<el-select v-model="queryParams.unitId" clearable @change="getAgreementByUnit" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="工程名称" prop="proId">
|
||||
<el-select v-model="queryParams.proId" clearable @change="getAgreementByProId" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<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="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入联系人姓名"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="工机具类型" prop="typeId">
|
||||
<el-cascader v-model="queryParams.typeId" :options="deptOptions"
|
||||
:props="{ expandTrigger: 'hover', label: 'label', value: 'id', checkStrictly: true }" @change="handleNodeClick"
|
||||
aria-placeholder="请选择极具类型"> </el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料申请时间" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入退料申请时间"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="退料申请时间" prop="time">
|
||||
<el-date-picker v-model="queryParams.time" type="datetimerange" range-separator="至" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料状态" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请选择退料状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="退料状态" prop="taskStatus">
|
||||
<el-select v-model="queryParams.taskStatus" clearable style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<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="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请选择协议号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-form-item label="协议号" prop="agreementCode">
|
||||
<el-input 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
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<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="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>退料申请</el-button
|
||||
>
|
||||
<el-button type="primary" plain size="mini" @click="handleAdd"
|
||||
v-hasPermi="['store:labelType:add']">退料申请</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- :disabled="multiple" -->
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
size="mini"
|
||||
@click="handleSubmit()"
|
||||
v-hasPermi="['store:labelType:add']"
|
||||
>批量提交</el-button
|
||||
>
|
||||
<el-button type="warning" plain size="mini" @click="handleSubmit()"
|
||||
v-hasPermi="['store:labelType:add']">批量提交</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['store:labelType:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-button type="success" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['store:labelType:export']">导出</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="typeList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" sortable align="center" prop="dictId" />
|
||||
<el-table-column
|
||||
label="退料单号"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料单位名称"
|
||||
align="center"
|
||||
sortable
|
||||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料工程名称"
|
||||
sortable
|
||||
align="center"
|
||||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料工机具类型"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料人员"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料人联系电话"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料申请时间"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="协议号"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="是否异常退料"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料状态"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="不通过原因"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
sortable
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="300"
|
||||
>
|
||||
<el-table-column label="序号" sortable align="center" type="index" />
|
||||
<el-table-column label="退料单号" align="center" prop="code" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料单位名称" align="center" sortable prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工程名称" sortable align="center" prop="lotName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料工机具类型" align="center" prop="typeName" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人员" align="center" prop="backPerson" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料人联系电话" align="center" prop="phone" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料申请时间" align="center" prop="backTime" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="协议号" align="center" prop="agreementCode" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="是否异常退料" align="center" prop="dictName" sortable :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleUpdate(scope.row, 'see')"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-s-order"
|
||||
@click="handleUpdateOrder(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>退料单</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-edit-outline"
|
||||
@click="handleUpdate(scope.row, 'update')"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
@click="handleSubmit(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<div>
|
||||
<!-- 暂时全部未否 -->
|
||||
否
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退料状态" align="center" sortable :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<!-- 状态
|
||||
37-待审核
|
||||
38-已审核 -->
|
||||
<el-button type="text" v-if="scope.row.taskStatus == '37'">
|
||||
待审核
|
||||
</el-button>
|
||||
<el-button type="text" style="color:#67C23A" v-else-if="scope.row.taskStatus == '38'">
|
||||
已审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不通过原因" align="center" prop="dictName" sortable :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" plain icon="el-icon-zoom-in" @click="handleUpdate(scope.row, 'see')"
|
||||
v-hasPermi="['store:labelType:edit']">查看</el-button>
|
||||
<el-button size="mini" type="primary" icon="el-icon-s-order" @click="handleUpdateOrder(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']">退料单</el-button>
|
||||
<el-button size="mini" type="warning" plain icon="el-icon-edit-outline"
|
||||
@click="handleUpdate(scope.row, 'update')" v-hasPermi="['store:labelType:edit']">编辑</el-button>
|
||||
<el-button size="mini" type="warning" icon="el-icon-check" @click="handleSubmit(scope.row)"
|
||||
v-hasPermi="['store:labelType:edit']">提交</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['store:labelType: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"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-row>
|
||||
<el-form-item label="退料单位" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入借出方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入借入方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借入方单位" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退料协议编号" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="退料人" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入借出方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借出方单位" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退料人电话" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入借入方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入借入方单位" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-form-item label="关键字" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入借出方单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.dictName" 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
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="typeList"
|
||||
height="500px"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="typeList" height="500px" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="dictId" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="当前在用量"
|
||||
align="center"
|
||||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="退料数量"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="200"
|
||||
>
|
||||
<el-table-column label="类型名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="编码" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="当前在用量" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="退料数量" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.dictName"
|
||||
placeholder="请输入退料数量"
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="scope.row.dictName" placeholder="请输入退料数量" clearable />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<div
|
||||
slot="footer"
|
||||
class="dialog-footer"
|
||||
style="text-align: center"
|
||||
v-if="type == 'update'"
|
||||
>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center" v-if="type == 'update'">
|
||||
<el-button type="primary" @click="submitForm">确定</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 退料单 -->
|
||||
<dialogForm
|
||||
:dialogTitle="title"
|
||||
:isShowFlag.sync="isShowOneFlag"
|
||||
:priKey="priKey"
|
||||
></dialogForm>
|
||||
<dialogForm :dialogTitle="title" :isShowFlag.sync="isShowOneFlag" :priKey="priKey"></dialogForm>
|
||||
<!-- 提交 -->
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
:visible.sync="openOne"
|
||||
append-to-body
|
||||
width="400px"
|
||||
>
|
||||
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openOne" append-to-body
|
||||
width="400px">
|
||||
<div class="submit_box">
|
||||
<div>
|
||||
<i
|
||||
class="el-icon-circle-check"
|
||||
style="color: #ff9900; font-size: 30px"
|
||||
></i>
|
||||
<i class="el-icon-circle-check" style="color: #ff9900; font-size: 30px"></i>
|
||||
</div>
|
||||
<div class="submit_box_title">
|
||||
<div>{{ openTextOne }}</div>
|
||||
|
|
@ -458,19 +190,11 @@
|
|||
<el-button type="primary" @click="submitOpenOneForm()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
:visible.sync="openTwo"
|
||||
append-to-body
|
||||
width="400px"
|
||||
>
|
||||
<el-dialog v-loading.fullscreen.lock="fullscreenLoading" :title="title" :visible.sync="openTwo" append-to-body
|
||||
width="400px">
|
||||
<div class="submit_box_two">
|
||||
<div>
|
||||
<i
|
||||
class="el-icon-circle-check"
|
||||
style="color: #00c196; font-size: 30px"
|
||||
></i>
|
||||
<i class="el-icon-circle-check" style="color: #00c196; font-size: 30px"></i>
|
||||
</div>
|
||||
<div class="submit_box_title">{{ openTextThree }}</div>
|
||||
</div>
|
||||
|
|
@ -481,8 +205,14 @@
|
|||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { ApiGetBackApplyList } from "@/api/claimAndRefund/return.js"
|
||||
import {
|
||||
getInfo, h
|
||||
} from "@/api/login";
|
||||
import { getUnitData, getProData, getAgreementInfoById } from "@/api/claimAndRefund/receive.js"
|
||||
import dialogForm from "./dialogForm.vue";
|
||||
|
||||
// 10:42开始日期startTime,结束日期endTime 机具类型typeId
|
||||
// http://localhost/claimAndRefund/return/returnApply
|
||||
export default {
|
||||
name: "Dict",
|
||||
dicts: ['sys_normal_disable'],
|
||||
|
|
@ -517,9 +247,15 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined
|
||||
keyWord: '',//关键字
|
||||
unitId: "",//单位id
|
||||
lotId: '',//工程id
|
||||
taskStatus: '',//状态
|
||||
typeId: '',//工机具类型
|
||||
time: '',
|
||||
agreementCode: '',//协议
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -537,21 +273,49 @@ export default {
|
|||
openTextOne: '',
|
||||
openTextTwo: '',
|
||||
openTextThree: '',
|
||||
companyId: '',
|
||||
deptOptions: [],
|
||||
unitList: [],
|
||||
proList: [],
|
||||
taskStatusList:[
|
||||
{
|
||||
name:'待审核',
|
||||
id:'37'
|
||||
},
|
||||
{
|
||||
name:'已审核',
|
||||
id:'38'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.initSelectData()
|
||||
this.InitIGetInfo()
|
||||
},
|
||||
methods: {
|
||||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
// claimAndRefund/return/returnApplyAdd
|
||||
// claimAndRefund/return/returnApplyAdd
|
||||
/** 查询字典类型列表 startTime,结束日期endTime */
|
||||
async getList() {
|
||||
this.loading = true;
|
||||
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.typeList = response.rows;
|
||||
this.total = response.total;
|
||||
this.queryParams.startTime = this.queryParams.time[0]
|
||||
this.queryParams.endTime = this.queryParams.time[1]
|
||||
try {
|
||||
let params = {
|
||||
companyId: this.companyId,
|
||||
...this.queryParams
|
||||
}
|
||||
console.log("paramsparamsparams", params)
|
||||
const res = await ApiGetBackApplyList(params)
|
||||
console.log("res=====", res)
|
||||
this.typeList = res.rows;
|
||||
this.total = res.total;
|
||||
this.loading = false;
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
@ -577,14 +341,16 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
// this.resetForm("queryForm");
|
||||
this.$refs.queryForm.resetFields()
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "计划借调";
|
||||
// this.reset();
|
||||
// // this.open = true;
|
||||
// // this.title = "计划借调";
|
||||
this.$router.push("/claimAndRefund/return/returnApplyAdd");
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
|
@ -661,7 +427,78 @@ export default {
|
|||
this.$modal.msgSuccess("刷新成功");
|
||||
this.$store.dispatch('dict/cleanDict');
|
||||
});
|
||||
},
|
||||
InitIGetInfo() {
|
||||
getInfo().then(res => {
|
||||
this.companyId = res.user.companyId
|
||||
console.log("9999999999999")
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
handleNodeClick(ev) {
|
||||
|
||||
},
|
||||
initSelectData() {
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
},
|
||||
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
|
||||
}
|
||||
const res = await getUnitData(params)
|
||||
this.unitList = res.data
|
||||
console.log('GetUnitData ======================', res)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
id:this.queryParams.unitId
|
||||
}
|
||||
const res = await getProData(params)
|
||||
this.proList = res.data
|
||||
|
||||
console.log('GetProData ======================', res)
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async InitGetAgreementInfoById() {
|
||||
const {
|
||||
unitId,
|
||||
proId
|
||||
} = this.queryParams
|
||||
if (!unitId || !proId) {
|
||||
return
|
||||
}
|
||||
const params = {
|
||||
unitId: unitId,
|
||||
projectId: proId
|
||||
}
|
||||
const res = await getAgreementInfoById(params)
|
||||
// this.proList = res.data
|
||||
console.log('getAgreementInfoById ======================', res)
|
||||
this.queryParams.agreementCode = res.data.agreementCode
|
||||
},
|
||||
getAgreementByUnitAndProId() {
|
||||
this.InitGetAgreementInfoById()
|
||||
},
|
||||
getAgreementByProId(){
|
||||
this.InitGetAgreementInfoById()
|
||||
},
|
||||
getAgreementByUnit(){
|
||||
this.GetProData()
|
||||
},
|
||||
handleQuery1(){
|
||||
|
||||
},
|
||||
resetQuery1(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -703,6 +540,7 @@ export default {
|
|||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 70px !important;
|
||||
margin-bottom: 10px;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,542 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :rules="queryRules" :inline="true" v-show="showSearch">
|
||||
<el-row>
|
||||
<el-form-item label="退料单位" prop="unitId">
|
||||
<el-select v-model="queryParams.unitId" clearable @change="GetProData" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="proId">
|
||||
<el-select v-model="queryParams.proId" clearable @change="GetUnitData" style="width: 240px"
|
||||
placeholder="请选择">
|
||||
<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 v-model="queryParams.agreementCode" placeholder="请选择协议号" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物品类型" prop="status">
|
||||
<el-cascader placeholder="请输入物品类型" :options="deviceTypeTree" :props="deviceTypeTreeProps"
|
||||
v-model="deviceType" @change="deviceTypeChange" ref="deviceTypeCascader" filterable></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料人" prop="roleName">
|
||||
<el-input v-model="queryParams.leaseApplyInfo.leasePerson" placeholder="请输入退料人" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退料人电话" prop="roleName">
|
||||
<el-input v-model="queryParams.leaseApplyInfo.phone" placeholder="请输入退料人电话" clearable
|
||||
style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退料协议编号" prop="dictName">
|
||||
<el-input v-model="queryParams.dictName" placeholder="请输入关键字" clearable style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="roleName">
|
||||
<el-input v-model="queryParams.leaseApplyInfo.remark" placeholder="请输入备注" clearable rows="1"
|
||||
type="textarea" style="width: 240px" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">保存</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="el-icon-back" size="mini" @click="handleUpdate">退料管理</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
|
||||
v-hasPermi="['system:role:export']">导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="queryParams.leaseApplyDetails" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="120" />
|
||||
<el-table-column label="类型名称" prop="typeCn" width="200" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" prop="guigeCn" width="200" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="计量单位" prop="unitCn" width="100" />
|
||||
<el-table-column label="预领数量" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model.number="scope.row.preNum" placeholder="请输入预领数量" type="number" clearable
|
||||
style="width: 100%" @keyup.enter.native="handleQuery" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark" placeholder="请输入备注" clearable style="width: 100%"
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleUpdate(scope.row)"-->
|
||||
<!-- v-hasPermi="['system:role:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<el-button size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleDelete({ ...scope.row, index: scope.$index })">删除</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
|
||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
||||
import { getProData, getUnitData, getDeviceTypeTree, getAgreementInfoById, submitLeaseApply } from '@/api/claimAndRefund/receive'
|
||||
import { ApiSubmitBackApply, ApiGetMaterialList } from '@/api/claimAndRefund/receive'
|
||||
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "Role",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 角色表格数据
|
||||
roleList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否显示弹出层(数据权限)
|
||||
openDataScope: false,
|
||||
menuExpand: false,
|
||||
menuNodeAll: false,
|
||||
deptExpand: true,
|
||||
deptNodeAll: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 数据范围选项
|
||||
dataScopeOptions: [
|
||||
{
|
||||
value: "1",
|
||||
label: "全部数据权限"
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "自定数据权限"
|
||||
},
|
||||
{
|
||||
value: "3",
|
||||
label: "本部门数据权限"
|
||||
},
|
||||
{
|
||||
value: "4",
|
||||
label: "本部门及以下数据权限"
|
||||
},
|
||||
{
|
||||
value: "5",
|
||||
label: "仅本人数据权限"
|
||||
}
|
||||
],
|
||||
// 菜单列表
|
||||
menuOptions: [],
|
||||
// 部门列表
|
||||
deptOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
||||
types: 2,
|
||||
|
||||
unitId: null,
|
||||
proId: null,
|
||||
agreementId: null, //协议id
|
||||
companyId: '', //登录信息中取
|
||||
createBy: '', //用户名
|
||||
taskType: 29,
|
||||
taskStatus: 30,
|
||||
//退料人信息
|
||||
leaseApplyInfo: {
|
||||
leasePerson: '',
|
||||
phone: '',
|
||||
remark: ''
|
||||
},
|
||||
//退料详情集合
|
||||
leaseApplyDetails: []
|
||||
},
|
||||
|
||||
|
||||
//退料详情单条模板
|
||||
leaseApplyDetailsItem: {
|
||||
createBy: null,
|
||||
companyId: null,
|
||||
status: 0,
|
||||
typeId: null, // 树结构第4级 规格id
|
||||
typeCn: '', //显示的设备类型
|
||||
guigeCn: '', //显示的设备规格
|
||||
unitCn: '', //显示的设备 单位
|
||||
remark: '', //单条备注
|
||||
preNum: 1, //预领数量
|
||||
},
|
||||
//
|
||||
queryRules: {
|
||||
unitId: [
|
||||
{
|
||||
required: true, message: '请选择来往单位', trigger: 'change', type: 'number'
|
||||
}
|
||||
],
|
||||
proId: [
|
||||
{
|
||||
required: true, message: '请选择工程', trigger: 'change', type: 'number'
|
||||
}
|
||||
]
|
||||
},
|
||||
unitList: [], //单位 集合
|
||||
proList: [], // 工程 集合
|
||||
deviceTypeTree: [], // 设备 树结构数据
|
||||
// 设备 树显示 配置
|
||||
deviceTypeTreeProps: {
|
||||
multiple: false,
|
||||
value: 'id'
|
||||
},
|
||||
// 选中的设备类型
|
||||
deviceType: null,
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
roleName: [
|
||||
{ required: true, message: "角色名称不能为空", trigger: "blur" }
|
||||
],
|
||||
roleKey: [
|
||||
{ required: true, message: "权限字符不能为空", trigger: "blur" }
|
||||
],
|
||||
roleSort: [
|
||||
{ required: true, message: "角色顺序不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.GetUnitData()
|
||||
|
||||
this.GetProData()
|
||||
|
||||
this.GetDeviceTypeTree()
|
||||
// this.getList();
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
methods: {
|
||||
// 获取 来往单位 列表数据
|
||||
async GetUnitData() {
|
||||
const params = {
|
||||
id: this.queryParams.proId
|
||||
}
|
||||
const res = await getUnitData(params)
|
||||
this.unitList = res.data
|
||||
|
||||
this.GetAgreementInfoById()
|
||||
},
|
||||
// 获取 工程名称 列表数据
|
||||
async GetProData() {
|
||||
const params = {
|
||||
id: this.queryParams.unitId
|
||||
}
|
||||
const res = await getProData(params)
|
||||
this.proList = res.data
|
||||
|
||||
this.GetAgreementInfoById()
|
||||
},
|
||||
async GetDeviceTypeTree() {
|
||||
const params = {
|
||||
level: 4
|
||||
}
|
||||
const res = await getDeviceTypeTree(params)
|
||||
this.deviceTypeTree = res.data
|
||||
|
||||
},
|
||||
|
||||
async GetAgreementInfoById() {
|
||||
if (this.queryParams.unitId && this.queryParams.proId) {
|
||||
const params = {
|
||||
unitId: this.queryParams.unitId,
|
||||
projectId: this.queryParams.proId
|
||||
}
|
||||
const res = await getAgreementInfoById(params)
|
||||
console.log("getAgreementInfoById",res)
|
||||
if (!(res.data && res.data.agreementId)) {
|
||||
this.$message.error('当前单位和工程未上传');
|
||||
|
||||
this.queryParams.unitId = null
|
||||
this.queryParams.proId = null
|
||||
this.GetUnitData()
|
||||
this.GetProData()
|
||||
} else {
|
||||
this.queryParams.agreementId = res.data.agreementId
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** 查询角色列表 */
|
||||
async getList() {
|
||||
|
||||
|
||||
},
|
||||
/** 查询菜单树结构 */
|
||||
getMenuTreeselect() {
|
||||
menuTreeselect().then(response => {
|
||||
this.menuOptions = response.data;
|
||||
});
|
||||
},
|
||||
// 所有菜单节点数据
|
||||
getMenuAllCheckedKeys() {
|
||||
// 目前被选中的菜单节点
|
||||
let checkedKeys = this.$refs.menu.getCheckedKeys();
|
||||
// 半选中的菜单节点
|
||||
let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
|
||||
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
||||
return checkedKeys;
|
||||
},
|
||||
// 所有部门节点数据
|
||||
getDeptAllCheckedKeys() {
|
||||
// 目前被选中的部门节点
|
||||
let checkedKeys = this.$refs.dept.getCheckedKeys();
|
||||
// 半选中的部门节点
|
||||
let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
|
||||
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
||||
return checkedKeys;
|
||||
},
|
||||
/** 根据角色ID查询菜单树结构 */
|
||||
getRoleMenuTreeselect(roleId) {
|
||||
return roleMenuTreeselect(roleId).then(response => {
|
||||
this.menuOptions = response.menus;
|
||||
return response;
|
||||
});
|
||||
},
|
||||
/** 根据角色ID查询部门树结构 */
|
||||
getDeptTree(roleId) {
|
||||
return deptTreeSelect(roleId).then(response => {
|
||||
this.deptOptions = response.depts;
|
||||
return response;
|
||||
});
|
||||
},
|
||||
// 角色状态修改
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 取消按钮(数据权限)
|
||||
cancelDataScope() {
|
||||
this.openDataScope = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
if (this.$refs.menu != undefined) {
|
||||
this.$refs.menu.setCheckedKeys([]);
|
||||
}
|
||||
this.menuExpand = false,
|
||||
this.menuNodeAll = false,
|
||||
this.deptExpand = true,
|
||||
this.deptNodeAll = false,
|
||||
this.form = {
|
||||
roleId: undefined,
|
||||
roleName: undefined,
|
||||
roleKey: undefined,
|
||||
roleSort: 0,
|
||||
status: "0",
|
||||
menuIds: [],
|
||||
deptIds: [],
|
||||
menuCheckStrictly: true,
|
||||
deptCheckStrictly: true,
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.roleId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 更多操作触发
|
||||
handleCommand(command, row) {
|
||||
switch (command) {
|
||||
case "handleDataScope":
|
||||
this.handleDataScope(row);
|
||||
break;
|
||||
case "handleAuthUser":
|
||||
this.handleAuthUser(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
/** 保存按钮操作 */
|
||||
handleAdd() {
|
||||
this.$refs.queryForm.validate(async (valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
} else {
|
||||
if (this.queryParams.leaseApplyDetails.length == 0) {
|
||||
this.$message.error('请添加数据');
|
||||
return
|
||||
}
|
||||
this.queryParams.createBy = this.user.name
|
||||
this.queryParams.companyId = this.user.id
|
||||
|
||||
const res = await ApiGetMaterialList(this.queryParams)
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '申请成功'
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$router.back()
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$router.back()
|
||||
},
|
||||
|
||||
/** 分配数据权限操作 */
|
||||
handleDataScope(row) {
|
||||
this.reset();
|
||||
const deptTreeSelect = this.getDeptTree(row.roleId);
|
||||
getRole(row.roleId).then(response => {
|
||||
this.form = response.data;
|
||||
this.openDataScope = true;
|
||||
this.$nextTick(() => {
|
||||
deptTreeSelect.then(res => {
|
||||
this.$refs.dept.setCheckedKeys(res.checkedKeys);
|
||||
});
|
||||
});
|
||||
this.title = "分配数据权限";
|
||||
});
|
||||
},
|
||||
/** 分配用户操作 */
|
||||
handleAuthUser: function (row) {
|
||||
const roleId = row.roleId;
|
||||
this.$router.push("/system/role-auth/user/" + roleId);
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.roleId != undefined) {
|
||||
this.form.menuIds = this.getMenuAllCheckedKeys();
|
||||
updateRole(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.form.menuIds = this.getMenuAllCheckedKeys();
|
||||
addRole(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.queryParams.leaseApplyDetails.splice(row.index, 1)
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/role/export', {
|
||||
...this.queryParams
|
||||
}, `role_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
/////// 设备类型树 切换
|
||||
deviceTypeChange(val) {
|
||||
|
||||
const nodes = this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||
console.log('this.deviceType1 =============', this.deviceType)
|
||||
if (nodes[0].level != 4) {
|
||||
return
|
||||
}
|
||||
|
||||
this.queryParams.leaseApplyDetails.push(
|
||||
this.handelTableItemData(nodes[0])
|
||||
)
|
||||
|
||||
// this.$refs.cascader.$refs.panel.clearCheckedNodes()
|
||||
// // 设置为空可以让节点不高亮显示
|
||||
// this.$refs.cascader.$refs.panel.activePath = []
|
||||
this.deviceType = {}
|
||||
|
||||
console.log('this.deviceType2 =============', this.deviceType)
|
||||
},
|
||||
//// 将数据处理成 表格中需要的数据
|
||||
handelTableItemData(node) {
|
||||
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
|
||||
template.createBy = this.user.name
|
||||
template.companyId = this.user.id
|
||||
template.typeId = node.data.id
|
||||
template.unitCn = node.data.unitName
|
||||
template.typeCn = node.pathLabels[2]
|
||||
template.guigeCn = node.pathLabels[3]
|
||||
return template
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ module.exports = {
|
|||
// target: `http://10.40.92.140:8080`,//丁/
|
||||
// target: `http://10.40.92.126:8080`,//高
|
||||
// target: `http://10.40.92.111:8080`,//亮
|
||||
target: `http://10.40.92.209:8080`,//亮
|
||||
target: `http://10.40.92.209:8080`,//刘川
|
||||
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue