123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528 |
- <template>
- <view>
- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '新建企业信息'">
- <block slot="backText">返回</block>
- <block slot="content">新建企业信息</block>
- </cu-custom>
- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '修改企业信息'">
- <block slot="backText">返回</block>
- <block slot="content">修改企业信息</block>
- </cu-custom>
- <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '查看企业信息'">
- <block slot="backText">返回</block>
- <block slot="content">查看企业信息</block>
- </cu-custom>
- <form @submit="formSubmit" class="cu-list menu">
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text> 企业名称
- </view>
- <input v-model="inputForm.name" placeholder="请填写企业名称" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>企业类型
- </view>
- <jp-picker v-model="inputForm.industry" rangeKey="label" rangeValue="value"
- :range="$dictUtils.getDictList('industrial_type')" :disabled="ischeck">
- <view class="picker">
- {{$dictUtils.getDictLabel('industrial_type', inputForm.industry ,'请选择')}}
- </view>
- </jp-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>所属楼宇
- </view>
- <picker @change="changeLYId" :value="lyIndex" :range="showLYList" :disabled="ischeck">
- <view class=" picker action">
- <view class="text-grey ">{{showLYList[lyIndex] || '请选择'}}</view>
- </view>
- </picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 入驻时间
- </view>
- <jp-datetime-picker v-model="inputForm.entryTime" mode="date" :disabled="ischeck"></jp-datetime-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 撤场时间
- </view>
- <jp-datetime-picker v-model="inputForm.des5" mode="date" :disabled="ischeck"></jp-datetime-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 办公面积(平)
- </view>
- <input v-model="inputForm.officeArea" placeholder="请填写办公面积" :disabled="ischeck"></input>
- </view>
- <!-- <view class="cu-form-group margin-top">
- <view class="title">
- 年租金(元)
- </view>
- <input v-model="inputForm.annualRent" placeholder="请填写年租金" :disabled="ischeck"></input>
- </view> -->
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 楼层
- </view>
- <input v-model="inputForm.floor" placeholder="请填写楼层" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 房间号
- </view>
- <input v-model="inputForm.des3" placeholder="请填写房间号" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 联系人
- </view>
- <input v-model="inputForm.lxr" placeholder="请填写联系人" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 联系人手机
- </view>
- <input v-model="inputForm.phone" placeholder="请填写联系人手机" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 合约起始时间
- </view>
- <jp-datetime-picker v-model="inputForm.htStime" mode="date" :disabled="ischeck"></jp-datetime-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- <text class="red-color ">* </text>
- 合约到期时间
- </view>
- <jp-datetime-picker v-model="inputForm.htEtime" mode="date" :disabled="ischeck"></jp-datetime-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 主营内容
- </view>
- <input v-model="inputForm.businessContent" placeholder="请填写主营内容" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 用工总数
- </view>
- <input v-model="inputForm.totalNumber" placeholder="请填写用工总数" :disabled="ischeck" type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 社保人数
- </view>
- <input v-model="inputForm.securityNumber" placeholder="请填写社保人数" :disabled="ischeck"
- type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 男生人数
- </view>
- <input v-model="inputForm.des7" placeholder="请填写男生人数" :disabled="ischeck" type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 女生人数
- </view>
- <input v-model="inputForm.des8" placeholder="请填写女生人数" :disabled="ischeck" type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 党员人数
- </view>
- <input v-model="inputForm.des9" placeholder="请填写党员人数" :disabled="ischeck" type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 本科以下人数
- </view>
- <input v-model="inputForm.belowUndergraduate" placeholder="请填写本科以下人数" :disabled="ischeck"
- type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 本科人数
- </view>
- <input v-model="inputForm.undergraduate" placeholder="请填写本科人数" :disabled="ischeck"
- type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 研究生人数
- </view>
- <input v-model="inputForm.postgraduate" placeholder="请填写研究生人数" :disabled="ischeck"
- type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 博士生人数
- </view>
- <input v-model="inputForm.doctoralStudent" placeholder="请填写博士生人数" :disabled="ischeck"
- type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 实用新型专利授权数
- </view>
- <input v-model="inputForm.num2" placeholder="请填写实用新型专利授权数" :disabled="ischeck" type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 发明专利授权数
- </view>
- <input v-model="inputForm.num3" placeholder="请填写发明专利授权数" :disabled="ischeck" type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 软著数
- </view>
- <input v-model="inputForm.softWritingNumbers" placeholder="请填写软著数" :disabled="ischeck"
- type="number"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 今年准备申报项目明细
- </view>
- <input v-model="inputForm.bz1" placeholder="请填写今年准备申报项目明细" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 今年项目认定明细
- </view>
- <input v-model="inputForm.bz2" placeholder="请填写今年项目认定明细" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 是否是国家高企
- </view>
- <jp-picker v-model="inputForm.bz3" rangeKey="label" rangeValue="value"
- :range="$dictUtils.getDictList('yes_no')" :disabled="ischeck">
- <view class="picker">
- {{$dictUtils.getDictLabel('yes_no', inputForm.bz3 ,'请选择')}}
- </view>
- </jp-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 意向哪年申报国家高企
- </view>
- <input v-model="inputForm.bz4" placeholder="请填写意向哪年申报国家高企" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 是否是规上企业
- </view>
- <jp-picker v-model="inputForm.bz5" rangeKey="label" rangeValue="value"
- :range="$dictUtils.getDictList('yes_no')" :disabled="ischeck">
- <view class="picker">
- {{$dictUtils.getDictLabel('yes_no', inputForm.bz5 ,'请选择')}}
- </view>
- </jp-picker>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 什么时候能达到规上企业标准
- </view>
- <input v-model="inputForm.bz6" placeholder="请填写什么时候能达到规上企业标准" :disabled="ischeck"></input>
- </view>
- <view class="cu-form-group margin-top">
- <view class="title">
- 企业简介
- </view>
- <textarea v-model="inputForm.qyDes" placeholder="请填写企业简介" :disabled="ischeck"></textarea>
- </view>
- <view style="height: 40rpx;"></view>
- <view class="padding-xl" v-if="!ischeck">
- <button form-type="submit" class="cu-btn block bg-blue margin-tb-sm lg">提交</button>
- </view>
- </form>
- </view>
- </template>
- <script>
- var graceChecker = require("@/common/graceChecker.js");
- import revenueListService from '@/api/revenue/revenueListService'
- import loginService from '@/api/auth/loginService.js'
- export default {
- onShow() {
- // this.$auth.checkLogin()
- },
- data() {
- return {
- title: '新建企业信息',
- autoUpload: false,
- inputForm: {
- "id": "582ca566b9ea44778b7d9482af11b87e",
- "createDate": "2024-12-31 14:11:33",
- "createBy": {
- "id": "1858788038421487618",
- "admin": false,
- "roleIdList": [],
- "roleIds": "",
- "postIdList": [],
- "roleNames": ""
- },
- "updateDate": "2024-12-31 14:11:33",
- "updateBy": {
- "id": "1858788038421487618",
- "admin": false,
- "roleIdList": [],
- "roleIds": "",
- "postIdList": [],
- "roleNames": ""
- },
- "delFlag": 0,
- "name": "江苏阿顿智能科技有限公司",
- "industry": "4",
- "entryTime": "2022-04-01",
- "officeArea": "",
- "annualRent": "",
- "floor": "6",
- "lxr": "无",
- "phone": "18921876098",
- "des1": "fbb6ca3417804c4db5a5b635103a4a2c",
- "des2": "",
- "des3": "无",
- "htStime": "2022-04-01 00:00:00",
- "htEtime": "2025-03-31 00:00:00",
- "qyDes": "",
- "businessContent": "",
- "totalNumber": 1,
- "securityNumber": 1,
- "belowUndergraduate": 0,
- "undergraduate": 1,
- "postgraduate": 0,
- "doctoralStudent": 0,
- "num2": 0,
- "num3": 0,
- "softWritingNumbers": 0,
- "bz1": "",
- "bz2": "",
- "bz3": "",
- "bz4": "",
- "bz5": "",
- "bz6": "",
- "des5": "",
- "des6": "1",
- "des7": "1",
- "des8": "0",
- "des9": "0",
- "des10": "0",
- "des11": ""
- },
- parkList: [],
- ischeck: false,
- lyIndex: '',
- showLYList: [],
- }
- },
- created() {},
- mounted() {
- },
- onLoad(query) {
- console.log(query, '==============>query')
- if (query && query.ischeck) {
- this.ischeck = true
- this.title = "查看企业信息";
- }
- if (query && query.id && !query.ischeck) {
- this.title = "修改企业信息";
- }
- // this.getParkList(query)
- },
- methods: {
- getParkList(query) {
- loginService.list({
- current: 1,
- size: 1000000,
- }).then(({
- data
- }) => {
- this.parkList = data.records.map((item) => {
- return {
- label: item.buildingName,
- value: item.id
- }
- })
- this.showLYList = this.parkList.map(item => item.label)
- if (query && query.id) {
- loginService.queryByIdCom(query.id).then(({
- data
- }) => {
- this.inputForm = this.recover(this.inputForm, data)
- this.lyIndex = this.parkList.findIndex(item => item.value == this.inputForm
- .des1)
- console.log(this.lyIndex, '=====================>lyIndex')
- }).catch((e) => {
- })
- }
- }).catch(e => {
- console.log(e)
- })
- },
- changeLYId(e) {
- let index = e.detail.value
- this.lyIndex = index
- console.log(index, '===========>index')
- this.inputForm.des1 = this.parkList[index].value
- console.log(this.inputForm.des1, '===========>index')
- },
- formSubmit: function(e) {
- //定义表单规则
- var rule = [{
- name: "name",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写企业名称"
- }, {
- name: "industry",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请选择企业类型"
- }, {
- name: "des1",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请选择所属楼宇"
- },
- {
- name: "entryTime",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请选择入驻时间"
- },
- {
- name: "floor",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写楼层"
- },
- {
- name: "des3",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写房间号"
- },
- {
- name: "lxr",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写联系人"
- },
- {
- name: "phone",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写联系人手机"
- },
- {
- name: "htStime",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写合约起始时间"
- },
- {
- name: "htEtime",
- checkType: "notnull",
- checkRule: "",
- errorMsg: "请填写合约到期时间"
- },
- ];
- //进行表单检查
- var formData = this.inputForm;
- var checkRes = graceChecker.check(formData, rule);
- console.log(checkRes, '===================>checkRes')
- if (checkRes) {
- uni.showLoading()
- loginService.comSave(this.inputForm).then(({
- data
- }) => {
- uni.showToast({
- title: data,
- icon: "success"
- });
- uni.navigateTo({
- url: '/pages/comList/comList'
- })
- }).catch((e) => {
- })
- } else {
- uni.showToast({
- title: graceChecker.error,
- icon: "none"
- });
- }
- }
- }
- }
- </script>
- <style>
- /* .file-title) {
- font-size: 17px !important;
- } */
- input,
- textarea {
- color: #8799a3;
- }
- </style>
|