Browse Source

2024-03-27 更新

master
fengyuan_yang 2 years ago
parent
commit
449f4c6fd2
  1. 1
      src/api/project/project.js
  2. 241
      src/views/modules/project/projectInfo/projectInfo.vue

1
src/api/project/project.js

@ -26,6 +26,7 @@ export const deleteProjectFile= data => createAPI(`sys/file/deleteProjectFile`,'
export const uploadProjectFile= data => createAPI(`sys/file/upload`,'post',data)
export const getCustomerContactData = data => createAPI(`/project/getCustomerContactData`,'post',data)
export const getContactChooseData= data => createAPI(`/project/getContactChooseData`,'post',data)
export const getContactChooseData2= data => createAPI(`/project/getContactChooseData2`,'post',data)
export const saveProjectContactList= data => createAPI(`/project/saveProjectContactList`,'post',data)
export const deleteProjectInfo= data => createAPI(`/project/deleteProjectInfo`,'post',data)
export const getProjectInfoPartList= data => createAPI(`/project/getProjectInfoPartList`,'post',data)

241
src/views/modules/project/projectInfo/projectInfo.vue

@ -337,6 +337,105 @@
</div>
</span>
</el-dialog>
<!-- &lt;!&ndash; 客户联系人-> 快速新增 &ndash;&gt;-->
<!-- <el-dialog title="项目联系人" :close-on-click-modal="false" v-drag :visible.sync="contactChooseFlag" width="1000px">-->
<!-- <div style="font-size: 12px">-->
<!-- <el-form :inline="true" label-position="top" :model="contactData">-->
<!-- <el-form-item :label="'联系人编码'">-->
<!-- <el-input v-model="contactData.contactId" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="'联系人名称'">-->
<!-- <el-input v-model="contactData.contactName" clearable style="width: 150px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="' '">-->
<!-- <el-button type="primary" @click="queryCustomerContact()">查询</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </div>-->
<!-- <el-container style="margin-top: 0px;">-->
<!-- <el-main style="width: 350px;padding: 1px">-->
<!-- <span style="font-size: 12px" >可选联系人</span>-->
<!-- <el-table-->
<!-- height="400px"-->
<!-- :data="contactChooseList1"-->
<!-- border-->
<!-- ref="contactTable1"-->
<!-- @row-click="contactClickRow1"-->
<!-- @selection-change="selectionContact1"-->
<!-- highlight-current-row-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="contactId"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- min-width="80"-->
<!-- label="联系人编码">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="contactDesc"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- min-width="200"-->
<!-- label="联系人名称">-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-main>-->
<!-- <el-main style="width: 10px;padding: 1px">-->
<!-- <div style="margin-top: 200px;margin-left: 18px">-->
<!-- <el-button type="primary" @click="addContact()">添加>></el-button>-->
<!-- </div>-->
<!-- <div style="margin-top: 15px;margin-left: 18px">-->
<!-- <el-button type="primary" @click="deleteContact()">删除<<</el-button>-->
<!-- </div>-->
<!-- </el-main>-->
<!-- <el-main style="width: 350px;padding: 1px">-->
<!-- <span style="font-size: 12px" >已有联系人</span>-->
<!-- <el-table-->
<!-- height="400px"-->
<!-- :data="contactChooseList2"-->
<!-- border-->
<!-- ref="contactTable2"-->
<!-- @row-click="contactClickRow2"-->
<!-- @selection-change="selectionContact2"-->
<!-- highlight-current-row-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="50">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="contactId"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- min-width="80"-->
<!-- label="联系人编码">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="contactDesc"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- min-width="200"-->
<!-- label="联系人名称">-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-main>-->
<!-- </el-container>-->
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="contactChooseFlag = false">关闭</el-button>-->
<!-- </el-footer>-->
<!-- </el-dialog>-->
<!-- 上传文件的modal -->
<projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
<add-or-update v-if="addOrUpdateVisible" v-model="addOrUpdate" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
@ -360,6 +459,7 @@
downLoadProjectFile,
getCustomerContactData,
getContactChooseData,
getContactChooseData2,
saveProjectContactList,
deleteProjectInfo,
getProjectUserRole,
@ -1014,17 +1114,22 @@
fixed: false
},
],
contactSelections1: [],
contactSelections2: [],
contactData: {
site: this.$store.state.user.site,
contactId: '',
contactName: '',
},
}
},
watch: {
// columnList1: {
// deep: true,
// handler: function (newV, oldV) {
// debugger
//
// }
// }
contactData: {
deep: true,
handler: function (newV, oldV) {
this.contactData.contactId = this.contactData.contactId.toUpperCase()
}
},
},
mounted() {
this.$nextTick(() => {
@ -1493,6 +1598,126 @@
});
this.contactChooseFlag=true;
},
// contactChooseModal () {
// if (this.currentRow == null || this.currentRow === '') {
// this.$alert('', '', {
// confirmButtonText: ''
// })
// return false
// }
// let inData = {
// site: this.currentRow.site,
// customerId: this.currentRow.customerId,
// projectId: this.currentRow.projectId
// }
// this.contactSelections1 = null
// this.contactSelections2 = null
// this.contactData.contactId = ''
// this.contactData.contactName = ''
// getContactChooseData2(inData).then(({data}) => {
// //
// if (data && data.code === 0) {
// this.contactChooseList1 = data.rows1
// this.contactChooseList2 = data.rows2
// }
// })
// this.contactChooseFlag = true
// },
// //
// queryCustomerContact () {
// queryCustomerContact(this.contactData).then(({data}) => {
// if (data && data.code === 0) {
// this.contactChooseList1 = data.rows
// } else {
// this.contactChooseList1 = []
// }
// })
// },
// //
// contactClickRow1 (row) {
// this.$refs.contactTable1.toggleRowSelection(row)
// },
//
// //
// contactClickRow2 (row) {
// this.$refs.contactTable2.toggleRowSelection(row)
// },
//
// selectionContact1 (val) {
// this.contactSelections1 = val
// },
//
// selectionContact2 (val) {
// this.contactSelections2 = val
// },
// //
// addContact () {
// if (this.contactSelections1 == null || this.contactSelections1.length === 0) {
// this.$message.warning('')
// return
// }
// let inData = {
// site: this.currentRow.site,
// customerId: this.currentRow.customerId,
// projectId: this.currentRow.projectId,
// contactList: this.contactSelections1
// }
// addContact(inData).then(({data}) => {
// if (data && data.code === 0) {
// getContactChooseData(inData).then(({data}) => {
// //
// if (data && data.code === 0) {
// this.contactChooseList1 = data.rows1
// this.contactChooseList2 = data.rows2
// }
// })
// this.getCustomerContactData()
// this.contactSelections1 = []
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// },
// //
// deleteContact () {
// if (this.contactSelections2 == null || this.contactSelections2.length === 0) {
// this.$alert("", '', {
// confirmButtonText: ''
// })
// return false
// }
// let inData = {
// site: this.currentRow.site,
// customerId: this.currentRow.customerId,
// projectId: this.currentRow.projectId,
// contactList: this.contactSelections2
// }
// deleteContact(inData).then(({data}) => {
// if (data && data.code === 0) {
// getContactChooseData(inData).then(({data}) => {
// //
// if (data && data.code === 0) {
// this.contactChooseList1 = data.rows1
// this.contactChooseList2 = data.rows2
// }
// })
// this.getCustomerContactData()
// this.contactSelections2 = []
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// },
saveProjectContactList(){
let data={
site:this.currentRow.site,

Loading…
Cancel
Save