Commit ba45ae76 authored by Hagsn3's avatar Hagsn3

代码提交

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