|
|
|
@ -1,7 +1,14 @@ |
|
|
|
<script> |
|
|
|
import QuoteSearch from "./primary/quoteSearch.vue"; |
|
|
|
import QuoteTable from "./primary/quoteTable.vue"; |
|
|
|
import {queryQuotePage, queryQuoteRoleUser, removeQuote, saveQuote, updateQuote} from "../../../api/quote/quote"; |
|
|
|
import { |
|
|
|
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"; |
|
|
|
@ -393,6 +400,8 @@ export default { |
|
|
|
userDataList:[], |
|
|
|
tagNo:undefined, |
|
|
|
insideInquiryVisible:false, |
|
|
|
|
|
|
|
detailFlag:false, |
|
|
|
} |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
@ -536,7 +545,7 @@ export default { |
|
|
|
this.projectVisible = false |
|
|
|
}, |
|
|
|
handleRemove(row){ |
|
|
|
this.$alert('确认删除该报价信息吗?', '提示', { |
|
|
|
this.$confirm('确认删除该报价信息吗?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
@ -546,6 +555,34 @@ export default { |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
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(); |
|
|
|
}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, |
|
|
|
@ -733,6 +770,11 @@ export default { |
|
|
|
'saveQuote.projectNo'(newVal, oldVal){ |
|
|
|
// this.saveQuote.projectNo = newVal.toUpperCase() |
|
|
|
}, |
|
|
|
saveVisible(newVal, oldVal){ |
|
|
|
if (newVal === false){ |
|
|
|
this.detailFlag = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
activated() { |
|
|
|
if (this.$route.params.ids){ |
|
|
|
@ -745,9 +787,17 @@ export default { |
|
|
|
<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" |
|
|
|
:data-list="dataList" :height="'35vh'"> |
|
|
|
<quote-table v-loading="searchLoading" |
|
|
|
:current-row="currentQuote" |
|
|
|
:columns="columns" |
|
|
|
style="margin-top: 5px" |
|
|
|
@save="handleSave" |
|
|
|
@remove="handleRemove" |
|
|
|
@rowClick="handleRowClick" |
|
|
|
@updateStatus="handleUpdateStatus" |
|
|
|
@queryById="handleQueryById" |
|
|
|
:data-list="dataList" |
|
|
|
:height="'35vh'"> |
|
|
|
|
|
|
|
</quote-table> |
|
|
|
<el-pagination @size-change="handleSizeChange" |
|
|
|
@ -776,7 +826,7 @@ export default { |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户询价单号" prop="customerInquiryNo" :show-message="false"> |
|
|
|
<el-input v-model="saveQuote.customerInquiryNo"></el-input> |
|
|
|
<el-input v-model="saveQuote.customerInquiryNo" :disabled="detailFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
@ -817,44 +867,44 @@ export default { |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="币种" prop="currency" :show-message="false"> |
|
|
|
<span slot="label"> |
|
|
|
<span slot="label" v-if="!detailFlag"> |
|
|
|
<a @click="getBaseList(512)">币种</a> |
|
|
|
</span> |
|
|
|
<el-input v-model="saveQuote.currency"></el-input> |
|
|
|
<el-input v-model="saveQuote.currency" :disabled="detailFlag"></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%" v-model="saveQuote.quoteDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker> |
|
|
|
<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"> |
|
|
|
<span slot="label" v-if="!detailFlag"> |
|
|
|
<a @click="handleQuoterClick" >报价专员</a> |
|
|
|
</span> |
|
|
|
<el-input v-model="saveQuote.quoter"></el-input> |
|
|
|
<el-input v-model="saveQuote.quoter" :disabled="detailFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="采购专员" prop="purchase" :show-message="false"> |
|
|
|
<span slot="label"> |
|
|
|
<span slot="label" v-if="!detailFlag"> |
|
|
|
<a @click="handlePurchaseClick" >采购专员</a> |
|
|
|
</span> |
|
|
|
<el-input v-model="saveQuote.purchase"></el-input> |
|
|
|
<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" :rows="3" type="textarea"></el-input> |
|
|
|
<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" @click="handleSaveOrUpdateQuote">确 定</el-button> |
|
|
|
<el-button type="primary" v-if="!detailFlag" @click="handleSaveOrUpdateQuote">确 定</el-button> |
|
|
|
<el-button @click="saveVisible = false">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|