zhengjinyi 1 rok pred
rodič
commit
329416378c

+ 10 - 0
src/api/order.js

@@ -76,6 +76,16 @@ export function orderCheckReceipt(query) {
     params: query
   })
 }
+/**
+ * 上传线下支付凭证
+ */
+export function orderSaveVoucher(data) {
+  return request({
+    url: '/order/organize/saveVoucher',
+    method: 'post',
+    data
+  })
+}
 /**
  * 去发货
  */

+ 39 - 1
src/api/other.js → src/api/sys.js

@@ -7,7 +7,45 @@ export function getOrganizeInfo(query) {
     params: query
   })
 }
-
+// 后台用户管理
+export function getUserList(query) {
+  return request({
+    url: '/other/user/getMallUserInfo',
+    method: 'get',
+    params: query
+  })
+}
+// 修改用户上下线状态
+export function updateUser(query) {
+  return request({
+    url: '/other/user/updateUser',
+    method: 'get',
+    params: query
+  })
+}
+// 重置密码
+export function repeatPassword(query) {
+  return request({
+    url: '/other/user/repeatPassword',
+    method: 'get',
+    params: query
+  })
+}
+// 回显用户信息
+export function mallUserById(id) {
+  return request({
+    url: '/other/user/mallUserById/' + id,
+    method: 'get'
+  })
+}
+// 保存用户信息
+export function saveUser(data) {
+  return request({
+    url: '/other/user/saveUser',
+    method: 'post',
+    data
+  })
+}
 export function updateOrganizeInfo(data) {
   return request({
     url: '/user/update',

+ 2 - 2
src/router/index.js

@@ -15,7 +15,7 @@ import goodsRouter from './modules/goods'
 import campaign from './modules/campaign'
 import orderRouter from './modules/order'
 import financeRouter from './modules/finance'
-import otherRouter from './modules/other'
+import sysRouter from './modules/sys'
 
 export const constantRoutes = [
   {
@@ -76,7 +76,7 @@ export const asyncRoutes = [
   floorRouter,
   orderRouter,
   financeRouter,
-  otherRouter,
+  sysRouter,
   // 404 page must be placed at the end !!!
   { path: '*', redirect: '/404', hidden: true }
 ]

+ 10 - 3
src/router/modules/order.js

@@ -53,14 +53,21 @@ const orderRouter = {
       path: 'order-remarks',
       name: 'OrderRemarks',
       component: () => import('@/views/order/order-remarks'),
-      meta: { title: '订单备注', noCache: true, activeMenu: '/order/order-remarks' },
+      meta: { title: '订单备注', noCache: true, activeMenu: '/order/' },
       hidden: true
     },
     {
-      path: 'add-remarks ',
+      path: 'add-remarks',
       name: 'AddRemarks ',
       component: () => import('@/views/order/add-remarks '),
-      meta: { title: '订单备注', noCache: true, activeMenu: '/order/add-remarks ' },
+      meta: { title: '订单备注', noCache: true, activeMenu: '/order/' },
+      hidden: true
+    },
+    {
+      path: 'pay-remarks',
+      name: 'PayRemarks ',
+      component: () => import('@/views/order/add-pay-remarks'),
+      meta: { title: '上传线下支付凭证', noCache: true, activeMenu: '/order/ ' },
       hidden: true
     },
     {

+ 46 - 0
src/router/modules/sys.js

@@ -0,0 +1,46 @@
+/* Layout */
+import Layout from '@/layout'
+
+const otherRouter = {
+  path: '/sys',
+  component: Layout,
+  redirect: '/sys/about',
+  name: 'Sys',
+  meta: { title: '其他设置', icon: 'el-icon-setting' },
+  alwaysShow: true,
+  children: [
+    // {
+    //   path: 'about',
+    //   name: 'About',
+    //   component: () => import('@/views/other/about'),
+    //   meta: { title: '关于我们', icon: 'el-icon-info' }
+    // },
+    // {
+    //   path: 'after',
+    //   name: 'After',
+    //   component: () => import('@/views/other/after'),
+    //   meta: { title: '售后无忧', icon: 'el-icon-shopping-bag-2' }
+    // },
+    // {
+    //   path: 'user',
+    //   name: 'User',
+    //   component: () => import('@/views/sys/user-list'),
+    //   meta: { title: '后台用户管理', icon: 'el-icon-s-custom' }
+    // },
+    {
+      path: 'edit',
+      name: 'UserEdit',
+      component: () => import('@/views/sys/user-edit'),
+      meta: { title: '添加/编辑用户', icon: 'el-icon-s-custom' },
+      hidden: true
+    },
+    {
+      path: 'password',
+      name: 'Password',
+      component: () => import('@/views/sys/password'),
+      meta: { title: '修改密码', icon: 'el-icon-unlock' }
+    }
+  ]
+}
+
+export default otherRouter

+ 22 - 39
src/store/modules/permission.js

@@ -1,5 +1,6 @@
 import { asyncRoutes, constantRoutes } from '@/router'
-import { getModule } from '@/api/goods'
+import { getToken } from '@/utils/auth'
+import { getInfo } from '@/api/user'
 
 /**
  * Use meta.role to determine if the current user has permission
@@ -49,52 +50,34 @@ const mutations = {
 
 const actions = {
   generateRoutes({ commit }, userInfo) {
-    return new Promise(resolve => {
+    // eslint-disable-next-line no-async-promise-executor
+    return new Promise(async resolve => {
       let accessedRoutes
       if (userInfo.roles.includes('admin')) {
         accessedRoutes = asyncRoutes || []
       } else {
         accessedRoutes = filterAsyncRoutes(asyncRoutes, userInfo.roles)
       }
-      getModule({ organizeId: userInfo.organizeId }).then(response => {
-        const modules = response.data[0]
-        accessedRoutes.forEach(routeItem => {
-          if (routeItem.name === 'Goods') {
-            if (modules && modules.firstModulesName) {
-              accessedRoutes[0].children.unshift({
-                path: '/goods/list/preferred',
-                name: 'PreferredProduct',
-                component: () => import('@/views/goods/list-preferred'),
-                meta: { title: modules.firstModulesName, noCache: true, activeMenu: '/goods/list' },
-                hidden: true
-              })
-            }
-            if (modules && modules.secondModulesName) {
-              accessedRoutes[0].children.unshift({
-                path: '/goods/list/preferential',
-                name: 'PreferentialProduct',
-                component: () => import('@/views/goods/list-preferential'),
-                meta: { title: modules.secondModulesName, noCache: true, activeMenu: '/goods/list' },
-                hidden: true
-              })
-            }
-            if (modules && modules.thirdModulesName) {
-              accessedRoutes[0].children.unshift({
-                path: '/goods/list/commonly',
-                name: 'CommonlyProduct',
-                component: () => import('@/views/goods/list-commonly'),
-                meta: { title: modules.thirdModulesName, noCache: true, activeMenu: '/goods/list' },
-                hidden: true
-              })
-            }
-          }
-        })
+      try {
+        const res = await getInfo(getToken())
+        const data = res.data
+        if (data.personnelType === 1) {
+          accessedRoutes[7].children.unshift({
+            path: 'user',
+            name: 'User',
+            component: () => import('@/views/sys/user-list'),
+            meta: { title: '后台用户管理', icon: 'el-icon-s-custom' }
+          })
+          commit('SET_ROUTES', accessedRoutes)
+          resolve(accessedRoutes)
+        } else {
+          commit('SET_ROUTES', accessedRoutes)
+          resolve(accessedRoutes)
+        }
+      } catch (error) {
         commit('SET_ROUTES', accessedRoutes)
         resolve(accessedRoutes)
-      }).catch(() => {
-        commit('SET_ROUTES', accessedRoutes)
-        resolve(accessedRoutes)
-      })
+      }
     })
   }
 }

+ 1 - 1
src/store/modules/user.js

@@ -1,6 +1,6 @@
 // import { login, logout, getInfo } from '@/api/user'
 import { login, getInfo } from '@/api/user'
-import { getOrganizeInfo } from '@/api/other'
+import { getOrganizeInfo } from '@/api/sys'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 import router, { resetRouter } from '@/router'
 // import store from '@/store'

+ 12 - 0
src/views/centralized/details.vue

@@ -1,5 +1,8 @@
 <template>
   <div class="app-container clearfix" style=" width: 1000px;">
+    <div class="app-header-top" style="width: 100%;float: right;margin-bottom: 10px;">
+      <el-button type="primary" style="float: right;" @click="backToList">返回</el-button>
+    </div>
     <h1 class="card-h1">采购商品</h1>
     <el-card class="box-card">
       <div class="card-main">
@@ -87,6 +90,15 @@ export default {
       } catch (error) {
         console.log('errr', error)
       }
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/centralized/list'
+          })
+        })
+      })
     }
   }
 }

+ 13 - 1
src/views/club/details.vue

@@ -1,5 +1,8 @@
 <template>
-  <div class="app-container clearfix" style=" width: 700px;">
+  <div class="app-container clearfix" style=" width: 700px;margin: 0 auto;">
+    <div class="app-header-top" style="width: 100%;float: right;margin-bottom: 10px;">
+      <el-button type="primary" style="float: right;" @click="backToList">返回</el-button>
+    </div>
     <el-form ref="dataForm" :model="form" label-position="left" label-width="130px">
       <el-form-item label="机构名称:" prop="name" style="width: 500px;text-align: right;">
         <el-input v-model="form.name" :disabled="true" type="text" />
@@ -54,6 +57,15 @@ export default {
       } catch (error) {
         console.log('error', error)
       }
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/club/list'
+          })
+        })
+      })
     }
   }
 }

+ 1 - 1
src/views/finance/list.vue

@@ -247,7 +247,7 @@ export default {
     },
     // 跳转订单详情
     handleOrderDetails(row) {
-      this.$router.push({ path: '/order/detail', query: { id: row.orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: row.orderId }})
     },
     checkedInput(event) {
       const pattern = /[^0-9.]/g

+ 1 - 1
src/views/finance/payapply-list.vue

@@ -328,7 +328,7 @@ export default {
     },
     // 跳转订单详情
     handleOrderDetails(row) {
-      this.$router.push({ path: '/order/detail', query: { id: row.orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: row.orderId }})
     },
     handleToDetails(receiptId) {
       this.$router.push({ path: '/finance/details', query: { receiptId: receiptId }})

+ 1 - 1
src/views/finance/paycents-list.vue

@@ -317,7 +317,7 @@ export default {
     },
     // 跳转订单详情
     handleOrderDetails(row) {
-      this.$router.push({ path: '/order/detail', query: { id: row.orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: row.orderId }})
     },
     // 跳转付款记录
     handleToRecord(shopOrderId) {

+ 1 - 1
src/views/finance/payfinance-list.vue

@@ -332,7 +332,7 @@ export default {
     },
     // 跳转订单详情
     handleOrderDetails(row) {
-      this.$router.push({ path: '/order/detail', query: { id: row.orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: row.orderId }})
     },
     checkedInput(event) {
       const pattern = /[^0-9.]/g

+ 1 - 1
src/views/finance/payment-list.vue

@@ -352,7 +352,7 @@ export default {
     },
     // 跳转订单详情
     handleOrderDetails(row) {
-      this.$router.push({ path: '/order/detail', query: { id: row.orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: row.orderId }})
     },
     checkedInput(event) {
       const pattern = /[^0-9.]/g

+ 1 - 1
src/views/finance/paysettle-list.vue

@@ -300,7 +300,7 @@ export default {
     },
     // 跳转订单详情
     handleOrderDetails(row) {
-      this.$router.push({ path: '/order/detail', query: { id: row.orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: row.orderId }})
     },
     // 跳转申请结算
     handleApplySub() {

+ 11 - 1
src/views/floor/edit.vue

@@ -51,8 +51,9 @@
         </el-table>
       </el-form-item>
     </el-form>
-    <div class="el-dialog__footer" style="text-align: left;">
+    <div class="el-dialog__footer" style="text-align: right;">
       <el-button type="primary" @click="onSubmit('floorForm')">保存</el-button>
+      <el-button plain @click="backToList">返回</el-button>
     </div>
     <!-- 商品弹框 -->
     <good-dialog v-if="dialogVisible" ref="goodDialog" @cancel="handleGoodCancel" @confirm="handleGoodConfirm" />
@@ -243,6 +244,15 @@ export default {
     },
     loadSucess() {
       this.loadImgLoading = false
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/floor/list'
+          })
+        })
+      })
     }
   }
 }

+ 4 - 4
src/views/login/index.vue

@@ -10,7 +10,7 @@
         <el-input
           ref="account"
           v-model="loginForm.account"
-          placeholder="登录名"
+          placeholder="账号"
           name="account"
           type="text"
           tabindex="1"
@@ -53,14 +53,14 @@ export default {
   data() {
     const validateUsername = (rule, value, callback) => {
       if (!validUsername(value)) {
-        callback(new Error('请输入正确的登录名'))
+        callback(new Error('请输入登录账号'))
       } else {
         callback()
       }
     }
     const validatePassword = (rule, value, callback) => {
-      if (value.length < 6) {
-        callback(new Error('密码不能少于6位'))
+      if (!value) {
+        callback(new Error('请输入登录密码'))
       } else {
         callback()
       }

+ 272 - 0
src/views/order/add-pay-remarks.vue

@@ -0,0 +1,272 @@
+<template>
+  <div class="app-container">
+    <el-card class="box-card" style="margin: 10px auto;">
+      <div class="refund-item">
+        <el-form ref="logisticFrom" :model="params" :rules="rules" label-width="120px">
+          <el-row :gutter="24" class="box-row">
+            <el-form-item label="支付凭证图片:" prop="images">
+              <div class="form-el-upload">
+                <el-upload
+                  :class="{hide: hideImg}"
+                  :action="actionUrl"
+                  :headers="getToken"
+                  list-type="picture-card"
+                  :before-upload="beforeUploadImg"
+                  :on-remove="handleRemove"
+                  :on-success="handleSuccess"
+                  :on-preview="handlePictureCardPreview"
+                  :limit="5"
+                >
+                  <div slot="tip" class="el-upload__tip">请上传jgp,jpeg,png格式的图片,每张不超过5M</div>
+                  <i class="el-icon-plus" />
+                </el-upload>
+                <el-dialog :visible.sync="dialogVisible">
+                  <img width="100%" :src="dialogImageUrl" alt="">
+                </el-dialog>
+              </div>
+            </el-form-item>
+            <el-form-item label="备注:" prop="remarks">
+              <el-input v-model.trim="params.remarks" type="textarea" show-word-limit placeholder="请输入备注文字,200字以内" maxlength="200" :autosize="{ minRows: 5, maxRows: 6}" style="width: 600px;" />
+            </el-form-item>
+            <el-form-item>
+              <div class="filter-container" style="text-align: left;margin-top: 20px;">
+                <el-button type="primary" :disabled="disabled" @click="HandlerConfirm('logisticFrom')">保存</el-button>
+                <el-button plain @click="backToList">返回</el-button>
+              </div>
+            </el-form-item>
+          </el-row>
+        </el-form>
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { orderSaveVoucher } from '@/api/order'
+import { mapState } from 'vuex'
+export default {
+  name: 'PayRemarks',
+  filters: {
+  },
+  data() {
+    return {
+      params: {
+        images: [], // 线下支付凭证图片
+        remarks: '', // 备注
+        orderId: this.$route.query.orderId * 1
+      },
+      fileImageList: [], // 上传图片列表
+      fileUrl: process.env.VUE_APP_BASE_API + '/order/cmOrderRemark/upload/remark',
+      fileList: [], // 上传文件列表
+      rules: {
+        images: [
+          { required: true, message: '请上传支付凭证图片', type: 'array' }
+        ]
+
+      },
+      dialogImageUrl: '',
+      dialogVisible: false,
+      hideImg: false, // 上传图片隐藏
+      hideFile: false // 上传文件隐藏
+    }
+  },
+  computed: {
+    disabled() {
+      return !this.params.images.length > 0
+    },
+    getToken() {
+      return {
+        'token': this.$store.getters.token
+      }
+    },
+    actionUrl() {
+      return process.env.VUE_APP_BASE_API + '/formData/MultiPictareaddData'
+    },
+    orderId: function() {
+      return this.$route.query.orderId * 1
+    },
+    ...mapState({ adminName: state => state.user.name })
+  },
+  created() {},
+  methods: {
+    isImage(file) {
+      return file.type === 'image/png' ||
+      file.type === 'image/jpeg' ||
+       file.type === 'image/jpg' ||
+       file.type === 'image/webp'
+    },
+    HandlerConfirm(formName) {
+      this.$refs[formName].validate(async valid => {
+        if (valid) {
+          try {
+            await orderSaveVoucher(this.params)
+            this.$message.success('添加成功')
+            this.backToList()
+          } catch (error) {
+            console.log(error)
+          }
+        }
+      })
+    },
+    // 上传图片事件
+    handleSuccess(res, file, fileList) {
+      this.params.images.push(res.data)
+      this.handleChange()
+    },
+    // 删除图片事件
+    handleRemove(file, fileList) {
+      this.params.images = fileList.map(e => e.response.data)
+      this.handleChange()
+    },
+    // 预览
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url
+      this.dialogVisible = true
+    },
+    beforeUploadFile(file) {
+      const whiteList = ['pdf', 'doc', 'docx', 'xlsx']
+      const isUpload = file.size / 1024 / 1024 < 5
+      if (whiteList.indexOf(file.name.substring(file.name.lastIndexOf('.') + 1)) === -1) {
+        this.$message.error('请上传 pdf、doc、docx、xlsx格式的文件!')
+        return false
+      }
+      if (isUpload) {
+        return true
+      } else {
+        this.$message.error('文件过大,请重新上传!')
+        return false
+      }
+    },
+    // 图片数量判断
+    handleChange(file, fileList) {
+      this.hideImg = this.params.images.length >= 5
+    },
+    backToList() {
+      this.$store.dispatch('tagsView/delView', this.$route).then(() => {
+        this.$nextTick(() => {
+          this.$router.replace({
+            path: '/order/detail',
+            query: {
+              orderId: this.orderId
+            }
+          })
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-upload-list {
+  display: inline-flex !important;
+}
+::v-deep .el-upload--picture-card {
+  width: 148px !important;
+  height: 148px !important;
+}
+::v-deep .el-upload__tip {
+  position: static !important;
+}
+
+::v-deep .hide .el-upload--picture-card {
+  display: none;
+}
+.fileUpload {
+  ::v-deep .el-upload-list {
+    flex-direction: column !important;
+  }
+}
+  .app-title{
+    line-height: 36px;
+    font-size: 26px;
+    font-weight: bold;
+    color: #409EFF;
+    text-align: center;
+    margin: 0;
+  }
+  .box-card{
+    margin-top: 20px;
+    font-size: 14px;
+  }
+  .box-row{
+    padding: 10px 0;
+  }
+  .box-row .dropdown{
+    margin-top: -10px;
+  }
+  .refund-item{
+    padding: 10px 0;
+  }
+  .order-item{
+    background:#f7f7f7;
+    margin-bottom: 20px;
+    padding: 10px 15px;
+    border-radius: 5px;
+  }
+  .product-row{
+    padding: 10px 0;
+    background: #EBEEF5;
+    border-top: 1px dashed #DCDFE6;
+  }
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 148px;
+    height: 148px;
+    line-height: 148px;
+    text-align: center;
+  }
+  .avatar {
+    width: 148px;
+    height: 148px;
+    display: block;
+  }
+  .avatar img {
+    width: 148px;
+    height: 148px;
+    display: block;
+  }
+  .el-form-item__label{
+      text-align: right !important;
+  }
+  .el-upload__tip{
+    line-height: 20px;
+    color: red;
+    text-align: left;
+    position: absolute;
+    right: -50%;
+    bottom: 0;
+  }
+  .span_tip{
+    font-size: 12px;
+    color: red;
+    margin-left: 5px;
+  }
+  .filter-item-temp{
+    width: 100px;
+  }
+  .op-item{
+    padding: 5px 0;
+  }
+  .el-span-warning{
+    color: #E6A23C;
+  }
+  .el-span-success{
+    color: #67C23A;
+  }
+  .el-span-danger{
+    color: #F56C6C;
+  }
+</style>
+

+ 1 - 1
src/views/order/deliver-record.vue

@@ -82,7 +82,7 @@ export default {
     backToList() {
       this.$store.dispatch('tagsView/delView', this.$route).then(() => {
         this.$nextTick(() => {
-          this.$router.replace({ path: '/order/detail', query: { id: this.orderId }})
+          this.$router.replace({ path: '/order/detail', query: { orderId: this.orderId }})
         })
       })
     }

+ 39 - 13
src/views/order/detail.vue

@@ -46,6 +46,9 @@
                 功能<i class="el-icon-arrow-down el-icon--right" />
               </el-button>
               <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item v-if="order.checkFlag === 1">
+                  <div @click="handeleDropdown(6,order.orderId)"> 上传线下支付凭证</div>
+                </el-dropdown-item>
                 <el-dropdown-item v-if="order.checkFlag === 1">
                   <div @click="handeleDialogFormVisible"> 确认收款金额</div>
                 </el-dropdown-item>
@@ -170,24 +173,24 @@
         </div>
       </div>
       <div class="refund-item">
-        <template v-if="order.invoiceFlag === '0'">
+        <template v-if="orderInvoice">
           <el-row :gutter="24" class="box-row">
-            <el-col :span="6"><b>发票信息:</b>不需要发票</el-col>
+            <el-col :span="6"><b>发票信息:</b> {{ setInvoiceText(orderInvoice) }}</el-col>
           </el-row>
-        </template>
-        <template v-else>
           <el-row :gutter="24" class="box-row">
-            <el-col :span="6"><b>发票信息:</b> {{ orderInvoice.type | invoiceFilters }}</el-col>
+            <el-col :span="6"><b>发票抬头:</b> {{ orderInvoice.invoiceTitle ? orderInvoice.invoiceTitle : '无' }}</el-col>
+            <el-col :span="6"><b>单位税号:</b> {{ orderInvoice.corporationTaxNum ? orderInvoice.corporationTaxNum : '无' }}</el-col>
+            <el-col :span="8"><b>注册地址:</b> {{ orderInvoice.registeredAddress ? orderInvoice.registeredAddress : '无' }}</el-col>
           </el-row>
           <el-row :gutter="24" class="box-row">
-            <el-col :span="6"><b>单位名称:</b> {{ orderInvoice.invoiceTitle }}</el-col>
-            <el-col :span="6"><b>纳税人识别号:</b> {{ orderInvoice.corporationTaxNum }}</el-col>
-            <el-col :span="8"><b>注册地址:</b> {{ orderInvoice.registeredAddress }}</el-col>
+            <el-col :span="6"><b>注册电话:</b> {{ orderInvoice.registeredPhone ? orderInvoice.registeredPhone : '无' }}</el-col>
+            <el-col :span="6"><b>开户银行:</b> {{ orderInvoice.openBank ? orderInvoice.openBank : '无' }}</el-col>
+            <el-col :span="8"><b>银行账号:</b> {{ orderInvoice.bankAccountNo ? orderInvoice.bankAccountNo : '无' }}</el-col>
           </el-row>
+        </template>
+        <template v-else>
           <el-row :gutter="24" class="box-row">
-            <el-col :span="6"><b>注册电话:</b> {{ orderInvoice.registeredPhone }}</el-col>
-            <el-col :span="6"><b>开户银行:</b> {{ orderInvoice.openBank }}</el-col>
-            <el-col :span="8"><b>银行账号:</b> {{ orderInvoice.bankAccountNo }}</el-col>
+            <el-col :span="24"><b>发票信息:</b> 不开发票</el-col>
           </el-row>
         </template>
       </div>
@@ -265,7 +268,7 @@ export default {
       dialogRemarksorderId: 0,
       dialogFormVisible: false,
       chengeOrder: {
-        orderId: this.$route.query.id * 1,
+        orderId: this.$route.query.orderId * 1,
         amount: null
       },
       orderInvoice: {},
@@ -278,7 +281,7 @@ export default {
   },
   computed: {
     orderId: function() {
-      return this.$route.query.id * 1
+      return this.$route.query.orderId * 1
     },
     disabled() {
       return !(this.chengeOrder.amount > 0)
@@ -302,6 +305,26 @@ export default {
         this.listLoading = true
       })
     },
+    // 设置发票文案
+    setInvoiceText(data) {
+      const map = {
+        0: '个人',
+        1: '单位'
+      }
+      let invoiceText = ''
+      switch (data.type * 1) {
+        case 0:
+          invoiceText = `不开发票`
+          break
+        case 1:
+          invoiceText = `普票-${map[data.invoiceTitleType * 1]}`
+          break
+        case 2:
+          invoiceText = `专票`
+          break
+      }
+      return invoiceText
+    },
     RemarksOrder: function(id) {
       getRemarks(id).then(response => {
         this.dialogRemarkList = response.data
@@ -329,6 +352,9 @@ export default {
         case 5:// 订单备注
           this.$router.push({ path: '/order/order-remarks', query: { orderId: orderId }})
           break
+        case 6:// 上传线下支付凭证
+          this.$router.push({ path: '/order/pay-remarks', query: { orderId: orderId }})
+          break
       }
     },
     async handleChangOrder() {

+ 1 - 1
src/views/order/list.vue

@@ -286,7 +286,7 @@ export default {
     },
     // 查看订单详情
     handleDetailes(orderId) {
-      this.$router.push({ path: '/order/detail', query: { id: orderId }})
+      this.$router.push({ path: '/order/detail', query: { orderId: orderId }})
     },
     checkedInput(event) {
       const pattern = /[^0-9.]/g

+ 1 - 1
src/views/order/order-remarks.vue

@@ -89,7 +89,7 @@ export default {
       }
     },
     handlePayNote() {
-      this.$router.push({ path: '/order/add-remarks ', query: { orderId: this.orderId }})
+      this.$router.push({ path: '/order/add-remarks', query: { orderId: this.orderId }})
     },
     backToList() {
       this.$store.dispatch('tagsView/delView', this.$route).then(() => {

+ 1 - 1
src/views/other/password.vue → src/views/sys/password.vue

@@ -18,7 +18,7 @@
 </template>
 
 <script>
-import { changePassword } from '@/api/other'
+import { changePassword } from '@/api/sys'
 export default {
   data() {
     return {

+ 139 - 0
src/views/sys/user-edit.vue

@@ -0,0 +1,139 @@
+<template>
+  <div class="app-container" style=" width: 500px;padding-top:100px;">
+    <el-form ref="dataForm" :rules="rules" :model="from" label-position="right" label-width="130px">
+      <el-form-item label="姓名:" prop="accountName" :rules="rules.accountName">
+        <el-input v-model="from.accountName" placeholder="请输入用户姓名" maxlength="6" style="width: 250px;" />
+      </el-form-item>
+      <el-form-item label="手机号:" prop="account" :rules="rules.name">
+        <el-input v-model="from.account" placeholder="请输入用户手机号" maxlength="11" style="width: 250px;" />
+      </el-form-item>
+      <el-form-item label="状态:" prop="status">
+        <el-select v-model="from.status" placeholder="请选择" style="width: 250px;">
+          <el-option label="上线" :value="1" />
+          <el-option label="下线" :value="2" />
+        </el-select>
+      </el-form-item>
+      <template v-if="editType !== 'edit'">
+        <el-form-item label="密码:" prop="password">
+          <el-input v-model="from.password" placeholder="请输入8-16位数字和字母的组合" maxlength="16" style="width: 250px;" />
+        </el-form-item>
+        <el-form-item label="确认密码:" prop="oldPassword">
+          <el-input v-model="from.oldPassword" placeholder="请输入8-16位数字和字母的组合" maxlength="16" style="width: 250px;" />
+        </el-form-item>
+      </template>
+    </el-form>
+    <div slot="footer" class="dialog-footer" style="width:1px;margin:0 auto;padding:40px 0 80px 0;">
+      <el-button v-loading.fullscreen.lock="fullscreenLoading" type="primary" style="width: 100px;" @click="onSubmite()">保存</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mallUserById, saveUser } from '@/api/sys'
+
+export default {
+
+  data() {
+    const picValidator = (rule, value, callback) => {
+      if (!this.from.oldPassword) {
+        callback(new Error('请再次确认密码'))
+      } else if (this.from.oldPassword !== this.from.password) {
+        callback(new Error('两次密码不一致'))
+      } else {
+        callback()
+      }
+    }
+    const defaultForm = () => {
+      return {
+        accountName: '',
+        account: '',
+        status: 1,
+        organizeId: this.$store.getters.organizeId,
+        password: '',
+        oldPassword: ''
+      }
+    }
+    return {
+      fullscreenLoading: false,
+      from: defaultForm(),
+      rules: {
+        accountName: [{ required: true, message: '请输入用户姓名', trigger: 'blur' }],
+        account: [
+          { required: true, message: '请输入手机号', trigger: 'blur' },
+          { type: 'number',
+            message: '手机号格式不正确',
+            trigger: 'blur',
+            transform(value) {
+              const phonereg = 11 && /^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/
+              if (!phonereg.test(value)) {
+                return false
+              } else {
+                return Number(value)
+              }
+            }
+          }
+        ],
+        password: [
+          { required: true, message: '请输入新的密码', trigger: 'blur' },
+          { min: 8, max: 16, message: '密码长度在8到16个字符', trigger: 'blur' },
+          {
+            required: true,
+            pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/,
+            message: '密码组合应为8-16位数字和字母组合',
+            trigger: 'blur'
+          }
+        ],
+        oldPassword: [{ required: true, validator: picValidator, trigger: 'blur' }]
+      },
+      editType: ''
+    }
+  },
+  computed: {
+    organizeId() {
+      return this.$store.getters.organizeId
+    }
+  },
+  created() {
+    this.editType = this.$route.query.type
+    if (this.editType === 'edit') {
+      console.log('editType0', this.editType)
+      this.mallUserById(this.$route.query.id)
+    }
+  },
+  methods: {
+    async mallUserById(id) {
+      try {
+        const res = await mallUserById(id)
+        this.from = { ...this.from, ...res.data }
+      } catch (error) {
+        console.log(error)
+      }
+    },
+    onSubmite() {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.fullscreenLoading = true
+          this.saveUser()
+        }
+      })
+    },
+    async saveUser() {
+      try {
+        const res = await saveUser(this.from)
+        this.$message.success(res.msg)
+        this.fullscreenLoading = false
+        setTimeout(() => {
+          this.$router.push({ path: '/sys/user' })
+        }, 1000)
+      } catch (error) {
+        console.log(error)
+        this.fullscreenLoading = false
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+
+</style>

+ 263 - 0
src/views/sys/user-list.vue

@@ -0,0 +1,263 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container">
+      <div class="filter-control">
+        <span style="width: auto;">姓名:</span>
+        <el-input v-model="listQuery.accountName" placeholder="请输入机构名称" clearable @keyup.enter.native="getList" @clear="getList" />
+      </div>
+      <div class="filter-control">
+        <span style="width: auto;">手机号:</span>
+        <el-input v-model="listQuery.account" placeholder="请输入手机号" clearable @keyup.enter.native="getList" @clear="getList" />
+      </div>
+      <div class="filter-control">
+        <span style="width: auto;">状态:</span>
+        <el-select v-model="listQuery.status" style="width:120px;" clearable @change="getList">
+          <el-option value="" label="全部" />
+          <el-option label="已上线" :value="1" />
+          <el-option label="已下线" :value="2" />
+        </el-select>
+      </div>
+      <div class="filter-control">
+        <span>添加时间:</span>
+        <el-date-picker
+          v-model="registTime"
+          type="daterange"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+          @change="getList"
+        />
+      </div>
+      <div class="filter-control">
+        <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
+        <el-button type="primary" icon="el-icon-plus" @click="handleAdd(1)">添加用户</el-button>
+      </div>
+    </div>
+    <el-table
+      v-loading="listLoading"
+      :data="list"
+      element-loading-text="Loading"
+      border
+      fit
+      highlight-current-row
+      :header-cell-style="{background:'#eef1f6',color:'#606266'}"
+    >
+      <el-table-column label="姓名" align="center" prop="accountName" />
+      <el-table-column label="手机号" align="center" prop="account" />
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="{row}">
+          <el-tag v-if="row.status===2" type="danger" size="small">已下线</el-tag>
+          <el-tag v-else type="success" size="small">已上线</el-tag>
+          <el-button v-if="row.status === 2" type="primary" size="mini" @click="handOnline(row)">上线</el-button>
+          <el-button v-else type="primary" size="mini" @click="handOffline(row)">下线</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" label="添加时间" prop="newAddTime">
+        <template slot-scope="{row}">
+          <span>{{ row.newAddTime }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center">
+        <template slot-scope="{row}">
+          <el-button type="primary" size="mini" @click="handleAdd(2,row)">编辑</el-button>
+          <el-button type="warning" size="mini" @click="hanleVerify(row)">重置密码</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination v-show="total>20" :total="total" :page.sync="listQuery.pageNum" :limit.sync="listQuery.pageSize" @pagination="getList" />
+    <el-dialog title="重置密码" :visible.sync="dialogFormVisible" width="500px">
+      <el-form ref="dataForm" :rules="rules" :model="repeatFrom" label-position="right" label-width="120px">
+        <el-form-item label="新密码:" prop="password">
+          <el-input v-model="repeatFrom.password" placeholder="请输入8-16位数字和字母的组合" maxlength="50" style="width: 250px;" />
+        </el-form-item>
+        <el-form-item label="确认密码:" prop="oldPassword">
+          <el-input v-model="repeatFrom.oldPassword" placeholder="请输入8-16位数字和字母的组合" maxlength="50" style="width: 250px;" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取消</el-button>
+        <el-button type="primary" @click="handleRepeatPassword">确定</el-button>
+      </div>
+    </el-dialog>
+    <template>
+      <el-backtop style="right: 40px; bottom: 40px;">
+        <i class="el-icon-upload2" />
+      </el-backtop>
+    </template>
+  </div>
+</template>
+
+<script>
+import { getUserList, updateUser, repeatPassword } from '@/api/sys'
+import pickerOptions from '@/utils/time-picker.js'
+export default {
+  data() {
+    const picValidator = (rule, value, callback) => {
+      if (!this.repeatFrom.oldPassword) {
+        callback(new Error('请再次确认密码'))
+      } else if (this.repeatFrom.oldPassword !== this.repeatFrom.password) {
+        callback(new Error('两次密码不一致'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      registTime: '',
+      pickerOptions,
+      list: [],
+      listLoading: true,
+      total: 0,
+      listQuery: {
+        pageNum: 1,
+        pageSize: 20,
+        organizeId: this.$store.getters.organizeId,
+        account: '',
+        status: '',
+        accountName: '',
+        startTime: '',
+        endTime: ''
+      },
+      startTime: '',
+      endTime: '',
+      repeatFrom: {
+        password: '',
+        oldPassword: '',
+        id: ''
+      },
+      updateTemp: {},
+      updateTatusType: '',
+      dialogVisible: false,
+      dialogVisibleText: '',
+      dialogFormVisible: false,
+      dialogStatus: '',
+      loadingbut: false,
+      rules: {
+        password: [
+          { required: true, message: '请输入新密码', trigger: 'blur' },
+          { min: 8, max: 16, message: '密码长度在8到16个字符', trigger: 'blur' },
+          {
+            required: true,
+            pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/,
+            message: '密码组合应为8-16位数字和字母组合',
+            trigger: 'blur'
+          }
+        ],
+        oldPassword: [{ required: true, validator: picValidator, trigger: 'blur' }]
+      }
+    }
+  },
+  computed: {
+    disabled() {
+      return !this.addPeople.status
+    },
+    organizeId() {
+      return this.$store.getters.organizeId
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    // 初始化获取时间筛选值
+    initTime() {
+      if (this.registTime && this.registTime.length > 0) {
+        this.listQuery.startTime = this.registTime[0]
+        this.listQuery.endTime = this.registTime[1]
+      } else {
+        this.listQuery.startTime = ''
+        this.listQuery.endTime = ''
+      }
+    },
+    // 获取列表
+    async getList() {
+      this.listLoading = true
+      try {
+        this.initTime()
+        const res = await getUserList(this.listQuery)
+        this.list = res.data.results
+        this.total = res.data.totalRecord
+        this.listLoading = false
+      } catch (error) {
+        console.log('error', error)
+        this.listLoading = false
+      }
+    },
+    // 重置密码
+    hanleVerify(row) {
+      this.repeatFrom.id = row.id
+      this.dialogFormVisible = true
+    },
+    // 确认重置密码
+    handleRepeatPassword() {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.repeatPassword(this.repeatFrom)
+        } else {
+          return false
+        }
+      })
+    },
+    // 接口
+    async repeatPassword(params) {
+      try {
+        const res = await repeatPassword(params)
+        this.$message.success(res.msg)
+        this.getList()
+        this.dialogFormVisible = false
+      } catch (error) {
+        console.log('error', error)
+      }
+    },
+    // 上线用户
+    handOnline(row) {
+      this.$confirm('确定上线该用户吗?', '系统提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const params = { status: 1, id: row.id }
+        this.updateUser(params)
+      }).catch(() => {
+      })
+    },
+    // 下线用户
+    handOffline(row) {
+      this.$confirm('确定下线该用户吗?', '系统提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        const params = { status: 2, id: row.id }
+        this.updateUser(params)
+      }).catch(() => {
+      })
+    },
+    // 上下线接口
+    async updateUser(params) {
+      try {
+        const res = await updateUser(params)
+        this.$message.success(res.msg)
+        this.getList()
+      } catch (error) {
+        this.$message.error(error.msg)
+      }
+    },
+    // 跳转添加编辑页
+    handleAdd(type, row) {
+      if (type === 1) {
+        this.$router.push({ path: '/sys/edit' })
+      } else {
+        this.$router.push({ path: '/sys/edit', query: { type: 'edit', id: row.id }})
+      }
+    }
+  }
+}
+
+</script>
+<style scoped>
+  .el-dialog{
+    width: 600px;
+  }
+</style>