<template>
  <div class="app-container">
    <div class="search-bx">
      <div class="search">
        <el-row :gutter="0">
          <el-input
            v-model="tableObj.getdataListParm.parammaps.serviceCode"
            placeholder="现场服务编号"
            class="filter-item"
            style="width: 120px; padding-bottom: 10px"
          />

          <el-select
            v-model="tableObj.getdataListParm.parammaps.statusName"
            placeholder="服务状态"
            class="filter-item"
            style="width: 120px"
            clearable
          >
            <el-option
              v-for="item in statusNameList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            />
          </el-select>

          <el-select
            v-model="tableObj.getdataListParm.parammaps.serviceTypeName"
            placeholder="服务类型"
            class="filter-item"
            style="width: 120px"
            clearable
          >
            <el-option
              v-for="item in servicetypeNameList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            />
          </el-select>

          <el-select
            v-model="tableObj.getdataListParm.parammaps.employeeId"
            placeholder="服务人员"
            class="filter-item"
            style="width: 120px"
            clearable
          >
            <el-option
              v-for="item in employeeNameList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            />
          </el-select>

          <!-- <el-autocomplete v-model="tableObj.getdataListParm.parammaps.customerName" :fetch-suggestions="customer_search" placeholder="客户名称" style="width: 200px;margin-right:10px" @select="change_customer_select" @clear="clear_customer_select" @blur="customer_search_blur" clearable>
                <template slot-scope="{ item }">
                  <span class="name">{{ item.name }}</span>
                </template>
              </el-autocomplete> -->

          <el-input
            v-model="tableObj.getdataListParm.parammaps.customerName"
            placeholder="客户名称"
            style="width: 180px"
            class="filter-item"
            clearable
          />

          <el-select
            v-model="tableObj.getdataListParm.parammaps.groupId"
            placeholder="集团"
            class="filter-item"
            style="width: 120px"
            clearable
          >
            <el-option
              v-for="item in groupNameList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            />
          </el-select>

          <el-date-picker
            v-model="tableObj.getdataListParm.parammaps.inputDatetime1"
            class="inputDatetime filter-item"
            type="daterange"
            range-separator="至"
            start-placeholder="服务开始日期"
            end-placeholder="服务开始日期"
            style="width: 250px"
          />

          <el-date-picker
            v-model="tableObj.getdataListParm.parammaps.inputDatetime2"
            class="inputDatetime filter-item"
            type="daterange"
            range-separator="至"
            start-placeholder="服务完成日期"
            end-placeholder="服务完成日期"
            style="width: 250px"
          />

          <el-select
            v-model="tableObj.getdataListParm.parammaps.costStatus"
            placeholder="款项状态"
            class="filter-item"
            style="width: 120px"
            clearable
          >
            <el-option
              v-for="item in moneyNameList"
              :key="item.id"
              :label="item.name"
              :value="item.id"
            />
          </el-select>

          <el-input
            v-model="tableObj.getdataListParm.parammaps.beginServiceCost"
            placeholder="服务费用"
            style="width: 90px"
            onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
          ></el-input>
          -
          <el-input
            v-model="tableObj.getdataListParm.parammaps.endServiceCost"
            placeholder="服务费用"
            style="width: 90px"
            onkeyup="this.value=this.value.replace(/[^\d.]/g,'');"
          ></el-input>

          <el-date-picker
            v-model="tableObj.getdataListParm.parammaps.inputDatetime3"
            class="inputDatetime filter-item"
            type="daterange"
            range-separator="至"
            start-placeholder="支付时间"
            end-placeholder="支付时间"
            style="width: 250px"
          />

          <el-date-picker
            v-model="tableObj.getdataListParm.parammaps.inputDatetime4"
            class="inputDatetime filter-item"
            type="daterange"
            range-separator="至"
            start-placeholder="收款时间"
            end-placeholder="收款时间"
            style="width: 250px"
          />

          <el-button class="successBorder" @click="form_search">查询</el-button>
          <el-button class="successBorder" @click="form_clear">重置</el-button>

          <el-button
            v-if="isSiteAdd"
            class="success"
            icon="el-icon-plus"
            @click="form_add"
            >新增</el-button
          >
          <el-button class="success" icon="el-icon-upload2" @click="form_export"
            >导出</el-button
          >
        </el-row>
      </div>

      <!-- <div class="operation">
          <el-row :gutter="0">
            <el-col :span="21">
              <el-button v-if="isRoleEdit" class="success" icon="el-icon-plus" @click="form_add">新增</el-button>
            </el-col>
            <el-col :span="3">
                <el-dropdown>
                  <el-button class="export">导出</el-button>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item @click.native="form_export(1)">导出模板</el-dropdown-item>
                    <el-dropdown-item @click.native="form_export(2)">导出数据</el-dropdown-item>
                  </el-dropdown-menu>
                </el-dropdown>
            </el-col>
          </el-row>

        </div> -->
    </div>

    <div class="table" height="350">
      <el-table
        :key="tableObj.tableKey"
        v-loading="tableObj.listLoading"
        element-loading-text="给我一点时间"
        :data="tableObj.list"
        border
        fit
        highlight-current-row
        style="width: 100%"
        :row-style="rowStyle"
        :cell-style="cellStyle"
        class="elTable table-fixed"
        :max-height="myHeight"
      >
        <el-table-column
          label="序号"
          align="center"
          type="index"
          width="50px"
          fixed="left"
        >
          <template slot-scope="scope">
            <span>{{
              scope.$index + (tableObj.pageNum - 1) * tableObj.pageSize + 1
            }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="现场服务编号"
          min-width="120px"
          align="center"
          show-overflow-tooltip
          fixed="left"
        >
          <template slot-scope="scope">
            <span
              style="color: #409eff; cursor: pointer"
              @click="form_see(scope.row)"
              >{{ scope.row.serviceCode }}</span
            >
          </template>
        </el-table-column>
        <el-table-column
          label="服务状态"
          min-width="90px"
          align="center"
          fixed="left"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.statusName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="客户名称"
          min-width="120px"
          align="center"
          show-overflow-tooltip
          fixed="left"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.customerName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="所属集团"
          min-width="90px"
          align="center"
          fixed="left"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.groupName }}</span>
          </template>
        </el-table-column>

        <el-table-column
          label="接待人"
          min-width="110px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.receiverName }}</span>
          </template>
        </el-table-column>
        <el-table-column label="接待人电话" min-width="120px" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.receiverTel }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="款项状态"
          min-width="110px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.costStatus }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务费用"
          min-width="110px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.serviceCost }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="支付时间"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.payDate }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="收款时间"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.collectDate }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务类型"
          min-width="110px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.serviceTypeName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务开始时间"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.serviceBeginDate }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务完成时间"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.serviceSuccessDate }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务人员"
          min-width="110px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.employeeName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务描述"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.describe }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="备注"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.remark }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="拜访记录关联"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.visitName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="回访记录关联"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.telvisitName }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="服务总结"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.serviceSummary }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="录入时间"
          min-width="120px"
          align="center"
          show-overflow-tooltip
        >
          <template slot-scope="scope">
            <span>{{ scope.row.createrDate }}</span>
          </template>
        </el-table-column>

        <el-table-column
          label="操作"
          align="center"
          :width="autoWidth"
          v-if="autoWidth !== 0"
          class-name="small-padding fixed-width"
          fixed="right"
        >
          <template slot-scope="{ row }">
            <el-button
              class="miniPrimary"
              @click="form_see(row)"
              v-if="isSiteFeed && row.isFeedBack == '1'"
              >服务反馈</el-button
            >
            <el-button
              class="miniSuccess"
              @click="form_edit(row)"
              v-if="isSiteAdd && row.isModify == '1'"
              >编辑</el-button
            >
            <el-button
              class="miniDanger"
              @click="form_delete(row)"
              v-if="isSiteAdd && row.isDel == '1'"
              >删除</el-button
            >
            <el-button
              class="miniSuccess"
              @click="form_complete(row)"
              v-if="isSiteComplete && row.isComplete == '1'"
              >完成</el-button
            >

            <el-button
              class="miniSuccess"
              @click="form_revoke(row)"
              v-if="isSiteAdd && row.isRevoke == '1'"
              >撤销</el-button
            >
          </template>
        </el-table-column>
      </el-table>

      <el-row :gutter="0">
        <el-col :span="6" :offset="12" style="color: #f00">
          列表服务总金额：{{ tableSumMoney }}
        </el-col>
      </el-row>

      <pagination
        v-show="tableObj.total >= 0"
        :total="tableObj.total"
        :page.sync="tableObj.getdataListParm.offset"
        :limit.sync="tableObj.getdataListParm.pagecount"
        @pagination="get_table_data"
      />
    </div>

    <!-- 新增/编辑 -->
    <el-dialog
      :title="textMap[create.dialogStatus]"
      :visible.sync="create.dialogFormVisible"
      :close-on-click-modal="false"
      width="60%"
    >
      <div class="app-add">
        <el-form
          ref="temp"
          :rules="create.rules"
          :model="create.temp"
          label-position="right"
          label-width="150px"
          style="width: 80%; margin: 0 auto 50px"
        >
          <el-row>
            <el-col :span="12">
              <!-- <el-form-item label="所属集团：" prop="groupId">
                  <el-select v-model="create.temp.groupId" placeholder="所属集团" class="filter-item" style="width: 100%;" filterable  @change="change_group" clearable :disabled="create.dialogStatus=='see' || create.dialogStatus=='update' " >
                      <el-option v-for="item in groupNameList" :key="item.id" :label="item.name" :value="item.id" />
                  </el-select>
              </el-form-item> -->

              <el-form-item label="客户名称：" prop="customerId">
                <el-select
                  v-model="create.temp.customerId"
                  filterable
                  placeholder="客户名称"
                  class="filter-item"
                  style="width: 100%"
                  clearable
                  @change="change_customer"
                  :disabled="
                    create.dialogStatus == 'see' ||
                    create.dialogStatus == 'update'
                  "
                >
                  <el-option
                    v-for="item in create.customerNameList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="集团：" prop="groupName">
                <el-input
                  ref="groupName"
                  v-model="create.temp.groupName"
                  class="filter-item"
                  style="width: 100%"
                  disabled
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="接待人：" prop="receiverName">
                <el-input
                  ref="receiverName"
                  v-model="create.temp.receiverName"
                  class="filter-item"
                  style="width: 100%"
                  placeholder="请输入接待人"
                  :disabled="create.dialogStatus == 'see'"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="接待人电话：" prop="receiverTel">
                <el-input
                  ref="receiverTel"
                  v-model="create.temp.receiverTel"
                  class="filter-item"
                  style="width: 100%"
                  maxlength="11"
                  placeholder="请输入"
                  :disabled="create.dialogStatus == 'see'"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="服务类型：" prop="serviceTypeName">
                <el-select
                  ref="serviceTypeName"
                  v-model="create.temp.serviceTypeName"
                  filterable
                  placeholder="请选择服务类型"
                  class="filter-item"
                  style="width: 100%"
                  :disabled="create.dialogStatus == 'see'"
                >
                  <el-option
                    v-for="item in servicetypeNameList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="服务开始时间：" prop="serviceBeginDate">
                <el-date-picker
                  v-model="create.temp.serviceBeginDate"
                  type="date"
                  placeholder="选择日期"
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                  style="width: 100%"
                  :clearable="false"
                  :disabled="create.dialogStatus == 'see'"
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="24">
              <!-- <el-form-item label="服务人员：" prop="employeeId">
                <el-select ref="employeeId" v-model="create.temp.employeeId" filterable placeholder="请选择服务人员" class="filter-item" style="width: 100%;" :disabled="create.dialogStatus=='see'">
                  <el-option v-for="item in employeeNameList" :key="item.id" :label="item.name" :value="item.id" />
                </el-select>
              </el-form-item> -->

              <el-form-item label="服务人员：" prop="employeeName">
                <el-input
                  ref="employeeName"
                  v-model="create.temp.employeeName"
                  placeholder=""
                  class="filter-item"
                  style="width: 100%"
                  disabled
                />
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="拜访记录关联：" prop="visitId">
                <el-select
                  ref="visitId"
                  v-model="create.temp.visitId"
                  filterable
                  placeholder="请选择拜访记录 "
                  class="filter-item"
                  style="width: 100%"
                  :disabled="create.dialogStatus == 'see'"
                >
                  <el-option
                    v-for="item in create.visitNameList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="回访记录关联：" prop="telvisitId">
                <el-select
                  ref="telvisitId"
                  v-model="create.temp.telvisitId"
                  filterable
                  placeholder="请选回访记录关联 "
                  class="filter-item"
                  style="width: 100%"
                  :disabled="create.dialogStatus == 'see'"
                >
                  <el-option
                    v-for="item in create.telvisitNameList"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="备注：" prop="remark">
                <el-input
                  ref="remark"
                  v-model="create.temp.remark"
                  type="textarea"
                  :autosize="{ minRows: 1.3, maxRows: 4 }"
                  placeholder="请输入备注，最多255个字"
                  maxlength="255"
                  class="filter-item"
                  style="width: 100%"
                  :disabled="create.dialogStatus == 'see'"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="定位：" prop="location">
                <el-input
                  ref="location"
                  v-model="create.temp.location"
                  class="filter-item"
                  style="width: 100%"
                  disabled
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="服务描述：" prop="describe">
                <el-input
                  ref="describe"
                  v-model="create.temp.describe"
                  type="textarea"
                  :autosize="{ minRows: 1.3, maxRows: 4 }"
                  placeholder="请输入服务描述"
                  maxlength="255"
                  class="filter-item"
                  style="width: 100%"
                  :disabled="create.dialogStatus == 'see'"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="现场照片：" prop="scenePhoto1">
                <el-upload
                  id="uploadPic"
                  list-type="picture-card"
                  class="uploadPic"
                  :action="uploadImageUrl"
                  :limit="9"
                  :headers="headers"
                  :file-list="fileList"
                  :on-preview="handlePicPreview"
                  :auto-upload="true"
                  :on-change="
                    (file, fileList) => {
                      return handlePicChange(file, fileList);
                    }
                  "
                  :on-success="
                    (response, file, fileList) => {
                      return handlePicSuccess(response, file, fileList);
                    }
                  "
                  :on-remove="
                    (file, fileList) => {
                      return handlePicRemove(file, fileList);
                    }
                  "
                >
                  <i slot="default" class="el-icon-plus"></i>
                </el-upload>
                <el-dialog
                  :visible.sync="dialogVisible"
                  append-to-body
                  width="40%"
                >
                  <img width="80%" :src="dialogImageUrl" alt="" />
                </el-dialog>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-col :span="12">
              <el-form-item label="服务单照片：" prop="serviceCodePhoto">
                <el-upload
                  id="uploadPic2"
                  list-type="picture-card"
                  :action="uploadImageUrl"
                  :limit="1"
                  :headers="headers"
                  :file-list="fileList2"
                  :on-preview="handlePicPreview2"
                  :auto-upload="true"
                  :on-change="
                    (file, fileList) => {
                      return handlePicChange2(file, fileList);
                    }
                  "
                  :on-success="
                    (response, file, fileList) => {
                      return handlePicSuccess2(response, file, fileList);
                    }
                  "
                  :on-remove="
                    (file, fileList) => {
                      return handlePicRemove2(file, fileList);
                    }
                  "
                >
                  <i slot="default" class="el-icon-plus"></i>
                </el-upload>
                <el-dialog
                  :visible.sync="dialogVisible2"
                  append-to-body
                  width="40%"
                >
                  <img width="100%" :src="dialogImageUrl2" alt="" />
                </el-dialog>
              </el-form-item>
            </el-col>
          </el-row>

          <div v-for="(item, index) in tableArrList">
            <el-row>
              <el-divider></el-divider>
              备货单号：{{ item.title }}
              <el-button
                class="miniDanger"
                @click="form_deleteCode(item, index)"
                >删除</el-button
              >
            </el-row>
            <el-row>
              <el-table
                :key="item.tableKey"
                :data="item.tablelist"
                border
                fit
                highlight-current-row
                style="width: 100%"
                :row-style="rowStyle"
                :cell-style="cellStyle"
                class="elTable table-fixed"
              >
                <el-table-column
                  label="序号"
                  align="center"
                  type="index"
                  width="50px"
                >
                  <template slot-scope="scope">
                    <span>{{ scope.$index + 1 }}</span>
                  </template>
                </el-table-column>
                <el-table-column
                  label="产品名称"
                  min-width="110px"
                  align="center"
                >
                  <template slot-scope="scope">
                    <span>{{ scope.row.pname }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="型号" min-width="110px" align="center">
                  <template slot-scope="scope">
                    <span>{{ scope.row.model }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="规格" min-width="110px" align="center">
                  <template slot-scope="scope">
                    <span>{{ scope.row.Specifications }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="数量" min-width="110px" align="center">
                  <template slot-scope="scope">
                    <span v-if="create.dialogStatus == 'see'">{{
                      scope.row.nums
                    }}</span>
                    <el-input
                      v-if="
                        create.dialogStatus == 'update' ||
                        create.dialogStatus == 'create'
                      "
                      v-model="scope.row.nums"
                      style="width: 95%; padding: 10px 0"
                    />
                  </template>
                </el-table-column>

                <el-table-column label="备注" min-width="280px" align="center">
                  <template slot-scope="scope">
                    <span v-if="create.dialogStatus == 'see'">{{
                      scope.row.remark
                    }}</span>
                    <el-input
                      v-if="
                        create.dialogStatus == 'update' ||
                        create.dialogStatus == 'create'
                      "
                      v-model="scope.row.remark"
                      type="textarea"
                      :autosize="{ minRows: 1.3, maxRows: 4 }"
                      style="width: 95%; padding: 10px 0"
                    />
                  </template>
                </el-table-column>
                <el-table-column
                  v-if="
                    create.dialogStatus == 'update' ||
                    create.dialogStatus == 'create'
                  "
                  label="操作"
                  align="center"
                  width="110"
                  class-name="small-padding fixed-width"
                  fixed="right"
                >
                  <template slot-scope="{ row }">
                    <el-button
                      v-if="
                        create.dialogStatus == 'update' ||
                        create.dialogStatus == 'create'
                      "
                      class="miniDanger"
                      @click="form_delete2(row, index)"
                      >删除</el-button
                    >
                  </template>
                </el-table-column>
              </el-table>
            </el-row>
          </div>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button
            class="cancelClose"
            @click="
              create.dialogFormVisible = false;
              get_table_data();
            "
            >关闭</el-button
          >
          <el-button
            v-if="
              create.dialogStatus === 'create' ||
              create.dialogStatus === 'update'
            "
            class="success"
            :disabled="isokDisable"
            @click="
              create.dialogStatus === 'create'
                ? add_dialog_save()
                : form_edit_save()
            "
            >确认</el-button
          >
        </div>
      </div>
    </el-dialog>

    <!-- 查看/反馈 -->
    <el-dialog
      title="现场服务详情"
      :visible.sync="createSee.dialogFormVisible"
      :close-on-click-modal="false"
      width="95%"
    >
      <div class="app-add">
        <el-form
          ref="createSeetemp"
          :rules="createSee.rules"
          :model="create.temp"
          label-position="right"
          label-width="150px"
          style="width: 100%; margin: 0 auto 50px"
        >
          <el-row :gutter="25">
            <el-col :span="16">
              <el-row>
                <el-col :span="12">
                  <el-form-item label="服务编号：" prop="serviceCode">
                    <el-input
                      ref="serviceCode"
                      v-model="createSee.temp.serviceCode"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="服务人员：" prop="employeeName">
                    <el-input
                      ref="employeeName"
                      v-model="createSee.temp.employeeName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="所属集团：" prop="groupName">
                    <el-input
                      ref="groupName"
                      v-model="createSee.temp.groupName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="客户名称：" prop="customerName">
                    <el-input
                      ref="customerName"
                      v-model="createSee.temp.customerName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="接待人：" prop="receiverName">
                    <el-input
                      ref="receiverName"
                      v-model="createSee.temp.receiverName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="接待人电话：" prop="receiverTel">
                    <el-input
                      ref="receiverTel"
                      v-model="createSee.temp.receiverTel"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="服务类型：" prop="serviceTypeName">
                    <el-input
                      ref="serviceTypeName"
                      v-model="createSee.temp.serviceTypeName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="服务开始时间：" prop="serviceBeginDate">
                    <el-input
                      ref="serviceBeginDate"
                      v-model="createSee.temp.serviceBeginDate"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="拜访记录关联：" prop="visitName">
                    <el-input
                      ref="visitName"
                      v-model="createSee.temp.visitName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="回访记录关联：" prop="telvisitName">
                    <el-input
                      ref="telvisitName"
                      v-model="createSee.temp.telvisitName"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="12">
                  <el-form-item label="备注：" prop="remark">
                    <el-input
                      ref="remark"
                      v-model="createSee.temp.remark"
                      type="textarea"
                      :autosize="{ minRows: 1.3, maxRows: 4 }"
                      maxlength="255"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="定位：" prop="location">
                    <el-input
                      ref="location"
                      v-model="createSee.temp.location"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-col :span="24">
                  <el-form-item label="服务描述：" prop="describe">
                    <el-input
                      ref="describe"
                      v-model="createSee.temp.describe"
                      type="textarea"
                      :autosize="{ minRows: 1.3, maxRows: 4 }"
                      placeholder="请输入服务描述"
                      maxlength="255"
                      class="filter-item"
                      style="width: 100%"
                      disabled
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row>
                <el-form-item label="现场照片：" prop="scenePhoto1">
                  <div
                    style="display: inline-block; margin-right: 10px"
                    v-for="(item, index) in fileList"
                  >
                    <el-image
                      style="width: 150px; height: 150px; display: inline-block"
                      :src="item.url"
                      @click="handlePicPreview(item)"
                    ></el-image>
                  </div>

                  <el-dialog
                    :visible.sync="dialogVisible"
                    append-to-body
                    width="40%"
                  >
                    <img width="80%" :src="dialogImageUrl" alt="" />
                  </el-dialog>
                </el-form-item>
              </el-row>

              <el-row>
                <el-form-item label="服务单照片：" prop="serviceCodePhoto">
                  <div
                    style="display: inline-block; margin-right: 10px"
                    v-for="(item, index) in fileList2"
                  >
                    <el-image
                      style="width: 150px; height: 150px; display: inline-block"
                      :src="item.url"
                      @click="handlePicPreview2(item)"
                    ></el-image>
                  </div>
                  <el-dialog
                    :visible.sync="dialogVisible2"
                    append-to-body
                    width="40%"
                  >
                    <img width="100%" :src="dialogImageUrl2" alt="" />
                  </el-dialog>
                </el-form-item>
              </el-row>
            </el-col>

            <el-col :span="8">
              <h3>反馈记录</h3>
              <el-row>
                <div v-for="item in feedRecordList">
                  <div>
                    <span>{{ item.num }}</span>
                    <span>{{ item.remark }}</span>
                  </div>
                  <el-row type="flex" justify="end">
                    <el-col :span="6">
                      {{ item.createDate }}
                    </el-col>
                    <el-col :span="6"> 反馈人：{{ item.employeeName }} </el-col>
                  </el-row>
                  <el-divider></el-divider>
                </div>

                <el-input
                  type="textarea"
                  :rows="4"
                  placeholder="请输入内容"
                  v-model="feedRecordTemp.parammaps.remark"
                >
                </el-input>

                <el-button class="success" @click="feedRecord_save()"
                  >确认</el-button
                >
              </el-row>
            </el-col>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button
            class="cancelClose"
            @click="
              createSee.dialogFormVisible = false;
              get_table_data();
            "
            >关闭</el-button
          >

          <el-button
            class="success"
            @click="form_complete(createSee.temp)"
            v-if="isSiteComplete && createSee.temp.isComplete == '1'"
            >完成服务</el-button
          >
        </div>
      </div>
    </el-dialog>

    <!-- 完成 -->
    <el-dialog
      title="确认是否完成"
      :visible.sync="complete.dialogFormVisible"
      :close-on-click-modal="false"
      width="40%"
      :before-close="dialog_complete_close"
    >
      <div class="app-add">
        <el-form
          ref="completetemp"
          :rules="complete.rules"
          :model="complete.temp"
          label-position="right"
          label-width="150px"
          style="width: 80%; margin: 0 auto 50px"
        >
          <el-form-item label="款项状态：" prop="costStatus">
            <el-select
              ref="costStatus"
              v-model="complete.temp.costStatus"
              class="filter-item"
              style="width: 100%"
              @change="change_money_status"
              allow-create
            >
              <el-option
                v-for="item in moneyStatusList"
                :key="item.id"
                :label="item.name"
                :value="item.id"
              />
            </el-select>
          </el-form-item>

          <el-form-item label="服务费用：" prop="serviceCost" v-if="moneyShow">
            <el-input
              ref="serviceCost"
              v-model="complete.temp.serviceCost"
              class="filter-item"
              style="width: 95%"
            />元
          </el-form-item>

          <el-form-item label="支付时间：" prop="payDate" v-if="moneyShow">
            <el-date-picker
              v-model="complete.temp.payDate"
              type="date"
              placeholder="选择日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              style="width: 100%"
              :clearable="false"
            />
          </el-form-item>

          <el-form-item label="服务总结：" prop="remark">
            <el-input
              ref="remoteSummary"
              v-model="complete.temp.remoteSummary"
              type="textarea"
              :autosize="{ minRows: 1.3, maxRows: 5 }"
              :rows="3"
              placeholder="请输入服务总结，最多255个字"
              maxlength="255"
              class="filter-item"
              style="width: 100%"
            />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button class="cancelClose" @click="dialog_complete_close()"
            >关闭</el-button
          >

          <el-button class="success" @click="form_complete_save()"
            >确认</el-button
          >
        </div>
      </div>
    </el-dialog>

    <!-- 撤销 -->
    <el-dialog
      title="确认是否撤销"
      :visible.sync="revoke.dialogFormVisible"
      :close-on-click-modal="false"
      width="60%"
    >
      <div class="app-add">
        <el-form
          ref="revoketemp"
          :rules="revoke.rules"
          :model="revoke.temp"
          label-position="right"
          label-width="150px"
          style="width: 80%; margin: 0 auto 50px"
        >
          <el-form-item label="撤销原因：" prop="revokeReason">
            <el-input
              ref="remark"
              v-model="revoke.temp.revokeReason"
              type="textarea"
              :autosize="{ minRows: 4, maxRows: 8 }"
              :rows="8"
              placeholder="请输入备注，最多200个字"
              maxlength="200"
              class="filter-item"
              style="width: 100%"
            />
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button
            class="cancelClose"
            @click="
              revoke.dialogFormVisible = false;
              get_table_data();
            "
            >关闭</el-button
          >
          <el-button class="success" @click="form_revoke_save()"
            >确认</el-button
          >
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  GetDataByName,
  PostDataByName,
  failproccess,
  ExecDataByConfig,
  GetDataByNames,
  checkButtons,
  calculativeWidth,
  wxpush,
} from "@/api/common";
import Cookies from "js-cookie";
import { parseTime, json2excel } from "@/utils/index.js";
// import littleTable from './components/littleTable'
import { getToken } from "@/utils/auth";
import Pagination from "@/components/Pagination";
import { MessageBox } from "element-ui";
export default {
  name: "SiteService",
  components: { Pagination },
  data() {
    return {
      myHeight: document.documentElement.clientHeight - 85 - 220,
      employeid: Cookies.get("employeid"),
      disabled: false,

      dialogImageUrl: "",
      dialogVisible: false,
      dialogImageUrl2: "",
      dialogVisible2: false,

      rowData: {},
      isHome: "",

      //图片请求地址
      uploadImageUrl: process.env.VUE_APP_BASE_API + "authdata/uploaderimage",
      //图片请求头
      headers: {
        optname: "insertcustompic",
        id: 1,
        token: getToken(), // 从cookie里获取token，并赋值token
      },
      //图片路径
      fileList: [],
      fileList2: [],

      isRoleEdit: [],
      isSiteAdd: [],
      isSiteFeed: [],
      isSiteComplete: [],

      send_select_list: [
        { name: "getCustomerSelect", offset: 0, pagecount: 0, parammaps: {} },
        {
          name: "getDictListSelect1",
          offset: 0,
          pagecount: 0,
          parammaps: { pid: "54" },
        },
        { name: "getEmployeesSelect", offset: 0, pagecount: 0, parammaps: {} },
        {
          name: "getDictListSelect4",
          offset: 0,
          pagecount: 0,
          parammaps: { pid: "61" },
        },
      ],

      customerNameList: [], // 客户名称
      groupNameList: [], // 集团
      employeeNameList: [], // 服务人员

      // 下拉框 - 服务类型
      servicetypeNameList: [
        { name: "安装", id: "安装" },
        { name: "更换", id: "更换" },
        { name: "维修", id: "维修" },
        { name: "培训", id: "培训" },
      ],

      // 下拉框 - 服务状态
      statusNameList: [
        { name: "服务中", id: "服务中" },
        { name: "已完成", id: "已完成" },
        { name: "已撤销", id: "已撤销" },
        { name: "超时", id: "超时" },
      ],

      // 下拉框 - 款项状态
      moneyNameList: [
        { name: "未收款", id: "未收款" },
        { name: "已收款", id: "已收款" },
        { name: "无需收款", id: "无需收款" },
      ],

      // 下拉框 - 款项状态
      moneyStatusList: [
        { name: "需要收款", id: "需要收款" },
        { name: "无需收款", id: "无需收款" },
      ],

      //表格 - 列表 - 查询
      tableObj: {
        getdataListParm: {
          name: "getService",
          page: 1,
          offset: 1,
          pagecount: parseInt(Cookies.get("pagecount")),
          returntype: "Map",
          parammaps: {
            roleId: Cookies.get("g_roleId"),
            userId: Cookies.get("g_userId"),
            serviceCode: "",
            customerName: "",
            customerId: "",
            groupId: "",
            statusName: "",
            employeeId: "",
            serviceTypeName: "",
            costStatus: "",
            beginServiceCost: "",
            endServiceCost: "",

            inputDatetime1: "",
            inputDatetime2: "",
            inputDatetime3: "",
            inputDatetime4: "",

            beginServiceBeginDate: "",
            endServiceBeginDate: "",
            beginServiceSuccessDate: "",
            endServiceSuccessDate: "",
            beginPayDate: "",
            endPayDate: "",
            beginCollectDate: "",
            endCollectDate: "",
          },
        },
        tableKey: 0,
        list: [],
        total: 0,
        listLoading: true,
        temp: {},
      },

      tableSumMoney: 1000,

      download: {
        getdataListParm: {
          name: "getService",
          page: 1,
          offset: 1,
          pagecount: 0,
          returntype: "Map",
          parammaps: {
            roleId: Cookies.get("g_roleId"),
            userId: Cookies.get("g_userId"),
            serviceCode: "",
            customerName: "",
            customerId: "",
            groupId: "",
            statusName: "",
            employeeId: "",
            serviceTypeName: "",
            costStatus: "",
            beginServiceCost: "",
            endServiceCost: "",

            inputDatetime1: "",
            inputDatetime2: "",
            inputDatetime3: "",
            inputDatetime4: "",

            beginServiceBeginDate: "",
            endServiceBeginDate: "",
            beginServiceSuccessDate: "",
            endServiceSuccessDate: "",
            beginPayDate: "",
            endPayDate: "",
            beginCollectDate: "",
            endCollectDate: "",
          },
        },
        tableKey: 0,
        list: [],
        total: 0,
        listLoading: true,
        temp: {},
      },

      // 新增/编辑
      create: {
        dialogFormVisible: false,
        dialogStatus: "",
        temp: {
          customerId: "",
          groupId: "",
          groupName: "",
          serviceCode: "",
          serviceBeginDate: parseTime(new Date(), "{y}-{m}-{d}"),
          employeeId: "",
          serviceTypeName: "",
          receiverId: "",
          receiverTel: "",
          receiverName: "",
          describe: "",
          serviceResult: "",
          visitId: "",
          telvisitId: "",
          stockupIds: "",
          remark: "",
          id: "",
          modifyName: "add",
          receiverChoose: "true",
          scenePhoto1: -1,
          scenePhoto2: -1,
          scenePhoto3: -1,
          scenePhoto4: -1,
          scenePhoto5: -1,
          scenePhoto6: -1,
          scenePhoto7: -1,
          scenePhoto8: -1,
          scenePhoto9: -1,
          serviceCodePhoto: -1,
          picname1: "",
          picname2: "",
          picname3: "",
          picname4: "",
          picname5: "",
          picname6: "",
          picname7: "",
          picname8: "",
          picname9: "",
          location: "",
        },

        rules: {
          customerId: [{ required: true, message: "必填", trigger: "blur" }],
          // groupId: [{ required: true, message: '必填', trigger: 'blur' }],
          serviceCode: [{ required: true, message: "必填", trigger: "blur" }],
          serviceBeginDate: [
            { required: true, message: "必填", trigger: "blur" },
          ],
          serviceTypeName: [
            { required: true, message: "必填", trigger: "blur" },
          ],
          serviceResult: [{ required: true, message: "必填", trigger: "blur" }],
          describe: [{ required: true, message: "必填", trigger: "blur" }],
          receiverName: [{ required: true, message: "必填", trigger: "blur" }],
          receiverTel: [{ required: true, message: "必填", trigger: "blur" }],

          scenePhoto1: [{ required: true, message: "必填", trigger: "blur" }],
          serviceCodePhoto: [
            { required: true, message: "必填", trigger: "blur" },
          ],
        },
        // 客户名称
        getdataListParmCust: {
          name: "getCustomerByGroupId",
          returntype: "Map",
          parammaps: { groupId: "" },
        },
        customerNameList: [],
        // 接待人
        getdataListParm0: {
          name: "getContacts",
          page: 1,
          offset: 1,
          pagecount: 10,
          returntype: "Map",
          parammaps: { customerId: "" },
        },
        // 接待人电话
        getdataListParm01: {
          name: "getTelById",
          page: 1,
          offset: 1,
          pagecount: 10,
          returntype: "Map",
          parammaps: { id: "" },
        },
        receiverNameList: [], // 接待人

        // 发货清单
        getdataListParm1: {
          name: "getStockGoodsByCustomerId",
          page: 1,
          offset: 1,
          pagecount: 10,
          returntype: "Map",
          parammaps: { customerId: "" },
        },
        postalNameList: [], //发货清单

        // 弹窗里的表格，关联发货清单时调用
        getdataListParm3: {
          name: "getStockGoodsBySid",
          page: 1,
          offset: 1,
          pagecount: 10,
          returntype: "Map",
          parammaps: { stockupId: "" },
        },

        // 拜访记录
        getdataListParm5: {
          name: "getVisitByCustomerId",
          page: 1,
          offset: 1,
          pagecount: 10,
          returntype: "Map",
          parammaps: { customerId: "" },
        },
        visitNameList: [], //拜访记录
        // 回访记录
        getdataListParm6: {
          name: "getTelvisitByCustomerId",
          page: 1,
          offset: 1,
          pagecount: 10,
          returntype: "Map",
          parammaps: { customerId: "" },
        },
        telvisitNameList: [], //回访记录
      },

      // 查看/反馈
      createSee: {
        dialogFormVisible: false,
        dialogStatus: "",
        temp: {
          customerId: "",
          groupId: "",
          groupName: "",
          serviceCode: "",
          serviceBeginDate: parseTime(new Date(), "{y}-{m}-{d}"),
          employeeId: "",
          serviceTypeName: "",
          receiverId: "",
          receiverTel: "",
          receiverName: "",
          describe: "",
          serviceResult: "",
          visitId: "",
          telvisitId: "",
          stockupIds: "",
          remark: "",
          id: "",
          modifyName: "add",
          receiverChoose: "true",
          scenePhoto1: -1,
          scenePhoto2: -1,
          scenePhoto3: -1,
          scenePhoto4: -1,
          scenePhoto5: -1,
          scenePhoto6: -1,
          scenePhoto7: -1,
          scenePhoto8: -1,
          scenePhoto9: -1,
          serviceCodePhoto: -1,
          picname1: "",
          picname2: "",
          picname3: "",
          picname4: "",
          picname5: "",
          picname6: "",
          picname7: "",
          picname8: "",
          picname9: "",
          location: "",
        },

        rules: {},
      },
      textMap: {
        create: "新增",
        see: "查看",
        update: "编辑",
      },

      //备货ID集合
      stockupIdArr: [],
      //备货表格集合
      tableArrList: [],

      // 撤销
      revoke: {
        dialogFormVisible: false,
        dialogStatus: "",
        temp: { revokeReason: "", id: "" },
        rules: {
          revokeReason: [{ required: true, message: "必填", trigger: "blur" }],
        },
      },

      // 完成
      complete: {
        dialogFormVisible: false,
        dialogStatus: "",
        temp: {
          costStatus: "需要收款",
          serviceCost: "",
          payDate: "",
          remoteSummary: "",
          id: "",
        },
        rules: {
          // revokeReason: [{ required: true, message: '必填', trigger: 'blur' }],
        },
      },
      moneyShow: true,
      //获取反馈记录
      getFeedRecordParm: {
        name: "getServiceFeedbackById",
        page: 1,
        offset: 1,
        pagecount: 10,
        returntype: "Map",
        parammaps: { id: "" },
      },
      //保存反馈记录
      feedRecordTemp: {
        name: "insertServiceFeedback",
        page: 1,
        offset: 1,
        pagecount: 1000,
        returntype: "Map",
        parammaps: {
          serviceId: "",
          createrId: "",
          remark: "",
        },
      },
      //反馈记录
      feedRecordList: [
        // {id:1, num: 1, txt: '主板缺失零件，疫情关系，无法采购，延期1天',   director:'epans', date:"2022-12-01"},
        // {id:1, num: 1, txt: '主板缺失零件，疫情关系，无法采购，延期1天',   director:'epans', date:"2022-12-01"},
        // {id:1, num: 1, txt: '主板缺失零件，疫情关系，无法采购，延期1天',   director:'epans', date:"2022-12-01"},
      ],
      autoWidth: 130,
      requestParam: {},
      isokDisable: false,
      selectList: [],
      rowStyle: { maxHeight: 50 + "px", height: 45 + "px" },
      cellStyle: { padding: 0 + "px" },
    };
  },

  created() {
    this.get_select_list();
    this.get_auto_buttons();

    var rowData = this.$route.params.rowData;
    var isHome = this.$route.params.isHome;
    var codeNum = this.$route.params.codeNum;

    console.log(
      "rowData",
      rowData,
      "======isHome",
      isHome,
      "======codeNum",
      codeNum
    );

    if (isHome == "home") {
      this.rowData = rowData;
      this.isHome = isHome;
      this.tableObj.getdataListParm.parammaps.serviceCode = codeNum;
      this.get_table_data();
    } else {
      this.rowData = {};
      this.isHome = "";
      this.codeNum = "";
      this.tableObj.getdataListParm.parammaps.serviceCode = "";
      this.get_table_data();
    }
  },

  methods: {
    //图片展示
    handlePicPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    handlePicChange(file, fileList) {},
    //文件上传成功后的操作
    handlePicSuccess(response, file, fileList) {
      console.log("文件上传成功时的钩子response", response);
      console.log("文件上传成功时的钩子file", file);
      console.log("fileList", fileList);

      //3张图片时，关闭新增的按钮
      if (fileList.length == 9) {
        document.getElementById("uploadPic").lastChild.style.display = "none";
      } else {
        document.getElementById("uploadPic").lastChild.style.display =
          "inline-block";
      }

      if (
        this.create.temp.scenePhoto1 === undefined ||
        this.create.temp.scenePhoto1 == -1
      ) {
        console.log("111");
        this.create.temp.scenePhoto1 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto2 === undefined ||
        this.create.temp.scenePhoto2 == -1
      ) {
        console.log("222");
        this.create.temp.scenePhoto2 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto3 === undefined ||
        this.create.temp.scenePhoto3 == -1
      ) {
        console.log("333");
        this.create.temp.scenePhoto3 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto4 === undefined ||
        this.create.temp.scenePhoto4 == -1
      ) {
        console.log("444");
        this.create.temp.scenePhoto4 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto5 === undefined ||
        this.create.temp.scenePhoto5 == -1
      ) {
        console.log("555");
        this.create.temp.scenePhoto5 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto6 === undefined ||
        this.create.temp.scenePhoto6 == -1
      ) {
        console.log("666");
        this.create.temp.scenePhoto6 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto7 === undefined ||
        this.create.temp.scenePhoto7 == -1
      ) {
        console.log("777");
        this.create.temp.scenePhoto7 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto8 === undefined ||
        this.create.temp.scenePhoto8 == -1
      ) {
        console.log("888");
        this.create.temp.scenePhoto8 = response.execresult.LastInsertId;
      } else if (
        this.create.temp.scenePhoto9 === undefined ||
        this.create.temp.scenePhoto9 == -1
      ) {
        console.log("999");
        this.create.temp.scenePhoto9 = response.execresult.LastInsertId;
      }
      console.log("this.picArr1", this.picArr1);

      console.log("this.create.temp", this.create.temp);
    },
    //图片文件删除
    handlePicRemove(file, fileList) {
      console.log(file, "文件列表移除文件时的钩子file---");
      console.log(fileList, "文件列表移除文件时的钩子fileList--");
      // this.$set(this.create.temp, "scenePhoto1", -1)
      // this.$set(this.create.temp, "scenePhoto2", -1)
      // this.$set(this.create.temp, "scenePhoto3", -1)
      //9张图片时，关闭新增的按钮
      if (fileList.length == 9) {
        document.getElementById("uploadPic").lastChild.style.display = "none";
      } else {
        document.getElementById("uploadPic").lastChild.style.display =
          "inline-block";
      }
      this.create.temp.scenePhoto1 = -1;
      this.create.temp.scenePhoto2 = -1;
      this.create.temp.scenePhoto3 = -1;
      this.create.temp.scenePhoto4 = -1;
      this.create.temp.scenePhoto5 = -1;
      this.create.temp.scenePhoto6 = -1;
      this.create.temp.scenePhoto7 = -1;
      this.create.temp.scenePhoto8 = -1;
      this.create.temp.scenePhoto9 = -1;
      if (fileList.length == 9) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
        this.create.temp.scenePhoto4 =
          fileList[3].response.execresult.LastInsertId;
        this.create.temp.scenePhoto5 =
          fileList[4].response.execresult.LastInsertId;
        this.create.temp.scenePhoto6 =
          fileList[5].response.execresult.LastInsertId;
        this.create.temp.scenePhoto7 =
          fileList[6].response.execresult.LastInsertId;
        this.create.temp.scenePhoto8 =
          fileList[7].response.execresult.LastInsertId;
        this.create.temp.scenePhoto9 =
          fileList[8].response.execresult.LastInsertId;
      } else if (fileList.length == 8) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
        this.create.temp.scenePhoto4 =
          fileList[3].response.execresult.LastInsertId;
        this.create.temp.scenePhoto5 =
          fileList[4].response.execresult.LastInsertId;
        this.create.temp.scenePhoto6 =
          fileList[5].response.execresult.LastInsertId;
        this.create.temp.scenePhoto7 =
          fileList[6].response.execresult.LastInsertId;
        this.create.temp.scenePhoto8 =
          fileList[7].response.execresult.LastInsertId;
      } else if (fileList.length == 7) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
        this.create.temp.scenePhoto4 =
          fileList[3].response.execresult.LastInsertId;
        this.create.temp.scenePhoto5 =
          fileList[4].response.execresult.LastInsertId;
        this.create.temp.scenePhoto6 =
          fileList[5].response.execresult.LastInsertId;
        this.create.temp.scenePhoto7 =
          fileList[6].response.execresult.LastInsertId;
      } else if (fileList.length == 6) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
        this.create.temp.scenePhoto4 =
          fileList[3].response.execresult.LastInsertId;
        this.create.temp.scenePhoto5 =
          fileList[4].response.execresult.LastInsertId;
        this.create.temp.scenePhoto6 =
          fileList[5].response.execresult.LastInsertId;
      } else if (fileList.length == 5) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
        this.create.temp.scenePhoto4 =
          fileList[3].response.execresult.LastInsertId;
        this.create.temp.scenePhoto5 =
          fileList[4].response.execresult.LastInsertId;
      } else if (fileList.length == 4) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
        this.create.temp.scenePhoto4 =
          fileList[3].response.execresult.LastInsertId;
      } else if (fileList.length == 3) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
        this.create.temp.scenePhoto3 =
          fileList[2].response.execresult.LastInsertId;
      } else if (fileList.length == 2) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
        this.create.temp.scenePhoto2 =
          fileList[1].response.execresult.LastInsertId;
      } else if (fileList.length == 1) {
        this.create.temp.scenePhoto1 =
          fileList[0].response.execresult.LastInsertId;
      }
      console.log(this.create.temp);
    },

    //图片展示
    handlePicPreview2(file) {
      this.dialogImageUrl2 = file.url;
      this.dialogVisible2 = true;
    },
    handlePicChange2(file, fileList) {
      // console.log(response, '文件状态改变时的钩子response')
    },
    //文件上传成功后的操作
    handlePicSuccess2(response, file, fileList) {
      console.log("文件上传成功时的钩子response", response);
      console.log("文件上传成功时的钩子file", file);
      console.log("fileList", fileList);

      //1张图片时，关闭新增的按钮
      if (fileList.length == 1) {
        document.getElementById("uploadPic2").lastChild.style.display = "none";
      } else {
        document.getElementById("uploadPic2").lastChild.style.display =
          "inline-block";
      }

      this.create.temp.serviceCodePhoto = response.execresult.LastInsertId;

      console.log("this.picArr1", this.picArr1);
    },
    //图片文件删除
    handlePicRemove2(file, fileList) {
      console.log(file, "文件列表移除文件时的钩子file---");
      console.log(fileList, "文件列表移除文件时的钩子fileList--");

      //1张图片时，关闭新增的按钮
      if (fileList.length == 1) {
        document.getElementById("uploadPic2").lastChild.style.display = "none";
      } else {
        document.getElementById("uploadPic2").lastChild.style.display =
          "inline-block";
      }
      this.create.temp.serviceCodePhoto =
        fileList[0].response.execresult.LastInsertId;
    },

    //获取按钮权限
    get_auto_buttons() {
      const Edit = "siteService";
      const isRoleEdit = checkButtons(
        JSON.parse(sessionStorage.getItem("buttons")),
        Edit
      );
      this.isRoleEdit = isRoleEdit;

      const SiteAdd = "business:site:add";
      const isSiteAdd = checkButtons(this.$store.state.user.buttons, SiteAdd);
      this.isSiteAdd = isSiteAdd;

      const SiteFeed = "business:site:feedback";
      const isSiteFeed = checkButtons(this.$store.state.user.buttons, SiteFeed);
      this.isSiteFeed = isSiteFeed;

      const SiteComplete = "business:site:complete";
      const isSiteComplete = checkButtons(
        this.$store.state.user.buttons,
        SiteComplete
      );
      this.isSiteComplete = isSiteComplete;

      //操作的宽度
      // var widthCount = calculativeWidth(isSiteFeed,isSiteAdd,isSiteAdd,isSiteComplete,isSiteAdd)
      // this.autoWidth = widthCount
    },
    //获取所有下拉框的内容
    get_select_list() {
      GetDataByNames(this.send_select_list).then((response) => {
        this.create.customerNameList = response.data.getCustomerSelect.list;
        console.log("客户名称下拉框", this.create.customerNameList);
        this.groupNameList = response.data.getDictListSelect1.list;
        console.log("集团下拉框", this.groupNameList);
        this.employeeNameList = response.data.getEmployeesSelect.list;
        console.log("服务人员下拉框", this.employeeNameList);
        // this.servicetypeNameList = response.data.getDictListSelect4.list
        // console.log("服务类型下拉框", this.servicetypeNameList)
      });
    },
    //加载表格
    get_table_data() {
      var me = this;
      this.tableObj.listLoading = true;
      console.log(
        "this.tableObj.getdataListParm======>",
        this.tableObj.getdataListParm
      );
      GetDataByName(this.tableObj.getdataListParm).then((response) => {
        console.log("table数据======>", response.data.list);
        if (response.data.list !== null) {
          this.tableObj.list = response.data.list;
          this.tableObj.pageNum = response.data.pageNum;
          this.tableObj.pageSize = response.data.pageSize;
          this.tableObj.total = response.data.total;

          //计算操作栏宽度
          var btnNum = 0;
          var arrList = response.data.list;
          arrList.forEach(function (row) {
            var itemBtnNum = 0;
            if (me.isSiteFeed && row.isFeedBack == "1") {
              itemBtnNum = itemBtnNum + 1;
            }
            if (me.isSiteAdd && row.isModify == "1") {
              itemBtnNum = itemBtnNum + 1;
            }
            if (me.isSiteAdd && row.isDel == "1") {
              itemBtnNum = itemBtnNum + 1;
            }
            if (me.isSiteComplete && row.isComplete == "1") {
              itemBtnNum = itemBtnNum + 1;
            }
            if (me.isSiteAdd && row.isRevoke == "1") {
              itemBtnNum = itemBtnNum + 1;
            }

            console.log(itemBtnNum);
            if (itemBtnNum > btnNum) {
              btnNum = itemBtnNum;
            }
          });
          console.log("btnNum=============", btnNum);
          me.autoWidth = btnNum * 90;
        } else {
          this.tableObj.list = [];
        }
        setTimeout(() => {
          this.tableObj.listLoading = false;
        }, 100);
      });

      var send_price = {
        name: "getServiceOfPrice",
        parammaps: this.tableObj.getdataListParm.parammaps,
      };

      GetDataByName(send_price).then((response) => {
        console.log("table总价格数据======>", response);
        if (response.data.list !== null) {
          this.tableSumMoney = response.data.list[0].totlePrice;
        } else {
          this.tableSumMoney = "";
        }
      });
    },
    form_search() {
      console.log("点击了查询");

      if (
        this.tableObj.getdataListParm.parammaps.inputDatetime1 !== "" &&
        this.tableObj.getdataListParm.parammaps.inputDatetime1 !== null
      ) {
        this.tableObj.getdataListParm.parammaps.beginServiceBeginDate =
          parseTime(
            this.tableObj.getdataListParm.parammaps.inputDatetime1[0],
            "{y}-{m}-{d}"
          );
        this.tableObj.getdataListParm.parammaps.endServiceBeginDate = parseTime(
          this.tableObj.getdataListParm.parammaps.inputDatetime1[1],
          "{y}-{m}-{d}"
        );
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime1 = "";
        this.tableObj.getdataListParm.parammaps.beginServiceBeginDate = "";
        this.tableObj.getdataListParm.parammaps.endServiceBeginDate = "";
      }

      if (
        this.tableObj.getdataListParm.parammaps.inputDatetime2 !== "" &&
        this.tableObj.getdataListParm.parammaps.inputDatetime2 !== null
      ) {
        this.tableObj.getdataListParm.parammaps.beginServiceSuccessDate =
          parseTime(
            this.tableObj.getdataListParm.parammaps.inputDatetime2[0],
            "{y}-{m}-{d}"
          );
        this.tableObj.getdataListParm.parammaps.endServiceSuccessDate =
          parseTime(
            this.tableObj.getdataListParm.parammaps.inputDatetime2[1],
            "{y}-{m}-{d}"
          );
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime2 = "";
        this.tableObj.getdataListParm.parammaps.beginServiceSuccessDate = "";
        this.tableObj.getdataListParm.parammaps.endServiceSuccessDate = "";
      }

      if (
        this.tableObj.getdataListParm.parammaps.inputDatetime3 !== "" &&
        this.tableObj.getdataListParm.parammaps.inputDatetime3 !== null
      ) {
        this.tableObj.getdataListParm.parammaps.beginPayDate = parseTime(
          this.tableObj.getdataListParm.parammaps.inputDatetime3[0],
          "{y}-{m}-{d}"
        );
        this.tableObj.getdataListParm.parammaps.endPayDate = parseTime(
          this.tableObj.getdataListParm.parammaps.inputDatetime3[1],
          "{y}-{m}-{d}"
        );
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime3 = "";
        this.tableObj.getdataListParm.parammaps.beginPayDate = "";
        this.tableObj.getdataListParm.parammaps.endPayDate = "";
      }

      if (
        this.tableObj.getdataListParm.parammaps.inputDatetime4 !== "" &&
        this.tableObj.getdataListParm.parammaps.inputDatetime4 !== null
      ) {
        this.tableObj.getdataListParm.parammaps.beginCollectDate = parseTime(
          this.tableObj.getdataListParm.parammaps.inputDatetime4[0],
          "{y}-{m}-{d}"
        );
        this.tableObj.getdataListParm.parammaps.endCollectDate = parseTime(
          this.tableObj.getdataListParm.parammaps.inputDatetime4[1],
          "{y}-{m}-{d}"
        );
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime4 = "";
        this.tableObj.getdataListParm.parammaps.beginCollectDate = "";
        this.tableObj.getdataListParm.parammaps.endCollectDate = "";
      }

      if (
        this.tableObj.getdataListParm.parammaps.beginServiceCost !== "" &&
        this.tableObj.getdataListParm.parammaps.endServiceCost !== ""
      ) {
        if (
          parseFloat(this.tableObj.getdataListParm.parammaps.beginServiceCost) >
          parseFloat(this.tableObj.getdataListParm.parammaps.endServiceCost)
        ) {
          this.$notify({
            title: "失败",
            message: "起始服务费用需要小于终止服务费用!",
            type: "error",
            duration: 2000,
          });
        } else {
          this.tableObj.getdataListParm.offset = 1;
          this.get_table_data();
        }
      } else {
        this.tableObj.getdataListParm.offset = 1;
        this.get_table_data();
      }
    },
    form_clear() {
      console.log("点击了重置");

      this.tableObj.getdataListParm.parammaps.customerName = "";
      this.tableObj.getdataListParm.parammaps.serviceCode = "";
      this.tableObj.getdataListParm.parammaps.customerId = "";
      this.tableObj.getdataListParm.parammaps.groupId = "";
      this.tableObj.getdataListParm.parammaps.employeeId = "";
      this.tableObj.getdataListParm.parammaps.statusName = "";
      this.tableObj.getdataListParm.parammaps.serviceTypeName = "";
      this.tableObj.getdataListParm.parammaps.costStatus = "";
      this.tableObj.getdataListParm.parammaps.beginServiceCost = "";
      this.tableObj.getdataListParm.parammaps.endServiceCost = "";
      this.tableObj.getdataListParm.parammaps.inputDatetime1 = "";
      this.tableObj.getdataListParm.parammaps.inputDatetime2 = "";
      this.tableObj.getdataListParm.parammaps.inputDatetime3 = "";
      this.tableObj.getdataListParm.parammaps.inputDatetime4 = "";
      this.tableObj.getdataListParm.parammaps.beginServiceBeginDate = "";
      this.tableObj.getdataListParm.parammaps.endServiceBeginDate = "";
      this.tableObj.getdataListParm.parammaps.beginServiceSuccessDate = "";
      this.tableObj.getdataListParm.parammaps.endServiceSuccessDate = "";
      this.tableObj.getdataListParm.parammaps.beginPayDate = "";
      this.tableObj.getdataListParm.parammaps.endPayDate = "";
      this.tableObj.getdataListParm.parammaps.beginCollectDate = "";
      this.tableObj.getdataListParm.parammaps.endCollectDate = "";
      this.tableObj.getdataListParm.offset = 1;
      this.get_table_data();
    },

    // 新增
    form_reset() {
      this.create.temp = {
        customerName: "",
        customerId: "",
        groupId: "",
        groupName: "",
        serviceCode: "",
        serviceBeginDate: parseTime(new Date(), "{y}-{m}-{d}"),
        employeeId: "",
        serviceTypeName: "",
        receiverId: "",
        receiverTel: "",
        receiverName: "",
        describe: "",
        serviceResult: "",
        visitId: "",
        telvisitId: "",
        stockupIds: "",
        remark: "",
        id: "",
        modifyName: "add",
        receiverChoose: "true",
        scenePhoto1: -1,
        scenePhoto2: -1,
        scenePhoto3: -1,
        scenePhoto4: -1,
        scenePhoto5: -1,
        scenePhoto6: -1,
        scenePhoto7: -1,
        scenePhoto8: -1,
        scenePhoto9: -1,
        serviceCodePhoto: -1,
        picname1: "",
        picname2: "",
        picname3: "",
        picname4: "",
        picname5: "",
        picname6: "",
        picname7: "",
        picname8: "",
        picname9: "",
        codePicname: "",
        employeeId: Cookies.get("g_userId"),
        employeeName: Cookies.get("g_empname"),
      };

      this.fileList = [];
      this.fileList2 = [];
      this.create.postalNameList = [];

      this.feedRecordList = [];

      document.getElementById("uploadPic").lastChild.style.display =
        "inline-block";
      document.getElementById("uploadPic2").lastChild.style.display =
        "inline-block";
    },

    //客户失去焦点
    customer_search_blur(item) {
      console.log("客户失去焦点");
      this.tableObj.getdataListParm.parammaps.customerId = "";
      this.tableObj.getdataListParm.parammaps.customerName = "";
      this.customerNameList = [];
    },

    //模糊查询客户
    customer_search(queryString, cb) {
      console.log("模糊查询输入值", queryString);
      GetDataByName({
        name: "getCustomerNameFuzzy",
        page: 1,
        offset: 1,
        pagecount: 10,
        returntype: "Map",
        parammaps: { inputvalue: queryString },
      }).then((response) => {
        this.customerNameList = response.data.list;
        console.log("客户名称下拉框", response);
        cb(response.data.list);
      });
    },

    //模糊查询客户选择
    change_customer_select(item) {
      console.log("客户名称模糊查询选中值", item);
      this.tableObj.getdataListParm.parammaps.customerId = item.id;
      this.tableObj.getdataListParm.parammaps.customerName = item.name;
    },

    //清空客户选择
    clear_customer_select(item) {
      document.activeElement.blur();
      this.tableObj.getdataListParm.parammaps.customerId = "";
      this.tableObj.getdataListParm.parammaps.customerName = "";
    },

    //监听 - 集团
    change_group(item) {
      console.log(item);
      console.log(this.create.temp.groupId);
      this.create.temp.groupId = item;
      this.create.getdataListParmCust.parammaps.groupId = item;

      this.create.temp.customerName = "";
      this.create.temp.customerId = "";
      this.create.customerNameList = [];

      this.get_customer_list();
      this.$forceUpdate();
    },
    // 弹窗中的客户
    get_customer_list() {
      GetDataByName(this.create.getdataListParmCust).then((response) => {
        if (response.data.list !== null) {
          this.create.customerNameList = response.data.list;
          console.log("弹窗中的客户数据", response.data.list);
        } else {
          this.create.customerNameList = [];
        }
      });
    },

    //监听 - 下拉中客户名称
    change_customer(item) {
      console.log(item);
      this.create.temp.customerId = item;

      this.create.temp.stockupId = "";
      this.tableArrList = [];

      this.create.getdataListParm0.parammaps.customerId = item;
      this.getReceiverNameList();

      this.create.getdataListParm5.parammaps.customerId = item;
      this.getVisitNameList();
      this.create.getdataListParm6.parammaps.customerId = item;
      this.getTelvisitNameList();

      this.get_groupName(item);
    },

    // 获取集团名称
    get_groupName(customerId) {
      var me = this;
      var send_data = {
        name: "getgroupNameById",
        returntype: "Map",
        parammaps: { id: customerId },
      };
      GetDataByName(send_data).then((response) => {
        console.log(response);
        if (response.data.list !== null) {
          me.create.temp.groupName = response.data.list[0].groupName;
          me.create.temp.groupId = response.data.list[0].groupId;
        } else {
          me.create.temp.groupName = "";
          me.create.temp.groupId = "";
        }
      });
    },

    // 拜访
    getVisitNameList() {
      GetDataByName(this.create.getdataListParm5).then((response) => {
        if (response.data.list !== null) {
          this.create.visitNameList = response.data.list;
          console.log("拜访数据", response.data.list);
        } else {
          this.create.visitNameList = [];
        }
      });
    },
    // 回访
    getTelvisitNameList() {
      GetDataByName(this.create.getdataListParm6).then((response) => {
        if (response.data.list !== null) {
          this.create.telvisitNameList = response.data.list;
          console.log("回访数据", response.data.list);
        } else {
          this.create.telvisitNameList = [];
        }
      });
    },
    // 接待人
    getReceiverNameList() {
      GetDataByName(this.create.getdataListParm0).then((response) => {
        if (response.data.list !== null) {
          this.create.receiverNameList = response.data.list;
          console.log("接待人数据", response.data.list);
        } else {
          this.create.receiverNameList = [];
        }
      });
    },

    //小表格中的删除单号
    form_deleteCode(item, index) {
      console.log("小表格中的删除单号", item);
      this.tableArrList.splice(index, 1);
      this.stockupIdArr.splice(this.stockupIdArr.indexOf(item.stockupId), 1);
      console.log("stockupIdArr===>", this.stockupIdArr);
    },

    //小表格中的删除
    form_delete2(row, index) {
      //这里的Index对应的小表格的位置！！
      console.log("小表格中的删除", row, index);

      var index2 = this.tableArrList[index].tablelist.findIndex(
        (obj) => obj.id == row.id
      );

      this.tableArrList[index].tablelist;
      this.tableArrList[index].tablelist.splice(index2, 1);
    },

    //新增
    form_add() {
      console.log("点击了新增");

      this.create.dialogStatus = "create";

      this.create.temp.employeeId = Cookies.get("g_userId");
      this.create.temp.employeeName = Cookies.get("g_empname");

      this.create.dialogFormVisible = true;
      this.form_reset();
    },
    //新增保存
    add_dialog_save() {
      console.log("点击了新增保存");
      this.isokDisable = true;
      setTimeout(() => {
        this.isokDisable = false;
      }, 1000);
      this.$refs["temp"].validate((valid) => {
        if (valid) {
          this.isokDisable = true;
          setTimeout(() => {
            this.isokDisable = false;
          }, 1000);

          if (
            this.create.temp.scenePhoto1 == "-1" ||
            this.create.temp.serviceCodePhoto == "-1"
          ) {
            var isEmpty = true;
          } else {
            var isEmpty = false;
          }

          if (isEmpty) {
            this.$message({
              type: "error",
              message: "请添加现场照片或服务单照片！",
              duration: 2000,
            });
          } else {
            this.create.temp.createrId = Cookies.get("employeid");
            var send_data = {
              name: "insertService",
              parammaps: this.create.temp,
            };

            console.log("新增保存发送参数", send_data);

            PostDataByName(send_data).then((response) => {
              if (response.msg !== "fail") {
                this.$notify({
                  title: "成功",
                  message: "保存成功",
                  type: "success",
                  duration: 2000,
                });
                this.create.dialogFormVisible = false;
                this.get_table_data();

                var rowId = response.data.LastInsertId;

                var send_weixin_data1 = {
                  name: "getRemindData",
                  parammaps: {
                    userId: Cookies.get("g_userId"),
                    remindId: 31,
                    remindTypeName: "现场服务",
                    rowId: rowId,
                  },
                };

                GetDataByName(send_weixin_data1).then((response) => {
                  console.log("微信推送(获取参数)======>", response);
                  if (response.data.message == "ok") {
                    var receiverStr = response.data.list[0].receivers;
                    var receiverArr = receiverStr.split(",");
                    var value1 = response.data.list[0].value1;
                    var value2 = response.data.list[0].value2;
                    var value3 = response.data.list[0].value3;
                    var value4 = response.data.list[0].value4;
                    var send_weixin_data2 = {
                      target: receiverArr,
                      serviceId: 31,
                      content: [
                        { color: "#173177", value: value1 },
                        { color: "#173177", value: value2 },
                        { color: "#173177", value: value3 },
                        { color: "#173177", value: value4 },
                      ],
                    };

                    wxpush(send_weixin_data2).then((response) => {
                      console.log("微信推送(获取参数)======>", response);
                    });
                    // this.tableSumMoney = response.data.list[0].totlePrice
                  } else {
                    // this.$notify({ title: '失败', message: '消息推送失败', type: 'error', duration: 2000 })
                  }
                });
              } else {
                this.$notify({
                  title: "失败",
                  message: "保存失败",
                  type: "error",
                  duration: 2000,
                });
              }
            });
          }
        }
      });
    },
    // 查看
    form_see(row) {
      //this.form_reset()

      this.create.temp = Object.assign({}, row);
      this.createSee.temp = Object.assign({}, row);

      this.create.temp.id = row.id;
      this.createSee.temp.id = row.id;
      console.log("点击了查看");

      this.create.getdataListParm0.parammaps.customerId = row.customerId;
      this.getReceiverNameList();

      // this.create.getdataListParmCust.parammaps.groupId = row.groupId
      // this.get_customer_list()

      // 现场照片
      const urlArray = [];
      const urlArrayId = [];
      const fileList = [];

      if (this.create.temp.picname1 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname1);
        urlArrayId.push(this.create.temp.scenePhoto1);
      }
      if (this.create.temp.picname2 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname2);
        urlArrayId.push(this.create.temp.scenePhoto2);
      }
      if (this.create.temp.picname3 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname3);
        urlArrayId.push(this.create.temp.scenePhoto3);
      }
      if (this.create.temp.picname4 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname4);
        urlArrayId.push(this.create.temp.scenePhoto4);
      }
      if (this.create.temp.picname5 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname5);
        urlArrayId.push(this.create.temp.scenePhoto5);
      }
      if (this.create.temp.picname6 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname6);
        urlArrayId.push(this.create.temp.scenePhoto6);
      }
      if (this.create.temp.picname7 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname7);
        urlArrayId.push(this.create.temp.scenePhoto7);
      }
      if (this.create.temp.picname8 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname8);
        urlArrayId.push(this.create.temp.scenePhoto8);
      }
      if (this.create.temp.picname9 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname2);
        urlArrayId.push(this.create.temp.scenePhoto9);
      }

      console.log("urlArray", urlArray);
      console.log("urlArrayId", urlArrayId);

      for (let i = 0; i < urlArray.length; i++) {
        var urlObj = {
          url: "",
          response: { execresult: { LastInsertId: "" } },
        };
        urlObj.url = urlArray[i];
        // this.$set(urlObj, 'url', urlArray[i])
        // this.$set(urlObj, 'response', 15)
        urlObj.response.execresult.LastInsertId = urlArrayId[i];
        fileList.push(urlObj);
      }

      this.fileList = fileList;

      console.log("fileList", fileList);

      // 服务单照片
      const urlArray2 = [];
      const urlArrayId2 = [];
      const fileList2 = [];
      if (this.create.temp.codePicname == undefined) {
        urlArray2.push();
      } else {
        urlArray2.push(
          process.env.VUE_APP_BASE_API + this.create.temp.codePicname
        );
        urlArrayId2.push(this.create.temp.serviceCodePhoto);
      }
      console.log("urlArray2", urlArray2);
      console.log("urlArrayId2", urlArrayId2);

      for (let i = 0; i < urlArray2.length; i++) {
        var urlObj2 = {
          url: "",
          response: { execresult: { LastInsertId: "" } },
        };
        urlObj2.url = urlArray2[i];
        urlObj2.response.execresult.LastInsertId = urlArrayId2[i];
        fileList2.push(urlObj2);
      }

      this.fileList2 = fileList2;
      console.log("fileList2", fileList2);

      this.reset_feedRecord();
      //反馈记录
      this.getFeedRecordParm.parammaps.id = row.id;
      this.feedRecordTemp.parammaps.serviceId = row.id;
      this.get_feedRecord();

      this.createSee.dialogFormVisible = true;
    },

    // 查看中的反馈记录
    get_feedRecord() {
      GetDataByName(this.getFeedRecordParm).then((response) => {
        console.log("查看中的反馈记录", response.data.list);
        if (response.data.list !== null) {
          this.feedRecordList = response.data.list;
        } else {
          this.feedRecordList = [];
        }
      });
    },

    // 反馈记录 - 保存
    feedRecord_save() {
      if (
        this.feedRecordTemp.parammaps.remark == "" ||
        this.feedRecordTemp.parammaps.remark == null
      ) {
        this.$notify({
          title: "反馈失败！",
          message: "请输入反馈内容！",
          type: "warning",
          duration: 2000,
        });
      } else {
        this.feedRecordTemp.parammaps.createrId = Cookies.get("employeid");
        PostDataByName(this.feedRecordTemp).then((response) => {
          if (response.msg === "fail") {
            this.$notify({
              title: "反馈失败",
              message: response.data,
              type: "warning",
              duration: 2000,
            });
          } else {
            this.$notify({
              title: "反馈成功",
              message: "反馈成功",
              type: "success",
              duration: 2000,
            });
            // this.createSee.dialogFormVisible = false
            // this.get_table_data()

            this.get_feedRecord();
            this.feedRecordTemp.parammaps.remark = "";
            this.$forceUpdate();

            var send_weixin_data1 = {
              name: "getRemindData",
              parammaps: {
                userId: Cookies.get("g_userId"),
                remindId: 32,
                remindTypeName: "现场服务",
                rowId: this.create.temp.id,
              },
            };

            GetDataByName(send_weixin_data1).then((response) => {
              console.log("微信推送(获取参数)======>", response);
              if (response.data.message == "ok") {
                var receiverStr = response.data.list[0].receivers;
                var receiverArr = receiverStr.split(",");
                var value1 = response.data.list[0].value1;
                var value2 = response.data.list[0].value2;
                var value3 = response.data.list[0].value3;
                var value4 = response.data.list[0].value4;
                var send_weixin_data2 = {
                  target: receiverArr,
                  serviceId: 32,
                  content: [
                    { color: "#173177", value: value1 },
                    { color: "#173177", value: value2 },
                    { color: "#173177", value: value3 },
                    { color: "#173177", value: value4 },
                  ],
                };

                wxpush(send_weixin_data2).then((response) => {
                  console.log("微信推送(获取参数)======>", response);
                });
                // this.tableSumMoney = response.data.list[0].totlePrice
              } else {
                // this.$notify({ title: '失败', message: '消息推送失败', type: 'error', duration: 2000 })
              }
            });
          }
        });
      }
    },

    // 反馈 - 重置
    reset_feedRecord() {
      this.feedRecordList = [];
      this.feedRecordTemp.parammaps.serviceId = "";
      this.feedRecordTemp.parammaps.createrId = "";
      this.feedRecordTemp.parammaps.remark = "";
    },

    // 编辑
    form_edit(row) {
      console.log("点击了编辑", row);

      this.create.temp = Object.assign({}, row);
      this.create.temp.id = row.id;

      // this.create.getdataListParmCust.parammaps.groupId = row.groupId
      // this.get_customer_list()

      this.create.getdataListParm0.parammaps.customerId = row.customerId;
      this.getReceiverNameList();

      this.create.getdataListParm5.parammaps.customerId = row.customerId;
      this.getVisitNameList();
      this.create.getdataListParm6.parammaps.customerId = row.customerId;
      this.getTelvisitNameList();

      this.create.temp.employeeId = Cookies.get("g_userId");
      this.create.temp.employeeName = Cookies.get("g_empname");

      // 现场照片
      const urlArray = [];
      const urlArrayId = [];
      const fileList = [];
      if (this.create.temp.picname1 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname1);
        urlArrayId.push(this.create.temp.scenePhoto1);
      }
      if (this.create.temp.picname2 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname2);
        urlArrayId.push(this.create.temp.scenePhoto2);
      }
      if (this.create.temp.picname3 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname3);
        urlArrayId.push(this.create.temp.scenePhoto3);
      }
      if (this.create.temp.picname4 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname4);
        urlArrayId.push(this.create.temp.scenePhoto4);
      }
      if (this.create.temp.picname5 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname5);
        urlArrayId.push(this.create.temp.scenePhoto5);
      }
      if (this.create.temp.picname6 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname6);
        urlArrayId.push(this.create.temp.scenePhoto6);
      }
      if (this.create.temp.picname7 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname7);
        urlArrayId.push(this.create.temp.scenePhoto7);
      }
      if (this.create.temp.picname8 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname8);
        urlArrayId.push(this.create.temp.scenePhoto8);
      }
      if (this.create.temp.picname9 != undefined) {
        urlArray.push(process.env.VUE_APP_BASE_API + this.create.temp.picname2);
        urlArrayId.push(this.create.temp.scenePhoto9);
      }

      console.log("urlArray", urlArray);
      console.log("urlArrayId", urlArrayId);

      for (let i = 0; i < urlArray.length; i++) {
        var urlObj = {
          url: "",
          response: { execresult: { LastInsertId: "" } },
        };
        urlObj.url = urlArray[i];
        // this.$set(urlObj, 'url', urlArray[i])
        // this.$set(urlObj, 'response', 15)
        urlObj.response.execresult.LastInsertId = urlArrayId[i];
        fileList.push(urlObj);
      }

      this.fileList = fileList;

      console.log("fileList", fileList);

      // 服务单照片
      const urlArray2 = [];
      const urlArrayId2 = [];
      const fileList2 = [];
      if (this.create.temp.codePicname == undefined) {
        urlArray2.push();
      } else {
        urlArray2.push(
          process.env.VUE_APP_BASE_API + this.create.temp.codePicname
        );
        urlArrayId2.push(this.create.temp.serviceCodePhoto);
      }
      console.log("urlArray2", urlArray2);
      console.log("urlArrayId2", urlArrayId2);

      for (let i = 0; i < urlArray2.length; i++) {
        var urlObj2 = {
          url: "",
          response: { execresult: { LastInsertId: "" } },
        };
        urlObj2.url = urlArray2[i];
        urlObj2.response.execresult.LastInsertId = urlArrayId2[i];
        fileList2.push(urlObj2);
      }

      this.fileList2 = fileList2;
      console.log("fileList2", fileList2);

      this.create.dialogStatus = "update";
      this.create.dialogFormVisible = true;
    },

    // 编辑保存
    form_edit_save() {
      this.isokDisable = true;
      setTimeout(() => {
        this.isokDisable = false;
      }, 1000);
      this.$refs["temp"].validate((valid) => {
        if (valid) {
          this.isokDisable = true;
          setTimeout(() => {
            this.isokDisable = false;
          }, 1000);

          if (
            this.create.temp.scenePhoto1 == "-1" ||
            this.create.temp.serviceCodePhoto == "-1"
          ) {
            var isEmpty = true;
          } else {
            var isEmpty = false;
          }

          if (isEmpty) {
            this.$message({
              type: "error",
              message: "请添加现场照片或服务单照片！",
              duration: 2000,
            });
          } else {
            this.create.temp.createrId = Cookies.get("employeid");
            var send_data = {
              name: "updateService",
              parammaps: this.create.temp,
            };

            console.log("编辑保存发送参数", send_data);

            PostDataByName(send_data).then((response) => {
              if (response.msg !== "fail") {
                this.$notify({
                  title: "成功",
                  message: "保存成功",
                  type: "success",
                  duration: 2000,
                });
                this.create.dialogFormVisible = false;
                this.get_table_data();

                var send_weixin_data1 = {
                  name: "getRemindData",
                  parammaps: {
                    userId: Cookies.get("g_userId"),
                    remindId: 31,
                    remindTypeName: "现场服务",
                    rowId: this.create.temp.id,
                  },
                };

                GetDataByName(send_weixin_data1).then((response) => {
                  console.log("微信推送(获取参数)======>", response);
                  if (response.data.message == "ok") {
                    var receiverStr = response.data.list[0].receivers;
                    var receiverArr = receiverStr.split(",");
                    var value1 = response.data.list[0].value1;
                    var value2 = response.data.list[0].value2;
                    var value3 = response.data.list[0].value3;
                    var value4 = response.data.list[0].value4;
                    var send_weixin_data2 = {
                      target: receiverArr,
                      serviceId: 31,
                      content: [
                        { color: "#173177", value: value1 },
                        { color: "#173177", value: value2 },
                        { color: "#173177", value: value3 },
                        { color: "#173177", value: value4 },
                      ],
                    };

                    wxpush(send_weixin_data2).then((response) => {
                      console.log("微信推送(获取参数)======>", response);
                    });
                    // this.tableSumMoney = response.data.list[0].totlePrice
                  } else {
                    // this.$notify({ title: '失败', message: '消息推送失败', type: 'error', duration: 2000 })
                  }
                });
              } else {
                this.$notify({
                  title: "失败",
                  message: "保存失败",
                  type: "error",
                  duration: 2000,
                });
              }
            });
          }
        }
      });
    },

    // 删除
    form_delete(row) {
      MessageBox.confirm("是否确认删除此信息?", {
        confirmButtonText: "确认",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.requestParam.name = "delService";
          this.requestParam.parammaps = {};
          this.requestParam.parammaps.id = row.id;
          PostDataByName(this.requestParam).then((response) => {
            if (response.msg === "fail") {
              this.$notify({
                title: "删除失败",
                message: response.data,
                type: "warning",
                duration: 2000,
              });
            } else {
              this.$notify({
                title: "成功",
                message: "删除成功",
                type: "success",
                duration: 2000,
              });
              this.get_table_data();
            }
          });
        })
        .catch(() => {
          this.$message({ type: "info", message: "已取消删除" });
        });
    },

    // 完成
    form_complete(row) {
      console.log("点击了完成", row);
      this.reset_complete();

      this.complete.temp.id = row.id;
      this.complete.dialogFormVisible = true;
    },
    // 完成 - 重置
    reset_complete() {
      this.complete.temp.costStatus = "需要收款";
      this.complete.temp.serviceCost = "";
      this.complete.temp.id = "";
      this.complete.temp.payDate = "";
      this.complete.temp.remoteSummary = "";

      this.moneyShow = true;
    },

    // 完成 - 确认
    form_complete_save() {
      this.$refs["completetemp"].validate((valid) => {
        if (valid) {
          var send_data = {
            name: "completeService",
            parammaps: this.complete.temp,
          };

          var isCost = false;
          if (this.complete.temp.costStatus == "需要收款") {
            if (this.complete.temp.serviceCost == "") {
              isCost = true;
            } else {
              isCost = false;
            }
          } else {
            isCost = false;
          }

          if (isCost) {
            this.$notify({
              title: "失败",
              message: "需要收款时必须填写服务费用！",
              type: "error",
              duration: 2000,
            });
          } else {
            PostDataByName(send_data).then((response) => {
              console.log("完成发送参数", this.requestParam);
              if (response.msg !== "fail") {
                this.$notify({
                  title: "成功",
                  message: "完成成功",
                  type: "success",
                  duration: 2000,
                });
                this.complete.dialogFormVisible = false;
                this.create.dialogFormVisible = false;
                this.createSee.dialogFormVisible = false;
                this.get_table_data();

                var send_weixin_data1 = {
                  name: "getRemindData",
                  parammaps: {
                    userId: Cookies.get("g_userId"),
                    remindId: 35,
                    remindTypeName: "现场服务",
                    rowId: this.complete.temp.id,
                  },
                };

                GetDataByName(send_weixin_data1).then((response) => {
                  console.log("微信推送(获取参数)======>", response);
                  if (response.data.message == "ok") {
                    var receiverStr = response.data.list[0].receivers;
                    var receiverArr = receiverStr.split(",");
                    var value1 = response.data.list[0].value1;
                    var value2 = response.data.list[0].value2;
                    var value3 = response.data.list[0].value3;
                    var value4 = response.data.list[0].value4;
                    var send_weixin_data2 = {
                      target: receiverArr,
                      serviceId: 35,
                      content: [
                        { color: "#173177", value: value1 },
                        { color: "#173177", value: value2 },
                        { color: "#173177", value: value3 },
                        { color: "#173177", value: value4 },
                      ],
                    };

                    wxpush(send_weixin_data2).then((response) => {
                      console.log("微信推送(获取参数)======>", response);
                    });
                    // this.tableSumMoney = response.data.list[0].totlePrice
                  } else {
                    // this.$notify({ title: '失败', message: '消息推送失败', type: 'error', duration: 2000 })
                  }
                });

                if (this.isHome == "home") {
                  // 返回首页
                  this.$router.push({
                    name: "Dashboard",
                    params: { isTodo: "site" },
                  });
                }
              } else {
                this.$notify({
                  title: "失败",
                  message: "完成失败" + response.data,
                  type: "error",
                  duration: 2000,
                });
              }
            });
          }
        }
      });
    },

    // 完成 - 款项 - 下拉
    change_money_status(item) {
      console.log(item);

      if (item == "需要收款") {
        this.moneyShow = true;
      } else {
        this.moneyShow = false;
      }
    },

    // 撤销
    form_revoke(row) {
      console.log("点击了撤销", row);
      this.reset_revoke();

      this.revoke.temp.id = row.id;
      this.revoke.dialogFormVisible = true;
    },
    // 撤销 - 重置
    reset_revoke() {
      this.revoke.temp.revokeReason = "";
    },

    // 撤销 - 确认
    form_revoke_save() {
      this.$refs["revoketemp"].validate((valid) => {
        if (valid) {
          var send_data = {
            name: "revokeService",
            parammaps: this.revoke.temp,
          };

          this.$confirm("是否撤销该条记录?", "提示", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
            .then(() => {
              PostDataByName(send_data).then((response) => {
                console.log("撤销发送参数", send_data);
                if (response.msg !== "fail") {
                  this.$notify({
                    title: "成功",
                    message: "撤销成功",
                    type: "success",
                    duration: 2000,
                  });
                  this.revoke.dialogFormVisible = false;
                  this.get_table_data();

                  var send_weixin_data1 = {
                    name: "getRemindData",
                    parammaps: {
                      userId: Cookies.get("g_userId"),
                      remindId: 34,
                      remindTypeName: "现场服务",
                      rowId: this.create.temp.id,
                    },
                  };

                  GetDataByName(send_weixin_data1).then((response) => {
                    console.log("微信推送(获取参数)======>", response);
                    if (response.data.message == "ok") {
                      var receiverStr = response.data.list[0].receivers;
                      var receiverArr = receiverStr.split(",");
                      var value1 = response.data.list[0].value1;
                      var value2 = response.data.list[0].value2;
                      var value3 = response.data.list[0].value3;
                      var value4 = response.data.list[0].value4;
                      var send_weixin_data2 = {
                        target: receiverArr,
                        serviceId: 34,
                        content: [
                          { color: "#173177", value: value1 },
                          { color: "#173177", value: value2 },
                          { color: "#173177", value: value3 },
                          { color: "#173177", value: value4 },
                        ],
                      };

                      wxpush(send_weixin_data2).then((response) => {
                        console.log("微信推送(获取参数)======>", response);
                      });
                      // this.tableSumMoney = response.data.list[0].totlePrice
                    } else {
                      // this.$notify({ title: '失败', message: '消息推送失败', type: 'error', duration: 2000 })
                    }
                  });
                } else {
                  this.$notify({
                    title: "失败",
                    message: "撤销失败" + response.data,
                    type: "error",
                    duration: 2000,
                  });
                }
              });
            })
            .catch(() => {
              this.$message({
                type: "info",
                message: "已取消删除",
              });
            });
        }
      });
    },

    dialog_complete_close() {
      this.complete.dialogFormVisible = false;
      this.get_table_data();
      if (this.isHome == "home") {
        // 返回首页
        this.$router.push({ name: "Dashboard", params: { isTodo: "site" } });
      }
    },
    // 导出
    form_export(item) {
      this.download.getdataListParm.parammaps =
        this.tableObj.getdataListParm.parammaps;

      GetDataByName(this.download.getdataListParm).then((response) => {
        if (response.data.list !== null) {
          this.download.list = response.data.list;
        } else {
          this.download.list = [];
        }
        var excelDatas = [
          {
            tHeader: [
              "序号",
              "现场服务编号",
              "服务状态",
              "客户名称",
              "客户集团",
              "接待人",
              "接待人电话",
              "款项状态",
              "服务费用",
              "支付时间",
              "收款时间",
              "服务类型",
              "服务开始时间",
              "服务完成时间",
              "服务人员",
              "服务描述",
              "备注",
              "拜访记录关联",
              "回访记录关联",
              "服务总结",
              "录入日期",
            ],
            filterVal: [
              "sort",
              "serviceCode",
              "statusName",
              "customerName",
              "groupName",
              "receiverName",
              "receiverTel",
              "costStatus",
              "serviceCost",
              "payDate",
              "collectDate",
              "serviceTypeName",
              "serviceBeginDate",
              "serviceSuccessDate",
              "employeeName",
              "describe",
              "remark",
              "visitName",
              "telvisitName",
              "serviceSummary",
              "createrDate",
            ],
            tableDatas: this.download.list,
            sheetName: "Sheet1",
          },
        ];
        json2excel(excelDatas, "现场服务", true, "xlsx");
      });
    },

    // 导入
    form_inport() {
      console.log("点击了导入");
    },
  },
};
</script>
<style lang="scss" scoped>
.search {
  padding-top: 10px;
  clear: both;
}
.table {
  margin-top: 10px;
}

#uploadPic {
  width: 700px;
}
#uploadPic2 {
  width: 700px;
}
// #uploadPic .el-upload-list--picture-card .el-upload-list__item {
//   width: 70px;
//   height: 70px;
// }
// #uploadPic .el-upload--picture-card {
//   width: 70px;
//   height: 70px;
//   line-height: 70px;
// }
// #uploadPic .hide .el-upload--picture-card {
//   display: none;
// }

// // 查看 隐藏删除
// #uploadPicSee {
//   height: 70px;
// }
// #uploadPicSee .el-upload-list--picture-card .el-upload-list__item {
//   width: 70px;
//   height: 70px;
// }
// #uploadPicSee .el-upload--picture-card {
//   width: 70px;
//   height: 70px;
//   line-height: 70px;
// }
// #uploadPicSee
//   .el-upload-list--picture-card
//   .el-upload-list__item-actionshahah
//   .el-upload-list__item-delete {
//   display: none;
// }

/deep/ .el-input.is-disabled .el-input__inner {
  color: #000000 !important;
}
/deep/ .el-textarea.is-disabled .el-textarea__inner {
  color: #000000 !important;
}
/deep/ .el-radio__input.is-disabled + span.el-radio__label {
  color: #000000 !important;
}
/deep/ .el-checkbox__input.is-disabled + span.el-checkbox__label {
  color: #000000 !important;
}
</style>
