xiaojiao
2026-03-23 f02d3a8ffc05a10a64859b2a16d5d43c8abb0fb9
ÏîÄ¿´úÂë/PDA/pages/Check/Check.vue
@@ -18,7 +18,7 @@
            <u-tr>
               <u-td width="30%">轴承编号</u-td>
               <u-td>
                  <u-input v-model="materielNumber" :focus="qrcodeFocus" :border="true" placeholder="请扫描轴承编号"
                  <u-input v-model="materielNumber" :focus="qrcodeFocus" :border="true" placeholder="请扫描轴承编号!"
                     @input="barcodeChange" />
               </u-td>
            </u-tr>
@@ -54,7 +54,7 @@
               <u-td>
                  <u-input v-model="recordInfo.materiel_id" :border="false" :disabled="true" placeholder="" />
               </u-td>
               <u-td width="30%">厂家</u-td>
               <u-td width="30%">轴承品牌</u-td>
               <u-td>
                  <u-input v-model="recordInfo.containerdtl_madeUnit" :border="false" :disabled="true"
                     placeholder="" />
@@ -152,10 +152,26 @@
            this.checkResult = value.orignItem.label;
         },
         barcodeChange() {
            if(this.materielNumber.length > 20){
               const rawStr = _this.materielNumber;
               // 2. ä¿®å¤æ ¼å¼ï¼ˆå•引号→双引号 + åˆ å°¾é€—号)
               const fixedStr = rawStr.replace(/'/g, '"').replace(/,\s*}/, '}');
               console.log(fixedStr)
               // 3. è§£æžä¸ºå­—典(对象)
               const temp_dict = JSON.parse(fixedStr);
               console.log(temp_dict)
               // 4. æ­£ç¡®èŽ·å–å€¼
               console.log(temp_dict['轴承条码']); // è¾“出:1(不再是undefined)
               _this.materielNumber = temp_dict['轴承条码'];
            }
            if (_this.materielNumber == '' || _this.materielNumber == null) {
               _this.initAVG();
               return;
            }
            let where =
               "[" +
               "{'name':'containerdtl_number','value':'" + _this.materielNumber + "'}]";
@@ -166,7 +182,9 @@
               order: 'sort',
               wheres: where
            }
            //console.log(data);
            console.log(data);
            console.log(_this.materielNumber)
            //return;
            _this.$AjaxRequest.Params('post', 'VV_ContainerInfo/getPageData',
               data, _user.token);
            _this.$AjaxRequest.Request().then(function(result) {