Commit b02fc0a8 by sujingsong

fix: 去掉区域选择

parent 7e7f5602
...@@ -33,8 +33,8 @@ export default { ...@@ -33,8 +33,8 @@ export default {
setTimeout(async () => { setTimeout(async () => {
setToken() setToken()
this.updateFid(testFid) this.updateFid(testFid)
this.updateCurrentPageType(29) this.updateCurrentPageType(5)
await this.fetchInspect({billId: Coder.replace(testFid), isGradeNode: true}) // 29 30评分节点放开 await this.fetchInspect({billId: Coder.replace(testFid), isGradeNode: false}) // 29 30评分节点放开
this.updateReadyState(true) this.updateReadyState(true)
}, 1000) }, 1000)
} }
......
...@@ -19,10 +19,10 @@ const mas = MAS.getInstance().config(masConfig) ...@@ -19,10 +19,10 @@ const mas = MAS.getInstance().config(masConfig)
// 测试token,从美信云平台的登录记录获取 // 测试token,从美信云平台的登录记录获取
const testToken = 'T3362026552542208' const testToken = 'yzj_d0760d55e9d54b0bd7af2392e1722feb'
// 测试流程单据id // 测试流程单据id
const testFid = 'x9oAAArXirvuMsBg' // x9oAAArMGB/irKan 营销类 x9oAAArNAtPirKan 商业类 x9oAAArNClDirKan const testFid = 'x9oAADIWh6nirKan' // x9oAAArMGB/irKan 营销类 x9oAAArNAtPirKan 商业类 x9oAAArNClDirKan
/* 1.供方更名:(会签)x9oAAArQslp2xf1N 、x9oAAArTSgN2xf1N - dingzhy@cndrealty.com 、x9oAAArQqcV2xf1N \\ (审批)x9oAAArTSdR2xf1N - liub@cndrealty.com /* 1.供方更名:(会签)x9oAAArQslp2xf1N 、x9oAAArTSgN2xf1N - dingzhy@cndrealty.com 、x9oAAArQqcV2xf1N \\ (审批)x9oAAArTSdR2xf1N - liub@cndrealty.com
* 2.调整联系方式:(会签)x9oAAArTSgN2xf1N - dingzhy@cndrealty.com 、x9oAAArMYD12xf1N - caimm \ \\ (审批)x9oAAArTSdR2xf1N - liub@cndrealty.com * 2.调整联系方式:(会签)x9oAAArTSgN2xf1N - dingzhy@cndrealty.com 、x9oAAArMYD12xf1N - caimm \ \\ (审批)x9oAAArTSdR2xf1N - liub@cndrealty.com
* 3.调整品牌方式:(会签)x9oAAArTShV2xf1N - xiewei * 3.调整品牌方式:(会签)x9oAAArTShV2xf1N - xiewei
......
...@@ -17,6 +17,13 @@ export async function getApplicableRegionList (params) { ...@@ -17,6 +17,13 @@ export async function getApplicableRegionList (params) {
} }
/** /**
* 适用区域全部
*/
export async function actionGetAllAppRegionList (params) {
return mas.proxy(MAS_CODES.actionGetAllAppRegionList, params)
}
/**
* 供方考察会签保存或提交 * 供方考察会签保存或提交
*/ */
export async function getAuditReviewSummarys (payload) { export async function getAuditReviewSummarys (payload) {
......
...@@ -10,6 +10,7 @@ export const MAS_CODES = { ...@@ -10,6 +10,7 @@ export const MAS_CODES = {
attachmentx2proriginal: 'mas.x2pr.original', // 附件转换获取原文件数据 attachmentx2proriginal: 'mas.x2pr.original', // 附件转换获取原文件数据
attachmentCancel: 'eas.supply.actionCancelAttachmentInfo', // 附件作废 attachmentCancel: 'eas.supply.actionCancelAttachmentInfo', // 附件作废
applicableRegionList: 'eas.supply.actionGetApplicableRegionList', // 适用区域 applicableRegionList: 'eas.supply.actionGetApplicableRegionList', // 适用区域
actionGetAllAppRegionList: 'eas.supply.actionGetAllAppRegionList', // 适用区域(全部)
auditReviewSummarys: 'eas.supply.reviewGrpActionAuditReviewSummarys', // 供方考察会签保存或提交 auditReviewSummarys: 'eas.supply.reviewGrpActionAuditReviewSummarys', // 供方考察会签保存或提交
reviewSummaryPersionList: 'eas.supply.reviewSummaryActionGetEntryList', // 获取供方考察评审汇总人员 reviewSummaryPersionList: 'eas.supply.reviewSummaryActionGetEntryList', // 获取供方考察评审汇总人员
reviewSummaryInfo: 'eas.supply.reviewSummaryActionGetInfo', // 获取供方考察评审汇总表 reviewSummaryInfo: 'eas.supply.reviewSummaryActionGetInfo', // 获取供方考察评审汇总表
......
...@@ -121,3 +121,36 @@ export function reduceTreeCheckedList (list, arr) { ...@@ -121,3 +121,36 @@ export function reduceTreeCheckedList (list, arr) {
} }
} }
} }
export function findNodeById (id, list, parentIndexes = []) {
for (let index = 0; index < list.length; index++) {
const item = list[index];
// 当前层级索引路径 = 父级路径 + 当前索引
const currentPath = [...parentIndexes, index];
// 匹配时返回带路径的对象
if (item.id === id) {
return { node: item, path: currentPath };
}
// 递归时携带当前路径
if (item.children && !item.leaf) {
const result = findNodeById(id, item.children, currentPath);
if (result) return result;
}
}
return null;
}
export function findItemByIndexPath (list, indexPath = []) {
if (list.length == 0 || indexPath.length == 0) return
let currentNode = list
indexPath.forEach((item, index) => {
if (index == 0) {
currentNode = currentNode[item]
} else {
currentNode = currentNode.children[item]
}
})
return [currentNode]
}
...@@ -85,9 +85,10 @@ export default { ...@@ -85,9 +85,10 @@ export default {
}, },
handleRadioClick (value) { handleRadioClick (value) {
if (this.editable) { if (this.editable) {
const conclusion = value === '0' ? '同意' : '不同意'
this.inspectLibRadio = value this.inspectLibRadio = value
this.value.supplyRank = value this.value.supplyRank = value
this.$emit('input', { opinion: this.value.opinion, supplyRank: this.inspectLibRadio }) this.$emit('input', { opinion: conclusion, supplyRank: this.inspectLibRadio })
} }
} }
} }
......
...@@ -27,14 +27,15 @@ export default { ...@@ -27,14 +27,15 @@ export default {
} }
}, },
showCondition () { showCondition () {
// 工程类、设计类显示使用条件,其他不显示
switch (this.supplierTypeNumber) {
case this.SupplierTypes.GC:
case this.SupplierTypes.SJ:
return true
default:
return false return false
} // 工程类、设计类显示使用条件,其他不显示
// switch (this.supplierTypeNumber) {
// case this.SupplierTypes.GC:
// case this.SupplierTypes.SJ:
// return true
// default:
// return false
// }
}, },
showAppRegion () { showAppRegion () {
// 会签节点没有选择适用区域权限 // 会签节点没有选择适用区域权限
......
...@@ -23,7 +23,7 @@ import CardPanel from '@/components/CardPanel' ...@@ -23,7 +23,7 @@ import CardPanel from '@/components/CardPanel'
import GroupInfo from '@/components/GroupInfo' import GroupInfo from '@/components/GroupInfo'
import ReviewProjectInfo from '@/components/ReviewProjectInfo' import ReviewProjectInfo from '@/components/ReviewProjectInfo'
import SupplierItem from '@/components/SupplierItem' import SupplierItem from '@/components/SupplierItem'
import { reduceTreeCheckedList } from '@/common/utils/assist' import { findItemByIndexPath } from '@/common/utils/assist'
import { Coder } from '@/common' import { Coder } from '@/common'
export default { export default {
...@@ -63,7 +63,9 @@ export default { ...@@ -63,7 +63,9 @@ export default {
'inspectPersionInfo', 'inspectPersionInfo',
'inspectProjectInfo', 'inspectProjectInfo',
'inspectSupplierInfo', 'inspectSupplierInfo',
'inspectAttachmentInfo' 'supplierAppRegionList',
'inspectAttachmentInfo',
'regionSelectIndexPath'
]), ]),
// 考察组基本信息-备注 // 考察组基本信息-备注
remark () { remark () {
...@@ -185,9 +187,9 @@ export default { ...@@ -185,9 +187,9 @@ export default {
if (item.leaderSupplyRank == '-1') { if (item.leaderSupplyRank == '-1') {
return false return false
} }
if (!this.checkAppRegion(index)) { // if (!this.checkAppRegion(index)) {
return false // return false
} // }
return true return true
case this.PageTypes.Approval_Todo: case this.PageTypes.Approval_Todo:
// 审批必填项校验 // 审批必填项校验
...@@ -197,9 +199,9 @@ export default { ...@@ -197,9 +199,9 @@ export default {
if (item.auditSupplyRank == '-1') { if (item.auditSupplyRank == '-1') {
return false return false
} }
if (!this.checkAppRegion(index)) { // if (!this.checkAppRegion(index)) {
return false // return false
} // }
return true return true
case this.PageTypes.Sign_Todo: case this.PageTypes.Sign_Todo:
// 会审必填项校验 // 会审必填项校验
...@@ -297,11 +299,11 @@ export default { ...@@ -297,11 +299,11 @@ export default {
isFinished = false isFinished = false
break break
} }
if (!this.checkAppRegion(index)) { // if (!this.checkAppRegion(index)) {
tipText = '适用区域不能为空!' // tipText = '适用区域不能为空!'
isFinished = false // isFinished = false
break // break
} // }
break break
case this.PageTypes.Sign_Todo: case this.PageTypes.Sign_Todo:
if (v.SignEntry.length > 0) { if (v.SignEntry.length > 0) {
...@@ -330,11 +332,11 @@ export default { ...@@ -330,11 +332,11 @@ export default {
isFinished = false isFinished = false
break break
} }
if (!this.checkAppRegion(index)) { // if (!this.checkAppRegion(index)) {
tipText = '适用区域不能为空!' // tipText = '适用区域不能为空!'
isFinished = false // isFinished = false
break // break
} // }
break break
} }
// 有未通过校验的就退出循环 // 有未通过校验的就退出循环
...@@ -363,13 +365,14 @@ export default { ...@@ -363,13 +365,14 @@ export default {
ProjectEntry: v.ProjectEntry.map(v => ({'curProject': encodeURIComponent(v.curProject)})) ProjectEntry: v.ProjectEntry.map(v => ({'curProject': encodeURIComponent(v.curProject)}))
} }
// 适用区域 // 适用区域
let arr = [] let arr = findItemByIndexPath(this.inspectAllAppRegions[i], this.regionSelectIndexPath)
reduceTreeCheckedList(this.inspectAllAppRegions[i], arr) console.log(arr, 'arr', this.inspectAllAppRegions[i], this.regionSelectIndexPath)
switch (this.currentPageType) { switch (this.currentPageType) {
case this.PageTypes.Leader_Todo: case this.PageTypes.Leader_Todo:
info.leaderSupplyRank = v.leaderSupplyRank info.leaderSupplyRank = v.leaderSupplyRank
info.leaderOpinion = encodeURIComponent(Coder.replaceQuots(Coder.replaceCRLF(v.leaderOpinion))) info.leaderOpinion = encodeURIComponent(Coder.replaceQuots(Coder.replaceCRLF(v.leaderOpinion)))
info.AppRegionEntry = arr.map(v => ({'appRegion': encodeURIComponent(v.id)})) info.AppRegionEntry = arr.map(v => ({'appRegion': encodeURIComponent(v.id)}))
// info.AppRegionEntry = this.supplierAppRegionList.map(v => ({'appRegion': encodeURIComponent(v.id)}))
break break
case this.PageTypes.Sign_Todo: case this.PageTypes.Sign_Todo:
let person = v.SignEntry.find(it => it.signPerson === v.currentPerson) let person = v.SignEntry.find(it => it.signPerson === v.currentPerson)
...@@ -386,6 +389,7 @@ export default { ...@@ -386,6 +389,7 @@ export default {
info.auditSupplyRank = v.auditSupplyRank info.auditSupplyRank = v.auditSupplyRank
info.auditOpinion = encodeURIComponent(Coder.replaceQuots(Coder.replaceCRLF(v.auditOpinion))) info.auditOpinion = encodeURIComponent(Coder.replaceQuots(Coder.replaceCRLF(v.auditOpinion)))
info.AppRegionEntry = arr.map(v => ({'appRegion': encodeURIComponent(v.id)})) info.AppRegionEntry = arr.map(v => ({'appRegion': encodeURIComponent(v.id)}))
// info.AppRegionEntry = this.supplierAppRegionList.map(v => ({'appRegion': encodeURIComponent(v.id)}))
break break
default: default:
} }
......
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
<review-add-item <review-add-item
:title="`${appRegionIndex}.适用区域`" :title="`${appRegionIndex}.适用区域`"
v-if="showAppRegion" v-if="showAppRegion"
:editable="isTodo" :editable="false"
btnTitle="添加适用区域" btnTitle="添加适用区域"
:itemList="supplierAppRegionList.map(v=>v.text)" :itemList="supplierAppRegionList.map(v=>v.text)"
@handleAdd="handleChooseArea" @handleAdd="handleChooseArea"
></review-add-item> ></review-add-item>
<review-add-item <review-add-item
v-if="showProject" v-if="showProject"
:editable="isTodo" :editable="false"
:title="`${projectIndex}.适用特定项目`" :title="`${projectIndex}.适用特定项目`"
:itemList="cacheProjectList.map(v=>v.projectName)" :itemList="cacheProjectList.map(v=>v.projectName)"
btnTitle="添加适用项目" btnTitle="添加适用项目"
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
this.productGradeId = this.reviewSummaryInfo.productGrade this.productGradeId = this.reviewSummaryInfo.productGrade
this.supplyRank.opinion = this.reviewSummaryInfo.leaderOpinion this.supplyRank.opinion = this.reviewSummaryInfo.leaderOpinion
this.supplyRank.supplyRank = this.reviewSummaryInfo.leaderSupplyRank this.supplyRank.supplyRank = this.reviewSummaryInfo.leaderSupplyRank
this.fetchApplicableRegionList({reviewSummaryId: encodeURIComponent(Coder.replace(this.reviewSummaryInfo.id))}) // 获取适用区域列表(树结构) this.fetchApplicableRegionList({reviewSummaryId: Coder.replace(this.reviewSummaryInfo.id)}) // 获取适用区域列表(树结构)
}, },
data () { data () {
return { return {
...@@ -111,10 +111,11 @@ export default { ...@@ -111,10 +111,11 @@ export default {
} else if (this.supplyRank.supplyRank == '-1') { } else if (this.supplyRank.supplyRank == '-1') {
tipText = '综合评估不能为空!' tipText = '综合评估不能为空!'
isFinished = false isFinished = false
} else if (this.supplierAppRegionList.length < 1) {
tipText = '适用区域不能为空!'
isFinished = false
} }
// else if (this.supplierAppRegionList.length < 1) {
// tipText = '适用区域不能为空!'
// isFinished = false
// }
if (!isFinished) { if (!isFinished) {
this.$dialog.alert({ this.$dialog.alert({
title: tipTitle, title: tipTitle,
......
...@@ -30,20 +30,20 @@ ...@@ -30,20 +30,20 @@
<review-add-item <review-add-item
:title="`${appRegionIndex}.适用区域`" :title="`${appRegionIndex}.适用区域`"
v-if="showAppRegion" v-if="showAppRegion"
:editable="isTodo" :editable="false"
btnTitle="添加适用区域" btnTitle="添加适用区域"
:itemList="supplierAppRegionList.map(v=>v.text)" :itemList="supplierAppRegionList.map(v=>v.text)"
@handleAdd="handleChooseArea" @handleAdd="handleChooseArea"
></review-add-item> ></review-add-item>
<review-add-item <review-add-item
v-if="showProject" v-if="showProject"
:editable="isTodo" :editable="false"
:title="`${projectIndex}.适用特定项目`" :title="`${projectIndex}.适用特定项目`"
:itemList="cacheProjectList.map(v=>v.projectName)" :itemList="cacheProjectList.map(v=>v.projectName)"
btnTitle="添加适用项目" btnTitle="添加适用项目"
@handleAdd="handleChooseProject" @handleAdd="handleChooseProject"
/> />
<review-add-item <!-- <review-add-item
v-if="showProjectType" v-if="showProjectType"
:editable="isTodo" :editable="isTodo"
:title="`${projectTypeIndex}.适用项目类型`" :title="`${projectTypeIndex}.适用项目类型`"
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
:title="`${productGradeIndex}.适用产品档次`" :title="`${productGradeIndex}.适用产品档次`"
:defaultValue="productGradeId" :defaultValue="productGradeId"
v-model="productGradeId" v-model="productGradeId"
/> /> -->
<van-button @click="handleSubmit" v-if="isTodo" type="danger" size="large">确认</van-button> <van-button @click="handleSubmit" v-if="isTodo" type="danger" size="large">确认</van-button>
</div> </div>
</card-panel> </card-panel>
...@@ -97,13 +97,15 @@ export default { ...@@ -97,13 +97,15 @@ export default {
mixins: [reviewSummaryMixin], mixins: [reviewSummaryMixin],
mounted () { mounted () {
this.$store.commit('showLoading', true) this.$store.commit('showLoading', true)
this.fetchReviewSummaryInfo({billId: encodeURIComponent(Coder.replace(this.currentSupplierInfo.id))}) this.fetchReviewSummaryInfo({billId: Coder.replace(this.currentSupplierInfo.id)})
.then(() => { .then(() => {
this.conditionOption = this.reviewSummaryInfo.useCondition this.conditionOption = this.reviewSummaryInfo.useCondition
this.productGradeId = this.reviewSummaryInfo.productGrade this.productGradeId = this.reviewSummaryInfo.productGrade
this.supplyRank.supplyRank = this.reviewSummaryInfo.auditSupplyRank this.supplyRank.supplyRank = this.reviewSummaryInfo.auditSupplyRank
this.supplyRank.opinion = this.reviewSummaryInfo.auditOpinion this.supplyRank.opinion = this.reviewSummaryInfo.auditOpinion
this.fetchApplicableRegionList({reviewSummaryId: encodeURIComponent(Coder.replace(this.reviewSummaryInfo.id))}) // 获取适用区域列表(树结构) console.log(this.reviewSummaryInfo, 'reviewSummaryInfo', this.reviewSummaryInfo.AppRegionEntry, this.supplierAppRegionList)
this.fetchApplicableRegionList({reviewSummaryId: Coder.replace(this.reviewSummaryInfo.id)}) // 获取适用区域列表(树结构)
this.$store.commit('showLoading', false) this.$store.commit('showLoading', false)
}) })
.catch(() => this.$store.commit('showLoading', false)) .catch(() => this.$store.commit('showLoading', false))
...@@ -151,10 +153,11 @@ export default { ...@@ -151,10 +153,11 @@ export default {
} else if (this.supplyRank.supplyRank == '-1') { } else if (this.supplyRank.supplyRank == '-1') {
tipText = '综合评估不能为空!' tipText = '综合评估不能为空!'
isFinished = false isFinished = false
} else if (this.supplierAppRegionList.length < 1) {
tipText = '适用区域不能为空!'
isFinished = false
} }
// else if (this.supplierAppRegionList.length < 1) {
// tipText = '适用区域不能为空!'
// isFinished = false
// }
if (!isFinished) { if (!isFinished) {
this.$dialog.alert({ this.$dialog.alert({
title: tipTitle, title: tipTitle,
...@@ -184,6 +187,7 @@ export default { ...@@ -184,6 +187,7 @@ export default {
productGrade: encodeURIComponent(this.productGradeId || '') productGrade: encodeURIComponent(this.productGradeId || '')
}] }]
} }
console.log(params, 'params', this.cacheProjectList, this.supplierAppRegionList)
this.fetchAuditReviewSummarys({params, callback: this.submitCallback}) this.fetchAuditReviewSummarys({params, callback: this.submitCallback})
} }
}, },
......
...@@ -66,6 +66,11 @@ export default { ...@@ -66,6 +66,11 @@ export default {
}; };
this.index = this.memberGradeInfo.supplyRank this.index = this.memberGradeInfo.supplyRank
// this.fetchScores({billId: Coder.replace(this.memberGradeInfo.id)}) // this.fetchScores({billId: Coder.replace(this.memberGradeInfo.id)})
console.log(this.memberGradeInfo, 'mountend')
if (!this.memberGradeInfo || !this.memberGradeInfo.conclusion) {
console.log('111')
this.updateMemberGradeInfo({ ...this.memberGradeInfo, conclusion: '同意' })
}
}, },
watch: { watch: {
clientHeight: function () { clientHeight: function () {
...@@ -88,7 +93,8 @@ export default { ...@@ -88,7 +93,8 @@ export default {
toggle (index) { toggle (index) {
if (this.isEditable) { if (this.isEditable) {
this.index = index this.index = index
this.updateMemberGradeInfo({ ...this.memberGradeInfo, supplyRank: index }) const conclusion = index === 0 ? '同意' : '不同意'
this.updateMemberGradeInfo({ ...this.memberGradeInfo, supplyRank: index, conclusion })
} }
}, },
changeFixed (clientHeight) { changeFixed (clientHeight) {
...@@ -185,6 +191,7 @@ export default { ...@@ -185,6 +191,7 @@ export default {
} }
}, },
defaultSupplyRank () { defaultSupplyRank () {
console.log(this.memberGradeInfo, 'memberGradeInfo')
return this.memberGradeInfo.supplyRank || 0 return this.memberGradeInfo.supplyRank || 0
} }
} }
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
placeholder="请输入使用条件说明" /> placeholder="请输入使用条件说明" />
<review-add-item <review-add-item
v-if="showProject" v-if="showProject"
:editable="isTodo" :editable="false"
:title="`${projectIndex}.适用特定项目`" :title="`${projectIndex}.适用特定项目`"
:itemList="cacheProjectList.map(v=>v.projectName)" :itemList="cacheProjectList.map(v=>v.projectName)"
btnTitle="添加适用项目" btnTitle="添加适用项目"
@handleAdd="handleChooseProject" @handleAdd="handleChooseProject"
/> />
<review-add-item <!-- <review-add-item
v-if="showProjectType" v-if="showProjectType"
:editable="isTodo" :editable="isTodo"
:title="`${projectTypeIndex}.适用项目类型`" :title="`${projectTypeIndex}.适用项目类型`"
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
:title="`${productGradeIndex}.适用产品档次`" :title="`${productGradeIndex}.适用产品档次`"
:defaultValue="productGradeId" :defaultValue="productGradeId"
v-model="productGradeId" v-model="productGradeId"
/> /> -->
</div> </div>
<div class="footer flex-v flex-center" slot="footer"> <div class="footer flex-v flex-center" slot="footer">
<van-button @click="handleSubmit" v-if="isTodo" type="danger" size="large">确认</van-button> <van-button @click="handleSubmit" v-if="isTodo" type="danger" size="large">确认</van-button>
......
...@@ -169,6 +169,7 @@ export class MAS { ...@@ -169,6 +169,7 @@ export class MAS {
* @memberof MAS * @memberof MAS
*/ */
proxy (alias, params, options) { proxy (alias, params, options) {
console.log('proxy', alias, params, options, this.token)
params = Object.assign({ params = Object.assign({
// [this.tokenKey]: this.token // token 不放入post数据 // [this.tokenKey]: this.token // token 不放入post数据
}, params, options && options.params) }, params, options && options.params)
......
import { import {
getApplicableRegionList, // getApplicableRegionList,
actionGetAllAppRegionList,
getAuditReviewSummarys, getAuditReviewSummarys,
// getReviewSummaryPersionList, // getReviewSummaryPersionList,
getReviewSummaryInfo, getReviewSummaryInfo,
...@@ -21,7 +22,7 @@ import { ...@@ -21,7 +22,7 @@ import {
attachmentDownload attachmentDownload
} from '@/api/inspect' } from '@/api/inspect'
import { Toast } from 'vant' import { Toast } from 'vant'
import { reduceTreeCheckedList } from '@/common/utils/assist' import { reduceTreeCheckedList, findNodeById } from '@/common/utils/assist'
import { Coder } from '@/common' import { Coder } from '@/common'
export default { export default {
...@@ -48,6 +49,7 @@ export default { ...@@ -48,6 +49,7 @@ export default {
// 适用区域列表 // 适用区域列表
applicableRegionList: [], // 适用区域列表 applicableRegionList: [], // 适用区域列表
supplierAppRegionList: [], // 已选的适用区域{包含:服务器返回或手动选择} supplierAppRegionList: [], // 已选的适用区域{包含:服务器返回或手动选择}
regionSelectIndexPath: [],
allProjectInfo: {}, // 缓存接口的所有特定项目列表 allProjectInfo: {}, // 缓存接口的所有特定项目列表
projectPagingList: [], // 特定项目已选择列表 projectPagingList: [], // 特定项目已选择列表
currentReviewFormFid: '', // 当前选择的供方考察评审表(CT_SUP_ReviewForm)的FID currentReviewFormFid: '', // 当前选择的供方考察评审表(CT_SUP_ReviewForm)的FID
...@@ -76,8 +78,8 @@ export default { ...@@ -76,8 +78,8 @@ export default {
currentFid: state => state.fid, currentFid: state => state.fid,
// CT_SUP_ReviewGrp表的FID // CT_SUP_ReviewGrp表的FID
reviewGrpId: state => state.inspectInfo.reviewGrp && state.inspectInfo.reviewGrp.id, reviewGrpId: state => state.inspectInfo.reviewGrp && state.inspectInfo.reviewGrp.id,
supplierList: state => state.inspectInfo.rows || [],
isGCSupplierType: state => (state.inspectInfo.reviewGrp && state.inspectInfo.reviewGrp.isGCSupplierType) || false, isGCSupplierType: state => (state.inspectInfo.reviewGrp && state.inspectInfo.reviewGrp.isGCSupplierType) || false,
supplierList: state => state.inspectInfo.rows || [],
reviewformList: state => state.reviewFormList.rows || [], reviewformList: state => state.reviewFormList.rows || [],
attachmentInfo: state => state.inspectAttachmentInfo.rows || [], attachmentInfo: state => state.inspectAttachmentInfo.rows || [],
hisattachmentInfo: state => state.inspectHisAttachmentInfo.rows || [], hisattachmentInfo: state => state.inspectHisAttachmentInfo.rows || [],
...@@ -110,7 +112,22 @@ export default { ...@@ -110,7 +112,22 @@ export default {
response = await getReviewDistributeInfo({billId}) response = await getReviewDistributeInfo({billId})
} else { } else {
// 组长审核、会签、审批节点 // 组长审核、会签、审批节点
response = await getReviewGrpInfo({billId}) response = await getReviewGrpInfo({ billId })
if (response.data && response.data.appRegion) {
actionGetAllAppRegionList({ isConvert: true }).then(res => {
console.log(res, '111')
const regionList = JSON.parse(res.data)
const {node: itemRe, path} = findNodeById(response.data.appRegion, regionList) || {}
console.log(itemRe, 'itemRe', response.data.appRegion, regionList)
// 已选的适用特定项目
if (itemRe) {
commit('updateSupplierAppRegionList', [itemRe])
}
if (path) {
commit('updateRegionSelectIndexPath', path)
}
})
}
} }
if (response.code === 200 && typeof response.data !== 'string') { if (response.code === 200 && typeof response.data !== 'string') {
...@@ -172,7 +189,7 @@ export default { ...@@ -172,7 +189,7 @@ export default {
} else { } else {
let arr = [] let arr = []
response.data.rows.forEach(v => { response.data.rows.forEach(v => {
arr.push(getReviewSummaryInfo({billId: encodeURIComponent(Coder.replace(v.id))})) arr.push(getReviewSummaryInfo({billId: Coder.replace(v.id)}))
}) })
Promise.all(arr) Promise.all(arr)
.then(resultArr => { .then(resultArr => {
...@@ -187,7 +204,7 @@ export default { ...@@ -187,7 +204,7 @@ export default {
let appRegionReqs = [] let appRegionReqs = []
datas.forEach(it => { datas.forEach(it => {
if (it) { if (it) {
appRegionReqs.push(getApplicableRegionList({reviewSummaryId: encodeURIComponent(Coder.replace(it.id))})) appRegionReqs.push(actionGetAllAppRegionList({reviewSummaryId: Coder.replace(it.id)}))
} }
}) })
Promise.all(appRegionReqs) Promise.all(appRegionReqs)
...@@ -233,13 +250,13 @@ export default { ...@@ -233,13 +250,13 @@ export default {
// }, // },
// 获取适用区域列表,并缓存 // 获取适用区域列表,并缓存
async fetchApplicableRegionList ({ commit }, payload) { async fetchApplicableRegionList ({ commit }, payload) {
const response = await getApplicableRegionList(payload) const response = await actionGetAllAppRegionList({...payload, isConvert: true})
if (response.code === 200) { if (response.code === 200) {
let treeArr = JSON.parse(response.data) let treeArr = JSON.parse(response.data)
let arr = [] let arr = []
reduceTreeCheckedList(treeArr, arr) reduceTreeCheckedList(treeArr, arr)
commit('updateApplicableRegionList', treeArr) commit('updateApplicableRegionList', treeArr)
commit('updateSupplierAppRegionList', arr) // commit('updateSupplierAppRegionList', arr)
return treeArr return treeArr
} else { } else {
commit('networkError', response.msg, { root: true }) commit('networkError', response.msg, { root: true })
...@@ -274,6 +291,7 @@ export default { ...@@ -274,6 +291,7 @@ export default {
async fetchReviewSummaryInfo ({ commit, rootState }, payload) { async fetchReviewSummaryInfo ({ commit, rootState }, payload) {
const response = await getReviewSummaryInfo(payload) const response = await getReviewSummaryInfo(payload)
if (response.code === 200) { if (response.code === 200) {
console.log('response.data', response.data)
commit('updateReviewSummaryInfo', response.data) commit('updateReviewSummaryInfo', response.data)
// 考察组成员评分 // 考察组成员评分
if (response.data.PersonEntry) { if (response.data.PersonEntry) {
...@@ -286,7 +304,6 @@ export default { ...@@ -286,7 +304,6 @@ export default {
if (response.data.PrjTypeEntry) { if (response.data.PrjTypeEntry) {
commit('updateSupplierPrjTypeList', response.data.PrjTypeEntry) commit('updateSupplierPrjTypeList', response.data.PrjTypeEntry)
} }
// 已选的适用特定项目
if (response.data.ProjectEntry) { if (response.data.ProjectEntry) {
commit('updateSupplierProjectList', response.data.ProjectEntry.map(v => Object.assign({}, v, {projectId: v.curProject}))) commit('updateSupplierProjectList', response.data.ProjectEntry.map(v => Object.assign({}, v, {projectId: v.curProject})))
} }
...@@ -573,6 +590,9 @@ export default { ...@@ -573,6 +590,9 @@ export default {
updateSupplierAppRegionList (state, payload) { updateSupplierAppRegionList (state, payload) {
state.supplierAppRegionList = payload state.supplierAppRegionList = payload
}, },
updateRegionSelectIndexPath (state, payload) {
state.regionSelectIndexPath = payload
},
// 更新已选的适用特定项目 // 更新已选的适用特定项目
updateSupplierProjectList (state, payload) { updateSupplierProjectList (state, payload) {
state.supplierProjectList = payload state.supplierProjectList = payload
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment