if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
  Promise.prototype.finally = function(callback) {
    const promise = this.constructor;
    return this.then(
      (value) => promise.resolve(callback()).then(() => value),
      (reason) => promise.resolve(callback()).then(() => {
        throw reason;
      })
    );
  };
}
;
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
  const global = uni.requireGlobal();
  ArrayBuffer = global.ArrayBuffer;
  Int8Array = global.Int8Array;
  Uint8Array = global.Uint8Array;
  Uint8ClampedArray = global.Uint8ClampedArray;
  Int16Array = global.Int16Array;
  Uint16Array = global.Uint16Array;
  Int32Array = global.Int32Array;
  Uint32Array = global.Uint32Array;
  Float32Array = global.Float32Array;
  Float64Array = global.Float64Array;
  BigInt64Array = global.BigInt64Array;
  BigUint64Array = global.BigUint64Array;
}
;
if (uni.restoreGlobal) {
  uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
}
(function(vue) {
  "use strict";
  function formatAppLog(type, filename, ...args) {
    if (uni.__log__) {
      uni.__log__(type, filename, ...args);
    } else {
      console[type].apply(console, [...args, filename]);
    }
  }
  function resolveEasycom(component, easycom) {
    return typeof component === "string" ? easycom : component;
  }
  var main = null;
  var receiver = null;
  function recive(success, fail) {
    if (main && receiver) {
      formatAppLog("log", "at src/libs/Broadcast.js:8", "取消监听广播");
      try {
        main.unregisterReceiver(receiver);
      } catch (e) {
        formatAppLog("error", "at src/libs/Broadcast.js:12", "取消广播监听时出错:", e);
      }
    }
    main = plus.android.runtimeMainActivity();
    receiver = plus.android.implements("io.dcloud.feature.internal.reflect.BroadcastReceiver", {
      onReceive: function(context, intent) {
        plus.android.importClass(intent);
        var action = intent.getAction();
        formatAppLog("log", "at src/libs/Broadcast.js:23", "zhanglp", action);
        var data;
        switch (action) {
          case "com.android.server.scannerservice.broadcast":
            data = intent.getExtra("scannerdata");
            break;
          case "com.service.scanner.data":
            data = intent.getExtra("ScanCode");
            formatAppLog("log", "at src/libs/Broadcast.js:31", "zhanglp", data.replace(/\n/, ""));
            break;
          case "android.intent.action.SCANRESULT":
            data = intent.getExtra("value");
            break;
          case "android.intent.ACTION_DECODE_DATA":
            data = intent.getExtra("barcode_string");
            break;
          case "com.android.provider.sdlmessage":
            data = intent.getExtra("msg");
            break;
          case "com.neusoft.action.scanner.read":
            data = intent.getStringExtra("scanner_value");
            if (data == null) {
              data = intent.getStringExtra("Scanner_value");
            }
            break;
          case "nlscan.action.SCANNER_RESULT":
            data = intent.getExtra("SCAN_BARCODE1");
            break;
          case "com.barcode.sendBroadcast":
            data = intent.getExtra("BARCODE");
            break;
          case "scan.rcv.message":
            let barocode = intent.getByteArrayExtra("barocode");
            let barocodelen = intent.getIntExtra("length", 0);
            data = new String(barocode, 0, barocodelen);
            break;
          case "xlyk.wz":
            data = intent.getExtra("qrcode");
            break;
          case "com.android.scanner.broadcast":
            data = intent.getExtra("scandata");
            break;
          case "com.honeywell.scan.broadcast":
            data = intent.getExtra("data");
            break;
        }
        if (data) {
          success({
            type: "barcode",
            data: data.replace(/\n/, "").replace(/\t/, "").trim()
            //处理结束符和换行符为空
          });
        } else {
          fail({
            type: "barcode",
            data: "未识别到扫码数据"
            //处理结束符和换行符为空
          });
        }
      }
    });
    var IntentFilter = plus.android.importClass("android.content.IntentFilter");
    plus.android.importClass("android.content.Intent");
    var filter = new IntentFilter();
    filter.addAction("com.android.provider.sdlMessage");
    filter.addAction("com.neusoft.action.scanner.read");
    filter.addAction("nlscan.action.SCANNER_RESULT");
    filter.addAction("scan.rcv.message");
    filter.addAction("com.android.server.scannerservice.broadcast");
    filter.addAction("android.intent.action.SCANRESULT");
    filter.addAction("android.intent.ACTION_DECODE_DATA");
    filter.addAction("com.barcode.sendBroadcast");
    filter.addAction("xlyk.wz");
    filter.addAction("com.android.scanner.broadcast");
    filter.addAction("com.android.scanner.broadcast");
    filter.addAction("com.honeywell.scan.broadcast");
    filter.addAction("com.service.scanner.data");
    main.registerReceiver(receiver, filter);
  }
  function unregisterReceiver() {
    formatAppLog("log", "at src/libs/Broadcast.js:124", "取消监听广播");
    main.unregisterReceiver(receiver);
  }
  function saveConfig(key, value) {
    uni.setStorageSync(key, value);
  }
  function getConfig(key, defaultValue) {
    return uni.getStorageSync(key) || defaultValue;
  }
  function getServerIPAndPort() {
    var serverIP = getConfig("serverIP", "192.168.18.200");
    var serverPort = getConfig("serverPort", "8888");
    return serverIP + ":" + serverPort;
  }
  const _imports_0$2 = "/static/logo.png";
  const _export_sfc = (sfc, props) => {
    const target = sfc.__vccOpts || sfc;
    for (const [key, val] of props) {
      target[key] = val;
    }
    return target;
  };
  const _sfc_main$h = {
    data() {
      return {
        title: "登录",
        showPassword: true,
        userName: "",
        passWord: "",
        serverIPAndPort: ""
      };
    },
    onShow: function() {
      this.serverIPAndPort = getServerIPAndPort();
    },
    onLoad: function() {
      this.userName = getConfig("userName", "admin");
      this.passWord = getConfig("passWord", "admin123");
    },
    onUnload: function() {
      unregisterReceiver();
    },
    methods: {
      login() {
        var serverIPAndPort = getServerIPAndPort();
        formatAppLog("log", "at pages/index/index.vue:92", "http://" + serverIPAndPort + "/user/userLogin");
        uni.request({
          url: "http://" + serverIPAndPort + "/user/userLogin",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "username": this.userName,
            "password": this.passWord,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "登录成功!",
                  icon: "none",
                  duration: 1500
                });
                saveConfig("userName", this.userName);
                saveConfig("passWord", this.passWord);
                formatAppLog("log", "at pages/index/index.vue:118", res.data.data.getRoles[0].authNames);
                saveConfig("roleName", res.data.data.getRoles[0].authNames);
                uni.redirectTo({
                  url: "/pages/main/main"
                });
              } else {
                uni.showToast({
                  title: "获取设备基本信息失败:" + res.data.message,
                  icon: "none",
                  duration: 2e3
                });
              }
            } else {
              this.text = "服务器返回错误状态码" + res.statusCode;
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
          },
          complete: (event) => {
            formatAppLog("log", "at pages/index/index.vue:147", "请求完成", event);
          }
        });
      }
    }
  };
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createElementVNode("navigator", {
        url: "../config/config",
        "hover-class": "navigator-hover"
      }, [
        vue.createElementVNode("image", {
          class: "logo",
          src: _imports_0$2
        })
      ]),
      vue.createElementVNode("view", { class: "text-area" }, [
        vue.createElementVNode(
          "text",
          { class: "title" },
          vue.toDisplayString($data.title),
          1
          /* TEXT */
        )
      ]),
      vue.createElementVNode("view", { style: { "margin-top": "90rpx", "margin-bottom": "90rpx" } }, [
        vue.createElementVNode("view", { class: "diy-flex-column" }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", { style: { "flex": "5" } }),
            vue.createElementVNode("view", { style: { "flex": "15" } }, "用  户  名："),
            vue.createElementVNode("view", {
              style: { "flex": "20" },
              class: "uni-input-wrapper"
            }, [
              vue.withDirectives(vue.createElementVNode(
                "input",
                {
                  class: "uni-input",
                  style: { "font-size": "50rpx" },
                  placeholder: "请输入用户名",
                  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.userName = $event)
                },
                null,
                512
                /* NEED_PATCH */
              ), [
                [vue.vModelText, $data.userName]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "5" } })
          ]),
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", { style: { "flex": "5" } }),
            vue.createElementVNode("view", { style: { "flex": "15" } }, "密       码："),
            vue.createElementVNode("view", {
              style: { "flex": "20" },
              class: "uni-input-wrapper"
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                class: "uni-input",
                style: { "font-size": "50rpx" },
                placeholder: "请输入密码",
                password: $data.showPassword,
                "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.passWord = $event)
              }, null, 8, ["password"]), [
                [vue.vModelText, $data.passWord]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "5" } })
          ])
        ])
      ]),
      vue.createElementVNode("view", { style: { "margin-top": "70rpx", "margin-bottom": "20rpx" } }, [
        vue.createElementVNode("button", {
          onClick: _cache[2] || (_cache[2] = (...args) => $options.login && $options.login(...args)),
          style: { "margin-left": "90rpx", "margin-right": "90rpx" },
          type: "default",
          plain: "true"
        }, "登     录")
      ]),
      vue.createElementVNode("view", { style: { "margin-top": "70rpx", "margin-bottom": "20rpx", "text-align": "center" } }, [
        vue.createElementVNode(
          "view",
          null,
          vue.toDisplayString($data.serverIPAndPort),
          1
          /* TEXT */
        )
      ])
    ]);
  }
  const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/index/index.vue"]]);
  const _sfc_main$g = {
    data() {
      return {
        serverIP: "",
        serverPort: ""
      };
    },
    onLoad: function() {
      this.serverIP = getConfig("serverIP", "192.168.18.200");
      this.serverPort = getConfig("serverPort", "8888");
    },
    methods: {
      saveConfigs() {
        saveConfig("serverIP", this.serverIP);
        saveConfig("serverPort", this.serverPort);
        uni.showToast({
          title: "配置保存成功",
          icon: "success"
        });
      }
    }
  };
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", { class: "container" }, [
      vue.createElementVNode("view", null, [
        vue.createElementVNode("label", null, "服务器IP:"),
        vue.withDirectives(vue.createElementVNode(
          "input",
          {
            "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.serverIP = $event),
            placeholder: "请输入服务器IP"
          },
          null,
          512
          /* NEED_PATCH */
        ), [
          [vue.vModelText, $data.serverIP]
        ])
      ]),
      vue.createElementVNode("view", null, [
        vue.createElementVNode("label", null, "服务器端口:"),
        vue.withDirectives(vue.createElementVNode(
          "input",
          {
            "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.serverPort = $event),
            placeholder: "请输入服务器端口"
          },
          null,
          512
          /* NEED_PATCH */
        ), [
          [vue.vModelText, $data.serverPort]
        ])
      ]),
      vue.createElementVNode("button", {
        onClick: _cache[2] || (_cache[2] = (...args) => $options.saveConfigs && $options.saveConfigs(...args))
      }, "保存配置")
    ]);
  }
  const PagesConfigConfig = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/config/config.vue"]]);
  const _imports_0$1 = "/static/logOut.png";
  const _imports_1 = "/static/bind.png";
  const _imports_2 = "/static/bindQuery.png";
  const _imports_3 = "/static/callIn.png";
  const _imports_4 = "/static/callOut.png";
  const _imports_5 = "/static/stockTaking.png";
  const _imports_6 = "/static/task.png";
  const _imports_7 = "/static/shelfLocation.png";
  const _sfc_main$f = {
    data() {
      return {
        hasPermission: true
      };
    },
    methods: {
      handleNavigatorTap: function(pageName) {
        var roleName = getConfig("roleName", "");
        var requiredRole = "PDA" + pageName;
        formatAppLog("log", "at pages/main/main.vue:107", "roleName:", roleName);
        formatAppLog("log", "at pages/main/main.vue:108", "requiredRole:", requiredRole);
        this.hasPermission = roleName.includes(requiredRole);
        let url = "";
        switch (pageName) {
          case "物料绑定":
            url = "../bind/bind";
            break;
          case "绑定查询":
            url = "../queryBindList/queryBindList";
            break;
          case "产线呼叫":
            url = "../productionLineCallIn/productionLineCallIn";
            break;
          case "货架送回":
            url = "../productionLineCallOut/productionLineCallOut";
            break;
          case "库存盘点":
            url = "../stockTaking/stockTaking";
            break;
          case "任务管理":
            url = "../agvTasks/agvTasks";
            break;
          case "货架位置绑定解绑":
            url = "../shelfLocationBindUnbind/shelfLocationBindUnbind";
            break;
          default:
            url = "";
        }
        if (this.hasPermission) {
          wx.navigateTo({
            url
          });
        } else {
          wx.showToast({
            title: "您没有权限进行此操作",
            icon: "none",
            duration: 2e3
          });
        }
      }
    }
  };
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createElementVNode("view", null, [
        vue.createElementVNode("navigator", {
          url: "../index/index",
          "open-type": "redirect",
          "hover-class": "other-navigator-hover"
        }, [
          vue.createElementVNode("view", { class: "logOut-container" }, [
            vue.createElementVNode("image", {
              class: "logOut-image",
              src: _imports_0$1
            })
          ])
        ])
      ]),
      vue.createElementVNode("view", { style: { "display": "flex", "flex-direction": "row", "margin-bottom": "10rpx", "margin-top": "30rpx" } }, [
        vue.createElementVNode("view", { style: { "flex": "1" } }),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[0] || (_cache[0] = ($event) => $options.handleNavigatorTap("物料绑定"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_1
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "物料绑定")
          ])
        ]),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[1] || (_cache[1] = ($event) => $options.handleNavigatorTap("绑定查询"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_2
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "绑定查询")
          ])
        ]),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[2] || (_cache[2] = ($event) => $options.handleNavigatorTap("产线呼叫"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_3
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "产线呼叫")
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "1" } })
      ]),
      vue.createElementVNode("view", { style: { "display": "flex", "flex-direction": "row", "margin-bottom": "10rpx", "margin-top": "30rpx" } }, [
        vue.createElementVNode("view", { style: { "flex": "1" } }),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[3] || (_cache[3] = ($event) => $options.handleNavigatorTap("货架送回"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_4
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "货架送回")
          ])
        ]),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[4] || (_cache[4] = ($event) => $options.handleNavigatorTap("库存盘点"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_5
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "库存盘点")
          ])
        ]),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[5] || (_cache[5] = ($event) => $options.handleNavigatorTap("任务管理"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_6
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "任务管理")
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "1" } })
      ]),
      vue.createElementVNode("view", { style: { "display": "flex", "flex-direction": "row", "margin-bottom": "10rpx", "margin-top": "30rpx" } }, [
        vue.createElementVNode("view", { style: { "flex": "1" } }),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }, [
          vue.createElementVNode("view", {
            "hover-class": "navigator-hover",
            onClick: _cache[6] || (_cache[6] = ($event) => $options.handleNavigatorTap("货架位置绑定解绑"))
          }, [
            vue.createElementVNode("view", {
              class: "uni-flex uni-row",
              style: { "-webkit-justify-content": "center", "justify-content": "center" }
            }, [
              vue.createElementVNode("image", {
                class: "function-image",
                src: _imports_7
              })
            ]),
            vue.createElementVNode("view", { class: "function-text" }, "货架位置绑定解绑")
          ])
        ]),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }),
        vue.createElementVNode("view", {
          class: "uni-flex uni-column",
          style: { "flex": "5" }
        }),
        vue.createElementVNode("view", { style: { "flex": "1" } })
      ])
    ]);
  }
  const PagesMainMain = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/main/main.vue"]]);
  const _sfc_main$e = {
    data() {
      return {
        visible: false,
        matCodeCondition: "",
        userName: "",
        matBaseInfoList: [],
        // 用于存储物料数据的数组
        scrollTop: 0,
        showScrollbar: true
      };
    },
    methods: {
      show() {
        this.visible = true;
        this.matCodeCondition = getConfig("matCodeCondition", "");
        formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:45", "scroll - view height:", this.matCodeCondition);
        this.userName = getConfig("userName", "");
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/matBaseInfo/getMatBaseInfo",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "MatCode": this.matCodeCondition,
            "MatName": "",
            "MatSpec": "",
            "IsEnable": null,
            "PageNumber": 1,
            "PageSize": 20,
            "UserName": this.userName,
            "DeviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data.lists != null && res.data.data.lists.length > 0) {
                  this.matBaseInfoList = res.data.data.lists;
                  formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:74", "matBaseInfoList:", this.matBaseInfoList);
                } else {
                  this.visible = false;
                  this.matBaseInfoList = null;
                  uni.showToast({
                    title: "根据查询条件未查询到物料!",
                    icon: "none",
                    duration: 2e3
                  });
                }
              } else {
                this.visible = false;
                this.matBaseInfoList = null;
                uni.showToast({
                  title: "查询物料失败:" + res.data.message,
                  icon: "none",
                  duration: 2e3
                });
              }
            } else {
              uni.showToast({
                title: "查询物料失败:服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 1500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
          },
          complete: (event) => {
            formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:111", "请求完成", event);
          }
        });
      },
      handleClose() {
        this.visible = false;
        this.$emit("close");
      },
      onItemClick(item) {
        uni.showToast({
          title: "选择成功",
          icon: "none",
          duration: 1200
        });
        this.visible = false;
        this.$emit("selected", item);
      },
      upper() {
        formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:129", "scrolltoupper");
      },
      lower() {
        formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:132", "scrolltolower");
      },
      scroll() {
        formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:135", "scroll");
      },
      end() {
        formatAppLog("log", "at pages/bindSelectMat/bindSelectMat.vue:138", "scrollend");
      }
    }
  };
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
    return $data.visible ? (vue.openBlock(), vue.createElementBlock("view", {
      key: 0,
      class: "popup-container"
    }, [
      vue.createElementVNode("view", { class: "popup-content" }, [
        vue.createElementVNode("scroll-view", {
          "scroll-top": $data.scrollTop,
          direction: "vertical",
          class: "scroll-Y",
          "scroll-with-animation": "true",
          onScrolltoupper: _cache[0] || (_cache[0] = (...args) => $options.upper && $options.upper(...args)),
          onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.lower && $options.lower(...args)),
          onScroll: _cache[2] || (_cache[2] = (...args) => $options.scroll && $options.scroll(...args)),
          onScrollend: _cache[3] || (_cache[3] = (...args) => $options.end && $options.end(...args)),
          "show-scrollbar": $data.showScrollbar
        }, [
          (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            null,
            vue.renderList($data.matBaseInfoList, (item, index) => {
              return vue.openBlock(), vue.createElementBlock("view", {
                key: index,
                class: "list-item",
                onClick: ($event) => $options.onItemClick(item)
              }, vue.toDisplayString(item.matCode) + " - " + vue.toDisplayString(item.matName), 9, ["onClick"]);
            }),
            128
            /* KEYED_FRAGMENT */
          ))
        ], 40, ["scroll-top", "show-scrollbar"])
      ]),
      vue.createElementVNode("button", {
        class: "button1",
        onClick: _cache[4] || (_cache[4] = (...args) => $options.handleClose && $options.handleClose(...args))
      }, "关    闭")
    ])) : vue.createCommentVNode("v-if", true);
  }
  const PagesBindSelectMatBindSelectMat = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-68e7b952"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/bindSelectMat/bindSelectMat.vue"]]);
  const _imports_0 = "/static/scan.png";
  const _sfc_main$d = {
    components: {
      bindSelectMat: PagesBindSelectMatBindSelectMat
    },
    data() {
      return {
        isNeedScanLocationCode: true,
        isNeedCallShelfCode: true,
        placeholderText: "请先扫描工位码",
        matCodeCondition: "",
        //物料编码搜索条件
        matBaseInfoId: null,
        matCode: "",
        locationId: null,
        locationCode: "",
        shelfId: null,
        shelfCode: "",
        matCode: "",
        matName: "",
        matBatch: "",
        matSpec: "",
        matQty: 0,
        //默认数量值
        // 货架区域选项
        shelfAreaOptions: [{
          id: 1,
          locationAreaName: "请先获取工位码"
        }],
        selectedShelfAreaIndex: 0,
        // 选择的货架区域索引
        // 需要的空货架类型选项
        shelfTypeOptions: [{
          id: 1,
          shelfTypeName: "请先获取工位码"
        }],
        selectedShelfTypeIndex: 0,
        // 选择的货架类型索引
        userName: ""
        //当前登录的用户名
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        formatAppLog("log", "at pages/bind/bind.vue:228", "Success:" + res.data);
        self.analysisScanCode(res.data);
      }, function(err) {
        formatAppLog("log", "at pages/bind/bind.vue:231", "Error:", JSON.stringify(err));
      });
    },
    methods: {
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/bind/bind.vue:239", "扫码结果:", res.result);
            this.analysisScanCode(res.result);
          },
          fail: (err) => {
            formatAppLog("error", "at pages/bind/bind.vue:243", "扫码失败:", err);
          }
        });
      },
      //扫码枪扫码
      analysisScanCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.locationCode = encodedString;
        this.getShelfInfoByLocationCode(true);
      },
      getShelfInfoByLocationCode: function(isTip) {
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaMatBind/getShelfInfoByLocationCode",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationCode": this.locationCode,
            "shelfCode": this.locationCode,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                this.matCodeCondition = "";
                this.locationId = res.data.data.locationId;
                this.locationCode = res.data.data.locationCode;
                this.shelfId = res.data.data.shelfId;
                this.shelfCode = res.data.data.shelfCode;
                this.shelfTypeOptions = res.data.data.shelfTypes;
                this.selectedShelfTypeIndex = getConfig("bindSelectedShelfTypeIndex", 0);
                this.shelfAreaOptions = res.data.data.locationArea;
                var index = getConfig("bindSelectedShelfAreaIndex", 0);
                if (index + 1 < this.shelfAreaOptions.length) {
                  this.selectedShelfAreaIndex = index;
                }
                if (this.shelfId == null) {
                  this.shelfCode = "(工位无货架，请呼叫！)";
                  this.isNeedScanLocationCode = false;
                  this.isNeedCallShelfCode = true;
                  this.placeholderText = "请呼叫货架";
                } else if (this.shelfId != null && this.shelfCode != null && this.shelfCode.includes("运输中")) {
                  this.placeholderText = "请等待货架运输";
                } else {
                  this.isNeedScanLocationCode = false;
                  this.isNeedCallShelfCode = false;
                  this.placeholderText = "输入编码或名称";
                }
                if (isTip) {
                  uni.showToast({
                    title: "获取成功!",
                    icon: "none",
                    duration: 1500
                  });
                }
              } else {
                if (isTip) {
                  uni.showToast({
                    title: "获取失败:" + res.data.message,
                    icon: "none",
                    duration: 3600
                  });
                  this.clear();
                }
              }
            } else {
              if (isTip) {
                uni.showToast({
                  title: "服务器返回错误状态码" + res.statusCode,
                  icon: "none",
                  duration: 3e3
                });
                this.clear();
              }
            }
          },
          fail: (err) => {
            if (isTip) {
              uni.showToast({
                title: "请求失败" + err.errMsg,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          complete: (event) => {
            formatAppLog("log", "at pages/bind/bind.vue:349", "请求完成", event);
          }
        });
      },
      bindSelectedMat: function(item) {
        formatAppLog("log", "at pages/bind/bind.vue:355", "用户选择了项目:", item);
        this.matCode = item.matCode;
        this.matName = item.matName;
        this.matSpec = item.matSpec;
        this.matQty = item.matDefaultQty;
        this.matBaseInfoId = item.id;
      },
      //物料绑定
      bind: function() {
        this.userName = getConfig("userName", "");
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaMatBind/bindMatDetail",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationId": this.locationId,
            "locationCode": this.locationCode,
            "shelfId": this.shelfId,
            "shelfCode": this.shelfCode,
            "matBaseInfoId": this.matBaseInfoId,
            "matCode": this.matCode,
            "matBatch": this.matBatch,
            "qty": this.matQty,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                this.clearMatInfo();
                uni.showToast({
                  title: "绑定成功!",
                  icon: "none",
                  duration: 1500
                });
              } else {
                this.visible = false;
                uni.showToast({
                  title: "绑定失败:" + res.data.message,
                  icon: "none",
                  duration: 1500
                });
              }
            } else {
              uni.showToast({
                title: "绑定失败:服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 1500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
          },
          complete: (event) => {
            formatAppLog("log", "at pages/bind/bind.vue:424", "请求完成", event);
          }
        });
      },
      queryMatList: function() {
        if (this.isNeedScanLocationCode) {
          uni.showToast({
            title: "请先扫描工位码！",
            icon: "none",
            duration: 1e3
          });
          return;
        }
        if (this.isNeedCallShelfCode) {
          uni.showToast({
            title: "请先呼叫货架！",
            icon: "none",
            duration: 1e3
          });
          this.getShelfInfoByLocationCode(false);
          return;
        }
        if (this.matCodeCondition == null || this.matCodeCondition == "") {
          uni.showToast({
            title: "输入物料编码或物料名称后进行查询！",
            icon: "none",
            duration: 1e3
          });
          return;
        } else {
          this.clearMatInfo();
          saveConfig("matCodeCondition", this.matCodeCondition);
          this.$refs.proup.show();
        }
      },
      //呼叫空货架
      callEmptyShelf: function() {
        if (this.isNeedScanLocationCode) {
          uni.showToast({
            title: "请先扫描工位码!",
            icon: "none",
            duration: 3e3
          });
          return;
        }
        if (this.selectedShelfTypeIndex == 0) {
          uni.showToast({
            title: "请选择需要呼叫的货架类型!",
            icon: "none",
            duration: 3e3
          });
          return;
        }
        saveConfig("bindSelectedShelfTypeIndex", this.selectedShelfTypeIndex);
        this.userName = getConfig("userName", "");
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaMatBind/callEmptyShelf",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationId": this.locationId,
            "locationCode": this.locationCode,
            "needShelfTypeId": this.shelfTypeOptions[this.selectedShelfTypeIndex].id,
            "needShelfTypeName": this.shelfTypeOptions[this.selectedShelfTypeIndex].shelfTypeName,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "呼叫成功，请等待!",
                  icon: "none",
                  duration: 2500
                });
                this.getShelfInfoByLocationCode(false);
              } else {
                uni.showToast({
                  title: "呼叫失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "呼叫失败:服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "http请求失败" + err.errMsg,
              icon: "none",
              duration: 2500
            });
          },
          complete: (event) => {
            formatAppLog("log", "at pages/bind/bind.vue:538", "请求完成", event);
          }
        });
      },
      //送回货架
      sendShelfBack: function() {
        if (this.isNeedScanLocationCode) {
          uni.showToast({
            title: "请先扫描工位码!",
            icon: "none",
            duration: 3e3
          });
          return;
        }
        if (this.shelfId == null) {
          uni.showToast({
            title: "当前工位无货架！无法送货架!",
            icon: "none",
            duration: 3e3
          });
          return;
        } else if (this.shelfId != null && this.shelfCode != null && this.shelfCode.includes("运输中")) {
          uni.showToast({
            title: "当前工位无货架！无法送货架!",
            icon: "none",
            duration: 3e3
          });
          return;
        }
        if (this.selectedShelfAreaIndex == 0) {
          uni.showToast({
            title: "请选择需要送回的位置区域",
            icon: "none",
            duration: 3e3
          });
          return;
        }
        saveConfig("bindSelectedShelfAreaIndex", this.selectedShelfAreaIndex);
        this.userName = getConfig("userName", "");
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaMatBind/bindSendBackShelf",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationId": this.locationId,
            "locationCode": this.locationCode,
            "shelfId": this.shelfId,
            "shelfCode": this.shelfCode,
            "sendBackLocationAreaId": this.shelfAreaOptions[this.selectedShelfAreaIndex].id,
            "sendBackLocationAreaName": this.shelfAreaOptions[this.selectedShelfAreaIndex].locationAreaName,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "送货架呼叫成功，请等待!",
                  icon: "none",
                  duration: 2500
                });
                this.getShelfInfoByLocationCode(false);
              } else {
                uni.showToast({
                  title: "送货架呼叫失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "送货架呼叫失败:服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "http请求失败" + err.errMsg,
              icon: "none",
              duration: 2500
            });
          },
          complete: (event) => {
            formatAppLog("log", "at pages/bind/bind.vue:640", "请求完成", event);
          }
        });
      },
      //清空当前界面所有内容
      clear: function() {
        this.locationId = null;
        this.locationCode = "";
        this.shelfId = null;
        this.shelfCode = "";
        this.isNeedCallShelfCode = true;
        this.isNeedScanLocationCode = true;
        this.placeholderText = "请先扫描工位码";
      },
      shelfTypeOptionChange(e) {
        this.selectedShelfTypeIndex = e.detail.value;
      },
      onShelfAreaChange(e) {
        this.selectedShelfAreaIndex = e.detail.value;
      },
      clearMatInfo: function() {
        this.matCode = "";
        this.matName = "";
        this.matSpec = "";
        this.matBatch = "";
        this.matQty = 0;
      },
      handlePopupClose() {
        formatAppLog("log", "at pages/bind/bind.vue:672", "弹出层已关闭");
      }
    }
  };
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_bindSelectMat = vue.resolveComponent("bindSelectMat");
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createVNode(_component_bindSelectMat, {
        type: "dialog",
        ref: "proup",
        onClose: $options.handlePopupClose,
        onSelected: $options.bindSelectedMat
      }, null, 8, ["onClose", "onSelected"]),
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ]),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[0] || (_cache[0] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                id: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.matCodeCondition = $event)
              }, null, 8, ["placeholder"]), [
                [vue.vModelText, $data.matCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[2] || (_cache[2] = (...args) => $options.queryMatList && $options.queryMatList(...args))
              }, "查询")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "20rpx" }
      }, [
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35", "font-weight": "700" } }, "货架类型："),
          vue.createElementVNode("view", {
            class: "shelf-type-picker-container",
            style: { "flex": "55", "font-size": "30rpx", "font-weight": "700" }
          }, [
            vue.createElementVNode("picker", {
              range: $data.shelfTypeOptions,
              onChange: _cache[3] || (_cache[3] = (...args) => $options.shelfTypeOptionChange && $options.shelfTypeOptionChange(...args)),
              "range-key": "shelfTypeName",
              value: $data.selectedShelfTypeIndex,
              style: { "font-size": "35rpx" }
            }, [
              vue.createElementVNode(
                "view",
                {
                  class: "uni-input",
                  style: { "padding-left": "5rpx" }
                },
                vue.toDisplayString($data.shelfTypeOptions[$data.selectedShelfTypeIndex].shelfTypeName),
                1
                /* TEXT */
              )
            ], 40, ["range", "value"])
          ]),
          vue.createElementVNode("view", { style: { "flex": "3" } }),
          vue.createElementVNode("view", { style: { "flex": "32" } }, [
            vue.createElementVNode("button", {
              class: "mini-btn",
              type: "warn",
              size: "mini",
              onClick: _cache[4] || (_cache[4] = (...args) => $options.callEmptyShelf && $options.callEmptyShelf(...args))
            }, "呼叫货架")
          ])
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "工位编码："),
          vue.createElementVNode(
            "view",
            { style: { "flex": "90", "overflow": "hidden" } },
            vue.toDisplayString($data.locationCode),
            1
            /* TEXT */
          ),
          vue.createCommentVNode(' \r\n				<view style="flex: 30;">\r\n					<button class="mini-btn" type="warn" size="mini" @click="callEmptyShelf">呼叫货架</button>\r\n				</view> ')
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "货架编码："),
          vue.createElementVNode(
            "view",
            { style: { "flex": "90", "overflow": "hidden" } },
            vue.toDisplayString($data.shelfCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "物料编码："),
          vue.createElementVNode(
            "view",
            { style: { "flex": "90", "overflow": "hidden" } },
            vue.toDisplayString($data.matCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "物料名称："),
          vue.createElementVNode(
            "view",
            { style: { "flex": "90", "overflow": "hidden" } },
            vue.toDisplayString($data.matName),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "物料规格："),
          vue.createElementVNode(
            "view",
            { style: { "flex": "90", "overflow": "hidden" } },
            vue.toDisplayString($data.matSpec),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "物料批次："),
          vue.createElementVNode("view", {
            class: "uni-input-wrapper",
            style: { "flex": "80" }
          }, [
            vue.withDirectives(vue.createElementVNode(
              "input",
              {
                class: "uni-input",
                style: { "font-size": "40rpx" },
                placeholder: "请输入批次",
                "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matBatch = $event)
              },
              null,
              512
              /* NEED_PATCH */
            ), [
              [vue.vModelText, $data.matBatch]
            ])
          ]),
          vue.createElementVNode("view", { style: { "flex": "10" } })
        ]),
        vue.createElementVNode("view", {
          class: "diy-flex-inforow",
          style: { "flex": "1" }
        }, [
          vue.createElementVNode("view", { style: { "flex": "5" } }),
          vue.createElementVNode("view", { style: { "flex": "35" } }, "物料数量："),
          vue.createElementVNode("view", {
            class: "uni-input-wrapper",
            style: { "flex": "50" }
          }, [
            vue.withDirectives(vue.createElementVNode(
              "input",
              {
                class: "uni-input",
                type: "number",
                style: { "font-size": "40rpx" },
                placeholder: "请输入物料数量",
                "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.matQty = $event)
              },
              null,
              512
              /* NEED_PATCH */
            ), [
              [vue.vModelText, $data.matQty]
            ])
          ]),
          vue.createElementVNode("view", { style: { "flex": "40" } }, [
            vue.createElementVNode("button", {
              onClick: _cache[7] || (_cache[7] = (...args) => $options.bind && $options.bind(...args)),
              class: "mini-btn",
              style: { "margin-left": "10rpx" },
              type: "warn",
              size: "mini"
            }, "绑定")
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "1" } }, [
          vue.createElementVNode("view", { style: { "flex": "40", "text-align": "center" } }, [
            vue.createElementVNode("view", { class: "picker-container" }, [
              vue.createElementVNode("view", null, " 点击选择送回区域："),
              vue.createElementVNode("picker", {
                ref: "shelfAreaPicker",
                range: $data.shelfAreaOptions,
                "range-key": "locationAreaName",
                value: $data.selectedShelfAreaIndex,
                onChange: _cache[8] || (_cache[8] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
                style: { "font-size": "35rpx" }
              }, [
                vue.createElementVNode(
                  "view",
                  { class: "uni-input" },
                  vue.toDisplayString($data.shelfAreaOptions[$data.selectedShelfAreaIndex].locationAreaName),
                  1
                  /* TEXT */
                )
              ], 40, ["range", "value"])
            ]),
            vue.createElementVNode("button", {
              style: { "font-size": "40rpx", "margin": "15rpx", "background-color": "green" },
              size: "mini",
              onClick: _cache[9] || (_cache[9] = (...args) => $options.sendShelfBack && $options.sendShelfBack(...args))
            }, "送货架")
          ])
        ])
      ])
    ]);
  }
  const PagesBindBind = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/bind/bind.vue"]]);
  class MPAnimation {
    constructor(options, _this) {
      this.options = options;
      this.animation = uni.createAnimation(options);
      this.currentStepAnimates = {};
      this.next = 0;
      this.$ = _this;
    }
    _nvuePushAnimates(type, args) {
      let aniObj = this.currentStepAnimates[this.next];
      let styles = {};
      if (!aniObj) {
        styles = {
          styles: {},
          config: {}
        };
      } else {
        styles = aniObj;
      }
      if (animateTypes1.includes(type)) {
        if (!styles.styles.transform) {
          styles.styles.transform = "";
        }
        let unit = "";
        if (type === "rotate") {
          unit = "deg";
        }
        styles.styles.transform += `${type}(${args + unit}) `;
      } else {
        styles.styles[type] = `${args}`;
      }
      this.currentStepAnimates[this.next] = styles;
    }
    _animateRun(styles = {}, config = {}) {
      let ref = this.$.$refs["ani"].ref;
      if (!ref)
        return;
      return new Promise((resolve, reject) => {
        nvueAnimation.transition(ref, {
          styles,
          ...config
        }, (res) => {
          resolve();
        });
      });
    }
    _nvueNextAnimate(animates, step = 0, fn) {
      let obj = animates[step];
      if (obj) {
        let {
          styles,
          config
        } = obj;
        this._animateRun(styles, config).then(() => {
          step += 1;
          this._nvueNextAnimate(animates, step, fn);
        });
      } else {
        this.currentStepAnimates = {};
        typeof fn === "function" && fn();
        this.isEnd = true;
      }
    }
    step(config = {}) {
      this.animation.step(config);
      return this;
    }
    run(fn) {
      this.$.animationData = this.animation.export();
      this.$.timer = setTimeout(() => {
        typeof fn === "function" && fn();
      }, this.$.durationTime);
    }
  }
  const animateTypes1 = [
    "matrix",
    "matrix3d",
    "rotate",
    "rotate3d",
    "rotateX",
    "rotateY",
    "rotateZ",
    "scale",
    "scale3d",
    "scaleX",
    "scaleY",
    "scaleZ",
    "skew",
    "skewX",
    "skewY",
    "translate",
    "translate3d",
    "translateX",
    "translateY",
    "translateZ"
  ];
  const animateTypes2 = ["opacity", "backgroundColor"];
  const animateTypes3 = ["width", "height", "left", "right", "top", "bottom"];
  animateTypes1.concat(animateTypes2, animateTypes3).forEach((type) => {
    MPAnimation.prototype[type] = function(...args) {
      this.animation[type](...args);
      return this;
    };
  });
  function createAnimation(option, _this) {
    if (!_this)
      return;
    clearTimeout(_this.timer);
    return new MPAnimation(option, _this);
  }
  const _sfc_main$c = {
    name: "uniTransition",
    emits: ["click", "change"],
    props: {
      show: {
        type: Boolean,
        default: false
      },
      modeClass: {
        type: [Array, String],
        default() {
          return "fade";
        }
      },
      duration: {
        type: Number,
        default: 300
      },
      styles: {
        type: Object,
        default() {
          return {};
        }
      },
      customClass: {
        type: String,
        default: ""
      }
    },
    data() {
      return {
        isShow: false,
        transform: "",
        opacity: 1,
        animationData: {},
        durationTime: 300,
        config: {}
      };
    },
    watch: {
      show: {
        handler(newVal) {
          if (newVal) {
            this.open();
          } else {
            if (this.isShow) {
              this.close();
            }
          }
        },
        immediate: true
      }
    },
    computed: {
      // 生成样式数据
      stylesObject() {
        let styles = {
          ...this.styles,
          "transition-duration": this.duration / 1e3 + "s"
        };
        let transform = "";
        for (let i in styles) {
          let line = this.toLine(i);
          transform += line + ":" + styles[i] + ";";
        }
        return transform;
      },
      // 初始化动画条件
      transformStyles() {
        return "transform:" + this.transform + ";opacity:" + this.opacity + ";" + this.stylesObject;
      }
    },
    created() {
      this.config = {
        duration: this.duration,
        timingFunction: "ease",
        transformOrigin: "50% 50%",
        delay: 0
      };
      this.durationTime = this.duration;
    },
    methods: {
      /**
       *  ref 触发 初始化动画
       */
      init(obj = {}) {
        if (obj.duration) {
          this.durationTime = obj.duration;
        }
        this.animation = createAnimation(Object.assign(this.config, obj), this);
      },
      /**
       * 点击组件触发回调
       */
      onClick() {
        this.$emit("click", {
          detail: this.isShow
        });
      },
      /**
       * ref 触发 动画分组
       * @param {Object} obj
       */
      step(obj, config = {}) {
        if (!this.animation)
          return;
        for (let i in obj) {
          try {
            if (typeof obj[i] === "object") {
              this.animation[i](...obj[i]);
            } else {
              this.animation[i](obj[i]);
            }
          } catch (e) {
            formatAppLog("error", "at uni_modules/uni-transition/components/uni-transition/uni-transition.vue:139", `方法 ${i} 不存在`);
          }
        }
        this.animation.step(config);
        return this;
      },
      /**
       *  ref 触发 执行动画
       */
      run(fn) {
        if (!this.animation)
          return;
        this.animation.run(fn);
      },
      // 开始过度动画
      open() {
        clearTimeout(this.timer);
        this.transform = "";
        this.isShow = true;
        let { opacity, transform } = this.styleInit(false);
        if (typeof opacity !== "undefined") {
          this.opacity = opacity;
        }
        this.transform = transform;
        this.$nextTick(() => {
          this.timer = setTimeout(() => {
            this.animation = createAnimation(this.config, this);
            this.tranfromInit(false).step();
            this.animation.run();
            this.$emit("change", {
              detail: this.isShow
            });
          }, 20);
        });
      },
      // 关闭过度动画
      close(type) {
        if (!this.animation)
          return;
        this.tranfromInit(true).step().run(() => {
          this.isShow = false;
          this.animationData = null;
          this.animation = null;
          let { opacity, transform } = this.styleInit(false);
          this.opacity = opacity || 1;
          this.transform = transform;
          this.$emit("change", {
            detail: this.isShow
          });
        });
      },
      // 处理动画开始前的默认样式
      styleInit(type) {
        let styles = {
          transform: ""
        };
        let buildStyle = (type2, mode) => {
          if (mode === "fade") {
            styles.opacity = this.animationType(type2)[mode];
          } else {
            styles.transform += this.animationType(type2)[mode] + " ";
          }
        };
        if (typeof this.modeClass === "string") {
          buildStyle(type, this.modeClass);
        } else {
          this.modeClass.forEach((mode) => {
            buildStyle(type, mode);
          });
        }
        return styles;
      },
      // 处理内置组合动画
      tranfromInit(type) {
        let buildTranfrom = (type2, mode) => {
          let aniNum = null;
          if (mode === "fade") {
            aniNum = type2 ? 0 : 1;
          } else {
            aniNum = type2 ? "-100%" : "0";
            if (mode === "zoom-in") {
              aniNum = type2 ? 0.8 : 1;
            }
            if (mode === "zoom-out") {
              aniNum = type2 ? 1.2 : 1;
            }
            if (mode === "slide-right") {
              aniNum = type2 ? "100%" : "0";
            }
            if (mode === "slide-bottom") {
              aniNum = type2 ? "100%" : "0";
            }
          }
          this.animation[this.animationMode()[mode]](aniNum);
        };
        if (typeof this.modeClass === "string") {
          buildTranfrom(type, this.modeClass);
        } else {
          this.modeClass.forEach((mode) => {
            buildTranfrom(type, mode);
          });
        }
        return this.animation;
      },
      animationType(type) {
        return {
          fade: type ? 1 : 0,
          "slide-top": `translateY(${type ? "0" : "-100%"})`,
          "slide-right": `translateX(${type ? "0" : "100%"})`,
          "slide-bottom": `translateY(${type ? "0" : "100%"})`,
          "slide-left": `translateX(${type ? "0" : "-100%"})`,
          "zoom-in": `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
          "zoom-out": `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
        };
      },
      // 内置动画类型与实际动画对应字典
      animationMode() {
        return {
          fade: "opacity",
          "slide-top": "translateY",
          "slide-right": "translateX",
          "slide-bottom": "translateY",
          "slide-left": "translateX",
          "zoom-in": "scale",
          "zoom-out": "scale"
        };
      },
      // 驼峰转中横线
      toLine(name) {
        return name.replace(/([A-Z])/g, "-$1").toLowerCase();
      }
    }
  };
  function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
    return $data.isShow ? (vue.openBlock(), vue.createElementBlock("view", {
      key: 0,
      ref: "ani",
      animation: $data.animationData,
      class: vue.normalizeClass($props.customClass),
      style: vue.normalizeStyle($options.transformStyles),
      onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args))
    }, [
      vue.renderSlot(_ctx.$slots, "default")
    ], 14, ["animation"])) : vue.createCommentVNode("v-if", true);
  }
  const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/uni_modules/uni-transition/components/uni-transition/uni-transition.vue"]]);
  const _sfc_main$b = {
    name: "uniPopup",
    components: {},
    emits: ["change", "maskClick"],
    props: {
      // 开启动画
      animation: {
        type: Boolean,
        default: true
      },
      // 弹出层类型，可选值，top: 顶部弹出层；bottom：底部弹出层；center：全屏弹出层
      // message: 消息提示 ; dialog : 对话框
      type: {
        type: String,
        default: "center"
      },
      // maskClick
      isMaskClick: {
        type: Boolean,
        default: null
      },
      // TODO 2 个版本后废弃属性 ，使用 isMaskClick
      maskClick: {
        type: Boolean,
        default: null
      },
      backgroundColor: {
        type: String,
        default: "none"
      },
      safeArea: {
        type: Boolean,
        default: true
      },
      maskBackgroundColor: {
        type: String,
        default: "rgba(0, 0, 0, 0.4)"
      }
    },
    watch: {
      /**
       * 监听type类型
       */
      type: {
        handler: function(type) {
          if (!this.config[type])
            return;
          this[this.config[type]](true);
        },
        immediate: true
      },
      isDesktop: {
        handler: function(newVal) {
          if (!this.config[newVal])
            return;
          this[this.config[this.type]](true);
        },
        immediate: true
      },
      /**
       * 监听遮罩是否可点击
       * @param {Object} val
       */
      maskClick: {
        handler: function(val) {
          this.mkclick = val;
        },
        immediate: true
      },
      isMaskClick: {
        handler: function(val) {
          this.mkclick = val;
        },
        immediate: true
      },
      // H5 下禁止底部滚动
      showPopup(show) {
      }
    },
    data() {
      return {
        duration: 300,
        ani: [],
        showPopup: false,
        showTrans: false,
        popupWidth: 0,
        popupHeight: 0,
        config: {
          top: "top",
          bottom: "bottom",
          center: "center",
          left: "left",
          right: "right",
          message: "top",
          dialog: "center",
          share: "bottom"
        },
        maskClass: {
          position: "fixed",
          bottom: 0,
          top: 0,
          left: 0,
          right: 0,
          backgroundColor: "rgba(0, 0, 0, 0.4)"
        },
        transClass: {
          position: "fixed",
          left: 0,
          right: 0
        },
        maskShow: true,
        mkclick: true,
        popupstyle: this.isDesktop ? "fixforpc-top" : "top"
      };
    },
    computed: {
      isDesktop() {
        return this.popupWidth >= 500 && this.popupHeight >= 500;
      },
      bg() {
        if (this.backgroundColor === "" || this.backgroundColor === "none") {
          return "transparent";
        }
        return this.backgroundColor;
      }
    },
    mounted() {
      const fixSize = () => {
        const {
          windowWidth,
          windowHeight,
          windowTop,
          safeArea,
          screenHeight,
          safeAreaInsets
        } = uni.getSystemInfoSync();
        this.popupWidth = windowWidth;
        this.popupHeight = windowHeight + (windowTop || 0);
        if (safeArea && this.safeArea) {
          this.safeAreaInsets = safeAreaInsets.bottom;
        } else {
          this.safeAreaInsets = 0;
        }
      };
      fixSize();
    },
    // TODO vue3
    unmounted() {
      this.setH5Visible();
    },
    created() {
      if (this.isMaskClick === null && this.maskClick === null) {
        this.mkclick = true;
      } else {
        this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
      }
      if (this.animation) {
        this.duration = 300;
      } else {
        this.duration = 0;
      }
      this.messageChild = null;
      this.clearPropagation = false;
      this.maskClass.backgroundColor = this.maskBackgroundColor;
    },
    methods: {
      setH5Visible() {
      },
      /**
       * 公用方法，不显示遮罩层
       */
      closeMask() {
        this.maskShow = false;
      },
      /**
       * 公用方法，遮罩层禁止点击
       */
      disableMask() {
        this.mkclick = false;
      },
      // TODO nvue 取消冒泡
      clear(e) {
        e.stopPropagation();
        this.clearPropagation = true;
      },
      open(direction) {
        if (this.showPopup) {
          clearTimeout(this.timer);
          this.showPopup = false;
        }
        let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
        if (!(direction && innerType.indexOf(direction) !== -1)) {
          direction = this.type;
        }
        if (!this.config[direction]) {
          formatAppLog("error", "at uni_modules/uni-popup/components/uni-popup/uni-popup.vue:280", "缺少类型：", direction);
          return;
        }
        this[this.config[direction]]();
        this.$emit("change", {
          show: true,
          type: direction
        });
      },
      close(type) {
        this.showTrans = false;
        this.$emit("change", {
          show: false,
          type: this.type
        });
        clearTimeout(this.timer);
        this.timer = setTimeout(() => {
          this.showPopup = false;
        }, 300);
      },
      // TODO 处理冒泡事件，头条的冒泡事件有问题 ，先这样兼容
      touchstart() {
        this.clearPropagation = false;
      },
      onTap() {
        if (this.clearPropagation) {
          this.clearPropagation = false;
          return;
        }
        this.$emit("maskClick");
        if (!this.mkclick)
          return;
        this.close();
      },
      /**
       * 顶部弹出样式处理
       */
      top(type) {
        this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
        this.ani = ["slide-top"];
        this.transClass = {
          position: "fixed",
          left: 0,
          right: 0,
          backgroundColor: this.bg
        };
        if (type)
          return;
        this.showPopup = true;
        this.showTrans = true;
        this.$nextTick(() => {
          if (this.messageChild && this.type === "message") {
            this.messageChild.timerClose();
          }
        });
      },
      /**
       * 底部弹出样式处理
       */
      bottom(type) {
        this.popupstyle = "bottom";
        this.ani = ["slide-bottom"];
        this.transClass = {
          position: "fixed",
          left: 0,
          right: 0,
          bottom: 0,
          paddingBottom: this.safeAreaInsets + "px",
          backgroundColor: this.bg
        };
        if (type)
          return;
        this.showPopup = true;
        this.showTrans = true;
      },
      /**
       * 中间弹出样式处理
       */
      center(type) {
        this.popupstyle = "center";
        this.ani = ["zoom-out", "fade"];
        this.transClass = {
          position: "fixed",
          display: "flex",
          flexDirection: "column",
          bottom: 0,
          left: 0,
          right: 0,
          top: 0,
          justifyContent: "center",
          alignItems: "center"
        };
        if (type)
          return;
        this.showPopup = true;
        this.showTrans = true;
      },
      left(type) {
        this.popupstyle = "left";
        this.ani = ["slide-left"];
        this.transClass = {
          position: "fixed",
          left: 0,
          bottom: 0,
          top: 0,
          backgroundColor: this.bg,
          display: "flex",
          flexDirection: "column"
        };
        if (type)
          return;
        this.showPopup = true;
        this.showTrans = true;
      },
      right(type) {
        this.popupstyle = "right";
        this.ani = ["slide-right"];
        this.transClass = {
          position: "fixed",
          bottom: 0,
          right: 0,
          top: 0,
          backgroundColor: this.bg,
          display: "flex",
          flexDirection: "column"
        };
        if (type)
          return;
        this.showPopup = true;
        this.showTrans = true;
      }
    }
  };
  function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
    return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
      "view",
      {
        key: 0,
        class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]])
      },
      [
        vue.createElementVNode(
          "view",
          {
            onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args))
          },
          [
            $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, {
              key: "1",
              name: "mask",
              "mode-class": "fade",
              styles: $data.maskClass,
              duration: $data.duration,
              show: $data.showTrans,
              onClick: $options.onTap
            }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true),
            vue.createVNode(_component_uni_transition, {
              key: "2",
              "mode-class": $data.ani,
              name: "content",
              styles: $data.transClass,
              duration: $data.duration,
              show: $data.showTrans,
              onClick: $options.onTap
            }, {
              default: vue.withCtx(() => [
                vue.createElementVNode(
                  "view",
                  {
                    class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]),
                    style: vue.normalizeStyle({ backgroundColor: $options.bg }),
                    onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args))
                  },
                  [
                    vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
                  ],
                  6
                  /* CLASS, STYLE */
                )
              ]),
              _: 3
              /* FORWARDED */
            }, 8, ["mode-class", "styles", "duration", "show", "onClick"])
          ],
          32
          /* NEED_HYDRATION */
        )
      ],
      2
      /* CLASS */
    )) : vue.createCommentVNode("v-if", true);
  }
  const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-4dd3c44b"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/uni_modules/uni-popup/components/uni-popup/uni-popup.vue"]]);
  const _sfc_main$a = {
    __name: "Card",
    props: {
      item: {
        type: Object,
        required: true
      },
      currentIndex: {
        type: Number,
        required: true
      },
      cardData: {
        type: Array,
        required: true
      }
    },
    setup(__props, { expose: __expose }) {
      __expose();
      const props = __props;
      const __returned__ = { props, ref: vue.ref };
      Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
      return __returned__;
    }
  };
  function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
      vue.createElementVNode("view", { class: "card-header" }, [
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode(
            "text",
            { class: "center-element" },
            vue.toDisplayString($props.item.matCode),
            1
            /* TEXT */
          ),
          vue.createElementVNode(
            "text",
            { class: "right-element" },
            vue.toDisplayString($props.currentIndex + 1) + "/" + vue.toDisplayString($props.cardData.length),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", { class: "card-content" }, [
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "名称:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matName),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "批次:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matBatch),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "规格:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matSpec),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "content-item",
          style: { "font-weight": "600" }
        }, [
          vue.createElementVNode("text", null, "数量:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matQty),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "400", "color": "firebrick" }
          }, [
            vue.createElementVNode("text", null, "库位:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.locationCode),
              1
              /* TEXT */
            )
          ]),
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "400", "color": "firebrick" }
          }, [
            vue.createElementVNode("text", null, "货架:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.shelfCode),
              1
              /* TEXT */
            )
          ])
        ]),
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "600", "color": "violet" }
          }, [
            vue.createElementVNode("text", null, "人员:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.modifyUser),
              1
              /* TEXT */
            )
          ]),
          vue.createElementVNode("view", { class: "content-time" }, [
            vue.createElementVNode("text", null, "更新时间:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.modifyTime),
              1
              /* TEXT */
            )
          ])
        ])
      ])
    ]);
  }
  const Card = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-29c414df"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/components/Card.vue"]]);
  const _sfc_main$9 = {
    name: "uniPopup",
    components: {},
    emits: ["change", "maskClick"],
    props: {
      // 开启动画
      animation: {
        type: Boolean,
        default: true
      },
      // 弹出层类型，可选值，top: 顶部弹出层；bottom：底部弹出层；center：全屏弹出层
      // message: 消息提示 ; dialog : 对话框
      type: {
        type: String,
        default: "center"
      },
      // maskClick
      isMaskClick: {
        type: Boolean,
        default: null
      },
      // TODO 2 个版本后废弃属性 ，使用 isMaskClick
      maskClick: {
        type: Boolean,
        default: null
      },
      backgroundColor: {
        type: String,
        default: "none"
      },
      safeArea: {
        type: Boolean,
        default: true
      },
      maskBackgroundColor: {
        type: String,
        default: "rgba(0, 0, 0, 0.4)"
      },
      borderRadius: {
        type: String
      }
    },
    watch: {
      /**
       * 监听type类型
       */
      type: {
        handler: function(type) {
          if (!this.config[type])
            return;
          this[this.config[type]](true);
        },
        immediate: true
      },
      isDesktop: {
        handler: function(newVal) {
          if (!this.config[newVal])
            return;
          this[this.config[this.type]](true);
        },
        immediate: true
      },
      /**
       * 监听遮罩是否可点击
       * @param {Object} val
       */
      maskClick: {
        handler: function(val) {
          this.mkclick = val;
        },
        immediate: true
      },
      isMaskClick: {
        handler: function(val) {
          this.mkclick = val;
        },
        immediate: true
      },
      // H5 下禁止底部滚动
      showPopup(show) {
      }
    },
    data() {
      return {
        duration: 300,
        ani: [],
        showPopup: false,
        showTrans: false,
        popupWidth: 0,
        popupHeight: 0,
        config: {
          top: "top",
          bottom: "bottom",
          center: "center",
          left: "left",
          right: "right",
          message: "top",
          dialog: "center",
          share: "bottom"
        },
        maskClass: {
          position: "fixed",
          bottom: 0,
          top: 0,
          left: 0,
          right: 0,
          backgroundColor: "rgba(0, 0, 0, 0.4)"
        },
        transClass: {
          backgroundColor: "transparent",
          borderRadius: this.borderRadius || "0",
          position: "fixed",
          left: 0,
          right: 0
        },
        maskShow: true,
        mkclick: true,
        popupstyle: "top"
      };
    },
    computed: {
      getStyles() {
        let res = { backgroundColor: this.bg };
        if (this.borderRadius || "0") {
          res = Object.assign(res, { borderRadius: this.borderRadius });
        }
        return res;
      },
      isDesktop() {
        return this.popupWidth >= 500 && this.popupHeight >= 500;
      },
      bg() {
        if (this.backgroundColor === "" || this.backgroundColor === "none") {
          return "transparent";
        }
        return this.backgroundColor;
      }
    },
    mounted() {
      const fixSize = () => {
        const {
          windowWidth,
          windowHeight,
          windowTop,
          safeArea,
          screenHeight,
          safeAreaInsets
        } = uni.getSystemInfoSync();
        this.popupWidth = windowWidth;
        this.popupHeight = windowHeight + (windowTop || 0);
        if (safeArea && this.safeArea) {
          this.safeAreaInsets = safeAreaInsets.bottom;
        } else {
          this.safeAreaInsets = 0;
        }
      };
      fixSize();
    },
    // TODO vue3
    unmounted() {
      this.setH5Visible();
    },
    activated() {
      this.setH5Visible(!this.showPopup);
    },
    deactivated() {
      this.setH5Visible(true);
    },
    created() {
      if (this.isMaskClick === null && this.maskClick === null) {
        this.mkclick = true;
      } else {
        this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick;
      }
      if (this.animation) {
        this.duration = 300;
      } else {
        this.duration = 0;
      }
      this.messageChild = null;
      this.clearPropagation = false;
      this.maskClass.backgroundColor = this.maskBackgroundColor;
    },
    methods: {
      setH5Visible(visible = true) {
      },
      /**
       * 公用方法，不显示遮罩层
       */
      closeMask() {
        this.maskShow = false;
      },
      /**
       * 公用方法，遮罩层禁止点击
       */
      disableMask() {
        this.mkclick = false;
      },
      // TODO nvue 取消冒泡
      clear(e) {
        e.stopPropagation();
        this.clearPropagation = true;
      },
      open(direction) {
        if (this.showPopup) {
          return;
        }
        let innerType = ["top", "center", "bottom", "left", "right", "message", "dialog", "share"];
        if (!(direction && innerType.indexOf(direction) !== -1)) {
          direction = this.type;
        }
        if (!this.config[direction]) {
          formatAppLog("error", "at node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue:310", "缺少类型：", direction);
          return;
        }
        this[this.config[direction]]();
        this.$emit("change", {
          show: true,
          type: direction
        });
      },
      close(type) {
        this.showTrans = false;
        this.$emit("change", {
          show: false,
          type: this.type
        });
        clearTimeout(this.timer);
        this.timer = setTimeout(() => {
          this.showPopup = false;
        }, 300);
      },
      // TODO 处理冒泡事件，头条的冒泡事件有问题 ，先这样兼容
      touchstart() {
        this.clearPropagation = false;
      },
      onTap() {
        if (this.clearPropagation) {
          this.clearPropagation = false;
          return;
        }
        this.$emit("maskClick");
        if (!this.mkclick)
          return;
        this.close();
      },
      /**
       * 顶部弹出样式处理
       */
      top(type) {
        this.popupstyle = this.isDesktop ? "fixforpc-top" : "top";
        this.ani = ["slide-top"];
        this.transClass = {
          position: "fixed",
          left: 0,
          right: 0,
          backgroundColor: this.bg,
          borderRadius: this.borderRadius || "0"
        };
        if (type)
          return;
        this.showPopup = true;
        this.showTrans = true;
        this.$nextTick(() => {
          this.showPoptrans();
          if (this.messageChild && this.type === "message") {
            this.messageChild.timerClose();
          }
        });
      },
      /**
       * 底部弹出样式处理
       */
      bottom(type) {
        this.popupstyle = "bottom";
        this.ani = ["slide-bottom"];
        this.transClass = {
          position: "fixed",
          left: 0,
          right: 0,
          bottom: 0,
          paddingBottom: this.safeAreaInsets + "px",
          backgroundColor: this.bg,
          borderRadius: this.borderRadius || "0"
        };
        if (type)
          return;
        this.showPoptrans();
      },
      /**
       * 中间弹出样式处理
       */
      center(type) {
        this.popupstyle = "center";
        this.ani = ["zoom-out", "fade"];
        this.transClass = {
          position: "fixed",
          display: "flex",
          flexDirection: "column",
          bottom: 0,
          left: 0,
          right: 0,
          top: 0,
          justifyContent: "center",
          alignItems: "center",
          borderRadius: this.borderRadius || "0"
        };
        if (type)
          return;
        this.showPoptrans();
      },
      left(type) {
        this.popupstyle = "left";
        this.ani = ["slide-left"];
        this.transClass = {
          position: "fixed",
          left: 0,
          bottom: 0,
          top: 0,
          backgroundColor: this.bg,
          borderRadius: this.borderRadius || "0",
          display: "flex",
          flexDirection: "column"
        };
        if (type)
          return;
        this.showPoptrans();
      },
      right(type) {
        this.popupstyle = "right";
        this.ani = ["slide-right"];
        this.transClass = {
          position: "fixed",
          bottom: 0,
          right: 0,
          top: 0,
          backgroundColor: this.bg,
          borderRadius: this.borderRadius || "0",
          display: "flex",
          flexDirection: "column"
        };
        if (type)
          return;
        this.showPoptrans();
      },
      showPoptrans() {
        this.$nextTick(() => {
          this.showPopup = true;
          this.showTrans = true;
        });
      }
    }
  };
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_transition = resolveEasycom(vue.resolveDynamicComponent("uni-transition"), __easycom_0$1);
    return $data.showPopup ? (vue.openBlock(), vue.createElementBlock(
      "view",
      {
        key: 0,
        class: vue.normalizeClass(["uni-popup", [$data.popupstyle, $options.isDesktop ? "fixforpc-z-index" : ""]])
      },
      [
        vue.createElementVNode(
          "view",
          {
            onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.touchstart && $options.touchstart(...args))
          },
          [
            $data.maskShow ? (vue.openBlock(), vue.createBlock(_component_uni_transition, {
              key: "1",
              name: "mask",
              "mode-class": "fade",
              styles: $data.maskClass,
              duration: $data.duration,
              show: $data.showTrans,
              onClick: $options.onTap
            }, null, 8, ["styles", "duration", "show", "onClick"])) : vue.createCommentVNode("v-if", true),
            vue.createVNode(_component_uni_transition, {
              key: "2",
              "mode-class": $data.ani,
              name: "content",
              styles: $data.transClass,
              duration: $data.duration,
              show: $data.showTrans,
              onClick: $options.onTap
            }, {
              default: vue.withCtx(() => [
                vue.createElementVNode(
                  "view",
                  {
                    class: vue.normalizeClass(["uni-popup__wrapper", [$data.popupstyle]]),
                    style: vue.normalizeStyle($options.getStyles),
                    onClick: _cache[0] || (_cache[0] = (...args) => $options.clear && $options.clear(...args))
                  },
                  [
                    vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
                  ],
                  6
                  /* CLASS, STYLE */
                )
              ]),
              _: 3
              /* FORWARDED */
            }, 8, ["mode-class", "styles", "duration", "show", "onClick"])
          ],
          32
          /* NEED_HYDRATION */
        )
      ],
      2
      /* CLASS */
    )) : vue.createCommentVNode("v-if", true);
  }
  const uniPopup = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-7db519c7"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/node_modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup.vue"]]);
  const _sfc_main$8 = {
    components: {
      uniPopup,
      Card
    },
    setup() {
      const {
        proxy
      } = vue.getCurrentInstance();
      const fixedInfo = {
        infoId: 0,
        matCode: "示例名称",
        matName: "这是一段示例描述",
        matSpec: "",
        matBatch: "",
        matQty: 0
      };
      const popup = vue.ref(null);
      const inputValue = vue.ref("");
      const showPopup = (info) => {
        fixedInfo.infoId = info.id;
        fixedInfo.matCode = info.matCode;
        fixedInfo.matName = info.matName;
        fixedInfo.matBatch = info.matBatch;
        fixedInfo.matSpec = info.matSpec;
        fixedInfo.matQty = info.matQty;
        inputValue.value = info.matQty;
        popup.value.open();
      };
      const hidePopup = () => {
        popup.value.close();
      };
      const saveData = () => {
        if (inputValue.value == fixedInfo.matQty) {
          uni.showToast({
            title: "本次修改未修改数量",
            icon: "none",
            duration: 1500
          });
          hidePopup();
          return;
        }
        if (inputValue.value < 0) {
          uni.showToast({
            title: "您所输入的数量应该大于0！",
            icon: "none",
            duration: 1500
          });
          return;
        }
        if (inputValue.value == 0) {
          uni.showToast({
            title: "数量为0，请使用删除功能！",
            icon: "none",
            duration: 1500
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/updateMatDetailCurrentInfoById",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "matQty": inputValue.value,
            "matDetailCurrentInfoId": fixedInfo.infoId,
            "userName": getConfig("userName", "admin"),
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                hidePopup();
                uni.showToast({
                  title: "修改成功!",
                  icon: "none",
                  duration: 2e3
                });
                proxy.queryMatList();
              } else {
                uni.showToast({
                  title: "修改失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
          }
        });
      };
      const deleteData = () => {
        formatAppLog("log", "at pages/queryBindList/queryBindList.vue:251", "123");
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/deleteMatDetailCurrentInfo",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "needDeleteIds": [fixedInfo.infoId],
            "userName": getConfig("userName", "admin"),
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                hidePopup();
                uni.showToast({
                  title: "删除成功!",
                  icon: "none",
                  duration: 2e3
                });
                proxy.queryMatList();
              } else {
                uni.showToast({
                  title: "删除失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
          }
        });
      };
      return {
        fixedInfo,
        popup,
        inputValue,
        showPopup,
        hidePopup,
        saveData,
        deleteData
      };
    },
    data() {
      return {
        locationId: null,
        locationCode: "",
        userName: "",
        //当前登录的用户名
        recordCount: 0,
        shelfId: null,
        shelfCode: "",
        placeholderText: "请先扫描货架码",
        matCodeCondition: "",
        //物料编码搜索条件
        cardData: null,
        //监控滑动的位置
        touchStartX: 0,
        touchStartY: 0,
        isMove: false
        //滑动标识 是否滑动
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        formatAppLog("log", "at pages/queryBindList/queryBindList.vue:348", "Success:" + res.data);
        self.analysisScanCode(res.data);
      }, function(err) {
        formatAppLog("log", "at pages/queryBindList/queryBindList.vue:351", "Error:", JSON.stringify(err));
      });
    },
    methods: {
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/queryBindList/queryBindList.vue:359", "扫码结果:", res.result);
            this.analysisScanCode(res.result);
          },
          fail: (err) => {
            formatAppLog("error", "at pages/queryBindList/queryBindList.vue:363", "扫码失败:", err);
          }
        });
      },
      //扫码枪扫码
      analysisScanCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.shelfCode = encodedString;
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfCode": this.shelfCode,
            "matCode": "",
            "userName": this.userName,
            "deviceType": "PDA",
            "pageNumber": 1,
            "pageSize": 300
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "该货架不存在绑定的物料信息!",
                    icon: "none",
                    duration: 1500
                  });
                  return;
                }
                this.matCodeCondition = "";
                this.cardData = res.data.data.lists;
                this.recordCount = res.data.data.count;
                uni.showToast({
                  title: "获取成功!",
                  icon: "none",
                  duration: 100
                });
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/queryBindList/queryBindList.vue:458", "请求完成", event);
          }
        });
      },
      queryMatList: function() {
        if (this.shelfCode == null || this.shelfCode == "") {
          uni.showToast({
            title: "请先扫描货架码！",
            icon: "none",
            duration: 1e3
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfCode": this.shelfCode,
            "matCode": this.matCodeCondition,
            "userName": this.userName,
            "deviceType": "PDA",
            "pageNumber": 1,
            "pageSize": 300
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "该货架不存在绑定的物料信息!",
                    icon: "none",
                    duration: 1500
                  });
                  return;
                }
                this.cardData = res.data.data.lists;
                this.recordCount = res.data.data.count;
                uni.showToast({
                  title: "获取成功!",
                  icon: "none",
                  duration: 100
                });
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/queryBindList/queryBindList.vue:543", "请求完成", event);
          }
        });
      },
      //清空当前界面所有内容
      clear: function() {
        this.placeholderText = "请先扫描货架码";
        this.cardData = null;
        this.recordCount = 0;
      },
      //解决长按和滑动冲突的问题
      cardTouchStart(e) {
        this.isMove = false;
        this.touchStartX = e.touches[0].clientX;
        this.touchStartY = e.touches[0].clientY;
      },
      cardTouchMove(e) {
        var deltaX = e.changedTouches[0].clientX - this.touchStartX;
        var deltaY = e.changedTouches[0].clientY - this.touchStartY;
        if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
          this.isMove = true;
        }
      },
      //长按
      longpress(item) {
        if (this.isMove == false) {
          this.showPopup(item);
        }
      }
    }
  };
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
    const _component_Card = vue.resolveComponent("Card");
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createVNode(
        _component_uni_popup,
        {
          ref: "popup",
          type: "dialog"
        },
        {
          default: vue.withCtx(() => [
            vue.createElementVNode("view", { class: "popup-content" }, [
              vue.createElementVNode("view", null, [
                vue.createElementVNode("button", {
                  style: { "background-color": "firebrick", "margin-bottom": "10rpx", "color": "white" },
                  onClick: _cache[0] || (_cache[0] = (...args) => $setup.deleteData && $setup.deleteData(...args))
                }, "删除数据")
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料编码："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料名称："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matName),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料批次："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matBatch),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料规格："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matSpec),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", {
                class: "input-item",
                style: { "background-color": "wheat" }
              }, [
                vue.createElementVNode("label", null, "数量："),
                vue.withDirectives(vue.createElementVNode(
                  "input",
                  {
                    ref: "inputRef",
                    "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.inputValue = $event),
                    type: "number",
                    placeholder: "输入数量"
                  },
                  null,
                  512
                  /* NEED_PATCH */
                ), [
                  [
                    vue.vModelText,
                    $setup.inputValue,
                    void 0,
                    { number: true }
                  ]
                ])
              ]),
              vue.createElementVNode("view", { class: "button-group" }, [
                vue.createElementVNode("button", {
                  onClick: _cache[2] || (_cache[2] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
                }, "取消"),
                vue.createElementVNode("button", {
                  onClick: _cache[3] || (_cache[3] = (...args) => $setup.saveData && $setup.saveData(...args))
                }, "修改")
              ])
            ])
          ]),
          _: 1
          /* STABLE */
        },
        512
        /* NEED_PATCH */
      ),
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ]),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[4] || (_cache[4] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                id: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => $data.matCodeCondition = $event),
                onBlur: _cache[6] || (_cache[6] = (...args) => $options.queryMatList && $options.queryMatList(...args))
              }, null, 40, ["placeholder"]), [
                [vue.vModelText, $data.matCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[7] || (_cache[7] = (...args) => $options.queryMatList && $options.queryMatList(...args))
              }, "查询")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "2" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "275rpx" } },
            "记录数:[" + vue.toDisplayString($data.recordCount) + "]",
            1
            /* TEXT */
          ),
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "455rpx" } },
            "货架码:" + vue.toDisplayString($data.shelfCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("scroll-view", {
          class: "scroll-view",
          "scroll-y": "true"
        }, [
          (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            null,
            vue.renderList($data.cardData, (item, index) => {
              return vue.openBlock(), vue.createElementBlock("view", {
                key: index,
                onTouchstart: _cache[8] || (_cache[8] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
                onTouchmove: _cache[9] || (_cache[9] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
                onLongpress: ($event) => $options.longpress(item)
              }, [
                vue.createVNode(_component_Card, {
                  item,
                  currentIndex: index,
                  cardData: $data.cardData
                }, null, 8, ["item", "currentIndex", "cardData"])
              ], 40, ["onLongpress"]);
            }),
            128
            /* KEYED_FRAGMENT */
          ))
        ])
      ])
    ]);
  }
  const PagesQueryBindListQueryBindList = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/queryBindList/queryBindList.vue"]]);
  const _sfc_main$7 = {
    __name: "StocktakingCard",
    props: {
      item: {
        type: Object,
        required: true
      },
      currentIndex: {
        type: Number,
        required: true
      },
      cardData: {
        type: Array,
        required: true
      }
    },
    setup(__props, { expose: __expose }) {
      __expose();
      const props = __props;
      const __returned__ = { props, ref: vue.ref };
      Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
      return __returned__;
    }
  };
  function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", null, [
      vue.createElementVNode("view", { class: "card-header" }, [
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matCode),
            1
            /* TEXT */
          ),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.currentIndex + 1) + "/" + vue.toDisplayString($props.cardData.length),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", { class: "card-content" }, [
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "名称:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matName),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "批次:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matBatch),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "规格:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matSpec),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "content-item",
          style: { "font-weight": "600" }
        }, [
          vue.createElementVNode("text", null, "数量:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.matQty),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "content-item",
          style: { "font-weight": "600" }
        }, [
          vue.createElementVNode("text", null, "盘点数量:"),
          $props.item.stocktakingQty !== -1 ? (vue.openBlock(), vue.createElementBlock(
            "text",
            { key: 0 },
            vue.toDisplayString($props.item.stocktakingQty),
            1
            /* TEXT */
          )) : (vue.openBlock(), vue.createElementBlock("text", { key: 1 }, "未盘点"))
        ]),
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "600", "color": "firebrick" }
          }, [
            vue.createElementVNode("text", null, "库位:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.locationCode),
              1
              /* TEXT */
            )
          ]),
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "600", "color": "firebrick" }
          }, [
            vue.createElementVNode("text", null, "货架:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.shelfCode),
              1
              /* TEXT */
            )
          ])
        ]),
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "600", "color": "violet" }
          }, [
            vue.createElementVNode("text", null, "人员:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.modifyUser),
              1
              /* TEXT */
            )
          ]),
          vue.createElementVNode("view", { class: "content-time" }, [
            vue.createElementVNode("text", null, "绑定时间:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.modifyTime),
              1
              /* TEXT */
            )
          ])
        ])
      ])
    ]);
  }
  const StocktakingCard = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-e2c0cdac"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/components/StocktakingCard.vue"]]);
  const _sfc_main$6 = {
    components: {
      uniPopup,
      StocktakingCard
    },
    setup() {
      const {
        proxy
      } = vue.getCurrentInstance();
      const fixedInfo = vue.ref({
        infoId: 0,
        matCode: "示例名称",
        matName: "这是一段示例描述",
        matBatch: "",
        matSpec: "",
        matQty: 0,
        stocktakingQty: 0
      });
      const popup = vue.ref(null);
      const inputValue = vue.ref("");
      const showPopup = (info) => {
        fixedInfo.infoId = info.id;
        fixedInfo.value.matName = info.matName;
        fixedInfo.value.matCode = info.matCode;
        fixedInfo.value.matBatch = info.matBatch;
        fixedInfo.value.matSpec = info.matSpec;
        fixedInfo.value.matQty = info.matQty;
        fixedInfo.value.stocktakingQty = info.stocktakingQty;
        inputValue.value = info.stocktakingQty == -1 ? info.matQty : info.stocktakingQty;
        popup.value.open();
      };
      const hidePopup = () => {
        popup.value.close();
      };
      const saveData = () => {
        if (fixedInfo.value.stocktakingQty != -1 && inputValue.value == fixedInfo.value.stocktakingQty) {
          uni.showToast({
            title: "本次修改未修改数量",
            icon: "none",
            duration: 1500
          });
          hidePopup();
          return;
        }
        if (inputValue.value < 0) {
          uni.showToast({
            title: "您所输入的数量应该大于等于0！",
            icon: "none",
            duration: 1500
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaStocktaking/stockTakingById",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "stocktakingQty": inputValue.value,
            "matDetailCurrentInfoId": fixedInfo.infoId,
            "userName": getConfig("userName", "admin"),
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "成功!",
                  icon: "none",
                  duration: 1200
                });
                hidePopup();
                proxy.refreshData();
              } else {
                uni.showToast({
                  title: "失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
          }
        });
      };
      return {
        fixedInfo,
        popup,
        inputValue,
        showPopup,
        hidePopup,
        saveData
      };
    },
    data() {
      return {
        locationId: null,
        locationCode: "",
        userName: "",
        //当前登录的用户名
        recordCount: 0,
        shelfId: null,
        shelfCode: "",
        placeholderText: "请先扫描货架码",
        matCodeCondition: "",
        //物料编码搜索条件
        cardData: null,
        //监控滑动的位置
        touchStartX: 0,
        touchStartY: 0,
        isMove: false
        //滑动标识 是否滑动
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        formatAppLog("log", "at pages/stockTaking/stockTaking.vue:291", "Success:" + res.data);
        self.analysisScanCode(res.data);
      }, function(err) {
        formatAppLog("log", "at pages/stockTaking/stockTaking.vue:294", "Error:", JSON.stringify(err));
      });
    },
    methods: {
      refreshData: function() {
        this.analysisScanCode(this.shelfCode);
      },
      cardClass: function(item) {
        return item.stocktakingQty == -1 ? "cardNoStocktaking" : "cardYesStocktaking";
      },
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/stockTaking/stockTaking.vue:308", "扫码结果:", res.result);
            this.analysisScanCode(res.result);
          },
          fail: (err) => {
            formatAppLog("error", "at pages/stockTaking/stockTaking.vue:312", "扫码失败:", err);
          }
        });
      },
      //扫码枪扫码
      analysisScanCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.shelfCode = encodedString;
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaStocktaking/getStocktakingInfosByShelfCode",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfCode": this.shelfCode,
            "userName": this.userName,
            "deviceType": "PDA",
            "pageNumber": 1,
            "pageSize": 1e3
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "该货架不存在绑定的物料信息!",
                    icon: "none",
                    duration: 1500
                  });
                  return;
                }
                this.cardData = res.data.data.lists;
                this.recordCount = res.data.data.count;
                uni.showToast({
                  title: "获取成功!",
                  icon: "none",
                  duration: 100
                });
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/stockTaking/stockTaking.vue:391", "请求完成", event);
          }
        });
      },
      //清空当前界面所有内容
      clear: function() {
        this.placeholderText = "请先扫描货架码";
        this.cardData = null;
        this.recordCount = 0;
      },
      //解决长按和滑动冲突的问题
      cardTouchStart(e) {
        this.isMove = false;
        this.touchStartX = e.touches[0].clientX;
        this.touchStartY = e.touches[0].clientY;
      },
      cardTouchMove(e) {
        var deltaX = e.changedTouches[0].clientX - this.touchStartX;
        var deltaY = e.changedTouches[0].clientY - this.touchStartY;
        if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
          this.isMove = true;
        }
      },
      //长按
      longpress(item) {
        if (this.isMove == false) {
          this.showPopup(item);
        }
      }
    }
  };
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
    const _component_StocktakingCard = vue.resolveComponent("StocktakingCard");
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createVNode(
        _component_uni_popup,
        {
          ref: "popup",
          type: "dialog"
        },
        {
          default: vue.withCtx(() => [
            vue.createElementVNode("view", { class: "popup-content" }, [
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料编码："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料名称："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matName),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料批次："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matBatch),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料规格："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matSpec),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "数量："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matQty),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", {
                class: "input-item",
                style: { "background-color": "wheat" }
              }, [
                vue.createElementVNode("label", null, "盘点数量："),
                vue.withDirectives(vue.createElementVNode(
                  "input",
                  {
                    ref: "inputRef",
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.inputValue = $event),
                    type: "number",
                    placeholder: "输入数量"
                  },
                  null,
                  512
                  /* NEED_PATCH */
                ), [
                  [
                    vue.vModelText,
                    $setup.inputValue,
                    void 0,
                    { number: true }
                  ]
                ])
              ]),
              vue.createElementVNode("view", { class: "button-group" }, [
                vue.createElementVNode("button", {
                  onClick: _cache[1] || (_cache[1] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
                }, "取消"),
                vue.createElementVNode("button", {
                  onClick: _cache[2] || (_cache[2] = ($event) => $setup.saveData($setup.fixedInfo))
                }, "保存")
              ])
            ])
          ]),
          _: 1
          /* STABLE */
        },
        512
        /* NEED_PATCH */
      ),
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ]),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[3] || (_cache[3] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                id: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
                onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
              }, null, 40, ["placeholder"]), [
                [vue.vModelText, $data.matCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[6] || (_cache[6] = ($event) => $options.analysisScanCode(this.shelfCode))
              }, "查询")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "2" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "275rpx" } },
            "记录数:[" + vue.toDisplayString($data.recordCount) + "]",
            1
            /* TEXT */
          ),
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "455rpx" } },
            "货架码:" + vue.toDisplayString($data.shelfCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("scroll-view", {
          class: "scroll-view",
          "scroll-y": "true"
        }, [
          (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            null,
            vue.renderList($data.cardData, (item, index) => {
              return vue.openBlock(), vue.createElementBlock("view", {
                key: index,
                onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
                onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
                onLongpress: ($event) => $options.longpress(item)
              }, [
                vue.createVNode(_component_StocktakingCard, {
                  class: vue.normalizeClass($options.cardClass(item)),
                  item,
                  currentIndex: index,
                  cardData: $data.cardData
                }, null, 8, ["class", "item", "currentIndex", "cardData"])
              ], 40, ["onLongpress"]);
            }),
            128
            /* KEYED_FRAGMENT */
          ))
        ])
      ])
    ]);
  }
  const PagesStockTakingStockTaking = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/stockTaking/stockTaking.vue"]]);
  const _sfc_main$5 = {
    data() {
      return {
        //初始化
        placeholderText: "请先扫描货架码",
        shelfCodeCondition: "",
        shelfId: 0,
        shelfCode: "",
        currentLocationId: 0,
        currentLocationCode: "",
        destinationLocationId: 0,
        destinationLocaiotnCode: "",
        transStatusStr: "",
        scanedShelfCode: "",
        //扫描的位置编码
        userName: ""
        //当前登录的用户名
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        if (self.shelfId == 0) {
          self.analysisScanCode(res.data);
        } else {
          self.saveScanedShelfCode(res.data);
        }
      }, function(err) {
        formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:129", "Error:", JSON.stringify(err));
      });
    },
    methods: {
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:137", "扫码结果:", res.result);
            if (this.shelfId == 0) {
              this.analysisScanCode(res.result);
            } else {
              this.saveScanedShelfCode(res.result);
            }
          },
          fail: (err) => {
            formatAppLog("error", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:145", "扫码失败:", err);
          }
        });
      },
      analysisScanCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.shelfCodeCondition = encodedString;
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaShelfLocationBindUnbind/getLocationInfoByShelfCode",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfCode": encodedString,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "获取失败，请重试！",
                    icon: "none",
                    duration: 1500
                  });
                  return;
                }
                this.shelfId = res.data.data.shelfId;
                this.shelfCode = res.data.data.shelfCode;
                this.currentLocationId = res.data.data.currentLocationId;
                this.currentLocationCode = res.data.data.currentLocationCode;
                this.destinationLocationId = res.data.data.destinationLocationId;
                this.destinationLocaiotnCode = res.data.data.destinationLocaiotnCode;
                this.transStatusStr = res.data.data.transStatusStr;
                this.scanedShelfCode = "";
                uni.showToast({
                  title: "获取成功!",
                  icon: "none",
                  duration: 100
                });
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:218", err.errMsg);
            uni.showToast({
              title: "请求失败" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:229", "请求完成", event);
          }
        });
      },
      saveScanedShelfCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.scanedShelfCode = encodedString;
      },
      bind: function() {
        if (this.shelfId == 0 || this.shelfId == null) {
          uni.showToast({
            title: "请先扫描获取数据！",
            icon: "none",
            duration: 3500
          });
          return;
        }
        if (this.scanedShelfCode == 0 || this.scanedShelfCode == null) {
          uni.showToast({
            title: "请先扫描获取位置码！",
            icon: "none",
            duration: 3500
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaShelfLocationBindUnbind/shelfLocationBind",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfId": this.shelfId,
            "shelfCode": this.shelfCode,
            "locationId": 0,
            "locationCode": this.scanedShelfCode,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "绑定成功!",
                  icon: "none",
                  duration: 3e3
                });
                this.analysisScanCode(this.shelfCode);
              } else {
                uni.showToast({
                  title: "绑定失败:" + res.data.message,
                  icon: "none",
                  duration: 4500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 4500
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:314", "请求完成", event);
          }
        });
      },
      //解绑
      unbind: function() {
        if (this.shelfId == 0 || this.shelfId == null) {
          uni.showToast({
            title: "请先扫描获取数据！",
            icon: "none",
            duration: 3500
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaShelfLocationBindUnbind/shelfLocationUnBind",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfId": this.shelfId,
            "shelfCode": this.shelfCode,
            "locationId": 0,
            "locationCode": this.scanedShelfCode,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "解绑成功!",
                  icon: "none",
                  duration: 3e3
                });
                this.analysisScanCode(this.shelfCode);
              } else {
                uni.showToast({
                  title: "解绑失败:" + res.data.message,
                  icon: "none",
                  duration: 4500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 4500
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue:388", "请求完成", event);
          }
        });
      },
      //清空当前界面所有内容
      clear: function() {
        this.placeholderText = "请先扫描货架码";
        this.shelfCodeCondition = "";
        this.shelfId = 0;
        this.shelfCode = "";
        this.currentLocationId = 0;
        this.currentLocationCode = "";
        this.destinationLocationId = 0;
        this.destinationLocaiotnCode = "";
        this.transStatusStr = "";
        this.scanedShelfCode = "";
      }
    }
  };
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ]),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[0] || (_cache[0] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                id: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.shelfCodeCondition = $event),
                onBlur: _cache[2] || (_cache[2] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
              }, null, 40, ["placeholder"]), [
                [vue.vModelText, $data.shelfCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[3] || (_cache[3] = (...args) => $options.clear && $options.clear(...args))
              }, "清空")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "2" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "700rpx" } },
            "货架码:" + vue.toDisplayString($data.shelfCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "700rpx" } },
            "运输状态:" + vue.toDisplayString($data.transStatusStr),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "700rpx" } },
            "当前位置:" + vue.toDisplayString($data.currentLocationCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "700rpx" } },
            "目标位置:" + vue.toDisplayString($data.destinationLocaiotnCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "740rpx" } },
            "扫描的位置码:" + vue.toDisplayString($data.scanedShelfCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", { style: { "flex": "1" } }, [
        vue.createElementVNode("view", { style: { "flex": "40", "text-align": "center" } }, [
          vue.createElementVNode("button", {
            style: { "margin": "50rpx", "font-size": "40rpx" },
            onClick: _cache[4] || (_cache[4] = (...args) => $options.bind && $options.bind(...args)),
            size: "mini"
          }, "绑  定"),
          vue.createElementVNode("button", {
            style: { "margin": "50rpx", "font-size": "40rpx", "background-color": "red" },
            onClick: _cache[5] || (_cache[5] = (...args) => $options.unbind && $options.unbind(...args)),
            size: "mini"
          }, "解  绑")
        ])
      ])
    ]);
  }
  const PagesShelfLocationBindUnbindShelfLocationBindUnbind = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/shelfLocationBindUnbind/shelfLocationBindUnbind.vue"]]);
  const _sfc_main$4 = {
    components: {
      uniPopup,
      Card
    },
    setup() {
      const {
        proxy
      } = vue.getCurrentInstance();
      const fixedInfo = {
        shelfId: 0,
        shelfCode: ""
      };
      const popup = vue.ref(null);
      const inputValue = vue.ref("");
      const showPopup = (info) => {
        fixedInfo.shelfId = info.shelfId;
        fixedInfo.shelfCode = info.shelfCode;
        popup.value.open();
      };
      const hidePopup = () => {
        popup.value.close();
      };
      const saveData = () => {
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaProductionLineCallIn/callIn",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationId": proxy.locationId,
            "locationCode": proxy.locationCode,
            "shelfId": fixedInfo.shelfId,
            "shelfCode": fixedInfo.shelfCode,
            "userName": getConfig("userName", "admin"),
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                hidePopup();
                proxy.queryMatList(false);
                uni.showToast({
                  title: "呼叫成功!",
                  icon: "none",
                  duration: 4e3
                });
              } else {
                uni.showToast({
                  title: "呼叫失败：" + res.data.message,
                  icon: "none",
                  duration: 4e3
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
          }
        });
      };
      return {
        fixedInfo,
        popup,
        inputValue,
        showPopup,
        hidePopup,
        saveData
      };
    },
    data() {
      return {
        placeholderText: "请先扫描工位码",
        matCodeCondition: "",
        //物料编码搜索条件
        //工位ID 工位码
        locationId: 0,
        locationCode: "",
        userName: "",
        //当前登录的用户名 用于调用接口传参
        recordCount: 0,
        //记录数
        cardData: null,
        //列表数据
        shelfId: null,
        shelfCode: "",
        //监控滑动的位置
        touchStartX: 0,
        touchStartY: 0,
        isMove: false
        //滑动标识 是否滑动
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:232", "Success:" + res.data);
        self.analysisScanCode(res.data);
      }, function(err) {
        formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:236", "Error:", JSON.stringify(err));
      });
    },
    methods: {
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:244", "扫码结果:", res.result);
            this.analysisScanCode(res.result);
          },
          fail: (err) => {
            formatAppLog("error", "at pages/productionLineCallIn/productionLineCallIn.vue:248", "扫码失败:", err);
          }
        });
      },
      //扫码获取工位信息
      analysisScanCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.locationCode = encodedString;
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaProductionLineCallIn/getLocationInfoForCallIn",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationCode": this.locationCode,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "未获取到该工位相关信息!",
                    icon: "none",
                    duration: 1500
                  });
                  this.clearLocation();
                  return;
                }
                this.locationId = res.data.data.locationId;
                this.locationCode = res.data.data.locationCode;
                this.matCodeCondition = "";
                this.placeholderText = "可以输入查询";
              } else {
                uni.showToast({
                  title: res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clearLocation();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clearLocation();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clearLocation();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:329", "请求完成", event);
          }
        });
      },
      //搜索获取物料信息
      queryMatList: function(isTip) {
        if (this.locationCode == null || this.locationCode == "") {
          if (isTip) {
            uni.showToast({
              title: "请先扫描工位码！",
              icon: "none",
              duration: 1e3
            });
          }
          return;
        }
        if (this.matCodeCondition == this.locationCode) {
          this.matCodeCondition = "";
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaProductionLineCallIn/getMatDetailCurrentInfosForCallIn",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationId": this.locationId,
            "locationCode": this.locationCode,
            "matCodeCondition": this.matCodeCondition,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  if (isTip) {
                    uni.showToast({
                      title: "获取失败!",
                      icon: "none",
                      duration: 1500
                    });
                  }
                  this.clear();
                  return;
                }
                this.cardData = res.data.data.lists;
                this.recordCount = res.data.data.count;
                if (isTip) {
                  uni.showToast({
                    title: "获取成功!",
                    icon: "none",
                    duration: 100
                  });
                }
              } else {
                if (isTip) {
                  uni.showToast({
                    title: "获取失败:" + res.data.message,
                    icon: "none",
                    duration: 3500
                  });
                }
                this.clear();
              }
            } else {
              if (isTip) {
                uni.showToast({
                  title: "服务器返回错误状态码" + res.statusCode,
                  icon: "none",
                  duration: 3e3
                });
                this.clear();
              }
            }
          },
          fail: (err) => {
            if (isTip) {
              uni.showToast({
                title: "请求失败:" + err.errMsg,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          complete: (event) => {
            formatAppLog("log", "at pages/productionLineCallIn/productionLineCallIn.vue:433", "请求完成", event);
          }
        });
      },
      //清空工位码信息
      clearLocation: function() {
        this.placeholderText = "请先扫描工位码";
        this.locationId = 0;
        this.locationCode = "";
        this.cardData = null;
        this.recordCount = 0;
      },
      //清空当前界面所有内容
      clear: function() {
        this.cardData = null;
        this.recordCount = 0;
      },
      //解决长按和滑动冲突的问题
      cardTouchStart(e) {
        this.isMove = false;
        this.touchStartX = e.touches[0].clientX;
        this.touchStartY = e.touches[0].clientY;
      },
      cardTouchMove(e) {
        var deltaX = e.changedTouches[0].clientX - this.touchStartX;
        var deltaY = e.changedTouches[0].clientY - this.touchStartY;
        if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
          this.isMove = true;
        }
      },
      //长按
      longpress(item) {
        if (this.isMove == false) {
          this.showPopup(item);
        }
      }
    }
  };
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
    const _component_Card = vue.resolveComponent("Card");
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createVNode(
        _component_uni_popup,
        {
          ref: "popup",
          type: "dialog"
        },
        {
          default: vue.withCtx(() => [
            vue.createElementVNode("view", { class: "popup-content" }, [
              vue.createElementVNode("view", { style: { "margin": "3rpx" } }, [
                vue.createElementVNode("label", null, "是否呼叫以下货架：")
              ]),
              vue.createElementVNode("view", { style: { "font-size": "52rpx", "text-align": "center", "margin-top": "15rpx", "margin-bottom": "10rpx" } }, [
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.shelfCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "button-group" }, [
                vue.createElementVNode("button", {
                  onClick: _cache[0] || (_cache[0] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
                }, "取消"),
                vue.createElementVNode("button", {
                  onClick: _cache[1] || (_cache[1] = (...args) => $setup.saveData && $setup.saveData(...args))
                }, "确认")
              ])
            ])
          ]),
          _: 1
          /* STABLE */
        },
        512
        /* NEED_PATCH */
      ),
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[2] || (_cache[2] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                id: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
                onBlur: _cache[4] || (_cache[4] = (...args) => $options.queryMatList && $options.queryMatList(...args))
              }, null, 40, ["placeholder"]), [
                [vue.vModelText, $data.matCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[5] || (_cache[5] = ($event) => $options.queryMatList(true))
              }, "查询")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "2" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "275rpx" } },
            "记录数:[" + vue.toDisplayString($data.recordCount) + "]",
            1
            /* TEXT */
          ),
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "455rpx" } },
            "工位码:" + vue.toDisplayString($data.locationCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("scroll-view", {
          class: "scroll-view",
          "scroll-y": "true"
        }, [
          (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            null,
            vue.renderList($data.cardData, (item, index) => {
              return vue.openBlock(), vue.createElementBlock("view", {
                key: index,
                onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
                onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
                onLongpress: ($event) => $options.longpress(item)
              }, [
                vue.createVNode(_component_Card, {
                  item,
                  currentIndex: index,
                  cardData: $data.cardData
                }, null, 8, ["item", "currentIndex", "cardData"])
              ], 40, ["onLongpress"]);
            }),
            128
            /* KEYED_FRAGMENT */
          ))
        ])
      ])
    ]);
  }
  const PagesProductionLineCallInProductionLineCallIn = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/productionLineCallIn/productionLineCallIn.vue"]]);
  const _sfc_main$3 = {
    components: {
      uniPopup,
      Card
    },
    setup() {
      const {
        proxy
      } = vue.getCurrentInstance();
      const fixedInfo = vue.ref({
        infoId: 0,
        matCode: "示例名称",
        matName: "这是一段示例描述",
        matSpec: "",
        matBatch: "",
        matQty: 0,
        stocktakingQty: 0
      });
      const popup = vue.ref(null);
      const inputValue = vue.ref("");
      const showPopup = (info) => {
        fixedInfo.infoId = info.id;
        formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:162", fixedInfo.infoId);
        fixedInfo.value.matName = info.matName;
        fixedInfo.value.matCode = info.matCode;
        fixedInfo.value.matSpec = info.matSpec;
        fixedInfo.value.matBatch = info.matBatch;
        fixedInfo.value.matQty = info.matQty;
        inputValue.value = fixedInfo.value.matQty;
        popup.value.open();
      };
      const hidePopup = () => {
        popup.value.close();
      };
      const saveData = () => {
        if (inputValue.value == fixedInfo.value.matQty) {
          uni.showToast({
            title: "本次修改未修改数量",
            icon: "none",
            duration: 2500
          });
          hidePopup();
          return;
        }
        if (inputValue.value < 0) {
          uni.showToast({
            title: "您所输入的数量应该大于等于0！",
            icon: "none",
            duration: 2500
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/PDAProductionLineCallOut/updateMatDetailCurrentInfoForCallOut",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "matQty": inputValue.value,
            "matDetailCurrentInfoId": fixedInfo.infoId,
            "userName": getConfig("userName", "admin"),
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                hidePopup();
                uni.showToast({
                  title: "修改成功!",
                  icon: "none",
                  duration: 2e3
                });
                proxy.getCurrentMatInfo();
              } else {
                uni.showToast({
                  title: "修改失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
          }
        });
      };
      return {
        fixedInfo,
        popup,
        inputValue,
        showPopup,
        hidePopup,
        saveData
      };
    },
    data() {
      return {
        locationId: 0,
        locationCode: "",
        shelfId: 0,
        shelfCode: "",
        userName: "",
        //当前登录的用户名
        recordCount: 0,
        placeholderText: "请先扫描货架码",
        matCodeCondition: "",
        //物料编码搜索条件
        cardData: null,
        //监控滑动的位置
        touchStartX: 0,
        touchStartY: 0,
        isMove: false,
        //滑动标识 是否滑动
        // 货架区域选项
        shelfAreaOptions: [{
          id: 1,
          locationAreaName: "请先扫货架码"
        }],
        selectedShelfAreaIndex: 0,
        // 选择的货架区域索引
        // 货架类型选项
        shelfTypeOptions: [
          {
            id: 1,
            value: "empty",
            text: "空货架"
          },
          {
            id: 2,
            value: "notEmpty",
            text: "非空货架"
          }
          // ... 其他选项
        ],
        selectedShelfTypeIndex: 1
        // 选择的货架类型索引
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:317", "Success:" + res.data);
        self.analysisScanCode(res.data);
      }, function(err) {
        formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:320", "Error:", JSON.stringify(err));
      });
    },
    methods: {
      // 货架区域选择改变时触发
      onShelfAreaChange(e) {
        this.selectedShelfAreaIndex = e.detail.value;
      },
      // 货架类型选择改变时触发
      onShelfTypeChange(e) {
        this.selectedShelfTypeIndex = e.detail.value;
      },
      // 货架送回按钮点击时触发
      sendBackShelf() {
        if (this.shelfId == 0 || this.shelfId == null) {
          uni.showToast({
            title: "请先扫货架码!",
            icon: "none",
            duration: 1500
          });
          return;
        }
        if (this.shelfAreaOptions[this.selectedShelfAreaIndex].locationAreaName == "请先扫货架码" || this.shelfAreaOptions[this.selectedShelfAreaIndex].locationAreaName == "请选择") {
          uni.showToast({
            title: "请选择货架送回区域!",
            icon: "none",
            duration: 1500
          });
          return;
        }
        saveConfig("callOutSelectedShelfAreaIndex", this.selectedShelfAreaIndex);
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaProductionLineCallOut/callOut",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "locationId": this.locationId,
            "locationCode": this.locationCode,
            "shelfId": this.shelfId,
            "shelfCode": this.shelfCode,
            "destinationLocationAreaId": this.shelfAreaOptions[this.selectedShelfAreaIndex].id,
            "destinationLocationAreaName": this.shelfAreaOptions[this.selectedShelfAreaIndex].locationAreaName,
            "ShelfTypeStr": this.shelfTypeOptions[this.selectedShelfTypeIndex].text,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                uni.showToast({
                  title: "送回货架呼叫成功!",
                  icon: "none",
                  duration: 1500
                });
                return;
              } else {
                uni.showToast({
                  title: "送回货架呼叫失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
          },
          complete: (event) => {
            formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:425", "请求完成", event);
          }
        });
      },
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:433", "扫码结果:", res.result);
            this.analysisScanCode(res.result);
          },
          fail: (err) => {
            formatAppLog("error", "at pages/productionLineCallOut/productionLineCallOut.vue:437", "扫码失败:", err);
          }
        });
      },
      //扫码枪扫码
      analysisScanCode: function(encodedString) {
        encodedString = encodedString.replace(/,\s*\.\.\.$/, "");
        this.shelfCode = encodedString;
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/pdaProductionLineCallOut/getShelfInfoForCallOut",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfCode": this.shelfCode,
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null) {
                  uni.showToast({
                    title: "获取失败，请扫码重试!",
                    icon: "none",
                    duration: 1500
                  });
                  return;
                }
                this.matCodeCondition = "";
                this.shelfId = res.data.data.shelfId;
                this.shelfCode = res.data.data.shelfCode;
                this.locationId = res.data.data.locationId;
                this.locationCode = res.data.data.locationCode;
                this.shelfAreaOptions = res.data.data.locationAreas;
                var index = getConfig("callOutSelectedShelfAreaIndex", 0);
                if (index + 1 < this.shelfAreaOptions.length) {
                  this.selectedShelfAreaIndex = index;
                }
                this.getCurrentMatInfo();
                return;
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:524", "请求完成", event);
          }
        });
      },
      getCurrentMatInfo: function() {
        if (this.shelfId == 0 || this.shelfId == null) {
          uni.showToast({
            title: "获取当前货架物料失败，请扫码重试!",
            icon: "none",
            duration: 1500
          });
          return;
        }
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/getMatDetailCurrentInfos",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "shelfCode": this.shelfCode,
            "matCode": "",
            "userName": this.userName,
            "deviceType": "PDA",
            "pageNumber": 1,
            "pageSize": 300
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "该货架不存在绑定的物料信息!",
                    icon: "none",
                    duration: 1500
                  });
                  return;
                }
                this.cardData = res.data.data.lists;
                this.recordCount = res.data.data.count;
                uni.showToast({
                  title: "获取成功!",
                  icon: "none",
                  duration: 500
                });
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败:" + err.errMsg,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/productionLineCallOut/productionLineCallOut.vue:607", "请求完成", event);
          }
        });
      },
      //清空当前界面所有内容
      clear: function() {
        this.placeholderText = "请先扫描货架码";
        this.cardData = null;
        this.recordCount = 0;
      },
      //解决长按和滑动冲突的问题
      cardTouchStart(e) {
        this.isMove = false;
        this.touchStartX = e.touches[0].clientX;
        this.touchStartY = e.touches[0].clientY;
      },
      cardTouchMove(e) {
        var deltaX = e.changedTouches[0].clientX - this.touchStartX;
        var deltaY = e.changedTouches[0].clientY - this.touchStartY;
        if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
          this.isMove = true;
        }
      },
      //长按
      longpress(item) {
        if (this.isMove == false) {
          this.showPopup(item);
        }
      }
    }
  };
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
    const _component_Card = vue.resolveComponent("Card");
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createVNode(
        _component_uni_popup,
        {
          ref: "popup",
          type: "dialog"
        },
        {
          default: vue.withCtx(() => [
            vue.createElementVNode("view", { class: "popup-content" }, [
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料编码："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料名称："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matName),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料批次："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matBatch),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "物料规格："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.matSpec),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", {
                class: "input-item",
                style: { "background-color": "wheat" }
              }, [
                vue.createElementVNode("label", null, "数量："),
                vue.withDirectives(vue.createElementVNode(
                  "input",
                  {
                    ref: "inputRef",
                    "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.inputValue = $event),
                    type: "number",
                    placeholder: "输入数量"
                  },
                  null,
                  512
                  /* NEED_PATCH */
                ), [
                  [
                    vue.vModelText,
                    $setup.inputValue,
                    void 0,
                    { number: true }
                  ]
                ])
              ]),
              vue.createElementVNode("view", { class: "button-group" }, [
                vue.createElementVNode("button", {
                  onClick: _cache[1] || (_cache[1] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
                }, "取消"),
                vue.createElementVNode("button", {
                  onClick: _cache[2] || (_cache[2] = (...args) => $setup.saveData && $setup.saveData(...args))
                }, "保存")
              ])
            ])
          ]),
          _: 1
          /* STABLE */
        },
        512
        /* NEED_PATCH */
      ),
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ]),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[3] || (_cache[3] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                ref: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
                onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.queryMatList && _ctx.queryMatList(...args))
              }, null, 40, ["placeholder"]), [
                [vue.vModelText, $data.matCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[6] || (_cache[6] = ($event) => $options.analysisScanCode(this.shelfCode))
              }, "查询")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "2" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode(
            "view",
            { style: { "width": "740" } },
            "货架码:" + vue.toDisplayString($data.shelfCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode(
            "view",
            { style: { "width": "740" } },
            "工位码:" + vue.toDisplayString($data.locationCode),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("scroll-view", {
          class: "scroll-view",
          "scroll-y": "true"
        }, [
          (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            null,
            vue.renderList($data.cardData, (item, index) => {
              return vue.openBlock(), vue.createElementBlock("view", {
                key: index,
                onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
                onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
                onLongpress: ($event) => $options.longpress(item)
              }, [
                vue.createVNode(_component_Card, {
                  item,
                  currentIndex: index,
                  cardData: $data.cardData
                }, null, 8, ["item", "currentIndex", "cardData"])
              ], 40, ["onLongpress"]);
            }),
            128
            /* KEYED_FRAGMENT */
          ))
        ])
      ]),
      vue.createElementVNode("view", { style: { "position": "fixed", "bottom": "5rpx", "left": "0", "width": "100%", "display": "flex", "justify-content": "space-between", "align-items": "center", "z-index": "100" } }, [
        vue.createCommentVNode(" 货架区域选择 "),
        vue.createElementVNode("view", {
          class: "picker-container1",
          style: { "position": "relative" }
        }, [
          vue.createElementVNode("view", { style: { "color": "darkgray" } }, "点击选择送回区域:"),
          vue.createElementVNode("picker", {
            ref: "shelfAreaPicker",
            range: $data.shelfAreaOptions,
            "range-key": "locationAreaName",
            value: $data.selectedShelfAreaIndex,
            onChange: _cache[9] || (_cache[9] = (...args) => $options.onShelfAreaChange && $options.onShelfAreaChange(...args)),
            style: { "font-size": "35rpx" }
          }, [
            vue.createElementVNode(
              "view",
              { class: "uni-input" },
              vue.toDisplayString($data.shelfAreaOptions[$data.selectedShelfAreaIndex].locationAreaName),
              1
              /* TEXT */
            )
          ], 40, ["range", "value"])
        ]),
        vue.createCommentVNode(" 货架类型选择 "),
        vue.createElementVNode("view", {
          class: "picker-container",
          style: { "position": "relative" }
        }, [
          vue.createElementVNode("view", { style: { "color": "darkgray" } }, "点击选择:"),
          vue.createElementVNode("picker", {
            ref: "shelfTypePicker",
            range: $data.shelfTypeOptions,
            "range-key": "text",
            value: $data.selectedShelfTypeIndex,
            onChange: _cache[10] || (_cache[10] = (...args) => $options.onShelfTypeChange && $options.onShelfTypeChange(...args)),
            style: { "font-size": "35rpx", "width": "200rpx", "font-weight": "" }
          }, [
            vue.createElementVNode(
              "view",
              { class: "uni-input" },
              vue.toDisplayString($data.shelfTypeOptions[$data.selectedShelfTypeIndex].text),
              1
              /* TEXT */
            )
          ], 40, ["range", "value"])
        ]),
        vue.createCommentVNode(" 货架送回按钮 "),
        vue.createElementVNode("button", {
          style: { "width": "200rpx", "margin": "2rpx", "background": "green", "color": "white" },
          onClick: _cache[11] || (_cache[11] = (...args) => $options.sendBackShelf && $options.sendBackShelf(...args))
        }, "货架送回")
      ])
    ]);
  }
  const PagesProductionLineCallOutProductionLineCallOut = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/productionLineCallOut/productionLineCallOut.vue"]]);
  const _sfc_main$2 = {
    __name: "TaskCard",
    props: {
      item: {
        type: Object,
        required: true
      },
      currentIndex: {
        type: Number,
        required: true
      },
      cardData: {
        type: Array,
        required: true
      }
    },
    setup(__props, { expose: __expose }) {
      __expose();
      const props = __props;
      const __returned__ = { props, ref: vue.ref };
      Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
      return __returned__;
    }
  };
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
    return vue.openBlock(), vue.createElementBlock("view", { class: "card" }, [
      vue.createElementVNode("view", { class: "card-header" }, [
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.taskCode),
            1
            /* TEXT */
          ),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.currentIndex + 1) + "/" + vue.toDisplayString($props.cardData.length),
            1
            /* TEXT */
          )
        ])
      ]),
      vue.createElementVNode("view", { class: "card-content" }, [
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "AGV编号:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.agvCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "AGV状态:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.agvStatus),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-item" }, [
          vue.createElementVNode("text", null, "任务状态:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.taskStatusStr),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "content-item",
          style: { "font-weight": "400" }
        }, [
          vue.createElementVNode("text", null, "货架:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.shelfCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "content-item",
          style: { "font-weight": "600", "color": "green" }
        }, [
          vue.createElementVNode("text", null, "起点:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.startLocationCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", {
          class: "content-item",
          style: { "font-weight": "600", "color": "firebrick" }
        }, [
          vue.createElementVNode("text", null, "终点:"),
          vue.createElementVNode(
            "text",
            null,
            vue.toDisplayString($props.item.endLocationCode),
            1
            /* TEXT */
          )
        ]),
        vue.createElementVNode("view", { class: "content-combined" }, [
          vue.createElementVNode("view", {
            class: "content-item",
            style: { "font-weight": "600", "color": "violet" }
          }, [
            vue.createElementVNode("text", null, "人员:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.createUser),
              1
              /* TEXT */
            )
          ]),
          vue.createElementVNode("view", { class: "content-time" }, [
            vue.createElementVNode("text", null, "任务时间:"),
            vue.createElementVNode(
              "text",
              null,
              vue.toDisplayString($props.item.createTime),
              1
              /* TEXT */
            )
          ])
        ])
      ])
    ]);
  }
  const TaskCard = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-e5e76912"], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/components/TaskCard.vue"]]);
  const _sfc_main$1 = {
    components: {
      uniPopup,
      TaskCard
    },
    setup() {
      const {
        proxy
      } = vue.getCurrentInstance();
      const fixedInfo = {
        taskId: 0,
        taskCode: "",
        shelfCode: "",
        startLocationCode: "",
        endLocationCode: "",
        taskStatusStr: "",
        buttonMode: "无法操作"
      };
      const popup = vue.ref(null);
      const inputValue = vue.ref("");
      const showPopup = (info) => {
        fixedInfo.taskId = info.id;
        fixedInfo.taskCode = info.taskCode;
        fixedInfo.shelfCode = info.shelfCode;
        fixedInfo.startLocationCode = info.startLocationCode;
        fixedInfo.endLocationCode = info.endLocationCode;
        fixedInfo.taskStatusStr = info.taskStatusStr;
        if (info.taskStatusStr == "已创建" || info.taskStatusStr == "正在执行") {
          fixedInfo.buttonMode = "取消任务";
        } else if (info.taskStatusStr == "取消完成") {
          fixedInfo.buttonMode = "重新发送";
        } else {
          fixedInfo.buttonMode = "无法操作";
        }
        popup.value.open();
      };
      const hidePopup = () => {
        popup.value.close();
      };
      const saveData = () => {
        var url = "";
        var serverIPAndPort = getServerIPAndPort();
        if (fixedInfo.taskStatusStr == "已创建" || fixedInfo.taskStatusStr == "正在执行") {
          url = "http://" + serverIPAndPort + "/agvTask/cancelAGVTask";
        } else if (fixedInfo.taskStatusStr == "取消完成") {
          url = "http://" + serverIPAndPort + "/agvTask/resendAGVTask";
        } else {
          return;
        }
        uni.request({
          url,
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "taskId": fixedInfo.taskId,
            "taskCode": fixedInfo.taskCode,
            "userName": getConfig("userName", "admin"),
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                hidePopup();
                uni.showToast({
                  title: "操作成功!",
                  icon: "none",
                  duration: 2e3
                });
                proxy.analysisScanCode();
              } else {
                uni.showToast({
                  title: "操作失败:" + res.data.message,
                  icon: "none",
                  duration: 2500
                });
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 2500
              });
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败" + err,
              icon: "none",
              duration: 2500
            });
            this.clear();
          },
          complete: (event) => {
          }
        });
      };
      return {
        fixedInfo,
        popup,
        inputValue,
        showPopup,
        hidePopup,
        saveData
      };
    },
    data() {
      return {
        locationId: null,
        locationCode: "",
        userName: "",
        //当前登录的用户名
        recordCount: 0,
        shelfId: null,
        shelfCode: "",
        placeholderText: "",
        matCodeCondition: "",
        //物料编码搜索条件
        cardData: null,
        //监控滑动的位置
        touchStartX: 0,
        touchStartY: 0,
        isMove: false,
        //滑动标识 是否滑动
        // 货架区域选项
        taskStatusOptions: [{
          id: null,
          taskStatusName: "全部"
        }],
        selectedtaskStatusIndex: 0
        // 
      };
    },
    onShow: function() {
      this.userName = getConfig("userName", "admin");
      const self = this;
      recive(function(res) {
        formatAppLog("log", "at pages/agvTasks/agvTasks.vue:292", "Success:" + res.data);
        self.analysisScanCode();
      }, function(err) {
        formatAppLog("log", "at pages/agvTasks/agvTasks.vue:295", "Error:", JSON.stringify(err));
      });
      self.getTaskStatus();
    },
    methods: {
      onTaskStatusChange(e) {
        this.selectedtaskStatusIndex = e.detail.value;
        this.analysisScanCode();
      },
      //摄像头扫码
      cameraScanCode() {
        uni.scanCode({
          success: (res) => {
            formatAppLog("log", "at pages/agvTasks/agvTasks.vue:309", "扫码结果:", res.result);
            this.analysisScanCode(res.result);
          },
          fail: (err) => {
            formatAppLog("error", "at pages/agvTasks/agvTasks.vue:313", "扫码失败:", err);
          }
        });
      },
      //扫码枪扫码
      analysisScanCode: function() {
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/agvTask/getAGVTasks",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "taskStatus": this.taskStatusOptions[this.selectedtaskStatusIndex].id,
            "userName": this.userName,
            "deviceType": "PDA",
            "pageNumber": 1,
            "pageSize": 100
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  uni.showToast({
                    title: "未查询到状态为[" + this.taskStatusOptions[this.selectedtaskStatusIndex].taskStatusName + "]的任务信息!",
                    icon: "none",
                    duration: 2500
                  });
                  this.clear();
                  return;
                }
                this.cardData = res.data.data.lists;
                this.recordCount = res.data.data.count;
              } else {
                uni.showToast({
                  title: "获取失败:" + res.data.message,
                  icon: "none",
                  duration: 3500
                });
                this.clear();
              }
            } else {
              uni.showToast({
                title: "服务器返回错误状态码" + res.statusCode,
                icon: "none",
                duration: 3e3
              });
              this.clear();
            }
          },
          fail: (err) => {
            uni.showToast({
              title: "请求失败" + err,
              icon: "none",
              duration: 3e3
            });
            this.clear();
          },
          complete: (event) => {
            formatAppLog("log", "at pages/agvTasks/agvTasks.vue:386", "请求完成", event);
          }
        });
      },
      getTaskStatus: function() {
        var serverIPAndPort = getServerIPAndPort();
        uni.request({
          url: "http://" + serverIPAndPort + "/agvTask/getAGVTaskStatus",
          // 请求的接口地址
          method: "POST",
          // 设置请求方式为 POST
          data: {
            "userName": this.userName,
            "deviceType": "PDA"
          },
          header: {
            "Content-Type": "application/json"
            // 如果需要以JSON格式发送数据
          },
          success: (res) => {
            if (res.statusCode === 200) {
              if (res.data.code == 200) {
                if (res.data.data == null || res.data.data.count == 0) {
                  return;
                }
                this.taskStatusOptions = res.data.data;
                this.selectedtaskStatusIndex = 2;
                this.analysisScanCode();
              } else {
                return;
              }
            } else {
              return;
            }
          },
          fail: (err) => {
            return;
          },
          complete: (event) => {
            formatAppLog("log", "at pages/agvTasks/agvTasks.vue:434", "请求完成", event);
          }
        });
      },
      //清空当前界面所有内容
      clear: function() {
        this.placeholderText = "";
        this.cardData = null;
        this.recordCount = 0;
      },
      //解决长按和滑动冲突的问题
      cardTouchStart(e) {
        this.isMove = false;
        this.touchStartX = e.touches[0].clientX;
        this.touchStartY = e.touches[0].clientY;
      },
      cardTouchMove(e) {
        var deltaX = e.changedTouches[0].clientX - this.touchStartX;
        var deltaY = e.changedTouches[0].clientY - this.touchStartY;
        if (Math.abs(deltaX) > 5 || Math.abs(deltaY) > 5) {
          this.isMove = true;
        }
      },
      //长按
      longpress(item) {
        if (this.isMove == false) {
          this.showPopup(item);
        }
      }
    }
  };
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
    const _component_uni_popup = resolveEasycom(vue.resolveDynamicComponent("uni-popup"), __easycom_0);
    const _component_TaskCard = vue.resolveComponent("TaskCard");
    return vue.openBlock(), vue.createElementBlock("view", { class: "bg-image" }, [
      vue.createVNode(
        _component_uni_popup,
        {
          ref: "popup",
          type: "dialog"
        },
        {
          default: vue.withCtx(() => [
            vue.createElementVNode("view", { class: "popup-content" }, [
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "单号："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.taskCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "货架："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.shelfCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "起点："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.startLocationCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "终点："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.endLocationCode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "info-item" }, [
                vue.createElementVNode("label", null, "任务状态："),
                vue.createElementVNode(
                  "text",
                  null,
                  vue.toDisplayString($setup.fixedInfo.taskStatusStr),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", null, [
                vue.createElementVNode(
                  "button",
                  {
                    style: { "background-color": "bisque", "margin-top": "10rpx" },
                    onClick: _cache[0] || (_cache[0] = (...args) => $setup.saveData && $setup.saveData(...args))
                  },
                  vue.toDisplayString($setup.fixedInfo.buttonMode),
                  1
                  /* TEXT */
                )
              ]),
              vue.createElementVNode("view", { class: "button-group" }, [
                vue.createElementVNode("button", {
                  onClick: _cache[1] || (_cache[1] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
                }, "关 闭")
              ])
            ])
          ]),
          _: 1
          /* STABLE */
        },
        512
        /* NEED_PATCH */
      ),
      vue.createElementVNode("view", { class: "diy-flex-row" }, [
        vue.createElementVNode("view", { style: { "flex": "3" } }, [
          vue.createCommentVNode(" 占位 ")
        ]),
        vue.createElementVNode("view", { style: { "flex": "80", "margin": "5rpx" } }, [
          vue.createElementVNode("view", { class: "diy-flex-row" }, [
            vue.createElementVNode("view", {
              class: "rightImageContainer",
              onClick: _cache[2] || (_cache[2] = (...args) => $options.cameraScanCode && $options.cameraScanCode(...args)),
              style: { "flex": "12", "padding-top": "20rpx" }
            }, [
              vue.createElementVNode("image", {
                style: { "width": "60rpx", "height": "60rpx" },
                src: _imports_0
              })
            ]),
            vue.createElementVNode("view", {
              class: "uni-input-wrapper",
              style: { "flex": "60" }
            }, [
              vue.withDirectives(vue.createElementVNode("input", {
                id: "inputMatCode",
                class: "uni-input",
                style: { "font-size": "50rpx", "padding": "10rpx" },
                placeholder: $data.placeholderText,
                "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event),
                onBlur: _cache[4] || (_cache[4] = (...args) => $options.analysisScanCode && $options.analysisScanCode(...args))
              }, null, 40, ["placeholder"]), [
                [vue.vModelText, $data.matCodeCondition]
              ])
            ]),
            vue.createElementVNode("view", { style: { "flex": "3" } }),
            vue.createElementVNode("view", { style: { "flex": "30" } }, [
              vue.createElementVNode("button", {
                onClick: _cache[5] || (_cache[5] = (...args) => $options.analysisScanCode && $options.analysisScanCode(...args))
              }, "查询")
            ])
          ])
        ]),
        vue.createElementVNode("view", { style: { "flex": "2" } }, [
          vue.createCommentVNode(" 占位 ")
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("view", { class: "diy-flex-inforow" }, [
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode(
            "view",
            { style: { "width": "275rpx" } },
            "记录数:[" + vue.toDisplayString($data.recordCount) + "]",
            1
            /* TEXT */
          ),
          vue.createElementVNode("view", { style: { "width": "10rpx" } }),
          vue.createElementVNode("view", { style: { "display": "flex", "flex-direction": "row", "width": "455rpx" } }, [
            vue.createElementVNode("view", null, "任务状态："),
            vue.createElementVNode("view", {
              class: "picker-container",
              style: { "font-size": "30rpx" }
            }, [
              vue.createElementVNode("picker", {
                range: $data.taskStatusOptions,
                onChange: _cache[6] || (_cache[6] = (...args) => $options.onTaskStatusChange && $options.onTaskStatusChange(...args)),
                "range-key": "taskStatusName",
                value: $data.selectedtaskStatusIndex
              }, [
                vue.createElementVNode(
                  "view",
                  {
                    class: "uni-input",
                    style: { "padding-left": "5rpx" }
                  },
                  vue.toDisplayString($data.taskStatusOptions[$data.selectedtaskStatusIndex].taskStatusName),
                  1
                  /* TEXT */
                )
              ], 40, ["range", "value"])
            ])
          ])
        ])
      ]),
      vue.createElementVNode("view", {
        class: "diy-flex-column",
        style: { "margin-top": "5rpx" }
      }, [
        vue.createElementVNode("scroll-view", {
          class: "scroll-view",
          "scroll-y": "true"
        }, [
          (vue.openBlock(true), vue.createElementBlock(
            vue.Fragment,
            null,
            vue.renderList($data.cardData, (item, index) => {
              return vue.openBlock(), vue.createElementBlock("view", {
                key: index,
                onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
                onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
                onLongpress: ($event) => $options.longpress(item)
              }, [
                vue.createVNode(_component_TaskCard, {
                  item,
                  currentIndex: index,
                  cardData: $data.cardData
                }, null, 8, ["item", "currentIndex", "cardData"])
              ], 40, ["onLongpress"]);
            }),
            128
            /* KEYED_FRAGMENT */
          ))
        ])
      ])
    ]);
  }
  const PagesAgvTasksAgvTasks = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/代码/赛特制冷WCS/PDA/PDA/pages/agvTasks/agvTasks.vue"]]);
  __definePage("pages/index/index", PagesIndexIndex);
  __definePage("pages/config/config", PagesConfigConfig);
  __definePage("pages/main/main", PagesMainMain);
  __definePage("pages/bind/bind", PagesBindBind);
  __definePage("pages/bindSelectMat/bindSelectMat", PagesBindSelectMatBindSelectMat);
  __definePage("pages/queryBindList/queryBindList", PagesQueryBindListQueryBindList);
  __definePage("pages/stockTaking/stockTaking", PagesStockTakingStockTaking);
  __definePage("pages/shelfLocationBindUnbind/shelfLocationBindUnbind", PagesShelfLocationBindUnbindShelfLocationBindUnbind);
  __definePage("pages/productionLineCallIn/productionLineCallIn", PagesProductionLineCallInProductionLineCallIn);
  __definePage("pages/productionLineCallOut/productionLineCallOut", PagesProductionLineCallOutProductionLineCallOut);
  __definePage("pages/agvTasks/agvTasks", PagesAgvTasksAgvTasks);
  const _sfc_main = {
    onLaunch: function() {
      formatAppLog("log", "at App.vue:4", "App Launch");
    },
    onShow: function() {
      formatAppLog("log", "at App.vue:7", "App Show");
    },
    onHide: function() {
      formatAppLog("log", "at App.vue:10", "App Hide");
    }
  };
  const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/代码/赛特制冷WCS/PDA/PDA/App.vue"]]);
  function createApp() {
    const app = vue.createVueApp(App);
    return {
      app
    };
  }
  const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
  uni.Vuex = __Vuex__;
  uni.Pinia = __Pinia__;
  __app__.provide("__globalStyles", __uniConfig.styles);
  __app__._component.mpType = "app";
  __app__._component.render = () => {
  };
  __app__.mount("#app");
})(Vue);
