From 63038edf5b65e16bfb24052eb3077479d9ccbfbf Mon Sep 17 00:00:00 2001 From: whycq <123456> Date: 星期四, 27 十月 2022 12:56:22 +0800 Subject: [PATCH] # --- pages/basics/stockCheck.vue | 86 ++++++++++++++++++++++++++++++++++++------ 1 files changed, 73 insertions(+), 13 deletions(-) diff --git a/pages/basics/stockCheck.vue b/pages/basics/stockCheck.vue index 1022705..4631e29 100644 --- a/pages/basics/stockCheck.vue +++ b/pages/basics/stockCheck.vue @@ -26,6 +26,22 @@ </view> </view> </view> + <view class="square-2"> + <view class="square-title"> + <view class="title-sign"><view class="sign"></view></view> + <view class="title-text"><text>娣诲姞鍟嗗搧</text></view> + </view> + <view class="square-content"> + <view class="content-input-btn"> + <input v-model="matnr" type="text" placeholder="鎵爜 / 杈撳叆" @input="findMat()" + :focus="focus" placeholder-style="line-height: 85rpx;"> + <uni-icons type="closeempty" size="20" color="#dadada" @click="removeMatnr()"></uni-icons> + </view> + <view class="content-btn"> + <button class="cu-btn bg-blue pda-btn" @click="selectMat()">+鎻愬彇</button> + </view> + </view> + </view> <view class="pak-data-box"> <view class="box-top"> <view class="color-block-blue"></view> @@ -61,23 +77,26 @@ </view> </view> </scroll-view> - <y-pop title="璋冩暣"></y-pop> + <!-- <y-pop v-model="count" title="淇敼" :max="9999999" :show="show"></y-pop> --> <view> <!-- 淇敼鏁伴噺 --> - <uni-popup ref="revise" background-color="#fff" @change="change"> + <uni-popup ref="revise" @change="change"> <view class="revise-box"> <view class="revise-box-top"> <view class="color-block-blue"></view> <text class="title">淇敼</text> </view> - <view class="text-box"> - <text>鍙粍鏁伴噺锛歿{enableQty}}</text> + <view class="change"> + <view class="text-box"> + <text>鏁伴噺锛歿{enableQty}}</text> + </view> + <view class="changeBox"> + <view class="num-box"> + <uni-number-box v-model="count" :min="minCount" :max="maxCount" color="#747474" @change="changeValue"/> + </view> + </view> </view> - <view class="changeBox"> - <view class="num-box"> - <uni-number-box v-model="count" :min="minCount" :max="maxCount" color="#747474" @change="changeValue"/> - </view> - </view> + <view class="revise-box-buttom"> <view> <button class="cu-btn bg-blue" @click="confirm()">纭</button> @@ -94,16 +113,19 @@ data() { return { commonUrl:null, - matList:[{}], + matList:[], staNoList:[], barcode: '', staNo:'', matnr:'', enableQty:'', - count:'', + count:15, maxCount:'', minCount:0, - rowNum:'' + rowNum:'', + show: false, + focus: false, + } }, mounted(){ @@ -214,7 +236,7 @@ events: { // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� matList: function(data) { - that.matList.push(data.data) + that.checkMat(data.data) }, }, success: function(res) { @@ -237,6 +259,7 @@ this.maxCount = item.maxCount this.rowNum = index this.eject() + // this.show = true }, remove(item,index) { this.matList.splice(index,1) @@ -260,6 +283,24 @@ resst() { this.matList = [] this.staNo = '' + }, + // 娣诲姞鍟嗗搧 + addMat(mat) { + this.matList.unshift(mat) + }, + checkMat(mat) { + var len = this.matList.length + var add = true + for (var i = 0; i < len; i++) { + if (mat.matnr == this.matList[i].matnr) { + this.matList[i].anfme += mat.anfme + this.$forceUpdate() // 寮哄埗鍒锋柊 + add = false + } + } + if (add) { + this.matList.unshift(mat) + } }, adjust() { let that = this @@ -297,6 +338,25 @@ } // exprot </script> <style> + .revise-box { + width: 500rpx; + height: 300rpx; + display: flex; + flex-direction: column; + border-radius: 20rpx; + background-color: #F1F1F1; + } + .change { + height: 150rpx; + display: flex; + align-items: center; + justify-content: center; + } + .revise-box-buttom { + display: flex; + align-items: center; + justify-content: center; + } .pak-seach-box { background-color: #FFFFFF; margin: 15rpx 15rpx 0rpx 15rpx; -- Gitblit v1.9.1