盘点修改

This commit is contained in:
2023-04-10 16:10:06 +08:00
parent 230ed4ea3d
commit d39fe395e7
7 changed files with 250 additions and 8 deletions

View File

@@ -9,9 +9,22 @@
@close="close"
>
<el-row v-show="crud.status.cu > 0" :gutter="20">
<el-col :span="18" style="border: 1px solid white">
<el-col :span="13" style="border: 1px solid white">
<span />
</el-col>
<el-col :span="5">
<el-form ref="form" :inline="true" :model="form" size="mini">
<el-form-item label="库区" prop="gender5">
<el-cascader
placeholder="请选择"
:options="sects"
:props="{ checkStrictly: true }"
clearable
@change="sectQueryChange"
/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6">
<span>
<el-button icon="el-icon-check" size="mini" :loading="showLoading" type="primary" @click="allInsert">一键保存</el-button>
@@ -141,6 +154,17 @@
>
导出
</el-button>
<el-button
slot="left"
class="filter-item"
type="success"
icon="el-icon-folder-add"
size="mini"
v-if="crud.status.view > 0"
@click="repairDialog"
>
补录信息
</el-button>
</span>
</div>
@@ -179,6 +203,7 @@
</el-table>
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
<DtlViewDialog :dialog-show.sync="dtlViewShow" :open-param="paramDtlView"/>
<RepairDialog :dialog-show.sync="repairShow" :open-param="check_code" :father-method="queryDtlView" />
</el-dialog>
</template>
@@ -188,6 +213,7 @@ import AddDtl from '@/views/wms/st/inStor/check/AddDtl'
import check from '@/views/wms/st/inStor/check/check'
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
import DtlViewDialog from '@/views/wms/st/inStor/check/DtlViewDialog'
import RepairDialog from '@/views/wms/st/inStor/check/RepairDialog'
import { download } from '@/api/data'
import { downloadFile } from '@/utils'
@@ -205,7 +231,7 @@ const defaultForm = {
}
export default {
name: 'AddDialog',
components: { AddDtl, DtlViewDialog },
components: { AddDtl, DtlViewDialog, RepairDialog },
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
@@ -223,11 +249,17 @@ export default {
showDtlLoading: false,
dtlShow: false,
flagnow: false,
repairShow: false,
check_code: '',
paramType: '',
storId: null,
nowrow: {},
nowindex: '',
storlist: [],
sectProp: null,
stor_id: '',
sect_id: '',
sects: [],
rules: {
stor_id: [
{ required: true, message: '仓库不能为空', trigger: 'blur' }
@@ -250,6 +282,9 @@ export default {
crudUserStor.getUserStor().then(res => {
this.storlist = res
})
crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
this.sects = res.content
})
},
close() {
this.$emit('AddChanged')
@@ -285,6 +320,11 @@ export default {
this.showDtlLoading = false
})
},
queryDtlView() {
check.getOutBillDtl({ 'check_id': this.form.check_id }).then(res => {
this.form.tableData = res
})
},
bill_statusFormat(row) {
return this.dict.label.check_dtl_status[row.status]
},
@@ -360,7 +400,14 @@ export default {
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.sect_id === '' && this.stor_id === '') {
this.crud.notify('请选择库区或者仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.showLoading = true
this.form.sect_id = this.sect_id
this.form.stor_id = this.stor_id
debugger
check.allInsert(this.form).then(res => {
this.crud.cancelCU()
this.showLoading = false
@@ -378,6 +425,26 @@ export default {
crud.downloadLoading = false
})
}
},
sectQueryChange(val) {
this.sectProp = val
if (val.length === 1) {
this.stor_id = val[0]
this.sect_id = ''
}
if (val.length === 0) {
this.sect_id = ''
this.stor_id = ''
}
if (val.length === 2) {
this.stor_id = val[0]
this.sect_id = val[1]
}
this.form.stor_id = this.stor_id
},
repairDialog() {
this.check_code = this.form.check_code
this.repairShow = true
}
}
}

View File

@@ -0,0 +1,107 @@
<template>
<el-dialog
title="补录明细"
append-to-body
:visible.sync="dialogVisible"
width="450px"
:before-close="handleClose"
destroy-on-close
@close="close"
>
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
<el-form-item label="箱号:" prop="storagevehicle_code">
<el-input v-model="form1.storagevehicle_code" style="width: 250px;" />
</el-form-item>
<el-form-item label="重量:" prop="base_qty">
<el-input-number v-model="form1.base_qty" :precision="2" min="0" :controls="false" style="width: 250px;" />
</el-form-item>
<el-form-item label="物料编码:" prop="material_code">
<el-input v-model="form1.material_code" style="width: 250px;" />
</el-form-item>
<el-form-item label="备注:" prop="remark">
<el-input type="textarea" v-model="form1.remark" style="width: 250px;" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="repairSubmit"> </el-button>
</span>
</el-dialog>
</template>
<script>
import CRUD, { header, presenter } from '@crud/crud'
import check from '@/views/wms/st/inStor/check/check'
export default {
name: 'ProcessDialog',
mixins: [presenter(), header()],
props: {
dialogShow: {
type: Boolean,
default: false
},
openParam: {
type: String
},
fatherMethod: {
type: Function,
default: null
}
},
watch: {
dialogShow: {
handler(newValue, oldValue) {
this.dialogVisible = newValue
}
}
},
data() {
return {
dialogVisible: false,
form1: {}
}
},
methods: {
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done()
})
.catch(_ => {
})
},
close() {
this.$emit('update:dialogShow', false)
this.form1 = {}
},
repairSubmit() {
if (!this.form1.storagevehicle_code) {
this.crud.notify('木箱号不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form1.base_qty) {
this.crud.notify('重量不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (!this.form1.material_code) {
this.crud.notify('物料编码不能为空!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.form1.check_code = this.openParam
check.repairSubmit(this.form1).then(res => {
this.crud.notify('补录成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.dialogVisible = false
this.fatherMethod()
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -122,4 +122,11 @@ export function confirmBtn(data) {
data
})
}
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm, allInsert, confirmBtn }
export function repairSubmit(data) {
return request({
url: '/api/check/repairSubmit',
method: 'post',
data
})
}
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm, allInsert, confirmBtn, repairSubmit }