From cfed1ec2b3688352b4f708e98c04a2085c746331 Mon Sep 17 00:00:00 2001 From: zhy <luhan1008611> Date: 星期一, 30 十月 2023 16:35:14 +0800 Subject: [PATCH] fix: 基础信息优化 --- admin-web/src/api/baseSetting/finsystenant.js | 24 +++++++++++ admin-web/src/views/foundation/material/edit.vue | 14 ++++++ admin-web/src/views/foundation/store/edit.vue | 16 +++++++- admin-web/src/views/foundation/classification/index.vue | 11 +++-- admin-web/src/views/foundation/classification/items.js | 2 admin-web/src/views/foundation/material/index.vue | 8 ++-- 6 files changed, 62 insertions(+), 13 deletions(-) diff --git a/admin-web/src/api/baseSetting/finsystenant.js b/admin-web/src/api/baseSetting/finsystenant.js index 03e5bbe..49c8961 100644 --- a/admin-web/src/api/baseSetting/finsystenant.js +++ b/admin-web/src/api/baseSetting/finsystenant.js @@ -7,7 +7,7 @@ * @Date 2023/7/13 20:11 */ export function getTree(parameter) { - return request.get(SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/tree_fin_tenant', {params: parameter}) + return request.get(SettingIplatform.apiBaseURL + '/pc/base/category/select/tree', {params: parameter}) } /** @@ -84,6 +84,14 @@ }) } +export function upcode(data) { + return request({ + url: '/pc/base/goods/template/updStatus', + method: 'post', + data: data + }) +} + export function delCode(data) { return request({ url: '/pc/base/goods/template/del', @@ -92,6 +100,20 @@ }) } +export function treeList() { + return request({ + url: '/pc/base/category/select/lv3_tree', + method: 'get', + }) +} + +export function classList() { + return request({ + url: '/pc/base/goods/template/select/classificationCode', + method: 'get', + }) +} + // 鏌ヨ閮ㄩ棬 export function getOegs(parameter) { return request.get(SettingIplatform.apiBaseURL + '/pc/fin/sys/org/select/down/list', {params: parameter}) diff --git a/admin-web/src/views/foundation/classification/index.vue b/admin-web/src/views/foundation/classification/index.vue index 3d942fa..785bf7a 100644 --- a/admin-web/src/views/foundation/classification/index.vue +++ b/admin-web/src/views/foundation/classification/index.vue @@ -189,12 +189,14 @@ // 宸︿晶鏍戝垵濮嬪寲 initTreeData() { finsystenant.getTree().then(res => { + console.log(res, 'restree'); + console.log(this.importSetting,'this.importSetting'); const content = res || [] - this.treeDataList.splice(0, this.treeDataList.length) + // this.treeDataList.splice(0, this.treeDataList.length) this.treeDataList = content - if (content.length > 0) { - this.importSetting.fileSettings.data = {pid: content[0].id} - } + // if (content.length > 0) { + // this.importSetting.fileSettings.data = {pid: content[0].id} + // } }) }, updState(row) { @@ -243,6 +245,7 @@ this.editSetting.show = true; }, nodeClick(param) { + console.log(param, 'param'); param = param || {} this.p = Object.assign({}, { id: param.id, diff --git a/admin-web/src/views/foundation/classification/items.js b/admin-web/src/views/foundation/classification/items.js index 37af1b4..6537de7 100644 --- a/admin-web/src/views/foundation/classification/items.js +++ b/admin-web/src/views/foundation/classification/items.js @@ -11,7 +11,7 @@ dataIndex: 'classification', label: '绫诲埆', placeholder: '璇烽�夋嫨', - defaultValue: '1', + defaultValue: '', options: [ { label: 'A', diff --git a/admin-web/src/views/foundation/material/edit.vue b/admin-web/src/views/foundation/material/edit.vue index 8f8733b..9b014dd 100644 --- a/admin-web/src/views/foundation/material/edit.vue +++ b/admin-web/src/views/foundation/material/edit.vue @@ -8,7 +8,9 @@ <el-input v-model="formData.goodsName" clearable maxlength="20" show-word-limit style="width: 100%"/> </el-form-item> <el-form-item label="鍒嗙被" prop="categoryId"> - <el-input v-model="formData.categoryId" clearable maxlength="20" show-word-limit style="width: 100%"/> + <el-select v-model="formData.categoryId" clearable placeholder="璇烽�夋嫨" style="width: 100%"> + <el-option v-for="item in categoryList" :key="item.id" :label="item.categoryName" :value="item.id"></el-option> + </el-select> </el-form-item> <el-form-item style="margin-left: -100px;" v-for="(m, i) in formData.models"> <el-form-item label="瑙勬牸鍨嬪彿" prop="modelName" style="float: left;"> @@ -50,6 +52,7 @@ }, data() { return { + categoryList:[], checkAll: false, checkedList: [], formData: { @@ -74,11 +77,20 @@ } }, created() { + this.tree_List() if(this.setting.info){ this.formData = Object.assign({},JSON.parse(this.setting.info)) } }, methods: { + tree_List (){ + finsystenant.treeList().then(res => { + if (res) { + console.log(res,'res'); + this.categoryList = res + } + }) + }, addCode(){ this.formData.models.push( { diff --git a/admin-web/src/views/foundation/material/index.vue b/admin-web/src/views/foundation/material/index.vue index e79fab4..12b56a6 100644 --- a/admin-web/src/views/foundation/material/index.vue +++ b/admin-web/src/views/foundation/material/index.vue @@ -258,13 +258,13 @@ }, updState(row) { let vm = this - let text = row.status == 0 ? "鍚敤" : "绂佺敤"; + let text = row.states == 0 ? "鍚敤" : "绂佺敤"; vm.$modal.confirm('纭瑕�' + text + '"' + row.goodsName + '"鍚楋紵').then(function () { let params = Object.assign({}, row) - params.status = row.status == 1 ? 0 : 1 - finsystenant.editcode(params).then(res => { + params.states = row.states == 1 ? 0 : 1 + finsystenant.upcode(params).then(res => { if (res) { - row.status = row.status === 1 ? 0 : 1 + row.states = row.states === 1 ? 0 : 1 vm.$modal.msgSuccess(text + "鎴愬姛"); vm.search() } diff --git a/admin-web/src/views/foundation/store/edit.vue b/admin-web/src/views/foundation/store/edit.vue index 600af3c..1445921 100644 --- a/admin-web/src/views/foundation/store/edit.vue +++ b/admin-web/src/views/foundation/store/edit.vue @@ -7,8 +7,10 @@ <el-form-item label="浠撳簱鍚嶇О" prop="warehouseName"> <el-input v-model="formData.warehouseName" clearable maxlength="20" show-word-limit style="width: 100%"/> </el-form-item> - <el-form-item label="浠撳簱绫诲瀷" prop="classificationId"> - <el-input v-model="formData.classificationId" clearable maxlength="20" show-word-limit style="width: 100%"/> + <el-form-item label="浠撳簱绫诲瀷" prop="classificationCode"> + <el-select v-model="formData.classificationCode" clearable placeholder="璇烽�夋嫨" style="width: 100%"> + <el-option v-for="item in classList" :key="item.dict_code" :label="item.dict_label" :value="item.dict_code"></el-option> + </el-select> </el-form-item> <el-form-item label="鍦板潃" > <el-input v-model="formData.adress" clearable maxlength="20" show-word-limit style="width: 100%"/> @@ -43,6 +45,7 @@ }, data() { return { + classList:[], checkAll: false, checkedList: [], formData: { @@ -62,11 +65,20 @@ } }, created() { + this.class_List() if(this.setting.info){ this.formData = Object.assign({},JSON.parse(this.setting.info)) } }, methods: { + class_List (){ + finsystenant.classList().then(res => { + if (res) { + console.log(res,'res'); + this.classList = res + } + }) + }, getEditInfo(id){ }, -- Gitblit v1.9.1