加角标以及二次提示

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 class="flex-between">
<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 class="flex-between mt-10 subtitle">
<text v-if="item.CORPINFO_ID != '1'">{{item.prvinceName}}-{{item.cityName}}-{{item.countryName}}</text>

View File

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