schangxiang@126.com
2025-09-17 c0e20b1b0f1298cdc0af0037d60e74d51e364501
LA24030_LuLiPackageLine_Pda/pages/untie/untie.vue
@@ -23,7 +23,7 @@
          >
            <u-input
              v-model.trim="warehouse.upi"
                @focus="warehouse.upi = ''"
              @focus="warehouse.upi = ''"
              @confirm="getContainerData(1)"
              placeholder="请录入或扫码"
              class="width"
@@ -53,6 +53,7 @@
        </u-col>
      </u-row> -->
    </u-form>
    <!-- 列表 -->
    <view class="margin_top10rpx">
      <u-swipe-action
@@ -73,7 +74,6 @@
              :class="item.checked ? 'bg_item' : ''"
              class="fontSize32rpx width margin_auto background_fff padding10 relative box_sizing transition"
            >
              <!-- 部件名称 upi、材料、尺寸,位置、板件状态 -->
              <u-row>
                <u-col span="12" class="flex align-center">
                  <!-- <u-checkbox v-model="item.checked" size="50rpx"></u-checkbox> -->
@@ -94,6 +94,13 @@
                  </text>
                </u-col>
              </u-row>
           <u-row>
             <u-col span="12">
               <text class="color_80 padding_left25rpx">
                 <text class="color_80"> 次序:{{ item.shelf }} </text>
               </text>
             </u-col>
           </u-row>
              <u-row>
                <u-col span="12">
                  <text class="color_80 padding_left25rpx">
@@ -104,7 +111,7 @@
              <u-row>
                <u-col span="12">
                  <text class="color_80 padding_left25rpx">
                    位置:{{ item.areacode }}
                    位置:{{ getAreaCodeEnumName(item.areaCode) }}
                  </text>
                </u-col>
              </u-row>
@@ -130,13 +137,13 @@
                  </text>
                </u-col>
              </u-row>
              <u-row>
                <u-col span="12">
                  <text class="color_80 padding_left25rpx">
                    <text class="color_80"> 次序:{{ item.shelf }} </text>
                  </text>
                </u-col>
              </u-row>
            <u-row>
                        <u-col span="12">
                          <text class="color_80 padding_left25rpx">
                            标记:{{ getUpiFlagEnumName(item.upiFlag) }}
                          </text>
                        </u-col>
                      </u-row>
              <u-row>
                <u-col span="12">
                  <text class="color_80 padding_left25rpx">
@@ -291,8 +298,9 @@
    <button-modal
      :subShow="true"
      garmenTitle="重置"
     subTitle="确认NG"
      @submit="rest"
      @reset="rest"
      @reset="do_UnlineForNGPackage"
    />
  </view>
</template>
@@ -307,6 +315,7 @@
  onlyUpdateDutyCycle,
  getBhbMaterialList,
  getenumDataList,
  UnlineForNGPackage
} from "../../api/putIn/artificial.js";
export default {
  data() {
@@ -344,7 +353,9 @@
      gridFocus: false,
      gridable: true,
      kwbhAllowed: false,
     enumList: [],
      enumList: [],
      areaCodeEnum: [],
     upiFlagEnum: [],
    };
  },
  components: {
@@ -352,24 +363,66 @@
    ModalCode,
  },
  created() {
   getenumDataList({
    getenumDataList({
      EnumName: "UpiStatusEnum",
    }).then((res) => {
      this.enumList = res.result || [];
    });
    getenumDataList({
      EnumName: "AreaCodeEnum",
    }).then((res) => {
      this.areaCodeEnum = res.result || [];
    });
   getenumDataList({
        EnumName: "UpiFlagEnum",
      }).then((res) => {
        this.upiFlagEnum = res.result || [];
      });
  },
  onLoad() {
    this.operator = JSON.parse(uni.getStorageSync("userInfo")).name;
  },
  mounted() {
  },
  mounted() {},
  methods: {
   getEnumName(value) {
     do_UnlineForNGPackage() {
         //debugger
         const params = {
           PackageCode:this.singlist[0].packageCode,
           IsNG:true
         };
        //debugger
         uni.showModal({
           title: "整包NG下线",
           content: "是否确认 整包NG下线?",
           showCancel: true,
           cancelColor: "#333333",
           success: (res) => {
             if (res.confirm) {
               UnlineForNGPackage(params).then((res) => {
                 this.rescode = 200;
                 this.$refs.resmodal.show = true;
                 this.resmessage = "整包NG下线成功";
               });
             } else if (res.cancel) {
             }
           },
         });
       },
    getEnumName(value) {
      const name = this.enumList.find((item) => item.value === value);
      return name? name.name : "";
      return name ? name.name : "";
    },
    getAreaCodeEnumName(value) {
      const name = this.areaCodeEnum.find((item) => item.value === value);
      return name ? name.name : "";
    },
    getUpiFlagEnumName(value) {
        const name = this.upiFlagEnum.find((item) => item.value === value);
        return name ? name.name : "";
      },
    // 如果打开一个的时候,不需要关闭其他,则无需实现本方法
    open(index) {
      // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
@@ -387,8 +440,9 @@
      this.materlist = this.singlist[index];
      this.detailshow = true;
    },
    rest() {
      //alert(11)
      this.warehouse.upi = "";
      this.warehouse.upi = "";
      this.singlist = [];
@@ -406,14 +460,14 @@
        return;
      }
      getBhbMaterialList({
        upi: this.warehouse.upi
        upi: this.warehouse.upi,
      }).then((res) => {
        const result = res.result;
        if (Array.isArray(result) && result.length == 0) {
          uni.showToast({
            title: "没有查到数据",
            icon: "none",
            duration: 2000,
            duration: 5000,
          });
          this.singlist = [];
          return;
@@ -430,7 +484,6 @@
      this.warehouse.upi = "";
    },
  },
};
</script>
<style lang="scss">