回收桶部分修复

master
mhsnet 5 months ago
parent 9f57687914
commit e03bc6dd4d

@ -1,182 +1,152 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"
content="详情"/>
<el-page-header @back="goBack" content="详情" />
<div class="options">
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" >
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right">
<template v-if="!loading">
<el-col :span="8" >
<jnpf-form-tip-item label="显示别名"
prop="showName" >
<p>{{dataForm.showName}}</p>
<el-col :span="8">
<jnpf-form-tip-item label="显示别名" prop="showName">
<p>{{ dataForm.showName }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="门号"
prop="doorNum" >
<el-col :span="8">
<jnpf-form-tip-item label="门号" prop="doorNum">
<p>{{ dataForm.doorNum }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="所属设备"
prop="deviceCode" >
<p>{{dataForm.deviceCode}}</p>
<el-col :span="8">
<jnpf-form-tip-item label="所属设备" prop="deviceCode">
<p>{{ dataForm.deviceCode }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="是否显示"
prop="isShow" >
<el-col :span="8">
<jnpf-form-tip-item label="是否显示" prop="isShow">
<p>{{ dataForm.isShow }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="显示顺序"
prop="showOrd" >
<JnpfNumber v-model="dataForm.showOrd"
placeholder="数字文本" disabled
:step="1" >
<el-col :span="8">
<jnpf-form-tip-item label="显示顺序" prop="showOrd">
<JnpfNumber v-model="dataForm.showOrd" placeholder="数字文本" disabled :step="1">
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="回收品大类"
prop="productCode" >
<p>{{dataForm.productCode}}</p>
<el-col :span="24">
<jnpf-form-tip-item label="回收品大类" prop="productCode">
<p>{{ dataForm.productCode }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="回收品子类"
prop="productSubCode" >
<p>{{dataForm.productSubCode}}</p>
<el-col :span="24">
<jnpf-form-tip-item label="回收品子类" prop="productSubCode">
<p>{{ dataForm.productSubCode }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="价格"
prop="price" >
<JnpfNumber v-model="dataForm.price"
placeholder="数字文本" disabled
:step="1" :precision="2" >
<el-col :span="8">
<jnpf-form-tip-item label="价格" prop="price">
<JnpfNumber v-model="dataForm.price" placeholder="数字文本" disabled :step="1"
:precision="2">
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="满溢状态"
prop="fullStatus" >
<el-col :span="8">
<jnpf-form-tip-item label="满溢状态" prop="fullStatus">
<p>{{ dataForm.fullStatus }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="满溢设置"
prop="fullSet" >
<el-col :span="8">
<jnpf-form-tip-item label="满溢设置" prop="fullSet">
<p>{{ dataForm.fullSet }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="烟雾状态"
prop="smogStauts" >
<el-col :span="8">
<jnpf-form-tip-item label="烟雾状态" prop="smogStauts">
<p>{{ dataForm.smogStauts }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="烟雾设置"
prop="smogSet" >
<el-col :span="8">
<jnpf-form-tip-item label="烟雾设置" prop="smogSet">
<p>{{ dataForm.smogSet }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="容器重量"
prop="containerWeight" >
<JnpfNumber v-model="dataForm.containerWeight"
placeholder="数字文本" disabled
:step="1" :precision="2" addonAfter="KG" >
<el-col :span="8">
<jnpf-form-tip-item label="容器重量" prop="containerWeight">
<JnpfNumber v-model="dataForm.containerWeight" placeholder="数字文本" disabled :step="1"
:precision="2" addonAfter="KG">
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="当前重量"
prop="currentWeight" >
<JnpfNumber v-model="dataForm.currentWeight"
placeholder="数字文本" disabled
:step="1" :precision="2" addonAfter="KG" >
<el-col :span="8">
<jnpf-form-tip-item label="当前重量" prop="currentWeight">
<JnpfNumber v-model="dataForm.currentWeight" placeholder="数字文本" disabled :step="1"
:precision="2" addonAfter="KG">
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="重量上限"
prop="warningWeight" >
<JnpfNumber v-model="dataForm.warningWeight"
placeholder="数字文本" disabled
:step="1" :precision="2" addonAfter="KG" >
<el-col :span="8">
<jnpf-form-tip-item label="重量上限" prop="warningWeight">
<JnpfNumber v-model="dataForm.warningWeight" placeholder="数字文本" disabled :step="1"
:precision="2" addonAfter="KG">
</JnpfNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="关闭延时"
prop="closeDelay" tip-label="投递门关闭延时" >
<p>{{dataForm.closeDelay}}</p>
<el-col :span="8">
<jnpf-form-tip-item label="关闭延时" prop="closeDelay" tip-label="">
<p>{{ dataForm.closeDelay }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="投递门"
prop="deliveryDoorStatus" tip-label="投递门状态" >
<el-col :span="8">
<jnpf-form-tip-item label="投递门" prop="deliveryDoorStatus" tip-label="">
<p>{{ dataForm.deliveryDoorStatus }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="清运门"
prop="cleanDoorStatus" tip-label="清运门状态" >
<el-col :span="8">
<jnpf-form-tip-item label="清运门" prop="cleanDoorStatus" tip-label="">
<p>{{ dataForm.cleanDoorStatus }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="垃圾袋编码"
prop="bagNo" >
<p>{{dataForm.bagNo}}</p>
<el-col :span="8">
<jnpf-form-tip-item label="垃圾袋编码" prop="bagNo">
<p>{{ dataForm.bagNo }}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="桶身图片"
prop="bucketImg" >
<JnpfUploadImg v-model="dataForm.bucketImg"
disabled
detailed :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" >
<el-col :span="24">
<jnpf-form-tip-item label="桶身图片" prop="bucketImg">
<JnpfUploadImg v-model="dataForm.bucketImg" disabled detailed :fileSize="10"
sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="状态"
prop="status" >
<el-col :span="8">
<jnpf-form-tip-item label="状态" prop="status">
<p>{{ dataForm.status }} </p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item label="租户"
prop="tenantId" >
<p>{{dataForm.tenantId}}</p>
<el-col :span="8">
<jnpf-form-tip-item label="租户" prop="tenantId">
<p>{{ dataForm.tenantId }}</p>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-form>
</el-row>
</div>
</transition>
</transition>
</template>
<script>
import request from '@/utils/request'
import request from '@/utils/request'
import { getConfigData } from '@/api/onlineDev/visualDev'
import jnpf from '@/utils/jnpf'
import Detail from '@/views/basic/dynamicModel/list/detail'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: { Detail},
import { getConfigData } from '@/api/onlineDev/visualDev'
import jnpf from '@/utils/jnpf'
import Detail from '@/views/basic/dynamicModel/list/detail'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: { Detail },
props: [],
data() {
return {
@ -185,51 +155,51 @@
loading: false,
dataForm: {
id :'',
bucketCode : '',
showName : '',
doorNum : "",
deviceCode : "",
isShow : "1",
showOrd : 0,
productCode : "542987705491919312",
productSubCode : "",
price : '',
fullStatus : '',
fullSet : '',
smogStauts : '',
smogSet : '',
containerWeight : '',
currentWeight : '',
warningWeight : '',
closeDelay : '',
deliveryDoorStatus : '',
cleanDoorStatus : '',
bagNo : '',
bucketImg : [],
status : '',
tenantId : [],
id: '',
bucketCode: '',
showName: '',
doorNum: "",
deviceCode: "",
isShow: "1",
showOrd: 0,
productCode: "542987705491919312",
productSubCode: "",
price: '',
fullStatus: '',
fullSet: '',
smogStauts: '',
smogSet: '',
containerWeight: '',
currentWeight: '',
warningWeight: '',
closeDelay: '',
deliveryDoorStatus: '',
cleanDoorStatus: '',
bagNo: '',
bucketImg: [],
status: '',
tenantId: [],
},
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"}],
doorNumProps:{"label":"fullName","value":"id" },
isShowOptions:[{"fullName":"关闭","id":"0"},{"fullName":"显示","id":"1"}],
isShowProps:{"label":"fullName","value":"id" },
productCodeProps:{"label":"name","value":"id" },
productSubCodeProps:{"label":"name","value":"id" },
fullStatusOptions:[{"fullName":"未满","id":"0"},{"fullName":"满","id":"1"}],
fullStatusProps:{"label":"fullName","value":"id" },
fullSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
fullSetProps:{"label":"fullName","value":"id" },
smogStautsOptions:[{"fullName":"正常","id":"0"},{"fullName":"报警","id":"1"}],
smogStautsProps:{"label":"fullName","value":"id" },
smogSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
smogSetProps:{"label":"fullName","value":"id" },
deliveryDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"2"}],
deliveryDoorStatusProps:{"label":"fullName","value":"id" },
cleanDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
cleanDoorStatusProps:{"label":"fullName","value":"id" },
statusOptions:[{"fullName":"停用","id":"0"},{"fullName":"启用","id":"1"}],
statusProps:{"label":"fullName","value":"id" },
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" }],
doorNumProps: { "label": "fullName", "value": "id" },
isShowOptions: [{ "fullName": "关闭", "id": 0 }, { "fullName": "显示", "id": 1 }],
isShowProps: { "label": "fullName", "value": "id" },
productCodeProps: { "label": "name", "value": "id" },
productSubCodeProps: { "label": "name", "value": "id" },
fullStatusOptions: [{ "fullName": "未满", "id": 0 }, { "fullName": "满", "id": 1 }],
fullStatusProps: { "label": "fullName", "value": "id" },
fullSetOptions: [{ "fullName": "关闭", "id": 0 }, { "fullName": "开启", "id": 1 }],
fullSetProps: { "label": "fullName", "value": "id" },
smogStautsOptions: [{ "fullName": "正常", "id": 0 }, { "fullName": "报警", "id": 1 }],
smogStautsProps: { "label": "fullName", "value": "id" },
smogSetOptions: [{ "fullName": "关闭", "id": 0 }, { "fullName": "开启", "id": 1 }],
smogSetProps: { "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" },
statusOptions: [{ "fullName": "停用", "id": 0 }, { "fullName": "启用", "id":1 }],
statusProps: { "label": "fullName", "value": "id" },
}
},
@ -238,7 +208,7 @@
created() {
},
mounted() {},
mounted() { },
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
@ -252,8 +222,8 @@
})
})
},
dataInfo(dataAll){
let _dataAll =dataAll
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
@ -264,10 +234,10 @@
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/scm/RecycleBucket/detail/'+this.dataForm.id,
url: '/api/scm/RecycleBucket/detail/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
@ -278,6 +248,6 @@
})
},
},
}
}
</script>

@ -1,12 +1,8 @@
<template>
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack"
:content="!dataForm.id ? '新建':'编辑'"/>
<el-page-header @back="goBack" :content="!dataForm.id ? '新建' : '编辑'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
@ -15,223 +11,224 @@
<el-dropdown-menu slot="dropdown">
<template v-if="dataForm.id">
<el-dropdown-item @click.native="prev" :disabled='prevDis'>
{{'上一条'}}
{{ '上一条' }}
</el-dropdown-item>
<el-dropdown-item @click.native="next" :disabled='nextDis'>
{{'下一条'}}
{{ '下一条' }}
</el-dropdown-item>
</template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
:loading="continueBtnLoading" :disabled='btnLoading'>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
{{ !dataForm.id ? '确定并新增' : '确定并继续' }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading" :disabled='continueBtnLoading'> </el-button>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'>
</el-button>
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right" >
<el-row :gutter="15" class=" main" :style="{ margin: '0 auto', width: '100%' }">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="8" >
<jnpf-form-tip-item
label="显示别名" prop="showName" >
<JnpfInput v-model="dataForm.showName" @change="changeData('showName',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<jnpf-form-tip-item label="显示别名" prop="showName">
<JnpfInput v-model="dataForm.showName" @change="changeData('showName', -1)"
placeholder="请输入" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="门号" prop="doorNum" >
<JnpfSelect v-model="dataForm.doorNum" @change="changeData('doorNum',-1)"
placeholder="请选择" clearable :style='{"width":"100%"}' :options="doorNumOptions" :props="doorNumProps" >
<el-col :span="8">
<jnpf-form-tip-item label="门号" prop="doorNum">
<JnpfSelect v-model="dataForm.doorNum" @change="changeData('doorNum', -1)"
placeholder="请选择" clearable :style='{ "width": "100%" }' :options="doorNumOptions"
:props="doorNumProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="所属设备" prop="deviceCode" >
<JnpfPopupSelect v-model="dataForm.deviceCode" @change="changeData('deviceCode',-1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.deviceCode" placeholder="请选择" propsValue="device_code" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='device_name' field='deviceCode' interfaceId="564713894723988869" :pageSize="20" :columnOptions="deviceCodecolumnOptions" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<jnpf-form-tip-item label="所属设备" prop="deviceCode">
<JnpfPopupSelect v-model="dataForm.deviceCode" @change="changeData('deviceCode', -1)"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.deviceCode"
placeholder="请选择" propsValue="device_code" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='device_name' field='deviceCode'
interfaceId="564713894723988869" :pageSize="20"
:columnOptions="deviceCodecolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="是否显示" prop="isShow" >
<JnpfRadio v-model="dataForm.isShow" @change="changeData('isShow',-1)"
optionType="default" direction="horizontal" size="small" :options="isShowOptions" :props="isShowProps" >
<el-col :span="8">
<jnpf-form-tip-item label="是否显示" prop="isShow">
<JnpfRadio v-model="dataForm.isShow" @change="changeData('isShow', -1)"
optionType="default" direction="horizontal" size="small" :options="isShowOptions"
:props="isShowProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="显示顺序" prop="showOrd" >
<JnpfInputNumber v-model="dataForm.showOrd" @change="changeData('showOrd',-1)"
placeholder="数字文本" :step="1" >
<el-col :span="8">
<jnpf-form-tip-item label="显示顺序" prop="showOrd">
<JnpfInputNumber v-model="dataForm.showOrd" @change="changeData('showOrd', -1)"
placeholder="数字文本" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="回收品大类" prop="productCode" >
<JnpfRadio v-model="dataForm.productCode" @change="changeData('productCode',-1)"
optionType="default" direction="horizontal" size="small" :options="productCodeOptions" :props="productCodeProps" >
<el-col :span="24">
<jnpf-form-tip-item label="回收品大类" prop="productCode">
<JnpfRadio v-model="dataForm.productCode" @change="changeData('productCode', -1)"
optionType="default" direction="horizontal" size="small"
:options="productCodeOptions" :props="productCodeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="回收品子类" prop="productSubCode" >
<JnpfRadio v-model="dataForm.productSubCode" @change="changeData('productSubCode',-1)"
optionType="default" direction="horizontal" size="small" :options="productSubCodeOptions" :props="productSubCodeProps" >
<el-col :span="24">
<jnpf-form-tip-item label="回收品子类" prop="productSubCode">
<JnpfRadio v-model="dataForm.productSubCode" @change="changeData('productSubCode', -1)"
optionType="default" direction="horizontal" size="small"
:options="productSubCodeOptions" :props="productSubCodeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="价格" prop="price" >
<JnpfInputNumber v-model="dataForm.price" @change="changeData('price',-1)"
placeholder="数字文本" :precision="2" :step="1" >
<el-col :span="8">
<jnpf-form-tip-item label="价格" prop="price">
<JnpfInputNumber v-model="dataForm.price" @change="changeData('price', -1)"
placeholder="数字文本" :precision="2" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="满溢状态" prop="fullStatus" >
<JnpfRadio v-model="dataForm.fullStatus" @change="changeData('fullStatus',-1)"
optionType="default" direction="horizontal" size="small" :options="fullStatusOptions" :props="fullStatusProps" >
<el-col :span="8">
<jnpf-form-tip-item label="满溢状态" prop="fullStatus">
<JnpfRadio v-model="dataForm.fullStatus" @change="changeData('fullStatus', -1)"
optionType="default" direction="horizontal" size="small"
:options="fullStatusOptions" :props="fullStatusProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="满溢设置" prop="fullSet" >
<JnpfRadio v-model="dataForm.fullSet" @change="changeData('fullSet',-1)"
optionType="default" direction="horizontal" size="small" :options="fullSetOptions" :props="fullSetProps" >
<el-col :span="8">
<jnpf-form-tip-item label="满溢设置" prop="fullSet">
<JnpfRadio v-model="dataForm.fullSet" @change="changeData('fullSet', -1)"
optionType="default" direction="horizontal" size="small" :options="fullSetOptions"
:props="fullSetProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="烟雾状态" prop="smogStauts" >
<JnpfRadio v-model="dataForm.smogStauts" @change="changeData('smogStauts',-1)"
optionType="default" direction="horizontal" size="small" :options="smogStautsOptions" :props="smogStautsProps" >
<el-col :span="8">
<jnpf-form-tip-item label="烟雾状态" prop="smogStauts">
<JnpfRadio v-model="dataForm.smogStauts" @change="changeData('smogStauts', -1)"
optionType="default" direction="horizontal" size="small"
:options="smogStautsOptions" :props="smogStautsProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="烟雾设置" prop="smogSet" >
<JnpfRadio v-model="dataForm.smogSet" @change="changeData('smogSet',-1)"
optionType="default" direction="horizontal" size="small" :options="smogSetOptions" :props="smogSetProps" >
<el-col :span="8">
<jnpf-form-tip-item label="烟雾设置" prop="smogSet">
<JnpfRadio v-model="dataForm.smogSet" @change="changeData('smogSet', -1)"
optionType="default" direction="horizontal" size="small" :options="smogSetOptions"
:props="smogSetProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="容器重量" prop="containerWeight" >
<JnpfInputNumber v-model="dataForm.containerWeight" @change="changeData('containerWeight',-1)"
placeholder="数字文本" :precision="2" addonAfter="KG" :step="1" >
<el-col :span="8">
<jnpf-form-tip-item label="容器重量" prop="containerWeight">
<JnpfInputNumber v-model="dataForm.containerWeight"
@change="changeData('containerWeight', -1)" placeholder="数字文本" :precision="2"
addonAfter="KG" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="当前重量" prop="currentWeight" >
<JnpfInputNumber v-model="dataForm.currentWeight" @change="changeData('currentWeight',-1)"
placeholder="数字文本" :precision="2" addonAfter="KG" :step="1" >
<el-col :span="8">
<jnpf-form-tip-item label="当前重量" prop="currentWeight">
<JnpfInputNumber v-model="dataForm.currentWeight"
@change="changeData('currentWeight', -1)" placeholder="数字文本" :precision="2"
addonAfter="KG" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="重量上限" prop="warningWeight" >
<JnpfInputNumber v-model="dataForm.warningWeight" @change="changeData('warningWeight',-1)"
placeholder="数字文本" :precision="2" addonAfter="KG" :step="1" >
<el-col :span="8">
<jnpf-form-tip-item label="重量上限" prop="warningWeight">
<JnpfInputNumber v-model="dataForm.warningWeight"
@change="changeData('warningWeight', -1)" placeholder="数字文本" :precision="2"
addonAfter="KG" :step="1">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="关闭延时" tipLabel="投递门关闭延时" prop="closeDelay" >
<JnpfInput v-model="dataForm.closeDelay" @change="changeData('closeDelay',-1)"
placeholder="请输入" addonAfter="秒" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<jnpf-form-tip-item label="关闭延时" tipLabel="投递门关闭延时" prop="closeDelay">
<JnpfInput v-model="dataForm.closeDelay" @change="changeData('closeDelay', -1)"
placeholder="请输入" addonAfter="秒" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="投递门" tipLabel="投递门状态" prop="deliveryDoorStatus" >
<JnpfRadio v-model="dataForm.deliveryDoorStatus" @change="changeData('deliveryDoorStatus',-1)"
optionType="default" direction="horizontal" size="small" :options="deliveryDoorStatusOptions" :props="deliveryDoorStatusProps" >
<el-col :span="8">
<jnpf-form-tip-item label="投递门" tipLabel="投递门状态" prop="deliveryDoorStatus">
<JnpfRadio v-model="dataForm.deliveryDoorStatus"
@change="changeData('deliveryDoorStatus', -1)" optionType="default"
direction="horizontal" size="small" :options="deliveryDoorStatusOptions"
:props="deliveryDoorStatusProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="清运门" tipLabel="清运门状态" prop="cleanDoorStatus" >
<JnpfRadio v-model="dataForm.cleanDoorStatus" @change="changeData('cleanDoorStatus',-1)"
optionType="default" direction="horizontal" size="small" :options="cleanDoorStatusOptions" :props="cleanDoorStatusProps" >
<el-col :span="8">
<jnpf-form-tip-item label="清运门" tipLabel="清运门状态" prop="cleanDoorStatus">
<JnpfRadio v-model="dataForm.cleanDoorStatus" @change="changeData('cleanDoorStatus', -1)"
optionType="default" direction="horizontal" size="small"
:options="cleanDoorStatusOptions" :props="cleanDoorStatusProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="垃圾袋编码" prop="bagNo" >
<JnpfInput v-model="dataForm.bagNo" @change="changeData('bagNo',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<jnpf-form-tip-item label="垃圾袋编码" prop="bagNo">
<JnpfInput v-model="dataForm.bagNo" @change="changeData('bagNo', -1)" placeholder="请输入"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item
label="桶身图片" prop="bucketImg" >
<JnpfUploadImg v-model="dataForm.bucketImg" @change="changeData('bucketImg',-1)"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" >
<el-col :span="24">
<jnpf-form-tip-item label="桶身图片" prop="bucketImg">
<JnpfUploadImg v-model="dataForm.bucketImg" @change="changeData('bucketImg', -1)"
:fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0">
</JnpfUploadImg>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="状态" prop="status" >
<JnpfRadio v-model="dataForm.status" @change="changeData('status',-1)"
optionType="default" direction="horizontal" size="small" :options="statusOptions" :props="statusProps" >
<el-col :span="8">
<jnpf-form-tip-item label="状态" prop="status">
<JnpfRadio v-model="dataForm.status" @change="changeData('status', -1)"
optionType="default" direction="horizontal" size="small" :options="statusOptions"
:props="statusProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" >
<jnpf-form-tip-item
label="租户" prop="tenantId" >
<JnpfOrganizeSelect v-model="dataForm.tenantId" @change="changeData('tenantId',-1)"
placeholder="请选择" selectType="all" :ableIds="ableAll.tenantIdableIds" clearable :style='{"width":"100%"}'>
<el-col :span="8">
<jnpf-form-tip-item label="租户" prop="tenantId">
<JnpfOrganizeSelect v-model="dataForm.tenantId" @change="changeData('tenantId', -1)"
placeholder="请选择" selectType="all" :ableIds="ableAll.tenantIdableIds" clearable
:style='{ "width": "100%" }'>
</JnpfOrganizeSelect>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false"/>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible = false" />
</el-row>
</div>
</transition>
</template>
</template>
<script>
import request from '@/utils/request'
import {mapGetters} from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: { },
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
components: {},
props: [],
data() {
return {
@ -245,45 +242,45 @@
loading: false,
btnLoading: false,
formRef: 'formRef',
setting:{},
setting: {},
eventType: '',
userBoxVisible:false,
userBoxVisible: false,
selectDialogVisible: false,
currTableConf:{},
dataValueAll:{},
addTableConf:{
currTableConf: {},
dataValueAll: {},
addTableConf: {
},
//
ableAll:{
ableAll: {
},
tableRows:{
tableRows: {
},
Vmodel:"",
currVmodel:"",
Vmodel: "",
currVmodel: "",
dataForm: {
bucketCode : undefined,
showName : undefined,
doorNum : undefined,
deviceCode : undefined,
isShow : "1",
showOrd : 0,
productCode : "542987705491919312",
productSubCode : undefined,
price : undefined,
fullStatus : undefined,
fullSet : undefined,
smogStauts : undefined,
smogSet : undefined,
containerWeight : undefined,
currentWeight : undefined,
warningWeight : undefined,
closeDelay : undefined,
deliveryDoorStatus : undefined,
cleanDoorStatus : undefined,
bagNo : undefined,
bucketImg : [],
status : undefined,
tenantId : [],
bucketCode: undefined,
showName: undefined,
doorNum: undefined,
deviceCode: undefined,
isShow: "1",
showOrd: 0,
productCode: "542987705491919312",
productSubCode: undefined,
price: undefined,
fullStatus: undefined,
fullSet: undefined,
smogStauts: undefined,
smogSet: undefined,
containerWeight: undefined,
currentWeight: undefined,
warningWeight: undefined,
closeDelay: undefined,
deliveryDoorStatus: undefined,
cleanDoorStatus: undefined,
bagNo: undefined,
bucketImg: [],
status: undefined,
tenantId: [],
},
tableRequiredData: {},
dataRule:
@ -296,55 +293,55 @@
},
],
},
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"}],
doorNumProps:{"label":"fullName","value":"id" },
deviceCodecolumnOptions:[ {"label":"设备编码","value":"device_code"}, {"label":"设备名称","value":"device_name"},],
isShowOptions:[{"fullName":"关闭","id":"0"},{"fullName":"显示","id":"1"}],
isShowProps:{"label":"fullName","value":"id" },
productCodeOptions:[],
productCodeProps:{"label":"name","value":"id" },
productSubCodeOptions:[],
productSubCodeProps:{"label":"name","value":"id" },
fullStatusOptions:[{"fullName":"未满","id":"0"},{"fullName":"满","id":"1"}],
fullStatusProps:{"label":"fullName","value":"id" },
fullSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
fullSetProps:{"label":"fullName","value":"id" },
smogStautsOptions:[{"fullName":"正常","id":"0"},{"fullName":"报警","id":"1"}],
smogStautsProps:{"label":"fullName","value":"id" },
smogSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
smogSetProps:{"label":"fullName","value":"id" },
deliveryDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"2"}],
deliveryDoorStatusProps:{"label":"fullName","value":"id" },
cleanDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
cleanDoorStatusProps:{"label":"fullName","value":"id" },
statusOptions:[{"fullName":"停用","id":"0"},{"fullName":"启用","id":"1"}],
statusProps:{"label":"fullName","value":"id" },
childIndex:-1,
isEdit: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" }],
doorNumProps: { "label": "fullName", "value": "id" },
deviceCodecolumnOptions: [{ "label": "设备编码", "value": "device_code" }, { "label": "设备名称", "value": "device_name" },],
isShowOptions: [{ "fullName": "关闭", "id": 0 }, { "fullName": "显示", "id": 1 }],
isShowProps: { "label": "fullName", "value": "id" },
productCodeOptions: [],
productCodeProps: { "label": "name", "value": "id" },
productSubCodeOptions: [],
productSubCodeProps: { "label": "name", "value": "id" },
fullStatusOptions: [{ "fullName": "未满", "id": 0 }, { "fullName": "满", "id": 1 }],
fullStatusProps: { "label": "fullName", "value": "id" },
fullSetOptions: [{ "fullName": "关闭", "id": 0 }, { "fullName": "开启", "id": 1 }],
fullSetProps: { "label": "fullName", "value": "id" },
smogStautsOptions: [{ "fullName": "正常", "id": 0 }, { "fullName": "报警", "id": 1 }],
smogStautsProps: { "label": "fullName", "value": "id" },
smogSetOptions: [{ "fullName": "关闭", "id": 0 }, { "fullName": "开启", "id": 1 }],
smogSetProps: { "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" },
statusOptions: [{ "fullName": "停用", "id": 0 }, { "fullName": "启用", "id": 1 }],
statusProps: { "label": "fullName", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
bucketCode:[] ,
showName:[] ,
doorNum:[] ,
deviceCode:[] ,
isShow:[] ,
showOrd:[] ,
productCode:[] ,
productSubCode:[{"dataType":"varchar","defaultValue":"","field":"parent_id","fieldName":"","id":"ZBu5m72","jnpfKey":"radio","relationField":"productCode","required":"0"}] ,
price:[] ,
fullStatus:[] ,
fullSet:[] ,
smogStauts:[] ,
smogSet:[] ,
containerWeight:[] ,
currentWeight:[] ,
warningWeight:[] ,
closeDelay:[] ,
deliveryDoorStatus:[] ,
cleanDoorStatus:[] ,
bagNo:[] ,
bucketImg:[] ,
status:[] ,
tenantId:[] ,
bucketCode: [],
showName: [],
doorNum: [],
deviceCode: [],
isShow: [],
showOrd: [],
productCode: [],
productSubCode: [{ "dataType": "varchar", "defaultValue": "", "field": "parent_id", "fieldName": "", "id": "ZBu5m72", "jnpfKey": "radio", "relationField": "productCode", "required": "0" }],
price: [],
fullStatus: [],
fullSet: [],
smogStauts: [],
smogSet: [],
containerWeight: [],
currentWeight: [],
warningWeight: [],
closeDelay: [],
deliveryDoorStatus: [],
cleanDoorStatus: [],
bagNo: [],
bucketImg: [],
status: [],
tenantId: [],
},
}
},
@ -357,7 +354,7 @@
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() {},
mounted() { },
methods: {
prev() {
this.index--
@ -387,7 +384,7 @@
},
getInfo(id) {
request({
url: '/api/scm/RecycleBucket/'+ id,
url: '/api/scm/RecycleBucket/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
@ -411,7 +408,7 @@
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if(this[options]){
if (this[options]) {
this[options]()
}
this.changeData(key, index)
@ -420,8 +417,8 @@
}
}
},
changeDataFormData(type, data, model,index,defaultValue) {
if(!this.isEdit) {
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
@ -435,7 +432,7 @@
}
}
},
dataAll(){
dataAll() {
this.getproductCodeOptions();
this.getproductSubCodeOptions();
},
@ -444,24 +441,24 @@
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.productCode))
for (let i = 0; i < templateJsonList.length; i++) {
let json = templateJsonList[i];
if(json.relationField){
if (json.relationField) {
let relationFieldAll = json.relationField.split("-");
let val = json.defaultValue;
if(relationFieldAll.length>1 && index>-1){
val = this.dataForm[relationFieldAll[0]+'List']&&this.dataForm[relationFieldAll[0]+'List'].length?this.dataForm[relationFieldAll[0]+'List'][index][relationFieldAll[1]]:''
}else {
if (relationFieldAll.length > 1 && index > -1) {
val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
} else {
val = this.dataForm[relationFieldAll]
}
json.defaultValue = val
}
}
let template ={
paramList:templateJsonList
let template = {
paramList: templateJsonList
}
getDataInterfaceRes('565507078836203205',template).then(res => {
getDataInterfaceRes('565507078836203205', template).then(res => {
let data = res.data
this.productCodeOptions = data
this.changeDataFormData(1,'productCode','productCode',index,'542987705491919312')
this.changeDataFormData(1, 'productCode', 'productCode', index, '542987705491919312')
})
},
getproductSubCodeOptions() {
@ -469,33 +466,33 @@
let templateJsonList = JSON.parse(JSON.stringify(this.interfaceRes.productSubCode))
for (let i = 0; i < templateJsonList.length; i++) {
let json = templateJsonList[i];
if(json.relationField){
if (json.relationField) {
let relationFieldAll = json.relationField.split("-");
let val = json.defaultValue;
if(relationFieldAll.length>1 && index>-1){
val = this.dataForm[relationFieldAll[0]+'List']&&this.dataForm[relationFieldAll[0]+'List'].length?this.dataForm[relationFieldAll[0]+'List'][index][relationFieldAll[1]]:''
}else {
if (relationFieldAll.length > 1 && index > -1) {
val = this.dataForm[relationFieldAll[0] + 'List'] && this.dataForm[relationFieldAll[0] + 'List'].length ? this.dataForm[relationFieldAll[0] + 'List'][index][relationFieldAll[1]] : ''
} else {
val = this.dataForm[relationFieldAll]
}
json.defaultValue = val
}
}
let template ={
paramList:templateJsonList
let template = {
paramList: templateJsonList
}
getDataInterfaceRes('565508644465028805',template).then(res => {
getDataInterfaceRes('565508644465028805', template).then(res => {
let data = res.data
this.productSubCodeOptions = data
this.changeDataFormData(1,'productSubCode','productSubCode',index,'')
this.changeDataFormData(1, 'productSubCode', 'productSubCode', index, '')
})
},
goBack() {
this.$emit('refresh')
},
clearData(){
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
init(id,isDetail,allList) {
init(id, isDetail, allList) {
this.prevDis = false
this.nextDis = false
this.allList = allList || []
@ -514,16 +511,16 @@
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if(this.dataForm.id){
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/scm/RecycleBucket/'+this.dataForm.id,
url: '/api/scm/RecycleBucket/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
} else {
this.clearData()
this.initDefaultData()
}
@ -544,7 +541,7 @@
})
},
request() {
let _data =this.dataList()
let _data = this.dataList()
if (this.dataFormSubmitType == 2) {
this.continueBtnLoading = true
} else {
@ -574,13 +571,13 @@
this.$emit('refresh', true)
}
})
}).catch(()=>{
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
}else{
} else {
request({
url: '/api/scm/RecycleBucket/'+this.dataForm.id,
url: '/api/scm/RecycleBucket/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -595,15 +592,15 @@
this.$emit('refresh', true)
}
})
}).catch(()=>{
}).catch(() => {
this.btnLoading = false
this.continueBtnLoading = false
})
}
},
openSelectDialog(key) {
this.currTableConf=this.addTableConf[key]
this.currVmodel=key
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
@ -612,8 +609,8 @@
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if(this['get'+this.currVmodel]){
this['get'+this.currVmodel](t)
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
@ -680,18 +677,18 @@
}
return timeDataValue;
},
dataList(){
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
this.childIndex=-1
this.childIndex = -1
},
},
}
}
</script>

@ -1,10 +1,3 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
@ -22,9 +15,8 @@
</el-col>
<el-col :span="6">
<el-form-item label="门号">
<JnpfSelect v-model="query.doorNum" placeholder="请选择" clearable
:options="doorNumOptions"
:props="doorNumProps" multiple >
<JnpfSelect v-model="query.doorNum" placeholder="请选择" clearable :options="doorNumOptions"
:props="doorNumProps" multiple>
</JnpfSelect>
</el-form-item>
</el-col>
@ -39,7 +31,8 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<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>
</div>
<div class="JNPF-common-head-right">
@ -54,168 +47,117 @@
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
:span-method="arraySpanMethod"
>
<el-table-column
prop="bucketCode"
label="桶编号" align="left"
>
:span-method="arraySpanMethod">
<el-table-column prop="bucketCode" label="桶编号" align="left">
</el-table-column>
<el-table-column
prop="showName"
label="显示别名" align="left"
>
<el-table-column prop="showName" label="显示别名" align="left">
</el-table-column>
<el-table-column label="门号" prop="doorNum" algin="left"
>
<el-table-column label="门号" prop="doorNum" algin="left">
<template slot-scope="scope">
{{ scope.row.doorNum}}
{{ scope.row.doorNum }}
</template>
</el-table-column>
<el-table-column
prop="deviceCode"
label="所属设备" align="left"
>
<el-table-column prop="deviceCode" label="所属设备" align="left">
</el-table-column>
<el-table-column label="是否显示" prop="isShow" algin="left"
>
<el-table-column label="是否显示" prop="isShow" algin="left">
<template slot-scope="scope">
{{ scope.row.isShow}}
{{ scope.row.isShow }}
</template>
</el-table-column>
<el-table-column
prop="showOrd"
label="显示顺序" align="left"
>
<template slot-scope="scope" v-if="scope.row.showOrd" >
<JnpfNumber v-model="scope.row.showOrd" :thousands="false"/>
<el-table-column prop="showOrd" label="显示顺序" align="left">
<template slot-scope="scope" v-if="scope.row.showOrd">
<JnpfNumber v-model="scope.row.showOrd" :thousands="false" />
</template>
</el-table-column>
<el-table-column
prop="productCode"
label="回收品大类" align="left"
>
<el-table-column prop="productCode" label="回收品大类" align="left">
</el-table-column>
<el-table-column
prop="productSubCode"
label="回收品子类" align="left"
>
<el-table-column prop="productSubCode" label="回收品子类" align="left">
</el-table-column>
<el-table-column
prop="price"
label="价格" align="left"
>
<template slot-scope="scope" v-if="scope.row.price" >
<JnpfNumber v-model="scope.row.price" :thousands="false"/>
<el-table-column prop="price" label="价格" align="left">
<template slot-scope="scope" v-if="scope.row.price">
<JnpfNumber v-model="scope.row.price" :thousands="false" />
</template>
</el-table-column>
<el-table-column label="满溢状态" prop="fullStatus" algin="left"
>
<el-table-column label="满溢状态" prop="fullStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.fullStatus}}
{{ scope.row.fullStatus }}
</template>
</el-table-column>
<el-table-column label="满溢设置" prop="fullSet" algin="left"
>
<el-table-column label="满溢设置" prop="fullSet" algin="left">
<template slot-scope="scope">
{{ scope.row.fullSet}}
{{ scope.row.fullSet }}
</template>
</el-table-column>
<el-table-column label="烟雾状态" prop="smogStauts" algin="left"
>
<el-table-column label="烟雾状态" prop="smogStauts" algin="left">
<template slot-scope="scope">
{{ scope.row.smogStauts}}
{{ scope.row.smogStauts }}
</template>
</el-table-column>
<el-table-column label="烟雾设置" prop="smogSet" algin="left"
>
<el-table-column label="烟雾设置" prop="smogSet" algin="left">
<template slot-scope="scope">
{{ scope.row.smogSet}}
{{ scope.row.smogSet }}
</template>
</el-table-column>
<el-table-column
prop="containerWeight"
label="容器重量" align="left"
>
<template slot-scope="scope" v-if="scope.row.containerWeight" >
<JnpfNumber v-model="scope.row.containerWeight" :thousands="false"/>
<el-table-column prop="containerWeight" label="容器重量" align="left">
<template slot-scope="scope" v-if="scope.row.containerWeight">
<JnpfNumber v-model="scope.row.containerWeight" :thousands="false" />
</template>
</el-table-column>
<el-table-column
prop="currentWeight"
label="当前重量" align="left"
>
<template slot-scope="scope" v-if="scope.row.currentWeight" >
<JnpfNumber v-model="scope.row.currentWeight" :thousands="false"/>
<el-table-column prop="currentWeight" label="当前重量" align="left">
<template slot-scope="scope" v-if="scope.row.currentWeight">
<JnpfNumber v-model="scope.row.currentWeight" :thousands="false" />
</template>
</el-table-column>
<el-table-column
prop="warningWeight"
label="重量上限" align="left"
>
<template slot-scope="scope" v-if="scope.row.warningWeight" >
<JnpfNumber v-model="scope.row.warningWeight" :thousands="false"/>
<el-table-column prop="warningWeight" label="重量上限" align="left">
<template slot-scope="scope" v-if="scope.row.warningWeight">
<JnpfNumber v-model="scope.row.warningWeight" :thousands="false" />
</template>
</el-table-column>
<el-table-column
prop="closeDelay"
label="关闭延时" align="left"
>
<el-table-column prop="closeDelay" label="关闭延时" align="left">
</el-table-column>
<el-table-column label="投递门" prop="deliveryDoorStatus" algin="left"
>
<el-table-column label="投递门" prop="deliveryDoorStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.deliveryDoorStatus}}
{{ scope.row.deliveryDoorStatus }}
</template>
</el-table-column>
<el-table-column label="清运门" prop="cleanDoorStatus" algin="left"
>
<el-table-column label="清运门" prop="cleanDoorStatus" algin="left">
<template slot-scope="scope">
{{ scope.row.cleanDoorStatus}}
{{ scope.row.cleanDoorStatus }}
</template>
</el-table-column>
<el-table-column
prop="bagNo"
label="垃圾袋编码" align="left"
>
<el-table-column prop="bagNo" label="垃圾袋编码" align="left">
</el-table-column>
<el-table-column label="状态" prop="status" algin="left"
>
<el-table-column label="状态" prop="status" algin="left">
<template slot-scope="scope">
{{ scope.row.status}}
{{ scope.row.status }}
</template>
</el-table-column>
<el-table-column
prop="tenantId"
label="租户" align="left"
>
<el-table-column prop="tenantId" label="租户" align="left">
</el-table-column>
<el-table-column label="操作"
fixed="right" width="150" >
<template slot-scope="scope" >
<el-button type="text"
@click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'" >编辑
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'">
</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 type="text" v-has="'btn_detail'"
@click="goDetail(scope.row.id)">详情
<el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</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>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
@ -224,39 +166,39 @@
<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'
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 {
export default {
components: {
JNPFForm,
Detail,
ExportBox,ToFormDetail , SuperQuery
ExportBox, ToFormDetail, SuperQuery
},
data() {
return {
keyword:'',
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible:false,
expandObj:{},
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList:[],
exportList: [],
columnList,
superQueryVisible: false,
@ -264,9 +206,9 @@
uploadBoxVisible: false,
detailVisible: false,
query: {
bucketCode:undefined,
showName:undefined,
doorNum:undefined,
bucketCode: undefined,
showName: undefined,
doorNum: undefined,
},
treeProps: {
children: 'children',
@ -290,30 +232,30 @@
flowListVisible: false,
flowList: [],
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"}],
doorNumProps:{"label":"fullName","value":"id" },
isShowOptions:[{"fullName":"关闭","id":"0"},{"fullName":"显示","id":"1"}],
isShowProps:{"label":"fullName","value":"id" },
productCodeOptions:[],
productCodeProps:{"label":"name","value":"id" },
productSubCodeOptions:[],
productSubCodeProps:{"label":"name","value":"id" },
fullStatusOptions:[{"fullName":"未满","id":"0"},{"fullName":"满","id":"1"}],
fullStatusProps:{"label":"fullName","value":"id" },
fullSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
fullSetProps:{"label":"fullName","value":"id" },
smogStautsOptions:[{"fullName":"正常","id":"0"},{"fullName":"报警","id":"1"}],
smogStautsProps:{"label":"fullName","value":"id" },
smogSetOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
smogSetProps:{"label":"fullName","value":"id" },
deliveryDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"2"}],
deliveryDoorStatusProps:{"label":"fullName","value":"id" },
cleanDoorStatusOptions:[{"fullName":"关闭","id":"0"},{"fullName":"开启","id":"1"}],
cleanDoorStatusProps:{"label":"fullName","value":"id" },
statusOptions:[{"fullName":"停用","id":"0"},{"fullName":"启用","id":"1"}],
statusProps:{"label":"fullName","value":"id" },
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" }],
doorNumProps: { "label": "fullName", "value": "id" },
isShowOptions: [{ "fullName": "关闭", "id": "0" }, { "fullName": "显示", "id": "1" }],
isShowProps: { "label": "fullName", "value": "id" },
productCodeOptions: [],
productCodeProps: { "label": "name", "value": "id" },
productSubCodeOptions: [],
productSubCodeProps: { "label": "name", "value": "id" },
fullStatusOptions: [{ "fullName": "未满", "id": "0" }, { "fullName": "满", "id": "1" }],
fullStatusProps: { "label": "fullName", "value": "id" },
fullSetOptions: [{ "fullName": "关闭", "id": "0" }, { "fullName": "开启", "id": "1" }],
fullSetProps: { "label": "fullName", "value": "id" },
smogStautsOptions: [{ "fullName": "正常", "id": "0" }, { "fullName": "报警", "id": "1" }],
smogStautsProps: { "label": "fullName", "value": "id" },
smogSetOptions: [{ "fullName": "关闭", "id": "0" }, { "fullName": "开启", "id": "1" }],
smogSetProps: { "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" },
statusOptions: [{ "fullName": "停用", "id": "0" }, { "fullName": "启用", "id": "1" }],
statusProps: { "label": "fullName", "value": "id" },
interfaceRes: {
deviceCode:[] ,
deviceCode: [],
},
}
},
@ -357,9 +299,9 @@
},
loadNode(node, resolve) {
const nodeData = node.data
const config ={
treeInterfaceId:"",
treeTemplateJson:[]
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
@ -438,7 +380,7 @@
}
})
newList.forEach(item => {
if (item.children && item.children.length ) {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
@ -476,13 +418,13 @@
}
this.exportList = exportList
},
goDetail(id){
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
sortChange({column, prop, order}) {
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
@ -501,16 +443,16 @@
...this.query,
keyword: this.keyword,
dataType: 0,
menuId:this.menuId,
moduleId:'564718669121203589',
type:1,
menuId: this.menuId,
moduleId: '564718669121203589',
type: 1,
};
request({
url: `/api/scm/RecycleBucket/getList`,
method: 'post',
data: _query
}).then(res => {
var _list =res.data.list;
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
@ -538,10 +480,10 @@
}).catch(() => {
});
},
handelUpload(){
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("","scm/RecycleBucket")
this.$refs.UploadBox.init("", "scm/RecycleBucket")
})
},
openSuperQuery() {
@ -556,10 +498,10 @@
this.initData()
},
addOrUpdateHandle(row, isDetail) {
let id = row?row.id:""
let id = row ? row.id : ""
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail,this.list)
this.$refs.JNPFForm.init(id, isDetail, this.list)
})
},
exportData() {
@ -569,7 +511,7 @@
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
request({
url: `/api/scm/RecycleBucket/Actions/Export`,
method: 'post',
@ -582,10 +524,10 @@
})
},
search() {
this.listQuery.currentPage=1
this.listQuery.pageSize=20
this.listQuery.sort="desc"
this.listQuery.sidx=""
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
refresh(isrRefresh) {
@ -601,5 +543,5 @@
if (isrRefresh) this.reset()
},
}
}
}
</script>

Loading…
Cancel
Save