|
@@ -313,8 +313,18 @@
|
|
|
title="复制节点" @close="copyNodeModal = false">
|
|
|
|
|
|
<div class="header-new-switch">
|
|
|
- <HcNewSwitch :datas="authBtnTabdata" :keys="classifyType" :round="false" size="default"
|
|
|
- @change="classifyTypeTabClick"/>
|
|
|
+ <el-form ref="formCopyNodeModelRef" :model="formCopyNodeModel"
|
|
|
+ :rules="formCopyNodeModelRules" label-width="auto" size="large">
|
|
|
+ <el-form-item label="所属方" prop="classify" style="margin-bottom: 0;">
|
|
|
+ <!-- <el-input v-model="formCopyNodeModel.classify" placeholder="请输入节点名称"/> -->
|
|
|
+ <el-checkbox-group v-model="classifyList">
|
|
|
+ <el-checkbox label="施工"/>
|
|
|
+ <el-checkbox label="监理"/>
|
|
|
+ </el-checkbox-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <!--HcNewSwitch :datas="authBtnTabdata" :keys="classifyType" :round="false" size="default"
|
|
|
+ @change="classifyTypeTabClick"/-->
|
|
|
</div>
|
|
|
<div v-if="copyNodeTabKey === '1'" class="copy-node-form-box">
|
|
|
<el-form ref="formCopyNodeModelRef" :model="formCopyNodeModel"
|
|
@@ -1304,28 +1314,32 @@ const copyNodeClick = async () => {
|
|
|
})
|
|
|
classify = arr.join(',')
|
|
|
}
|
|
|
-
|
|
|
- //效验数据
|
|
|
- if (type === '1') {
|
|
|
- const validate = await formValidate(formCopyNodeModelRef.value)
|
|
|
- if (validate) await copyContractTreeNode(type, form, [])
|
|
|
- } else if (type === '2') {
|
|
|
- if (table.length > 0) {
|
|
|
- const validate = await formValidate(copyNodeTableRef.value)
|
|
|
- if (validate) await copyContractTreeNode(type, form, table)
|
|
|
- } else {
|
|
|
- window?.$message?.warning('请先在左侧选择要复制到的节点')
|
|
|
- }
|
|
|
- } else if (type === '3') {
|
|
|
- if (table.length > 0 && classify.length > 0) {
|
|
|
- await copyContractNodeSubmitBusinessData(form, table, classify)
|
|
|
- } else {
|
|
|
- window?.$message?.warning('请先在左侧选择要复制的节点或选择所属方')
|
|
|
+ if (classify) {
|
|
|
+ //效验数据
|
|
|
+ if (type === '1') {
|
|
|
+ const validate = await formValidate(formCopyNodeModelRef.value)
|
|
|
+ if (validate) await copyContractTreeNode(type, form, [], classify)
|
|
|
+ } else if (type === '2') {
|
|
|
+ if (table.length > 0) {
|
|
|
+ const validate = await formValidate(copyNodeTableRef.value)
|
|
|
+ if (validate) await copyContractTreeNode(type, form, table, classify)
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('请先在左侧选择要复制到的节点')
|
|
|
+ }
|
|
|
}
|
|
|
+ /* else if (type === '3') {
|
|
|
+ if (table.length > 0 && classify.length > 0) {
|
|
|
+ await copyContractNodeSubmitBusinessData(form, table, classify)
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('请先在左侧选择要复制的节点或选择所属方')
|
|
|
+ }
|
|
|
+ }*/
|
|
|
+ } else {
|
|
|
+ window?.$message?.warning('请先选择所属方')
|
|
|
}
|
|
|
}
|
|
|
//单个复制、多份复制请求
|
|
|
-const copyContractTreeNode = async (type, form, table) => {
|
|
|
+const copyContractTreeNode = async (type, form, table, classify) => {
|
|
|
copyNodeLoading.value = true
|
|
|
if (type === '1') {
|
|
|
const {error, code} = await wbsApi.copyContractTreeNode({
|
|
@@ -1335,7 +1349,7 @@ const copyContractTreeNode = async (type, form, table) => {
|
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
|
parentPrimaryKeyId: form?.parent?.primaryKeyId || '',
|
|
|
copyBatchToPaths: table,
|
|
|
- classifyType: classifyType.value
|
|
|
+ classifyType: classify
|
|
|
})
|
|
|
//判断状态
|
|
|
copyNodeLoading.value = false
|
|
@@ -1351,7 +1365,7 @@ const copyContractTreeNode = async (type, form, table) => {
|
|
|
needCopyPrimaryKeyId: form?.primaryKeyId || '',
|
|
|
parentPrimaryKeyId: form?.parent?.primaryKeyId || '',
|
|
|
copyBatchToPaths: table,
|
|
|
- classifyType: classifyType.value
|
|
|
+ classifyType: classify
|
|
|
})
|
|
|
//判断状态
|
|
|
copyNodeLoading.value = false
|