瀏覽代碼

Merge remote-tracking branch 'origin/master'

hmc 1 年之前
父節點
當前提交
3f7066b12f

+ 1 - 2
zkqy-custom-business/src/main/resources/mapper/business/MaterielMapper.xml

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectMaterielList" parameterType="com.zkqy.business.domain.Materiel" resultMap="MaterielResult">
         <include refid="selectMaterielVo"/>
-        <where>  
+        where del_flag = '0'
             <if test="materielCode != null  and materielCode != ''"> and materiel_code = #{materielCode}</if>
             <if test="materielName != null  and materielName != ''"> and materiel_name like concat('%', #{materielName}, '%')</if>
             <if test="materielAsname != null  and materielAsname != ''"> and materiel_asname like concat('%', #{materielAsname}, '%')</if>
@@ -54,7 +54,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
             <if test="materieEncoding != null  and materieEncoding != ''"> and materie_encoding = #{materieEncoding}</if>
             <if test="materieColorNumber != null  and materieColorNumber != ''"> and materie_color_number = #{materieColorNumber}</if>
-        </where>
     </select>
 
     <select id="selectMaterielById" parameterType="Long" resultMap="MaterielResult">

+ 1 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml

@@ -269,6 +269,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
         WHERE
         r.del_flag = '0'
+        <if test="qrCode != null and qrCode != ''">and r.qr_code like concat('%', #{qrCode}, '%')</if>
         <if test="lotNum != null  and lotNum != ''"> and r.lot_num like concat('%', #{lotNum}, '%')</if>
         <if test="productionDate != null"> and r.production_date = #{productionDate}</if>
         <if test="warehousingTime != null "> and r.warehousing_time = #{warehousingTime}</if>

+ 1 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductWarehousingRecordMapper.xml

@@ -267,6 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
         WHERE
             r.del_flag = '0'
+            <if test="qrCode != null and qrCode != ''">and r.qr_code like concat('%', #{qrCode}, '%')</if>
             <if test="lotNum != null  and lotNum != ''"> and r.lot_num like concat('%', #{lotNum}, '%')</if>
             <if test="productionDate != null"> and r.production_date = #{productionDate}</if>
             <if test="warehousingTime != null "> and r.warehousing_time = #{warehousingTime}</if>

+ 2 - 2
zkqy-custom-business/src/main/resources/mapper/business/ProductionLineMapper.xml

@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectProductionLineList" parameterType="com.zkqy.business.domain.ProductionLine" resultMap="ProductionLineResult">
         <include refid="selectProductionLineVo"/>
-        <where>  
+        where del_flag = '0'
             <if test="productionLineNo != null  and productionLineNo != ''"> and production_line_no = #{productionLineNo}</if>
             <if test="productionLineName != null  and productionLineName != ''"> and production_line_name like concat('%', #{productionLineName}, '%')</if>
             <if test="productionLineDepartment != null  and productionLineDepartment != ''"> and production_line_department = #{productionLineDepartment}</if>
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</if>
             <if test="taskProcessKey != null  and taskProcessKey != ''"> and task_process_key = #{taskProcessKey}</if>
             <if test="taskNodeKey != null  and taskNodeKey != ''"> and task_node_key = #{taskNodeKey}</if>
-        </where>
+        order by sort asc
     </select>
     
     <select id="selectProductionLineById" parameterType="Long" resultMap="ProductionLineResult">

+ 5 - 1
zkqy-ui/src/utils/print/printUtils.js

@@ -13,6 +13,9 @@ export function getServerPrintData(printRow) {
   return result
 
 }
+function removeChineseCharacters(str) {
+  return str.replace(/[\u4e00-\u9fa5]/g, '');
+}
 
 function printEN(printRow) {
   let {
@@ -26,6 +29,7 @@ function printEN(printRow) {
     lotNum, //批次
     boxNum, //箱号
   } = printRow;
+  let ENColor = removeChineseCharacters(productColor) || ''
   let res = []
   res.push({
     key1: 'GRADE:',
@@ -37,7 +41,7 @@ function printEN(printRow) {
   })
   res.push({
     key1: 'COLOR NO.:',
-    key2: productColor + '    ' + lotNum,
+    key2: ENColor + '    ' + lotNum,
   })
   res.push({
     key1: 'CONE NO.:',

+ 12 - 5
zkqy-ui/src/views/bussiness/processMange_line.vue

@@ -46,11 +46,17 @@
               @change="getList"
             >
               <el-option
-                v-for="item in productLineList"
-                :key="item.productionLineNo"
+                v-for="(item, index) in productLineList"
+                :key="index"
                 :label="item.productionLineName"
                 :value="item.productionLineNo"
               >
+                <span class="discribe" style="float: left">{{
+                  item.productionLineName
+                }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{
+                  item.productionLineDepartment
+                }}</span>
               </el-option>
             </el-select>
           </div>
@@ -488,9 +494,10 @@ export default {
         if (res.code == 200) {
           this.tableData = res.rows.map((item) => item.resultMap);
           this.tableData.forEach((item) => {
-            item.productionLineName = this.productLineList.find(
-              (i) => i.productLineNo == item.productLineNo
-            ).productionLineName;
+            item.productionLineName =
+              this.productLineList.find(
+                (i) => i.productionLineNo == item.bepTaskProductionLineNo
+              )?.productionLineName || "无产线";
           });
           this.total = res.total;
         } else {

+ 2 - 1
zkqy-ui/src/views/index.vue

@@ -158,7 +158,8 @@ export default {
 .home {
   position: relative;
   width: 100%;
-  height: 500px;
+  // height: 500px;
+  min-height: calc(100vh - 140px);
   .info-content {
     position: absolute;
     left: 50%;

+ 3 - 1
zkqy-ui/src/views/orderMange/approve.vue

@@ -1083,6 +1083,7 @@ export default {
         },
       ];
       let res = await queryDropDownBoxData(payLoad);
+      await this.getDropDownData();
       if (res.code == 200) {
         console.log(res);
         let { sale_craft, sale_order, sale_products } = res.data.resultMap;
@@ -1195,7 +1196,8 @@ export default {
           let productData = this.productionOptions.find(
             (pro) => pro.productNo == item.productNo
           );
-          console.log("item", item);
+          console.log(this.productionOptions);
+          console.log("productData", productData);
           item.sliceTypeLabel =
             this.sliceTypeOptions.find((k) => k.materielCode == item.sliceType)
               ?.materielName || "";

+ 11 - 3
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -219,9 +219,16 @@
                     <el-option
                       v-for="(item, index) in lineOptions"
                       :key="index"
-                      :label="item.productionLineNo"
+                      :label="item.productionLineName"
                       :value="item.productionLineNo"
                     >
+                      <span class="discribe" style="float: left">{{
+                        item.productionLineName
+                      }}</span>
+                      <span
+                        style="float: right; color: #8492a6; font-size: 13px"
+                        >{{ item.productionLineDepartment }}</span
+                      >
                     </el-option>
                   </el-select>
                 </el-form-item>
@@ -692,6 +699,7 @@ export default {
       this.supplementCode(qrCode);
     } else {
       // 正常打印
+      this.excuteType = 1;
       this.printHandler();
     }
   },
@@ -1061,7 +1069,7 @@ export default {
       //   this.tableData.push(this.printTableData[0]);
       // }
       // 后端打印
-      // console.log("newPrintHandler");
+      console.log("newPrintHandler");
       this.newPrintHandler();
     },
     // 获取机台选项数据
@@ -1299,7 +1307,7 @@ export default {
     async handleCurrentChange(val) {
       console.log("row", val);
       if (!val) return;
-      if (this.isStartReadNum) {
+      if (this.isStartReadNum || this.excuteType != 1) {
         this.$refs.proTableRef.setCurrentRow(this.currentRow);
         return;
       }

+ 35 - 25
zkqy-ui/src/views/orderMange/financeApprove.vue

@@ -569,10 +569,17 @@ export default {
         this.$refs.detailTable.innerHTML = this.printDomData;
       });
     },
-    getDictLabel(value, dictLsit = []) {
-      return dictLsit.find((item) => {
-        return item.value == value;
-      })?.label;
+    // getDictLabel(value, dictLsit = []) {
+    //   return dictLsit.find((item) => {
+    //     return item.value == value;
+    //   })?.label;
+    // },
+    getDictLabel(value, dict) {
+      return (
+        this.dict.type[dict].find((item) => {
+          return item.value === value;
+        })?.label || ""
+      );
     },
     // 获取详情html字符串
     async getDetailTableString(row) {
@@ -604,12 +611,14 @@ export default {
         },
       ];
       let res = await queryDropDownBoxData(payLoad);
+      await this.getDropDownData();
       if (res.code == 200) {
         console.log(res);
         let { sale_craft, sale_order, sale_products } = res.data.resultMap;
         let {
           //订单表数据
           saleNo, //合同号
+          lotNumber, //批号
           saleCustomNo, //客户编号
           saleDate, //销售单日期
           saleOrderEstimatedTime, //预计下单时间
@@ -648,28 +657,22 @@ export default {
         let customData = this.customerOptions.find(
           (item) => item.customNo == saleCustomNo
         );
-        let payType = this.getDictLabel(
-          salePayType,
-          this.dict.type.payment_method
-        ); //付款方式
+        let payType = this.getDictLabel(salePayType, "payment_method"); //付款方式
         let customerName = customData ? customData.customName : "";
         let customAddress = customData?.customAddress || "无";
         let customCountryType = customData?.customCountryType || "";
         let contactPerson = customData?.contactPerson || "无";
         let directionOfTwistDescription = directionOfTwist
-          ? this.getDictLabel(
-              directionOfTwist,
-              this.dict.type.direction_of_twist
-            )
+          ? this.getDictLabel(directionOfTwist, "direction_of_twist")
           : "";
         let printStr = `
-        <table style="width:1050px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
+        <table style="width:1200px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
             <div style="text-align:center;font-size: 20px;">诸暨市新丝维纤维有限公司</div>
             <div style="text-align:center;">销售合同审计单</div>
             <tbody>
                 <tr>
                     <td width="600px" colspan="4">合同号:${saleNo}</td>
-                    <td width="450px" colspan="3">日期:${saleDate.replace(
+                    <td width="600px" colspan="4">日期:${saleDate.replace(
                       "T",
                       " "
                     )}</td>
@@ -684,7 +687,7 @@ export default {
                     <td width="300px" colspan="2">客户地址:</td>
                     <td width="300px" colspan="2">${customAddress}</td>
                     <td width="300px" colspan="2">客户国别:</td>
-                    <td width="150px" colspan="1">${customCountryType}</td>
+                    <td width="300px" colspan="2">${customCountryType}</td>
                 </tr>
                 <tr align="center">
                     <td width="300px" colspan="2">预计下单时间:</td>
@@ -694,14 +697,15 @@ export default {
                     )}</td>
                     <td  colspan="1">交货周期:</td>
                     <td >${saleLeadTime}</td>
-                    <td  colspan="1">交货日期:</td>
+                    <td  colspan="2">交货日期:</td>
                     <td >${deliveryDate.replace("T", " ")}</td>
                 </tr>
                 <tr align="center">
-                    <td colspan="7">货品明细</td>
+                    <td colspan="8">货品明细</td>
                 </tr>
                 <tr align="center">
                     <td width="150px">品名</td>
+                    <td width="150px">类型</td>
                     <td width="150px">数量/kg</td>
                     <td width="150px">单价</td>
                     <td width="150px">金额</td>
@@ -728,8 +732,10 @@ export default {
             (k) => k.materielCode == item.colourNumber
           )?.materieColorNumber;
           let productName = productData ? productData.productName : "";
+          let productType = productData ? productData.productType : "";
           printStr += `<tr align="center">
                     <td>${productName}</td>
+                    <td>${productType}</td>
                     <td>${item.productNumber}</td>
                     <td>${item.productUnitPrice}</td>
                     <td>${item.productAmounts}</td>
@@ -742,6 +748,7 @@ export default {
         printStr += `
         <tr align="center">
           <td>小计:</td>
+           <td></td>
           <td>${amountTotal}</td>
           <td>${singlTotal}</td>
           <td>${moneyTotal}</td>
@@ -750,7 +757,7 @@ export default {
           <td></td>
         </tr>
                 <tr>
-                    <td colspan="7">合计金额(大写):${saleAmountInWords}</td>
+                    <td colspan="8">合计金额(大写):${saleAmountInWords}</td>
                 </tr>
                 `;
 
@@ -759,16 +766,16 @@ export default {
           printStr += `
           <tr>
             <td colspan="4">付款方式:${payType}</td>
-            <td colspan="3">定金:${earnestMoney}</td>
+            <td colspan="4">定金:${earnestMoney}</td>
           </tr>`;
         } else {
           printStr += `
          <tr>
-              <td colspan="7">付款方式:${payType}</td>
+              <td colspan="8">付款方式:${payType}</td>
           </tr>`;
         }
         printStr += `<tr align="center">
-                    <td colspan="7">工艺要求</td>
+                    <td colspan="8">工艺要求</td>
                 </tr>
                 <tr align="center">
                     <td width="150px">网络</td>
@@ -778,6 +785,7 @@ export default {
                     <td width="150px">捻向</td>
                     <td width="150px">其他</td>
                     <td width="150px"></td>
+                    <td width="150px"></td>
                 </tr>
                 <tr align="center">
                     <td >${craftGrid}</td>
@@ -787,24 +795,25 @@ export default {
                     <td>${directionOfTwistDescription}</td>
                     <td>${craftOther}</td>
                     <td width="150px"></td>
+                    <td width="150px"></td>
                 </tr>
                 <tr>
-                    <td colspan="7">包装/贴唛:${craftMark}</td>
+                    <td colspan="8">包装/贴唛:${craftMark}</td>
                 </tr>
                 <tr>
-                    <td colspan="7">装运方式:${shippingMethod}</td>
+                    <td colspan="8">装运方式:${shippingMethod}</td>
                 </tr>
                 <tr align="center">
                     <td colspan="2">业务员:</td>
                     <td colspan="2">${salesman}</td>
                     <td colspan="2">业务主管:</td>
-                    <td>${saleLeader}</td>
+                    <td colspan="2">${saleLeader}</td>
                 </tr>
                 <tr align="center">
                     <td colspan="2">财务部:</td>
                     <td colspan="2">${finance}</td>
                     <td colspan="2">生产部:</td>
-                    <td>${production}</td>
+                    <td colspan="2">${production}</td>
                 </tr>
                 <tr align="center">
                     <td colspan="2">批准人:</td>
@@ -812,6 +821,7 @@ export default {
                     <td></td>
                     <td></td>
                     <td></td>
+                    <td></td>
                 </tr>
             </tbody>
         </table>

+ 2 - 2
zkqy-ui/src/views/orderMange/index.vue

@@ -1351,7 +1351,7 @@ export default {
               btnType: "printOutBound",
               btnIcon: "",
               btnShowCondition:
-                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"}]',
+                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"}]',
               btnHasPermi: "huaxian:xsglddgl:INSERT",
               children: [],
             },
@@ -1361,7 +1361,7 @@ export default {
               btnIcon: "",
               // btnShowCondition: "[]",
               btnShowCondition:
-                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"}]',
+                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"}]',
               btnHasPermi: "huaxian:xsglddgl:INSERT",
               children: [],
             },