1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
| <template>
| <view>
| <view class="head">
| <z-input v-for="it in input"
| :desc="it.title"
| :name="it.name"
| :btn="it.btn"
| :btn-name="it.btnName"
| v-model="it.val"
| :index="it.id"
| :lenCheck="it.lenCheck"
| :focus="it.focus"
| @inputVal='input2'
| ></z-input>
| </view>
|
| <u-sticky >
| <view class="sticky">商品列表</view>
| </u-sticky>
|
| <z-data-list class="data-list"
| v-for="(it,i) in zDataList"
| :key="i"
| :list="list"
| :index="i+1"
| @goDetail='goDetail(it.detl,i)'
| ></z-data-list>
|
| <!-- 垫高 -->
| <view style="height: 100rpx;"></view>
|
| <view class="z-floor">
| <view class="z-default">重置</view>
| <view class="z-primary">组托</view>
| </view>
|
| </view>
| </template>
|
| <script>
| import { mapState } from 'vuex'
| import addMat from '@/pages/api/addMat.js'
| export default {
| data() {
| return {
| zDataList: [
| {
| detl: [
| {key: '商品码',value: 'LSH90152025',valText: 'val-text'},
| {key: '商品名称',value: '尼龙头(灰白)5.2x25'},
| {key: '规格',value: '700*699*80'},
| {key: '批号',value: '20231007204944',type: 'input'},
| {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'},
| ]
| },
| ],
| // list: [
| // {}
| // ]
| }
| },
| onShow() {
| // console.log(this.page);
| },
| computed: mapState({
| input: state => state.project.menu[0].page.input,
| list: state => state.project.menu[0].page.list
| }),
| methods: {
| input2(arr) {
| if(arr[1] == 'matnr') {
| this.getMat(arr[0])
| }
| },
| async getMat(matnr) {
| let mat = await addMat.addMat(matnr)
| this.zDataList.push(mat)
| },
| }
| }
| </script>
|
| <style>
| .head {
| /* margin-top: -8px; */
| }
| .sticky {
| height: 70rpx;
| box-shadow: 0px 4px 4px #e2e2e2;
| text-align: center;
| background-color: #fff;
| display: flex;
| align-items: center;
| justify-content: center;
| }
| </style>
|
|