From f272d94fbc6021869eb83b4a756b0927d31cac5c Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 13 十一月 2023 08:08:29 +0800 Subject: [PATCH] # --- pages/project/pakin/pakin.vue | 162 +++++++++++++++-------------------------------------- 1 files changed, 47 insertions(+), 115 deletions(-) diff --git a/pages/project/pakin/pakin.vue b/pages/project/pakin/pakin.vue index e07fa62..163d36c 100644 --- a/pages/project/pakin/pakin.vue +++ b/pages/project/pakin/pakin.vue @@ -1,7 +1,7 @@ <template> <view> <view class="head"> - <z-input v-for="it in page" + <z-input v-for="it in input" :desc="it.title" :name="it.name" :btn="it.btn" @@ -21,13 +21,24 @@ <z-data-list class="data-list" v-for="(it,i) in zDataList" :key="i" - :list="it.detl" + :lable="lable" + :fields="it" :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> @@ -39,117 +50,18 @@ 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'}, - {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}, - ] - }, - { - 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: 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}, - ] - } + // {matnr: 'A1001',maktx: '1鍙风墿鏂�',count: 99}, + // {matnr: 'A1002',maktx: '2鍙风墿鏂�',count: 77}, + // {matnr: 'A1002',maktx: '2鍙风墿鏂�',count: 77} ], - list: [ - {} - ] } }, onShow() { - console.log(this.page); + // console.log(this.page); }, computed: mapState({ - page: state => state.project.menu[0].page.input + input: state => state.project.menu[0].page.input, + lable: state => state.project.menu[0].page.lable }), methods: { input2(arr) { @@ -158,25 +70,45 @@ } }, async getMat(matnr) { - let mat = await addMat.addMat() - if (!addMat.isEmpty(mat)) { - this.zDataList.push(mat) - } + let mat = await addMat.addMat(matnr) + mat['count'] = 0 + 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> <style> .head { - background-color: #f8f8f8; - margin-top: -8px; + /* margin-top: -8px; */ } .sticky { height: 70rpx; - margin-top: -8px; + box-shadow: 0px 4px 4px #e2e2e2; text-align: center; - background-color: #f8f8f8; + background-color: #fff; display: flex; align-items: center; justify-content: center; -- Gitblit v1.9.1