代码优化
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<view class="">
|
||||
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="data.createTime"></uni-dateformat>
|
||||
</view>
|
||||
<view class="tag">{{getTypeName(data.inOutItem)}}</view>
|
||||
<view class="tag">{{$dict.getDiceName(data.inOutItem,'invoicingType')}}</view>
|
||||
</view>
|
||||
<view class="u-flex u-text-left u-row-left u-m-t-30">
|
||||
<view class="name up-line-1">{{data.productName}}</view>
|
||||
@@ -52,8 +52,7 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive } from 'vue';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { $invoicingType } from '@/commons/goodsData.js'
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
@@ -63,10 +62,6 @@
|
||||
}
|
||||
})
|
||||
|
||||
let getTypeName = (type) => {
|
||||
let item = $invoicingType.filter(item=> item.value == type)[0]
|
||||
return item?item.text:''
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -70,8 +70,7 @@
|
||||
import { ref, reactive, computed, watch } from 'vue';
|
||||
|
||||
import myListItem from './components/list-item.vue';
|
||||
|
||||
import { $invoicingType } from '@/commons/goodsData.js'
|
||||
|
||||
import { productStockFlow } from '@/http/api/product.js'
|
||||
|
||||
|
||||
@@ -98,7 +97,7 @@
|
||||
|
||||
// 库存分类
|
||||
const types = reactive({
|
||||
list:$invoicingType,
|
||||
list: uni.$dict.invoicingType,
|
||||
active: '',
|
||||
show: false,
|
||||
bottomHeight: 14
|
||||
|
||||
Reference in New Issue
Block a user