新增预报废页面
This commit is contained in:
parent
b677a7ff11
commit
19edda855d
|
|
@ -0,0 +1,11 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
/* 预报废列表 */
|
||||
export const getForecastWasteListApi = (data) => {
|
||||
return request.post('/material/scrap/getScrapApplyList', data)
|
||||
}
|
||||
|
||||
/* 预报废列表查询框内数据 */
|
||||
export const getDialogListApi = (data) => {
|
||||
return request.get('/material/details/questList', data)
|
||||
}
|
||||
|
|
@ -180,3 +180,11 @@ aside {
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
i {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,143 +0,0 @@
|
|||
/** 退料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;
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="unitId">
|
||||
|
|
@ -22,7 +21,6 @@
|
|||
clearable
|
||||
filterable
|
||||
@change="getAgreementByUnit"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -40,7 +38,6 @@
|
|||
clearable
|
||||
filterable
|
||||
@change="getAgreementByProId"
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -72,7 +69,6 @@
|
|||
v-model="queryParams.agreementCode"
|
||||
placeholder="请选择协议号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料状态" prop="taskStatus">
|
||||
|
|
@ -80,7 +76,6 @@
|
|||
v-model="queryParams.taskStatus"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
|
|
@ -96,6 +91,7 @@
|
|||
<el-form-item label="退料申请时间" prop="timeRange">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
style="width: 205px"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
|
|
@ -163,19 +159,20 @@
|
|||
v-loading="loading"
|
||||
:data="typeList"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
width="45"
|
||||
align="center"
|
||||
:selectable="selectable"
|
||||
/>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="序号"
|
||||
sortable
|
||||
align="center"
|
||||
type="index"
|
||||
/>
|
||||
/> -->
|
||||
<el-table-column
|
||||
label="退料单号"
|
||||
align="center"
|
||||
|
|
@ -242,11 +239,46 @@
|
|||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="{ row }">
|
||||
<!-- 状态
|
||||
37-待审核
|
||||
38-已审核 -->
|
||||
<el-button type="text" v-if="scope.row.applyStatus == '0'">
|
||||
<el-tag
|
||||
type="info"
|
||||
size="mini"
|
||||
effect="dark"
|
||||
v-if="row.applyStatus == '0'"
|
||||
>待审核</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="success"
|
||||
size="mini"
|
||||
effect="dark"
|
||||
v-if="row.taskStatus == '40'"
|
||||
>退料完成</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="warning"
|
||||
size="mini"
|
||||
effect="dark"
|
||||
v-if="row.taskStatus == '39'"
|
||||
>退料核查</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="success"
|
||||
size="mini"
|
||||
effect="dark"
|
||||
v-if="row.applyStatus == '1' || row.applyStatus == '3'"
|
||||
>退料通过</el-tag
|
||||
>
|
||||
<el-tag
|
||||
type="danger"
|
||||
size="mini"
|
||||
effect="dark"
|
||||
v-if="row.applyStatus == '2' || row.applyStatus == '4'"
|
||||
>退料驳回</el-tag
|
||||
>
|
||||
<!-- <el-button type="text" v-if="scope.row.applyStatus == '0'">
|
||||
待审核
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
@ -258,11 +290,11 @@
|
|||
"
|
||||
>
|
||||
退料通过
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<!-- <el-button type="text" v-if="scope.row.taskStatus == '39'">
|
||||
退料核查
|
||||
</el-button> -->
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="text"
|
||||
style="color: red"
|
||||
v-if="
|
||||
|
|
@ -278,7 +310,7 @@
|
|||
v-if="scope.row.taskStatus == '40'"
|
||||
>
|
||||
退料完成
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -287,30 +319,29 @@
|
|||
prop="dictName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
width="250"
|
||||
>
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
plain
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleSee(scope.row, 'see')"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.applyStatus == '0'"
|
||||
v-hasPermi="['receive:examine:nbry-jjfgs']"
|
||||
v-hasPermi="[
|
||||
'receive:examine:nbry-jjfgs',
|
||||
'receive:examine:nbry-sbfgs',
|
||||
]"
|
||||
@click="handleUpdate(scope.row, 'update')"
|
||||
>审批</el-button
|
||||
>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
|
|
@ -318,10 +349,11 @@
|
|||
v-hasPermi="['receive:examine:nbry-sbfgs']"
|
||||
@click="handleUpdate(scope.row, 'update')"
|
||||
>审批</el-button
|
||||
>
|
||||
> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="info"
|
||||
type="text"
|
||||
icon="el-icon-tickets"
|
||||
@click="handlePrint(scope.row)"
|
||||
>退料单</el-button
|
||||
>
|
||||
|
|
@ -337,11 +369,11 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<!-- 审批对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:title="dialogTitle"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
width="90%"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
|
|
@ -349,7 +381,6 @@
|
|||
ref="queryForm1"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
|
|
@ -359,7 +390,7 @@
|
|||
v-model="dialogQueryParams.unitName"
|
||||
placeholder="请输入退料单位"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料工程" prop="lotName">
|
||||
|
|
@ -368,7 +399,7 @@
|
|||
v-model="dialogQueryParams.lotName"
|
||||
placeholder="请输入退料工程"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料协议编号" prop="agreementCode">
|
||||
|
|
@ -377,12 +408,12 @@
|
|||
v-model="dialogQueryParams.agreementCode"
|
||||
placeholder="请输入退料协议编号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预退料时间" prop="backTime">
|
||||
<el-date-picker
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
disabled
|
||||
v-model="dialogQueryParams.backTime"
|
||||
type="date"
|
||||
|
|
@ -399,7 +430,7 @@
|
|||
v-model="dialogQueryParams.backPerson"
|
||||
placeholder="请输入退料人"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退料人电话" prop="phone">
|
||||
|
|
@ -408,18 +439,15 @@
|
|||
v-model="dialogQueryParams.phone"
|
||||
placeholder="请输入退料人电话"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="dialogQueryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
|
@ -440,7 +468,7 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="loadingList" height="400px">
|
||||
<el-table v-loading="loading" :data="loadingList">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
|
|
@ -476,13 +504,13 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
<!-- <pagination
|
||||
v-show="loadingTotal > 0"
|
||||
:total="loadingTotal"
|
||||
:page.sync="dialogQueryParams.pageNum"
|
||||
:limit.sync="dialogQueryParams.pageSize"
|
||||
@pagination="getDialogList"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<div
|
||||
slot="footer"
|
||||
|
|
@ -490,9 +518,13 @@
|
|||
style="text-align: center"
|
||||
v-if="loadingType == 'update' && loadingList.length > 0"
|
||||
>
|
||||
<el-button type="primary" @click="submitForm">通过</el-button>
|
||||
<el-button type="danger" @click="submitForm2">不通过</el-button>
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button size="mini" type="primary" @click="submitForm"
|
||||
>通 过</el-button
|
||||
>
|
||||
<el-button size="mini" type="danger" @click="submitForm2"
|
||||
>驳 回</el-button
|
||||
>
|
||||
<el-button size="mini" @click="cancel">取消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
|
@ -506,7 +538,7 @@
|
|||
<!-- 提交 -->
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
:title="title"
|
||||
title="title"
|
||||
:visible.sync="openOne"
|
||||
append-to-body
|
||||
width="400px"
|
||||
|
|
@ -668,6 +700,9 @@
|
|||
loadingTotal: 0,
|
||||
rowObj: {},
|
||||
loadingType: '',
|
||||
|
||||
/* 对话框标题 */
|
||||
dialogTitle: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -740,6 +775,7 @@
|
|||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row, type) {
|
||||
this.dialogTitle = '退料审批'
|
||||
this.dialogQueryParams.unitName = row.unitName
|
||||
this.dialogQueryParams.lotName = row.lotName
|
||||
this.dialogQueryParams.agreementCode = row.agreementCode
|
||||
|
|
@ -754,6 +790,7 @@
|
|||
this.getDialogList()
|
||||
},
|
||||
handleSee(row, type) {
|
||||
this.dialogTitle = '退料查看'
|
||||
this.dialogQueryParams.unitName = row.unitName
|
||||
this.dialogQueryParams.lotName = row.lotName
|
||||
this.dialogQueryParams.agreementCode = row.agreementCode
|
||||
|
|
@ -806,76 +843,84 @@
|
|||
return
|
||||
}
|
||||
|
||||
let params = {
|
||||
ids: this.rowObj.id,
|
||||
backApplyDetails:this.loadingList
|
||||
}
|
||||
// console.log(params)
|
||||
ApiBackApplyAudit(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
/** 提交按钮 拒绝 */
|
||||
submitForm2() {
|
||||
const isNum = this.loadingList.some(
|
||||
(item) => item.num == '' || item.num == undefined
|
||||
);
|
||||
if (isNum) {
|
||||
this.$message.error('退料数量不能为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
ids: this.rowObj.id
|
||||
}
|
||||
ApiBackApplyRefuse(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
handleAdd() {
|
||||
let params = {
|
||||
ids: this.rowObj.id
|
||||
}
|
||||
ApiBackApplyAudit(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.$message.error(res.msg);
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
selectable(row){
|
||||
if(row.taskStatus==37){
|
||||
return true
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
},
|
||||
checkNum(row){
|
||||
const maxNum = row.num;
|
||||
if(row.num<=1){
|
||||
row.num = 1;
|
||||
}else if(row.num>=maxNum){
|
||||
row.num = maxNum;
|
||||
}
|
||||
},
|
||||
handleExam() {
|
||||
let params = {
|
||||
ids: this.ids.join(',')
|
||||
}
|
||||
ApiBackApplyAudit(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.ids = []
|
||||
this.$message.error(res.msg);
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
let params = {
|
||||
ids: this.rowObj.id,
|
||||
backApplyDetails: this.loadingList,
|
||||
}
|
||||
// console.log(params)
|
||||
ApiBackApplyAudit(params)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
/** 提交按钮 拒绝 */
|
||||
submitForm2() {
|
||||
const isNum = this.loadingList.some(
|
||||
(item) => item.num == '' || item.num == undefined,
|
||||
)
|
||||
if (isNum) {
|
||||
this.$message.error('退料数量不能为空!')
|
||||
return
|
||||
}
|
||||
let params = {
|
||||
ids: this.rowObj.id,
|
||||
}
|
||||
ApiBackApplyRefuse(params)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
handleAdd() {
|
||||
let params = {
|
||||
ids: this.rowObj.id,
|
||||
}
|
||||
ApiBackApplyAudit(params)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.open = false
|
||||
this.$message.error(res.msg)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
selectable(row) {
|
||||
if (row.taskStatus == 37) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
checkNum(row) {
|
||||
const maxNum = row.num
|
||||
if (row.num <= 1) {
|
||||
row.num = 1
|
||||
} else if (row.num >= maxNum) {
|
||||
row.num = maxNum
|
||||
}
|
||||
},
|
||||
handleExam() {
|
||||
let params = {
|
||||
ids: this.ids.join(','),
|
||||
}
|
||||
ApiBackApplyAudit(params)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.ids = []
|
||||
this.$message.error(res.msg)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
|
|
|
|||
|
|
@ -174,9 +174,11 @@
|
|||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知内容:">
|
||||
<div class="message-info">{{
|
||||
sendMessageParams.message
|
||||
}}</div>
|
||||
<div
|
||||
class="message-info"
|
||||
v-html="sendMessageParams.message"
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
@ -330,7 +332,7 @@
|
|||
})
|
||||
})
|
||||
|
||||
this.sendMessageParams.message = `宁夏送变电工程有限公司提示:您有一条任务单号为 ${taskCode} 的待办任务未处理,请及时处理。`
|
||||
this.sendMessageParams.message = `宁夏送变电工程有限公司提示:您有一条任务单号为 <span style="color:#529b2e">${taskCode}</span> 的待办任务未处理,请及时处理。`
|
||||
this.sendMessageParams.taskId = taskId
|
||||
|
||||
this.urgingDialogVisible = true
|
||||
|
|
@ -369,6 +371,8 @@
|
|||
border: 1px solid #ccc;
|
||||
letter-spacing: 1px;
|
||||
border-radius: 3px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.addressee {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,21 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- 盘点报废 -->
|
||||
<div class="app-container">
|
||||
盘点报废
|
||||
<!-- 盘点报废 -->
|
||||
<!-- <FormModel />
|
||||
<TableModel /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
import FormModel from '../component/formModel.vue'
|
||||
import TableModel from '../component/tableModel.vue'
|
||||
export default {
|
||||
components: {
|
||||
FormModel,
|
||||
TableModel,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:width="width"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
:before-close="handleClose"
|
||||
append-to-body
|
||||
>
|
||||
<slot></slot>
|
||||
<slot name="preview"></slot>
|
||||
<slot name="handleBtn"></slot>
|
||||
|
||||
<!-- 内层对话框 -->
|
||||
<el-dialog
|
||||
:title="innerTitle"
|
||||
:width="innerWidth"
|
||||
:visible.sync="innerDialogVisible"
|
||||
:before-close="handleCloseInner"
|
||||
append-to-body
|
||||
>
|
||||
<slot name="innerContent"></slot>
|
||||
<slot name="innerHandleBtn"></slot>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
innerTitle: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
innerDialogVisible: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return '70%'
|
||||
},
|
||||
},
|
||||
innerWidth: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return '30%'
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/* 右上角关闭外层 */
|
||||
handleClose() {
|
||||
/* 通知父组件更改弹框显示值 */
|
||||
this.$emit('closeDialog', false)
|
||||
},
|
||||
/* 右上角关闭内层 */
|
||||
handleCloseInner() {
|
||||
/* 通知父组件更改弹框显示值 */
|
||||
this.$emit('closeDialogInner', false)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
<template>
|
||||
<!-- 查询表单 -->
|
||||
<div>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item
|
||||
v-for="(item, v) in formLabel"
|
||||
:key="v"
|
||||
:label="item.f_label"
|
||||
:prop="item.f_model"
|
||||
>
|
||||
<el-input
|
||||
v-if="item.f_type === 'ipt'"
|
||||
v-model="queryParams[item.f_model]"
|
||||
:placeholder="`请输入${item.f_label}`"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-select
|
||||
v-if="item.f_type === 'sel'"
|
||||
v-model="queryParams[item.f_model]"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
:placeholder="`请选择${item.f_label}`"
|
||||
>
|
||||
<el-option
|
||||
v-for="(sel, v) in item.f_selList"
|
||||
:key="v"
|
||||
:label="sel.label"
|
||||
:value="sel.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-cascader
|
||||
v-if="item.f_type === 'selCas'"
|
||||
:options="item.f_selList"
|
||||
:props="item.optionProps"
|
||||
:show-all-levels="false"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-if="item.f_type === 'date'"
|
||||
v-model="queryParams[item.f_model]"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8" v-if="exportShow">
|
||||
<slot></slot>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
>导出数据</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
formLabel: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
/* 导出等按钮展示 */
|
||||
exportShow: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.formLabel.map((e) => {
|
||||
this.$set(this.queryParams, e.f_model, '')
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/* 查询按钮 */
|
||||
handleQuery() {
|
||||
console.log('查询')
|
||||
this.$emit('queryList', this.queryParams)
|
||||
},
|
||||
/* 重置按钮 */
|
||||
resetQuery() {
|
||||
this.$refs.queryForm.resetFields()
|
||||
this.$emit('queryList', this.queryParams, 'reset')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
@ -0,0 +1,220 @@
|
|||
<template>
|
||||
<!-- 部门选择框 -->
|
||||
<div>
|
||||
<el-row :gutter="20" type="flex" justify="space-around">
|
||||
<el-col :span="11" :xs="24" class="depart-left">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="tree-content">
|
||||
<el-tree
|
||||
:data="deptOptions"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
default-expand-all
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="11" :xs="24" class="depart-right">
|
||||
<div class="head-container right-header">
|
||||
<div>
|
||||
<span>已选</span>
|
||||
<span
|
||||
>{{ selDeptAmount }}/<i>{{ deptAmount }}</i></span
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-button type="text" size="mini" @click="clearDeptList()">
|
||||
清空
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<ul class="right-container">
|
||||
<li v-for="(dept, v) in selDeptList" :key="dept.id">
|
||||
<span>{{ dept.label }}</span>
|
||||
<el-button
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
size="mini"
|
||||
@click="deleteDept(v)"
|
||||
/>
|
||||
</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="footer-btn">
|
||||
<el-button size="mini" plain @click="handelCancel()"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-button size="mini" plain type="primary" @click="handelSubmit()"
|
||||
>确 定</el-button
|
||||
>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
deptName: '',
|
||||
deptOptions: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label',
|
||||
},
|
||||
deptAmount: 0,
|
||||
selDeptAmount: 0,
|
||||
selDeptList: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDeptTree()
|
||||
},
|
||||
methods: {
|
||||
/** 查询部门下拉树结构 */
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then((res) => {
|
||||
this.deptOptions = res.data
|
||||
this.getNodeAmount(res.data)
|
||||
})
|
||||
},
|
||||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
if (this.selDeptList.length < 1) {
|
||||
this.selDeptList.push(data)
|
||||
} else {
|
||||
let temp = false
|
||||
this.selDeptList.forEach((e) => {
|
||||
if (e.id === data.id) {
|
||||
temp = true
|
||||
}
|
||||
})
|
||||
|
||||
console.log(temp, 'temp')
|
||||
if (temp) {
|
||||
this.$message.error('该单位已选择,不可重复选择')
|
||||
return
|
||||
} else {
|
||||
this.selDeptList.push(data)
|
||||
}
|
||||
}
|
||||
|
||||
this.selDeptAmount++
|
||||
},
|
||||
// 筛选节点
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.label.indexOf(value) !== -1
|
||||
},
|
||||
|
||||
/* 递归部门获取所有数据 */
|
||||
getNodeAmount(list) {
|
||||
list.map((e) => {
|
||||
if (e.children) {
|
||||
this.deptAmount += e.children.length
|
||||
this.getNodeAmount(e.children)
|
||||
}
|
||||
})
|
||||
},
|
||||
/* 清空按钮 */
|
||||
clearDeptList() {
|
||||
this.selDeptAmount = 0
|
||||
this.selDeptList = []
|
||||
},
|
||||
/* 清除某一个 */
|
||||
deleteDept(index) {
|
||||
this.selDeptAmount -= 1
|
||||
this.selDeptList.splice(index, 1)
|
||||
},
|
||||
|
||||
/* 取消按钮 */
|
||||
handelCancel() {
|
||||
this.selDeptList = []
|
||||
this.$emit('closeDepartSel', false)
|
||||
},
|
||||
/* 确定按钮 */
|
||||
handelSubmit() {
|
||||
this.$emit('closeDepartSel', false, this.selDeptList)
|
||||
this.selDeptList = []
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
deptName(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.depart-left {
|
||||
border: 1px solid #f2f2f2;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.head-container {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
::v-deep .el-input {
|
||||
margin-bottom: 0 !important;
|
||||
width: 90%;
|
||||
}
|
||||
::v-deep .el-input--small .el-input__inner {
|
||||
border-radius: 32px;
|
||||
}
|
||||
|
||||
.tree-content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.depart-right {
|
||||
border: 1px solid #f2f2f2;
|
||||
}
|
||||
|
||||
.right-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 15px;
|
||||
|
||||
span {
|
||||
margin-left: 5px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.right-container {
|
||||
padding: 15px;
|
||||
|
||||
li {
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.footer-btn {
|
||||
padding: 15px 5px 0;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
<template>
|
||||
<div>
|
||||
<FormModel
|
||||
:formLabel="formLabel"
|
||||
@queryList="queryList"
|
||||
:exportShow="exportShow"
|
||||
>
|
||||
<template>
|
||||
<slot name="submitScrap"></slot>
|
||||
</template>
|
||||
</FormModel>
|
||||
<el-table
|
||||
:data="tableList"
|
||||
border
|
||||
ref="tableRef"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="45"
|
||||
align="center"
|
||||
v-if="isSelShow"
|
||||
/>
|
||||
<el-table-column
|
||||
:type="v === 0 ? 'index' : ''"
|
||||
v-for="(item, v) in tableProps"
|
||||
:key="v"
|
||||
:label="item.t_label"
|
||||
:prop="item.t_props"
|
||||
:width="item.t_width"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
v-if="handleColShow"
|
||||
:width="handleWidth"
|
||||
>
|
||||
<template slot-scope="{ row }">
|
||||
<slot :data="row"></slot>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-if="pageShow"
|
||||
:total="total"
|
||||
:page.sync="pageParams.pageNum"
|
||||
:limit.sync="pageParams.pageSize"
|
||||
@pagination="queryList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FormModel from './formModel.vue'
|
||||
export default {
|
||||
components: {
|
||||
FormModel,
|
||||
},
|
||||
props: {
|
||||
tableProps: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
formLabel: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
sendApi: {
|
||||
type: Function,
|
||||
default: () => {
|
||||
return function () {}
|
||||
},
|
||||
},
|
||||
handleColShow: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return true
|
||||
},
|
||||
},
|
||||
exportShow: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
pageShow: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
/* 是否需要复选框 */
|
||||
isSelShow: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
/* 操作栏宽度 */
|
||||
handleWidth: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
total: 1,
|
||||
tableList: [
|
||||
{ demo: 555 },
|
||||
{ demo: 555 },
|
||||
{ demo: 555 },
|
||||
{ demo: 555 },
|
||||
{ demo: 555 },
|
||||
],
|
||||
pageParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async queryList(val, reset) {
|
||||
if (reset) {
|
||||
this.pageParams.pageNum = 1
|
||||
this.pageParams.pageSize = 10
|
||||
}
|
||||
var params = Object.assign(val, this.pageParams)
|
||||
params.beginTime = params.time[0]
|
||||
params.endTime = params.time[1]
|
||||
const res = await this.sendApi(params)
|
||||
console.log(res, '列表数据')
|
||||
console.log('查询列表---', val)
|
||||
},
|
||||
|
||||
/* 表格复选框 */
|
||||
handleSelectionChange(row) {
|
||||
console.log(row, '列表复选框')
|
||||
this.$emit('getTableSelectionChange', row)
|
||||
},
|
||||
/* 清除选中状态 */
|
||||
clearSelType() {
|
||||
this.$refs.tableRef.clearSelection()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 预报废审核 -->
|
||||
<TableModel
|
||||
:tableProps="config.tableProps"
|
||||
:sendApi="getForecastWasteListApi"
|
||||
:formLabel="config.formLabel"
|
||||
:exportShow="true"
|
||||
:pageShow="true"
|
||||
:isSelShow="true"
|
||||
@getTableSelectionChange="getTableSelChangeOuter"
|
||||
>
|
||||
<template slot-scope="{ data }">
|
||||
<el-button type="text" size="mini" @click="handlePreview(data)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button type="text" size="mini" @click="handleAuditing(data)"
|
||||
>审核</el-button
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
|
||||
<DialogModel
|
||||
:title="title"
|
||||
:innerTitle="innerTitle"
|
||||
:dialogVisible="dialogVisible"
|
||||
:innerDialogVisible="innerDialogVisible"
|
||||
:width="dialogWidth"
|
||||
:innerWidth="`50%`"
|
||||
@closeDialog="closeDialog"
|
||||
@closeDialogInner="closeDialogInner"
|
||||
>
|
||||
<template slot="preview">
|
||||
<TableModel
|
||||
:tableProps="config.previewTableProps"
|
||||
:sendApi="getDialogListApi"
|
||||
:handleColShow="false"
|
||||
:formLabel="config.previewFormLabel"
|
||||
:isSelShow="isSelShow"
|
||||
ref="auditingTableRef"
|
||||
@getTableSelectionChange="getTableSelChangeInner"
|
||||
>
|
||||
</TableModel>
|
||||
</template>
|
||||
<template slot="handleBtn" v-if="handleBtn">
|
||||
<el-row class="handle-btn">
|
||||
<el-button size="mini" type="primary" @click="auditingPass"
|
||||
>通 过</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="auditingReject"
|
||||
>驳 回</el-button
|
||||
>
|
||||
</el-row>
|
||||
</template>
|
||||
<template slot="innerContent">
|
||||
<el-row>
|
||||
<el-col :span="4">请输入驳回原因</el-col>
|
||||
<el-col :span="20">
|
||||
<el-input
|
||||
v-model="rejectReason"
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
ref="rejectReasonRef"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<template slot="innerHandleBtn">
|
||||
<el-row class="handle-btn">
|
||||
<el-button size="mini" plain @click="handleCancelInner"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handleSubmitInner"
|
||||
>保 存</el-button
|
||||
>
|
||||
</el-row>
|
||||
</template>
|
||||
</DialogModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '../component/tableModel.vue'
|
||||
import DialogModel from '../component/dialogModel.vue'
|
||||
import { getSelList } from './index.js'
|
||||
import config from './index'
|
||||
import {
|
||||
getForecastWasteListApi,
|
||||
getDialogListApi,
|
||||
} from '@/api/scrap/forecastWaste.js'
|
||||
export default {
|
||||
name: 'scrapAuditing',
|
||||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
/* 主页列表接口 */
|
||||
getForecastWasteListApi,
|
||||
/* 弹框内列表接口 */
|
||||
getDialogListApi,
|
||||
/* 弹框标题 */
|
||||
title: '查看',
|
||||
/* 内层弹框标题 */
|
||||
innerTitle: '',
|
||||
/* 弹框显示隐藏 */
|
||||
dialogVisible: false,
|
||||
/* 内层弹框显示隐藏 */
|
||||
innerDialogVisible: false,
|
||||
/* 弹框宽度 */
|
||||
dialogWidth: '70%',
|
||||
/* 弹框内查询条件 */
|
||||
typeName: '',
|
||||
/* 审核通过与驳回按钮的控制显示 */
|
||||
handleBtn: false,
|
||||
/* 驳回原因 */
|
||||
rejectReason: '',
|
||||
/* 表格是否需要复选框 */
|
||||
isSelShow: true,
|
||||
/* 选中的审核数据 */
|
||||
selAuditingList: [],
|
||||
getSelList,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
/* 获取表单的下拉数据 */
|
||||
this.getSelList()
|
||||
},
|
||||
methods: {
|
||||
/* 查看 */
|
||||
handlePreview(val) {
|
||||
console.log(val, '查看')
|
||||
this.title = '查看'
|
||||
this.isSelShow = false
|
||||
this.dialogVisible = true
|
||||
},
|
||||
/* 审核 */
|
||||
handleAuditing(val) {
|
||||
this.title = '审核'
|
||||
this.isSelShow = true
|
||||
this.handleBtn = true
|
||||
console.log(val, '审核')
|
||||
this.dialogVisible = true
|
||||
},
|
||||
/* 自定义事件关闭弹框 (外层) */
|
||||
closeDialog(val) {
|
||||
this.dialogVisible = val
|
||||
},
|
||||
/* 自定义事件关闭弹框 (内层) */
|
||||
closeDialogInner(val) {
|
||||
this.innerDialogVisible = val
|
||||
},
|
||||
/* 审核通过 */
|
||||
auditingPass() {
|
||||
if (this.selAuditingList.length < 1) {
|
||||
this.$message.error('请勾选审核设备')
|
||||
return
|
||||
}
|
||||
console.log('审核通过')
|
||||
this.dialogVisible = false
|
||||
},
|
||||
/* 审核驳回 */
|
||||
auditingReject() {
|
||||
if (this.selAuditingList.length < 1) {
|
||||
this.$message.error('请勾选审核设备')
|
||||
return
|
||||
}
|
||||
console.log('审核驳回')
|
||||
this.innerTitle = '驳回原因'
|
||||
this.innerDialogVisible = true
|
||||
},
|
||||
|
||||
/* 驳回原因弹框内取消按钮 */
|
||||
handleCancelInner() {
|
||||
/* 关闭内弹框 */
|
||||
this.innerDialogVisible = false
|
||||
},
|
||||
/* 驳回弹框内保存按钮 */
|
||||
handleSubmitInner() {
|
||||
if (!this.rejectReason) {
|
||||
this.$message.error('驳回原因不能为空!')
|
||||
this.$refs.rejectReasonRef.focus()
|
||||
return
|
||||
} else {
|
||||
this.innerDialogVisible = false
|
||||
}
|
||||
},
|
||||
/* 主页列表复选框勾选事件 */
|
||||
getTableSelChangeOuter(list) {
|
||||
console.log(list, '主页列表勾选数据')
|
||||
},
|
||||
/* 审核时列表复选框勾选事件 */
|
||||
getTableSelChangeInner(list) {
|
||||
console.log(list, '审核列表勾选数据')
|
||||
this.selAuditingList = list
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
/* 监听驳回原因弹框关闭 清空驳回原因内容 */
|
||||
innerDialogVisible: {
|
||||
handler(newVal) {
|
||||
if (!newVal) {
|
||||
this.rejectReason = ''
|
||||
}
|
||||
},
|
||||
},
|
||||
/* 监听审核弹框关闭 清空列表的复选框选中状态 */
|
||||
dialogVisible: {
|
||||
handler(newVal) {
|
||||
if (!newVal) {
|
||||
this.$refs.auditingTableRef.clearSelType()
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.handle-btn {
|
||||
margin-top: 15px;
|
||||
padding-top: 8px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #393737;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
|
||||
import {
|
||||
getUnitInfoSelectApi,
|
||||
listPartTypeApi,
|
||||
} from '@/api/repairTest/repair'
|
||||
import { getProjectList } from '@/api/claimAndRefund/receive'
|
||||
|
||||
let unitList = [] //单位下拉数据
|
||||
let proList = [] //工程下拉数据
|
||||
let typeList = [] //类型下拉数据
|
||||
const config = {
|
||||
/* 预报废审核主页 列表参数 */
|
||||
tableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '预报废单号' },
|
||||
{ t_width: '', t_props: '', t_label: '报废来源' },
|
||||
{ t_width: '', t_props: '', t_label: '单号' },
|
||||
{ t_width: '', t_props: '', t_label: '退料单位名称' },
|
||||
{ t_width: '', t_props: '', t_label: '退料工程名称' },
|
||||
{ t_width: '', t_props: '', t_label: '设备类型' },
|
||||
{ t_width: '', t_props: '', t_label: '任务创建人' },
|
||||
{ t_width: '', t_props: '', t_label: '任务创建时间' },
|
||||
{ t_width: '', t_props: '', t_label: '审核状态' },
|
||||
{ t_width: '', t_props: '', t_label: '不通过原因' },
|
||||
],
|
||||
/* 预报废审核主页表单 查询参数 */
|
||||
formLabel: [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },
|
||||
{ f_label: '报废来源', f_model: 'laiyuan', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '审批状态', f_model: 'shentype', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
|
||||
],
|
||||
/* 预报废审核弹框内 列表参数 */
|
||||
previewTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '设备类型' },
|
||||
{ t_width: '', t_props: '', t_label: '设备编码' },
|
||||
{ t_width: '', t_props: '', t_label: '设备数量' },
|
||||
{ t_width: '', t_props: '', t_label: '审批状态' },
|
||||
{ t_width: '', t_props: '', t_label: '报废原因' },
|
||||
{ t_width: '', t_props: '', t_label: '报废图片' },
|
||||
{ t_width: '', t_props: '', t_label: '备注' },
|
||||
],
|
||||
/* 预报废审核弹框表单 查询参数 */
|
||||
previewFormLabel: [
|
||||
{ f_label: '类型名称', f_model: 'keywords', f_type: 'ipt' },
|
||||
],
|
||||
|
||||
/* 预报废列表主页 列表参数 */
|
||||
listingTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '预报废单号' },
|
||||
{ t_width: '', t_props: '', t_label: '报废类型' },
|
||||
{ t_width: '', t_props: '', t_label: '预报废审核单号' },
|
||||
{ t_width: '', t_props: '', t_label: '退料单位名称' },
|
||||
{ t_width: '', t_props: '', t_label: '退料单位名称' },
|
||||
{ t_width: '', t_props: '', t_label: '退料工程名称' },
|
||||
{ t_width: '', t_props: '', t_label: '机具类型' },
|
||||
{ t_width: '', t_props: '', t_label: '任务创建人' },
|
||||
{ t_width: '', t_props: '', t_label: '任务创建时间' },
|
||||
{ t_width: '', t_props: '', t_label: '审核状态' },
|
||||
],
|
||||
/* 预报废列表主页表单 查询参数 */
|
||||
listingFormLabel: [
|
||||
{ f_label: '关键字', f_model: 'keywords', f_type: 'ipt' },
|
||||
{ f_label: '单位名称', f_model: 'backUnit', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工程名称', f_model: 'backPro', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '工机具类型', f_model: 'type', f_type: 'selCas', f_selList: [], optionProps: { value: 'id', } },
|
||||
{ f_label: '报废单号', f_model: 'laiyuan', f_type: 'ipt', f_selList: [] },
|
||||
{ f_label: '审批状态', f_model: 'shentype', f_type: 'sel', f_selList: [] },
|
||||
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },
|
||||
{ f_label: '报废类型', f_model: 'shentype', f_type: 'sel', f_selList: [] },
|
||||
],
|
||||
/* 预报废列表查看弹框内 列表参数 */
|
||||
previewTableProps: [
|
||||
{ t_width: '55px', t_props: '', t_label: '序号' },
|
||||
{ t_width: '', t_props: 'demo', t_label: '设备类型' },
|
||||
{ t_width: '', t_props: '', t_label: '规格型号' },
|
||||
{ t_width: '', t_props: '', t_label: '设备编码' },
|
||||
{ t_width: '', t_props: '', t_label: '设备数量' },
|
||||
{ t_width: '', t_props: '', t_label: '报废原因' },
|
||||
{ t_width: '', t_props: '', t_label: '报废图片' },
|
||||
{ t_width: '', t_props: '', t_label: '备注' },
|
||||
],
|
||||
}
|
||||
|
||||
export const getSelList = () => {
|
||||
new Promise(async (resolve) => {
|
||||
const { data: unitRes } = await getUnitInfoSelectApi()
|
||||
unitList = unitRes.map((e) => {
|
||||
e.value = e.unitId
|
||||
e.label = e.unitName
|
||||
return e
|
||||
})
|
||||
const { data: proRes } = await getProjectList()
|
||||
proList = proRes.map((e) => {
|
||||
e.value = e.projectId
|
||||
e.label = e.projectName
|
||||
return e
|
||||
})
|
||||
const { data: typeRes } = await listPartTypeApi()
|
||||
typeList = typeRes
|
||||
resolve()
|
||||
}).then(() => {
|
||||
config.formLabel.map((item) => {
|
||||
if (item.f_model === 'backUnit') {
|
||||
item.f_selList = unitList
|
||||
return item
|
||||
}
|
||||
if (item.f_model === 'backPro') {
|
||||
item.f_selList = proList
|
||||
return item
|
||||
}
|
||||
if (item.f_model === 'type') {
|
||||
item.f_selList = typeList
|
||||
return item
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
export default config
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<!-- 预报废管理 -->
|
||||
预报废管理
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 预报废列表 -->
|
||||
<TableModel
|
||||
:tableProps="config.listingTableProps"
|
||||
:formLabel="config.listingFormLabel"
|
||||
:exportShow="true"
|
||||
:pageShow="true"
|
||||
:isSelShow="true"
|
||||
:handleWidth="`180px`"
|
||||
@getTableSelectionChange="getTableSelectionChange"
|
||||
>
|
||||
<template slot="submitScrap">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
size="mini"
|
||||
@click="submitScrap"
|
||||
>提交报废</el-button
|
||||
>
|
||||
</el-col>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ data }">
|
||||
<el-button
|
||||
v-for="btn in handleBtn"
|
||||
:key="btn.id"
|
||||
type="text"
|
||||
size="mini"
|
||||
@click="handleBtnEvent(data, btn.id)"
|
||||
>{{ btn.btn_title }}</el-button
|
||||
>
|
||||
</template>
|
||||
</TableModel>
|
||||
|
||||
<!-- 查看弹框 -->
|
||||
<DialogModel
|
||||
:title="title"
|
||||
:dialogVisible="dialogVisible"
|
||||
:width="dialogWidth"
|
||||
@closeDialog="closeDialog"
|
||||
>
|
||||
<!-- 查看内容 -->
|
||||
<template slot="preview" v-if="previewDetails">
|
||||
<TableModel
|
||||
:tableProps="config.previewTableProps"
|
||||
:handleColShow="false"
|
||||
:formLabel="config.previewFormLabel"
|
||||
>
|
||||
</TableModel
|
||||
></template>
|
||||
|
||||
<!-- 审批详情 -->
|
||||
<template v-if="auditingShow">
|
||||
<el-table :data="audDetails">
|
||||
<el-table-column
|
||||
prop="title"
|
||||
align="center"
|
||||
label="审批部门"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="result"
|
||||
align="center"
|
||||
label="审批状态"
|
||||
/>
|
||||
<el-table-column align="center" label="审批意见" />
|
||||
</el-table>
|
||||
</template>
|
||||
|
||||
<!-- 部门选择 -->
|
||||
<template v-if="selDepart">
|
||||
<SelDepart @closeDepartSel="closeDepartSel" />
|
||||
</template>
|
||||
</DialogModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TableModel from '../component/tableModel.vue'
|
||||
import DialogModel from '../component/dialogModel.vue'
|
||||
import SelDepart from '../component/selDepart.vue'
|
||||
import config from './index'
|
||||
export default {
|
||||
name: 'scrapListing',
|
||||
components: {
|
||||
TableModel,
|
||||
DialogModel,
|
||||
SelDepart,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
title: '',
|
||||
dialogWidth: '70%',
|
||||
dialogVisible: false,
|
||||
previewDetails: false,
|
||||
auditingShow: false,
|
||||
selDepart: false,
|
||||
tableSelList: [],
|
||||
audDetails: [
|
||||
{ title: '测试部门', result: '通过' },
|
||||
{ title: '施工管理审批', result: '通过' },
|
||||
{ title: '安全检查部门', result: '通过' },
|
||||
],
|
||||
handleBtn: [
|
||||
{ btn_title: '查看', id: 1 },
|
||||
{ btn_title: '提交报废', id: 2 },
|
||||
{ btn_title: '审批详情', id: 3 },
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 列表按钮操作 */
|
||||
handleBtnEvent(val, id) {
|
||||
switch (id) {
|
||||
case 1:
|
||||
this.title = '查看'
|
||||
this.dialogWidth = '70%'
|
||||
this.previewDetails = true
|
||||
break
|
||||
case 2:
|
||||
this.title = '选择审批部门'
|
||||
this.dialogWidth = '50%'
|
||||
this.selDepart = true
|
||||
break
|
||||
case 3:
|
||||
this.title = '审批详情'
|
||||
this.dialogWidth = '50%'
|
||||
this.auditingShow = true
|
||||
break
|
||||
}
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
|
||||
/* 关闭弹框 */
|
||||
closeDialog(val) {
|
||||
this.dialogVisible =
|
||||
this.previewDetails =
|
||||
this.auditingShow =
|
||||
this.selDepart =
|
||||
val
|
||||
},
|
||||
/* 关闭选择审批部门弹框 */
|
||||
closeDepartSel(val, list) {
|
||||
console.log(list, '选择的部门')
|
||||
this.selDepart = this.dialogVisible = val
|
||||
},
|
||||
/* 批量提交报废按钮 */
|
||||
submitScrap() {
|
||||
if (this.tableSelList.length < 1) {
|
||||
this.$message.error('请勾选列表数据!')
|
||||
} else {
|
||||
this.dialogWidth = '50%'
|
||||
this.selDepart = true
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
/* 表格复选框选中的数据 */
|
||||
getTableSelectionChange(val) {
|
||||
this.tableSelList = val
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
Loading…
Reference in New Issue