117 lines
4.0 KiB
Vue
117 lines
4.0 KiB
Vue
<template>
|
|
<view class="min-height bg-linear">
|
|
<HeaderItem title="企业法治检查"/>
|
|
<view class="rounded-top min-height p-30 bg-gray-light">
|
|
<view class="my-20 card p-30">
|
|
<u-form label-width="140rpx">
|
|
<u-form-item label="企业名称" border-bottom>
|
|
<u-input v-model="formData.companyName" border="none" placeholder="请输入企业名称"/>
|
|
</u-form-item>
|
|
<u-form-item label="检查单位" border-bottom>
|
|
<u-input v-model="formData.checkCompanyName" border="none" placeholder="请输入检查单位"/>
|
|
</u-form-item>
|
|
<u-form-item label="检查日期" border-bottom @click="showDate = true">
|
|
<u-input v-model="formData.checkDate" border="none" placeholder="请选择检查日期" readonly>
|
|
<u-icon
|
|
slot="right"
|
|
name="arrow-right"
|
|
></u-icon>
|
|
</u-input>
|
|
</u-form-item>
|
|
<u-form-item label="来访类型" border-bottom @click="showType = true">
|
|
<u-input v-model="formData.type" border="none" placeholder="请选择来访类型" readonly>
|
|
<u-icon
|
|
slot="right"
|
|
name="arrow-right"
|
|
></u-icon>
|
|
</u-input>
|
|
</u-form-item>
|
|
<u-form-item label="本季度检查次数" border-bottom>
|
|
<u-input v-model="formData.checkNum" border="none" placeholder="请输入本季度检查次数"/>
|
|
</u-form-item>
|
|
<u-form-item label="来访评价" border-bottom>
|
|
<u-textarea maxlength="-1" v-model="formData.comment" border="none" placeholder="请输入来访评价"/>
|
|
</u-form-item>
|
|
<u-form-item label="备注说明">
|
|
<u-textarea maxlength="-1" v-model="formData.remark" border="none" placeholder="请输入备注说明"/>
|
|
</u-form-item>
|
|
</u-form>
|
|
</view>
|
|
<view class="mt-30">
|
|
<u-button type="primary" shape="circle" @click="save"
|
|
:hairline="false"
|
|
:custom-style="{border: 0, background: 'linear-gradient(91.28deg, rgba(14,146,252,1) 27.63%,rgba(29,188,188,1) 80.08%);'}">
|
|
提交
|
|
</u-button>
|
|
</view>
|
|
</view>
|
|
<u-picker :show="showType" :columns="[typeList]" @cancel="showType = false"
|
|
@confirm="selectType" key-name="dictDataCode"
|
|
/>
|
|
<u-datetime-picker
|
|
:show="showDate"
|
|
v-model="checkDate"
|
|
mode="date"
|
|
@confirm="selectDate"
|
|
/>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import HeaderItem from "@/components/HeaderItem.vue";
|
|
import {lawOrgCheckActionReq} from "@/api/lawOrg";
|
|
import {dictDataReq} from "@/api/common";
|
|
import dayjs from 'dayjs'
|
|
|
|
export default {
|
|
name: "action",
|
|
components: {HeaderItem},
|
|
data() {
|
|
return {
|
|
formData: {
|
|
companyName: '',
|
|
checkCompanyName: '',
|
|
checkDate: '',
|
|
type: '',
|
|
checkNum: '',
|
|
comment: '',
|
|
remark: '',
|
|
},
|
|
typeList: [],
|
|
showType: false,
|
|
showDate: false,
|
|
checkDate: Number(new Date()),
|
|
}
|
|
},
|
|
methods: {
|
|
async getDictList() {
|
|
const {data} = await dictDataReq({dictId: '164'})
|
|
this.typeList = data
|
|
},
|
|
async save() {
|
|
if (!this.formData.checkCompanyName) return this.$toast('请输入检查单位')
|
|
if (!this.formData.checkDate) return this.$toast('请选择检查日期')
|
|
if (!this.formData.type) return this.$toast('请选择来访类型')
|
|
if (!this.formData.checkNum) return this.$toast('请输入本季度检查次数')
|
|
const res = await lawOrgCheckActionReq(this.formData)
|
|
if (res) {
|
|
this.$toast('提交成功')
|
|
setTimeout(() => {
|
|
uni.navigateBack()
|
|
}, 500)
|
|
}
|
|
},
|
|
selectType({value}) {
|
|
this.formData.type = value[0].dictDataCode
|
|
this.showType = false
|
|
},
|
|
selectDate({value}){
|
|
this.showDate = false
|
|
this.formData.checkDate = dayjs(value).format("YYYY-MM-DD")
|
|
}
|
|
},
|
|
onLoad() {
|
|
this.getDictList()
|
|
},
|
|
}
|
|
</script> |