Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhangzhiqiang
2023-06-02 11:47:53 +08:00
91 changed files with 4230 additions and 605 deletions

View File

@@ -11,22 +11,24 @@
>
<el-row v-show="crud.status.cu > 0" :gutter="20">
<el-col :span="20" style="border: 1px solid white">
<span />
<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-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-input v-show="false" v-model="form.stor_code" placeholder="仓库编码" />
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称" />
<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-input v-show="false" v-model="form.stor_code" placeholder="仓库编码"/>
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称"/>
<el-form-item label="单据号" prop="bill_code">
<label slot="label">单&nbsp;&nbsp;据&nbsp;号:</label>
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
</el-form-item>
<el-form-item label="仓库" prop="stor_id">
<label slot="label">仓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;库:</label>
@@ -57,7 +59,7 @@
:disabled="crud.status.view > 0"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -72,7 +74,7 @@
:disabled="true"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -81,11 +83,12 @@
</el-form-item>
<el-form-item label="明细数" prop="dtl_num">
<label slot="label">明&nbsp;&nbsp;细&nbsp;数:</label>
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px" />
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model.trim="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
<el-input v-model.trim="form.remark" style="width: 380px;" rows="2" type="textarea"
:disabled="crud.status.view > 0"/>
</el-form-item>
</el-form>
<div class="crud-opts2">
@@ -93,7 +96,7 @@
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<slot name="left"/>
<el-button
slot="left"
class="filter-item"
@@ -114,31 +117,31 @@
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" />
<el-table-column prop="sect_name" label="盘点库区" align="center" />
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip />
<el-table-column prop="base_qty" label="桶数" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="fac_qty" label="盘点桶数" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="sect_name" label="盘点库区" align="center"/>
<el-table-column prop="struct_name" label="盘点货位" align="center"/>
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center"/>
<el-table-column prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip/>
<el-table-column prop="base_qty" label="重量" align="center" :formatter="crud.formatNum0"/>
<el-table-column v-if="crud.status.view > 0" prop="fac_qty" label="盘点重量" align="center" :formatter="crud.formatNum0"/>
<el-table-column prop="qty_unit_name" label="计量单位" align="center"/>
<el-table-column prop="storagevehicle_code" label="载具号" align="center"/>
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" 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)" />
<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" @tableChanged="tableChanged" />
<AddDtl :dialog-show.sync="dtlShow" @tableChanged="tableChanged"/>
</el-dialog>
</template>
<script>
import CRUD, { crud, form } from '@crud/crud'
import AddDtl from '@/views/wms/storage_manage/product/productCheck/AddDtl'
import CRUD, {crud, form} from '@crud/crud'
import AddDtl from '@/views/wms/storage_manage/product/productCheck/StructIvt'
import check from '@/views/wms/storage_manage/product/productCheck/check'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
const defaultForm = {
check_code: '',
@@ -154,7 +157,7 @@ const defaultForm = {
}
export default {
name: 'AddDialog',
components: { AddDtl },
components: {AddDtl},
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
@@ -162,7 +165,7 @@ export default {
default: false
}
},
dicts: ['check_bill_status', 'ST_INV_TYPE_CK', 'check_dtl_status'],
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'check_dtl_status', 'product_area'],
data() {
return {
dialogVisible: false,
@@ -173,10 +176,10 @@ export default {
storlist: [],
rules: {
stor_id: [
{ required: true, message: '仓库不能为空', trigger: 'blur' }
{required: true, message: '仓库不能为空', trigger: 'blur'}
],
check_type: [
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
{required: true, message: '业务类型不能为空', trigger: 'blur'}
]
}
}
@@ -191,7 +194,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({'stor_type': '4'}).then(res => {
this.storlist = res.content
})
},
@@ -199,7 +202,7 @@ export default {
this.$emit('AddChanged')
},
[CRUD.HOOK.afterToEdit]() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({'check_id': this.form.check_id}).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -210,7 +213,7 @@ export default {
})
},
[CRUD.HOOK.afterToView]() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({'check_id': this.form.check_id}).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -220,9 +223,6 @@ export default {
}
})
},
bill_statusFormat(row) {
return this.dict.label.check_dtl_status[row.status]
},
storChange(row) {
this.storlist.forEach((item) => {
if (item.stor_id === row) {
@@ -249,17 +249,16 @@ export default {
}
}
if (!this.flagnow) {
item.edit = false
item.status = '01'
tablemap.set(item.struct_code + '间隔' + item.material_code, item)
}
} else {
item.edit = false
item.status = '01'
tablemap.set(item.struct_code + '间隔' + item.material_code, item)
}
})
for (const value of tablemap.values()) {
value.base_qty = value.canuse_qty
this.form.tableData.push(value)
}
this.form.dtl_num = this.form.tableData.length
@@ -287,6 +286,7 @@ export default {
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
padding: 4px 4px;

View File

@@ -23,7 +23,7 @@
class="filter-item"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -53,7 +53,7 @@
:disabled="true"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -73,6 +73,16 @@
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="addrow"
>
下发任务
</el-button>
<el-button
slot="left"
class="filter-item"
@@ -101,8 +111,8 @@
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="sect_name" label="盘点库区" align="center" />
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center">
<el-table-column prop="storagevehicle_code" label="载具号" align="center" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="150" align="center">
<template scope="scope">
<el-input v-show="isShow(scope.$index, scope.row,1)" v-model="scope.row.material_code" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)" />
@@ -110,17 +120,19 @@
<span v-show="isShow(scope.$index, scope.row,3)">{{ scope.row.material_code }}</span>
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="base_qty" label="桶数" :formatter="crud.formatNum0" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点桶数" width="160" align="center">
<el-table-column prop="material_name" label="物料名称" align="center" show-overflow-tooltip />
<el-table-column prop="base_qty" label="重量" :formatter="crud.formatNum0" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点重量" width="160" align="center">
<template scope="scope">
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="0" :min="0" />
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="3" :min="0" />
<span v-show="isShow(scope.$index, scope.row,4)">{{ scope.row.fac_qty }}</span>
</template>
</el-table-column>
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
<el-table-column prop="check_result" label="是否异常" align="center" :formatter="check_resultFormat" />
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" />
<el-table-column prop="status" label="盘点状态" align="center" :formatter="bill_statusFormat" />
<el-table-column prop="" label="盘点站台" align="center" />
<el-table-column prop="" label="任务状态" align="center" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button :disabled="isCanDel(scope.$index, scope.row,1)" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, tableData)" />
@@ -135,14 +147,14 @@
<el-button type="primary" @click="saveCheck">保存</el-button>
<el-button type="primary" @click="submitCheck">确认</el-button>
</span>
<MaterDialog :dialog-show.sync="materShow" @tableChanged2="tableChanged2" />
<MaterDialog :dialog-show.sync="materShow" @setMaterValue="tableChanged2" />
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import check from '@/views/wms/storage_manage/product/productCheck/check'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
import MaterDialog from '@/views/wms/pub/MaterDialog'
export default {
@@ -161,7 +173,7 @@ export default {
type: Object
}
},
dicts: ['check_bill_status', 'ST_INV_TYPE_CK', 'check_dtl_status', 'check_result'],
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'CHECK_DTL_STATUS', 'check_result'],
data() {
return {
dialogVisible: false,
@@ -197,15 +209,15 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
check.getOutBillDtl2({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({ 'check_id': this.form.check_id }).then(res => {
this.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
row.edit = false
this.$set(row,'edit',false)
if (row.status > '04') {
row.edit = true
}
@@ -303,7 +315,7 @@ export default {
this.form = row
},
bill_statusFormat(row, column) {
return this.dict.label.check_dtl_status[row.status]
return this.dict.label.CHECK_DTL_STATUS[row.status]
},
check_resultFormat(row, column) {
return this.dict.label.check_result[row.check_result]
@@ -313,7 +325,7 @@ export default {
this.crud.notify('请先选中一条已存在的库存明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.tableData.push({ check_id: this.form.check_id, check_code: this.form.check_code, checkdtl_id: '', sect_id: this.nowrow.sect_id, sect_name: this.nowrow.sect_name, struct_id: this.nowrow.struct_id, struct_name: this.nowrow.struct_name, storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_code: this.nowrow.storagevehicle_code, status: '01', material_id: '', material_name: '', base_qty: '0', qty_unit_id: '42', qty_unit_name: '', is_down: '0', fac_qty: '', check_result: '0', edit: false })
this.tableData.push({ check_id: this.form.check_id, check_code: this.form.check_code, checkdtl_id: '', sect_id: this.nowrow.sect_id, sect_name: this.nowrow.sect_name, struct_id: this.nowrow.struct_id, struct_name: this.nowrow.struct_name, storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_code: this.nowrow.storagevehicle_code, status: '01', material_id: '', material_name: '', base_qty: '0', qty_unit_id: '1', qty_unit_name: 'KG', is_down: '0', fac_qty: '', check_result: '0', edit: false })
this.form.dtl_num = this.tableData.length
},
async queryMater(index, row) {
@@ -323,7 +335,7 @@ export default {
},
tableChanged2(row) {
for (let i = 0; i < this.tableData.length; i++) {
if ((this.tableData[i].material_id === row.material_id) && (this.tableData[i].storagevehicle_code === this.nowrow.storagevehicle_code) && (this.tableData[i].struct_id === this.nowrow.struct_id)) {
if ((this.tableData[i].material_id === row.material_id) && (this.tableData[i].struct_id === this.nowrow.struct_id)) {
this.crud.notify('不允许货位、载具、物料同时相同!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}

View File

@@ -23,7 +23,7 @@
class="filter-item"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -53,7 +53,7 @@
:disabled="true"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -72,7 +72,6 @@
<span class="role-span">盘点单明细</span>
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
@@ -80,11 +79,10 @@
icon="el-icon-plus"
size="mini"
:disabled="process1_flag"
@click="process1"
@click="openReCheck"
>
重新盘点
</el-button>
</span>
拆箱盘点
</el-button>
<el-button
slot="left"
@@ -97,6 +95,8 @@
>
账务为准
</el-button>
<slot name="left" />
</span>
</div>
<!--表格渲染-->
@@ -115,21 +115,22 @@
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="base_qty" label="桶数" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点桶数" :formatter="crud.formatNum0" width="160" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" show-overflow-tooltip />
<el-table-column prop="base_qty" label="重量/数量" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点重量/数量" :formatter="crud.formatNum0" width="160" align="center" />
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
<el-table-column prop="storagevehicle_code" label="载具号" align="center" />
<el-table-column prop="check_result" label="盘点结果" align="center" :formatter="check_resultFormat" />
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" />
</el-table>
<ReCheckDialog ref="child3" @ReCheckChanged="getOutBillDtl" />
<ReCheckDialog ref="child4" @ReCheckChanged="getOutBillDtl" />
</el-dialog>
</template>
<script>
import { crud } from '@crud/crud'
import CRUD, { crud } from '@crud/crud'
import check from '@/views/wms/storage_manage/product/productCheck/check'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
import ReCheckDialog from '@/views/wms/storage_manage/product/productCheck/ReCheckDialog'
export default {
@@ -148,7 +149,7 @@ export default {
type: Object
}
},
dicts: ['check_bill_status', 'ST_INV_TYPE_CK', 'check_dtl_status', 'check_result'],
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'CHECK_DTL_STATUS', 'check_result'],
data() {
return {
dialogVisible: false,
@@ -185,7 +186,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
this.getOutBillDtl()
@@ -214,25 +215,33 @@ export default {
this.form = row
},
bill_statusFormat(row, column) {
return this.dict.label.check_dtl_status[row.status]
return this.dict.label.CHECK_DTL_STATUS[row.status]
},
check_resultFormat(row, column) {
return this.dict.label.check_result[row.check_result]
},
process0() {
check.process0({ 'form': this.form, 'row': this.nowrow }).then(res => {
this.crud.notify('操作完成!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.getOutBillDtl()
})
},
process1() {
if (this.nowrow !== null) {
this.$refs.child3.setReForm(this.nowrow)
}
check.process1({ 'form': this.form, 'row': this.nowrow }).then(res => {
this.crud.notify('操作完成!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.getOutBillDtl()
})
},
getOutBillDtl() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({ 'check_id': this.form.check_id,'check_result': '-1'}).then(res => {
this.tableData = res
})
},
openReCheck() {
if (!this.nowrow) {
this.crud.notify('请选择一条明细!', CRUD.NOTIFICATION_TYPE.INFO)
}
this.$refs.child4.setReFormCheck(this.nowrow)
}
}
}

View File

@@ -1,7 +1,6 @@
<!--suppress ALL -->
<template>
<el-dialog
title="重新盘点"
title="拆箱盘点"
append-to-body
fullscreen
:visible.sync="dialogVisible"
@@ -22,6 +21,9 @@
<el-form-item label="明细数" prop="dtl_num">
<el-input v-model.trim="form.dtl_num" style="width: 200px" :disabled="true" />
</el-form-item>
<el-form-item label="盘点重量" prop="dtl_num">
<el-input v-model.trim="form.fac_qty" style="width: 200px" :disabled="true" />
</el-form-item>
</el-form>
</el-card>
<div class="crud-opts2">
@@ -56,67 +58,17 @@
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="bucketunique" label="号" width="190" align="center">
<el-table-column show-overflow-tooltip prop="bucketunique" label="号" width="190" align="center">
<template scope="scope">
<el-input v-show="isCanDel(scope.$index, scope.row,'3')" v-model="scope.row.bucketunique" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryBucket(scope.$index, scope.row)" />
<el-input v-show="isCanDel(scope.$index, scope.row,'3')" v-model="scope.row.bucketunique" class="input-with-select">
<!-- <el-button slot="append" icon="el-icon-search" @click="queryBucket(scope.$index, scope.row)" />-->
</el-input>
<span v-show="isCanDel(scope.$index, scope.row,'2')">{{ scope.row.bucketunique }}</span>
</template>
</el-table-column>
<el-table-column prop="material_code" label="物料编码" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="quality_scode" label="品质类型" align="center" width="110px">
<template slot-scope="scope">
<el-select
v-model="scope.row.quality_scode"
class="filter-item"
disabled
>
<el-option
v-for="item in dict.ST_QUALITY_SCODE"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="ivt_level" label="库存等级" align="center" width="100px">
<template slot-scope="scope">
<el-select
v-model="scope.row.ivt_level"
class="filter-item"
disabled
>
<el-option
v-for="item in dict.ST_IVT_LEVEL"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="is_active" label="是否可用" align="center" width="110px">
<template slot-scope="scope">
<el-select
v-model="scope.row.is_active"
class="filter-item"
disabled
>
<el-option
v-for="item in dict.is_used"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="pcsn" label="批次" align="center" />
<el-table-column prop="ivt_qty" label="库存重量" :formatter="crud.formatNum3" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" show-overflow-tooltip />
<el-table-column prop="storage_qty" label="库存重量" :formatter="crud.formatNum3" align="center" />
<el-table-column show-overflow-tooltip prop="ivt_qty_ck" label="盘点重量" width="160" align="center">
<template scope="scope">
<el-input-number v-show="!scope.row.edit" v-model="scope.row.ivt_qty_ck" :precision="3" :min="0" />
@@ -126,7 +78,7 @@
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
<el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button :disabled="scope.row.new_edit" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, tableData)" />
<el-button :disabled="scope.row.edit" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, tableData)" />
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button v-show="scope.row.edit" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
</template>
@@ -138,7 +90,7 @@
<el-button type="primary" @click="process1">确认</el-button>
</span>
<MaterDialog :dialog-show.sync="materShow" @tableChanged2="tableChanged2" />
<BucketDialog :dialog-show.sync="bucketShow" @bucketChange="tableChanged2" />
<!-- <BucketDialog :dialog-show.sync="bucketShow" @bucketChange="tableChanged2" />-->
</el-dialog>
</template>
@@ -150,7 +102,7 @@ import MaterDialog from '@/views/wms/pub/MaterDialog'
export default {
name: 'ReCheckDialog',
components: { MaterDialog, BucketDialog },
components: { MaterDialog },
mixins: [crud()],
props: {
dialogShow: {
@@ -188,12 +140,13 @@ export default {
},
methods: {
open() {
check.getOutBillDis({ 'storagevehicle_code': this.form.storagevehicle_code }).then(res => {
check.getBucketrecord({ 'storagevehicle_code': this.form.storagevehicle_code, 'status': '3', 'checkdtl_id': this.form.checkdtl_id}).then(res => {
this.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
row.new_edit = true
this.$set(row,'edit',false)
row.new_edit = false
this.tableData.splice(i, 1, row)
}
this.form.dtl_num = this.tableData.length
@@ -205,13 +158,15 @@ export default {
handleCurrentChange(current) {
if (current !== null) {
this.nowrow = current
this.add_flag = false
if (this.form.check_result !== '1') {
this.add_flag = false
}
} else {
this.nowrow = null
this.add_flag = true
}
},
setReForm(row) {
setReFormCheck(row) {
this.dialogVisible = true
this.form = row
},
@@ -220,7 +175,7 @@ export default {
this.crud.notify('请先选中一条已存在的盘点明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.tableData.push({ bucketunique: '', storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_type: this.nowrow.storagevehicle_type, storagevehicle_code: this.nowrow.storagevehicle_code, material_id: '', material_name: '', ivt_qty: '0', qty_unit_id: '', qty_unit_name: '', pcsn: '', quality_scode: '00', ivt_level: '01', is_active: '1', ivt_qty_ck: '0', edit: false, new_edit: false })
this.tableData.push({ bucketunique: '', storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_type: this.nowrow.storagevehicle_type, storagevehicle_code: this.nowrow.storagevehicle_code, material_id: this.nowrow.material_id, material_name: this.nowrow.material_name,material_code: this.nowrow.material_code, ivt_qty: '0', qty_unit_id: '', qty_unit_name: '', pcsn: '', quality_scode: '00', ivt_level: '01', is_active: '1', ivt_qty_ck: '0', edit: false, new_edit: false })
this.form.dtl_num = this.tableData.length
},
async queryMater(index, row) {
@@ -283,8 +238,8 @@ export default {
handleEdit(index, row) {
// 判断是否可以关闭编辑状态
if (!row.edit) {
const num = parseFloat(row.ivt_qty)
const fac_qty = parseFloat(row.ivt_qty_ck)
const num = parseFloat(row.storage_qty)
const fac_qty = parseFloat(row.storage_qty)
if (num <= 0 && fac_qty <= 0) {
this.crud.notify('不允许新增明细,盘点数量为0', CRUD.NOTIFICATION_TYPE.INFO)
return false
@@ -293,19 +248,18 @@ export default {
this.crud.notify('物料不可为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!row.pcsn) {
this.crud.notify('物料批次不可为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!row.bucketunique) {
this.crud.notify('桶号不可为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
let qty = 0
for (let i = 0; i < this.tableData.length; i++) {
if ((this.tableData[i].bucketunique === row.bucketunique) && (index !== i)) {
this.crud.notify('不允许桶号同时相同!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
qty = parseFloat(this.tableData[i].ivt_qty_ck) + parseFloat(qty)
}
if (qty > parseFloat(this.form.fac_qty) ) {
this.crud.notify('不允许大于盘点重量!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
row.edit = !row.edit
@@ -315,7 +269,7 @@ export default {
rows.splice(index, 1)
this.nowindex = ''
this.nowrow = null
this.form.detail_count = this.tableData.length
this.form.dtl_num = this.tableData.length
},
process1() {
if (this.tableData.length === 0) {
@@ -328,7 +282,8 @@ export default {
return false
}
}
check.process1({ 'row': this.form, 'rows': this.tableData }).then(res => {
check.processBox({ 'form': this.form, 'row': this.tableData }).then(res => {
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.dialogVisible = false
})
}

View File

@@ -0,0 +1,156 @@
<!--suppress ALL -->
<template>
<el-dialog
title="库存选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1200px"
@close="close"
@open="open"
>
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="日期">
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-MM-dd"/>
</el-form-item>
<el-form-item label="库区/货位">
<el-input
v-model="query.bill_code"
clearable
size="mini"
placeholder="单据号"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料">
<el-input
v-model="query.material_search"
clearable
size="mini"
placeholder="物料"
style="width: 230px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation/>
</el-form>
</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="sect_code" label="库区"/>
<el-table-column show-overflow-tooltip width="150" prop="struct_name" label="货位"/>
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号"/>
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称"/>
<el-table-column show-overflow-tooltip width="150" prop="class_name" label="物料类别"/>
<el-table-column show-overflow-tooltip width="150" prop="canuse_qty" label="重量"/>
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位"/>
<el-table-column show-overflow-tooltip prop="storagevehicle_code" 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/stIvtStructivtYl/getProductIvt',
crudMethod: {},
optShow: {
reset: true
}
})
},
mixins: [presenter(), header(), crud()],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
rows: [],
tableData: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
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() {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged', this.rows)
// this.form = this.$options.data().form
}
}
}
</script>

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/check',
url: 'api/stIvtCheckmstCp',
method: 'post',
data
})
@@ -10,57 +10,62 @@ export function add(data) {
export function del(ids) {
return request({
url: 'api/check/',
method: 'delete',
url: 'api/stIvtCheckmstCp/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/check',
method: 'put',
data
})
}
export function getOutBillDtl(params) {
return request({
url: '/api/check/getOutBillDtl',
method: 'get',
params
})
}
export function getOutBillDtl2(params) {
return request({
url: '/api/check/getOutBillDtl2',
method: 'get',
params
})
}
export function getOutBillDis(params) {
return request({
url: '/api/check/getOutBillDis',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/check/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/check/insertDtl',
url: 'api/stIvtCheckmstCp/update',
method: 'post',
data
})
}
export function getCheckDtl(data) {
return request({
url: '/api/stIvtCheckmstCp/getCheckDtl',
method: 'post',
data
})
}
export function getOutBillDtl2(params) {
return request({
url: '/api/stIvtCheckmstCp/getOutBillDtl2',
method: 'get',
params
})
}
export function getOutBillDis(params) {
return request({
url: '/api/stIvtCheckmstCp/getOutBillDis',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/stIvtCheckmstCp/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/stIvtCheckmstCp/insertDtl',
method: 'post',
data
})
}
export function getStructIvt(params) {
return request({
url: '/api/check/getStructIvt',
url: '/api/stIvtCheckmstCp/getStructIvt',
method: 'get',
params
})
@@ -68,37 +73,73 @@ export function getStructIvt(params) {
export function confirm(data) {
return request({
url: '/api/check/confirm',
url: '/api/stIvtCheckmstCp/confirm',
method: 'post',
data
})
}
export function handdown(data) {
return request({
url: '/api/check/handdown',
url: '/api/stIvtCheckmstCp/handdown',
method: 'post',
data
})
}
export function saveCheck(data) {
return request({
url: '/api/check/saveCheck',
url: '/api/stIvtCheckmstCp/saveCheck',
method: 'post',
data
})
}
export function process0(data) {
return request({
url: '/api/check/process0',
url: '/api/stIvtCheckmstCp/process0',
method: 'post',
data
})
}
export function process1(data) {
return request({
url: '/api/check/process1',
url: '/api/stIvtCheckmstCp/process1',
method: 'post',
data
})
}
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1 }
export function getBucketrecord(data) {
return request({
url: '/api/stIvtCheckmstCp/getBucketrecord',
method: 'post',
data
})
}
export function processBox(data) {
return request({
url: '/api/stIvtCheckmstCp/processBox',
method: 'post',
data
})
}
export default {
add,
edit,
del,
getCheckDtl,
getStructIvt,
getOutBillDtl2,
confirm,
getInvTypes,
saveCheck,
process0,
getOutBillDis,
process1,
getBucketrecord,
processBox
}

View File

@@ -78,7 +78,7 @@
@change="crud.toQuery"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -97,14 +97,14 @@
@change="crud.toQuery"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<rrOperation />
<rrOperation/>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -173,32 +173,32 @@
/>
</template>
</el-table-column>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column prop="check_code" min-width="130" label="订单编码">
<el-table-column :selectable="checkboxT" type="selection" width="55"/>
<el-table-column prop="check_code" min-width="130" label="单据号">
<template slot-scope="scope">
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.check_code }}</el-link>
</template>
</el-table-column>
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" min-width="100" />
<el-table-column prop="check_type" :formatter="bill_typeFormat" min-width="100" label="业务类型" />
<el-table-column prop="is_nok" :formatter="is_nokFormat" min-width="100" label="盘点状态" />
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100" />
<el-table-column label="明细数" align="center" prop="dtl_num" min-width="100" />
<el-table-column prop="input_time" min-width="135" label="创建日期" />
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="单据状态"/>
<el-table-column prop="stor_name" label="仓库" min-width="100"/>
<el-table-column prop="check_type" :formatter="bill_typeFormat" min-width="100" label="业务类型"/>
<el-table-column prop="is_nok" :formatter="is_nokFormat" min-width="100" label="盘点状态"/>
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100"/>
<el-table-column label="明细数" align="center" prop="dtl_num" min-width="100"/>
<el-table-column prop="create_time" min-width="135" label="创建日期"/>
</el-table>
<!--分页组件-->
<pagination />
<pagination/>
</div>
<AddDialog @AddChanged="querytable" />
<CheckDialog ref="child" @AddChanged="querytable" />
<ProcessDialog ref="child2" @AddChanged="querytable" />
<AddDialog @AddChanged="querytable"/>
<CheckDialog ref="child" @AddChanged="querytable"/>
<ProcessDialog ref="child2" @AddChanged="querytable"/>
</div>
</template>
<script>
import check from '@/views/wms/storage_manage/product/productCheck/check'
import CRUD, { crud, header, presenter } from '@crud/crud'
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'
@@ -206,31 +206,33 @@ import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/storage_manage/product/productCheck/AddDialog'
import CheckDialog from '@/views/wms/storage_manage/product/productCheck/CheckDialog'
import ProcessDialog from '@/views/wms/storage_manage/product/productCheck/ProcessDialog'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
import {download} from '@/api/data'
import {downloadFile} from '@/utils'
export default {
name: 'Check',
components: { CheckDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, ProcessDialog },
components: {CheckDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, ProcessDialog},
cruds() {
return CRUD({ title: '用户',
return CRUD({
title: '用户',
props: {
// 每页数据条数
size: 20
},
idField: 'check_id', url: 'api/check', crudMethod: { ...check },
idField: 'check_id', url: 'api/stIvtCheckmstCp', crudMethod: {...check},
optShow: {
add: true,
edit: false,
del: false,
reset: true,
download: false
}})
}
})
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['check_bill_status', 'ST_CREATE_MODE', 'ST_INV_TYPE_CK'],
dicts: ['CHECK_BILL_STATUS', 'ST_CREATE_MODE', 'ST_INV_CK_TYPE'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
@@ -246,14 +248,14 @@ export default {
storlist: []
}
},
mounted: function() {
mounted: function () {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
created() {
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({'stor_type': '4'}).then(res => {
this.storlist = res.content
})
},
@@ -272,7 +274,7 @@ export default {
this.buttonChange(row)
} else if (val.length === 1) {
this.buttonChange(row)
}else{
} else {
this.handleCurrentChange(null)
}
},
@@ -289,7 +291,7 @@ export default {
} else {
this.check_flag = true
}
if (current.status === '30' && current.is_nok === '1') {
if (current.status === '30' && current.is_nok) {
this.confirm_flag = false
} else {
this.confirm_flag = true
@@ -297,16 +299,16 @@ export default {
}
},
stateFormat(row) {
return this.dict.label.check_bill_status[row.status]
return this.dict.label.CHECK_BILL_STATUS[row.status]
},
bill_typeFormat(row) {
return this.dict.label.ST_INV_TYPE_CK[row.check_type]
return this.dict.label.ST_INV_CK_TYPE[row.check_type]
},
create_modeFormat(row) {
return this.dict.label.ST_CREATE_MODE[row.create_mode]
},
is_nokFormat(row) {
if (row.is_nok === '1') {
if (row.is_nok) {
return '异常'
} else {
return '正常'
@@ -336,7 +338,7 @@ export default {
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
download('/api/check/download', { check_id: this.currentRow.check_id }).then(result => {
download('/api/check/download', {check_id: this.currentRow.check_id}).then(result => {
downloadFile(result, this.currentRow.check_code + '盘点数据', 'xlsx')
crud.downloadLoading = false
}).catch(() => {

View File

@@ -67,7 +67,7 @@
</el-table-column>
<el-table-column show-overflow-tooltip width="150" prop="bucketunique" label="箱号" />
<el-table-column show-overflow-tooltip width="150" prop="storagevehicle_type" label="箱类型" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="150" prop="pcsn" label="批次" />
@@ -99,6 +99,7 @@ import crudProductIn from '@/views/wms/storage_manage/product/productIn/producti
const start = new Date()
export default {
name: 'AddBox',
dicts: ['BOX_STATUS'],
components: { crudOperation, rrOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
@@ -155,6 +156,9 @@ export default {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged2', this.tableRadio)
},
formterStatus(row) {
return this.dict.label.BOX_STATUS[row.status]
}
}
}

View File

@@ -70,8 +70,8 @@
</template>
</el-table-column>
<el-table-column show-overflow-tooltip width="150" prop="sale_code" label="销售单号" />
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" />
<el-table-column show-overflow-tooltip width="150" prop="sale_type" label="销售单类型" :formatter="formterType" />
<el-table-column show-overflow-tooltip width="150" prop="status" label="状态" :formatter="formterStatus" />
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" />
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" />
<el-table-column show-overflow-tooltip width="150" prop="sale_qty" label="销售数量" />
@@ -106,6 +106,7 @@ import crudProductIn from '@/views/wms/storage_manage/product/productIn/producti
const start = new Date()
export default {
name: 'AddDtl',
dicts: ['PCS_SAL_TYPE', 'PCS_SALE_STATUS'],
components: { crudOperation, rrOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
@@ -160,6 +161,12 @@ export default {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged', this.tableRadio)
},
formterType(row) {
return this.dict.label.PCS_SAL_TYPE[row.sale_type]
},
formterStatus(row) {
return this.dict.label.PCS_SALE_STATUS[row.status]
}
}
}

View File

@@ -85,6 +85,7 @@
<el-form-item label="放入数量:" prop="storage_qty">
<el-input-number
v-model="form.storage_qty"
:disabled="form.bucketunique !== ''"
style="width: 200px"
size="mini"
:controls="false"
@@ -155,6 +156,16 @@
>
组盘确认
</el-button>
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="cancelConfirmvehicle()"
>
取消组盘
</el-button>
<el-button
slot="left"
:loading="divBtn"
@@ -231,7 +242,7 @@
<script>
import CRUD, { crud } from '@crud/crud'
import StructDiv from '@/views/wms/pub/StructDialog'
import StructDiv from '@/views/wms/storage_manage/product/productIn/StructDiv'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import crudPoint from '@/views/wms/scheduler_manage/point/point'
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
@@ -474,6 +485,22 @@ export default {
})
})
},
cancelConfirmvehicle() {
if (!this.form.dtl_row) {
this.crud.notify('请选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return
}
crudProductIn.cancelConfirmvehicle(this.form.dtl_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id }).then(res => {
this.form.vehicle_code = ''
this.form.bucketunique = ''
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
})
},
sectQueryChange(val) {
debugger
this.sectProp = val
@@ -493,20 +520,17 @@ export default {
tableChanged(row) {
this.form.sect_id = this.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 替换数据 触发视图更新
}
crudProductIn.divStruct(this.form).then(res => {
crudProductIn.getIODtl({ 'iostorinv_id': this.form.dtl_row.iostorinv_id, 'open_flag': '1' }).then(res => {
this.dis_row.struct_id = row.struct_id
this.divBtn = true
crudProductIn.divStruct(this.dis_row).then(res => {
crudProductIn.getIosInvDtl({ 'iostorinv_id': this.dis_row.iostorinv_id }).then(res => {
this.openParam = res
this.form.tableMater = []
this.dis_row = null
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
this.form.tableMater = []
}).finally(() => {
this.divBtn = false
})
},
tableChanged2(row) {
@@ -520,15 +544,14 @@ export default {
this.crud.notify('请先选择一条分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.sect_id) {
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
debugger
this.dis_row.stor_id = this.stor_id.toString()
this.dis_row.sect_id = this.sect_id.toString()
crudProductIn.divStruct(this.dis_row).then(res => {
@@ -542,6 +565,10 @@ export default {
this.divBtn = false
})
} else {
if (!this.stor_id) {
this.crud.notify('请先选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.structShow = true
this.$refs.child.getMsg(false)
}

View File

@@ -0,0 +1,208 @@
<template>
<el-dialog
title="货位选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1000px"
@close="close"
@open="open"
>
<!-- 搜索 -->
<el-row>
<el-col :span="6">
<el-cascader
v-model="query.sect"
placeholder="所属库区"
:options="sects"
:props="{ checkStrictly: true }"
clearable
@change="sectQueryChange"
/>
</el-col>
<el-col :span="6">
<el-input
v-model="query.struct_code"
clearable
style="width: 200px"
size="mini"
placeholder="输入货位编码、名称"
prefix-icon="el-icon-search"
class="filter-item"
/>
</el-col>
<el-col :span="6">
<rrOperation/>
</el-col>
</el-row>
<!--表格渲染-->
<el-table
ref="table"
v-loading="crud.loading"
:data="crud.data"
style="width: 100%;"
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55"/>
<el-table-column prop="struct_code" label="货位编码"/>
<el-table-column prop="struct_name" label="货位名称"/>
<el-table-column prop="sect_name" label="库区名称"/>
<el-table-column prop="lock_type" :formatter="lockFormat" label="是否锁定"/>
<el-table-column prop="storagevehicle_code" label="存储载具号"/>
</el-table>
<!--分页组件-->
<pagination/>
<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 crudStructattr from '@/api/wms/basedata/st/structattr'
import crudSectattr from '@/api/wms/basedata/st/sectattr'
export default {
name: 'StructDiv',
components: {crudOperation, rrOperation, pagination},
cruds() {
return CRUD({
title: '仓位',
optShow: {},
url: 'api/structattr',
idField: 'struct_id',
sort: 'struct_id,desc',
query: { search: '', is_lock: '0', sect_id: '', stor_id: '' },
crudMethod: { ...crudStructattr }
})
},
mixins: [presenter(), header()],
dicts: ['d_lock_type'],
props: {
dialogShow: {
type: Boolean,
default: false
},
storId: {
type: String,
default: ''
}
},
data() {
return {
sects: [],
classes: [],
dialogVisible: false,
sect: {},
mol_type: '',
checkrow: {},
rows: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
},
sectProp: {
handler(newValue, oldValue) {
this.sect = newValue
}
}
},
methods: {
open() {
this.crud.resetQuery(false)
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
/* if (this.sect) {
this.query.sect = this.sect
if (this.sect.length === 1) {
this.query.stor_id = this.sect[0]
this.query.sect_id = ''
}
if (this.sect.length === 0) {
this.query.sect_id = ''
this.query.stor_id = ''
}
if (this.sect.length === 2) {
this.query.stor_id = this.sect[0]
this.query.sect_id = this.sect[1]
}
}*/
this.query.stor_id = this.storId
this.query.is_used = '1'
this.query.is_delete = '0'
this.crud.toQuery()
},
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]
}
this.crud.toQuery()
},
handleSelectionChange(val, row) {
if (val.length > 1) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(val.pop())
this.checkrow = row
} else {
this.checkrow = row
}
},
/**
* 接受父组件传值
* @param msg
*/
getMsg(msg) {
this.mol_type = msg
},
lockFormat(row, column) {
return this.dict.label.d_lock_type[row.lock_type]
},
onSelectAll() {
this.$refs.table.clearSelection()
},
close() {
this.sects = null
this.$emit('update:dialogShow', false)
},
submit() {
this.rows = this.$refs.table.selection
if (this.rows.length <= 0) {
this.$message('请先勾选仓位')
return
}
// 溢单不允许选择已锁定或者有载具的货位
if (this.checkrow.lock_type !== '0') {
this.$message('不允许选择已锁定的货位!')
return
}
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.checkrow)
}
}
}
</script>

View File

@@ -96,6 +96,14 @@ export function confirm(data) {
})
}
export function cancelConfirmvehicle(data) {
return request({
url: '/api/productIn/cancelConfirmvehicle',
method: 'post',
data
})
}
export default {
add,
edit,
@@ -108,5 +116,6 @@ export default {
divStruct,
unDivStruct,
setPoint,
confirm
confirm,
cancelConfirmvehicle
}

View File

@@ -409,7 +409,7 @@ export default {
this.nowrow = row
},
async queryStruct() {
if (!this.form.mol_type) {structShow
if (!this.form.mol_type) {
this.crud.notify('请先选择损溢类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}

View File

@@ -147,7 +147,7 @@
</template>
</el-table-column>
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="单据状态" />
<el-table-column label="备注" align="center" min-width="100" prop="remark" />
<el-table-column label="备注" show-overflow-tooltip align="center" min-width="100" prop="remark" />
<el-table-column prop="create_mode" min-width="100" :formatter="create_modeFormat" label="生成方式" />
<el-table-column label="制单人" align="center" min-width="100" prop="create_name" />
<el-table-column label="制单时间" align="center" prop="create_time" min-width="150" />

View File

@@ -11,22 +11,42 @@
>
<el-row v-show="crud.status.cu > 0" :gutter="20">
<el-col :span="20" style="border: 1px solid white">
<span />
<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-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-input v-show="false" v-model="form.stor_code" placeholder="仓库编码" />
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称" />
<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-input v-show="false" v-model="form.stor_code" placeholder="仓库编码"/>
<el-input v-show="false" v-model="form.stor_name" placeholder="仓库名称"/>
<el-form-item label="单据号" prop="bill_code">
<label slot="label">单&nbsp;&nbsp;据&nbsp;号:</label>
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
</el-form-item>
<el-form-item label="车间" prop="workshop_id">
<label slot="label">车间</label>
<el-select
v-model="form.workshop_id"
clearable
size="mini"
:disabled="crud.status.view > 0"
placeholder="全部"
class="filter-item"
>
<el-option
v-for="item in dict.product_area"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="仓库" prop="stor_id">
<label slot="label">仓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;库:</label>
@@ -57,7 +77,7 @@
:disabled="crud.status.view > 0"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -72,7 +92,7 @@
:disabled="true"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -81,11 +101,12 @@
</el-form-item>
<el-form-item label="明细数" prop="dtl_num">
<label slot="label">明&nbsp;&nbsp;细&nbsp;数:</label>
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px" />
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<label slot="label">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</label>
<el-input v-model.trim="form.remark" style="width: 380px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
<el-input v-model.trim="form.remark" style="width: 380px;" rows="2" type="textarea"
:disabled="crud.status.view > 0"/>
</el-form-item>
</el-form>
<div class="crud-opts2">
@@ -93,7 +114,7 @@
<span v-if="crud.status.cu > 0" class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<slot name="left"/>
<el-button
slot="left"
class="filter-item"
@@ -114,31 +135,31 @@
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="status" label="状态" align="center" :formatter="bill_statusFormat" />
<el-table-column prop="sect_name" label="盘点库区" align="center" />
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center" />
<el-table-column prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip />
<el-table-column prop="base_qty" label="桶数" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="fac_qty" label="盘点桶数" align="center" :formatter="crud.formatNum0" />
<el-table-column prop="qty_unit_name" label="计量单位" align="center" />
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="sect_name" label="盘点库区" align="center"/>
<el-table-column prop="struct_name" label="盘点货位" align="center"/>
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="120" align="center"/>
<el-table-column prop="material_name" label="物料名称" align="center" min-width="120" show-overflow-tooltip/>
<el-table-column prop="base_qty" label="数量" align="center" :formatter="crud.formatNum0"/>
<el-table-column prop="unit_weight" label="单重" align="center"/>
<el-table-column v-if="crud.status.view > 0" prop="fac_qty" label="盘点重量" align="center" :formatter="crud.formatNum0"/>
<el-table-column prop="storagevehicle_code" label="载具号" align="center"/>
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="160" 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)" />
<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" @tableChanged="tableChanged" />
<AddDtl :dialog-show.sync="dtlShow" @tableChanged="tableChanged"/>
</el-dialog>
</template>
<script>
import CRUD, { crud, form } from '@crud/crud'
import AddDtl from '@/views/wms/storage_manage/semiproduct/semiproductCheck/AddDtl'
import CRUD, {crud, form} from '@crud/crud'
import AddDtl from '@/views/wms/storage_manage/semiproduct/semiproductCheck/StructIvt'
import check from '@/views/wms/storage_manage/semiproduct/semiproductCheck/check'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
const defaultForm = {
check_code: '',
@@ -148,13 +169,14 @@ const defaultForm = {
status: '10',
dtl_num: '0',
check_type: '',
workshop_id: '',
remark: '',
create_mode: '',
tableData: []
}
export default {
name: 'AddDialog',
components: { AddDtl },
components: {AddDtl},
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
@@ -162,7 +184,7 @@ export default {
default: false
}
},
dicts: ['check_bill_status', 'ST_INV_TYPE_CK', 'check_dtl_status'],
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'check_dtl_status', 'product_area'],
data() {
return {
dialogVisible: false,
@@ -173,10 +195,13 @@ export default {
storlist: [],
rules: {
stor_id: [
{ required: true, message: '仓库不能为空', trigger: 'blur' }
{required: true, message: '仓库不能为空', trigger: 'blur'}
],
check_type: [
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
{required: true, message: '业务类型不能为空', trigger: 'blur'}
],
workshop_id: [
{required: true, message: '车间不能为空', trigger: 'blur'}
]
}
}
@@ -191,7 +216,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({'stor_type': '2'}).then(res => {
this.storlist = res.content
})
},
@@ -199,7 +224,7 @@ export default {
this.$emit('AddChanged')
},
[CRUD.HOOK.afterToEdit]() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({'check_id': this.form.check_id}).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -210,7 +235,7 @@ export default {
})
},
[CRUD.HOOK.afterToView]() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({'check_id': this.form.check_id}).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -220,9 +245,6 @@ export default {
}
})
},
bill_statusFormat(row) {
return this.dict.label.check_dtl_status[row.status]
},
storChange(row) {
this.storlist.forEach((item) => {
if (item.stor_id === row) {
@@ -249,17 +271,16 @@ export default {
}
}
if (!this.flagnow) {
item.edit = false
item.status = '01'
tablemap.set(item.struct_code + '间隔' + item.material_code, item)
}
} else {
item.edit = false
item.status = '01'
tablemap.set(item.struct_code + '间隔' + item.material_code, item)
}
})
for (const value of tablemap.values()) {
value.base_qty = value.canuse_qty
this.form.tableData.push(value)
}
this.form.dtl_num = this.form.tableData.length
@@ -287,6 +308,7 @@ export default {
display: flex;
align-items: center;
}
.crud-opts2 .crud-opts-right2 {
margin-left: auto;
padding: 4px 4px;

View File

@@ -23,7 +23,7 @@
class="filter-item"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -53,7 +53,7 @@
:disabled="true"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -101,8 +101,7 @@
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="sect_name" label="盘点库区" align="center" />
<el-table-column prop="struct_name" label="盘点货位" align="center" />
<el-table-column show-overflow-tooltip prop="storagevehicle_code" label="载具号" />
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="190" align="center">
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" width="100" align="center">
<template scope="scope">
<el-input v-show="isShow(scope.$index, scope.row,1)" v-model="scope.row.material_code" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)" />
@@ -111,10 +110,10 @@
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" />
<el-table-column prop="base_qty" label="桶数" :formatter="crud.formatNum0" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点桶数" width="160" align="center">
<el-table-column prop="base_qty" label="重量" :formatter="crud.formatNum0" align="center" />
<el-table-column show-overflow-tooltip prop="fac_qty" label="盘点重量" width="160" align="center">
<template scope="scope">
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="0" :min="0" />
<el-input-number v-show="isShow(scope.$index, scope.row,2)" v-model="scope.row.fac_qty" :precision="3" :min="0" />
<span v-show="isShow(scope.$index, scope.row,4)">{{ scope.row.fac_qty }}</span>
</template>
</el-table-column>
@@ -135,14 +134,14 @@
<el-button type="primary" @click="saveCheck">保存</el-button>
<el-button type="primary" @click="submitCheck">确认</el-button>
</span>
<MaterDialog :dialog-show.sync="materShow" @tableChanged2="tableChanged2" />
<MaterDialog :dialog-show.sync="materShow" @setMaterValue="tableChanged2" />
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import check from '@/views/wms/storage_manage/semiproduct/semiproductCheck/check'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
import MaterDialog from '@/views/wms/pub/MaterDialog'
export default {
@@ -161,7 +160,7 @@ export default {
type: Object
}
},
dicts: ['check_bill_status', 'ST_INV_TYPE_CK', 'check_dtl_status', 'check_result'],
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'CHECK_DTL_STATUS', 'check_result'],
data() {
return {
dialogVisible: false,
@@ -197,15 +196,15 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
this.storlist = res.content
})
check.getOutBillDtl2({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({ 'check_id': this.form.check_id }).then(res => {
this.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.tableData.length; i++) {
const row = this.tableData[i]
row.edit = false
this.$set(row,'edit',false)
if (row.status > '04') {
row.edit = true
}
@@ -303,7 +302,7 @@ export default {
this.form = row
},
bill_statusFormat(row, column) {
return this.dict.label.check_dtl_status[row.status]
return this.dict.label.CHECK_DTL_STATUS[row.status]
},
check_resultFormat(row, column) {
return this.dict.label.check_result[row.check_result]
@@ -313,7 +312,7 @@ export default {
this.crud.notify('请先选中一条已存在的库存明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.tableData.push({ check_id: this.form.check_id, check_code: this.form.check_code, checkdtl_id: '', sect_id: this.nowrow.sect_id, sect_name: this.nowrow.sect_name, struct_id: this.nowrow.struct_id, struct_name: this.nowrow.struct_name, storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_code: this.nowrow.storagevehicle_code, status: '01', material_id: '', material_name: '', base_qty: '0', qty_unit_id: '42', qty_unit_name: '', is_down: '0', fac_qty: '', check_result: '0', edit: false })
this.tableData.push({ check_id: this.form.check_id, check_code: this.form.check_code, checkdtl_id: '', sect_id: this.nowrow.sect_id, sect_name: this.nowrow.sect_name, struct_id: this.nowrow.struct_id, struct_name: this.nowrow.struct_name, storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_code: this.nowrow.storagevehicle_code, status: '01', material_id: '', material_name: '', base_qty: '0', qty_unit_id: '1', qty_unit_name: 'KG', is_down: '0', fac_qty: '', check_result: '0', edit: false })
this.form.dtl_num = this.tableData.length
},
async queryMater(index, row) {
@@ -323,7 +322,7 @@ export default {
},
tableChanged2(row) {
for (let i = 0; i < this.tableData.length; i++) {
if ((this.tableData[i].material_id === row.material_id) && (this.tableData[i].storagevehicle_code === this.nowrow.storagevehicle_code) && (this.tableData[i].struct_id === this.nowrow.struct_id)) {
if ((this.tableData[i].material_id === row.material_id) && (this.tableData[i].struct_id === this.nowrow.struct_id)) {
this.crud.notify('不允许货位、载具、物料同时相同!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}

View File

@@ -23,7 +23,7 @@
class="filter-item"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -53,7 +53,7 @@
:disabled="true"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -82,7 +82,7 @@
:disabled="process1_flag"
@click="process1"
>
重新盘点
实盘为准
</el-button>
</span>
@@ -129,8 +129,8 @@
<script>
import { crud } from '@crud/crud'
import check from '@/views/wms/storage_manage/semiproduct/semiproductCheck/check'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import ReCheckDialog from '@/views/wms/storage_manage/semiproduct/semiproductCheck/ReCheckDialog'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
import ReCheckDialog from '@/views/wms/storage_manage/rawproduct/rawproductCheck/ReCheckDialog'
export default {
name: 'ProcessDialog',
@@ -148,7 +148,7 @@ export default {
type: Object
}
},
dicts: ['check_bill_status', 'ST_INV_TYPE_CK', 'check_dtl_status', 'check_result'],
dicts: ['CHECK_BILL_STATUS', 'ST_INV_CK_TYPE', 'CHECK_DTL_STATUS', 'check_result'],
data() {
return {
dialogVisible: false,
@@ -185,7 +185,7 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
this.storlist = res.content
})
this.getOutBillDtl()
@@ -214,7 +214,7 @@ export default {
this.form = row
},
bill_statusFormat(row, column) {
return this.dict.label.check_dtl_status[row.status]
return this.dict.label.CHECK_DTL_STATUS[row.status]
},
check_resultFormat(row, column) {
return this.dict.label.check_result[row.check_result]
@@ -225,12 +225,12 @@ export default {
})
},
process1() {
if (this.nowrow !== null) {
this.$refs.child3.setReForm(this.nowrow)
}
check.process1({ 'form': this.form, 'row': this.nowrow }).then(res => {
this.getOutBillDtl()
})
},
getOutBillDtl() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
check.getCheckDtl({ 'check_id': this.form.check_id,'check_result': '-1'}).then(res => {
this.tableData = res
})
}

View File

@@ -138,19 +138,19 @@
<el-button type="primary" @click="process1">确认</el-button>
</span>
<MaterDialog :dialog-show.sync="materShow" @tableChanged2="tableChanged2" />
<BucketDialog :dialog-show.sync="bucketShow" @bucketChange="tableChanged2" />
<!-- <BucketDialog :dialog-show.sync="bucketShow" @bucketChange="tableChanged2" />-->
</el-dialog>
</template>
<script>
import CRUD, { crud } from '@crud/crud'
import check from '@/views/wms/storage_manage/semiproduct/semiproductCheck/check'
import check from '@/views/wms/storage_manage/rawproduct/rawproductCheck/check'
// import BucketDialog from '@/views/wms/st/inStor/rawproductmoreOrless/NewBucketDialog'
import MaterDialog from '@/views/wms/pub/MaterDialog'
export default {
name: 'ReCheckDialog',
components: { MaterDialog, BucketDialog },
components: { MaterDialog },
mixins: [crud()],
props: {
dialogShow: {

View File

@@ -0,0 +1,156 @@
<!--suppress ALL -->
<template>
<el-dialog
title="库存选择"
append-to-body
:visible.sync="dialogVisible"
destroy-on-close
width="1200px"
@close="close"
@open="open"
>
<div class="head-container">
<div v-if="crud.props.searchToggle">
<!-- 搜索 -->
<el-form
:inline="true"
class="demo-form-inline"
label-position="right"
label-width="80px"
label-suffix=":"
>
<el-form-item label="日期">
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-MM-dd"/>
</el-form-item>
<el-form-item label="库区/货位">
<el-input
v-model="query.bill_code"
clearable
size="mini"
placeholder="单据号"
style="width: 200px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="物料">
<el-input
v-model="query.material_search"
clearable
size="mini"
placeholder="物料"
style="width: 230px;"
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation/>
</el-form>
</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="sect_code" label="库区"/>
<el-table-column show-overflow-tooltip width="150" prop="struct_name" label="货位"/>
<el-table-column show-overflow-tooltip prop="material_code" width="250" label="物料编号"/>
<el-table-column show-overflow-tooltip width="100" prop="material_name" label="物料名称"/>
<el-table-column show-overflow-tooltip width="150" prop="canuse_qty" label="数量(个)"/>
<el-table-column show-overflow-tooltip prop="unit_weight" label="单重"/>
<el-table-column show-overflow-tooltip prop="storagevehicle_code" 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 crudProductIn from '@/views/wms/storage_manage/rawproduct/rawProductIn/rawproductin'
const start = new Date()
export default {
name: 'AddDtl',
components: {crudOperation, rrOperation, pagination, DateRangePicker},
cruds() {
return CRUD({
title: '半成品可用库存',
url: '/api/bcp/getBcpIvt',
crudMethod: {},
optShow: {
reset: true
}
})
},
mixins: [presenter(), header(), crud()],
props: {
dialogShow: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
rows: [],
tableData: []
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
methods: {
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() {
this.$emit('update:dialogShow', false)
this.rows = this.$refs.multipleTable.selection
this.$emit('tableChanged', this.rows)
// this.form = this.$options.data().form
}
}
}
</script>

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/check',
url: 'api/bcp/check',
method: 'post',
data
})
@@ -10,57 +10,62 @@ export function add(data) {
export function del(ids) {
return request({
url: 'api/check/',
method: 'delete',
url: 'api/bcp/check/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/check',
method: 'put',
data
})
}
export function getOutBillDtl(params) {
return request({
url: '/api/check/getOutBillDtl',
method: 'get',
params
})
}
export function getOutBillDtl2(params) {
return request({
url: '/api/check/getOutBillDtl2',
method: 'get',
params
})
}
export function getOutBillDis(params) {
return request({
url: '/api/check/getOutBillDis',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/check/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/check/insertDtl',
url: 'api/bcp/check/update',
method: 'post',
data
})
}
export function getCheckDtl(data) {
return request({
url: '/api/bcp/check/getCheckDtl',
method: 'post',
data
})
}
export function getOutBillDtl2(params) {
return request({
url: '/api/bcp/check/getOutBillDtl2',
method: 'get',
params
})
}
export function getOutBillDis(params) {
return request({
url: '/api/bcp/check/getOutBillDis',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/bcp/check/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/bcp/check/insertDtl',
method: 'post',
data
})
}
export function getStructIvt(params) {
return request({
url: '/api/check/getStructIvt',
url: '/api/bcp/check/getStructIvt',
method: 'get',
params
})
@@ -68,37 +73,55 @@ export function getStructIvt(params) {
export function confirm(data) {
return request({
url: '/api/check/confirm',
url: '/api/bcp/check/confirm',
method: 'post',
data
})
}
export function handdown(data) {
return request({
url: '/api/check/handdown',
url: '/api/bcp/check/handdown',
method: 'post',
data
})
}
export function saveCheck(data) {
return request({
url: '/api/check/saveCheck',
url: '/api/bcp/check/saveCheck',
method: 'post',
data
})
}
export function process0(data) {
return request({
url: '/api/check/process0',
url: '/api/bcp/check/process0',
method: 'post',
data
})
}
export function process1(data) {
return request({
url: '/api/check/process1',
url: '/api/bcp/check/process1',
method: 'post',
data
})
}
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1 }
export default {
add,
edit,
del,
getCheckDtl,
getStructIvt,
getOutBillDtl2,
confirm,
getInvTypes,
saveCheck,
process0,
getOutBillDis,
process1
}

View File

@@ -78,7 +78,7 @@
@change="crud.toQuery"
>
<el-option
v-for="item in dict.check_bill_status"
v-for="item in dict.CHECK_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -97,14 +97,14 @@
@change="crud.toQuery"
>
<el-option
v-for="item in dict.ST_INV_TYPE_CK"
v-for="item in dict.ST_INV_CK_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<rrOperation />
<rrOperation/>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -173,32 +173,32 @@
/>
</template>
</el-table-column>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column prop="check_code" min-width="130" label="订单编码">
<el-table-column :selectable="checkboxT" type="selection" width="55"/>
<el-table-column prop="check_code" min-width="130" label="订单编码">
<template slot-scope="scope">
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.check_code }}</el-link>
</template>
</el-table-column>
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" min-width="100" />
<el-table-column prop="check_type" :formatter="bill_typeFormat" min-width="100" label="业务类型" />
<el-table-column prop="is_nok" :formatter="is_nokFormat" min-width="100" label="盘点状态" />
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100" />
<el-table-column label="明细数" align="center" prop="dtl_num" min-width="100" />
<el-table-column prop="input_time" min-width="135" label="创建日期" />
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="单据状态"/>
<el-table-column prop="stor_name" label="仓库" min-width="100"/>
<el-table-column prop="check_type" :formatter="bill_typeFormat" min-width="100" label="业务类型"/>
<el-table-column prop="is_nok" :formatter="is_nokFormat" min-width="100" label="盘点状态"/>
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100"/>
<el-table-column label="明细数" align="center" prop="dtl_num" min-width="100"/>
<el-table-column prop="create_time" min-width="135" label="创建日期"/>
</el-table>
<!--分页组件-->
<pagination />
<pagination/>
</div>
<AddDialog @AddChanged="querytable" />
<CheckDialog ref="child" @AddChanged="querytable" />
<ProcessDialog ref="child2" @AddChanged="querytable" />
<AddDialog @AddChanged="querytable"/>
<CheckDialog ref="child" @AddChanged="querytable"/>
<ProcessDialog ref="child2" @AddChanged="querytable"/>
</div>
</template>
<script>
import check from '@/views/wms/storage_manage/semiproduct/semiproductCheck/check'
import CRUD, { crud, header, presenter } from '@crud/crud'
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'
@@ -206,31 +206,33 @@ import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/storage_manage/semiproduct/semiproductCheck/AddDialog'
import CheckDialog from '@/views/wms/storage_manage/semiproduct/semiproductCheck/CheckDialog'
import ProcessDialog from '@/views/wms/storage_manage/semiproduct/semiproductCheck/ProcessDialog'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
import crudStorattr from "@/views/wms/storage_manage/basedata/basedata";
import {download} from '@/api/data'
import {downloadFile} from '@/utils'
export default {
name: 'Check',
components: { CheckDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, ProcessDialog },
name: 'BcpCheck',
components: {CheckDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, ProcessDialog},
cruds() {
return CRUD({ title: '用户',
return CRUD({
title: '用户',
props: {
// 每页数据条数
size: 20
},
idField: 'check_id', url: 'api/check', crudMethod: { ...check },
idField: 'check_id', url: 'api/bcp/check', crudMethod: {...check},
optShow: {
add: true,
edit: false,
del: false,
reset: true,
download: false
}})
}
})
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['check_bill_status', 'ST_CREATE_MODE', 'ST_INV_TYPE_CK'],
dicts: ['CHECK_BILL_STATUS', 'ST_CREATE_MODE', 'ST_INV_CK_TYPE'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
@@ -246,14 +248,14 @@ export default {
storlist: []
}
},
mounted: function() {
mounted: function () {
const that = this
window.onresize = function temp() {
that.height = document.documentElement.clientHeight - 180 + 'px;'
}
},
created() {
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({'stor_type': '3'}).then(res => {
this.storlist = res.content
})
},
@@ -272,7 +274,7 @@ export default {
this.buttonChange(row)
} else if (val.length === 1) {
this.buttonChange(row)
}else{
} else {
this.handleCurrentChange(null)
}
},
@@ -289,7 +291,7 @@ export default {
} else {
this.check_flag = true
}
if (current.status === '30' && current.is_nok === '1') {
if (current.status === '30' && current.is_nok) {
this.confirm_flag = false
} else {
this.confirm_flag = true
@@ -297,16 +299,16 @@ export default {
}
},
stateFormat(row) {
return this.dict.label.check_bill_status[row.status]
return this.dict.label.CHECK_BILL_STATUS[row.status]
},
bill_typeFormat(row) {
return this.dict.label.ST_INV_TYPE_CK[row.check_type]
return this.dict.label.ST_INV_CK_TYPE[row.check_type]
},
create_modeFormat(row) {
return this.dict.label.ST_CREATE_MODE[row.create_mode]
},
is_nokFormat(row) {
if (row.is_nok === '1') {
if (row.is_nok) {
return '异常'
} else {
return '正常'
@@ -336,7 +338,7 @@ export default {
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
download('/api/check/download', { check_id: this.currentRow.check_id }).then(result => {
download('/api/check/download', {check_id: this.currentRow.check_id}).then(result => {
downloadFile(result, this.currentRow.check_code + '盘点数据', 'xlsx')
crud.downloadLoading = false
}).catch(() => {

View File

@@ -11,7 +11,7 @@
>
<el-row v-show="crud.status.cu > 0" :gutter="20">
<el-col :span="20" style="border: 1px solid white">
<span />
<span/>
</el-col>
<el-col :span="4">
<span>
@@ -39,7 +39,7 @@
>
<el-form-item label="单据号" prop="bill_code">
<label slot="label">单&nbsp;&nbsp;据&nbsp;号:</label>
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
<el-input v-model.trim="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px"/>
</el-form-item>
<el-form-item label="仓库" prop="stor_id">
<label slot="label">仓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;库:</label>
@@ -79,12 +79,12 @@
<el-form-item label="货位" prop="struct_code">
<label slot="label">货&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位:</label>
<el-input v-model.trim="form.struct_code" style="width: 210px" disabled placeholder="选择货位">
<el-button v-show="crud.status.view <= 0" slot="append" icon="el-icon-plus" @click="queryStruct()" />
<el-button v-show="crud.status.view <= 0" slot="append" icon="el-icon-plus" @click="queryStruct()"/>
</el-input>
</el-form-item>
<el-form-item label="明细数" prop="detail_count">
<label slot="label">明&nbsp;&nbsp;细&nbsp;数:</label>
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px" />
<el-input v-model.trim="form.dtl_num" size="mini" disabled style="width: 210px"/>
</el-form-item>
<el-form-item label="总重量" prop="total_qty">
<label slot="label">总&nbsp;&nbsp;重&nbsp;量:</label>
@@ -113,7 +113,7 @@
<div class="crud-opts2" style="margin-bottom: 5px;">
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<slot name="left"/>
<!--<el-button
slot="left"
class="filter-item"
@@ -148,23 +148,24 @@
border
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="storagevehicle_code" label="载具号" align="center" min-width="200" show-overflow-tooltip>
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.storagevehicle_code" class="input-with-select"/>
<span v-show="scope.row.edit">{{ scope.row.storagevehicle_code }}</span>
</template>
</el-table-column>
<el-table-column prop="material_code" label="物料编码" align="center" min-width="200" show-overflow-tooltip>
<template scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.material_code" disabled class="input-with-select">
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)" />
<el-button slot="append" icon="el-icon-search" @click="queryMater(scope.$index, scope.row)"/>
</el-input>
<span v-show="scope.row.edit">{{ scope.row.material_code }}</span>
</template>
</el-table-column>
<el-table-column prop="material_name" label="物料名称" align="center" min-width="200" show-overflow-tooltip />
<el-table-column
v-if="!crud.status.view > 0"
prop="ivt_qty"
label="库存重量"
align="center"
:formatter="crud.formatNum3"
/>
<el-table-column prop="material_name" label="物料名称" align="center" min-width="200" show-overflow-tooltip/>
<el-table-column v-if="!crud.status.view > 0" prop="canuse_qty" label="库存重量" align="center"
:formatter="crud.formatNum3"/>
<el-table-column prop="mol_qty" width="220" label="损溢重量" align="center">
<template scope="scope">
<el-input-number
@@ -177,7 +178,7 @@
/>
</template>
</el-table-column>
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<el-table-column prop="qty_unit_name" label="单位" align="center"/>
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="190" fixed="right">
<template scope="scope">
<el-button
@@ -209,19 +210,19 @@
</el-table-column>
</el-table>
<MaterDtl :dialog-show.sync="materShow" @setMaterValue="tableChanged2" />
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="tableChanged" />
<MaterDtl :dialog-show.sync="materShow" @setMaterValue="tableChanged2"/>
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="tableChanged"/>
</el-dialog>
</template>
<script>
import crudOperation from '@crud/CRUD.operation'
import BucketDialog from '@/views/wms/storage_manage/rawproduct/rawproductmoreOrless/NewBucketDialog'
import BucketDialog from '@/views/wms/storage_manage/semiproduct/semiproductMoreOrless/NewBucketDialog'
import CRUD, { crud, form } from '@crud/crud'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
import crudMoreOrless from '@/views/wms/storage_manage/rawproduct/rawproductmoreOrless/moreorless'
import crudMoreOrless from '@/views/wms/storage_manage/semiproduct/semiproductMoreOrless/moreorless'
import MaterDtl from '@/views/wms/pub/MaterDialog'
import StructDiv from '@/views/wms/storage_manage/rawproduct/rawproductmoreOrless/StructDiv'
import StructDiv from '@/views/wms/storage_manage/semiproduct/semiproductMoreOrless/StructDiv'
const defaultForm = {
mol_id: '',
@@ -242,7 +243,7 @@ const defaultForm = {
export default {
name: 'AddDialog',
components: { crudOperation, MaterDtl, StructDiv, BucketDialog },
components: {crudOperation, MaterDtl, StructDiv, BucketDialog},
mixins: [crud(), form(defaultForm)],
dicts: ['io_bill_status', 'ST_QUALITY_SCODE', 'ST_IVT_LEVEL', 'is_used', 'ST_MOL_TYPE'],
props: {
@@ -268,13 +269,13 @@ export default {
storlist: [],
rules: {
stor_id: [
{ required: true, message: '仓库不能为空', trigger: 'blur' }
{required: true, message: '仓库不能为空', trigger: 'blur'}
],
bill_type: [
{ required: true, message: '业务类型不能为空', trigger: 'blur' }
{required: true, message: '业务类型不能为空', trigger: 'blur'}
],
biz_date: [
{ required: true, message: '业务日期不能为空', trigger: 'blur' }
{required: true, message: '业务日期不能为空', trigger: 'blur'}
]
}
}
@@ -289,13 +290,13 @@ export default {
methods: {
open() {
// 查询原材料库的仓库
crudStorattr.getStor({ 'stor_type': '3' }).then(res => {
crudStorattr.getStor({'stor_type': '2'}).then(res => {
this.storlist = res.content
})
},
[CRUD.HOOK.afterToEdit]() {
// 获取入库单明细
crudMoreOrless.getMlDtl({ 'mol_id': this.form.mol_id }).then(res => {
crudMoreOrless.getMlDtl({'mol_id': this.form.mol_id}).then(res => {
this.form.tableData = res
// 将明细变成不可编辑
for (let i = 0; i < this.form.tableData.length; i++) {
@@ -351,13 +352,13 @@ export default {
return false
}
if (this.crud.status.add > 0) {
crudMoreOrless.getStructIvt({ 'struct_id': this.form.struct_id }).then(res => {
crudMoreOrless.getStructIvt({'struct_id': this.form.struct_id}).then(res => {
this.form.tableData = res
this.form.dtl_num = this.form.tableData.length
})
}
if (this.crud.status.edit > 0) {
crudMoreOrless.queryMolDtl({ 'mol_id': this.form.mol_id, 'struct_id': this.form.struct_id }).then(res => {
crudMoreOrless.queryMolDtl({'mol_id': this.form.mol_id, 'struct_id': this.form.struct_id}).then(res => {
this.form.tableData = res
this.form.dtl_num = this.form.tableData.length
})
@@ -383,7 +384,7 @@ export default {
this.form.sect_id = row.sect_id
this.form.sect_name = row.sect_name
this.form.struct_name = row.struct_name
crudMoreOrless.getStructIvt({ 'struct_id': row.struct_id }).then(res => {
crudMoreOrless.getStructIvt({'struct_id': row.struct_id}).then(res => {
this.form.tableData = res
for (let i = 0; i < this.form.tableData.length; i++) {
const row = this.form.tableData[i]

View File

@@ -22,17 +22,18 @@
</el-col>
<el-col :span="6">
<el-input
v-model="query.search"
v-model="query.struct_code"
clearable
style="width: 200px"
size="mini"
placeholder="输入货位编码、名称"
prefix-icon="el-icon-search"
class="filter-item"
/> </el-col>
/>
</el-col>
<el-col :span="6">
<rrOperation />
<rrOperation/>
</el-col>
</el-row>
<!--表格渲染-->
@@ -46,15 +47,15 @@
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="struct_code" label="货位编码" />
<el-table-column prop="struct_name" label="货位名称" />
<el-table-column prop="sect_name" label="库区名称" />
<el-table-column prop="lock_type" :formatter="lockFormat" label="是否锁定" />
<el-table-column prop="storagevehicle_code" label="存储载具号" />
<el-table-column type="selection" width="55"/>
<el-table-column prop="struct_code" label="货位编码"/>
<el-table-column prop="struct_name" label="货位名称"/>
<el-table-column prop="sect_name" label="库区名称"/>
<el-table-column prop="lock_type" :formatter="lockFormat" label="是否锁定"/>
<el-table-column prop="storagevehicle_code" label="存储载具号"/>
</el-table>
<!--分页组件-->
<pagination />
<pagination/>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
@@ -64,7 +65,7 @@
<script>
import CRUD, { crud, header, presenter } from '@crud/crud'
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'
@@ -73,7 +74,7 @@ import crudSectattr from '@/api/wms/basedata/st/sectattr'
export default {
name: 'StructDiv',
components: { crudOperation, rrOperation, pagination },
components: {crudOperation, rrOperation, pagination},
cruds() {
return CRUD({
title: '仓位',
@@ -81,8 +82,8 @@ export default {
url: 'api/structattr',
idField: 'struct_id',
sort: 'struct_id,desc',
query: { search: '', is_lock: '1', sect_id: '', stor_id: '' },
crudMethod: { ...crudStructattr }
query: {search: '', is_lock: '1', sect_id: '', stor_id: ''},
crudMethod: {...crudStructattr}
})
},
mixins: [presenter(), header()],
@@ -122,7 +123,7 @@ export default {
methods: {
open() {
this.crud.resetQuery(false)
crudSectattr.getSect({ 'is_materialstore': '1' }).then(res => {
crudSectattr.getSect({ 'stor_type': '2' }).then(res => {
this.sects = res.content
})
if (this.sect) {
@@ -192,22 +193,9 @@ export default {
return
}
// 溢单不允许选择已锁定或者有载具的货位
if (this.mol_type === '1') {
if (this.checkrow.lock_type !== '00') {
this.$message('溢单不允许选择已锁定的货位!')
return
}
}
// 损单不允许选择已锁定或者无载具的货位
if (this.mol_type === '0') {
if (this.checkrow.lock_type !== '00') {
this.$message('损单不允许选择已锁定的货位!')
return
}
if (this.checkrow.storagevehicle_code === '') {
this.$message('损单不允许选择无载具的货位!')
return
}
if (this.checkrow.lock_type !== '0') {
this.$message('不允许选择已锁定的货位!')
return
}
this.$emit('update:dialogShow', false)
this.$emit('tableChanged', this.checkrow)

View File

@@ -11,12 +11,12 @@
label-width="80px"
label-suffix=":"
>
<el-form-item label="模糊查询">
<el-form-item label="单据编号">
<el-input
v-model="query.struct_search"
v-model="query.mol_code"
size="mini"
clearable
placeholder="货位编码、名称"
placeholder="单据编号"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
@@ -69,7 +69,7 @@
<el-form-item label="单据状态">
<el-select
v-model="query.bill_status"
v-model="query.status"
clearable
size="mini"
placeholder="单据状态"
@@ -77,7 +77,7 @@
@change="crud.toQuery"
>
<el-option
v-for="item in dict.mol_bill_status"
v-for="item in dict.MOL_BILL_STATUS"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -149,15 +149,15 @@
<el-table-column :formatter="stateFormat" min-width="100" prop="status" label="单据状态" />
<el-table-column label="备注" align="center" min-width="100" prop="remark" />
<el-table-column prop="create_mode" min-width="100" :formatter="create_modeFormat" label="生成方式" />
<el-table-column label="制单人" align="center" min-width="100" prop="input_optname" />
<el-table-column label="制单时间" align="center" prop="input_time" min-width="150" />
<el-table-column label="制单人" align="center" min-width="100" prop="create_name" />
<el-table-column label="制单时间" align="center" prop="create_time" min-width="150" />
<el-table-column label="确认人" align="center" prop="confirm_optname" min-width="150" />
<el-table-column label="确认时间" align="center" prop="confirm_time" min-width="150" />
</el-table>
<!--分页组件-->
<pagination />
</div>
<!-- <AddDialog @AddChanged="querytable" />-->
<AddDialog @AddChanged="querytable" />
</div>
</template>
@@ -168,29 +168,30 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker/index'
// import AddDialog from '@/views/wms/storage_manage/semiproduct/semiproductMoreOrless/AddDialog'
import AddDialog from '@/views/wms/storage_manage/semiproduct/semiproductMoreOrless/AddDialog'
import { mapGetters } from 'vuex'
import crudStorattr from '@/api/wms/basedata/st/storattr'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
import crudMoreOrless from '@/views/wms/storage_manage/semiproduct/semiproductMoreOrless/moreorless'
export default {
name: 'MoreOrLess',
components: { crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
name: 'RawProductMl',
components: { AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker },
cruds() {
return CRUD({
title: '',
optShow: { add: true, reset: true},
optShow: { add: true, reset: true },
props: {
// 每页数据条数
size: 20
},
idField: 'mol_id',
url: '/api/instor/mol',
url: '/api/stIvtMoreorlessmstBcp',
crudMethod: { ...crudMoreOrless }
})
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['mol_bill_status', 'ST_CREATE_MODE', 'ST_MOL_TYPE'],
dicts: ['MOL_BILL_STATUS', 'ST_CREATE_MODE', 'ST_MOL_TYPE'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
@@ -217,7 +218,7 @@ export default {
}
},
created() {
crudStorattr.getStor({ 'is_materialstore': '1' }).then(res => {
crudStorattr.getStor({ 'stor_type': '2' }).then(res => {
this.storlist = res.content
})
},
@@ -266,7 +267,7 @@ export default {
}
},
stateFormat(row, column) {
return this.dict.label.mol_bill_status[row.status]
return this.dict.label.MOL_BILL_STATUS[row.status]
},
typeFormat(row, column) {
return this.dict.label.ST_MOL_TYPE[row.mol_type]

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: '/api/instor/mol',
url: '/api/stIvtMoreorlessmstBcp',
method: 'post',
data
})
@@ -10,50 +10,42 @@ export function add(data) {
export function del(ids) {
return request({
url: '/api/instor/mol',
method: 'delete',
url: '/api/stIvtMoreorlessmstBcp/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: '/api/instor/mol',
method: 'put',
url: '/api/stIvtMoreorlessmstBcp/update',
method: 'post',
data
})
}
export function getStructIvt(params) {
return request({
url: '/api/instor/mol/getStructIvt',
method: 'get',
url: '/api/stIvtStructivtYl/getSemiProductIvt',
method: 'post',
params
})
}
export function queryMolDtl(params) {
export function getMlDtl(data) {
return request({
url: '/api/instor/mol/queryMolDtl',
method: 'get',
params
})
}
export function queryMolDetail(params) {
return request({
url: '/api/instor/mol/queryMolDetail',
method: 'get',
params
})
}
export function confirm(data) {
return request({
url: '/api/instor/mol/confirm',
url: '/api/stIvtMoreorlessmstBcp/getMlDtl',
method: 'post',
data
})
}
export default { add, edit, del, getStructIvt, queryMolDtl, queryMolDetail, confirm }
export function confirm(data) {
return request({
url: '/api/stIvtMoreorlessmstBcp/confirm',
method: 'post',
data
})
}
export default { add, edit, del, getStructIvt, getMlDtl, confirm }

View File

@@ -289,6 +289,7 @@ export default {
this.tableData1 = []
this.form.detail_count = this.form.tableData.length
this.form.tableData = []
shutframe.getBcpIvtInfo({ 'material_id': row.material_id, 'stor_id': this.form.stor_id }).then(res => {
this.tableData1 = res
this.right_flag = false

View File

@@ -128,6 +128,17 @@
>
任务下发
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
:disabled="work_flag"
icon="el-icon-position"
size="mini"
@click="confirm"
>
强制确认
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -143,20 +154,6 @@
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column
label="操作"
width="160"
align="center"
fixed="right"
>
<template slot-scope="scope">
<udOperation
:data="scope.row"
:disabled-edit="canUd(scope.row)"
:disabled-dle="canUd(scope.row)"
/>
</template>
</el-table-column>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column prop="bill_code" min-width="140" label="订单编码">
<template slot-scope="scope">
@@ -168,8 +165,23 @@
<el-table-column prop="bill_type" :formatter="bill_typeFormat" min-width="100" label="业务类型" />
<el-table-column min-width="135" prop="biz_date" label="业务日期" />
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" min-width="100" />
<el-table-column label="制单人" align="center" prop="input_optname" min-width="100" />
<el-table-column prop="input_time" min-width="135" label="制单时间" />
<el-table-column label="制单人" align="center" prop="create_name" min-width="100" />
<el-table-column prop="create_time" min-width="135" label="制单时间" />
<el-table-column
label="操作"
width="160"
align="center"
fixed="right"
>
<template slot-scope="scope">
<udOperation
:data="scope.row"
:permission="{}"
:disabled-edit="canUd(scope.row)"
:disabled-dle="canUd(scope.row)"
/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
@@ -282,6 +294,11 @@ export default {
this.querytable()
})
},
confirm() {
shutframe.confirm({ 'shutframeinv_id': this.currentRow.shutframeinv_id }).then(res => {
this.querytable()
})
},
checkboxT(row) {
return row.bill_status !== '99'
},

View File

@@ -2,7 +2,7 @@ import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/shutframe',
url: 'api/shutframe/create',
method: 'post',
data
})
@@ -10,27 +10,28 @@ export function add(data) {
export function del(ids) {
return request({
url: 'api/shutframe/',
method: 'delete',
url: 'api/shutframe/delete',
method: 'post',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/shutframe',
method: 'put',
url: 'api/shutframe/update',
method: 'post',
data
})
}
export function getOutBillDtl(params) {
export function getOutBillDtl(data) {
return request({
url: '/api/shutframe/getOutBillDtl',
method: 'get',
params
url: '/api/shutframe/getBillDtl',
method: 'post',
data
})
}
export function getOutBillDtl2(params) {
return request({
url: '/api/shutframe/getOutBillDtl2',
@@ -38,12 +39,14 @@ export function getOutBillDtl2(params) {
params
})
}
export function getInvTypes() {
return request({
url: '/api/shutframe/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/shutframe/insertDtl',
@@ -51,6 +54,7 @@ export function insertDtl(data) {
data
})
}
export function getBcpIvtInfo(data) {
return request({
url: '/api/bcp/getBcpIvtInfo',
@@ -58,6 +62,7 @@ export function getBcpIvtInfo(data) {
data
})
}
export function getStructIvt2(params) {
return request({
url: '/api/shutframe/getStructIvt2',
@@ -65,6 +70,7 @@ export function getStructIvt2(params) {
params
})
}
export function getStruct(params) {
return request({
url: '/api/shutframe/getStruct',
@@ -72,13 +78,15 @@ export function getStruct(params) {
params
})
}
export function handdown(data) {
export function confirm(data) {
return request({
url: '/api/shutframe/handdown',
url: '/api/shutframe/confirm',
method: 'post',
data
})
}
export function getOutBillTask(params) {
return request({
url: '/api/shutframe/getOutBillTask',
@@ -86,6 +94,7 @@ export function getOutBillTask(params) {
params
})
}
export function issueTask(data) {
return request({
url: '/api/shutframe/issueTask',
@@ -93,6 +102,7 @@ export function issueTask(data) {
data
})
}
export function finishTask(data) {
return request({
url: '/api/shutframe/finishTask',
@@ -100,6 +110,7 @@ export function finishTask(data) {
data
})
}
export function allCancel(data) {
return request({
url: '/api/shutframe/allCancel',
@@ -107,4 +118,19 @@ export function allCancel(data) {
data
})
}
export default { add, edit, del, getOutBillDtl, allCancel, getBcpIvtInfo, getOutBillTask, finishTask, issueTask, getInvTypes, handdown, getOutBillDtl2, getStructIvt2, getStruct }
export default {
add,
edit,
del,
getOutBillDtl,
allCancel,
getBcpIvtInfo,
getOutBillTask,
finishTask,
confirm,
getInvTypes,
getOutBillDtl2,
getStructIvt2,
getStruct
}