This commit is contained in:
zhangdingyu
2018-11-27 16:12:54 +08:00
7 changed files with 53 additions and 31 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

@@ -3,7 +3,7 @@ import axios from 'axios'
// import store from '../store' // import store from '../store'
// import { getToken } from '@/utils/auth' // import { getToken } from '@/utils/auth'
export const wsuri = `ws://192.168.1.128:61101//WebMoudule//websocket` export const wsuri = `ws://192.168.1.149:61101//WebMoudule//websocket`
export const name = `OP8888` export const name = `OP8888`
// 创建axios实例 // 创建axios实例
@@ -12,11 +12,11 @@ export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx`
const service = axios.create({ const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.112:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,git
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间
}) })

View File

@@ -403,7 +403,7 @@ export default {
const data = response.data.rows const data = response.data.rows
console.log(data) console.log(data)
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].审批通过 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false data[i].审批通过 === '1' || data[i].审批通过 === '2' ? data[i].是否禁用 = true : data[i].是否禁用 = false
} }
this.tableDataExchange = data this.tableDataExchange = data
this.total1 = response.data.total this.total1 = response.data.total

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') {
@@ -568,5 +581,8 @@ export default {
</script> </script>
<style scoped> <style scoped>
.code{
width:120px!important;
height: auto!important;
}
</style> </style>

View File

@@ -184,6 +184,7 @@ export default {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号) ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功') this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') } } else { this.$message.error('出库失败') }
}) })
} else if (row.零件类型 === 1 || row.零件类型 === 2) { } else if (row.零件类型 === 1 || row.零件类型 === 2) {
@@ -191,6 +192,7 @@ export default {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
ListDetailOut(row.领料单明细流水号) ListDetailOut(row.领料单明细流水号)
this.$message.success('出库成功') this.$message.success('出库成功')
this.searchListDetailt()
} else { this.$message.error('出库失败') } } else { this.$message.error('出库失败') }
}) })
} else { } else {
@@ -198,10 +200,10 @@ export default {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('出库成功') this.$message.success('出库成功')
ListDetailOut(row.领料单明细流水号) ListDetailOut(row.领料单明细流水号)
this.searchListDetailt()
} else { this.$message.error('增加失败') } } else { this.$message.error('增加失败') }
}) })
} }
this.searchListDetailt()
} }
} }
} }

View File

@@ -787,6 +787,7 @@ export default {
this.materialType = row.零件类型名称 this.materialType = row.零件类型名称
this.materialNumber = row.零件图号 this.materialNumber = row.零件图号
this.enableOut = row.可出库数量 this.enableOut = row.可出库数量
this.purchaseDetailNum = row.采购合同明细流水号
}, },
addBasicListDetail(formName) { addBasicListDetail(formName) {
if (this.pickingListNumberx === '') { if (this.pickingListNumberx === '') {
@@ -796,9 +797,10 @@ export default {
} else { } else {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber, 0, this.materialLocate).then(response => { addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialNumber, this.materialType, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
this.searchPartinfo()
} else { } else {
this.$message.error('增加失败') this.$message.error('增加失败')
} }
@@ -842,6 +844,7 @@ export default {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => { addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form2.OutNumber, this.partType, this.form2.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 0, this.materialLocate).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
this.searchPartinfo()
} else { } else {
this.$message.error('增加失败') this.$message.error('增加失败')
} }
@@ -884,6 +887,7 @@ export default {
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1, this.materialLocate).then(response => { addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form3.OutNumber, this.partType, this.form3.outNote, this.craftplannumber, this.receive, this.teamPart, this.purchaseDetailNum, this.locatenumber, 1, this.materialLocate).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
this.searchPartinfo()
} else { } else {
this.$message.error('增加失败') this.$message.error('增加失败')
} }

View File

@@ -29,7 +29,7 @@
</el-table-column> </el-table-column>
<el-table-column label="零件投产数量" align="center"> <el-table-column label="零件投产数量" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.投产数量 }} {{ scope.row.投产数量 }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>