耗材样式
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="ConsumablesTop">
|
||||
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||
</view>
|
||||
<view>
|
||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||
@@ -46,12 +46,14 @@
|
||||
</view>
|
||||
<view>
|
||||
<view class="">
|
||||
所属商品: {{ filtersSproductId(item.productId)}}
|
||||
所属商品: {{ filtersSproductId(item.product)}}
|
||||
</view>
|
||||
<view class="">
|
||||
<up-button shape="circle" type="primary" size="mini" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})"
|
||||
:plain="true" text="查看记录"></up-button>
|
||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
||||
<up-button shape="circle" type="primary" size="mini" color="#999"
|
||||
@tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true"
|
||||
text="查看记录"></up-button>
|
||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true"
|
||||
text="更多操作"></up-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -162,7 +164,9 @@
|
||||
* 报损确认
|
||||
*/
|
||||
function affirm() {
|
||||
console.log(2)
|
||||
getList()
|
||||
// 获取分类列表
|
||||
gettbConsTypeList()
|
||||
}
|
||||
|
||||
let toggle = (d) => {
|
||||
@@ -232,19 +236,20 @@
|
||||
}
|
||||
|
||||
function inputEvent(d) {
|
||||
datas.conName = d.detail.value.replace(/\s*/g,"");
|
||||
datas.conName = d.detail.value.replace(/\s*/g, "");
|
||||
getList()
|
||||
}
|
||||
|
||||
function filtersSproductId(d) {
|
||||
if (!d) return ''
|
||||
const dataArr = d.split(',')
|
||||
// const dataArr = d.split(',')
|
||||
let str = ''
|
||||
dataArr.forEach(ele => {
|
||||
const startIndex = ele.indexOf('_')
|
||||
d.forEach(ele => {
|
||||
// str += ele.name
|
||||
// const startIndex = ele.indexOf('_')
|
||||
// const productId = ele.slice(0, startIndex)
|
||||
const productName = ele.slice(startIndex + 1, ele.length)
|
||||
str = productName + ',' + str
|
||||
// const productName = ele.slice(startIndex + 1, ele.length)
|
||||
str = ele.name + ',' + str
|
||||
})
|
||||
|
||||
return str
|
||||
@@ -257,10 +262,8 @@
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style scoped lang="less">
|
||||
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
|
||||
Reference in New Issue
Block a user