Commit 3813da0c authored by lei's avatar lei

Merge branch 'gaoqucodecheck' of...

Merge branch 'gaoqucodecheck' of http://h.gemho.cn:7099/zhaojunbao/gaoquyingjih5-asd into gaoqucodecheck
parents 4e51edf5 6d9bf509
...@@ -123,7 +123,8 @@ function getUserInfo() { ...@@ -123,7 +123,8 @@ function getUserInfo() {
gemhoUtil.setCookie('token', result.token, 1) // 存储1天后过期 gemhoUtil.setCookie('token', result.token, 1) // 存储1天后过期
// 2025-5-30 08:54:47 新增消费者判断逻辑 // 2025-5-30 08:54:47 新增消费者判断逻辑
gemhoUtil.setCookie('userType', 'consumers') // 存储1天后过期 // gemhoUtil.setCookie('userType', 'consumers') // 存储1天后过期
gemhoUtil.setCookie('userType', result.userType) // 存储1天后过期
if(gemhoUtil.getCookie('userType') == 'consumers'){ if(gemhoUtil.getCookie('userType') == 'consumers'){
let merId = gemhoUtil.getParameter('merId') let merId = gemhoUtil.getParameter('merId')
......
...@@ -48,442 +48,332 @@ ...@@ -48,442 +48,332 @@
<!-- <van-tab title="培训演练"></van-tab> --> <!-- <van-tab title="培训演练"></van-tab> -->
</van-tabs> </van-tabs>
<!-- form开始 -->
<div
class="form-container"
v-if="activeTab==0"
>
<div class="form-item">
<span class="form-label">商家名称</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.unitName"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">负责人</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.owner"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">电话</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.merchantPhone"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">地址</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.businessAddress"
v-model="formData.merchantPhone"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">所属社区</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.community"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4community"
:key="i"
:label="item.label"
:value="item.label"
></option>
</select>
</div>
</div>
<div
class="form-item"
v-if="flag=='XQ'"
>
<span class="form-label">网格员</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.gridMemberName"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div
class="form-item"
v-if="flag=='XQ'"
>
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.gridMemberPhone"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">生产经营类型</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.businessType"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4businessType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">行业类型</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.industryType"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4industryType"
:key="i"
:label="item.industryName"
:value="item.id"
></option>
</select>
</div>
</div>
<!-- 特殊处理:编辑没有详情有 -->
<div
class="form-item"
v-if="flag=='XQ'"
>
<span class="form-label">行业主管</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.industryType"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">场所类型</span>
<div class="form-input-wrap">
<select
class="selector"
name=""
v-model="formData.smallPlaceTypeId"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4changhsuoType"
:key="i"
:label="item.dictLabel"
:value="Number(item.dictValue)"
></option>
</select>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>商家平面图</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader
v-model="formData.floorPlanPhotosH5"
:max-count="1"
:after-read="handleFileUpload"
class="uploader-wrapper"
/>
</div>
<div v-if="flag=='XQ'">
<ImagePreview
v-for="(imgItem, subIndex) in formData.floorPlanPhotos"
:src="imgItem"
alt=""
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
/>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>营业执照</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader
v-model="formData.businessLicensePhotosH5"
:max-count="1"
:after-read="handleFileUpload"
class="uploader-wrapper"
/>
</div>
<div v-if="flag=='XQ'">
<ImagePreview
v-for="(imgItem, subIndex) in formData.businessLicensePhotos"
:src="imgItem"
alt=""
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
/>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>门头图</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader
v-model="formData.storefrontPhotosH5"
:max-count="4"
:after-read="handleFileUpload"
class="uploader-wrapper"
/>
</div>
<div v-if="flag=='XQ'">
<ImagePreview
v-for="(imgItem, subIndex) in formData.storefrontPhotos"
:src="imgItem"
alt=""
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
/>
</div>
</div>
<button
v-if="flag=='XG'"
class="save-btn"
style="margin-left: 50%; transform: translateX(-50%)"
@click="save"
>
保存
</button>
<div>
<h5
class="imager-item-title"
style="border: none"
>
<span>安全二维码</span>
<span></span>
</h5>
<div>
<ImagePreview
:src="formData.qrCodeUrl"
style="margin-left: 50%; transform: translateX(-50%)"
/>
</div>
</div>
<button
v-if="userType==='shop'"
class="save-btn"
style="margin-left: 50%; transform: translateX(-50%)"
@click="saveCanvas"
>
保存二维码
</button>
</div>
<!-- form结束 -->
<!-- 经营信息开始 -->
<div
class="form-container"
v-if="activeTab==1"
>
<div class="form-item">
<span class="form-label">建筑面积(㎡)</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.area"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">建筑结构</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.buildingStructure"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">产权人</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.owner"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.ownerPhone"
v-model="formData.merchantPhone"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">经营人</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.operator"
v-model="formData.merchantPhone"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.operatorPhone"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">房屋类型</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.houseType"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4fangwuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">房屋用途</span>
<div class="form-input-wrap">
<select
class="selector"
v-model="formData.houseUsage"
:disabled="flag=='XQ'"
>
<option
v-for="(item, i) in dict4fangwuyongtuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">房东姓名</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.landlordName"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input
type="text"
v-model="formData.landlordContact"
class="form-input"
:disabled="flag=='XQ'"
/>
</div>
</div>
<button
v-if="flag=='XG'"
class="save-btn"
style="margin-left: 50%; transform: translateX(-50%)"
@click="save"
>
保存
</button>
</div>
<!-- form结束 -->
<!-- 消费者安全建议列表 -->
<div v-if="activeTab==2"> <!-- form开始 -->
<van-list> <div class="form-container" v-if="activeTab==0">
<van-cell <div class="form-item">
v-for="(item, index) in consumerSuggestList" <span class="form-label">商家名称</span>
:key="item.id" <div class="form-input-wrap">
@click="viewDetail(item)" <input type="text" v-model="formData.unitName" class="form-input" :disabled="flag=='XQ'">
> </div>
<div style="width: 100%"> </div>
<div style="display: flex; justify-content: space-between; margin: 8px 0">
<span style="color: #737373; font-size: 0.28rem">日期:{{ item.submitDate }}</span> <div class="form-item">
</div> <span class="form-label">负责人</span>
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; font-size: 0.3rem; font-weight: bold; font-family: PingFang SC">{{item.contactDetails}}</div> <div class="form-input-wrap">
</div> <input type="text" v-model="formData.merchantName" class="form-input" :disabled="flag=='XQ'"
</van-cell> >
</van-list> </div>
</div> </div>
<!-- 消费者安全建议列表结束 -->
</div> <div class="form-item">
</div> <span class="form-label">电话</span>
</body> <div class="form-input-wrap">
<input type="text" v-model="formData.merchantPhone" class="form-input"
:disabled="flag=='XQ'">
</div>
</div>
<div class="form-item">
<span class="form-label">地址</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.businessAddress" v-model="formData.merchantPhone"
class="form-input" :disabled="flag=='XQ'">
</div>
</div>
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">所属社区</span>
<div class="form-input-wrap">
<select class="selector" v-model="formData.community"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4community"
:key="i"
:label="item.label"
:value="item.label"
></option>
</select>
</div>
</div>
<div class="form-item" v-if="flag=='XQ'">
<span class="form-label">网格员</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.gridMemberName" class="form-input" :disabled="flag=='XQ'"
>
</div>
</div>
<div class="form-item" v-if="flag=='XQ'">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.gridMemberPhone" class="form-input" :disabled="flag=='XQ'"
>
</div>
</div>
<div class="form-item">
<span class="form-label">生产经营类型</span>
<div class="form-input-wrap">
<select class="selector" v-model="formData.businessType"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4businessType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">行业类型</span>
<div class="form-input-wrap">
<select class="selector" v-model="formData.industryType"
:disabled="flag=='XQ'" @change="handleIndustryChange">
<option
v-for="(item, i) in dict4industryType"
:key="i"
:label="item.industryName"
:value="item.id"
></option>
</select>
</div>
</div>
<!-- 特殊处理:编辑没有详情有 -->
<div class="form-item" v-if="flag=='XQ'">
<span class="form-label">行业主管</span>
<div class="form-input-wrap">
{{ formData.industryDeptName }}
<!-- <input type="text" v-model="formData.industryDeptName" class="form-input" :disabled="flag=='XQ'"> -->
</div>
</div>
<div class="form-item">
<span class="form-label">场所类型</span>
<div class="form-input-wrap">
<select class="selector" name="" v-model="formData.smallPlaceTypeId"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4changhsuoType"
:key="i"
:label="item.categoryName"
:value="item.id"
></option>
</select>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>商家平面图</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader
v-model="formData.floorPlanPhotosH5"
:max-count="1"
:after-read="handleFileUpload"
class="uploader-wrapper"
/>
</div>
<div v-if="flag=='XQ'">
<ImagePreview
v-for="(imgItem, subIndex) in formData.floorPlanPhotos"
:src="imgItem"
alt=""
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
/>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>营业执照</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader
v-model="formData.businessLicensePhotosH5"
:max-count="1"
:after-read="handleFileUpload"
class="uploader-wrapper"
/>
</div>
<div v-if="flag=='XQ'">
<ImagePreview
v-for="(imgItem, subIndex) in formData.businessLicensePhotos"
:src="imgItem"
alt=""
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
/>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>门头图</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader
v-model="formData.storefrontPhotosH5"
:max-count="4"
:after-read="handleFileUpload"
class="uploader-wrapper"
/>
</div>
<div v-if="flag=='XQ'">
<ImagePreview
v-for="(imgItem, subIndex) in formData.storefrontPhotos"
:src="imgItem"
alt=""
style="width: 1.2rem; height: 1.2rem; margin-right: 0.2rem"
/>
</div>
</div>
<button v-if="flag=='XG'" class="save-btn" style="margin-left: 50%; transform: translateX(-50%);" @click="save"
>保存</button>
<div>
<h5 class="imager-item-title" style="border: none;">
<span>安全二维码</span>
<span></span>
</h5>
<div>
<img :src="formData.qrCodeUrl" style="margin-left: 50%; transform: translateX(-50%);" />
</div>
</div>
<button v-if="userType==='shop'" class="save-btn" style="margin-left: 50%; transform: translateX(-50%);" @click="saveCanvas"
>保存二维码</button>
</div>
<!-- form结束 -->
<!-- 经营信息开始 -->
<div class="form-container" v-if="activeTab==1">
<div class="form-item">
<span class="form-label">建筑面积(㎡)</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.area" class="form-input" :disabled="flag=='XQ'">
</div>
</div>
<div class="form-item">
<span class="form-label">建筑结构</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.buildingStructure" class="form-input" :disabled="flag=='XQ'"
>
</div>
</div>
<div class="form-item">
<span class="form-label">产权人</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.owner" class="form-input"
:disabled="flag=='XQ'">
</div>
</div>
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.ownerPhone" v-model="formData.merchantPhone"
class="form-input" :disabled="flag=='XQ'">
</div>
</div>
<div class="form-item">
<span class="form-label">经营人</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.operator" v-model="formData.merchantPhone"
class="form-input" :disabled="flag=='XQ'">
</div>
</div>
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.operatorPhone" class="form-input" :disabled="flag=='XQ'"
>
</div>
</div>
<div class="form-item">
<span class="form-label">房屋类型</span>
<div class="form-input-wrap">
<select class="selector" v-model="formData.houseType"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4fangwuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">房屋用途</span>
<div class="form-input-wrap">
<select class="selector" v-model="formData.houseUsage"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4fangwuyongtuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
></option>
</select>
</div>
</div>
<div class="form-item">
<span class="form-label">房东姓名</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.landlordName" class="form-input" :disabled="flag=='XQ'"
>
</div>
</div>
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.landlordContact" class="form-input" :disabled="flag=='XQ'"
>
</div>
</div>
<button v-if="flag=='XG'" class="save-btn" style="margin-left: 50%; transform: translateX(-50%);" @click="save"
>保存</button>
</div>
<!-- form结束 -->
<!-- 消费者安全建议列表 -->
<div v-if="activeTab==2">
<van-list>
<van-cell v-for="(item, index) in consumerSuggestList" :key="item.id" @click="viewDetail(item)" >
<div style="width: 100%;">
<div style="display: flex; justify-content: space-between; margin: 8px 0;">
<span style="color: #737373; font-size: 0.28rem;">日期:{{ item.submitDate }}</span>
</div>
<div style="
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333;
font-size: 0.3rem;
font-weight: bold;
font-family: PingFang SC;
">{{item.contactDetails}}
</div>
</div>
</van-cell>
</van-list>
</div>
<!-- 消费者安全建议列表结束 -->
</div>
</div>
</body>
</html> </html>
>>>>>>> Stashed changes
...@@ -63,20 +63,19 @@ window.addEventListener('load', function () { ...@@ -63,20 +63,19 @@ window.addEventListener('load', function () {
mounted() { mounted() {
// 详情编辑权限控制 // 详情编辑权限控制
const userType = gemhoUtil.getCookie('userType') const userType = gemhoUtil.getCookie('userType')
if(userType == 'wgy'){ if(userType !== 'wgy'){
this.flag = 'XG' this.flag = 'XG'
}else{ }else{
this.flag = 'XQ' this.flag = 'XQ'
} }
this.detail() this.detail()
this.getDict4changhsuoType()
this.getDict4fangwuType() this.getDict4fangwuType()
this.getDict4fangwuyongtuType() this.getDict4fangwuyongtuType()
this.getDict4businessType() this.getDict4businessType()
this.getDict4community() this.getDict4community()
this.getDict4industryType() this.getDict4industryType()
// this.getDict4changhsuoType()
}, },
methods: { methods: {
viewDetail(item) { viewDetail(item) {
...@@ -125,7 +124,7 @@ window.addEventListener('load', function () { ...@@ -125,7 +124,7 @@ window.addEventListener('load', function () {
} }
}) })
}, },
getDict4industryType(){ getDict4changhsuoType(param){
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"], interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
...@@ -133,61 +132,38 @@ window.addEventListener('load', function () { ...@@ -133,61 +132,38 @@ window.addEventListener('load', function () {
reqParams: { reqParams: {
page:1, page:1,
size: 9999, size: 9999,
sign: 20, // 行业类型列表 sign: 21, // 场所类型=>行业类别
...param
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
setTimeout(() => { setTimeout(() => {
this.getDict4industryType() this.getDict4changhsuoType()
}, 0); }, 0);
return return
} }
if (res) { if (res) {
console.log('接口回调数据-行业类型', JSON.parse(res)) console.log('接口回调数据', JSON.parse(res))
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
vant.Toast.clear() vant.Toast.clear()
}) })
}, 0); }, 0);
var result = JSON.parse(res) var result = JSON.parse(res)
this.dict4industryType = result.data.body.data this.dict4changhsuoType = result.data.body.data
} }
}) })
}, },
getDict4community(){ handleIndustryChange(val){
http2.post({ // 选择后晴空下级下拉框值
serviceId: API_KEY_MAP["page"]['id'], this.dict4changhsuoType = []
interfacePublicKey: API_KEY_MAP["page"]["publicKey"], this.getDict4changhsuoType({
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"], industryId: this.formData.industryType
reqParams: {
page:1,
size: 9999,
sign: 22,
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4community()
}, 0);
return
}
if (res) {
console.log('接口回调数据=所属社区', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4community = result.data
}
}) })
}, },
getDict4businessType(){ getDict4industryType(){
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"], interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
...@@ -195,31 +171,30 @@ window.addEventListener('load', function () { ...@@ -195,31 +171,30 @@ window.addEventListener('load', function () {
reqParams: { reqParams: {
page:1, page:1,
size: 9999, size: 9999,
sign: 15, sign: 20, // 行业类型列表
dictType: 'business_type'
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
setTimeout(() => { setTimeout(() => {
this.getDict4businessType() this.getDict4industryType()
}, 0); }, 0);
return return
} }
if (res) { if (res) {
console.log('接口回调数据=生产经营类型', JSON.parse(res)) console.log('接口回调数据-行业类型', JSON.parse(res))
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
vant.Toast.clear() vant.Toast.clear()
}) })
}, 0); }, 0);
var result = JSON.parse(res) var result = JSON.parse(res)
this.dict4businessType = result.rows this.dict4industryType = result.data.body.data
} }
}) })
}, },
getDict4changhsuoType(){ getDict4community(){
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"], interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
...@@ -227,30 +202,30 @@ window.addEventListener('load', function () { ...@@ -227,30 +202,30 @@ window.addEventListener('load', function () {
reqParams: { reqParams: {
page:1, page:1,
size: 9999, size: 9999,
sign: 21, // 场所类型=>行业类别 sign: 22,
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
setTimeout(() => { setTimeout(() => {
this.getDict4changhsuoType() this.getDict4community()
}, 0); }, 0);
return return
} }
if (res) { if (res) {
console.log('接口回调数据', JSON.parse(res)) console.log('接口回调数据=所属社区', JSON.parse(res))
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
vant.Toast.clear() vant.Toast.clear()
}) })
}, 0); }, 0);
var result = JSON.parse(res) var result = JSON.parse(res)
this.dict4changhsuoType = result.rows this.dict4community = result.data
} }
}) })
}, },
getDict4changhsuoType(){ getDict4businessType(){
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"], interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
...@@ -259,29 +234,30 @@ window.addEventListener('load', function () { ...@@ -259,29 +234,30 @@ window.addEventListener('load', function () {
page:1, page:1,
size: 9999, size: 9999,
sign: 15, sign: 15,
dictType: 'sys_nineplaces_json' dictType: 'business_type'
} }
}, (res) => { }, (res) => {
if (!res) { // 中台返回为undefined 重新请求 if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
setTimeout(() => { setTimeout(() => {
this.getDict4changhsuoType() this.getDict4businessType()
}, 0); }, 0);
return return
} }
if (res) { if (res) {
console.log('接口回调数据', JSON.parse(res)) console.log('接口回调数据=生产经营类型', JSON.parse(res))
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
vant.Toast.clear() vant.Toast.clear()
}) })
}, 0); }, 0);
var result = JSON.parse(res) var result = JSON.parse(res)
this.dict4changhsuoType = result.rows this.dict4businessType = result.rows
} }
}) })
}, },
getDict4fangwuType(){ getDict4fangwuType(){
http2.post({ http2.post({
serviceId: API_KEY_MAP["page"]['id'], serviceId: API_KEY_MAP["page"]['id'],
...@@ -354,6 +330,31 @@ window.addEventListener('load', function () { ...@@ -354,6 +330,31 @@ window.addEventListener('load', function () {
}); });
var reqParam = {...this.formData} // var url = "/gq/checkRecord/safeCheckRecord" var reqParam = {...this.formData} // var url = "/gq/checkRecord/safeCheckRecord"
if(!reqParam.unitName){
vant.Toast({
message: '商家名称不能为空',
})
return
}
if(!reqParam.area){
vant.Toast({
message: '建筑不能为空',
})
return
}
if(!reqParam.merchantName){
vant.Toast({
message: '负责人不能为空',
})
return
}
if(!reqParam.deptId){
vant.Toast({
message: '所属社区不能为空',
})
return
}
http3.put('/gq/merchant', reqParam).then((res) => { http3.put('/gq/merchant', reqParam).then((res) => {
console.log('添加结果', res) console.log('添加结果', res)
vant.Toast({ vant.Toast({
...@@ -380,6 +381,23 @@ window.addEventListener('load', function () { ...@@ -380,6 +381,23 @@ window.addEventListener('load', function () {
} }
// this.showDeadlinePicker = false; // this.showDeadlinePicker = false;
}, },
saveCanvas() {
vant.Toast.loading({
message: '图片保存中...',
forbidClick: true,
loadingType: 'spinner',
});
lightAppJssdk.media.savePhoto({
arg: VUE.formData.qrCodeUrl,
success: function (data) {
vant.Toast('保存成功');
},
fail: function (data) {
vant.Toast('保存失败');
},
})
},
detail(id) { detail(id) {
vant.Toast.loading({ vant.Toast.loading({
message: '正在加载...', message: '正在加载...',
...@@ -433,32 +451,6 @@ window.addEventListener('load', function () { ...@@ -433,32 +451,6 @@ window.addEventListener('load', function () {
}) })
}) })
function saveCanvas() {
vant.Toast.loading({
message: '图片保存中...',
forbidClick: true,
loadingType: 'spinner',
});
lightAppJssdk.media.savePhoto({
arg: VUE.formData.qrCodeUrl,
success: function (data) {
// vant.Toast.clear()
// alert(JSON.stringify(data))
// vant.Dialog.alert({
// message: '保存成功',
// })
vant.Toast('保存成功');
},
fail: function (data) {
// vant.Toast.clear()
// alert('保存失败')
// vant.Dialog.alert({
// message: '保存失败',
// })
vant.Toast('保存失败');
},
})
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment