feat: 点踩原因提交;页面优化

property-only-app
wx-jincw 4 weeks ago
parent 8e3966d80b
commit 1257fc4dc0

@ -29,18 +29,13 @@
"path": "pages/user/index",
"style": {
//"navigationBarTitleText": "个人中心",
// #ifdef MP || APP-PLUS
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#409EFF",
// #endif
"app-plus": {
// #ifdef APP-PLUS
"titleNView": {
"type": "default"
}
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
}
},
{
"path": "pages/goods_details/index",
@ -100,29 +95,25 @@
"path": "pages/news_list/index",
"style": {
//"navigationBarTitleText": "资讯",
"navigationBarBackgroundColor": "#409EFF",
"app-plus": {
// #ifdef APP-PLUS
"titleNView": {
"type": "default"
}
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
}
},
{
"path": "pages/news_details/index",
"style": {
//"navigationBarTitleText": "资讯详情",
"navigationBarBackgroundColor": "#409EFF",
"app-plus": {
// #ifdef APP-PLUS
"titleNView": {
"type": "default"
}
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black"
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
}
}
},
//#ifdef H5
{
@ -415,7 +406,6 @@
"navigationStyle": "custom"
// #endif
}
}
},
{
"path": "user_get_coupon/index",

@ -51,7 +51,7 @@
<view class="iconfont icon-xiangyou"></view>
</view>
<!-- 供应链管理功能入口 -->
<view class='nav acea-row' v-if="menus.length">
<view class='nav acea-row' v-if="menus.length && uid">
<view class="property-service-title">物业服务</view>
<!-- <navigator class='item' url='/pages/supply_chain/traceability/index' hover-class='none'>
<view class='pictrue picsmall'>

@ -31,7 +31,7 @@
<!-- #endif -->
</view>
<shareInfo @setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></shareInfo>
<home></home>
<!-- <home></home> -->
</view>
</template>

@ -42,7 +42,7 @@
<image src='../../static/images/noNews.png'></image>
</view>
</view>
<home></home>
<!-- <home></home> -->
</view>
</template>

@ -182,6 +182,32 @@ export default {
this.$off('dictChange');
},
methods: {
async promptDislikeRemark() {
return new Promise((resolve) => {
uni.showModal({
title: '请输入点踩原因',
editable: true,
placeholderText: '请填写点踩原因',
success: (res) => {
if (!res.confirm) {
resolve(null);
return;
}
const remark = (res.content || '').trim();
if (!remark) {
uni.showToast({
title: '请输入点踩原因',
icon: 'none'
});
resolve('');
return;
}
resolve(remark);
},
fail: () => resolve(null)
});
});
},
async loadPageData() {
await Promise.all([this.loadMenuByDate(), this.loadRanking()]);
},
@ -292,10 +318,16 @@ export default {
item.dislikeCount = Math.max(0, (item.dislikeCount || 0) - 1);
}
} else {
let remark = '';
if (likeType === '2') {
remark = await this.promptDislikeRemark();
if (remark === null || remark === '') return;
}
uni.showLoading({ title: likeType === '1' ? '点赞中...' : '点踩中...', mask: true });
await likeDailyMenuItem({
menuDtlId: item.id,
likeType
likeType,
remark
});
uni.showToast({
title: likeType === '1' ? '点赞成功' : '点踩成功',

@ -31,7 +31,7 @@
<text class="dispatch-status" :class="dispatchStatusClassMap[item.status] || ''">
{{ getDispatchStatusText(item.status) }}
</text>
<text class="dispatch-time">{{ item.assignTime }}</text>
<text class="dispatch-time">{{ item.assignTime || '' }}</text>
</view>
<view class="card-body">

@ -27,7 +27,7 @@
<text class="label">物资选择</text>
<view class="multi-select">
<view class="selected-items" v-if="selectedMaterials.length > 0">
<view class="selected-item" v-for="(item, index) in selectedMaterials" :key="item.cargoId">
<view class="selected-item" v-for="(item, index) in selectedMaterials" :key="item.id">
<text>{{ item.cargoName }} ({{ item.cargoSpec }}) x {{ item.quantity }}</text>
<text class="remove-btn" @click="removeMaterial(index)">x</text>
</view>
@ -81,26 +81,26 @@
<view
class="material-item"
v-for="material in filteredMaterials"
:key="material.cargoId"
:key="material.id"
>
<view class="material-info">
<text class="material-name">{{ material.cargoName }}</text>
<text class="material-spec">{{ material.cargoSpec }}</text>
</view>
<view class="item-actions">
<view v-if="isMaterialSelected(material.cargoId)" class="quantity-input">
<text class="quantity-btn" @click="decreaseQuantity(material.cargoId)">-</text>
<view v-if="isMaterialSelected(material.id)" class="quantity-input">
<text class="quantity-btn" @click="decreaseQuantity(material.id)">-</text>
<input
type="number"
:value="getMaterialQuantity(material.cargoId)"
:value="getMaterialQuantity(material.id)"
class="quantity-input-box"
min="1"
@input="updateQuantity(material.cargoId, $event)"
@input="updateQuantity(material.id, $event)"
/>
<text class="quantity-btn" @click="increaseQuantity(material.cargoId)">+</text>
<text class="quantity-btn" @click="increaseQuantity(material.id)">+</text>
</view>
<view class="checkbox" :class="{ checked: isMaterialSelected(material.cargoId) }" @click="toggleMaterial(material)">
<text v-if="isMaterialSelected(material.cargoId)"></text>
<view class="checkbox" :class="{ checked: isMaterialSelected(material.id) }" @click="toggleMaterial(material)">
<text v-if="isMaterialSelected(material.id)"></text>
</view>
</view>
</view>
@ -286,7 +286,7 @@ export default {
},
//
toggleMaterial(material) {
const index = this.tempSelectedMaterials.findIndex(item => item.cargoId === material.cargoId);
const index = this.tempSelectedMaterials.findIndex(item => item.id === material.id);
if (index > -1) {
this.tempSelectedMaterials.splice(index, 1);
} else {
@ -295,31 +295,31 @@ export default {
}
},
//
isMaterialSelected(cargoId) {
return this.tempSelectedMaterials.some(item => item.cargoId === cargoId);
isMaterialSelected(id) {
return this.tempSelectedMaterials.some(item => item.id === id);
},
//
getMaterialQuantity(cargoId) {
const item = this.tempSelectedMaterials.find(item => item.cargoId === cargoId);
getMaterialQuantity(id) {
const item = this.tempSelectedMaterials.find(item => item.id === id);
return item ? item.quantity : 1;
},
//
increaseQuantity(cargoId) {
const item = this.tempSelectedMaterials.find(item => item.cargoId === cargoId);
increaseQuantity(id) {
const item = this.tempSelectedMaterials.find(item => item.id === id);
if (item) {
item.quantity += 1;
}
},
//
decreaseQuantity(cargoId) {
const item = this.tempSelectedMaterials.find(item => item.cargoId === cargoId);
decreaseQuantity(id) {
const item = this.tempSelectedMaterials.find(item => item.id === id);
if (item && item.quantity > 1) {
item.quantity -= 1;
}
},
//
updateQuantity(cargoId, event) {
const item = this.tempSelectedMaterials.find(item => item.cargoId === cargoId);
updateQuantity(id, event) {
const item = this.tempSelectedMaterials.find(item => item.id === id);
if (item) {
const value = parseInt(event.target.value) || 1;
item.quantity = Math.max(1, value);

@ -81,7 +81,7 @@
<!-- 操作按钮 -->
<view class="card-footer">
<text class="action-btn dispatch-btn" @click="goDispatch(item.id)"></text>
<text class="action-btn dispatch-btn" @click="goDispatch(item)"></text>
<text class="action-btn handle-btn" v-if="checkPermi('send_order') && item.status !== '99'" @click="openFinishPopup(item)"></text>
</view>
</view>
@ -119,7 +119,7 @@ export default {
listMaintenanceOrder({
page: pageNo,
limit: pageSize,
uid: null,
uid: '',
}).then((res) => {
const list = res?.data?.list || [];
this.$refs.paging.complete(list);

Loading…
Cancel
Save