| | |
| | | <view > |
| | | <view class="main"> |
| | | <view class="main-left" > |
| | | <view class="main-list" v-for="it in list" style="width: 100%;"> |
| | | <view class="main-list" v-for="it in lable" style="width: 100%;"> |
| | | <view class="left-key">{{it.label}}</view> |
| | | <view>:</view> |
| | | <view class="left-val"> |
| | | <text :class="it.valText">{{it.value}}</text> |
| | | <text :class="it.valText">{{fields[it.attribute]}}</text> |
| | | <text :class="it.valText" v-show="!fields[it.attribute]">--</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | // this.dataList = this.list.detl |
| | | }, |
| | | props: { |
| | | list: { |
| | | lable: { |
| | | type: Array, |
| | | default() { |
| | | return {} |
| | | } |
| | | }, |
| | | fields: { |
| | | type: Object, |
| | | default() { |
| | | return {} |
| | | } |
| | | }, |
| | | keyName: { |
| | | type: Object, |
| | | default() { |
| | |
| | | version: '', |
| | | remberPassword: true, |
| | | user: { |
| | | username: '1', |
| | | password: '2' |
| | | username: '', |
| | | password: '' |
| | | }, |
| | | network: [{ |
| | | name: 'wms', |
| | |
| | | data: {matnr: matnr}, |
| | | }).then((result)=> { |
| | | let mat = result.data.data |
| | | console.log(mat); |
| | | item['detl'] = [ |
| | | {key: '商品码',value: mat.matnr}, |
| | | {key: '商品名称',value: mat.maktx}, |
| | |
| | | <z-data-list class="data-list" |
| | | v-for="(it,i) in zDataList" |
| | | :key="i" |
| | | :list="list" |
| | | :lable="lable" |
| | | :fields="it" |
| | | :index="i+1" |
| | | @goDetail='goDetail(it.detl,i)' |
| | | ></z-data-list> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 垫高 --> |
| | | <view style="height: 100rpx;"></view> |
| | |
| | | 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'}, |
| | | ] |
| | | }, |
| | | {matnr: 'A1001',maktx: '1号物料',count: 99}, |
| | | {matnr: 'A1002',maktx: '2号物料',count: 77}, |
| | | {matnr: 'A1002',maktx: '2号物料',count: 77} |
| | | ], |
| | | // list: [ |
| | | // {} |
| | | // ] |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | }, |
| | | computed: mapState({ |
| | | input: state => state.project.menu[0].page.input, |
| | | list: state => state.project.menu[0].page.list |
| | | lable: state => state.project.menu[0].page.lable |
| | | }), |
| | | methods: { |
| | | input2(arr) { |
| | |
| | | let mat = await addMat.addMat(matnr) |
| | | this.zDataList.push(mat) |
| | | }, |
| | | goDetail(param,index) { |
| | | let _this = this |
| | | uni.navigateTo({ |
| | | url: '/pages/common/data-list/dataDetail', |
| | | // 传 |
| | | success: function(data) { |
| | | data.eventChannel.emit('param', { |
| | | param: param, |
| | | index: index |
| | | }) |
| | | }, |
| | | // 接 |
| | | events: { |
| | | dataList: function(data) { |
| | | console.log(data); |
| | | }, |
| | | del: function(data) { |
| | | _this.zDataList.splice(data.data,1) |
| | | } |
| | | }, |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | {"id":1,"name": "barcode","title": "托盘码","val": "2","lenCheck": 8,"focus": true}, |
| | | {"id":2,"name": "matnr","title": "物料码","val": "2","btn": true,"btnName": "提取","focus": true} |
| | | ], |
| | | "list": [ |
| | | {"label": "商品码","value": "fbr3242","valText": "val-text"}, |
| | | {"label": "商品名称","value": "fbr3242"}, |
| | | {"label": "规格","value": "fbr3242"}, |
| | | {"label": "批号","value": "fbr3242"}, |
| | | {"label": "数量","value": 9999,"type": "number-box","valText": "val-num"} |
| | | "lable": [ |
| | | {"label": "商品码","attribute":"matnr","value": "fbr3242","valText": "val-text"}, |
| | | {"label": "商品名称","attribute":"maktx","value": "fbr3242"}, |
| | | {"label": "规格","attribute":"specs","value": "fbr3242"}, |
| | | {"label": "批号","attribute":"batch","value": "fbr3242"}, |
| | | {"label": "数量","attribute":"count","value": 9999,"type": "number-box","valText": "val-num"} |
| | | ] |
| | | |
| | | } |