Commit 7621ad78 authored by hubaoshan's avatar hubaoshan

pd

parent f3f9026a
......@@ -28,7 +28,6 @@ export function getIncomeWmsBox(businessId) {
})
}
// 3. 新增库存管理
export function addIncomeWmsBox(data) {
data = Qs.stringify(data)
......
import request from '@/utils/request'
import Qs from 'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询库存管理列表
export function listIncomeWmsBoxPd(query) {
return request({
url: '/incomewmsboxpd/list',
method: 'get',
params: query
})
}
// 2. 查询库存管理详细信息
export function getIncomeWmsBoxPd(businessId) {
return request({
url: '/incomewmsboxpd/detail/' + businessId,
method: 'get'
})
}
// 3. 新增库存管理
export function addIncomeWmsBoxPd(data) {
data = Qs.stringify(data)
return request({
url: '/incomewmsboxpd/add',
method: 'post',
data: data
})
}
// 4. 修改库存管理
export function updateIncomeWmsBoxPd(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/incomewmsboxpd/updatepd/' + businessId,
method: 'put',
data
})
}
// 5. 逻辑删除库存管理
export function delIncomeWmsBoxPd(businessId) {
return request({
url: '/incomewmsboxpd/deleteLogical/' + businessId,
method: 'delete'
})
}
// 6. 导出库存管理
export function exportIncomeWmsBoxPd(query) {
return request({
url: '/incomewmsboxpd/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 7.获取单号
export function getJcCode() {
return request({
url: '/incomewmsboxpd/getJcCode',
method: 'get'
})
}
// 8. 查询满足条件的条数
export function queryPass(lot) {
return request({
url: '/incomewmsboxpd/queryPass/' + lot,
method: 'get'
})
}
// 9. 批量新增库存管理
export function batchAddIncomeWmsBoxPd(data) {
return request({
url: '/incomewmsboxpd/batchAdd',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json;charset=UTF-8' // 接口修改传参类型
}
})
}
export function checkIsZero(data) {
return request({
url: 'incomewmsboxpd/checkIsZero',
method: 'post',
data,
headers: {
'Content-Type': 'application/json;charset=UTF-8' // 接口修改传参类型
}
})
}
......@@ -4,7 +4,7 @@ import { getInfo } from '@/api/login'
import Layout from '@/layout/index'
// pathList: 是要隐藏菜单的集合 system元素:一级菜单的路径(path)
const pathList = ['system', 'system/log', 'production', 'equipment', 'process', '/none2', 'sample', 'tlias', '/test', '/inspect', '/controlPlatform/control', '/template/planeGraph', '/demoData/demoData1']
const pathList = ['system', 'system/log', 'production', 'equipment', 'process', '/none2', 'sample', 'tlias', '/test', '/inspect', '/controlPlatform/control', '/template/planeGraph', '/demoData/demoData1','/setup/test']
const permission = {
state: {
......
......@@ -211,6 +211,6 @@ export function successAudio(start) {
// 自定义转换成大写的
export function customUpperCase(sourceStr) {
return sourceStr && sourceStr !== ''? sourceStr.toUpperCase(): sourceStr
return sourceStr && sourceStr !== '' ? sourceStr.toUpperCase() : sourceStr
}
<template>
<div class="dispose-module">
<div class="search">
<el-form @submit.native.prevent ref="searchRef" :model="form" :rules="rules" label-width="80px" class="formClass" label-position="right">
<el-form ref="searchRef" :model="form" :rules="rules" label-width="80px" class="formClass" label-position="right" @submit.native.prevent>
<div class="searchDiv">
<el-form-item label="ptype:">
<!-- <span>{{ form.ptype && getDictLabelByValue(typeList, form.ptype.trim()) || '-' }}</span>-->
......@@ -20,7 +20,7 @@
<el-form-item label="lot:">
<span>{{ form.lot || '-' }}</span>
</el-form-item>
<el-form-item v-if="form.cj && form.cj !== null" label="cj:">
<el-form-item v-if="form.cj && form.cj !== null" label="cj:">
<span>{{ getLabelByCj(form.cj) || '-' }}</span>
</el-form-item>
</div>
......@@ -28,7 +28,7 @@
<el-form-item label="qty:">
<span>{{ form.qty || '-' }}</span>
</el-form-item>
<el-form-item label="rank:">
<el-form-item label="rank:">
<span>{{ form.rank || '-' }}</span>
</el-form-item>
</div>
......@@ -37,7 +37,7 @@
<hr class="disposeHr">
<div class="disposeTable">
<div class="searchInput">
<el-form @submit.native.prevent ref="formRef" :model="searchForm" :rules="rules" label-width="80px" class="formClass" label-position="right">
<el-form ref="formRef" :model="searchForm" :rules="rules" label-width="80px" class="formClass" label-position="right" @submit.native.prevent>
<el-form-item label="位置" prop="search">
<el-input ref="input1" v-model="searchForm.search" clearable @keyup.enter.native="handleSearch" />
</el-form-item>
......@@ -77,9 +77,9 @@
</template>
<script>
import manufacturer from "@/data/jsonData";
import manufacturer from '@/data/jsonData'
import { handleOutWarehouse, persistOut } from '@/api/outcomeWmsJbapplyTemp'
import {customUpperCase} from "@/utils/common";
import { customUpperCase } from '@/utils/common'
import { playAudio, successAudio } from '@/utils/common'
export default {
......@@ -109,7 +109,7 @@ export default {
lot: null,
qty: null,
rank: null,
cj: null,
cj: null
},
rules: {
......@@ -187,7 +187,7 @@ export default {
var list = []
// 判断tableList中location和search及lot相同的元素个数
this.tableList.forEach((item, index) => {
if (customUpperCase(item.location) === customUpperCase(search) && customUpperCase(item.lot)=== customUpperCase(lot)) {
if (customUpperCase(item.location) === customUpperCase(search) && customUpperCase(item.lot) === customUpperCase(lot)) {
list.push(index)
}
})
......@@ -201,7 +201,7 @@ export default {
if (list.length > 1) {
// 是否能从储存中找到location
if (this.storeList.find(Litem => customUpperCase(Litem.location) === customUpperCase(search) && customUpperCase(Litem.lot) === customUpperCase(lot))) {
var index = this.storeList.findIndex(Litem => customUpperCase(Litem.location)=== customUpperCase(search)&& customUpperCase(Litem.lot)=== customUpperCase(lot))
var index = this.storeList.findIndex(Litem => customUpperCase(Litem.location) === customUpperCase(search) && customUpperCase(Litem.lot) === customUpperCase(lot))
this.storeList[index].frequency = this.storeList[index].frequency + 1
if (this.storeList[index].frequency < this.storeList[index].list.length) {
last.index = this.storeList[index].list[this.storeList[index].frequency]
......@@ -257,7 +257,7 @@ export default {
if (lot && lot !== '') {
twoLot = customUpperCase(lot)
}
if (customUpperCase(item.location) === customUpperCase(search) && oneLot === twoLot) {
if (customUpperCase(item.location) === customUpperCase(search) && oneLot === twoLot) {
obj.list.push(index)
}
})
......@@ -366,7 +366,7 @@ export default {
}
/** ptyp为1的时候*/
if (this.form.ptype === '1') {
if (customUpperCase(obj.pn) !== customUpperCase(this.form.pn) || customUpperCase(obj.lot) !== customUpperCase(this.form.lot)|| customUpperCase(obj.rank) !== customUpperCase(this.form.rank)) {
if (customUpperCase(obj.pn) !== customUpperCase(this.form.pn) || customUpperCase(obj.lot) !== customUpperCase(this.form.lot) || customUpperCase(obj.rank) !== customUpperCase(this.form.rank)) {
playAudio(true)
this.$message.error({
message: '输入不符合要求请重新输入!',
......
......@@ -2,7 +2,14 @@
<div class="enterBound">
<div class="enterForm">
<div class="search">
<el-form ref="queryForm" class="formClass" :model="queryForm" :rules="rules" label-width="80px" @submit.native.prevent>
<el-form
ref="queryForm"
class="formClass"
:model="queryForm"
:rules="rules"
label-width="80px"
@submit.native.prevent
>
<el-form-item label="仓库:" prop="whId">
<el-select v-model="queryForm.whId" filterable class="normalSelect" placeholder="请选择">
<el-option
......@@ -28,7 +35,13 @@
</el-select>
</el-form-item>
<el-form-item label="XX:" prop="value1">
<el-input ref="input1" v-model="queryForm.value1" :disabled="enterTable.length>0" clearable @keyup.enter.native="handelTab(1,$event)" />
<el-input
ref="input1"
v-model="queryForm.value1"
:disabled="enterTable.length>0"
clearable
@keyup.enter.native="handelTab(1,$event)"
/>
</el-form-item>
<el-form-item>
<div class="location"> location: {{ queryForm.location }}</div>
......@@ -66,7 +79,11 @@
</el-table-column>
<el-table-column min-width="20" :show-overflow-tooltip="true">
<template slot-scope="scope">
<i class="el-icon-delete-solid" style="font-size: 26px;margin-left: -10px;color: #46BCF3; margin-top: 7px" @click="handleDelte(scope.$index)" />
<i
class="el-icon-delete-solid"
style="font-size: 26px;margin-left: -10px;color: #46BCF3; margin-top: 7px"
@click="handleDelte(scope.$index)"
/>
<!-- <span>{{scope.row.value3}}</span>-->
</template>
</el-table-column>
......@@ -90,15 +107,15 @@
</template>
<script>
import manufacturer from "@/data/jsonData";
import {
import manufacturer from '@/data/jsonData'
import {
batchAddIncomeWmsBox, checkIsZero, getJcCode
} from '@/api/incomeWmsBox'
import { findByLocation } from '@/api/incomeWmsLabel'
import { getInfo } from '@/api/login'
import { getDict } from '@/api/system/dict/data'
import { playAudio, successAudio } from '@/utils/common'
import {customUpperCase} from "@/utils/common";
import { customUpperCase } from '@/utils/common'
export default {
name: 'EnterBound',
data() {
......@@ -236,7 +253,6 @@ export default {
if (valid && this.enterTable.length > 0) {
const obj = {
boxList: this.enterTable
}
batchAddIncomeWmsBox(obj).then(res => {
console.log('res', res)
......@@ -459,7 +475,7 @@ export default {
// this.incomeWmsBoxList.pn = values[1]
if (obj.labelId !== null && obj.labelId !== '' && obj.labelId !== undefined) {
if (this.incomeWmsLabelList.pn && this.incomeWmsLabelList.pn !== '' && this.incomeWmsLabelList.pn !== undefined) {
if (customUpperCase(obj.pn)!== customUpperCase(this.incomeWmsLabelList.pn)) {
if (customUpperCase(obj.pn) !== customUpperCase(this.incomeWmsLabelList.pn)) {
playAudio(true)
this.$message.error({
message: '输入的pn值:' + obj.pn + '与数据库中pn值:' + this.incomeWmsLabelList.pn + '不匹配,请重新输入',
......@@ -473,7 +489,7 @@ export default {
} else {
let isLegalLot = false
this.enterTable.forEach(item => {
if (customUpperCase(item.lot) === customUpperCase(obj.lot) ) {
if (customUpperCase(item.lot) === customUpperCase(obj.lot)) {
isLegalLot = true
}
})
......@@ -550,7 +566,7 @@ export default {
if (res.data != null) {
let isLegalLot = false
this.enterTable.forEach(item => {
if (customUpperCase(item.lot) === customUpperCase(obj.lot) ) {
if (customUpperCase(item.lot) === customUpperCase(obj.lot)) {
isLegalLot = true
}
})
......@@ -579,7 +595,7 @@ export default {
if (res.code === 200) {
if (res.data) {
if (this.enterTable.length > 0) {
if (customUpperCase(this.enterTable[0].pn) === customUpperCase(obj.pn) ) {
if (customUpperCase(this.enterTable[0].pn) === customUpperCase(obj.pn)) {
successAudio(true)
this.enterTable.push(obj)
this.incomeWmsBoxList.pn = obj.pn
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
<div class="enterboundTwo">
<div class="enterForm">
<div class="search">
<el-form @submit.native.prevent ref="from" :model="form" :rules="rules" label-width="80px" class="formClass" label-position="right">
<el-form ref="from" :model="form" :rules="rules" label-width="80px" class="formClass" label-position="right" @submit.native.prevent>
<el-form-item label="仓库:" prop="whId">
<el-select v-model="form.whId" filterable class="normalSelect" placeholder="请选择">
<el-option
......@@ -56,7 +56,7 @@ import { getDict } from '@/api/system/dict/data'
import { addIncomeWmsBox, getJcCode } from '@/api/incomeWmsBox'
import { findByLocation } from '@/api/incomeWmsLabel'
import { queryByPnAndType } from '@/api/income_mat_baseinfo'
import {playAudio, successAudio} from '@/utils/common'
import { playAudio, successAudio } from '@/utils/common'
export default {
name: 'EnterboundTwo',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment