Administrator
2021-12-25 da9e4db4b9d0243fb6cb974fd030ad0535b372aa
单位详情修改
6 files modified
2 files added
347 ■■■■ changed files
public/img/top/driver.png patch | view | raw | blame | history
public/img/top/heard.png patch | view | raw | blame | history
public/img/top/heard1.png patch | view | raw | blame | history
src/api/securityUnit/securityUnit.js 10 ●●●●● patch | view | raw | blame | history
src/page/index/top/top-drive.vue 8 ●●●● patch | view | raw | blame | history
src/page/index/top/top-userSManual.vue 4 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 15 ●●●●● patch | view | raw | blame | history
src/views/securityUnitChild/index.vue 310 ●●●● patch | view | raw | blame | history
public/img/top/driver.png
public/img/top/heard.png

public/img/top/heard1.png
src/api/securityUnit/securityUnit.js
@@ -85,6 +85,16 @@
    })
}
export const getBusinessInfo = (deptId) => {
    return request({
        url: '/api/business/getBusinessInfo',
        method: 'get',
        params: {
            deptId,
        }
    })
}
export const adddata1 = (row) => {
    return request({
        url: '/api/shareholder/save',
src/page/index/top/top-drive.vue
@@ -17,7 +17,8 @@
    </el-dialog>
    <span>
      <i class="el-icon-receiving" @click="open" style="font-size: 20px"></i>
      <!-- <i class="el-icon-receiving" @click="open" style="font-size: 20px"></i> -->
      <img class="imgstop" src="img/top/driver.png" alt="" style="width:40px ;" @click="open">
    </span>
  </div>
</template>
@@ -61,5 +62,10 @@
.list {
  width: 100%;
}
.imgstop{
  position: relative;
  top: 19px;
}
</style>
src/page/index/top/top-userSManual.vue
@@ -17,7 +17,7 @@
    </el-dialog>
    <span>
      <img class="imgstop" src="img/top/heard.png" alt="" style="width:20px ;height:20px" @click="open">
      <img class="imgstop" src="img/top/heard.png" alt="" style="width:40px" @click="open">
      <!-- <i class="el-icon-mobile" @click="open" style="font-size: 20px"></i> -->
    </span>
  </div>
@@ -113,7 +113,7 @@
}
.imgstop{
  position: relative;
  top: 5px;
  top: 19px;
}
</style>
src/views/securityGuard/securityGuard.vue
@@ -1013,8 +1013,21 @@
              //   valueFormat: "yyyy-MM-dd",
              // },
              {
                label: "电子邮箱",
                label: "保安证书照片",
                prop: "email",
                type: "upload",
                listType: "picture-img",
                propsHttp: {
                  res: "data",
                  url: "url",
                },
                canvasOption: {
                  text: " ",
                  ratio: 1.0,
                },
                action: "/api/blade-resource/oss/endpoint/put-files",
                tip: "上传jpg,png格式图片,大小不超过2M",
                span: 12,
              },
              // {
              //     label: "籍贯",
src/views/securityUnitChild/index.vue
@@ -17,10 +17,19 @@
      <el-tab-pane label="工商信息" name="tab11">
        <basic-container>
          <avue-form
            v-if="businessVisiable"
            ref="form"
            v-model="obj"
            :option="option01"
            @submit="submitBase"
          >
          </avue-form>
          <avue-form
            v-if="!businessVisiable"
            ref="businessForm"
            v-model="businessObj"
            :option="businessOption"
            @submit="businessSubmit"
          >
          </avue-form>
        </basic-container>
@@ -35,10 +44,7 @@
      </el-tab-pane>
      <!-- 主要管理人信息 -->
      <el-tab-pane :label="managerLabel" name="tab3">
        <manager
          v-if="overmanager"
          :deptid="departmentid"
        ></manager>
        <manager v-if="overmanager" :deptid="departmentid"></manager>
      </el-tab-pane>
      <!-- 装备管理列表 -->
      <el-tab-pane label="装备管理" name="tab4" v-if="equipmentVisiable">
@@ -82,8 +88,8 @@
</template> 
<script>
import { column11, column} from "./data";
import { getOncedata, update} from "@/api/securityUnit/securityUnit";
import { column11, column } from "./data";
import { getOncedata, update,getBusinessInfo } from "@/api/securityUnit/securityUnit";
import manager from "./manager.vue";
import shareholder from "./shareholder.vue";
import equipments from "../securityEquipment/equipments.vue";
@@ -114,6 +120,7 @@
      baseTitle: "基本信息",
      visible: false,
      certificdinedVisiable: false,
      businessVisiable: true,
      licenceVisiable: true,
      shareholderVisiable: true,
      equipmentVisiable: true,
@@ -135,7 +142,154 @@
      objBase: {
        // title: "我是头部标题",
      },
      formData:{},
      formData: {},
      businessObj:{},
      businessOption: {
        height: "auto",
        // calcHeight: 80,
        emptyBtn: false,
        // submitBtn:false,
        submitText:"保存",
        group: [
          {
            label: "总公司工商信息",
            labelWidth: "110",
            prop: "baseInfo",
            icon: "el-icon-user-solid",
            column: [
              {
                label: "统一社会信用代码",
                prop: "socialCreditCode",
                span: 12,
                labelWidth: 130,
                disabled: false,
              },
              {
                label: "注册时间",
                prop: "registerTime",
                span: 12,
                labelWidth: 130,
                disabled: false,
                type: "date",
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
                rules: [
                  {
                    required: true,
                    message: "请选择注册时间",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "注册资本",
                prop: "capital",
                span: 12,
                labelWidth: 130,
                disabled: false,
              },
              {
                label: "经营范围",
                prop: "businessScope",
                span: 12,
                labelWidth: 130,
                width: 110,
                // overHidden: true,
                // type: 'textarea',
                showWordLimit: true,
                disabled: false,
              },
              {
                label: "营业执照",
                prop: "trading",
                type: "upload",
                listType: "picture-img",
                span: 12,
                propsHttp: {
                  res: "data",
                },
                canvasOption: {
                  text: "",
                  ratio: 1.0,
                },
                labelWidth: 130,
                tip: "只能上传jpg/png格式图片,且不超过2Mb",
                action: "/api/blade-resource/oss/endpoint/put-files",
                disabled: false,
              },
            ],
          },
          {
            label: "分公司工商信息",
            prop: "detailInfo",
            labelWidth: "110",
            icon: "el-icon-s-order",
            column: [
              {
                label: "统一社会信用代码",
                prop: "creditcode",
                span: 12,
                labelWidth: 130,
                disabled: false,
              },
              {
                label: "注册时间",
                prop: "establishtime",
                span: 12,
                labelWidth: 130,
                disabled: false,
                type: "date",
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
                rules: [
                  {
                    required: true,
                    message: "请选择注册时间",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "注册资本",
                prop: "registeredcapital",
                span: 12,
                labelWidth: 130,
                disabled: false,
              },
              {
                label: "经营范围",
                prop: "business",
                span: 12,
                labelWidth: 130,
                width: 110,
                // overHidden: true,
                // type: 'textarea',
                showWordLimit: true,
                disabled: false,
              },
              {
                label: "营业执照",
                prop: "businessLicense",
                type: "upload",
                listType: "picture-img",
                span: 12,
                propsHttp: {
                  res: "data",
                },
                canvasOption: {
                  text: "",
                  ratio: 1.0,
                },
                labelWidth: 130,
                tip: "只能上传jpg/png格式图片,且不超过2Mb",
                action: "/api/blade-resource/oss/endpoint/put-files",
                disabled: false,
              },
            ],
          },
        ],
      },
      optionBase: {
        emptyBtn: false,
        submitBtn: false,
@@ -159,11 +313,42 @@
    },
  },
  methods: {
    //分公司工商信息修改
    businessSubmit(row, done, loading){
      alert(1);
      var that = this;
      if (
        this.userInfo.role_name == "保安公司管理员" ||
        this.userInfo.role_name == "培训公司管理员" ||
        this.userInfo.role_name == "分公司管理员"
      ) {
        row["departmentid"] = this.userInfo.dept_id;
        row["id"] = this.formData.id;
      }
      update(row).then(
        () => {
          this.$message({
            type: "success",
            message: "操作成功!",
          });
          that.formData = row;
          done();
        },
        (error) => {
          window.console.log(error);
          loading();
        }
      );
      done();
    },
    //其他公司基本信息,工商信息修改
    submitBase(row, done, loading) {
      var that = this;
      if (this.userInfo.role_name == "保安公司管理员" ||
      if (
        this.userInfo.role_name == "保安公司管理员" ||
        this.userInfo.role_name == "培训公司管理员" ||
        this.userInfo.role_name == "分公司管理员") {
        this.userInfo.role_name == "分公司管理员"
      ) {
        row["departmentid"] = this.userInfo.dept_id;
        row["id"] = this.formData.id;
      }
@@ -192,20 +377,19 @@
    handleClick(tab, event) {
      if (tab.name == "tab1") {
        this.loading1 = false;
      }else if (tab.name == "tab11") {
      } else if (tab.name == "tab11") {
        this.obj = this.formData;
      }else if (tab.name == "tab5") {
      } else if (tab.name == "tab5") {
        this.overcar = true;
      } else if (tab.name == "tab4") {
        this.overzb = true;
      } else if (tab.name == "tab2") {
        this.overshareholder = true;
        this.overshareholder = true;
      } else if (tab.name == "tab3") {
        this.overmanager = true;
      } else if (tab.name == "tab9") {
        this.social = true;
      }
      else {
        this.social = true;
      } else {
        this.social = false;
        this.overcar = false;
        this.overzb = false;
@@ -215,7 +399,7 @@
      }
    },
    //tag 防重复处理
    tagTraim(){
    tagTraim() {
      //tag 防重复处理
      var flag = false,
        i = 0,
@@ -244,10 +428,13 @@
          var d = that.optionBase.column;
          var e = that.option01.column;
          //控制按钮,编辑状态
          if (roleAlias == "保安公司管理员" ||
          roleAlias == "分公司管理员" ||
          roleAlias == "培训公司管理员") {
          if (
            roleAlias == "保安公司管理员" ||
            roleAlias == "分公司管理员" ||
            roleAlias == "培训公司管理员"
          ) {
            that.optionBase.submitBtn = true;
            that.businessOption.submitBtn = true;
            that.option01.submitBtn = true;
            for (var k in d) {
              d[k].disabled = false;
@@ -258,6 +445,7 @@
          } else {
            that.optionBase.submitBtn = false;
            that.option01.submitBtn = false;
            that.businessOption.submitBtn = false;
            for (var a in d) {
              d[a].disabled = true;
            }
@@ -278,7 +466,7 @@
    doit(data) {
      var that = this;
      var row = {};
      if (data!= null) {
      if (data != null) {
        row = data;
        that.departmentid = row.departmentid;
        for (var k in row) {
@@ -290,52 +478,54 @@
          that.creditcode = row.creditcode;
        }
        that.overHtp = true;
        if(data.stats == "0"){
        if (data.stats == "0") {
          //自招保安单位
          const industrycolumn = this.findObject(this.optionBase.column, "industry");
          const representativecolumn = this.findObject(this.optionBase.column, "representative");
          const representativecellcolumn = this.findObject(this.optionBase.column, "representativecell");
          const fregioncolumn = this.findObject(this.optionBase.column, "fregion");
          const industrycolumn = this.findObject(
            this.optionBase.column,
            "industry"
          );
          const representativecolumn = this.findObject(
            this.optionBase.column,
            "representative"
          );
          const representativecellcolumn = this.findObject(
            this.optionBase.column,
            "representativecell"
          );
          const fregioncolumn = this.findObject(
            this.optionBase.column,
            "fregion"
          );
          const ftimecolumn = this.findObject(this.optionBase.column, "ftime");
          //法人及电话,办公地址不可见
          industrycolumn.display = false;
          representativecolumn.display=false;
          representativecellcolumn.display=false;
          representativecolumn.display = false;
          representativecellcolumn.display = false;
          //服务区域,时间可见
          fregioncolumn.display=true;
          ftimecolumn.display=true;
          fregioncolumn.display = true;
          ftimecolumn.display = true;
        }
        if(data.stats == "4"){
        if (data.stats == "4") {
          //分公司
          const representativecolumn = this.findObject(this.optionBase.column, "representative");
          const representativecellcolumn = this.findObject(this.optionBase.column, "representativecell");
          const representativecolumn = this.findObject(
            this.optionBase.column,
            "representative"
          );
          const representativecellcolumn = this.findObject(
            this.optionBase.column,
            "representativecell"
          );
          //法人及电话不可见
          representativecolumn.label="分公司负责人";
          representativecellcolumn.label="分公司负责人电话";
          representativecolumn.label = "分公司负责人";
          representativecellcolumn.label = "分公司负责人电话";
        }
        // if (that.readLock("danweidataS") != null && a == 1) {
        //   var b = JSON.parse(that.readLock("danweidataS"));
        //   var i = 0;
        //   for (var k in b) {
        //     if (b[k].enterprisename == row.enterprisename) {
        //       i = 1;
        //     }
        //   }
        //   if (i != 1) {
        //     that.objBase = {};
        //     that.objBase.enterprisename = row.enterprisename + "该公司已删除";
        //     window.localStorage.removeItem("danweidata");
        //     that.creditcode = "";
        //   }
        // }
      } else {
        that.objBase.enterprisename = "未选择查询单位";
      }
    },
    //数据初始化
    initData() {
      // alert(1);
      var that = this;
      var datas = this.$route.query.data;
      // console.log(datas,123456);
@@ -343,11 +533,11 @@
      if (datas) {
        var data = JSON.parse(this.$route.query.data);
        that.formData = data;
        // console.log(data,3333333);
        //单位列表进入
        var stats = data.stats;
        var deptId = data.departmentid;
        //初始tab控制
        this.initController(stats);
        this.initController(stats,deptId);
        //初始数据获取
        this.getdatas(data);
      } else {
@@ -358,15 +548,16 @@
        getOncedata(value).then((res) => {
          that.formData = res.data.data;
          var stats = res.data.data.stats;
          var deptId = res.data.data.departmentid;
          //初始tab控制
          this.initController(stats);
          this.initController(stats,deptId);
          //初始数据获取
          this.getdatas(res.data.data);
        });
      }
    },
    //tab 初始设置
    initController(stats) {
    initController(stats,deptId) {
      var that = this;
      // 判断按进入的公司类型
      if (stats == "2") {
@@ -386,6 +577,12 @@
        //分公司
        that.baseTitle = "保安单位基本信息";
        that.certificdinedVisiable = true;
        that.businessVisiable = false;
        //查询分公司(及总公司)工商信息
        getBusinessInfo(deptId).then((res)=>{
          console.log(res.data.data,1234546);
          that.businessObj = res.data.data;
        })
      }
      if (stats == "1") {
        //培训学校
@@ -404,8 +601,7 @@
    //初始化信息
    this.initData();
  },
  watch: {
  },
  watch: {},
};
</script>