Compare commits

..

2 Commits

Author SHA1 Message Date
wx-jincw 1ec1bb7223 fix: 合并冲突
4 weeks ago
wx-jincw 1257fc4dc0 feat: 点踩原因提交;页面优化
4 weeks ago

@ -95,28 +95,24 @@
"path": "pages/news_list/index", "path": "pages/news_list/index",
"style": { "style": {
//"navigationBarTitleText": "资讯", //"navigationBarTitleText": "资讯",
"navigationBarBackgroundColor": "#409EFF", "navigationBarBackgroundColor": "#FFFFFF",
"app-plus": { "navigationBarTextStyle": "black"
// #ifdef APP-PLUS // #ifdef H5
"titleNView": { ,
"type": "default" "navigationStyle": "custom"
} // #endif
// #endif
}
} }
}, },
{ {
"path": "pages/news_details/index", "path": "pages/news_details/index",
"style": { "style": {
//"navigationBarTitleText": "资讯详情", //"navigationBarTitleText": "资讯详情",
"navigationBarBackgroundColor": "#409EFF", "navigationBarBackgroundColor": "#FFFFFF",
"app-plus": { "navigationBarTextStyle": "black"
// #ifdef APP-PLUS // #ifdef H5
"titleNView": { ,
"type": "default" "navigationStyle": "custom"
} // #endif
// #endif
}
} }
}, },
//#ifdef H5 //#ifdef H5
@ -420,7 +416,7 @@
// #ifdef H5 // #ifdef H5
, ,
"navigationStyle": "custom" "navigationStyle": "custom"
// #endif // #endif
} }
}, },
{ {

@ -51,7 +51,7 @@
<view class="iconfont icon-xiangyou"></view> <view class="iconfont icon-xiangyou"></view>
</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> <view class="property-service-title">物业服务</view>
<!-- <navigator class='item' url='/pages/supply_chain/traceability/index' hover-class='none'> <!-- <navigator class='item' url='/pages/supply_chain/traceability/index' hover-class='none'>
<view class='pictrue picsmall'> <view class='pictrue picsmall'>

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

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

@ -183,6 +183,32 @@ export default {
this.$off('dictChange'); this.$off('dictChange');
}, },
methods: { 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() { async loadPageData() {
await Promise.all([this.loadMenuByDate(), this.loadRanking()]); await Promise.all([this.loadMenuByDate(), this.loadRanking()]);
}, },
@ -289,10 +315,16 @@ export default {
item.dislikeCount = Math.max(0, (item.dislikeCount || 0) - 1); item.dislikeCount = Math.max(0, (item.dislikeCount || 0) - 1);
} }
} else { } else {
let remark = '';
if (likeType === '2') {
remark = await this.promptDislikeRemark();
if (remark === null || remark === '') return;
}
uni.showLoading({ title: likeType === '1' ? '点赞中...' : '点踩中...', mask: true }); uni.showLoading({ title: likeType === '1' ? '点赞中...' : '点踩中...', mask: true });
await likeDailyMenuItem({ await likeDailyMenuItem({
menuDtlId: item.id, menuDtlId: item.id,
likeType likeType,
remark
}); });
uni.showToast({ uni.showToast({
title: likeType === '1' ? '点赞成功' : '点踩成功', title: likeType === '1' ? '点赞成功' : '点踩成功',

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

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

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

Loading…
Cancel
Save