|
|
@@ -67,19 +67,19 @@
|
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.' + countObj.countKey"
|
|
|
>
|
|
|
- {{ scope.row[countObj.countKey] }}{{ scope.row[countObj.unitKey] }}
|
|
|
+ {{ scope.row[countObj.countKey] }}
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
- <!-- <template v-slot:saleUnit="scope">
|
|
|
+ <template v-slot:saleUnit="scope">
|
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
|
:prop="'datasource.' + scope.$index + '.' + countObj.unitKey"
|
|
|
>
|
|
|
{{ scope.row[countObj.unitKey] }}
|
|
|
</el-form-item>
|
|
|
- </template> -->
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 新增字段插槽 -->
|
|
|
+ <!-- 新增字段插槽 - 只在类型为2时显示 -->
|
|
|
<template v-slot:thickNess="scope">
|
|
|
<el-form-item
|
|
|
style="margin-bottom: 20px"
|
|
|
@@ -269,6 +269,11 @@
|
|
|
isProductionRequirements: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
+ },
|
|
|
+ // 报价类型(1:产品销售,2:生产加工)
|
|
|
+ quoteType: {
|
|
|
+ type: Number,
|
|
|
+ default: 1
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
@@ -311,7 +316,9 @@
|
|
|
align: 'center'
|
|
|
};
|
|
|
}
|
|
|
- return [
|
|
|
+
|
|
|
+ // 基础列(所有类型都显示)
|
|
|
+ const baseColumns = [
|
|
|
{
|
|
|
width: 45,
|
|
|
type: 'index',
|
|
|
@@ -347,54 +354,65 @@
|
|
|
label: '规格',
|
|
|
slot: 'specification',
|
|
|
align: 'center'
|
|
|
- },
|
|
|
- // 新增字段:厚度
|
|
|
- {
|
|
|
- width: 150,
|
|
|
- prop: 'thickNess',
|
|
|
- label: '厚度',
|
|
|
- slot: 'thickNess',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- // 新增字段:平方数
|
|
|
- {
|
|
|
- width: 150,
|
|
|
- prop: 'squareNumber',
|
|
|
- label: '平方数',
|
|
|
- slot: 'squareNumber',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- // 新增字段:加工费(未税)
|
|
|
- {
|
|
|
- width: 150,
|
|
|
- prop: 'processingFeeBeforeTax',
|
|
|
- label: '加工费(未税)',
|
|
|
- slot: 'processingFeeBeforeTax',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- // 新增字段:包装费(未税)
|
|
|
- {
|
|
|
- width: 150,
|
|
|
- prop: 'packagingFeeNotTaxed',
|
|
|
- label: '包装费(未税)',
|
|
|
- slot: 'packagingFeeNotTaxed',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- // 新增字段:运输费(未税)
|
|
|
- {
|
|
|
- width: 150,
|
|
|
- prop: 'transportationFeeWithoutTax',
|
|
|
- label: '运输费(未税)',
|
|
|
- slot: 'transportationFeeWithoutTax',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- width: 150,
|
|
|
- prop: 'quotationSubtotalBeforeTax',
|
|
|
- label: '报价小计(未税)',
|
|
|
- slot: 'quotationSubtotalBeforeTax',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ }
|
|
|
+ ];
|
|
|
+
|
|
|
+ // 类型为2时显示的列(生产加工)
|
|
|
+ const type2Columns = [];
|
|
|
+ if (this.quoteType === 2) {
|
|
|
+ type2Columns.push(
|
|
|
+ // 新增字段:厚度
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'thickNess',
|
|
|
+ label: '厚度',
|
|
|
+ slot: 'thickNess',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ // 新增字段:平方数
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'squareNumber',
|
|
|
+ label: '平方数',
|
|
|
+ slot: 'squareNumber',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ // 新增字段:加工费(未税)
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'processingFeeBeforeTax',
|
|
|
+ label: '加工费(未税)',
|
|
|
+ slot: 'processingFeeBeforeTax',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ // 新增字段:包装费(未税)
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'packagingFeeNotTaxed',
|
|
|
+ label: '包装费(未税)',
|
|
|
+ slot: 'packagingFeeNotTaxed',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ // 新增字段:运输费(未税)
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'transportationFeeWithoutTax',
|
|
|
+ label: '运输费(未税)',
|
|
|
+ slot: 'transportationFeeWithoutTax',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'quotationSubtotalBeforeTax',
|
|
|
+ label: '报价小计(未税)',
|
|
|
+ slot: 'quotationSubtotalBeforeTax',
|
|
|
+ align: 'center'
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ // 其他公共列
|
|
|
+ const otherColumns = [
|
|
|
{
|
|
|
width: 200,
|
|
|
prop: 'customerMark',
|
|
|
@@ -447,21 +465,21 @@
|
|
|
width: 1
|
|
|
},
|
|
|
{
|
|
|
- width: 180,
|
|
|
+ width: 150,
|
|
|
prop: 'saleCount',
|
|
|
label: '数量',
|
|
|
slot: 'saleCount',
|
|
|
headerSlot: 'headerTotalCount',
|
|
|
align: 'center'
|
|
|
},
|
|
|
- // {
|
|
|
- // width: 150,
|
|
|
- // prop: 'saleUnit',
|
|
|
- // label: '单位',
|
|
|
- // slot: 'saleUnit',
|
|
|
- // headerSlot: 'headerTotalCount',
|
|
|
- // align: 'center'
|
|
|
- // },
|
|
|
+ {
|
|
|
+ width: 150,
|
|
|
+ prop: 'saleUnit',
|
|
|
+ label: '单位',
|
|
|
+ slot: 'saleUnit',
|
|
|
+ headerSlot: 'headerTotalCount',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'packingSpecification',
|
|
|
@@ -482,79 +500,59 @@
|
|
|
},
|
|
|
align: 'center'
|
|
|
},
|
|
|
- // {
|
|
|
- // width: 120,
|
|
|
- // prop: 'measuringUnit',
|
|
|
- // label: '计量单位',
|
|
|
- // slot: 'measuringUnit',
|
|
|
- // align: 'center'
|
|
|
- // },
|
|
|
+ {
|
|
|
+ width: 120,
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ slot: 'measuringUnit',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
wmsColumn,
|
|
|
this.pageName == 'send'
|
|
|
? {
|
|
|
- minWidth: 140,
|
|
|
+ minWidth: 110,
|
|
|
prop: 'sendTotalCount',
|
|
|
label: '已发货数量',
|
|
|
slot: 'sendTotalCount',
|
|
|
- align: 'center',
|
|
|
- formatter: (row, column) => {
|
|
|
- if (row.sendTotalCount) {
|
|
|
- return row.sendTotalCount + ' ' + row.measuringUnit;
|
|
|
- }
|
|
|
- }
|
|
|
+ align: 'center'
|
|
|
}
|
|
|
: {
|
|
|
width: 1
|
|
|
},
|
|
|
this.pageName == 'send'
|
|
|
? {
|
|
|
- minWidth: 140,
|
|
|
+ minWidth: 110,
|
|
|
prop: 'notSendTotalCount',
|
|
|
label: '未发货数量',
|
|
|
slot: 'notSendTotalCount',
|
|
|
- align: 'center',
|
|
|
- formatter: (row, column) => {
|
|
|
- if (row.notSendTotalCount) {
|
|
|
- return row.notSendTotalCount + ' ' + row.measuringUnit;
|
|
|
- }
|
|
|
- }
|
|
|
+ align: 'center'
|
|
|
}
|
|
|
: {
|
|
|
width: 1
|
|
|
},
|
|
|
|
|
|
{
|
|
|
- width: 140,
|
|
|
+ width: 120,
|
|
|
prop: 'singleWeight',
|
|
|
label: '单重',
|
|
|
slot: 'singleWeight',
|
|
|
headerSlot: 'headerSingleWeight',
|
|
|
- formatter: (row, column) => {
|
|
|
- if (row.singleWeight) {
|
|
|
- return row.singleWeight + ' ' + row.weightUnit;
|
|
|
- }
|
|
|
- },
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- width: 140,
|
|
|
+ width: 120,
|
|
|
prop: 'totalWeight',
|
|
|
label: '总重',
|
|
|
slot: 'totalWeight',
|
|
|
- formatter: (row, column) => {
|
|
|
- if (row.totalWeight) {
|
|
|
- return row.totalWeight + ' ' + row.weightUnit;
|
|
|
- }
|
|
|
- },
|
|
|
align: 'center'
|
|
|
},
|
|
|
- // {
|
|
|
- // width: 120,
|
|
|
- // prop: 'weightUnit',
|
|
|
- // label: '重量单位',
|
|
|
- // slot: 'weightUnit',
|
|
|
- // align: 'center'
|
|
|
- // },
|
|
|
+ {
|
|
|
+ width: 120,
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ slot: 'weightUnit',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
|
|
|
{
|
|
|
width: 160,
|
|
|
@@ -660,22 +658,32 @@
|
|
|
slot: 'modelType',
|
|
|
align: 'center'
|
|
|
},
|
|
|
- {
|
|
|
- minWidth: 120,
|
|
|
- prop: 'modelKey',
|
|
|
- label: '机型',
|
|
|
- slot: 'modelKey',
|
|
|
- showOverflowTooltip: true,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- minWidth: 120,
|
|
|
- prop: 'colorKey',
|
|
|
- slot: 'colorKey',
|
|
|
- showOverflowTooltip: true,
|
|
|
- label: '颜色',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // 机型列 - 只在类型为2时显示
|
|
|
+ this.quoteType === 2
|
|
|
+ ? {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'modelKey',
|
|
|
+ label: '机型',
|
|
|
+ slot: 'modelKey',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ width: 1
|
|
|
+ },
|
|
|
+ // 颜色列 - 只在类型为2时显示
|
|
|
+ this.quoteType === 2
|
|
|
+ ? {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'colorKey',
|
|
|
+ slot: 'colorKey',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ label: '颜色',
|
|
|
+ align: 'center'
|
|
|
+ }
|
|
|
+ : {
|
|
|
+ width: 1
|
|
|
+ },
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'imgCode',
|
|
|
@@ -853,6 +861,9 @@
|
|
|
align: 'center'
|
|
|
}
|
|
|
];
|
|
|
+
|
|
|
+ // 合并所有列
|
|
|
+ return [...baseColumns, ...type2Columns, ...otherColumns];
|
|
|
}
|
|
|
},
|
|
|
|