Browse Source

20240509

java8
qiezi 8 months ago
parent
commit
b5132d27a0
  1. 6
      src/views/modules/quote/detail/primary/quoteDetailCost.vue
  2. 67
      src/views/modules/quote/detail/quoteDetail.vue
  3. 71
      src/views/modules/quote/detail/quoteGroupDetail.vue
  4. 65
      src/views/modules/quote/detail/tpCost.vue
  5. 67
      src/views/modules/quote/index.vue

6
src/views/modules/quote/detail/primary/quoteDetailCost.vue

@ -554,6 +554,12 @@ export default {
v-model="quoteDetail.quoteProfitAmount" :step="0" :precision="4" :min="0" disabled/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="Delta%" prop="delta" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.delta" :step="0" :min="0" :disabled="quoteDetail.status === '下达'"/>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset style="margin-top: 5px;border: 1px solid #777;">

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

@ -100,7 +100,7 @@ export default {
saveQuoteDetail:{
},
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'],
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','totalPrice','weighted','weighted2','deltaValue'],
dataList:[],
saveLoading:false,
queryLoading:false,
@ -347,6 +347,24 @@ export default {
fixed: '',
columnWidth: 65
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2TotalPrice',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'totalPrice',
headerAlign: 'center',
align: 'right',
columnLabel: 'TP for MSH (RMB/KCT) w/o VAT',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -383,6 +401,24 @@ export default {
fixed: '',
columnWidth: 75
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2DeltaValue',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'deltaValue',
headerAlign: 'center',
align: 'right',
columnLabel: ' Delta (USD /KCT)',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 75
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -399,7 +435,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
columnWidth: 215
columnWidth: 355
},
],
partVisible:false,
@ -686,16 +722,35 @@ export default {
columns:{
get(){
let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0);
if (val){
return this.columnList
let resultArray = this.columnList
if (!val){
resultArray = resultArray.filter(item=>item.columnProp !== 'adjustToolCost')
}
if (this.quote.quoteType === 'RMB'){
let filter = ['type','weighted','weighted2','deltaValue']
resultArray = resultArray.filter(item=> !filter.includes(item.columnProp))
let row = resultArray[resultArray.length-1]
row.columnWidth = 300;
}else if (this.quote.quoteType === 'USD'){
let filter = ['totalPrice']
let width = 140;
if (this.quote.deltaFlag === 'N'){
filter.push('deltaValue')
width += 60
}
resultArray = resultArray.filter(item=> !filter.includes(item.columnProp))
let row = resultArray[resultArray.length-1]
row.columnWidth = width;
}
return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost')
return resultArray
},
}
},
beforeUpdate() {
this.$nextTick(() => {
this.$refs.table1.doLayout()
if (this.$refs.table1){
this.$refs.table1.doLayout()
}
// this.$refs.table2.doLayout()
})
},

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

@ -98,7 +98,7 @@ export default {
saveQuoteDetail:{
},
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'],
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','totalPrice','weighted','weighted2','deltaValue'],
dataList:[],
saveLoading:false,
queryLoading:false,
@ -345,6 +345,24 @@ export default {
fixed: '',
columnWidth: 65
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2TotalPrice',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'totalPrice',
headerAlign: 'center',
align: 'right',
columnLabel: 'TP for MSH (RMB/KCT) w/o VAT',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -381,6 +399,24 @@ export default {
fixed: '',
columnWidth: 75
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2DeltaValue',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'deltaValue',
headerAlign: 'center',
align: 'right',
columnLabel: ' Delta (USD /KCT)',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 75
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -397,7 +433,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
columnWidth: 215
columnWidth: 335
},
],
partVisible:false,
@ -661,17 +697,38 @@ export default {
columns:{
get(){
let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0);
if (val){
return this.columnList
let resultArray = this.columnList
if (!val){
resultArray = resultArray.filter(item=>item.columnProp !== 'adjustToolCost')
}
return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost')
if (this.quote.quoteType === 'RMB'){
let filter = ['type','weighted','weighted2','deltaValue']
resultArray = resultArray.filter(item=> !filter.includes(item.columnProp))
let row = resultArray[resultArray.length-1]
row.columnWidth = 300;
}else if (this.quote.quoteType === 'USD'){
let filter = ['totalPrice']
let width = 140;
if (this.quote.deltaFlag === 'N'){
filter.push('deltaValue')
width += 60
}
resultArray = resultArray.filter(item=> !filter.includes(item.columnProp))
let row = resultArray[resultArray.length-1]
row.columnWidth = width;
}
return resultArray
},
}
},
beforeUpdate() {
this.$nextTick(() => {
this.$refs.table1.doLayout()
this.$refs.table2.doLayout()
if (this.$refs.table1){
this.$refs.table1.doLayout()
}
if (this.$refs.table2){
this.$refs.table2.doLayout()
}
})
}
}

65
src/views/modules/quote/detail/tpCost.vue

@ -19,7 +19,7 @@ export default {
return{
queryLoading:false,
dataList:[],
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','weighted','weighted2'],
numberProp:['adjustBomUnYield','adjustLabourCost','adjustFabricateCost','adjustMachineCost','adjustToolCost','totalCost','totalCostUSD','totalPrice','weighted','weighted2','deltaValue'],
columnList:[
{
userId: this.$store.state.user.name,
@ -255,6 +255,24 @@ export default {
fixed: '',
columnWidth: 65
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2TotalPrice',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'totalPrice',
headerAlign: 'center',
align: 'right',
columnLabel: 'TP for MSH (RMB/KCT) w/o VAT',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -291,6 +309,24 @@ export default {
fixed: '',
columnWidth: 75
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2DeltaValue',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'deltaValue',
headerAlign: 'center',
align: 'right',
columnLabel: ' Delta (USD /KCT)',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 75
},
{
userId: this.$store.state.user.name,
functionId: 5011,
@ -437,16 +473,35 @@ export default {
columns:{
get(){
let val = this.dataList.every(item=>!isNaN(item.adjustToolCost) && item.adjustToolCost > 0);
if (val){
return this.columnList
let resultArray = this.columnList
if (!val){
resultArray = resultArray.filter(item=>item.columnProp !== 'adjustToolCost')
}
if (this.quoteDetail.quoteType === 'RMB'){
let filter = ['type','weighted','weighted2','deltaValue']
resultArray = resultArray.filter(item=> !filter.includes(item.columnProp))
let row = resultArray[resultArray.length-1]
row.columnWidth = 420;
}else if (this.quoteDetail.quoteType === 'USD'){
let filter = ['totalPrice']
let width = 260;
if (this.quoteDetail.deltaFlag === 'N'){
filter.push('deltaValue')
width += 60
}
resultArray = resultArray.filter(item=> !filter.includes(item.columnProp))
let row = resultArray[resultArray.length-1]
row.columnWidth = width;
}
return this.columnList.filter(item=>item.columnProp !== 'adjustToolCost')
return resultArray
},
}
},
beforeUpdate() {
this.$nextTick(() => {
this.$refs.table1.doLayout()
if (this.$refs.table1){
this.$refs.table1.doLayout()
}
// this.$refs.table2.doLayout()
})
},

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

@ -62,6 +62,8 @@ export default {
costModel: "UFIDA",
markup:0,
chipPrice:'',
quoteType:'USD',
deltaFlag:'N',
},
quoteForm:{
},
@ -556,14 +558,11 @@ export default {
updateQuote(params).then(({data})=>{
if (data && data.code === 0){
this.saveVisible = false
this.currentQuote = {
...this.currentQuote
}
this.$message.success(data.msg)
}else {
this.$message.warning(data.msg)
}
this.handleSearch();
this.handleSearch(0);
this.saveLoading = false
}).catch((error)=>{
this.$message.error(error)
@ -861,7 +860,12 @@ export default {
},
'saveQuote.currency'(newVal, oldVal){
this.saveQuote.currency = newVal.toUpperCase()
}
},
'saveQuote.quoteType'(newVal, oldVal){
if (newVal === 'RMB'){
this.saveQuote.deltaFlag = 'N'
}
},
},
activated() {
if (this.$route.params.ids){
@ -905,16 +909,22 @@ export default {
</el-tab-pane>
</el-tabs>
<el-dialog :title="saveQuote.id? '报价信息:'+ saveQuote.quoteVersionNo : '报价信息'" v-drag :close-on-click-modal="false" :visible.sync="saveVisible" width="500px" >
<el-dialog :title="saveQuote.id? '报价信息:'+ saveQuote.quoteVersionNo : '报价信息'" v-drag :close-on-click-modal="false" :visible.sync="saveVisible" width="540px" >
<el-form ref="saveForm" :model="saveQuote" :rules="saveRules" label-position="top" label-width="100px">
<el-row :gutter="10">
<el-col :span="8">
<el-col :span="4">
<el-form-item label="BU" prop="buId" :show-message="false">
<bu-select v-model="saveQuote.buId" :disabled="saveQuote.id > 0"></bu-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item label="Cost Model" prop="costModel" :show-message="false">
<el-select v-model="saveQuote.costModel" :disabled="detailFlag">
<el-option label="2020" value="2020"></el-option>
<el-option label="UFIDA" value="UFIDA"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="客户询价单号" prop="customerInquiryNo" :show-message="false">
<el-input v-model="saveQuote.customerInquiryNo" :disabled="detailFlag"></el-input>
@ -954,11 +964,13 @@ export default {
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="Cost Model" prop="costModel" :show-message="false">
<el-select v-model="saveQuote.costModel" :disabled="detailFlag">
<el-option label="2020" value="2020"></el-option>
<el-option label="UFIDA" value="UFIDA"></el-option>
</el-select>
<el-form-item label="币种" :show-message="false">
<span slot="label" v-if="!detailFlag">
<a @click="getBaseList(512)">币种</a>
</span>
<el-input v-model="saveQuote.currency" readonly :disabled="detailFlag">
<span slot="suffix" v-show="saveQuote.currency && !detailFlag" @click="clearModalData('currency')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -971,18 +983,6 @@ export default {
<el-input v-model="saveQuote.chipPrice" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="币种" :show-message="false">
<span slot="label" v-if="!detailFlag">
<a @click="getBaseList(512)">币种</a>
</span>
<el-input v-model="saveQuote.currency" readonly :disabled="detailFlag">
<span slot="suffix" v-show="saveQuote.currency && !detailFlag" @click="clearModalData('currency')"><i class="el-icon-circle-close" style="margin-left: 5px;cursor: pointer;"></i></span>
</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%" :disabled="detailFlag" v-model="saveQuote.quoteDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
@ -1006,6 +1006,21 @@ export default {
<el-input v-model="saveQuote.purchase" :disabled="detailFlag"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="报价模式" prop="quoteType" :show-message="false">
<el-select v-model="saveQuote.quoteType">
<el-option label="美金" value="USD"></el-option>
<el-option label="人民币" value="RMB"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label=" " prop="deltaFlag" :show-message="false">
<el-checkbox v-model="saveQuote.deltaFlag" :disabled="saveQuote.quoteType === 'RMB'" true-label="Y" false-label="N">Delta (USD/KCT)</el-checkbox>
</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" :disabled="detailFlag" :rows="3" type="textarea"></el-input>

Loading…
Cancel
Save