#
whycq
2023-05-06 d44a9d2e34f17ba2ad9d8ad915214d86de2e8e00
pages/pakin/pakin.vue
@@ -4,7 +4,7 @@
         <view class="item">
            <view class="code-decs">托盘码:</view>
            <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus"
               @confirm="barcodeInput()">
               @input="barcodeInput()">
         </view>
         <view class="item">
            <view class="code-decs">物料码:</view>
@@ -98,7 +98,7 @@
         <!-- 提示窗示例 -->
         <uni-popup ref="alertDialog" type="dialog">
            <uni-popup-dialog :type="msgType" confirmText="移除" :title="title" :content="content"
               @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog>
               @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog>
         </uni-popup>
      </view>
      <view>
@@ -143,8 +143,8 @@
            content: '',
            barcodeFocus: true,
            matFocus: false,
            matData: ''
            matData: '',
            removeNum: 0,
         }
      },
      onLoad() {
@@ -187,14 +187,11 @@
         },
         // 商品光标清空重置
         focuss() {
            // #ifdef APP
            let that = this;
            that.focus = false;
            this.focus = false;
            setTimeout(() => {
               that.matnr = '';
               that.focus = true;
               this.matnr = '';
               this.matFocus = true;
            }, 100);
            // #endif
         },
         // 搜索物料
         findMat() {
@@ -225,6 +222,7 @@
                        events: {
                           matList: function(data) {
                              that.checkMat(data.data)
                              that.focuss()
                           },
                        },
                     });
@@ -303,7 +301,6 @@
            if (add) {
               this.dataList.unshift(mat)
            }
            console.log(len);
         },
         // 修改批号
         revise(item, i) {
@@ -319,16 +316,17 @@
         },
         // 列表移除按钮
         remove(item, i, type) {
            this.removeNum  = i
            this.msgType = type
            this.title = '警告'
            this.content = '是否移除当前商品!'
            this.$refs.alertDialog.open(i)
         },
         // 确认移除
         removeConfirm(i) {
         removeConfirm() {
            this.messageText = "移除成功"
            this.messageToggle('success')
            this.dataList.splice(i, 1)
            this.dataList.splice(this.removeNum, 1)
         },
         // 取消移除
         removeClose() {
@@ -337,6 +335,7 @@
         reviseConfirm() {
            this.dataList[this.rowNum].anfme = this.count
            this.dataList[this.rowNum].batch = this.batch
            this.matnr = ''
            this.messageText = "修改成功"
            this.messageToggle('success')
            this.$refs.revise.close()