加角标以及二次提示
parent
82237f373e
commit
abe76cdd32
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue