Commit 2d2008a3 authored by ztf's avatar ztf

采购文件

parent e9f7c5b2
<template>
<div class="ExtPuchasePlanAttributeLinkAdd">
<dee-as-com
ref="tableRef"
:lay-config="{
layKey:'ExtPuchasePlanAttribute-relatedContractList',
typeName:'ExtExpenditureContract'
}"
@selectionChange="selectionChange"
/>
<div class="btns">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">确定</el-button>
<el-button type="primary" @click="$emit('cancel')">取消</el-button>
</div>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'ExtPuchasePlanAttributeLinkAdd',
componentName: '采购计划-相关合同-添加',
props: {
parentTableData: {
type: Object,
default: () => {}
},
basicData: {
type: Object,
default: () => {}
},
componentProp: {
type: Object,
default: () => {}
}
},
data() {
return {
selections: []
}
},
computed: {
isDisable() {
return Boolean(this.selections.length)
}
},
mounted() {
},
methods: {
selectionChange(data) {
this.selections = data
},
tosubmit() {
const subId = this.$parent.$parent.$parent.$parent.basicData.id
const params = this.selections.map(r => {
return {
source: {
id: subId
},
operator: 'ADD',
target: r
}
})
post(`/ExtPurPlanExtExpendContractLink/recursions`, params).then(res => {
this.$utils.showMessageSuccess('添加成功!')
this.$emit('completeEven')
})
}
}
}
</script>
<style lang='scss' scoped>
.ExtPuchasePlanAttributeLinkAdd{
height: calc(80%);
.btns{
text-align: center;
margin-top: 30px;
}
.submitBTN{
margin-right: 20px;
}
}
</style>
<template>
<div class="ExtICMPlanDocLinkAdd">
<div class="ExtPurchasePlanDocLink">
<!-- 搜索条件 -->
<dee-as-com
ref="search"
:lay-config="{
layKey:'ExtICMPlanDocLink-Query',
layKey:'PlanDocLink-Query',
typeName:'DxDocument'
}"
@searchEvent="searchEvent"
......@@ -12,12 +12,12 @@
<dee-as-com
ref="tableRef"
:lay-config="{
layKey:'ExtICMPlanDocLink-addlist',
layKey:'PlanDocLink-addlist',
typeName:'DxDocument'
}"
:dis-business="true"
:result-data="tableData"
@radio-current-change="radioCurrentChange"
@selectionChange="selectionChange"
/>
<div class="btns">
<el-button type="primary" class="submitBTN" :disabled="!isDisable" @click="tosubmit">确定</el-button>
......@@ -30,7 +30,7 @@
import { post } from '@/utils/http'
export default {
name: 'ExtICMPlanDocLinkAdd',
componentName: 'ICM相关联系单-添加',
componentName: '采购计划详情-采购技术文件-添加',
props: {
parentTableData: {
type: Object,
......@@ -47,21 +47,22 @@ export default {
},
data() {
return {
selectRow: {},
selections: [],
searchForm: [],
tableData: []
}
},
computed: {
isDisable() {
return Boolean(this.selectRow.id)
return Boolean(this.selections.length)
},
queryParams() {
// 基本参数
let searchItems = [{
'fieldName': 'subTypeName',
'operator': 'EQ',
'value': 'ContactList'
'value': 'TechnicalFile'
// ContactList
}
]
// 过滤参数
......@@ -84,8 +85,12 @@ export default {
}
},
mounted() {
this.getData()
},
methods: {
selectionChange(data) {
this.selections = data
},
getData() {
const params = this.queryParams
post('/DxDocument/search', params).then(res => {
......@@ -96,31 +101,29 @@ export default {
this.searchForm = searchForm
this.getData()
},
radioCurrentChange(data) {
this.selectRow = data.row
console.log('this.selectRow', this.selectRow)
},
tosubmit() {
// const params = {
// sourceId: this.parentTableData.id, // 计划id
// targetId: this.selectRow.id// 联系单id
// }
// if (this.selections && this.selections.length === 1) {
post(`/ExtICMPlanDocLink/bindPlanAndDoc?sourceId=${this.parentTableData.id}&targetId=${this.selectRow.id}`).then(res => {
const subId = this.$parent.$parent.$parent.$parent.basicData.id
const params = this.selections.map(r => {
return {
source: {
id: subId
},
operator: 'ADD',
target: r
}
})
post(`/ExtPurchasePlanDocLink/recursions`, params).then(res => {
if (res.items) {
this.$utils.showMessageSuccess('添加成功!')
this.$emit('completeEven')
}
})
// } else {
// this.$message.error('一次只能添加一个技术联系单')
// }
}
}
}
</script>
<style lang='scss' scoped>
.ExtICMPlanDocLinkAdd{
.ExtPurchasePlanDocLink{
height: calc(80%);
.btns{
text-align: center;
......
......@@ -43,9 +43,9 @@ export default {
'form.extProgram.id': {
immediate: true,
deep: true,
handler(val) {
if (val) {
this.getProjectList(val)
handler(newvalue, oldValue) {
if (newvalue && newvalue !== oldValue) {
this.getProjectList(newvalue)
}
}
}
......
......@@ -2,7 +2,7 @@
* @Author: zhangtianfeng 3232807530@qq.com
* @Date: 2024-08-29 11:42:37
* @LastEditors: zhangtianfeng 3232807530@qq.com
* @LastEditTime: 2024-10-18 09:55:50
* @LastEditTime: 2024-10-18 16:36:59
-->
<template>
<div>
......
<template>
<div class="task-detail-basicInfo-com">
<div class="sub-title">任务信息</div>
<div class="sub-title">任务信息3333</div>
<dee-readable-form
:form-data="basicInfo"
/>
......@@ -40,6 +40,7 @@ export default {
},
methods: {
initData(businessObject, basicInfo) {
console.log('basicInfo', basicInfo)
this.basicInfo = [
{ label: '任务对象:',
value: basicInfo.bizExtInfo && basicInfo.bizExtInfo.taskTitle ? basicInfo.bizExtInfo.taskTitle : '',
......
......@@ -686,6 +686,7 @@ export default {
// 任务详情插入流程信息变量
basicInfo.processInstVO = this.processInstVO
this.$set(this.basicData, 'basicInfo', basicInfo)
console.log('this.basicData', this.basicData.basicInfo)
this.$set(this.basicData, 'businessObject', businessObject)
if (businessObject) {
this.$set(this.basicData, 'dxClassname', businessObject.dxClassname)
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
File added
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 to comment