Browse Source

Merge remote-tracking branch 'origin/master'

master
DouDou 2 years ago
parent
commit
96c4d892e6
  1. 3
      src/api/quotation/quotationHeader.js
  2. 6
      src/api/quotation/quote.js
  3. 27
      src/views/modules/code/item/itemValue.vue
  4. 28
      src/views/modules/part/bomManagement.vue
  5. 28
      src/views/modules/part/routingManagement.vue
  6. 32
      src/views/modules/project/projectInfo/com_project_info_part.vue
  7. 547
      src/views/modules/project/projectPart/projectPartQuote.vue
  8. 4
      src/views/modules/project/projectPart/searchProjectPart.vue
  9. 18
      src/views/modules/quotation/inquiry/inquiryQuoteDetail.vue
  10. 32
      src/views/modules/quotation/sellForQuotation.vue
  11. 79
      src/views/modules/quotation/sellForQuotation/quoteDetail.vue

3
src/api/quotation/quotationHeader.js

@ -210,3 +210,6 @@ export const saveQuotationPropertiesItemAvailable = (data) => createAPI('/plm/qu
* @returns {*}
*/
export const deleteQuotationPropertiesItemAvailable = (data) => createAPI('/plm/quotationPropertiesItemAvailable/delete','post',data);
export const updateQuoteStatus = (data) => createAPI('/quote/status','post',data);

6
src/api/quotation/quote.js

@ -6,3 +6,9 @@ export const getQuotePage = (data)=>createAPI(`/quote/page/${data.no}/${data.siz
export const queryQuoteByInquiryNo = (data) => createAPI(`/quote/detail`,'post',data)
export const queryQuoteByProjectPartNo = (data) => createAPI(`/quote/detail/part`,'post',data)
export const queryQuoteDetailBom = (data) => createAPI(`/quote/detail/bom`,'post',data)
export const queryQuoteDetailRouting = (data) => createAPI(`/quote/detail/routing`,'post',data)

27
src/views/modules/code/item/itemValue.vue

@ -341,10 +341,14 @@ export default {
searchCodeItemDefsSeq(params).then(({data})=>{
if (data && data.code === 0){
this.itemDefs = data.rows;
if (this.itemDefs.length > 0){
if (this.itemDefs.length > 0 && this.conditionDetailModal.seqNo === undefined){
this.conditionDetailModal.SQLStatementExecuteItem = this.itemDefs[0].itemNo;
this.saveCodeItemValue(this.itemDefs[0]);
}
let params = {
itemNo: this.conditionDetailModal.SQLStatementExecuteItem,
site:this.itemValue.site,
}
this.saveCodeItemValue(params);
}else {
this.$message.warning(data.msg)
}
@ -361,7 +365,7 @@ export default {
if (data && data.code === 0){
this.saveItemValueList = data.rows;
this.$nextTick(()=>{
if (this.saveItemValueList.length > 0){
if (this.saveItemValueList.length > 0 && this.conditionDetailModal.seqNo === undefined){
this.conditionDetailModal.SQLStatementExecuteValueItemNo = this.saveItemValueList[0].valueItemNo;
}
})
@ -383,6 +387,7 @@ export default {
Object.keys(this.conditionDetailModal).forEach(key => {
this.conditionDetailModal[key] = undefined;
});
this.conditionDetailModal.seqNo = undefined;
this.conditionDetailModal.SQLStatementExecuteFlag = 'N';
},
changeItemDef(val){
@ -452,6 +457,7 @@ export default {
},
handleEditConditionDetail(){
this.conditionDetailModal = {...this.conditionDetails[this.selectionDetailIndex]}
this.conditionDetailModal.SQLStatementExecuteItem = parseInt(this.conditionDetailModal.SQLStatementExecuteItem)
this.searchCodeItemDefs();
this.itemDefModalVisible = true
},
@ -688,7 +694,7 @@ export default {
<el-dialog title="条件定义" v-drag :close-on-click-modal="false" :visible.sync="itemDefModalVisible" @close="closeConditionDetail" width="400px" append-to-body>
<el-form ref="formConditionDetail" label-position="top" :rules="detailRules" :model="conditionDetailModal" >
<el-row :gutter="10">
<el-col :span="12">
<el-col :span="10">
<el-form-item label="运算符号:" prop="SQLStatementExecuteCalculate" :show-message="false">
<el-select v-model="conditionDetailModal.SQLStatementExecuteCalculate" style="width: 100%" placeholder="请选择" >
<el-option label="并且" value="1"></el-option>
@ -697,20 +703,23 @@ export default {
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="12">
<el-col :span="14">
<el-form-item label="元素名称:" prop="SQLStatementExecuteItem" :show-message="false">
<el-select v-model="conditionDetailModal.SQLStatementExecuteItem" style="width: 100%" @change="changeItemDef">
<el-option v-for="(o, index) in itemDefs" :key="o.itemNo" :label="`(${o.itemNo})${o.itemDesc}`" :value="o.itemNo"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-row>
<el-row :gutter="10">
<el-col :span="24">
<el-form-item label="元素可选值:" prop="SQLStatementExecuteValueItemNo" :show-message="false">
<el-select v-model="conditionDetailModal.SQLStatementExecuteValueItemNo" style="width: 100%">
<div v-for="(o, index) in saveItemValueList" :key="index">
<el-option :label="`(${o.valueNo})${o.itemValue}`" :value="o.valueItemNo"></el-option>
<el-option :label="`(${o.valueNo})${o.itemValue}`" :value="o.valueItemNo">
<span style="float: left">{{ `(${o.valueNo})${o.itemValue}` }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{o.conditionName}}</span>
</el-option>
</div>
</el-select>
</el-form-item>

28
src/views/modules/part/bomManagement.vue

@ -2366,13 +2366,37 @@ export default {
},
activated() {
if (this.$route.params.partNo) {
if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote'){
this.handleQueryBomByQuote();
}else if (this.$route.params.partNo) {
this.searchData.partNo = this.$route.params.partNo
this.getDataList()
}
this.getDataList()
},
// js
methods: {
// === ===
handleQueryBomByQuote(){
let params = {
site:this.$route.params.site,
partNo:this.$route.params.partNo,
bomType:this.$route.params.bomType,
engChgLevel:this.$route.params.engChgLevel,
page:this.pageIndex,
limit:this.pageSize
}
this.queryLoading = true
bomManagementSearch(params).then(({data})=>{
if (data && data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll( this.dataList.length)
}
this.queryLoading = false
})
},
// ======== ========
/**
* 每页数

28
src/views/modules/part/routingManagement.vue

@ -2281,14 +2281,38 @@ export default {
},
activated() {
if (this.$route.params.partNo) {
if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote'){
this.handleQueryRoutingByQuote();
}else if (this.$route.params.partNo) {
this.searchData.partNo = this.$route.params.partNo
this.getDataList()
}
this.getDataList()
},
// js
methods: {
// === ===
handleQueryRoutingByQuote(){
let params = {
site:this.$route.params.site,
partNo:this.$route.params.partNo,
routingType:this.$route.params.routingType,
engChgLevel:this.$route.params.engChgLevel,
page:this.pageIndex,
limit:this.pageSize
}
this.queryLoading = true
routingManagementSearch(params).then(({data})=>{
if (data && data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll( this.dataList.length)
}
this.queryLoading = false
})
},
// ======== ========
/**
* 每页数

32
src/views/modules/project/projectInfo/com_project_info_part.vue

@ -876,6 +876,38 @@
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table4UnitPrice',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "unitPrice",
headerAlign: "center",
align: "left",
columnLabel: "未税单价",
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002001,
serialNumber: '101002001Table4TaxUnitPrice',
tableId: "101002001Table4",
tableName: "项目物料",
columnProp: "taxUnitPrice",
headerAlign: "center",
align: "left",
columnLabel: "含税单价",
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002001,

547
src/views/modules/project/projectPart/projectPartQuote.vue

@ -0,0 +1,547 @@
<script>
import {queryQuoteByProjectPartNo} from "../../../../api/quotation/quote";
export default {
name: "projectPartQuote",
props:{
part:{
type: Object,
required: true
},
height:{
type: [String,Number],
default: '27vh'
}
},
data(){
return{
dataList:[],
queryLoading:false,
columns:[
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10QuotationNo',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'quotationNo',
headerAlign: 'center',
align: 'left',
columnLabel: '报价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10QuotationDate',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'quotationDate',
headerAlign: 'center',
align: 'center',
columnLabel: '报价日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ProductNo',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'productNo',
headerAlign: 'center',
align: 'left',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ProductDesc',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'productDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10QuotationDetailQuantity',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'quotationDetailQuantity',
headerAlign: 'center',
align: 'right',
columnLabel: '报价数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ComputePartCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'computePartCost',
headerAlign: 'center',
align: 'right',
columnLabel: '计算后材料成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ComputeMachineCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'computeMachineCost',
headerAlign: 'center',
align: 'right',
columnLabel: '计算后机器成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ComputeLabourCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'computeLabourCost',
headerAlign: 'center',
align: 'right',
columnLabel: '计算后人工成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ComputeFabricateCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'computeFabricateCost',
headerAlign: 'center',
align: 'right',
columnLabel: '计算后制造费用',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10ComputeToolCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'computeToolCost',
headerAlign: 'center',
align: 'right',
columnLabel: '计算后工具成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10AdjustPartCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'adjustPartCost',
headerAlign: 'center',
align: 'right',
columnLabel: '调整后材料成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10AdjustMachineCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'adjustMachineCost',
headerAlign: 'center',
align: 'right',
columnLabel: '调整后机器成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10AdjustLabourCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'adjustLabourCost',
headerAlign: 'center',
align: 'right',
columnLabel: '调整后人工成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10AdjustFabricateCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'adjustFabricateCost',
headerAlign: 'center',
align: 'right',
columnLabel: '调整后制造费用',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10AdjustToolCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'adjustToolCost',
headerAlign: 'center',
align: 'right',
columnLabel: '调整后工具成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10DetailOtherCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'detailOtherCost',
headerAlign: 'center',
align: 'right',
columnLabel: '其他成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10DetailManageCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'detailManageCost',
headerAlign: 'center',
align: 'right',
columnLabel: '管理成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10DetailTotalCost',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'detailTotalCost',
headerAlign: 'center',
align: 'right',
columnLabel: '总成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10DetailProfitRate',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'detailProfitRate',
headerAlign: 'center',
align: 'right',
columnLabel: '利润率%',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10DetailProfitAmount',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'detailProfitAmount',
headerAlign: 'center',
align: 'right',
columnLabel: '利润额',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10FinalUntaxedPrice',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'finalUntaxedPrice',
headerAlign: 'center',
align: 'right',
columnLabel: '未税单价',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10TaxRate',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'taxRate',
headerAlign: 'center',
align: 'right',
columnLabel: '税率%',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10FinalTaxedPrice',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'finalTaxedPrice',
headerAlign: 'center',
align: 'right',
columnLabel: '含税单价',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10SystemComputePrice',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'systemComputePrice',
headerAlign: 'center',
align: 'right',
columnLabel: '含税总价',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
userId: this.$store.state.user.name,
functionId: 101002002,
serialNumber: '101002002Table10QuotationDetailStatus',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'quotationDetailStatus',
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: 101002002,
serialNumber: '101002002Table10Remark',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'remark',
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: 101002002,
serialNumber: '101002002Table10InternalInquiryNo',
tableId: '101002002Table10',
tableName: '项目物料',
columnProp: 'internalInquiryNo',
headerAlign: 'center',
align: 'left',
columnLabel: '询价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
],
}
},
methods:{
handleQueryQuote(){
let params = {
site:this.part.site,
projectId:this.part.projectId,
partNo:this.part.testPartNo,
}
this.queryLoading = true
queryQuoteByProjectPartNo(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
})
}
},
watch:{
part(newVal,oldVal){
if (newVal){
this.handleQueryQuote()
}
}
}
}
</script>
<template>
<el-table :data="dataList" style="width: 100%;margin-top: 5px" :height="height" v-loading="queryLoading" border>
<el-table-column
v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed===''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope" >
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</template>
<style scoped>
</style>

4
src/views/modules/project/projectPart/searchProjectPart.vue

@ -150,7 +150,7 @@
<projectQuotation ref="projectQuotation" ></projectQuotation>
</el-tab-pane>
<el-tab-pane label="报价信息" name="quotationHeader">
<project-part-quote :part="currentRow"></project-part-quote>
</el-tab-pane>
<el-tab-pane label="打样信息" name="sample">
<sample ref="sample" ></sample>
@ -181,8 +181,10 @@
import sample from "../projectInfo/com_project_sample";
import test from "../projectInfo/com_project_test";
import quotationHeader from "../projectInfo/com_project_info_quotation";
import ProjectPartQuote from "./projectPartQuote.vue";
export default {
components: {
ProjectPartQuote,
Chooselist,
technicalSpecification,
projectQuotation,

18
src/views/modules/quotation/inquiry/inquiryQuoteDetail.vue

@ -515,13 +515,17 @@ export default {
})
},
handleClickDetail(row){
this.$router.push({
name: 'quotation-sellForQuotation',
params:{
quotationHeaderId:row.quotationHeaderId,
from:'inquiry'
}
})
if (this.$router.resolve('quotation-sellForQuotation').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
} else {
this.$router.push({
name: 'quotation-sellForQuotation',
params:{
quotationHeaderId:row.quotationHeaderId,
from:'inquiry'
}
})
}
}
},
watch:{

32
src/views/modules/quotation/sellForQuotation.vue

@ -110,7 +110,7 @@
width="160">
<template slot-scope="scope">
<el-link style="cursor: pointer" v-if="scope.row.quotationStatus !== '下达'"
@click="editQuotationHeaderStatus(scope.row,'下达')">下达
@click="handleUpdateStatus(scope.row)">下达
</el-link>
<el-link style="cursor: pointer" @click="editQuotationHeader(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" @click="deleteQuotationHeader(scope.row)">删除</el-link>
@ -397,7 +397,7 @@ import {
} from '@/api/quotation/quotationInformation.js';
import QuoteDetail from "./sellForQuotation/quoteDetail.vue";
import {searchProjectInfoList} from "../../../api/quotation/quotationInformation";
import {getQuotationHeaderByPagePost} from "../../../api/quotation/quotationHeader";
import {getQuotationHeaderByPagePost, updateQuoteStatus} from "../../../api/quotation/quotationHeader";
import {getQuotePage} from "../../../api/quotation/quote";
export default {
@ -1165,16 +1165,26 @@ export default {
this.$message.error('查询项目信息失败')
})
},
editQuotationHeaderStatus(row, status) {
let params = JSON.parse(JSON.stringify(row));
params.quotationStatus = status;
saveQuotationHeader(params).then(({data}) => {
//
if (data.code === 200) {
this.initData();
this.restQuoteHeader();
handleUpdateStatus(row) {
this.$confirm(`是否确认下达?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
let params = {
...row,
quotationStatus:'下达'
}
this.$message.success(data.msg);
updateQuoteStatus(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.initData()
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
})
},
restQuoteHeader() {

79
src/views/modules/quotation/sellForQuotation/quoteDetail.vue

@ -13,6 +13,7 @@ import {Decimal} from "decimal.js";
import {searchQuoteBomHeader, searchQuoteBomList} from "../../../../api/quotation/quoteOfBom";
import QuoteRouting from "./quotationDetail/quoteRouting.vue";
import {searchQuoteRoutingHeader} from "../../../../api/quotation/quoteOfRouting";
import {queryQuoteDetailBom, queryQuoteDetailRouting} from "../../../../api/quotation/quote";
export default {
name:'quoteDetail',
@ -1018,12 +1019,79 @@ export default {
},
handleToBom(row){
let params = {
quotationDetailId:row.quotationDetailId
}
queryQuoteDetailBom(params).then(({data})=>{
if (data && data.code === 0){
if (this.$router.resolve('part-bomManagement').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
} else {
let result = {
partNo:'',
site:'',
}
if (!data.row){
result.partNo = row.productNo
result.site = row.site
}else {
result = {
...data.row
}
}
this.$router.push({
name:"part-bomManagement",
params:{
type:"quote",
site:result.site,
partNo: result.partNo,
engChgLevel:result.version,
bomType: result.bomType,
}})
}
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleToRouting(row){
let params = {
quotationDetailId:row.quotationDetailId
}
queryQuoteDetailRouting(params).then(({data})=>{
if (data && data.code === 0){
if (this.$router.resolve('part-routingManagement').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
} else {
let result = {
partNo:'',
site:'',
}
if (!data.row){
result.partNo = row.productNo
result.site = row.site
}else {
result = {
...data.row
}
}
this.$router.push({
name:"part-routingManagement",
params:{
type:"quote",
site:result.site,
partNo: result.partNo,
engChgLevel:result.version,
routingType: result.routingType,
}})
}
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
}
},
}
@ -1045,14 +1113,13 @@ export default {
<el-link style="cursor: pointer" v-if="row.quotationDetailStatus !== '下达'" @click="editQuotationDetailStatus(row,'下达')">下达</el-link>
<el-link style="cursor: pointer" @click="editQuotationDetail(row,$index+1)">编辑</el-link>
<el-link style="cursor: pointer" @click="deleteQuotationDetailData(row)">删除</el-link>
<el-link style="cursor: pointer" @click="deleteQuotationDetailData(row)">删除</el-link>
<el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px">
更多
</el-link >
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="handleToBom">BOM</el-dropdown-item>
<el-dropdown-item @click.native="handleToRouting">Routing</el-dropdown-item>
<el-dropdown-item @click.native="handleToBom(row)">BOM</el-dropdown-item>
<el-dropdown-item @click.native="handleToRouting(row)">Routing</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>

Loading…
Cancel
Save