fix:修复出库逻辑,add:增加仓库监控看板

This commit is contained in:
zhangzq
2025-07-15 20:01:33 +08:00
parent 02f56f7a8d
commit 6fe6aeb5b3
60 changed files with 455 additions and 271 deletions

View File

@@ -110,6 +110,16 @@
<!--左侧插槽-->
<slot name="left" />
<el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
@click="addFormDtl()"
>
添加单据
</el-button>
<el-button
slot="left"
class="filter-item"
@@ -169,6 +179,8 @@
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
<MaterDialog :dialog-show.sync="materShow" :mater-opt-code.sync="materType" @setMaterValue="setMaterValue" />
<FormDialog :dialog-show.sync="formShow" @setFormValue="setFormValue" />
</el-dialog>
</template>
@@ -176,6 +188,8 @@
import CRUD, { crud, form } from '@crud/crud'
import AddDtl from '@/views/wms/st/outbill/AddDtl'
import MaterDialog from '@/views/wms/pub/MaterDialog'
import FormDialog from '@/views/wms/pm_manage/form_data/FormDialog'
import checkoutbill from '@/views/wms/st/outbill/checkoutbill'
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
@@ -196,7 +210,7 @@ const defaultForm = {
}
export default {
name: 'AddDialog',
components: { AddDtl, MaterDialog },
components: { AddDtl, MaterDialog, FormDialog },
mixins: [crud(), form(defaultForm)],
props: {
dialogShow: {
@@ -211,6 +225,7 @@ export default {
dtlShow: false,
materType: '',
materShow: false,
formShow: false,
flagnow: false,
nowrow: {},
nowindex: '',
@@ -302,11 +317,18 @@ export default {
this.materShow = true
this.nowindex = index
this.nowrow = row
/* checkoutbill.paramByCodeType({ 'bill_type': this.form.bill_type }).then(res => {
this.materType = res.materType
this.nowindex = index
this.nowrow = row
})*/
},
addFormDtl(index, row) {
if (this.form.bill_type === '') {
this.crud.notify('请选择业务类型!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
if (this.form.stor_id === '') {
this.crud.notify('请选择仓库!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
this.storId = this.form.stor_id
this.formShow = true
},
queryDtl(index, row) {
if (this.form.bill_type === '') {
@@ -360,6 +382,21 @@ export default {
this.nowrow.edit = false
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
},
setFormValue(data) {
this.nowrow.material_id = data.material_id
this.nowrow.material_code = data.material_code
this.nowrow.material_name = data.material_name
this.nowrow.qty_unit_id = data.unit_id
this.nowrow.qty_unit_name = data.unit_name
this.nowrow.pcsn = data.pcsn
this.nowrow.plan_qty = data.qty
this.nowrow.qty = data.qty
this.nowrow.source_bill_code = data.code
this.nowrow.source_bill_id = data.id
this.nowrow.source_bill_type = data.form_type
this.nowrow.edit = false
this.form.tableData.splice(this.nowindex, 1, this.nowrow) // 通过splice 替换数据 触发视图更新
},
deleteRow(index, rows) {
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].plan_qty)
rows.splice(index, 1)