Browse Source

登记回显, 执法依据没条件不让查询

v2
蟑螂恶霸 2 years ago
parent
commit
dfe74b4769
  1. 2
      src/components/footer-enforcement-nav/index.vue
  2. 149
      src/views/enforce/sign.vue
  3. 2
      src/views/enforce/zqyjjdmFilter.vue
  4. 2
      src/views/enterprise/registrationDetail.vue

2
src/components/footer-enforcement-nav/index.vue

@ -10,7 +10,7 @@
replace
icon="clock-o"
to="/appointmentList"
>预约</van-tabbar-item
>预告</van-tabbar-item
>
<van-tabbar-item
name="Shop"

149
src/views/enforce/sign.vue

@ -42,7 +42,8 @@
<!-- @click="showPopup(index)"-->
<!-- />-->
<div v-for="(item, index) in data.lawCer" :key="index">
<div class="item-delete" v-if="index>0" @click.stop="cancelUser(index)"><label>执法人员 {{index+1}}</label> <a>删除</a></div>
<div class="item-delete" v-if="index>0" @click.stop="cancelUser(index)"><label>执法人员
{{index+1}}</label> <a>删除</a></div>
<van-field
v-model="item.show"
label="执法人员"
@ -54,7 +55,10 @@
@click="showPopup(index)"
/>
</div>
<div class="addbtn" @click.stop="addLawCer"><van-icon name="add-o" />增加执法人员</div>
<div class="addbtn" @click.stop="addLawCer">
<van-icon name="add-o"/>
增加执法人员
</div>
<!-- <van-field
v-model="submitData.subsidiaryerText"
label="辅助人员"
@ -92,13 +96,22 @@
:rules="[{ required: true, message: '必填项' }]"
@click="data.showTimePicker = true"
/>
<!-- <van-field
v-model="submitData.lawField"
<van-field
v-model="submitData.lawFieldText"
label="执法领域"
readonly
placeholder="请选择 执法领域"
is-link
/> -->
readonly
@click="data.showLawFieldPicker = true"
/>
<van-field
v-model="submitData.checkCategoryText"
label="执法类别"
placeholder="请选择 执法类别"
is-link
readonly
@click="data.showCheckCategoryPicker = true"
/>
<van-field
v-model="submitData.lawEnforcementItemText"
@ -146,7 +159,8 @@
<!-- is-link-->
<!-- />-->
<div v-for="(item, index) in data.lawList" :key="index">
<div class="item-delete" @click.stop="cancelEnforcement(index)"><label>检查依据 {{index+1}}</label> <a>删除</a></div>
<div class="item-delete" @click.stop="cancelEnforcement(index)"><label>检查依据 {{index+1}}</label>
<a>删除</a></div>
<van-field
v-model="item.text"
readonly
@ -158,7 +172,10 @@
is-link
/>
</div>
<div class="addbtn" @click.stop="addField"><van-icon name="add-o" />增加检查依据</div>
<div class="addbtn" @click.stop="addField">
<van-icon name="add-o"/>
增加检查依据
</div>
<van-field v-model="submitData.lawEnforcementBasis" v-show="false"/>
<!-- <van-field-->
<!-- v-model="submitData.reslut"-->
@ -191,7 +208,8 @@
<label>上传附件</label> <span>(不多于 8张)</span>
</div>
<!-- :after-read="uploadFiles" -->
<van-uploader v-model="data.fileListObj" class="file" multiple max-count="8" :after-read="uploadFiles" :before-delete="deleteFile">
<van-uploader v-model="data.fileListObj" class="file" multiple max-count="8"
:after-read="uploadFiles" :before-delete="deleteFile">
<template #preview-cover="{ file }">
<div class="preview-cover van-ellipsis">{{ file.name }}</div>
</template>
@ -245,7 +263,8 @@
/>
</van-popup>
<Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData"/>
<Popup :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup" @reciveData="reciveData2" />
<Popup :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup"
@reciveData="reciveData2"/>
<van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }">
@ -263,7 +282,8 @@
@cancel="gaCancel"
/>
</van-popup>
<Popupzq :visible="data.popupVisibleqz" :content="data.popupContentqz" @close="closePopup" @reciveData="reciveDataqz" />
<Popupzq :visible="data.popupVisibleqz" :content="data.popupContentqz" @close="closePopup"
@reciveData="reciveDataqz"/>
<!-- <van-popup v-model:show="data.showGA" position="bottom" :style="{ height: '30%' }">-->
<!-- <van-picker title="依据"-->
<!-- :columns="data.ga_columns"-->
@ -272,14 +292,24 @@
<!-- />-->
<!-- </van-popup>-->
<LawPopup :lawEnforcementId="submitData.lawEnforcementId" :enterpriseNumber="submitData.enterpriseNumber" :visible="data.lawChecked" :content="data.lawContent" @close="closePopup"
<LawPopup :lawEnforcementId="submitData.lawEnforcementId" :enterpriseNumber="submitData.enterpriseNumber"
:visible="data.lawChecked" :content="data.lawContent" @close="closePopup"
@reciveData="reciveLaw"/>
<van-overlay :show="data.overlayShow">
<div class="wrapper">
<div class="block"><van-loading size="100" type="spinner" color="#1989fa" /></div>
<div class="block">
<van-loading size="100" type="spinner" color="#1989fa"/>
</div>
</div>
</van-overlay>
<van-popup v-model:show="data.showLawFieldPicker" round position="bottom">
<van-picker :columns="data.lawFields" @cancel="data.showLawFieldPicker = false" @confirm="onConfirmLawField" />
</van-popup>
<van-popup v-model:show="data.showCheckCategoryPicker" round position="bottom">
<van-picker :columns="data.checkCategorys" @cancel="data.showCheckCategoryPicker = false" @confirm="onConfirmCheckCategory" />
</van-popup>
</div>
</template>
@ -287,7 +317,13 @@
import {showSuccessToast} from 'vant';
import 'vant/es/toast/style';
import {addEnforcementRegistration, editEnforcementRegistration, getRegByUserIdAndZero, getByUserIdAndEnterpriseNumber, queryUserInfo} from '../../api/enforce'
import {
addEnforcementRegistration,
editEnforcementRegistration,
getRegByUserIdAndZero,
getByUserIdAndEnterpriseNumber,
queryUserInfo
} from '../../api/enforce'
import {getEnterpriseInformation} from '../../api/enterprise'
import {reactive, ref} from "vue";
import {uploadFile} from "../../util/fileUpload";
@ -351,6 +387,10 @@ const data = reactive({
maxDate: null,
overlayShow: false,
fileListObj: [],
showLawFieldPicker: false,
lawFields: [],
showCheckCategoryPicker: false,
checkCategorys: [],
});
var fileSize = 0;
//保存参数
@ -401,6 +441,9 @@ const submitData = reactive({
checkCss: "",
enforceReason: "",
lawField: "",
lawFieldText: "",
checkCategory: "",
checkCategoryText: "",
})
@ -417,9 +460,14 @@ const tapBad = () => {
const getLinkageByValueAndParentId = (value, parentId) => {
// 查询检查要求字典信息
queryLinkageDictByValueAndParentId({"dataScopeId": useCommon.userId, "value":value, "parentId": parentId}, success => {
queryLinkageDictByValueAndParentId({
"dataScopeId": useCommon.userId,
"value": value,
"parentId": parentId
}, success => {
getLinkageByParentIdToItem(success.id)
},error=>{});
}, error => {
});
}
const getLinkageByParentIdToItem = (parentId) => {
@ -433,7 +481,8 @@ const getLinkageByParentIdToItem = (parentId) => {
// getLinkageByParentIdToGA(success[i].id);
// }
}
},error=>{});
}, error => {
});
}
const getLinkageByParentIdToGA = (parentId) => {
@ -447,7 +496,8 @@ const getLinkageByParentIdToGA = (parentId) => {
// submitData.lawEnforcementBasis = success[i].id;
// }
}
},error=>{});
}, error => {
});
}
//3a0096181c184e5aa56f70923680856d$6e74ceda1463c165fd43eeeadce4f7cd
@ -461,6 +511,11 @@ onMounted(() =>{
// let dateLimit = new Date();
// data.maxDate = new Date(this.$moment(dateLimit).format('YYYY/MM/DD'));
// 行政执法领域
initlawField();
// 行政检查类别
initCheckCategory();
// 数据填充
dataFillIn();
@ -581,11 +636,39 @@ const gaCancel = () => {
}
/* 检查要求 end */
/** 行政执法领域 */
const initlawField = () => {
data.lawFields = [];
getDict({"dictType":"law_field"}, success => {
if (success.success) {
for (var i=0; i<success.data.length; i++) {
data.lawFields.push(
{"text":success.data[i].dictLabel, "value":success.data[i].dictValue}
);
}
}
});
}
/** 行政检查类别 */
const initCheckCategory = () => {
data.checkCategorys = [];
getDict({"dictType":"check_category"}, success => {
if (success.success) {
for (var i=0; i<success.data.length; i++) {
data.checkCategorys.push(
{"text":success.data[i].dictLabel, "value":success.data[i].dictValue}
);
}
}
});
}
const dataFillIn = () => {
// getRegByUserIdAndZero(useCommon.userId,success =>{
getByUserIdAndEnterpriseNumber("add", useCommon.userId, submitData.enterpriseNumber, success => {
//跳转企业二维码地址
if (success.success) {
console.log("============> : ", success.data);
Object.keys(submitData).forEach((item) => {
if ("lawEnforcement" != item && "lawCertificateNumText" != item && "enforcementTime" != item) {
submitData[item] = success.data[item] ? success.data[item] : "";
@ -600,7 +683,9 @@ const dataFillIn = () => {
// data.fileListObj.push({ 'url': 'https://fastly.jsdelivr.net/npm/@vant/assets/leaf.jpeg', 'file':{'name':'leaf'} });
for (var k = 0; k < success.data.fileList.length; k++) {
if (k > 8) {break;}
if (k > 8) {
break;
}
data.fileListObj.push({
'url': success.data.fileList[k],
'file': {'name': success.data.fileList[k]}
@ -652,7 +737,9 @@ const dataFillIn = () => {
const tmpSave = () => {
if (submitData.lawCertificateNumText.length <= 0
|| submitData.bureauDeptName.length <= 0
|| data.lawCer[0].id.length <=0) { return null; }
|| data.lawCer[0].id.length <= 0) {
return null;
}
data.overlayShow = true; // 遮罩层
submitData.userId = useCommon.userId;
@ -698,7 +785,9 @@ const tmpSave = () => {
const submit = (type) => {
if (submitData.lawCertificateNumText.length <= 0
|| submitData.bureauDeptName.length <= 0
|| data.lawCer[0].id.length <=0) { return null; }
|| data.lawCer[0].id.length <= 0) {
return null;
}
data.overlayShow = true; // 遮罩层
submitData.isSubmit = type;
submitData.userId = useCommon.userId;
@ -868,6 +957,19 @@ const reciveLaw = (item) => {
}
}
const onConfirmLawField = (item) => {
var obj = item.selectedOptions[0];
submitData.lawField = obj.value;
submitData.lawFieldText = obj.text;
data.showLawFieldPicker = false;
}
const onConfirmCheckCategory = (item) => {
var obj = item.selectedOptions[0];
submitData.checkCategory = obj.value;
submitData.checkCategoryText = obj.text;
data.showCheckCategoryPicker = false;
}
const beforeRead = (file) => {
if (file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/jpg') {
// Toast('请上传图片格式');
@ -943,6 +1045,7 @@ const beforeRead = (file) =>{
right: 5%;
font-size: 0.5rem;
}
.address_edit {
display: flex;
flex-direction: column;
@ -980,6 +1083,7 @@ const beforeRead = (file) =>{
width: var(--van-toast-default-width) !important;
max-width: var(--van-toast-max-width) !important;
}
.van-popup.van-toast .van-toast__icon {
font-size: var(--van-toast-icon-size) !important;
}
@ -991,6 +1095,7 @@ const beforeRead = (file) =>{
background-color: #f4f4f4;
border: 0;
}
.file-upload {
position: relative;
min-height: 3.0rem;
@ -1006,11 +1111,13 @@ const beforeRead = (file) =>{
width: 90%;
height: 0.65rem;
font-size: 0.38rem;
span {
font-size: 0.32rem;
color: rgb(221, 229, 227);
}
}
.file {
position: relative;
width: 100%;

2
src/views/enforce/zqyjjdmFilter.vue

@ -80,6 +80,8 @@
queryList() {
if (this.searchParam.searchValue.length <= 0) {
showToast('因数据过多, 不支持无条件查询');
this.loading = false;
this.finished = true;
} else {
this.searchParam.pageNum = (this.curPage-1)*this.searchParam.pageSize;
queryZqyjjdm({'searchValue': this.searchParam.searchValue}, success => {

2
src/views/enterprise/registrationDetail.vue

@ -337,10 +337,12 @@ onMounted(() =>{
submitData.enforce = success.data.enforce;
//评价信息
submitData.isEvaluate = success.data.isEvaluate;
if (null != enterpriseEvaluate && "" != enterpriseEvaluate) {
submitData.evaluateDescription = success.data.enterpriseEvaluate.evaluateDescription;
submitData.linkman = success.data.enterpriseEvaluate.linkman;
submitData.linkmanTel = success.data.enterpriseEvaluate.linkmanTel;
submitData.authorization = success.data.enterpriseEvaluate.authorization;
}
if(success.data.reslut == 0){
data.good = "#7FFFD4";

Loading…
Cancel
Save