Browse Source

20240417

java8
qiezi 9 months ago
parent
commit
cdacea3047
  1. 33
      src/views/modules/quote/detail/quoteDetail.vue
  2. 60
      src/views/modules/quote/detail/quoteGroupDetail.vue
  3. 72
      src/views/modules/quote/index.vue

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

@ -114,13 +114,13 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2CostModel',
serialNumber: '5011Table2PartNo',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'costModel',
columnProp: 'partNo',
headerAlign: 'center',
align: 'center',
columnLabel: 'Cost Model',
align: 'left',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -132,38 +132,38 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartNo',
serialNumber: '5011Table2PartDesc',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'partNo',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'center',
columnLabel: '物料编码',
align: 'left',
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
columnWidth: 320
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartDesc',
serialNumber: '5011Table2CostModel',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'partDesc',
columnProp: 'costModel',
headerAlign: 'center',
align: 'center',
columnLabel: '物料名称',
align: 'left',
columnLabel: 'Cost Model',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 320
columnWidth: 80
},
{
userId: this.$store.state.user.name,
@ -173,7 +173,7 @@ export default {
tableName: '报价详情信息表',
columnProp: 'qty',
headerAlign: 'center',
align: 'center',
align: 'left',
columnLabel: '报价数量',
columnHidden: false,
columnImage: false,
@ -571,6 +571,9 @@ export default {
if (data && data.code === 0){
this.$message.success(data.msg);
this.handleQueryQuoteDetail();
if (this.quoteGroupDetail && this.saveQuoteDetail.quoteGroupDetailId === this.quoteGroupDetail.id){
this.$emit('reload')
}
this.saveVisible = false;
}else {
this.$message.warning(data.msg);

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

@ -37,6 +37,10 @@ export default {
authFlag:{
type:Boolean,
default:false
},
selection:{
type:Boolean,
default:false
}
},
data(){
@ -105,16 +109,17 @@ export default {
costModel: [{required: true, message: '请选择Cost Model', trigger: ['blur','change']}],
},
columns: [
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2CostModel',
serialNumber: '5011Table2PartNo',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'costModel',
columnProp: 'partNo',
headerAlign: 'center',
align: 'center',
columnLabel: 'Cost Model',
align: 'left',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -126,38 +131,38 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartNo',
serialNumber: '5011Table2PartDesc',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'partNo',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'center',
columnLabel: '物料编码',
align: 'left',
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
columnWidth: 320
},
{
userId: this.$store.state.user.name,
functionId: 5011,
serialNumber: '5011Table2PartDesc',
serialNumber: '5011Table2CostModel',
tableId: '5011Table2',
tableName: '报价详情信息表',
columnProp: 'partDesc',
columnProp: 'costModel',
headerAlign: 'center',
align: 'center',
columnLabel: '物料名称',
align: 'left',
columnLabel: 'Cost Model',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 320
columnWidth: 80
},
{
userId: this.$store.state.user.name,
@ -597,6 +602,19 @@ export default {
this.drawerVisible = false
this.saveVisible = false
},
handleSelectionChange(val){
let ids = val.map((item)=>item.id);
this.$emit('handleSelectionChange', ids);
}
},
created() {
if (this.selection){
if (this.quote.id){
this.handleQueryQuoteDetail();
}else {
this.dataList = [];
}
}
},
watch:{
quote(newVal,oldVal){
@ -621,8 +639,15 @@ export default {
<div class="rq">
<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
v-loading="queryLoading"
border
:data="dataList"
style="width: 100%;margin-top: 5px"
:height="height"
@selection-change="handleSelectionChange">
<el-table-column v-if="!selection" type="index" width="55" align="center" label="序号"></el-table-column>
<el-table-column v-else type="selection" align="center" width="55"/>
<el-table-column
v-for="(item,index) in columns" :key="index"
:sortable="item.columnSortable"
@ -805,7 +830,8 @@ export default {
:quote-group-detail="quoteGroupDetail"
:auth-flag="false"
:height="'33vh'"
@currentQuoteDetailItemNo="handleCurrentQuoteDetailItemNo">
@currentQuoteDetailItemNo="handleCurrentQuoteDetailItemNo"
@reload = "handleQueryQuoteDetail">
</quote-detail>
<div slot="footer" class="dialog-footer">

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

@ -377,6 +377,12 @@ export default {
insideInquiryVisible:false,
detailFlag:false,
updateGroupDetailVisible:false,
currentRow:{
},
selectionUpdateList:[],
}
},
methods:{
@ -586,28 +592,42 @@ export default {
})
},
handleUpdateStatus(row){
if (row.enStatus === '下达'){
this.currentRow = {
...row
}
this.updateGroupDetailVisible = true
return
}
this.$confirm(`确定要${row.enStatus}该报价单吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
let params = {
...row,
this.updateQuoteStatus(row)
})
},
updateQuoteStatus(row){
let params = {
...row,
}
if (this.selectionUpdateList){
params.groupIds = this.selectionUpdateList
}
updateQuoteStatus(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.handleSearch();
this.currentQuote = {
...row,
status:row.enStatus
};
this.updateGroupDetailVisible = false
}else {
this.$message.warning(data.msg)
}
updateQuoteStatus(params).then(({data})=>{
if (data && data.code === 0){
this.$message.success(data.msg)
this.handleSearch();
this.currentQuote = {
...row,
status:row.enStatus
}
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
}).catch((error)=>{
this.$message.error(error)
})
},
handleQueryById(row){
@ -805,6 +825,9 @@ export default {
clearModalData(field){
this.saveQuote[field] = ''
},
handleSelection(val){
this.selectionUpdateList = val
},
},
created() {
this.quoteForm = {
@ -1060,6 +1083,23 @@ export default {
<el-dialog title="询价申请" v-drag :visible.sync="insideInquiryVisible" width="1000px" modal-append-to-body :close-on-click-modal="false">
<quotes v-if="insideInquiryVisible" :is-component="true" :height="400" @dblclick="handleInquiryDblClick"></quotes>
</el-dialog>
<el-dialog title="报价明细下达" v-drag :visible.sync="updateGroupDetailVisible" width="1000px" :close-on-click-modal="false">
<quote-group-detail
v-if="updateGroupDetailVisible"
:quote="currentRow"
:selection="true"
:auth-flag="true"
:height="400"
@handleSelectionChange="handleSelection"
></quote-group-detail>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateQuoteStatus(currentRow)"> </el-button>
<el-button @click="updateGroupDetailVisible = false"> </el-button>
</div>
</el-dialog>
<customer-table ref="customerTable" v-if="saveVisible" v-model="customerVisible" :height="300" @dblclick="customerDblClick" :customer-no="saveQuote.customerNo"></customer-table>
<project-table ref="projectTable" v-if="saveVisible" v-model="projectVisible" :height="300" @dblclick="projectDblClick" :customer-no="saveQuote.customerNo" :project-no="saveQuote.projectNo" :bu-id="saveQuote.buId"></project-table>
<choose-list-eam ref="baseList" @getBaseData="getBaseData"></choose-list-eam>

Loading…
Cancel
Save