mushencc 3 年之前
父節點
當前提交
51bcb22a6a

+ 5 - 0
package-lock.json

@@ -6734,9 +6734,14 @@
     },
     "jquery": {
       "version": "3.6.0",
+<<<<<<< HEAD
       "resolved": "https://registry.nlark.com/jquery/download/jquery-3.6.0.tgz",
       "integrity": "sha1-xyoJ8Vwb3OFC9J2/EXC9+K2sJHA=",
       "dev": true
+=======
+      "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
+      "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw=="
+>>>>>>> 1a3c4469c2d018edfc41d444b12db956002fea64
     },
     "js-base64": {
       "version": "2.6.4",

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "echarts": "^4.9.0",
     "element-ui": "^2.15.5",
     "epic-spinners": "^1.1.0",
+    "jquery": "^3.6.0",
     "node-sass": "^4.14.1",
     "sass-loader": "^9.0.3",
     "v-charts": "^1.19.0",

+ 2 - 2
src/routerMap/index.js

@@ -294,7 +294,7 @@ const routerMap = [{
     },
     {
         path: '/cms/productionorderlist/deliverylist/checkUnusual',
-        name: 'DeliveryList', //生产订单列表-->出库表-->查看异常
+        name: 'checkUnusual', //生产订单列表-->出库表-->查看异常
         meta: {
             index: 4
         },
@@ -393,7 +393,7 @@ const routerMap = [{
     },
     {
         path: '/cms/ordermannage/businessorderlist/printlist',
-        name: 'BusinessOrderlist', //订单管理-->家装订单-->列表-->详情-->打印列表
+        name: 'BusinessPrintList', //订单管理-->家装订单-->列表-->详情-->打印列表
         meta: {
             index: 4,
             keepAlive: true

+ 0 - 2
src/views/BasicSettings/CustomerFiles/list.vue

@@ -18,7 +18,6 @@
           <Button type="success" ghost icon="md-exit" style="margin-right:10px;"
             >导入</Button
           >
-         
         </Upload>
         <Button type="success" ghost icon='ios-download-outline' style="margin-right:10px;" @click='exportData()'
             >导出</Button
@@ -455,7 +454,6 @@ export default {
       this.append(this.treeData[0]);
     },
     handleTreeSelect(arr, row) {
-      console.log("row :>> ", row);
       this.searchData.code = row.code;
       this.suppliersTypeTitle = row.title;
       this.suppliersTypeId = row.id;

+ 1 - 1
src/views/BasicSettings/Partfield.vue

@@ -282,7 +282,7 @@ export default {
           this.$Message.success(res.msg);
           this.getData(this.proxyObj);
           this.showModal = false;
-          this.undata_navData();
+          // this.undata_navData();
         } else {
           if (Array.isArray(res.data)) {
             this.repeatFlag = true;

+ 13 - 1
src/views/BidSystem/ContractList/edit.vue

@@ -2626,12 +2626,24 @@ export default {
       this.$router.go(-1);
     },
     uploadSuccess(res) {
+      console.log("res :>> ", res);
       if (res.code == 200) {
         this.$Message.success(res.msg || "上传成功");
+         res.data.map(item=>{
+           item.num = item.area_num
+           item.title = item.area_title
+           item.product.map((p,i)=>{
+             p.index=i+1
+             p.title = p.product_title
+             p.num = p.product_num
+             p.remark = p.product_remark
+             p.measure += p.measure.map(m=>{return m.key+m.value})
+           })
+         })
+        this.formData.list = res.data;
       } else {
         this.$Message.warning(res.msg || "上传失败");
       }
-      this.getData(this.proxyObj);
     },
     uploadError(err) {
       this.$Message.error(err.msg || "上传失败");

+ 20 - 3
src/views/BidSystem/DeepeningOrder/list.vue

@@ -139,7 +139,10 @@
           style="margin-right: 10px"
           >取消</Button
         >
-        <Button @click="handleProcess" type="primary" style="margin-right: 10px"
+        <Button
+          @click="debounce(handleProcess(), 1000)"
+          type="primary"
+          style="margin-right: 10px"
           >确定</Button
         >
       </div>
@@ -264,7 +267,7 @@ export default {
       process_end_time: "",
       order_no: "",
       warningList: [],
-      oa_id:''
+      oa_id: "",
     };
   },
   // 生命周期 - 创建完成(可以访问当前this实例)
@@ -384,13 +387,27 @@ export default {
     getData(row) {
       this.loading = true;
       this.axios("/api/order_area_deep_list", { params: row }).then((res) => {
-        console.log(res.data)
+        console.log(res.data);
         this.loading = false;
         this.tableData = res.data.data;
         this.total = res.data.total;
         this.tableheaders = res.data.tableSet || [];
       });
     },
+    debounce(fn, delay) {
+      let timer = null;
+      return function() {
+        const context = this;
+        const args = arguments;
+        if (timer) {
+          clearTimeout(timer);
+          timer = null;
+        }
+        timer = setTimeout(() => {
+          fn.apply(context, args);
+        }, delay);
+      };
+    },
     changePage(e) {
       this.page_index = e;
       this.proxyObj.page_index = this.page_index;

+ 4 - 4
src/views/BidSystem/ProductDeOrder/deorderdetail.vue

@@ -26,7 +26,7 @@
       <!-- <div><span>价格:</span>{{ formData.price }}</div> -->
       <div><span>规格:</span>{{ formData.measure }}</div>
       <div><span>工艺属性:</span>{{ formData.process_property }}</div>
-      <div>
+      <div style="overflow:hidden;">
         <span>图纸:</span>
         <div>
           <span
@@ -362,17 +362,17 @@
             border
             :data="partsItem.partsProcessLineTableData"
           >
-            <template slot="timeSlot" slot-scope="{ row, index }">
+            <template slot="timeSlot" slot-scope="{ index }">
               <Input
                 v-model="partsItem.partsProcessLineTableData[index].time"
               />
             </template>
-            <template slot="wagesSlot" slot-scope="{ row, index }">
+            <template slot="wagesSlot" slot-scope="{ index }">
               <Input
                 v-model="partsItem.partsProcessLineTableData[index].wages"
               />
             </template>
-            <template slot="capacitySlot" slot-scope="{ row, index }">
+            <template slot="capacitySlot" slot-scope="{ index }">
               <Input
                 v-model="partsItem.partsProcessLineTableData[index].capacity"
               />

File diff suppressed because it is too large
+ 415 - 252
src/views/OrderMannage/BusinessOrderlist/edit.vue


+ 16 - 1
src/views/ProductMannage/edit.vue

@@ -192,6 +192,21 @@
             <span v-else>{{ row.ratio }}</span>
           </template>
         </vxe-table-column>
+        <vxe-table-column field="is_null" title="默认为空">
+          <template #default="{ row }">
+            <Select
+              filterable
+              v-if="type != 3"
+              clearable
+              transfer
+              v-model="row.is_null"
+            >
+              <Option :value="1" label="是"></Option>
+              <Option :value="0" label="否"></Option>
+            </Select>
+            <span v-else>{{ row.is_null==1?'是':'否' }}</span>
+          </template>
+        </vxe-table-column>
         <vxe-table-column field="set" width="180" title="操作">
           <template #default="{ row,rowIndex }">
             <Button
@@ -205,7 +220,7 @@
             <Button
               size="small"
               type="primary"
-              v-if="row.detail&&type != 3"
+              v-if="row.detail && type != 3"
               @click="addReplacePart(info.part, rowIndex)"
               >增加替换项</Button
             >

+ 150 - 26
src/views/ProductionOrderList/ProductionsOrder/Decorationlist.vue

@@ -228,6 +228,8 @@
 
 <script>
 import { SlickList, SlickItem } from "vue-slicksort";
+import axios from "axios";
+import $ from "jquery";
 export default {
   components: {
     SlickList,
@@ -529,7 +531,6 @@ export default {
         },
         {
           title: "房号",
-          key: "",
           align: "center",
           key: "number_detail",
           minWidth: 100,
@@ -655,23 +656,21 @@ export default {
   },
   created() {
     this.getOptions();
-    const wxsoect = new WebSocket("ws://127.0.0.1:1808");
-    this.wxsoect = wxsoect;
-    wxsoect.onopen = function(evt) {
-      console.log(`已成功打开`);
-    };
-
-    wxsoect.onclose = function(evt) {
-      console.log(`已断开socket连接`);
-    };
+    // const wxsoect = new WebSocket("ws://localhost:8080");
+    // this.wxsoect = wxsoect;
+    // wxsoect.onopen = function(evt) {
+    //   console.log(`已成功打开`);
+    // };
 
-    wxsoect.onerror = function(err) {
-      throw new Error(err);
-    };
-
-    wxsoect.onmessage = function(message) {
-      console.log(message);
-    };
+    // wxsoect.onclose = function(evt) {
+    //   console.log(`已断开socket连接`);
+    // };
+    // wxsoect.onerror = function(err) {
+    //   throw new Error(err);
+    // };
+    // wxsoect.onmessage = function(message) {
+    //   console.log(message);
+    // };
     this.axios("/api/bp_list").then((res) => {
       this.info.bps = res.data;
     });
@@ -987,12 +986,12 @@ export default {
         .catch((err) => {});
     },
     openShipModal(row) {
-      if (this.wxsoect.readyState != 1) {
-        return this.$Message.error("打印机未正常连接,请检查");
-      }
-      if (Array.isArray(row) && row.length < 1) {
-        return this.$Message.warning("请先择");
-      }
+      // if (this.wxsoect.readyState != 1) {
+      //   return this.$Message.error("打印机未正常连接,请检查");
+      // }
+      // if (Array.isArray(row) && row.length < 1) {
+      //   return this.$Message.warning("请先择");
+      // }
       const result = row.map((pre) => pre.id);
       this.confirmDelete({
         title: "批量打印芯片",
@@ -1008,14 +1007,139 @@ export default {
               if (resp.code == 200) {
                 const result = resp.data;
                 console.log(result, "多打印");
-                if (result && result.length > 0) {
-                  result.map((ele) => this.printDemo(ele));
-                }
+                this.handlePrintChips(resp.data);
+                // if (result && result.length > 0) {
+                //   result.map((ele) => this.printDemo(ele));
+                // }
               }
             });
         },
       });
     },
+    handlePrintChips(contents) {
+      let data = {};
+      let url = "http://192.168.1.110:888/postek/print";
+      data.reqParam = "1";
+      let printparamsJsonArray = [];
+      let IP = "192.168.1.58";
+      let port = 9100;
+      let IP_Port = IP + "," + port;
+      printparamsJsonArray.push({ PTK_Connect_Timer: IP_Port + ",1" });
+      printparamsJsonArray.push({ PTK_ClearBuffer: "" });
+      printparamsJsonArray.push({ PTK_SetDirection: "B" });
+      printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
+      printparamsJsonArray.push({ PTK_SetDarkness: "10" }); 
+      printparamsJsonArray.push({
+        PTK_SetLabelHeight: 75 + "," + 2 + ",0,false",
+      });
+      printparamsJsonArray.push({ PTK_SetLabelWidth: 10 });
+      contents.map((content) => {
+        const printContent_l1 = `项目:${content.client_name} 图号:${content.url_number} 区域:${content.house}号楼-${content.layer}层${content.number_detail}`;
+        printparamsJsonArray.push({
+          PTK_DrawText_TrueType:
+            "1100,250,50,0,微软雅黑,1,700,0,0,0," + printContent_l1,
+        });
+        const printContent_l2 = `产品:${content.product_title} 部件:${content.part_title} `;
+        printparamsJsonArray.push({
+          PTK_DrawText_TrueType:
+            "1100,200,50,0,微软雅黑,1,700,0,0,0," + printContent_l2,
+        });
+        const printContent_l3 = `材料:${content.process} `;
+        printparamsJsonArray.push({
+          PTK_DrawText_TrueType:
+            "1100,150,50,0,微软雅黑,1,700,0,0,0," + printContent_l3,
+        });
+        const printContent_l4 = `尺寸:${content.measure} 位置:${content.position} `;
+        printparamsJsonArray.push({
+          PTK_DrawText_TrueType:
+            "10,10,50,0,微软雅黑,1,700,0,0,0," + printContent_l4,
+        });
+        printparamsJsonArray.push({
+          PTK_RWRFIDLabel:
+            "1,0,0," + content.chip.length / 2 + ",1," + content.chip,
+        });
+        printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
+      });
+      printparamsJsonArray.push({ PTK_CloseConnect: "" });
+      data.printparams = JSON.stringify(printparamsJsonArray);
+      // $.ajax({
+      //   type: "post",
+      //   url,
+      //   data,
+      //   headers: {
+      //     "Access-Control-Allow-Origin": "*",
+      //     "Access-Control-Allow-Methods": "POST",
+      //     "Access-Control-Allow-Headers": "x-requested-with,content-type",
+      //   },
+      //   dataType: "json",
+      //   timeout: 5000,
+      //   success: function(result) {
+      //     if (result.retval == "0") {
+      //       this.$Message.success("发送成功");
+      //     } else {
+      //       this.$Message.error("发送失败,返回结果:" + result.msg);
+      //     }
+      //   },
+      // });
+      axios
+        .post(url, data)
+        .then((result) => {
+          console.log(result.msg);
+          if (result.retval == "0") {
+            this.$Message.success("发送成功");
+          } else {
+            this.$Message.error("发送失败,返回结果:" + result.msg);
+          }
+        })
+        .catch((err) => {
+          this.$Message.error("请求失败,请重试" + err.msg);
+        });
+    },
+    handleConnectPrinter() {
+      let data = {};
+      data.reqParam = "1";
+      let printparamsJsonArray = [];
+      //若有且仅有一台POSTEK打印机 不用去获取USB端口号 usbPort=255即可
+      printparamsJsonArray.push({ PTK_OpenUSBPort: 255 });
+      //清空缓存
+      printparamsJsonArray.push({ PTK_ClearBuffer: "" });
+      //设置打印方向 B为从底部开始打印 T为从顶部开始打印
+      printparamsJsonArray.push({ PTK_SetDirection: "B" });
+      //设置打印速度  最高速度由打印机的型号决定
+      printparamsJsonArray.push({ PTK_SetPrintSpeed: "4" });
+      //设置打印黑度 最大打印黑度20 树脂碳带一般设置15左右
+      printparamsJsonArray.push({ PTK_SetDarkness: "10" });
+      //必须正确设置标签的宽高--防止内容打偏     宽高可用尺子量取也可以查看标签的规格   一般桌面型打印机的最大打印宽度为110毫米 实际有效打印宽度根据打印机的参数决定
+      //        {"PTK_SetLabelHeight" : "height,gap,gapOffset,bFlag"}
+      //        height:标签的高度,以点(dots)为单位。取值:0 - 65535 的正整数
+      //       gap:标签间的定位间隙\黑标\穿孔的高度,以点(dots)为单位。
+      // 取值:0 – 65535 的正整数。
+      // 当 gap=0 时,设置标签为连续纸;当实际标签不是连续纸而 gap 设置为 0
+      // 时会出现打印内容偏移的现象
+      //       gapOffset:标签间隙\黑线\穿孔定位偏移值,以点(dots)为单位,参数类型为正
+      // 整数
+      //      bFlag:定位偏移值(gapOffset)是否有效;true - 有效,false - 无效
+      printparamsJsonArray.push({
+        PTK_SetLabelHeight: 75 + "," + 2 + ",0,false",
+      });
+      printparamsJsonArray.push({ PTK_SetLabelWidth: 10 });
+      //打印一行微软雅黑的文字 具体的参数函数请参考开发文档
+      printparamsJsonArray.push({ PTK_SetFontGap: "10" });
+
+      // {"PTK_DrawText" : "x,y,pdirec,pFont,pHorizontal,pVertical,pColor,pstr"}
+
+      // pColor:文本样式,参数值及说明如下 N - 白底黑字,R - 黑底白字
+      printparamsJsonArray.push({
+        PTK_DrawText_TrueType: "10,10,0,6,2,2,N," + $("#printlabel").val(),
+      });
+
+      //执行打印  必须有PTK_PrintLabel 否则不执行打印       {"PTK_PrintLabel" : "number,cpnumber"}
+      // number:打印标签的数量。取值:1 – 65535 的正整数
+      // cpnumber:每张标签的复制份数。取值:1 – 65535 的正整数
+      printparamsJsonArray.push({ PTK_CloseConnect: "" });
+      //执行打印完关闭打印机USB端口
+      printparamsJsonArray.push({ PTK_PrintLabel: "1,1" });
+    },
     printDemo(data) {
       if (!data) return 0;
       const st = this.wxsoect;

+ 10 - 2
vue.config.js

@@ -1,8 +1,8 @@
 const axios_default_ip =
     process.env.NODE_ENV == 'dev' ?
-    'http://121.41.102.225:82' :
+    'http://124.71.176.88:882' :
     process.env.NODE_ENV == 'test-prd' ?
-    'http://121.41.102.225:82' //测试服
+    'http://124.71.176.88:882' //测试服
     :
     process.env.NODE_ENV == 'prd_other' ?
     'http://121.37.173.82:82' //森兰九鼎
@@ -28,7 +28,15 @@ module.exports = {
                     '^/proxy': '', // rewrite path
                 },
             },
+            '/postek/print': {
+                target: 'http://192.168.1.110:888',
+                changeOrigin: true,
+                // pathRewrite: {
+                //     '^/postek': '', // rewrite path
+                // },
+            }
         },
     },
+
     lintOnSave: false, //禁用eslint  便于开发
 };

Some files were not shown because too many files changed in this diff