Bladeren bron

成品出入库日志-包装字典展示 产品销售单财务对账单表单修改

lph 1 jaar geleden
bovenliggende
commit
619792de89

+ 10 - 0
zkqy-ui/src/api/tablelist/commonTable.js

@@ -343,4 +343,14 @@ export function noticeOutStorage(data) {
     data: data,
     baseURL: process.env.VUE_APP_BASE_API1
   })
+}
+
+// 订单管理  打印出库单  获取详情接口
+export function outboundOrderInfo(data) {
+  return request({
+    url: '/system/products/outboundOrderInfo',
+    method: 'get',
+    params: data,
+    baseURL: process.env.VUE_APP_BASE_API1
+  })
 }

+ 13 - 11
zkqy-ui/src/utils/print/outBoundPrint.js

@@ -40,19 +40,21 @@ function outBoundPrint(data, domId) {
   let totalPrice = 0, totalWeight = 0;
   for (let i = 0; i < tableData.length; i++) {
     let item = tableData[i];
-    let { unitPrice, weight, price } = item
-    if (weight) {
-      totalWeight += Number(weight);
+    let { productName, productSpecifications, lotNumber, unit, productNumber, productUnitPrice, productAmounts } = item
+    if (Number(productAmounts)) {
+      totalPrice += Number(productAmounts);
+    }
+    if (Number(productNumber)) {
+      totalWeight += Number(productNumber);
     }
-    totalPrice += price;
     printContent += `<tr style="text-align: center;">
-      <td>${item.productName}</td>
-      <td>${item.productSpecifications}</td>
-      <td>${item.lotNum}</td>
-      <td>${item.unit}</td>
-      <td>${weight}</td>
-      <td>${unitPrice}</td>
-      <td>${price}</td>
+      <td>${productName}</td>
+      <td>${productSpecifications}</td>
+      <td>${lotNumber}</td>
+      <td>${unit}</td>
+      <td>${productNumber}</td>
+      <td>${productUnitPrice}</td>
+      <td>${productAmounts}</td>
       </tr>`
   }
   printContent += `<tr style="text-align: center;border: none;">

+ 42 - 3
zkqy-ui/src/views/orderMange/ProductInvoice/index.vue

@@ -45,13 +45,28 @@
         </el-select>
       </el-form-item> -->
 
-      <el-form-item label="客户编号" prop="customerId">
-        <el-input
+      <el-form-item label="客户" prop="customerId">
+        <!-- <el-input
           v-model="queryParams.customerId"
           placeholder="请输入客户编号"
           clearable
           @keyup.enter.native="handleQuery"
-        />
+        /> -->
+        <el-select
+          v-model="queryParams.customerId"
+          placeholder="请选择客户"
+          clearable
+          filterable
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in customerOptions"
+            :key="item.id"
+            :label="item.customName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button
@@ -226,6 +241,7 @@ export default {
   name: "ProductInvoice",
   data() {
     return {
+      customerOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -277,6 +293,26 @@ export default {
     }),
   },
   methods: {
+    // 初始化下拉框数据
+    async initDropDownBoxData() {
+      try {
+        let res = await queryDropDownBoxData([
+          {
+            basicMap: {
+              tableName: "customer",
+            },
+          },
+        ]);
+        if (res.code == 200) {
+          console.log(res);
+          this.customerOptions = res.data.resultMap.customer;
+        } else {
+          throw new Error(res);
+        }
+      } catch (error) {
+        console.log(error);
+      }
+    },
     // 打印发货单回调
     async handleDeliverOrder(index, row) {
       let { saleOrderNo } = row;
@@ -456,5 +492,8 @@ export default {
       );
     },
   },
+  mounted() {
+    this.initDropDownBoxData();
+  },
 };
 </script>

+ 45 - 6
zkqy-ui/src/views/orderMange/financialReconciliation/index.vue

@@ -45,13 +45,28 @@
         </el-select>
       </el-form-item> -->
 
-      <el-form-item label="客户编号" prop="customerId">
-        <el-input
+      <el-form-item label="客户" prop="customerId">
+        <!-- <el-input
           v-model="queryParams.customerId"
           placeholder="请输入客户编号"
           clearable
           @keyup.enter.native="handleQuery"
-        />
+        /> -->
+        <el-select
+          v-model="queryParams.customerId"
+          placeholder="请选择客户"
+          clearable
+          filterable
+          @change="handleQuery"
+        >
+          <el-option
+            v-for="item in customerOptions"
+            :key="item.id"
+            :label="item.customName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
       </el-form-item>
       <el-form-item>
         <el-button
@@ -228,6 +243,7 @@ export default {
   name: "ProductInvoice",
   data() {
     return {
+      customerOptions: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -279,6 +295,26 @@ export default {
     }),
   },
   methods: {
+    // 初始化下拉框数据
+    async initDropDownBoxData() {
+      try {
+        let res = await queryDropDownBoxData([
+          {
+            basicMap: {
+              tableName: "customer",
+            },
+          },
+        ]);
+        if (res.code == 200) {
+          console.log(res);
+          this.customerOptions = res.data.resultMap.customer;
+        } else {
+          throw new Error(res);
+        }
+      } catch (error) {
+        console.log(error);
+      }
+    },
     // 打印发货单回调
     async handleDeliverOrder(index, row) {
       let { saleOrderNo } = row;
@@ -294,11 +330,11 @@ export default {
         console.log("printData", {
           ...row,
           ...printData,
-          
+
           printUser: this.username,
         });
         deliverOrderPrint(
-          { ...row,...printData,  printUser: this.username },
+          { ...row, ...printData, printUser: this.username },
           "printDom"
         );
       } else {
@@ -325,7 +361,7 @@ export default {
           printUser: this.username,
         });
         sendOrderPrint(
-          { ...row,...printData,  printUser: this.username },
+          { ...row, ...printData, printUser: this.username },
           "printDom"
         );
       } else {
@@ -457,5 +493,8 @@ export default {
       );
     },
   },
+  mounted() {
+    this.initDropDownBoxData();
+  },
 };
 </script>

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

@@ -136,7 +136,11 @@
 
       <el-table-column label="批号" align="center" prop="lotNum" />
       <el-table-column label="等级" align="center" prop="levels" />
-      <el-table-column label="包装" align="center" prop="packaging" />
+      <el-table-column label="包装" align="center" prop="packaging">
+        <template slot-scope="scope">
+          {{ getDictLabel(scope.row.packaging, dict.type.packaging_type) }}
+        </template>
+      </el-table-column>
       <el-table-column label="箱数" align="center" prop="totalBoxNum" />
       <!-- <el-table-column label="筒数" align="center" prop="canisterNum" /> -->
 
@@ -356,9 +360,11 @@ import {
   addProductWarehousingRecord,
   updateProductWarehousingRecord,
 } from "@/api/system/ProductWarehousingRecord";
+import { getDictLabel } from "@/utils/other";
 
 export default {
   name: "ProductWarehousingRecord",
+  dicts: ["packaging_type"],
   data() {
     return {
       // 遮罩层
@@ -418,6 +424,10 @@ export default {
     this.getList();
   },
   methods: {
+    // 根据字典值获取字典描述
+    getDictLabel(value, dicts) {
+      return getDictLabel(value, dicts);
+    },
     /** 查询成品入库记录列表 */
     getList() {
       this.loading = true;

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

@@ -136,7 +136,11 @@
 
       <el-table-column label="批号" align="center" prop="lotNum" />
       <el-table-column label="等级" align="center" prop="levels" />
-      <el-table-column label="包装" align="center" prop="packaging" />
+      <el-table-column label="包装" align="center" prop="packaging">
+        <template slot-scope="scope">
+          {{ getDictLabel(scope.row.packaging, dict.type.packaging_type) }}
+        </template>
+      </el-table-column>
       <el-table-column label="箱数" align="center" prop="totalBoxNum" />
       <!-- <el-table-column label="筒数" align="center" prop="canisterNum" /> -->
 
@@ -357,9 +361,11 @@ import {
   addProductWarehousingRecord,
   updateProductWarehousingRecord,
 } from "@/api/system/ProductWarehousingRecord";
+import { getDictLabel } from "@/utils/other";
 
 export default {
   name: "ProductWarehousingRecord",
+  dicts: ["packaging_type"],
   data() {
     return {
       // 遮罩层
@@ -419,6 +425,10 @@ export default {
     this.getList();
   },
   methods: {
+    // 根据字典值获取字典描述
+    getDictLabel(value, dicts) {
+      return getDictLabel(value, dicts);
+    },
     /** 查询成品入库记录列表 */
     getList() {
       this.loading = true;