阿赫 8 місяців тому
батько
коміт
1fccadade9

+ 4 - 3
zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml

@@ -141,7 +141,7 @@
         Inner Join {DBNAME}.customer as cs ON so.sale_custom_no= cs.custom_no
         inner join {DBNAME}.production as pd on sp.product_no= pd.product_no
         left join {DBNAME}.production_line as pl on sp.production_line_no=pl.id
-        where sp.del_flag = '0' and cs.del_flag = '0'
+        where sp.del_flag = '0' and cs.del_flag = '0' AND sp.product_number > 0.0
         AND so.order_type = 2 and so.`status`in (3,4) and sp.`status` in (3,4,6)
         <if test="saleProductNo != null  and saleProductNo != ''">and sale_product_no = #{saleProductNo}</if>
         <if test="saleOrderNo != null  and saleOrderNo != ''">and sale_order_no = #{saleOrderNo}</if>
@@ -447,7 +447,8 @@
                pt.product_type                                      AS productType,
                sp.remark                                            AS productRemark,
                sp.product_number                                    AS actualWeight,
-               sp.colours                                           AS productColor
+               sp.colours                                           AS productColor,
+               sp.level                                             AS levels
         FROM {DBNAME}.sale_products sp
                         LEFT JOIN {DBNAME}.production pt
         ON sp.product_no = pt.product_no
@@ -526,7 +527,7 @@
                   r.product_colour,
                   r.levels) AS a
                  LEFT JOIN {DBNAME}.sale_products sp
-        ON sp.sale_order_no = a.sale_order_no
+        ON sp.sale_order_no = a.sale_order_no  AND sp.`level` = a.levels
             AND sp.product_no = a.productCode and sp.del_flag = '0'
 
     </select>

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

@@ -1181,7 +1181,7 @@ export default {
                     <td width="150px">品名</td>
                     <td width="100px">规格</td>
                     <td width="100px">类型</td>
-                    <td width="100px">色</td>
+                    <td width="100px">色</td>
                     <td width="150px">数量/kg</td>
                     <td width="150px">单价</td>
                     <td width="150px">金额</td>
@@ -1220,7 +1220,7 @@ export default {
                     <td>${productName}</td>
                     <td>${productSpecifications}</td>
                     <td>${productType}</td>
-                    <td>${materieEncoding + item.colourNumberLabel}</td>
+                    <td>${item.colours}</td>
                     <td>${item.productNumber}</td>
                     <td>${item.productUnitPrice}</td>
                     <td>${item.productAmounts}</td>

+ 88 - 15
zkqy-ui/src/views/orderMange/index.vue

@@ -491,6 +491,32 @@
                   </el-form-item>
                 </template>
               </el-table-column>
+
+              <el-table-column prop="level" width="100" label="等级">
+                <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'level-' + scope.$index"
+                    :name="'level-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
+                    <el-select
+                      v-model="scope.row.level"
+                      placeholder=""
+                      filterable
+                    >
+                      <el-option
+                        v-for="item in levelOptions"
+                        :key="item.id"
+                        :label="item.codeName"
+                        :value="item.codeName"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+
+
               <el-table-column prop="productNumber" label="数量/kg">
                 <template slot-scope="scope">
                   <el-form-item
@@ -871,6 +897,7 @@ import OutStock from "@/views/orderMange/components/dialogForm/OutStock.vue";
 import OutStockDetail from "@/views/orderMange/components/dialogForm/OutStockDetail.vue"; //拆分零售订单与普通订单
 import oldOutBound from "@/views/orderMange/components/dialogForm/oldOutBound.vue";
 import { numToCapital } from "@/utils/other";
+import {getOptionLsit} from "@/api/codeListManage/productCodeList";
 
 export default {
   name: "listInfo",
@@ -904,6 +931,7 @@ export default {
 
       // 出库单  end
       myDelIds: [], //新增接口 删除的id
+      dropDownData: {},
       // 详情弹窗数据
       detailShow: false,
       printDomData: "",
@@ -946,6 +974,7 @@ export default {
         colourNumberLabel: "",
         colours: "", //色号
         remark: "", //备注
+        level: "", //等级
         // 工艺表
         craftGrid: "", //网络
         craftOil: "", //油剂
@@ -959,6 +988,7 @@ export default {
       sliceTypeOptions: [], //切片型号选项
       colourNumberOptions: [], //色号选项
       allProductionOptions: [], //所有产品选项
+      levelOptions: [], //等级选项
       productionOptions: [],
       customerOptions: [],
       productionTableData: [
@@ -1258,6 +1288,34 @@ export default {
         this.productionOptions = this.allProductionOptions.slice(0, 500);
       }
     },
+    // 获取下拉数据
+    async getSelectOptions() {
+      try {
+        let res = await getOptionLsit();
+        if (res.code == 200) {
+          this.dropDownData = res.data || {};
+          // 初始化默认值
+          if (this.dropDownData.level?.length > 0 && this.excuteType == 1) {
+            this.formData.level = this.dropDownData.level[0].codeName;
+          }
+        } else {
+          this.$message.error("网络异常!");
+        }
+      } catch (error) {}
+    },
+    // 等级改变回调
+    async levelChangeHandler() {
+      // return;
+      // 等级发生变化,重新获取码单号
+      this.tableData = []; //清空打印记录
+      let res = await getQrCode();
+      this.summertId = new Date().getTime(); //总码单id重新生成
+      if (res.code == 200) {
+        this.qrCode = res.msg;
+      } else {
+        this.$message.error(res.msg);
+      }
+    },
     // 出库单回调
     async myPrintOutBoundHandler(row, data) {
       console.log("row", row);
@@ -1296,7 +1354,6 @@ export default {
                 productName: item.productName,
                 productSpecifications: item.productSpecifications,
                 productColour: item.productColour,
-                productId: item.productId,
                 lotNumber: item.lotNumber,
                 weight: item.productNumber,
                 productPrice: item.productUnitPrice,
@@ -1405,6 +1462,7 @@ export default {
         sliceType: "", //切片类型
         sliceTypeLabel: "",
         colourNumberLabel: "",
+        level: "",//等级
         colours: "", //色号
         remark: "", //备注
         // 工艺表
@@ -1434,9 +1492,10 @@ export default {
           index === 1 ||
           index === 2 ||
           index === 3 ||
-          index === 7 ||
+          index === 4 ||
           index === 8 ||
-          index === 9
+          index === 9 ||
+          index === 10
         ) {
           sums[index] = "";
         } else if (!values.every((value) => isNaN(value))) {
@@ -1674,6 +1733,16 @@ export default {
       } catch (error) {
         console.log(error);
       }
+      //等级
+      try{
+        let res = await getOptionLsit();
+        if (res.code == 200) {
+          this.levelOptions = res.data.level;
+          console.log("----------------------",res.data.level)
+        } else {
+          this.$message.error("网络异常!");
+        }
+      }catch (error){}
     },
     //
     // 获取row-key
@@ -3299,7 +3368,7 @@ export default {
             <tbody>
                 <tr>
                     <td width="600px" colspan="4">合同号:${saleNo}</td>
-                    <td width="600px" colspan="5">日期:${saleDate.replace(
+                    <td width="600px" colspan="6">日期:${saleDate.replace(
                       "T",
                       " "
                     )}</td>
@@ -3308,13 +3377,13 @@ export default {
                     <td width="300px" colspan="2">客户名称:</td>
                     <td width="300px" colspan="2">${customerName}</td>
                     <td width="300px" colspan="2">联系人:</td>
-                    <td width="150px" colspan="3">${contactPerson}</td>
+                    <td width="150px" colspan="4">${contactPerson}</td>
                 </tr>
                 <tr align="center">
                     <td width="300px" colspan="2">客户地址:</td>
                     <td width="300px" colspan="3">${customAddress}</td>
                     <td width="300px" colspan="2">客户国别:</td>
-                    <td width="300px" colspan="2">${customCountryType}</td>
+                    <td width="300px" colspan="3">${customCountryType}</td>
                 </tr>
                 <tr align="center">
                     <td width="300px" colspan="2">预计下单时间:</td>
@@ -3325,16 +3394,17 @@ export default {
                     <td  colspan="2">交货周期:</td>
                     <td >${saleLeadTime}</td>
                     <td  colspan="2">交货日期:</td>
-                    <td >${deliveryDate.replace("T", " ")}</td>
+                    <td colspan="2">${deliveryDate.replace("T", " ")}</td>
                 </tr>
                 <tr align="center">
-                    <td colspan="9">货品明细</td>
+                    <td colspan="10">货品明细</td>
                 </tr>
                 <tr align="center">
                     <td width="150px">品名</td>
                     <td width="100px">规格</td>
                     <td width="100px">类型</td>
                     <td width="100px">色号</td>
+                    <td width="100px">等级</td>
                     <td width="150px">数量/kg</td>
                     <td width="150px">单价</td>
                     <td width="150px">金额</td>
@@ -3373,6 +3443,7 @@ export default {
                     <td>${productSpecifications}</td>
                     <td>${productType}</td>
                     <td>${item.colourNumberLabel}</td>
+                    <td>${item.level}</td>
                     <td>${item.productNumber}</td>
                     <td>${item.productUnitPrice}</td>
                     <td>${item.productAmounts}</td>
@@ -3387,6 +3458,7 @@ export default {
            <td></td>
            <td></td>
           <td></td>
+          <td></td>
           <td>${amountTotal.toFixed(2)}</td>
           <td>${singlTotal.toFixed(2)}</td>
           <td>${moneyTotal.toFixed(2)}</td>
@@ -3394,7 +3466,7 @@ export default {
           <td></td>
         </tr>
                 <tr>
-                    <td colspan="9">合计金额(大写):${saleAmountInWords}</td>
+                    <td colspan="10">合计金额(大写):${saleAmountInWords}</td>
                 </tr>
                 `;
 
@@ -3402,17 +3474,17 @@ export default {
           //定金
           printStr += `
           <tr>
-            <td colspan="4">付款方式:${payType}</td>
+            <td colspan="5">付款方式:${payType}</td>
             <td colspan="5">定金:${earnestMoney}</td>
           </tr>`;
         } else {
           printStr += `
          <tr>
-              <td colspan="9">付款方式:${payType}</td>
+              <td colspan="10">付款方式:${payType}</td>
           </tr>`;
         }
         printStr += `<tr align="center">
-                    <td colspan="9">工艺要求</td>
+                    <td colspan="10">工艺要求</td>
                 </tr>
                 <tr align="center">
                     <td width="150px">网络</td>
@@ -3435,18 +3507,19 @@ export default {
                     <td width="150px"></td>
                     <td width="150px"></td>
                     <td width="150px"></td>
+                    <td width="150px"></td>
                 </tr>
                 <tr>
-                    <td colspan="9">包装/贴唛:${craftMark}</td>
+                    <td colspan="10">包装/贴唛:${craftMark}</td>
                 </tr>
                 <tr>
-                    <td colspan="9">装运方式:${shippingMethod}</td>
+                    <td colspan="10">装运方式:${shippingMethod}</td>
                 </tr>
                 <tr align="center">
                     <td colspan="2">业务员:</td>
                     <td colspan="2">${salesman}</td>
                     <td colspan="2">财务部:</td>
-                    <td colspan="3">${finance}</td>
+                    <td colspan="4">${finance}</td>
 
                 </tr>
 

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

@@ -208,9 +208,10 @@
               :data="saleProductInfoList"
               border
               stripe
-              :span-method="objectSpanMethod"
+
               :row-class-name="tableRowClassName"
             >
+<!--              :span-method="objectSpanMethod"-->
               <el-table-column align="center" label="编码" prop="productId">
               </el-table-column>
               <el-table-column align="center" label="品名" prop="productName">

+ 1 - 1
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -612,7 +612,7 @@ export default {
       queryParams:{ productionLineDepartment:"加弹部",
                     productionLineWorkshop:"南车间"},
       isEditLine:false,
-      productsInfo:[],
+      productsInfo:[],//计划产品
       salesmanInfo:[],
       product:{},
       materiel:{},