|
|
@@ -32,9 +32,9 @@
|
|
|
|
|
|
<script>
|
|
|
import pick from 'lodash.pick'
|
|
|
- import { putAction } from '@/api/manage'
|
|
|
+ import { putAction,getAction } from '@/api/manage'
|
|
|
|
|
|
- const findList = (params) => putAction('/requiremanager/hwRequirement/applicationSubcontractorList', params)
|
|
|
+ const findList = (params) => getAction('/saasmanager/hwPlatformCompany/allList', params)
|
|
|
|
|
|
export default {
|
|
|
name: 'CompanySubcontractorWindow',
|
|
|
@@ -64,18 +64,17 @@
|
|
|
headers: {},
|
|
|
form: this.$form.createForm(this),
|
|
|
url: {
|
|
|
- list: '/requiremanager/hwRequirement/applicationSubcontractorList',//查询所有服务商
|
|
|
+ list: '/saasmanager/hwPlatformCompany/allList',//查询所有服务商
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- add(checkedDepartKeys) {
|
|
|
- this.checkedKeys = checkedDepartKeys;
|
|
|
- this.edit()
|
|
|
+ add(companyId) {
|
|
|
+ this.edit(companyId)
|
|
|
},
|
|
|
- edit() {
|
|
|
+ edit(companyId) {
|
|
|
this.departList = []
|
|
|
- this.querySubcontratorList()
|
|
|
+ this.querySubcontratorList(companyId)
|
|
|
this.form.resetFields()
|
|
|
this.visible = true
|
|
|
},
|
|
|
@@ -118,9 +117,10 @@
|
|
|
for (let i = 0; i < checkedNodes.length; i++) {
|
|
|
let de = checkedNodes[i].data.props
|
|
|
let depart = { key: '', value: '',title:""}
|
|
|
- depart.key = de.id
|
|
|
- depart.value = de.id
|
|
|
- depart.title = de.name;
|
|
|
+ depart.key = de.subcontractorId
|
|
|
+ depart.value = de.subcontractorId
|
|
|
+ depart.title = de.subcontractorName;
|
|
|
+ depart.balance = de.balance;
|
|
|
depart.cpType = de.cpType;
|
|
|
this.departList[0] = depart
|
|
|
}
|
|
|
@@ -130,9 +130,10 @@
|
|
|
for (let i = 0; i < checkedNodes.length; i++) {
|
|
|
let de = checkedNodes[i].data.props
|
|
|
let depart = { key: '', value: '',title:""}
|
|
|
- depart.key = de.id
|
|
|
- depart.value = de.id
|
|
|
- depart.title = de.name;
|
|
|
+ depart.key = de.subcontractorId
|
|
|
+ depart.value = de.subcontractorId
|
|
|
+ depart.title = de.subcontractorName;
|
|
|
+ depart.balance = de.balance;
|
|
|
depart.cpType = de.cpType;
|
|
|
this.departList.push(depart)
|
|
|
}
|
|
|
@@ -140,11 +141,12 @@
|
|
|
console.log('onCheck', checkedKeys, info)
|
|
|
},
|
|
|
//查询所有服务商列表
|
|
|
- querySubcontratorList() {
|
|
|
- findList({}).then((res) => {
|
|
|
+ querySubcontratorList(companyId) {
|
|
|
+ findList({companyId: companyId}).then((res) => {
|
|
|
if (res.success) {
|
|
|
for(let i = 0;i<res.result.length;i++){
|
|
|
- res.result[i].title = res.result[i].name;
|
|
|
+ console.log(3333,res.result)
|
|
|
+ res.result[i].title = res.result[i].subcontractorName;
|
|
|
}
|
|
|
this.departTree = res.result
|
|
|
}
|