add: 出库强制确认

This commit is contained in:
2023-05-26 15:56:06 +08:00
parent ce340a9951
commit 5dc0a51695
17 changed files with 625 additions and 104 deletions

View File

@@ -27,7 +27,7 @@ export function edit(data) {
export function getSect(data) {
return request({
url: 'api/sectattr/getSect',
method: 'get',
method: 'post',
data
})
}

View File

@@ -148,7 +148,7 @@
style="width: 200px;"
>
<el-option
v-for="item in this.pointList"
v-for="item in pointList"
:key="item.point_code"
:label="item.point_name"
:value="item.point_code"
@@ -167,9 +167,9 @@
type="warning"
icon="el-icon-check"
size="mini"
@click="allSetPoint"
@click="setPoint"
>
一键设置
设置站点
</el-button>
</span>
</div>
@@ -304,7 +304,7 @@ export default {
})
const area_type = 'A1_RK01'
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
this.pointlist = res
this.pointList = res
})
},
close() {
@@ -350,9 +350,11 @@ export default {
}
},
handleDtlCurrentChange(current) {
this.currentRow = current
this.queryTableDdis(current)
},
handleDisCurrentChange(current) {
this.currentDis = current
},
queryTableDtl() {
productOut.getIosInvDtl({ 'iostorinv_id': this.mstrow.iostorinv_id }).then(res => {
@@ -367,13 +369,13 @@ export default {
})
},
allDivIvt() {
if (this.mstrow.sect_id === '') {
if (this.mstrow.sect_id === undefined) {
this.crud.notify('请选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.loadingAlldiv = true
productOut.allDivIvt({ 'iostorinv_id': this.mstrow.iostorinv_id, 'sect_id': this.mstrow.sect_id, 'stor_id': this.mstrow.stor_id }).then(res => {
productOut.allDivIvt({ 'iostorinv_id': this.mstrow.iostorinv_id, 'sect_id': this.mstrow.sect_id, 'stor_id': this.mstrow.stor_id, 'type': true }).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.loadingAlldiv = false
@@ -382,30 +384,61 @@ export default {
})
},
oneDiv() {
this.loadingAutodiv = true
if (this.currentRow.iostorinvdtl_id !== null) {
this.mstrow.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
productOut.allDivOne(this.mstrow).then(res => {
this.queryTableDtl()
this.loadingAutodiv = false
}).catch(() => {
this.loadingAutodiv = false
})
if (this.mstrow.sect_id === undefined) {
this.crud.notify('请选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.currentRow.iostorinvdtl_id === undefined) {
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.loadingAlldiv = true
productOut.allDivIvt({ 'iostorinvdtl_id': this.currentRow.iostorinvdtl_id, 'sect_id': this.mstrow.sect_id, 'stor_id': this.mstrow.stor_id, 'type': false }).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.loadingAlldiv = false
}).catch(() => {
this.loadingAlldiv = false
})
},
allCancel() {
productOut.allCancel(this.mstrow).then(res => {
productOut.allCancel( { 'iostorinv_id': this.mstrow.iostorinv_id, 'type': true }).then(res => {
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.tabledis = []
})
},
oneCancel() {
if (this.currentRow.iostorinvdtl_id !== null) {
productOut.allCancel(this.currentRow).then(res => {
this.queryTableDtl()
})
if (this.currentRow.iostorinvdtl_id === undefined) {
this.crud.notify('请选择明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
productOut.allCancel( { 'iostorinvdtl_id': this.currentRow.iostorinvdtl_id, 'type': false }).then(res => {
this.crud.notify('取消成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.tabledis = []
})
},
setPoint() {
if (this.form2.point_code === '') {
this.crud.notify('请选择站点!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (this.currentDis.iostorinvdis_id === undefined) {
this.crud.notify('请选择分配明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
productOut.setPoint({ 'iostorinvdis_id': this.currentDis.iostorinvdis_id, 'point_code': this.form2.point_code }).then(res => {
this.crud.notify('设置成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.queryTableDtl()
this.tabledis = []
})
},
cellStyle({ row, column, rowIndex, columnIndex }) {
const assign_qty = parseFloat(row.assign_qty)
const plan_qty = parseFloat(row.plan_qty)

View File

@@ -2,7 +2,7 @@
<template>
<el-dialog
append-to-body
title="出库详情"
title="出库详情"
:visible.sync="dialogVisible"
destroy-on-close
fullscreen
@@ -14,7 +14,7 @@
<label slot="label">&nbsp;&nbsp;&nbsp;:</label>
<el-input v-model="form.bill_code" disabled placeholder="系统生成" clearable style="width: 210px" />
</el-form-item>
<el-form-item label="生产车间">
<el-form-item label="仓 库">
<el-select
v-model="form.product_code"
clearable
@@ -32,18 +32,19 @@
/>
</el-select>
</el-form-item>
<el-form-item label="业务类型" prop="bill_type">
<el-form-item label="业务类型">
<el-select
v-model="form.bill_type"
clearable
filterable
size="mini"
:disabled="true"
placeholder="业务类型"
class="filter-item"
disabled
@change="crud.toQuery"
>
<el-option
v-for="item in dict.bill_type"
v-for="item in dict.ST_INV_OUT_TYPE"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -60,7 +61,7 @@
disabled
>
<el-option
v-for="item in dict.io_bill_status"
v-for="item in dict.IO_BILL_STATUS"
:key="item.id"
:label="item.label"
:value="item.value"
@@ -91,7 +92,7 @@
</el-form-item>
</el-form>
<div class="crud-opts2">
<span class="role-span2">库明细</span>
<span class="role-span2">库明细</span>
</div>
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
<!--表格渲染-->
@@ -107,14 +108,11 @@
@current-change="handleDtlCurrentChange"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :formatter="bill_statusFormat" prop="bill_status" label="状态" />
<el-table-column min-width="140" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column prop="pcsn" label="订单号" width="150px" align="center" show-overflow-tooltip />
<el-table-column prop="pcsn" label="订单号" width="150" align="center" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="assign_qty" :formatter="crud.formatNum3" label="已分配重量" align="center" width="100px" />
<el-table-column prop="unassign_qty" :formatter="crud.formatNum3" label="未分配重量" align="center" width="100px" />
<el-table-column prop="qty_unit_name" label="单位" align="center" />
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
</el-table>
@@ -138,11 +136,12 @@
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
<el-table-column prop="pcsn" label="订单号" align="center" show-overflow-tooltip />
<el-table-column prop="pcsn" label="订单号" align="center" width="150" />
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
<el-table-column prop="struct_code" label="仓位" align="center" show-overflow-tooltip />
<el-table-column prop="region_code" label="区域" align="center" show-overflow-tooltip />
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
<el-table-column prop="point_code1" label="起始位置" align="center" />
<el-table-column prop="point_code2" label="目的位置" align="center" />
<el-table-column prop="task_code" label="任务号" align="center" />
<el-table-column prop="task_type_name" label="任务类型" align="center" width="150px" />
</el-table>
</el-card>
</el-dialog>
@@ -151,14 +150,13 @@
<script>
import { crud } from '@crud/crud'
import productOut from '@/views/wms/storage_manage/product/productOut/productout'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import crudProductOut from '@/views/wms/storage_manage/product/productOut/productout'
export default {
name: 'ViewDialog',
components: { },
mixins: [crud()],
dicts: ['io_bill_status', 'work_status', 'task_status', 'SCH_TASK_TYPE_DTL', 'bill_type', 'product_area'],
dicts: ['ST_INV_OUT_TYPE', 'product_area', 'IO_BILL_STATUS'],
props: {
dialogShow: {
type: Boolean,
@@ -173,6 +171,7 @@ export default {
dialogVisible: false,
tableDtl: [],
tabledis: [],
billtypelist: [],
storlist: [],
currentdtl: null,
currentDis: {},
@@ -191,11 +190,6 @@ export default {
}
}
},
created() {
crudProductIn.queryStor().then(res => {
this.storlist = res
})
},
methods: {
open() {
this.queryTableDtl()
@@ -206,10 +200,10 @@ export default {
this.currentdtl = null
this.tableDtl = []
this.tabledis = []
this.$emit('AddChanged')
this.$emit('TaskChanged')
},
bill_statusFormat(row) {
return this.dict.label.io_bill_status[row.bill_status]
stateFormat(row, column) {
return this.dict.label.IO_BILL_STATUS[row.bill_status]
},
taskdtl_typeFormat(row) {
return this.dict.label.SCH_TASK_TYPE_DTL[row.taskdtl_type]
@@ -241,13 +235,13 @@ export default {
this.currentDis = current
},
queryTableDtl() {
productOut.getOutBillDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
crudProductOut.getIosInvDtl({ 'iostorinv_id': this.form.iostorinv_id }).then(res => {
this.tableDtl = res
})
},
queryTableDdis() {
if (this.currentdtl !== null) {
productOut.getOutBillDis({ 'iostorinvdtl_id': this.currentdtl.iostorinvdtl_id }).then(res => {
crudProductOut.getIosInvDis({ "iostorinvdtl_id": this.currentdtl.iostorinvdtl_id }).then(res => {
this.tabledis = res
}).catch(() => {
this.tabledis = []

View File

@@ -1,4 +1,3 @@
<!--suppress ALL -->
<template>
<div class="app-container">
<!--工具栏-->
@@ -128,6 +127,32 @@
@select="handleSelectionChange"
@select-all="onSelectAll"
>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column show-overflow-tooltip :formatter="stateFormat" prop="bill_status" label="单据状态" />
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.row)">{{ scope.row.bill_code }}</el-link>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip prop="bill_type" min-width="120" label="单据类型" :formatter="bill_typeFormat" />
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" min-width="120"/>
<!-- <el-table-column prop="" label="生产车间" width="130" show-overflow-tooltip />-->
<el-table-column show-overflow-tooltip min-width="120" prop="biz_date" label="业务日期" />
<el-table-column label="总重量" align="center" prop="total_qty">
<template slot-scope="scope">
{{ fun(scope.row.total_qty) }}
</template>
</el-table-column>
<el-table-column label="明细数" align="center" prop="detail_count" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="创建人" align="center" prop="create_name" />
<el-table-column label="创建时间" align="center" prop="create_time" width="150" />
<el-table-column label="修改人" align="center" prop="update_name" />
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
<el-table-column label="分配人" align="center" prop="dis_name" width="140px" />
<el-table-column label="分配时间" align="center" prop="dis_time" width="150" />
<el-table-column label="确认人" align="center" prop="confirm_name" width="150" />
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
@@ -138,27 +163,6 @@
/>
</template>
</el-table-column>
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="80" prop="bill_status" label="单据状态" />
<!-- <el-table-column show-overflow-tooltip prop="product_code" label="生产车间" width="80" />-->
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
<el-table-column show-overflow-tooltip width="100" prop="biz_date" label="业务日期" />
<el-table-column show-overflow-tooltip label="明细数" align="center" prop="detail_count" width="60" />
<el-table-column show-overflow-tooltip label="总重量" align="center" prop="total_qty" width="100" />
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="create_name" />
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="create_time" width="140" />
<el-table-column show-overflow-tooltip label="修改人" align="center" prop="create_name" />
<el-table-column show-overflow-tooltip label="修改时间" align="center" prop="update_time" width="140" />
<el-table-column show-overflow-tooltip label="分配人" align="center" prop="dis_name" />
<el-table-column show-overflow-tooltip label="分配时间" align="center" prop="dis_time" width="140" />
<el-table-column show-overflow-tooltip label="确认人" align="center" prop="confirm_name" />
<el-table-column show-overflow-tooltip label="确认时间" align="center" prop="confirm_time" width="140" />
</el-table>
<!--分页组件-->
<pagination />
@@ -179,7 +183,7 @@ import pagination from '@crud/Pagination'
import AddDialog from '@/views/wms/storage_manage/product/productOut/AddDialog'
import DivDialog from '@/views/wms/storage_manage/product/productOut/DivDialog'
import ViewDialog from '@//views/wms/storage_manage/product/productOut/ViewDialog'
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
export default {
name: 'ProductOut',
@@ -230,15 +234,19 @@ export default {
}
},
created() {
crudProductIn.queryStor().then(res => {
this.storlist = res
crudStorattr.getStor({ 'stor_type': '4' }).then(res => {
this.storlist = res.content
})
},
methods: {
fun(val) {
return Number(val).toFixed(3)
},
canUd(row) {
return row.bill_status !== '10'
},
toView(index, row) {
toView(row) {
debugger
this.mstrow = row
this.viewShow = true
},
@@ -293,9 +301,9 @@ export default {
return row.bill_status !== '99'
},
divOpen() {
productOut.getOutBillDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
productOut.getIosInvDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
this.openParam = res
this.storId = this.currentRow.product_code
this.storId = this.currentRow.stor_id
this.divShow = true
this.mstrow = this.currentRow
})

View File

@@ -48,11 +48,38 @@ export function allDivIvt(data) {
})
}
export function allCancel(data) {
return request({
url: 'api/productOut/allCancel',
method: 'post',
data
})
}
export function setPoint(data) {
return request({
url: 'api/productOut/setPoint',
method: 'post',
data
})
}
export function confirm(data) {
return request({
url: 'api/productOut/confirm',
method: 'post',
data
})
}
export default {
add,
edit,
del,
getIosInvDtl,
getIosInvDis,
allDivIvt
allDivIvt,
allCancel,
setPoint,
confirm
}