出入库初始化
This commit is contained in:
400
lms/nladmin-ui/src/views/wms/st/inbill/AddDialog.vue
Normal file
400
lms/nladmin-ui/src/views/wms/st/inbill/AddDialog.vue
Normal file
@@ -0,0 +1,400 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="crud.status.title"
|
||||
append-to-body
|
||||
fullscreen
|
||||
:before-close="crud.cancelCU"
|
||||
:visible.sync="crud.status.cu > 0 || crud.status.view > 0"
|
||||
width="1200px"
|
||||
@open="open"
|
||||
@close="close"
|
||||
>
|
||||
<el-row v-show="crud.status.cu > 0" :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="crud.cancelCU">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
placeholder="业务类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="billTypeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billtypelist"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="bill_btn"
|
||||
@click="insertEvent()"
|
||||
>
|
||||
添加箱号物料
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="mater_btn"
|
||||
@click="insertdtl()"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="form.tableData"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="sale_order_name" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip width="205" prop="customer_name" label="客户编号" />
|
||||
<el-table-column prop="customer_name" label="客户名称" />
|
||||
<el-table-column show-overflow-tooltip prop="package_box_sn" width="250" label="箱号" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="quanlity_in_box" label="箱内子卷数" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="container_name" label="子卷号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_name" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_description" label="物料描述" />
|
||||
<el-table-column show-overflow-tooltip prop="width" label="幅宽" />
|
||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" />
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, form.tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<AddDtl :dialog-show.sync="dtlShow" :open-param="opendtlParam" @tableChanged="tableChanged" />
|
||||
<MaterDtl
|
||||
:dialog-show.sync="materShow"
|
||||
:is-single="true"
|
||||
:mater-opt-code="materType"
|
||||
@tableChanged2="tableChanged2"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import CRUD, { crud, form } from '@crud/crud'
|
||||
import AddDtl from '@/views/wms/st/inbill/AddDtl'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import MaterDtl from '@/views/wms/pub/MaterDialog'
|
||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
stor_id: '',
|
||||
bill_status: '10',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
bill_type: '',
|
||||
remark: '',
|
||||
biz_date: new Date(),
|
||||
create_mode: '',
|
||||
tableData: []
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
components: { crudOperation, AddDtl, MaterDtl },
|
||||
mixins: [crud(), form(defaultForm)],
|
||||
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bussConfig: {
|
||||
type: Object
|
||||
},
|
||||
openParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
materShow: false,
|
||||
dtlShow: false,
|
||||
opendtlParam: null,
|
||||
bill_btn: false,
|
||||
mater_btn: false,
|
||||
materType: '',
|
||||
storlist: [],
|
||||
billtypelist: [{ 'code': '000101', 'name': '生产入库' }],
|
||||
rules: {
|
||||
stor_id: [
|
||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||
],
|
||||
bill_type: [
|
||||
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
biz_date: [
|
||||
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({ 'is_productstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
/* // 获取单据类型
|
||||
crudRawAssist.getType({ 'io_code': '0001', 'io_flag': '00' }).then(res => {
|
||||
this.billtypelist = res
|
||||
})*/
|
||||
},
|
||||
close() {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
// 编辑时,给按钮的状态赋值
|
||||
if (this.form.bill_type === '000101') {
|
||||
this.bill_btn = false
|
||||
this.mater_btn = true
|
||||
} else if (this.form.bill_type === '000102') {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = false
|
||||
}
|
||||
// 获取入库单明细
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToAdd]() {
|
||||
this.bill_btn = false
|
||||
this.mater_btn = false
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
this.form.tableData.splice(i, 1, row)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
// 提交前校验
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
},
|
||||
billTypeChange(val) {
|
||||
if (val === '000101') {
|
||||
this.bill_btn = false
|
||||
this.mater_btn = true
|
||||
} else if (val === '000102') {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = false
|
||||
} else {
|
||||
this.bill_btn = true
|
||||
this.mater_btn = true
|
||||
}
|
||||
this.form.tableData = []
|
||||
this.form.total_qty = 0
|
||||
this.form.detail_count = 0
|
||||
},
|
||||
tableChanged2(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
this.nowrow.material_code = row.material_code
|
||||
this.nowrow.material_id = row.material_id
|
||||
this.nowrow.material_name = row.material_name
|
||||
this.nowrow.qty_unit_id = row.base_unit_id
|
||||
this.nowrow.qty_unit_name = row.unit_name
|
||||
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
|
||||
},
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
async queryMater(index, row) {
|
||||
checkoutbill.paramByCodeType({ 'bill_type': this.form.bill_type, 'io_flag': '00' }).then(res => {
|
||||
this.materType = res.materType
|
||||
this.materShow = true
|
||||
this.nowindex = index
|
||||
this.nowrow = row
|
||||
})
|
||||
},
|
||||
async insertdtl() {
|
||||
if (this.form.bill_type == '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.form.tableData.push({ quality_scode: '01', is_active: '1', ivt_level: '01', plan_qty: '0' })
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
|
||||
rows.splice(index, 1)
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
tableChanged(rows) {
|
||||
debugger
|
||||
// 对新增的行进行校验不能存在相同物料批次
|
||||
rows.forEach((item) => {
|
||||
let same_mater = true
|
||||
this.form.tableData.forEach((row) => {
|
||||
if (row.container_name === item.container_name) {
|
||||
same_mater = false
|
||||
}
|
||||
})
|
||||
if (same_mater) {
|
||||
item.quality_scode = '00'
|
||||
item.ivt_level = '01'
|
||||
item.is_active = '1'
|
||||
item.plan_qty = item.need_qty
|
||||
this.form.total_qty = parseFloat(this.form.total_qty) + parseFloat(item.plan_qty)
|
||||
this.form.tableData.splice(-1, 0, item)
|
||||
}
|
||||
})
|
||||
this.form.detail_count = this.form.tableData.length
|
||||
},
|
||||
async insertEvent(row) {
|
||||
if (this.form.bill_type == '') {
|
||||
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.opendtlParam = {
|
||||
optType: 'add'
|
||||
}
|
||||
this.dtlShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 4px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-right2 {
|
||||
margin-left: auto;
|
||||
}
|
||||
</style>
|
||||
171
lms/nladmin-ui/src/views/wms/st/inbill/AddDtl.vue
Normal file
171
lms/nladmin-ui/src/views/wms/st/inbill/AddDtl.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="物料新增"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-MM-dd" />
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="单据号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.package_box_sn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="箱号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.container_name"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="子卷号"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.material_search"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料编码"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation />
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column show-overflow-tooltip width="200" prop="sale_order_name" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="customer_name" label="客户编号" />
|
||||
<el-table-column prop="customer_name" label="客户名称" />
|
||||
<el-table-column show-overflow-tooltip prop="package_box_sn" width="250" label="箱号" />
|
||||
<el-table-column show-overflow-tooltip width="100" prop="quanlity_in_box" label="箱内子卷数" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="container_name" label="子卷号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_name" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_description" label="物料描述" />
|
||||
<el-table-column show-overflow-tooltip prop="width" label="幅宽" />
|
||||
<el-table-column show-overflow-tooltip prop="thickness" label="产品厚度" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
|
||||
const start = new Date()
|
||||
export default {
|
||||
name: 'AddDtl',
|
||||
components: { crudOperation, rrOperation, pagination, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '用户',
|
||||
url: '/api/in/rawAssist/getBillDtl',
|
||||
crudMethod: {},
|
||||
optShow: {
|
||||
reset: true
|
||||
},
|
||||
query: {
|
||||
createTime: [start.daysAgo(7), new Date()]
|
||||
}
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
opendtlParam: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
rows: [],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.bill_type = '000101'
|
||||
return true
|
||||
},
|
||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
open() {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.rows = this.$refs.multipleTable.selection
|
||||
// this.form = this.$options.data().form
|
||||
this.$emit('tableChanged', this.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
113
lms/nladmin-ui/src/views/wms/st/inbill/BucketDtlDialog.vue
Normal file
113
lms/nladmin-ui/src/views/wms/st/inbill/BucketDtlDialog.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="载具明细"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
@close="close"
|
||||
>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="this.bucketParam"
|
||||
style="width: 100%;"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column prop="bucketunique" label="桶号" min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column prop="label" label="桶类别"/>
|
||||
<el-table-column prop="material_code" label="物料编码" width="120px"/>
|
||||
<el-table-column prop="material_name" label="物料名称" min-width="120"/>
|
||||
<el-table-column prop="pcsn" label="批次" min-width="100" show-overflow-tooltip/>
|
||||
<el-table-column prop="storage_qty" label="数量">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.storage_qty) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qty_unit_name" label="单位"/>
|
||||
<el-table-column prop="quality_scode" :formatter="qualityFormat" label="品质类型"/>
|
||||
<el-table-column prop="ivt_level" :formatter="ivtFormat" label="库存等级"/>
|
||||
<el-table-column prop="is_active" :formatter="activeFormat" label="是否可用"/>
|
||||
<el-table-column prop="storagevehicle_code" label="载具号"/>
|
||||
<el-table-column prop="record_order" label="顺序号"/>
|
||||
<el-table-column prop="bag_qty" label="袋数"/>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, {crud} from '@crud/crud'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'BucketDtlDiv',
|
||||
components: {crudOperation, pagination},
|
||||
mixins: [crud()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bucketParam: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
dicts: ['MD_BUCKET_TYPE', 'bucket_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'IS_OR_NOT'],
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
classes: [],
|
||||
dialogVisible: false,
|
||||
checkrow: {},
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
qualityFormat(row, column) {
|
||||
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
|
||||
},
|
||||
ivtFormat(row, column) {
|
||||
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
|
||||
},
|
||||
activeFormat(row, column) {
|
||||
return this.dict.label.IS_OR_NOT[row.is_active]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
627
lms/nladmin-ui/src/views/wms/st/inbill/DivDialog.vue
Normal file
627
lms/nladmin-ui/src/views/wms/st/inbill/DivDialog.vue
Normal file
@@ -0,0 +1,627 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">入库分配</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left"/>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库明细项</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dtl_table"
|
||||
:data="this.openParam"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
highlight-current-row
|
||||
:row-class-name="tableRowClassName"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikRow"
|
||||
>
|
||||
<el-table-column prop="bill_status" label="状态" align="center" width="110px">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.bill_status"
|
||||
class="filter-item"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center"/>
|
||||
<!-- <el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量"
|
||||
align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量"
|
||||
align="center"/>-->
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="单位" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_type_name" label="源单类型" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单编号" align="center"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<el-form ref="form2" :inline="true" :model="form" :rules="rules" size="mini">
|
||||
<!--<el-form-item label="载具号" prop="storagevehicle_code">
|
||||
<el-input v-model="form.storagevehicle_code" placeholder="载具号" style="width: 200px" @blur="vehicleCheck"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="桶号" prop="bucketunique">
|
||||
<el-input
|
||||
v-model="form.bucketunique"
|
||||
placeholder="桶号"
|
||||
disabled
|
||||
class="input-with-select"
|
||||
style="width: 200px"
|
||||
>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogBucket"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="放入重量" prop="storage_qty">
|
||||
<el-input-number
|
||||
v-model="form.storage_qty"
|
||||
style="width: 200px"
|
||||
disabled
|
||||
placeholder="放入重量"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
:min="0"
|
||||
:precision="3"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="入库点" prop="point_code">
|
||||
<el-select
|
||||
v-model="form.point_code"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 200px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointlist"
|
||||
:key="item.point_code"
|
||||
:label="item.point_name"
|
||||
:value="item.point_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">载具物料明细</span>
|
||||
<div class="crud-opts-form">
|
||||
<el-form ref="form" :inline="true" :model="form" size="mini">
|
||||
<el-form-item label="区域" prop="gender5">
|
||||
<el-cascader
|
||||
placeholder="请选择"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked">自动分配货位</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left"/>
|
||||
<!--<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="insertvehicle()"
|
||||
>
|
||||
装入托盘
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="confirmvehicle()"
|
||||
>
|
||||
组盘确认
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="divStruct()"
|
||||
>
|
||||
分配货位
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="unDivStruct()"
|
||||
>
|
||||
取消分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
@click="divPoint()"
|
||||
>
|
||||
设置起点
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="dis_table"
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="box_no" width="250" label="木箱号" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="木箱号" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="storage_qty" :formatter="crud.formatNum3" label="重量" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center"/>
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center"/>
|
||||
<el-table-column align="center" label="操作" width="190" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-popover v-model="scope.row.pop" placement="top" width="180" trigger="manual" >
|
||||
<p>{{ '是否确认删除桶明细?' }}</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="doCancel(scope.row)">取消</el-button>
|
||||
<el-button type="primary" size="mini" @click.native.prevent="deleteRow(scope.$index, form.tableMater)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" :disabled="scope.row.struct_code !== '' && scope.row.struct_code" type="danger" icon="el-icon-delete" size="mini" @click="toDelete(scope.row)"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<StructDiv ref="child" :dialog-show.sync="structShow" :sect-prop="sectProp" @tableChanged="tableChanged"/>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import crudPoint from '@/views/wms/sch/point'
|
||||
|
||||
export default {
|
||||
name: 'DivDialog',
|
||||
components: { StructDiv },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bussConfig: {
|
||||
type: Object
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
},
|
||||
billType: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
sectProp: null,
|
||||
bucketProp: {},
|
||||
structShow: false,
|
||||
bucketObj: null,
|
||||
bucketShow: false,
|
||||
sects: [],
|
||||
sect_val: null,
|
||||
form: {
|
||||
dtl_row: null,
|
||||
bucketunique: '',
|
||||
storage_qty: '',
|
||||
point_code: null,
|
||||
storagevehicle_code: '',
|
||||
checked: true,
|
||||
tableMater: []
|
||||
},
|
||||
storlist: [],
|
||||
pointlist: [],
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudSectattr.getSect({ 'is_materialstore': '1', 'sect_type_attr': '00' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
let area_type = ''
|
||||
if (this.billType === '000101' || this.billType === '000102' || this.billType === '000201' || this.billType === '000202' || this.billType === '000305') {
|
||||
area_type = '\'21\''
|
||||
}
|
||||
if (this.billType === '000301' || this.billType === '000303' || this.billType === '000304') {
|
||||
area_type = '\'37\''
|
||||
}
|
||||
if (this.billType === '000302') {
|
||||
area_type = '\'26\',\'32\',\'33\',\'34\''
|
||||
}
|
||||
if (this.billType === '000601') {
|
||||
area_type = '\'29\''
|
||||
}
|
||||
if (this.billType === '000401') {
|
||||
area_type = '\'21\',\'26\',\'29\',\'31\',\'35\',\'32\',\'33\',\'34\''
|
||||
}
|
||||
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
|
||||
this.pointlist = res
|
||||
})
|
||||
},
|
||||
toDelete(data) {
|
||||
data.pop = true
|
||||
},
|
||||
close() {
|
||||
this.form.tableMater = []
|
||||
this.form.dtl_row = null
|
||||
this.sectProp = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('AddChanged')
|
||||
this.crud.refresh()
|
||||
this.$refs['form2'].resetFields()
|
||||
},
|
||||
clcikRow(row, column, event) {
|
||||
this.form.dtl_row = row
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
|
||||
this.openParam = res
|
||||
this.form.dtl_row = res[row.index]
|
||||
})
|
||||
crudRawAssist.getDisDtl(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
vehicleCheck() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.form.storagevehicle_code = ''
|
||||
return
|
||||
}
|
||||
crudRawAssist.checkVehicle({
|
||||
'storagevehicle_code': this.form.storagevehicle_code,
|
||||
'dis_num': this.form.tableMater.length,
|
||||
'iostorinv_id': this.form.dtl_row.iostorinv_id
|
||||
}).then(res => {
|
||||
|
||||
}).catch(err => {
|
||||
this.form.storagevehicle_code = ''
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
insertvehicle() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (!this.form.storagevehicle_code) {
|
||||
this.crud.notify('请输入托盘号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 判断是否选择了桶号
|
||||
if (this.bucketObj) {
|
||||
if (!(this.bucketObj.status === '01')) {
|
||||
this.crud.notify('请校验桶状态!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const dis_dtl = JSON.parse(JSON.stringify(this.bucketObj))
|
||||
// 判断选择的桶是否已经被选过
|
||||
const flag = this.form.tableMater.some(mater => mater.bucketunique === dis_dtl.bucketunique)
|
||||
if (!flag) {
|
||||
const flag = this.form.tableMater.some(mater => mater.storagevehicle_code !== this.form.storagevehicle_code)
|
||||
if (flag) {
|
||||
this.crud.notify('存在不同载具号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
dis_dtl.storagevehicle_code = this.form.storagevehicle_code
|
||||
dis_dtl.pop = false
|
||||
this.form.tableMater.splice(this.form.tableMater.length, 0, dis_dtl)
|
||||
if (this.form.dtl_row.assign_qty) {
|
||||
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) + parseFloat(this.form.storage_qty)
|
||||
} else {
|
||||
this.form.dtl_row.assign_qty = parseFloat(this.form.storage_qty)
|
||||
}
|
||||
if (parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty) > 0) {
|
||||
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) - parseFloat(this.form.storage_qty)
|
||||
} else {
|
||||
this.form.dtl_row.unassign_qty = 0
|
||||
}
|
||||
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
|
||||
}
|
||||
if (flag) {
|
||||
this.crud.notify('该桶已被加入明细中', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
} else {
|
||||
this.crud.notify('请选择桶号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
},
|
||||
confirmvehicle() {
|
||||
if (this.form.tableMater.length <= 0) {
|
||||
this.crud.notify('至少添加一条载具明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const carrier_no = this.form.tableMater[0].storagevehicle_code
|
||||
const flag = this.form.tableMater.every(mater => mater.storagevehicle_code === carrier_no)
|
||||
if (!flag) {
|
||||
this.crud.notify('请选择唯一载具进行组盘!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const flag2 = this.form.tableMater.some(mater => mater.point_code !== this.form.point_code && mater.point_code)
|
||||
if (flag2) {
|
||||
this.crud.notify('请选择相同入库点!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudRawAssist.confirmvehicle(this.form).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
// 如果桶状态不是生成调后台逻辑
|
||||
if (rows[index].status !== '01') {
|
||||
crudRawAssist.deleteDisDtl(rows[index]).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
rows[index].pop = false
|
||||
}).catch(err => {
|
||||
rows[index].pop = false
|
||||
return
|
||||
})
|
||||
}
|
||||
this.form.dtl_row.assign_qty = parseFloat(this.form.dtl_row.assign_qty) - parseFloat(rows[index].storage_qty)
|
||||
this.form.dtl_row.unassign_qty = parseFloat(this.form.dtl_row.unassign_qty) + parseFloat(rows[index].storage_qty)
|
||||
this.openParam.splice(this.form.dtl_row.index, 1, this.form.dtl_row)
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
this.sectProp = val
|
||||
if (val.length === 1) {
|
||||
this.stor_id = val[0]
|
||||
this.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.sect_id = ''
|
||||
this.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.stor_id = val[0]
|
||||
this.sect_id = val[1]
|
||||
}
|
||||
},
|
||||
tableChanged(row) {
|
||||
// 新增一行物料时,给行进行赋值
|
||||
for (let i = 0; i < this.form.tableMater.length; i++) {
|
||||
this.form.tableMater[i].struct_code = row.struct_code
|
||||
this.form.tableMater[i].sect_id = row.sect_id
|
||||
this.form.tableMater[i].struct_id = row.struct_id
|
||||
this.form.tableMater[i].struct_name = row.struct_name
|
||||
this.form.tableMater[i].sect_code = row.sect_code
|
||||
this.form.tableMater[i].sect_name = row.sect_name
|
||||
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
crudRawAssist.divStruct(this.form).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
this.form.tableMater = []
|
||||
})
|
||||
},
|
||||
bucketChange(row) {
|
||||
debugger
|
||||
this.bucketObj = row
|
||||
this.form.bucketunique = row.bucketunique
|
||||
this.form.storage_qty = row.storage_qty
|
||||
},
|
||||
divPoint() {
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const flag = this.form.tableMater.some(mater => !mater.iostorinvdis_id)
|
||||
if (flag) {
|
||||
this.crud.notify('请先进行组盘!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudRawAssist.divPoint(this.form).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('设置起点成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
divStruct() {
|
||||
if (this.form.tableMater.length <= 0) {
|
||||
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const flag = this.form.tableMater.some(mater => !mater.iostorinvdis_id)
|
||||
if (flag) {
|
||||
this.crud.notify('请先进行组盘!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
if (this.form.checked) {
|
||||
this.form.sect_id = this.sect_id
|
||||
this.form.stor_id = this.stor_id
|
||||
this.form.is_pc = '1'
|
||||
crudRawAssist.divStruct(this.form).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('分配货位成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(false)
|
||||
}
|
||||
},
|
||||
doCancel(data) {
|
||||
data.pop = false
|
||||
},
|
||||
unDivStruct() {
|
||||
if (this.form.tableMater.length <= 0) {
|
||||
this.crud.notify('不存在载具明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
const flag = this.form.tableMater.some(mater => !mater.struct_code)
|
||||
if (flag) {
|
||||
this.crud.notify('明细存在未分配货位!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
if (this.form.checked) {
|
||||
crudRawAssist.unDivStruct(this.form).then(res => {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.form.dtl_row.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudRawAssist.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(false)
|
||||
}
|
||||
},
|
||||
dialogBucket() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
/* const material_dtl_scode = this.form.dtl_row.material_dtl_scode
|
||||
let type = ''
|
||||
if (material_dtl_scode.slice(0, 4) === '0903') {
|
||||
type = '01'
|
||||
}
|
||||
if (material_dtl_scode.slice(0, 4) === '0904') {
|
||||
type = '02'
|
||||
}
|
||||
if (material_dtl_scode.slice(0, 6) === '090202') {
|
||||
type = '04'
|
||||
}
|
||||
if (material_dtl_scode.slice(0, 6) === '090201') {
|
||||
type = '03'
|
||||
}*/
|
||||
const bucket = {
|
||||
'material_code': this.form.dtl_row.material_code,
|
||||
'pcsn': this.form.dtl_row.pcsn,
|
||||
'quality_scode': this.form.dtl_row.quality_scode,
|
||||
'ivt_level': this.form.dtl_row.ivt_level,
|
||||
'is_active': this.form.dtl_row.is_active,
|
||||
// 'storagevehicle_type': type,
|
||||
'bucket_status': '01'
|
||||
}
|
||||
this.bucketProp = bucket
|
||||
this.bucketShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size: 20px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
268
lms/nladmin-ui/src/views/wms/st/inbill/StructUpdateDialog.vue
Normal file
268
lms/nladmin-ui/src/views/wms/st/inbill/StructUpdateDialog.vue
Normal file
@@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="任务修改"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
fullscreen
|
||||
width="1000px"
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
<span />
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<el-button icon="el-icon-check" size="mini" :loading="crud.cu === 2" type="primary" @click="submit">确定</el-button>
|
||||
<el-button icon="el-icon-close" size="mini" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form ref="taskForm" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="任务号" prop="task_code">
|
||||
<label slot="label">任 务 号:</label>
|
||||
<el-input v-model="form.task_code" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存储载具" prop="storagevehicle_code">
|
||||
<el-input v-model="form.storagevehicle_code" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="原入库点" prop="point_code">
|
||||
<el-input v-model="form.point_code" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="入库点" prop="new_point_code">
|
||||
<label slot="label">入 库 点:</label>
|
||||
<el-select
|
||||
v-model="form.new_point_code"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointlist"
|
||||
:key="item.point_code"
|
||||
:label="item.point_code"
|
||||
:value="item.point_code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="原货位" prop="struct_code">
|
||||
<label slot="label">原 货 位:</label>
|
||||
<el-input v-model="form.struct_code" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="新货位" prop="new_struct_code">
|
||||
<label slot="label">新 货 位:</label>
|
||||
<el-input v-model="form.new_struct_code" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="所属库区" prop="new_struct_code">
|
||||
<el-cascader
|
||||
v-model="query.sect"
|
||||
style="width: 210px"
|
||||
placeholder="所属库区"
|
||||
:options="sects"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
@change="sectQueryChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模糊查询" prop="struct_code">
|
||||
<el-input
|
||||
v-model="query.search"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
size="mini"
|
||||
placeholder="输入货位编码、名称"
|
||||
prefix-icon="el-icon-search"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
style="width: 100%"
|
||||
:row-class-name="tableRowClassName"
|
||||
highlight-current-row
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikRow"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column prop="struct_code" label="货位编码" />
|
||||
<el-table-column prop="struct_name" label="货位名称" />
|
||||
<el-table-column prop="material_height_type_name" label="高度类型" />
|
||||
<el-table-column prop="sect_name" label="库区名称" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import CRUD, { header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudStructattr from '@/views/wms/basedata/st/struct/structattr'
|
||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import crudPoint from '@/views/wms/sch/point'
|
||||
|
||||
export default {
|
||||
name: 'StructDiv',
|
||||
components: { crudOperation, rrOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '仓位',
|
||||
optShow: {},
|
||||
url: 'api/structattr',
|
||||
idField: 'struct_id',
|
||||
sort: 'struct_id,desc',
|
||||
crudMethod: { ...crudStructattr }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header()],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
sectProp: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
bucketForm: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
sects: [],
|
||||
classes: [],
|
||||
pointlist: [],
|
||||
dialogVisible: false,
|
||||
sectProp: null,
|
||||
checkrow: {},
|
||||
form: {
|
||||
task_id: '',
|
||||
task_code: '',
|
||||
storagevehicle_code: '',
|
||||
point_code: '',
|
||||
new_point_code: '',
|
||||
struct_code: '',
|
||||
new_struct_code: ''
|
||||
},
|
||||
rows: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
sectProp: {
|
||||
handler(newValue, oldValue) {
|
||||
this.sectProp = newValue
|
||||
}
|
||||
},
|
||||
bucketForm: {
|
||||
handler(newValue, oldValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
this.crud.query.lock_type = '00'
|
||||
},
|
||||
open() {
|
||||
crudSectattr.getSect({ 'is_materialstore': '1', 'sect_type_attr': '00' }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
crudPoint.getPoint({ 'area_type': '21' }).then(res => {
|
||||
this.pointlist = res
|
||||
})
|
||||
if (this.sectProp) {
|
||||
this.query.sect = this.sectProp
|
||||
if (this.sectProp.length === 1) {
|
||||
this.query.stor_id = this.sectProp[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (this.sectProp.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (this.sectProp.length === 2) {
|
||||
this.query.stor_id = this.sectProp[0]
|
||||
this.query.sect_id = this.sectProp[1]
|
||||
}
|
||||
}
|
||||
this.crud.toQuery()
|
||||
},
|
||||
clcikRow(row, column, event) {
|
||||
this.form.new_struct_code = row.struct_code
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
sectQueryChange(val) {
|
||||
if (val.length === 1) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = ''
|
||||
}
|
||||
if (val.length === 0) {
|
||||
this.query.sect_id = ''
|
||||
this.query.stor_id = ''
|
||||
}
|
||||
if (val.length === 2) {
|
||||
this.query.stor_id = val[0]
|
||||
this.query.sect_id = val[1]
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
} else {
|
||||
this.checkrow = row
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
},
|
||||
close() {
|
||||
this.crud.resetQuery()
|
||||
this.query.sect = null
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
this.crud.resetQuery()
|
||||
crudRawAssist.updateTask(this.form).then(res => {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('updateCommit', this.checkrow)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
401
lms/nladmin-ui/src/views/wms/st/inbill/TaskDialog.vue
Normal file
401
lms/nladmin-ui/src/views/wms/st/inbill/TaskDialog.vue
Normal file
@@ -0,0 +1,401 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible2"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
>
|
||||
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">入库单任务操作</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="info" @click="dialogVisible2 = false">关闭</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据明细项</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="this.openParam"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
highlight-current-row
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikRow"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" label="入库单号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="seq_no" label="明细序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="assign_qty"
|
||||
:formatter="crud.formatNum3"
|
||||
label="已分配数量"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据任务项</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="updateTask()"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="delTask()"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="reIssueTask()"
|
||||
>
|
||||
下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="confirmTask()"
|
||||
>
|
||||
标识完成
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="cancelTask()"
|
||||
>
|
||||
取消完成
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="disTable"
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
:row-class-name="tableRowClassName"
|
||||
highlight-current-row
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikDisRow"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="seq_no" label="序号" align="center" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
align="center"
|
||||
prop="storagevehicle_code"
|
||||
width="120"
|
||||
label="载具号"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="bucketDtl(scope.row)">{{ scope.row.storagevehicle_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bucket_num" label="桶数" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="分配货位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="work_status" label="指令状态" :formatter="statusFormat" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="指令操作号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点位编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_name" label="入库点位名称" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<StructUpdateDiv :dialog-show.sync="structShow" :sect-prop="sectProp" :bucket-form="bucketForm" @updateCommit="updateCommit" />
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import StructUpdateDiv from '@/views/wms/st/inbill/StructUpdateDialog'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: {StructUpdateDiv },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status', 'task_status'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bussConfig: {
|
||||
type: Object
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible2: false,
|
||||
tableDtl: [],
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
sectProp: null,
|
||||
structShow: false,
|
||||
sects: [],
|
||||
dis_row: null,
|
||||
fullscreenLoading: false,
|
||||
bucketParam: null,
|
||||
bucketForm: null,
|
||||
bucketDtlShow: false,
|
||||
form: {
|
||||
tableMater: [],
|
||||
dtl_row: null,
|
||||
checked: '1'
|
||||
},
|
||||
storlist: [],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible2 = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form.tableMater = []
|
||||
this.form.checked = '1'
|
||||
this.form.dtl_row = null
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
delTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status !== '01') {
|
||||
this.crud.notify('只能对状态为生成的任务进行删除!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.delTask(this.dis_row).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '2' }).then(res => {
|
||||
this.openParam = res
|
||||
this.dis_row = null
|
||||
this.crud.notify('删除任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
statusFormat(row, column) {
|
||||
return this.dict.label.task_status[row.work_status]
|
||||
},
|
||||
confirmTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status === '99' || this.dis_row.work_status === '00') {
|
||||
this.crud.notify('只能已生成或下发进行中的任务完成!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.confirmTask(this.dis_row).then(res => {
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
||||
this.form.tableMater = res2
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('强制确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
cancelTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status !== '99') {
|
||||
this.crud.notify('只能对状态为完成的任务进行取消!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.cancelTask(this.dis_row).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
||||
this.form.tableMater = res2
|
||||
this.crud.notify('取消确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
reIssueTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status !== '01') {
|
||||
this.crud.notify('只能对状态为生成的任务进行下发!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.reIssueTask(this.dis_row).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
||||
this.form.tableMater = res2
|
||||
this.crud.notify('下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
updateTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
debugger
|
||||
if (this.dis_row.work_status !== '01') {
|
||||
this.crud.notify('只能对状态为生成的任务进行修改!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.structShow = true
|
||||
this.bucketForm = this.dis_row
|
||||
},
|
||||
updateCommit() {
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('修改任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
checkedChange(val) {
|
||||
this.form.dtl_row.checked = this.form.checked
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
clcikRow(row, column, event) {
|
||||
this.form.dtl_row = row
|
||||
row.checked = this.form.checked
|
||||
crudRawAssist.queryTask(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
clcikDisRow(row, column, event) {
|
||||
this.dis_row = row
|
||||
},
|
||||
assignFormat(row, column) {
|
||||
if (!row.assign_qty) {
|
||||
return '0'
|
||||
} else {
|
||||
return row.assign_qty
|
||||
}
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
bucketDtl(row) {
|
||||
crudRawAssist.bucketDtl(row).then(res => {
|
||||
this.bucketParam = res
|
||||
this.bucketDtlShow = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
289
lms/nladmin-ui/src/views/wms/st/inbill/ViewDialog.vue
Normal file
289
lms/nladmin-ui/src/views/wms/st/inbill/ViewDialog.vue
Normal file
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
append-to-body
|
||||
title="入库详情"
|
||||
:visible.sync="dialogVisible"
|
||||
destroy-on-close
|
||||
fullscreen
|
||||
@close="close"
|
||||
@open="open"
|
||||
>
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" size="mini" label-width="85px" label-suffix=":">
|
||||
<el-form-item label="单据号" prop="bill_code">
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库" prop="stor_id">
|
||||
<label slot="label">仓 库:</label>
|
||||
<el-select
|
||||
v-model="form.stor_id"
|
||||
clearable
|
||||
placeholder="仓库"
|
||||
class="filter-item"
|
||||
style="width: 210px"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="bill_type">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
clearable
|
||||
placeholder="业务类型"
|
||||
style="width: 210px"
|
||||
class="filter-item"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billtypelist"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="bill_status">
|
||||
<el-select
|
||||
v-model="form.bill_status"
|
||||
clearable
|
||||
style="width: 210px"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="明细数" prop="detail_count">
|
||||
<label slot="label">明 细 数:</label>
|
||||
<el-input v-model="form.detail_count" size="mini" disabled style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总重量" prop="total_qty">
|
||||
<label slot="label">总 重 量:</label>
|
||||
<el-input-number
|
||||
v-model="form.total_qty"
|
||||
:controls="false"
|
||||
:precision="3"
|
||||
:min="0"
|
||||
disabled
|
||||
style="width: 210px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务日期" prop="biz_date">
|
||||
<el-date-picker v-model="form.biz_date" type="date" placeholder="选择日期" style="width: 210px" value-format="yyyy-MM-dd" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span2">入库明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDtlCurrentChange"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="bill_code" label="出入库单号" align="center" />
|
||||
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="source_bill_type" label="源单类型" align="center" width="130px" :formatter="invtypeFormat" />
|
||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">作业明细</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table2"
|
||||
:data="tabledis"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
size="mini"
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDisCurrentChange"
|
||||
>
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次号" align="center" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" align="center" />
|
||||
<el-table-column prop="bucket_num" label="桶数" :formatter="crud.formatNum0" align="center" />
|
||||
<el-table-column prop="total_storage_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column prop="start_point_code" label="起始位置" align="center" />
|
||||
<el-table-column prop="next_point_code" label="目的位置" align="center" />
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="taskdtl_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />
|
||||
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { crud } from '@crud/crud'
|
||||
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
|
||||
import crudStorattr from "@/views/wms/basedata/st/stor/storattr";
|
||||
import crudRawAssist from "@/views/wms/st/inbill/rawassist";
|
||||
|
||||
export default {
|
||||
name: 'ViewDialog',
|
||||
components: { },
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
rowmst: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
tableDtl: [],
|
||||
tabledis: [],
|
||||
billtypelist: [],
|
||||
storlist: [],
|
||||
currentdtl: null,
|
||||
currentDis: {},
|
||||
form:{}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
},
|
||||
rowmst: {
|
||||
handler(newValue) {
|
||||
this.form = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
checkoutbill.getInvTypes().then(res => {
|
||||
this.billtypelist = res
|
||||
}),
|
||||
// 查询原材料库的仓库
|
||||
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.queryTableDtl()
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.currentDis = {}
|
||||
this.currentdtl = null
|
||||
this.tableDtl = []
|
||||
this.tabledis = []
|
||||
this.$emit('TaskChanged')
|
||||
},
|
||||
bill_statusFormat(row) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
},
|
||||
taskdtl_typeFormat(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
|
||||
},
|
||||
task_statusFormat(row) {
|
||||
return this.dict.label.task_status[row.task_status]
|
||||
},
|
||||
work_statusFormat(row) {
|
||||
return this.dict.label.work_status[row.work_status]
|
||||
},
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.queryTableDdis()
|
||||
} else {
|
||||
this.tabledis = []
|
||||
this.currentdtl = {}
|
||||
}
|
||||
},
|
||||
invtypeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code === row.source_bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl() {
|
||||
checkoutbill.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
checkoutbill.getOutBillTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span2 {
|
||||
padding: 0px 0px 20px 0px;
|
||||
}
|
||||
.crud-opts2 {
|
||||
padding: 10px 0px 0px 50px;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -8,442 +8,386 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="单据编号">
|
||||
<el-form-item label="模糊查询">
|
||||
<el-input
|
||||
v-model="query.bill_code"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="单据编号"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
placeholder="入库单号"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
placeholder="物料编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="载具编号">
|
||||
<el-input
|
||||
v-model="query.vehicle_code"
|
||||
clearable
|
||||
placeholder="载具编码"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input
|
||||
v-model="query.pcsn"
|
||||
clearable
|
||||
placeholder="批次"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态">
|
||||
<el-form-item label="所属仓库">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
v-model="query.stor_id"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
class="filter-item"
|
||||
style="width: 185px;"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.st_bill_status"
|
||||
v-for="item in storlist"
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@change="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="生成方式">
|
||||
<el-select
|
||||
v-model="query.create_mode"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="生成方式"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.ST_CREATE_MODE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始点位">
|
||||
<el-input
|
||||
v-model="query.start_point_code"
|
||||
|
||||
<el-form-item label="单据状态">
|
||||
<el-select
|
||||
v-model="query.bill_status"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
size="mini"
|
||||
placeholder="单据状态"
|
||||
class="filter-item"
|
||||
/>
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.io_bill_status"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点点位">
|
||||
<el-input
|
||||
v-model="query.end_point_code"
|
||||
|
||||
<el-form-item label="业务类型">
|
||||
<el-select
|
||||
v-model="query.bill_type"
|
||||
clearable
|
||||
placeholder="点位编码、名称"
|
||||
style="width: 185px;"
|
||||
filterable
|
||||
size="mini"
|
||||
placeholder="业务类型"
|
||||
class="filter-item"
|
||||
/>
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in billtypelist"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="起始区域">
|
||||
<el-input
|
||||
v-model="query.start_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="终点区域">
|
||||
<el-input
|
||||
v-model="query.end_region_code"
|
||||
clearable
|
||||
placeholder="区域编码、名称"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud" />
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="audit_flag"
|
||||
@click="audit"
|
||||
>
|
||||
审核
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createTask"
|
||||
@click="divOpen"
|
||||
>
|
||||
生成任务
|
||||
分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0 || crud.status.view > 0 " :title="crud.status.title" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料" prop="material_id">
|
||||
<label slot="label">物 料:</label>
|
||||
<el-input v-model="form.material_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="getMater" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次:</label>
|
||||
<el-input v-model="form.pcsn" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="载具编码:">
|
||||
<el-input v-model="form.vehicle_code" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="qty">
|
||||
<label slot="label">数 量:</label>
|
||||
<el-input v-model="form.qty" style="width: 200px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始区域:" prop="start_region_id">
|
||||
<el-select
|
||||
v-model="form.start_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeStart"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点区域:" prop="end_region_id">
|
||||
<el-select
|
||||
v-model="form.end_region_id"
|
||||
placeholder="请选择"
|
||||
style="width: 200px;"
|
||||
:disabled="crud.status.view > 0"
|
||||
@change="changeEnd"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reginoList"
|
||||
:label="item.region_name"
|
||||
:value="item.region_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始点位:" prop="start_point_code">
|
||||
<el-input v-model="form.start_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openStartPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="终点点位:" prop="end_point_code">
|
||||
<el-input v-model="form.end_point_name" style="width: 200px;" :disabled="crud.status.view > 0" @focus="openEndPonit" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:">
|
||||
<el-input v-model="form.remark" type="textarea" style="width: 530px;" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" :disabled="crud.status.view > 0" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
size="mini"
|
||||
:data="crud.data"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
@select="handleSelectionChange"
|
||||
@select-all="onSelectAll"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="iostorinv_id" label="出入单标识" />
|
||||
<el-table-column prop="bill_code" label="单据编号" show-overflow-tooltip width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_status" label="单据状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.st_bill_status[scope.row.bill_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_code" label="物料编码" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="material_name" label="物料名称" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="pcsn" label="批次" />
|
||||
<el-table-column prop="vehicle_code" label="载具编码" />
|
||||
<el-table-column prop="qty" label="数量" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="unit_name" label="单位" />
|
||||
<el-table-column prop="start_point_name" label="起始点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="end_point_name" label="终点点位" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="start_region_name" label="起始区域" />
|
||||
<el-table-column prop="end_region_name" label="终点区域" />
|
||||
<el-table-column prop="task_id" label="任务标识" show-overflow-tooltip width="120px" />
|
||||
<el-table-column prop="create_mode" label="生成方式">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.ST_CREATE_MODE[scope.row.create_mode] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||
<el-table-column prop="create_name" label="创建人" />
|
||||
<el-table-column prop="create_time" label="创建时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="update_optname" label="修改人" />
|
||||
<el-table-column prop="update_time" label="修改时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column prop="confirm_optname" label="确认人" />
|
||||
<el-table-column prop="confirm_time" label="确认时间" show-overflow-tooltip width="140px" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<el-table-column
|
||||
label="操作"
|
||||
width="115"
|
||||
align="center"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:disabled-edit="scope.row.bill_status !== '10'"
|
||||
:disabled-dle="scope.row.bill_status !== '10'"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="订单编码">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="stor_name" label="仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" :formatter="bill_typeFormat" label="业务类型" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
|
||||
<el-table-column show-overflow-tooltip prop="create_mode" :formatter="create_modeFormat" label="生成方式" />
|
||||
<el-table-column label="明细数" align="center" prop="detail_count" />
|
||||
<el-table-column label="总重量" align="center" prop="total_qty">
|
||||
<template slot-scope="scope">
|
||||
{{ fun(scope.row.total_qty) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="制单人" align="center" prop="input_optname" />
|
||||
<el-table-column label="制单时间" align="center" prop="input_time" width="150" />
|
||||
<el-table-column label="修改人" align="center" prop="update_optname" />
|
||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||
<el-table-column label="分配人" align="center" prop="dis_optname" />
|
||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
||||
<el-table-column label="确认人" align="center" prop="confirm_optname" width="150" />
|
||||
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<MaterDialog :dialog-show.sync="materDialog" @setMaterValue="setMaterValue" />
|
||||
<PointDialog :dialog-show.sync="pointDialog" :open-param="pointParam" @tableChanged2="tableChanged2" />
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :open-param="openParam" :bill-type="billType" :buss-config="bussConfig" @AddChanged="querytable" />
|
||||
<TaskDialog :dialog-show.sync="taskShow" :open-param="openParam" :buss-config="bussConfig" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudRegionioIn from '@/views/wms/st/inbill/regionioIn'
|
||||
import MaterDialog from '@/views/wms/pub/MaterDialog'
|
||||
import PointDialog from '@/views/wms/pub/PointDialog'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import crudRawAssist from '@/views/wms/st/inbill/rawassist'
|
||||
import CRUD, { crud, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudPoint from '@/views/wms/sch/point/point'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
import AddDialog from '@/views/wms/st/inbill/AddDialog'
|
||||
import DivDialog from '@/views/wms/st/inbill/DivDialog'
|
||||
import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
|
||||
import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
|
||||
import { mapGetters } from 'vuex'
|
||||
import crudStorattr from '@/views/wms/basedata/st/stor/storattr'
|
||||
|
||||
const defaultForm = {
|
||||
iostorinv_id: null,
|
||||
bill_code: null,
|
||||
io_type: null,
|
||||
material_id: null,
|
||||
material_name: null,
|
||||
pcsn: null,
|
||||
vehicle_code: null,
|
||||
qty: null,
|
||||
qty_unit_id: null,
|
||||
bill_status: null,
|
||||
start_point_code: null,
|
||||
end_point_code: null,
|
||||
start_point_name: null,
|
||||
end_point_name: null,
|
||||
start_region_id: null,
|
||||
end_region_id: null,
|
||||
cust_id: null,
|
||||
create_mode: null,
|
||||
task_id: null,
|
||||
remark: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
confirm_optid: null,
|
||||
confirm_optname: null,
|
||||
confirm_time: null,
|
||||
is_delete: null
|
||||
}
|
||||
export default {
|
||||
name: 'RegionioIn',
|
||||
dicts: ['st_bill_status', 'ST_CREATE_MODE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDialog, PointDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
name: 'Rawassist',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog, TaskDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '区域入库',
|
||||
url: 'api/regionioIn',
|
||||
title: '',
|
||||
optShow: { add: true, reset: true },
|
||||
query: { buss_type: '0001' },
|
||||
idField: 'iostorinv_id',
|
||||
sort: 'iostorinv_id,desc',
|
||||
crudMethod: { ...crudRegionioIn },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
url: '/api/in/rawAssist',
|
||||
crudMethod: { ...rawAssist }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: ['io_bill_status', 'ST_CREATE_MODE'],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
is_startOrEnd: null,
|
||||
pointParam: null,
|
||||
end_region_param: null,
|
||||
reginoList: [],
|
||||
materDialog: false,
|
||||
pointDialog: false,
|
||||
permission: {},
|
||||
rules: {
|
||||
material_id: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'blur' }
|
||||
],
|
||||
qty: [
|
||||
{ required: true, message: '数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_region_id: [
|
||||
{ required: true, message: '起点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_region_id: [
|
||||
{ required: true, message: '终点区域不能为空', trigger: 'blur' }
|
||||
],
|
||||
start_point_code: [
|
||||
{ required: true, message: '起点点位不能为空', trigger: 'blur' }
|
||||
],
|
||||
end_point_code: [
|
||||
{ required: true, message: '终点点位不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {
|
||||
add: ['admin', 'user:add'],
|
||||
edit: ['admin', 'user:edit'],
|
||||
del: ['admin', 'user:del']
|
||||
},
|
||||
audit_flag: true,
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
disShow: false,
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
taskShow: false,
|
||||
openParam: [],
|
||||
billType: null,
|
||||
bussConfig: null,
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
createtypelist: [],
|
||||
statuslist: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
])
|
||||
},
|
||||
mounted: function() {
|
||||
const that = this
|
||||
window.onresize = function temp() {
|
||||
that.height = document.documentElement.clientHeight - 180 + 'px;'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
crudPoint.getRegion().then(res => {
|
||||
this.reginoList = res
|
||||
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
|
||||
this.storlist = res.content
|
||||
})
|
||||
crudRawAssist.getType({ 'io_code': '0001', 'io_flag': '00' }).then(res => {
|
||||
this.billtypelist = res
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
getMater() {
|
||||
this.materDialog = true
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
},
|
||||
setMaterValue(row) {
|
||||
debugger
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_name = row.material_name
|
||||
},
|
||||
changeStart(val) {
|
||||
this.pointParam = val
|
||||
this.form.start_point_name = null
|
||||
this.form.start_point_code = null
|
||||
},
|
||||
changeEnd(val) {
|
||||
if (this.form.start_point_code === null) {
|
||||
this.form.end_region_id = null
|
||||
this.crud.notify('请先选择起始点位', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection()
|
||||
this.$refs.table.toggleRowSelection(val.pop())
|
||||
this.buttonChange(row)
|
||||
} else if (val.length === 1) {
|
||||
this.buttonChange(row)
|
||||
} else {
|
||||
this.pointParam = val
|
||||
this.form.end_point_name = null
|
||||
this.form.end_point_code = null
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
openStartPonit() {
|
||||
if (this.form.start_region_id === null) {
|
||||
return this.crud.notify('请选择起始区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 1代表起始点位
|
||||
this.is_startOrEnd = '1'
|
||||
this.pointDialog = true
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
openEndPonit() {
|
||||
if (this.form.end_region_id === null) {
|
||||
return this.crud.notify('请选择终点区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
// 2代表终点点位
|
||||
this.is_startOrEnd = '2'
|
||||
this.pointDialog = true
|
||||
},
|
||||
tableChanged2(row) {
|
||||
if (this.is_startOrEnd === '1') {
|
||||
this.form.start_point_code = row.point_code
|
||||
this.form.start_point_name = row.point_name
|
||||
} else {
|
||||
this.form.end_point_code = row.point_code
|
||||
this.form.end_point_name = row.point_name
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.bill_status === '10' || currentRow.bill_status === '20' || currentRow.bill_status === '30' || currentRow.bill_status === '40') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '30' || currentRow.bill_status === '40') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
createTask() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
if (_selectData[0].bill_status !== '10') {
|
||||
return this.crud.notify('只能对生成状态的单据生成任务', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
const data = _selectData[0]
|
||||
this.loading = true
|
||||
crudRegionioIn.createTask(data).then(res => {
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
for (const item of this.billtypelist) {
|
||||
if (item.code == row.bill_type) {
|
||||
return item.name
|
||||
}
|
||||
}
|
||||
},
|
||||
toView(index, row) {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
confirm() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudRawAssist.confirm(this.currentRow).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.io_bill_status[row.bill_status]
|
||||
},
|
||||
create_modeFormat(row, column) {
|
||||
return this.dict.label.ST_CREATE_MODE[row.create_mode]
|
||||
},
|
||||
divOpen() {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
this.billType = this.currentRow.bill_type
|
||||
this.divShow = true
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
},
|
||||
taskOpen() {
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '2' }).then(res => {
|
||||
this.openParam = res
|
||||
this.taskShow = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
197
lms/nladmin-ui/src/views/wms/st/inbill/rawassist.js
Normal file
197
lms/nladmin-ui/src/views/wms/st/inbill/rawassist.js
Normal file
@@ -0,0 +1,197 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getType(params) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getType',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getBillDtl(params) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getBillDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getIODtl(params) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getIODtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function commit(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/commit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function checkVehicle(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/checkVehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmvehicle(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/confirmvehicle',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteDisDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/deleteDisDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getDisDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/getDisDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function divStruct(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/divStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function unDivStruct(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/unDivStruct',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function divPoint(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/divPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/queryTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function bucketDtl(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/bucketDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/updateTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function reIssueTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/reIssueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function cancelTask(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/cancelTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function backConfirm(data) {
|
||||
return request({
|
||||
url: '/api/in/rawAssist/backConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getType, getBillDtl, insertDtl, getIODtl, commit, checkVehicle,
|
||||
confirmvehicle, deleteDisDtl, getDisDtl, divStruct, unDivStruct, divPoint,
|
||||
queryTask, bucketDtl, updateTask, delTask, reIssueTask, confirmTask, cancelTask, confirm, backConfirm }
|
||||
@@ -1,35 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/regionioIn',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/regionioIn/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/regionioIn',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function createTask(data) {
|
||||
return request({
|
||||
url: 'api/regionioIn/createTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, createTask }
|
||||
Reference in New Issue
Block a user