Merge remote-tracking branch 'origin/dev-nx' into dev-nx

This commit is contained in:
赵福海 2024-05-15 10:13:41 +08:00
commit c69007a1b9
18 changed files with 3489 additions and 229 deletions

View File

@ -766,7 +766,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND sd.dept_name = #{maTypeName}
</if>
<if test="materialCode != null and materialCode != ''">
AND lai.`code` LIKE CONCAT('%',#{materialCode},'%')
AND ba.`code` LIKE CONCAT('%',#{materialCode},'%')
</if>
<if test="unitId != null and unitId != ''">
AND bai.unit_id = #{unitId}

View File

@ -35,15 +35,14 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
/**
* 报废任务详细
*
*
* @author bonus
* @date 2023-12-15
*/
@RestController
@Api(value = "报废任务详细")
@RequestMapping("/scrap")
public class ScrapApplyDetailsController extends BaseController
{
public class ScrapApplyDetailsController extends BaseController {
@Resource
private IScrapApplyDetailsService scrapApplyDetailsService;
@ -52,15 +51,14 @@ public class ScrapApplyDetailsController extends BaseController
*/
@ApiOperation("查询报废任务列表")
@GetMapping("/getScrapTaskList")
public TableDataInfo list(ScrapApplyDetails scrapApplyDetails)
{
public TableDataInfo list(ScrapApplyDetails scrapApplyDetails) {
startPage();
Map<String, Object> params = scrapApplyDetails.getParams();
if (!params.isEmpty()){
if (!params.isEmpty()) {
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
params.put("beginTime", beginTime+" 00:00:00");
params.put("endTime", endTime+" 23:59:59");
params.put("beginTime", beginTime + " 00:00:00");
params.put("endTime", endTime + " 23:59:59");
scrapApplyDetails.setParams(params);
}
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
@ -72,14 +70,13 @@ public class ScrapApplyDetailsController extends BaseController
*/
@Log(title = "导出报废任务列表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ScrapApplyDetails bean)
{
public void export(HttpServletResponse response, ScrapApplyDetails bean) {
Map<String, Object> params = bean.getParams();
if (params!=null && !params.isEmpty()){
if (params != null && !params.isEmpty()) {
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
params.put("beginTime", beginTime+" 00:00:00");
params.put("endTime", endTime+" 23:59:59");
params.put("beginTime", beginTime + " 00:00:00");
params.put("endTime", endTime + " 23:59:59");
bean.setParams(params);
}
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.exportScrapApplyDetailsList(bean);
@ -92,8 +89,7 @@ public class ScrapApplyDetailsController extends BaseController
*/
@ApiOperation("查看报废任务详细列表")
@GetMapping("/getScrapAuditList")
public TableDataInfo getScrapAuditList(ScrapApplyDetails scrapApplyDetails)
{
public TableDataInfo getScrapAuditList(ScrapApplyDetails scrapApplyDetails) {
startPage();
List<ScrapApplyDetails> list = scrapApplyDetailsService.getScrapAuditList(scrapApplyDetails);
return getDataTable(list);
@ -114,8 +110,7 @@ public class ScrapApplyDetailsController extends BaseController
*/
@ApiOperation("查看报废明细")
@GetMapping("/getScrapRecord")
public TableDataInfo getScrapRecord(ScrapApplyDetails scrapApplyDetails)
{
public TableDataInfo getScrapRecord(ScrapApplyDetails scrapApplyDetails) {
startPage();
List<RepairRecord> list = scrapApplyDetailsService.getScrapRecord(scrapApplyDetails);
return getDataTable(list);
@ -126,8 +121,7 @@ public class ScrapApplyDetailsController extends BaseController
*/
@ApiOperation("查看报废照片")
@GetMapping("/getFileUrl")
public AjaxResult getFileUrl(String fileIds)
{
public AjaxResult getFileUrl(String fileIds) {
List<String> list = scrapApplyDetailsService.getFileUrl(fileIds);
return AjaxResult.success(list);
}
@ -137,15 +131,14 @@ public class ScrapApplyDetailsController extends BaseController
*/
@ApiOperation("查询预报废任务列表")
@PostMapping("/getScrapApplyList")
public TableDataInfo getScrapApplyList(ScrapApplyDetails scrapApplyDetails)
{
public TableDataInfo getScrapApplyList(ScrapApplyDetails scrapApplyDetails) {
startPage();
Map<String, Object> params = scrapApplyDetails.getParams();
if (!params.isEmpty()){
if (!params.isEmpty()) {
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
params.put("beginTime", beginTime+" 00:00:00");
params.put("endTime", endTime+" 23:59:59");
params.put("beginTime", beginTime + " 00:00:00");
params.put("endTime", endTime + " 23:59:59");
scrapApplyDetails.setParams(params);
}
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.getScrapApplyList(scrapApplyDetails);
@ -169,7 +162,7 @@ public class ScrapApplyDetailsController extends BaseController
@ApiOperation("报废任务提交审计信息")
@Log(title = "报废任务提交审计信息", businessType = BusinessType.UPDATE)
@PostMapping("/submitScrapTask")
public AjaxResult submitScrapTask(@RequestBody ScrapAudit scrapAudit){
public AjaxResult submitScrapTask(@RequestBody ScrapAudit scrapAudit) {
return toAjax(scrapApplyDetailsService.submitScrapTask(scrapAudit));
}
@ -178,15 +171,14 @@ public class ScrapApplyDetailsController extends BaseController
*/
@ApiOperation("查询报废审核任务列表")
@PostMapping("/scrapTaskReviewList")
public TableDataInfo scrapTaskReviewList(ScrapApplyDetails scrapApplyDetails)
{
public TableDataInfo scrapTaskReviewList(ScrapApplyDetails scrapApplyDetails) {
startPage();
Map<String, Object> params = scrapApplyDetails.getParams();
if (!params.isEmpty()){
if (!params.isEmpty()) {
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
params.put("beginTime", beginTime+" 00:00:00");
params.put("endTime", endTime+" 23:59:59");
params.put("beginTime", beginTime + " 00:00:00");
params.put("endTime", endTime + " 23:59:59");
scrapApplyDetails.setParams(params);
}
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.scrapTaskReviewList(scrapApplyDetails);
@ -214,11 +206,11 @@ public class ScrapApplyDetailsController extends BaseController
public TableDataInfo obtainDisposalList(@RequestBody ScrapApplyDetails scrapApplyDetails) {
startPage();
Map<String, Object> params = scrapApplyDetails.getParams();
if (!params.isEmpty()){
if (!params.isEmpty()) {
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
params.put("beginTime", beginTime+" 00:00:00");
params.put("endTime", endTime+" 23:59:59");
params.put("beginTime", beginTime + " 00:00:00");
params.put("endTime", endTime + " 23:59:59");
scrapApplyDetails.setParams(params);
}
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.obtainDisposalList(scrapApplyDetails);
@ -242,14 +234,13 @@ public class ScrapApplyDetailsController extends BaseController
*/
@Log(title = "导出预报废审核列表", businessType = BusinessType.EXPORT)
@PostMapping("/exportForecastWaste")
public void exportForecastWaste(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails)
{
public void exportForecastWaste(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) {
Map<String, Object> params = scrapApplyDetails.getParams();
if (params!=null && !params.isEmpty()){
if (params != null && !params.isEmpty()) {
String beginTime = (String) params.get("beginTime");
String endTime = (String) params.get("endTime");
params.put("beginTime", beginTime+" 00:00:00");
params.put("endTime", endTime+" 23:59:59");
params.put("beginTime", beginTime + " 00:00:00");
params.put("endTime", endTime + " 23:59:59");
scrapApplyDetails.setParams(params);
}
//获取预报废列表

View File

@ -31,6 +31,11 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "任务ID")
private Long taskId;
/**
* 审核状态
*/
private Integer taskStatus;
/** 上级ID */
@ApiModelProperty(value = "上级ID")
private Long parentId;
@ -51,6 +56,10 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "(1退料2,维修审核3盘点)")
private String scrapSource;
/** 报废单号 */
@ApiModelProperty(value = "报废单号")
private String scrapCode;
/** 0自然1人为 */
@ApiModelProperty(value = "0=自然1人为")
private String scrapType;
@ -109,13 +118,19 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "数据状态")
private Integer repairStatus;
private String keyword;
private String keywords;
private String typeName;
/** 任务ID集合 --导出时可以选择导出*/
@ApiModelProperty(value = "任务ID集合")
private String taskIdList;
@ApiModelProperty(value = "开始时间")
private String beginTime;
@ApiModelProperty(value = "结束时间")
private String endTime;
public void setId(Long id)
{

View File

@ -59,6 +59,14 @@ public class ScrapApplyDetailsVO {
*/
@Excel(name = "维修单号",sort = 6)
private String repairNum;
/**
* 单位id
*/
private String unitId;
/**
* 工程id
*/
private String projectId;
/**
* 审核状态

View File

@ -72,30 +72,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
sad.scrap_source IN ( '1', '2' )
AND tk.task_type = 57
<if test="keyword != null and keyword != ''">
AND (locate(#{keyword}, tk.create_by) > 0
or locate(#{keyword}, tk.CODE) > 0
or locate(#{keyword}, bui.unit_name) > 0
or locate(#{keyword}, bpl.lot_name) > 0
or locate(#{keyword}, tk1.CODE) > 0)
<if test="keywords != null and keywords != ''">
AND (locate(#{keywords}, tk.create_by) > 0
or locate(#{keywords}, tk.CODE) > 0
or locate(#{keywords}, bui.unit_name) > 0
or locate(#{keywords}, bpl.lot_name) > 0
or locate(#{keywords}, tk1.CODE) > 0)
</if>
<if test="backUnit != null and backUnit != ''">
and bui.unit_id = #{backUnit}
</if>
<if test="repairStatus != null and repairStatus != ''">
and tk.task_status = #{repairStatus}
</if>
<if test="backPro != null and backPro != ''">
and bpl.lot_id = #{backPro}
</if>
<if test="scrapCode != null and scrapCode != ''">
and tk.CODE like concat('%', #{scrapCode}, '%')
</if>
<if test="taskStatus != null and taskStatus != ''">
and tk.task_status = #{taskStatus}
</if>
<if test="scrapSource != null and scrapSource != ''">
and sad.scrap_source = #{scrapSource}
</if>
<if test="type != null and type != ''">
and mt1.type_id = #{type}
</if>
<if test="backCode != null and backCode != ''">
and locate(#{backCode}, tk.code) > 0
</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
and tk.create_time between #{params.beginTime} and #{params.endTime}
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE(tk.create_time) between #{beginTime} and #{endTime}
</if>
GROUP BY tk.CODE
order by tk.create_time desc
@ -422,7 +428,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tk.CODE scrapNum,
tk.task_status taskStatus,
dic.NAME taskStatusName,
bui.unit_id unitId,
bui.unit_name unitName,
bpl.lot_id projectId,
bpl.lot_name projectName,
su.nick_name createBy,
tk.create_time createTime,
@ -457,18 +465,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE
sad.scrap_source IN ( '1', '2' )
AND tk.task_type IN ('20' , '21')
<if test="keyword != null and keyword != ''">
AND (locate(#{keyword}, tk.create_by) > 0
or locate(#{keyword}, tk.CODE) > 0
or locate(#{keyword}, bui.unit_name) > 0
or locate(#{keyword}, bpl.lot_name) > 0
or locate(#{keyword}, tk1.CODE) > 0)
<if test="keywords != null and keywords != ''">
AND (locate(#{keywords}, tk.create_by) > 0
or locate(#{keywords}, tk.CODE) > 0
or locate(#{keywords}, bui.unit_name) > 0
or locate(#{keywords}, bpl.lot_name) > 0
or locate(#{keywords}, tk1.CODE) > 0)
</if>
<if test="backUnit != null and backUnit != ''">
and bui.unit_id = #{backUnit}
</if>
<if test="repairStatus != null and repairStatus != ''">
and tk.task_status = #{repairStatus}
<if test="taskStatus != null and taskStatus != ''">
and tk.task_status = #{taskStatus}
</if>
<if test="taskIdList != null and taskIdList != ''">
and tk.task_id in #{taskIdList}
@ -476,14 +484,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="backPro != null and backPro != ''">
and bpl.lot_id = #{backPro}
</if>
<if test="scrapSource != null and scrapSource != ''">
and sad.scrap_source = #{scrapSource}
</if>
<if test="type != null and type != ''">
and mt1.type_id = #{type}
</if>
<if test="backCode != null and backCode != ''">
and locate(#{backCode}, tk.code) > 0
</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
and tk.create_time between #{params.beginTime} and #{params.endTime}
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
and DATE(tk.create_time) between #{beginTime} and #{endTime}
</if>
GROUP BY tk.CODE
order by tk.create_time desc

View File

@ -17,7 +17,7 @@
<div class="box1-item_two">
<div>
<div class="box_header_div">
<div class="box_list" v-for="(item, index) of newArr" :key="index" @click="handleClickItem">
<div class="box_list" v-for="(item, index) of newArr" :key="index" @click="handleClickItem(index)">
<div class="item-value">
{{ item.value }}
</div>
@ -48,7 +48,7 @@ export default {
isCollapse: false,
newArrOne: [
{ name: '施工机具总保有量', value: 9999 },
// { url: GROUP, name: '', value: 9999 },
{ url: GROUP, name: '工器具总保有量', value: 9999 },
],
newArr: [
{ url: GROUP, name: '在库机具', value: 999 },
@ -62,7 +62,6 @@ export default {
{ url: GROUP, name: '报废机具', value: 999 },
{ url: GROUP, name: '报废机具', value: 999 },
],
maType: 1
}
},
mounted() {
@ -73,12 +72,6 @@ export default {
setInterval(() => {
this.getTotalOwnershipApiPage()
}, 60 * 1000);
this.$eventBus.$on('maType', (maType) => {
this.maType = maType
});
},
destroyed() {
this.$eventBus.$off('maType');
},
methods: {
getTotalOwnershipApiPage() {
@ -116,10 +109,13 @@ export default {
this.$refs['box1'].style.height = height
}
},
handleClickItem() {
setTimeout(() => {
this.$refs.inventoryDialog.setOpen({ open: true, maType: this.maType })
}, 10)
handleClickItem(index) {
// console.log('🚀 ~ handleClickItem ~ index:', index);
if (index < 5) {
this.$refs.inventoryDialog.setOpen({ open: true, maType: 1 })
} else {
this.$refs.inventoryDialog.setOpen({ open: true, maType: 2 })
}
}
}
}

View File

@ -1,7 +1,7 @@
<template>
<div class="count-title">
<p>{{ sonTitle }}</p>
<div class="count-flop" :key="compKey" @click="handleClick">
<div class="count-flop" :key="compKey">
<div
:class="item != ',' ? 'count-flop-box' : 'count-flop-point'"
v-for="(item, index) in value"
@ -41,7 +41,6 @@ export default {
value: [],
numberList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
compKey: 0,
maType: ''
};
},
props: ["val", "suffix", 'sonTitle'],
@ -53,18 +52,13 @@ export default {
},
mounted() {
this.value = this.val.toString().split("");
this.$eventBus.$on('maType', (maType) => {
this.maType = maType
});
},
destroyed() {
this.$eventBus.$off('maType');
},
methods: {
handleClick() {
handleClick(maType) {
console.log('🚀 ~ handleClick ~ maType:', maType);
const params = {
open: true,
maType: this.maType
maType
}
this.$refs.materialsDialog.setOpen(params);
}

View File

@ -1,7 +1,7 @@
<template>
<div class="count-title">
<p>{{ sonTitle }}</p>
<div class="count-flop" :key="compKey" @click="handleClick">
<div class="count-flop" :key="compKey">
<div
:class="item != ',' ? 'count-flop-box' : 'count-flop-point'"
v-for="(item, index) in value"
@ -62,10 +62,10 @@ export default {
this.$eventBus.$off('maType');
},
methods: {
handleClick() {
handleClick(maType) {
const params = {
open: true,
maType: this.maType
maType
}
this.$refs.returnMaterialsDialog.setOpen(params);
}

View File

@ -4,9 +4,11 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">领料数据</h5>
</div>
<CountFlopOne :val="num" sonTitle="施工机具今日出库"></CountFlopOne>
<div class="access-rate-box-top">
<CountFlopOne :val="num2" sonTitle="工器具今日出库"></CountFlopOne>
<div @click="handleClick(1)">
<CountFlopOne :val="num" sonTitle="施工机具今日出库" ref="countFlop"></CountFlopOne>
</div>
<div class="access-rate-box-top" @click="handleClick(2)">
<CountFlopOne :val="num2" sonTitle="工器具今日出库" ref="countFlopTools"></CountFlopOne>
</div>
</div>
</div>
@ -54,7 +56,11 @@ export default {
}
},
handleClick(maType) {
this.$refs.countFlopOne.handleClick(maType)
if (maType == 1) {
this.$refs.countFlop.handleClick(maType)
} else {
this.$refs.countFlopTools.handleClick(maType)
}
}
}
}

View File

@ -4,7 +4,7 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">当月报废分析</h5>
</div>
<div id="accessRateEcharts" @click="handleClick">
<div id="accessRateEcharts">
<scrapAnalysisDialog ref="scrapAnalysisDialog" />
</div>
</div>
@ -234,11 +234,10 @@ export default {
}
let myCharts = echarts.init(document.querySelector('#accessRateEcharts'));
myCharts.setOption(echartOption)
myCharts.off('click').on('click', () => {
this.$refs.scrapAnalysisDialog.setOpen({ open: true, maType: this.maType})
})
},
handleClick() {
console.log('handleClick--报废分析')
this.$refs.scrapAnalysisDialog.setOpen({ open: true, maType: this.maType})
}
}
}
</script>

View File

@ -4,9 +4,11 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">退料数据</h5>
</div>
<CountFlopTwo :val="num" sonTitle="施工机具今日入库"></CountFlopTwo>
<div class="access-rate-box-top">
<CountFlopTwo :val="num2" sonTitle="工器具今日退料"></CountFlopTwo>
<div @click="handleClick(1)">
<CountFlopTwo :val="num" sonTitle="施工机具今日入库" ref="countFlop"></CountFlopTwo>
</div>
<div class="access-rate-box-top" @click="handleClick(2)">
<CountFlopTwo :val="num2" sonTitle="工器具今日退料" ref="countFlopTools"></CountFlopTwo>
</div>
</div>
</div>
@ -53,7 +55,11 @@ export default {
})
},
handleClick(maType) {
this.$refs.countFlopOne.handleClick(maType)
if (maType == 1) {
this.$refs.countFlop.handleClick(maType)
} else {
this.$refs.countFlopTools.handleClick(maType)
}
}
}

View File

@ -127,12 +127,18 @@ export default {
{
type: "category",
gridIndex: 0,
data: this.carNoList
// data: this.carNoList
axisLabel: {
show: false
}
},
{
gridIndex: 1,
type: "category",
data: this.carNoList
// data: this.carNoList
axisLabel: {
show: false
}
},
{
"name": "y",
@ -147,7 +153,8 @@ export default {
axisLabel: {
show: true,
color: '#c1c1c1',
fontSize: 14,
fontSize: 12,
margin: 5,
},
data: this.carNoList
}

File diff suppressed because it is too large Load Diff

View File

@ -714,7 +714,7 @@ export default {
try {
let params = {
companyId: this.companyId,
// companyId: this.companyId,
...this.queryParams,
}
const res = await ApiGetBackApplyList(params)

View File

@ -400,7 +400,7 @@
})
})
this.sendMessageParams.message = `宁夏送变电工程有限公司提示:您有一条任务单号为 <span style="color:#529b2e">${taskCode}</span> 的待办任务未处理,请及时处理`
this.sendMessageParams.message = `宁夏送变电工程有限公司提示:您有一条任务单号为 <span style="color:#529b2e">${taskCode}</span> 的待办任务未处理,请及时处理`
this.sendMessageParams.taskId = taskId
this.urgingDialogVisible = true

View File

@ -21,13 +21,13 @@ export const config = {
{ 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: 'scrapNum', f_type: 'ipt', f_selList: [] },
{ f_label: '报废单号', f_model: 'scrapCode', f_type: 'ipt', f_selList: [] },
{
f_label: '审批状态', f_model: 'taskStatus', f_type: 'sel', f_selList: [
{ label: '待审核', value: 120 },
{ label: '审核中', value: 121 },
{ label: '已驳回', value: 123 },
{ label: '已通过', value: 122 },
// { label: '待审核', value: 120 },
{ label: '审核中', value: 58 },
{ label: '已驳回', value: 61 },
{ label: '已通过', value: 59 },
]
},
{ f_label: '创建时间', f_model: 'time', f_type: 'date' },

View File

@ -102,7 +102,7 @@
:sendApi="getDialogListApi"
:config="dialogConfig"
>
<template slot="imgPreview" >
<template slot="imgPreview">
<ImagePreview
:src="`https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg`"
:width="`60px`"
@ -135,126 +135,125 @@
</template>
<script>
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import SelDepart from '../../component/selDepart.vue'
import AuditingReturn from '../auditingReturn/index.vue' // 退
import AuditingDetails from '../../component/auditingDetails.vue'
import {
getPreScrapListApi,
getDialogListApi,
submitScrapApi,
} from '@/api/scrap/forecastWaste.js'
import { config, dialogConfig, getSelList } from './config'
export default {
name: 'scrapListing',
components: {
TableModel,
DialogModel,
SelDepart,
AuditingReturn,
AuditingDetails,
},
data() {
return {
config,
dialogConfig,
getPreScrapListApi,
getDialogListApi,
tableSelList: [],
sendParams: {}, //
temp: false,
getSelList,
imgCommonUrl: process.env.VUE_APP_BASE_API + '/system',
import TableModel from '@/components/TableModel'
import DialogModel from '@/components/DialogModel'
import SelDepart from '../../component/selDepart.vue'
import AuditingReturn from '../auditingReturn/index.vue' // 退
import AuditingDetails from '../../component/auditingDetails.vue'
import {
getPreScrapListApi,
getDialogListApi,
submitScrapApi,
} from '@/api/scrap/forecastWaste.js'
import { config, dialogConfig, getSelList } from './config'
export default {
name: 'scrapListing',
components: {
TableModel,
DialogModel,
SelDepart,
AuditingReturn,
AuditingDetails,
},
data() {
return {
config,
dialogConfig,
getPreScrapListApi,
getDialogListApi,
tableSelList: [],
sendParams: {}, //
temp: false,
getSelList,
imgCommonUrl: process.env.VUE_APP_BASE_API + '/system',
/* 提交报废申请参数 */
submitScrapParams: {
taskIdList: [],
deptIds: [],
},
auditingList: [],
sendParamsAuditing: {},
}
},
created() {
/* 获取表单下拉选数据 */
this.getSelList()
},
methods: {
/* 列表按钮操作 */
handlePreview(row) {
this.sendParams.taskId = row.taskId
this.dialogConfig.outerTitle = '查看'
this.dialogConfig.outerWidth = '70%'
this.dialogConfig.outerVisible = true
/* 提交报废申请参数 */
submitScrapParams: {
taskIdList: [],
deptIds: [],
},
handleSubmitScrap(row) {
this.submitScrapParams.taskIdList.push(row.taskId)
auditingList: [],
sendParamsAuditing: {},
}
},
created() {
/* 获取表单下拉选数据 */
this.getSelList()
},
methods: {
/* 列表按钮操作 */
handlePreview(row) {
this.sendParams.taskId = row.taskId
this.dialogConfig.outerTitle = '查看'
this.dialogConfig.outerWidth = '70%'
this.dialogConfig.outerVisible = true
},
handleSubmitScrap(row) {
this.submitScrapParams.taskIdList = []
this.submitScrapParams.taskIdList.push(row.taskId)
this.dialogConfig.outerTitle = '选择审批部门'
this.dialogConfig.outerWidth = '50%'
this.dialogConfig.outerVisible = true
},
handleAuditing(row) {
this.auditingList = row.scrapAuditorSetList
this.dialogConfig.outerTitle = '审批详情'
this.dialogConfig.outerWidth = '50%'
this.dialogConfig.outerVisible = true
},
handleReject(row) {
this.sendParamsAuditing.taskId = row.taskId
this.temp = !this.temp
},
/* 关闭选择审批部门弹框 */
async closeDepartSel(val, list) {
if (list.length < 1) {
this.$message.error('请选择审批部门')
return
}
list.map((e) => {
this.submitScrapParams.deptIds.push(e.id)
})
const res = await submitScrapApi(this.submitScrapParams)
if (res.code == 200) {
this.$message.success('已提交成功')
this.dialogConfig.outerVisible = val
this.$refs.listingTbRef.getList()
}
this.submitScrapParams.deptIds = this.submitScrapParams.taskIdList =
[]
},
/* 批量提交报废按钮 */
handelSubmitScrap() {
if (this.tableSelList.length < 1) {
this.$message.error('请勾选列表数据!')
} else {
this.dialogConfig.outerTitle = '选择审批部门'
this.dialogConfig.outerWidth = '50%'
this.dialogConfig.outerVisible = true
},
handleAuditing(row) {
this.auditingList = row.scrapAuditorSetList
this.dialogConfig.outerTitle = '审批详情'
this.dialogConfig.outerWidth = '50%'
this.dialogConfig.outerVisible = true
},
handleReject(row) {
this.sendParamsAuditing.taskId = row.taskId
this.temp = !this.temp
},
/* 关闭选择审批部门弹框 */
async closeDepartSel(val, list) {
console.log(list, '选择的部门---')
if (list.length < 1) {
this.$message.error('请选择审批部门')
return
}
list.map((e) => {
this.submitScrapParams.deptIds.push(e.id)
})
const res = await submitScrapApi(this.submitScrapParams)
if (res.code == 200) {
this.$message.success('已提交成功')
this.dialogConfig.outerVisible = val
this.$refs.listingTbRef.getList()
}
this.submitScrapParams.deptIds =
this.submitScrapParams.taskIdList = []
},
/* 批量提交报废按钮 */
handelSubmitScrap() {
if (this.tableSelList.length < 1) {
this.$message.error('请勾选列表数据!')
} else {
this.dialogConfig.outerTitle = '选择审批部门'
this.dialogConfig.outerWidth = '50%'
this.dialogConfig.outerVisible = true
}
},
/* 表格复选框选中的数据 */
getTableSelectionChange(val) {
this.tableSelList = []
this.tableSelList = val
this.tableSelList.map((e) => {
this.submitScrapParams.taskIdList.push(e.taskId)
})
},
handleBack() {
this.temp = !this.temp
this.dialogVisible = false
},
/* 外层弹框关闭 */
closeDialogOuter() {
this.dialogConfig.outerVisible = false
},
/* 内层弹框关闭 */
closeDialogInner() {
this.dialogConfig.innerVisible = false
},
}
},
}
/* 表格复选框选中的数据 */
getTableSelectionChange(val) {
this.tableSelList = this.submitScrapParams.taskIdList = []
this.tableSelList = val
this.tableSelList.map((e) => {
this.submitScrapParams.taskIdList.push(e.taskId)
})
},
handleBack() {
this.temp = !this.temp
this.dialogVisible = false
},
/* 外层弹框关闭 */
closeDialogOuter() {
this.dialogConfig.outerVisible = false
},
/* 内层弹框关闭 */
closeDialogInner() {
this.dialogConfig.innerVisible = false
},
},
}
</script>

View File

@ -42,10 +42,10 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
target: `http://10.40.92.13:38080`, //超
// target: `http://10.40.92.13:38080`, //超
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/
// target: `http://10.40.92.140:28080`, //帅
target: `http://10.40.92.138:28080`, //帅
// target: `http://10.40.92.14:28080`, //福
//******** 注意事项 ********* */