68 lines
2.0 KiB
Vue
68 lines
2.0 KiB
Vue
<template>
|
|
<div>
|
|
<p>公司选择:</p>
|
|
<el-select v-model="selectedList" placeholder="点击选择报价公司" style="margin-top: 1rem; width: 90%" multiple clearable filterable>
|
|
<el-option
|
|
v-for="(item, index) in companyList"
|
|
:key="item.value"
|
|
:label="item.nickname"
|
|
:value="item._id">
|
|
</el-option>
|
|
</el-select>
|
|
<p style="margin-top: 2rem;">产品描述:</p>
|
|
<el-input type="textarea" v-model="desc" placeholder="请输入" style="margin-top: 1rem; width: 90%"></el-input>
|
|
<div style="margin-top: 2rem; text-align: center">
|
|
<el-button plain @click.native="cancel">取消</el-button>
|
|
<el-button type="primary" :disabled="selectedList.length === 0" @click.native="confirm">确定</el-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "SetEnquiry",
|
|
props: {
|
|
info: {
|
|
type: Object
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
selectedList: [],
|
|
companyList: [],
|
|
desc: ''
|
|
}
|
|
},
|
|
methods: {
|
|
async getCompanyList() {
|
|
const {rows} = await vk.callFunction({
|
|
url: 'admin/system/user/sys/getList',
|
|
data: {type: 2, pageSize: 500}
|
|
// data: {pageSize: 500}
|
|
})
|
|
// this.companyList = rows.filter(item => item.company && item.company.companyName !== '' && item.company.companyName)
|
|
this.companyList = rows
|
|
},
|
|
cancel(){
|
|
this.$emit('cancel')
|
|
},
|
|
async confirm(){
|
|
await vk.callFunction({
|
|
url: 'admin/selfProduct/quote/sys/setCompany',
|
|
data: {
|
|
list: this.selectedList,
|
|
quoteId: this.info._id,
|
|
desc: this.desc,
|
|
|
|
}
|
|
})
|
|
|
|
this.cancel()
|
|
}
|
|
},
|
|
mounted() {
|
|
this.desc = this.info.desc
|
|
this.getCompanyList()
|
|
}
|
|
}
|
|
</script> |