Commit bb6d7511 authored by xinzhedeai's avatar xinzhedeai

add:消费者建议列表、详情、商户信息编辑

parent 1cd28b7b
html,
body {
background-color: #fff;
}
.wrapper {
/* padding: 0.2rem; */
}
.container {
text-align: center;
margin-top: .3rem;
}
/* 基础重置样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
/* 去除移动端点击高亮 */
}
body {
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
font-size: 16px;
background-color: #f8f9fa;
}
/* 表单容器 */
.form-container {
max-width: 750px;
/* 移动端最大宽度 */
margin: 20px auto;
padding: 0 15px;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
/* 表单单项 */
.form-item {
display: flex;
align-items: center;
/* 垂直居中 */
height: 50px;
padding: .1rem .12rem;
border-bottom: 1px solid #f0f2f5;
background-color: #fff;
}
/* 最后一项去除下边框 */
.form-item:last-child {
border-bottom: none;
}
/* 表单标题 */
.form-label {
flex-shrink: 0;
/* 防止标题被压缩 */
width: 80px;
/* 标题固定宽度,可根据需求调整 */
color: #333;
font-size: .28rem;
text-align: left;
font-weight: bold;
/* 标题左对齐 */
}
/* 输入框容器 */
.form-input-wrap {
flex: 1;
/* 占据剩余空间 */
height: 100%;
display: flex;
align-items: center;
}
/* 输入框样式 */
.form-input {
width: 100%;
height: 32px;
/* 输入框高度小于容器,留出垂直空间 */
border: none;
outline: none;
font-size: 15px;
color: #666;
}
/* 输入框placeholder样式 */
.form-input::placeholder {
color: #999;
font-size: 14px;
}
/* 输入框聚焦效果 */
.form-input:focus {
color: #262626;
}
.form-content{
font-weight: 500;
font-size: 0.28rem;
color: #737373;
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover">
<title>高区“码”上</title>
<script type="text/javascript" src="../sdk/includeHead.js"></script>
<script type="text/javascript" src="../sdk/axios_http3.js"></script>
<style>
</style>
</head>
<body>
<div id="app">
<div class="wrapper" v-cloak>
<div class="form-item">
<span class="form-label">日期</span>
<div class="form-input-wrap">
<p class="form-content">{{formData.submitDate}}</p>
</div>
</div>
<div class="form-item">
<span class="form-label">安全建议</span>
<div class="form-input-wrap">
<!-- <input type="text" v-model="formData.content" class="form-input" :disabled="true"
> -->
<p class="form-content">{{formData.content}}是快乐的反抗拉萨酱豆腐卢卡斯的反抗拉萨附近;阿斯蒂芬库里Salford;拉是否</p>
</div>
</div>
<div class="form-item" style="height: 1.5rem;">
<img
v-for="(imgItem, subIndex) in formData.photos"
:src="imgItem"
alt=""
style="width: 1.4rem; height: 1.4rem; margin-right: 0.2rem"
/>
</div>
<div class="form-item">
<span class="form-label">联系人</span>
<div class="form-input-wrap">
<p class="form-content">{{formData.contactName}}</p>
</div>
</div>
<div class="form-item">
<span class="form-label">联系方式</span>
<div class="form-input-wrap">
<p class="form-content">{{formData.contactDetails}}</p>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
var VUE = null
window.addEventListener('load', function () {
// 在原有Vue实例中添加
VUE = new Vue({
el: '#app',
data() {
return {
formData: {
},
}
},
computed: {},
mounted() {
this.detail()
},
methods: {
detail() {
vant.Toast.loading({
message: '正在加载...',
forbidClick: true,
loadingType: 'spinner',
});
http2.post({
serviceId: API_KEY_MAP["no-page"]['id'],
interfacePublicKey: API_KEY_MAP["no-page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["no-page"]["privateKey"],
reqParams: {
sign: 19,
"feedbackId": gemhoUtil.getParameter('id'),
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.detail()
}, 0);
return
}
if (res) {
console.log('接口回调数据=建议详情', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.formData = result.data
}
})
},
},
})
})
......@@ -56,20 +56,7 @@
</div>
</div>
<div class="form-item">
<span class="form-label">场所类型</span>
<div class="form-input-wrap">
<select class="selector" name="" v-model="formData.smallPlaceType"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4changhsuoType"
:key="i"
:label="item.dictLabel"
:value="Number(item.dictValue)"
></option>
</select>
</div>
</div>
<!-- 新增字段 -->
<div class="form-item">
<span class="form-label">所属社区</span>
......@@ -77,23 +64,23 @@
<select class="selector" v-model="formData.community"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4changhsuoType"
v-for="(item, i) in dict4community"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
:label="item.label"
:value="item.label"
></option>
</select>
</div>
</div>
<div class="form-item">
<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">
<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'"
......@@ -101,12 +88,12 @@
</div>
</div>
<div class="form-item">
<span class="form-label">行业类型</span>
<span class="form-label">生产经营类型</span>
<div class="form-input-wrap">
<select class="selector" v-model="formData.community"
<select class="selector" v-model="formData.businessType"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in formData.industryType"
v-for="(item, i) in dict4businessType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
......@@ -114,43 +101,64 @@
</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">
<!-- <select style=" width: 4rem;height:.4rem;font-size: .2rem;" v-model="formData.community">
<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="item.dictValue"
:value="Number(item.dictValue)"
></option>
</select> -->
<input type="text" v-model="formData.industryType" class="form-input" :disabled="flag=='XQ'">
</select>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>门头图片</span>
<span>商家平面图</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader v-model="formData.storefrontPhotosH5" :max-count="4"
<van-uploader v-model="formData.floorPlanPhotosH5" :max-count="1"
:after-read="handleFileUpload" class="uploader-wrapper" />
</div>
<div v-if="flag=='XQ'">
<img
v-for="(imgItem, subIndex) in formData.storefrontPhotos"
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>
<span></span>
</h5>
<div v-if="flag=='XG'">
......@@ -166,24 +174,27 @@
/>
</div>
</div>
<div>
<h5 class="imager-item-title">
<span>平面图片</span>
<span>门头图</span>
<span></span>
</h5>
<div v-if="flag=='XG'">
<van-uploader v-model="formData.floorPlanPhotosH5" :max-count="1"
<van-uploader v-model="formData.storefrontPhotosH5" :max-count="4"
:after-read="handleFileUpload" class="uploader-wrapper" />
</div>
<div v-if="flag=='XQ'">
<img
v-for="(imgItem, subIndex) in formData.floorPlanPhotos"
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>
......@@ -255,7 +266,7 @@
<select class="selector" v-model="formData.houseType"
:disabled="flag=='XQ'">
<option
v-for="(item, i) in dict4changhsuoType"
v-for="(item, i) in dict4fangwuType"
:key="i"
:label="item.dictLabel"
:value="item.dictValue"
......@@ -266,8 +277,15 @@
<div class="form-item">
<span class="form-label">房屋用途</span>
<div class="form-input-wrap">
<input type="text" v-model="formData.houseUsage" class="form-input" :disabled="flag=='XQ'"
>
<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">
......@@ -292,10 +310,10 @@
<!-- 消费者安全建议列表 -->
<div v-if="activeTab==2">
<van-list>
<van-cell v-for="item in 10" :key="item.id" @click="viewDetail(item,'JC_XQ')" >
<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.checkDate }}</span>
<span style="color: #737373; font-size: 0.28rem;">日期:{{ item.submitDate }}</span>
</div>
<div style="
white-space: nowrap;
......@@ -305,7 +323,7 @@
font-size: 0.3rem;
font-weight: bold;
font-family: PingFang SC;
">九小场所消防安全检查清单
">{{item.contactDetails}}
</div>
</div>
</van-cell>
......
......@@ -7,7 +7,7 @@ window.addEventListener('load', function () {
data() {
return {
activeTab: 0,
flag: 'XQ',
flag: 'XG',
canvasReady: false,
loadedImages: 0, // 记录已加载的图片数量
userType: gemhoUtil.getCookie('userType'),
......@@ -51,40 +51,196 @@ window.addEventListener('load', function () {
], // 新增图片数组字段
},
dict4changhsuoType:[],
dict4fangwuType:[],
dict4fangwuyongtuType:[],
dict4businessType:[],
dict4community:[],
dict4industryType:[],
consumerSuggestList:[]
}
},
computed: {},
mounted() {
this.detail()
this.getDict4changhsuoType()
this.getDict4fangwuType()
this.getDict4fangwuyongtuType()
this.getDict4businessType()
this.getDict4community()
this.getDict4industryType()
},
methods: {
viewDetail(item, type) {
viewDetail(item) {
let params = {
id: item.id,
merId: this.merId,
pageName: '_shanghu_home'
}
// 这里添加跳转逻辑
if (type === 'YH_XQ') {
params = {
...params,
flag: item.rectificationStatus,
}
} else {
params = {
...params,
flag: 'JC_XQ',
}
}
let url = gemhoUtil.setParameter('_check_info.html', params)
let url = gemhoUtil.setParameter('_consumer_jydetail.html', params)
gemhoUtil.navigatePage(url, '跳转中...')
},
clickTab() {
if (this.activeTab > 0) {
this.getJcList() // 获取检查列表
if (this.activeTab > 1) {
this.getConsumerSuggestList() // 获取检查列表
}
},
getConsumerSuggestList(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
reqParams: {
page:1,
size: 9999,
sign: 18, // 消费者建议列表
"merId": gemhoUtil.getParameter('merId'),
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.consumerSuggestList()
}, 0);
return
}
if (res) {
console.log('接口回调数据-消费者建议', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.consumerSuggestList = result.rows
}
})
},
getDict4industryType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
reqParams: {
page:1,
size: 9999,
sign: 20, // 行业类型列表
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4industryType()
}, 0);
return
}
if (res) {
console.log('接口回调数据-行业类型', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4industryType = result.data.body.data
}
})
},
getDict4community(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
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(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
reqParams: {
page:1,
size: 9999,
sign: 15,
dictType: 'business_type'
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4businessType()
}, 0);
return
}
if (res) {
console.log('接口回调数据=生产经营类型', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4businessType = result.rows
}
})
},
getDict4changhsuoType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
reqParams: {
page:1,
size: 9999,
sign: 21, // 场所类型=>行业类别
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4changhsuoType()
}, 0);
return
}
if (res) {
console.log('接口回调数据', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4changhsuoType = result.rows
}
})
},
getDict4changhsuoType(){
http2.post({
......@@ -95,6 +251,7 @@ window.addEventListener('load', function () {
page:1,
size: 9999,
sign: 15,
dictType: 'sys_nineplaces_json'
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
......@@ -117,6 +274,70 @@ window.addEventListener('load', function () {
}
})
},
getDict4fangwuType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
reqParams: {
page:1,
size: 9999,
sign: 15,
dictType: 'house_type'
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4fangwuType()
}, 0);
return
}
if (res) {
console.log('接口回调数据', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4fangwuType = result.rows
}
})
},
getDict4fangwuyongtuType(){
http2.post({
serviceId: API_KEY_MAP["page"]['id'],
interfacePublicKey: API_KEY_MAP["page"]["publicKey"],
interfacePrivateKey: API_KEY_MAP["page"]["privateKey"],
reqParams: {
page:1,
size: 9999,
sign: 15,
dictType: 'house_usage'
}
}, (res) => {
if (!res) { // 中台返回为undefined 重新请求
vant.Toast.clear()
setTimeout(() => {
this.getDict4fangwuyongtuType()
}, 0);
return
}
if (res) {
console.log('接口回调数=房屋用途', JSON.parse(res))
setTimeout(() => {
this.$nextTick(() => {
vant.Toast.clear()
})
}, 0);
var result = JSON.parse(res)
this.dict4fangwuyongtuType = result.rows
}
})
},
save(){
vant.Toast.loading({
message: '正在处理...',
......
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