Commit ba45ae76 authored by Hagsn3's avatar Hagsn3

代码提交

parent ce894a21
......@@ -87,8 +87,7 @@
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="wh_id" prop="whId" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.whId === '001'">仓库1</span>
<span v-else-if="scope.row.whId === '002'">仓库2</span>
<span v-if="scope.row.whId && getDataDictLabel(scope.row.whId)">{{ getDataDictLabel(scope.row.whId) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -365,26 +364,32 @@ export default {
return commonField
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
// /** 路由离开前存储筛选条件*/
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
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 }
}
// 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.getwareHouse()
},
methods: {
/** 跟据ID获取label*/
getDataDictLabel(whId) {
const dictItem = this.warehouseList.find(item => item.dictValue === whId)
return dictItem ? dictItem.dictLabel : null
},
/** 确认按钮*/
handleSureStatus(data) {
this.$confirm('是否确认操作?', '确认', {
......
......@@ -84,8 +84,7 @@
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="wh_id" prop="whId" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.whId === '001'">仓库1</span>
<span v-else-if="scope.row.whId === '002'">仓库2</span>
<span v-if="scope.row.whId ">{{ getDataDictLabel(scope.row.whId) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -121,27 +120,27 @@
{{ scope.row.qty || '-' }}
</template>
</el-table-column>
<el-table-column label="申请人" prop="createBy" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.ioType !=='1'">{{ scope.row.createName }}</span>
<span v-else>-</span>
<!-- {{ scope.row.createName || '-' }}-->
</template>
</el-table-column>
<el-table-column label="申请时间" prop="createDate" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope">
<span v-if="scope.row.ioType !=='1'">{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<!-- <el-table-column label="申请人" prop="createBy" :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.ioType !=='1'">{{ scope.row.createName }}</span>-->
<!-- <span v-else>-</span>-->
<!-- &lt;!&ndash; {{ scope.row.createName || '-' }}&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="申请时间" prop="createDate" :show-overflow-tooltip="true" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.ioType !=='1'">{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>-->
<!-- <span v-else>-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="创建人" prop="updateBy" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.updateName || '-' }}
{{ scope.row.createName || '-' }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="updateDate" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope">
<span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
<span>{{ scope.row.income_create_date | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="确认人" prop="affirmBy" :show-overflow-tooltip="true">-->
......@@ -176,8 +175,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="仓库:" prop="whId">
<span v-if="singleDetails.whId ==='001' ">仓库1</span>
<span v-else-if="singleDetails.whId ==='002' ">仓库2</span>
<span v-if="singleDetails.whId && getDataDictLabel(singleDetails.whId)">{{ getDataDictLabel(singleDetails.whId) }}</span>
<span v-else>-</span>
<!-- <el-input v-model.trim="singleDetails.whId" :readonly="true" />-->
</el-form-item>
......@@ -229,13 +227,13 @@
<el-row>
<el-col :span="12">
<el-form-item v-show="singleDetails.ioType !== '1'" label="申请人:" prop="createBy">
<span>{{ singleDetails.createName }}</span>
<span>{{ singleDetails.applyName }}</span>
<!-- <el-input v-model.trim="singleDetails.createBy" :readonly="true" />-->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-show="singleDetails.ioType !== '1'" label="申请时间:" prop="createDate">
<span>{{ singleDetails.createDate }}</span>
<span>{{ singleDetails.apply_create_date }}</span>
<!-- <el-input v-model.trim="singleDetails.createDate" :readonly="true" />-->
</el-form-item>
</el-col>
......@@ -243,13 +241,13 @@
<el-row>
<el-col :span="12">
<el-form-item label="创建人:" prop="updateBy">
<span>{{ singleDetails.updateName }}</span>
<span>{{ singleDetails.createName }}</span>
<!-- <el-input v-model.trim="singleDetails.updateBy" :readonly="true" :maxlength="100" />-->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间:" prop="updateDate">
<span>{{ singleDetails.updateDate }}</span>
<span>{{ singleDetails.income_create_date }}</span>
<!-- <el-input v-model.trim="singleDetails.updateDate" :readonly="true" />-->
</el-form-item>
</el-col>
......@@ -257,7 +255,7 @@
<el-row>
<el-col :span="12">
<el-form-item v-show="singleDetails.ioType !== '1'" label="确认人:" prop="affirmBy">
<span>{{ singleDetails.affirmBy }}</span>
<span>{{ singleDetails.affirmName }}</span>
<!-- <el-input v-model.trim="singleDetails.affirmBy" :readonly="true" :maxlength="100" />-->
</el-form-item>
</el-col>
......@@ -294,13 +292,17 @@ export default {
incomeInoutWmsLogList: [],
warehouseList: [],
singleDetails: {
apply_create_date: '',
income_create_date: '',
whId: '',
affirmName:'',
orderCode: '',
ptype: '',
pn: '',
ioType: '',
flag: '',
createBy: '',
applyName: '',
createName: '',
updateName: '',
createDate: '',
......@@ -426,38 +428,33 @@ export default {
computed: {
commonField() {
return commonField
},
warehouseName() {
// 根据不同的whId返回不同的仓库名称
if (this.singleDetails.whId === '001') {
return '仓库1'
} else if (this.singleDetails.whId === '002') {
return '仓库2'
} else {
return '-'
}
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
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 }
}
// 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.getwareHouse()
},
methods: {
/** 跟据ID获取label*/
getDataDictLabel(whId) {
const dictItem = this.warehouseList.find(item => item.dictValue === whId)
return dictItem ? dictItem.dictLabel : null
},
/** 查询????列表 */
getList() {
this.loading = true
......
......@@ -29,16 +29,6 @@
style="width: 150px"
/>
</el-form-item>
<el-form-item label="memo1" prop="memo1">
<el-input
v-model="queryParams.memo1"
placeholder="请输入memo1"
clearable
:maxlength="127"
size="small"
style="width: 150px"
/>
</el-form-item>
<el-form-item>
<el-button
:class="commonField.queryClass"
......@@ -121,12 +111,12 @@
</el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<!-- <el-button-->
<!-- :class="commonField.updateClass"-->
<!-- :type="commonField.typeParent"-->
<!-- :size="commonField.size"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改</el-button>-->
<el-button
:class="commonField.updateClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
:class="commonField.delClass"
:type="commonField.typeParent"
......
......@@ -105,8 +105,8 @@
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="wh_id" prop="whId" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.whId === '001'">仓库1</span>
<span v-else-if="scope.row.whId === '002'">仓库2</span>
<!-- 假设字典数据存储在 dataDict 中 -->
<span v-if="scope.row.whId &&getDataDictLabel(scope.row.whId) ">{{ getDataDictLabel(scope.row.whId) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
......@@ -174,11 +174,11 @@
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改</el-button>-->
<el-button
v-show="scope.row.dealStatus === '0' "
:class="commonField.delClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleDelete(scope.row)"
v-show="scope.row.dealStatus === '0' "
>删除</el-button>
</template>
</el-table-column>
......@@ -234,18 +234,18 @@
<el-form-item label="qty" prop="qty">
<el-input v-model.trim="form.qty" placeholder="请输入qty的值" />
</el-form-item>
<el-form-item label="出库状态">
<el-radio-group v-model="form.dealStatus" show-word-limit :maxlength="1">
<el-radio label="1">已出库</el-radio>
<el-radio label="0">未出库</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="确认状态">
<el-radio-group v-model="form.sureStatus" show-word-limit :maxlength="1">
<el-radio label="1">已确认</el-radio>
<el-radio label="0">待确认</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="出库状态">-->
<!-- <el-radio-group v-model="form.dealStatus" show-word-limit :maxlength="1">-->
<!-- <el-radio label="1">已出库</el-radio>-->
<!-- <el-radio label="0">未出库</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="确认状态">-->
<!-- <el-radio-group v-model="form.sureStatus" show-word-limit :maxlength="1">-->
<!-- <el-radio label="1">已确认</el-radio>-->
<!-- <el-radio label="0">待确认</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancel">取 消</el-button>
......@@ -261,8 +261,7 @@ import {
getOutcomeWmsApply,
delOutcomeWmsApply,
addOutcomeWmsApply,
updateOutcomeWmsApply,
exportOutcomeWmsApply } from '@/api/outcomeWmsApply'
updateOutcomeWmsApply } from '@/api/outcomeWmsApply'
import commonField from '@/utils/commonField'
import { getDicts } from '@/api/system/dict/data'
export default {
......@@ -375,6 +374,19 @@ export default {
},
// 表单校验
rules: {
whId: [
{ required: true, message: '请选择whId的值', trigger: 'blur' }
],
ptype: [
{ required: true, message: '请选择ptype的值', trigger: 'blur' }
],
pn: [
{ required: true, message: '请输入pn的值', trigger: 'blur' }
],
qty: [
{ required: true, message: '请输入qty的值', trigger: 'blur' },
{ pattern: /^(0|[1-9]\d*)$/, message: '输入值不符合格式要求,请重新输入', trigger: 'blur' }
]
}
}
},
......@@ -383,26 +395,31 @@ export default {
return commonField
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
// /** 路由离开前存储筛选条件*/
// beforeRouteLeave(to, from, next) {
// this.$store.dispatch('searchSave/searchParamsSet', {
// path: this.$route.path,
// param: {
// ...this.queryParams
// }
// })
// next()
// },
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 }
}
// 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.getwareHouse()
},
methods: {
/* 获取数据字典中的值*/
getDataDictLabel(whId) {
const dictItem = this.warehouseList.find(item => item.dictValue === whId)
return dictItem ? dictItem.dictLabel : null
},
/** 查询????列表 */
getList() {
this.loading = true
......
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