Browse Source

20241114

java8
qiezi 1 year ago
parent
commit
dda433c39e
  1. 6
      src/views/modules/part/bomManagement.vue
  2. 6
      src/views/modules/part/routingManagement.vue
  3. 33
      src/views/modules/quote/detail/primary/quoteDetailBom.vue
  4. 45
      src/views/modules/quote/detail/primary/quoteDetailCost.vue
  5. 27
      src/views/modules/quote/detail/primary/quoteDetailRouting.vue
  6. 9
      src/views/modules/quote/detail/quoteDetail.vue
  7. 12
      src/views/modules/quote/quoteDetailReport.vue

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

@ -2090,7 +2090,11 @@ export default {
activated () {
if (!this.authSearch) {
if (this.$route.params.partNo) {
if (this.$route.params.type === 'quote'){
this.searchData.partNo = this.$route.params.partNo
this.searchData.bomType = this.$route.params.bomType
this.searchData.engChgLevel = this.$route.params.engChgLevel
}else if (this.$route.params.partNo) {
this.searchData.partNo = this.$route.params.partNo
}
this.getDataList()

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

@ -2050,7 +2050,11 @@ export default {
activated () {
if (!this.authSearch) {
if (this.$route.params.partNo) {
if (this.$route.params.type === 'quote'){
this.searchData.partNo = this.$route.params.partNo
this.searchData.routingType = this.$route.params.routingType
this.searchData.routingRevision = this.$route.params.routingRevision
}else if (this.$route.params.partNo) {
this.searchData.partNo = this.$route.params.partNo
}
this.getDataList()

33
src/views/modules/quote/detail/primary/quoteDetailBom.vue

@ -50,7 +50,7 @@ export default {
tableName: "报价材料信息",
columnProp: 'partNo',
headerAlign: "center",
align: "center",
align: "left",
columnLabel: '产品编码',
columnHidden: false,
columnImage: false,
@ -67,7 +67,7 @@ export default {
tableName: "报价材料信息",
columnProp: 'componentPart',
headerAlign: "center",
align: "center",
align: "left",
columnLabel: '零部件编码',
columnHidden: false,
columnImage: false,
@ -92,7 +92,7 @@ export default {
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140,
columnWidth: 160,
}, {
userId: this.$store.state.user.name,
functionId: 5011,
@ -423,6 +423,24 @@ export default {
}).catch((error) => {
this.$message.error(error);
})
},
handleJumpToBom(row){
if (this.$router.resolve('part-bomManagement').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
} else {
this.$emit('close')
let params = {
name: "part-bomManagement",
params: {
type:'quote',
partNo:row.partNo,
bomType:row.bomType,
engChgLevel:row.engChgLevel,
alternativeNo:row.alternativeNo,
}
}
this.$router.push(params)
}
}
},
created() {
@ -491,8 +509,13 @@ export default {
: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 v-if="item.columnProp === 'partNo'">
<el-link @click="handleJumpToBom(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
</template>
<template v-else>
<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>
</template>
</el-table-column>
</el-table>

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

@ -144,18 +144,34 @@ export default {
this.$message.error(error);
this.computeLoading = false
})
},
handleValidate(){
this.$refs.costForm.validate((valid,obj)=>{
if (!valid){
let i = 1;
for (let item in obj){
this.$message.error(obj[item][0].message);
if (i === 1){
return
}
i++;
}
}
})
}
},
watch:{
'quoteDetail.adjustPartCost'(newValue, oldValue){
if (newValue === undefined || newValue === null){
this.quoteDetail.adjustPartCost = 0;
this.$set(this.quoteDetail, 'adjustPartCost', 0);
}
this.computeTotalCost();
},
'quoteDetail.adjustBomUnYield'(newValue, oldValue){
console.log(oldValue)
console.log(newValue)
if (newValue === undefined || newValue === null){
this.quoteDetail.adjustPartCost = 0;
this.quoteDetail.adjustBomUnYield = 0;
}
this.computeQuoteTotalCost();
},
@ -242,14 +258,13 @@ export default {
<el-checkbox v-model="isShowCost">显示系统自动计算结果</el-checkbox>
<!--系统自动计算结果-->
<el-form :model="quoteDetail" ref="costForm" :rules="rules" label-position="top" label-width="120px">
<fieldset v-if="isShowCost"
<fieldset v-show="isShowCost"
style="margin-top: 2px;border: 1px solid #777;">
<legend>系统自动计算结果(料工费/工具)</legend>
<el-row :gutter="10" >
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="材料标准成本:" prop="partCost" :show-message="false">
<el-input-number style="width: 100%; " :controls="false"
v-model="quoteDetail.partCost" :precision="4" disabled/>
<el-input-number style="width: 100%; " :controls="false" v-model="quoteDetail.partCost" :precision="4" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" v-show="showQuoteCost">
@ -288,13 +303,13 @@ export default {
style="margin-top: 5px;border: 1px solid #777;">
<legend>调整后成本(料工费/工具)</legend>
<el-row :gutter="10" >
<el-col :span="4" v-if="!showQuoteCost">
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="材料标准成本:" prop="adjustPartCost" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.adjustPartCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/>
</el-form-item>
</el-col>
<el-col :span="4" v-if="showQuoteCost">
<el-col :span="4" v-show="showQuoteCost">
<el-form-item label="材料报价成本:" prop="adjustBomUnYield" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.adjustBomUnYield" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/>
@ -354,13 +369,13 @@ export default {
v-model="quoteDetail.otherCost" :disabled="quoteDetail.status === '下达'" :step="0" :precision="4" :min="0"/>
</el-form-item>
</el-col>
<el-col :span="4" v-if="!showQuoteCost">
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="标准总成本:" prop="totalCost" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.totalCost" :step="0" :precision="4" :min="0" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" v-if="showQuoteCost">
<el-col :span="4" v-show="showQuoteCost">
<el-form-item label="报价总成本:" prop="quoteTotalCost" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteTotalCost" :step="0" :precision="4" :min="0" disabled/>
@ -371,25 +386,25 @@ export default {
<fieldset style="margin-top: 5px;border: 1px solid #777;">
<legend>利润</legend>
<el-row :gutter="10" >
<el-col :span="4" v-if="!showQuoteCost">
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="标准利润率%:" prop="profitRate" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.profitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/>
</el-form-item>
</el-col>
<el-col :span="4" v-if="!showQuoteCost">
<el-col :span="4" v-show="!showQuoteCost">
<el-form-item label="标准利润额:" prop="profitAmount" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.profitAmount" :step="0" :precision="4" :min="0" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" v-if="showQuoteCost">
<el-col :span="4" v-show="showQuoteCost">
<el-form-item label="报价利润率%:" prop="quoteProfitRate" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteProfitRate" :disabled="quoteDetail.status === '下达'" :step="0" :min="0"/>
</el-form-item>
</el-col>
<el-col :span="4" v-if="showQuoteCost">
<el-col :span="4" v-show="showQuoteCost">
<el-form-item label="报价利润额:" prop="quoteProfitAmount" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
v-model="quoteDetail.quoteProfitAmount" :step="0" :precision="4" :min="0" disabled/>
@ -399,7 +414,7 @@ export default {
</fieldset>
<fieldset style="margin-top: 5px;border: 1px solid #777;">
<legend>最终价格</legend>
<el-row :gutter="10" v-if="!showQuoteCost">
<el-row :gutter="10" v-show="!showQuoteCost">
<el-col :span="4">
<el-form-item label="标准未税总额:" prop="totalPrice" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"
@ -431,7 +446,7 @@ export default {
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" v-if="showQuoteCost">
<el-row :gutter="10" v-show="showQuoteCost">
<el-col :span="4">
<el-form-item label="报价未税总额:" prop="quoteTotalPrice" :show-message="false">
<el-input-number style="width: 100%;" :controls="false"

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

@ -704,6 +704,24 @@ export default {
this.$message.error(error)
})
},
handleJumpToRouting(row){
if (this.$router.resolve('part-routingManagement').resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
} else {
this.$emit('close')
let params = {
name: "part-routingManagement",
params: {
type:'quote',
partNo:row.partNo,
routingType:row.routingType,
routingRevision:row.routingRevision,
alternativeNo:row.alternativeNo,
}
}
this.$router.push(params)
}
}
},
created() {
@ -757,8 +775,13 @@ export default {
: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 v-if="item.columnProp === 'partNo'">
<el-link @click="handleJumpToRouting(scope.row)">{{ scope.row[item.columnProp] }}</el-link>
</template>
<template v-else>
<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>
</template>
</el-table-column>
</el-table>

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

@ -847,6 +847,7 @@ export default {
})
},
handleSaveQuoteDetailClick(){
// this.$refs.cost.handleValidate();
this.$refs.saveQuoteDetailForm.validate((valid,obj) => {
if (valid){
if (this.saveQuoteDetail.id){
@ -1030,7 +1031,7 @@ export default {
<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></el-input>
<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>
@ -1038,10 +1039,10 @@ export default {
<el-tabs v-model="activeName" v-if="saveQuoteDetail.id" @tab-click="handleClickTab">
<el-tab-pane label="材料" name="bom">
<quote-detail-bom v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-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" v-model:quoteDetail="saveQuoteDetail"></quote-detail-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 v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-tool>
@ -1050,7 +1051,7 @@ export default {
<quote-detail-other v-if="saveVisible" v-model:quoteDetail="saveQuoteDetail"></quote-detail-other>
</el-tab-pane>
<el-tab-pane label="成本&价格" name="cost">
<quote-detail-cost v-model:quoteDetail="saveQuoteDetail"></quote-detail-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">

12
src/views/modules/quote/quoteDetailReport.vue

@ -531,6 +531,11 @@ export default {
</bu-select>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="报价单号">
<el-input v-model="queryForm.quoteVersionNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="客户编码">
<el-input v-model="queryForm.customerNo"></el-input>
@ -546,16 +551,11 @@ export default {
<el-input v-model="queryForm.partNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-col :span="6">
<el-form-item label="产品描述">
<el-input v-model="queryForm.partDesc"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="报价单号">
<el-input v-model="queryForm.quoteVersionNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label=" ">
<el-button type="primary" @click="handleClickProperty">属性</el-button>

Loading…
Cancel
Save