zhangdan 4 lat temu
rodzic
commit
a3e618f5b7

+ 8 - 9
src/api/collector.js

@@ -15,13 +15,13 @@ export const getCollectorList = params => {
 // 重置密码
 export const resetPSD = params => {
   return axios({
-    url: 'sleler/user/resetPwd',
-    data: params,
-    method: 'POST'
+    url: `gatherUser/resetPwd/resetPwd/${params.id}`,
+    data: {},
+    method: 'get'
   })
 }
 
-// 改变权限状态接口
+// 改变状态接口
 export const updateEnableStatus = params => {
   return axios({
     url: `gatherUser/enable/${params.id}/${params.flag}`,
@@ -30,8 +30,8 @@ export const updateEnableStatus = params => {
   })
 }
 
-// 删除用户接口
-export const delectCollector= params => {
+// 删除
+export const delectCollector = params => {
   return axios({
     url: `gatherUser/delete/${params.id}`,
     data: {},
@@ -39,7 +39,7 @@ export const delectCollector= params => {
   })
 }
 
-// 新增/编辑保存接口
+// 新增/编辑保存
 export const saveCollector = params => {
   return axios({
     url: 'gatherUser/save',
@@ -49,7 +49,7 @@ export const saveCollector = params => {
 }
 
 // 编辑查详情
-export const slelerDetails = (params) => {
+export const collectorDetails = (params) => {
   const url = `sleler/user/findById/${params.id}`
   return axios({
     url: url,
@@ -57,4 +57,3 @@ export const slelerDetails = (params) => {
     method: 'get'
   })
 }
-

+ 44 - 0
src/api/reportForm.js

@@ -62,3 +62,47 @@ export const getSumTotal = (params) => {
     method: 'post'
   })
 }
+
+// 非可回收垃圾汇总列表
+export const getRubbishList = (params) => {
+  const url = `stationRubbishRubbish/sum/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 非可回收垃圾合计
+export const getRubbishTotal = (params) => {
+  const url = `stationRubbishRubbish/totalSumInfo`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 非可回收垃圾明细列表
+export const getRubbishDetailList = (params) => {
+  const url = `gather/detail/query/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 非可回收垃圾明细合计
+export const getRubbishDetailTotal = (params) => {
+  const url = `gather/detailTotalSum`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 2 - 3
src/views/businessManage/partnerManage/partnerManage.vue

@@ -186,14 +186,13 @@ export default {
   methods: {
     showModal () {
       this.itemId = null
-	  this.itemData = {}
+      this.itemData = {}
       this.openSupplierModal = true
     },
     // 编辑
     handleEdit (record) {
 	  this.itemId = record.id
 	  this.itemData = record
-	  console.log(this.itemId, '-------编辑')
 	  this.openSupplierModal = true
     },
     cancel () {
@@ -203,7 +202,7 @@ export default {
     // 重置
     resetForm () {
       this.queryParam.name = ''
-	  this.queryParam.contactPhone = ''
+      this.queryParam.contactPhone = ''
       this.$refs.table.refresh(true)
     },
     // 更改启用禁用状态

+ 2 - 2
src/views/businessManage/userManage/userManage.vue

@@ -69,7 +69,7 @@
         <span v-if="!$hasPermissions('B_userManage_enable')">--</span>
       </span>
       <span slot="action" slot-scope="text, record">
-        <a-icon type="qrcode" title="查看小程序码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#008000', padding: '0 10px' }" />
+        <a-icon type="qrcode" title="查看二维码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#008000', padding: '0 10px' }" />
         <a-icon
           v-if="$hasPermissions('B_userManage_resetPwd') && record.loginFlag==1"
           type="unlock"
@@ -87,7 +87,7 @@
       </span>
     </s-table>
     <userModal :visible="showModal" @refresh="$refs.table.refresh(true)" :itemId="itemId" @close="cancel"></userModal>
-    <!-- 查看小程序码 -->
+    <!-- 查看二维码 -->
     <a-modal
       class="qrCodeModal"
       title="查看二维码"

+ 27 - 22
src/views/equipmentManage/collector/addCollector.vue

@@ -2,31 +2,36 @@
   <a-modal :footer="null" centered :title="titleText" v-model="isShow" @cancle="cancel">
     <a-spin :spinning="loading">
       <a-form-model :model="formData" ref="ruleForm" :rules="rules">
-        <a-form-model-item label="网点标签" :label-col="{span:6}" :wrapper-col="{span:16}" prop="stationNo">
+        <a-form-model-item label="选择网点" :label-col="{span:6}" :wrapper-col="{span:16}" prop="stationNo">
           <a-select
-            style="max-height: 50px;overflow: auto;"
-            id="network-stationNo"
-            placeholder="请选择网点标签"
+            id="addCollector-stationNo"
+            placeholder="请选择网点名称"
             allowClear
             v-model="formData.stationNo"
             :showSearch="true"
             option-filter-prop="children"
             :filter-option="filterOption"
           >
-            <a-select-option v-for="item in lableData" :key="item.labelNo" :value="item.labelNo">{{ item.labelName }}</a-select-option>
+            <a-select-option v-for="item in optionData" :key="item.stationNo" :value="item.stationNo">{{ item.name }}</a-select-option>
           </a-select>
         </a-form-model-item>
         <a-form-model-item label="采集员姓名" :label-col="{span:6}" :wrapper-col="{span:16}">
-          <a-input placeholder="请输入网点标签名称(30个字符以内)" v-model="formData.gatherName" allowClear :maxLength="30"/>
+          <a-input placeholder="请输入网点标签名称(30个字符以内)" v-model="formData.gatherName" allowClear :maxLength="30" id="addCollector-gatherName"/>
         </a-form-model-item>
         <a-form-model-item label="采集员手机" :label-col="{span:6}" :wrapper-col="{span:16}" prop="gatherPhone">
-          <a-input placeholder="请输入采集员手机" v-model="formData.gatherPhone" allowClear :maxLength="11" :disabled="collectorId ? true :false "/>
+          <a-input
+            placeholder="请输入采集员手机"
+            v-model="formData.gatherPhone"
+            allowClear
+            :maxLength="11"
+            :disabled="collectorId ? true :false "
+            id="addCollector-gatherPhone"/>
         </a-form-model-item>
         <a-form-model-item :wrapper-col="{ span: 24, offset: 8 }">
-          <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }">
+          <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }" id="addCollector-handleSubmit">
             保存
           </a-button>
-          <a-button :style="{ marginLeft: '15px' }" @click="cancel">
+          <a-button :style="{ marginLeft: '15px' }" @click="cancel" id="addCollector-cancel">
             取消
           </a-button>
         </a-form-model-item>
@@ -36,8 +41,8 @@
 </template>
 
 <script>
-import { saveCollector } from '@/api/collector.js'
-import { lableSeleteList } from '@/api/labelSetting.js'
+import { saveCollector, collectorDetails } from '@/api/collector.js'
+import { stationList } from '@/api/releaseRecord.js'
 export default {
   name: 'AddCollector',
   props: {
@@ -56,11 +61,11 @@ export default {
       isShow: this.openModal, // 弹框状态
       titleText: '新增',
       rules: {
-        stationNo: [{ required: true, message: '请选择网点标签', trigger: 'change' }],
+        stationNo: [{ required: true, message: '请选择网点名称', trigger: 'change' }],
         gatherPhone: [{ required: true, message: '请输入正确的手机号', trigger: 'blur' }]
       },
       loading: false,
-      lableData: [] // 标签数据
+      optionData: [] // 标签数据
     }
   },
   methods: {
@@ -71,10 +76,10 @@ export default {
       )
     },
     // 获取标签数据
-    getlableSeleteList () {
-      lableSeleteList().then(res => {
+    getStationList () {
+      stationList().then(res => {
         if (res.status == 200) {
-          this.lableData = res.data || []
+          this.optionData = res.data || []
         }
       })
     },
@@ -82,7 +87,7 @@ export default {
     getPageInfo () {
       const _this = this
       _this.loading = true
-      // lableDetails({
+      // collectorDetails({
       //   id: _this.id
       // }).then(res => {
       //   if (res.status == 200) {
@@ -97,7 +102,7 @@ export default {
         const _this = this
         if (valid) {
           const params = JSON.parse(JSON.stringify(this.formData))
-          params.id=_this.collectorId ? _this.collectorId : undefined
+          params.id = _this.collectorId ? _this.collectorId : undefined
           saveCollector(params).then(res => {
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {
@@ -118,9 +123,9 @@ export default {
     clear () {
       this.$refs.ruleForm.resetFields()
       delete this.formData.id
-      this.formData.gatherPhone=''
-      this.formData.stationNo=''
-      this.formData.gatherName=''
+      this.formData.gatherPhone = ''
+      this.formData.stationNo = undefined
+      this.formData.gatherName = ''
     }
   },
   // 监听弹窗
@@ -131,7 +136,7 @@ export default {
     },
     isShow (newValue, oldValue) {
       if (newValue) {
-        this.getlableSeleteList()
+        this.getStationList()
         if (this.collectorId) { // 编辑
           this.titleText = '编辑'
           // this.getPageInfo()

+ 51 - 62
src/views/equipmentManage/collector/collector.vue

@@ -1,12 +1,12 @@
 <template>
-  <a-card :bordered="false" class="network-table-page-search-wrapper">
-    <div class="network-searchForm">
+  <a-card :bordered="false" class="collector-table-page-search-wrapper">
+    <div class="collector-searchForm">
       <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="24">
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
             <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
               <a-range-picker
-                id="network-time"
+                id="collector-time"
                 v-model="time"
                 :format="dateFormat"
                 :placeholder="['开始时间','结束时间']"
@@ -16,23 +16,23 @@
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
             <a-form-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="network-stationNo" allowClear :maxLength="30" v-model="queryParam.stationNo" placeholder="请输入网点名称" />
+              <a-input id="collector-stationNo" allowClear :maxLength="30" v-model="queryParam.stationNo" placeholder="请输入网点名称" />
             </a-form-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
             <a-form-item label="采集员" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input id="network-nameOrPhone" allowClear :maxLength="30" v-model="queryParam.nameOrPhone" placeholder="请输入姓名/手机号码" />
+              <a-input id="collector-nameOrPhone" allowClear :maxLength="30" v-model="queryParam.nameOrPhone" placeholder="请输入姓名/手机号码" />
             </a-form-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="8" :lg="6">
-            <a-button class="handle-btn serach-btn" id="network-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-            <a-button class="handle-btn" type="" id="network-btn-reset" @click="handleReset">重置</a-button>
+            <a-button class="handle-btn serach-btn" id="collector-btn-serach" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" id="collector-btn-reset" @click="handleReset">重置</a-button>
           </a-col>
         </a-row>
       </a-form>
     </div>
     <div class="table-operator">
-      <a-button v-if="$hasPermissions('B_network_add')" class="add-btn" id="network-btn-add" type="primary" @click="handleEdit">新增</a-button>
+      <a-button class="add-btn" icon="plus" id="collector-btn-add" type="primary" @click="handleEdit">新增</a-button>
     </div>
     <s-table
       ref="table"
@@ -48,27 +48,31 @@
           unCheckedChildren="禁用"
           v-model="record.loginFlag"
           @change="changeFlagHandle(text, record)"
-          id="userList-changeFlagHandle" />
+          id="collector-changeFlagHandle" />
         <!-- <span v-if="!$hasPermissions('B_userManage_enable')">--</span> -->
       </span>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
+        <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" />
         <a-icon
+          id="collector-resetPassword"
           type="unlock"
           title="重置密码"
           class="actionBtn icon-orange"
+          v-if="record.loginFlag==1"
           @click="resetPassword(record)" />
-        <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)" />
         <a-icon
           type="delete"
           title="删除"
           class="actionBtn icon-red"
+          id="collector-delect"
+          v-if="record.loginFlag==0"
           @click="delect(record)" />
           <!-- <span v-if="!$hasPermissions('B_userManage_edit') && !($hasPermissions('B_userManage_resetPwd') && record.loginFlag==1) && !($hasPermissions('B_userManage_del') && record.loginFlag==0) ">--</span> -->
       </template>
     </s-table>
     <!-- 新增编辑 -->
-    <add-Collector :openModal="openCollectorModal" :collectorId="collectorId" @refresh="handleReset" @close="closeModal" />
+    <add-Collector :openModal="openCollectorModal" :collectorId="collectorId" @refresh="handleReset" @close="closeModal" id="collector-addBtn"/>
   </a-card>
 </template>
 
@@ -76,7 +80,7 @@
 import { STable, VSelect } from '@/components'
 import moment from 'moment'
 import addCollector from './addCollector.vue'
-import { getCollectorList, resetPSD,updateEnableStatus,delectCollector} from '@/api/collector'
+import { getCollectorList, resetPSD, updateEnableStatus, delectCollector } from '@/api/collector'
 export default {
   name: 'Collector',
   components: { STable, VSelect, addCollector },
@@ -88,19 +92,19 @@ export default {
       },
       // 查询参数
       queryParam: {
-        registerregisterBeginDate: null, // 开始时间
-        registerregisterEndDate: null, // 结束时间
-        nameOrPhone: '', //  网点名称
-        stationNo: ''
+        registerBeginDate: null, // 开始时间
+        registerEndDate: null, // 结束时间
+        nameOrPhone: '', // 采集员姓名或手机号
+        stationNo: '' //  网点名称
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
-        { title: '网点名称', dataIndex: 'stationNo', width: 200, align: 'center', customRender: text => { return text || '--' } },
+        { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center', customRender: text => { return text || '--' } },
         { title: '采集员姓名', dataIndex: 'gatherName', width: 150, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
         { title: '采集员手机', dataIndex: 'gatherPhone', width: 150, align: 'center', ellipsis: true, customRender: text => { return text || '--' } },
-        { title: '状态', dataIndex: 'loginFlag', width: 100, align: 'center', slot: 'status' },
+        { title: '状态', width: 100, align: 'center', scopedSlots: { customRender: 'status' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -111,6 +115,7 @@ export default {
             for (let i = 0; i < res.data.list.length; i++) {
               const _item = res.data.list[i]
               _item.no = no + i + 1
+              _item.loginFlag = _item.loginFlag + '' === '1'
             }
             return res.data
           }
@@ -133,7 +138,7 @@ export default {
     onChange (dates, dateStrings) {
       if ((dates, dateStrings)) {
         this.queryParam.registerBeginDate = dateStrings[0]
-        this.queryParam.registerregisterEndDate = dateStrings[1]
+        this.queryParam.registerEndDate = dateStrings[1]
       }
     },
     filterOption (input, option) {
@@ -148,20 +153,17 @@ export default {
       this.queryParam.nameOrPhone = ''
       this.time = []
       this.$refs.table.refresh(true)
-      this.networkId = undefined
       this.queryParam.stationNo = ''
     },
     //  新增、编辑网点
     handleEdit (row) {
       this.collectorId = row ? row.id : null
       this.openCollectorModal = true
-      console.log(this.collectorId)
     },
     //  关闭弹框
     closeModal () {
       this.collectorId = null
       this.openCollectorModal = false
-      this.$refs.table.refresh()
     },
     // 修改状态
     changeFlagHandle (text, record) {
@@ -169,23 +171,23 @@ export default {
         id: record.id,
         flag: record.loginFlag ? '1' : '0'
       }
-      // updateEnableStatus(_data).then(res => {
-      //   if (res.status + '' === '200') {
-      //     this.$message.success(res.message)
-      //   } else {
-      //     record.loginFlag = !record.loginFlag
-      //   }
-      // })
+      updateEnableStatus(_data).then(res => {
+        if (res.status + '' === '200') {
+          this.$message.success(res.message)
+        } else {
+          record.loginFlag = !record.loginFlag
+        }
+      })
     },
     // 重置密码
     resetPassword (row) {
-      // resetPSD({
-      //   id: row.id
-      // }).then(res => {
-      //   if (res.status == 200) {
-      //     this.$message.success(res.message)
-      //   }
-      // })
+      resetPSD({
+        id: row.id
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+      })
     },
     // 删除
     delect (row) {
@@ -195,25 +197,25 @@ export default {
         centered: true,
         content: '删除后无法恢复,确认删除?',
         okText: '确定',
-        cancelText: '取消'
-        // onOk () {
-        //   delectUserPower({
-        //     id: row.id
-        //   }).then(res => {
-        //     if (res.status == 200) {
-        //       _this.$message.success(res.message)
-        //       _this.$refs.table.refresh()
-        //     }
-        //   })
-        // }
+        cancelText: '取消',
+        onOk () {
+          delectCollector({
+            id: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
       })
     }
   }
 }
 </script>
 <style lang="less" scoped>
-  .network-table-page-search-wrapper{
-    .network-searchForm{
+  .collector-table-page-search-wrapper{
+    .collector-searchForm{
       .ant-form-inline .ant-form-item{
         width: 100%;
       }
@@ -232,18 +234,5 @@ export default {
     	font-size: 20px;
     	padding: 0 10px;
     }
-    // 合计
-    .total {
-    	margin: 15px 0 25px;
-    	width: 100%;
-    	background-color: #e6f7ff;
-    	border: 1px solid #91d5ff;
-    	padding: 8px 15px 8px 27px;
-    	border-radius: 4px;
-    	.iconImg {
-    		color: #1890FF;
-    		margin-right: 10px;
-    	}
-    }
   }
 </style>

+ 64 - 3
src/views/equipmentManage/equipment/equipment.vue

@@ -102,17 +102,32 @@
       </template>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
-        <a-button
+        <a-icon type="qrcode" title="查看二维码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#008000', padding: '0 10px' }" />
+        <a-icon type="snippets" title="掉线日志" @click="checkLog(record)" :style="{ fontSize: '20px', color: '#1890ff', padding: '0 10px' }" />
+        <!-- <a-button @click="getQrCode(record)" style="background-color: #008000;color: #fff;">二维码</a-button> -->
+        <!-- <a-button
           v-if="$hasPermissions('B_equipment_log')"
           type="primary"
           class="btn-edit-s"
           id="equipment-log-btn"
-          @click="checkLog(record)">掉线日志</a-button>
-        <span v-else>--</span>
+          @click="checkLog(record)">掉线日志</a-button> -->
+        <!-- <span v-else>--</span> -->
       </template>
     </s-table>
     <!-- 掉线日志 -->
     <equipment-log-modal :openModal="openLogModal" :srcDeviceCode="srcDeviceCode" @close="closeModal" />
+    <!-- 查看二维码 -->
+    <a-modal
+      class="qrCodeModal"
+      title="查看二维码"
+      :width="500"
+      :footer="null"
+      :destroyOnClose="true"
+      @cancel="isQrCodeModal = false"
+      v-model="isQrCodeModal">
+      <img :src="qrCode" width="400" height="400" class="qrCode" />
+      <a-button type="primary" class="downQrCode" @click="downloadCode">下载二维码</a-button>
+    </a-modal>
   </a-card>
 </template>
 
@@ -122,6 +137,7 @@ import equipmentLogModal from './logModal.vue'
 import { deviceList } from '@/api/device'
 import { deviceTypeListQuery, exportDevice } from '@/api/boxSetting'
 import { lableSeleteList } from '@/api/labelSetting.js'
+import QRCode from 'qrcode'
 import moment from 'moment'
 export default {
   name: 'Equipment',
@@ -129,6 +145,8 @@ export default {
   data () {
     return {
       loading: false,
+      isQrCodeModal: false, //  查看小程序码   弹框展示状态
+      qrCode: '',
       formItemLayout: {
         labelCol: { span: 7 },
         wrapperCol: { span: 17 }
@@ -233,6 +251,37 @@ export default {
       this.srcDeviceCode = row ? row.srcDeviceCode : null
       this.openLogModal = true
     },
+    // 查看二维码
+    getQrCode (item) {
+      const _this = this
+      const opts = {
+        errorCorrectionLevel: 'H',
+        type: 'image/jpeg',
+        quality: 0.3,
+        margin: 1.5,
+        width: 240,
+        color: {
+          dark: '#000000',
+          light: '#ffffff'
+        }
+      }
+      const url = 'id=' + item.srcDeviceCode + '&type=dustbin'
+      _this.shName = item.name
+      console.log(item.srcDeviceCode)
+      if (url) {
+        QRCode.toDataURL(url, opts, function (err, url) {
+          _this.qrCode = url
+          _this.isQrCodeModal = true
+        })
+      }
+    },
+    //  下载二维码
+    downloadCode (item) {
+      const link = document.createElement('a')
+      link.href = this.qrCode
+      link.download = this.shName + '.png'
+      link.click()
+    },
     closeModal () {
       this.srcDeviceCode = null
       this.openLogModal = false
@@ -308,4 +357,16 @@ export default {
     	color: red;
     }
   }
+  // 查看小程序码  弹框
+  	.qrCodeModal {
+  		.qrCode {
+  			display: block;
+  			max-width: 100%;
+  			margin: 0 auto;
+  		}
+  		.downQrCode {
+  			display: block;
+  			margin: 40px auto 30px;
+  		}
+  	}
 </style>

+ 16 - 1
src/views/equipmentManage/labelSetting/addLabelSetting.vue

@@ -2,12 +2,21 @@
   <a-modal :footer="null" centered :title="titleText" v-model="isShow" @cancle="cancel">
     <a-spin :spinning="loading">
       <a-form-model :model="formData" ref="ruleForm" :rules="rules">
+        <a-form-model-item label="所属分类" :label-col="{span:6}" :wrapper-col="{span:16}" prop="labelType">
+          <v-select
+            v-model="formData.labelType"
+            ref="labelType"
+            id="addLabelSetting-labelType"
+            code="LABEL_TYPE"
+            placeholder="请选择"
+            allowClear></v-select>
+        </a-form-model-item>
         <a-form-model-item label="网点标签名称" :label-col="{span:6}" :wrapper-col="{span:16}" prop="labelName">
           <a-input placeholder="请输入网点标签名称(30个字符以内)" v-model="formData.labelName" allowClear :maxLength="30"/>
         </a-form-model-item>
         <a-form-model-item label="备注" :label-col="{span:6}" :wrapper-col="{span:16}" prop="remarks">
           <a-textarea
-            id="addElectronicScale-remarks"
+            id="addLabelSetting-remarks"
             :maxLength="500"
             v-model="formData.remarks"
             style="min-height: 50px;"
@@ -28,9 +37,11 @@
 </template>
 
 <script>
+import { VSelect } from '@/components'
 import { lableDetails, saveLable } from '@/api/labelSetting.js'
 export default {
   name: 'AddLabelSetting',
+  components: { VSelect },
   props: {
     visible: {
       type: Boolean,
@@ -47,6 +58,7 @@ export default {
       isShow: this.visible, // 弹框状态
       titleText: '新增',
       rules: {
+        labelType: [{ required: true, message: '请选择', trigger: 'blur' }],
         labelName: [{ required: true, message: '请输入网点标签名称(30个字符以内)', trigger: 'blur' }]
       },
       loading: false
@@ -72,6 +84,9 @@ export default {
         const _this = this
         if (valid) {
           const params = JSON.parse(JSON.stringify(this.formData))
+          if (params.labelType == 'org' || params.labelType == 'biz') {
+            params.labelBizType = 'STATION'
+          }
           saveLable(params).then(res => {
             console.log(res, 'rrrrrrrrr')
             if (res.status == 200) {

+ 13 - 22
src/views/reportForm/unRecyclableRubbishDetails.vue

@@ -74,8 +74,7 @@
 <script>
 import { STable, VSelect } from '@/components'
 import { stationList } from '@/api/releaseRecord.js'
-// import { netWorkCleanRecordList, getCleanStationSum } from '@/api/cleanManage.js'
-import { getPutInTimeList, getDetailTotal } from '@/api/reportForm.js'
+import { getRubbishDetailList, getRubbishDetailTotal } from '@/api/reportForm.js'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 export default {
@@ -104,13 +103,13 @@ export default {
       dateFormat: 'YYYY-MM-DD', // 日期格式
       columns: [
         { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { title: '网点名称', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '网点名称', dataIndex: 'stationName', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
         { title: '采集员姓名', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
         { title: '采集员手机', dataIndex: '', width: 100, align: 'center' },
-        { title: '其他垃圾(kg)', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '0' } },
-        { title: '厨余垃圾(kg)', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '0' } },
-        { title: '建筑垃圾(kg)', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '0' } },
-        { title: '总计(kg)', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '0' } },
+        { title: '其他垃圾(kg)', dataIndex: 'gatherOther', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
+        { title: '厨余垃圾(kg)', dataIndex: 'gatherKitchen', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
+        { title: '建筑垃圾(kg)', dataIndex: 'gatherBuilding', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
+        { title: '总计(kg)', dataIndex: 'gatherTotal', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
         { title: '备注', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
         { title: '图片', width: 100, dataIndex: 'img', align: 'center', scopedSlots: { customRender: 'img' } }
       ],
@@ -130,10 +129,12 @@ export default {
           searchData.beginDate = null
           searchData.endDate = null
         }
-        return getPutInTimeList(searchData).then(res => {
+        return getRubbishDetailList(searchData).then(res => {
           if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
             for (let i = 0; i < res.data.list.length; i++) {
-              const item = res.data.list[i]
+              const _item = res.data.list[i]
+              _item.no = no + i + 1
             }
             this.orderTotal = res.data.count || 0
             this.getTotal()
@@ -175,16 +176,6 @@ export default {
         }
       })
     },
-    // 编辑后刷新列表
-    refreshTable () {
-      // 编辑
-      if (this.itemStationNo && this.itemDeviceNo) {
-        this.$refs.table.refresh()
-      } else {
-        // 保存
-        this.$refs.table.refresh(true)
-      }
-    },
     // 总计
     getTotal () {
       const params = this.queryParam
@@ -195,11 +186,11 @@ export default {
         params.beginDate = null
         params.endDate = null
       }
-      getDetailTotal(params).then(res => {
+      getRubbishDetailTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3) : '0.000'
-            this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3) : '0.000'
+            this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3) : '0'
+            this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3) : '0'
           }
         }
       })

+ 25 - 41
src/views/reportForm/unRecyclableRubbishTotal.vue

@@ -7,7 +7,7 @@
         :model="queryParam"
         layout="inline"
         @keyup.enter.native="$refs.table.refresh(true)"
-        v-bind="formItemLayout">
+      >
         <a-row :gutter="24">
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-form-model-item label="最后清运时间" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
@@ -79,15 +79,15 @@
     </div>
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ recyclableWasteTotal }} </span>kg。
-        其中,其他垃圾总计<span> {{ wasteClothes }} </span>kg,厨余垃圾总计<span>{{ wastePlastics }} </span>kg,建筑垃圾总计<span> {{ wasteMetal }} </span>kg
+      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ }} </span>kg。
+        其中,其他垃圾总计<span> {{ }} </span>kg,厨余垃圾总计<span>{{ }} </span>kg,建筑垃圾总计<span> {{ }} </span>kg
       </div>
     </a-alert>
     <!-- 列表 -->
     <s-table ref="table" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
       <!-- 可回收物小计 -->
       <template slot="totalWeight" slot-scope="text,record">
-        <span >{{ record.totalWeight ? (record.totalWeight/1000).toFixed(3) : '0.000' }}</span>
+        <span >{{ record.totalWeight ? (record.totalWeight/1000).toFixed(3) : '0' }}</span>
       </template>
       <!-- 操作 -->
     </s-table>
@@ -97,7 +97,7 @@
 <script>
 import { STable, VSelect } from '@/components'
 import { stationList } from '@/api/releaseRecord.js'
-import { netWorkCleanRecordList, getCleanStationSum } from '@/api/cleanManage.js'
+import { getRubbishList, getRubbishTotal } from '@/api/reportForm.js'
 import { getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
@@ -115,8 +115,8 @@ export default {
       wasteMetal: 0, //  废旧金属总计
       queryParam: {
         stationNo: undefined, // 网点名称
-        beginDate: null, // 开始时间
-        endDate: null, // 结束时间
+        findRubbishDatafindRubbishDataBeginDate: null, // 开始时间
+        findRubbishDatafindRubbishDataEndDate: null, // 结束时间
         provinceCode: undefined, //  省
         cityCode: undefined, // 市
         districtCode: undefined // 区
@@ -143,24 +143,18 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.time && this.time.length) {
-          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
-          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+          searchData.findRubbishDataBeginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.findRubbishDataEndDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
         } else {
-          searchData.beginDate = null
-          searchData.endDate = null
+          searchData.findRubbishDataBeginDate = null
+          searchData.findRubbishDataEndDate = null
         }
-        return netWorkCleanRecordList(searchData).then(res => {
+        return getRubbishList(searchData).then(res => {
           if (res.status == 200) {
+            const no = (res.data.pageNo - 1) * res.data.pageSize
             for (let i = 0; i < res.data.list.length; i++) {
               const _item = res.data.list[i]
-              //  找出可回收垃圾库存量最大的值
-              const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.plaMet, _item.glass, _item.recycling]
-              const maxVal = Math.max(...arr)
-              if (maxVal == 0) {
-                _item.maxVal = null
-              } else {
-                _item.maxVal = maxVal
-              }
+              _item.no = no + i + 1
             }
             this.orderTotal = res.data.count || 0
             this.getTotal()
@@ -184,8 +178,8 @@ export default {
     // 创建时间change
     onChange (dates, dateStrings) {
       if ((dates, dateStrings)) {
-        this.queryParam.beginDate = dateStrings[0]
-        this.queryParam.endDate = dateStrings[1]
+        this.queryParam.findRubbishDataBeginDate = dateStrings[0]
+        this.queryParam.findRubbishDataEndDate = dateStrings[1]
       }
     },
     filterOption (input, option) {
@@ -193,16 +187,6 @@ export default {
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
       )
     },
-    // 编辑后刷新列表
-    refreshTable () {
-      // 编辑
-      if (this.itemStationNo && this.itemDeviceNo) {
-        this.$refs.table.refresh()
-      } else {
-        // 保存
-        this.$refs.table.refresh(true)
-      }
-    },
     // 获取网点数据
     getStationList () {
       stationList().then(res => {
@@ -263,17 +247,17 @@ export default {
     getTotal () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+        params.findRubbishDataBeginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.findRubbishDataEndDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
       } else {
-        params.beginDate = null
-        params.endDate = null
+        params.findRubbishDataBeginDate = null
+        params.findRubbishDataEndDate = null
       }
-      getCleanStationSum(params).then(res => {
+      getRubbishTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3) : '0.000'
-            this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3) : '0.000'
+            // this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3) : '0'
+            // this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3) : '0'
           }
         }
       })
@@ -281,8 +265,8 @@ export default {
     // 重置
     reset () {
       this.queryParam.stationNo = undefined
-      this.queryParam.beginDate = null
-      this.queryParam.endDate = null
+      this.queryParam.findRubbishDataBeginDate = null
+      this.queryParam.findRubbishDataEndDate = null
       this.queryParam.provinceCode = undefined
       this.queryParam.cityCode = undefined
       this.queryParam.districtCode = undefined