You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1023 lines
32 KiB

<script>
import QuoteSearch from "./primary/quoteSearch.vue";
import QuoteTable from "./primary/quoteTable.vue";
import {
againQuote,
queryQuotePage,
queryQuoteRoleUser,
removeQuote,
saveQuote,
updateQuote,
updateQuoteStatus
} from "../../../api/quote/quote";
import {getSiteAndBuByUserName} from "../../../api/eam/eam";
import CustomerTable from "../../../components/selector/table/customerTable.vue";
import BuSelect from "../../../components/selector/select/BuSelect.vue";
import ProjectTable from "../../../components/selector/table/projectTable.vue";
import {queryCustomerList} from "../../../api/customer/customer";
import {queryProjectList} from "../../../api/project/project";
import QuoteDetail from "./detail/quoteDetail.vue";
import ChooseListEam from "../common/Chooselist_eam.vue";
import Quotes from "./quotes.vue";
export default {
name: "quote",
components: {Quotes, ChooseListEam,QuoteDetail, ProjectTable, BuSelect, CustomerTable, QuoteTable, QuoteSearch},
menuId:5011,
data(){
return{
total: 0,
no:1,
size: 20,
quote:{
id: null,
site:"",
quoteNo: "",
customerInquiryNo: "",
insideInquiryNo: "",
buNo: "",
buId: null,
versionNo: "",
status:'',
quoteVersionNo: "",
customerNo: "",
customerDesc: "",
projectNo: "",
projectDesc: "",
currency: "",
quoteDate: "",
quoter: "",
purchase: "",
remark: "",
createBy: "",
createDate: "",
updateBy: "",
updateDate: "",
application: "",
annualDemand: "",
costModel: "UFIDA",
markup:0,
chipPrice:'',
},
quoteForm:{
},
saveQuote:{
},
dataList:[],
columns: [
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1BuDesc',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'buDesc',
headerAlign: 'center',
align: 'center',
columnLabel: 'BU',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1QuoteVersionNo',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'quoteVersionNo',
headerAlign: 'center',
align: 'center',
columnLabel: '报价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 180
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1QuoteDate',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'quoteDate',
headerAlign: 'center',
align: 'center',
columnLabel: '报价日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1CustomerNo',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'customerNo',
headerAlign: 'center',
align: 'center',
columnLabel: '客户编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1CustomerDesc',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'customerDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '客户名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1QuoterName',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'quoterName',
headerAlign: 'center',
align: 'left',
columnLabel: '报价专员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1PurchaseName',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'purchaseName',
headerAlign: 'center',
align: 'left',
columnLabel: '采购专员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1Currency',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'currency',
headerAlign: 'center',
align: 'center',
columnLabel: '货币',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1Status',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'status',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1CustomerInquiryNo',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'customerInquiryNo',
headerAlign: 'center',
align: 'center',
columnLabel: '客户报价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1InsideInquiryNo',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'insideInquiryNo',
headerAlign: 'center',
align: 'center',
columnLabel: '内部询价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1CreateBy',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1CreateDate',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1UpdateBy',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'updateBy',
headerAlign: 'center',
align: 'center',
columnLabel: '更新人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table1UpdateDate',
tableId: '5011Table1',
tableName: '报价信息表',
columnProp: 'updateDate',
headerAlign: 'center',
align: 'center',
columnLabel: '更新时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
],
searchLoading: false,
saveVisible: false,
saveLoading: false,
activeName:'detail',
userBuList: [],
saveRules: {
buId:[{required: true, message: '请选择BU', trigger: ['blur','change']}],
customerNo:[{required: true, message: '请输入客户编码', trigger: ['blur','change']}],
customerDesc:[{required: true, message: '请输入客户名称', trigger: ['blur','change']}],
projectNo:[{required: true, message: '请输入项目编码', trigger: ['blur','change']}],
projectDesc:[{required: true, message: '请输入项目名称', trigger: ['blur','change']}],
currency:[{required: true, message: '请输入币种', trigger: ['blur','change']}],
quoteDate:[{required: true, message: '请选择报价日期', trigger: ['blur','change']}],
quoter:[{required: true, message: '请输入报价专员', trigger: ['blur','change']}],
purchase:[{required: true, message: '请输入询价专员', trigger: ['blur','change']}],
},
customerVisible:false,
projectVisible:false,
quoterVisible:false,
purchaseVisible:false,
currentQuote:{
},
userVisible:false,
userTitle:'人员信息',
user:{
username:'',
userDisplay:'',
active:'',
buId:null,
roleNo:'',
},
userDataList:[],
tagNo:undefined,
insideInquiryVisible:false,
detailFlag:false,
}
},
methods:{
handleSearch(index){
let params = {
...this.quoteForm,
no: this.no,
size: this.size,
}
this.searchLoading = true
queryQuotePage(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows
this.total = data.total
if (index !== undefined){
this.handleSelect(this.dataList[index])
}
}else {
this.$message.error(data.msg)
}
this.searchLoading = false
}).catch(error=>{
this.$message.error(error)
this.searchLoading = false
})
},
handleSelect(row){
if (row){
this.currentQuote = {...row}
}else {
this.currentQuote = {}
}
},
handleSave(row){
this.$nextTick(()=>{
if (this.$refs.saveForm){
this.$refs.saveForm.clearValidate();
}
})
if (row){
this.saveQuote = {
...row
}
}else {
this.saveQuote = {
...this.quote,
}
this.$nextTick(()=>{
this.saveQuote.buId = this.userBuList.length > 0? this.userBuList[0].id:null;
})
}
this.saveVisible = true
},
handleSizeChange(size){
this.size = size
this.handleSearch();
},
handlePageChange(no) {
this.no = no
this.handleSearch();
},
handleQueryBu(){
let params = {
username: this.$store.state.user.name,
}
getSiteAndBuByUserName(params).then(({data}) => {
if (data && data.code === 0) {
this.userBuList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
handleSaveOrUpdateQuote(){
this.$refs.saveForm.validate((valid,obj) => {
if (valid){
if (this.saveQuote.id){
this.handleUpdateQuote();
}else {
this.handleSaveQuote();
}
}else {
let i = 1;
for (let key in obj){
this.$message.warning(obj[key][0].message)
if (i === 1){
return
}
i++;
}
}
})
},
handleSaveQuote(){
let params = {
...this.saveQuote,
status: '草稿',
action: 'Y',
createBy: this.$store.state.user.name,
}
this.saveLoading = true
saveQuote(params).then(({data})=>{
if (data && data.code === 0){
this.saveVisible = false
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
this.handleSearch(0);
this.saveLoading = false
}).catch((error)=>{
this.$message.error(error)
this.saveLoading = false
})
},
handleUpdateQuote(){
let params = {
...this.saveQuote,
updateBy: this.$store.state.user.name,
}
this.saveLoading = true
updateQuote(params).then(({data})=>{
if (data && data.code === 0){
this.saveVisible = false
this.currentQuote = {
...this.currentQuote
}
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
this.handleSearch();
this.saveLoading = false
}).catch((error)=>{
this.$message.error(error)
this.saveLoading = false
})
},
customerDblClick(row){
this.saveQuote.customerNo = row.customerNo
this.saveQuote.customerDesc = row.customerDesc
this.customerVisible = false
},
projectDblClick(row){
this.saveQuote.projectNo = row.projectNo
this.saveQuote.projectDesc = row.projectDesc
this.projectVisible = false
},
handleRemove(row){
this.$confirm('确认删除该报价信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRemoveQuote(row)
}).catch(() => {
})
},
handleUpdateStatus(row){
this.$confirm('确定要下达该报价单吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
let params = {
...row,
}
updateQuoteStatus(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.handleSearch();
this.currentQuote = {
...row,
status: '下达',
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
})
},
handleQueryById(row){
this.saveQuote = {
...row
}
this.detailFlag = true;
this.saveVisible = true;
},
handleRemoveQuote(row){
let params = {
id: row.id,
}
removeQuote(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
if (row.id === this.currentQuote.id){
this.handleSearch(0);
}else {
this.handleSearch();
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
customerNoBlur(){
let params = {
customerNo: this.saveQuote.customerNo,
createBy: this.$store.state.user.name,
}
queryCustomerList(params).then(({data}) => {
if (data && data.code === 0) {
if (data.rows.length === 1){
this.saveQuote.customerDesc = data.rows[0].customerDesc
}else {
this.saveQuote.projectNo = ''
this.saveQuote.projectDesc = ''
this.saveQuote.customerDesc = ''
}
}else {
this.$message.warning(data.message)
}
}).catch((error) => {
this.$message.error(error)
})
},
projectNoBlur(){
let params = {
projectNo: this.saveQuote.projectNo,
customerNo: this.saveQuote.customerNo,
createBy: this.$store.state.user.name,
buId: this.saveQuote.buId,
}
queryProjectList(params).then(({data})=>{
if (data && data.code === 0) {
if (data.rows.length === 1) {
this.saveQuote.projectDesc = data.rows[0].projectDesc
}else {
this.saveQuote.projectDesc = ''
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
handleRowClick(row){
this.currentQuote = {...row}
},
userDblClick(row){
if (this.quoterVisible){
this.saveQuote.quoter = row.username
this.quoterVisible = false
}else if (this.purchaseVisible){
this.saveQuote.purchase = row.username
this.purchaseVisible = false
}
this.userVisible = false
},
handleQuoterClick(){
this.userTitle = '报价专员'
this.user.username = this.saveQuote.quoter
this.user.userDisplay = ''
this.user.active = ''
this.user.buId = this.saveQuote.buId
this.user.roleNo = 'QUOTER'
this.quoterVisible = true
this.handleQueryQuoteRoleUser();
this.userVisible = true
},
handlePurchaseClick(){
this.userTitle = '采购专员'
this.user.username = this.saveQuote.purchase
this.user.userDisplay = ''
this.user.active = ''
this.user.buId = this.saveQuote.buId
this.user.roleNo = 'PURCHASE'
this.purchaseVisible = true
this.handleQueryQuoteRoleUser();
this.userVisible = true
},
handleQueryQuoteRoleUser(){
let params = {
...this.user,
}
this.userDataList = []
queryQuoteRoleUser(params).then(({data})=>{
if (data && data.code === 0){
this.userDataList = data.rows
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
},
getBaseList(val){
this.tagNo = val
this.$nextTick(()=>{
let strVal = ''
if (val === 512){
strVal = this.saveQuote.currency;
this.$refs.baseList.init(val,strVal)
}
})
},
getBaseData(val){
if (this.tagNo === 512){
this.saveQuote.currency = val.Currency
}
},
handleQueryByIds(){
let params = {
ids:this.$route.params.ids,
no:this.no,
size:this.size,
createBy:this.$store.state.user.name,
}
queryQuotePage(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows
this.total = data.total
if (this.total > 0){
this.currentQuote = {...this.dataList[0]}
}else {
this.currentQuote = {}
}
}else {
this.$message.error(data.msg)
}
this.searchLoading = false
}).catch(error=>{
this.$message.error(error)
this.searchLoading = false
})
},
handleInquiryDblClick(row){
this.saveQuote.insideInquiryNo = row.quotationNo
this.saveQuote.customerNo = row.customerNo
this.saveQuote.customerDesc = row.customerDesc
this.saveQuote.projectNo = row.projectNo
this.saveQuote.projectDesc = row.projectDesc
this.saveQuote.quoter = row.quoter
this.saveQuote.customerInquiryNo = row.customerQuoteNo
this.insideInquiryVisible = false
},
handleInquiryBlur(){
},
handleAgainQuote(row){
let params = {
id: row.id,
createBy: this.$store.state.user.name,
}
this.queryLoading = true
againQuote(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg)
this.handleSearch();
} else {
this.$message.warning(data.msg)
this.queryLoading = false
}
}).catch((error) => {
this.$message.error(error)
this.queryLoading = false
})
},
clearModalData(field){
this.saveQuote[field] = ''
},
},
created() {
this.quoteForm = {
...this.quote,
createBy: this.$store.state.user.name,
}
this.handleQueryBu();// 查询 BU
this.handleSearch(0);// 查询报价信息
},
watch:{
'quoteForm.customerNo'(newVal, oldVal){
this.quoteForm.customerNo = newVal.toUpperCase()
},
'quoteForm.projectNo'(newVal, oldVal){
this.quoteForm.projectNo = newVal.toUpperCase()
},
'quoteForm.quoteNo'(newVal, oldVal){
this.quoteForm.quoteNo = newVal.toUpperCase()
},
'saveQuote.customerNo'(newVal, oldVal){
this.saveQuote.customerNo = newVal.toUpperCase()
},
'saveQuote.projectNo'(newVal, oldVal){
this.saveQuote.projectNo = newVal.toUpperCase()
},
saveVisible(newVal, oldVal){
if (newVal === false){
this.detailFlag = false;
}
},
'saveQuote.currency'(newVal, oldVal){
this.saveQuote.currency = newVal.toUpperCase()
}
},
activated() {
if (this.$route.params.ids){
this.handleQueryByIds();
}
}
}
</script>
<template>
<div>
<quote-search v-model:quote="quoteForm" @search="handleSearch" @save="handleSave"></quote-search>
<quote-table v-loading="searchLoading"
:current-row="currentQuote"
:columns="columns"
style="margin-top: 5px"
@save="handleSave"
@remove="handleRemove"
@rowClick="handleRowClick"
@updateStatus="handleUpdateStatus"
@queryById="handleQueryById"
@againQuote="handleAgainQuote"
:data-list="dataList"
:height="'35vh'">
</quote-table>
<el-pagination @size-change="handleSizeChange"
@current-change="handlePageChange"
:current-page="no"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="size"
:total="total"
layout="total,sizes, prev, pager, next, jumper">
</el-pagination>
<el-tabs v-model="activeName" >
<el-tab-pane label="报价明细" name="detail">
<quote-detail :quote="currentQuote" :auth-flag="false" :height="'33vh'"></quote-detail>
</el-tab-pane>
</el-tabs>
<el-dialog :title="saveQuote.id? '报价信息:'+ saveQuote.quoteVersionNo : '报价信息'" v-drag :close-on-click-modal="false" :visible.sync="saveVisible" width="500px" >
<el-form ref="saveForm" :model="saveQuote" :rules="saveRules" label-position="top" label-width="100px">
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="BU" prop="buId" :show-message="false">
<bu-select v-model="saveQuote.buId" :disabled="saveQuote.id > 0"></bu-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="客户询价单号" prop="customerInquiryNo" :show-message="false">
<el-input v-model="saveQuote.customerInquiryNo" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="内部询价单号" prop="insideInquiryNo" :show-message="false">
<span slot="label" v-if="saveQuote.id <= 0">
<a @click="insideInquiryVisible = true">内部询价单号</a>
</span>
<el-input v-model="saveQuote.insideInquiryNo" @blur="handleInquiryBlur" :disabled="saveQuote.id > 0"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="客户编码" prop="customerNo" :show-message="false">
<span slot="label" v-if="saveQuote.id <= 0">
<a @click="customerVisible = true">客户编码</a>
</span>
<el-input v-model="saveQuote.customerNo" :disabled="saveQuote.id > 0" @blur="customerNoBlur"></el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="客户描述" prop="customerDesc" :show-message="false">
<el-input v-model="saveQuote.customerDesc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="Application" prop="application" :show-message="false">
<el-input v-model="saveQuote.application" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年需求量" prop="annualDemand" :show-message="false">
<el-input v-model="saveQuote.annualDemand" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="Cost Model" prop="costModel" :show-message="false">
<el-select v-model="saveQuote.costModel" :disabled="detailFlag">
<el-option label="2020" value="2020"></el-option>
<el-option label="UFIDA" value="UFIDA"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="Markup" prop="markup" :show-message="false">
<el-input-number style="width: 100%" :controls="false" :step="0" v-model="saveQuote.markup" :disabled="detailFlag"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="芯片价格" prop="chipPrice" :show-message="false">
<el-input v-model="saveQuote.chipPrice" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="币种" :show-message="false">
<span slot="label" v-if="!detailFlag">
<a @click="getBaseList(512)">币种</a>
</span>
<el-input v-model="saveQuote.currency" readonly :disabled="detailFlag">
<span slot="suffix" v-show="saveQuote.currency && !detailFlag" @click="clearModalData('currency')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="报价日期" prop="quoteDate" :show-message="false">
<el-date-picker style="width: 100%" :disabled="detailFlag" v-model="saveQuote.quoteDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="报价专员" prop="quoter" :show-message="false">
<span slot="label" v-if="!detailFlag">
<a @click="handleQuoterClick" >报价专员</a>
</span>
<el-input v-model="saveQuote.quoter" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="采购专员" :show-message="false">
<span slot="label" v-if="!detailFlag">
<a @click="handlePurchaseClick" >采购专员</a>
</span>
<el-input v-model="saveQuote.purchase" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark" class="auto" :show-message="false">
<el-input v-model="saveQuote.remark" :disabled="detailFlag" :rows="3" type="textarea"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="!detailFlag" @click="handleSaveOrUpdateQuote">确 定</el-button>
<el-button @click="saveVisible = false">取 消</el-button>
</div>
</el-dialog>
<el-dialog :title="userTitle" v-drag :visible.sync="userVisible" width="500px" modal-append-to-body :close-on-click-modal="false">
<el-form :model="user" label-position="top">
<el-row :gutter="10">
<el-col :span="6">
<el-form-item label="用户账号" prop="name">
<el-input v-model="user.username"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="用户名" prop="name">
<el-input v-model="user.userDisplay"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否在用">
<el-select filterable v-model="user.active" style="width: 100%">
<el-option label="全部" value=""></el-option>
<el-option label="是" value="1"></el-option>
<el-option label="否" value="0"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label=" " >
<el-button type="primary" @click="handleQueryQuoteRoleUser">查询</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:height="300"
:data="userDataList"
border
@row-dblclick="userDblClick"
style="width: 100%;">
<el-table-column
prop="username"
header-align="center"
align="center"
label="用户账号">
</el-table-column>
<el-table-column
prop="userDisplay"
header-align="center"
align="center"
label="用户名">
</el-table-column>
<el-table-column
prop="status"
header-align="center"
align="center"
label="是否在用">
<template slot-scope="scope">
<span v-if="scope.row.status === 1">是</span>
<span v-if="scope.row.status === 0">否</span>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog title="询价申请" v-drag :visible.sync="insideInquiryVisible" width="1000px" modal-append-to-body :close-on-click-modal="false">
<quotes v-if="insideInquiryVisible" :is-component="true" :height="400" @dblclick="handleInquiryDblClick"></quotes>
</el-dialog>
<customer-table ref="customerTable" v-if="saveVisible" v-model="customerVisible" :height="300" @dblclick="customerDblClick" :customer-no="saveQuote.customerNo"></customer-table>
<project-table ref="projectTable" v-if="saveVisible" v-model="projectVisible" :height="300" @dblclick="projectDblClick" :customer-no="saveQuote.customerNo" :project-no="saveQuote.projectNo" :bu-id="saveQuote.buId"></project-table>
<choose-list-eam ref="baseList" @getBaseData="getBaseData"></choose-list-eam>
</div>
</template>
<style scoped>
.auto /deep/ .el-form-item__content{
height: auto;
line-height: 1.5;
}
.el-table /deep/ .cell{
height: auto;
line-height: 1.5;
}
</style>