root hai 1 ano
pai
achega
dc1d9357cd

+ 69 - 69
package-lock.json

@@ -1997,75 +1997,6 @@
         "webpack-chain": "^6.4.0",
         "webpack-dev-server": "^3.11.0",
         "webpack-merge": "^4.2.2"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "vue-loader-v16": {
-          "version": "npm:vue-loader@16.8.3",
-          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
-          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "chalk": "^4.1.0",
-            "hash-sum": "^2.0.0",
-            "loader-utils": "^2.0.0"
-          }
-        }
       }
     },
     "@vue/cli-shared-utils": {
@@ -13138,6 +13069,75 @@
         }
       }
     },
+    "vue-loader-v16": {
+      "version": "npm:vue-loader@16.8.3",
+      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
+      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chalk": "^4.1.0",
+        "hash-sum": "^2.0.0",
+        "loader-utils": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
     "vue-qrcode-reader": {
       "version": "2.3.18",
       "resolved": "https://registry.npmmirror.com/vue-qrcode-reader/-/vue-qrcode-reader-2.3.18.tgz",

+ 1 - 1
src/App.vue

@@ -30,7 +30,7 @@ document.body.addEventListener('focusout', () => { // 软键盘关闭事件
   font-family: Avenir, Helvetica, Arial, sans-serif;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
-  color: #fff;
+  color: black;
   height: 100vh;
   width: 100vw;
 }

+ 9 - 0
src/routerMap/index.js

@@ -99,6 +99,15 @@ const routerMap = [
     component: (resolve) => require(["@/views/page/Dispatch/detailed"], resolve),
   },
   {
+    path: "/cms/inventory/detail",
+    name: "inventoryDetail", //盘点单
+    meta: {
+      index: 3,
+
+    },
+    component: (resolve) => require(["@/views/page/Inventory/detail"], resolve),
+  },
+  {
     path: "/cms/ceshi",
     name: "ceshi", //完工详情
     meta: {

+ 59 - 8
src/views/page/Finish/detailed.vue

@@ -324,7 +324,7 @@ export default {
     //   }
     // },
     handleSure () {
-      console.log(this.list)
+      // console.log(this.list);return false;
       this.list.forEach(v => {
         const data3 = {
           url: 'http://121.36.142.167:7774/jbl/api/module-data/completion_orders/completion_orders',
@@ -356,16 +356,67 @@ export default {
             }
           }
         }
-        this.axios.post('/api/testdwy', { ...data3 }).then(res => {
-          if (res.code == 200) {
-            this.$Message.success(res.msg)
-            this.$router.push('/cms/home')
+        // this.axios.post('/api/testdwy', { ...data3 }).then(res => {
+        // if (res.code == 200) {
+        // this.$Message.success(res.msg)
+        // // this.$router.push('/cms/home')
+        // }
+        // })
+
+        const data4Dtil = [];
+        v.break.forEach(vv =>{
+          if(vv.break_id&&vv.break_num){
+            v.defective_num = vv.break_num;
+            v.defective_remark = vv.break_id;
+            data4Dtil.push(v) ;
           }
+
+
         })
-      })
-    }
+        if(data4Dtil.length > 0){
+          const data4 = {
+            url: 'http://121.36.142.167:7774/jbl/api/module-data/defective_orders/defective_orders',
+            post: {
+              bizId: -1,
+              bizTypeEk: 'LOWCODE',
+              dynamicFormId: "474139280406949888",
+              showModelId: "474140935059877888",
+              data: {
+                defective_orders: {
+                  defective_order_no: null,
+                  defection_time: new Date(),
+                  created_by: null,
+                  created_date: null,
+                  employee_id: v.employee_id.toString(),
+                  employee_id_show: v.employee_id_show,
+                  equipment_id: v.equipment_id,
+                  equipment_id_show: v.equipment_id_show,
+                  last_modified_by: null,
+                  last_modified_date: null,
+                  process_id: v.dispatch_orders.process_id,
+                  process_id_show: v.dispatch_orders.process_id_show,
+                  site: null,
+                  team_id: v.team_finish_id,
+                  team_id_show: v.team_id_show,
+                },
+                defective_orders_dtl: data4Dtil
+              }
+            }
+
+          }
+          console.log(JSON.stringify(data4));return false;
+          //   this.axios.post('/api/testdwy', { ...data3 }).then(res => {
+          //     if (res.code == 200) {
+          //     // this.$Message.success(res.msg)
+          //
+          //
+          //   }
+          // })
+        }
+
+    })
   }
-}
+}}
 </script>
 <style lang="scss" scoped>
 .content {

+ 320 - 0
src/views/page/Inventory/detail.vue

@@ -0,0 +1,320 @@
+<template>
+  <div>
+    <div class="header">
+      <div class="header_top">
+        <Button
+                type="primary"
+                class="header_btn"
+                ghost
+                @click="handleShow"
+                :icon="is_show ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'"
+        >
+          <div style="margin-right: 0.6rem">
+            {{ is_show ? "收起" : "展开" }}
+          </div></Button
+        >
+        <div style="margin-right: 1rem; color: #66a9f0">王小伟</div>
+      </div>
+      <div class="header_middle">
+        <b-dropdown size="sm" text="盘点单号" class="m-2" :disabled="is_use">
+          <b-dropdown-item-button>Action</b-dropdown-item-button>
+          <b-dropdown-item-button>Another action</b-dropdown-item-button>
+          <b-dropdown-item-button>Something else here</b-dropdown-item-button>
+        </b-dropdown>
+        <b-dropdown size="sm" text="盘点日期" class="m-2" :disabled="is_use">
+          <b-dropdown-item-button>Action</b-dropdown-item-button>
+          <b-dropdown-item-button>Another action</b-dropdown-item-button>
+          <b-dropdown-item-button>Something else here</b-dropdown-item-button>
+        </b-dropdown>
+        <b-dropdown size="sm" text="盘点人员" class="m-2" :disabled="is_use">
+          <b-dropdown-item-button>Action</b-dropdown-item-button>
+          <b-dropdown-item-button>Another action</b-dropdown-item-button>
+          <b-dropdown-item-button>Something else here</b-dropdown-item-button>
+        </b-dropdown>
+      </div>
+      <div class="header_middle1 ot">
+        <div class="ft">{{intentory_no}} &nbsp;</div>
+        <div class="ft">{{intentory_date}} &nbsp;</div>
+        <div class="ft">{{intentory_name}} &nbsp;</div>
+      </div>
+      <div class="header_footer">
+        <!--<div style="margin-left: 1rem">已发货{{transport_total}}</div>-->
+        <!--<div style="margin-right: 1.4rem">已完成10%</div>-->
+      </div>
+    </div>
+    <div class="bdy">
+      <table>
+        <tr style="height: 2rem">
+          <th style="width: 4rem">产品名称</th>
+          <th style="width: 3rem">规格型号</th>
+          <th style="width: 3rem">花色</th>
+          <th style="width: 3rem">账面数量</th>
+          <th style="width: 3rem">盘点数量</th>
+        </tr>
+        <tr
+                v-for="(item, index) in tableData"
+                :key="index"
+                @click="handleChoose(item, index)"
+        >
+          <td>
+            {{ item.product_title }}
+          </td>
+          <td>{{ item.product_size }}</td>
+          <td>{{item.color}}</td>
+          <td>{{ item.balance_num }}</td>
+          <td>{{ item.check_num }}</td>
+        </tr>
+      </table>
+    </div>
+    <div class="footer">
+      <Button
+              type="primary"
+              class="header_btn"
+              style="margin-right: 3rem; height: 2.6rem"
+              @click="handleReturn"
+      >
+        返回</Button
+      >
+      <Button
+              type="primary"
+              class="header_btn"
+              style="margin-left: 3rem; height: 2.6rem"
+              @click="handelGoSure"
+      >
+        确认</Button
+      >
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data () {
+    return {
+      tableData: [],
+      key_tableData: {},
+      send_goods_out: {},
+      data: {},
+      send_goods_out_product: {},
+      is_show: true,
+      is_use: false,
+      intentory_no: '',
+      intentory_date: '',
+      intentory_name: '',
+      saveData: 0,
+      scan_data: []
+    }
+  },
+  mounted () {
+    // if (localStorage.getItem('fyy_target')) {
+    //   data.target = JSON.parse(localStorage.getItem('fyy_target'))
+    // }
+    this.tableData = []
+    const id = this.$route.query.id
+    const data = {
+      // url: `http://121.36.142.167:7774/jbl/api/module-data/send_goods_out/send_goods_out/474061443708694528/${id}`
+      url: `http://121.36.142.167:7774/jbl/api/module-data/goods_check/goods_check/477657155772747776/${id}`
+      // post: {"direction":"DESC","property":"id","fromClientType":"pc","number":0,"sorts":[],"rules":[{"field":"dispatch_orders.dispatch_no","option":"LIKE_ANYWHERE","values":[v]},{"field":"product_no","option":"LIKE_ANYWHERE","values":["BC030101000001"]}],"size":15,"specialConditions":[],"workflowSearchBean":{},"dynamicFormCode":"dispatch_orders","dynamicFormTable":null,"ignoreField":true,"developmentSystemId":null,"debugFlag":true},
+    }
+    // console.log(data);
+    this.initData(data)
+    // console.log(data);
+  },
+  methods: {
+    // 原始数据获取
+    initData (row) {
+      this.axios.post('/api/testdwyget', { ...row }).then(res => {
+        this.intentory_no = res.data.data.goods_check.goods_check_no;
+        this.intentory_date = res.data.data.createdDate;
+        this.intentory_name = res.data.data.goods_check.check_employee_id_show;
+        this.data = res.data
+        this.tableData.push(...res.data.data.goods_check_product);
+
+        const dataBox = {
+          url: 'http://121.36.142.167:7774/jbl/api/module-data/box_orders/box_orders/diy/defective_order_no_list',
+          post: { "defective_order_no_list":["BZ00025"]}
+        }
+        this.initDataBox(dataBox)
+        this.deelTableData();
+      })
+
+    },
+    // 扫描数据获取
+    initDataBox (row) {
+      this.axios.post('/api/testdwy', { ...row }).then(res => {
+        res.data.data.forEach((element, index) => {
+
+        if(Object.keys(this.key_tableData).indexOf(this.deelUniqueKey(element)) !== -1){
+          this.key_tableData[this.deelUniqueKey(element)] += element.box_num
+        }else{
+          this.key_tableData[this.deelUniqueKey(element)] = element.box_num
+        }
+
+        })
+        this.deelTableData();
+      })
+    },
+    deelUniqueKey(element){
+      let key = element.product_code
+      return key;
+    },
+    // 将原始数据处理拼接成提交的数据
+    deelTableData () {
+      this.tableData.forEach((element, index) => {
+        if(Object.keys(this.key_tableData).indexOf(this.deelUniqueKey(element)) !== -1){
+            element.check_num = this.key_tableData[this.deelUniqueKey(element)];
+        }
+      })
+    },
+    handelGoSure () {
+      this.data.data.goods_check_product = this.tableData
+      let data = {
+        url:'http://121.36.142.167:7774/jbl/api/module-data/goods_check/goods_check',
+        post: this.data
+      }
+      this.axios.post('/api/testdwy', data).then(res => {
+        if (res.code === 200) {
+          this.$Message.success(res.msg)
+          this.$router.go(-1)
+        }
+      })
+      // console.log(JSON.stringify(this.data))
+    },
+    handleReturn () {
+      localStorage.removeItem('fyy_target')
+      this.$router.push('/cms/finish')
+    },
+    handleChoose (item, index) {
+      item.is_choose = !item.is_choose
+      this.tableData.splice(index, 1, item)
+    },
+    handleShow () {
+      this.is_show = !this.is_show
+      console.log(document.getElementsByClassName('header'))
+      if (this.is_show) {
+        document.getElementsByClassName('header')[0].style = 'height:7rem;overflow:hidden;transition:all .4s;'
+        setTimeout(() => {
+          document.getElementsByClassName('header')[0].style = 'overflow:none;'
+          this.is_use = false
+        }, 400)
+      } else {
+        this.is_use = true
+        document.getElementsByClassName('header')[0].style = 'height:2.7rem;overflow:hidden;transition:all .4s;'
+      }
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+  .header {
+    width: 94%;
+    height: 7rem;
+    // overflow: hidden;
+    // transition: all 0.4s;
+    position: relative;
+    top: 0.5rem;
+    left: 3%;
+    box-shadow: 0.16rem 0.1rem 0.1rem 0.1rem #9d9b9b;
+    border-radius: 1rem;
+    padding: 0.4rem 0.7rem 0 1rem;
+    background: #fff;
+  }
+  .header_btn {
+    border-radius: 1rem;
+    padding: 0.1rem;
+    width: 5rem;
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+  }
+  .header_top {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+  .ot {
+    position: relative;
+    top: -1.3rem;
+  }
+  .header_middle1 {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    .ft {
+      font-size: 1.5rem;
+      width: 5rem;
+      text-align: center;
+    }
+  }
+  .header_middle {
+    position: relative;
+    top: -0.3rem;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+  }
+  /deep/ .btn-group > .btn,
+  .btn-group-vertical > .btn {
+    background: #ffffff;
+    color: #2c3e50;
+    outline: none;
+    border: none;
+    margin: 0;
+    z-index: 3;
+  }
+  .header_footer {
+    position: relative;
+    top: -1.7rem;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    div {
+      font-size: 0.5rem;
+      color: rgb(244, 136, 42);
+    }
+  }
+  .bdy {
+    width: 94%;
+    height: calc(100% - 18.7rem);
+    overflow: auto;
+    position: relative;
+    top: 1rem;
+    left: 3%;
+  }
+
+  /deep/td {
+    text-align: center;
+    vertical-align: middle;
+  }
+  table {
+    border-collapse: collapse; /* 合并边框 */
+    width: 100%; /* 表格宽度 */
+    background: #fff;
+    table-layout: fixed;
+  }
+  th {
+    font-size: 0.6rem;
+    background: #66b1f4;
+    color: #fff;
+  }
+  td {
+    font-size: 0.6rem;
+    word-break: break-all;
+  }
+  td,
+  th {
+    vertical-align: middle;
+    text-align: center;
+    border: 0.1rem solid #dddddd; /* 单元格边框样式 */
+    padding: 0.02rem; /* 单元格内边距 */
+  }
+  .choose_item {
+    background: #c8c8c8;
+  }
+  .footer {
+    display: flex;
+    justify-content: space-around;
+    width: 100%;
+    position: absolute;
+    bottom: 4.8rem;
+  }
+</style>