zhangdan há 4 anos atrás
pai
commit
e755590d6b

+ 394 - 0
src/views/recoveryManage/bannerSet.vue

@@ -0,0 +1,394 @@
+<template>
+  <a-card :bordered="false" class="bannerSetting-wrap">
+    <div class="add">
+      <a-button
+        type="primary"
+        v-if="$hasPermissions('B_adBanner_new')"
+        icon="plus"
+        class="addBtn"
+        @click="showModal"
+        id="bannerSetting-showModal">新增</a-button>
+    </div>
+    <!-- table列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="row => row.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 操作 -->
+      <template slot="sort" slot-scope="text, record, index">
+        <div v-if="$hasPermissions('B_adBanner_sort')">
+          <a-icon
+            title="下移"
+            v-if="index != list.length-1"
+            :style="{ fontSize: '18px', color: '#e29b29', cursor: 'pointer',padding:'0 10px' }"
+            @click="changeSort(index,record,0)"
+            type="arrow-down" />
+          <a-icon
+            title="上移"
+            v-if="index != 0"
+            :style="{ fontSize: '18px', color: '#e29b29',cursor: 'pointer', padding:'0 10px' }"
+            @click="changeSort(index,record,1)"
+            type="arrow-up" />
+        </div>
+        <div v-else>--</div>
+      </template>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          type="eye"
+          v-if="$hasPermissions('B_adBanner_view')"
+          id="bannerSetting-handleView"
+          title="查看"
+          class="actionBtn icon-green"
+          @click="handleEdit(record, 1)" />
+        <a-icon
+          type="edit"
+          id="bannerSetting-handleEdit"
+          v-if="record.state == '0'&&$hasPermissions('B_adBanner_edit')"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record, 0)" />
+        <a-icon
+          type="delete"
+          id="bannerSetting-delect"
+          v-if="record.state == '0'&&$hasPermissions('B_adBanner_del')"
+          title="删除"
+          class="actionBtn icon-red"
+          @click="delect(record)" />
+      </span>
+      <span slot="status" slot-scope="text, record">
+        <a-switch
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          id="bannerSetting-changeFlagHandle"
+          v-if="$hasPermissions('B_adBanner_enable')"
+          v-model="record.state == 1 ? true : false"
+          @change="changeFlagHandle(text, record)"
+        />
+      </span>
+    </s-table>
+    <!-- 弹窗 -->
+    <a-modal
+      :title="title"
+      :visible="visible"
+      :footer="null"
+      :closable="closable"
+      :centered="true"
+      @cancel="close"
+      width="45%">
+      <a-form
+        class="bannerSetting-form"
+        id="components-form-demo-validate-other"
+        :form="form"
+        ref="form"
+        v-bind="formItemLayout"
+        @submit="handleSubmit"
+        :hideRequiredMark="hideRequiredMark">
+        <a-form-item label="名称" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="bannerSetting-title"
+            :maxLength="30"
+            v-decorator="['formData.title', { initialValue: formData.title,getValueFromEvent: $filterEmpty, rules: [{ required: true, message: '请输入轮播图名称(最多30个字符)!' }] }]"
+            :disabled="disabled"
+            placeholder="请输入轮播图名称(最多30个字符)"
+            allowClear
+          />
+        </a-form-item>
+        <a-form-item label="状态" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-radio-group
+            :disabled="disabled"
+            id="bannerSetting-status"
+            v-decorator="['formData.state', { initialValue: formData.state, rules: [{ required: true, message: '请选择状态!' }] }]"
+          >
+            <a-radio value="1">启用</a-radio>
+            <a-radio value="0">禁用</a-radio>
+          </a-radio-group>
+        </a-form-item>
+        <a-form-item label="上传图片" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <div v-if="title != '查看详情'">
+            <Upload
+              class="upload"
+              id="bannerSetting-photoPath"
+              v-decorator="[ 'formData.image', { initialValue: formData.image, rules: [{ required: true, message: '请上传轮播图!' }] } ]"
+              ref="bannerImage"
+              :fileSize="0.25"
+              :disabled="disabled"
+              @change="getbannerImage"
+              listType="picture-card" ></Upload>
+            <span class="upload-desc">请上传750*250尺寸的图片,大小不超过0.25MB,png、jpg、jpeg格式。</span>
+          </div>
+          <img v-else :src="formData.image" style="max-width:400px ;height: auto;" />
+        </a-form-item>
+        <a-form-item label="备注" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+          <a-input
+            id="bannerSetting-remarks"
+            :maxLength="500"
+            v-decorator="['formData.remarks', { initialValue: formData.remarks }]"
+            :disabled="disabled"
+            type="textarea"
+            placeholder="请输入备注(最多500个字符)"
+            allowClear
+          />
+        </a-form-item>
+        <a-form-item :wrapper-col="{ span: 12, offset: 6}" style="text-align: center;">
+          <a-button type="primary" html-type="submit" v-if="!disabled" id="bannerSetting-submit" style="margin-right: 15px">保存</a-button>
+          <a-button @click="close()" v-if="!disabled" style="margin-left: 15px" id="bannerSetting-close">取消</a-button>
+        </a-form-item>
+      </a-form>
+    </a-modal>
+  </a-card>
+</template>
+
+<script>
+import { Upload, STable, VSelect } from '@/components'
+import { getadvertSettingList, changeStatus, changeSort, deleteItem, saveItem } from '@/api/bannerSetting.js'
+
+export default {
+  components: {
+    STable,
+    Upload,
+    VSelect
+  },
+  data () {
+    return {
+      showJumpUrl: true,
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'no',
+          width: 60,
+          align: 'center'
+        },
+        {
+          title: '名称',
+          width: 150,
+          dataIndex: 'title',
+          align: 'center'
+        },
+        {
+          title: '状态',
+          width: 100,
+          dataIndex: 'state',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'status'
+          }
+        },
+        {
+          title: '排序',
+          width: 100,
+          dataIndex: 'sort',
+          align: 'center',
+          scopedSlots: {
+            customRender: 'sort'
+          }
+        },
+        {
+          title: '操作',
+          align: 'center',
+          width: 150,
+          scopedSlots: {
+            customRender: 'action'
+          }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getadvertSettingList(parameter).then(res => {
+          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
+          }
+          this.list = res.data.list
+          return res.data
+        })
+      },
+      title: '编辑',
+      closable: true,
+      visible: false,
+      confirmLoading: false,
+      formLayout: 'horizontal',
+      hideRequiredMark: false, // 是否显示必填的* 默认显示
+      form: this.$form.createForm(this),
+      formItemLayout: {
+        labelCol: {
+          span: 6
+        },
+        wrapperCol: {
+          span: 14
+        }
+      },
+      formData: {
+        title: '', // 标题
+        state: '', // 状态
+        type: 'banner', // 广告图类型
+        image: '', // banner地址
+        createDate: '', // 创建时间
+        remarks: '' // 备注
+      },
+      disabled: false,
+      value: '',
+      id: '',
+      isShow: true,
+      list: []
+    }
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, {
+      name: 'validate_other'
+    })
+  },
+  methods: {
+    jumpTypeChange (val) {
+      this.showJumpUrl = val != 'NONE'
+    },
+    showModal () {
+      this.disabled = false
+      delete this.formData.id
+      delete this.formData.createDate
+      this.visible = true
+      this.title = '新增'
+      this.hideRequiredMark = false
+    },
+    // 轮播图change
+    getbannerImage (data) {
+      this.formData.photoPath = data
+    },
+    // 点击保存;
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.form.validateFields((err, values) => {
+        if (!err) {
+          const formData = Object.assign({}, this.formData, values.formData)
+          console.log(formData)
+          saveItem(formData).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh(true)
+              _this.close()
+            }
+          })
+        }
+      })
+    },
+    close () {
+      this.visible = false
+      this.formData.title = ''
+      this.formData.state = ''
+      this.formData.image = ''
+      this.formData.remarks = '' // 备注
+      this.title = '新增'
+      if (this.$refs.bannerImage) {
+        this.$refs.bannerImage.setFileList('')
+      }
+      this.form.resetFields()
+    },
+    // 赋值
+    assignment (row) {
+      this.formData.id = row.id
+      this.formData.title = row.title
+      this.formData.image = row.image
+      this.formData.state = row.state
+      this.formData.remarks = row.remarks
+      this.formData.createDate = row.createDate
+      this.jumpTypeChange(this.formData.jumpType)
+    },
+    // 0 修改,1 查看详情
+    handleEdit (row, type) {
+      const _this = this
+      if (type == 1) {
+        this.title = '查看详情'
+        this.hideRequiredMark = true
+      } else if (type == 0) {
+        this.title = '编辑'
+        this.hideRequiredMark = false
+        setTimeout(() => {
+          _this.$refs.bannerImage.setFileList(this.formData.image)
+        }, 500)
+      }
+      this.assignment(row)
+      this.disabled = type == 1
+      this.visible = true
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        centered: true,
+        content: '删除后无法恢复,确认删除?',
+        okText: '确定',
+        cancelText: '取消',
+        onOk () {
+          deleteItem({
+            id: row.id
+          }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    // 更改启用禁用状态
+    changeFlagHandle (text, record) {
+      const _data = {
+        id: record.id,
+        flag: record.state == 1 ? '0' : '1'
+      }
+      changeStatus(_data).then(res => {
+        if (res.status == '200') {
+          this.$message.success(res.message)
+          this.$refs.table.refresh()
+        } else {
+          record.status = !record.status
+        }
+      })
+    },
+    // 上移 下移 排序 index:下标  item:数据  type:类型 0 下移 1 上移
+    changeSort (index, item, type) {
+      console.log(index, item, type, this.list)
+      const indexThat = type === 0 ? index + 1 : index - 1
+      const params = {
+        id: item.id,
+        sortId: this.list[indexThat].id
+      }
+      changeSort(params).then(res => {
+        if (res.status == 200) {
+          this.$refs.table.refresh()
+        } else {
+          this.$message.error(res.message)
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .bannerSetting-wrap{
+    .addBtn {
+      margin-bottom: 20px;
+    }
+  }
+  .bannerSetting-form{
+    .upload{
+      width: 100%!important;
+      margin-bottom: 10px;
+    }
+    /* 商品图片描述 */
+    .upload-desc{
+      display: block;
+      font-size: 12px;
+      color: #808695;
+      line-height: 1.5em;
+    }
+  }
+</style>

+ 98 - 0
src/views/recoveryManage/recoveryPriceSet.vue

@@ -0,0 +1,98 @@
+<template>
+  <a-card :bordered="false">
+    <a-tabs type="card" @change="callback">
+      <a-tab-pane key="1" tab="上门回收价格设置">
+      </a-tab-pane>
+      <a-tab-pane key="2" tab="工厂回收价格设置">
+      </a-tab-pane>
+    </a-tabs>
+    <a-table
+      class="table"
+      ref="table"
+      size="default"
+      :rowKey="record => record.id"
+      :columns="columns"
+      :dataSource="loadData"
+      :pagination="false"
+      :scroll="{ y: 650 }"
+      :loading="loadingPage"
+      bordered>
+      <!-- 序号 -->
+      <template slot="no" slot-scope="text, record" >
+        <span>{{ record.index+1 }}</span>
+      </template>
+      <!-- 门店结算价 -->
+      <template slot="accountPrice" slot-scope="text, record" >
+        <a-input-number
+          id="storeSettlementPrice-price"
+          :value="record.accountPrice"
+          :precision="2"
+          :min="0"
+          :max="999"
+          style="width: 70%;"
+          placeholder="请输入回收价格"
+          @change="e => handleChange(e, record.id)" />
+        <!-- <template v-else> {{ record.accountPrice }} </template> -->
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <div class="editable-row-operations">
+          <span >
+            <!-- <a @click="() => save(record.id, record.accountPrice)" style="margin-right: 8px;">保存</a> -->
+            <a-popconfirm title="确定要保存吗?" @confirm="() => save(record.id)">
+              <a>保存</a>
+            </a-popconfirm>
+          </span>
+          <!-- <span v-else>
+            <a v-if="$hasPermissions('B_store_jsj_edit')" :disabled="editingId !== ''" @click="() => edit(record.id)">编辑</a>
+            <span v-else>--</span>
+          </span> -->
+        </div>
+      </template>
+    </a-table>
+  </a-card>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      loadingPage: false, // 列表加载状态
+      // tabs: [{ name: '上门回收价格设置' }, { name: '工厂回收价格设置' }],
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center', scopedSlots: { customRender: 'no' } },
+        { title: '回收类型', dataIndex: 'type', width: 100, align: 'center' },
+        { title: '回收名称', dataIndex: 'name', width: 100, align: 'center' },
+        { title: '回收价格(元/kg)', width: 100, align: 'center', scopedSlots: { customRender: 'accountPrice' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
+      ],
+      //  表格列表数据
+      loadData: [
+        { index: 0, type: '衣物类/其他', name: '衣物' },
+        { index: 1, type: '纸质类', name: '黄纸' },
+        { index: 2, type: '纸质类', name: '花纸' },
+        { index: 3, type: '纸质类', name: '书纸' },
+        { index: 4, type: '纸质类', name: '杂志' },
+        { index: 5, type: '纸质类', name: '报纸' },
+        { index: 6, type: '纸质类', name: '杂纸' },
+        { index: 7, type: '塑料类', name: '塑料筐(白)' },
+        { index: 8, type: '塑料类', name: '塑料筐(黑)' },
+        { index: 9, type: '塑料类', name: '亚克力板' },
+        { index: 10, type: '塑料类', name: '塑料瓶(透明)' },
+        { index: 11, type: '金属类', name: '铁(薄)' },
+        { index: 12, type: '金属类', name: '铁(厚)' },
+        { index: 13, type: '金属类', name: '不锈钢' }
+      ]
+    }
+  },
+  methods: {
+    callback (key) {
+      console.log(key)
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 266 - 0
src/views/recoveryManage/riderModal.vue

@@ -0,0 +1,266 @@
+<template>
+  <div>
+    <a-modal
+      class="modalBox"
+      :title="titleText"
+      v-model="isshow"
+      @cancle="cancel"
+      width="45%"
+      :centered="true">
+      <a-form :form="form" @submit="handleSubmit">
+        <a-row :gutter="30">
+          <a-col :span="10">
+            <!-- 用户名称 -->
+            <a-form-item label="骑手名称" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-input
+                placeholder="请输入骑手名称(最多30个字符)"
+                allowClear
+                id="userModal-name"
+                :maxLength="30"
+                v-decorator="['formData.name', {
+                  initialValue: formData.name,getValueFromEvent: $filterEmpty,
+                  rules: [{ required: true, message: '请输入骑手名称(最多30个字符)!' },{pattern:'^[^<|>]{1,30}$',message:'请输入不含<或>的字符,最多30个字符'}] }]"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="10">
+            <!-- 手机号码 -->
+            <a-form-item label="骑手电话" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-input
+                placeholder="请输入骑手电话"
+                allowClear
+                :maxLength="11"
+                id="userModal-phone"
+                v-decorator="['formData.phone', {
+                  initialValue: formData.phone,getValueFromEvent: $filterEmpty,
+                  rules: [{ required: true, message: '请输入骑手电话!' },{pattern:/^[1][0-9]{10}$/, message: '请输入正确的骑手电话!'}] }]"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <!-- 经纬度 -->
+        <a-row :gutter="30">
+          <a-col :span="10">
+            <a-form-item label="纬度" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-input
+                id="network-edit-lat"
+                v-decorator="[
+                  'formData.lat',
+                  { initialValue: formData.lat, rules: [
+                    { required: true, message: '请输入纬度' },
+                    { pattern: /^[\-\+]?([0-8]?\d{1}\.\d{1,8}|90\.0{1,8})$/, message: '请输入正确的纬度,整数部分为0~90,必须输入1到8位小数' }
+                  ] }
+                ]"
+                placeholder="请输入纬度"
+                allowClear />
+            </a-form-item>
+          </a-col>
+          <a-col :span="10">
+            <a-form-item label="经度" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }">
+              <a-input
+                id="network-edit-lng"
+                v-decorator="[
+                  'formData.lng',
+                  { initialValue: formData.lng, getValueFromEvent: $filterEmpty, rules: [
+                    { required: true, message: '请输入经度' },
+                    { pattern: /^[\-\+]?(0?\d{1,2}\.\d{1,8}|1[0-7]?\d{1}\.\d{1,8}|180\.0{1,8})$/, message: '请输入正确的经度,整数部分为0~180,必须输入1到8位小数' }
+                  ] }
+                ]"
+                placeholder="请输入经度"
+                allowClear />
+            </a-form-item>
+          </a-col>
+          <a-col :span="4">
+            <a href="https://lbs.qq.com/tool/getpoint/" target="_blank">
+              <a-button type="primary" id="network-edit-search-jwd" class="network-edit-search-jwd" size="small">查询坐标</a-button>
+            </a>
+          </a-col>
+        </a-row>
+        <a-row :gutter="30" type="flex">
+          <a-col :span="10">
+            <a-form-item label="服务半径" :label-col="{ span: 8 }" :wrapper-col="{ span: 14 }" >
+              <a-input
+                v-decorator="[
+                  'formData.lng',
+                  { initialValue: formData.lng, getValueFromEvent: $filterEmpty, rules: [
+                    { required: true, message: '请输入服务半径' },
+                    { pattern: /^[1-9]\d*$/, message: '请输入正确的服务半径(大于0的正整数)' }
+                  ] }
+                ]"
+                placeholder="请输入服务半径"
+                allowClear />
+              <span>KM</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-form-item :wrapper-col="{ span: 24, offset: 10}">
+          <a-button type="primary" @click="handleSubmit()" id="userModal-handleSubmit" :style="{ marginRight: '15px' }">
+            保存
+          </a-button>
+          <a-button :style="{ marginLeft: '15px' }" @click="handleCancel()" id="userModal-handleCancel">
+            取消
+          </a-button>
+        </a-form-item>
+      </a-form>
+
+    </a-modal>
+  </div>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { getRoleList, saveUserPower } from '@/api/power-user.js'
+export default {
+  name: 'RiderModal',
+  components: {
+    STable, VSelect
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    data: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      titleText: '新增用户',
+      isshow: this.visible,
+      formLayout: 'horizontal',
+      form: this.$form.createForm(this, { name: 'miniForm' }),
+      roleList: [],
+      formData: {
+        roleNames: undefined, // 角色
+        name: '',
+        loginFlag: '', // 活动状态
+        phone: '',
+        sex: '',
+        remarks: ''
+      }
+
+    }
+  },
+  methods: {
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+
+    // 保存提交
+    handleSubmit () {
+      const _this = this
+      this.form.validateFields((err, values) => {
+        console.log(values, 'values222')
+        if (!err) {
+          values.formData.roleNames = values.formData.roleNames.join(',')
+          console.log(values.formData, ' formData.type222222222')
+          console.log(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData))
+          saveUserPower(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData)).then(res => {
+            console.log(res, 'res--save')
+            if (res.status + '' === '200') {
+              this.$message.success(res.message ? res.message : '保存成功')
+              this.$emit('refresh')
+              setTimeout(function () {
+                _this.cancel()
+              }, 300)
+            } else {
+              // this.$message.error(res.message)
+            }
+          })
+        }
+      })
+    },
+    // 取消
+    handleCancel () {
+      this.cancel()
+    },
+    clear () {
+      this.form.resetFields()
+      delete this.formData.id
+      this.formData.roleNames = []
+      this.formData.name = ''
+      this.formData.loginFlag = ''
+      this.formData.phone = ''
+      this.formData.sex = ''
+      this.formData.remarks = ''
+    },
+
+    // 获取角色列表接口
+    getRoleList () {
+      getRoleList().then(res => {
+        console.log(res, 'res--role')
+        if (res.status + '' === '200') {
+          this.roleList = res.data
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    }
+
+  },
+  mounted () {
+    this.getRoleList()
+  },
+  beforeCreate () {
+    this.form = this.$form.createForm(this, { name: 'miniForm' })
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isshow = newValue
+    },
+    isshow (newValue, oldValue) {
+      if (newValue) {
+        if (this.data.id) { // 编辑
+          this.titleText = '编辑用户'
+          this.formData = Object.assign({}, this.data)
+          delete this.formData.no
+          let roleNames = this.formData.roleNames
+          console.log(roleNames, 'roleNames')
+          if (roleNames) {
+            roleNames = roleNames.split(',')
+            console.log(roleNames, 'roleNames22')
+            const arr = []
+            console.log(this.roleList, 'this.roleList')
+
+            roleNames.map(item => {
+              const row = this.roleList.find(a => {
+                return a.name == item
+              })
+              if (row) {
+                arr.push(row.id)
+              }
+            })
+
+            console.log(arr, 'arrs')
+            this.formData.roleNames = arr
+          } else {
+            this.formData.roleNames = []
+          }
+
+          this.formData.loginFlag = Number(this.formData.loginFlag)
+          // this.formData.sex = Number(this.formData.sex)
+          console.log(this.formData, 'this.formData')
+        } else {
+          this.titleText = '新增用户'
+        }
+      } else {
+        this.cancel()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .ant-modal-footer {
+    display: none;
+  }
+  .network-edit-search-jwd{
+    margin-top: 8px;
+  }
+</style>

+ 148 - 0
src/views/recoveryManage/riderOrderModal.vue

@@ -0,0 +1,148 @@
+<template>
+  <div>
+    <a-modal
+      class="modalBox"
+      title="详情"
+      v-model="isShow"
+      @cancle="cancel"
+      width="70%"
+      :centered="true">
+      <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">单号:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">状态:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">支付方式:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+      </a-row>
+      <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">下单时间:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">预约时间:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">服务时间:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+      </a-row>
+      <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">服务骑手:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">回收重量(kg):</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">支付金额(元):</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+      </a-row>
+      <a-row :gutter="48" >
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">取消原因:</p>
+          <p class="item-main">{{ }}</p>
+        </a-col>
+        <a-col :span="8" class="item-cont">
+          <p class="item-label">图片:</p>
+          <img src="" alt=""/>
+        </a-col>
+      </a-row>
+      <!-- 列表 -->
+      <div class="table-title">回收明细</div>
+      <!-- 列表 -->
+      <a-table
+        ref="table"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data-source="tableData"
+        bordered
+      >
+      </a-table>
+    </a-modal>
+  </div>
+</template>
+
+<script>
+// import {  VSelect } from '@/components'
+// import { getRoleList } from '@/api/power-user.js'
+export default {
+  name: 'RiderOrderModal',
+  components: {
+    // VSelect
+  },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false
+    },
+    itemId: {
+      type: [String, Number],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.visible,
+      tableData: [], // 列表数据
+      columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '回收类别', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收名称', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收价格', dataIndex: 'stationName', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收重量(kg)', dataIndex: 'cleanTimes', width: 150, align: 'center', sorter: true },
+        { title: '交易金额(元)', dataIndex: 'cleanWeight', width: 150, align: 'center', sorter: true, customRender: (text) => { return text || 0 } }]
+    }
+  },
+  methods: {
+    // 列表数据
+    getListData () {
+
+    },
+    cancel (e) {
+      this.clear()
+      this.$emit('close')
+    },
+
+    // 取消
+    handleCancel () {
+      this.cancel()
+    }
+
+  },
+  watch: {
+    visible (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    isShow (newValue, oldValue) {
+      if (newValue) {
+        if (this.itemId) {
+        }
+      }
+    } }
+}
+</script>
+
+<style lang="less">
+  .ant-modal-footer {
+    display: none;
+  }
+  .network-edit-search-jwd{
+    margin-top: 8px;
+  }
+  .table-title{
+    margin-bottom: 10px;
+  }
+</style>

+ 227 - 0
src/views/recoveryManage/riderOrderRecord.vue

@@ -0,0 +1,227 @@
+<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="refresh"
+        v-bind="formItemLayout">
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="6" >
+            <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">
+            <a-form-model-item label="单号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入单号" @pressEnter="$refs.table.refresh(true)"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" >
+            <a-form-model-item label="用户信息" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" >
+            <a-form-model-item label="骑手信息" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
+              <a-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
+            </a-form-model-item>
+          </a-col>
+
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :xs="24" :sm="12" :md="6" >
+            <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="userList-check-enable-state"></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" >
+            <a-button type="primary" @click="refreshSearch" 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> {{ totalNum }} </span>条,回收重量 <span> {{ weightTotal }} </span>kg,交易金额 <span>{{ moneyTotal }}</span>元</div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      ref="table"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered
+    >
+      <template slot="stationName" slot-scope="text,record">
+        <div>{{ stationName }}</div>
+        <div>{{ stationName }}</div>
+      </template>
+      <!-- 查看详情 -->
+      <template slot="detail" slot-scope="text, record">
+        <a-icon
+          type="eye"
+          title="详情"
+          v-if="$hasPermissions('B_power_user_resetPsd')"
+          class="actionBtn icon-blues"
+          @click="handelDetail(record)" />
+      </template>
+    </s-table>
+    <!-- 详情弹窗 -->
+    <riderOrderModal :visible="isOpenModal" :itemId="recordId" @close="isOpenModal=false"></riderOrderModal>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { cleanRecordList, getCleanStationTotal } from '@/api/cleanManage.js'
+import moment from 'moment'
+import riderOrderModal from './riderOrderModal.vue'
+export default {
+  components: { STable, VSelect, riderOrderModal },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        queryWord: '' // 骑手信息
+      },
+      totalNum: 0, // 总条数
+      weightTotal: 0, // 回收物总计
+      moneyTotal: 0, // 金额总计
+      isOpenModal: false,
+      recordId: '', // 行id
+      // 将默认近一周时间日期回显在时间选择框中
+      time: [],
+      dateFormat: 'YYYY-MM-DD',
+      columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '下单时间', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '单号', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '用户信息', dataIndex: '', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '骑手信息', dataIndex: 'stationName', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收重量(kg)', dataIndex: 'cleanTimes', width: 150, align: 'center', sorter: true },
+        { title: '交易金额(元)', dataIndex: 'cleanWeight', width: 150, align: 'center', sorter: true, customRender: (text) => { return text || 0 } },
+        { title: '状态', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '详情', width: 80, align: 'center', scopedSlots: { customRender: 'detail' } }],
+      // 加载数据方法 必须为 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 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+        } else {
+          searchData.beginDate = null
+          searchData.endDate = null
+        }
+        return cleanRecordList(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
+              if (_item.cleanWeight != null || 0) {
+                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3) / 1
+              }
+            }
+            this.totalNum = res.data.count
+            return res.data
+          } else {
+            this.totalNum = 0
+          }
+        })
+      }
+    }
+  },
+  mounted () {
+    this.getTotal()
+  },
+  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
+      )
+    },
+    // 总计
+    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')
+      } else {
+        params.beginDate = null
+        params.endDate = null
+      }
+      getCleanStationTotal(params).then(res => {
+        if (res.status == 200) {
+          if (res.data != 0 || null) {
+            this.weightTotal = (res.data.cleanWeight / 1000).toFixed(3) / 1
+          }
+        } else {
+          this.weightTotal = 0
+        }
+      })
+    },
+    // 查看详情
+    handelDetail (row) {
+      this.recordId = row.id
+      this.isOpenModal = true
+    },
+    // 查询
+    refreshSearch () {
+      this.$refs.table.refresh(true)
+      this.getTotal()
+    },
+    // 重置
+    reset () {
+      this.queryParam = {
+        queryWord: '',
+        beginDate: null,
+        endDate: null
+      }
+      this.time = []
+      this.refreshSearch()
+    }
+  }
+}
+</script>
+
+<style lang='less' scoped>
+	.cleanDetail-container {
+		.cleanDetail-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+	}
+</style>

+ 185 - 0
src/views/recoveryManage/riderRecoveryTotal.vue

@@ -0,0 +1,185 @@
+<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="refresh"
+        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-input allowClear v-model.trim="queryParam.queryWord" placeholder="请输入名称或电话" @pressEnter="$refs.table.refresh(true)"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :xs="24" :sm="12" :md="6" :lg="5">
+            <a-button type="primary" @click="refreshSearch" 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> {{ totalNum }} </span>条,回收重量 <span> {{ cleanWeightTotal }} </span>kg,交易金额 <span>{{ moneyTotal }}</span>元</div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      ref="table"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered
+    >
+      <template slot="stationName" slot-scope="text,record">
+        <div>{{ stationName }}</div>
+        <div>{{ stationName }}</div>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { cleanRecordList, getCleanStationTotal } from '@/api/cleanManage.js'
+import moment from 'moment'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      formItemLayout: {
+        labelCol: {
+          span: 7
+        },
+        wrapperCol: {
+          span: 17
+        }
+      },
+      // 查询参数
+      queryParam: {
+        beginDate: null, // 开始时间
+        endDate: null, // 结束时间
+        queryWord: '' // 骑手信息
+      },
+      totalNum: 0, // 总条数
+      weightTotal: 0, // 回收物总计
+      moneyTotal: 0, // 金额总计
+      // 将默认近一周时间日期回显在时间选择框中
+      time: [],
+      dateFormat: 'YYYY-MM-DD',
+      columns: [{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '骑手信息', dataIndex: 'stationName', width: 200, align: 'center', customRender: (text) => { return text || '--' } },
+        { title: '回收重量(kg)', dataIndex: 'cleanTimes', width: 50, align: 'center', sorter: true },
+        { title: '交易金额(元)', dataIndex: 'cleanWeight', width: 100, align: 'center', sorter: true, customRender: (text) => { return text || 0 } }],
+      // 加载数据方法 必须为 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 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
+        } else {
+          searchData.beginDate = null
+          searchData.endDate = null
+        }
+        return cleanRecordList(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
+              if (_item.cleanWeight != null || 0) {
+                _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(3) / 1
+              }
+            }
+            this.totalNum = res.data.count
+            return res.data
+          } else {
+            this.totalNum = 0
+          }
+        })
+      }
+    }
+  },
+  mounted () {
+    this.getTotal()
+  },
+  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
+      )
+    },
+    // 总计
+    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')
+      } else {
+        params.beginDate = null
+        params.endDate = null
+      }
+      getCleanStationTotal(params).then(res => {
+        if (res.status == 200) {
+          if (res.data != 0 || null) {
+            this.weightTotal = (res.data.cleanWeight / 1000).toFixed(3) / 1
+          }
+        } else {
+          this.weightTotal = 0
+        }
+      })
+    },
+    // 查询
+    refreshSearch () {
+      this.$refs.table.refresh(true)
+      this.getTotal()
+    },
+    // 重置
+    reset () {
+      this.queryParam = {
+        queryWord: '',
+        beginDate: null,
+        endDate: null
+      }
+      this.time = []
+      this.refreshSearch()
+    }
+  }
+}
+</script>
+
+<style lang='less' scoped>
+	.cleanDetail-container {
+		.cleanDetail-container-searchForm {
+			.ant-form-inline .ant-form-item {
+				width: 100%;
+				margin-bottom: 15px;
+			}
+		}
+	}
+</style>

+ 265 - 0
src/views/recoveryManage/riderSet.vue

@@ -0,0 +1,265 @@
+<template>
+  <a-card :bordered="false">
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="48">
+          <a-col :md="6" :sm="24">
+            <a-form-item label="骑手名称">
+              <a-input
+                allowClear
+                v-model.trim="queryParam.name"
+                placeholder="请输入骑手名称"
+                id="userList-name"
+                :maxLength="30"
+                @pressEnter="$refs.table.refresh(true)" />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="24">
+            <a-form-item label="骑手电话">
+              <a-input
+                allowClear
+                v-model.trim="queryParam.phone"
+                placeholder="请输入骑手电话"
+                :maxLength="11"
+                id="userList-phone"
+                @pressEnter="$refs.table.refresh(true)" />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-button type="primary" @click="$refs.table.refresh(true)" id="userList-handSubmit" style="margin-right: 10px;">查询</a-button>
+            <a-button type="" @click="reset" id="userList-reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button
+        type="primary"
+        icon="plus"
+        @click="openModal"
+        id="userList-openModal"
+        v-hasPermission="'B_power_user_add'"
+        style="margin-top:18px ;">新增</a-button>
+    </div>
+
+    <s-table
+      ref="table"
+      size="default"
+      rowKey="id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <span slot="status" slot-scope="text, record">
+        <a-switch
+          v-hasPermission="'B_power_user_enable'"
+          checkedChildren="启用"
+          unCheckedChildren="禁用"
+          v-model="record.loginFlag"
+          @change="changeFlagHandle(text, record)"
+          id="userList-changeFlagHandle" />
+        <span v-if="!$hasPermissions('B_power_user_enable')">--</span>
+      </span>
+      <span slot="action" slot-scope="text, record">
+        <a-icon
+          v-hasPermission="'B_power_user_edit'"
+          type="edit"
+          title="编辑"
+          class="actionBtn icon-blues"
+          @click="handleEdit(record)"
+        />
+      </span>
+    </s-table>
+    <riderModal :visible="showModal" @refresh="$refs.table.refresh(true)" :data="itemData" @close="showModal = false"></riderModal>
+  </a-card>
+</template>
+
+<script>
+import {
+  STable,
+  VSelect
+} from '@/components'
+import riderModal from './riderModal.vue'
+import {
+  resetPSD,
+  updateEnableStatus,
+  getPowerUserList,
+  delectUserPower
+} from '@/api/power-user.js'
+export default {
+  name: 'UserList',
+  components: {
+    STable,
+    VSelect,
+    riderModal
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+        name: '',
+        phone: ''
+      },
+      showModal: false,
+      itemData: {}, // 编辑行数据
+      // 表头
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: 120,
+        align: 'center'
+      },
+      {
+        title: '骑手名称',
+        dataIndex: 'name',
+        width: 100,
+        align: 'center'
+      },
+      {
+        title: '骑手电话',
+        dataIndex: 'phone',
+        width: 100,
+        align: 'center'
+      },
+      {
+        title: '状态',
+        width: 100,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'status'
+        }
+      },
+      {
+        title: '操作',
+        width: 100,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'action'
+        }
+      }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        return getPowerUserList(Object.assign(parameter, this.queryParam)).then(res => {
+          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
+            _item.loginFlag = _item.loginFlag + '' === '1'
+          }
+          return res.data
+        })
+      },
+      optionAlertShow: false
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      // vm.$refs.table.refresh()
+    })
+  },
+  methods: {
+    // 刷新列表
+    refreshTable () {
+      this.$refs.table.refresh(true)
+    },
+    // 新建
+    openModal () {
+      this.showModal = true
+      this.itemData = {}
+    },
+    // 重置
+    reset () {
+      this.queryParam.name = ''
+      this.queryParam.phone = '',
+      this.refreshTable()
+    },
+    // 重置密码
+    resetPassword (row) {
+      resetPSD({
+        id: row.id
+      }).then(res => {
+        if (res.status == 200) {
+          this.$message.success(res.message)
+        }
+      })
+    },
+    // 删除
+    delect (row) {
+      const _this = this
+      this.$confirm({
+        title: '警告',
+        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()
+            }
+          })
+        }
+      })
+    },
+    getBizStr (storeBizList) {
+      const str = []
+      storeBizList.forEach(item => {
+        str.push(item.bizTypeName)
+      })
+      return str.join(',')
+    },
+    handleEdit (row) {
+      console.log(row, 'row')
+      this.showModal = true
+      this.itemData = row
+    },
+    // 修改状态
+    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>
+<style scoped>
+	.table-page-search-wrapper .ant-form-inline .ant-form-item {
+		margin-bottom: 0;
+	}
+
+	.action-button {
+		line-height: 40px;
+		white-space: nowrap;
+		padding: 5px 10px;
+		background-color: #1890ff;
+		border-radius: 4px;
+		color: #fff;
+		margin-right: 5px;
+	}
+
+	.red-text {
+		background-color: red;
+	}
+
+	.reset-text {
+		background-color: #31b50b;
+	}
+</style>