Commit f22ec63c28c2339fb0e17a096101d913996a9cb1
1 parent
6b73abdb
开发供应商功能
Showing
17 changed files
with
1439 additions
and
60 deletions
src/api/scm/supplierManageApi.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询供应商列表 | |
| 4 | +export function listSupplier(params) { | |
| 5 | + return new Promise((resolve, reject) => { | |
| 6 | + request({ | |
| 7 | + url: '/supplier.listSupplier', | |
| 8 | + method: 'get', | |
| 9 | + params | |
| 10 | + }).then(response => { | |
| 11 | + const res = response.data | |
| 12 | + if (res.code === 0) { | |
| 13 | + resolve(res) | |
| 14 | + } else { | |
| 15 | + reject(new Error(res.msg || '查询供应商列表失败')) | |
| 16 | + } | |
| 17 | + }).catch(error => { | |
| 18 | + reject(error) | |
| 19 | + }) | |
| 20 | + }) | |
| 21 | +} | |
| 22 | + | |
| 23 | +// 添加供应商 | |
| 24 | +export function saveSupplier(data) { | |
| 25 | + return new Promise((resolve, reject) => { | |
| 26 | + request({ | |
| 27 | + url: '/supplier.saveSupplier', | |
| 28 | + method: 'post', | |
| 29 | + data | |
| 30 | + }).then(response => { | |
| 31 | + const res = response.data | |
| 32 | + if (res.code === 0) { | |
| 33 | + resolve(res) | |
| 34 | + } else { | |
| 35 | + reject(new Error(res.msg || '添加供应商失败')) | |
| 36 | + } | |
| 37 | + }).catch(error => { | |
| 38 | + reject(error) | |
| 39 | + }) | |
| 40 | + }) | |
| 41 | +} | |
| 42 | + | |
| 43 | +// 更新供应商 | |
| 44 | +export function updateSupplier(data) { | |
| 45 | + return new Promise((resolve, reject) => { | |
| 46 | + request({ | |
| 47 | + url: '/supplier.updateSupplier', | |
| 48 | + method: 'post', | |
| 49 | + data | |
| 50 | + }).then(response => { | |
| 51 | + const res = response.data | |
| 52 | + if (res.code === 0) { | |
| 53 | + resolve(res) | |
| 54 | + } else { | |
| 55 | + reject(new Error(res.msg || '更新供应商失败')) | |
| 56 | + } | |
| 57 | + }).catch(error => { | |
| 58 | + reject(error) | |
| 59 | + }) | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +// 删除供应商 | |
| 64 | +export function deleteSupplier(supplierId) { | |
| 65 | + return new Promise((resolve, reject) => { | |
| 66 | + request({ | |
| 67 | + url: '/supplier.deleteSupplier', | |
| 68 | + method: 'post', | |
| 69 | + data: { supplierId } | |
| 70 | + }).then(response => { | |
| 71 | + const res = response.data | |
| 72 | + if (res.code === 0) { | |
| 73 | + resolve(res) | |
| 74 | + } else { | |
| 75 | + reject(new Error(res.msg || '删除供应商失败')) | |
| 76 | + } | |
| 77 | + }).catch(error => { | |
| 78 | + reject(error) | |
| 79 | + }) | |
| 80 | + }) | |
| 81 | +} | |
| 82 | + | |
| 83 | +// 查询供应商类型列表 | |
| 84 | +export function listSupplierType(params) { | |
| 85 | + return new Promise((resolve, reject) => { | |
| 86 | + request({ | |
| 87 | + url: '/supplierType.listSupplierType', | |
| 88 | + method: 'get', | |
| 89 | + params | |
| 90 | + }).then(response => { | |
| 91 | + const res = response.data | |
| 92 | + if (res.code === 0) { | |
| 93 | + resolve(res) | |
| 94 | + } else { | |
| 95 | + reject(new Error(res.msg || '查询供应商类型失败')) | |
| 96 | + } | |
| 97 | + }).catch(error => { | |
| 98 | + reject(error) | |
| 99 | + }) | |
| 100 | + }) | |
| 101 | +} | |
| 102 | + | |
| 103 | +// 查询供应商配置 | |
| 104 | +export function listSupplierConfig(params) { | |
| 105 | + return new Promise((resolve, reject) => { | |
| 106 | + request({ | |
| 107 | + url: '/supplierType.listSupplierConfig', | |
| 108 | + method: 'get', | |
| 109 | + params | |
| 110 | + }).then(response => { | |
| 111 | + const res = response.data | |
| 112 | + if (res.code === 0) { | |
| 113 | + resolve(res) | |
| 114 | + } else { | |
| 115 | + reject(new Error(res.msg || '查询供应商配置失败')) | |
| 116 | + } | |
| 117 | + }).catch(error => { | |
| 118 | + reject(error) | |
| 119 | + }) | |
| 120 | + }) | |
| 121 | +} | |
| 122 | + | |
| 123 | +// 保存供应商配置 | |
| 124 | +export function saveSupplierConfig(data) { | |
| 125 | + return new Promise((resolve, reject) => { | |
| 126 | + request({ | |
| 127 | + url: '/supplierType.saveSupplierConfig', | |
| 128 | + method: 'post', | |
| 129 | + data | |
| 130 | + }).then(response => { | |
| 131 | + const res = response.data | |
| 132 | + if (res.code === 0) { | |
| 133 | + resolve(res) | |
| 134 | + } else { | |
| 135 | + reject(new Error(res.msg || '保存供应商配置失败')) | |
| 136 | + } | |
| 137 | + }).catch(error => { | |
| 138 | + reject(error) | |
| 139 | + }) | |
| 140 | + }) | |
| 141 | +} | |
| 0 | 142 | \ No newline at end of file | ... | ... |
src/api/scm/supplierTypeManageApi.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 获取供应商类型列表 | |
| 4 | +export function listSupplierType(params) { | |
| 5 | + return new Promise((resolve, reject) => { | |
| 6 | + request({ | |
| 7 | + url: '/supplierType.listSupplierType', | |
| 8 | + method: 'get', | |
| 9 | + params | |
| 10 | + }).then(response => { | |
| 11 | + const res = response.data | |
| 12 | + if (res.code === 0) { | |
| 13 | + resolve(res) | |
| 14 | + } else { | |
| 15 | + reject(new Error(res.msg || '获取供应商类型列表失败')) | |
| 16 | + } | |
| 17 | + }).catch(error => { | |
| 18 | + reject(error) | |
| 19 | + }) | |
| 20 | + }) | |
| 21 | +} | |
| 22 | + | |
| 23 | +// 添加供应商类型 | |
| 24 | +export function saveSupplierType(data) { | |
| 25 | + return new Promise((resolve, reject) => { | |
| 26 | + request({ | |
| 27 | + url: '/supplierType.saveSupplierType', | |
| 28 | + method: 'post', | |
| 29 | + data | |
| 30 | + }).then(response => { | |
| 31 | + const res = response.data | |
| 32 | + if (res.code === 0) { | |
| 33 | + resolve(res) | |
| 34 | + } else { | |
| 35 | + reject(new Error(res.msg || '添加供应商类型失败')) | |
| 36 | + } | |
| 37 | + }).catch(error => { | |
| 38 | + reject(error) | |
| 39 | + }) | |
| 40 | + }) | |
| 41 | +} | |
| 42 | + | |
| 43 | +// 更新供应商类型 | |
| 44 | +export function updateSupplierType(data) { | |
| 45 | + return new Promise((resolve, reject) => { | |
| 46 | + request({ | |
| 47 | + url: '/supplierType.updateSupplierType', | |
| 48 | + method: 'post', | |
| 49 | + data | |
| 50 | + }).then(response => { | |
| 51 | + const res = response.data | |
| 52 | + if (res.code === 0) { | |
| 53 | + resolve(res) | |
| 54 | + } else { | |
| 55 | + reject(new Error(res.msg || '更新供应商类型失败')) | |
| 56 | + } | |
| 57 | + }).catch(error => { | |
| 58 | + reject(error) | |
| 59 | + }) | |
| 60 | + }) | |
| 61 | +} | |
| 62 | + | |
| 63 | +// 删除供应商类型 | |
| 64 | +export function deleteSupplierType(stId) { | |
| 65 | + return new Promise((resolve, reject) => { | |
| 66 | + request({ | |
| 67 | + url: '/supplierType.deleteSupplierType', | |
| 68 | + method: 'post', | |
| 69 | + data: { stId } | |
| 70 | + }).then(response => { | |
| 71 | + const res = response.data | |
| 72 | + if (res.code === 0) { | |
| 73 | + resolve(res) | |
| 74 | + } else { | |
| 75 | + reject(new Error(res.msg || '删除供应商类型失败')) | |
| 76 | + } | |
| 77 | + }).catch(error => { | |
| 78 | + reject(error) | |
| 79 | + }) | |
| 80 | + }) | |
| 81 | +} | |
| 0 | 82 | \ No newline at end of file | ... | ... |
src/components/scm/AddSupplier.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="$t('supplierManage.add')" :visible.sync="visible" width="800px" @close="resetForm"> | |
| 3 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 4 | + <el-form-item :label="$t('supplierManage.supplierType')" prop="stId"> | |
| 5 | + <el-select v-model="form.stId" | |
| 6 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.supplierType')" class="w-100"> | |
| 7 | + <el-option v-for="item in supplierTypes" :key="item.stId" :label="item.typeName" :value="item.stId" /> | |
| 8 | + </el-select> | |
| 9 | + </el-form-item> | |
| 10 | + | |
| 11 | + <el-form-item :label="$t('supplierManage.supplierName')" prop="supplierName"> | |
| 12 | + <el-input v-model="form.supplierName" :placeholder="$t('supplierManage.requiredField')" /> | |
| 13 | + </el-form-item> | |
| 14 | + | |
| 15 | + <el-form-item :label="$t('supplierManage.template')" prop="beanName"> | |
| 16 | + <el-select v-model="form.beanName" | |
| 17 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.template')" class="w-100"> | |
| 18 | + <el-option v-for="item in beanNames" :key="item.statusCd" :label="item.name" :value="item.statusCd" /> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + | |
| 22 | + <el-form-item :label="$t('supplierManage.contactPerson')" prop="personName"> | |
| 23 | + <el-input v-model="form.personName" :placeholder="$t('supplierManage.requiredField')" /> | |
| 24 | + </el-form-item> | |
| 25 | + | |
| 26 | + <el-form-item :label="$t('supplierManage.contactTel')" prop="personTel"> | |
| 27 | + <el-input v-model="form.personTel" :placeholder="$t('supplierManage.requiredField')" type="tel" /> | |
| 28 | + </el-form-item> | |
| 29 | + | |
| 30 | + <el-form-item :label="$t('supplierManage.startTime')" prop="startTime"> | |
| 31 | + <el-date-picker v-model="form.startTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" | |
| 32 | + :placeholder="$t('supplierManage.requiredField')" class="w-100" /> | |
| 33 | + </el-form-item> | |
| 34 | + | |
| 35 | + <el-form-item :label="$t('supplierManage.endTime')" prop="endTime"> | |
| 36 | + <el-date-picker v-model="form.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" | |
| 37 | + :placeholder="$t('supplierManage.requiredField')" class="w-100" /> | |
| 38 | + </el-form-item> | |
| 39 | + | |
| 40 | + <el-form-item :label="$t('supplierManage.remark')" prop="remark"> | |
| 41 | + <el-input v-model="form.remark" type="textarea" :rows="3" :placeholder="$t('supplierManage.requiredField')" /> | |
| 42 | + </el-form-item> | |
| 43 | + </el-form> | |
| 44 | + | |
| 45 | + <div slot="footer" class="dialog-footer"> | |
| 46 | + <el-button @click="visible = false">{{ $t('supplierManage.cancel') }}</el-button> | |
| 47 | + <el-button type="primary" @click="saveSupplierInfo">{{ $t('supplierManage.confirm') }}</el-button> | |
| 48 | + </div> | |
| 49 | + </el-dialog> | |
| 50 | +</template> | |
| 51 | + | |
| 52 | +<script> | |
| 53 | +import { saveSupplier, listSupplierType } from '@/api/scm/supplierManageApi' | |
| 54 | +import {getDict} from '@/api/community/communityApi' | |
| 55 | + | |
| 56 | +export default { | |
| 57 | + name: 'AddSupplier', | |
| 58 | + props: { | |
| 59 | + dictData: { | |
| 60 | + type: Array, | |
| 61 | + default: () => [] | |
| 62 | + } | |
| 63 | + }, | |
| 64 | + data() { | |
| 65 | + return { | |
| 66 | + visible: false, | |
| 67 | + form: { | |
| 68 | + stId: '', | |
| 69 | + supplierName: '', | |
| 70 | + beanName: '', | |
| 71 | + personName: '', | |
| 72 | + personTel: '', | |
| 73 | + startTime: '', | |
| 74 | + endTime: '', | |
| 75 | + remark: '' | |
| 76 | + }, | |
| 77 | + supplierTypes: [], | |
| 78 | + beanNames: [], | |
| 79 | + rules: { | |
| 80 | + stId: [ | |
| 81 | + { required: true, message: this.$t('supplierManage.supplierType') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 82 | + ], | |
| 83 | + supplierName: [ | |
| 84 | + { required: true, message: this.$t('supplierManage.supplierName') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 85 | + ], | |
| 86 | + beanName: [ | |
| 87 | + { required: true, message: this.$t('supplierManage.template') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 88 | + ], | |
| 89 | + personName: [ | |
| 90 | + { required: true, message: this.$t('supplierManage.contactPerson') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 91 | + ], | |
| 92 | + personTel: [ | |
| 93 | + { required: true, message: this.$t('supplierManage.contactTel') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 94 | + ], | |
| 95 | + startTime: [ | |
| 96 | + { required: true, message: this.$t('supplierManage.startTime') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 97 | + ], | |
| 98 | + endTime: [ | |
| 99 | + { required: true, message: this.$t('supplierManage.endTime') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 100 | + ], | |
| 101 | + remark: [ | |
| 102 | + { required: true, message: this.$t('supplierManage.remark') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 103 | + ] | |
| 104 | + } | |
| 105 | + } | |
| 106 | + }, | |
| 107 | + mounted() { | |
| 108 | + this.listSupplierTypes() | |
| 109 | + }, | |
| 110 | + methods: { | |
| 111 | + async open() { | |
| 112 | + this.visible = true | |
| 113 | + const data = await getDict('supplier','bean_name') | |
| 114 | + this.beanNames = data | |
| 115 | + }, | |
| 116 | + | |
| 117 | + async listSupplierTypes() { | |
| 118 | + try { | |
| 119 | + const res = await listSupplierType({ page: 1, row: 100 }) | |
| 120 | + this.supplierTypes = res.data | |
| 121 | + } catch (error) { | |
| 122 | + console.error('查询供应商类型失败:', error) | |
| 123 | + } | |
| 124 | + }, | |
| 125 | + | |
| 126 | + async saveSupplierInfo() { | |
| 127 | + this.$refs.form.validate(async valid => { | |
| 128 | + if (valid) { | |
| 129 | + try { | |
| 130 | + const res = await saveSupplier(this.form) | |
| 131 | + if (res.code === 0) { | |
| 132 | + this.$message.success(this.$t('common.saveSuccess')) | |
| 133 | + this.visible = false | |
| 134 | + this.$emit('success') | |
| 135 | + } else { | |
| 136 | + this.$message.error(res.msg || this.$t('common.saveFailed')) | |
| 137 | + } | |
| 138 | + } catch (error) { | |
| 139 | + console.error('保存供应商失败:', error) | |
| 140 | + this.$message.error(this.$t('common.saveFailed')) | |
| 141 | + } | |
| 142 | + } | |
| 143 | + }) | |
| 144 | + }, | |
| 145 | + | |
| 146 | + resetForm() { | |
| 147 | + this.$refs.form.resetFields() | |
| 148 | + } | |
| 149 | + } | |
| 150 | +} | |
| 151 | +</script> | |
| 152 | + | |
| 153 | +<style scoped> | |
| 154 | +.w-100 { | |
| 155 | + width: 100%; | |
| 156 | +} | |
| 157 | +</style> | |
| 0 | 158 | \ No newline at end of file | ... | ... |
src/components/scm/AddSupplierType.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + :title="$t('supplierTypeManage.add.title')" | |
| 4 | + :visible.sync="visible" | |
| 5 | + width="50%" | |
| 6 | + @close="handleClose" | |
| 7 | + > | |
| 8 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 9 | + <el-form-item :label="$t('supplierTypeManage.form.typeCd')" prop="typeCd"> | |
| 10 | + <el-input v-model="form.typeCd" :placeholder="$t('supplierTypeManage.placeholder.typeCd')" /> | |
| 11 | + </el-form-item> | |
| 12 | + <el-form-item :label="$t('supplierTypeManage.form.typeName')" prop="typeName"> | |
| 13 | + <el-input v-model="form.typeName" :placeholder="$t('supplierTypeManage.placeholder.typeName')" /> | |
| 14 | + </el-form-item> | |
| 15 | + <el-form-item :label="$t('supplierTypeManage.form.remark')" prop="remark"> | |
| 16 | + <el-input v-model="form.remark" type="textarea" :placeholder="$t('supplierTypeManage.placeholder.remark')" /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-form> | |
| 19 | + | |
| 20 | + <div slot="footer" class="dialog-footer"> | |
| 21 | + <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button> | |
| 22 | + <el-button type="primary" @click="handleSubmit">{{ $t('common.confirm') }}</el-button> | |
| 23 | + </div> | |
| 24 | + </el-dialog> | |
| 25 | +</template> | |
| 26 | + | |
| 27 | +<script> | |
| 28 | +import { saveSupplierType } from '@/api/scm/supplierTypeManageApi' | |
| 29 | + | |
| 30 | +export default { | |
| 31 | + name: 'AddSupplierType', | |
| 32 | + data() { | |
| 33 | + return { | |
| 34 | + visible: false, | |
| 35 | + form: { | |
| 36 | + typeCd: '', | |
| 37 | + typeName: '', | |
| 38 | + remark: '' | |
| 39 | + }, | |
| 40 | + rules: { | |
| 41 | + typeCd: [ | |
| 42 | + { required: true, message: this.$t('supplierTypeManage.validate.typeCdRequired'), trigger: 'blur' }, | |
| 43 | + { max: 32, message: this.$t('supplierTypeManage.validate.typeCdMaxLength'), trigger: 'blur' } | |
| 44 | + ], | |
| 45 | + typeName: [ | |
| 46 | + { required: true, message: this.$t('supplierTypeManage.validate.typeNameRequired'), trigger: 'blur' }, | |
| 47 | + { max: 255, message: this.$t('supplierTypeManage.validate.typeNameMaxLength'), trigger: 'blur' } | |
| 48 | + ], | |
| 49 | + remark: [ | |
| 50 | + { required: true, message: this.$t('supplierTypeManage.validate.remarkRequired'), trigger: 'blur' }, | |
| 51 | + { max: 512, message: this.$t('supplierTypeManage.validate.remarkMaxLength'), trigger: 'blur' } | |
| 52 | + ] | |
| 53 | + } | |
| 54 | + } | |
| 55 | + }, | |
| 56 | + methods: { | |
| 57 | + open() { | |
| 58 | + this.visible = true | |
| 59 | + }, | |
| 60 | + handleClose() { | |
| 61 | + this.$refs.form.resetFields() | |
| 62 | + }, | |
| 63 | + handleSubmit() { | |
| 64 | + this.$refs.form.validate(async valid => { | |
| 65 | + if (valid) { | |
| 66 | + try { | |
| 67 | + await saveSupplierType(this.form) | |
| 68 | + this.$message.success(this.$t('supplierTypeManage.message.addSuccess')) | |
| 69 | + this.visible = false | |
| 70 | + this.$emit('success') | |
| 71 | + } catch (error) { | |
| 72 | + this.$message.error(error.message) | |
| 73 | + } | |
| 74 | + } | |
| 75 | + }) | |
| 76 | + } | |
| 77 | + } | |
| 78 | +} | |
| 79 | +</script> | |
| 0 | 80 | \ No newline at end of file | ... | ... |
src/components/scm/ConfigSupplier.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + :title="$t('supplierManage.config')" | |
| 4 | + :visible.sync="visible" | |
| 5 | + width="800px" | |
| 6 | + @close="resetForm"> | |
| 7 | + <el-form ref="form" :model="form" label-width="200px"> | |
| 8 | + <el-form-item | |
| 9 | + v-for="(item, index) in form.configs" | |
| 10 | + :key="index" | |
| 11 | + :label="item.name"> | |
| 12 | + <el-input | |
| 13 | + v-model="item.columnValue" | |
| 14 | + :placeholder="item.remark" | |
| 15 | + class="w-100" /> | |
| 16 | + </el-form-item> | |
| 17 | + </el-form> | |
| 18 | + | |
| 19 | + <div slot="footer" class="dialog-footer"> | |
| 20 | + <el-button @click="visible = false">{{ $t('supplierManage.cancel') }}</el-button> | |
| 21 | + <el-button type="primary" @click="saveConfigSupplierInfo">{{ $t('supplierManage.confirm') }}</el-button> | |
| 22 | + </div> | |
| 23 | + </el-dialog> | |
| 24 | +</template> | |
| 25 | + | |
| 26 | +<script> | |
| 27 | +import { listSupplierConfig, saveSupplierConfig } from '@/api/scm/supplierManageApi' | |
| 28 | + | |
| 29 | +export default { | |
| 30 | + name: 'ConfigSupplier', | |
| 31 | + data() { | |
| 32 | + return { | |
| 33 | + visible: false, | |
| 34 | + form: { | |
| 35 | + supplierId: '', | |
| 36 | + configs: [] | |
| 37 | + } | |
| 38 | + } | |
| 39 | + }, | |
| 40 | + methods: { | |
| 41 | + async open(row) { | |
| 42 | + this.form.supplierId = row.supplierId | |
| 43 | + this.visible = true | |
| 44 | + await this.loadSupplierConfigs() | |
| 45 | + }, | |
| 46 | + | |
| 47 | + async loadSupplierConfigs() { | |
| 48 | + if (!this.form.supplierId) return | |
| 49 | + | |
| 50 | + try { | |
| 51 | + const res = await listSupplierConfig({ | |
| 52 | + supplierId: this.form.supplierId, | |
| 53 | + page: 1, | |
| 54 | + row: 100 | |
| 55 | + }) | |
| 56 | + this.form.configs = res.data || [] | |
| 57 | + } catch (error) { | |
| 58 | + console.error('加载供应商配置失败:', error) | |
| 59 | + } | |
| 60 | + }, | |
| 61 | + | |
| 62 | + async saveConfigSupplierInfo() { | |
| 63 | + try { | |
| 64 | + const res = await saveSupplierConfig(this.form) | |
| 65 | + if (res.code === 0) { | |
| 66 | + this.$message.success(this.$t('common.saveSuccess')) | |
| 67 | + this.visible = false | |
| 68 | + } else { | |
| 69 | + this.$message.error(res.msg || this.$t('common.saveFailed')) | |
| 70 | + } | |
| 71 | + } catch (error) { | |
| 72 | + console.error('保存供应商配置失败:', error) | |
| 73 | + this.$message.error(this.$t('common.saveFailed')) | |
| 74 | + } | |
| 75 | + }, | |
| 76 | + | |
| 77 | + resetForm() { | |
| 78 | + this.form = { | |
| 79 | + supplierId: '', | |
| 80 | + configs: [] | |
| 81 | + } | |
| 82 | + } | |
| 83 | + } | |
| 84 | +} | |
| 85 | +</script> | |
| 86 | + | |
| 87 | +<style scoped> | |
| 88 | +.w-100 { | |
| 89 | + width: 100%; | |
| 90 | +} | |
| 91 | +</style> | |
| 0 | 92 | \ No newline at end of file | ... | ... |
src/components/scm/DeleteSupplier.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + :title="$t('supplierManage.confirmDelete')" | |
| 4 | + :visible.sync="visible" | |
| 5 | + width="500px"> | |
| 6 | + <div class="text-center"> | |
| 7 | + <p>{{ $t('supplierManage.deleteTip') }}</p> | |
| 8 | + <p class="mt-10"><strong>{{ supplier.supplierName }}</strong></p> | |
| 9 | + </div> | |
| 10 | + | |
| 11 | + <div slot="footer" class="dialog-footer"> | |
| 12 | + <el-button @click="visible = false">{{ $t('supplierManage.cancel') }}</el-button> | |
| 13 | + <el-button type="primary" @click="deleteSupplier">{{ $t('supplierManage.confirm') }}</el-button> | |
| 14 | + </div> | |
| 15 | + </el-dialog> | |
| 16 | +</template> | |
| 17 | + | |
| 18 | +<script> | |
| 19 | +import { deleteSupplier } from '@/api/scm/supplierManageApi' | |
| 20 | + | |
| 21 | +export default { | |
| 22 | + name: 'DeleteSupplier', | |
| 23 | + data() { | |
| 24 | + return { | |
| 25 | + visible: false, | |
| 26 | + supplier: {} | |
| 27 | + } | |
| 28 | + }, | |
| 29 | + methods: { | |
| 30 | + open(row) { | |
| 31 | + this.supplier = { ...row } | |
| 32 | + this.visible = true | |
| 33 | + }, | |
| 34 | + | |
| 35 | + async deleteSupplier() { | |
| 36 | + try { | |
| 37 | + const res = await deleteSupplier(this.supplier.supplierId) | |
| 38 | + if (res.code === 0) { | |
| 39 | + this.$message.success(this.$t('common.deleteSuccess')) | |
| 40 | + this.visible = false | |
| 41 | + this.$emit('success') | |
| 42 | + } else { | |
| 43 | + this.$message.error(res.msg || this.$t('common.deleteFailed')) | |
| 44 | + } | |
| 45 | + } catch (error) { | |
| 46 | + console.error('删除供应商失败:', error) | |
| 47 | + this.$message.error(this.$t('common.deleteFailed')) | |
| 48 | + } | |
| 49 | + } | |
| 50 | + } | |
| 51 | +} | |
| 52 | +</script> | |
| 53 | + | |
| 54 | +<style scoped> | |
| 55 | +.text-center { | |
| 56 | + text-align: center; | |
| 57 | +} | |
| 58 | + | |
| 59 | +.mt-10 { | |
| 60 | + margin-top: 10px; | |
| 61 | +} | |
| 62 | +</style> | |
| 0 | 63 | \ No newline at end of file | ... | ... |
src/components/scm/DeleteSupplierType.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + :title="$t('supplierTypeManage.delete.title')" | |
| 4 | + :visible.sync="visible" | |
| 5 | + width="30%" | |
| 6 | + @close="handleClose" | |
| 7 | + > | |
| 8 | + <p>{{ $t('supplierTypeManage.delete.confirm') }}</p> | |
| 9 | + <div slot="footer" class="dialog-footer"> | |
| 10 | + <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button> | |
| 11 | + <el-button type="primary" @click="handleConfirm">{{ $t('common.confirm') }}</el-button> | |
| 12 | + </div> | |
| 13 | + </el-dialog> | |
| 14 | +</template> | |
| 15 | + | |
| 16 | +<script> | |
| 17 | +import { deleteSupplierType } from '@/api/scm/supplierTypeManageApi' | |
| 18 | + | |
| 19 | +export default { | |
| 20 | + name: 'DeleteSupplierType', | |
| 21 | + data() { | |
| 22 | + return { | |
| 23 | + visible: false, | |
| 24 | + stId: '' | |
| 25 | + } | |
| 26 | + }, | |
| 27 | + methods: { | |
| 28 | + open(row) { | |
| 29 | + this.stId = row.stId | |
| 30 | + this.visible = true | |
| 31 | + }, | |
| 32 | + handleClose() { | |
| 33 | + this.stId = '' | |
| 34 | + }, | |
| 35 | + async handleConfirm() { | |
| 36 | + try { | |
| 37 | + await deleteSupplierType(this.stId) | |
| 38 | + this.$message.success(this.$t('supplierTypeManage.message.deleteSuccess')) | |
| 39 | + this.visible = false | |
| 40 | + this.$emit('success') | |
| 41 | + } catch (error) { | |
| 42 | + this.$message.error(error.message) | |
| 43 | + } | |
| 44 | + } | |
| 45 | + } | |
| 46 | +} | |
| 47 | +</script> | |
| 0 | 48 | \ No newline at end of file | ... | ... |
src/components/scm/EditSupplier.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog :title="$t('supplierManage.edit')" :visible.sync="visible" width="800px" @close="resetForm"> | |
| 3 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 4 | + <el-form-item :label="$t('supplierManage.supplierType')" prop="stId"> | |
| 5 | + <el-select v-model="form.stId" | |
| 6 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.supplierType')" class="w-100"> | |
| 7 | + <el-option v-for="item in supplierTypes" :key="item.stId" :label="item.typeName" :value="item.stId" /> | |
| 8 | + </el-select> | |
| 9 | + </el-form-item> | |
| 10 | + | |
| 11 | + <el-form-item :label="$t('supplierManage.supplierName')" prop="supplierName"> | |
| 12 | + <el-input v-model="form.supplierName" :placeholder="$t('supplierManage.requiredField')" /> | |
| 13 | + </el-form-item> | |
| 14 | + | |
| 15 | + <el-form-item :label="$t('supplierManage.template')" prop="beanName"> | |
| 16 | + <el-select v-model="form.beanName" | |
| 17 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.template')" class="w-100"> | |
| 18 | + <el-option v-for="item in beanNames" :key="item.statusCd" :label="item.name" :value="item.statusCd" /> | |
| 19 | + </el-select> | |
| 20 | + </el-form-item> | |
| 21 | + | |
| 22 | + <el-form-item :label="$t('supplierManage.contactPerson')" prop="personName"> | |
| 23 | + <el-input v-model="form.personName" :placeholder="$t('supplierManage.requiredField')" /> | |
| 24 | + </el-form-item> | |
| 25 | + | |
| 26 | + <el-form-item :label="$t('supplierManage.contactTel')" prop="personTel"> | |
| 27 | + <el-input v-model="form.personTel" :placeholder="$t('supplierManage.requiredField')" type="tel" /> | |
| 28 | + </el-form-item> | |
| 29 | + | |
| 30 | + <el-form-item :label="$t('supplierManage.startTime')" prop="startTime"> | |
| 31 | + <el-date-picker v-model="form.startTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" | |
| 32 | + :placeholder="$t('supplierManage.requiredField')" class="w-100" /> | |
| 33 | + </el-form-item> | |
| 34 | + | |
| 35 | + <el-form-item :label="$t('supplierManage.endTime')" prop="endTime"> | |
| 36 | + <el-date-picker v-model="form.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" | |
| 37 | + :placeholder="$t('supplierManage.requiredField')" class="w-100" /> | |
| 38 | + </el-form-item> | |
| 39 | + | |
| 40 | + <el-form-item :label="$t('supplierManage.remark')" prop="remark"> | |
| 41 | + <el-input v-model="form.remark" type="textarea" :rows="3" :placeholder="$t('supplierManage.requiredField')" /> | |
| 42 | + </el-form-item> | |
| 43 | + </el-form> | |
| 44 | + | |
| 45 | + <div slot="footer" class="dialog-footer"> | |
| 46 | + <el-button @click="visible = false">{{ $t('supplierManage.cancel') }}</el-button> | |
| 47 | + <el-button type="primary" @click="editSupplier">{{ $t('supplierManage.confirm') }}</el-button> | |
| 48 | + </div> | |
| 49 | + </el-dialog> | |
| 50 | +</template> | |
| 51 | + | |
| 52 | +<script> | |
| 53 | +import { updateSupplier, listSupplierType } from '@/api/scm/supplierManageApi' | |
| 54 | +import { getDict } from '@/api/community/communityApi' | |
| 55 | + | |
| 56 | +export default { | |
| 57 | + name: 'EditSupplier', | |
| 58 | + props: { | |
| 59 | + dictData: { | |
| 60 | + type: Array, | |
| 61 | + default: () => [] | |
| 62 | + } | |
| 63 | + }, | |
| 64 | + data() { | |
| 65 | + return { | |
| 66 | + visible: false, | |
| 67 | + form: { | |
| 68 | + supplierId: '', | |
| 69 | + stId: '', | |
| 70 | + supplierName: '', | |
| 71 | + beanName: '', | |
| 72 | + personName: '', | |
| 73 | + personTel: '', | |
| 74 | + startTime: '', | |
| 75 | + endTime: '', | |
| 76 | + remark: '' | |
| 77 | + }, | |
| 78 | + supplierTypes: [], | |
| 79 | + beanNames: [], | |
| 80 | + rules: { | |
| 81 | + stId: [ | |
| 82 | + { required: true, message: this.$t('supplierManage.supplierType') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 83 | + ], | |
| 84 | + supplierName: [ | |
| 85 | + { required: true, message: this.$t('supplierManage.supplierName') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 86 | + ], | |
| 87 | + beanName: [ | |
| 88 | + { required: true, message: this.$t('supplierManage.template') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 89 | + ], | |
| 90 | + personName: [ | |
| 91 | + { required: true, message: this.$t('supplierManage.contactPerson') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 92 | + ], | |
| 93 | + personTel: [ | |
| 94 | + { required: true, message: this.$t('supplierManage.contactTel') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 95 | + ], | |
| 96 | + startTime: [ | |
| 97 | + { required: true, message: this.$t('supplierManage.startTime') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 98 | + ], | |
| 99 | + endTime: [ | |
| 100 | + { required: true, message: this.$t('supplierManage.endTime') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 101 | + ], | |
| 102 | + remark: [ | |
| 103 | + { required: true, message: this.$t('supplierManage.remark') + this.$t('supplierManage.requiredField'), trigger: 'blur' } | |
| 104 | + ] | |
| 105 | + } | |
| 106 | + } | |
| 107 | + }, | |
| 108 | + mounted() { | |
| 109 | + this.listSupplierTypes() | |
| 110 | + }, | |
| 111 | + methods: { | |
| 112 | + async open(row) { | |
| 113 | + this.form = { ...row } | |
| 114 | + this.visible = true | |
| 115 | + const data = await getDict('supplier','bean_name') | |
| 116 | + this.beanNames = data | |
| 117 | + }, | |
| 118 | + | |
| 119 | + async listSupplierTypes() { | |
| 120 | + try { | |
| 121 | + const res = await listSupplierType({ page: 1, row: 100 }) | |
| 122 | + this.supplierTypes = res.data | |
| 123 | + } catch (error) { | |
| 124 | + console.error('查询供应商类型失败:', error) | |
| 125 | + } | |
| 126 | + }, | |
| 127 | + | |
| 128 | + async editSupplier() { | |
| 129 | + this.$refs.form.validate(async valid => { | |
| 130 | + if (valid) { | |
| 131 | + try { | |
| 132 | + const res = await updateSupplier(this.form) | |
| 133 | + if (res.code === 0) { | |
| 134 | + this.$message.success(this.$t('common.updateSuccess')) | |
| 135 | + this.visible = false | |
| 136 | + this.$emit('success') | |
| 137 | + } else { | |
| 138 | + this.$message.error(res.msg || this.$t('common.updateFailed')) | |
| 139 | + } | |
| 140 | + } catch (error) { | |
| 141 | + console.error('更新供应商失败:', error) | |
| 142 | + this.$message.error(this.$t('common.updateFailed')) | |
| 143 | + } | |
| 144 | + } | |
| 145 | + }) | |
| 146 | + }, | |
| 147 | + | |
| 148 | + resetForm() { | |
| 149 | + this.$refs.form.resetFields() | |
| 150 | + } | |
| 151 | + } | |
| 152 | +} | |
| 153 | +</script> | |
| 154 | + | |
| 155 | +<style scoped> | |
| 156 | +.w-100 { | |
| 157 | + width: 100%; | |
| 158 | +} | |
| 159 | +</style> | |
| 0 | 160 | \ No newline at end of file | ... | ... |
src/components/scm/EditSupplierType.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <el-dialog | |
| 3 | + :title="$t('supplierTypeManage.edit.title')" | |
| 4 | + :visible.sync="visible" | |
| 5 | + width="50%" | |
| 6 | + @close="handleClose" | |
| 7 | + > | |
| 8 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | |
| 9 | + <el-form-item :label="$t('supplierTypeManage.form.typeCd')" prop="typeCd"> | |
| 10 | + <el-input v-model="form.typeCd" :placeholder="$t('supplierTypeManage.placeholder.typeCd')" /> | |
| 11 | + </el-form-item> | |
| 12 | + <el-form-item :label="$t('supplierTypeManage.form.typeName')" prop="typeName"> | |
| 13 | + <el-input v-model="form.typeName" :placeholder="$t('supplierTypeManage.placeholder.typeName')" /> | |
| 14 | + </el-form-item> | |
| 15 | + <el-form-item :label="$t('supplierTypeManage.form.remark')" prop="remark"> | |
| 16 | + <el-input v-model="form.remark" type="textarea" :placeholder="$t('supplierTypeManage.placeholder.remark')" /> | |
| 17 | + </el-form-item> | |
| 18 | + </el-form> | |
| 19 | + | |
| 20 | + <div slot="footer" class="dialog-footer"> | |
| 21 | + <el-button @click="visible = false">{{ $t('common.cancel') }}</el-button> | |
| 22 | + <el-button type="primary" @click="handleSubmit">{{ $t('common.confirm') }}</el-button> | |
| 23 | + </div> | |
| 24 | + </el-dialog> | |
| 25 | +</template> | |
| 26 | + | |
| 27 | +<script> | |
| 28 | +import { updateSupplierType } from '@/api/scm/supplierTypeManageApi' | |
| 29 | + | |
| 30 | +export default { | |
| 31 | + name: 'EditSupplierType', | |
| 32 | + data() { | |
| 33 | + return { | |
| 34 | + visible: false, | |
| 35 | + form: { | |
| 36 | + stId: '', | |
| 37 | + typeCd: '', | |
| 38 | + typeName: '', | |
| 39 | + remark: '' | |
| 40 | + }, | |
| 41 | + rules: { | |
| 42 | + typeCd: [ | |
| 43 | + { required: true, message: this.$t('supplierTypeManage.validate.typeCdRequired'), trigger: 'blur' }, | |
| 44 | + { max: 32, message: this.$t('supplierTypeManage.validate.typeCdMaxLength'), trigger: 'blur' } | |
| 45 | + ], | |
| 46 | + typeName: [ | |
| 47 | + { required: true, message: this.$t('supplierTypeManage.validate.typeNameRequired'), trigger: 'blur' }, | |
| 48 | + { max: 255, message: this.$t('supplierTypeManage.validate.typeNameMaxLength'), trigger: 'blur' } | |
| 49 | + ], | |
| 50 | + remark: [ | |
| 51 | + { required: true, message: this.$t('supplierTypeManage.validate.remarkRequired'), trigger: 'blur' }, | |
| 52 | + { max: 512, message: this.$t('supplierTypeManage.validate.remarkMaxLength'), trigger: 'blur' } | |
| 53 | + ], | |
| 54 | + stId: [ | |
| 55 | + { required: true, message: this.$t('supplierTypeManage.validate.stIdRequired'), trigger: 'blur' } | |
| 56 | + ] | |
| 57 | + } | |
| 58 | + } | |
| 59 | + }, | |
| 60 | + methods: { | |
| 61 | + open(row) { | |
| 62 | + this.form = { ...row } | |
| 63 | + this.visible = true | |
| 64 | + }, | |
| 65 | + handleClose() { | |
| 66 | + this.$refs.form.resetFields() | |
| 67 | + }, | |
| 68 | + handleSubmit() { | |
| 69 | + this.$refs.form.validate(async valid => { | |
| 70 | + if (valid) { | |
| 71 | + try { | |
| 72 | + await updateSupplierType(this.form) | |
| 73 | + this.$message.success(this.$t('supplierTypeManage.message.editSuccess')) | |
| 74 | + this.visible = false | |
| 75 | + this.$emit('success') | |
| 76 | + } catch (error) { | |
| 77 | + this.$message.error(error.message) | |
| 78 | + } | |
| 79 | + } | |
| 80 | + }) | |
| 81 | + } | |
| 82 | + } | |
| 83 | +} | |
| 84 | +</script> | |
| 0 | 85 | \ No newline at end of file | ... | ... |
src/i18n/index.js
| ... | ... | @@ -108,6 +108,8 @@ import { messages as storeInfoManageMessages } from '../views/mall/storeInfoMana |
| 108 | 108 | import { messages as junkRequirementManageMessages } from '../views/mall/junkRequirementManageLang' |
| 109 | 109 | import { messages as couponPoolManageMessages } from '../views/account/couponPoolManageLang' |
| 110 | 110 | import { messages as couponDetailManageMessages } from '../views/account/couponDetailManageLang' |
| 111 | +import { messages as supplierTypeManageMessages } from '../views/scm/supplierTypeManageLang' | |
| 112 | +import { messages as supplierManageMessages } from '../views/scm/supplierManageLang' | |
| 111 | 113 | |
| 112 | 114 | Vue.use(VueI18n) |
| 113 | 115 | |
| ... | ... | @@ -220,6 +222,8 @@ const messages = { |
| 220 | 222 | ...junkRequirementManageMessages.en, |
| 221 | 223 | ...couponPoolManageMessages.en, |
| 222 | 224 | ...couponDetailManageMessages.en, |
| 225 | + ...supplierTypeManageMessages.en, | |
| 226 | + ...supplierManageMessages.en, | |
| 223 | 227 | }, |
| 224 | 228 | zh: { |
| 225 | 229 | ...loginMessages.zh, |
| ... | ... | @@ -328,6 +332,8 @@ const messages = { |
| 328 | 332 | ...junkRequirementManageMessages.zh, |
| 329 | 333 | ...couponPoolManageMessages.zh, |
| 330 | 334 | ...couponDetailManageMessages.zh, |
| 335 | + ...supplierTypeManageMessages.zh, | |
| 336 | + ...supplierManageMessages.zh, | |
| 331 | 337 | } |
| 332 | 338 | } |
| 333 | 339 | ... | ... |
src/router/index.js
| ... | ... | @@ -522,9 +522,19 @@ const routes = [ |
| 522 | 522 | component: () => import('@/views/account/couponPoolManageList.vue') |
| 523 | 523 | }, |
| 524 | 524 | { |
| 525 | - path:'/pages/admin/couponDetailManage', | |
| 526 | - name:'/pages/admin/couponDetailManage', | |
| 525 | + path: '/pages/admin/couponDetailManage', | |
| 526 | + name: '/pages/admin/couponDetailManage', | |
| 527 | 527 | component: () => import('@/views/account/couponDetailManageList.vue') |
| 528 | + }, | |
| 529 | + { | |
| 530 | + path: '/pages/scm/supplierTypeManage', | |
| 531 | + name: '/pages/scm/supplierTypeManage', | |
| 532 | + component: () => import('@/views/scm/supplierTypeManageList.vue') | |
| 533 | + }, | |
| 534 | + { | |
| 535 | + path:'/pages/scm/supplierManage', | |
| 536 | + name:'/pages/scm/supplierManage', | |
| 537 | + component: () => import('@/views/scm/supplierManageList.vue') | |
| 528 | 538 | }, |
| 529 | 539 | // 其他子路由可以在这里添加 |
| 530 | 540 | ] | ... | ... |
src/views/mall/junkRequirementManageLang.js
| ... | ... | @@ -49,18 +49,6 @@ export const messages = { |
| 49 | 49 | }, |
| 50 | 50 | fetchError: 'Failed to fetch junk requirements' |
| 51 | 51 | }, |
| 52 | - common: { | |
| 53 | - search: 'Search', | |
| 54 | - hide: 'Hide', | |
| 55 | - more: 'More', | |
| 56 | - review: 'Review', | |
| 57 | - cancel: 'Cancel', | |
| 58 | - confirm: 'Confirm', | |
| 59 | - delete: 'Delete', | |
| 60 | - operation: 'Operation', | |
| 61 | - success: 'Success', | |
| 62 | - error: 'Error' | |
| 63 | - } | |
| 64 | 52 | }, |
| 65 | 53 | zh: { |
| 66 | 54 | junkRequirement: { |
| ... | ... | @@ -112,17 +100,5 @@ export const messages = { |
| 112 | 100 | }, |
| 113 | 101 | fetchError: '获取旧货需求失败' |
| 114 | 102 | }, |
| 115 | - common: { | |
| 116 | - search: '查询', | |
| 117 | - hide: '隐藏', | |
| 118 | - more: '更多', | |
| 119 | - review: '审核', | |
| 120 | - cancel: '取消', | |
| 121 | - confirm: '确认', | |
| 122 | - delete: '删除', | |
| 123 | - operation: '操作', | |
| 124 | - success: '成功', | |
| 125 | - error: '错误' | |
| 126 | - } | |
| 127 | 103 | } |
| 128 | 104 | } |
| 129 | 105 | \ No newline at end of file | ... | ... |
src/views/mall/storeInfoManageLang.js
| ... | ... | @@ -22,23 +22,6 @@ export const messages = { |
| 22 | 22 | workTime: 'Work Time', |
| 23 | 23 | remark: 'Remark' |
| 24 | 24 | }, |
| 25 | - common: { | |
| 26 | - search: 'Search', | |
| 27 | - add: 'Add', | |
| 28 | - edit: 'Edit', | |
| 29 | - delete: 'Delete', | |
| 30 | - yes: 'Yes', | |
| 31 | - no: 'No', | |
| 32 | - operation: 'Operation', | |
| 33 | - cancel: 'Cancel', | |
| 34 | - save: 'Save', | |
| 35 | - confirm: 'Confirm', | |
| 36 | - saveSuccess: 'Save successfully', | |
| 37 | - updateSuccess: 'Update successfully', | |
| 38 | - deleteSuccess: 'Delete successfully', | |
| 39 | - required: 'Required', | |
| 40 | - optional: 'Optional' | |
| 41 | - }, | |
| 42 | 25 | delete: { |
| 43 | 26 | confirmDelete: 'Are you sure to delete store info' |
| 44 | 27 | }, |
| ... | ... | @@ -93,23 +76,6 @@ export const messages = { |
| 93 | 76 | workTime: '工作时间', |
| 94 | 77 | remark: '备注' |
| 95 | 78 | }, |
| 96 | - common: { | |
| 97 | - search: '查询', | |
| 98 | - add: '添加', | |
| 99 | - edit: '修改', | |
| 100 | - delete: '删除', | |
| 101 | - yes: '是', | |
| 102 | - no: '否', | |
| 103 | - operation: '操作', | |
| 104 | - cancel: '取消', | |
| 105 | - save: '保存', | |
| 106 | - confirm: '确认', | |
| 107 | - saveSuccess: '保存成功', | |
| 108 | - updateSuccess: '更新成功', | |
| 109 | - deleteSuccess: '删除成功', | |
| 110 | - required: '必填', | |
| 111 | - optional: '选填' | |
| 112 | - }, | |
| 113 | 79 | delete: { |
| 114 | 80 | confirmDelete: '确定删除商户信息' |
| 115 | 81 | }, | ... | ... |
src/views/scm/supplierManageLang.js
0 → 100644
| 1 | +export const messages = { | |
| 2 | + en: { | |
| 3 | + supplierManage: { | |
| 4 | + searchCondition: 'Search Condition', | |
| 5 | + moreCondition: 'More', | |
| 6 | + hide: 'Hide', | |
| 7 | + supplierInfo: 'Supplier Information', | |
| 8 | + add: 'Add', | |
| 9 | + supplierType: 'Supplier Type', | |
| 10 | + supplierName: 'Supplier Name', | |
| 11 | + contactPerson: 'Contact Person', | |
| 12 | + contactTel: 'Contact Number', | |
| 13 | + startTime: 'Start Time', | |
| 14 | + endTime: 'End Time', | |
| 15 | + createTime: 'Create Time', | |
| 16 | + remark: 'Remark', | |
| 17 | + operation: 'Operation', | |
| 18 | + edit: 'Edit', | |
| 19 | + config: 'Configure', | |
| 20 | + delete: 'Delete', | |
| 21 | + query: 'Search', | |
| 22 | + confirmDelete: 'Confirm Delete', | |
| 23 | + deleteTip: 'Are you sure to delete this supplier?', | |
| 24 | + cancel: 'Cancel', | |
| 25 | + confirm: 'Confirm', | |
| 26 | + pleaseSelect: 'Please select', | |
| 27 | + requiredField: 'Required field', | |
| 28 | + template:'Template' | |
| 29 | + } | |
| 30 | + }, | |
| 31 | + zh: { | |
| 32 | + supplierManage: { | |
| 33 | + searchCondition: '查询条件', | |
| 34 | + moreCondition: '更多', | |
| 35 | + hide: '隐藏', | |
| 36 | + supplierInfo: '供应商信息', | |
| 37 | + add: '添加', | |
| 38 | + supplierType: '供应商类型', | |
| 39 | + supplierName: '供应商名称', | |
| 40 | + contactPerson: '联系人', | |
| 41 | + contactTel: '联系电话', | |
| 42 | + startTime: '开始时间', | |
| 43 | + endTime: '结束时间', | |
| 44 | + createTime: '创建时间', | |
| 45 | + remark: '备注', | |
| 46 | + operation: '操作', | |
| 47 | + edit: '修改', | |
| 48 | + config: '配置', | |
| 49 | + delete: '删除', | |
| 50 | + query: '查询', | |
| 51 | + confirmDelete: '确认删除', | |
| 52 | + deleteTip: '确定删除供应商吗?', | |
| 53 | + cancel: '取消', | |
| 54 | + confirm: '确认', | |
| 55 | + pleaseSelect: '请选择', | |
| 56 | + requiredField: '必填项', | |
| 57 | + template:'模版' | |
| 58 | + } | |
| 59 | + } | |
| 60 | +} | |
| 0 | 61 | \ No newline at end of file | ... | ... |
src/views/scm/supplierManageList.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="supplier-manage-container"> | |
| 3 | + <el-card class="search-card"> | |
| 4 | + <div slot="header" class="clearfix flex justify-between"> | |
| 5 | + <span>{{ $t('supplierManage.searchCondition') }}</span> | |
| 6 | + <el-button type="text" style="float: right; padding: 3px 0" @click="toggleMoreCondition"> | |
| 7 | + {{ moreCondition ? $t('supplierManage.hide') : $t('supplierManage.moreCondition') }} | |
| 8 | + </el-button> | |
| 9 | + </div> | |
| 10 | + <el-row :gutter="20"> | |
| 11 | + <el-col :span="6"> | |
| 12 | + <el-select v-model="conditions.stId" | |
| 13 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.supplierType')" clearable class="w-100"> | |
| 14 | + <el-option v-for="item in supplierTypes" :key="item.stId" :label="item.typeName" :value="item.stId" /> | |
| 15 | + </el-select> | |
| 16 | + </el-col> | |
| 17 | + <el-col :span="6"> | |
| 18 | + <el-input v-model="conditions.supplierName" | |
| 19 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.supplierName')" /> | |
| 20 | + </el-col> | |
| 21 | + <el-col :span="6"> | |
| 22 | + <el-input v-model="conditions.personName" | |
| 23 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.contactPerson')" /> | |
| 24 | + </el-col> | |
| 25 | + <el-col :span="6"> | |
| 26 | + <el-button type="primary" @click="querySupplierMethod">{{ $t('supplierManage.query') }}</el-button> | |
| 27 | + </el-col> | |
| 28 | + </el-row> | |
| 29 | + | |
| 30 | + <el-row v-if="moreCondition" :gutter="20" class="mt-10"> | |
| 31 | + <el-col :span="6"> | |
| 32 | + <el-input v-model="conditions.personTel" | |
| 33 | + :placeholder="$t('supplierManage.pleaseSelect') + $t('supplierManage.contactTel')" /> | |
| 34 | + </el-col> | |
| 35 | + </el-row> | |
| 36 | + </el-card> | |
| 37 | + | |
| 38 | + <el-card class="mt-20"> | |
| 39 | + <div slot="header" class="clearfix flex justify-between"> | |
| 40 | + <span>{{ $t('supplierManage.supplierInfo') }}</span> | |
| 41 | + <el-button type="primary" size="small" style="float: right;" @click="openAddSupplierModal"> | |
| 42 | + <i class="el-icon-plus"></i> | |
| 43 | + {{ $t('supplierManage.add') }} | |
| 44 | + </el-button> | |
| 45 | + </div> | |
| 46 | + | |
| 47 | + <el-table v-loading="loading" :data="suppliers" border style="width: 100%"> | |
| 48 | + <el-table-column prop="typeName" :label="$t('supplierManage.supplierType')" align="center" /> | |
| 49 | + <el-table-column prop="supplierName" :label="$t('supplierManage.supplierName')" align="center" /> | |
| 50 | + <el-table-column prop="personName" :label="$t('supplierManage.contactPerson')" align="center" /> | |
| 51 | + <el-table-column prop="personTel" :label="$t('supplierManage.contactTel')" align="center" /> | |
| 52 | + <el-table-column prop="startTime" :label="$t('supplierManage.startTime')" align="center" /> | |
| 53 | + <el-table-column prop="endTime" :label="$t('supplierManage.endTime')" align="center" /> | |
| 54 | + <el-table-column prop="createTime" :label="$t('supplierManage.createTime')" align="center" /> | |
| 55 | + <el-table-column prop="remark" :label="$t('supplierManage.remark')" align="center" /> | |
| 56 | + <el-table-column :label="$t('supplierManage.operation')" align="center" width="220"> | |
| 57 | + <template slot-scope="scope"> | |
| 58 | + <el-button size="mini" @click="openEditSupplierModel(scope.row)">{{ $t('supplierManage.edit') }}</el-button> | |
| 59 | + <el-button size="mini" type="primary" @click="openConfigSupplierModel(scope.row)">{{ | |
| 60 | + $t('supplierManage.config') }}</el-button> | |
| 61 | + <el-button size="mini" type="danger" @click="openDeleteSupplierModel(scope.row)">{{ | |
| 62 | + $t('supplierManage.delete') }}</el-button> | |
| 63 | + </template> | |
| 64 | + </el-table-column> | |
| 65 | + </el-table> | |
| 66 | + | |
| 67 | + <el-pagination class="mt-20" :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size" | |
| 68 | + layout="total, sizes, prev, pager, next, jumper" :total="page.total" @size-change="handleSizeChange" | |
| 69 | + @current-change="handleCurrentChange" /> | |
| 70 | + </el-card> | |
| 71 | + | |
| 72 | + <add-supplier ref="addSupplier" @success="listSuppliers" /> | |
| 73 | + <edit-supplier ref="editSupplier" @success="listSuppliers" /> | |
| 74 | + <delete-supplier ref="deleteSupplier" @success="listSuppliers" /> | |
| 75 | + <config-supplier ref="configSupplier" /> | |
| 76 | + </div> | |
| 77 | +</template> | |
| 78 | + | |
| 79 | +<script> | |
| 80 | +import { listSupplier, listSupplierType } from '@/api/scm/supplierManageApi' | |
| 81 | +import AddSupplier from '@/components/scm/AddSupplier' | |
| 82 | +import EditSupplier from '@/components/scm/EditSupplier' | |
| 83 | +import DeleteSupplier from '@/components/scm/DeleteSupplier' | |
| 84 | +import ConfigSupplier from '@/components/scm/ConfigSupplier' | |
| 85 | + | |
| 86 | +export default { | |
| 87 | + name: 'SupplierManageList', | |
| 88 | + components: { | |
| 89 | + AddSupplier, | |
| 90 | + EditSupplier, | |
| 91 | + DeleteSupplier, | |
| 92 | + ConfigSupplier | |
| 93 | + }, | |
| 94 | + data() { | |
| 95 | + return { | |
| 96 | + loading: false, | |
| 97 | + moreCondition: false, | |
| 98 | + conditions: { | |
| 99 | + stId: '', | |
| 100 | + supplierName: '', | |
| 101 | + personName: '', | |
| 102 | + personTel: '' | |
| 103 | + }, | |
| 104 | + suppliers: [], | |
| 105 | + supplierTypes: [], | |
| 106 | + page: { | |
| 107 | + current: 1, | |
| 108 | + size: 10, | |
| 109 | + total: 0 | |
| 110 | + } | |
| 111 | + } | |
| 112 | + }, | |
| 113 | + created() { | |
| 114 | + this.listSuppliers() | |
| 115 | + this.listSupplierTypes() | |
| 116 | + }, | |
| 117 | + methods: { | |
| 118 | + async listSuppliers() { | |
| 119 | + try { | |
| 120 | + this.loading = true | |
| 121 | + const params = { | |
| 122 | + page: this.page.current, | |
| 123 | + row: this.page.size, | |
| 124 | + ...this.conditions | |
| 125 | + } | |
| 126 | + const res = await listSupplier(params) | |
| 127 | + this.suppliers = res.data | |
| 128 | + this.page.total = res.records | |
| 129 | + } catch (error) { | |
| 130 | + console.error('查询供应商列表失败:', error) | |
| 131 | + } finally { | |
| 132 | + this.loading = false | |
| 133 | + } | |
| 134 | + }, | |
| 135 | + | |
| 136 | + async listSupplierTypes() { | |
| 137 | + try { | |
| 138 | + const res = await listSupplierType({ page: 1, row: 100 }) | |
| 139 | + this.supplierTypes = res.data | |
| 140 | + } catch (error) { | |
| 141 | + console.error('查询供应商类型失败:', error) | |
| 142 | + } | |
| 143 | + }, | |
| 144 | + | |
| 145 | + querySupplierMethod() { | |
| 146 | + this.page.current = 1 | |
| 147 | + this.listSuppliers() | |
| 148 | + }, | |
| 149 | + | |
| 150 | + toggleMoreCondition() { | |
| 151 | + this.moreCondition = !this.moreCondition | |
| 152 | + }, | |
| 153 | + | |
| 154 | + openAddSupplierModal() { | |
| 155 | + this.$refs.addSupplier.open() | |
| 156 | + }, | |
| 157 | + | |
| 158 | + openEditSupplierModel(row) { | |
| 159 | + this.$refs.editSupplier.open(row) | |
| 160 | + }, | |
| 161 | + | |
| 162 | + openConfigSupplierModel(row) { | |
| 163 | + this.$refs.configSupplier.open(row) | |
| 164 | + }, | |
| 165 | + | |
| 166 | + openDeleteSupplierModel(row) { | |
| 167 | + this.$refs.deleteSupplier.open(row) | |
| 168 | + }, | |
| 169 | + | |
| 170 | + handleSizeChange(size) { | |
| 171 | + this.page.size = size | |
| 172 | + this.listSuppliers() | |
| 173 | + }, | |
| 174 | + | |
| 175 | + handleCurrentChange(current) { | |
| 176 | + this.page.current = current | |
| 177 | + this.listSuppliers() | |
| 178 | + } | |
| 179 | + } | |
| 180 | +} | |
| 181 | +</script> | |
| 182 | + | |
| 183 | +<style lang="scss" scoped> | |
| 184 | +.supplier-manage-container { | |
| 185 | + padding: 20px; | |
| 186 | + | |
| 187 | + .search-card { | |
| 188 | + margin-bottom: 20px; | |
| 189 | + } | |
| 190 | + | |
| 191 | + .mt-10 { | |
| 192 | + margin-top: 10px; | |
| 193 | + } | |
| 194 | + | |
| 195 | + .mt-20 { | |
| 196 | + margin-top: 20px; | |
| 197 | + } | |
| 198 | + | |
| 199 | + .w-100 { | |
| 200 | + width: 100%; | |
| 201 | + } | |
| 202 | +} | |
| 203 | +</style> | |
| 0 | 204 | \ No newline at end of file | ... | ... |
src/views/scm/supplierTypeManageLang.js
0 → 100644
| 1 | +export const messages = { | |
| 2 | + en: { | |
| 3 | + supplierTypeManage: { | |
| 4 | + search: { | |
| 5 | + title: 'Search Conditions', | |
| 6 | + typeCd: 'Please enter type code', | |
| 7 | + typeName: 'Please enter type name' | |
| 8 | + }, | |
| 9 | + list: { | |
| 10 | + title: 'Supplier Type List' | |
| 11 | + }, | |
| 12 | + table: { | |
| 13 | + typeCd: 'Type Code', | |
| 14 | + typeName: 'Type Name', | |
| 15 | + createTime: 'Create Time', | |
| 16 | + remark: 'Remark' | |
| 17 | + }, | |
| 18 | + form: { | |
| 19 | + typeCd: 'Type Code', | |
| 20 | + typeName: 'Type Name', | |
| 21 | + remark: 'Remark' | |
| 22 | + }, | |
| 23 | + placeholder: { | |
| 24 | + typeCd: 'Please enter type code', | |
| 25 | + typeName: 'Please enter type name', | |
| 26 | + remark: 'Please enter remark' | |
| 27 | + }, | |
| 28 | + validate: { | |
| 29 | + typeCdRequired: 'Type code is required', | |
| 30 | + typeCdMaxLength: 'Type code cannot exceed 32 characters', | |
| 31 | + typeNameRequired: 'Type name is required', | |
| 32 | + typeNameMaxLength: 'Type name cannot exceed 255 characters', | |
| 33 | + remarkRequired: 'Remark is required', | |
| 34 | + remarkMaxLength: 'Remark cannot exceed 512 characters', | |
| 35 | + stIdRequired: 'ID is required' | |
| 36 | + }, | |
| 37 | + message: { | |
| 38 | + addSuccess: 'Add success', | |
| 39 | + editSuccess: 'Edit success', | |
| 40 | + deleteSuccess: 'Delete success', | |
| 41 | + fetchError: 'Failed to fetch data' | |
| 42 | + }, | |
| 43 | + add: { | |
| 44 | + title: 'Add Supplier Type' | |
| 45 | + }, | |
| 46 | + edit: { | |
| 47 | + title: 'Edit Supplier Type' | |
| 48 | + }, | |
| 49 | + delete: { | |
| 50 | + title: 'Delete Confirmation', | |
| 51 | + confirm: 'Are you sure to delete this supplier type?' | |
| 52 | + } | |
| 53 | + } | |
| 54 | + }, | |
| 55 | + zh: { | |
| 56 | + supplierTypeManage: { | |
| 57 | + search: { | |
| 58 | + title: '查询条件', | |
| 59 | + typeCd: '请输入类型编码', | |
| 60 | + typeName: '请输入类型名称' | |
| 61 | + }, | |
| 62 | + list: { | |
| 63 | + title: '供应商类型' | |
| 64 | + }, | |
| 65 | + table: { | |
| 66 | + typeCd: '类型编码', | |
| 67 | + typeName: '类型名称', | |
| 68 | + createTime: '创建时间', | |
| 69 | + remark: '备注' | |
| 70 | + }, | |
| 71 | + form: { | |
| 72 | + typeCd: '类型编码', | |
| 73 | + typeName: '类型名称', | |
| 74 | + remark: '备注' | |
| 75 | + }, | |
| 76 | + placeholder: { | |
| 77 | + typeCd: '请输入类型编码', | |
| 78 | + typeName: '请输入类型名称', | |
| 79 | + remark: '请输入备注' | |
| 80 | + }, | |
| 81 | + validate: { | |
| 82 | + typeCdRequired: '类型编码不能为空', | |
| 83 | + typeCdMaxLength: '类型编码不能超过32个字符', | |
| 84 | + typeNameRequired: '类型名称不能为空', | |
| 85 | + typeNameMaxLength: '类型名称不能超过255个字符', | |
| 86 | + remarkRequired: '备注不能为空', | |
| 87 | + remarkMaxLength: '备注不能超过512个字符', | |
| 88 | + stIdRequired: '编号不能为空' | |
| 89 | + }, | |
| 90 | + message: { | |
| 91 | + addSuccess: '添加成功', | |
| 92 | + editSuccess: '修改成功', | |
| 93 | + deleteSuccess: '删除成功', | |
| 94 | + fetchError: '获取数据失败' | |
| 95 | + }, | |
| 96 | + add: { | |
| 97 | + title: '添加供应商类型' | |
| 98 | + }, | |
| 99 | + edit: { | |
| 100 | + title: '修改供应商类型' | |
| 101 | + }, | |
| 102 | + delete: { | |
| 103 | + title: '删除确认', | |
| 104 | + confirm: '确定删除该供应商类型吗?' | |
| 105 | + } | |
| 106 | + } | |
| 107 | + } | |
| 108 | +} | |
| 0 | 109 | \ No newline at end of file | ... | ... |
src/views/scm/supplierTypeManageList.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="supplier-type-container"> | |
| 3 | + <!-- 查询条件 --> | |
| 4 | + <el-card class="search-wrapper"> | |
| 5 | + <div slot="header" class="clearfix text-left"> | |
| 6 | + <span>{{ $t('supplierTypeManage.search.title') }}</span> | |
| 7 | + </div> | |
| 8 | + <el-row :gutter="20"> | |
| 9 | + <el-col :span="6"> | |
| 10 | + <el-input v-model="searchForm.typeCd" :placeholder="$t('supplierTypeManage.search.typeCd')" clearable /> | |
| 11 | + </el-col> | |
| 12 | + <el-col :span="6"> | |
| 13 | + <el-input v-model="searchForm.typeName" :placeholder="$t('supplierTypeManage.search.typeName')" clearable /> | |
| 14 | + </el-col> | |
| 15 | + <el-col :span="4"> | |
| 16 | + <el-button type="primary" @click="handleSearch">{{ $t('common.search') }}</el-button> | |
| 17 | + </el-col> | |
| 18 | + </el-row> | |
| 19 | + </el-card> | |
| 20 | + | |
| 21 | + <!-- 供应商类型列表 --> | |
| 22 | + <el-card class="list-wrapper"> | |
| 23 | + <div slot="header" class="clearfix flex justify-between"> | |
| 24 | + <span>{{ $t('supplierTypeManage.list.title') }}</span> | |
| 25 | + <el-button type="primary" style="float: right" @click="handleAdd">{{ $t('common.add') }}</el-button> | |
| 26 | + </div> | |
| 27 | + | |
| 28 | + <el-table v-loading="loading" :data="tableData" border style="width: 100%"> | |
| 29 | + <el-table-column prop="typeCd" :label="$t('supplierTypeManage.table.typeCd')" align="center" /> | |
| 30 | + <el-table-column prop="typeName" :label="$t('supplierTypeManage.table.typeName')" align="center" /> | |
| 31 | + <el-table-column prop="createTime" :label="$t('supplierTypeManage.table.createTime')" align="center" /> | |
| 32 | + <el-table-column prop="remark" :label="$t('supplierTypeManage.table.remark')" align="center" /> | |
| 33 | + <el-table-column :label="$t('common.operation')" align="center" width="200"> | |
| 34 | + <template slot-scope="scope"> | |
| 35 | + <el-button size="mini" type="primary" @click="handleEdit(scope.row)">{{ $t('common.edit') }}</el-button> | |
| 36 | + <el-button size="mini" type="danger" @click="handleDelete(scope.row)">{{ $t('common.delete') }}</el-button> | |
| 37 | + </template> | |
| 38 | + </el-table-column> | |
| 39 | + </el-table> | |
| 40 | + | |
| 41 | + <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size" | |
| 42 | + :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" | |
| 43 | + @current-change="handleCurrentChange" /> | |
| 44 | + </el-card> | |
| 45 | + | |
| 46 | + <!-- 子组件 --> | |
| 47 | + <add-supplier-type ref="addSupplierType" @success="handleSuccess" /> | |
| 48 | + <edit-supplier-type ref="editSupplierType" @success="handleSuccess" /> | |
| 49 | + <delete-supplier-type ref="deleteSupplierType" @success="handleSuccess" /> | |
| 50 | + </div> | |
| 51 | +</template> | |
| 52 | + | |
| 53 | +<script> | |
| 54 | +import { listSupplierType } from '@/api/scm/supplierTypeManageApi' | |
| 55 | +import AddSupplierType from '@/components/scm/AddSupplierType' | |
| 56 | +import EditSupplierType from '@/components/scm/EditSupplierType' | |
| 57 | +import DeleteSupplierType from '@/components/scm/DeleteSupplierType' | |
| 58 | + | |
| 59 | +export default { | |
| 60 | + name: 'SupplierTypeManageList', | |
| 61 | + components: { | |
| 62 | + AddSupplierType, | |
| 63 | + EditSupplierType, | |
| 64 | + DeleteSupplierType | |
| 65 | + }, | |
| 66 | + data() { | |
| 67 | + return { | |
| 68 | + loading: false, | |
| 69 | + searchForm: { | |
| 70 | + typeCd: '', | |
| 71 | + typeName: '' | |
| 72 | + }, | |
| 73 | + tableData: [], | |
| 74 | + page: { | |
| 75 | + current: 1, | |
| 76 | + size: 10, | |
| 77 | + total: 0 | |
| 78 | + } | |
| 79 | + } | |
| 80 | + }, | |
| 81 | + created() { | |
| 82 | + this.getList() | |
| 83 | + }, | |
| 84 | + methods: { | |
| 85 | + async getList() { | |
| 86 | + try { | |
| 87 | + this.loading = true | |
| 88 | + const params = { | |
| 89 | + page: this.page.current, | |
| 90 | + row: this.page.size, | |
| 91 | + ...this.searchForm | |
| 92 | + } | |
| 93 | + const { data, records } = await listSupplierType(params) | |
| 94 | + this.tableData = data | |
| 95 | + this.page.total = records | |
| 96 | + } catch (error) { | |
| 97 | + this.$message.error(this.$t('supplierTypeManage.fetchError')) | |
| 98 | + } finally { | |
| 99 | + this.loading = false | |
| 100 | + } | |
| 101 | + }, | |
| 102 | + handleSearch() { | |
| 103 | + this.page.current = 1 | |
| 104 | + this.getList() | |
| 105 | + }, | |
| 106 | + handleAdd() { | |
| 107 | + this.$refs.addSupplierType.open() | |
| 108 | + }, | |
| 109 | + handleEdit(row) { | |
| 110 | + this.$refs.editSupplierType.open(row) | |
| 111 | + }, | |
| 112 | + handleDelete(row) { | |
| 113 | + this.$refs.deleteSupplierType.open(row) | |
| 114 | + }, | |
| 115 | + handleSuccess() { | |
| 116 | + this.getList() | |
| 117 | + }, | |
| 118 | + handleSizeChange(val) { | |
| 119 | + this.page.size = val | |
| 120 | + this.getList() | |
| 121 | + }, | |
| 122 | + handleCurrentChange(val) { | |
| 123 | + this.page.current = val | |
| 124 | + this.getList() | |
| 125 | + } | |
| 126 | + } | |
| 127 | +} | |
| 128 | +</script> | |
| 129 | + | |
| 130 | +<style lang="scss" scoped> | |
| 131 | +.supplier-type-container { | |
| 132 | + padding: 20px; | |
| 133 | + | |
| 134 | + .search-wrapper { | |
| 135 | + margin-bottom: 20px; | |
| 136 | + | |
| 137 | + .el-row { | |
| 138 | + margin-bottom: 20px; | |
| 139 | + } | |
| 140 | + } | |
| 141 | + | |
| 142 | + .list-wrapper { | |
| 143 | + .el-pagination { | |
| 144 | + margin-top: 20px; | |
| 145 | + text-align: right; | |
| 146 | + } | |
| 147 | + } | |
| 148 | +} | |
| 149 | +</style> | |
| 0 | 150 | \ No newline at end of file | ... | ... |