diff --git a/fuintAdmin/src/api/staff/user/fixinglevel.js b/fuintAdmin/src/api/staff/user/fixinglevel.js index 19c710bdc..16847943e 100644 --- a/fuintAdmin/src/api/staff/user/fixinglevel.js +++ b/fuintAdmin/src/api/staff/user/fixinglevel.js @@ -9,6 +9,14 @@ export function listFixingLevel(query) { }) } +// 根据id查询所有固定等级信息 +export function allFixingLevel() { + return request({ + url: '/business/userManager/fixingLevel/allFixingLevel', + method: 'get', + }) +} + // 查询固定等级详细 export function getFixingLevel(id) { return request({ diff --git a/fuintAdmin/src/views/convenienceStore/goodsFile.vue b/fuintAdmin/src/views/convenienceStore/goodsFile.vue index 66cb800a6..a3bd52308 100644 --- a/fuintAdmin/src/views/convenienceStore/goodsFile.vue +++ b/fuintAdmin/src/views/convenienceStore/goodsFile.vue @@ -268,16 +268,31 @@ - - - + + + + + + + + + + + + + @@ -316,7 +331,7 @@ import {cvsGoodsTree, selectTree} from "@/api/convenienceStore/goods"; -import {listSupplier} from "@/api/convenienceStore/supplier"; +import {addSupplier, listSupplier} from "@/api/convenienceStore/supplier"; import { addLJGoods, createGoodsNo, @@ -338,6 +353,8 @@ export default { dicts: ['zhzt','yes_or_no'], data(){ return { + // 供应商信息 + supplier:"", // 商品分类id cvsGoodId:"", cvsGoodOptions:[], @@ -424,15 +441,47 @@ export default { created() { this.getList(); this.getQueryList(); + this.getSuppilers(); this.getType(); this.getTree(); }, computed:{ }, methods:{ + // 模糊查询商品信息 + querySearch(queryString, cb) { + let _this = this; + let results = _this.supplierList; + if (queryString != ""){ + results = []; + let falg = false; + _this.supplierList.forEach(item => { + if(item.name.includes(queryString)){ + results.push(item) + falg = true + } + }) + if (!falg){ + + } + } + cb(results); + }, // 查询供应商信息 selectSupplier(data){ - console.log(data) + this.supplier = data.name; + this.form.supplierId = data.id + console.log(data,this.form) + }, + addSupplier(val){ + // console.log(val,222) + addSupplier({name:val,remark:"添加商品自动添加"}).then(res => { + // console.log(res) + if (res.data==1){ + this.$modal.msgSuccess("已为您自动添加此供应商") + this.getSuppilers(val) + } + }) }, // 获取分类菜单 getTree(){ @@ -520,8 +569,17 @@ export default { selectTree().then(response => { this.cvsGoodList = response.data.records }); + }, + getSuppilers(val){ listSupplier().then(response => { this.supplierList = response.data.records + if (val){ + this.supplierList.forEach(item => { + if (item.name = val){ + this.form.supplierId = item.id + } + }) + } }) }, // 查询列表 @@ -582,10 +640,14 @@ export default { }, // 新增按钮操作 handleAdd() { - this.reset(); - this.open = true; - this.isAdd = false; - this.title = "新增商品"; + if (this.cvsGoodList.length>0){ + this.reset(); + this.open = true; + this.isAdd = false; + this.title = "新增商品"; + }else { + this.$modal.msgError("请先添加商品分类") + } }, // 修改按钮操作 handleUpdate(row) { diff --git a/fuintAdmin/src/views/convenienceStore/supplier.vue b/fuintAdmin/src/views/convenienceStore/supplier.vue index 0609bcc9f..c8026fff3 100644 --- a/fuintAdmin/src/views/convenienceStore/supplier.vue +++ b/fuintAdmin/src/views/convenienceStore/supplier.vue @@ -256,17 +256,15 @@ export default { this.getList(); }); } else { - querySupplier({name:this.form.name}).then( response => { - if(response.data!=null){ - this.$modal.msgError("供应商名称已存在"); + addSupplier(this.form).then(response => { + if (response.data==1){ + this.$modal.msgSuccess("供应商新增成功"); + this.open = false; + this.getList(); }else { - addSupplier(this.form).then(response => { - this.$modal.msgSuccess("供应商新增成功"); - this.open = false; - this.getList(); - }); + this.$modal.msgError("供应商名称已存在"); } - }) + }); } } }); diff --git a/fuintAdmin/src/views/member/fixingLevel.vue b/fuintAdmin/src/views/member/fixingLevel.vue index 54c878d37..372c53b6d 100644 --- a/fuintAdmin/src/views/member/fixingLevel.vue +++ b/fuintAdmin/src/views/member/fixingLevel.vue @@ -193,9 +193,9 @@ - + + + . - - - + + + . - - - + + + + + + + + - + @@ -122,11 +122,11 @@ + /> @@ -218,7 +218,7 @@ import { } from "@/api/staffCommission/staffcommission"; export default { - dicts: ['source','role','zhzt','comissionType'], + dicts: ['source','role','zhzt','comissionType','staff_role'], data(){ return { changeCom:false, diff --git a/fuintAdmin/src/views/userGrade/index.vue b/fuintAdmin/src/views/userGrade/index.vue index f801c236e..2d12e48fd 100644 --- a/fuintAdmin/src/views/userGrade/index.vue +++ b/fuintAdmin/src/views/userGrade/index.vue @@ -113,9 +113,9 @@ - + + +