Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

hmc 1 год назад
Родитель
Сommit
5c9b609adf

+ 3 - 1
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/BpmApprovalStatusServiceImpl.java

@@ -97,6 +97,8 @@ public class BpmApprovalStatusServiceImpl implements IBpmApprovalStatusService {
 
     @Override
     public int updateApprovalStatusByTableName(String tableName, String state, String where) {
-        return bpmApprovalStatusMapper.updateApprovalStatusByTableName(tableName, state, where);
+        // 如果ID为不规则数字或编号需要使用‘’表示整体,否则会被截断
+        String endWhere = where.split("=")[0] + "=\'" + where.split("=")[1] + "\'";
+        return bpmApprovalStatusMapper.updateApprovalStatusByTableName(tableName, state, endWhere);
     }
 }

+ 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
+  })
 }

+ 48 - 46
zkqy-ui/src/utils/print/codeListPrint.js

@@ -1,11 +1,14 @@
 import moment from 'moment'
 import QRCode from 'qrcodejs2'
 import { v4 as uuidv4 } from "uuid";
+
+let width = 480
+let w = width / 8
 function codeListPrint(data, domId) {
   if (data.length == 0) {
     return
   }
-  let preHtml = ` <div style="width: 800px;position: relative;">
+  let preHtml = ` <div style="width: 480px;position: relative;">
 
     <div style="width: 100%;position: relative;text-align: center;">
       <span style="font-size: 24px;font-weight: 500;">诸暨市新丝维化纤有限公司</span>
@@ -59,7 +62,7 @@ function codeListPrint(data, domId) {
         uuidList.push({
           id: uuid + '' + theNumber,
           qrCodeData: resStr,//id uuid 筒数 净重 毛重 批次 品种 规格 色号 等级 码单号 箱号 
-          size: 150,
+          size: 180,
         })
         res = printEN(uuid + '' + theNumber, item, res)
       } else {//打印中文版
@@ -132,41 +135,41 @@ function printCN(uuid, item, res) {
     </div>
     <table style="width: 100%;border-collapse:collapse;" cellpadding="10" border="1">
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">品种</td>
-        <td style="width: 300px;">${productName}</td>
-        <td style="width: 100px;" colspan="1">规格</td>
-        <td style="width: 300px;" colspan="2">${productSpecifications}</td>
+        <td style="width: ${w}px;" colspan="1">品种</td>
+        <td style="width: ${w * 3}px;">${productName}</td>
+        <td style="width: ${w}px;" colspan="1">规格</td>
+        <td style="width: ${w * 3}px;" colspan="2">${productSpecifications}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">批号</td>
-        <td style="width: 300px;">${lotNum}</td>
-        <td style="width: 100px;" colspan="1">色号</td>
-        <td style="width: 300px;" colspan="2">${productColor}</td>
+        <td style="width: ${w}px;" colspan="1">批号</td>
+        <td style="width: ${w * 3}px;">${lotNum}</td>
+        <td style="width: ${w}px;" colspan="1">色号</td>
+        <td style="width: ${w * 3}px;" colspan="2">${productColor}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">等级</td>
-        <td style="width: 300px;">${levels}</td>
-        <td style="width: 100px;" colspan="1">箱号</td>
-        <td style="width: 250px;" colspan="1">${qrCode}</td>
-        <td style="width: 50px;" colspan="1">${boxNum}</td>
+        <td style="width: ${w}px;" colspan="1">等级</td>
+        <td style="width: ${w * 3}px;">${levels}</td>
+        <td style="width: ${w}px;" colspan="1">箱号</td>
+        <td style="width: ${w * 2 + w / 2}px;" colspan="1">${qrCode}</td>
+        <td style="width: ${w / 2}px;" colspan="1">${boxNum}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">筒数</td>
-        <td style="width: 300px;">${canisterNum}&ensp;&ensp;&ensp;${tubeColor}</td>
-        <td style="width: 100px;" colspan="1">捻向</td>
-        <td style="width: 300px;" colspan="2">${directionOfTwist}</td>
+        <td style="width: ${w}px;" colspan="1">筒数</td>
+        <td style="width: ${w * 3}px;">${canisterNum}&ensp;&ensp;&ensp;${tubeColor}</td>
+        <td style="width: ${w}px;" colspan="1">捻向</td>
+        <td style="width: ${w * 3}px;" colspan="2">${directionOfTwist}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">班次</td>
-        <td style="width: 300px;">${workShifts}&ensp;&ensp;&ensp;${machineTool}</td>
-        <td style="width: 100px;" colspan="1">日期</td>
-        <td style="width: 300px;" colspan="2">${moment(new Date(productionDate)).format('YYYY-MM-DD')}</td>
+        <td style="width: ${w}px;" colspan="1">班次</td>
+        <td style="width: ${w * 3}px;">${workShifts}&ensp;&ensp;&ensp;${machineTool}</td>
+        <td style="width: ${w}px;" colspan="1">日期</td>
+        <td style="width: ${w * 3}px;" colspan="2">${moment(new Date(productionDate)).format('YYYY-MM-DD')}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">毛重</td>
-        <td style="width: 300px;">${grossWeight}</td>
-        <td style="width: 100px;" colspan="1">净重</td>
-        <td style="width: 300px;font-size: 20px;font-weight: 500;" colspan="2">${suttle}</td>
+        <td style="width: ${w}px;" colspan="1">毛重</td>
+        <td style="width: ${w * 3}px;">${grossWeight}</td>
+        <td style="width: ${w}px;" colspan="1">净重</td>
+        <td style="width: ${w * 3}px;font-size: 20px;font-weight: 500;" colspan="2">${suttle}</td>
       </tr>
     </table>`
 
@@ -197,42 +200,41 @@ function printEN(uuid, item, res) {
     boxNum,//箱号
     packaging
   } = item
-  res += `<div style="width: 800px;position: relative;">
+  res += `<div style="width: 480px;position: relative;">
     <table style="width: 100%;border-collapse:collapse;" cellpadding="10" border="1">
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">GRADE:</td>
-        <td style="width: 700px; font-size: 20px;font-weight: 600;" colspan="2">${levels}&ensp;&ensp;&ensp;${productSpecifications}</td>
+        <td style="width: ${w}px;" colspan="1">GRADE:</td>
+        <td style="width: ${w * 7}px; font-size: 20px;font-weight: 600;" colspan="2">${levels}&ensp;&ensp;&ensp;${productSpecifications}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">LOT NO.:</td>
-        <td style="width: 700px;" colspan="2">${qrCode}YL</td>
+        <td style="width: ${w}px;" colspan="1">LOT NO.:</td>
+        <td style="width: ${w * 7}px;" colspan="2">${qrCode}YL</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">COLOR NO.:</td>
-        <td style="width: 700px;font-size: 20px;font-weight: 600;" colspan="2">${productColor}&ensp;&ensp;&ensp;${lotNum}</td>
+        <td style="width: ${w}px;" colspan="1">COLOR NO.:</td>
+        <td style="width: ${w * 7}px;font-size: 20px;font-weight: 600;" colspan="2">${productColor}&ensp;&ensp;&ensp;${lotNum}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">CONE NO.:</td>
-        <td style="width: 550px;">${canisterNum}</td>
-        <td style="width: 150px;" rowspan="3">
+        <td style="width: ${w}px;" colspan="1">CONE NO.:</td>
+        <td style="width: ${w * 4}px;">${canisterNum}</td>
+        <td style="width: ${w * 3}px;" rowspan="3">
           <div style="width: 100%;display: flex;justify-content: center;margin:5px 0;">
-            <div id="${uuid}" style="width: 150px;height: 150px;background-color: aqua;"></div>
+            <div id="${uuid}" style="width: ${w * 3}px;height: ${w * 3}px;background-color: aqua;"></div>
           </div>
         </td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">NET WEIGHT:</td>
-        <td style="width: 550px;font-size: 20px;font-weight: 600;">${suttle}</td>
-        <!-- <td style="width: 150px;"></td> -->
+        <td style="width: ${w}px;" colspan="1">NET WEIGHT:</td>
+        <td style="width: ${w * 4}px;font-size: 20px;font-weight: 600;">${suttle}</td>
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">GROSS WEIGHT:</td>
-        <td style="width: 550px;font-size: 20px;font-weight: 600;">${grossWeight}</td>
-        <!-- <td style="width: 150px;"></td> -->
+        <td style="width: ${w}px;" colspan="1">GROSS WEIGHT:</td>
+        <td style="width: ${w * 4}px;font-size: 20px;font-weight: 600;">${grossWeight}</td>
+
       </tr>
       <tr style="text-align: center;">
-        <td style="width: 100px;" colspan="1">CARTON NO:</td>
-        <td style="width: 700px;" colspan="2">${boxNum}</td>
+        <td style="width: ${w}px;" colspan="1">CARTON NO:</td>
+        <td style="width: ${w * 7}px;" colspan="2">${boxNum}</td>
       </tr>
     </table>
   </div>`

+ 80 - 0
zkqy-ui/src/utils/print/outBoundPrint.js

@@ -0,0 +1,80 @@
+function outBoundPrint(data, domId) {
+  console.log(data);
+  let { outStockDate, remark, unitName, printUser } = data.form
+  let { tableData } = data
+  let date = new Date(outStockDate)
+  console.log(date);
+  let yy = date.getFullYear();
+  let mm = date.getMonth() + 1;
+  if (mm < 10) {
+    mm = "0" + mm;
+  }
+  let dd = date.getDate();
+  if (dd < 10) {
+    dd = "0" + dd;
+  }
+
+  let printContent = `<div style="width: 700px;position: relative;">
+
+    <div
+      style="width: 100%;position: relative;text-align: center;display: flex;flex-direction: column;margin-bottom: 10px;">
+      <span style="font-size: 24px;font-weight: 500;">诸暨市新丝维化纤有限公司</span>
+      <span>销售出库单</span>
+    </div>
+    <div>
+      <div style="margin-bottom: 3px; padding: 0 10px;"><span>单位名称:${unitName}</span></div>
+      <div style="display: flex;justify-content: space-between;padding: 0 20px;">
+        <span>备注:${remark}</span><span>出库日期:&ensp;${yy}&ensp;年&ensp;${mm}&ensp;月&ensp;${dd}&ensp;日</span>
+      </div>
+    </div>
+    <table style="width: 100%;border-collapse:collapse;" cellpadding="10" border="1">
+      <tr style="text-align: center;">
+        <td style="width: 100px;">名称</td>
+        <td style="width: 100px;">规格</td>
+        <td style="width: 100px;">批号</td>
+        <td style="width: 100px;">单位</td>
+        <td style="width: 100px;">数量</td>
+        <td style="width: 100px;">单价</td>
+        <td style="width: 100px;">金额</td>
+      </tr>`;
+  let totalPrice = 0, totalWeight = 0;
+  for (let i = 0; i < tableData.length; i++) {
+    let item = tableData[i];
+    let { productName, productSpecifications, lotNumber, unit, productNumber, productUnitPrice, productAmounts } = item
+    if (Number(productAmounts)) {
+      totalPrice += Number(productAmounts);
+    }
+    if (Number(productNumber)) {
+      totalWeight += Number(productNumber);
+    }
+    printContent += `<tr style="text-align: center;">
+      <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;">
+        <td style="width: 100px;">合计</td>
+        <td style="width: 100px;"></td>
+        <td style="width: 100px;"></td>
+        <td style="width: 100px;"></td>
+        <td style="width: 100px;">${totalWeight}</td>
+        <td style="width: 100px;"></td>
+        <td style="width: 100px;">${totalPrice}</td>
+      </tr>`
+
+
+  printContent += `</table>
+    <div><span>制表人:${printUser}</span></div>
+  </div>`
+  document.body.innerHTML = document.getElementById(domId).innerHTML = printContent;
+  window.print(); //打印
+  window.location.reload();
+  return false;
+
+}
+export default outBoundPrint

+ 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>

+ 170 - 0
zkqy-ui/src/views/orderMange/components/dialogForm/OutBound.vue

@@ -0,0 +1,170 @@
+<template>
+  <div class="container">
+    <div class="form-title">
+      <span class="main-title">诸暨市新丝维化纤有限公司</span>
+      <span class="sub-title">销售出库单</span>
+    </div>
+    <el-row :gutter="10">
+      <el-form
+        :model="form"
+        ref="form"
+        :rules="rules"
+        label-width="80px"
+        :inline="false"
+        size="normal"
+      >
+        <el-col :span="24">
+          <el-form-item label="单位名称" prop="unitName">
+            <el-input
+              v-model="form.unitName"
+              placeholder=""
+              size="normal"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="备注:" prop="remark" size="normal">
+            <el-input
+              v-model="form.remark"
+              placeholder=""
+              size="normal"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="出库日期:" prop="remark" size="normal">
+            <el-date-picker
+              v-model="form.outStockDate"
+              type="date"
+              size="normal"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-form>
+    </el-row>
+    <el-table :data="tableData" border stripe>
+      <el-table-column type="index" width="50" />
+      <el-table-column label="名称" prop="productName"></el-table-column>
+      <el-table-column
+        label="规格"
+        prop="productSpecifications"
+      ></el-table-column>
+      <el-table-column label="批号" prop="lotNumber"></el-table-column>
+      <el-table-column label="单位" prop="unit">
+        <template slot-scope="scope">
+          <el-input
+            v-model="scope.row.unit"
+            placeholder=""
+            size="normal"
+            clearable
+          ></el-input>
+        </template>
+      </el-table-column>
+      <el-table-column label="数量" prop="productNumber"></el-table-column>
+      <el-table-column label="单价" prop="productUnitPrice"></el-table-column>
+      <el-table-column label="金额" prop="productAmounts"></el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import {
+  productInvoiceInfo,
+  outboundOrderInfo,
+} from "@/api/tablelist/commonTable";
+export default {
+  name: "OutBound",
+  props: [],
+  components: {},
+  data() {
+    return {
+      form: {
+        unitName: "",
+        remark: "",
+        outStockDate: new Date(),
+      },
+      rules: {
+        // unitName: [
+        //   { required: true, message: "请输入单位名称", trigger: "blur" },
+        // ],
+      },
+      tableData: [],
+      columns: [],
+    };
+  },
+  computed: {},
+  methods: {
+    // 重置表单
+    resetForm() {
+      Object.assign(this.form, {
+        unitName: "",
+        remark: "",
+        outStockDate: new Date(),
+      });
+    },
+    // 获取表格数据
+    async getTableData(row) {
+      this.resetForm();
+      this.row = row;
+      console.log(row);
+      try {
+        let payload = {
+          saleOrderNo: row.saleOrderSaleNo,
+        };
+        let res = await outboundOrderInfo(payload);
+        if (res.code == 200) {
+          res.data.forEach((item) => {
+            // if (Number(item.productNumber) && Number(item.productUnitPrice)) {
+            //   item.price = (
+            //     Number(item.productNumber) * Number(item.productUnitPrice)
+            //   ).toFixed(2);
+            // } else {
+            //   item.price = 0;
+            // }
+            item.unit = "";
+          });
+          this.tableData = res.data;
+        }
+      } catch (error) {}
+    },
+    // 获取打印数据
+    async getPrintData() {
+      let res = {
+        flag: false,
+      };
+      this.$refs.form.validate(async (valid) => {
+        if (valid) {
+          res.flag = true;
+          res.data = {
+            form: this.form,
+            tableData: this.tableData,
+          };
+        }
+      });
+      return res;
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.container {
+  .form-title {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .main-title {
+      font-size: 20px;
+      font-weight: bold;
+    }
+    .sub-title {
+      font-weight: bold;
+      margin-bottom: 10px;
+    }
+  }
+}
+</style>

+ 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>

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

@@ -706,6 +706,20 @@
         <el-button type="primary" @click="detailPrintHandler">打 印</el-button>
       </span>
     </el-dialog>
+    <!-- 销售出库弹窗 -->
+    <el-dialog
+      title="打印-销售出库单"
+      :visible.sync="outBoundShow"
+      width="1000px"
+    >
+      <OutBound ref="outBoundRef" :currentRow="currentRow"></OutBound>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="outBoundShow = false">取 消</el-button>
+        <el-button type="primary" @click="outBoundPrintHandler">
+          打印</el-button
+        >
+      </span>
+    </el-dialog>
     <div id="printDom"></div>
   </div>
 </template>
@@ -740,13 +754,17 @@ import { v4 as uuidv4 } from "uuid";
 import { mapState } from "vuex";
 import moment from "moment";
 import Deliver from "@/views/orderMange/components/dialogForm/Deliver.vue";
-
+import OutBound from "@/views/orderMange/components/dialogForm/OutBound.vue";
+import outBoundPrint from "@/utils/print/outBoundPrint";
 export default {
   name: "listInfo",
   dicts: ["payment_method", "direction_of_twist"],
-  components: { Queryfrom, Menu, DialogTemplate, Deliver },
+  components: { Queryfrom, Menu, DialogTemplate, Deliver, OutBound },
   data() {
     return {
+      // 出库单 start
+      outBoundShow: false,
+      // 出库单 end
       // 发货 start
       deliverShow: false,
       // 发货 end
@@ -1000,6 +1018,20 @@ export default {
     // 出库单回调
     async myPrintOutBoundHandler(row, data) {
       console.log("row", row);
+      this.currentRow = row;
+      this.outBoundShow = true;
+      this.$nextTick(() => {
+        this.$refs.outBoundRef.getTableData(row);
+      });
+    },
+    // 出库单打印回调
+    async outBoundPrintHandler() {
+      let res = await this.$refs.outBoundRef.getPrintData();
+      console.log(res);
+      if (res.flag) {
+        res.data.form.printUser = this.nickName;
+        outBoundPrint(res.data, "printDom");
+      }
     },
 
     // 产品名称改变

+ 13 - 6
zkqy-ui/src/views/orderMange/outStock/index.vue

@@ -57,8 +57,8 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="发货员" prop="drawer">
-              {{ form.drawer }}
+            <el-form-item label="发货员" prop="deliveryClerk">
+              {{ form.deliveryClerk }}
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -148,6 +148,7 @@ import {
   queryDropDownBoxData,
   noticeOutStorage,
 } from "@/api/tablelist/commonTable";
+import { mapState } from "vuex";
 export default {
   name: "OutStock",
   props: [],
@@ -163,10 +164,11 @@ export default {
         salesman: "", //销售员
         sellingUnit: "", //售货单位
         truckRegistration: "", //货车信息
-        drawer: "", //发货员
+        drawer: "", //开票员
+        deliveryClerk: "", // 发货员
         dispatchNoteRemark: "", //备注
         customerName: "", //客户名称
-        deliveryDate: "", //发货日期
+        deliveryDate: new Date(), //发货日期
         deliveryWarehouse: "", //发货仓库
         transferWarehouse: "", //调拨仓库
         id: "",
@@ -283,7 +285,7 @@ export default {
             salesman, //销售员
             sellingUnit, //售货单位
             truckRegistration, //货车信息
-            drawer, //发货
+            drawer, //开票
             dispatchNoteRemark, //备注
             saleProductInfoList, //产品信息
             id,
@@ -297,17 +299,22 @@ export default {
             salesman, //销售员
             sellingUnit, //售货单位
             truckRegistration, //货车信息
-            drawer, //发货员
             dispatchNoteRemark, //备注
             customerName, //客户名称
             id,
           });
+          this.form.deliveryClerk = this.nickName;
         }
       } catch (error) {
         console.log(error);
       }
     },
   },
+  computed: {
+    ...mapState({
+      nickName: (state) => state.user.nickName,
+    }),
+  },
   mounted() {
     this.initData();
     this.initWarehouse();

+ 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;