diff --git a/debug.log b/debug.log
index af455d92..d69cf9be 100644
--- a/debug.log
+++ b/debug.log
@@ -1,3 +1,4 @@
[0301/083149.303:ERROR:http_transport_win.cc(273)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0515/102246.688:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
[0531/081503.881:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
+[0605/094355.406:ERROR:http_transport_win.cc(276)] WinHttpSendRequest: 操作成功完成。 (0x0)
diff --git a/src/api/ManufacturingCenter/ProcessingStatus.js b/src/api/ManufacturingCenter/ProcessingStatus.js
index aa1e8c88..317e62b8 100644
--- a/src/api/ManufacturingCenter/ProcessingStatus.js
+++ b/src/api/ManufacturingCenter/ProcessingStatus.js
@@ -75,7 +75,7 @@ inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝 on 褰撳墠鍔犲伐宸ュ簭琛.
inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭 on 褰撳墠鍔犲伐宸ュ簭琛.宸ヨ壓璁″垝娴佹按鍙 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ヨ壓璁″垝娴佹按鍙 and 褰撳墠鍔犲伐宸ュ簭琛.寰呭姞宸ュ伐搴忛『搴 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ュ簭椤哄簭
inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍚嶇О on 杞﹂棿鐢熶骇绠$悊宸ヨ壓_鍩虹琛╛宸ヨ壓鍚嶇О.宸ヨ壓缂栧彿 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭.宸ヨ壓缂栧彿
inner join 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘 on 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘.宸ヨ壓璁″垝娴佹按鍙 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ヨ壓璁″垝.宸ヨ壓璁″垝娴佹按鍙 and 褰撳墠鍔犲伐宸ュ簭琛.寰呭姞宸ュ伐搴忛『搴 = 杞﹂棿鐢熶骇绠$悊宸ヨ壓_闆朵欢宸ュ簭_瑙嗗浘.宸ュ簭椤哄簭
-where 缁勪欢娴佹按鍙 = ${num}`
+where 鏈哄簥娴佹按鍙 = ${num}`
}
})
}
diff --git a/src/api/PurchasingCenter/OfflineContract.js b/src/api/PurchasingCenter/OfflineContract.js
index 11414bc7..37be21be 100644
--- a/src/api/PurchasingCenter/OfflineContract.js
+++ b/src/api/PurchasingCenter/OfflineContract.js
@@ -135,26 +135,26 @@ export function deleteMateriel(num) {
})
}
// 淇濆瓨绂荤嚎鍚堝悓
-export function saveOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
+export function saveOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup, taxRate) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '閲囪喘绠$悊_绂荤嚎鍚堝悓_淇濆瓨鍚堝悓',
- param: `绂荤嚎鍚堝悓娴佹按鍙=${contractNum}&鍚堝悓鎬婚=${total}&绂荤嚎鍚堝悓鏄庣粏娴佹按鍙风粍=${partGroup}&鏁伴噺缁=${numGroup}&鍗曚环缁=${priceGroup}&浜よ揣鏈熻姹傜粍=${dateGroup}&澶囨敞缁=${remarkGroup}`
+ param: `绂荤嚎鍚堝悓娴佹按鍙=${contractNum}&鍚堝悓鎬婚=${total}&绂荤嚎鍚堝悓鏄庣粏娴佹按鍙风粍=${partGroup}&鏁伴噺缁=${numGroup}&鍗曚环缁=${priceGroup}&浜よ揣鏈熻姹傜粍=${dateGroup}&澶囨敞缁=${remarkGroup}&绋庣巼=${taxRate}`
}
})
}
// 鐢熸垚绂荤嚎鍚堝悓
-export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup) {
+export function doneOfflineContact(contractNum, total, partGroup, numGroup, priceGroup, dateGroup, remarkGroup, taxRate) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '閲囪喘绠$悊_绂荤嚎鍚堝悓_鐢熸垚鍚堝悓',
- param: `绂荤嚎鍚堝悓娴佹按鍙=${contractNum}&鍚堝悓鎬婚=${total}&绂荤嚎鍚堝悓鏄庣粏娴佹按鍙风粍=${partGroup}&鏁伴噺缁=${numGroup}&鍗曚环缁=${priceGroup}&浜よ揣鏈熻姹傜粍=${dateGroup}&澶囨敞缁=${remarkGroup}`
+ param: `绂荤嚎鍚堝悓娴佹按鍙=${contractNum}&鍚堝悓鎬婚=${total}&绂荤嚎鍚堝悓鏄庣粏娴佹按鍙风粍=${partGroup}&鏁伴噺缁=${numGroup}&鍗曚环缁=${priceGroup}&浜よ揣鏈熻姹傜粍=${dateGroup}&澶囨敞缁=${remarkGroup}&绋庣巼=${taxRate}`
}
})
}
diff --git a/src/views/ManufacturingCenter/ProcessingStatus/index.vue b/src/views/ManufacturingCenter/ProcessingStatus/index.vue
index 73b88622..d9e850ea 100644
--- a/src/views/ManufacturingCenter/ProcessingStatus/index.vue
+++ b/src/views/ManufacturingCenter/ProcessingStatus/index.vue
@@ -391,11 +391,11 @@ export default {
}))
},
exportExcel() {
- if (!this.Group) {
- this.$message.warning('璇烽夋嫨鍒嗙粍')
+ if (!this.Machine) {
+ this.$message.warning('璇烽夋嫨鏈哄簥')
return
}
- getExport(this.Group).then(res => {
+ getExport(this.Machine).then(res => {
console.log(res.data)
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['鏈哄簥', '缁勫彿', '鍥惧彿鍙婅鏍', '鍒跺搧鍚嶇О', '璁″垝鏁', '鏉愭枡', '褰撳墠宸ュ簭鍚']
diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue
index 0f7f426b..4cbe4b4f 100644
--- a/src/views/PurchasingCenter/OfflineContract/index.vue
+++ b/src/views/PurchasingCenter/OfflineContract/index.vue
@@ -344,6 +344,17 @@
@current-change="handleCurrentChange2"/>
鐢熸垚
淇濆瓨
+
+
+
+
+
绋庣巼:
@@ -381,14 +392,26 @@
{{ scope.row.鍙傝冧环鏍 }}
-
+
-
+
+ {{ (scope.row.鍗曚环 / (1 + taxRate)).toFixed(2) }}
-
+
- {{ (Number(scope.row.鍗曚环||0) * Number(scope.row.鏁伴噺||0)).toFixed(2) }}
+
+ {{ (scope.row.鏈◣鍗曚环 * (1 + taxRate)).toFixed(2) }}
+
+
+
+
+ {{ hasTax==='鏈◣' ? scope.row.鏈◣鎬婚 = (Number(scope.row.鏁伴噺) * Number(scope.row.鏈◣鍗曚环)).toFixed(2) : scope.row.鏈◣鎬婚 = (scope.row.鍚◣鎬婚 / (1+taxRate)).toFixed(2) }}
+
+
+
+
+ {{ hasTax==='鍚◣' ? scope.row.鍚◣鎬婚 = (Number(scope.row.鏁伴噺) * Number(scope.row.鍗曚环)).toFixed(2) : scope.row.鍚◣鎬婚 = (scope.row.鏈◣鎬婚 * (1+taxRate)).toFixed(2) }}
@@ -669,6 +692,8 @@ export default {
name: '', // 绂荤嚎鍚堝悓
data() {
return {
+ hasTax: '鍚◣',
+ taxRate: 0.13,
source: [
{
text: 'BZ',
@@ -1052,7 +1077,10 @@ export default {
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('鏁版嵁鍗犵敤锛屽垹闄ゅけ璐') }
@@ -1124,7 +1152,10 @@ export default {
console.log(response.data)
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))
})
})
Number(row.绂荤嚎鍚堝悓鐘舵) !== 1 ? this.disable = true : this.disable = false // 鏄惁涓虹紪杈戞ā寮
@@ -1135,8 +1166,23 @@ export default {
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '鎬讳环'
- } else if (index === 7) {
- const values = data.map(item => Number(Number(item['鍗曚环']) * Number(item['鏁伴噺'])))
+ } else if (index === 9) {
+ const values = data.map(item => Number(item['鏈◣鎬婚']))
+ if (!values.every(value => isNaN(value))) {
+ sums[index] = values.reduce((prev, curr) => {
+ const value = Number(curr)
+ if (!isNaN(value)) {
+ return Number((prev + curr).toFixed(2))
+ } else {
+ return Number((prev).toFixed(2))
+ }
+ }, 0)
+ sums[index] += ' 鍏'
+ } else {
+ sums[index] = 'N/A'
+ }
+ } else if (index === 10) {
+ const values = data.map(item => Number(item['鍚◣鎬婚']))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
@@ -1168,7 +1214,10 @@ export default {
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('閫夊叆澶辫触') }
@@ -1187,7 +1236,10 @@ export default {
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('绉婚櫎澶辫触') }
@@ -1215,18 +1267,21 @@ export default {
this.totalPrice += this.tableData3[i].鏁伴噺 * this.tableData3[i].鍗曚环
this.partGroup.push(this.tableData3[i].绂荤嚎鍚堝悓鏄庣粏娴佹按鍙)
this.numGroup.push(this.tableData3[i].鏁伴噺)
- this.priceGroup.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).then(response => {
+ 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('绂荤嚎鍚堝悓淇濆瓨澶辫触') }
@@ -1254,18 +1309,21 @@ export default {
this.totalPrice += this.tableData3[i].鏁伴噺 * this.tableData3[i].鍗曚环
this.partGroup.push(this.tableData3[i].绂荤嚎鍚堝悓鏄庣粏娴佹按鍙)
this.numGroup.push(this.tableData3[i].鏁伴噺)
- this.priceGroup.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].澶囨敞)
}
- doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup).then(response => {
+ doneOfflineContact(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))
})
this.disable = true // 鏄惁涓虹紪杈戞ā寮
})