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