|
|
|
|
@ -327,12 +327,7 @@
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
$refs['paymentRegistration'].getContract(scope.row),
|
|
|
|
|
($refs[
|
|
|
|
|
'paymentRegistration'
|
|
|
|
|
].isShowPaymentRegistration = true)
|
|
|
|
|
"
|
|
|
|
|
@click="$refs['paymentRegistration'].open(scope.row)"
|
|
|
|
|
>
|
|
|
|
|
付款登记
|
|
|
|
|
</Button>
|
|
|
|
|
@ -343,12 +338,7 @@
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
$refs['paymentRegistration'].getContract(scope.row),
|
|
|
|
|
($refs[
|
|
|
|
|
'paymentRegistration'
|
|
|
|
|
].isShowPaymentRegistration = true)
|
|
|
|
|
"
|
|
|
|
|
@click="$refs['paymentRegistration'].open(scope.row)"
|
|
|
|
|
>付款登记
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
@ -1650,7 +1640,7 @@ export default {
|
|
|
|
|
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.caigou.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
(row.FLOWSTATUS.caigou.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('caigou',row)}}>查看</a> : ''
|
|
|
|
|
(row.FLOWSTATUS.caigou.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('caigou', row)}}>查看</a> : ''
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
@ -1664,12 +1654,16 @@ export default {
|
|
|
|
|
if (!row.FLOWSTATUS.zhaobiao.getStatus()) {
|
|
|
|
|
return (<span style="color: rgb(140, 140, 140)">无</span>);
|
|
|
|
|
}
|
|
|
|
|
const sourceRow = this.getSplitSourceRow(row) || row
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.zhaobiao.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.zhaobiao.getStatus()) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
(row.FLOWSTATUS.zhaobiao.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>{
|
|
|
|
|
if (this.openFlowDetail(sourceRow.invite_last_flow_id)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$refs['biddingUpload'].setId(this.flowSourceId(row))
|
|
|
|
|
this.$refs['biddingUpload'].show()
|
|
|
|
|
}}}>查看</a> : ''
|
|
|
|
|
@ -1691,7 +1685,7 @@ export default {
|
|
|
|
|
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.shenpi.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus()) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
(row.FLOWSTATUS.shenpi.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a> : ''
|
|
|
|
|
(row.FLOWSTATUS.shenpi.getStatus() > 1 && !this.shouldHideSourceJoinView(row)) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a> : ''
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
@ -2159,7 +2153,76 @@ export default {
|
|
|
|
|
flowSourceId (row) {
|
|
|
|
|
return row.is_split_child && row.split_source_id ? row.split_source_id : row.id
|
|
|
|
|
},
|
|
|
|
|
getSplitSourceRow(row) {
|
|
|
|
|
if (!row) return null
|
|
|
|
|
const parentId = row._splitParentId || row.split_source_id
|
|
|
|
|
if (!parentId) return null
|
|
|
|
|
return (this.rawListData || []).find(item => item.id === parentId) || null
|
|
|
|
|
},
|
|
|
|
|
getSplitChildren(row) {
|
|
|
|
|
return row?.split_children || row?.splitChildren || []
|
|
|
|
|
},
|
|
|
|
|
aggregateSectionJoinStatus(children) {
|
|
|
|
|
if (!children || !children.length) {
|
|
|
|
|
return 1
|
|
|
|
|
}
|
|
|
|
|
const statuses = children.map(child => Number(child.join_status) || 1)
|
|
|
|
|
if (statuses.every(status => status === 3)) {
|
|
|
|
|
return 3
|
|
|
|
|
}
|
|
|
|
|
if (statuses.some(status => status === 2)) {
|
|
|
|
|
return 2
|
|
|
|
|
}
|
|
|
|
|
if (statuses.some(status => status === 3) && statuses.some(status => status === 1)) {
|
|
|
|
|
return 2
|
|
|
|
|
}
|
|
|
|
|
return 1
|
|
|
|
|
},
|
|
|
|
|
enrichSplitChildRow(child, source) {
|
|
|
|
|
if (!source) {
|
|
|
|
|
return child
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
...child,
|
|
|
|
|
type: child.type ?? source.type,
|
|
|
|
|
purchase_type_id: child.purchase_type_id || source.purchase_type_id,
|
|
|
|
|
purchase_way_id: child.purchase_way_id || source.purchase_way_id,
|
|
|
|
|
money_way_id: child.money_way_id || source.money_way_id,
|
|
|
|
|
purchase_type: child.purchase_type || source.purchase_type,
|
|
|
|
|
purchaseType: child.purchaseType || source.purchaseType,
|
|
|
|
|
purchase_way: child.purchase_way || source.purchase_way || source.purchaseWay,
|
|
|
|
|
purchaseWay: child.purchaseWay || source.purchaseWay || source.purchase_way,
|
|
|
|
|
money_way_detail: (child.money_way_detail && child.money_way_detail.length)
|
|
|
|
|
? child.money_way_detail
|
|
|
|
|
: (source.money_way_detail || []),
|
|
|
|
|
purchase_last_flow_id: source.purchase_last_flow_id,
|
|
|
|
|
invite_last_flow_id: source.invite_last_flow_id,
|
|
|
|
|
req_last_flow_id: source.req_last_flow_id,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
shouldHideSourceJoinView(row) {
|
|
|
|
|
return !!(row._hasSplitChildren || (!row.is_split_child && this.hasSplitSections(row)))
|
|
|
|
|
},
|
|
|
|
|
openFlowDetail(flowId) {
|
|
|
|
|
if (!flowId) {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
window.open(
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}/index.php?s=/flow/edit/id/${flowId}&auth_token=${this.$store.getters.oa_token}`,
|
|
|
|
|
'bidding',
|
|
|
|
|
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
|
|
|
|
|
)
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
async toOaDetail (tbname,row) {
|
|
|
|
|
const sourceRow = this.getSplitSourceRow(row) || row
|
|
|
|
|
if (tbname === 'caigou' && this.openFlowDetail(sourceRow.purchase_last_flow_id)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (tbname === 'hetong' && this.openFlowDetail(row.join_last_flow_id)) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let res;
|
|
|
|
|
const flowId = this.flowSourceId(row)
|
|
|
|
|
switch (tbname) {
|
|
|
|
|
@ -2184,11 +2247,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res && res.flow?.id) {
|
|
|
|
|
window.open(
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}/index.php?s=/flow/edit/id/${res.flow.id}&auth_token=${this.$store.getters.oa_token}`,
|
|
|
|
|
"bidding",
|
|
|
|
|
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
|
|
|
|
|
)
|
|
|
|
|
this.openFlowDetail(res.flow.id)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'warning',
|
|
|
|
|
@ -2518,7 +2577,11 @@ export default {
|
|
|
|
|
rows.push({ ...source, _hasSplitChildren: hasChildren })
|
|
|
|
|
if (hasChildren && this.isSplitGroupExpanded(source.id)) {
|
|
|
|
|
children.forEach((child, index) => {
|
|
|
|
|
rows.push({ ...child, _splitParentId: source.id, _splitSectionIndex: index })
|
|
|
|
|
rows.push(this.enrichSplitChildRow({
|
|
|
|
|
...child,
|
|
|
|
|
_splitParentId: source.id,
|
|
|
|
|
_splitSectionIndex: index
|
|
|
|
|
}, source))
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -2531,7 +2594,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
const children = source.split_children || source.splitChildren || []
|
|
|
|
|
const rows = children.map((child, index) => {
|
|
|
|
|
const row = { ...child, _splitParentId: sourceId, _splitSectionIndex: index }
|
|
|
|
|
const row = this.enrichSplitChildRow({
|
|
|
|
|
...child,
|
|
|
|
|
_splitParentId: sourceId,
|
|
|
|
|
_splitSectionIndex: index
|
|
|
|
|
}, source)
|
|
|
|
|
this.handleContractFlow(row)
|
|
|
|
|
return row
|
|
|
|
|
})
|
|
|
|
|
@ -3010,7 +3077,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if (item.is_simple !== 1 && !item.is_substitute && !item.is_split_child) {
|
|
|
|
|
//不为简易 采购未开始
|
|
|
|
|
|
|
|
|
|
flowStatus["caigou"].setStatus(item.purchase_status)
|
|
|
|
|
if (item.purchase_status === 1) {
|
|
|
|
|
//采购未开始
|
|
|
|
|
@ -3020,18 +3086,23 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_split_child) {
|
|
|
|
|
// 与源 contract 相同规则:源 contract 无此流程则子标段也显示「无」
|
|
|
|
|
if (item.is_simple !== 1 && !item.is_substitute) {
|
|
|
|
|
flowStatus['caigou'].setStatus(item.purchase_status)
|
|
|
|
|
const splitChildren = this.getSplitChildren(item)
|
|
|
|
|
const hasSections = !item.is_split_child && splitChildren.length > 0
|
|
|
|
|
const sourceRow = item.is_split_child ? (this.getSplitSourceRow(item) || item) : item
|
|
|
|
|
const sharedPurchaseRow = sourceRow || item
|
|
|
|
|
|
|
|
|
|
if (item.is_split_child || hasSections || item._hasSplitChildren) {
|
|
|
|
|
// 采购/招标仅挂在源 contract,子标段只读继承展示
|
|
|
|
|
if (sharedPurchaseRow.is_simple !== 1 && !sharedPurchaseRow.is_substitute) {
|
|
|
|
|
flowStatus['caigou'].setStatus(sharedPurchaseRow.purchase_status)
|
|
|
|
|
flowStatus['caigou'].setExecutable(false)
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract && item.purchase_way?.remark === 'true') {
|
|
|
|
|
flowStatus['zhaobiao'].setStatus(item.invite_status)
|
|
|
|
|
if (sharedPurchaseRow.is_contract && sharedPurchaseRow.purchase_way?.remark === 'true') {
|
|
|
|
|
flowStatus['zhaobiao'].setStatus(sharedPurchaseRow.invite_status)
|
|
|
|
|
flowStatus['zhaobiao'].setExecutable(false)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute && !item.is_split_child) {
|
|
|
|
|
if (item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute && !item.is_split_child && !hasSections) {
|
|
|
|
|
//不为网上商场 是合同\
|
|
|
|
|
flowStatus["zhaobiao"].setStatus(item.invite_status)
|
|
|
|
|
if (item.invite_status === 1 && item.purchase_status === 3) {
|
|
|
|
|
@ -3041,12 +3112,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract) {
|
|
|
|
|
//为合同 不为网上商城
|
|
|
|
|
flowStatus["shenpi"].setStatus(item.join_status)
|
|
|
|
|
if (hasSections || item._hasSplitChildren) {
|
|
|
|
|
flowStatus["shenpi"].setStatus(this.aggregateSectionJoinStatus(splitChildren))
|
|
|
|
|
} else {
|
|
|
|
|
flowStatus["shenpi"].setStatus(item.join_status)
|
|
|
|
|
}
|
|
|
|
|
const canStartJoin = item.join_status === 1 && (item.invite_status === 3 ||
|
|
|
|
|
(item.purchase_way?.remark === 'false' && item.purchase_status === 3))
|
|
|
|
|
if (canStartJoin && !(item.is_split_child === 0 && this.hasSplitSections(item))) {
|
|
|
|
|
if (!hasSections && !item._hasSplitChildren && canStartJoin && !item.is_split_child) {
|
|
|
|
|
// 源项目已拆分标段时不显示合同审批,由各标段独立发起
|
|
|
|
|
flowStatus["shenpi"].setExecutable(true)
|
|
|
|
|
} else if (item.is_split_child && canStartJoin) {
|
|
|
|
|
flowStatus["shenpi"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract && !item.is_substitute && !item.is_split_child) {
|
|
|
|
|
|