| | |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="form-label require"> |
| | | 执法主题 |
| | | 计划名称
|
| | | </view> |
| | | <input type="text" placeholder="请输入" v-model.trim="form.enforceReason" /> |
| | | <input type="text" placeholder="请输入计划名称" v-model.trim="form.enforceReason" />
|
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-label require"> |
| | | 执法对象 |
| | | 被检查对象
|
| | | </view> |
| | | <view class="input" @click="search"> |
| | | <input type="text" style="width: 80%;" disabled placeholder="请选择" :value="form.companyName" /> |
| | | <input type="text" style="width: 80%;" disabled placeholder="请选择被检查对象" :value="form.companyName" />
|
| | | <u-icon name="arrow-right"></u-icon> |
| | | <!-- <u-text text='搜索' type="primary" style="width: 20%;" @click="search"></u-text> --> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | |
| | | </view> |
| | | <view class="form-item" @click="showType = true"> |
| | | <view class="form-label require"> |
| | | 检查方式 |
| | | 检查类型
|
| | | </view> |
| | | <view class="input"> |
| | | <input type="text" placeholder="请选择" v-model.trim="form.enforceTypeName" disabled /> |
| | | <input type="text" placeholder="请选择检查类型" v-model.trim="form.enforceTypeName" disabled />
|
| | | <u-icon name="arrow-right"></u-icon> |
| | | </view> |
| | | </view> |
| | | <view class="form-item last"> |
| | | <view class="form-label require"> |
| | | 执法内容 |
| | | 检查内容
|
| | | </view> |
| | | <view class="back"> |
| | | <u--textarea :height="120" v-model.trim="form.enforceContent" placeholder="请输入" count |
| | | <u--textarea :height="120" v-model.trim="form.enforceContent" placeholder="请输入检查内容" count
|
| | | maxlength="500"></u--textarea> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-label"> |
| | | 执法部门 |
| | | 执行科室
|
| | | </view> |
| | | <!-- <input type="text" placeholder="请输入" v-model.trim="form.applyDeptName" disabled/> --> |
| | | <view style="width: 60%;">{{form.applyDeptName}}</view> |
| | | <view class="select-content" @tap="openSelectOffice">
|
| | | <view>{{form.applyDeptNames}}</view>
|
| | | <u-icon name="arrow-right"></u-icon>
|
| | | </view>
|
| | | </view> |
| | | <view class="form-item sui" style="align-items: flex-start;" @click="openPer"> |
| | | <view class="form-label "> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <u-textarea border="none" disabled style="padding: 0;" placeholder="请选择" ></u-textarea> --> |
| | | </view> |
| | | <view class="form-item down-2"> |
| | | <view class="form-item">
|
| | | <view class="form-label"> |
| | | 是否通知企业 |
| | | </view> |
| | | <u-switch v-model="form.isNoticeCompany" :activeValue="1" :inactiveValue="0"></u-switch> |
| | | </view> |
| | | |
| | | <view class="form-item" :class="{'down-2' : !isRectify }">
|
| | | <view class="form-label">
|
| | | 是否创建整改
|
| | | </view>
|
| | | <u-switch v-model="isRectify" :activeValue="1" :inactiveValue="0" @change="changeRectify"></u-switch>
|
| | | </view>
|
| | | <view class="form-item down-2" v-if="isRectify == 1">
|
| | | <view class="form-label require">
|
| | | 整改计划
|
| | | </view>
|
| | | <view class="input" @click="searchRectify">
|
| | | <input type="text" style="width: 80%;" disabled placeholder="请选择整改计划" :value="rectifyName" />
|
| | | <u-icon name="arrow-right"></u-icon>
|
| | | </view>
|
| | | </view>
|
| | | </view> |
| | | </view> |
| | | <view class="down-options"> |
| | | <view class="button record" @click="applyRecord">申请记录</view> |
| | | <view class="button submit" @click="submitApply">提交申请</view> |
| | | </view> |
| | | <!-- <u-form label-position="top" label-width="120px"> |
| | | <u-form-item label="执法主题"> |
| | | <u-input placeholder="请输入" v-model="form.enforceReason"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="执法对象"> |
| | | <u-input placeholder="请输入" v-model="form.companyName"> |
| | | <template slot="suffix"> |
| | | <text @click="search">搜索</text> |
| | | </template> |
| | | </u-input> |
| | | </u-form-item> |
| | | <u-form-item label="执法时间" @click="showTimeFun"> |
| | | <u-input placeholder="请输入" v-model="form.applyTime" readonly></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="执法类型" @click="showType = true"> |
| | | <u-input placeholder="请输入" v-model="form.enforceTypeName" readonly></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="执法内容"> |
| | | <u-input placeholder="请输入" v-model="form.regionReason"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="执法人员"> |
| | | <u-input placeholder="请输入" v-model="form.applyName"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="执法部门"> |
| | | <u-input placeholder="请输入" v-model="form.applyDeptName"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="随行人员数量"> |
| | | <u-input placeholder="请输入" v-model="form.userNum"></u-input> |
| | | </u-form-item> |
| | | <u-form-item label="是否通知企业"> |
| | | <u-switch v-model="form.isNoticeCompany" :activeValue="1" :inactiveValue="0"></u-switch> |
| | | </u-form-item> |
| | | </u-form> --> |
| | | <!-- <u-button @click="submitApply">提交申请</u-button> |
| | | <u-button @click="applyRecord">申请记录</u-button> --> |
| | | <!-- <u-picker :show="show" @close="show = false" :immediateChange="true" @confirm="confirmSearch" @cancel="show = false" :columns="columns" keyName="companyName"> |
| | | |
| | | |
| | | </u-picker> --> |
| | | <perPicker ref="perPicker" @setCompany="setCompany" :immediateChange="true" @confirm="confirmSearch" |
| | | @cancel="show = false" :columns="columns" keyName="companyName"></perPicker> |
| | | <yt-dateTimePicker ref="myPicker" @submit="confirmTime" :time-init="timeInit" :start-year="year" :startMonth="month" |
| | |
| | | <u-picker :show="showType" @close="showType = false" @confirm="confirmType" @cancel="showType = false" |
| | | :columns="columnsType" keyName="dictLabel"></u-picker> |
| | | <perPage :list="list" ref="perpage" @selectValue="selectValue"></perPage> |
| | | <officePopup :officeShow.sync="officeShow" :list="officeList" @selectValue="selectOfficeRes"></officePopup>
|
| | | <rectifyPicker ref="rectifyPicker" @setCompany="setCompany" :immediateChange="true" @confirm="confirmRectify"
|
| | | :applyOrgId="form.applyOrgId" :companyId="form.companyId" @cancel="show = false" :columns="columns"
|
| | | keyName="enforceReason"></rectifyPicker>
|
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | orderAdd, |
| | | companyList, |
| | | enforceList |
| | | enforceList,
|
| | | officeList,
|
| | | } from '@/api/policy.js' |
| | | import { |
| | | getInfo |
| | |
| | | getDicts |
| | | } from '@/api/data' |
| | | import perPage from './perPage' |
| | | import officePopup from './officePopup'
|
| | | import perPicker from './perPicker' |
| | | import rectifyPicker from './rectifyPicker'
|
| | | import YtDateTimePicker from "uni_modules/yt-dateTimePicker/components/yt-dateTimePicker/yt-dateTimePicker.vue" |
| | | export default { |
| | | components: { |
| | | YtDateTimePicker, |
| | | perPage, |
| | | perPicker |
| | | perPicker,
|
| | | officePopup,
|
| | | rectifyPicker
|
| | | }, |
| | | data() { |
| | | return { |
| | | currentTime: "", |
| | | form: { |
| | | applyUser: '', |
| | | applyDeptName: '', |
| | | enforceType: 1, |
| | | isNoticeCompany: 0, |
| | | // regionReason: 0, |
| | | planTimeStr: '', |
| | | peers: [], |
| | | enforceReason: '', // 执法主题
|
| | | companyName: "", // 执法对象
|
| | | planTime: '', // 执法时间
|
| | | planTimeStr: '', // 执法时间
|
| | | enforceType: '', // 检查方式
|
| | | enforceTypeName: '', // 检查方式名称
|
| | | enforceContent: "", // 执法内容
|
| | | applyUser: '', // 执法人员
|
| | | applyOrgId: "", // 制定机构id
|
| | | applyOrgName: "", // 制定机构名称
|
| | | applyDeptIds: "", // 执行科室id
|
| | | applyDeptNames: "", // 执行科室名称
|
| | | peers: [], // 随行人员
|
| | | isNoticeCompany: 0, // 是否通知企业
|
| | | orderStatus: 1, |
| | | enforceContent: "", |
| | | companyName: "" |
| | | joinOrderId: null,
|
| | | }, |
| | | show: false, |
| | | columns: [], |
| | |
| | | timeInit: '', |
| | | list: [], |
| | | startTime: "", |
| | | month: '' |
| | | month: '',
|
| | | officeList: [],
|
| | | officeShow: false,
|
| | | isRectify: 0, // 是否创建整改
|
| | | rectifyName: '', // 整改关联计划名称
|
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | changeRectify(e) {
|
| | | if (e == 0) {
|
| | | this.form.joinOrderId = null
|
| | | this.rectifyName = ''
|
| | | }
|
| | | },
|
| | |
|
| | | enforceList() { |
| | | enforceList().then(val => { |
| | | this.list = val.data.data |
| | |
| | | // this.form.applyName = value.nickName |
| | | this.form.applyUser = value.nickName |
| | | this.form.applyId = value.userId |
| | | this.form.applyDeptName = value.dept.deptName |
| | | this.form.applyDeptId = value.dept.deptId |
| | | this.form.applyPhone = value.phonenumber |
| | |
|
| | | this.form.applyOrgId = value.dept.parentId // 制定机构id
|
| | | this.form.applyOrgName = value.dept.parentName // 制定机构名称
|
| | | this.form.applyDeptNames = value.dept.deptName // 科室名称
|
| | | this.form.applyDeptIds = value.dept.deptId // 科室id
|
| | |
|
| | | this.getOfficeList()
|
| | | }) |
| | | }, |
| | | timeFilter(mode, options) { |
| | |
| | | if (!this.form.companyName || !this.form.companyName.replace(/\s+/g, "")) { |
| | | return '请选择执法对象' |
| | | } |
| | | // if(!this.form.companyId) { |
| | | // return '请点击搜索确认执法对象' |
| | | // } |
| | | if (!this.form.planTimeStr) { |
| | | return '请填写执法时间' |
| | | } |
| | | if (!this.form.enforceTypeName) { |
| | | return '请选择检查方式' |
| | | } |
| | | console.log(!this.form.enforceContent.replace(/\s+/g, "")) |
| | | if (!this.form.enforceContent || !this.form.enforceContent.replace(/\s+/g, "")) { |
| | | return '请填写执法内容' |
| | | }
|
| | | if (!this.form.applyDeptIds) {
|
| | | return '请选择执法部门'
|
| | | } |
| | | // if(!this.form.peers.length){ |
| | | // return '请选择随行人员' |
| | | // } |
| | |
|
| | | if (this.isRectify == 1) {
|
| | | if (this.form.joinOrderId == null) {
|
| | | return '请选择整改计划'
|
| | | }
|
| | | }
|
| | | return '' |
| | | }, |
| | | submitApply() { |
| | |
| | | }) |
| | | }, |
| | | search() { |
| | | // companyList({companyName: this.form.companyName}).then(val => { |
| | | // if(val.data.code == 200){ |
| | | // if(!val.data.rows.length || !val.data.rows){ |
| | | // uni.showToast({ |
| | | // title: '没有符合的数据,请检查输入的执法对象', |
| | | // icon: 'none', |
| | | // duration: 3000 |
| | | // }) |
| | | // } else { |
| | | |
| | | // } |
| | | |
| | | // } |
| | | // }) |
| | | |
| | | this.$refs.perPicker.open() |
| | | }, |
| | |
|
| | | searchRectify() {
|
| | | if (!this.form.companyId) return this.$u.toast('请先选择企业')
|
| | | this.$refs.rectifyPicker.open()
|
| | | },
|
| | |
|
| | | confirmRectify(e) {
|
| | | console.log(e)
|
| | | this.form.joinOrderId = e.orderId
|
| | | this.rectifyName = e.enforceReason
|
| | | },
|
| | |
|
| | | confirmSearch(e) { |
| | | let value = e |
| | | // const value = this.columns[0].find(item => item.companyName == e.value[0].companyName) |
| | | this.form.companyName = e.companyName |
| | | this.form.companyCode = value.companyCode |
| | | this.form.companyId = value.companyId |
| | | this.form.companyPhone = value.companyPhone |
| | | this.form.companyUser = value.companyUser |
| | | this.form.companyAddress = value.companyAddress |
| | | // console.log(this.form.companyName) |
| | | this.form.joinOrderId = null
|
| | | this.rectifyName = ''
|
| | | }, |
| | | setCompany(e) { |
| | | this.form.companyName = e |
| | |
| | | } |
| | | } |
| | | return newArr; |
| | | },
|
| | |
|
| | | openSelectOffice() {
|
| | | this.officeShow = true
|
| | | },
|
| | |
|
| | | selectOfficeRes(data) {
|
| | | this.form.applyDeptIds = data.deptIds
|
| | | this.form.applyDeptNames = data.deptNames
|
| | | },
|
| | |
|
| | | async getOfficeList() {
|
| | | const {
|
| | | data: res
|
| | | } = await officeList({
|
| | | pageNum: 1,
|
| | | pageSize: 1000,
|
| | | parentId: this.form.applyOrgId,
|
| | | })
|
| | | this.officeList = res.data.map(obj => {
|
| | | return {
|
| | | deptId: obj.deptId,
|
| | | deptName: `${this.form.applyOrgName}-${obj.deptName}`
|
| | | } |
| | | })
|
| | | console.log(this.officeList)
|
| | | },
|
| | | } |
| | | } |
| | | </script> |
| | |
| | | margin-bottom: 24rpx; |
| | | |
| | | .form-label { |
| | | width: 236rpx !important;
|
| | | font-size: 30rpx; |
| | | color: #4A4E60; |
| | | width: 40%; |
| | |
| | | line-height: 54rpx !important; |
| | | margin-right: 15rpx; |
| | | } |
| | |
|
| | | .select-content {
|
| | | flex: 1;
|
| | | display: flex;
|
| | | align-items: center;
|
| | | justify-content: space-between;
|
| | |
|
| | | .select-word {
|
| | | flex: 1;
|
| | | }
|
| | | }
|
| | | </style> |