xiaojiao
19 小时以前 557f02072fa311eefe3123aa44afebac22adc465
ÏîÄ¿´úÂë/PDA/pages/Inbound/InboundBoxing_New.vue
@@ -55,9 +55,9 @@
              </u-td>
            </u-tr>
            <u-tr>
               <u-td width="30%">厂家</u-td>
               <u-td width="30%">轴承品牌</u-td>
               <u-td>
                  <u-input v-model="madeUnit" :border="true" :disabled="true"  placeholder="自动获取厂家" />
                  <u-input v-model="madeUnit" :border="true" :disabled="true"  placeholder="自动获取轴承品牌" />
               </u-td>
            </u-tr>
            
@@ -74,15 +74,29 @@
               
            </u-tr>
            <u-tr>
               <u-td width="30%">轴承单号</u-td>
               <u-td width="30%">轴承批次号</u-td>
               <u-td>
                  <u-input v-model="LotNumber" :border="true"  placeholder="轴承单号" />
                  <u-input v-model="LotNumber" :border="true"  placeholder="轴承批次号" />
               </u-td>
            </u-tr>
            <u-tr>
               <u-td width="30%">生产日期</u-td>
               <u-td width="30%">轴承重量</u-td>
               <u-td>
                  <u-input v-model="Standard_value" :border="true"  placeholder="轴承重量" />
               </u-td>
            </u-tr>
            <u-tr>
               <u-td width="30%">生产/检修 æ—¥æœŸ</u-td>
               <u-td>
                  <u-input v-model="ProductDate" :border="true" :focus="prdateFocus" placeholder="生产日期" />
               </u-td>
            </u-tr>
            <u-tr>
               <u-td width="30%">产地</u-td>
               <u-td>
                  <xfl-select :key="PlaceoforiginKey" :list="PlaceoforiginArray" :initValue="PlaceoforiginValue" :clearable="false" @change="PlaceoforiginChange"
                     ref="StateSelect">
                  </xfl-select>
               </u-td>
            </u-tr>
         </u-table>
@@ -107,6 +121,9 @@
         return {
            stateKey: 0, // æ–°å¢žï¼šæŽ§åˆ¶ç»„件重建 ã€è½´æ‰¿ç±»åˆ«ã€‘
            stateInitValue: '请选择', // åˆå§‹å€¼ï¼ŒåŽç»­åŠ¨æ€ä¿®æ”¹ã€è½´æ‰¿ç±»åˆ«ã€‘
            PlaceoforiginKey: 0, // æ–°å¢žï¼šæŽ§åˆ¶ç»„件重建 ã€äº§åœ°ã€‘
            PlaceoforiginValue: '请选择', // åˆå§‹å€¼ï¼ŒåŽç»­åŠ¨æ€ä¿®æ”¹ã€äº§åœ°ã€‘
            
            bearingSelectKey: 0, // ä¿ç•™key作为双保险 ã€è½´æ‰¿åž‹å·ã€‘
            stateInitValueBearingModel:'请选择', //【轴承型号】
@@ -144,7 +161,16 @@
               },{
                  label: 'R1',
                  value: '检修'
               }]
               }],
            PlaceoforiginArray: [{
                  label: '国产',
                  value: '国产'
               },{
                  label: '进口',
                  value: '进口'
               }],
            Standard_value:'', // ç§°é‡æ ‡å‡†å€¼
            Placeoforigin:'', // äº§åœ°(国产/进口)
         } 
      },
      methods: {
@@ -153,6 +179,7 @@
            // 1. æ‹¿åˆ°åŽŸå§‹çš„ç±»JSON字符串(如:{'轴承条码':'1','车型':'2',...})
            if(_this.value_qrcode.length > 60){
               const rawStr = _this.value_qrcode;
               console.log(_this.value_qrcode.length)
               // 2. ä¿®å¤æ ¼å¼ï¼ˆå•引号→双引号 + åˆ å°¾é€—号)
               const fixedStr = rawStr.replace(/'/g, '"').replace(/,\s*}/, '}');
               console.log(fixedStr)
@@ -163,11 +190,14 @@
               console.log(temp_dict['轴承条码']); // è¾“出:1(不再是undefined)
               
               _this.value_qrcode = temp_dict['轴承条码']; 
               _this.madeUnit = temp_dict["厂家"]
               _this.LotNumber = temp_dict["轴承单号"]
               _this.madeUnit = temp_dict["轴承品牌"]
               _this.LotNumber = temp_dict["轴承批次号"]
               _this.Standard_value = temp_dict["轴承重量"]
               _this.ProductDate = temp_dict["日期"]
               _this.Bearing_Category(temp_dict["轴承类别"])
               _this.BearingModel(temp_dict["轴承型号"])
               _this.Carmodel(temp_dict["车型"])
               _this.PlaceoforiginMethod(temp_dict["产地"])
            }
         },
         Bearing_Category (type_name){ 
@@ -189,6 +219,11 @@
            _this.bearingSelectKey += 1;
            _this.stateInitValueBearingModel = type_name;
            _this.materielType = type_name;
         },
         PlaceoforiginMethod(type_name){ // äº§åœ°
            _this.PlaceoforiginKey += 1;
            _this.PlaceoforiginValue = type_name;
            _this.Placeoforigin = type_name;
         },
         UserChange(value) {
         
@@ -270,7 +305,7 @@
         BearingModelss(value){
            console.log("选择的轴承型号是",value.orignItem)
            // è¿™é‡Œèµ‹å€¼åނ家
            _this.templists.forEach(x => { // å…³é”®ï¼šforEach å°å†™e
            _this.templists.forEach(x => { // å…³é”®ï¼šforEach å°å†™
               if(value.orignItem == x.materiel_zc_id_list){
                  _this.madeUnit = x.materiel_zc_name_list
                  _this.materielType = value.orignItem
@@ -279,6 +314,9 @@
         },
         StateChange(value) { // é€‰æ‹©è½´æ‰¿ç±»åˆ«
            _this.NewOrOld = value.orignItem.label;
         },
         PlaceoforiginChange(value) { // é€‰æ‹©äº§åœ°(国产/进口)
            _this.Placeoforigin = value.orignItem.label;
         },
         setTimer() {
            if (this.timer == null) {
@@ -311,7 +349,9 @@
                  materielType: _this.materielType,
                  NewOrOld: _this.NewOrOld,
                  LotNumber: _this.LotNumber,
                  ProductDate: _this.ProductDate
                  ProductDate: _this.ProductDate,
                  Standard_value: _this.Standard_value,
                  Placeoforigin: _this.Placeoforigin,
               },
            };
            console.log("最后提交的组盘信息",data)
@@ -328,6 +368,9 @@
               });
               return;
            }
            if(_this.Standard_value == '' || _this.Standard_value == 0 || _this.Standard_value == "0"){
               _this.Standard_value = '0'
            }
            if (_this.value_rfid.length > 6) {
               uni.showToast({
                  title: "托盘长度不能大于6位数。",
@@ -336,7 +379,7 @@
               });
               return;
            }
            //_this.LotNumber = '111111';
            uni.showModal({
               title: '提示',
               content: '是否确认组盘?',
@@ -351,7 +394,9 @@
                           materielType: _this.materielType,
                           NewOrOld: _this.NewOrOld,
                           LotNumber: _this.LotNumber,
                           ProductDate: _this.ProductDate
                           ProductDate: _this.ProductDate,
                           Standard_value: _this.Standard_value,
                           Placeoforigin: _this.Placeoforigin,
                        },
                     };
                     console.log("最后提交的组盘信息",data)
@@ -365,6 +410,7 @@
                           });
                           _this.value_rfid = "";
                           _this.value_qrcode = "";
                           _this.Standard_value = "";
                           _this.initInfo();
                           _this.rfidFocus = true;