|
|
@ -87,7 +87,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label=" "> |
|
|
<el-form-item label=" "> |
|
|
<el-button type="primary" @click="getDataList">查 询</el-button> |
|
|
<el-button type="primary" @click="getDataList">查 询</el-button> |
|
|
<el-button type="primary" :loading="saveBatchQuotationLoading" @click="batchQuotation" v-if="defaultFlag">报 价</el-button> |
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handleQuote" v-if="defaultFlag">报 价</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
@ -98,8 +98,6 @@ |
|
|
border |
|
|
border |
|
|
v-loading="dataListLoading" |
|
|
v-loading="dataListLoading" |
|
|
row-key='quotationNo' |
|
|
row-key='quotationNo' |
|
|
element-loading-text = "数据正在加载中" |
|
|
|
|
|
element-loading-spinner = "el-icon-loading" |
|
|
|
|
|
@row-click="quotationClickRow" |
|
|
@row-click="quotationClickRow" |
|
|
@selection-change="selectionQuotation" |
|
|
@selection-change="selectionQuotation" |
|
|
ref="quotationTable" |
|
|
ref="quotationTable" |
|
|
@ -153,6 +151,27 @@ |
|
|
:total="totalPage" |
|
|
:total="totalPage" |
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :visible.sync="quoteVisible" title="待报价信息" :close-on-click-modal="false" append-to-body> |
|
|
|
|
|
<el-table :data="quotationSelections" border height="300"> |
|
|
|
|
|
<el-table-column label="状态" header-align="center" align="center" prop="quotationStatus" min-width="80"/> |
|
|
|
|
|
<el-table-column label="申请单号" header-align="center" align="center" prop="quotationNo" min-width="120"/> |
|
|
|
|
|
<el-table-column label="项目编码" header-align="center" align="left" prop="projectId" min-width="100"/> |
|
|
|
|
|
<el-table-column label="项目名称" header-align="center" align="left" prop="projectName" min-width="120"/> |
|
|
|
|
|
<el-table-column label="物料编码" header-align="center" align="left" prop="testPartNo" min-width="100"/> |
|
|
|
|
|
<el-table-column label="物料名称" header-align="center" align="left" prop="partName" min-width="120"/> |
|
|
|
|
|
<el-table-column label="MOQ" header-align="center" align="right" prop="qty" min-width="80"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input-number v-model="scope.row.qty" :controls="false" :min="0" :step="0"></el-input-number> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<el-footer style="height: 30px;line-height:30px;text-align: center"> |
|
|
|
|
|
<el-button :loading="saveBatchQuotationLoading" type="primary" @click="batchQuotation">确定</el-button> |
|
|
|
|
|
<el-button type="primary" @click="quoteVisible=false">取消</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -516,6 +535,8 @@ export default { |
|
|
columnWidth: 80 |
|
|
columnWidth: 80 |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
quoteVisible:false, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
@ -577,15 +598,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 报价 |
|
|
// 报价 |
|
|
batchQuotation(){ |
|
|
batchQuotation(){ |
|
|
if (this.quotationSelections.length === 0){ |
|
|
|
|
|
this.$message.warning("请选择需报价的单号") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.quotationSelections = this.quotationSelections.map(item=>{ |
|
|
|
|
|
item.createBy = this.$store.state.user.name |
|
|
|
|
|
item.site = this.$store.state.user.site |
|
|
|
|
|
return item; |
|
|
|
|
|
}) |
|
|
|
|
|
this.saveBatchQuotationHeader(this.quotationSelections); |
|
|
this.saveBatchQuotationHeader(this.quotationSelections); |
|
|
}, |
|
|
}, |
|
|
// 批量新增报价信息 |
|
|
// 批量新增报价信息 |
|
|
@ -595,6 +607,7 @@ export default { |
|
|
this.saveBatchQuotationLoading = false; |
|
|
this.saveBatchQuotationLoading = false; |
|
|
if (data.code === 0){ |
|
|
if (data.code === 0){ |
|
|
this.$message.success(data.msg); |
|
|
this.$message.success(data.msg); |
|
|
|
|
|
this.quoteVisible = false; |
|
|
this.$refs.quotationTable.clearSelection(); |
|
|
this.$refs.quotationTable.clearSelection(); |
|
|
this.$router.push({name:"quote-index",params:{ids:data.rows},}) |
|
|
this.$router.push({name:"quote-index",params:{ids:data.rows},}) |
|
|
}else { |
|
|
}else { |
|
|
@ -604,6 +617,19 @@ export default { |
|
|
this.saveBatchQuotationLoading = false; |
|
|
this.saveBatchQuotationLoading = false; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleQuote(){ |
|
|
|
|
|
if (this.quotationSelections.length === 0){ |
|
|
|
|
|
this.$message.warning("请选择需报价的单号") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.quotationSelections = this.quotationSelections.map(item=>{ |
|
|
|
|
|
item.qty = 1 |
|
|
|
|
|
item.createBy = this.$store.state.user.name |
|
|
|
|
|
item.site = this.$store.state.user.site |
|
|
|
|
|
return item; |
|
|
|
|
|
}) |
|
|
|
|
|
this.quoteVisible = true; |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
|
|
|
@ -617,6 +643,11 @@ export default { |
|
|
}, |
|
|
}, |
|
|
"searchData.projectId"(newVal,oldVal){ |
|
|
"searchData.projectId"(newVal,oldVal){ |
|
|
this.searchData.projectId = newVal.toUpperCase(); |
|
|
this.searchData.projectId = newVal.toUpperCase(); |
|
|
|
|
|
}, |
|
|
|
|
|
quoteVisible(newVal,oldVal){ |
|
|
|
|
|
if (newVal === false){ |
|
|
|
|
|
this.saveBatchQuotationLoading = false; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -636,4 +667,8 @@ export default { |
|
|
/deep/ .el-input--mini .el-input__icon{ |
|
|
/deep/ .el-input--mini .el-input__icon{ |
|
|
line-height: 20px; |
|
|
line-height: 20px; |
|
|
} |
|
|
} |
|
|
|
|
|
.el-table /deep/ .cell{ |
|
|
|
|
|
height: auto; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |