zhangdan 4 年 前
コミット
9c2c98ff86

+ 30 - 67
src/views/cleanManage/addDiverModal.vue

@@ -5,25 +5,25 @@
       :title="titleText"
       v-model="isshow"
       @cancle="cancel"
-      width="60%"
+      width="40%"
       :centered="true">
-      <a-form-model ref="ruleForm" :model="formData" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
-        <a-form-model-item label="司机姓名" props="name">
-          <a-input v-model.trim="formData.name" :maxLength="30" placeholder="请输入司机姓名(最多30个字符)"/>
+      <a-form-model ref="ruleForm" :model="formData" :rules="rules" :label-col="{ span: 6 }" :wrapper-col="{ span: 16 }">
+        <a-form-model-item label="司机姓名" prop="name">
+          <a-input v-model.trim="formData.name" :maxLength="30" placeholder="请输入司机姓名(最多30个字符)" id="addDiverModal-name"/>
         </a-form-model-item>
-        <a-form-model-item label="手机号码" props="phone">
-          <a-input v-model.trim="formData.phone" @input="mobileInput" :maxLength="11" placeholder="请输入手机号"/>
+        <a-form-model-item label="手机号码" prop="phone">
+          <a-input v-model.trim="formData.phone" @input="mobileInput" :maxLength="11" placeholder="请输入手机号" id="addDiverModal-phone"/>
         </a-form-model-item>
-        <a-form-model-item label="状态" props="loginFlag"><a-radio-group
+        <a-form-model-item label="状态" prop="loginFlag"><a-radio-group
           name="radioGroup"
-          v-model="formData.loginFlag"
+          v-model="formData.loginFlag" id="addDiverModal-loginFlag"
         >
           <a-radio :value="1">是</a-radio>
           <a-radio :value="0">否</a-radio>
         </a-radio-group> </a-form-model-item>
-        <a-form-model-item label="" class="btn-cont" :label-col="{ span: 0 }" :wrapper-col="{ span: 24 }">
-          <a-button type="primary" @click="onSubmit">保存</a-button>
-          <a-button @click="cancel">取消</a-button>
+        <a-form-model-item label="" class="btn-cont" :wrapper-col="{ span: 24, offset: 9 }">
+          <a-button type="primary" @click="onSubmit" :style="{ marginRight: '15px' }" id="addDiverModal-onSubmit">保存</a-button>
+          <a-button @click="cancel" :style="{ marginLeft: '15px' }" id="addDiverModal-cancel">取消</a-button>
         </a-form-model-item>
       </a-form-model>
     </a-modal>
@@ -36,7 +36,6 @@ import {
   VSelect
 } from '@/components'
 import {
-  saveUserPower,
   slelerDetails
 } from '@/api/userManage.js'
 export default {
@@ -56,25 +55,13 @@ export default {
     }
   },
   data () {
-	  // 校验手机号
-	  // const isMobileValid = (rule, value, callback) => {
-	  //   if (!value) {
-	  //     callback(new Error('请输入手机号'))
-	  //   } else {
-	  //     if (!isMobile(value)) {
-	  //       callback(new Error('请输入正确的手机号'))
-	  //     } else {
-	  //       callback()
-	  //     }
-	  //   }
-	  // }
     return {
       titleText: '新增',
       isshow: this.visible,
       formLayout: 'horizontal',
-      form: this.$form.createForm(this, {
-        name: 'ruleForm'
-      }),
+      // form: this.$form.createForm(this, {
+      //   name: 'ruleForm'
+      // }),
       optionData: [],
       formData: {
         name: '',
@@ -142,53 +129,29 @@ export default {
     },
     // 保存提交
     onSubmit () {
-      // const _this = this
-      // this.$refs.ruleForm.validate(valid => {
-      //   if (!valid) {
-      //     const formData = Object.assign({}, this.formData, values.formData)
-      //     formData.id = _this.itemId
-      //     saveUserPower(formData).then(res => {
-      //       console.log(res, 'rrrrrrrrr')
-      //       if (res.status == 200) {
-      //         _this.$message.success(res.message)
-      //         _this.$emit('refresh')
-      //         setTimeout(function () {
-      //           _this.isshow = false
-      //         }, 300)
-      //       }
-      //     })
-      //   }
-      // })
-	  this.$refs.ruleForm.validate(valid => {
-	    if (valid) {
-	      const params = {
-			  name: this.formData.name,
-			  loginFlag: this.formData.loginFlag,
-			  phone: this.formData.phone
-	      }
-	      saveUserPower(params).then(res => {
-	        if (res.status == 200) {
-	          if (this.$hasPermissions('M_bundel_buyRecord')) {
-	            this.$router.push({ path: '/SetmealSales/PurchasedSetmeal' })
-	          } else {
-	            this.cancel()
-	          }
-	        }
-	      })
-	    } else {
-	      console.log('error submit!!')
-	      return false
-	    }
-	  })
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = JSON.parse(JSON.stringify(this.formData))
+				 console.log(params)
+          // saveUserPower(formData).then(res => {
+          //   console.log(res, 'rrrrrrrrr')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$emit('refresh')
+          //     setTimeout(function () {
+          //       _this.isshow = false
+          //     }, 300)
+          //   }
+          // })
+        }
+      })
     },
     // 取消
     handleCancel () {
       this.cancel()
     },
     clear () {
-      // this.form.resetFields()
       delete this.formData.id
-      // this.formData.roleNames = []
       this.formData.name = ''
       this.formData.loginFlag = ''
       this.formData.phone = ''

+ 276 - 1
src/views/cleanManage/cleanDetail.vue

@@ -1,8 +1,283 @@
 <template>
+  <a-card :bordered="false" class="cleanDetail-container">
+    <!-- 搜索条件 -->
+    <div class="cleanDetail-container-searchForm">
+      <a-form-model
+        ref="queryParam"
+        :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="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker :disabledDate="disabledDate" v-model="queryOrderDate" id="cleanDetail-queryOrderDate" :format="dateFormat" :placeholder="['开始时间', '结束时间']" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select
+                id="cleanDetail-queryOrderDate"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <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-col>
+          <!-- <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="司机姓名" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear :maxLength="30" placeholder="请输入司机姓名" v-model.trim="queryParam.name"/></a-form-model-item></a-col> -->
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="设备编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear placeholder="请输入设备编号" v-model.trim="queryParam.phone" id="cleanDetail-queryOrderDate"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="操作人" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择操作人" id="cleanDetail-queryOrderDate"></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="4">
+            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin: 4px 10px 0 20px" id="cleanDetail-refresh">查询</a-button>
+            <a-button type="" @click="reset" style="margin-top: 4px" id="cleanDetail-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ }} </span>条,可回收物清运量总计<span> {{ }} </span>kg</div>
+    </a-alert>
+    <!-- 列表 -->
+    <a-table
+      ref="table"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data-source="data"
+      bordered
+      @change="changeSort">
+      <span slot="action" slot-scope="text,record">
+        <a-button type="primary" @click="handleDetail(record)">查看清运明细</a-button>
+      </span>
+    </a-table>
+    <!-- 详情弹窗 -->
+    <cleanDetailModal :id="itemId" :visible="isOpenModal" @click="isOpenModal=false"></cleanDetailModal>
+  </a-card>
 </template>
 
 <script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  stationList
+} from '@/api/releaseRecord.js'
+import cleanDetailModal from './cleanDetailModal.vue'
+const columns = [{
+  title: '序号',
+  dataIndex: 'no',
+  width: 60,
+  align: 'center'
+},
+{
+  title: '清运时间',
+  dataIndex: 'createDate',
+  width: 100,
+  align: 'center'
+},
+{
+  title: '网点名称',
+  dataIndex: 'name',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '设备编号',
+  dataIndex: 'num',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '可回收物清运量(kg)',
+  dataIndex: 'org',
+  width: 100,
+  align: 'center',
+  sorter: true,
+  customRender: (text) => {
+    return text || 0
+  }
+},
+{
+  title: '清运司机',
+  dataIndex: 'changjia',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '操作人',
+  dataIndex: 'MAC',
+  width: 100,
+  align: 'center'
+},
+{
+  title: '备注',
+  dataIndex: 'remark',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '操作',
+  dataIndex: 'action',
+  width: 100,
+  align: 'center',
+  scopedSlots: {
+    customRender: 'action'
+  }
+}
+]
+const data = [{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+}
+]
+export default {
+  components: {
+    STable,
+    VSelect,
+    cleanDetailModal
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+	  isOpenModal: false, // 默认弹窗关闭
+	  itemId: '', // 行id
+      // 查询参数
+      queryParam: {
+        stationNo: undefined,
+        phone: '',
+        loginFlag: '',
+        beginDate: null,
+        endDate: null
+      },
+      // 网点名称数据
+      optionData: [],
+      columns,
+      data,
+      // 将默认当天时间日期回显在时间选择框中
+      queryOrderDate: [],
+      dateFormat: 'YYYY-MM-DD'
+    }
+  },
+  mounted () {
+    this.getStationList()
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        }
+      })
+    },
+    // 排序
+    changeSort () {
+      console.log('-------------排序 ')
+    },
+    // 重置
+    reset () {
+      this.queryParam = {
+        stationNo: undefined,
+        phone: '',
+        loginFlag: '',
+        beginDate: null,
+        endDate: null
+      }
+      this.queryOrderDate = []
+    },
+    // 查看清运详情
+    handleDetail (record) {
+      // this.itemId = record.id
+	  this.isOpenModal = true
+      console.log('----------详情')
+    }
+  }
+}
 </script>
 
-<style>
+<style lang='less' scoped>
+	.cleanDetail-container {
+		.cleanDetail-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+	}
 </style>

+ 48 - 0
src/views/cleanManage/cleanDetailModal.vue

@@ -0,0 +1,48 @@
+<template>
+  <a-modal title="清运详情" :footer="null" v-model="isShow" @cancel="isShow=false" centered>
+    <div class="detail-item">废旧衣物:{{ 200 }}kg</div>
+    <div class="detail-item">废旧衣物:{{ 200 }}kg</div>
+    <div class="detail-item">废旧衣物:{{ 200 }}kg</div>
+    <div class="detail-item">废旧衣物:{{ 200 }}kg</div>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'CleanDetailModal',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    id: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.visible
+    }
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+	  if (!newValue) {
+	    this.$emit('close')
+	  }
+    }
+  }
+}
+
+</script>
+
+<style lang="less" scoped="scoped">
+	.detail-item{
+		text-align: center;
+		margin:10px 0;
+		letter-spacing: 0.5px;
+	}
+</style>

+ 122 - 0
src/views/cleanManage/cleanModal.vue

@@ -0,0 +1,122 @@
+<template>
+	<div>
+		<a-modal title="确认清运" :footer="null" v-model="isShow" @cancel="isShow=false" centered>
+			<a-form-model ref="ruleForm" :model="queryParam" :rules="rules" :label-col="{span:5}" :wrapper-col="{span:17}">
+				<a-form-model-item label="清运司机" prop="stationNo">
+				  <a-select
+				    placeholder="请选择清运司机"
+				    allowClear
+				    v-model="queryParam.stationNo"
+				    :showSearch="true"
+				    option-filter-prop="children"
+				    :filter-option="filterOption">
+				    <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="备注">
+					<a-textarea
+					  :maxLength="500"
+					v-model="queryParam.remarks"
+					  style="min-height: 60px;"
+					  placeholder="请输入备注(最多500个字符)"
+					  autoSize />
+				</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>
+					<a-button :style="{ marginLeft: '15px' }" @click="isShow=false" >
+					  取消
+					</a-button>
+				</a-form-model-item>
+			</a-form-model>
+		</a-modal>
+	</div>
+	
+</template>
+
+<script>
+	import {
+	  stationList
+	} from '@/api/releaseRecord.js'
+	export default{
+		name: 'cleanModal',
+		props: {
+		  visible: {
+		    type: Boolean,
+		    default: false
+		  },
+		  id: {
+		    type: [Number, String],
+		    default: ''
+		  }
+		},
+		data(){
+			return{
+				optionData: [],
+				isShow:this.visible,
+				// form: this.$form.createForm(this, {
+				//   name: 'ruleForm'
+				// }),
+				// 查询参数
+				queryParam: {
+				  stationNo: undefined,
+				  remarks: ''
+				},
+				rules:{stationNo:[{required: true,
+          message: '请输入司机姓名',
+          trigger: 'blur'}]}
+			}
+		},
+		methods:{
+			filterOption (input, option) {
+			  return (
+			    option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+			  )
+			},
+			getStationList () {
+			  stationList().then(res => {
+			    if (res.status == 200) {
+			      this.optionData = res.data || []
+			    }
+			  })
+			},
+			// 保存
+			handleSubmit(){
+				this.$refs.ruleForm.validate(valid => {
+				  if (valid) {
+				    const params = JSON.parse(JSON.stringify(this.queryParam))
+					 console.log(params)
+				    // saveUserPower(formData).then(res => {
+				    //   console.log(res, 'rrrrrrrrr')
+				    //   if (res.status == 200) {
+				    //     _this.$message.success(res.message)
+				    //     _this.$emit('refresh')
+				    //     setTimeout(function () {
+				    //       _this.isshow = false
+				    //     }, 300)
+				    //   }
+				    // })
+				  }
+				})
+			},
+		},
+		watch: {
+		  visible (newValue, oldValue) {
+			  // this.getStationList()
+		    this.isShow = newValue
+	
+		  },
+		  isShow (newValue, oldValue) {
+		  if (!newValue) {
+		    this.$emit('close')
+		  }else{
+			  // this.getStationList()
+		  }
+		  }
+		}
+	}
+</script>
+
+<style>
+</style>

+ 6 - 33
src/views/cleanManage/driverManage.vue

@@ -4,12 +4,12 @@
     <div class="userManage-search">
       <a-form-model layout="inline" :model="queryParam" v-bind="formItemLayout" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="24">
-          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="司机姓名" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear placeholder="请输入司机姓名" v-model.trim="queryParam.name"/></a-form-model-item></a-col>
-          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear placeholder="请输入手机号码" :maxLength="11" v-model.trim="queryParam.phone"/></a-form-model-item></a-col>
-          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" ></v-select></a-form-model-item></a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="司机姓名" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear placeholder="请输入司机姓名" v-model.trim="queryParam.name" id="driverManage-name"/></a-form-model-item></a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="手机号码" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><a-input allowClear placeholder="请输入手机号码" :maxLength="11" v-model.trim="queryParam.phone" id="driverManage-phone"/></a-form-model-item></a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5"><a-form-model-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol"><v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择状态" id="driverManage-loginFlag"></v-select></a-form-model-item></a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
-            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-handSubmit" style="margin: 4px 10px 0 20px">查询</a-button>
-            <a-button type="" @click="reset" id="userList-reset" style="margin-top: 4px">重置</a-button>
+            <a-button type="primary" @click="$refs.table.refresh(true)" style="margin: 4px 10px 0 20px" id="driverManage-refresh">查询</a-button>
+            <a-button type="" @click="reset" style="margin-top: 4px" id="driverManage-reset">重置</a-button>
           </a-col>
         </a-row>
       </a-form-model>
@@ -20,8 +20,7 @@
         type="primary"
         icon="plus"
         @click="openModal"
-        id="userList-openModal"
-        v-hasPermission="'B_userManage_add'"
+        id="driverManage-openModal"
         style="margin-top: 18px;">新增</a-button>
     </div>
     <!-- 列表 -->
@@ -144,11 +143,6 @@ export default {
       }
     }
   },
-  // beforeRouteEnter (to, from, next) {
-  //   next(vm => {
-  //     vm.getSellerList()
-  //   })
-  // },
   methods: {
 	  cancel () {
 	    this.itemId = null
@@ -201,32 +195,11 @@ export default {
         }
       })
     },
-    // getBizStr (storeBizList) {
-    //   const str = []
-    //   storeBizList.forEach(item => {
-    //     str.push(item.bizTypeName)
-    //   })
-    //   return str.join(',')
-    // },
     handleEdit (row) {
       console.log(row, 'row')
 	  this.itemId = row.id
       this.showModal = true
     }
-    // 修改状态
-    // changeFlagHandle (text, record) {
-    //   const _data = {
-    //     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
-    //     }
-    //   })
-    // }
   }
 }
 </script>

+ 71 - 0
src/views/cleanManage/netWorkCleanModal.vue

@@ -0,0 +1,71 @@
+<template>
+  <a-modal
+    title="清运详情"
+    :footer="null"
+    v-model="isShow"
+    @cancel="isShow=false"
+    centered
+    width="40%">
+    <s-table
+      ref="table"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered
+      @change="changeSort">
+      <span slot="action" slot-scope="text,record">
+        <a-button type="primary" @click="handleDetail(record)" id="netWorkCleanModal-handleDetail">查看详情</a-button>
+      </span>
+    </s-table>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+export default {
+  name: 'CleanDetailModal',
+  components: { STable },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    id: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.visible,
+	  columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+	  { title: '清运时间', dataIndex: 'no', width: 100, align: 'center' },
+	  { title: '设备编号', dataIndex: 'no', width: 100, align: 'center' },
+	  { title: '清运重量', dataIndex: 'no', width: 100, align: 'center' },
+	  { title: '清运司机', dataIndex: 'no', width: 100, align: 'center' }],
+	  // 加载数据方法 必须为 Promise 对象
+	  loadData: parameter => {
+	  }
+    }
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+	  if (!newValue) {
+	    this.$emit('close')
+	  }
+    }
+  }
+}
+
+</script>
+
+<style lang="less" scoped="scoped">
+	.detail-item{
+		text-align: center;
+		margin:10px 0;
+		letter-spacing: 0.5px;
+	}
+</style>

+ 267 - 1
src/views/cleanManage/netWorkCleanRecord.vue

@@ -1,8 +1,274 @@
 <template>
+  <a-card :bordered="false" class="cleanDetail-container">
+    <!-- 搜索条件 -->
+    <div class="cleanDetail-container-searchForm">
+      <a-form-model
+        ref="queryParam"
+        :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="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="netWorkCleanRecord-time"
+                v-model="time"
+                style="width: 100%;"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select
+                id="netWorkCleanRecord-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <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-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="设备编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear placeholder="请输入设备编号" v-model.trim="queryParam.phone" id="netWorkCleanRecord-stationNo"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="操作人" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择操作人" id="netWorkCleanRecord-stationNo" ></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="4">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="netWorkCleanRecord-refresh" style="margin: 4px 10px 0 20px">查询</a-button>
+            <a-button type="" @click="reset" id="netWorkCleanRecord-reset" style="margin-top: 4px">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ }} </span>条,可回收物清运量总计<span> {{ }} </span>kg</div>
+    </a-alert>
+    <!-- 列表 -->
+    <a-table
+      ref="table"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data-source="data"
+      bordered
+      @change="changeSort">
+      <span slot="action" slot-scope="text,record">
+        <a-button type="primary" @click="handleDetail(record)">查看详情</a-button>
+      </span>
+    </a-table>
+    <!-- 详情弹窗 -->
+    <netWorkCleanModal :id="itemId" :visible="isOpenModal" @click="isOpenModal=false"></netWorkCleanModal>
+  </a-card>
 </template>
 
 <script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  stationList
+} from '@/api/releaseRecord.js'
+import netWorkCleanModal from './netWorkCleanModal.vue'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+const columns = [{
+  title: '序号',
+  dataIndex: 'no',
+  width: 60,
+  align: 'center'
+},
+{
+  title: '网点名称',
+  dataIndex: 'name',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '清运次数',
+  dataIndex: 'createDate',
+  width: 100,
+  align: 'center',
+  sorter: true
+},
+{
+  title: '清运重量(kg)',
+  dataIndex: 'org',
+  width: 100,
+  align: 'center',
+  sorter: true,
+  customRender: (text) => {
+    return text || 0
+  }
+},
+{
+  title: '最后清运时间',
+  dataIndex: 'changjia',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '操作',
+  dataIndex: 'action',
+  width: 100,
+  align: 'center',
+  scopedSlots: {
+    customRender: 'action'
+  }
+}
+]
+const data = [{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+}
+]
+export default {
+  components: {
+    STable,
+    VSelect,
+    netWorkCleanModal
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+	  isOpenModal: false, // 默认弹窗关闭
+	  itemId: '', // 行id
+      // 查询参数
+      queryParam: {
+        stationNo: undefined,
+        phone: '',
+        loginFlag: '',
+        beginDate: null,
+        endDate: null
+      },
+      // 网点名称数据
+      optionData: [],
+      columns,
+      data,
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ],
+      dateFormat: 'YYYY-MM-DD'
+    }
+  },
+  mounted () {
+    this.getStationList()
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        }
+      })
+    },
+    // 排序
+    changeSort () {
+      console.log('-------------排序 ')
+    },
+    // 重置
+    reset () {
+      this.queryParam = {
+        stationNo: undefined,
+        phone: '',
+        loginFlag: '',
+        beginDate: null,
+        endDate: null
+      }
+      this.time = [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ]
+    },
+    // 查看清运详情
+    handleDetail (record) {
+      // this.itemId = record.id
+	  this.isOpenModal = true
+      console.log('----------详情')
+    }
+  }
+}
 </script>
 
-<style>
+<style lang='less' scoped>
+	.cleanDetail-container {
+		.cleanDetail-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+	}
 </style>

+ 361 - 1
src/views/cleanManage/notCleanNetwork.vue

@@ -1,8 +1,368 @@
 <template>
+  <a-card :bordered="false" class="cleanDetail-container">
+    <!-- 搜索条件 -->
+    <div class="cleanDetail-container-searchForm">
+      <a-form-model
+        ref="queryParam"
+        :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="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="netWorkCleanRecord-time"
+                v-model="time"
+                style="width: 100%;"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="网点名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-select
+                id="netWorkCleanRecord-stationNo"
+                placeholder="请选择网点名称"
+                allowClear
+                v-model="queryParam.stationNo"
+                :showSearch="true"
+                option-filter-prop="children"
+                :filter-option="filterOption">
+                <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-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="设备编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear placeholder="请输入设备编号" v-model.trim="queryParam.phone" id="netWorkCleanRecord-stationNo"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item label="排序规则" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select code="ENABLE_FLAG" v-model="queryParam.loginFlag" allowClear placeholder="请选择操作人" id="netWorkCleanRecord-stationNo" ></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="4">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="netWorkCleanRecord-refresh" style="margin: 4px 10px 0 20px">查询</a-button>
+            <a-button type="" @click="reset" id="netWorkCleanRecord-reset" style="margin-top: 4px">重置</a-button>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item prop="provinceCode" label="所属区域:" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
+              <a-select id="rubbishTotal-provinceCode" allowClear v-model="queryParam.provinceCode" @change="getCityList" placeholder="请选择省">
+                <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item prop="cityCode" label=" " :colon="false" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
+              <a-select allowClear id="rubbishTotal-cityCode" v-model="queryParam.cityCode" @change="getAreaList" placeholder="请选择市">
+                <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-form-model-item prop="districtCode" label=" " :colon="false" :label-col="{ span:8}" :wrapper-col="{ span:16}">
+              <a-select allowClear id="rubbishTotal-districtCode" v-model="queryParam.districtCode" placeholder="请选择区/县">
+                <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ }} </span>条,可回收垃圾总计<span> {{ }} </span>kg。  其中,废旧衣物<span> {{ }} </span>kg,废旧纸张<span> {{ }} </span>kg,废旧金属<span> {{ }} </span>kg,废旧塑料<span> {{ }} </span>kg,废旧金属/塑料<span> {{ }} </span>kg,废旧玻璃<span> {{ }} </span>kg,可回收物<span> {{ }} </span>kg</div>
+      <!-- <div class="ftext" slot="message">其中,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg,废旧衣物<span> {{ }} </span>kg</div> -->
+    </a-alert>
+    <!-- 列表 -->
+    <a-table
+      ref="table"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data-source="data"
+      bordered
+      @change="changeSort">
+	  <template slot="customTitle">
+	    <a-tooltip placement="top">
+	      <template slot="title">
+	        <span>当【套餐管理】中的套餐启用时,可在当前页面进行合作商对应套餐的启用和禁用操作。禁用后,该套餐将不能被对应合作商销售。如果【套餐管理】中套餐被禁用,则在当前页面不能进行合作商套餐的启用和禁用操作。</span>
+	      </template>
+	      可回收垃圾库存量(kg)
+	      <a-icon type="question-circle" :style="{ color: '#1890FF' }" />
+	    </a-tooltip>
+	  </template>
+	  <!-- 操作 -->
+      <span slot="action" slot-scope="text,record">
+        <a-button type="primary" @click="handleDetail(record)">立即清运</a-button>
+      </span>
+    </a-table>
+    <!-- 清运弹窗 -->
+    <cleanModal :id="itemId" :visible="isOpenModal" @click="isOpenModal=false"></cleanModal>
+  </a-card>
 </template>
 
 <script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  stationList
+} from '@/api/releaseRecord.js'
+import {
+  getProvince,
+  getCityByPro,
+  getDistrictByCity
+} from '@/api/station'
+import cleanModal from './cleanModal.vue'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+const columns = [{
+  title: '网点名称',
+  dataIndex: 'no',
+  width: 60,
+  align: 'center'
+},
+{
+  title: '设备编号',
+  dataIndex: 'name',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+		slots: {title: 'customTitle'},
+          children: [
+            { title: '废旧衣物', width: 100, align: 'center',customRender: (text) => {return text || 0} },
+            { title: '废旧纸张', width: 100, align: 'center',customRender: (text) => {return text || 0} },
+            { title: '废旧塑料', width: 100, align: 'center', customRender: (text) => {return text || 0} },
+            { title: '废旧金属', width: 100, align: 'center', customRender: (text) => {return text || 0} },
+            { title: '废旧金属/塑料', width: 100, align: 'center', customRender: (text) => {return text || 0} },
+            { title: '废旧玻璃', width: 100, align: 'center', customRender: (text) => {return text || 0} },
+            { title: '可回收物', width: 100, align: 'center', customRender: (text) => {return text || 0} }
+          ]
+ },
+ {
+   title: '可回收垃圾小计(kg)',
+   dataIndex: 'createDate',
+   width: 100,
+   align: 'center',
+ },
+{
+  title: '最后清运时间',
+  dataIndex: 'changjia',
+  width: 100,
+  align: 'center',
+  customRender: (text) => {
+    return text || '--'
+  }
+},
+{
+  title: '操作',
+  dataIndex: 'action',
+  width: 100,
+  align: 'center',
+  scopedSlots: {
+    customRender: 'action'
+  }
+}
+]
+const data = [{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+},
+{
+  createDate: '2020-01-05',
+  MAC: '22210245224555',
+  name: '电子秤',
+  num: '2222554585877',
+  org: 'X-001',
+  changjia: '上海电子厂'
+}
+]
+export default {
+  components: {
+    STable,
+    VSelect,
+    cleanModal
+  },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 8
+        },
+        wrapperCol: {
+          span: 16
+        }
+      },
+	  isOpenModal: false, // 默认弹窗关闭
+	  itemId: '', // 行id
+      // 查询参数
+      queryParam: {
+        stationNo: undefined,
+        phone: '',
+        loginFlag: '',
+        beginDate: null,
+        endDate: null,
+        provinceCode: undefined, //  省
+        cityCode: undefined, // 市
+        districtCode: undefined // 区
+      },
+      // 网点名称数据
+      optionData: [],
+	  addrProvinceList: [], //  省下拉
+	  addrCityList: [], //  市下拉
+	  addrDistrictList: [], //  区下拉
+      columns,
+      data,
+      // 将默认当天时间日期回显在时间选择框中
+      time: [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ],
+      dateFormat: 'YYYY-MM-DD'
+    }
+  },
+  mounted () {
+    this.getStationList()
+    this.getProvinceList()
+    this.queryParam.loginFlag = '1'
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    // 获取合作商数据
+    getStationList () {
+      stationList().then(res => {
+        if (res.status == 200) {
+          this.optionData = res.data || []
+        }
+      })
+    },
+    // 获取省列表'
+    getProvinceList () {
+	  getProvince().then(res => {
+	    if (res.status == 200) {
+	      this.addrProvinceList = res.data || []
+	    } else {
+	      this.addrProvinceList = []
+	    }
+	  })
+    },
+    // 获取城市列表
+    getCityList (val) {
+	  this.addrCityList = []
+	  this.addrDistrictList = []
+	  this.queryParam.cityCode = undefined
+	  this.queryParam.districtCode = undefined
+	  this.getCityListRequest(val)
+    },
+    getCityListRequest (val) {
+	  getCityByPro({
+	    id: val
+	  }).then(res => {
+	    if (res.status == 200) {
+	      this.addrCityList = res.data || []
+	    } else {
+	      this.addrCityList = []
+	    }
+	  })
+    },
+    // 获取区县列表
+    getAreaList (val) {
+	  this.addrDistrictList = []
+	  this.queryParam.districtCode = undefined
+	  this.getAreaListRequest(val)
+    },
+    getAreaListRequest (val) {
+	  getDistrictByCity({
+	    id: val
+	  }).then(res => {
+	    if (res.status == 200) {
+	      this.addrDistrictList = res.data || []
+	    } else {
+	      this.addrDistrictList = []
+	    }
+	  })
+    },
+    // 排序
+    changeSort () {
+      console.log('-------------排序 ')
+    },
+    // 重置
+    reset () {
+      this.queryParam = {
+        stationNo: undefined,
+        phone: '',
+        loginFlag: '',
+        beginDate: null,
+        endDate: null
+      }
+      this.time = [
+        moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+      ]
+    },
+    // 查看清运详情
+    handleDetail (record) {
+      // this.itemId = record.id
+	  this.isOpenModal = true
+      console.log('----------详情')
+    }
+  }
+}
 </script>
 
-<style>
+<style lang='less' scoped>
+	.cleanDetail-container {
+		.cleanDetail-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+	}
 </style>

+ 92 - 0
src/views/equipmentManage/electronicScale/addElectronicScale.vue

@@ -1,7 +1,99 @@
 <template>
+  <a-modal
+    :footer="null"
+    centered
+    :title="modalTit"
+    v-model="isShow"
+    @cancle="isShow=false">
+    <a-form-model :model="form" ref="ruleForm" :rules="rules">
+      <a-form-model-item label="设备MAC码" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备MAC码" v-model="form.MAC" allowClear/></a-form-model-item>
+      <a-form-model-item label="设备名称" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备名称" v-model="form.MAC" allowClear/></a-form-model-item>
+      <a-form-model-item label="设备编号" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备编号" v-model="form.MAC" allowClear/></a-form-model-item>
+      <a-form-model-item label="设备型号" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入设备型号" v-model="form.MAC" allowClear/></a-form-model-item>
+      <a-form-model-item label="生产厂家" :label-col="{span:6}" :wrapper-col="{span:16}" prop="MAC"><a-input placeholder="请输入生产厂家" v-model="form.MAC" allowClear/></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>
+        <a-button :style="{ marginLeft: '15px' }" @click="isShow=false">
+          取消
+        </a-button>
+      </a-form-model-item>
+    </a-form-model>
+  </a-modal>
 </template>
 
 <script>
+export default {
+  name: 'AddElectronicScale',
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    id: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      form: {
+        MAC: ''
+      },
+	  isShow: this.visible, // 弹框状态
+	  // form: this.$form.createForm(this),
+	  rules: { MAC: [{ required: true, message: '请输入设备MAC码', trigger: 'blur' }] }
+    }
+  },
+  methods: {
+	 handleSubmit () {
+		 const _this = this
+		 this.$refs.ruleForm.validate(valid => {
+		   console.log(valid, this.form, ' formData.type222222222')
+		   if (valid) {
+		     const params = JSON.parse(JSON.stringify(this.form))
+		     // 编辑
+		     // if (this.id) {
+		     //   params.deviceTypeBoxList.map(item => {
+		     //     delete item.id
+		     //   })
+		     // }
+		     console.log(params)
+		     // saveBoxSetting(params).then(res => {
+		     //   console.log(res, 'res--save')
+		     //   if (res.status == '200') {
+		     //     this.$message.success(res.message)
+		     //     this.$emit('refresh')
+		     //     setTimeout(function () {
+		     //       _this.cancel()
+		     //     }, 300)
+		     //   } else {
+		     //     // this.$message.error(res.message)
+		     //   }
+		     // })
+		   }
+		 })
+	 }
+  },
+  computed: {
+    modalTit () {
+      return this.id ? '编辑设备信息' : '新增设备信息'
+    }
+  },
+  // 监听弹窗
+  watch: {
+    // 父页面传过来的弹窗状态
+    visible (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
 </script>
 
 <style>

+ 139 - 1
src/views/equipmentManage/electronicScale/electronicScale.vue

@@ -1,8 +1,146 @@
 <template>
+  <a-card class="electronicScale-container" :bordered="false">
+    <!-- 搜索框 -->
+    <div class="electronicScale-container-searchForm">
+      <a-form-model :model="searchForm" layout="inline" ref="searchForm">
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="8" :lg="6">
+            <a-form-model-item label="设备MAC码" :label-col="{span:7}" :wrapper-col="{span:17}">
+              <a-input v-model="searchForm.MAC" placeholder="请输入设备MAC码" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="6">
+            <a-button class="handle-btn serach-btn" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button class="handle-btn" type="" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 新增 -->
+    <div class="electronicScale-container-add">
+      <a-button type="primary" icon="plus" @click="openModal">新增</a-button>
+    </div>
+    <!-- 合计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">总计<span> {{ }} </span>条,乐豆变动量总计<span> {{ }} </span>个</div>
+    </a-alert>
+    <!-- 列表 -->
+    <a-table ref="table" :rowKey="(record) => record.id" :columns="columns" :data-source="data" bordered>
+      <span slot="action" slot-scope="text,record">
+        <a-icon type="edit" title="编辑" class="actionBtn icon-blues" @click="handleEdit(record)"/>
+        <a-icon type="delete" title="删除" class="actionBtn icon-red" @click="delect(record)"/>
+      </span>
+    </a-table>
+    <!-- 新增/编辑弹窗 -->
+    <addElectronicScale :visible="isOpenModal" :id="itemId" @refresh="refreshTable" @close="isOpenModal=false"></addElectronicScale>
+  </a-card>
 </template>
 
 <script>
+import { STable } from '@/components'
+import addElectronicScale from './addElectronicScale.vue'
+const columns = [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+  { title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center' },
+  { title: '设备MAC码', dataIndex: 'MAC', width: 100, align: 'center' },
+  { title: '设备名称', dataIndex: 'name', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+  { title: '设备编号', dataIndex: 'num', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+  { title: '设备型号', dataIndex: 'org', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+  { title: '生产厂家', dataIndex: 'changjia', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+  { title: '操作', dataIndex: 'action', width: 100, align: 'center', scopedSlots: { customRender: 'action' } }
+]
+const data = [{ createDate: '2020-01-05', MAC: '22210245224555', name: '电子秤', num: '2222554585877', org: 'X-001', changjia: '上海电子厂' },
+  { createDate: '2020-01-05', MAC: '22210245224555', name: '电子秤', num: '2222554585877', org: 'X-001', changjia: '上海电子厂' },
+  { createDate: '2020-01-05', MAC: '22210245224555', name: '电子秤', num: '2222554585877', org: 'X-001', changjia: '上海电子厂' },
+  { createDate: '2020-01-05', MAC: '22210245224555', name: '电子秤', num: '2222554585877', org: 'X-001', changjia: '上海电子厂' }]
+export default {
+  components: { STable, addElectronicScale },
+  data () {
+    return {
+      searchForm: {
+        MAC: ''
+      },
+	  columns,
+	  data,
+	  isOpenModal: false, // 默认弹窗关闭
+	  itemId: '' // 编辑行id
+      // 列表表头
+      // columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+      //   { title: '创建时间', dataIndex: 'createDate', width: 100, align: 'center' },
+      //   { title: '设备MAC码', dataIndex: 'MAC', width: 100, align: 'center' },
+      //   { title: '设备名称', dataIndex: 'name', width: 100, align: 'center' },
+      //   { title: '设备编号', dataIndex: 'num', width: 100, align: 'center' },
+      //   { title: '设备型号', dataIndex: 'org', width: 100, align: 'center' },
+      //   { title: '生产厂家', dataIndex: 'changjia', width: 100, align: 'center' },
+      //   { title: '操作', dataIndex: 'action', width: 100, align: 'center' }
+      // ]
+	  // data: [{ createDate: '2020-01-05', MAC: '22210245224555', name: '电子秤', num: '2222554585877', org: 'X-001', changjia: '上海电子厂' }]
+	  // 加载数据方法 必须为 Promise 对象
+	  // loadData: parameter => {
+	  //   // return getBoxList(Object.assign(parameter, this.queryParam)).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]
+	  //   //       _item.no = no + i + 1
+	  //   //     }
+	  //   //     return res.data
+	  //   //   }
+	  //   // })
+	  // }
+    }
+  },
+  methods: {
+    // 重置
+    handleReset () {
+
+    },
+    // 新增
+    openModal () {
+      this.isOpenModal = true
+	  console.log('新增')
+    },
+    // 编辑
+    handleEdit (record) {
+      this.isOpenModal = true
+	  console.log('编辑')
+    },
+    // 删除
+    delect () {
+
+    },
+    // 保存或编辑后刷新列表
+    refreshTable () {
+      // 编辑
+      if (this.itemId) {
+		  this.$refs.table.refresh()
+      } else {
+        // 保存
+		  this.$refs.table.refresh(true)
+      }
+    }
+  }
+}
 </script>
 
-<style>
+<style lang="less" scoped>
+	.electronicScale-container {
+		.electronicScale-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+			}
+		}
+
+		// 查询按钮
+		.handle-btn {
+			margin-top: 4px;
+		}
+
+		.serach-btn {
+			margin-right: 10px;
+		}
+
+		.electronicScale-container-add {
+			margin: 15px 0;
+		}
+	}
 </style>

+ 2 - 1
src/views/equipmentManage/network/equipmentModal.vue

@@ -4,7 +4,7 @@
     class="edit-network-modal"
     :footer="null"
     :maskClosable="false"
-    title="绑定箱体设备"
+    title="绑定设备"
     v-model="isShow"
     @cancle="isShow=false"
     :width="1000">
@@ -123,6 +123,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 100, align: 'center' },
         { title: '设备状态', scopedSlots: { customRender: 'onlineFlag' }, width: 150, align: 'center' },
+		{ title: '设备类型', dataIndex:'', width: 150, align: 'center' },
         { title: '箱体类型', scopedSlots: { customRender: 'type' }, width: 150, align: 'center' },
         { title: '工作状态', scopedSlots: { customRender: 'workStatus' }, width: 150, align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: 80, align: 'center' }

+ 8 - 6
src/views/releaseRecord/releaseRecordList.vue

@@ -33,9 +33,9 @@
             </a-form-item>
           </a-col>
           <a-col :span="4">
-            <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="refresh">查询</a-button>
-            <a-button class="handle-btn serach-btn" type="" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
-            <a-button class="export-btn" id="releaseRecordList-export" v-hasPermission="'B_exportDeliveryLog'" :loading="loading" @click="handleExport">导出</a-button>
+            <a-form-item label="设备类型" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+              <v-select code="RUBBISH_TYPE" v-model="queryParam.rubbishType" allowClear placeholder="请选择设备类型" id="releaseRecordList-rubbishType"></v-select>
+            </a-form-item>
           </a-col>
         </a-row>
         <a-row :gutter="20">
@@ -72,9 +72,11 @@
               </div>
             </a-form-item>
           </a-col>
-          <!-- <a-col :span="4">
+          <a-col :span="4">
+            <a-button class="handle-btn serach-btn" id="releaseRecordList-serach" type="primary" @click="refresh">查询</a-button>
+            <a-button class="handle-btn serach-btn" type="" id="releaseRecordList-reset" @click="handleReset">重置</a-button>
             <a-button class="export-btn" id="releaseRecordList-export" v-hasPermission="'B_exportDeliveryLog'" :loading="loading" @click="handleExport">导出</a-button>
-          </a-col> -->
+          </a-col>
         </a-row>
       </a-form>
     </div>
@@ -171,6 +173,7 @@ export default {
         { title: '投放时间', dataIndex: 'deliveryTime', width: 200, align: 'center' },
         { title: '网点名称', dataIndex: 'stationName', width: 200, align: 'center' },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 200, align: 'center' },
+        { title: '设备类型', dataIndex: '', width: 200, align: 'center' },
         { title: '用户账号', dataIndex: 'customerMobile', width: 200, align: 'center' },
         { title: '投放方式', dataIndex: 'deliveryWayDictValue', width: 200, align: 'center' },
         { title: '本次兑换乐豆(个)', dataIndex: 'goldNum', width: 100, align: 'center' },
@@ -186,7 +189,6 @@ export default {
             { title: '可回收物', width: 100, align: 'center', scopedSlots: { customRender: 'eight' } }
           ]
         }
-
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 184 - 0
src/views/userInfo/allLdDetail.vue

@@ -0,0 +1,184 @@
+<template>
+  <a-card :bordered="false" class="allLdDetail-page-info">
+    <!-- 搜索条件 -->
+    <div class="allLdDetail-searchForm">
+      <a-form layout="inline" v-bind="formItemLayout" @keyup.enter.native="refresh">
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
+            <a-form-item label="创建时间" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-range-picker
+                id="allLdDetail-time"
+                v-model="time"
+                style="width: 100%;"
+                :format="dateFormat"
+                :placeholder="['开始时间','结束时间']"
+                :disabledDate="disabledDate"
+                @change="onChange" />
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
+            <a-form-item label="变动类型" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.changeType"
+                ref="changeType"
+                id="allLdDetail-status"
+                code="GOLD_CHANGE_TYPE"
+                placeholder="请选择"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
+            <a-form-item label="变动原因" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <v-select
+                v-model="queryParam.operateType"
+                ref="operateType"
+                id="allLdDetail-status"
+                code="GOLD_OPERATE_TYPE_ALL"
+                placeholder="请选择"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="5">
+            <a-form-item label="用户手机" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input id="boxSetting-name" allowClear :maxLength="30" v-model="queryParam.name" placeholder="请输入用户手机" />
+            </a-form-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="8" :lg="4">
+            <a-button class="handle-btn serach-btn" id="allLdDetail-btn-serach" type="primary" @click="refresh">查询</a-button>
+            <a-button class="handle-btn" type="" id="allLdDetail-btn-reset" @click="handleReset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 总计 -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div class="ftext" slot="message">共<span> {{ }} </span>条,乐豆变动总计<span> {{ }} </span>个</div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { customerGoldLogDetail } from '@/api/userInfo.js'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  name: 'ShopOrder',
+  components: { STable, VSelect },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: { span: 7 },
+        wrapperCol: { span: 17 }
+      },
+	  // 将默认近七天时间日期回显在时间选择框中
+	  time: [
+	    moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+	    moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
+	  ],
+	  dateFormat: 'YYYY-MM-DD',
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        changeType: '', // 类型
+        operateType: '' // 原因
+      },
+	  info: '',
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: 200, align: 'center' },
+        { title: '用户手机', dataIndex: '', width: 200, align: 'center' },
+        { title: '变动类型', dataIndex: 'changeTypeDictValue', width: 200, align: 'center' },
+        { title: '变动原因', dataIndex: 'operateTypeDictValue', width: 200, align: 'center' },
+        { title: '乐豆变动量(个)', dataIndex: 'changeNum', width: 200, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      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')
+		    searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+		  } else {
+		    searchData.beginDate = ''
+		    searchData.endDate = ''
+		  }
+		  return customerGoldLogDetail(Object.assign(parameter, 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]
+		        _item.no = no + i + 1
+		      }
+		      return res.data
+		    }
+		  })
+      }
+    }
+  },
+  methods: {
+    // 不可选日期
+    disabledDate (date, dateStrings) {
+      return date && date.valueOf() > Date.now()
+    },
+    // 创建时间change
+    onChange (dates, dateStrings) {
+      if ((dates, dateStrings)) {
+        this.queryParam.beginDate = dateStrings[0]
+        this.queryParam.endDate = dateStrings[1]
+      }
+    },
+    // 查询
+    refresh () {
+      this.$refs.table.refresh(true)
+    },
+    // 重置
+    handleReset () {
+      this.time = [moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
+	    moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')]
+      this.queryParam.changeType = ''
+      this.queryParam.operateType = ''
+      this.$refs.table.refresh(true)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .allLdDetail-page-info{
+	  .page-header{
+		  margin-bottom: 15px;
+		  span{
+			  margin-left: 20px;
+		  }
+		  .page-header-info{
+			   margin-left:0;
+			 font-weight: bold;
+		  }
+	  }
+    .allLdDetail-searchForm{
+      .ant-form-inline .ant-form-item{
+        width: 100%;
+      }
+      // 搜索框的下间距
+      .ant-form-item {
+      	margin-bottom: 15px;
+      }
+      .handle-btn{
+        margin-top: 4px;
+      }
+      .serach-btn{
+        margin-right: 10px;
+      }
+    }
+  }
+</style>