Browse Source

2024-12-30

master
qiezi 1 year ago
parent
commit
81d2ff3280
  1. 2
      package.json
  2. 14
      src/api/quote/quoteGroupDetail.js
  3. 2
      src/main.js
  4. 4
      src/views/modules/project/projectPart/projectPartQuote.vue
  5. 4
      src/views/modules/quotation/inquiry/inquiryQuoteDetail.vue
  6. 62
      src/views/modules/quote/detail/quoteDetail.vue
  7. 933
      src/views/modules/quote/detail/quoteGroupDetail.vue
  8. 7
      src/views/modules/quote/index.vue

2
package.json

@ -23,7 +23,7 @@
"dayjs": "^1.10.7",
"decimal.js": "^10.3.1",
"echarts": "^5.5.0",
"element-ui": "2.8.2",
"element-ui": "2.15.14",
"file-saver": "^2.0.5",
"gulp": "4.0.2",
"gulp-concat": "2.6.1",

14
src/api/quote/quoteGroupDetail.js

@ -0,0 +1,14 @@
import {createAPI} from "../../utils/httpRequest";
export const queryQuoteGroupDetail = (data) => createAPI('/quote/group/detail','post',data)
export const queryQuoteGroupDetailByInquiry = (data) => createAPI('/quote/group/detail/inquiry','post',data)
export const saveQuoteGroupDetail = (data) => createAPI('/quote/group/detail/save','post',data)
export const removeQuoteGroupDetail = (data) => createAPI(`/quote/group/detail/remove/${data.id}`,'post',data)
export const updateCurrentQuoteGroupDetailItemNo = (data) => createAPI('/quote/group/detail/current','post',data)

2
src/main.js

@ -26,6 +26,8 @@ import echarts from "echarts";
import highlightContainer from './utils/highlight';
import field from './utils/field';
import 'element-ui/lib/theme-chalk/divider.css'
import 'element-ui/lib/theme-chalk/drawer.css'
// import 'element-ui/lib/theme-chalk/dialog.css'
import 'element-ui/lib/popover'
Vue.prototype.$echarts = echarts;

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

@ -1,5 +1,5 @@
<script>
import {queryQuoteDetailByInquiry} from "../../../../api/quote/quoteDetail";
import {queryQuoteGroupDetailByInquiry} from "../../../../api/quote/quoteGroupDetail";
export default {
name: "projectPartQuote",
@ -282,7 +282,7 @@ export default {
partNo:this.part.testPartNo,
}
this.queryLoading = true
queryQuoteDetailByInquiry(params).then(({data})=>{
queryQuoteGroupDetailByInquiry(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows
}else {

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

@ -1,5 +1,5 @@
<script>
import {queryQuoteDetailByInquiry} from "../../../../api/quote/quoteDetail";
import {queryQuoteGroupDetailByInquiry} from "../../../../api/quote/quoteGroupDetail";
export default {
name: "inquiryQuoteDetail",
@ -262,7 +262,7 @@ export default {
site: this.quotation.site
}
this.queryLoading = true;
queryQuoteDetailByInquiry(params).then(({data})=>{
queryQuoteGroupDetailByInquiry(params).then(({data})=>{
if (data && data.code === 0){
this.dataList = data.rows;
}else {

62
src/views/modules/quote/detail/quoteDetail.vue

@ -40,7 +40,14 @@ export default {
authFlag:{
type:Boolean,
default:false
}
},
quoteGroupDetail:{
type:Object,
},
saveAuth:{
type:Boolean,
default:true
},
},
data(){
return{
@ -455,6 +462,10 @@ export default {
qty:1,
isDetail:false,
}
if (this.quoteGroupDetail){
this.saveQuoteDetail.partNo = this.quoteGroupDetail.partNo
this.saveQuoteDetail.partDesc = this.quoteGroupDetail.partDesc
}
this.$nextTick(()=>{
this.saveQuoteDetail.projectNo = this.quote.projectNo
})
@ -513,6 +524,9 @@ export default {
let params = {
quoteId: this.quote.id,
}
if (this.quoteGroupDetail){
params.quoteGroupDetailId=this.quoteGroupDetail.id;
}
this.queryLoading = true;
queryQuoteDetail(params).then(({data})=>{
if (data && data.code === 0){
@ -559,6 +573,9 @@ export default {
status:'草稿',
internalInquiryNo:this.quote.insideInquiryNo,
}
if (this.quoteGroupDetail){
params.quoteGroupDetailId=this.quoteGroupDetail.id;
}
this.saveLoading = true;
saveQuoteDetail(params).then(({data})=>{
if (data && data.code === 0){
@ -678,15 +695,45 @@ export default {
this.pageNo = 1;
this.projectPartList = [];
}
},
quoteGroupDetail(newVal,oldVal){
if (newVal){
this.quoteDetail.profitRate = this.quote.markup
this.quoteDetail.quoteProfitRate = this.quote.markup
this.handleQueryQuoteDetail();
}
},
'quoteGroupDetail.currentQuoteDetailItemNo'(newVal,oldVal){
// console.log(this.quoteGroupDetail)
// emit
if (this.quoteGroupDetail){
this.$emit('currentQuoteDetailItemNo',oldVal);
}
}
},
created() {
this.quoteDetail.profitRate = this.quote.markup
this.quoteDetail.quoteProfitRate = this.quote.markup
this.handleQueryQuoteDetail();
}
}
</script>
<template>
<div>
<el-button type="primary" v-if="!authFlag" :disabled="quote.status === '下达' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button>
<template v-if="saveAuth">
<el-button type="primary" v-if="!authFlag" :disabled="quote.status === '下达' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button>
</template>
<el-table v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height">
<el-table-column width="50" align="center" label=" " v-if="quoteGroupDetail">
<template slot-scope="{row}">
<el-radio
class="radio"
:label="row.itemNo"
v-model="quoteGroupDetail.currentQuoteDetailItemNo"
>{{ '' }}</el-radio>
</template>
</el-table-column>·
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<el-table-column
v-for="(item,index) in columns" :key="index"
@ -704,12 +751,13 @@ export default {
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column label="操作" v-if="!authFlag" fixed="right" align="center" width="120">
<el-table-column label="操作" v-if="!authFlag" fixed="right" align="center" width="160">
<template slot-scope="{row,$index}">
<a type="text" v-if="row.status === '草稿'" @click="handleSaveQuoteDetail(row)">编辑</a>
<a type="text" v-if="row.status === '草稿'" @click="handleDeleteQuoteDetail(row)">删除</a>
<a type="text" v-if="row.status !== '下达'" @click="againQuoteDetail(row)">复制明细</a>
<a type="text" v-if="row.status === '下达'" @click="handleDetail(row)">详情</a>
<a type="text" v-if="row.status === '草稿'"></a>
</template>
</el-table-column>
</el-table>
@ -719,10 +767,10 @@ export default {
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="物料编码" prop="partNo" :show-message="false">
<span slot="label">
<span slot="label" v-if="!quoteGroupDetail">
<a @click="handleQueryPartList">物料编码</a>
</span>
<el-input v-model="saveQuoteDetail.partNo" @change="handlePartNoBlur"></el-input>
<el-input v-model="saveQuoteDetail.partNo" :disabled="quoteGroupDetail" @change="handlePartNoBlur"></el-input>
</el-form-item>
</el-col>
<el-col :span="16">
@ -877,4 +925,8 @@ export default {
height: auto;
line-height: 1.5;
}
.radio /deep/ .el-radio__label{
display: none;
}
</style>

933
src/views/modules/quote/detail/quoteGroupDetail.vue

@ -0,0 +1,933 @@
<script>
import {
updateQuoteDetail
} from "../../../../api/quote/quoteDetail";
import {getProjectPartList} from "../../../../api/project/project";
import QuoteDetailCost from "./primary/quoteDetailCost.vue";
import QuoteDetailTool from "./primary/quoteDetailTool.vue";
import QuoteDetailBom from "./primary/quoteDetailBom.vue";
import QuoteDetailRouting from "./primary/quoteDetailRouting.vue";
import QuoteDetailOtherCost from "./primary/quoteDetailOtherCost.vue";
import DictDataSelect from "../../sys/dict-data-select.vue";
import QuoteDetailTest from "./primary/quoteDetailTest.vue";
import QuoteDetailOther from "./primary/quoteDetailOther.vue";
import {
queryQuoteGroupDetail,
removeQuoteGroupDetail,
saveQuoteGroupDetail, updateCurrentQuoteGroupDetailItemNo
} from "../../../../api/quote/quoteGroupDetail";
import QuoteDetail from "./quoteDetail.vue";
export default {
name: "quoteGroupDetail",
components: {
QuoteDetail,
QuoteDetailOther,
QuoteDetailTest,
DictDataSelect,
QuoteDetailOtherCost,
QuoteDetailRouting,
QuoteDetailBom,
QuoteDetailTool,
QuoteDetailCost,
},
props:{
quote:{
type:Object,
required:true
},
height:{
type:[Number,String],
default:300
},
authFlag:{
type:Boolean,
default:false
}
},
data(){
return{
quoteDetail:{
id:null,
partNo:'',
partDesc:'',
projectNo:'',
projectDesc:'',
buNo: '*',
qty:null,
quoteCount:1,
partCost:0,
adjustPartCost:0,
labourCost:0,
adjustLabourCost:0,
fabricateCost:0,
adjustFabricateCost:0,
toolCost:0,
adjustToolCost:0,
machineCost:0,
adjustMachineCost:0,
otherCost:0,
manageCost:0,
totalCost:0,
profitRate:0,
profitAmount:0,
totalPrice:0,
unitPrice:0,
taxRate:13,
taxTotalPrice:0,
taxUnitPrice:0,
quoteTotalCost:0,
quoteProfitRate:0,
quoteProfitAmount:0,
quoteTotalPrice:0,
quoteUnitPrice:0,
quoteTaxRate:0,
quoteTaxTotalPrice:0,
quoteTaxUnitPrice:0,
currency1:undefined,
currency2:undefined,
exchangeRate1:undefined,
exchangeRate2:undefined,
currencyTotalCost1:0,
currencyTotalCost2:0,
quoteCurrencyTotalCost1:0,
quoteCurrencyTotalCost2:0,
// moq:'Standard 250K',
moq:'',
calculatedItems:'工具,测试,其他,包装&运输',
testCost:0,
adjustTestCost:0,
elseCost:0,
adjustElseCost:0,
remark:'',
},
saveQuoteDetail:{
},
dataList:[],
saveLoading:false,
queryLoading:false,
saveVisible:false,
saveQuoteDetailRules:{
partNo: [{required: true, message: '请输入物料编码', trigger: ['blur','change']}],
partDesc: [{required: true, message: '请输入物料名称', trigger: ['blur','change']}],
qty: [{required: true, message: '请输入数量', trigger: ['blur','change']}],
currency1: [{required: true, message: '请选择币种', trigger: ['blur','change']}],
},
columns: [
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartNo',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'partNo',
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: '5011Table2PartDesc',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'left',
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 240
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2Qty',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'qty',
headerAlign: 'center',
align: 'right',
columnLabel: 'MOQ',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2AdjustPartCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustPartCost',
headerAlign: 'center',
align: 'right',
columnLabel: '材料成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2AdjustLabourCost',
tableId: '5011Table2',
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: 5011,
serialNumber: '5011Table2AdjustMachineCost',
tableId: '5011Table2',
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: 5011,
serialNumber: '5011Table2AdjustToolCost',
tableId: '5011Table2',
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: 5011,
serialNumber: '5011Table2AdjustTestCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustTestCost',
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: 5011,
serialNumber: '5011Table2AdjustElseCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'adjustElseCost',
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: 5011,
serialNumber: '5011Table2TotalCost',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'totalCost',
headerAlign: 'center',
align: 'right',
columnLabel: '总成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2Remark',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'remark',
headerAlign: 'center',
align: 'left',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
],
partVisible:false,
activeName:'bom',
projectPart:{
},
projectPartList:[],
pageNo:1,
pageSize:20,
pageTotal:0,
partQueryLoading:false,
projectPartColumns:[
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table3TestPartNo',
tableId: '5011Table3',
tableName: '项目物料表',
columnProp: 'testPartNo',
headerAlign: 'center',
align: 'left',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table3PartDesc',
tableId: '5011Table3',
tableName: '项目物料表',
columnProp: 'partDesc',
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: '5011Table3FinalPartNo',
tableId: '5011Table3',
tableName: '项目物料表',
columnProp: 'finalPartNo',
headerAlign: 'center',
align: 'left',
columnLabel: 'IFS物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table3CustomerPartNo',
tableId: '5011Table3',
tableName: '项目物料表',
columnProp: 'customerPartNo',
headerAlign: 'center',
align: 'left',
columnLabel: '客户物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table3Type',
tableId: '5011Table3',
tableName: '项目物料表',
columnProp: 'type',
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: '5011Table3UmId',
tableId: '5011Table3',
tableName: '项目物料表',
columnProp: 'umId',
headerAlign: 'center',
align: 'left',
columnLabel: '单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
],
drawerVisible: false,
quoteGroupDetail:{
id:-1,
},
}
},
methods:{
handleSaveQuoteDetail(row){
this.$nextTick(()=>{
if (this.$refs.handleSaveQuoteDetailClick){
this.$refs.saveQuoteDetailForm.clearValidate();
}
})
if (row){
this.saveQuoteDetail = {
...row
}
}else {
this.saveQuoteDetail = {
...this.quoteDetail,
createBy:this.$store.state.user.name,
status:'草稿',
active:'Y',
qty:1,
isDetail:false,
}
this.$nextTick(()=>{
this.saveQuoteDetail.projectNo = this.quote.projectNo
})
}
this.activeName = 'bom';
this.saveVisible = true;
},
handleDeleteQuoteDetail(row){
this.$alert('确认删除该条报价明细吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: row.id,
}
removeQuoteGroupDetail(params).then(({data}) => {
if (data && data.code === 0) {
this.$message.success(data.msg);
this.handleQueryQuoteDetail();
} else {
this.$message.warning(data.msg);
}
}).catch((error) => {
this.$message.error(error);
})
}).catch(() => {
})
},
handlePartNoBlur(){
let params = {
site:this.$store.state.user.site,
testPartNo:this.saveQuoteDetail.partNo,
projectId: this.quote.projectNo,
no:1,
size:20,
}
getProjectPartList(params).then(({data})=>{
if (data && data.code === 0){
if (data.rows && data.rows.length === 1){
this.dblClickProjectPartTable(data.rows[0])
}else {
this.saveQuoteDetail.partDesc = ''
}
}
})
},
handleQueryQuoteDetail(val){
let params = {
quoteId: this.quote.id,
}
if (!val){
this.queryLoading = true;
}
queryQuoteGroupDetail(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;
})
},
handleSaveQuoteDetailClick(){
this.$refs.saveQuoteDetailForm.validate((valid,obj) => {
if (valid){
if (this.saveQuoteDetail.id){
this.handleUpdate();
}else {
this.handleSave();
}
}else {
let i = 1;
for (let key in obj) {
this.$message.error(obj[key][0].message);
if (i === 1){
return
}
i++;
}
}
})
},
handleSave(){
let params = {
...this.saveQuoteDetail,
quoteId: this.quote.id,
quoteNo:this.quote.quoteNo,
site:this.quote.site,
buNo:this.quote.buNo,
versionNo:this.quote.versionNo,
createBy:this.saveQuoteDetail.createBy,
active:'Y',
status:'草稿',
internalInquiryNo:this.quote.insideInquiryNo,
}
this.saveLoading = true;
saveQuoteGroupDetail(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQueryQuoteDetail();
if (this.saveQuoteDetail.isDetail){
this.saveQuoteDetail = {
...data.row,
}
}else {
this.saveVisible = false;
}
}else {
this.$message.warning(data.msg);
}
this.saveLoading = false
}).catch((error)=>{
this.$message.error(error);
this.saveLoading = false
})
},
handleUpdate(){
let params = {
...this.saveQuoteDetail,
updateBy:this.$store.state.user.name,
}
updateQuoteDetail(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQueryQuoteDetail();
this.saveVisible = false;
}else {
this.$message.warning(data.msg);
}
}).catch((error)=>{
this.$message.error(error);
})
},
handleClickTab(tab){
if (this.activeName === 'routing'){
this.$refs.routing.handleQueryQuoteDetailBomTree()
}else if (this.activeName === 'tool'){
this.$refs.tool.handleQueryQuoteDetailTool();
}
},
handleQueryPartList(){
this.projectPart = {
testPartNo:this.saveQuoteDetail.partNo,
partDesc:'',
finalPartNo:'',
customerPartNo:'',
site:this.$store.state.user.site,
}
this.partVisible = true;
this.getProjectPartList();
},
getProjectPartList(){
let params = {
...this.projectPart,
no:this.pageNo,
size:this.pageSize,
}
params.projectId = this.quote.projectNo
this.partQueryLoading = true;
getProjectPartList(params).then(({data})=>{
if (data && data.code === 0){
this.projectPartList = data.rows;
this.pageTotal = data.total;
}
this.partQueryLoading = false;
}).catch((error)=>{
this.partQueryLoading = false;
})
},
handleSizeChange(val){
this.pageSize = val;
this.getProjectPartList();
},
handleCurrentChange(val){
this.pageNo = val;
this.getProjectPartList();
},
dblClickProjectPartTable(row){
this.saveQuoteDetail.partNo = row.testPartNo;
this.saveQuoteDetail.partDesc = row.partDesc;
this.partVisible = false;
},
handleQueryQuoteDetailByDetailId(row){
this.quoteGroupDetail = {
...row
}
this.drawerVisible = true;
},
rowStyle({row}){
if (row.id === this.quoteGroupDetail.id){
return {background:'#E8F7F6'}
}
},
quoteGroupDetailRowClick(row){
this.quoteGroupDetail = {
...row
}
},
handleCurrentQuoteDetailItemNo(val){
updateCurrentQuoteGroupDetailItemNo(this.quoteGroupDetail).then(({data})=>{
if (data && data.code === 0){
// this.$message.success(data.msg);
this.handleQueryQuoteDetail(true);
}else {
this.$message.warning(data.msg);
this.quoteGroupDetail.currentQuoteDetailItemNo = val;
}
}).catch((error)=>{
this.$message.error(error);
this.quoteGroupDetail.currentQuoteDetailItemNo = val;
})
},
},
watch:{
quote(newVal,oldVal){
if (newVal.id){
this.quoteDetail.profitRate = this.quote.markup
this.quoteDetail.quoteProfitRate = this.quote.markup
this.handleQueryQuoteDetail();
}else {
this.dataList = [];
}
},
partVisible(newVal,oldVal){
if (newVal === false){
this.partQueryLoading = false
this.pageNo = 1;
this.projectPartList = [];
}
}
}
}
</script>
<template>
<div>
<el-button type="primary" v-if="!authFlag" :disabled="quote.status === '下达' || !quote.status" @click="handleSaveQuoteDetail(null)">新增</el-button>
<el-table v-loading="queryLoading" border :data="dataList" style="width: 100%;margin-top: 5px" :height="height">
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<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-column label="操作" v-if="!authFlag" fixed="right" align="center" width="120">
<template slot-scope="{row,$index}">
<a type="text" v-if="row.status === '草稿'" @click="handleDeleteQuoteDetail(row)">删除</a>
<a @click="handleQueryQuoteDetailByDetailId(row)">条目明细</a>
</template>
</el-table-column>
</el-table>
<el-dialog :title="`报价明细`" top="10vh" v-drag :visible.sync="saveVisible" append-to-body :width="`${saveQuoteDetail.id?1200:600}px`" :close-on-click-modal="false">
<el-form :model="saveQuoteDetail" ref="saveQuoteDetailForm" :rules="saveQuoteDetailRules" label-position="top" v-if="!saveQuoteDetail.id">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="物料编码" prop="partNo" :show-message="false">
<span slot="label">
<a @click="handleQueryPartList">物料编码</a>
</span>
<el-input v-model="saveQuoteDetail.partNo" @change="handlePartNoBlur"></el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="物料描述" prop="partDesc" :show-message="false">
<el-input v-model="saveQuoteDetail.partDesc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="MOQ" prop="qty" :show-message="false">
<el-input-number style="width: 100%;" v-model="saveQuoteDetail.qty" :min="1" :step="0" :precision="0" :controls="false"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="币种" prop="currency1" :show-message="false">
<dict-data-select style="width: 100%" v-if="saveVisible" dict-type="plm_customer_information_customer_customer_currency" v-model="saveQuoteDetail.currency1"></dict-data-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="" :show-message="false">
<el-checkbox v-model="saveQuoteDetail.isDetail">保存进入报价页面</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" class="auto" :show-message="false">
<el-input type="textarea" v-model="saveQuoteDetail.remark" :autosize="{minRows: 3, maxRows: 3}"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form v-else :model="saveQuoteDetail" ref="saveQuoteDetailForm" :rules="saveQuoteDetailRules" label-position="top">
<el-row :gutter="20">
<el-col :span="4">
<el-form-item label="物料名称" prop="partNo" :show-message="false">
<el-input v-model="saveQuoteDetail.partNo" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物料描述" prop="partDesc" :show-message="false">
<el-input v-model="saveQuoteDetail.partDesc" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="MOQ" prop="qty" :show-message="false">
<el-input-number v-model="saveQuoteDetail.qty" style="width: 100%;" :controls="false" :disabled="saveQuoteDetail.status === '下达'"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="币种" prop="currency1" :show-message="false">
<dict-data-select :disabled="saveQuoteDetail.status === '下达'" style="width: 100%" dict-type="plm_customer_information_customer_customer_currency" v-model="saveQuoteDetail.currency1"></dict-data-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="16">
<el-form-item label="备注" class="auto" :show-message="false">
<el-input type="textarea" resize="none" :autosize="{minRows: 3, maxRows: 3}" v-model="saveQuoteDetail.remark" :disabled="saveQuoteDetail.status === '下达'"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs v-model="activeName" v-if="saveQuoteDetail.id" @tab-click="handleClickTab">
<el-tab-pane label="材料" name="bom">
<quote-detail-bom v-if="saveVisible" @close="()=>{this.saveVisible = false}" v-model:quoteDetail="saveQuoteDetail"></quote-detail-bom>
</el-tab-pane>
<el-tab-pane label="工艺" name="routing">
<quote-detail-routing ref="routing" v-if="saveVisible" @close="()=>{this.saveVisible = false}" v-model:quoteDetail="saveQuoteDetail"></quote-detail-routing>
</el-tab-pane>
<el-tab-pane label="工具" name="tool">
<quote-detail-tool ref="tool" v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-tool>
</el-tab-pane>
<el-tab-pane label="测试" name="test">
<quote-detail-test v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-test>
</el-tab-pane>
<el-tab-pane label="其他" name="other">
<quote-detail-other v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-other>
</el-tab-pane>
<el-tab-pane label="包装&运输" name="otherCost">
<quote-detail-other-cost v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-other-cost>
</el-tab-pane>
<el-tab-pane label="成本&价格" name="cost">
<quote-detail-cost v-if="saveVisible" ref="cost" v-model:quoteDetail="saveQuoteDetail"></quote-detail-cost>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer">
<el-button type="primary" v-if="saveQuoteDetail.status === '草稿'" :loading="saveLoading" @click="handleSaveQuoteDetailClick"> </el-button>
<el-button @click="saveVisible = false"> </el-button>
</div>
</el-dialog>
<el-dialog v-drag title="物料信息" append-to-body :close-on-click-modal="false" :visible.sync="partVisible">
<!--搜索条件-->
<el-form :model="projectPart" ref="projectPartDataForm" :inline="true" label-position="top">
<el-form-item label="物料编码" prop="testPartNo">
<el-input v-model="projectPart.testPartNo" clearable/>
</el-form-item>
<el-form-item label="物料名称" prop="partDesc">
<el-input v-model="projectPart.partDesc" clearable/>
</el-form-item>
<el-form-item label="IFS物料编码" prop="finalPartNo">
<el-input v-model="projectPart.finalPartNo" clearable/>
</el-form-item>
<el-form-item label="客户物料编码" prop="customerPartNo">
<el-input v-model="projectPart.customerPartNo" clearable/>
</el-form-item>
<el-form-item label=" ">
<el-button @click="getProjectPartList" type="primary"> </el-button>
</el-form-item>
</el-form>
<el-table height="300px" v-loading="partQueryLoading" stripe border @row-dblclick="dblClickProjectPartTable" :data="projectPartList" ref="projectPartDataTable" :style="{marginTop:'10px'}">
<el-table-column
v-for="(item,index) in projectPartColumns" :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>
<el-pagination style="margin-top: 0"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageNo"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="pageTotal"
layout="total,sizes, prev, pager, next, jumper">
</el-pagination>
</el-dialog>
<el-dialog title="报价明细" :visible.sync="drawerVisible" top="10vh" width="1200px" append-to-body :close-on-click-modal="false">
<el-table v-loading="queryLoading"
@row-click="quoteGroupDetailRowClick" :row-style="rowStyle" border :data="dataList" style="width: 100%;margin-top: 5px;" :height="'30vh'">
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<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>
<quote-detail
v-if="drawerVisible"
style="margin-top: 20px"
:quote="quote"
:quote-group-detail="quoteGroupDetail"
:auth-flag="false"
:height="'33vh'"
@currentQuoteDetailItemNo="handleCurrentQuoteDetailItemNo">
</quote-detail>
<div slot="footer" class="dialog-footer">
<el-button @click="drawerVisible = false"> </el-button>
</div>
</el-dialog>
<!-- <part-table v-if="saveVisible" v-model="partVisible" :is-page="true" :part-no="saveQuoteDetail.partNo" @dblclick="handleDblClick"></part-table>-->
<!-- <project-part-table v-if="saveVisible" v-model="partVisible" :project-no="saveQuoteDetail.projectNo" :part-no="saveQuoteDetail.partNo" @dblclick="handleDblClick"></project-part-table>-->
</div>
</template>
<style scoped>
.el-table /deep/ .cell{
height: auto;
line-height: 1.5;
}
.auto /deep/ .el-form-item__content{
height: auto;
line-height: 1.5;
}
</style>

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

@ -24,10 +24,12 @@ import PriceCheckProperties from "../quotation/priceCheckProperties.vue";
import ApprovalInformation from "../changeManagement/approvalInformation.vue";
import {getPriceCheckPropertiesList} from "../../../api/quotation/priceCheckProperties";
import {getApprovalList} from "../../../api/changeManagement/changeManagement";
import QuoteGroupDetail from "./detail/quoteGroupDetail.vue";
export default {
name: "quote",
components: {
QuoteGroupDetail,
ApprovalInformation, PriceCheckProperties,
quotationProjectInformation, OssComponents, CustomerInfo, quotationCustomerContact,
DictDataSelect,
@ -1109,7 +1111,10 @@ export default {
</el-pagination>
<el-tabs v-if="isMenu" v-model="activeName" type="border-card" style="margin-top: 0;" class="customer-tab">
<el-tab-pane label="报价明细" name="detail">
<quote-detail :quote="currentQuote" :auth-flag="false" :height="'28vh'"></quote-detail>
<quote-group-detail :quote="currentQuote" :auth-flag="false" :height="'28vh'"></quote-group-detail>
</el-tab-pane>
<el-tab-pane label="条目明细" name="detail2">
<quote-detail v-if="activeName === 'detail2'" :save-auth="false" :quote="currentQuote" :auth-flag="false" :height="'30vh'"></quote-detail>
</el-tab-pane>
<el-tab-pane label="项目信息" name="quotation_project_information">
<quotation-project-information height="31vh" :quotation-header="currentQuote"></quotation-project-information>

Loading…
Cancel
Save