diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue
index 412f430..22cac8b 100644
--- a/src/views/modules/quotation/requestForQuote.vue
+++ b/src/views/modules/quotation/requestForQuote.vue
@@ -2,7 +2,6 @@
-
@@ -131,13 +130,7 @@
-
-
-
-
-
-
-
+
-
+
-
-
+
+
录入报价结果
提交客户报价
客户回复
-
+
-
+
-
+
-
+
-
+
@@ -470,12 +463,12 @@
-
+
-
+
-
+
@@ -490,14 +483,15 @@
-
+
-
+
+
@@ -1271,7 +1265,7 @@
},
mounted () {
this.$nextTick(() => {
- this.height = window.innerHeight / 2 - 30;
+ this.height = window.innerHeight / 2 - 240;
/*第二个表格高度的动态调整*/
this.secondHeight = window.innerHeight / 2 - 206;
})
@@ -1375,6 +1369,7 @@
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
+ this.$refs.selectDiv.setLengthAll( this.dataList.length)
//判断是否全部存在数据
if(this.totalPage > 0){
//设置选中行
@@ -1663,19 +1658,21 @@
// ======== 列表操作方法 ========
/**
- * 单机选中客户信息
+ * 单机选中报价信息
* @param row
*/
quotationClickRow (row) {
+ this.$refs.quotationTable.toggleRowSelection(row);
this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
this.quotationDetailData = row
},
/**
- * 复选客户信息
+ * 复选报价信息
* @param val
*/
selectionQuotation (val) {
this.quotationSelections = val
+ this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
},
// ======== 报价结果相关方法 ========
@@ -1693,10 +1690,9 @@
updateBy: this.$store.state.user.name
}
this.quotationSelections.forEach(val => {
- this.enterResultData.quotationNo += val.quotationNo + ';'
+ this.enterResultData.quotationNo += ';' + val.quotationNo
})
this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
- console.log()
this.enterResultModalFlag = true
},
/**
@@ -1711,23 +1707,50 @@
this.$message.warning('请填写报价结果信息!')
return
}
- saveQuotationResult(this.enterResultData).then(({data}) => {
- if (data && data.code === 0) {
- this.getQuotationResult()
- this.enterResultModalFlag = false
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
+ if (this.quotationSelections.length > 1) {
+ this.$confirm(`是否录入多条报价结果?`, '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ saveQuotationResult(this.enterResultData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getQuotationResult()
+ this.enterResultModalFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
}
})
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
- })
+ }).catch(() => {
+ })
+ } else {
+ saveQuotationResult(this.enterResultData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getQuotationResult()
+ this.enterResultModalFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
},
/**
* 提交客户报价