This commit is contained in:
lixin
2018-11-26 17:29:48 +08:00
parent 192d07afeb
commit 0ba4e6d735
2 changed files with 39 additions and 23 deletions

View File

@@ -79,7 +79,7 @@ export function alterLocate(num, num0, num1, num2, num3, num4) {
data: { data: {
type: '2', type: '2',
name: '库存管理_货位主文件_修改数据', name: '库存管理_货位主文件_修改数据',
param: '货位流水号=' + num + '货位名称=' + num0 + '&工作中心=' + num1 + '&仓库流水号=' + num2 + '&永久=' + num3 + '&不可用量=' + num4 param: '货位流水号=' + num + '&货位名称=' + num0 + '&工作中心=' + num1 + '&仓库流水号=' + num2 + '&永久=' + num3 + '&不可用量=' + num4
} }
}) })
} }

View File

@@ -40,12 +40,6 @@
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="budget" label="领用人" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.领用人 }}
</template>
</el-table-column>
<el-table-column label="操作" min-width="100" align="center" fixed="right"> <el-table-column label="操作" min-width="100" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@@ -99,10 +93,10 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="追溯码" width="150"> <el-table-column align="center" label="追溯码" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<canvas :id="canvas[scope.$index]"/> <canvas :id="canvas[scope.$index]" class="code"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" min-width="100" align="center" fixed="right"> <el-table-column label="操作" width="200px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@@ -221,10 +215,13 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否永久" prop="永久"> <el-form-item label="是否永久" prop="永久">
<el-input <el-select v-model="form2.永久" clearable filterable placeholder="请选择" style="width: 200px;margin-right:10px">
v-model="form2.永久" <el-option
size="small" v-for="item in options"
style="width:200px"/> :key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@@ -292,7 +289,15 @@ export default {
LocateNumber: '', LocateNumber: '',
listLoading: '', listLoading: '',
PeopleValue: '', PeopleValue: '',
People: [] People: [],
canvas: [],
options: [{
value: '1',
label: '是'
}, {
value: '0',
label: '否'
}]
} }
}, },
created() { created() {
@@ -338,7 +343,9 @@ export default {
getLocate() { getLocate() {
this.tableData2 = [] this.tableData2 = []
searchLocate(this.wareHouse).then(response => { 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({ this.tableData2.push({
货位流水号: response.data[i].货位流水号, 货位流水号: response.data[i].货位流水号,
货位名称: response.data[i].货位名称, 货位名称: response.data[i].货位名称,
@@ -347,12 +354,21 @@ export default {
不可用量: response.data[i].不可用量, 不可用量: response.data[i].不可用量,
仓库名称: 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() { ADD() {
this.form = []
if (this.$refs['form'] !== undefined) { if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
} }
@@ -400,11 +416,6 @@ export default {
}, },
// 编辑 // 编辑
handleEdit(index, row, formName) { handleEdit(index, row, formName) {
console.log(row)
this.count2 = this.count2 + 1
if (this.count2 !== 1) {
this.$refs[formName].resetFields()
}
this.temp = 2 this.temp = 2
this.dialogFormVisible = true this.dialogFormVisible = true
this.form.WarehouseNumber = row.仓库编号 this.form.WarehouseNumber = row.仓库编号
@@ -456,6 +467,7 @@ export default {
}, },
// 点击增加货位 // 点击增加货位
ADDLocate() { ADDLocate() {
this.form2 = []
if (this.$refs['form2'] !== undefined) { if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields() this.$refs['form2'].resetFields()
} }
@@ -511,6 +523,7 @@ export default {
}, },
// 执行修改货位 // 执行修改货位
LocateEdit() { 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 => { alterLocate(this.LocateNumber, this.form2.货位名称, this.form2.工作中心, this.form2.仓库流水号, this.form2.永久, this.form2.不可用量).then(response => {
this.dialogFormVisible2 = false this.dialogFormVisible2 = false
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
@@ -547,7 +560,7 @@ export default {
// 生成的二维码内容,可以添加变量 // 生成的二维码内容,可以添加变量
this.QueryDetail = this.num this.QueryDetail = this.num
var canvas = document.getElementById('canvas') var canvas = document.getElementById('canvas')
QRCode.toCanvas(canvas, this.QueryDetail, function (error) { QRCode.toCanvas(canvas, this.QueryDetail, function(error) {
if (error) console.error(error) if (error) console.error(error)
console.log('success!') console.log('success!')
}) })
@@ -568,5 +581,8 @@ export default {
</script> </script>
<style scoped> <style scoped>
.code{
width:120px!important;
height: auto!important;
}
</style> </style>