Commit ce894a21 authored by Hagsn3's avatar Hagsn3

代码提交

parent 58821f21
...@@ -365,7 +365,22 @@ export default { ...@@ -365,7 +365,22 @@ export default {
return commonField return commonField
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询 this.getList() // 列表查询
this.getwareHouse() this.getwareHouse()
}, },
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="pn" prop="pn"> <el-form-item label="ptype" prop="ptype">
<el-input
v-model="queryParams.pn"
placeholder="请输入pn"
clearable
size="small"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="io_type" prop="ioType">
<el-select <el-select
v-model="queryParams.ioType" v-model="queryParams.ptype"
placeholder="请选择ioType" placeholder="请选择ptype值"
clearable clearable
:maxlength="1"
size="small" size="small"
style="width: 150px" style="width: 150px"
> >
<el-option <el-option
v-for="dict in ioTypeSelect" v-for="dict in ptypeOptions"
:key="dict.dictValue" :key="dict.dictValue"
:label="dict.dictLabel" :label="dict.dictLabel"
:value="dict.dictValue" :value="dict.dictValue"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="ptype" prop="ptype"> <el-form-item label="pn" prop="pn">
<el-input
v-model="queryParams.pn"
placeholder="请输入pn"
clearable
size="small"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="出入情况" prop="ioType">
<el-select <el-select
v-model="queryParams.ptype" v-model="queryParams.ioType"
placeholder="请选择ptype值" placeholder="请选择出入情况"
clearable clearable
:maxlength="1"
size="small" size="small"
style="width: 150px" style="width: 150px"
> >
<el-option <el-option
v-for="dict in ptypeOptions" v-for="dict in ioTypeSelect"
:key="dict.dictValue" :key="dict.dictValue"
:label="dict.dictLabel" :label="dict.dictLabel"
:value="dict.dictValue" :value="dict.dictValue"
...@@ -116,19 +116,22 @@ ...@@ -116,19 +116,22 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="apply_id" prop="outApplyId" :show-overflow-tooltip="true">--> <el-table-column label="qty" prop="qty" :show-overflow-tooltip="true" width="100">
<!-- <template slot-scope="scope">--> <template slot-scope="scope">
<!-- {{ scope.row.outApplyId || '-' }}--> {{ scope.row.qty || '-' }}
<!-- </template>--> </template>
<!-- </el-table-column>--> </el-table-column>
<el-table-column label="申请人" prop="createBy" :show-overflow-tooltip="true"> <el-table-column label="申请人" prop="createBy" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createName || '-' }} <span v-if="scope.row.ioType !=='1'">{{ scope.row.createName }}</span>
<span v-else>-</span>
<!-- {{ scope.row.createName || '-' }}-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="申请时间" prop="createDate" :show-overflow-tooltip="true" width="150"> <el-table-column label="申请时间" prop="createDate" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span v-if="scope.row.ioType !=='1'">{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
<span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="updateBy" :show-overflow-tooltip="true"> <el-table-column label="创建人" prop="updateBy" :show-overflow-tooltip="true">
...@@ -435,7 +438,22 @@ export default { ...@@ -435,7 +438,22 @@ export default {
} }
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询 this.getList() // 列表查询
this.getwareHouse() this.getwareHouse()
}, },
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<!-- 1 jb 2 label 3 wd 4 sl 5 zd-->
<el-form-item label="ptype" prop="ptype">
<el-select
v-model="queryParams.ptype"
placeholder="请选择ptype值"
clearable
:maxlength="1"
size="small"
style="width: 150px"
>
<el-option
v-for="dict in ptypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="pn" prop="pn"> <el-form-item label="pn" prop="pn">
<el-input <el-input
v-model="queryParams.pn" v-model="queryParams.pn"
...@@ -21,44 +39,6 @@ ...@@ -21,44 +39,6 @@
style="width: 150px" style="width: 150px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="meno2" prop="memo2">
<el-input
v-model="queryParams.memo2"
placeholder="请输入meno2"
clearable
:maxlength="127"
size="small"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="memo3" prop="memo3">
<el-input
v-model="queryParams.memo3"
placeholder="请输入memo3"
clearable
:maxlength="127"
size="small"
style="width: 150px"
/>
</el-form-item>
<!-- 1 jb 2 label 3 wd 4 sl 5 zd-->
<el-form-item label="ptype" prop="ptype">
<el-select
v-model="queryParams.ptype"
placeholder="请选择ptype值"
clearable
:maxlength="1"
size="small"
style="width: 150px"
>
<el-option
v-for="dict in ptypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
:class="commonField.queryClass" :class="commonField.queryClass"
...@@ -83,13 +63,13 @@ ...@@ -83,13 +63,13 @@
:size="commonField.smallSize" :size="commonField.smallSize"
@click="handleAdd" @click="handleAdd"
>新增</el-button> >新增</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- :class="commonField.exportClass"--> <!-- :class="commonField.exportClass"-->
<!-- :type="commonField.typeSuccess"--> <!-- :type="commonField.typeSuccess"-->
<!-- :icon="commonField.exportIcon"--> <!-- :icon="commonField.exportIcon"-->
<!-- :size="commonField.smallSize"--> <!-- :size="commonField.smallSize"-->
<!-- @click="handleExport"--> <!-- @click="handleExport"-->
<!-- >导出</el-button>--> <!-- >导出</el-button>-->
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
...@@ -98,12 +78,23 @@ ...@@ -98,12 +78,23 @@
<div class="mb12 font-small-bold">材料信息列表</div> <div class="mb12 font-small-bold">材料信息列表</div>
<el-table v-loading="loading" border :data="incomeMatBaseinfoList"> <el-table v-loading="loading" border :data="incomeMatBaseinfoList">
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<!-- 1 jb 2 label 3 wd 4 sl 5 zd-->
<el-table-column label="ptype" prop="ptype" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.ptype === '1'">jb</span>
<span v-else-if="scope.row.ptype === '2'">label</span>
<span v-else-if="scope.row.ptype === '3'">wd</span>
<span v-else-if="scope.row.ptype === '4'">sl</span>
<span v-else-if="scope.row.ptype === '5'">zd</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="pn" prop="pn" :show-overflow-tooltip="true"> <el-table-column label="pn" prop="pn" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="qty_default" prop="qty" :show-overflow-tooltip="true"> <el-table-column label="qty" prop="qty" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.qty || '-' }} {{ scope.row.qty || '-' }}
</template> </template>
...@@ -123,17 +114,6 @@ ...@@ -123,17 +114,6 @@
{{ scope.row.memo3 || '-' }} {{ scope.row.memo3 || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 1 jb 2 label 3 wd 4 sl 5 zd-->
<el-table-column label="ptype" prop="ptype" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.ptype === '1'">jb</span>
<span v-else-if="scope.row.ptype === '2'">label</span>
<span v-else-if="scope.row.ptype === '3'">wd</span>
<span v-else-if="scope.row.ptype === '4'">sl</span>
<span v-else-if="scope.row.ptype === '5'">zd</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createDate" :show-overflow-tooltip="true"> <el-table-column label="创建时间" prop="createDate" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
...@@ -141,12 +121,12 @@ ...@@ -141,12 +121,12 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="100"> <el-table-column label="操作" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button--> <!-- <el-button-->
<!-- :class="commonField.updateClass"--> <!-- :class="commonField.updateClass"-->
<!-- :type="commonField.typeParent"--> <!-- :type="commonField.typeParent"-->
<!-- :size="commonField.size"--> <!-- :size="commonField.size"-->
<!-- @click="handleUpdate(scope.row)"--> <!-- @click="handleUpdate(scope.row)"-->
<!-- >修改</el-button>--> <!-- >修改</el-button>-->
<el-button <el-button
:class="commonField.delClass" :class="commonField.delClass"
:type="commonField.typeParent" :type="commonField.typeParent"
...@@ -200,15 +180,6 @@ ...@@ -200,15 +180,6 @@
<el-form-item label="memo3" prop="memo3"> <el-form-item label="memo3" prop="memo3">
<el-input v-model.trim="form.memo3" show-word-limit :maxlength="127" placeholder="请输入memo3" /> <el-input v-model.trim="form.memo3" show-word-limit :maxlength="127" placeholder="请输入memo3" />
</el-form-item> </el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.flag">
<el-radio label="1">启用</el-radio>
<el-radio label="0">停用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model.trim="form.remarks" maxlength="200" show-word-limit type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancel">取 消</el-button> <el-button class="cancelBtn" @click="cancel">取 消</el-button>
...@@ -335,7 +306,22 @@ export default { ...@@ -335,7 +306,22 @@ export default {
return commonField return commonField
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询 this.getList() // 列表查询
}, },
methods: { methods: {
......
...@@ -11,6 +11,23 @@ ...@@ -11,6 +11,23 @@
style="width: 150px" style="width: 150px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="ptype" prop="ptype">
<el-select
v-model="queryParams.ptype"
placeholder="请选择ptype值"
clearable
:maxlength="1"
size="small"
style="width: 150px"
>
<el-option
v-for="dict in ptypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="lot" prop="lot"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.lot" v-model="queryParams.lot"
...@@ -41,23 +58,6 @@ ...@@ -41,23 +58,6 @@
style="width: 150px" style="width: 150px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="ptype" prop="ptype">
<el-select
v-model="queryParams.ptype"
placeholder="请选择ptype值"
clearable
:maxlength="1"
size="small"
style="width: 150px"
>
<el-option
v-for="dict in ptypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
:class="commonField.queryClass" :class="commonField.queryClass"
...@@ -90,20 +90,20 @@ ...@@ -90,20 +90,20 @@
<div class="mb12 font-small-bold">库存管理列表</div> <div class="mb12 font-small-bold">库存管理列表</div>
<el-table v-loading="loading" border :data="incomeWmsBoxList"> <el-table v-loading="loading" border :data="incomeWmsBoxList">
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="code" prop="orderCode" :show-overflow-tooltip="true" > <el-table-column label="code" prop="orderCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.orderCode || '-' }} {{ scope.row.orderCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="ptype" prop="ptype" :show-overflow-tooltip="true" width="100"> <el-table-column label="ptype" prop="ptype" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.ptype === '1'">jb</span> <span v-if="scope.row.ptype === '1'">jb</span>
<span v-else-if="scope.row.ptype === '2'">label</span> <span v-else-if="scope.row.ptype === '2'">label</span>
<span v-else-if="scope.row.ptype === '3'">wd</span> <span v-else-if="scope.row.ptype === '3'">wd</span>
<span v-else-if="scope.row.ptype === '4'">sl</span> <span v-else-if="scope.row.ptype === '4'">sl</span>
<span v-else-if="scope.row.ptype === '5'">zd</span> <span v-else-if="scope.row.ptype === '5'">zd</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="lot" prop="lot" :show-overflow-tooltip="true" width="110"> <el-table-column label="lot" prop="lot" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -122,6 +122,8 @@ ...@@ -122,6 +122,8 @@
</el-table-column> </el-table-column>
<el-table-column label="qty" prop="qty" :show-overflow-tooltip="true" width="110"> <el-table-column label="qty" prop="qty" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span v-if="scope.row.qty >= 0 ">{{scope.row.qty}}</span>-->
<!-- <span v-else>-</span>-->
{{ scope.row.qty || '-' }} {{ scope.row.qty || '-' }}
</template> </template>
</el-table-column> </el-table-column>
...@@ -135,7 +137,7 @@ ...@@ -135,7 +137,7 @@
{{ scope.row.createName || '-' }} {{ scope.row.createName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="createDate" :show-overflow-tooltip="true" > <el-table-column label="创建时间" prop="createDate" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
...@@ -276,7 +278,22 @@ export default { ...@@ -276,7 +278,22 @@ export default {
return commonField return commonField
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询 this.getList() // 列表查询
}, },
methods: { methods: {
......
...@@ -175,12 +175,12 @@ ...@@ -175,12 +175,12 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="状态: "> <!-- <el-form-item label="状态: ">-->
<el-radio-group v-model="form.flag"> <!-- <el-radio-group v-model="form.flag">-->
<el-radio label="1">启用</el-radio> <!-- <el-radio label="1">启用</el-radio>-->
<el-radio label="0">停用</el-radio> <!-- <el-radio label="0">停用</el-radio>-->
</el-radio-group> <!-- </el-radio-group>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="备注: " prop="remarks"> <el-form-item label="备注: " prop="remarks">
<el-input v-model.trim="form.remarks" maxlength="200" show-word-limit type="textarea" placeholder="请输入内容" /> <el-input v-model.trim="form.remarks" maxlength="200" show-word-limit type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
...@@ -274,7 +274,22 @@ export default { ...@@ -274,7 +274,22 @@ export default {
return commonField return commonField
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询 this.getList() // 列表查询
}, },
methods: { methods: {
......
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
:type="commonField.typeParent" :type="commonField.typeParent"
:size="commonField.size" :size="commonField.size"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-if="scope.row.dealStatus === '0' " v-show="scope.row.dealStatus === '0' "
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -246,12 +246,6 @@ ...@@ -246,12 +246,6 @@
<el-radio label="0">待确认</el-radio> <el-radio label="0">待确认</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.flag">
<el-radio label="1">启用</el-radio>
<el-radio label="0">停用</el-radio>
</el-radio-group>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancel">取 消</el-button> <el-button class="cancelBtn" @click="cancel">取 消</el-button>
...@@ -389,7 +383,22 @@ export default { ...@@ -389,7 +383,22 @@ export default {
return commonField return commonField
} }
}, },
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() { created() {
if (this.$store.getters.searchParams[this.$route.path]) {
const { searchParams } = this.$store.getters; const { path } = this.$route
const param = JSON.parse(searchParams[path]) // 保留着的查询条件
this.queryParams = { ...param }
}
this.getList() // 列表查询 this.getList() // 列表查询
this.getwareHouse() this.getwareHouse()
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment