打印机跳转修改
This commit is contained in:
@@ -268,9 +268,7 @@
|
||||
],
|
||||
selIndex: 1
|
||||
})
|
||||
onMounted(() => {
|
||||
getlist()
|
||||
})
|
||||
|
||||
let getlist = async () => {
|
||||
const res = await Api.tbShopCategoryget({
|
||||
shopId: uni.getStorageSync("shopId"),
|
||||
@@ -295,6 +293,7 @@
|
||||
})
|
||||
partList.value = arr
|
||||
}
|
||||
|
||||
function sizeChange(e, name) {
|
||||
form[name] = e.detail.value
|
||||
}
|
||||
@@ -343,7 +342,8 @@
|
||||
...form
|
||||
})
|
||||
}
|
||||
go.to('/pagePrinter/index/index')
|
||||
go.back()
|
||||
// go.to('/pagePrinter/index/index')
|
||||
}
|
||||
// watch(() => form.config.model, (newval) => {
|
||||
// console.log(newval);
|
||||
@@ -351,16 +351,19 @@
|
||||
// const option = reactive({})
|
||||
async function getdetails() {
|
||||
const res = await Api.printerd(userId.value)
|
||||
if (res.categoryIds) {
|
||||
let arr = res.categoryIds.split(',')
|
||||
let arrs = []
|
||||
arr.forEach(eles => {
|
||||
arrs.push(eles * 1)
|
||||
})
|
||||
res.selectcheckbox = arrs
|
||||
}
|
||||
form = Object.assign(form, res)
|
||||
form.printType = JSON.parse(form.printType)
|
||||
}
|
||||
onLoad((options) => {
|
||||
getlist()
|
||||
if (options.id) {
|
||||
// 有id是编辑,获取详情
|
||||
userId.value = options.id
|
||||
@@ -370,6 +373,9 @@
|
||||
}
|
||||
// Object.assign(option, opt)
|
||||
})
|
||||
// show(()=>{
|
||||
// getlist()
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
<script setup>
|
||||
import go from '@/commons/utils/go.js'
|
||||
import {
|
||||
onShow,
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
onMounted,
|
||||
reactive
|
||||
@@ -43,13 +46,15 @@
|
||||
async function init() {
|
||||
const res =await Api.tbPrintMachineGet(pageData.query)
|
||||
pageData.hasAjax=true
|
||||
console.log(res,'调试')
|
||||
pageData.list = res
|
||||
// pageData.list = res.filter(v=>v.address)
|
||||
}
|
||||
onMounted(() => {
|
||||
onShow(()=>{
|
||||
init()
|
||||
})
|
||||
// onMounted(() => {
|
||||
// init()
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user