|
|
|
@ -5,37 +5,33 @@
|
|
|
|
|
<!-- 查询模块 --> |
|
|
|
|
<el-form :inline="true" :size="option.size" :model="query"> |
|
|
|
|
<template> |
|
|
|
|
<el-form-item label="编码类型"> |
|
|
|
|
<el-select type="text" v-model="query.input" placeholder="请选择编码类型" > |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in codeType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.sort"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="展示类型" style="margin-left: 5px"> |
|
|
|
|
<el-select type="text" v-model="query.type" placeholder="请选择展示类型"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in showType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.sort"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</template> |
|
|
|
|
<!-- 查询按钮 --> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-col span="8"> |
|
|
|
|
<!-- <el-input type="text" v-model="query.input" placeholder="请输入编码信息" style="width: 50%;margin-right:5px"></el-input>--> |
|
|
|
|
<el-select type="text" v-model="query.input" placeholder="请选择编码类型" > |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in codeType" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col span="8"> |
|
|
|
|
<el-select type="text" v-model="query.type" placeholder="请选择展示类型" style="margin-left: 10px"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in showType" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-col> |
|
|
|
|
<el-clo span = "8"> |
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="searchChange" style="margin-left: 20px">搜索</el-button> |
|
|
|
|
<el-button icon="el-icon-delete" @click="searchReset()">清空</el-button> |
|
|
|
|
</el-clo> |
|
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="searchChange" style="margin-left: 20px" >搜索</el-button> |
|
|
|
|
<el-button icon="el-icon-delete" @click="searchReset()">清空</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
@ -99,23 +95,23 @@
|
|
|
|
|
<el-form :disabled="view" :size="option.size" ref="form" :model="form" label-width="80px"> |
|
|
|
|
<!-- 表单字段 --> |
|
|
|
|
|
|
|
|
|
<el-form-item label="展示类型:" prop="codeType" > |
|
|
|
|
<el-form-item label="编码类型:" prop="codeType" > |
|
|
|
|
<el-select v-model="form.codeType" clearable placeholder="请选择状态"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in codeType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value"> |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.sort"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="展示类型:" prop="state" > |
|
|
|
|
<el-form-item label="展示类型:" prop="showType" > |
|
|
|
|
<el-select v-model="form.showType" clearable placeholder="请选择状态"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in showType" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value"> |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.sort"> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
@ -137,7 +133,7 @@
|
|
|
|
|
import {getList, getDetail, add, update, remove} from "@/api/basic/basicTenantCode"; |
|
|
|
|
import option from "@/option/basic/basicdataTenantCode"; |
|
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
// import {getDictionary} from '@/api/system/dict' |
|
|
|
|
import {getDictionaryBiz} from '@/api/system/dict' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
@ -171,49 +167,16 @@ export default {
|
|
|
|
|
option: option, |
|
|
|
|
// 表单列表 |
|
|
|
|
data: [], |
|
|
|
|
codeType: [{ |
|
|
|
|
value: '1', |
|
|
|
|
label: '运单码' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '2', |
|
|
|
|
label: '订单码' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '3', |
|
|
|
|
label: '配送清单码' |
|
|
|
|
} , |
|
|
|
|
{ |
|
|
|
|
value: '4', |
|
|
|
|
label: '配载计划码' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '5', |
|
|
|
|
label: '库位码' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '6', |
|
|
|
|
label: '托盘码' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '7', |
|
|
|
|
label: '包件码' |
|
|
|
|
}], |
|
|
|
|
showType: [ |
|
|
|
|
{ |
|
|
|
|
value: '1', |
|
|
|
|
label: '二维码' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
value: '2', |
|
|
|
|
label: '条形码' |
|
|
|
|
}], |
|
|
|
|
codeType: [], |
|
|
|
|
showType: [], |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.init(); |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -228,6 +191,12 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
init() { |
|
|
|
|
getDictionaryBiz("basic_tenant_code").then(res=>{ |
|
|
|
|
this.codeType = res.data.data |
|
|
|
|
}) |
|
|
|
|
getDictionaryBiz("basic_tenant_code_show").then(res=>{ |
|
|
|
|
this.showType = res.data.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
searchHide() { |
|
|
|
|
this.search = !this.search; |
|
|
|
@ -271,6 +240,9 @@ export default {
|
|
|
|
|
this.box = true |
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
res.data.data.codeType = parseInt(res.data.data.codeType); |
|
|
|
|
res.data.data.showType = parseInt(res.data.data.showType); |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleView(row) { |
|
|
|
@ -278,13 +250,11 @@ export default {
|
|
|
|
|
this.view = true; |
|
|
|
|
this.box = true; |
|
|
|
|
getDetail(row.id).then(res => { |
|
|
|
|
|
|
|
|
|
console.log(res) |
|
|
|
|
console.log(res.data.data.showType) |
|
|
|
|
if (res.data.data.showType){ |
|
|
|
|
this.options.value = res.data.data.showType; |
|
|
|
|
} |
|
|
|
|
res.data.data.codeType = parseInt(res.data.data.codeType); |
|
|
|
|
res.data.data.showType = parseInt(res.data.data.showType); |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
@ -351,12 +321,28 @@ export default {
|
|
|
|
|
console.log(this.query) |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.codeType.forEach(item=>{ |
|
|
|
|
data.records.forEach(code=>{ |
|
|
|
|
if (item.dictKey === code.codeType){ |
|
|
|
|
code.codeType = item.dictValue; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.showType.forEach(item=>{ |
|
|
|
|
data.records.forEach(show=>{ |
|
|
|
|
if (item.dictKey === show.showType){ |
|
|
|
|
show.showType = item.dictValue; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|