From 3a1f9164fabdadb0a0ebcf200e09def19813788d Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Thu, 7 May 2020 15:10:46 +0800
Subject: [PATCH 1/5] a
---
.../PurchasingCenter/OfflinePartsQuery/index.vue | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/views/PurchasingCenter/OfflinePartsQuery/index.vue b/src/views/PurchasingCenter/OfflinePartsQuery/index.vue
index 8b1cf674..18248735 100644
--- a/src/views/PurchasingCenter/OfflinePartsQuery/index.vue
+++ b/src/views/PurchasingCenter/OfflinePartsQuery/index.vue
@@ -11,6 +11,11 @@
+
+
+ {{ scope.row.状态 }}
+
+
{{ scope.row.名称 }}
@@ -36,6 +41,11 @@
{{ scope.row.数量 }}
+
+
+ {{ scope.row.使用库存数 }}
+
+
{{ scope.row.到货数量 }}
@@ -63,7 +73,7 @@
- {{ scope.row.创建日期 }}
+ {{ scope.row.提交日期 }}
From 8bf9d30d32576ed72e8c1bf712d659331b5f216e Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Thu, 7 May 2020 16:27:01 +0800
Subject: [PATCH 2/5] a
---
.../OfflineContract/index.vue | 76 +++++--------------
1 file changed, 19 insertions(+), 57 deletions(-)
diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue
index 5d2e07bd..917f32bf 100644
--- a/src/views/PurchasingCenter/OfflineContract/index.vue
+++ b/src/views/PurchasingCenter/OfflineContract/index.vue
@@ -99,7 +99,7 @@
-
-
+
@@ -858,13 +858,10 @@ export default {
this.getPerson()
this.projectChange()
this.getSupplier1()
- // this.searchTable2()
- // this.searchTable11()
this.initDirection()
},
methods: {
changefixed(val, index, date) {
- console.log(index, 6666)
let value = '' + val
value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
@@ -876,12 +873,9 @@ export default {
if (value.indexOf('.') < 0 && value !== '') {
value = parseFloat(value).toFixed(2)
}
- console.log(value, this.tableData3[index][date])
this.tableData3[index][date] = value
- console.log(this.tableData3[index][date], 'this.tableData3[index][date]')
},
handleSelection(val, row) {
- console.log(row, 123)
this.tableData00.forEach((item, i) => {
if (item.组件零件流水号 === row.组件零件流水号 && row.组件零件流水号 !== '0') {
if (this.numbers.indexOf(i) === -1) {
@@ -1092,19 +1086,16 @@ export default {
})
},
tabClick(tab) {
- console.log(tab.name, 1111)
if (tab.name === '外购件') {
this.tabName = '外购件'
this.searchTable11()
} else if (tab.name === '标准件') {
this.tabName = '标准件'
- // this.searchTable11()
} else if (tab.name === '基本件') {
this.tabName = '基本件'
this.searchTable12()
} else {
this.tabName = '仓库'
- // this.searchTable22()
}
},
searchTable2() { // 查询离线合同列表
@@ -1112,9 +1103,7 @@ export default {
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
this.loading3 = true
this.tableData3 = []
- console.log(this.id, 'id')
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.offlineContract, this.check4, this.supplierName0, this.id).then(response => {
- console.log(response.data.rows, 99)
this.tableData2 = response.data.rows
this.total2 = response.data.total
this.loading3 = false
@@ -1129,14 +1118,24 @@ export default {
this.searchTable2()
},
changeNumber(row) {
- changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
- if (response.data[0].result === '1') {
- this.$message.success('使用成功')
- this.searchTable11()
+ var max = Number(row.零件数量) > (Number(row.货位存量) - Number(row.占用数量)) ? (Number(row.货位存量) - Number(row.占用数量) + Number(row.使用库存数)) : Number(row.零件数量)
+ if (row.使用库存数) {
+ if (row.使用库存数 > max) {
+ row.使用库存数 = row.使用库存数_原
+ this.$message.error('数量超出范围,请重新输入')
} else {
- this.$message.success('使用失败')
+ changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
+ if (response.data[0].result === '1') {
+ this.$message.success('使用成功')
+ this.searchTable11()
+ } else {
+ this.$message.error('使用失败')
+ }
+ })
}
- })
+ } else {
+ row.使用库存数 = 0
+ }
},
addOfflineContract() { // 创建离线合同
if (this.$refs['form2'] !== undefined) {
@@ -1330,7 +1329,6 @@ export default {
this.离线合同状态 = row.离线合同状态
this.loading4 = true
searchMateriel(this.offlineContractNum).then(response => {
- console.log(response, 'response')
this.tableData3 = response.data
this.tableData3.map(v => {
this.$set(v, '未税总额', 0)
@@ -1339,9 +1337,7 @@ export default {
!v.单价 ? v.单价 = parseFloat(v.参考价格).toFixed(2) : parseFloat(v.单价).toFixed(2)
this.$set(v, '未税单价', (v.单价 / (1 + this.taxRate)).toFixed(2))
})
- console.log(this.tableData3, 'tableData31')
this.loading4 = false
- console.log(response.data.length, 1231231233)
})
this.arrival(row) || this.purchasing(row) ? this.disable = true : this.disable = false // 是否为编辑模式
},
@@ -1470,30 +1466,8 @@ export default {
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))
- // })
- // })
}
})
- // this.$confirm('确定保存合同?', '提示', {
- // confirmButtonText: '确定',
- // cancelButtonText: '取消',
- // type: 'warning'
- // }).then(() => {
- // }).catch(() => {
- // this.$message({
- // type: 'info',
- // message: '已取消操作'
- // })
- // })
},
doneOfflineContact() { // 生成离线合同
this.tongguo = true
@@ -1537,16 +1511,6 @@ export default {
this.$message.success('离线合同生成成功')
this.searchTable2()
this.tableData3 = []
- // 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 // 是否为编辑模式
- // })
} else { this.$message.error('离线合同生成失败') }
})
}).catch(() => {
@@ -1641,12 +1605,12 @@ export default {
this.idNumGroup.push(val[i].id)
this.NumGroup.push(val[i].待采购数量)
}
- console.log(this.materielNumGroup, 222)
},
selectable(row, index) { // 控制某行是否可选
return Number(row.采购状态编号) < 3 && Number(row.是否确认) === 1 // 未采购&&确认物料修改
},
- searchTable11() { // 查询外购件列表
+ // 查询外购件列表
+ searchTable11() {
let check1, check5, check7
this.loading1 = true
this.materialName ? check1 = 1 : check1 = 0
@@ -1705,7 +1669,6 @@ export default {
const supplier = []
this.remarkFilters = []
this.supplierFilters = []
- console.log(response.data.rows, 111)
response.data.rows.map(v => {
if (!remark.includes(v.备注)) {
remark.push(v.备注)
@@ -1733,7 +1696,6 @@ export default {
this.materialName ? check1 = 1 : check1 = 0
this.loading2 = true
searchMaterial22(check1, this.materialName, this.pageCurrent22, this.pageSize22).then(response => {
- console.log(response.data, 3333)
this.tableData22 = response.data.result
this.total22 = parseInt(response.data.output[0].ItemCount)
const supplier = []
From a5cfd813cd2aa8ffbbb102c6f7a9f9cb31931512 Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Thu, 7 May 2020 17:23:05 +0800
Subject: [PATCH 3/5] a
---
src/views/PurchasingCenter/OfflineContract/index.vue | 6 +++---
src/views/PurchasingCenter/OfflinePartsQuery/index.vue | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/views/PurchasingCenter/OfflineContract/index.vue b/src/views/PurchasingCenter/OfflineContract/index.vue
index 917f32bf..5a77234a 100644
--- a/src/views/PurchasingCenter/OfflineContract/index.vue
+++ b/src/views/PurchasingCenter/OfflineContract/index.vue
@@ -329,17 +329,17 @@
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
-
+
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
-
+
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
-
+
{{ scope.row.数量 }}
diff --git a/src/views/PurchasingCenter/OfflinePartsQuery/index.vue b/src/views/PurchasingCenter/OfflinePartsQuery/index.vue
index 18248735..3b6a77da 100644
--- a/src/views/PurchasingCenter/OfflinePartsQuery/index.vue
+++ b/src/views/PurchasingCenter/OfflinePartsQuery/index.vue
@@ -11,7 +11,7 @@
-
+
{{ scope.row.状态 }}
From 1bdaec101228f7b9099cf2539c4ca1b20447934c Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Thu, 7 May 2020 17:28:14 +0800
Subject: [PATCH 4/5] a
---
src/views/PurchasingCenter/OfflineContractSearch/index.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/PurchasingCenter/OfflineContractSearch/index.vue b/src/views/PurchasingCenter/OfflineContractSearch/index.vue
index 0ea60ce2..64f3dcee 100644
--- a/src/views/PurchasingCenter/OfflineContractSearch/index.vue
+++ b/src/views/PurchasingCenter/OfflineContractSearch/index.vue
@@ -138,7 +138,7 @@
| 总计 |
-
+
@@ -327,7 +327,7 @@ export default {
document.getElementById('contractName').innerHTML = row.离线合同名称
document.getElementById('supplier').innerHTML = row.供应商名称
document.getElementById('buyer').innerHTML = row.采购员
- document.getElementById('total').innerHTML = ''
+ // document.getElementById('total').innerHTML = ''
document.getElementById('remark').innerHTML = total + ' 元'
$('#qrCode').html(`
`)
this.useqrcode(row.离线合同编号) // 显示二维码
From 8a56ccf965564a73141bb3ebfdb04572e25222ac Mon Sep 17 00:00:00 2001
From: Vergil <974548713@qq.com>
Date: Thu, 7 May 2020 17:31:47 +0800
Subject: [PATCH 5/5] a
---
.../OfflineContractSearch/index.vue | 21 ++++---------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/src/views/PurchasingCenter/OfflineContractSearch/index.vue b/src/views/PurchasingCenter/OfflineContractSearch/index.vue
index 64f3dcee..d14cc6ed 100644
--- a/src/views/PurchasingCenter/OfflineContractSearch/index.vue
+++ b/src/views/PurchasingCenter/OfflineContractSearch/index.vue
@@ -16,23 +16,10 @@
range-separator="~"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
-
- 查询
+ 查询
- 打回
+ 打回
导出
@@ -40,7 +27,7 @@
-
+
-
+