Commit c10f606e by zhangtw

入库查询bug,入库重置bug

parent 44f472e9
...@@ -105,6 +105,11 @@ export default { ...@@ -105,6 +105,11 @@ export default {
window.removeEventListener('resize', this.handleResize) window.removeEventListener('resize', this.handleResize)
}, },
methods: { methods: {
// resetFields() {
// if (this.ElFormRef && typeof this.ElFormRef.resetFields === 'function') {
// this.ElFormRef.resetFields()
// }
// },
handleResize() { handleResize() {
this.screenWidth = document.documentElement.clientWidth this.screenWidth = document.documentElement.clientWidth
this.initSize() this.initSize()
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" fixed /> <el-table-column type="selection" width="55" align="center" fixed />
<el-table-column label="入库单号" align="center" prop="orderId" /> <el-table-column label="入库单号" align="center" prop="orderId" width="200"/>
<el-table-column label="系统编号" align="center" prop="systemNo" width="200"/> <el-table-column label="系统编号" align="center" prop="systemNo" width="200"/>
<el-table-column label="入库类型" align="center" prop="orderTypeId" :show-overflow-tooltip="true" width="200"> <el-table-column label="入库类型" align="center" prop="orderTypeId" :show-overflow-tooltip="true" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -394,15 +394,16 @@ import { listInbound, getInbound, delInbound, addInbound, updateInbound } from " ...@@ -394,15 +394,16 @@ import { listInbound, getInbound, delInbound, addInbound, updateInbound } from "
import { listInbound_items } from "@/api/inventory/inbound_items" import { listInbound_items } from "@/api/inventory/inbound_items"
import { batchAddInventory } from "@/api/inventory/inventory" import { batchAddInventory } from "@/api/inventory/inventory"
import InboundItems from "@/views/inventory/inbound_items/index.vue" import InboundItems from "@/views/inventory/inbound_items/index.vue"
// import PageTitle from "@/components/PageTitle" // 引入字典页面的标题组件 import PageTitle from "@/components/PageTitle" // 引入字典页面的标题组件
// import PageWrapperSearch from "@/components/PageWrapperSearch" // 引入搜索包装组件 import PageWrapperSearch from "@/components/Search/PageWrapperSearch" // 引入搜索包装组件
import MaterialSelector from "@/views/inventory/materials/materialsSeletor.vue"; import MaterialSelector from "@/views/inventory/materials/materialsSeletor.vue";
export default { export default {
name: "Inbound", name: "Inbound",
components: { components: {
InboundItems, InboundItems,
PageTitle,
PageWrapperSearch,
MaterialSelector MaterialSelector
}, },
data() { data() {
...@@ -563,7 +564,7 @@ export default { ...@@ -563,7 +564,7 @@ export default {
orderStatus: null, orderStatus: null,
orderType: null orderType: null
} }
this.resetForm("queryForm") // this.$refs.queryForm.resetFields()
this.handleQuery() this.handleQuery()
}, },
...@@ -584,7 +585,7 @@ export default { ...@@ -584,7 +585,7 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset()
const id = row.id || this.ids const id = row.id
getInbound(id).then(response => { getInbound(id).then(response => {
this.form = response.data this.form = response.data
this.orderId = response.data.orderId this.orderId = response.data.orderId
...@@ -699,8 +700,8 @@ export default { ...@@ -699,8 +700,8 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.orderId || this.ids.length const ids = row.id || this.ids.length
this.$confirm((row.orderId ? '是否确认删除入库单编号为"' + ids + '"的数据项?' : '是否确认删除选中的' + ids + '条入库单'), '提示', { this.$confirm((row.orderId ? '是否确认删除入库单编号为"' + row.orderId + '"的数据项?' : '是否确认删除选中的' + ids + '条入库单'), '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
return delInbound(ids) return delInbound(ids)
......
...@@ -410,9 +410,12 @@ export default { ...@@ -410,9 +410,12 @@ export default {
methods: { methods: {
// 根据字典类型和值,获取对应的listClass(标签样式) // 根据字典类型和值,获取对应的listClass(标签样式)
getDictListClass(dictType, value) { getDictListClass(dictType, value) {
console.log(value)
const dictList = this.dict.type[dictType] || [] const dictList = this.dict.type[dictType] || []
console.log(dictList)
if (!value) return 'info' if (!value) return 'info'
const dictItem = dictList.find(item => item.value === value) const dictItem = dictList.find(item => item.value === value+"")
// 兼容raw和直接属性两种写法 // 兼容raw和直接属性两种写法
return dictItem?.raw?.listClass || 'info' return dictItem?.raw?.listClass || 'info'
}, },
...@@ -421,7 +424,7 @@ export default { ...@@ -421,7 +424,7 @@ export default {
getDictLabel(dictType, value) { getDictLabel(dictType, value) {
const dictList = this.dict.type[dictType] || [] const dictList = this.dict.type[dictType] || []
if (!value) return '' if (!value) return ''
const dictItem = dictList.find(item => item.value === value) const dictItem = dictList.find(item => item.value === value+"")
return dictItem?.label || value return dictItem?.label || value
}, },
......
...@@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -67,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectInboundOrdersVo"/> <include refid="selectInboundOrdersVo"/>
<where> <where>
<if test="id != null and Id != ''"> and id = #{Id}</if> <if test="id != null and Id != ''"> and id = #{Id}</if>
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
<if test="systemNo != null and systemNo != ''"> and system_no = #{systemNo}</if> <if test="systemNo != null and systemNo != ''"> and system_no = #{systemNo}</if>
<if test="orderTypeId != null and orderTypeId != ''"> and order_type_id = #{orderTypeId}</if> <if test="orderTypeId != null and orderTypeId != ''"> and order_type_id = #{orderTypeId}</if>
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if> <if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论