diff --git a/src/api/Inventory/InventoryManagement.js b/src/api/Inventory/InventoryManagement.js
index 99fdef63..dda1f073 100644
--- a/src/api/Inventory/InventoryManagement.js
+++ b/src/api/Inventory/InventoryManagement.js
@@ -79,7 +79,7 @@ export function alterLocate(num, num0, num1, num2, num3, num4) {
data: {
type: '2',
name: '库存管理_货位主文件_修改数据',
- param: '货位流水号=' + num + '货位名称=' + num0 + '&工作中心=' + num1 + '&仓库流水号=' + num2 + '&永久=' + num3 + '&不可用量=' + num4
+ param: '货位流水号=' + num + '&货位名称=' + num0 + '&工作中心=' + num1 + '&仓库流水号=' + num2 + '&永久=' + num3 + '&不可用量=' + num4
}
})
}
diff --git a/src/views/Inventory/InventoryManagement/index.vue b/src/views/Inventory/InventoryManagement/index.vue
index 7f1fa79d..7a2bb9d1 100644
--- a/src/views/Inventory/InventoryManagement/index.vue
+++ b/src/views/Inventory/InventoryManagement/index.vue
@@ -40,12 +40,6 @@
{{ scope.row.备注 }}
-
-
- {{ scope.row.领用人 }}
-
-
-
-
+
-
+
-
+
+
+
@@ -292,7 +289,15 @@ export default {
LocateNumber: '',
listLoading: '',
PeopleValue: '',
- People: []
+ People: [],
+ canvas: [],
+ options: [{
+ value: '1',
+ label: '是'
+ }, {
+ value: '0',
+ label: '否'
+ }]
}
},
created() {
@@ -338,7 +343,9 @@ export default {
getLocate() {
this.tableData2 = []
searchLocate(this.wareHouse).then(response => {
- for (let i = 0; i < response.data.length; i++) {
+ const data = response.data
+ for (let i = 0; i < data.length; i++) {
+ this.canvas.push(response.data[i].货位流水号.toString())
this.tableData2.push({
货位流水号: response.data[i].货位流水号,
货位名称: response.data[i].货位名称,
@@ -347,12 +354,21 @@ export default {
不可用量: response.data[i].不可用量,
仓库名称: response.data[i].仓库名称
})
- this.useqrcode ()
}
+ return data
+ }).then(res => {
+ for (let i = 0; i < res.length; i++) {
+ QRCode.toCanvas(document.getElementById(this.canvas[i]), res[i].货位流水号.toString(), function(error) {
+ if (error) console.error(error)
+ console.log('success!')
+ })
+ }
+ this.tableData2 = res
})
},
// 点击增加仓库
ADD() {
+ this.form = []
if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields()
}
@@ -400,11 +416,6 @@ export default {
},
// 编辑
handleEdit(index, row, formName) {
- console.log(row)
- this.count2 = this.count2 + 1
- if (this.count2 !== 1) {
- this.$refs[formName].resetFields()
- }
this.temp = 2
this.dialogFormVisible = true
this.form.WarehouseNumber = row.仓库编号
@@ -456,6 +467,7 @@ export default {
},
// 点击增加货位
ADDLocate() {
+ this.form2 = []
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
@@ -511,6 +523,7 @@ export default {
},
// 执行修改货位
LocateEdit() {
+ console.log(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量)
alterLocate(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量).then(response => {
this.dialogFormVisible2 = false
if (response.data[0].result === '1') {
@@ -547,7 +560,7 @@ export default {
// 生成的二维码内容,可以添加变量
this.QueryDetail = this.num
var canvas = document.getElementById('canvas')
- QRCode.toCanvas(canvas, this.QueryDetail, function (error) {
+ QRCode.toCanvas(canvas, this.QueryDetail, function(error) {
if (error) console.error(error)
console.log('success!')
})
@@ -568,5 +581,8 @@ export default {