|
@@ -71,6 +71,14 @@
|
|
|
<van-picker show-toolbar :columns="item.stages" value-key="stagesName" @confirm="choseStage"
|
|
|
@cancel="item.showPickerStage = false;$forceUpdate();" />
|
|
|
</van-popup>
|
|
|
+ <!-- 预算来源 -->
|
|
|
+ <van-field readonly name="basecostId" v-if="user.company.packageProject==1&&reportBasecostList &&reportBasecostList.length>0"
|
|
|
+ :value="item.basecostName" label="预算来源" placeholder="请选择预算来源"
|
|
|
+ @click="clickPickCostId(index, item)" />
|
|
|
+ <van-popup v-model="item.showPickerCostId" position="bottom">
|
|
|
+ <van-picker show-toolbar :columns="reportBasecostList" value-key="name" @confirm="choseCostId"
|
|
|
+ @cancel="item.showPickerCostId = false;$forceUpdate();" />
|
|
|
+ </van-popup>
|
|
|
<!-- 审核人 -->
|
|
|
<van-field readonly name="projectAuditorId" v-if="item.auditUserList != null && item.auditUserList.length > 0" clickable
|
|
|
:value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人"
|
|
@@ -372,10 +380,43 @@
|
|
|
weekIndex: 5,
|
|
|
weekSwitchIndex: 1,
|
|
|
kaoqinText: false,
|
|
|
- workTimeText: false
|
|
|
+ workTimeText: false,
|
|
|
+
|
|
|
+ reportBasecostList: []
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 预算来源
|
|
|
+ clickPickCostId(i, item) {
|
|
|
+ // if (!item.canEdit) return;
|
|
|
+ this.clickIndex = i;
|
|
|
+ item.showPickerCostId = true;
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ choseCostId(value,index){
|
|
|
+ this.currentForm.domains[this.clickIndex].basecostId = value.id;
|
|
|
+ this.currentForm.domains[this.clickIndex].basecostName = value.name;
|
|
|
+ this.currentForm.domains[this.clickIndex].showPickerCostId = false;
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ getReportBasecostList(){
|
|
|
+ this.$axios.post('/project-basecost-setting/getReportBasecostList',{
|
|
|
+ companyId: this.user.companyId
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.reportBasecostList = res.data
|
|
|
+ if(this.reportBasecostList.length != 0 && this.user.company.packageProject == 1){
|
|
|
+ this.currentForm.domains[0].basecostId = this.reportBasecostList[0].id;
|
|
|
+ this.currentForm.domains[0].basecostName = this.reportBasecostList[0].name;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$toast.fail('获取失败:'+res.msg);
|
|
|
+ }
|
|
|
+ }).catch(err => {this.$toast.clear();})
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 上周下周按钮切换
|
|
|
SwitchLastorNext(e){
|
|
|
this.weekSwitchIndex += e
|
|
@@ -387,6 +428,10 @@
|
|
|
this.form[this.inbtn] = this.currentForm
|
|
|
this.inbtn = index
|
|
|
this.currentForm = this.form[this.inbtn]
|
|
|
+ if(this.reportBasecostList.length != 0 && this.user.company.packageProject == 1){
|
|
|
+ this.currentForm.domains[0].basecostId = this.reportBasecostList[0].id;
|
|
|
+ this.currentForm.domains[0].basecostName = this.reportBasecostList[0].name;
|
|
|
+ }
|
|
|
this.getKaoqin()
|
|
|
this.getWorkTime()
|
|
|
},
|
|
@@ -489,6 +534,10 @@
|
|
|
this.form.push(formItem)
|
|
|
}
|
|
|
this.currentForm = this.form[0]
|
|
|
+ if(this.reportBasecostList.length != 0 && this.user.company.packageProject == 1){
|
|
|
+ this.currentForm.domains[0].basecostId = this.reportBasecostList[0].id;
|
|
|
+ this.currentForm.domains[0].basecostName = this.reportBasecostList[0].name;
|
|
|
+ }
|
|
|
this.getKaoqin()
|
|
|
this.getWorkTime()
|
|
|
},
|
|
@@ -1509,6 +1558,9 @@
|
|
|
} else {
|
|
|
formData.append("overtimeHours", 0);
|
|
|
}
|
|
|
+ if(this.form[formIndex].domains[i].basecostId){
|
|
|
+ formData.append("basecostId", this.form[formIndex].domains[i].basecostId);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
@@ -1688,6 +1740,7 @@
|
|
|
// }
|
|
|
|
|
|
this.getProject();
|
|
|
+ this.getReportBasecostList()
|
|
|
// this.getReport();
|
|
|
this.getTimeType();
|
|
|
//初始化微信js-sdk参数
|