Răsfoiți Sursa

事业部订单删除流程

lxf 1 an în urmă
părinte
comite
54a2a83b7f

+ 36 - 0
src/api/shengde/subsidiary/AddOrModifiedOrder/index.js

@@ -186,3 +186,39 @@ export function contractHistoryList(data) {
     data: data,
   })
 }
+
+//订单删除-开始流程
+export function deleteStart(data) {
+  return request({
+    url: '/saas-subsidiary/saas/subsidiary/contract/deleteStart',
+    method: 'post',
+    data: data,
+  })
+}
+
+//订单删除-审批流程
+export function deleteExamine(data) {
+  return request({
+    url: '/saas-subsidiary/saas/subsidiary/contract/deleteExamine',
+    method: 'post',
+    data: data,
+  })
+}
+
+//订单删除-驳回流程
+export function deleteReject(data) {
+  return request({
+    url: '/saas-subsidiary/saas/subsidiary/contract/deleteReject',
+    method: 'post',
+    data: data,
+  })
+}
+
+//订单删除-删除流程
+export function deleteDelete(data) {
+  return request({
+    url: '/saas-subsidiary/saas/subsidiary/contract/delete',
+    method: 'post',
+    data: data,
+  })
+}

+ 1 - 0
src/page/index/index.vue

@@ -134,6 +134,7 @@ export default {
         'dailyBoard',
         'alreadyRemoved',
         'artworkUpload',
+        'CheckOrderDelete',
       ],
     }
   },

+ 16 - 0
src/router/page/index.js

@@ -1379,4 +1379,20 @@ export default [
       },
     ],
   },
+  {
+    path: '/shengde/backlog/CheckOrderDelete',
+    component: Layout,
+    redirect: '/shengde/backlog/CheckOrderDelete',
+    children: [
+      {
+        path: '/shengde/backlog/CheckOrderDelete',
+        name: '订单删除审批',
+        component: () => import(/* webpackChunkName: "page" */ '@/views/shengde/backlog/CheckOrderDelete'),
+        props: true,
+        meta: {
+          title: '订单删除审批',
+        },
+      },
+    ],
+  },
 ]

+ 124 - 0
src/views/shengde/backlog/CheckOrderDelete.vue

@@ -0,0 +1,124 @@
+<template>
+  <div
+    v-loading="loadingStatus"
+    element-loading-text="提交数据中,请稍后"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.2)"
+  >
+    <el-row>
+      <el-col :span="19" style="padding-right: 5px">
+        <el-card class="card-top">
+          <Details :rowData="this.transferParams" ref="Details"></Details>
+        </el-card>
+        <div style="height: 10px"></div>
+        <el-card class="card-bottom">
+          <LabelTemplate title="操作"></LabelTemplate>
+          <div style="padding: 4px 0 0 1vw">
+            <el-form ref="remarkForm" :model="backlogForm" :rules="backlogFormRules">
+              <el-form-item prop="flowRemark">
+                <el-input placeholder="请输入办理说明" size="small" v-model="backlogForm.flowRemark" />
+              </el-form-item>
+              <div style="width: 100%; text-align: center">
+                <el-button type="primary" @click="clickSubmit(1)" size="mini" v-db-click>同意删除</el-button>
+                <el-button @click="clickSubmit(2)" size="mini" v-db-click>拒绝删除</el-button>
+                <el-button size="mini" @click="clickCancel">取 消</el-button>
+              </div>
+            </el-form>
+          </div>
+        </el-card>
+      </el-col>
+      <el-col :span="5" style="padding-left: 5px">
+        <el-card class="card-right">
+          <LabelTemplate title="流程日志"></LabelTemplate>
+          <NewHistory :processInstanceId="$route.query.processInstanceId"></NewHistory>
+        </el-card>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import LabelTemplate from '@/components/LabelTemplate'
+import * as API from '@/api/shengde/subsidiary/AddOrModifiedOrder/index.js'
+import Details from '@/views/shengde/subsidiary/order/management/deleteDetails'
+import NewHistory from '@/views/activiti/include/NewHistory'
+
+export default {
+  name: 'CheckOrderDelete',
+  components: { LabelTemplate, Details, NewHistory },
+  data() {
+    return {
+      loadingStatus: false,
+      backlogForm: {
+        flowRemark: '',
+      },
+      backlogFormRules: {
+        flowRemark: [{ required: true, message: '请输入办理说明', trigger: 'blur' }],
+      },
+      transferParams: {},
+    }
+  },
+  created() {
+    //接收页面参数
+    this.transferParams = this.$route.query
+  },
+  mounted() {},
+  methods: {
+    clickSubmit(status) {
+      this.$refs.remarkForm.validate((valid) => {
+        if (valid) {
+          const data = {
+            id: this.$refs.Details.form.id,
+            processInstanceId: this.transferParams.processInstanceId,
+            remark: this.backlogForm.flowRemark,
+            status: status,
+          }
+          this.loadingStatus = true
+          API.deleteExamine(data).then(
+            () => {
+              this.msgSuccess('审批完成')
+              this.clickCancel()
+            },
+            (err) => {
+              console.log('deleteExamine: ' + err)
+              this.loadingStatus = false
+            }
+          )
+        }
+      })
+    },
+    clickCancel() {
+      this.$store.dispatch('delView', this.$route)
+      this.$router.replace({
+        path: '/activiti/task/index',
+      })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.card-top {
+  height: calc(100vh - 110px - 10px - 125px);
+  overflow-y: auto;
+}
+::v-deep {
+  .card-bottom {
+    height: 125px;
+    overflow-y: auto;
+
+    .el-card__body {
+      padding: 0 20px !important;
+    }
+  }
+
+  .card-right {
+    height: calc(100vh - 112px);
+    overflow-y: auto;
+
+    .el-card__body {
+      padding: 0 10px !important;
+    }
+  }
+}
+</style>

+ 315 - 0
src/views/shengde/subsidiary/order/management/deleteDetails.vue

@@ -0,0 +1,315 @@
+<template>
+  <div class="box-cardTwo">
+    <el-form
+      ref="ruleForm"
+      :model="form"
+      label-width="90px"
+      v-loading="loadingStatus"
+      :element-loading-text="loadingText"
+      element-loading-background="rgba(0, 0, 0, 0.2)"
+    >
+      <LabelTemplate title="删除原因" />
+      <div style="padding: 20px 0">
+        <el-form-item>
+          <div v-html="getStyle(form.deleteRemarks)"></div>
+        </el-form-item>
+      </div>
+      <LabelTemplate title="产品" />
+      <div style="padding: 20px 0">
+        <div>
+          <el-collapse v-model="activeNames">
+            <div v-for="(item, index) in form.contractProductList" :key="item.id" style="margin-bottom: 20px">
+              <div style="border: 1px solid #edf0f5">
+                <table cellspacing="0" cellpadding="0" border="0" class="productTable">
+                  <thead>
+                    <tr>
+                      <th style="width: 230px">
+                        <div>产品</div>
+                      </th>
+                      <th style="width: 150px">
+                        <div>图稿(设计图)</div>
+                      </th>
+                      <th style="width: 330px" v-if="form.draftType !== '2'">
+                        <div>图稿(生产文件)</div>
+                      </th>
+                      <th>
+                        <div>包材配件/单品</div>
+                      </th>
+                      <th style="width: 80px; text-align: center" v-if="item.waybillNo">
+                        <span>操作</span>
+                      </th>
+                    </tr>
+                  </thead>
+                  <tr>
+                    <td>
+                      <div style="display: flex; padding: 8px 20px 0px">
+                        <div v-if="item.pic" style="min-width: 80px">
+                          <img v-if="!item.pic.includes('https')" class="productImg" :src="pathPrefix + item.pic" @click="openImg(pathPrefix + item.pic)" />
+                          <img v-else :src="item.pic" class="productImg" @click="openImg(item.pic)" />
+                        </div>
+                        <div>
+                          <div style="line-height: 28px">
+                            <span>商品名称: {{ item.olnSkuName }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>品号: {{ item.specCode }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>品名: {{ item.colorName }}</span>
+                          </div>
+                          <div style="line-height: 40px">
+                            <span>数量:{{ Number(item.quantity) }} </span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>定制加工费: {{ item.processPrice }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>代发费: {{ item.deliverGoodsPrice }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>快递包材费: {{ item.expressPrice }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>包装人工费: {{ item.expensePrice }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>单价: ¥{{ moneyFormat(item.productPrice, 2) }}</span>
+                          </div>
+                          <div style="line-height: 28px">
+                            <span>小计: ¥ {{ statisticalAmount(item) }}</span>
+                          </div>
+                          <div style="line-height: 40px">
+                            <span>打印: <span v-if="item.identification === 1">单面</span> <span v-if="item.identification === 2">双面</span> </span>
+                          </div>
+                        </div>
+                      </div>
+                    </td>
+                    <td>
+                      <div style="padding: 8px 20px 0px">
+                        <div v-if="item.imgPath">
+                          <img
+                            v-if="!item.imgPath.includes('https')"
+                            class="productImg"
+                            :src="pathPrefix + item.imgPath"
+                            style="width: 80px; height: 80px"
+                            @click="openImg(pathPrefix + item.imgPath)"
+                          />
+                          <img v-else :src="item.imgPath" class="productImg" style="width: 80px; height: 80px" @click="openImg(item.imgPath)" />
+                        </div>
+                      </div>
+                    </td>
+                    <td v-if="form.draftType !== '2'">
+                      <div style="padding: 8px 20px 0px">
+                        <div>共享文件夹路径(点击下方链接并上传文件):</div>
+                        <a style="color: #027db4; cursor: pointer; word-break: break-all" @click="clickPath(item.artworkDocument)">
+                          {{ item.artworkDocument.replace(/\\/g, '/') }}
+                        </a>
+                      </div>
+                    </td>
+                    <td>
+                      <div style="padding: 8px 20px 0px">
+                        <el-table
+                          :data="item.partsContractProductList"
+                          size="small"
+                          :row-style="{ height: '35px' }"
+                          :cell-style="{ padding: '0' }"
+                          border
+                          ref="table"
+                        >
+                          <el-table-column label="单价¥" prop="price" align="left" width="120">
+                            <template slot-scope="scope">
+                              <span>{{ moneyFormat(scope.row.price, 2) }}</span>
+                            </template>
+                          </el-table-column>
+                          <el-table-column label="数量" prop="singleQuantity" align="left" width="90"> </el-table-column>
+                          <el-table-column label="名称" prop="name" align="left" min-width="150" />
+                          <el-table-column label="总量" prop="quantity" align="center" width="70">
+                            <template slot-scope="scope">
+                              {{ scope.row.quantity }}
+                            </template>
+                          </el-table-column>
+                          <el-table-column label="小计¥" align="center" width="100">
+                            <template slot-scope="scope">
+                              {{ moneyFormat(scope.row.amount, 2) }}
+                            </template>
+                          </el-table-column>
+                        </el-table>
+                      </div>
+                    </td>
+                  </tr>
+                </table>
+                <el-collapse-item title="包装" :name="index">
+                  <div style="display: flex; padding: 8px 10px 0px">
+                    <div style="width: 100%; padding: 0px 10px">
+                      <div>
+                        包装要求:
+                        <div style="border: 1px solid #d3d3d3; max-height: 500px; overflow: auto; padding: 10px" v-if="item.packageRemarks">
+                          <div v-html="item.packageRemarks"></div>
+                        </div>
+                        <span v-else>无</span>
+                      </div>
+                    </div>
+                  </div>
+                </el-collapse-item>
+              </div>
+            </div>
+          </el-collapse>
+        </div>
+      </div>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import LabelTemplate from '@/components/LabelTemplate'
+import { orderDetails } from '@/api/shengde/subsidiary/AddOrModifiedOrder/index.js'
+
+export default {
+  components: { LabelTemplate },
+  props: {
+    rowData: Object,
+  },
+  data() {
+    return {
+      pathPrefix: process.env.VUE_APP_IMG_URL,
+      filePrefix: process.env.VUE_APP_FILE_PREFIX,
+      loadingStatus: false,
+      loadingText: '',
+      form: {
+        deleteRemarks: '',
+        contractProductList: [],
+      },
+      activeNames: '',
+    }
+  },
+  created() {},
+  mounted() {
+    if (this.rowData && this.rowData.processInstanceId) {
+      this.getDetails({ processInstanceId: this.rowData.processInstanceId })
+    }
+  },
+  methods: {
+    getDetails(data) {
+      this.loadingText = '获取数据中,请稍后'
+      this.loadingStatus = true
+      orderDetails(data).then(
+        (res) => {
+          for (let i = 0; i < res.data.data.contractProductList.length; i++) {
+            res.data.data.contractProductList[i].artworkDocument = (this.filePrefix + res.data.data.contractProductList[i].artworkDocument).replace(/\//g, '\\')
+          }
+          this.form = res.data.data
+          console.log(this.form)
+          this.loadingStatus = false
+        },
+        (err) => {
+          console.log('orderDetails: ' + err)
+          this.loadingStatus = false
+        }
+      )
+    },
+    getStyle(text) {
+      if (text) {
+        return text.replace(/\n|\r\n/g, '<br>')
+      } else {
+        return ''
+      }
+    },
+    openImg(path) {
+      window.open(path)
+    },
+    getPath(val) {
+      if (val) {
+        let path = val.replace(/\\/g, '/')
+        return 'printer://' + path + '/'
+      }
+      return ''
+    },
+    statisticalAmount(item) {
+      if (item.quantity && item.quantity > 0) {
+        let money = item.productPrice || 0
+        if (item.processPrice) {
+          money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
+        }
+        if (item.deliverGoodsPrice) {
+          money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
+        }
+        if (item.expressPrice) {
+          money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
+        }
+        if (item.expensePrice) {
+          money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
+        }
+        money = parseFloat(Number(money) * Number(item.quantity)).toFixed(2)
+        return this.moneyFormat(money, 2)
+      }
+      return ''
+    },
+    clickPath(item) {
+      let path = JSON.parse(JSON.stringify(item)).replace(/\\/g, '/')
+      addFolder(path).then(
+        () => {
+          let a = document.createElement('a')
+          a.href = 'printer://' + path.replace(/\//g, '/') + '/'
+          a.style.display = 'none'
+          document.body.appendChild(a)
+          a.click()
+          document.body.removeChild(a)
+        },
+        (err) => {
+          console.log('addFolder:' + err)
+        }
+      )
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.box-cardTwo {
+  height: calc(100vh - 110px - 10px - 125px - 40px);
+  overflow-y: auto;
+}
+
+::v-deep {
+  .tableHeader th {
+    background-color: #edf0f5;
+    height: 35px;
+    padding: 0;
+  }
+  .el-collapse-item__header {
+    justify-content: center;
+  }
+  .el-collapse-item__arrow {
+    margin: 0;
+  }
+}
+.productTable {
+  width: 100%;
+  table-layout: fixed;
+
+  th {
+    background-color: #edf0f5;
+    height: 35px;
+    line-height: 35px;
+    padding: 0;
+    div {
+      text-align: left;
+      padding: 0 20px;
+    }
+  }
+  td {
+    vertical-align: top;
+  }
+}
+.productImg {
+  width: 60px;
+  height: 60px;
+  cursor: pointer;
+  object-fit: contain;
+  vertical-align: middle;
+  border: none;
+}
+p {
+  margin: 0px;
+}
+</style>

+ 41 - 15
src/views/shengde/subsidiary/order/management/index.vue

@@ -171,16 +171,14 @@
           <el-button type="text" @click="handleChangeOrder(scope.row.id)" v-if="scope.row.status === 0" v-db-click>编辑</el-button>
           <el-button type="text" v-if="scope.row.status == '30'" @click="handleAfterSales(scope.row)" v-db-click>售后</el-button>
           <el-button type="text" style="color: rgb(217, 0, 27)" @click="handleRemove(scope.row.id)" v-if="scope.row.status == 10" v-db-click>删除</el-button>
+          <!-- 生产中状态 删除订单走流程 -->
+          <el-button type="text" style="color: rgb(217, 0, 27)" @click="handleDelete(scope.row)" v-if="scope.row.status == 20" v-db-click>删除</el-button>
         </template>
       </el-table-column>
     </el-table>
 
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
-    <el-dialog :visible.sync="openUpload" top="50PX" width="90%" append-to-body :close-on-click-modal="false">
-      <ArtworkUpload :form="rowData" @clickCancel="clickCancelUpload" ref="artworkUpload"></ArtworkUpload>
-    </el-dialog>
-
     <!-- 批量提交  -->
     <el-dialog title="批量提交" v-if="openSubmission" :visible.sync="openSubmission" width="50%" append-to-body>
       <div
@@ -257,18 +255,28 @@
         <el-button type="primary" @click="openHistory = false">确 定</el-button>
       </div>
     </el-dialog>
+
+    <!-- 订单删除申请  -->
+    <el-dialog title="订单删除申请" v-if="openDelete" :visible.sync="openDelete" width="50%" append-to-body>
+      <el-form ref="ruleForm" :model="deleteForm" :rules="deleteFormRules" label-width="120px">
+        <el-form-item label="订单删除原因:">
+          <el-input type="textarea" :rows="4" placeholder="请输入原因" size="small" v-model="deleteForm.deleteRemarks" />
+        </el-form-item>
+      </el-form>
+      <div style="width: 100%; text-align: center; padding-top: 16px">
+        <el-button type="primary" @click="deleteSubmit">确 定</el-button>
+        <el-button @click="openDelete = false">取 消</el-button>
+      </div>
+    </el-dialog>
   </el-card>
 </template>
 
 <script>
 import * as API from '@/api/shengde/subsidiary/AddOrModifiedOrder/index.js'
 import { mapGetters } from 'vuex'
-import ArtworkUpload from '@/views/shengde/subsidiary/order/management/artworkUpload'
-// import Utils from '@/util/transit'
 
 export default {
   name: 'OrderManagement',
-  components: { ArtworkUpload },
   data() {
     return {
       filePrefix: process.env.VUE_APP_FILE_PREFIX,
@@ -306,8 +314,6 @@ export default {
       tableList: [],
       total: 0,
       dialogVisible: false,
-      rowData: {},
-      openUpload: false,
       loadingSubmission: false,
       openSubmission: false,
       submissionData: {
@@ -324,15 +330,20 @@ export default {
       },
       openHistory: false,
       loadingHistory: false,
+      openDelete: false,
+      deleteForm: {
+        id: '',
+        deleteRemarks: '',
+      },
+      deleteFormRules: {
+        deleteRemarks: [{ required: true, message: '请输入订单删除原因', trigger: 'blur' }],
+      },
     }
   },
   created() {},
   mounted() {
     this.getSelectData()
     this.handleNearTime(2)
-    // Utils.$on('refreshArtworkUpload', () => {
-    //   this.getList()
-    // })
   },
   activated() {
     this.handleQuery()
@@ -447,9 +458,6 @@ export default {
         },
       })
     },
-    clickCancelUpload() {
-      this.openUpload = false
-    },
     handleNearTime(status) {
       this.selectBtn = status
       if (status === 1) {
@@ -524,6 +532,24 @@ export default {
         this.loadingHistory = false
       })
     },
+    handleDelete(row) {
+      this.deleteForm = {
+        id: row.id,
+        deleteRemarks: '',
+      }
+      this.openDelete = true
+    },
+    deleteSubmit() {
+      this.$refs.ruleForm.validate((valid) => {
+        if (valid) {
+          API.deleteStart(this.deleteForm).then(() => {
+            this.msgSuccess('提交成功!')
+            this.openDelete = false
+            this.getList()
+          })
+        }
+      })
+    },
   },
 }
 </script>

+ 0 - 596
src/views/tenant/bussiness/management/index.vue

@@ -1,596 +0,0 @@
-<!--邮箱管理-->
-<template>
-  <el-card class="box-card">
-    <el-form :model="queryParams" ref="queryForm" :inline="true">
-      <el-form-item label="邮箱" prop="mailboxName">
-        <el-input type="daterange" v-model="queryParams.mailboxName" placeholder="请输入邮箱" clearable size="small" />
-      </el-form-item>
-      <el-form-item label="业务员" prop="userName">
-        <el-input type="daterange" v-model="queryParams.userName" placeholder="请输入业务员" clearable size="small" />
-      </el-form-item>
-      <el-form-item>
-        <el-button size="mini" @click="handleQuery" class="searchBtn">搜索</el-button>
-        <el-button size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row style="margin-bottom: 10px">
-      <el-col style="display: inline-flex">
-        <el-button icon="el-icon-plus" size="mini" type="primray" style="background: #169bd5; color: white; padding: 7px 15px" @click="handleAdd">
-          新增
-        </el-button>
-      </el-col>
-    </el-row>
-
-    <el-table
-      v-loading="loading"
-      size="small"
-      :data="usersList"
-      :cell-style="{ padding: '0' }"
-      header-row-class-name="tableHeader"
-      @selection-change="handleSelectionChange"
-    >
-      <el-table-column label="邮箱" align="left" prop="mailboxName" />
-      <el-table-column label="授权码" align="left" prop="mailboxPwd" />
-      <el-table-column label="人员" align="left" prop="userId" />
-      <el-table-column label="操作" align="center" width="140">
-        <template slot-scope="scope">
-          <el-button type="text" @click="handleConfigShow(scope.row)">设置</el-button>
-          <el-button type="text" @click="handleUpdate(scope.row)">修改</el-button>
-          <!-- <el-button type="text" @click="handleDelete(scope.row)">删除</el-button> -->
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <Pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
-
-    <!-- 新增邮箱 -->
-    <el-dialog v-if="openAdd" :visible.sync="openAdd" title="绑定邮箱" width="30%" append-to-body>
-      <div
-        v-loading="loadingStatus"
-        element-loading-text="提交数据中,请勿关闭"
-        element-loading-spinner="el-icon-loading"
-        element-loading-background="rgba(0, 0, 0, 0.2)"
-      >
-        <el-form :model="submitForm" ref="submitForm" label-width="100px" :rules="rules">
-          <el-form-item label="邮箱类型" prop="mailHost">
-            <el-select placeholder="请选择邮箱类型" size="small" style="width: 100%" v-model="submitForm.mailHost" ref="mailHost" clearable @change="loseFocus">
-              <el-option v-for="item in mailHostList" :key="item.code" :value="item.dictKey" :label="item.dictValue"> </el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="邮箱" prop="mailboxName">
-            <el-input placeholder="请输入邮箱" size="small" v-model="submitForm.mailboxName" clearable></el-input>
-          </el-form-item>
-          <el-form-item label="授权码" prop="mailboxPwd">
-            <el-input placeholder="请输入授权码" size="small" v-model="submitForm.mailboxPwd" clearable></el-input>
-          </el-form-item>
-          <br />
-          <el-form-item style="text-align: left; width: 100%; position: relative">
-            <el-button type="primary" @click="submitAddEmail" style="background: #3366ff" v-db-click>确定</el-button>
-            <el-button @click="handleCancel">取消</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-    </el-dialog>
-
-    <!-- 修改授权码 -->
-    <el-dialog v-if="openUpdate" :visible.sync="openUpdate" title="修改授权码" width="30%" append-to-body>
-      <el-form :model="submitUpdateForm" ref="submitUpdateForm" label-width="100px" :rules="rules">
-        <el-form-item label="邮箱类型">
-          <span>{{ getMailHost(submitUpdateForm.mailHost) }}</span>
-        </el-form-item>
-        <el-form-item label="邮箱">
-          <span>{{ submitUpdateForm.mailboxName }}</span>
-        </el-form-item>
-        <el-form-item label="授权码" prop="mailboxPwd">
-          <el-input placeholder="请输入授权码" size="small" v-model="submitUpdateForm.mailboxPwd" clearable></el-input>
-        </el-form-item>
-        <br />
-        <el-form-item style="text-align: left; width: 100%; position: relative">
-          <el-button type="primary" @click="submitUpdateEmail" style="background: #3366ff" v-db-click>确定</el-button>
-          <el-button @click="handleCancel">取消</el-button>
-        </el-form-item>
-      </el-form>
-    </el-dialog>
-
-    <!-- 设置业务员弹窗 -->
-    <el-dialog title="设置业务员" v-if="openConfig" :visible.sync="openConfig" width="30%" append-to-body :close-on-click-modal="false">
-      <el-form ref="handOverForm" :model="userAcountForm" :rules="userRules" label-width="100px" size="small" style="width: 90%">
-        <el-form-item label="移交业务员:" prop="userId">
-          <el-select clearable v-model="userAcountForm.userId" placeholder="请选择移交业务员" style="width: 100%" @change="userAcountChange">
-            <el-option v-for="item in salesmanData" :key="item.id" :label="item.name" :value="item.id"> </el-option>
-          </el-select>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer" style="display: flex; justify-content: center">
-        <el-button type="primary" @click="submitConfig" v-db-click>确 定</el-button>
-        <el-button @click="handleCancel">关 闭</el-button>
-      </div>
-    </el-dialog>
-  </el-card>
-</template>
-
-<script>
-import Pagi from '@/components/Pagination'
-import * as API from '@/api/tenantManagement/mailbox'
-import { mapGetters } from 'vuex'
-
-export default {
-  components: { Pagi },
-  data() {
-    return {
-      mailBox: '',
-      handOverForm: {},
-      // 遮罩层
-      loading: false,
-      // 邮箱类型下拉框
-      mailHostList: '',
-      usersList: [],
-      // 总条数
-      total: 0,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        mailboxName: '',
-        userName: '',
-      },
-      salesmanData: [],
-      openAdd: false,
-      // 配置弹窗弹窗
-      openConfig: false,
-      // 提交表单
-      submitForm: {
-        mailHost: '',
-        mailboxName: '',
-        mailboxPwd: '',
-      },
-      newPassword: '',
-      userRules: {
-        userId: [{ required: true, message: '请选择业务员邮箱', trigger: 'blur' }],
-      },
-      rules: {
-        mailboxName: [
-          { required: true, message: '请输入账号', trigger: 'blur' },
-          {
-            type: 'email',
-            message: '请输入正确的邮箱',
-            trigger: ['blur', 'change'],
-          },
-        ],
-        mailboxPwd: [{ required: true, message: '请输入授权码', trigger: 'blur' }],
-        mailHost: [{ required: true, message: '请选择类型', trigger: 'blur' }],
-      },
-      userAcountForm: {
-        id: '',
-        userId: '',
-        password: '',
-      },
-      openUpdate: false,
-      submitUpdateForm: {
-        id: '',
-        mailboxName: '',
-        mailHost: '',
-        mailboxPwd: '',
-      },
-      loadingStatus: false,
-      rowData: {},
-    }
-  },
-  mounted() {
-    this.getConstantList()
-    this.getList()
-    this.getUsers_methods()
-  },
-  computed: {
-    ...mapGetters(['userInfo']),
-  },
-  methods: {
-    /** 查询company列表 */
-    getList() {
-      this.loading = true
-      API.list(this.queryParams).then((res) => {
-        this.usersList = res.data.data.list
-      })
-      API.count(this.queryParams).then((res) => {
-        this.total = res.data.data.count
-      })
-      this.loading = false
-    },
-    getRemaning() {
-      API.tenant().then((res) => {
-        this.totalNum = res.data.data.details.quotaAll
-        let quotaUsed = res.data.data.details.quotaUsed
-        this.remainingNum = this.totalNum - quotaUsed
-      })
-    },
-    getConstantList() {
-      let data = { current: 1, size: 10, parentId: '1481524494148419586' }
-      API.getInfoFromDict(data).then((res) => {
-        this.mailHostList = res.data.data
-      })
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1
-      this.getList()
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm('queryForm')
-      this.handleQuery()
-    },
-    // 新增按钮
-    handleAdd() {
-      this.submitForm = {
-        mailHost: '',
-        mailboxName: '',
-        mailboxPwd: '',
-      }
-      this.openAdd = true
-    },
-    // 取消添加或修改
-    handleCancel() {
-      this.openAdd = false
-      this.openConfig = false
-      this.openUpdate = false
-    },
-    // 邮箱是否有效
-    isValuable_methods() {
-      if (this.submitForm.mailHost !== 'imap.gmail.com') {
-        API.isExistMail({ mailboxName: this.submitForm.mailboxName }).then((res) => {
-          if (res.data.data.list && res.data.data.list.length > 0) {
-            this.msgInfo('邮箱已经存在')
-          } else {
-            this.loadingStatus = true
-            API.isValuable(this.submitForm).then(
-              (res) => {
-                if (res.data.data.code === 200) {
-                  API.insert(this.submitForm).then(
-                    () => {
-                      this.msgSuccess('邮箱添加成功,正在抓取文件夹')
-                      const data = {
-                        mailHost: this.submitForm.mailHost,
-                        mailbox: this.submitForm.mailboxName,
-                        mailboxPwd: this.submitForm.mailboxPwd,
-                      }
-                      API.grabOfficialFolder(data).then(
-                        () => {
-                          this.loadingStatus = false
-                          this.msgSuccess('文件夹抓取完成')
-                          this.openAdd = false
-                          this.queryParams.pageNum = 1
-                          this.getList()
-                          API.grabMail({ mailbox: this.submitForm.mailboxName }).then()
-                        },
-                        (err) => {
-                          this.loadingStatus = false
-                          console.log('grabOfficialFolder: ' + err)
-                        }
-                      )
-                    },
-                    (err) => {
-                      this.loadingStatus = false
-                      console.log('insert: ' + err)
-                    }
-                  )
-                } else {
-                  this.loadingStatus = false
-                  this.msgWarning('邮箱或授权码错误')
-                }
-              },
-              (err) => {
-                this.loadingStatus = false
-                console.log('isValuable: ' + err)
-              }
-            )
-          }
-        })
-      } else {
-        API.isExistMail({ mailboxName: this.submitForm.mailboxName }).then((res) => {
-          if (res.data.data.list && res.data.data.list.length > 0) {
-            this.msgInfo('邮箱已经存在')
-          } else {
-            this.loadingStatus = true
-            API.isValuableOverseas(this.submitForm).then(
-              (res) => {
-                if (res.data.data.code === 200) {
-                  API.insertOverseas(this.submitForm).then(
-                    () => {
-                      this.msgSuccess('邮箱添加成功,正在抓取文件夹')
-                      const data = {
-                        mailHost: this.submitForm.mailHost,
-                        mailbox: this.submitForm.mailboxName,
-                        mailboxPwd: this.submitForm.mailboxPwd,
-                      }
-                      API.grabOfficialFolderOverseas(data).then(
-                        () => {
-                          this.loadingStatus = false
-                          this.msgSuccess('文件夹抓取完成')
-                          this.openAdd = false
-                          this.queryParams.pageNum = 1
-                          this.getList()
-                          API.grabMailOverseas({ mailbox: this.submitForm.mailboxName }).then()
-                        },
-                        (err) => {
-                          this.loadingStatus = false
-                          console.log('grabOfficialFolderOverseas: ' + err)
-                        }
-                      )
-                    },
-                    (err) => {
-                      this.loadingStatus = false
-                      console.log('insertOverseas: ' + err)
-                    }
-                  )
-                } else {
-                  this.msgWarning('邮箱或授权码错误')
-                }
-              },
-              (err) => {
-                this.loadingStatus = false
-                console.log('isValuableOverseas: ' + err)
-              }
-            )
-          }
-        })
-      }
-    },
-    // 添加用户
-    submitAddEmail() {
-      this.$refs.submitForm.validate((valid) => {
-        if (valid) {
-          this.isValuable_methods()
-        }
-      })
-    },
-    // 修改授权码
-    submitUpdateEmail() {
-      this.$refs.submitUpdateForm.validate((valid) => {
-        if (valid) {
-          if (this.submitUpdateForm.mailHost !== 'imap.gmail.com') {
-            API.isValuable(this.submitUpdateForm).then((res) => {
-              if (res.data.data.code === 200) {
-                API.update(this.submitUpdateForm).then(() => {
-                  this.msgSuccess('邮箱授权码修改成功')
-                  this.openUpdate = false
-                  this.queryParams.pageNum = 1
-                  this.getList()
-                })
-              } else {
-                this.msgWarning('授权码错误')
-              }
-            })
-          } else {
-            API.isValuableOverseas(this.submitUpdateForm).then((res) => {
-              if (res.data.data.code === 200) {
-                API.updateOverseas(this.submitUpdateForm).then(() => {
-                  this.msgSuccess('邮箱授权码修改成功')
-                  this.openUpdate = false
-                  this.queryParams.pageNum = 1
-                  this.getList()
-                })
-              } else {
-                this.msgWarning('授权码错误')
-              }
-            })
-          }
-        }
-      })
-    },
-    // 设置人员
-    handleConfigShow(row) {
-      this.rowData = row
-      this.mailBox = row.mailboxName
-      this.openConfig = true
-      this.userAcountForm.id = row.id
-    },
-    // 获取业务员下拉框
-    getUsers_methods() {
-      API.getUserAll({}).then((response) => {
-        this.salesmanData = response.data.data.list
-      })
-    },
-    setUser_methods() {
-      var parameter = {
-        id: '',
-        userId: '',
-      }
-      parameter.userId = this.userAcountForm.userId
-      API.setUser(parameter).then(() => {
-        this.$message({
-          type: 'success',
-          message: '设置人员成功!',
-        })
-        this.openConfig = false
-        this.handOverForm = {}
-        this.queryParams.pageNum = 1
-        this.getList()
-      })
-    },
-    submitConfig() {
-      this.$refs.handOverForm.validate((valid) => {
-        if (valid) {
-          if (this.rowData.mailHost !== 'imap.gmail.com') {
-            API.mailIsGrad({ mailbox: this.mailBox }).then((res) => {
-              if (res.data.code === 200) {
-                API.setUser(this.userAcountForm).then(() => {
-                  this.$message({
-                    message: '设置业务员成功',
-                    type: 'success',
-                  })
-                  this.openConfig = false
-                  this.getList()
-                })
-              } else {
-                this.msgWarning('正在抓取邮件中,请稍等15分钟后再绑定人员!')
-              }
-            })
-          } else {
-            API.mailIsGradOverseas({ mailbox: this.mailBox }).then((res) => {
-              if (res.data.code === 200) {
-                API.setUser(this.userAcountForm).then(() => {
-                  this.$message({
-                    message: '设置业务员成功',
-                    type: 'success',
-                  })
-                  this.openConfig = false
-                  this.getList()
-                })
-              } else {
-                this.msgWarning('正在抓取邮件中,请稍等15分钟后再绑定人员!')
-              }
-            })
-          }
-        }
-      })
-    },
-    handleUpdate(row) {
-      this.submitUpdateForm = {
-        id: row.id,
-        mailHost: row.mailHost,
-        mailboxName: row.mailboxName,
-        mailboxPwd: row.mailboxPwd,
-      }
-      this.openUpdate = true
-    },
-    handleDelete(row) {
-      this.$confirm(`是否确定删除邮箱?`, {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          return API.mailboxDelete([row.id])
-        })
-        .then(() => {
-          this.$message({
-            type: 'success',
-            message: '操作成功!',
-          })
-          this.getList()
-        })
-    },
-    getMailHost(key) {
-      let data = this.mailHostList.filter((item) => item.dictKey === key)
-      if (data && data.length > 0) {
-        return data[0].dictValue
-      } else {
-        return ''
-      }
-    },
-    loseFocus() {
-      this.$nextTick(() => {
-        this.$refs.mailHost.blur()
-      })
-    },
-  },
-}
-</script>
-
-<style lang="scss" scoped>
-* {
-  font-size: 12px;
-}
-.group-title {
-  font-size: 14px;
-  font-weight: 700;
-}
-.box-card {
-  max-height: calc(100vh - 50px - 50px - 10px);
-  overflow-y: auto;
-}
-/deep/ .el-table .cell {
-  line-height: 35px !important;
-}
-::v-deep {
-  .el-input__inner {
-    border-radius: 1px;
-  }
-  .el-button--mini {
-    border-radius: 1px;
-  }
-  .tableHeader th {
-    background-color: #edf0f5;
-    height: 35px;
-    padding: 0;
-  }
-  .el-form-item {
-    margin-bottom: 10px;
-  }
-}
-.remaining {
-  font-size: 12px;
-  width: 23vw;
-  height: 25px;
-  background: #eaced1;
-  border: 1px solid #a12534;
-  line-height: 23px;
-  margin-left: 10px;
-  padding: 0 10px;
-  text-align: center;
-  border-radius: 70px;
-  text-align: center;
-}
-.huge-title {
-  font-size: 16px;
-  font-weight: 700;
-  margin: 0 10px;
-}
-.font-red {
-  color: #6c88f1;
-}
-.add-container {
-  width: 85%;
-  margin: 0 auto;
-  .msg-content {
-    /* width: 99%; */
-    background: #e9f5fb;
-    border: 1px solid #bde2f4;
-    height: 60px;
-    line-height: 60px;
-    padding-left: 10px;
-    left: 50%;
-    span {
-      margin-left: 5px;
-    }
-  }
-  .title-sign {
-    width: 90px;
-    height: 30px;
-    border-bottom: 1px solid #6c88f1;
-    color: #6c88f1;
-    line-height: 30px;
-    margin-top: 10px;
-    margin-bottom: 20px;
-  }
-}
-.searchBtn {
-  background: #20b2aa;
-  color: #fff;
-  border: 1px solid #20b2aa;
-}
-/deep/.hiddenSel {
-  display: none;
-}
-.role-tree {
-  width: 412px;
-  height: 25px;
-  border: 1px solid rgb(215, 215, 215);
-  color: #c2c3c5;
-  line-height: 25px;
-  margin-top: 5px;
-  border-radius: 1px;
-  span {
-    margin-left: 20px;
-  }
-}
-/deep/.el-tag.el-tag--info {
-  height: 20px;
-  line-height: 20px;
-  margin-left: 10px;
-}
-/deep/.el-input__inner {
-  height: 25px !important;
-}
-</style>