Browse Source

20240823 报价工艺

java8
qiezi 1 year ago
parent
commit
170784fb41
  1. 10
      src/api/quote/quoteDetailRouting.js
  2. 188
      src/views/modules/quote/detail/primary/quoteDetailRouting.vue
  3. 54
      src/views/modules/quote/index.vue
  4. 61
      src/views/modules/quote/quotes.vue

10
src/api/quote/quoteDetailRouting.js

@ -0,0 +1,10 @@
import {createAPI} from "../../utils/httpRequest";
export const queryQuoteDetailRouting = (data) => createAPI(`/quote/detail/routing`,'post',data)
export const queryQuoteDetailRoutingVersion = (data) => createAPI(`/quote/detail/routing/version`,'post',data)
export const queryQuoteDetailRoutingAlternative = (data) => createAPI(`/quote/detail/routing/alternative`,'post',data)
export const changeQuoteDetailRoutingChange = (data) => createAPI(`/quote/detail/routing/change`,'post',data)

188
src/views/modules/quote/detail/primary/quoteDetailRouting.vue

@ -1,5 +1,10 @@
<script> <script>
import {queryQuoteDetailBomTree} from "@/api/quote/quoteDetailBomTree"; import {queryQuoteDetailBomTree} from "@/api/quote/quoteDetailBomTree";
import {
queryQuoteDetailRouting,
queryQuoteDetailRoutingAlternative, changeQuoteDetailRoutingChange,
queryQuoteDetailRoutingVersion
} from "@/api/quote/quoteDetailRouting";
export default { export default {
name: "quoteDetailRouting", name: "quoteDetailRouting",
@ -15,8 +20,9 @@ export default {
}, },
data(){ data(){
return{ return{
isAllBom:false,
isAllRouting:false,
dataList:[], dataList:[],
queryLoading:false,
treeData:[], treeData:[],
columns: [ columns: [
{ {
@ -93,7 +99,7 @@ export default {
serialNumber: '5011Table5Version', serialNumber: '5011Table5Version',
tableId: "5011Table5", tableId: "5011Table5",
tableName: "报价工艺信息", tableName: "报价工艺信息",
columnProp: 'version',
columnProp: 'routingRevision',
headerAlign: "center", headerAlign: "center",
align: "center", align: "center",
columnLabel: '版本', columnLabel: '版本',
@ -121,23 +127,6 @@ export default {
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100, columnWidth: 100,
},{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table5AlternativeDesc',
tableId: "5011Table5",
tableName: "报价工艺信息",
columnProp: 'alternativeDesc',
headerAlign: "center",
align: "left",
columnLabel: '替代描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120,
},{ },{
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 5011, functionId: 5011,
@ -470,6 +459,12 @@ export default {
}, },
}, },
queryTreeLoading:false, queryTreeLoading:false,
versionVisible:false,
versionList:[],
alternativeList:[],
routing:{
}
} }
}, },
methods:{ methods:{
@ -484,7 +479,7 @@ export default {
if (this.treeData.length > 0){ if (this.treeData.length > 0){
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.tree.setCurrentKey(this.treeData[0].id); this.$refs.tree.setCurrentKey(this.treeData[0].id);
this.handleQueryDetailRouting();
}) })
} }
this.queryTreeLoading = false; this.queryTreeLoading = false;
@ -497,8 +492,125 @@ export default {
}) })
}, },
nodeClick(data){ nodeClick(data){
this.handleQueryDetailRouting();
}, },
handleQueryDetailRouting(){
let node = this.$refs.tree.getCurrentNode();
let params = {
treeId:node.id,
quoteDetailId: this.quoteDetail.id,
isAllRouting: this.isAllRouting,
}
this.queryLoading = true;
queryQuoteDetailRouting(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows;
}else {
this.$message.warning(data.msg);
}
this.queryLoading = false;
}).catch((error)=>{
this.$message.error(error);
this.queryLoading = false;
})
},
handleChangeVersion(){
let node = this.$refs.tree.getCurrentNode();
let row = {
routingRevision:null,
alternativeNo: '',
routingType: null,
}
if (this.dataList.length > 0){
row = this.dataList[0];
}
this.routing = {
partNo: node.partNo,
buNo: node.buNo,
site: node.site,
routingType: row.routingType,
routingRevision: row.routingRevision,
alternativeNo: row.alternativeNo,
}
this.handleQueryVersionList();
this.versionVisible = true;
},
versionRowStyle({row}){
if (row.routingRevision === this.routing.routingRevision){
return { 'background-color': '#E8F7F6' };
}
},
handleQueryVersionList(){
let node = this.$refs.tree.getCurrentNode();
let params = {
treeId: node.id,
routingType: this.routing.routingType,
}
queryQuoteDetailRoutingVersion(params).then(({data})=>{
if (data && data.code === 0){
this.versionList = data.rows;
if (this.versionList.length > 0){
this.handleQueryAlternativeList();
}
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleQueryAlternativeList(){
let params = {
...this.routing,
}
queryQuoteDetailRoutingAlternative(params).then(({data})=>{
if (data && data.code === 0){
this.alternativeList = data.rows;
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
},
versionRowClick(row){
this.routing.routingRevision = row.routingRevision;
},
alternativeRowStyle({row}){
if (this.dataList.length > 0){
if (this.dataList[0].alternativeNo === row.alternativeNo && this.dataList[0].routingRevision === row.routingRevision){
return { 'background-color': '#E8F7F6' };
}
}
},
changeRouting(row){
let params = {
quoteId: this.quoteDetail.quoteId,
quoteDetailId: this.quoteDetail.id,
quoteDetailItemNo:this.quoteDetail.itemNo,
site: row.site,
partNo: row.partNo,
buNo: row.buNo,
quoteNo: this.quoteDetail.quoteNo,
routingType: row.routingType,
routingRevision: row.routingRevision,
alternativeNo: row.alternativeNo,
treeId: this.$refs.tree.getCurrentNode().id,
createBy: this.$store.state.user.name,
}
changeQuoteDetailRoutingChange(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.versionVisible = false;
this.handleQueryDetailRouting();
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error)
})
}
}, },
created() { created() {
if (this.quoteDetail && this.quoteDetail.id){ if (this.quoteDetail && this.quoteDetail.id){
@ -509,6 +621,12 @@ export default {
'quoteDetail.id'(newVal,oldVal){ 'quoteDetail.id'(newVal,oldVal){
this.handleQueryQuoteDetailBomTree(); this.handleQueryQuoteDetailBomTree();
}, },
isAllRouting(newVal,oldVal){
this.handleQueryDetailRouting();
},
'routing.routingRevision'(newVal,oldVal){
this.handleQueryAlternativeList();
}
} }
} }
</script> </script>
@ -516,8 +634,8 @@ export default {
<template> <template>
<div> <div>
<div style="margin-bottom: 10px"> <div style="margin-bottom: 10px">
<el-link style="margin-right: 20px">切换版本</el-link>
<el-checkbox v-model="isAllBom">全级Routing结构</el-checkbox>
<el-link style="margin-right: 20px;cursor:pointer;" @click="handleChangeVersion">切换版本</el-link>
<el-checkbox v-model="isAllRouting">全级Routing结构</el-checkbox>
</div> </div>
<el-container> <el-container>
<el-aside width="300px" v-loading="queryTreeLoading"> <el-aside width="300px" v-loading="queryTreeLoading">
@ -533,7 +651,7 @@ export default {
</el-tree> </el-tree>
</el-aside> </el-aside>
<el-main style="padding: 0"> <el-main style="padding: 0">
<el-table :data="dataList" border style="width: 100%" :height="420">
<el-table :data="dataList" v-loading="queryLoading" border style="width: 100%" :height="420">
<el-table-column <el-table-column
v-for="(item,index) in columns" :key="index" v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"
@ -552,6 +670,28 @@ export default {
</el-table> </el-table>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog title="切换版本" :visible.sync="versionVisible" width="1000px" v-drag :close-on-click-modal="false" append-to-body>
<el-table :data="versionList" :row-style="versionRowStyle" ref="routingVersionTable" style="margin-top: 8px" border :height="240" @row-click="versionRowClick">
<el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/>
<el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/>
<el-table-column label="版本" prop="routingRevision" header-align="center" align="center" show-overflow-tooltip min-width="60"/>
<el-table-column label="类型" prop="routingType" header-align="center" align="center" show-overflow-tooltip min-width="100"/>
</el-table>
<el-table :data="alternativeList" :row-style="alternativeRowStyle" ref="routingAlternativeTable" border :height="240" style="margin-top: 8px">
<el-table-column label="物料编码" prop="partNo" header-align="center" align="center" show-overflow-tooltip min-width="140"/>
<el-table-column label="物料描述" prop="partDesc" header-align="center" align="left" show-overflow-tooltip min-width="200"/>
<el-table-column label="版本" prop="routingRevision" header-align="center" align="center" show-overflow-tooltip min-width="60"/>
<el-table-column label="替代编码" prop="alternativeNo" header-align="center" align="left" show-overflow-tooltip min-width="60"/>
<el-table-column label="类型" prop="routingRevision" header-align="center" align="center" show-overflow-tooltip min-width="100"/>
<el-table-column label="操作" min-width="80" header-align="center" align="center">
<template slot-scope="{row,$index}">
<a @click="changeRouting(row)">选择</a>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div> </div>
</template> </template>

54
src/views/modules/quote/index.vue

@ -10,10 +10,11 @@ import {queryCustomerList} from "../../../api/customer/customer";
import {queryProjectList} from "../../../api/project/project"; import {queryProjectList} from "../../../api/project/project";
import QuoteDetail from "./detail/quoteDetail.vue"; import QuoteDetail from "./detail/quoteDetail.vue";
import ChooseListEam from "../common/Chooselist_eam.vue"; import ChooseListEam from "../common/Chooselist_eam.vue";
import Quotes from "./quotes.vue";
export default { export default {
name: "quote", name: "quote",
components: {ChooseListEam,QuoteDetail, ProjectTable, BuSelect, CustomerTable, QuoteTable, QuoteSearch},
components: {Quotes, ChooseListEam,QuoteDetail, ProjectTable, BuSelect, CustomerTable, QuoteTable, QuoteSearch},
menuId:5011, menuId:5011,
data(){ data(){
return{ return{
@ -409,6 +410,7 @@ export default {
}, },
userDataList:[], userDataList:[],
tagNo:undefined, tagNo:undefined,
insideInquiryVisible:false,
} }
}, },
methods:{ methods:{
@ -552,7 +554,6 @@ export default {
this.projectVisible = false this.projectVisible = false
}, },
handleRemove(row){ handleRemove(row){
console.log(row)
this.$alert('确认删除该报价信息吗?', '提示', { this.$alert('确认删除该报价信息吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@ -684,6 +685,43 @@ export default {
if (this.tagNo === 512){ if (this.tagNo === 512){
this.saveQuote.currency = val.Currency 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
} }
}, },
created() { created() {
@ -710,6 +748,11 @@ export default {
'saveQuote.projectNo'(newVal, oldVal){ 'saveQuote.projectNo'(newVal, oldVal){
// this.saveQuote.projectNo = newVal.toUpperCase() // this.saveQuote.projectNo = newVal.toUpperCase()
}, },
},
activated() {
if (this.$route.params.ids){
this.handleQueryByIds();
}
} }
} }
</script> </script>
@ -753,6 +796,9 @@ export default {
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="内部询价单号" prop="insideInquiryNo" :show-message="false"> <el-form-item label="内部询价单号" prop="insideInquiryNo" :show-message="false">
<span slot="label">
<a @click="insideInquiryVisible = true">内部询价单号</a>
</span>
<el-input v-model="saveQuote.insideInquiryNo"></el-input> <el-input v-model="saveQuote.insideInquiryNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -887,6 +933,10 @@ export default {
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </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> <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> <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> <choose-list-eam ref="baseList" @getBaseData="getBaseData"></choose-list-eam>

61
src/views/modules/quote/quotes.vue

@ -1,11 +1,25 @@
<script> <script>
import DictDataSelect from "../sys/dict-data-select.vue"; import DictDataSelect from "../sys/dict-data-select.vue";
import {queryQuotationInformationByPage} from "@/api/quote/quotationInformation"; import {queryQuotationInformationByPage} from "@/api/quote/quotationInformation";
import {batchSaveQuote} from "../../../api/quote/quote";
import {batchSaveQuote} from "@/api/quote/quote";
export default { export default {
name: "quotes", name: "quotes",
components: {DictDataSelect}, components: {DictDataSelect},
props:{
isComponent:{
type: Boolean,
default: false
},
height:{
type:[String,Number],
default: '76vh'
},
queryStatus:{
type:String,
default: '下达'
},
},
data(){ data(){
return{ return{
no:1, no:1,
@ -24,7 +38,7 @@ export default {
projectDesc:'', projectDesc:'',
quoterName:'', quoterName:'',
priorityLevel:'', priorityLevel:'',
quotationStatus:'下达',
quotationStatus:'',
}, },
dataList:[], dataList:[],
queryLoading:false, queryLoading:false,
@ -377,6 +391,7 @@ export default {
handleQuery(){ handleQuery(){
let params = { let params = {
...this.queryForm, ...this.queryForm,
quotationStatus:this.queryStatus,
no: this.no, no: this.no,
size: this.size, size: this.size,
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
@ -422,20 +437,33 @@ export default {
batchSaveQuote(params).then(({data})=>{ batchSaveQuote(params).then(({data})=>{
if (data && data.code === 0){ if (data && data.code === 0){
this.$message.success(data.msg); this.$message.success(data.msg);
this.handleQuery();
this.$router.push({
name:'quote-index',
params:{
ids:data.rows
}
})
}else { }else {
this.$message.warning(data.msg); this.$message.warning(data.msg);
} }
}).catch((error)=>{ }).catch((error)=>{
this.$message.error(error); this.$message.error(error);
}) })
},
handleDblClick(row){
this.$emit('dblclick',row)
} }
}, },
created() {
this.handleQuery();
}
} }
</script> </script>
<template> <template>
<div> <div>
<el-form :model="queryForm" label-position="top" label-width="100px" style="width: 1100px">
<el-form :model="queryForm" label-position="top" label-width="100px" style="max-width: 1100px">
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="3"> <el-col :span="3">
<el-form-item label="申请批次号"> <el-form-item label="申请批次号">
@ -443,26 +471,26 @@ export default {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="客户编码">
<el-form-item label="客户编码" v-if="!isComponent">
<el-input v-model="queryForm.customerNo"></el-input> <el-input v-model="queryForm.customerNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="客户名称">
<el-form-item label="客户名称" v-if="!isComponent">
<el-input v-model="queryForm.customerDesc"></el-input> <el-input v-model="queryForm.customerDesc"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="项目料号">
<el-form-item label="项目料号" v-if="!isComponent">
<el-input v-model="queryForm.partNo"></el-input> <el-input v-model="queryForm.partNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="物料描述">
<el-form-item label="物料描述" v-if="!isComponent">
<el-input v-model="queryForm.partDesc"></el-input> <el-input v-model="queryForm.partDesc"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-col :span="6" v-if="!isComponent">
<el-form-item label="要求完成日期"> <el-form-item label="要求完成日期">
<div style="display: flex"> <div style="display: flex">
<el-date-picker style="width: 47%" v-model="queryForm.startDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker> <el-date-picker style="width: 47%" v-model="queryForm.startDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
@ -471,8 +499,11 @@ export default {
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="3" v-if="!isComponent">
<el-form-item label=" ">
</el-form-item>
</el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="批次序号"> <el-form-item label="批次序号">
<el-input-number :controls="false" :min="0" style="width: 100%" v-model="queryForm.quotationItemNo"></el-input-number> <el-input-number :controls="false" :min="0" style="width: 100%" v-model="queryForm.quotationItemNo"></el-input-number>
@ -489,12 +520,12 @@ export default {
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="报价专员">
<el-form-item label="报价专员" v-if="!isComponent">
<el-input v-model="queryForm.quoterName"></el-input> <el-input v-model="queryForm.quoterName"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="优先等级">
<el-form-item label="优先等级" v-if="!isComponent">
<dict-data-select v-model="queryForm.priorityLevel" clearable :use-default-value="false" dict-type="priority_Level"/> <dict-data-select v-model="queryForm.priorityLevel" clearable :use-default-value="false" dict-type="priority_Level"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -510,13 +541,13 @@ export default {
<el-col :span="3"> <el-col :span="3">
<el-form-item label=" "> <el-form-item label=" ">
<el-button type="primary" @click="handleQuery">查询</el-button> <el-button type="primary" @click="handleQuery">查询</el-button>
<el-button type="primary" @click="handleQuote">报价</el-button>
<el-button type="primary" @click="handleQuote" v-if="!isComponent">报价</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-table :data="dataList" border v-loading="queryLoading" height="75vh" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" fixed="left" align="center"></el-table-column>
<el-table :data="dataList" border v-loading="queryLoading" :height="height" @selection-change="handleSelectionChange" @row-dblclick="handleDblClick">
<el-table-column type="selection" width="55" fixed="left" align="center" v-if="!isComponent"></el-table-column>
<el-table-column <el-table-column
v-for="(item,index) in columns" :key="index" v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable" :sortable="item.columnSortable"

Loading…
Cancel
Save