|
|
|
@ -6,12 +6,12 @@ |
|
|
|
</div> |
|
|
|
<!-- 中间 --> |
|
|
|
<div> |
|
|
|
<!-- <van-cell-group>--> |
|
|
|
<!-- <van-cell-group>--> |
|
|
|
<van-form @failed="onFailed" @submit="submit"> |
|
|
|
<!-- <van-field--> |
|
|
|
<!-- v-model="submitData.lawEnforcementCode"--> |
|
|
|
<!-- label="登记编号"--> |
|
|
|
<!-- />--> |
|
|
|
<!-- <van-field--> |
|
|
|
<!-- v-model="submitData.lawEnforcementCode"--> |
|
|
|
<!-- label="登记编号"--> |
|
|
|
<!-- />--> |
|
|
|
<van-field |
|
|
|
v-model="submitData.enterpriseName" |
|
|
|
label="企业名称" |
|
|
|
@ -20,7 +20,8 @@ |
|
|
|
readonly |
|
|
|
@click="showPopupCompony" |
|
|
|
/> |
|
|
|
<Popup :visible="popupVisible" :content="popupContent" @close="closePopupCompony" @reciveData="reciveData" /> |
|
|
|
<Popup :visible="popupVisible" :content="popupContent" @close="closePopupCompony" |
|
|
|
@reciveData="reciveData"/> |
|
|
|
<van-field |
|
|
|
v-model="submitData.linkMan" |
|
|
|
label="企业联系人" |
|
|
|
@ -49,7 +50,7 @@ |
|
|
|
rows="1" |
|
|
|
autosize |
|
|
|
/> |
|
|
|
<van-field v-model="submitData.checkItem" v-show="false" /> |
|
|
|
<van-field v-model="submitData.checkItem" v-show="false"/> |
|
|
|
<van-field |
|
|
|
v-model="data.checkRequireText" |
|
|
|
required |
|
|
|
@ -61,7 +62,7 @@ |
|
|
|
rows="1" |
|
|
|
autosize |
|
|
|
/> |
|
|
|
<van-field v-model="submitData.checkRequire" v-show="false" /> |
|
|
|
<van-field v-model="submitData.checkRequire" v-show="false"/> |
|
|
|
<van-field |
|
|
|
v-model="submitData.lawEnforcement" |
|
|
|
readonly |
|
|
|
@ -98,21 +99,23 @@ |
|
|
|
</van-action-bar> |
|
|
|
</div> |
|
|
|
</van-form> |
|
|
|
<!-- </van-cell-group>--> |
|
|
|
<!-- </van-cell-group>--> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- <div class="warp_body">--> |
|
|
|
<!-- <van-action-bar>--> |
|
|
|
<!-- <van-action-bar-button text="保存" @click="submit" />--> |
|
|
|
<!-- </van-action-bar>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- <div class="warp_body">--> |
|
|
|
<!-- <van-action-bar>--> |
|
|
|
<!-- <van-action-bar-button text="保存" @click="submit" />--> |
|
|
|
<!-- </van-action-bar>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }" /> |
|
|
|
<UserPopup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveVisible" /> |
|
|
|
<van-popup v-model:show="data.showLawEnforcerFlag" position="bottom" :style="{ height: '30%' }"/> |
|
|
|
<UserPopup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" |
|
|
|
@reciveData="reciveVisible"/> |
|
|
|
|
|
|
|
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }" > |
|
|
|
<van-popup v-model:show="data.showTimePicker" position="bottom" :style="{ height: '30%' }"> |
|
|
|
<van-date-picker |
|
|
|
type="time" |
|
|
|
v-model="data.currentDate" |
|
|
|
@confirm="onConfirm" |
|
|
|
@cancel="data.showTimePicker = false" |
|
|
|
/> |
|
|
|
@ -137,232 +140,249 @@ |
|
|
|
|
|
|
|
<script setup name="register"> |
|
|
|
|
|
|
|
import { showSuccessToast } from 'vant'; |
|
|
|
import 'vant/es/toast/style'; |
|
|
|
import {getByUserIdAndZero, addEnterpriseLawEnforcement, editEnterpriseLawEnforcement} from '../../api/administrative' |
|
|
|
import {queryUserInfo} from '../../api/enforce' |
|
|
|
import { queryEnterpriseInfoList } from '../../api/enterprise' |
|
|
|
import { reactive, ref } from "vue"; |
|
|
|
import { getDict } from "../../api/Home"; |
|
|
|
import { queryLinkage, queryLinkageDictByValueAndParentId } from "../../api/linkage"; |
|
|
|
import {uploadFile} from "../../util/fileUpload"; |
|
|
|
//用户筛选弹窗 |
|
|
|
import UserPopup from './userFilter.vue'; |
|
|
|
const { useCommon } = $globalStore; |
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
let queryaddressId = ref(""); |
|
|
|
const data = reactive({ |
|
|
|
showLawEnforcerFlag:false, |
|
|
|
showTimePicker:false, |
|
|
|
import {showSuccessToast} from 'vant'; |
|
|
|
import 'vant/es/toast/style'; |
|
|
|
import { |
|
|
|
getByUserIdAndZero, |
|
|
|
addEnterpriseLawEnforcement, |
|
|
|
editEnterpriseLawEnforcement |
|
|
|
} from '../../api/administrative' |
|
|
|
import {queryUserInfo} from '../../api/enforce' |
|
|
|
import {queryEnterpriseInfoList} from '../../api/enterprise' |
|
|
|
import {reactive, ref} from "vue"; |
|
|
|
import {getDict} from "../../api/Home"; |
|
|
|
import {queryLinkage, queryLinkageDictByValueAndParentId} from "../../api/linkage"; |
|
|
|
import {uploadFile} from "../../util/fileUpload"; |
|
|
|
//用户筛选弹窗 |
|
|
|
import UserPopup from './userFilter.vue'; |
|
|
|
|
|
|
|
const {useCommon} = $globalStore; |
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
let queryaddressId = ref(""); |
|
|
|
const data = reactive({ |
|
|
|
showLawEnforcerFlag: false, |
|
|
|
showTimePicker: false, |
|
|
|
popupVisible: false, |
|
|
|
popupContent: '', |
|
|
|
showGA:false, |
|
|
|
showItem:false, |
|
|
|
checkItemText:"", |
|
|
|
showGA: false, |
|
|
|
showItem: false, |
|
|
|
checkItemText: "", |
|
|
|
checkRequireText: "", |
|
|
|
ga_columns: [], |
|
|
|
item_columns: [], |
|
|
|
}); |
|
|
|
//保存参数 |
|
|
|
const submitData = reactive({ |
|
|
|
currentDate: [] |
|
|
|
}); |
|
|
|
//保存参数 |
|
|
|
const submitData = reactive({ |
|
|
|
/** ID */ |
|
|
|
id:"", |
|
|
|
id: "", |
|
|
|
/** 登记编号 */ |
|
|
|
lawEnforcementCode:"", |
|
|
|
lawEnforcementCode: "", |
|
|
|
/** 企业名称 */ |
|
|
|
enterpriseName:"", |
|
|
|
enterpriseName: "", |
|
|
|
/**统一社会信用代码 */ |
|
|
|
enterpriseNumber:"", |
|
|
|
enterpriseNumber: "", |
|
|
|
/** 企业ID */ |
|
|
|
enterpriseId:"", |
|
|
|
enterpriseId: "", |
|
|
|
/** 企业联系人 */ |
|
|
|
linkMan:"", |
|
|
|
linkMan: "", |
|
|
|
/** 联系人电话 */ |
|
|
|
linkTel:"", |
|
|
|
linkTel: "", |
|
|
|
/** 检查时间 */ |
|
|
|
checkTime:"", |
|
|
|
checkTime: "", |
|
|
|
/** 检查事项 */ |
|
|
|
checkItem:"", |
|
|
|
checkItem: "", |
|
|
|
/** 检查要求 */ |
|
|
|
checkRequire:"", |
|
|
|
checkRequire: "", |
|
|
|
/** 执法部门 */ |
|
|
|
lawEnforcement:"", |
|
|
|
lawEnforcement: "", |
|
|
|
/** 执法部门ID */ |
|
|
|
lawEnforcementId:"", |
|
|
|
lawEnforcementId: "", |
|
|
|
/** 执法人员 */ |
|
|
|
lawEnforcer:"", |
|
|
|
lawCertificateNum:"", |
|
|
|
lawEnforcer: "", |
|
|
|
lawCertificateNum: "", |
|
|
|
lawEnforcerText: "", |
|
|
|
/** 执法人员ID */ |
|
|
|
lawEnforcerId:"", |
|
|
|
lawEnforcerId: "", |
|
|
|
/** 执法人员2 */ |
|
|
|
lawEnforcerTwo:"", |
|
|
|
lawCertificateNumTwo:"", |
|
|
|
lawEnforcerTwo: "", |
|
|
|
lawCertificateNumTwo: "", |
|
|
|
lawEnforcerTextTwo: "", |
|
|
|
/** 执法人员2ID */ |
|
|
|
lawEnforcerTwoId:"", |
|
|
|
lawEnforcerTwoId: "", |
|
|
|
/** 备注 */ |
|
|
|
remark:"", |
|
|
|
remark: "", |
|
|
|
userId: useCommon.userId |
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
const currentDate =() => { |
|
|
|
const now = new Date(); |
|
|
|
const year = now.getFullYear(); |
|
|
|
const month = (now.getMonth() + 1).toString().padStart(2, '0'); |
|
|
|
const day = now.getDate().toString().padStart(2, '0'); |
|
|
|
data.currentDate = [year, month, day] |
|
|
|
} |
|
|
|
|
|
|
|
const onConfirm = (time) => { |
|
|
|
if(time != null) { |
|
|
|
const onConfirm = (time) => { |
|
|
|
if (time != null) { |
|
|
|
var times = time.selectedValues; |
|
|
|
submitData.checkTime = times[0] +"-"+ times[1] +"-"+ times[2]; |
|
|
|
submitData.checkTime = times[0] + "-" + times[1] + "-" + times[2]; |
|
|
|
} |
|
|
|
data.showTimePicker = false; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const validator = (val) => /^1[34578]\d{9}$/.test(val); |
|
|
|
const validator = (val) => /^1[34578]\d{9}$/.test(val); |
|
|
|
|
|
|
|
const onFailed = (errorInfo) => { |
|
|
|
const onFailed = (errorInfo) => { |
|
|
|
console.log('failed', errorInfo); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const showPopup = () =>{ |
|
|
|
const showPopup = () => { |
|
|
|
data.popupVisible = true; |
|
|
|
} |
|
|
|
const closePopup = () =>{ |
|
|
|
} |
|
|
|
const closePopup = () => { |
|
|
|
data.popupVisible = false; |
|
|
|
} |
|
|
|
const reciveVisible = (item) =>{ |
|
|
|
} |
|
|
|
const reciveVisible = (item) => { |
|
|
|
submitData.lawEnforcerTwo = item.userName |
|
|
|
submitData.lawCertificateNumTwo = item.lawCertificateNum; |
|
|
|
submitData.lawEnforcerTwoId = item.userId; |
|
|
|
// submitData.lawEnforcerTextTwo = submitData.lawEnforcerTwo +" "+ submitData.lawCertificateNumTwo |
|
|
|
submitData.lawEnforcerTextTwo = submitData.lawEnforcerTwo |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* 检查要求 start */ |
|
|
|
const gaConfirm = ({ selectedOptions }) => { |
|
|
|
/* 检查要求 start */ |
|
|
|
const gaConfirm = ({selectedOptions}) => { |
|
|
|
data.checkRequireText = selectedOptions[0].text; |
|
|
|
submitData.checkRequire = selectedOptions[0].value; |
|
|
|
data.showGA = false; |
|
|
|
data.showItem = false; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
/* 检查要求 start */ |
|
|
|
const itemConfirm = ({ selectedOptions }) => { |
|
|
|
/* 检查要求 start */ |
|
|
|
const itemConfirm = ({selectedOptions}) => { |
|
|
|
data.checkItemText = selectedOptions[0].text; |
|
|
|
submitData.checkItem = selectedOptions[0].value; |
|
|
|
data.showGA = false; |
|
|
|
data.showItem = false; |
|
|
|
|
|
|
|
getLinkageByParentIdToGA(selectedOptions[0].id); |
|
|
|
}; |
|
|
|
const itemChange =({ selectedOptions }) => { |
|
|
|
}; |
|
|
|
const itemChange = ({selectedOptions}) => { |
|
|
|
// getLinkageByParentIdToGA(selectedOptions[0].id); |
|
|
|
} |
|
|
|
const gaCancel = () => { |
|
|
|
} |
|
|
|
const gaCancel = () => { |
|
|
|
data.showGA = false; |
|
|
|
data.showItem = false; |
|
|
|
} |
|
|
|
/* 检查要求 end */ |
|
|
|
} |
|
|
|
/* 检查要求 end */ |
|
|
|
|
|
|
|
// 返回 |
|
|
|
const goBack = () => { |
|
|
|
// 返回 |
|
|
|
const goBack = () => { |
|
|
|
router.go(-1); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const dataFillIn = () => { |
|
|
|
getByUserIdAndZero(useCommon.userId,success =>{ |
|
|
|
const dataFillIn = () => { |
|
|
|
getByUserIdAndZero(useCommon.userId, success => { |
|
|
|
//跳转企业二维码地址 |
|
|
|
if(success.success){ |
|
|
|
if (success.success) { |
|
|
|
Object.keys(submitData).forEach((item) => { |
|
|
|
submitData[item] = success.data[item] ? success.data[item] : ""; |
|
|
|
}) |
|
|
|
data.checkItemText =success.data['params'].checkItemText; |
|
|
|
data.checkRequireText =success.data['params'].checkRequireText; |
|
|
|
submitData.lawEnforcerText =success.data['lawEnforcer']; |
|
|
|
submitData.lawEnforcerTextTwo =success.data['lawEnforcerTwo']; |
|
|
|
data.checkItemText = success.data['params'].checkItemText; |
|
|
|
data.checkRequireText = success.data['params'].checkRequireText; |
|
|
|
submitData.lawEnforcerText = success.data['lawEnforcer']; |
|
|
|
submitData.lawEnforcerTextTwo = success.data['lawEnforcerTwo']; |
|
|
|
// showSuccessToast('保存成功'); |
|
|
|
} |
|
|
|
},error=>{ |
|
|
|
}, error => { |
|
|
|
console.log("保存失败") |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const tmpSave = () => { |
|
|
|
const tmpSave = () => { |
|
|
|
// showSuccessToast('临时保存'); |
|
|
|
submitData.lawCertificateNum = null; |
|
|
|
addEnterpriseLawEnforcement(submitData,success =>{ |
|
|
|
addEnterpriseLawEnforcement(submitData, success => { |
|
|
|
//跳转企业二维码地址 |
|
|
|
if(success.success){ |
|
|
|
if (success.success) { |
|
|
|
showSuccessToast('保存成功'); |
|
|
|
router.push( |
|
|
|
{ |
|
|
|
path: "/appointmentList" |
|
|
|
}); |
|
|
|
} |
|
|
|
},error=>{ |
|
|
|
}, error => { |
|
|
|
console.log("保存失败") |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const submit112 = () =>{ |
|
|
|
const submit112 = () => { |
|
|
|
// showSuccessToast('登记成功'); |
|
|
|
submitData.lawCertificateNum = null; |
|
|
|
editEnterpriseLawEnforcement(submitData,success =>{ |
|
|
|
editEnterpriseLawEnforcement(submitData, success => { |
|
|
|
//跳转企业二维码地址 |
|
|
|
if(success.success){ |
|
|
|
if (success.success) { |
|
|
|
showSuccessToast('登记成功'); |
|
|
|
router.push( |
|
|
|
{ |
|
|
|
path: "/appointmentList" |
|
|
|
}); |
|
|
|
} |
|
|
|
},error=>{ |
|
|
|
}, error => { |
|
|
|
console.log("登记失败") |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const getLinkageByValueAndParentId = (value, parentId) => { |
|
|
|
const getLinkageByValueAndParentId = (value, parentId) => { |
|
|
|
// 查询检查要求字典信息 |
|
|
|
queryLinkageDictByValueAndParentId({"value":value, "parentId": parentId}, success => { |
|
|
|
queryLinkageDictByValueAndParentId({"value": value, "parentId": parentId}, success => { |
|
|
|
getLinkageByParentIdToItem(success.id) |
|
|
|
},error=>{}); |
|
|
|
} |
|
|
|
}, error => { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
const getLinkageByParentIdToItem = (parentId) => { |
|
|
|
const getLinkageByParentIdToItem = (parentId) => { |
|
|
|
// 查询检查要求字典信息 |
|
|
|
queryLinkage({"parentId": parentId}, success => { |
|
|
|
for(var i=0; i<success.length; i++) { |
|
|
|
data.item_columns.push({ text: success[i].title, value: success[i].id, id: success[i].id }) |
|
|
|
for (var i = 0; i < success.length; i++) { |
|
|
|
data.item_columns.push({text: success[i].title, value: success[i].id, id: success[i].id}) |
|
|
|
// if (i==0) { |
|
|
|
// data.checkItemText = success[i].title; |
|
|
|
// submitData.checkItem = success[i].id; |
|
|
|
// getLinkageByParentIdToGA(success[i].id); |
|
|
|
// } |
|
|
|
} |
|
|
|
},error=>{}); |
|
|
|
} |
|
|
|
}, error => { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
const getLinkageByParentIdToGA = (parentId) => { |
|
|
|
const getLinkageByParentIdToGA = (parentId) => { |
|
|
|
// 查询检查要求字典信息 |
|
|
|
data.ga_columns = []; |
|
|
|
queryLinkage({"parentId": parentId}, success => { |
|
|
|
for(var i=0; i<success.length; i++) { |
|
|
|
data.ga_columns.push({ text: success[i].title, value: success[i].id, id: success[i].id }) |
|
|
|
for (var i = 0; i < success.length; i++) { |
|
|
|
data.ga_columns.push({text: success[i].title, value: success[i].id, id: success[i].id}) |
|
|
|
// if (i==0) { |
|
|
|
// data.checkRequireText = success[i].title; |
|
|
|
// submitData.checkRequire = success[i].id; |
|
|
|
// } |
|
|
|
} |
|
|
|
},error=>{}); |
|
|
|
} |
|
|
|
}, error => { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//初始化参数,获取扫码的企业统一信用编码 |
|
|
|
onMounted(() =>{ |
|
|
|
//初始化参数,获取扫码的企业统一信用编码 |
|
|
|
onMounted(() => { |
|
|
|
// 数据填充 |
|
|
|
dataFillIn(); |
|
|
|
|
|
|
|
currentDate(); |
|
|
|
|
|
|
|
//查询当前登录人员信息 |
|
|
|
queryUserInfo(useCommon.userId,success =>{ |
|
|
|
queryUserInfo(useCommon.userId, success => { |
|
|
|
console.log(success.data) |
|
|
|
submitData.lawEnforcer = success.data.userName; |
|
|
|
submitData.lawCertificateNum = success.data.lawCertificateNum |
|
|
|
@ -371,7 +391,8 @@ onMounted(() =>{ |
|
|
|
submitData.lawEnforcerId = success.data.userId; |
|
|
|
submitData.lawEnforcement = success.data.dept.deptName; |
|
|
|
submitData.lawEnforcementId = success.data.dept.deptId; |
|
|
|
},error=>{}); |
|
|
|
}, error => { |
|
|
|
}); |
|
|
|
|
|
|
|
getLinkageByValueAndParentId("check_item", "100"); |
|
|
|
|
|
|
|
@ -388,21 +409,21 @@ onMounted(() =>{ |
|
|
|
// data.item_columns.push({ text: success.data[i].dictLabel, value: success.data[i].dictValue }) |
|
|
|
// } |
|
|
|
// },error=>{}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
const reciveData = (item) =>{ |
|
|
|
const reciveData = (item) => { |
|
|
|
console.log(item); |
|
|
|
submitData.enterpriseName = item.enterpriseName; |
|
|
|
submitData.linkTel = item.enterpriseTel; |
|
|
|
submitData.linkMan = item.legalPerson; |
|
|
|
submitData.enterpriseNumber = item.enterpriseNumber; |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<script> |
|
|
|
//案件筛选弹窗 |
|
|
|
import Popup from '../enterprise/companyFilter.vue'; |
|
|
|
//案件筛选弹窗 |
|
|
|
import Popup from '../enterprise/companyFilter.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Popup |
|
|
|
}, |
|
|
|
@ -420,30 +441,32 @@ export default { |
|
|
|
this.popupVisible = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style lang="less" scoped> |
|
|
|
.address_edit { |
|
|
|
.address_edit { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
height: 100%; |
|
|
|
overflow: hidden; |
|
|
|
background-color: #f4f4f4; |
|
|
|
} |
|
|
|
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */ |
|
|
|
.van-popup.van-toast{ |
|
|
|
} |
|
|
|
|
|
|
|
/* vant4的 Toast 和 Popup 样式冲突,会导致 Toast 变成白底 */ |
|
|
|
.van-popup.van-toast { |
|
|
|
background: var(--van-toast-background) !important; |
|
|
|
box-sizing: content-box !important; |
|
|
|
/* 下面3条css,影响不大 */ |
|
|
|
transition: all var(--van-duration-fast) !important; |
|
|
|
width: var(--van-toast-default-width) !important; |
|
|
|
max-width: var(--van-toast-max-width) !important; |
|
|
|
} |
|
|
|
.van-popup.van-toast .van-toast__icon{ |
|
|
|
} |
|
|
|
|
|
|
|
.van-popup.van-toast .van-toast__icon { |
|
|
|
font-size: var(--van-toast-icon-size) !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.van-button) { |
|
|
|
:deep(.van-button) { |
|
|
|
margin: 5% 3%; |
|
|
|
padding: 0; |
|
|
|
width: 94%; |
|
|
|
@ -454,6 +477,6 @@ export default { |
|
|
|
background: #1367fe; |
|
|
|
border: 0.02667rem solid #1367fe; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|