设备清运单,桶列表

master
mhsnet 4 months ago
parent 1c72632dda
commit 7498c0ec61

@ -144,6 +144,15 @@ public class RecycleBucketServiceImpl extends ServiceImpl<RecycleBucketMapper, R
} }
} }
if(isPc){ if(isPc){
if(ObjectUtil.isNotEmpty(recycleBucketPagination.getDeviceCode())){
recycleBucketNum++;
String value = recycleBucketPagination.getDeviceCode() instanceof List ?
JsonUtil.getObjectToString(recycleBucketPagination.getDeviceCode()) :
String.valueOf(recycleBucketPagination.getDeviceCode());
recycleBucketQueryWrapper.lambda().like(RecycleBucketEntity::getDeviceCode,value);
}
if(ObjectUtil.isNotEmpty(recycleBucketPagination.getBucketCode())){ if(ObjectUtil.isNotEmpty(recycleBucketPagination.getBucketCode())){
recycleBucketNum++; recycleBucketNum++;

@ -185,6 +185,15 @@ public class RecycleCleanOrderServiceImpl extends ServiceImpl<RecycleCleanOrderM
recycleCleanOrderQueryWrapper.lambda().like(RecycleCleanOrderEntity::getBucketCode, value); recycleCleanOrderQueryWrapper.lambda().like(RecycleCleanOrderEntity::getBucketCode, value);
} }
if (ObjectUtil.isNotEmpty(recycleCleanOrderPagination.getDeviceCode())) {
recycleCleanOrderNum++;
String value = recycleCleanOrderPagination.getDeviceCode() instanceof List ?
JsonUtil.getObjectToString(recycleCleanOrderPagination.getDeviceCode()) :
String.valueOf(recycleCleanOrderPagination.getDeviceCode());
recycleCleanOrderQueryWrapper.lambda().like(RecycleCleanOrderEntity::getDeviceCode, value);
}
} }
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList); List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);

@ -27,6 +27,9 @@ public class RecycleBucketPagination extends Pagination {
private String moduleId; private String moduleId;
/** 菜单id */ /** 菜单id */
private String menuId; private String menuId;
/** 设备编号 */
@JsonProperty("deviceCode")
private Object deviceCode;
/** 桶编号 */ /** 桶编号 */
@JsonProperty("bucketCode") @JsonProperty("bucketCode")
private Object bucketCode; private Object bucketCode;

@ -33,4 +33,7 @@ public class RecycleCleanOrderPagination extends Pagination {
/** 桶编码 */ /** 桶编码 */
@JsonProperty("bucketCode") @JsonProperty("bucketCode")
private Object bucketCode; private Object bucketCode;
/** 桶编码 */
@JsonProperty("deviceCode")
private Object deviceCode;
} }

@ -1,10 +1,3 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
@ -12,40 +5,73 @@
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="桶编号"> <el-form-item label="桶编号">
<el-input v-model="query.bucketCode" placeholder="请输入" clearable> </el-input> <el-input
v-model="query.bucketCode"
placeholder="请输入"
clearable
>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="桶名称"> <el-form-item label="桶名称">
<el-input v-model="query.bucketName" placeholder="请输入" clearable> </el-input> <el-input
v-model="query.bucketName"
placeholder="请输入"
clearable
>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="状态"> <el-form-item label="状态">
<JnpfSelect v-model="query.status" placeholder="请选择" clearable <JnpfSelect
v-model="query.status"
placeholder="请选择"
clearable
:options="statusOptions" :options="statusOptions"
:props="statusProps" > :props="statusProps"
>
</JnpfSelect> </JnpfSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <template v-if="showAll">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="门号"> <el-form-item label="门号">
<JnpfSelect v-model="query.doorNum" placeholder="请选择" clearable <JnpfSelect
v-model="query.doorNum"
placeholder="请选择"
clearable
:options="doorNumOptions" :options="doorNumOptions"
:props="doorNumProps" multiple > :props="doorNumProps"
multiple
>
</JnpfSelect> </JnpfSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> >查询</el-button
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll"> >
<el-button icon="el-icon-refresh-right" @click="reset()"
>重置</el-button
>
<el-button
type="text"
icon="el-icon-arrow-down"
@click="showAll = true"
v-if="!showAll"
>
展开 展开
</el-button> </el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> <el-button
type="text"
icon="el-icon-arrow-up"
@click="showAll = false"
v-else
>
收起 收起
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -55,220 +81,214 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()"> <el-button
type="primary"
icon="icon-ym icon-ym-btn-add"
v-has="'btn_add'"
@click="addOrUpdateHandle()"
>新增
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true"> <el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false" <el-link
@click="openSuperQuery()" /> icon="icon-ym icon-ym-filter JNPF-common-head-icon"
:underline="false"
@click="openSuperQuery()"
/>
</el-tooltip> </el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top"> <el-tooltip
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" effect="dark"
@click="initData()" /> :content="$t('common.refresh')"
placement="top"
>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="initData()"
/>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' <JNPF-table
v-loading="listLoading"
:data="list"
@sort-change="sortChange"
:span-method="arraySpanMethod" :span-method="arraySpanMethod"
>
<el-table-column
prop="deviceCode"
label="所属设备" align="left"
> >
<el-table-column prop="deviceCode" label="所属设备" align="left">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="bucketCode" label="桶编号" align="left">
prop="bucketCode"
label="桶编号" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="bucketName" label="桶名称" align="left">
prop="bucketName"
label="桶名称" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="showName" label="显示名称" align="left">
prop="showName"
label="显示名称" align="left"
>
</el-table-column> </el-table-column>
<el-table-column label="门号" prop="doorNum" algin="left" <el-table-column label="门号" prop="doorNum" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.doorNum}} {{ scope.row.doorNum }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="status" algin="left" <el-table-column label="状态" prop="status" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status}} {{ scope.row.status }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否显示" prop="isShow" algin="left" <el-table-column label="是否显示" prop="isShow" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isShow}} {{ scope.row.isShow }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="showOrd" label="显示顺序" align="left">
prop="showOrd" <template slot-scope="scope" v-if="scope.row.showOrd">
label="显示顺序" align="left" <JnpfNumber v-model="scope.row.showOrd" :thousands="false" />
>
<template slot-scope="scope" v-if="scope.row.showOrd" >
<JnpfNumber v-model="scope.row.showOrd" :thousands="false"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="productCode" label="回收大类" align="left">
prop="productCode"
label="回收大类" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="productSubCode" label="回收子类" align="left">
prop="productSubCode"
label="回收子类" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="price" label="回收单价" align="left">
prop="price" <template slot-scope="scope" v-if="scope.row.price">
label="回收单价" align="left" <JnpfNumber v-model="scope.row.price" :thousands="false" />
>
<template slot-scope="scope" v-if="scope.row.price" >
<JnpfNumber v-model="scope.row.price" :thousands="false"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="满溢状态" prop="fullStatus" algin="left" <el-table-column label="满溢状态" prop="fullStatus" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.fullStatus}} {{ scope.row.fullStatus }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="满溢报警" prop="fullSet" algin="left" <el-table-column label="满溢报警" prop="fullSet" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.fullSet}} {{ scope.row.fullSet }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="烟雾报警" prop="smogStatus" algin="left" <el-table-column label="烟雾报警" prop="smogStatus" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.smogStatus}} {{ scope.row.smogStatus }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="烟雾报警" prop="smogSet" algin="left" <el-table-column label="烟雾报警" prop="smogSet" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.smogSet}} {{ scope.row.smogSet }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="containerWeight" label="容器重量" align="left">
prop="containerWeight"
label="容器重量" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="currentWeight" label="当前重量" align="left">
prop="currentWeight"
label="当前重量" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="warningWeight" label="重量上限" align="left">
prop="warningWeight"
label="重量上限" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="closeDelay" label="关门时延" align="left">
prop="closeDelay"
label="关门时延" align="left"
>
</el-table-column> </el-table-column>
<el-table-column label="投递门" prop="deliveryDoorStatus" algin="left" <el-table-column
label="投递门"
prop="deliveryDoorStatus"
algin="left"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.deliveryDoorStatus}} {{ scope.row.deliveryDoorStatus }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="清运门" prop="cleanDoorStatus" algin="left" <el-table-column label="清运门" prop="cleanDoorStatus" algin="left">
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.cleanDoorStatus}} {{ scope.row.cleanDoorStatus }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="bagNo" label="垃圾袋编码" align="left">
prop="bagNo"
label="垃圾袋编码" align="left"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="tenantId" label="租户" align="left">
prop="tenantId"
label="租户" align="left"
>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" fixed="right" width="150">
fixed="right" width="150" > <template slot-scope="scope">
<template slot-scope="scope" > <el-button
<el-button type="text" type="text"
@click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'" >编辑 @click="addOrUpdateHandle(scope.row)"
v-has="'btn_edit'"
>编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)"> <el-button
type="text"
class="JNPF-table-delBtn"
v-has="'btn_remove'"
@click="handleDel(scope.row.id)"
>删除
</el-button> </el-button>
<el-button type="text" v-has="'btn_detail'" <el-button
@click="goDetail(scope.row.id)">详情 type="text"
v-has="'btn_detail'"
@click="goDetail(scope.row.id)"
>详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" /> <ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> <Detail
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" /> v-if="detailVisible"
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" ref="Detail"
@superQuery="superQuery" /> @refresh="detailVisible = false"
/>
<ToFormDetail
v-if="toFormDetailVisible"
ref="toFormDetail"
@close="toFormDetailVisible = false"
/>
<SuperQuery
v-if="superQueryVisible"
ref="SuperQuery"
:columnOptions="superQueryJson"
@superQuery="superQuery"
/>
</div> </div>
</template> </template>
<script> <script>
import request from "@/utils/request";
import { mapGetters } from "vuex";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./form";
import Detail from "./Detail";
import ExportBox from "@/components/ExportBox";
import ToFormDetail from "@/views/basic/dynamicModel/list/detail";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import { getConfigData } from "@/api/onlineDev/visualDev";
import { getDefaultCurrentValueUserIdAsync } from "@/api/permission/user";
import { getDefaultCurrentValueDepartmentIdAsync } from "@/api/permission/organize";
import columnList from "./columnList";
import { thousandsFormat } from "@/components/Generator/utils/index";
import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
import request from '@/utils/request' export default {
import {mapGetters} from "vuex";
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './form'
import Detail from './Detail'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import { getConfigData } from '@/api/onlineDev/visualDev'
import { getDefaultCurrentValueUserIdAsync } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentIdAsync } from '@/api/permission/organize'
import columnList from './columnList'
import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: { components: {
JNPFForm, JNPFForm,
Detail, Detail,
ExportBox,ToFormDetail , SuperQuery ExportBox,
ToFormDetail,
SuperQuery
}, },
data() { data() {
return { return {
keyword: "",
keyword:'',
expandsTree: true, expandsTree: true,
refreshTree: true, refreshTree: true,
toFormDetailVisible:false, toFormDetailVisible: false,
expandObj:{}, expandObj: {},
columnOptions: [], columnOptions: [],
mergeList: [], mergeList: [],
exportList:[], exportList: [],
columnList, columnList,
showAll: false, showAll: false,
@ -277,237 +297,275 @@
uploadBoxVisible: false, uploadBoxVisible: false,
detailVisible: false, detailVisible: false,
query: { query: {
bucketCode:undefined, deviceCode: undefined,
bucketName:undefined, bucketCode: undefined,
status:undefined, bucketName: undefined,
doorNum:undefined, status: undefined,
doorNum: undefined
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id', value: "id",
isLeaf: 'isLeaf' isLeaf: "isLeaf"
}, },
list: [], list: [],
listLoading: true, listLoading: true,
total: 0, total: 0,
queryData: {}, queryData: {},
listQuery: { listQuery: {
superQueryJson: '', superQueryJson: "",
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "", sidx: ""
}, },
formVisible: false, formVisible: false,
flowVisible: false, flowVisible: false,
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
exportBoxVisible: false, exportBoxVisible: false,
doorNumOptions:[{"fullName":"1号","id":"1"},{"fullName":"2号","id":"2"},{"fullName":"3号","id":"3"},{"fullName":"4号","id":"4"},{"fullName":"5号","id":"5"},{"fullName":"6号","id":"6"},{"fullName":"7号","id":"7"},{"fullName":"8号","id":"8"},{"fullName":"9号","id":"9"},{"fullName":"10号","id":"10"},{"fullName":"11号","id":"11"},{"fullName":"12号","id":"12"}], doorNumOptions: [
doorNumProps:{"label":"fullName","value":"id" }, { fullName: "1号", id: "1" },
isShowOptions:[{"fullName":"关闭","id":"0"},{"fullName":"显示","id":"1"}], { fullName: "2号", id: "2" },
isShowProps:{"label":"fullName","value":"id" }, { fullName: "3号", id: "3" },
statusOptions:[{"fullName":"停用","id":"0"},{"fullName":"启用","id":"1"}], { fullName: "4号", id: "4" },
statusProps:{"label":"fullName","value":"id" }, { fullName: "5号", id: "5" },
productCodeOptions:[], { fullName: "6号", id: "6" },
productCodeProps:{"label":"name","value":"id" }, { fullName: "7号", id: "7" },
productSubCodeOptions:[], { fullName: "8号", id: "8" },
productSubCodeProps:{"label":"name","value":"id" }, { fullName: "9号", id: "9" },
fullSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}], { fullName: "10号", id: "10" },
fullSetProps:{"label":"fullName","value":"id" }, { fullName: "11号", id: "11" },
fullStatusOptions:[{"fullName":"满","id":"1"},{"fullName":"未满","id":"0"}], { fullName: "12号", id: "12" }
fullStatusProps:{"label":"fullName","value":"id" }, ],
smogSetOptions:[{"fullName":"开启","id":"1"},{"fullName":"关闭","id":"0"}], doorNumProps: { label: "fullName", value: "id" },
smogSetProps:{"label":"fullName","value":"id" }, isShowOptions: [
smogStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"报警","id":"1"}], { fullName: "关闭", id: "0" },
smogStatusProps:{"label":"fullName","value":"id" }, { fullName: "显示", id: "1" }
deliveryDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}], ],
deliveryDoorStatusProps:{"label":"fullName","value":"id" }, isShowProps: { label: "fullName", value: "id" },
cleanDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}], statusOptions: [
cleanDoorStatusProps:{"label":"fullName","value":"id" }, { fullName: "停用", id: "0" },
{ fullName: "启用", id: "1" }
],
statusProps: { label: "fullName", value: "id" },
productCodeOptions: [],
productCodeProps: { label: "name", value: "id" },
productSubCodeOptions: [],
productSubCodeProps: { label: "name", value: "id" },
fullSetOptions: [
{ fullName: "关闭", id: "0" },
{ fullName: "开启", id: "1" }
],
fullSetProps: { label: "fullName", value: "id" },
fullStatusOptions: [
{ fullName: "满", id: "1" },
{ fullName: "未满", id: "0" }
],
fullStatusProps: { label: "fullName", value: "id" },
smogSetOptions: [
{ fullName: "开启", id: "1" },
{ fullName: "关闭", id: "0" }
],
smogSetProps: { label: "fullName", value: "id" },
smogStatusOptions: [
{ fullName: "正常", id: "0" },
{ fullName: "报警", id: "1" }
],
smogStatusProps: { label: "fullName", value: "id" },
deliveryDoorStatusOptions: [
{ fullName: "关闭", id: "0" },
{ fullName: "开启", id: "1" }
],
deliveryDoorStatusProps: { label: "fullName", value: "id" },
cleanDoorStatusOptions: [
{ fullName: "关闭", id: "0" },
{ fullName: "开启", id: "1" }
],
cleanDoorStatusProps: { label: "fullName", value: "id" },
interfaceRes: { interfaceRes: {
deviceCode:[] , deviceCode: []
},
} }
};
}, },
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(["userInfo"]),
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} }
}, },
created() { created() {
this.getColumnList(), this.query.deviceCode = this.$route.query.deviceCode;
this.initSearchDataAndListData() this.getColumnList(), this.initSearchDataAndListData();
this.queryData = JSON.parse(JSON.stringify(this.query)) this.queryData = JSON.parse(JSON.stringify(this.query));
}, },
methods: { methods: {
toDetail(defaultValue, modelId) { toDetail(defaultValue, modelId) {
if (!defaultValue) return if (!defaultValue) return;
getConfigData(modelId).then(res => { getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return if (!res.data || !res.data.formData) return;
let formData = JSON.parse(res.data.formData) let formData = JSON.parse(res.data.formData);
formData.popupType = 'general' formData.popupType = "general";
this.toFormDetailVisible = true this.toFormDetailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue) this.$refs.toFormDetail.init(formData, modelId, defaultValue);
}) });
}) });
}, },
toggleTreeExpand(expands) { toggleTreeExpand(expands) {
this.refreshTree = false this.refreshTree = false;
this.expandsTree = expands this.expandsTree = expands;
this.$nextTick(() => { this.$nextTick(() => {
this.refreshTree = true this.refreshTree = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null) this.$refs.treeBox.setCurrentKey(null);
}) });
}) });
}, },
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1; return data[this.treeProps.label].indexOf(value) !== -1;
}, },
loadNode(node, resolve) { loadNode(node, resolve) {
const nodeData = node.data const nodeData = node.data;
const config ={ const config = {
treeInterfaceId:"", treeInterfaceId: "",
treeTemplateJson:[] treeTemplateJson: []
} };
if (config.treeInterfaceId) { if (config.treeInterfaceId) {
// //
if (config.treeTemplateJson && config.treeTemplateJson.length) { if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) { for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i]; const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || '' element.defaultValue = nodeData[element.relationField] || "";
} }
} }
// //
let query = { let query = {
paramList: config.treeTemplateJson || [], paramList: config.treeTemplateJson || []
} };
// //
getDataInterfaceRes(config.treeInterfaceId, query).then(res => { getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data let data = res.data;
if (Array.isArray(data)) { if (Array.isArray(data)) {
resolve(data); resolve(data);
} else { } else {
resolve([]); resolve([]);
} }
}) });
} }
}, },
getColumnList() { getColumnList() {
// //
this.columnOptions = this.transformColumnList(this.columnList) this.columnOptions = this.transformColumnList(this.columnList);
}, },
transformColumnList(columnList) { transformColumnList(columnList) {
let list = [] let list = [];
for (let i = 0; i < columnList.length; i++) { for (let i = 0; i < columnList.length; i++) {
const e = columnList[i]; const e = columnList[i];
if (!e.prop.includes('-')) { if (!e.prop.includes("-")) {
list.push(e) list.push(e);
} else { } else {
let prop = e.prop.split('-')[0] let prop = e.prop.split("-")[0];
let label = e.label.split('-')[0] let label = e.label.split("-")[0];
let vModel = e.prop.split('-')[1] let vModel = e.prop.split("-")[1];
let newItem = { let newItem = {
align: "center", align: "center",
jnpfKey: "table", jnpfKey: "table",
prop, prop,
label, label,
children: [] children: []
} };
e.vModel = vModel e.vModel = vModel;
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false) if (!this.expandObj.hasOwnProperty(`${prop}Expand`))
if (!list.some(o => o.prop === prop)) list.push(newItem) this.$set(this.expandObj, `${prop}Expand`, false);
if (!list.some(o => o.prop === prop)) list.push(newItem);
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) { if (list[i].prop === prop) {
list[i].children.push(e) list[i].children.push(e);
break break;
} }
} }
} }
} }
this.getMergeList(list) this.getMergeList(list);
this.getExportList(list) this.getExportList(list);
return list return list;
}, },
arraySpanMethod({ column }) { arraySpanMethod({ column }) {
for (let i = 0; i < this.mergeList.length; i++) { for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) { if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan] return [this.mergeList[i].rowspan, this.mergeList[i].colspan];
} }
} }
}, },
getMergeList(list) { getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list)) let newList = JSON.parse(JSON.stringify(list));
newList.forEach(item => { newList.forEach(item => {
if (item.children && item.children.length) { if (item.children && item.children.length) {
let child = { let child = {
prop: item.prop + '-child-first' prop: item.prop + "-child-first"
} };
item.children.unshift(child) item.children.unshift(child);
} }
}) });
newList.forEach(item => { newList.forEach(item => {
if (item.children && item.children.length ) { if (item.children && item.children.length) {
item.children.forEach((child, index) => { item.children.forEach((child, index) => {
if (index == 0) { if (index == 0) {
this.mergeList.push({ this.mergeList.push({
prop: child.prop, prop: child.prop,
rowspan: 1, rowspan: 1,
colspan: item.children.length colspan: item.children.length
}) });
} else { } else {
this.mergeList.push({ this.mergeList.push({
prop: child.prop, prop: child.prop,
rowspan: 0, rowspan: 0,
colspan: 0 colspan: 0
}) });
} }
}) });
} else { } else {
this.mergeList.push({ this.mergeList.push({
prop: item.prop, prop: item.prop,
rowspan: 1, rowspan: 1,
colspan: 1 colspan: 1
}) });
} }
}) });
}, },
getExportList(list) { getExportList(list) {
let exportList = [] let exportList = [];
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') { if (list[i].jnpfKey === "table") {
for (let j = 0; j < list[i].children.length; j++) { for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j]) exportList.push(list[i].children[j]);
} }
} else { } else {
exportList.push(list[i]) exportList.push(list[i]);
} }
} }
this.exportList = exportList this.exportList = exportList;
}, },
goDetail(id){ goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({column, prop, order}) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
async initSearchDataAndListData() { async initSearchDataAndListData() {
await this.initSearchData() await this.initSearchData();
this.initData() this.initData();
}, },
// //
async initSearchData() { async initSearchData() {},
},
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
@ -515,105 +573,117 @@
...this.query, ...this.query,
keyword: this.keyword, keyword: this.keyword,
dataType: 0, dataType: 0,
menuId:this.menuId, menuId: this.menuId,
moduleId:'564718669121203589', moduleId: "564718669121203589",
type:1, type: 1
}; };
request({ request({
url: `/api/scm/RecycleBucket/getList`, url: `/api/scm/RecycleBucket/getList`,
method: 'post', method: "post",
data: _query data: _query
}).then(res => { }).then(res => {
var _list =res.data.list; console.log("hi1");
console.log(res);
if (res.data) {
var _list = res.data.list;
this.list = _list.map(o => ({ this.list = _list.map(o => ({
...o, ...o,
...this.expandObj, ...this.expandObj
})) }));
this.total = res.data.pagination.total this.total = res.data.pagination.total;
this.listLoading = false this.listLoading = false;
}) }else{
this.listLoading = false;
}
});
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: 'warning' type: "warning"
}).then(() => { })
.then(() => {
request({ request({
url: `/api/scm/RecycleBucket/${id}`, url: `/api/scm/RecycleBucket/${id}`,
method: 'DELETE' method: "DELETE"
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: "success",
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData() this.initData();
} }
}); });
})
}).catch(() => {
}); });
})
.catch(() => {});
}, },
handelUpload(){ handelUpload() {
this.uploadBoxVisible = true this.uploadBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.UploadBox.init("","scm/RecycleBucket") this.$refs.UploadBox.init("", "scm/RecycleBucket");
}) });
}, },
openSuperQuery() { openSuperQuery() {
this.superQueryVisible = true this.superQueryVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.SuperQuery.init() this.$refs.SuperQuery.init();
}) });
}, },
superQuery(queryJson) { superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson this.listQuery.superQueryJson = queryJson;
this.listQuery.currentPage = 1 this.listQuery.currentPage = 1;
this.initData() this.initData();
}, },
addOrUpdateHandle(row, isDetail) { addOrUpdateHandle(row, isDetail) {
let id = row?row.id:"" let id = row ? row.id : "";
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail,this.list) this.$refs.JNPFForm.init(id, isDetail, this.list);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList) this.$refs.ExportBox.init(this.exportList);
}) });
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({ request({
url: `/api/scm/RecycleBucket/Actions/Export`, url: `/api/scm/RecycleBucket/Actions/Export`,
method: 'post', method: "post",
data: query data: query
}).then(res => { }).then(res => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery.currentPage=1 this.listQuery.currentPage = 1;
this.listQuery.pageSize=20 this.listQuery.pageSize = 20;
this.listQuery.sort="desc" this.listQuery.sort = "desc";
this.listQuery.sidx="" this.listQuery.sidx = "";
this.initData() this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
this.query = JSON.parse(JSON.stringify(this.queryData)) this.query = JSON.parse(JSON.stringify(this.queryData));
this.search() this.search();
}, },
colseFlow(isrRefresh) { colseFlow(isrRefresh) {
this.flowVisible = false this.flowVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
},
} }
} }
};
</script> </script>

@ -8,6 +8,11 @@
<el-input v-model="query.orderNo" placeholder="请输入" clearable> </el-input> <el-input v-model="query.orderNo" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="设备编码">
<el-input v-model="query.deviceCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="桶编码"> <el-form-item label="桶编码">
<el-input v-model="query.bucketCode" placeholder="请输入" clearable> </el-input> <el-input v-model="query.bucketCode" placeholder="请输入" clearable> </el-input>
@ -185,6 +190,7 @@ export default {
query: { query: {
orderNo: undefined, orderNo: undefined,
bucketCode: undefined, bucketCode: undefined,
deviceCode: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: 'children',
@ -230,6 +236,8 @@ export default {
} }
}, },
created() { created() {
this.query.deviceCode = this.$route.query.deviceCode
console.log(this.query)
this.getColumnList(), this.getColumnList(),
this.initSearchDataAndListData() this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query)) this.queryData = JSON.parse(JSON.stringify(this.query))

@ -190,26 +190,29 @@
<el-table-column label="统计/记录" width="100" algin="left"> <el-table-column label="统计/记录" width="100" algin="left">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="font-size: 20px;"> <div style="font-size: 20px;">
<i <span @click="fnNavToRecyclecleanorder(scope.row.deviceCode)"
><i
class="el-icon-s-grid" class="el-icon-s-grid"
style="cursor: pointer;color: green;" style="cursor: pointer;color: green;"
title="清运订单" title="清运订单"
></i> ></i
></span>
<span
@click="fnNavToRecycledeliveryorder(scope.row.deviceCode)"
>
<i <i
class="el-icon-s-grid" class="el-icon-s-grid"
style="cursor: pointer;color: blue;" style="cursor: pointer;color: blue;"
title="投递订单" title="投递订单"
></i> ></i
<i ></span>
class="el-icon-s-custom" <span @click="fnNavToRecyclebucket(scope.row.deviceCode)"
style="cursor: pointer;color: greenyellow;" ><i
title="查看设备已注册会员"
></i>
<i
class="el-icon-delete-solid" class="el-icon-delete-solid"
style="cursor: pointer;color: gray;" style="cursor: pointer;color: gray;"
title="查看设备子桶列表" title="查看设备子桶列表"
></i> ></i
></span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -253,14 +256,16 @@
<div>{{ item.showName }} {{ item.currentWeight }} KG</div> <div>{{ item.showName }} {{ item.currentWeight }} KG</div>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<div><el-progress <div>
<el-progress
:percentage="item.progress" :percentage="item.progress"
:color="[ :color="[
{ color: 'green', percentage: 20 }, { color: 'green', percentage: 20 },
{ color: 'yellow', percentage: 80 }, { color: 'yellow', percentage: 80 },
{ color: 'red', percentage: 90 } { color: 'red', percentage: 90 }
]" ]"
></el-progress></div> ></el-progress>
</div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -467,6 +472,21 @@ export default {
this.queryData = JSON.parse(JSON.stringify(this.query)); this.queryData = JSON.parse(JSON.stringify(this.query));
}, },
methods: { methods: {
fnNavToRecyclecleanorder(deviceCode) {
this.$router.push({
path: "/recyclecleanorder",
query: { deviceCode: deviceCode }
});
},
fnNavToRecycledeliveryorder(deviceCode) {
this.$router.push({
path: "/recycledeliveryorder",
query: { deviceCode: deviceCode }
});
},
fnNavToRecyclebucket(deviceCode) {
this.$router.push({ path: "/recyclebucket", query: { deviceCode: deviceCode } });
},
toDetail(defaultValue, modelId) { toDetail(defaultValue, modelId) {
if (!defaultValue) return; if (!defaultValue) return;
getConfigData(modelId).then(res => { getConfigData(modelId).then(res => {

Loading…
Cancel
Save