rev: 代码提交
This commit is contained in:
@@ -118,7 +118,7 @@
|
||||
</el-form>
|
||||
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<div v-show="crud.status.add === 1" class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
@@ -195,7 +195,7 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
|
||||
<el-table-column v-if="crud.status.add === 1" align="center" label="操作" width="170" fixed="right">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
@@ -305,7 +305,6 @@ export default {
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
crudsemiproductIn.getIODtl({ 'bill_code': this.form.bill_code }).then(res => {
|
||||
this.form.tableData = res.content
|
||||
debugger
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
@@ -323,7 +322,6 @@ export default {
|
||||
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
const row = this.form.tableData[i]
|
||||
debugger
|
||||
if (!row.base_bill_code) {
|
||||
this.crud.notify('订单号', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
@@ -332,6 +330,14 @@ export default {
|
||||
this.crud.notify('数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.stor_id) {
|
||||
this.crud.notify('所属仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('入库点不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
if (!row.storagevehicle_code) {
|
||||
this.crud.notify('载具不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
<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: 230px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<el-input
|
||||
v-model="query.sap_pcsn"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="sap批次"
|
||||
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="150" prop="sale_order_name" label="订单号" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="customer_name" label="客户编号" />
|
||||
<el-table-column width="200" prop="customer_description" 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="sap_pcsn" label="sap批次" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="product_name" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip width="170" 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'
|
||||
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
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 = '0002'
|
||||
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
|
||||
crudsemiproductIn.queryBoxMater(this.rows).then(res => {
|
||||
this.rows = res
|
||||
this.$emit('tableChanged', this.rows)
|
||||
})
|
||||
// this.form = this.$options.data().form
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,652 +0,0 @@
|
||||
<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="material_code"
|
||||
label="物料编码"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="material_spec"
|
||||
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="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="form2"
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
size="mini"
|
||||
>
|
||||
<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="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="confirmvehicle()"
|
||||
>
|
||||
组盘确认
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
:loading="divBtn"
|
||||
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' }"
|
||||
@row-click="clcikRowDis"
|
||||
>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
type="index"
|
||||
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="material_spec"
|
||||
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="storagevehicle_code"
|
||||
label="载具号"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="form.tableMater[scope.$index].storagevehicle_code"
|
||||
clearable
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
size="small"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
</el-card>
|
||||
|
||||
<StructDiv
|
||||
ref="child"
|
||||
:stor-id="storId"
|
||||
:dialog-show.sync="structShow"
|
||||
:sect-prop="sectProp"
|
||||
@tableChanged="tableChanged"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import StructDiv from '@/views/wms/pub/StructDialog'
|
||||
import crudsemiproductIn from '@/views/wms/storage_manage/semiproduct/semiproductIn/semiproductIn'
|
||||
import crudPoint from '@/api/wms/sch/point'
|
||||
import crudRegion from '@/api/wms/sch/region'
|
||||
|
||||
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
|
||||
},
|
||||
storId: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
sectProp: null,
|
||||
bucketProp: {},
|
||||
structShow: false,
|
||||
bucketObj: null,
|
||||
divBtn: false,
|
||||
bucketShow: false,
|
||||
sects: [],
|
||||
sect_val: null,
|
||||
dis_row: null,
|
||||
form: {
|
||||
dtl_row: null,
|
||||
storage_qty: '',
|
||||
sect_id: '',
|
||||
stor_id: '',
|
||||
point_code: null,
|
||||
checked: true,
|
||||
tableMater: []
|
||||
},
|
||||
storlist: [],
|
||||
pointlist: [],
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudRegion.getRegionSelect({ stor_id: this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
const area_type = 'A1_RK01'
|
||||
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
|
||||
crudsemiproductIn
|
||||
.getIODtl({ iostorinv_id: this.form.dtl_row.iostorinv_id })
|
||||
.then(res => {
|
||||
this.openParam = res
|
||||
this.form.dtl_row = res[row.index]
|
||||
})
|
||||
crudsemiproductIn.getDisDtl(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
clcikRowDis(row, column, event) {
|
||||
this.dis_row = row
|
||||
},
|
||||
vehicleCheck() {
|
||||
if (!this.form.dtl_row) {
|
||||
this.crud.notify('请选择一条入库明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.form.storagevehicle_code = ''
|
||||
return
|
||||
}
|
||||
crudsemiproductIn
|
||||
.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.dis_row === null) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.storagevehicle_code === '') {
|
||||
this.crud.notify('载具号不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudsemiproductIn.confirmvehicle(this.dis_row).then(res => {
|
||||
crudsemiproductIn
|
||||
.getIODtl({ iostorinv_id: this.form.dtl_row.iostorinv_id })
|
||||
.then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudsemiproductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('组盘成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
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) {
|
||||
this.sect_id = this.form.sect_id
|
||||
this.form.stor_id = this.stor_id
|
||||
// 新增一行物料时,给行进行赋值
|
||||
for (let i = 0; i < this.form.tableMater.length; i++) {
|
||||
this.form.tableMater[i].struct_id = row.point_id
|
||||
this.form.tableMater[i].struct_code = row.point_code
|
||||
this.form.tableMater[i].struct_name = row.point_name
|
||||
this.form.tableMater[i].region_code = row.region_code
|
||||
this.form.tableMater[i].region_name = row.region_name
|
||||
this.form.tableMater.splice(i, 1, this.form.tableMater[i]) // 通过splice 替换数据 触发视图更新
|
||||
}
|
||||
crudsemiproductIn.divStruct(this.form).then(res => {
|
||||
crudsemiproductIn
|
||||
.getIODtl({
|
||||
iostorinv_id: this.form.dtl_row.iostorinv_id,
|
||||
open_flag: '1'
|
||||
})
|
||||
.then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
this.form.tableMater = []
|
||||
})
|
||||
},
|
||||
divPoint() {
|
||||
if (!this.form.point_code) {
|
||||
this.crud.notify('请选择入库点', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.form.tableMater.length === 0) {
|
||||
this.crud.notify('请先选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudsemiproductIn.divPoint(this.form).then(res => {
|
||||
crudsemiproductIn
|
||||
.getIODtl({
|
||||
iostorinv_id: this.form.dtl_row.iostorinv_id,
|
||||
open_flag: '1'
|
||||
})
|
||||
.then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudsemiproductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('设置起点成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
},
|
||||
divStruct() {
|
||||
if (this.dis_row === null) {
|
||||
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
if (this.form.checked) {
|
||||
if (!this.sect_id) {
|
||||
this.crud.notify('请先选择区域!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.divBtn = true
|
||||
this.form.stor_id = this.stor_id
|
||||
this.form.is_pc = '1'
|
||||
crudsemiproductIn
|
||||
.divStruct(this.form)
|
||||
.then(res => {
|
||||
crudsemiproductIn
|
||||
.getIODtl({
|
||||
iostorinv_id: this.form.dtl_row.iostorinv_id,
|
||||
open_flag: '1'
|
||||
})
|
||||
.then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudsemiproductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.divBtn = false
|
||||
this.crud.notify(
|
||||
'分配货位成功!',
|
||||
CRUD.NOTIFICATION_TYPE.SUCCESS
|
||||
)
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
this.divBtn = false
|
||||
})
|
||||
} else {
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(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
|
||||
}
|
||||
// 如果勾选了,直接跳后台
|
||||
crudsemiproductIn.unDivStruct(this.form).then(res => {
|
||||
crudsemiproductIn
|
||||
.getIODtl({
|
||||
iostorinv_id: this.form.dtl_row.iostorinv_id,
|
||||
open_flag: '1'
|
||||
})
|
||||
.then(res => {
|
||||
this.openParam = res
|
||||
})
|
||||
crudsemiproductIn.getDisDtl(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('取消分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -13,6 +13,14 @@
|
||||
<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_name">
|
||||
<label slot="label">所属仓库:</label>
|
||||
<el-input v-model="form.stor_name" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库点" prop="point_code">
|
||||
<label slot="label">入库点:</label>
|
||||
<el-input v-model="form.point_code" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产车间">
|
||||
<el-select
|
||||
v-model="form.product_area"
|
||||
@@ -96,7 +104,6 @@
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tableDtl"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
@@ -106,14 +113,15 @@
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column prop="base_bill_code" label="订单号" width="150" align="center" />
|
||||
<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 min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="订单号" width="150" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" width="150" 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="base_unit_name" label="单位" align="center" />
|
||||
<el-table-column prop="unit_weight" label="单重" align="center" />
|
||||
<el-table-column prop="storagevehicle_code" label="载具号" align="center" />
|
||||
<el-table-column prop="point_code" label="入库点" align="center" />
|
||||
<el-table-column prop="struct_code" label="分配货位" align="center" />
|
||||
<el-table-column prop="task_id" label="任务号" align="center" />
|
||||
<el-table-column prop="work_status" label="任务状态" align="center" />
|
||||
@@ -174,7 +182,6 @@ export default {
|
||||
this.currentDis = {}
|
||||
this.currentdtl = null
|
||||
this.tableDtl = []
|
||||
this.tabledis = []
|
||||
this.$emit('TaskChanged')
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
@@ -213,16 +220,6 @@ export default {
|
||||
crudsemiproductIn.getIODtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
crudsemiproductIn.getDisTask({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
|
||||
debugger
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,10 +134,10 @@
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
:disabled="confirm_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="divOpen"
|
||||
@click="confirmTask"
|
||||
>
|
||||
下发执行
|
||||
</el-button>
|
||||
@@ -147,7 +147,7 @@
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="confirm_flag"
|
||||
:disabled= dis_flag
|
||||
@click="confirm"
|
||||
>
|
||||
强制确认
|
||||
@@ -174,23 +174,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
|
||||
<el-table-column prop="product_area" label="生产车间" width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="stor_name" label="仓库" width="130" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="业务类型" :formatter="bill_typeFormat" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" 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 show-overflow-tooltip prop="base_bill_code" min-width="120" label="关联单据号" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_code" label="物料编码" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="material_spec" label="物料规格" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="plan_qty" label="总数量" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="base_unit_name" label="单位" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="point_code" label="入库点" />
|
||||
<el-table-column show-overflow-tooltip min-width="120" prop="struct_code" label="分配货位" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="制单人" align="center" prop="create_name" />
|
||||
<el-table-column label="制单时间" align="center" prop="create_time" width="150" />
|
||||
<el-table-column label="创建人" align="center" prop="create_name" />
|
||||
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
|
||||
<el-table-column label="修改人" align="center" prop="update_name" />
|
||||
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
|
||||
<el-table-column label="分配人" align="center" prop="dis_name" width="140px" />
|
||||
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
|
||||
<el-table-column label="确认人" align="center" prop="confirm_name" width="150" />
|
||||
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -224,7 +221,7 @@ import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'semiproductIn',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog },
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
@@ -295,16 +292,16 @@ export default {
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
if (currentRow.bill_status === '10' || currentRow.bill_status === '20' || currentRow.bill_status === '30') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
if (currentRow.bill_status === '1') {
|
||||
if (currentRow.bill_status === '10' || currentRow.bill_status === '20' ) {
|
||||
this.confirm_flag = false
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
}
|
||||
if (currentRow.bill_status !== '99') {
|
||||
this.dis_flag = false
|
||||
} else {
|
||||
this.dis_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
@@ -321,6 +318,10 @@ export default {
|
||||
this.mstrow = row
|
||||
this.viewShow = true
|
||||
},
|
||||
toEdtl(row) {
|
||||
this.editShow = true
|
||||
this.mstrow = row
|
||||
},
|
||||
confirm() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
@@ -328,21 +329,20 @@ export default {
|
||||
}
|
||||
crudsemiproductIn.confirm(this.currentRow).then(res => {
|
||||
this.crud.notify('单据确认成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
confirmTask() {
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudsemiproductIn.confirmTask(this.currentRow).then(res => {
|
||||
this.crud.notify('单据下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
divOpen() {
|
||||
crudsemiproductIn.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '1' }).then(res => {
|
||||
this.openParam = res
|
||||
debugger
|
||||
this.storId = this.currentRow.product_code
|
||||
this.billType = this.currentRow.bill_type
|
||||
this.divShow = true
|
||||
})
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
|
||||
Reference in New Issue
Block a user