From 2edfe17a39cb5aa653318cad9474d18fbdaa204e Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 30 五月 2024 18:23:47 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit

---
 admin/src/components/business/OperaCarUseBookWindow.vue |  522 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 522 insertions(+), 0 deletions(-)

diff --git a/admin/src/components/business/OperaCarUseBookWindow.vue b/admin/src/components/business/OperaCarUseBookWindow.vue
new file mode 100644
index 0000000..d4290bb
--- /dev/null
+++ b/admin/src/components/business/OperaCarUseBookWindow.vue
@@ -0,0 +1,522 @@
+<template>
+  <GlobalWindow
+      :title="title"
+      :visible.sync="visible"
+      @confirm="confirm"
+  >
+    <div class="modal_wrap">
+      <div class="modal_content">
+        <div class="header">
+          <div class="left">
+            <div class="h1">鍏姟杞︾敵璇�</div>
+            <div class="time">鎻愪氦鏃堕棿锛歿{model.createDate}}</div>
+          </div>
+          <span class="right"  v-if="model.status === 0">鐢宠涓�</span>
+          <span class="right"  v-if="model.status === 1">寰呭鎵�</span>
+          <span class="right" style="background:#53b76f " v-if="model.status === 2">瀹℃壒閫氳繃</span>
+          <span class="right" style="background:#dc362e " v-if="model.status === 3">瀹℃壒涓嶉�氳繃</span>
+          <span class="right" style="background:#dc362e " v-if="model.status === 4">宸插彇娑�</span>
+        </div>
+        <div class="info">
+          <div class="title">鍏姟杞︾敵璇蜂俊鎭�</div>
+          <div class="list">
+            <div class="item" style="width: 100%">
+              <div class="label">鐢宠浜�</div>
+              <div class="value">{{model.memberName || ''}} {{model.memberPhone || ''}} ({{model.companyName || ''}})</div>
+            </div>
+            <div class="item">
+              <div class="label">鐢宠杞﹁締</div>
+              <div class="value">{{model.carCode || ''}}</div>
+            </div>
+            <div class="item">
+              <div class="label">鍙告満淇℃伅</div>
+              <div class="value" v-if="model.driverId !=null">{{model.driverName || ''}} {{model.driverPhone || ''}}</div>
+              <div class="value" v-if="model.driverId ==null">鏈寚娲�</div>
+            </div>
+            <div class="item"  >
+            <div class="label">鐢ㄨ溅浜嬬敱</div>
+            <div class="value">{{model.content}}</div>
+          </div>
+            <div class="item">
+              <div class="label">涔樿溅浜哄憳</div>
+              <div class="value">{{model.memberNames || ''}}</div>
+            </div>
+            <div class="item">
+              <div class="label">鐩殑鍦扮被鍒�</div>
+              <div class="value status-green" v-if="model.type === 0">銆愬競鍐呯敤杞︺��</div>
+              <spdivan class="value status-red"   v-if="model.type === 1">銆愬競鍐呯敤杞︺��</spdivan>
+            </div>
+            <div class="item">
+              <div class="label">鐩殑鍦�</div>
+              <div class="value">{{model.addr || ''}}</div>
+            </div>
+            <div class="item">
+              <div class="label">棰勮鍑哄彂鏃堕棿</div>
+              <div class="value">{{model.planUseDate || ''}}</div>
+            </div>
+            <div class="item">
+              <div class="label">鐢ㄨ溅鏃舵</div>
+              <div class="value">濮�:{{model.startTime || ''}}<br>姝�:{{model.endTime || ''}}</div>
+            </div>
+          </div>
+        </div>
+      </div>
+      <div class="side">
+        <div class="side_title">瀹℃壒娴佺▼</div>
+        <div class="list"  v-if="model.approveDateVO !=null && model.approveDateVO.approveList !=null">
+          <div class="item" v-for="(item,index) in model.approveDateVO.approveList" :key="item.id">
+            <div class="separate" v-if=" (index < model.approveDateVO.approveList.length-1)"></div>
+            <div class="info">
+              <img src="@/assets/icons/ic_tongguo.png"   class="iconnew" v-if="(item.status ==2)"/>
+              <img src="@/assets/icons/ic_dangqian.png"   class="iconnew"  v-if="(item.status==1)"/>
+              <img src="@/assets/icons/ic_jujue.png"  class="iconnew"  v-if="(item.status==3)"></i>
+              <img src="@/assets/icons/ic_grep.png"  class="iconnew" v-if="(item.status==null || item.status==0 )"></i>
+              <div style="display: inline" v-if="item.approveType ===0">
+                <img v-if="item.faceImg!=null && item.faceImg !=''" :src="item.faceImg" class="avatar" alt="" />
+                <img v-if="item.faceImg ==null ||item.faceImg ==''"  src="@/assets/avatar/man.png" class="avatar" alt="" />
+              </div>
+              <div style="display: inline" v-if="item.approveType ===1">
+                <img v-if="item.status === 1"  src="@/assets/icons/ic_chaosong.png" class="avatar" alt="" />
+                <img  v-if="item.status != 1"  src="@/assets/icons/ic_duoren.png" class="avatar" alt="" />
+              </div>
+              <div class="content">
+                <div class="line">
+                  <div class="name">{{ item.title}}</div>
+                  <div class="time">{{ item.createDate }}</div>
+                </div>
+                <div class="line">
+                  <div class="company">
+                    {{ item.createUserName }} {{ item.companyName }}
+                    <div style="display: inline" v-if="item.statusInfo!=null && item.statusInfo!=''">
+                       <span class="status-green">{{item.statusInfo||''}}</span>锛�
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div v-if="item.approveType != 1 " class="remark">
+              {{ item.checkInfo ||'姘寸數璐瑰弽鍙嶅澶嶅弽鍙嶅澶嶆柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曟柟娉曞彂鍙戝彂' }}
+            </div>
+            <div v-if="item.approveType == 1 "  class="childList">
+              <div style="display: inline" v-for="item1 in item.approveList" :key="item1.id">
+                <img v-if="item1.faceImg!=null && item1.faceImg !=''" :src="item1.faceImg" class="avatar" alt="" />
+                <img v-if="item1.faceImg ==null ||item1.faceImg ==''"  src="@/assets/avatar/man.png" class="avatar" alt="" />
+                <span style="display: inline-block"> {{item1.memberName}}</span>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!--  -->
+    <template   v-slot:footer>
+      <el-button @click="isShowProblem = true"  type="primary"  v-if="model.approveDateVO!=null&& model.approveDateVO.canBeApproved!=null &&model.approveDateVO.canBeApproved ==1 "  class="status-red">鍚屾剰</el-button>
+      <el-button @click="isBackProblem=true"  type="danger"  v-if="model.approveDateVO!=null&& model.approveDateVO.canBeApproved!=null &&model.approveDateVO.canBeApproved ==1 "  >鎷掔粷</el-button>
+      <el-button @click="visible=false">杩斿洖</el-button>
+    </template>
+    <el-dialog
+        append-to-body
+        title="鍚屾剰鐢宠"
+        class="dialogCl"
+        :visible.sync="isShowProblem"
+        width="480px"
+    >
+      <el-form :model="dealForm" ref="dealForm" >
+        <el-form-item label="娲捐溅鍙告満" prop="driverId" required v-if="model.approveDateVO!=null && model.approveDateVO.drvierParam ===1">
+          <el-select v-model="transForm.driverId" style="width: 300px"  filterable clearable placeholder="璇烽�夋嫨娲鹃仯鍙告満">
+            <el-option
+                v-for="item in memberList"
+                :key="item.id"
+                :label="item.name+'-'+item.phone"
+                :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="鍚屾剰璇存槑">
+          <el-input
+              type="textarea"
+              placeholder="璇峰~鍐欒鏄�"
+              :rows="4"
+              v-model="backForm.checkInfo"
+          />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="isShowProblem = false">鍙栨秷</el-button>
+        <el-button type="primary" :loading="dealing" @click="dealDo">纭畾</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog
+        append-to-body
+        title="鎷掔粷鐢宠"
+        class="dialogCl"
+        :visible.sync="isBackProblem"
+        width="600px"
+    >
+      <el-form :model="backForm"  ref="backForm" label-width="100px">
+        <el-form-item label="鎷掔粷璇存槑">
+          <el-input
+              type="textarea"
+              placeholder="璇峰~鍐欒鏄�"
+              :rows="4"
+              v-model="backForm.checkInfo"
+          />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="isBackProblem= false">鍙栨秷</el-button>
+        <el-button type="primary" :loading="dealing" @click="backDo">纭畾</el-button>
+      </span>
+    </el-dialog>
+  </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import { driveList } from '@/api/business/member'
+import { mapState } from 'vuex'
+export default {
+  name: 'OperaCarUseBookWindow',
+  components: { GlobalWindow },
+  extends: BaseOpera,
+  data () {
+    return {
+      title: '鍏姟杞︾敵璇�',
+      visible: false,
+      dataId: null,
+      model: { },
+      dealing: false,
+      isShowProblem: false,
+      isBackProblem: false,
+      memberList: [],
+      dealForm: {
+        driveId: null,
+        checkInfo: null
+      },
+      backForm: {
+        checkInfo: null
+      }
+    }
+  },
+  computed: {
+    ...mapState(['userInfo'])
+  },
+  created () {
+    this.config({
+      api: '/business/carUseBook',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    dealDo () {
+      this.$refs.dealForm.validate((valid) => {
+        if (!valid) {
+          return
+        }
+        this.$dialog.actionConfirm('鎿嶄綔纭', '鎮ㄧ‘璁ゆ彁浜よ闅愭偅澶勭悊鎯呭喌鍚楋紵')
+          .then(() => {
+            this.dealing = true
+            this.api.dealHiddenDanger({
+              id: this.dataId,
+              status: 1,
+              driverId: this.dealForm.driveId,
+              checkInfo: this.dealForm.checkInfo
+            })
+              .then(res => {
+                this.$tip.apiSuccess('澶勭悊鎴愬姛')
+                this.getDetail()
+                this.isShowProblem = false
+              })
+              .finally(() => {
+                this.dealing = false
+              })
+          })
+      })
+    },
+    backDo () {
+      this.$refs.backForm.validate((valid) => {
+        if (!valid) {
+          return
+        }
+        this.$dialog.actionConfirm('鎿嶄綔纭', '鎮ㄧ‘璁ら��鍥炶闅愭偅澶勭悊鎯呭喌鍚楋紵')
+          .then(() => {
+            this.dealing = true
+            this.api.dealHiddenDanger({
+              id: this.dataId,
+              status: 2,
+              checkInfo: this.backForm.checkInfo
+            })
+              .then(res => {
+                this.$tip.apiSuccess('閫�鍥炴垚鍔�')
+                this.getDetail()
+                this.isBackProblem = false
+              })
+              .catch(e => {
+              })
+              .finally(() => {
+                this.dealing = false
+              })
+          })
+      })
+    },
+    open (title, target) {
+      this.title = title
+      this.visible = true
+      this.model = {}
+      this.dataId = target.id
+      this.$nextTick(() => {
+        this.memberList = []
+        this.dealForm = {
+          driveId: null,
+          checkInfo: null
+        }
+        this.backForm = {
+          checkInfo: null
+        }
+        this.getDetail()
+      })
+    },
+    getDetail () {
+      this.api.detail(this.dataId)
+        .then(res => {
+          this.model = res
+          this.dealForm.driveId = res.driveId
+        })
+    },
+    handleTransfer () {
+      this.isShowTransfer = true
+      this.loadMemberList()
+    },
+    loadMemberList () {
+      driveList({}).then(res => {
+        this.memberList = res
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.side_title{
+  font-weight: 600;
+  font-size: 18px;
+  color: #111111;
+  margin-bottom: 20px;
+  margin-left: 20px;
+  margin-top: 20px;
+}
+.upload_box {
+  width: 84px;
+  height: 84px;
+  border-radius: 4px;
+  background-color: #f7f7f7;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  color: #999999;
+  border: 1px solid #e4e4e4;
+  .icon {
+    font-size: 24px;
+  }
+  .text {
+    font-size: 12px;
+  }
+}
+
+.modal_wrap {
+  display: flex;
+  height: 100%;
+  .modal_content {
+    flex: 1;
+    padding: 0px 30px;
+    border-radius: 8px;
+    overflow: hidden;
+    height: 100%;
+
+    .title {
+      font-weight: 600;
+      font-size: 18px;
+      color: #333333;
+      margin-bottom: 20px;
+      margin-top: 30px;
+    }
+    .info {
+      .list {
+        display: flex;
+        flex-wrap: wrap;
+
+        .item {
+          display: flex;
+          width: 40%;
+          margin-bottom: 20px;
+          &:nth-of-type(2n) {
+            width: 60%;
+          }
+
+          .label {
+            color: #888888;
+            width: 100px;
+          }
+
+          .value {
+            color: #111111;
+          }
+        }
+      }
+    }
+
+    .header {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      padding: 20px 30px;
+      margin: 0 -30px;
+      border-radius: 8px 8px 0 0;
+      background: linear-gradient(to right, #f2f6fe, #cadffa);
+
+      .h1 {
+        font-weight: 600;
+        font-size: 22px;
+        color: #111111;
+        margin-bottom: 8px;
+      }
+
+      .time {
+        font-size: 14px;
+        color: #999999;
+      }
+
+      .right {
+        height: 40px;
+        font-size: 16px;
+        color: #ffffff;
+        line-height: 40px;
+        padding: 0 20px;
+        background: #207ff7;
+        box-shadow: 4px 4px 0px 0px rgba(32, 127, 247, 0.16);
+        border-radius: 16px 0px 16px 0px;
+      }
+    }
+    .table_info {
+      .name_wrap {
+        display: flex;
+        align-items: center;
+        .avatar {
+          width: 40px;
+          height: 40px;
+          border-radius: 50%;
+          margin-right: 12px;
+        }
+        .content {
+          .line {
+            display: flex;
+          }
+          .tag {
+            color: #b2cbf9;
+            border: 1px solid #b2cbf9;
+            padding: 0px 4px;
+            border-radius: 4px;
+            margin-left: 6px;
+          }
+        }
+      }
+    }
+  }
+
+  .side {
+    height: 100%;
+    width: 420px;
+    background: #ffffff;
+    border-left: 20px solid #f7f7f7;
+    .list {
+      .item {
+        padding: 8px 0;
+        position: relative;
+        .separate {
+          position: absolute;
+          border-left: 2px dashed #cccccc;
+          left: 31px;
+          height: calc(100% - 24px);
+          top: 34px;
+        }
+        .info {
+          display: flex;
+          align-items: center;
+          margin-left: 20px;
+          .icon {
+            position: relative;
+            z-index: 11;
+            color: #53b76f;
+            font-size: 24px;
+          }
+          .icon1 {
+            position: relative;
+            z-index: 11;
+            color: deepskyblue;
+            font-size: 24px;
+          }
+          .icon2 {
+            position: relative;
+            z-index: 11;
+            color: #dc362e;
+            font-size: 24px;
+          }
+          .iconnew{
+            width: 24px;
+            height: 24px;
+          }
+          .icon3 {
+            position: relative;
+            z-index: 11;
+            color:gray;
+            font-size: 24px;
+          }
+          .avatar {
+            width: 40px;
+            height: 40px;
+            border-radius: 50%;
+            margin: 0 12px 0 16px;
+            border: 1px solid;
+          }
+          .content {
+            flex: 1;
+            .line {
+              display: flex;
+              justify-content: space-between;
+              align-content: center;
+              margin-bottom: 6px;
+              .name {
+                font-weight: 600;
+                font-size: 16px;
+                color: #111111;
+              }
+              .time {
+                color: #888888;
+              }
+              .company {
+                font-size: 13px;
+                color: #888888;
+                .status {
+                  color: #00ba67;
+                }
+              }
+            }
+          }
+        }
+        .remark {
+          background: #f7f7f7;
+          border-radius: 4px;
+          padding: 13px 15px;
+          color: #666666;
+          margin-left: 120px;
+        }
+        .childList {
+          margin-left: 120px;
+        }
+      }
+    }
+  }
+}
+</style>

--
Gitblit v1.9.3