| | |
| | | <view> |
| | | <z-input v-for="it in zInputList" |
| | | :desc="it.desc" :btn="it.btn" :btn-name="it.btnName" v-model="it.val" |
| | | :lenCheck="it.lenCheck" :focus="it.focus" @clickBtn='entry(it.name)'> |
| | | :lenCheck="it.lenCheck" :focus="it.focus" @clickBtn='entry(it.name)' @input='input'> |
| | | </z-input> |
| | | <view>输入框1</view> |
| | | <view>{{zInputList[0].val}}</view> |
| | |
| | | <z-data-list class="data-list" |
| | | v-for="(it,i) in zDataList" |
| | | :key="i" |
| | | :list="it" |
| | | :list="it.detl" |
| | | :index="i+1" |
| | | @goDetail='goDetail(it.detl)' |
| | | @goDetail='goDetail(it.detl,i)' |
| | | |
| | | ></z-data-list> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import addMat, { isEmpty } from '../api/addMat.js' |
| | | import addMat from '../api/addMat.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | zDataList: [ |
| | | { |
| | | detl: [ |
| | | {key: '商品码',value: 'ccc'}, |
| | | {key: '商品名称',value: 'ccc'}, |
| | | {key: '规格',value: 'ccc'}, |
| | | {key: '批号',value: '16',type: 'input'}, |
| | | {key: '数量',value: 0,type: 'number-box'}, |
| | | {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'}, |
| | | {key: '序号',value: 1}, |
| | | ] |
| | | }, |
| | | { |
| | | 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'}, |
| | | {key: '序号',value: 2}, |
| | | ] |
| | | }, |
| | | { |
| | | 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'}, |
| | | {key: '序号',value: 3}, |
| | | ] |
| | | }, |
| | | { |
| | | 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'}, |
| | | {key: '序号',value: 4}, |
| | | ] |
| | | }, |
| | | { |
| | | detl: [ |
| | | {key: '商品码',value: 'LSH90152025',valText: 'val-text'}, |
| | | {key: '商品名称',value: '尼龙头(灰白)'}, |
| | | {key: '规格',value: '700*699*80'}, |
| | | {key: '批号',value: '20231007204944',type: 'input'}, |
| | | {key: '数量',value: 951326478,type: 'number-box',valText: 'val-num'}, |
| | | {key: '序号',value: 5}, |
| | | ] |
| | | } |
| | | ], |
| | |
| | | }, |
| | | methods: { |
| | | entry(e) { |
| | | }, |
| | | input(val) { |
| | | console.log(val); |
| | | }, |
| | | ccc() { |
| | | }, |
| | |
| | | } |
| | | |
| | | }, |
| | | goDetail(param) { |
| | | goDetail(param,index) { |
| | | let _this = this |
| | | uni.navigateTo({ |
| | | url: '/pages/common/data-list/dataDetail', |
| | | // 传 |
| | | success: function(res) { |
| | | res.eventChannel.emit('mat', { |
| | | data: param |
| | | success: function(data) { |
| | | data.eventChannel.emit('param', { |
| | | param: param, |
| | | index: index |
| | | }) |
| | | }, |
| | | // 接 |
| | |
| | | dataList: function(data) { |
| | | console.log(data); |
| | | }, |
| | | del: function(data) { |
| | | _this.zDataList.splice(data.data,1) |
| | | } |
| | | }, |
| | | }) |
| | | } |