huituanxueqian пре 6 месеци
родитељ
комит
30fd884fd1
42 измењених фајлова са 1263 додато и 179 уклоњено
  1. 0 40
      README.md
  2. BIN
      __MACOSX/components/._.DS_Store
  3. BIN
      __MACOSX/components/p-inputSearch/._.DS_Store
  4. BIN
      components/.DS_Store
  5. BIN
      components/p-inputSearch/.DS_Store
  6. 120 0
      components/p-inputSearch/inputSearch.vue
  7. 25 0
      main.js
  8. 9 0
      pages.json
  9. 56 0
      pages/Warehousing/index.vue
  10. 482 0
      pages/index/Material/Material.vue
  11. 16 0
      pages/index/index.vue
  12. 1 1
      pages/index/login.vue
  13. 72 3
      pages/index/me/task/task.vue
  14. 38 119
      pages/new_file.vue
  15. 20 0
      uni_modules/qiao-select/changelog.md
  16. 319 0
      uni_modules/qiao-select/components/qiao-select/qiaoSelect.vue
  17. 62 0
      uni_modules/qiao-select/introduce.md
  18. 27 0
      uni_modules/qiao-select/package.json
  19. 2 2
      unpackage/dist/build/app-plus/app-config-service.js
  20. 5 5
      unpackage/dist/build/app-plus/app-service.js
  21. 1 1
      unpackage/dist/build/app-plus/app-view.js
  22. BIN
      unpackage/res/icons/1024x1024.png
  23. BIN
      unpackage/res/icons/120x120.png
  24. BIN
      unpackage/res/icons/144x144.png
  25. BIN
      unpackage/res/icons/152x152.png
  26. BIN
      unpackage/res/icons/167x167.png
  27. BIN
      unpackage/res/icons/180x180.png
  28. BIN
      unpackage/res/icons/192x192.png
  29. BIN
      unpackage/res/icons/20x20.png
  30. BIN
      unpackage/res/icons/29x29.png
  31. BIN
      unpackage/res/icons/40x40.png
  32. BIN
      unpackage/res/icons/58x58.png
  33. BIN
      unpackage/res/icons/60x60.png
  34. BIN
      unpackage/res/icons/72x72.png
  35. BIN
      unpackage/res/icons/76x76.png
  36. BIN
      unpackage/res/icons/80x80.png
  37. BIN
      unpackage/res/icons/87x87.png
  38. BIN
      unpackage/res/icons/96x96.png
  39. BIN
      unpackage/resources/__UNI__6C04090.zip
  40. 2 2
      unpackage/resources/__UNI__6C04090/www/app-config-service.js
  41. 5 5
      unpackage/resources/__UNI__6C04090/www/app-service.js
  42. 1 1
      unpackage/resources/__UNI__6C04090/www/app-view.js

+ 0 - 40
README.md

@@ -64,43 +64,3 @@ Vue.use(uView);
 	]
 }
 ```
-
-请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
-
-## 使用方法
-
-配置 easycom 规则后,自动按需引入,无需`import`组件,直接引用即可。
-
-```html
-<template>
-  <u-button>按钮</u-button>
-</template>
-```
-
-请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
-
-## 链接
-
-- [官方文档](https://uviewui.com/)
-- [更新日志](https://uviewui.com/components/changelog.html)
-- [升级指南](https://uviewui.com/components/changelog.html)
-- [关于我们](https://uviewui.com/cooperation/about.html)
-
-## 预览
-
-您可以通过**微信**扫码,查看最佳的演示效果。
-<br>
-<br>
-<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
-
-<!-- ## 捐赠uView的研发
-
-uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
-
-<img src="https://uviewui.com/common/wechat.png" width="220" >
-<img style="margin-left: 100px;" src="https://uviewui.com/common/alipay.png" width="220" >
- -->
-
-## 版权信息
-
-uView 遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将 uView 应用到您的产品中。

BIN
__MACOSX/components/._.DS_Store


BIN
__MACOSX/components/p-inputSearch/._.DS_Store


BIN
components/.DS_Store


BIN
components/p-inputSearch/.DS_Store


+ 120 - 0
components/p-inputSearch/inputSearch.vue

@@ -0,0 +1,120 @@
+<template>
+  <!--
+	<inputSearch :dataSource="dataSource" @select="handleChange" placeholder="请输入商品名称" />
+	//数据源
+	dataSource: [{
+			id: 1,
+			name: '耐克1'
+		},
+		{
+			id: 2,
+			name: '耐克2'
+		}
+	],
+	 
+	 //用户点击获取的数据
+	 handleChange(data) {
+	 	console.log(data)
+	 }
+	 
+	 -->
+  <view class="input-group">
+    <input
+      :placeholder="placeholder"
+      @input="search"
+      @blur="hideList"
+      v-model="name" />
+    <view class="ul">
+      <view
+        class="li"
+        v-for="(item, index) in list"
+        :key="index"
+        @click="select(item)">
+        {{ item.name }}
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    placeholder: String, //默认提示
+    searchKey: String, //模糊搜索的key值
+    dataSource: {
+      type: Array,
+      default: function () {
+        //数据源
+        return [];
+      },
+    },
+  },
+  data() {
+    return {
+      list: [],
+      name: "",
+      backName: "",
+    };
+  },
+  destroyed() {
+    clearTimeout(this.t);
+  },
+  methods: {
+    search(e) {
+      let val = e.detail.value;
+      let { dataSource } = this;
+      let arr = [];
+      for (let i = 0; i < dataSource.length; i++) {
+        if (dataSource[i].name.indexOf(val) !== -1) {
+          arr.push(dataSource[i]);
+        }
+      }
+      // console.log(arr)
+      if (!val) {
+        this.list = [];
+      } else {
+        this.list = arr;
+      }
+    },
+    select(item) {
+      console.log("item", item);
+      this.backName = item.name;
+      this.list = [];
+      this.$emit("select", item);
+    },
+    hideList() {
+      this.list = [];
+      this.t = setTimeout(() => {
+        this.name = this.backName;
+      }, 0);
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.input-group {
+  position: relative;
+
+  input {
+    border: 1upx solid gray;
+    height: 90upx;
+    padding-left: 10upx;
+    font-size: 30upx;
+    box-sizing: border-box;
+  }
+
+  .ul {
+    position: absolute;
+    left: 0;
+    top: 100%;
+    width: 100%;
+    background: #eaeaea;
+
+    .li {
+      border-bottom: 1upx solid gray;
+      line-height: 60upx;
+    }
+  }
+}
+</style>

+ 25 - 0
main.js

@@ -3,19 +3,43 @@ import App from "./App";
 import uView from "uview-ui";
 import api from "@/libs/http/index.js";
 import store from "./store";
+import VueI18n from "vue-i18n";
+
+Vue.use(VueI18n);
 Vue.prototype.$store = store;
 Vue.prototype.api = api; //(2)
 Vue.use(uView);
 import { throttle } from "@/libs/util/utils.js"; //防抖
 Vue.prototype.socketTask = null;
 Vue.prototype.isClose = false;
+const i18n = new VueI18n({
+  locale: "en-US",
+  messages: {
+    "en-US": {
+      index: {
+        invite: "Invite",
+        game: "Game",
+      },
+    },
+    "zh-CN": {
+      index: {
+        invite: "邀请",
+        game: "游戏",
+      },
+    },
+  },
+});
+
+Vue.prototype._i18n = i18n;
 Vue.directive("throttle", throttle);
 // #ifndef VUE3
 import Vue from "vue";
 import { broadcastScan } from "@/utils/scanCode";
 // main.js
 // import "amfe-flexible";
+import inputSearch from "@/components/p-inputSearch/inputSearch.vue";
 
+Vue.component("inputSearch", inputSearch);
 Vue.prototype.apiServer = "http://192.168.1.45/dev-api";
 Vue.prototype.$broadcastScan = broadcastScan;
 Vue.prototype.ip = "192.168.1.45";
@@ -31,6 +55,7 @@ uni.setStorage({
 
 const app = new Vue({
   ...App,
+  i18n,
   store,
 });
 app.$mount();

+ 9 - 0
pages.json

@@ -41,6 +41,15 @@
         "softinputMode": "adjustResize"
       }
     },
+    {
+      "path": "pages/index/Material/Material",
+      "style": {
+        "navigationBarTitleText": "绑定料架号",
+        "navigationBarBackgroundColor": "#ff0505",
+        "navigationBarTextStyle": "white",
+        "softinputMode": "adjustResize"
+      }
+    },
     {
       "path": "pages/index/search/search",
       "style": {

+ 56 - 0
pages/Warehousing/index.vue

@@ -18,6 +18,15 @@
           @change="change"></uni-data-select>
       </view>
     </view>
+    <view class="confirm-view" v-if="deviceShow">
+      <text class="text" style="width: 195px">退货下料设备编号:</text>
+      <view class="" style="width: 74%">
+        <uni-data-select
+          v-model="deviId"
+          :localdata="devicez1List"
+          @change="deviChange"></uni-data-select>
+      </view>
+    </view>
     <view class="confirm-view" v-if="sourceLocationIdshow">
       <text class="text">批次号:</text>
       <uni-easyinput
@@ -117,6 +126,7 @@ export default {
       recshowRamik: false,
       focusState: false,
       fote: false,
+      deviceShow: false,
       palletNo: "",
       status: "",
       productionLine: "Z1",
@@ -126,11 +136,13 @@ export default {
       qty: "1",
       device: "",
       deviceList: [],
+      deviId: "",
       updateTime: "",
       valueTmia: "",
       palletNoshow: false,
       sourceLocationIdshow: true,
       tabList: [],
+      devicez1List: [],
       dataTime: "请选择日期",
       valueTime: Number(new Date()),
       radiolist1: [
@@ -230,13 +242,23 @@ export default {
       console.log("e", e);
       this.status = e;
       if (e < 5) {
+        this.deviceShow = false;
         this.palletNoshow = false;
         this.sourceLocationIdshow = true;
+      } else if (e == 5) {
+        this.deviceShow = true;
+        this.palletNoshow = true;
+        this.sourceLocationIdshow = false;
       } else if (e >= 5) {
+        this.deviceShow = false;
         this.palletNoshow = true;
         this.sourceLocationIdshow = false;
       }
     },
+    deviChange(e) {
+      console.log("e", e);
+      this.deviId = e;
+    },
     deviceChange(e) {
       console.log("e", e);
       this.deviceld = e;
@@ -328,6 +350,7 @@ export default {
         productionLine: this.productionLine,
         status: this.status,
         updateTime: this.updateTime,
+        sanPanDevice: this.deviId,
       };
       let that = this;
 
@@ -402,6 +425,39 @@ export default {
               }
             },
           });
+          uni.request({
+            url:
+              `http://${that.host}` +
+              "/system/dict/data/type/z1_san_pan_device",
+            header: {
+              Authorization: res.data,
+              "content-type": "application/x-www-form-urlencoded",
+            },
+
+            method: "GET",
+            success(respenon) {
+              console.log("chaoShiPanDuan", respenon);
+              if (respenon.data.code == 200) {
+                // { value: 0, text: "篮球" },
+                respenon.data.data.forEach((item, index) => {
+                  Object.assign(item, {
+                    value: item.dictValue,
+                    text: item.dictLabel,
+                  });
+                });
+                that.devicez1List = respenon.data.data;
+              } else if (respenon.data.code == 401) {
+                uni.reLaunch({
+                  url: "/pages/index/login",
+                });
+              } else {
+                uni.showToast({
+                  title: respenon.data.msg,
+                  icon: "none",
+                });
+              }
+            },
+          });
         },
       });
     },

+ 482 - 0
pages/index/Material/Material.vue

@@ -0,0 +1,482 @@
+<template>
+  <view class="content">
+    <view class="confirm-view">
+      <text class="text">批次号:</text>
+      <qiaoSelect
+        :keyId="1"
+        :dataList="dataSource"
+        phText="选择批次号"
+        showField="batchNo"
+        searchKey="batchNo"
+        :showObj="showObj"
+        :showBorder="false"
+        :disabled="false"
+        @change="selectChange"
+        @input="inputChange"></qiaoSelect>
+      <!-- </view> -->
+    </view>
+    <view class="confirm-view">
+      <text class="text">料架号:</text>
+      <uni-easyinput
+        errorMessage
+        type="text"
+        v-model="from.shelfNumber"
+        focus
+        :focus="focusStatetim"
+        @focus="focusFnsw"
+        :class="recshowsw ? 'rec' : ''"
+        @blur="focusStatetim = false"
+        @input="inputEasy"
+        placeholder-style="font-size:16px;color: #a7a7a7;"
+        :placeholder="placeholdesrs"></uni-easyinput>
+    </view>
+    <view class="confirm-view">
+      <text class="text">机组号:</text>
+      <uni-easyinput
+        errorMessage
+        type="text"
+        v-model="from.uniuCode"
+        focus
+        :focus="focusS"
+        @focus="focusFuniu"
+        :class="recsuniu ? 'rec' : ''"
+        @blur="focusS = false"
+        @input="inputEuniu"
+        placeholder-style="font-size:16px;color: #a7a7a7;"
+        :placeholder="placeho"></uni-easyinput>
+    </view>
+    <view class="confirm-view">
+      <text class="text">位置:</text>
+      <view class="" style="width: 100%">
+        <uni-data-select
+          style="width: 100%"
+          v-model="from.lotAddress"
+          :localdata="range"
+          @change="change"></uni-data-select>
+      </view>
+    </view>
+    <view class="confirm-view">
+      <text class="text">层数:</text>
+      <view class="" style="width: 100%">
+        <uni-data-select
+          style="width: 100%"
+          v-model="from.numberOfLayers"
+          :localdata="numberofLayersList"
+          @change="numberofLayersChange"></uni-data-select>
+      </view>
+    </view>
+    <view class="border-buttons">
+      <view class="buttons2" v-throttle="1000" @click="WeakRefthree">
+        <text>确认</text>
+      </view>
+    </view>
+    <xw-scan></xw-scan>
+
+    <u-toast ref="uToast" />
+  </view>
+</template>
+
+<script>
+import qiaoSelect from "@/uni_modules/qiao-select/components/qiao-select/qiaoSelect.vue";
+export default {
+  components: {
+    qiaoSelect,
+  },
+  data() {
+    return {
+      recshow: false,
+      recshowsw: false,
+      recsuniu: false,
+      focusStatetim: false,
+      focusS: false,
+      dataSource: [
+        {
+          id: 1,
+          name: "耐克1",
+        },
+        {
+          id: 2,
+          name: "耐克2",
+        },
+      ],
+      range: [
+        { value: "1", text: "1" },
+        { value: "2", text: "2" },
+        { value: "3", text: "3" },
+        { value: "4", text: "4" },
+        { value: "5", text: "5" },
+      ],
+      numberofLayersList: [
+        { value: "1", text: "1层" },
+        { value: "2", text: "2层" },
+      ],
+      palletNo: "",
+      materialType: "",
+      targetLocationld: "",
+      qty: "1",
+      valueTmia: "",
+      host: "",
+      radiolist1: [
+        {
+          name: "丁铵黑药",
+          disabled: true,
+          id: 5,
+        },
+      ],
+      page: {
+        pageNum: 1,
+        pageSize: 200,
+        inStatus: 5,
+      },
+      from: {
+        numberOfLayers: "",
+        batchNo: "",
+        shelfNumber: "",
+        lotAddress: "",
+        uniuCode: "Z1HT01",
+      },
+      obj: { batchNo: "" },
+      focusState: false,
+      value: "",
+      value2: "",
+      showObj: null,
+      placeholder: "请输入批次号",
+      placeholdesrs: "请输入料架号",
+      placeho: "请输入机组号",
+      valueTmname: "",
+    };
+  },
+  onLoad(option) {},
+  onUnload() {
+    // 移除监听事件
+    uni.$off("xwscan");
+  },
+  onHide() {},
+  onShow() {
+    let that = this;
+    let pages = getCurrentPages();
+    let currPage = pages[pages.length - 1]; //当前页面
+    if (currPage.testdata != undefined) {
+      console.log("$attrs", currPage.testdata);
+      this.targetLocationld = currPage.testdata.name;
+    }
+  },
+  created() {},
+  mounted() {
+    let _this = this;
+    uni.getStorage({
+      key: "hostappst",
+      success(res) {
+        console.log("获取成功", res.data);
+        _this.host = res.data;
+        _this.getData();
+      },
+    });
+  },
+  watch: {
+    scanCodeValue(value) {
+      if (!!value) {
+        document.onkeydown = null;
+      } else {
+        this.placeholder = "扫码失败,请重新扫码...";
+      }
+    },
+  },
+
+  onHide() {
+    this.recshow = false;
+  },
+  methods: {
+    //用户点击获取的数据
+    selectChange(e) {
+      console.log("e", e);
+      if (e) {
+        this.obj.batchNo = e.batchNo;
+      }
+      //返回选择的对象,如果输入框清空,返回null
+    },
+
+    inputChange(e) {
+      //返回搜索结果集合,一般用不到
+      console.log(e);
+      this.obj.batchNo = e;
+    },
+    getData() {
+      let that = this;
+      uni.getStorage({
+        key: "GetPhone_Token",
+        success: function (res) {
+          uni.request({
+            url: `http://${that.host}` + "/retroactive/now/list",
+            header: {
+              Authorization: res.data,
+              "content-type": "application/x-www-form-urlencoded",
+            },
+            data: that.page,
+            method: "GET",
+            success(respenon) {
+              console.log("chaoShiPanDuan", respenon);
+              if (respenon.data.code == 200) {
+                that.dataSource = respenon.data.rows;
+              } else {
+                uni.showToast({
+                  title: respenon.data.msg,
+                  icon: "none",
+                });
+              }
+            },
+          });
+        },
+      });
+    },
+    change(e) {
+      console.log("e", e, "1");
+      this.from.lotAddress = e;
+    },
+    numberofLayersChange(e) {
+      console.log("e", e, "1");
+      this.from.numberOfLayers = e;
+    },
+    WeakRefthree() {
+      if (this.obj.batchNo != null) {
+        this.from.batchNo = this.obj.batchNo;
+      }
+
+      let text = "";
+      if (this.from.batchNo == "") {
+        text = "请输入批次号";
+      } else if (this.from.numberOfLayers == "") {
+        text = "请选择物价号";
+      } else if (this.from.lotAddress == "") {
+        text = "请选择位置";
+      }
+      if (text != "") {
+        return uni.showToast({
+          title: text,
+          icon: "none",
+        });
+      }
+
+      this.GetBanner();
+    },
+    focusFn(e) {
+      this.recshow = true;
+      this.recshowsw = false;
+      this.recsuniu = false;
+      uni.$off("xwscan");
+      uni.$on("xwscan", (res) => {
+        console.log("扫码结果:", res.code);
+        this.targetLocationld = res.code;
+        this.valueTmname = res.code;
+      });
+      console.log("focus事件");
+    },
+    focusFnsw(e) {
+      this.recshow = false;
+      this.recsuniu = false;
+      this.recshowsw = true;
+      uni.$off("xwscan");
+      uni.$on("xwscan", (res) => {
+        console.log("扫码结果:", res.code);
+        this.targetLocationld = res.code;
+        this.targetLocationldTmname = res.code;
+      });
+      console.log("focus事件");
+    },
+    focusFuniu(e) {
+      this.recshow = false;
+      this.recsuniu = true;
+      this.recshowsw = false;
+      uni.$off("xwscan");
+      uni.$on("xwscan", (res) => {
+        console.log("扫码结果:", res.code);
+        this.targetLocationld = res.code;
+        this.targetLocationldTmname = res.code;
+      });
+      console.log("focus事件");
+    },
+    input(e) {
+      this.from.batchNo = e;
+    },
+    inputEasy(e) {
+      this.from.shelfNumber = e;
+    },
+    inputEuniu(e) {
+      this.from.uniuCode = e;
+    },
+    GetBanner() {
+      let that = this;
+
+      uni.getStorage({
+        key: "GetPhone_Token",
+        success: function (res) {
+          uni.request({
+            url: `http://${that.host}` + "/retroactive/now/bindShelf",
+            header: {
+              Authorization: res.data,
+              "content-type": "application/json;charset=utf-8",
+            },
+            data: that.from,
+            method: "POST",
+            success(respenon) {
+              console.log("chaoShiPanDuan", respenon);
+              if (respenon.data.code == 200) {
+                setTimeout(() => {
+                  uni.showToast({
+                    title: respenon.data.msg,
+                    icon: "none",
+                  });
+                }, 1000);
+                uni.navigateTo({
+                  url: "/pages/index/tabbar/tabbar",
+                });
+              } else {
+                uni.showToast({
+                  title: respenon.data.msg,
+                  icon: "none",
+                });
+              }
+              console.log("res", res);
+            },
+          });
+        },
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+/deep/.is-input-border {
+  display: flex;
+  box-sizing: border-box;
+  flex-direction: row;
+  align-items: center;
+
+  border-radius: 4px;
+  background-color: rgb(245 245 245) !important;
+  /* background: #24bdbd; */
+}
+/deep/uni-button {
+  color: #000;
+  border: 1px solid #ff0000;
+  border-radius: 31px;
+  width: 21%;
+  background-color: #f5f5f5;
+  height: 42px;
+  font-size: 16px;
+  color: #ff0000;
+}
+/deep/.uni-easyinput__content-input[data-v-abe12412] {
+  width: auto;
+  position: relative;
+  overflow: hidden;
+  flex: 1;
+  line-height: 1;
+  font-size: 14px;
+  height: 35px;
+  /* border-bottom: 1px solid #ff0000 !important; */
+}
+/deep/.is-input-border {
+  display: flex;
+  box-sizing: border-box;
+  flex-direction: row;
+  align-items: center;
+  border: none !important;
+  border-radius: 4px;
+}
+.recto {
+  box-sizing: border-box;
+  position: relative;
+  overflow: hidden;
+  /* margin: 300px auto; */
+  /* width: 300px; */
+  /* height: 4px; */
+  /* border: 0.1px solid #ccc; */
+}
+.recto::before {
+  position: absolute;
+
+  bottom: 0;
+  content: "";
+  height: 2px;
+  width: 364px;
+  background-color: red;
+  /* 依次对应:动画名、时长、匀速、无限循环 */
+  animation: move 3s;
+}
+
+@keyframes move {
+  from {
+    left: -100%;
+  }
+  to {
+    left: 100%;
+  }
+}
+</style>
+<style lang="scss" scoped>
+.content {
+  padding: 15px;
+  .confirm-view {
+    display: flex;
+    margin-bottom: 15px;
+    align-items: center;
+    height: 55px;
+    /* border-top: 1px solid #dbdbdb; */
+    /* border-bottom: 1px solid; */
+    border-bottom: 1px solid #dbdbdb;
+    .text {
+      font-size: 16px;
+      color: #6e6860;
+      font-weight: 500;
+      width: 80px;
+      text-align-last: justify;
+    }
+  }
+  .vontent_boby {
+    margin: 15px 0;
+    border-top: 1px solid #dbdbdb;
+    display: flex;
+    justify-content: space-between;
+    font-size: 15px;
+    color: #838383;
+    border-bottom: 1px solid #dbdbdb;
+    height: 55px;
+    align-items: center;
+  }
+  .border-buttons {
+    display: flex;
+    position: absolute;
+    button: 0;
+    bottom: 32px;
+    justify-content: space-between;
+    width: 91%;
+    text-align: center;
+    .buttons {
+      width: 46%;
+      border: 1px solid #f00;
+      border-radius: 34px;
+      height: 42px;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 18px;
+      color: red;
+      font-weight: 500;
+    }
+    .buttons2 {
+      width: 100%;
+      border: 1px solid #ff0505;
+      border-radius: 34px;
+      height: 42px;
+      background: red;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 18px;
+      color: white;
+      font-weight: 500;
+    }
+  }
+}
+</style>

+ 16 - 0
pages/index/index.vue

@@ -14,6 +14,17 @@
               <view style="margin-top: 5px">补码</view>
             </view>
           </view>
+          <view class="border-boke" @click="Material">
+            <view class="sawda">
+              <view class="">
+                <uni-icons
+                  type="gear-filled"
+                  color="#ff0505"
+                  size="40"></uni-icons>
+              </view>
+              <view style="margin-top: 5px">绑定料架号</view>
+            </view>
+          </view>
         </view>
       </view>
       <!-- 主体表单 -->
@@ -43,6 +54,11 @@ export default {
         url: "/pages/Warehousing/index",
       });
     },
+    Material() {
+      uni.navigateTo({
+        url: "/pages/index/Material/Material",
+      });
+    },
     roter() {
       uni.navigateTo({
         url: "/pages/new_file",

+ 1 - 1
pages/index/login.vue

@@ -2,7 +2,7 @@
   <view class="login">
     <view class="content">
       <view class="header_title">
-        <text>欢迎使用海亮安徽WareWMS仓储管理系统</text>
+        <text>欢迎使用海亮安徽WareWMS工艺追溯</text>
       </view>
       <view class="main">
         <wInput

+ 72 - 3
pages/index/me/task/task.vue

@@ -52,14 +52,29 @@
 
         <view class="content_boby" style="justify-content: end">
           <view class="content_boby_view">
-            <u-button @click="logReter(obj.deviceId)" size="mini" type="error">
-              查看设备日志
-            </u-button>
+            <view class="content_boby_button">
+              <u-button
+                style="margin: 0 2vw; width: 63px"
+                v-show="isCodeReadDevice(obj.deviceName)"
+                @click="readingFrame(obj)"
+                size="mini"
+                type="warning">
+                读码
+              </u-button>
+              <u-button
+                style="width: 113px"
+                @click="logReter(obj.deviceId)"
+                size="mini"
+                type="error">
+                查看设备日志
+              </u-button>
+            </view>
           </view>
         </view>
         <view class="hr"></view>
       </view>
     </view>
+    <u-modal v-model="show" :content="content"></u-modal>
   </view>
 </template>
 
@@ -68,6 +83,8 @@ export default {
   components: {},
   data() {
     return {
+      show: true,
+      content: "东临碣石,以观沧海",
       obj: {},
 
       statusType: [
@@ -157,6 +174,55 @@ export default {
         url: "/pages/index/me/log/log?id=" + id,
       });
     },
+    isCodeReadDevice(name) {
+      let pattern = /^CodeReader/;
+      return pattern.test(name);
+    },
+    readingFrame(data) {
+      let that = this;
+      uni.showModal({
+        title: "读码",
+        content: "你确定要读码这个数据吗?",
+        confirmColor: "red",
+        success: function (res) {
+          if (res.confirm) {
+            uni.getStorage({
+              key: "GetPhone_Token",
+              success: function (res) {
+                uni.request({
+                  url: `http://${that.host}` + "/device/triggerCodeRead",
+                  header: {
+                    Authorization: res.data,
+                  },
+                  data: data,
+                  method: "POST",
+                  success(respenon) {
+                    console.log("chaoShiPanDuan", respenon);
+                    if (respenon.data.code == 200) {
+                      uni.showToast({
+                        title: respenon.data.msg,
+                        icon: "none",
+                      });
+                    } else if (respenon.data.code == 401) {
+                      uni.reLaunch({
+                        url: "/pages/index/login",
+                      });
+                    } else {
+                      uni.showToast({
+                        title: respenon.data.msg,
+                        icon: "none",
+                      });
+                    }
+                  },
+                });
+              },
+            });
+          } else if (res.cancel) {
+            console.log("用户点击了取消按钮");
+          }
+        },
+      });
+    },
     getData(type) {
       let that = this;
       let data = {
@@ -223,6 +289,9 @@ export default {
     .showTres {
       color: red;
     }
+    .content_boby_button {
+      display: flex;
+    }
   }
   .hr {
     width: 100%;

+ 38 - 119
pages/new_file.vue

@@ -1,133 +1,52 @@
 <template>
-  <view class="websockets">
-    <button type="primary" @tap="clickRequest">点击发送请求</button>
-    <button type="primary" @tap="leave">离开页面</button>
-  </view>
+  <div>
+    <div v-for="row in 10" class="row" :key="row">
+      <div
+        v-for="col in 10"
+        class="col"
+        :key="col"
+        :class="{ marked: isMarked(row, col) }">
+        {{ row }} - {{ col }}
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
 export default {
-  onLoad() {
-    // 进入这个页面的时候创建websocket连接【整个页面随时使用】
-    this.connectSocketInit();
-    this.generateRandomNumber();
-  },
   data() {
     return {
-      socketTask: null,
-      // 确保websocket是打开状态
-      is_open_socket: false,
-      num: 0,
+      markedPoints: [
+        { row: 2, col: 3 },
+        { row: 5, col: 7 },
+        // 添加其他标记点的坐标
+      ],
     };
   },
-  // 关闭websocket【必须在实例销毁之前关闭,否则会是underfined错误】
-  beforeDestroy() {
-    this.closeSocket();
-  },
   methods: {
-    generateRandomNumber() {
-      this.num = Math.floor(100000 + Math.random() * 900000);
-    },
-    // 进入这个页面的时候创建websocket连接【整个页面随时使用】
-    connectSocketInit() {
-      console.log("进", this.num);
-      let that = this;
-      // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
-      this.socketTask = uni.connectSocket({
-        // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
-        url: "ws://69ec7abc.r16.cpolar.top/websocket/device/" + this.num,
-        success(data) {
-          console.log("websocket连接成功");
-          that.heart();
-        },
-      });
-
-      // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
-      this.socketTask.onOpen((res) => {
-        console.log("WebSocket连接正常打开中...!", res);
-        this.is_open_socket = true;
-        // 注:只有连接正常打开中 ,才能正常成功发送消息
-        this.socketTask.send({
-          data: "uni-app发送一条消息",
-          async success(res) {
-            console.log("消息发送成功", res);
-          },
-        });
-        // 注:只有连接正常打开中 ,才能正常收到消息
-        this.socketTask.onMessage((res) => {
-          console.log("收到服务器内容:" + res.data);
-        });
-      });
-      // 这里仅是事件监听【如果socket关闭了会执行】
-      this.socketTask.onClose(() => {
-        console.log("已经被关闭了");
-      });
-    },
-    // 关闭websocket【离开这个页面的时候执行关闭】
-    closeSocket() {
-      this.socketTask.close({
-        success(res) {
-          this.is_open_socket = false;
-          console.log("关闭成功", res);
-        },
-        fail(err) {
-          console.log("关闭失败", err);
-        },
-      });
-    },
-    clickRequest() {
-      console.log("this.is_open_socket", this.is_open_socket);
-      if (this.is_open_socket) {
-        // websocket的服务器的原理是:发送一次消息,同时返回一组数据【否则服务器会进去死循环崩溃】
-        this.socketTask.send({
-          data: "请求一次发送一次message",
-          async success() {
-            console.log("消息发送成功");
-          },
-        });
-      }
-    }, //发送消息
-    sendSocketMessage(msg) {
-      console.log("发送信息");
-      console.log(msg);
-      return new Promise((reslove, reject) => {
-        this.socketTask.send({
-          data: msg,
-          success(res) {
-            console.log("发送成功");
-            reslove(res);
-          },
-          fail(res) {
-            console.log("发送失败");
-            console.log(res);
-            reject(res);
-          },
-        });
-      });
-    },
-    //心跳
-    heart() {
-      let that = this;
-      clearInterval(this.timer);
-      this.timer = "";
-      let msg = {
-        type: this.num,
-      };
-      this.timer = setInterval(() => {
-        that
-          .sendSocketMessage(JSON.stringify(this.num))
-          .then((res) => {
-            console.log("心跳成功");
-          })
-          .catch((res) => {
-            console.log("发送失败");
-            console.log(res);
-          });
-      }, 10000);
-    },
-    leave() {
-      this.$uniReLaunch("/pages/tabbar/wallet/wallet");
+    isMarked(row, col) {
+      return this.markedPoints.some(
+        (point) => point.row === row && point.col === col
+      );
     },
   },
 };
 </script>
+
+<style>
+/* 添加样式来区分标记点 */
+.marked {
+  background-color: red;
+}
+.row {
+  display: flex;
+}
+.col {
+  width: 30px;
+  height: 30px;
+  border: 1px solid #000;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+</style>

+ 20 - 0
uni_modules/qiao-select/changelog.md

@@ -0,0 +1,20 @@
+## 1.0.7(2023-07-04)
+优化宽度太窄的时候显示效果;
+## 1.0.6(2023-06-16)
+优化;
+## 1.0.5(2023-06-16)
+新增支持禁用;
+## 1.0.4(2023-06-16)
+优化;
+## 1.0.3(2023-06-15)
+1、可设置展示字段;
+2、可设置默认值;
+## 1.0.0(2023-06-15)
+1、可设置默认值;
+2、可设置展示字段;
+## 1.0.2(2023-06-15)
+优化
+## 1.0.1(2023-06-15)
+修改问题;
+## 1.0.0(2023-06-15)
+初版提交

+ 319 - 0
uni_modules/qiao-select/components/qiao-select/qiaoSelect.vue

@@ -0,0 +1,319 @@
+<template>
+	<view class="qiaoSelect" :class="{'ban':disabled}">
+		<input type="text" class="input" :class="{'input-border':showBorder}" @input="watchInput" @focus="focus"
+			@blur="blur" :placeholder="phText"  @tap="open" :disabled="disabled"
+			v-model="inputText" />
+		<view class="icon">
+			<uni-icons type="close" size="15" color="#515151" class="img-close" @click="clickClear"
+				v-if="inputText!==''&&!disabled"></uni-icons>
+			<uni-icons v-show="popupShow" type="bottom" size="15" color="#515151"></uni-icons>
+			<uni-icons v-show="!popupShow" type="right" size="15" color="#515151"></uni-icons>
+		</view>
+		<view class="select" v-show="popupShow">
+			<view class="box">
+				<view style="color: #515151;font-size: 30rpx;" v-if="dataList.length==0">暂无数据</view>
+				<view style="color: #515151;font-size: 30rpx;" v-if="filPersons.length==0&&dataList.length!=0">
+					暂无数据
+				</view>
+				<view @touchstart="touchst" v-for="(item,index) in filPersons" :key="index">
+					<view @click.stop="Check(item)" style="text-align: left;" class="li"
+						:class="item.qiaoSelectKey==inputText?'blue':''">
+						{{item[showField]}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="popup" v-show="popupShow" @click="close">
+			<view>
+
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			//下拉数据
+			dataList: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			//唯一键,用于多个关闭
+			keyId: Number | String,
+			//提示语
+			phText: String,
+			//提示语颜色
+			phColor: {
+				type: String,
+				default: '#999999',
+			},
+			//指定搜索的属性
+			searchKey: {
+				type: String,
+				default: 'name'
+			},
+			//是否显示边框
+			showBorder: {
+				type: Boolean,
+				default: true,
+			},
+			//默认显示的条目
+			showObj: {
+				type: Object,
+				default: null,
+			},
+			//展示的字段
+			showField: {
+				type: String,
+				default: 'name'
+			},
+			//是否禁用
+			disabled: {
+				type: Boolean,
+				default: false,
+			},
+		},
+		data() {
+			return {
+				timer: '', //定时器
+				popupShow: false,
+				inputText: '',
+				isInput: true, //是否输入,如果输入开始模糊查询
+			}
+		},
+		onLoad() {},
+		computed: {
+			filPersons: {
+				get() {
+					if (!this.isInput) {
+						return this.dataList
+					} else {
+						return this.dataList.filter((item) => {
+							if (item.qiaoSelectKey) {
+								return item.qiaoSelectKey.indexOf(this.inputText) != -1
+							} else {
+								return []
+							}
+						})
+					}
+				},
+				set(val) {}
+			}
+
+		},
+		watch: {
+			inputText: {
+				immediate: true,
+				handler(val) {
+					this.filPersons = this.dataList.filter((item) => {
+						if (!item.qiaoSelectKey) return
+						return item.qiaoSelectKey.indexOf(val) != -1
+					})
+				}
+			},
+			dataList: {
+				immediate: true,
+				handler(val) {
+					if (this.dataList.length > 0) {
+						this.dataList.forEach(item => {
+							Object.keys(item).map((key) => {
+								if (item[this.searchKey]) {
+									item.qiaoSelectKey = item[this.searchKey].toString()
+								} else if (item[this.showField]) { //没有指定搜索字段,默认搜索展示字段
+									item.qiaoSelectKey = item[this.showField].toString()
+								}
+							})
+						})
+						this.inputText = ''
+					}
+				}
+			},
+			//监听赋值
+			showObj: {
+				handler(val) {
+					if (val) {
+						this.inputText = val[this.showField]
+						this.$emit('input', [val])
+						this.$emit('change', val)
+					} else {
+						this.inputText = ''
+						this.$emit('input', [])
+						this.$emit('change', null)
+					}
+				},
+				deep: true,
+				immediate: true,
+			},
+		},
+		methods: {
+			clickClear() {
+				this.inputText = ''
+				this.$emit('input', [])
+				this.$emit('change', null)
+			},
+			touchst() {
+				if (this.disabled) return;
+				this.popupShow = true
+			},
+			focus() {
+				this.isInput = false
+			},
+			watchInput(e) { //键盘输入
+			console.log('e',e.detail.value)
+				this.isInput = true
+				 this.$emit('input', e.detail.value)
+				if (this.inputText) {
+					this.$emit('input', e.detail.value)
+				}
+				if (this.inputText === '') {
+					// this.$emit('input', [])
+					// this.$emit('change', null)
+					this.$emit('input', e.detail.value)
+				}
+			},
+			Check(i) { //选择选项
+				this.inputText = i[this.showField]
+				this.isInput = false
+				this.close()
+				this.$emit('change', i)
+			},
+			open() {
+				if (this.disabled) return;
+				uni.setStorageSync('keyId', this.keyId)
+				this.popupShow = true
+			},
+			close() { //关闭
+				this.popupShow = false
+			},
+			blur() {
+				this.timer = setInterval(() => {
+					if (this.popupShow && uni.getStorageSync('keyId') != this.keyId) {
+						this.popupShow = false
+					}
+					setTimeout(() => {
+						clearInterval(this.timer)
+					}, 100)
+				}, 200)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	$height: 60rpx;
+
+	.ban {
+		background: #F7F7F6;
+	}
+
+	.qiaoSelect {
+		margin: 0;
+		padding: 0;
+		width: 100%;
+		position: relative;
+		height: $height;
+		display: flex;
+		align-items: center;
+
+		.img-close {
+			margin: 0 10rpx;
+		}
+
+		.icon {
+			z-index: 99;
+		}
+
+		.input {
+			flex: 1;
+			border-radius: 10rpx;
+			height: $height;
+			padding: 0;
+			font-size: 30rpx;
+			word-break: break-all;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 1;
+			overflow: hidden;
+		}
+
+		.input-border {
+			border: 1rpx solid #ECECEC;
+			padding-left: 20rpx;
+		}
+
+		.select {
+			padding: 20rpx;
+			color: #515151;
+			position: absolute;
+			top: 90rpx;
+			left: 0;
+			right: 0;
+			z-index: 100;
+			background-color: white;
+			border: 2px #f3f3f3 solid;
+			font-size: 30rpx;
+			background-color: #fff;
+			border-radius: 10rpx;
+
+			.box {
+				max-height: 300rpx;
+				overflow: scroll;
+			}
+
+			.li {
+				padding: 10rpx 0;
+			}
+
+			.blue {
+				color: #55aaff;
+			}
+		}
+
+		.select::after {
+			width: 0px;
+			height: 0px;
+			position: absolute;
+			bottom: 100%;
+			left: 10%;
+			padding: 0;
+			border: 16rpx solid transparent;
+			border-color: transparent transparent #fff transparent;
+			content: '';
+		}
+
+		.select::before {
+			width: 0px;
+			height: 0px;
+			position: absolute;
+			bottom: 100%;
+			left: 10%;
+			padding: 0;
+			border: 20rpx solid transparent;
+			border-color: transparent transparent #f3f3f3 transparent;
+			transform: translate(-4rpx, 0);
+			content: '';
+		}
+
+		.popup {
+			position: absolute;
+			z-index: 9;
+			left: 0;
+			top: 0;
+			right: 0;
+			bottom: 0;
+
+			view {
+				position: fixed;
+				left: 0;
+				top: 0;
+				right: 0;
+				bottom: 0;
+			}
+		}
+
+	}
+</style>

+ 62 - 0
uni_modules/qiao-select/introduce.md

@@ -0,0 +1,62 @@
+示例代码:
+
+1、引入:
+
+	import qiaoSelect from '@/uni_modules/qiao-select/components/qiao-select/qiaoSelect.vue'
+
+2、添加:
+
+	components: {
+		qiaoSelect
+	},
+
+3、使用:
+
+	组件默认展示的是【name】字段,可通过showField设置,最终@change返回整个选择的对象
+	
+	如果需要设置初始默认值,通过showObj设置,赋值要展示的条目对象
+	
+	组件外层View可以给个宽度
+
+	<view style="width: 300rpx;">
+		<qiaoSelect :keyId="1" :dataList="orgArray" phText="选择机构名称" phColor="#999999" showField="name" searchKey="name"
+			:showObj="showObj" :showBorder="false" :disabled="false" @change="selectChange" @input='inputChange'></qiaoSelect>
+	</view>
+					
+	selectChange(e) {//返回选择的对象,如果输入框清空,返回null
+		if (e) {
+			this.mechId = e.id
+		} else {
+			this.mechId = ''
+		}
+	},
+	inputChange(e) {//返回搜索结果集合,一般用不到
+		console.log(e)
+	},
+					
+					
+【属性介绍】:
+
+	dataList:			下拉数据
+
+	keyId:				唯一键,用于多个关闭
+	
+	showField:		要展示的字段,默认name
+	
+	showObj:			设置展示的条目对象,可用来设置默认值
+
+	phText:				提示语
+
+	phColor:			提示语颜色
+
+	searchKey:		指定搜索的字段,不设置使用展示字段showField搜索
+
+	showBorder:		是否显示边框
+	
+	disabled:			是否禁用
+
+	@change:			返回选择的对象,如果输入框清空,返回null
+
+	@input:				返回搜索结果集合
+	
+	

+ 27 - 0
uni_modules/qiao-select/package.json

@@ -0,0 +1,27 @@
+{
+	"id": "qiao-select",
+	"name": "搜索下拉选择器",
+	"displayName": "带input输入模糊搜索的下拉框选择器组件",
+	"version": "1.0.7",
+	"description": "搜索下拉选择器,支持输入框模糊搜索下拉数据,支持小程序,h5,可自行配置搜索项",
+	"keywords": [
+        "select",
+        "下拉搜索",
+        "选择器",
+        "选择框",
+        "搜索下拉"
+    ],
+	"dcloudext": {
+		"contact": {
+			"qq": "1450294898"
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+		"npmurl": "",
+		"type": "component-vue"
+	},
+	"repository": ""
+}

Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
unpackage/dist/build/app-plus/app-config-service.js


Разлика између датотеке није приказан због своје велике величине
+ 5 - 5
unpackage/dist/build/app-plus/app-service.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


BIN
unpackage/res/icons/1024x1024.png


BIN
unpackage/res/icons/120x120.png


BIN
unpackage/res/icons/144x144.png


BIN
unpackage/res/icons/152x152.png


BIN
unpackage/res/icons/167x167.png


BIN
unpackage/res/icons/180x180.png


BIN
unpackage/res/icons/192x192.png


BIN
unpackage/res/icons/20x20.png


BIN
unpackage/res/icons/29x29.png


BIN
unpackage/res/icons/40x40.png


BIN
unpackage/res/icons/58x58.png


BIN
unpackage/res/icons/60x60.png


BIN
unpackage/res/icons/72x72.png


BIN
unpackage/res/icons/76x76.png


BIN
unpackage/res/icons/80x80.png


BIN
unpackage/res/icons/87x87.png


BIN
unpackage/res/icons/96x96.png


BIN
unpackage/resources/__UNI__6C04090.zip


Разлика између датотеке није приказан због своје велике величине
+ 2 - 2
unpackage/resources/__UNI__6C04090/www/app-config-service.js


Разлика између датотеке није приказан због своје велике величине
+ 5 - 5
unpackage/resources/__UNI__6C04090/www/app-service.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
unpackage/resources/__UNI__6C04090/www/app-view.js