4 changed files with 192 additions and 1 deletions
-
5src/api/quote/quoteDetailCalculation.js
-
176src/views/modules/quote/detail/primary/quoteDetailCalculation.vue
-
5src/views/modules/quote/detail/quoteDetail.vue
-
7src/views/modules/quote/detail/quoteGroupDetail.vue
@ -0,0 +1,5 @@ |
|||
import {createAPI} from "../../utils/httpRequest"; |
|||
|
|||
export const queryQuoteDetailCalculation = (data) => createAPI(`/quote/detail/calculation`,'post',data) |
|||
|
|||
export const updateQuoteDetailCalculation = (data) => createAPI(`/quote/detail/calculation/update`,'post',data) |
|||
@ -0,0 +1,176 @@ |
|||
<script> |
|||
import { |
|||
queryQuoteDetailCalculation, |
|||
updateQuoteDetailCalculation |
|||
} from "../../../../../api/quote/quoteDetailCalculation"; |
|||
|
|||
export default { |
|||
name: "quoteDetailCalculation", |
|||
props: { |
|||
quoteDetail: { |
|||
type: Object, |
|||
required: true |
|||
}, |
|||
}, |
|||
model: { |
|||
prop: "quoteDetail", |
|||
event: "update" |
|||
}, |
|||
data(){ |
|||
return{ |
|||
calculation:{ |
|||
|
|||
}, |
|||
queryLoading:false |
|||
} |
|||
}, |
|||
methods:{ |
|||
handleQueryQuoteDetailCalculation(){ |
|||
let params = { |
|||
quoteDetailId:this.quoteDetail.id, |
|||
} |
|||
this.queryLoading = true |
|||
queryQuoteDetailCalculation(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.calculation = data.row |
|||
}else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
this.queryLoading = false |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
this.queryLoading = false |
|||
}) |
|||
}, |
|||
handleUpdateQuoteDetailCalculation(){ |
|||
this.$alert('确认删除该条报价明细吗?', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(()=>{ |
|||
let params = { |
|||
...this.calculation, |
|||
} |
|||
updateQuoteDetailCalculation(params).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.$message.success(data.msg) |
|||
this.handleQueryQuoteDetailCalculation() |
|||
}else { |
|||
this.$message.error(data.msg) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.$message.error(error) |
|||
}) |
|||
}) |
|||
|
|||
}, |
|||
}, |
|||
created() { |
|||
if (this.quoteDetail && this.quoteDetail.id){ |
|||
this.handleQueryQuoteDetailCalculation(); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<el-form :model="calculation" class="calculation" label-position="top" > |
|||
<el-form-item label="" style="margin-top: 5px"> |
|||
<el-button type="primary" @click="handleUpdateQuoteDetailCalculation">应用</el-button> |
|||
</el-form-item> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
|
|||
</el-col> |
|||
<el-col :span="3"> |
|||
2020 Rate |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
Rate of Paris bonding |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
Rate of CLS |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
DL |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.laborBackendRate"></el-input-number> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.laborParisRate"></el-input-number> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.laborPrintRate"></el-input-number> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
VOH |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.manuBackendRate"></el-input-number> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.manuParisRate"></el-input-number> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.manuPrintRate"></el-input-number> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
FOH |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.machBackendRate"></el-input-number> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.machParisRate"></el-input-number> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.machPrintRate"></el-input-number> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
DL/Lam.+print+etch+slit |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.laborFrontRate"></el-input-number> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
VOH/Lam.+print+etch+slit |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.manuFrontRate"></el-input-number> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="4"> |
|||
FOH/Lam.+print+etch+slit |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-input-number style="width: 100%" :controls="false" :min="0" v-model="calculation.machFrontRate"></el-input-number> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
.calculation /deep/ .el-row .el-col{ |
|||
border-right: 1px solid #717171; |
|||
border-bottom: 1px solid #717171; |
|||
} |
|||
|
|||
.calculation /deep/ .el-row .el-col:nth-child(4n+1){ |
|||
|
|||
} |
|||
.calculation /deep/ .el-row .el-col:nth-child(4n){ |
|||
border-right: none; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue