加角标以及二次提示

main
zhaoyu 2023-12-27 16:33:13 +08:00
parent 82237f373e
commit abe76cdd32
2 changed files with 41 additions and 13 deletions

View File

@ -16,7 +16,7 @@
<view> <view>
<view class="flex-between"> <view class="flex-between">
<text class="main-title">{{ item.CORP_NAME }}</text> <text class="main-title">{{ item.CORP_NAME }}</text>
<u-badge style="font-size: x-small; padding:5px 5px" :value="item.cf+item.yh"/> <u-badge style="font-size: x-small; padding:5px 5px" :value="item.cf+item.yh+item.gc"/>
</view> </view>
<view class="flex-between mt-10 subtitle"> <view class="flex-between mt-10 subtitle">
<text v-if="item.CORPINFO_ID != '1'">{{item.prvinceName}}-{{item.cityName}}-{{item.countryName}}</text> <text v-if="item.CORPINFO_ID != '1'">{{item.prvinceName}}-{{item.cityName}}-{{item.countryName}}</text>

View File

@ -12,14 +12,14 @@
</u-cell-group> </u-cell-group>
<view class="button"> <view class="button">
<u-button <u-button
v-if="info.STATE==='-1'" v-if="info.STATE==='-1'&& anniuShow"
type="success" type="success"
@click="fnUpdateStateKeyProject('1')" @click="fnUpdateStateKeyProject('1')"
size="small" size="small"
text="工程开始" text="工程开始"
/> />
<u-button <u-button
v-if="info.STATE==='-2'" v-if="info.STATE==='-2'&& anniuShow"
type="error" type="error"
@click="fnUpdateStateKeyProject('2')" @click="fnUpdateStateKeyProject('2')"
size="small" size="small"
@ -49,7 +49,8 @@ export default {
hiddenData: {}, hiddenData: {},
popupShow: false, popupShow: false,
videoShow: false, videoShow: false,
videoSrc: '' videoSrc: '',
anniuShow: false
} }
}, },
computed: { computed: {
@ -70,6 +71,9 @@ export default {
this.info = resData.pd; this.info = resData.pd;
this.WORK_LONGITUDE = this.info.WORK_LONGITUDE; // this.WORK_LONGITUDE = this.info.WORK_LONGITUDE; //
this.WORK_LATITUDE = this.info.WORK_LATITUDE; // this.WORK_LATITUDE = this.info.WORK_LATITUDE; //
if(this.userInfo.USER_ID == this.info.CREATOR){
this.anniuShow = true;
}
}, },
// //
fnBack() { fnBack() {
@ -79,16 +83,40 @@ export default {
}, },
// //
async fnUpdateStateKeyProject(state){ async fnUpdateStateKeyProject(state){
await setKeyProjectsState({ console.log(state)
OUTSOURCED_ID: this.OUTSOURCED_ID, var content = '';
OPERATOR: this.userInfo.PERSONNELMANAGEMENT_ID, // if(state === '1'){
STATE:STATE content = '确定同意开工吗?'
}); }else if(state === '2'){
uni.$u.toast('提交成功') content = '确定同意结束吗?'
setTimeout(() => { }
this.fnBack() uni.showModal({
}, 1000) title: '提示',
cancelText: '确认',
confirmText: '取消',
content: content,
success: (res) => {
console.log(res)
if (res.cancel) {
setKeyProjectsState({
OUTSOURCED_ID: this.OUTSOURCED_ID,
OPERATOR: this.userInfo.USER_ID, //
STATE:state
});
uni.$u.toast('提交成功')
setTimeout(() => {
this.fnBack()
}, 1000)
}
}
})
}, },
endUpdate(state){
},
}, },
} }
</script> </script>