@ -16,7 +16,7 @@
合同类型
合同类型
< / span >
< / span >
< Select placeholder = "请选择类型" v -model = " select.type " style = "width:120px;" clearable >
< Select placeholder = "请选择类型" v -model = " select.type " style = "width:120px;" clearable >
< Option v-for ="item in [{label:'服务',value:1},{label:'货品',value:2},{label:'工程',value:3}] " :value="item.value" :key="item.value"> {{ item.label }} < / Option >
< Option v-for ="item in type " :value="item.value" :key="item.value"> {{ item.label }} < / Option >
< / Select >
< / Select >
< / div >
< / div >
@ -85,12 +85,18 @@
< template slot -scope = " scope " >
< template slot -scope = " scope " >
< div class = "slot-btns" >
< div class = "slot-btns" >
< Button class = "slot-btns-item" type = "primary" size = "small" @ click = "$refs['paymentRegistration'].isShowPaymentRegistration = true,$refs['paymentRegistration'].getContract(scope.row)" > 付款登记 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" @ click = "$refs['paymentRegistration'].isShowPaymentRegistration = true,$refs['paymentRegistration'].getContract(scope.row)" > 付款登记 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" @ click = "$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id" > 签订合同 < / Button >
< template v-if ="scope.row.status === 1" >
< Button class = "slot-btns-item" type = "primary" size = "small" @click ="test" > 招 标 文 件 审 查 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" @ click = "$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id" > 签订合同 < / Button >
< / template >
< Button class = "slot-btns-item" type = "primary" size = "small" > 招标文件审查 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" > 附件管理 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" > 附件管理 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" > 请示流程 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" @click ="askProcess(scope.row)" > 请 示 流 程 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" > 合同会签流程申请 < / Button >
< template v-if ="scope.row.join_status === 1" >
< Button class = "slot-btns-item" type = "primary" size = "small" > 采购流程申请 < / Button >
< Button class = "slot-btns-item" type = "primary" size = "small" @click ="signProcess(scope.row)" > 合 同 会 签 流 程 申 请 < / Button >
< / template >
< template v-if ="scope.row.purchase_status === 1" >
< Button class = "slot-btns-item" type = "primary" size = "small" @click ="buyProcess(scope.row)" > 采 购 流 程 申 请 < / Button >
< / template >
< Poptip
< Poptip
placement = "bottom"
placement = "bottom"
: transfer = "true"
: transfer = "true"
@ -133,7 +139,7 @@
< / div >
< / div >
< div class = "xy-table-item-content" >
< div class = "xy-table-item-content" >
< el -select placeholder = "请选择项目类型" v-model ="form.type" style="width: 300px;" >
< el -select placeholder = "请选择项目类型" v-model ="form.type" style="width: 300px;" >
< el -option v-for ="item in [{label:'服务',value:1},{label:'货品',value:2},{label:'工程',value:3}] " :label="item.label" :value="item.value"> < / el -option >
< el -option v-for ="item in type " :label="item.label" :value="item.value"> < / el -option >
< / e l - s e l e c t >
< / e l - s e l e c t >
< / div >
< / div >
< / div >
< / div >
@ -172,6 +178,16 @@
< / div >
< / div >
< / div >
< / div >
< / template >
< / template >
< template v -slot : money >
< div class = "xy-table-item" >
< div class = "xy-table-item-label" >
< span style = "color: red;font-weight: 600;padding-right: 4px;" > * < / span > 合同金额
< / div >
< div class = "xy-table-item-content xy-table-item-price" >
< el -input placeholder = "请填写合同金额" :value ="form.money" style = "width: 300px;" @ input = "e=>form.money = e" / >
< / div >
< / div >
< / template >
< template v -slot : fundingChannels >
< template v -slot : fundingChannels >
< div class = "xy-table-item" >
< div class = "xy-table-item" >
< div class = "xy-table-item-label" >
< div class = "xy-table-item-label" >
@ -184,6 +200,26 @@
< / div >
< / div >
< / div >
< / div >
< / template >
< / template >
< template v -slot : supply >
< div class = "xy-table-item" >
< div class = "xy-table-item-label" >
< span style = "color: red;font-weight: 600;padding-right: 4px;" > * < / span > 供应商
< / div >
< div class = "xy-table-item-content" >
< el -input placeholder = "请填写供应商" v -model = " form.supply " style = "width: 300px;" / >
< / div >
< / div >
< / template >
< template v -slot : carryDepartment >
< div class = "xy-table-item" >
< div class = "xy-table-item-label" >
< span style = "color: red;font-weight: 600;padding-right: 4px;" > * < / span > 执行部门
< / div >
< div class = "xy-table-item-content" >
< el -input placeholder = "请填写执行部门" v -model = " form.carryDepartment " style = "width: 300px;" / >
< / div >
< / div >
< / template >
< template v -slot : isBudget >
< template v -slot : isBudget >
< div class = "xy-table-item" >
< div class = "xy-table-item" >
< div class = "xy-table-item-label" >
< div class = "xy-table-item-label" >
@ -255,10 +291,11 @@
< / template >
< / template >
< script >
< script >
import { getContract , addContrant , delContract ,detailContract , editorContract } from "@/api/contract/contract"
import { getContract , addContrant , delContract } from "@/api/contract/contract"
import { getparameter } from "@/api/system/dictionary"
import { getparameter } from "@/api/system/dictionary"
import { listdept } from "@/api/system/department" ;
import { listdept } from "@/api/system/department" ;
import { getBudget } from "@/api/budget/budget"
import { getBudget } from "@/api/budget/budget"
import { getOatoken } from "@/api/oatoken"
import { parseTime } from "@/utils"
import { parseTime } from "@/utils"
import { Message } from "element-ui" ;
import { Message } from "element-ui" ;
@ -300,6 +337,7 @@ export default {
priceMax : null ,
priceMax : null ,
status : ""
status : ""
} ,
} ,
type : [ { label : '服务' , value : 1 } , { label : '货品' , value : 2 } , { label : '工程' , value : 3 } ] ,
purchaseType : [ ] , / / 购 买 形 式
purchaseType : [ ] , / / 购 买 形 式
purchaseWay : [ ] , / / 购 买 方 式
purchaseWay : [ ] , / / 购 买 方 式
moneyWay : [ ] , / / 资 金 渠 道
moneyWay : [ ] , / / 资 金 渠 道
@ -464,7 +502,10 @@ export default {
methods : "" ,
methods : "" ,
modality : "" ,
modality : "" ,
price : "" ,
price : "" ,
money : '' ,
fundingChannels : "" ,
fundingChannels : "" ,
supply : '' ,
carryDepartment : "" ,
isBudget : true ,
isBudget : true ,
plan : [ ]
plan : [ ]
} ,
} ,
@ -484,9 +525,18 @@ export default {
price : [
price : [
{ required : true , message : "必填" }
{ required : true , message : "必填" }
] ,
] ,
money : [
{ required : true , message : "必填" }
] ,
fundingChannels : [
fundingChannels : [
{ required : true , message : "必填" }
{ required : true , message : "必填" }
] ,
] ,
supply : [
{ required : true , message : "必填" }
] ,
carryDepartment : [
{ required : true , message : "必填" }
] ,
plan : [
plan : [
{ validator : planPass }
{ validator : planPass }
]
]
@ -501,10 +551,52 @@ export default {
}
}
} ,
} ,
methods : {
methods : {
test ( ) {
/ / 采 购 流 程
let win = window . open ( 'https://www.baidu.com' , 'baidu' , 'top=100,left=100,width=800,height=400' )
async buyProcess ( row ) {
console . log ( row )
let baseInfo = {
"项目名称" : row . name ,
"采购形式" : row . purchase _type . value ,
"采购方式" : row . purchase _way . value ,
"项目类型" : this . type . filter ( item => {
return item . value === row . type
} ) [ 0 ] . label ,
"项目预算(万元)" : row . plan _price / 10000 ,
"资金渠道" : row . money _way . value
}
let res = await getOatoken ( )
let url = ` ${ process . env . VUE _APP _OUT _URL } /admin/flow/create/2?oatoken= ${ res . oatoken } &out_contract_id= ${ row . id } &contract_json= ${ JSON . stringify ( baseInfo ) } `
let buyProcess = window . open ( url , 'buyProcess' , 'top=100,left=100,width=1000,height=600' )
} ,
/ / 会 签 流 程
async signProcess ( row ) {
let baseInfo = {
"合同名称" : row . name ,
"执行部门" : row . carry _department ,
"合同金额(万元)" : row . money ,
/ / " 承 包 商 \ \ 供 应 商 " : r o w . s u p p l y
}
let res = await getOatoken ( )
let url = ` ${ process . env . VUE _APP _OUT _URL } /admin/flow/create/3?oatoken= ${ res . oatoken } &out_contract_id= ${ row . id } &contract_json= ${ JSON . stringify ( baseInfo ) } `
let signProcess = window . open ( url , 'signProcess' , 'top=100,left=100,width=1000,height=600' )
} ,
/ / 请 示 流 程
async askProcess ( row ) {
let res = await getOatoken ( )
let url = ` ${ process . env . VUE _APP _OUT _URL } /admin/flow/create/17?oatoken= ${ res . oatoken } &out_contract_id= ${ row . id } `
let askProcess = window . open ( url , 'askProcess' , 'top=100,left=100,width=1000,height=600' )
} ,
} ,
/ / 防 抖
debounce ( fn , delay = 500 ) {
let timer = null
return function _debounce ( ) {
if ( timer ) clearTimeout ( timer )
timer = setTimeout ( ( ) => {
fn ( )
} , delay )
}
} ,
/ / 翻 页
/ / 翻 页
pageChange ( e ) {
pageChange ( e ) {
@ -600,6 +692,9 @@ export default {
money _way _id : this . form . fundingChannels ,
money _way _id : this . form . fundingChannels ,
plan _price : this . form . price ,
plan _price : this . form . price ,
name : this . form . name ,
name : this . form . name ,
supply : this . form . supply ,
carry _department : this . form . carryDepartment ,
money : this . form . money ,
contract _plan _links : this . form . plan . map ( item => {
contract _plan _links : this . form . plan . map ( item => {
return item . value
return item . value
} )
} )
@ -624,7 +719,6 @@ export default {
this . getContracts ( )
this . getContracts ( )
} )
} )
} ,
} ,
} ,
} ,
mounted ( ) {
mounted ( ) {
this . getPurchaseType ( )
this . getPurchaseType ( )