代码更新
This commit is contained in:
@@ -77,6 +77,8 @@
|
||||
} from '@/http/yskApi/requestAll.js';
|
||||
import color from '@/commons/color.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { getConsGrpupList,addCons } from '@/api/cons.js';
|
||||
|
||||
let datas = reactive({
|
||||
form: {
|
||||
conWarning: 999
|
||||
@@ -94,17 +96,20 @@
|
||||
onMounted(() => {
|
||||
gettbConsTypeList()
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* 获取耗材类别
|
||||
*/
|
||||
let gettbConsTypeList = () => {
|
||||
datas.typelist = []
|
||||
tbConsTypeList({
|
||||
getConsGrpupList({
|
||||
page: 0,
|
||||
size: 30,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
}).then(res => {
|
||||
datas.list = res.content
|
||||
res.content.forEach(ele => {
|
||||
datas.typelist.push(ele.conTypeName)
|
||||
datas.list = res
|
||||
res.forEach(ele => {
|
||||
datas.typelist.push(ele.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -127,11 +132,11 @@
|
||||
}
|
||||
console.log(datas.list, 'tiaoshi1')
|
||||
console.log(datas.list[datas.nowStatusIndex], 'tiaoshi1')
|
||||
tbConsInfoAddlist([{
|
||||
addCons({
|
||||
...datas.form,
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
conTypeId: datas.list[datas.nowStatusIndex].id
|
||||
}]).then(res => {
|
||||
consGroupId: datas.list[datas.nowStatusIndex].id
|
||||
}).then(res => {
|
||||
// go.to('PAGES_SALES_CONSUMABLES')
|
||||
go.back()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user