Jelajahi Sumber

完成订单管理的按钮功能

hzj18279462576@163.com 3 tahun lalu
induk
melakukan
344dcc9bce
2 mengubah file dengan 571 tambahan dan 95 penghapusan
  1. 376 40
      admin/src/views/order/index.vue
  2. 195 55
      admin/src/views/staff/index.vue

+ 376 - 40
admin/src/views/order/index.vue

@@ -21,6 +21,7 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
               @change="timePay"
+              :unlink-panels="true"
               type="daterange"
               :clearable="false"
               range-separator="至"
@@ -36,6 +37,8 @@
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
               @change="timeCreation"
+              :unlink-panels="true"
+              :clearable="false"
               type="daterange"
               range-separator="至"
               start-placeholder="开始日期"
@@ -45,12 +48,12 @@
           </div>
           <div class="state">
             <span>状态</span>
-            <el-select v-model="state" placeholder="请选择">
+            <el-select v-model="state" placeholder="请选择" @change="stateSel">
               <el-option
                 v-for="item in options"
                 :key="item.value"
-                :label="item.label"
                 :value="item.value"
+                :label="item.label"
               >
               </el-option>
             </el-select>
@@ -320,6 +323,268 @@
               </template>
             </el-table-column>
           </el-table>
+          <el-table
+            :data="tableData"
+            max-height="576"
+            height="576"
+            style="width: 1550px"
+            stripe
+            class="execlTable"
+            :cell-style="rowbg"
+            :header-cell-style="{
+              color: ' rgba(0, 0, 0, 1)',
+              background: 'rgba(240, 243, 247, 1)',
+            }"
+          >
+            <el-table-column
+              type="selection"
+              width="60"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="orderNum"
+              width="120"
+              label="订单号"
+              align="center"
+            >
+            </el-table-column>
+
+            <el-table-column
+              prop="state"
+              width="100"
+              align="center"
+              label="状态"
+            >
+            </el-table-column>
+
+            <el-table-column
+              prop="room"
+              width="160"
+              align="center"
+              label="房间"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="electricity"
+              align="center"
+              width="130"
+              label="电费(元)"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="water"
+              width="130"
+              align="center"
+              label="水费(元)"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="imprest"
+              align="center"
+              width="150"
+              label="收预付款(元)"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="refund"
+              width="150"
+              align="center"
+              label="退预付款(元)"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="create"
+              width="180"
+              align="center"
+              label="创建时间"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="pay"
+              width="180"
+              align="center"
+              label="支付时间"
+            >
+            </el-table-column>
+            <!-- <el-table-column prop="address" align="center" label="操作">
+              <template slot-scope="scope">
+                <span
+                  @click="handleEdit(scope.$index, scope.row)"
+                  class="operate"
+                >
+                  详情
+                </span>
+                <el-dialog
+                  title="订单详情"
+                  :visible.sync="dialogVisible"
+                  width="30%"
+                  :before-close="handleClose"
+                >
+                  <div class="userinfo">用户信息</div>
+                  <div class="info">
+                    <div class="user">
+                      <div class="name">姓名</div>
+                      <el-input value="刘老师"></el-input>
+                    </div>
+                    <div class="user">
+                      <div class="name">联系方式</div>
+                      <el-input value="13234564"></el-input>
+                    </div>
+                  </div>
+                  <div class="info">
+                    <div class="user">
+                      <div class="name">订单号</div>
+                      <el-input value="261691612"></el-input>
+                    </div>
+                    <div class="user">
+                      <div class="name">预付款金额(元)</div>
+                      <el-input value="20.00"></el-input>
+                    </div>
+                  </div>
+                  <div class="info">
+                    <div class="user">
+                      <div class="name">入住时间</div>
+                      <el-input value="2022-07-26"></el-input>
+                    </div>
+                    <div class="user">
+                      <div class="name">离住时间</div>
+                      <el-input value="2022-07-26"></el-input>
+                    </div>
+                  </div>
+                  <div class="info">
+                    <div class="user">
+                      <div class="name">入住天数</div>
+                      <el-input value="1"></el-input>
+                    </div>
+                    <div class="user">
+                      <div class="name">支付时间</div>
+                      <el-input value="2022-07-27   15:15:15"></el-input>
+                    </div>
+                  </div>
+                  <div class="rate">水费明细</div>
+                  <div class="water">
+                    表计:101 楼层:12栋1单元2层01 抄表时间:2022-07-27 15:15:15
+                  </div>
+                  <el-table
+                    :data="waterTable"
+                    max-height="93"
+                    style="width: 832px"
+                    stripe
+                    :cell-style="rowbg"
+                    :header-cell-style="{
+                      color: ' rgba(0, 0, 0, 1)',
+                      background: 'rgba(240, 243, 247, 1)',
+                    }"
+                  >
+                    <el-table-column
+                      prop="start"
+                      width="100"
+                      label="始码"
+                      align="center"
+                    >
+                    </el-table-column>
+
+                    <el-table-column
+                      prop="end"
+                      width="100"
+                      align="center"
+                      label="终码"
+                    >
+                    </el-table-column>
+
+                    <el-table-column
+                      prop="flow"
+                      align="center"
+                      label="水量(吨)"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      prop="pirce"
+                      align="center"
+                      label="水价(元)"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      prop="subsidy"
+                      align="center"
+                      label="补助量(吨)"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      prop="production"
+                      align="center"
+                      label="产生水费(元)"
+                    >
+                    </el-table-column>
+                  </el-table>
+
+                  <div class="rate">电费明细</div>
+                  <div class="water">
+                    表计:101 楼层:12栋1单元2层01 抄表时间:2022-07-27 15:15:15
+                  </div>
+                  <el-table
+                    :data="waterTable"
+                    max-height="93"
+                    style="width: 832px"
+                    stripe
+                    :cell-style="rowbg"
+                    :header-cell-style="{
+                      color: ' rgba(0, 0, 0, 1)',
+                      background: 'rgba(240, 243, 247, 1)',
+                    }"
+                  >
+                    <el-table-column
+                      prop="start"
+                      width="100"
+                      label="始码"
+                      align="center"
+                    >
+                    </el-table-column>
+
+                    <el-table-column
+                      prop="end"
+                      width="100"
+                      align="center"
+                      label="终码"
+                    >
+                    </el-table-column>
+
+                    <el-table-column
+                      prop="flow"
+                      align="center"
+                      label="电量(度)"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      prop="pirce"
+                      align="center"
+                      label="电价(元)"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      prop="subsidy"
+                      align="center"
+                      label="补助量(度)"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      prop="production"
+                      align="center"
+                      label="产生水费(元)"
+                    >
+                    </el-table-column>
+                  </el-table>
+                </el-dialog>
+
+                <span
+                  @click="handleDelete(scope.$index, scope.row)"
+                  class="operate"
+                >
+                  删除
+                </span>
+              </template>
+            </el-table-column> -->
+          </el-table>
         </div>
         <div class="block">
           <el-pagination
@@ -346,10 +611,12 @@ export default {
   name: "Inform",
   data() {
     return {
-      // 显示的数据
+      // 当前页显示的数据
       data: [],
-      Tdata: [],
       // 总数据
+      Tdata: [],
+      inquireTable: [],
+      // 显示的总数据
       tableData: [
         {
           orderNum: "116161656",
@@ -359,30 +626,52 @@ export default {
           water: "0.00",
           imprest: "20.00",
           refund: "20.00",
-          create: "2022.07.02 08:50:50",
-          pay: "2022.07.02 08:50:50",
+          create: "2012.07.02 08:50:50",
+          pay: "2012.07.02 08:50:50",
+        },
+        {
+          orderNum: "116161656",
+          state: "空房",
+          room: "17栋1单元2层04房",
+          electricity: "2.09",
+          water: "0.00",
+          imprest: "20.00",
+          refund: "20.00",
+          create: "2012.07.02 08:50:50",
+          pay: "2012.07.02 08:50:50",
+        },
+        {
+          orderNum: "116161656",
+          state: "已入住",
+          room: "17栋1单元2层04房",
+          electricity: "2.09",
+          water: "0.00",
+          imprest: "20.00",
+          refund: "20.00",
+          create: "2012.07.02 08:50:50",
+          pay: "2012.07.02 08:50:50",
         },
         {
           orderNum: "216161656",
-          state: "入住",
+          state: "保留房",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
           imprest: "20.00",
           refund: "20.00",
-          create: "2022.07.02 08:50:50",
-          pay: "2022.07.02 08:50:50",
+          create: "2021.07.02 08:50:50",
+          pay: "2021.07.02 08:50:50",
         },
         {
           orderNum: "316161656",
-          state: "已入",
+          state: "空房",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
           imprest: "20.00",
           refund: "20.00",
-          create: "2022.07.02 08:50:50",
-          pay: "2022.07.02 08:50:50",
+          create: "2020.07.02 08:50:50",
+          pay: "2020.07.02 08:50:50",
         },
         {
           orderNum: "416161656",
@@ -392,19 +681,19 @@ export default {
           water: "0.00",
           imprest: "20.00",
           refund: "20.00",
-          create: "2022.07.02 08:50:50",
-          pay: "2022.07.02 08:50:50",
+          create: "2019.07.02 08:50:50",
+          pay: "2019.07.02 08:50:50",
         },
         {
           orderNum: "516161656",
-          state: "已入住",
+          state: "已锁定",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
           imprest: "20.00",
           refund: "20.00",
-          create: "2022.07.02 08:50:50",
-          pay: "2022.07.02 08:50:50",
+          create: "2018.07.02 08:50:50",
+          pay: "2018.07.02 08:50:50",
         },
         {
           orderNum: "616161656",
@@ -414,12 +703,12 @@ export default {
           water: "0.00",
           imprest: "20.00",
           refund: "20.00",
-          create: "2022.07.02 08:50:50",
-          pay: "2022.07.02 08:50:50",
+          create: "2000.07.02 08:50:50",
+          pay: "2000.07.02 08:50:50",
         },
         {
           orderNum: "716161656",
-          state: "已入住",
+          state: "脏房",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
@@ -430,7 +719,7 @@ export default {
         },
         {
           orderNum: "816161656",
-          state: "已入住",
+          state: "脏房",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
@@ -441,7 +730,7 @@ export default {
         },
         {
           orderNum: "916161656",
-          state: "",
+          state: "空房",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
@@ -452,7 +741,7 @@ export default {
         },
         {
           orderNum: "106161656",
-          state: "",
+          state: "已锁定",
           room: "17栋1单元2层04房",
           electricity: "2.09",
           water: "0.00",
@@ -465,24 +754,24 @@ export default {
 
       options: [
         {
-          value: "选项1",
+          value: "已入住",
           label: "已入住",
         },
         {
-          value: "选项2",
-          label: "已入住",
+          value: "已锁定",
+          label: "已锁定",
         },
         {
-          value: "选项3",
-          label: "已入住",
+          value: "空房",
+          label: "空房",
         },
         {
-          value: "选项4",
-          label: "已入住",
+          value: "脏房",
+          label: "脏房",
         },
         {
-          value: "选项5",
-          label: "已入住",
+          value: "保留房",
+          label: "保留房",
         },
       ],
 
@@ -515,13 +804,11 @@ export default {
   methods: {
     // 导出表格
     exportExcel() {
-      var xlsxParam = { raw: true };
+      let xlsxParam = { raw: true };
       /* generate workbook object from table */
-      var wb = XLSX.utils.table_to_book(
-        document.querySelector(".inform-table")
-      );
+      let wb = XLSX.utils.table_to_book(document.querySelector(".execlTable"));
       /* get binary string as output */
-      var wbout = XLSX.write(wb, {
+      let wbout = XLSX.write(wb, {
         bookType: "xlsx",
         bookSST: true,
         type: "array",
@@ -588,19 +875,26 @@ export default {
         });
     },
 
+    //查询
     inquire() {
       if (this.value == false) {
         this.tableData = this.Tdata;
+        this.state = "";
       } else {
-        let quireData = this.tableData.filter((item) => {
+        this.state = "";
+        let quireData = this.Tdata.filter((item) => {
           if (item.orderNum.includes(this.value)) {
             return item.orderNum;
           }
         });
+        this.inquireTable = JSON.parse(JSON.stringify(quireData));
         this.tableData = quireData;
       }
       this.currentPage = 1;
+
       this.handleCurrentChange(this.currentPage);
+      console.log(this.Tdata);
+      console.log(this.tableData);
     },
 
     handleClose(done) {
@@ -609,11 +903,50 @@ export default {
 
     // 支付时间
     timePay() {
-      console.log(this.payTime);
+      // console.log(this.payTime);
+      let reg = new RegExp("-", "g");
+      let startTime = new Date(this.payTime[0].replace(reg, "/"));
+      let endTime = new Date(this.payTime[1].replace(reg, "/"));
+      this.tableData = this.Tdata.filter((item) => {
+        let nowTime = new Date(item.pay.substr(0, 10).replace(reg, "/"));
+        return nowTime >= startTime && nowTime <= endTime;
+      });
+      this.currentPage = 1;
+      this.handleCurrentChange(this.currentPage);
     },
     // 创建时间
     timeCreation() {
-      console.log(this.creationTime);
+      // console.log(this.creationTime);
+      let reg = new RegExp("-", "g");
+      let startTime = new Date(this.creationTime[0].replace(reg, "/"));
+      let endTime = new Date(this.creationTime[1].replace(reg, "/"));
+      this.tableData = this.Tdata.filter((item) => {
+        let nowTime = new Date(item.create.substr(0, 10).replace(reg, "/"));
+        return nowTime >= startTime && nowTime <= endTime;
+      });
+      this.currentPage = 1;
+      this.handleCurrentChange(this.currentPage);
+    },
+
+    // 挑选状态
+    stateSel() {
+      if (this.value == false) {
+        console.log(1111);
+        this.tableData = this.Tdata.filter((item) => {
+          return item.state == this.state;
+        });
+      } else {
+        console.log(this.inquireTable);
+        this.tableData = this.inquireTable.filter((item) => {
+          return item.state == this.state;
+        });
+      }
+      // this.tableData = this.Tdata.filter((item) => {
+      //   return item.state == this.state;
+      // });
+      this.currentPage = 1;
+      this.handleCurrentChange(this.currentPage);
+      console.log(this.state);
     },
   },
 };
@@ -693,6 +1026,9 @@ export default {
       }
     }
     .inform-table {
+      .execlTable {
+        display: none;
+      }
       .el-table {
         font-weight: 400;
         font-size: 16px;

+ 195 - 55
admin/src/views/staff/index.vue

@@ -78,7 +78,7 @@
             <el-table-column prop="staff" align="center" label="员工姓名">
             </el-table-column>
 
-            <el-table-column prop="position" align="center" label="职位">
+            <el-table-column prop="positionValue" align="center" label="职位">
             </el-table-column>
             <el-table-column prop="address" align="center" label="操作">
               <template slot-scope="scope">
@@ -89,11 +89,40 @@
                   编辑
                 </span>
                 <el-dialog
-                  title="订单详情"
-                  :visible.sync="dialogVisible"
-                  width="30%"
-                  :before-close="handleClose"
+                  title="编辑员工"
+                  :visible.sync="editShow"
+                  :before-close="editClose"
                 >
+                  <div class="info">
+                    <div class="user">
+                      <div class="name">员工姓名</div>
+                      <el-input v-model="staffValue"></el-input>
+                    </div>
+                    <div class="user">
+                      <div class="name">手机号码</div>
+                      <el-input v-model="phoneValue"></el-input>
+                    </div>
+                  </div>
+                  <div class="info">
+                    <div class="user">
+                      <div class="name">职位</div>
+                      <el-select v-model="positionValue" placeholder="请选择">
+                        <el-option
+                          v-for="item in options"
+                          :key="item.value"
+                          :label="item.label"
+                          :value="item.label"
+                        >
+                        </el-option>
+                      </el-select>
+                    </div>
+                  </div>
+                  <span slot="footer" class="dialog-footer">
+                    <el-button @click.stop="editCancel()" class="cancel"
+                      >取消</el-button
+                    >
+                    <el-button @click.stop="editSuccess()">完成</el-button>
+                  </span>
                 </el-dialog>
 
                 <span
@@ -133,102 +162,102 @@ export default {
         {
           phone: 13611110232,
           staff: "刘德华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13620220232,
           staff: "刘",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1363636320232,
           staff: "德华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1344540232,
           staff: "华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1360468880232,
           staff: "刘德",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13602220232,
           staff: "德",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1360888832,
           staff: "刘华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13655550232,
           staff: "华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13605656232,
           staff: "刘",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13464520232,
           staff: "德",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1365650232,
           staff: "华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13605656232,
           staff: "刘",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13464520232,
           staff: "德",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1365650232,
           staff: "华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13605656232,
           staff: "刘",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13464520232,
           staff: "德",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1365650232,
           staff: "华",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13605656232,
           staff: "刘",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 13464520232,
           staff: "德",
-          position: "歌星",
+          positionValue: "歌星",
         },
         {
           phone: 1365650232,
           staff: "华",
-          position: "歌星",
+          positionValue: "歌星",
         },
       ],
       datas: [],
@@ -238,23 +267,23 @@ export default {
       options: [
         {
           value: "选项1",
-          label: "已入住",
+          label: "歌星1",
         },
         {
           value: "选项2",
-          label: "已入住",
+          label: "歌星2",
         },
         {
           value: "选项3",
-          label: "已入住",
+          label: "歌星3",
         },
         {
           value: "选项4",
-          label: "已入住",
+          label: "歌星4",
         },
         {
           value: "选项5",
-          label: "已入住",
+          label: "歌星5",
         },
       ],
       currentPage: 1,
@@ -263,9 +292,9 @@ export default {
 
       // 添加员工
       staffValue: "",
-      phoneValue: "",
-      positionValue: [],
-
+      phoneValue: "", // 当前的号码
+      positionValue: "",
+      phoneVal: "", // 修改前的号码
       dialogVisible: false,
       waterTable: [
         {
@@ -278,6 +307,7 @@ export default {
         },
       ],
       addStaffShow: false,
+      editShow: false,
     };
   },
   mounted() {
@@ -309,9 +339,6 @@ export default {
     },
 
     // 表格操作
-    handleEdit(index, row) {
-      this.dialogVisible = true;
-    },
 
     handleDelete(index, row) {
       this.$confirm("确认删除?")
@@ -355,6 +382,7 @@ export default {
           }
         });
       }
+      this.currentPage = 1;
       this.handleCurrentChange(this.currentPage);
     },
 
@@ -370,16 +398,110 @@ export default {
         .catch((_) => {});
     },
     addSuccess() {
-      let arr = {
-        phone: this.phoneValue,
-        staff: this.staffValue,
-        position: this.positionValue,
-      };
-      this.datas.push(arr);
-      this.data = this.datas;
-      this.currentPage = Math.ceil(this.data.length / 8);
-      this.handleCurrentChange(this.currentPage);
-      this.addStaffShow = false;
+      let reg_tel =
+        /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
+      if (reg_tel.test(this.phoneValue)) {
+        // console.log("电话号码符合要求");
+        let RepeatNumber = this.datas.some((item) => {
+          return item.phone == this.phoneValue;
+        });
+        if (RepeatNumber) {
+          this.$message({
+            message: "当前电话号码已存在,请换个号码输入",
+            type: "error",
+          });
+        } else if (this.staffValue.trim() == "") {
+          this.$message({ message: "输入的姓名不能为空", type: "error" });
+        } else if (this.positionValue == "") {
+          this.$message({ message: "职位不能为空", type: "error" });
+        } else {
+          let arr = {
+            phone: this.phoneValue,
+            staff: this.staffValue,
+            positionValue: this.positionValue,
+          };
+          // console.log(this.positionValue);
+          this.datas.push(arr);
+          this.data = this.datas;
+          this.currentPage = Math.ceil(this.data.length / 8);
+          this.handleCurrentChange(this.currentPage);
+          this.addStaffShow = false;
+          this.phoneValue = "";
+          this.staffValue = "";
+          this.positionValue = "";
+        }
+      } else {
+        this.$message({ message: "请输入正确的电话号码", type: "error" });
+      }
+    },
+
+    // 编辑员工
+    editClose() {
+      this.$confirm("确认关闭?")
+        .then((_) => {
+          this.editShow = false;
+          this.phoneValue = "";
+          this.staffValue = "";
+          this.positionValue = "";
+        })
+        .catch((_) => {});
+    },
+    editCancel() {
+      this.editShow = false;
+      this.phoneValue = "";
+      this.staffValue = "";
+      this.positionValue = "";
+    },
+    handleEdit(index, row) {
+      // console.log(row);
+      this.editShow = true;
+      this.phoneValue = row.phone;
+      this.phoneVal = row.phone;
+      this.staffValue = row.staff;
+      this.positionValue = row.positionValue;
+    },
+    editSuccess() {
+      let reg_tel =
+        /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
+
+      let arrEdit = this.datas.filter((item) => {
+        return item.phone != this.phoneVal;
+      });
+      let editIndex = this.datas.findIndex((item) => {
+        return item.phone == this.phoneVal;
+      });
+      let RepeatNumber = arrEdit.some((item) => {
+        return item.phone == this.phoneValue;
+      });
+
+      if (RepeatNumber) {
+        this.$message({
+          message: "当前电话号码已存在,请换个号码输入",
+          type: "error",
+        });
+      } else if (this.staffValue.trim() == "") {
+        this.$message({ message: "输入的姓名不能为空", type: "error" });
+      } else if (this.positionValue == "") {
+        this.$message({ message: "职位不能为空", type: "error" });
+      } else {
+        if (reg_tel.test(this.phoneValue)) {
+          // console.log("电话号码符合要求");
+          let arr = {
+            phone: this.phoneValue,
+            staff: this.staffValue,
+            positionValue: this.positionValue,
+          };
+          this.datas[editIndex] = arr;
+          this.data = this.datas;
+          this.handleCurrentChange(this.currentPage);
+          this.editShow = false;
+          this.phoneValue = "";
+          this.staffValue = "";
+          this.positionValue = "";
+        } else {
+          this.$message({ message: "请输入正确的电话号码", type: "error" });
+        }
+      }
     },
   },
 };
@@ -478,14 +600,16 @@ export default {
             .info {
               display: flex;
               .user {
-                margin-right: 82px;
                 .name {
-                  margin: 21px 0 9px 0;
+                  text-align: left;
+                  padding: 12px 0;
                 }
                 .el-input {
                   width: 205px;
                   height: 38px;
-                  input {
+                  opacity: 1;
+                  margin-right: 81px;
+                  .el-input__inner {
                     color: #000;
                   }
                 }
@@ -530,16 +654,18 @@ export default {
               .el-dialog__wrapper {
                 overflow: hidden;
                 .el-dialog {
-                  width: 968px !important;
-                  margin-top: 126px !important;
-                  height: 914px;
+                  width: 555px !important;
+                  height: 377px !important;
+                  margin-top: 352px !important;
                   opacity: 1;
                   background: rgba(255, 255, 255, 1);
                   box-shadow: none;
                   .el-dialog__header {
                     height: 83px;
                     border-bottom: 1px solid rgba(230, 230, 230, 1);
-
+                    .el-dialog__headerbtn {
+                      top: 29px;
+                    }
                     span {
                       float: left;
                       font-size: 20px;
@@ -573,7 +699,7 @@ export default {
                           padding: 12px 0;
                         }
                         .el-input {
-                          width: 283px;
+                          width: 205px;
                           height: 38px;
                           opacity: 1;
                           margin-right: 81px;
@@ -606,6 +732,20 @@ export default {
                       }
                     }
                   }
+                  .el-dialog__footer {
+                    padding: 52px 30px 0 0;
+                    .el-button {
+                      width: 67px;
+                      height: 37px;
+                      padding: 0;
+                      color: #fff;
+                      background-color: rgba(41, 109, 227, 1);
+                    }
+                    .cancel {
+                      background-color: #fff;
+                      color: rgba(56, 56, 56, 1);
+                    }
+                  }
                 }
               }
 
@@ -701,7 +841,7 @@ export default {
 <style lang="scss">
 .el-message-box__wrapper {
   .el-button--primary {
-    background-color: #296de3;
+    background-color: #296de3 !important;
   }
 }
 </style>