From 20e285c397547207e7a8134fffc73cdc6bb8d321 Mon Sep 17 00:00:00 2001
From: zhangdingyu <974548713@qq.com>
Date: Mon, 11 Nov 2019 14:47:32 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A6=BB=E7=BA=BF=E5=90=88=E5=90=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OfflineContract/index.vue | 103 +++++++++---------
1 file changed, 52 insertions(+), 51 deletions(-)
diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue
index dc5b2bab..905993eb 100644
--- a/src/views/PurchasingCenter/OfflineContract/index.vue
+++ b/src/views/PurchasingCenter/OfflineContract/index.vue
@@ -220,20 +220,19 @@
查询
- 选入物料
+ 选入物料
- 创建离线合同
-
-
- 生成
-
- 保存
+
-
+
税率:
+
+ 生成离线合同
+
+ 创建离线合同
@@ -324,7 +323,7 @@
-
+
{{ scope.row.数量 }}
@@ -340,13 +339,13 @@
-
+
{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}
-
+
{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}
@@ -362,13 +361,13 @@
-
+
{{ scope.row.备注 || '—' }}
-
+
{{ scope.row.交货期要求 || '—' }}
@@ -1333,46 +1332,48 @@ export default {
})
},
saveContract() {
- this.$confirm('确定保存合同?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.totalPrice = 0
- this.partGroup = []
- this.numGroup = []
- this.priceGroup = []
- const dateGroup = []
- const remarkGroup = []
- for (let i = 0; i < this.tableData3.length; i++) {
- this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
- this.partGroup.push(this.tableData3[i].离线合同明细流水号)
- this.numGroup.push(this.tableData3[i].数量)
- this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
- dateGroup.push(this.tableData3[i].交货期要求)
- remarkGroup.push(this.tableData3[i].备注)
+ console.log(11111)
+ this.totalPrice = 0
+ this.partGroup = []
+ this.numGroup = []
+ this.priceGroup = []
+ const dateGroup = []
+ const remarkGroup = []
+ for (let i = 0; i < this.tableData3.length; i++) {
+ this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
+ this.partGroup.push(this.tableData3[i].离线合同明细流水号)
+ this.numGroup.push(this.tableData3[i].数量)
+ this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
+ dateGroup.push(this.tableData3[i].交货期要求)
+ remarkGroup.push(this.tableData3[i].备注)
+ }
+ saveOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
+ if (response.data[0].result !== '1') {
+ this.$message.error('离线合同保存失败')
+ // this.$message.success('离线合同保存成功')
+ // this.searchTable2()
+ // searchMateriel(this.offlineContractNum).then(response => {
+ // this.tableData3 = response.data
+ // this.tableData3.map(v => {
+ // this.$set(v, '未税总额', 0)
+ // this.$set(v, '含税总额', 0)
+ // !v.单价 ? v.单价 = v.参考价格 : v.单价
+ // this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
+ // })
+ // })
}
- saveOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('离线合同保存成功')
- this.searchTable2()
- searchMateriel(this.offlineContractNum).then(response => {
- this.tableData3 = response.data
- this.tableData3.map(v => {
- this.$set(v, '未税总额', 0)
- this.$set(v, '含税总额', 0)
- !v.单价 ? v.单价 = v.参考价格 : v.单价
- this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
- })
- })
- } else { this.$message.error('离线合同保存失败') }
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消操作'
- })
})
+ // this.$confirm('确定保存合同?', '提示', {
+ // confirmButtonText: '确定',
+ // cancelButtonText: '取消',
+ // type: 'warning'
+ // }).then(() => {
+ // }).catch(() => {
+ // this.$message({
+ // type: 'info',
+ // message: '已取消操作'
+ // })
+ // })
},
doneOfflineContact() { // 生成离线合同
let judge = true