拆托-按顺序生成流水号拆分流水号
parent
25414b6354
commit
a267581313
|
|
@ -15,6 +15,34 @@ export function del(ids) {
|
|||
data: ids
|
||||
})
|
||||
}
|
||||
export function getItemKey(text) {
|
||||
return request({
|
||||
url: 'api/itemKey/getItemKey',
|
||||
method: 'post',
|
||||
data: text
|
||||
})
|
||||
}
|
||||
export function devan(text) {
|
||||
return request({
|
||||
url: 'api/itemKey/devan',
|
||||
method: 'post',
|
||||
data: text
|
||||
})
|
||||
}
|
||||
export function devanPropC6(data) {
|
||||
return request({
|
||||
url: 'api/itemKey/devanPropC6',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function devanning(data) {
|
||||
return request({
|
||||
url: 'api/itemKey/devanning',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
|
|
@ -24,4 +52,4 @@ export function edit(data) {
|
|||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del }
|
||||
export default { add, edit, del,getItemKey,devan, devanPropC6 }
|
||||
|
|
|
|||
|
|
@ -2,9 +2,19 @@
|
|||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<label class="el-form-item-label" v-show="false">物料编码</label>
|
||||
<el-select v-show="false" v-model="query.itemCode" @focus="getItem" value-key="id" filterable multiple
|
||||
placeholder="请选择物料" style="width: 150px;" class="filter-item" @keyup.enter.native="crud.toQuery">
|
||||
<label v-show="false" class="el-form-item-label">物料编码</label>
|
||||
<el-select
|
||||
v-show="false"
|
||||
v-model="query.itemCode"
|
||||
value-key="id"
|
||||
filterable
|
||||
multiple
|
||||
placeholder="请选择物料"
|
||||
style="width: 150px;"
|
||||
class="filter-item"
|
||||
@focus="getItem"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in items"
|
||||
:key="item.id"
|
||||
|
|
@ -16,29 +26,70 @@
|
|||
<el-input v-model="query.itemCode" clearable placeholder="请输入物料编码" style="width: 140px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
-->
|
||||
<label class="el-form-item-label">物料编码</label>
|
||||
<el-input v-model="query.itemCodeOne" clearable placeholder="请输入物料编码" style="width: 150px;"
|
||||
class="filter-item" @keyup.enter.native="crud.toQuery"/>
|
||||
<el-input
|
||||
v-model="query.itemCodeOne"
|
||||
clearable
|
||||
placeholder="请输入物料编码"
|
||||
style="width: 150px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<label class="el-form-item-label">物料名称</label>
|
||||
<el-input v-model="query.itemName" clearable placeholder="请输入物料名称" style="width: 150px;"
|
||||
class="filter-item" @keyup.enter.native="crud.toQuery"/>
|
||||
<el-input
|
||||
v-model="query.itemName"
|
||||
clearable
|
||||
placeholder="请输入物料名称"
|
||||
style="width: 150px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
|
||||
<label class="el-form-item-label">批次号</label>
|
||||
<el-input v-model="query.propC1" clearable placeholder="请输入批次号" style="width: 150px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
<el-input
|
||||
v-model="query.propC1"
|
||||
clearable
|
||||
placeholder="请输入批次号"
|
||||
style="width: 150px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
|
||||
<label class="el-form-item-label">容器号</label>
|
||||
<el-input v-model="query.stockName" clearable placeholder="请输入容器号" style="width: 150px;" class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"/>
|
||||
<rrOperation :crud="crud"/>
|
||||
<el-input
|
||||
v-model="query.stockName"
|
||||
clearable
|
||||
placeholder="请输入容器号"
|
||||
style="width: 150px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation :crud="crud" />
|
||||
|
||||
<el-button class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置
|
||||
</el-button>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" :tableKey="this.$options.name"/>
|
||||
<crudOperation :permission="permission" :table-key="this.$options.name">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1 || this.crud.selections[0].orderQty<=this.crud.selections[0].allocatedQty"
|
||||
@click="LoadDevanning()"
|
||||
>
|
||||
拆托
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title" width="500px">
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title"
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||
<el-form-item label="点位" prop="point">
|
||||
<el-select v-model="form.point" filterable placeholder="请选点位" value-key="id" style="width: 370px;">
|
||||
|
|
@ -61,19 +112,19 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input v-model="form.quantity" style="width: 370px;"/>
|
||||
<el-input v-model="form.quantity" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分配数">
|
||||
<el-input v-model="form.queuedQty" style="width: 370px;"/>
|
||||
<el-input v-model="form.queuedQty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="重量">
|
||||
<el-input v-model="form.weight" style="width: 370px;"/>
|
||||
<el-input v-model="form.weight" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="体积">
|
||||
<el-input v-model="form.volume" style="width: 370px;"/>
|
||||
<el-input v-model="form.volume" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 370px;"/>
|
||||
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
@ -83,17 +134,61 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-dialog title="拆托" :visible.sync="FromDevanningFlag" width="800px">
|
||||
<el-form ref="Devanning" :model="fromDevanning" :rules="rules" size="small" label-width="120px">
|
||||
<!-- <el-form-item label="容器类型" prop="storageType">
|
||||
<el-select v-model="fromBack.storageType" value-key="id" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in storageTypes"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="原流水号集合" prop="textPropC6">
|
||||
<el-input v-model="fromDevanning.textPropC6" :rows="3" type="textarea" style="width: 270px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流水号集合1" prop="text1PropC6">
|
||||
<el-input v-model="fromDevanning.text1PropC6" :rows="3" type="textarea" style="width: 270px;" @keyup.native="devan_submit()" />
|
||||
<el-input v-model="devanPropC6.endPropC6" style="width: 270px" placeholder="终止流水号">
|
||||
<el-input slot="prepend" v-model="devanPropC6.startPropC6" style="width: 90px" placeholder="起始流水号" />
|
||||
<el-button slot="append" icon="el-icon-search" @click="devan_propC6()" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流水号集合2" prop="text2PropC6">
|
||||
<el-input v-model="fromDevanning.text2PropC6" :rows="3" type="textarea" style="width: 270px;" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="RFID" prop="RFID">
|
||||
<el-input v-model="fromDevanning.RFID" :rows="3" type="textarea" style="width: 270px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="目标库位" prop="RFID">
|
||||
<el-select v-model="fromDevanning.pointId" clearable value-key="id" filterable placeholder="请选择" style="width: 270px;">
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:key="item.id"
|
||||
:label="item.area.name+item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="fromDevanningFlag = false">取 消</el-button>
|
||||
<el-button type="primary" @click="devanning()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-table
|
||||
ref="table"
|
||||
show-summary
|
||||
v-loading="crud.loading"
|
||||
show-summary
|
||||
:data="crud.data"
|
||||
size="small"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
height="70vh"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column :show-overflow-tooltip="true" prop="itemCode" label="物料编码">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.itemKey.item.code }}</div>
|
||||
|
|
@ -119,8 +214,8 @@
|
|||
<div>{{ scope.row.point.storageType }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量"/>
|
||||
<el-table-column prop="queuedQty" label="占用数"/>
|
||||
<el-table-column prop="quantity" label="数量" />
|
||||
<el-table-column prop="queuedQty" label="占用数" />
|
||||
<el-table-column prop="propC1" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.itemKey.propC1 }}</div>
|
||||
|
|
@ -131,12 +226,19 @@
|
|||
<div>{{ scope.row.itemKey.orderNumber }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column v-if="checkPer(['admin','fileManagement:edit','fileManagement:del'])" label="操作"
|
||||
width="150px" align="center" fixed="right">
|
||||
<el-table-column prop="createTime" label="创建时间" />
|
||||
<el-table-column
|
||||
v-if="checkPer(['admin','fileManagement:edit','fileManagement:del'])"
|
||||
label="操作"
|
||||
width="150px"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popconfirm title="确定删除吗?"
|
||||
@confirm="deleteDataM(scope.row.id)">
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="deleteDataM(scope.row.id)"
|
||||
>
|
||||
<el-button slot="reference" type="danger">删除</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
|
|
@ -144,16 +246,16 @@
|
|||
</el-table>
|
||||
<!--分页组件-->
|
||||
<div style="float: right;">
|
||||
<pagination/>
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudInventory from '@/api/inventory'
|
||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||
import {getItems} from "@/api/item"
|
||||
import crudInventory, { getItemKey, devan, devanPropC6, devanning } from '@/api/inventory'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import { getItems } from '@/api/item'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
|
@ -184,7 +286,7 @@ const defaultForm = {
|
|||
}
|
||||
export default {
|
||||
name: 'Inventory',
|
||||
components: {pagination, crudOperation, rrOperation, udOperation},
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
|
|
@ -195,7 +297,7 @@ export default {
|
|||
url: 'api/inventory',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: {...crudInventory},
|
||||
crudMethod: { ...crudInventory },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
|
|
@ -215,6 +317,9 @@ export default {
|
|||
edit: ['admin', 'inventory:edit'],
|
||||
del: ['admin', 'inventory:del']
|
||||
},
|
||||
FromDevanningFlag: false,
|
||||
devanPropC6: { startPropC6: null, endPropC6: null },
|
||||
fromDevanning: { ids: [], textPropC6: null, text1PropC6: null, text2PropC6: null, startPointCode: null, endPointCode: null },
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
|
|
@ -225,7 +330,7 @@ export default {
|
|||
},
|
||||
getItem() {
|
||||
getItems({}).then(res => {
|
||||
this.items = res.content.map(function (obj) {
|
||||
this.items = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
|
|
@ -233,16 +338,60 @@ export default {
|
|||
})
|
||||
})
|
||||
},
|
||||
deleteDataM(id) {//删除数据的方法
|
||||
let ids = [];
|
||||
ids.push(id);
|
||||
crudInventory.del(ids).then(res => {
|
||||
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS);
|
||||
this.crud.toQuery();
|
||||
}).catch(err => {
|
||||
this.crud.notify('删除失败!', CRUD.NOTIFICATION_TYPE.ERROR);
|
||||
LoadDevanning() {
|
||||
this.FromDevanningFlag = true
|
||||
this.fromDevanning.ids = []
|
||||
for (let i = 0; i < this.crud.selections.length; i++) {
|
||||
this.fromDevanning.ids.push(this.crud.selections[i].id)
|
||||
}
|
||||
getItemKey(this.fromDevanning.ids).then(res => {
|
||||
if (res.status === 200) {
|
||||
console.log('值:' + res.data)
|
||||
this.fromDevanning.textPropC6 = res.data
|
||||
this.fromDevanning.text1PropC6 = ''
|
||||
this.fromDevanning.text2PropC6 = ''
|
||||
} else {
|
||||
this.crud.notify(res.message, res.status)
|
||||
}
|
||||
})
|
||||
this.crud.toQuery();
|
||||
},
|
||||
// 拆托-查询流水号
|
||||
devan_propC6() {
|
||||
devanPropC6(this.devanPropC6).then(res => {
|
||||
if (res.status === 200) {
|
||||
console.log('值:' + res.data)
|
||||
this.fromDevanning.text1PropC6 = res.data.text1PropC6
|
||||
} else {
|
||||
this.crud.notify(res.message, res.status)
|
||||
}
|
||||
this.devan_submit()
|
||||
})
|
||||
},
|
||||
// 拆托
|
||||
devan_submit: function() {
|
||||
devan(this.fromDevanning).then(res => {
|
||||
if (res.status === 200) {
|
||||
this.fromDevanning.text2PropC6 = res.data.text2PropC6
|
||||
} else {
|
||||
this.crud.notify(res.message, res.status)
|
||||
}
|
||||
})
|
||||
},
|
||||
devanning() {
|
||||
devanning(this.fromDevanning).then(res => {
|
||||
this.crud.notify(res.message, res.status)
|
||||
})
|
||||
},
|
||||
deleteDataM(id) { // 删除数据的方法
|
||||
const ids = []
|
||||
ids.push(id)
|
||||
crudInventory.del(ids).then(res => {
|
||||
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}).catch(err => {
|
||||
this.crud.notify('删除失败!', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
})
|
||||
this.crud.toQuery()
|
||||
},
|
||||
resetQuery() {
|
||||
this.crud.resetQuery()
|
||||
|
|
|
|||
Loading…
Reference in New Issue