cz hai 1 ano
pai
achega
583790f8ab

+ 11 - 0
src/components/byTable/index.vue

@@ -167,10 +167,21 @@
             (rowData, rowIndex) => isSelectable(rowData, rowIndex, item)
           "
         >
+          <template #header v-if="item.attrs.isNeedHeaderSlot">
+            <slot
+              :name="item.attrs.headerSlot"
+              :headerLabel="item.attrs.label"
+              v-if="item.attrs.headerSlot"
+            >
+              头部插槽占位符
+            </slot>
+          </template>
+
           <template #default="scope" v-if="!item.type">
             <slot
               :name="item.attrs.slot"
               :item="scope.row"
+              :headerLabel="item.attrs.label"
               v-if="item.attrs.slot"
             >
               插槽占位符

+ 327 - 109
src/views/EHSD/saleContract/exportTracking/index.vue

@@ -1,78 +1,208 @@
 <template>
   <div class="tenant">
-    <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[]"
-        @get-list="getList"
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      :selectConfig="selectConfig"
+      highlight-current-row
+      :action-list="[]"
+      @get-list="getList"
+    >
+      <template #code="{ item }">
+        <div style="width: 100%">
+          <span class="public-class" @click="openDetails(item)">{{
+            item.code
+          }}</span>
+        </div>
+      </template>
+
+      <template #customer="{ item }">
+        <div style="width: 100%">
+          <span class="public-class">{{ item.code }}</span>
+        </div>
+      </template>
+
+      <template #remarks="{ item }">
+        <div style="width: 100%">
+          <el-button type="primary" text @click="handleClickLookRemarks(item)"
+            >查看</el-button
+          >
+        </div>
+      </template>
+
+      <template #headerSlotOne="{ headerLabel }">
+        <div style="width: 100%">
+          {{ headerLabel }} <span class="headerSlot">10</span>
+        </div>
+      </template>
+
+      <template #slotOne="{ item, headerLabel }">
+        <div style="width: 100%">
+          <el-popover placement="bottom" title="" :width="250" trigger="click">
+            <div default>
+              <el-button
+                type="primary"
+                text
+                @click="handleClickAddRecord(item, item)"
+                >添加记录</el-button
+              >
+              <div>
+                <el-timeline>
+                  <el-timeline-item
+                    v-for="(activity, index) in recordsData"
+                    :key="index"
+                    :timestamp="activity.timestamp"
+                  >
+                    aa
+                  </el-timeline-item>
+                </el-timeline>
+              </div>
+            </div>
+            <template #reference>
+              <el-button
+                type="primary"
+                text
+                @click="handleClickLook(item, item, headerLabel)"
+                >查看</el-button
+              >
+            </template>
+          </el-popover>
+        </div>
+      </template>
+
+      <template #headerSlotTwo="{ headerLabel }">
+        <div style="width: 100%">
+          {{ headerLabel }} <span class="headerSlot">10</span>
+        </div>
+      </template>
+      <template #slotTwo="{ item, headerLabel }">
+        <div style="width: 100%">
+          <el-popover placement="bottom" title="" :width="250" trigger="click">
+            <div default>
+              <el-button
+                type="primary"
+                text
+                @click="handleClickAddRecord(item, item)"
+                >添加记录</el-button
+              >
+            </div>
+            <template #reference>
+              <el-button
+                type="primary"
+                text
+                @click="handleClickLook(item, item, headerLabel)"
+                >查看</el-button
+              >
+            </template>
+          </el-popover>
+        </div>
+      </template>
+    </byTable>
+    <!-- 备注弹窗 -->
+    <el-dialog
+      title="备注"
+      v-if="openRemarks"
+      v-model="openRemarks"
+      width="600"
+    >
+      <byForm
+        :formConfig="remarksFormConfig"
+        :formOption="formOption"
+        v-model="formData.remarksFormData"
+        ref="remarksForm"
       >
-        <template #code="{ item }">
+        <template #file>
           <div style="width: 100%">
-            <a
-              style="color: #409eff; cursor: pointer; word-break: break-all"
-              @click="openDetails(item)"
-              >{{ item.code }}</a
+            <el-upload
+              v-model:fileList="formData.remarksFormData.fileList"
+              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+              :data="uploadData"
+              multiple
+              :before-upload="uploadFile"
+              :on-success="handleSuccess"
+              :on-preview="onPreviewFile"
             >
+              <el-button type="primary" plain>选择</el-button>
+            </el-upload>
           </div>
         </template>
-      </byTable>
-    </div>
+      </byForm>
+      <template #footer>
+        <el-button @click="openRemarks = false" size="large">关 闭</el-button>
+        <el-button type="primary" @click="submitRemarks()" size="large"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
+    <!-- 添加记录弹窗 -->
+    <el-dialog
+      :title="`添加记录(${rowHeaderLabel})`"
+      v-if="openRecords"
+      v-model="openRecords"
+      width="600"
+    >
+      <byForm
+        :formConfig="recordsFormConfig"
+        :formOption="formOption"
+        v-model="formData.recordsFormData"
+        ref="remarksForm"
+      >
+        <template #file>
+          <div style="width: 100%">
+            <el-upload
+              v-model:fileList="formData.recordsFormData.fileList"
+              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
+              :data="uploadData"
+              multiple
+              :before-upload="uploadFile"
+              :on-success="handleSuccess"
+              :on-preview="onPreviewFile"
+            >
+              <el-button type="primary" plain>选择</el-button>
+            </el-upload>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="openRecords = false" size="large">关 闭</el-button>
+        <el-button type="primary" @click="submitRecords()" size="large"
+          >确 定</el-button
+        >
+      </template>
+    </el-dialog>
   </div>
 </template>
 
 <script setup>
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-
-const route = useRoute();
+import useUserStore from "@/store/modules/user";
+import { ElMessage, ElMessageBox } from "element-plus";
 const { proxy } = getCurrentInstance();
-const accountCurrency = ref([]);
-const tradeMethods = ref([]);
-const corporationList = ref([]);
-const customerList = ref([]);
-const userList = ref([]);
-const shippingMethod = ref([]);
-const customerTag = ref([]);
-const openDetailsDialog = ref(false);
-
+const uploadData = ref({});
 const status = ref([
   {
-    label: "草稿",
+    label: "待采购",
     value: 0,
   },
   {
-    label: "审批中",
+    label: "待出货",
     value: 10,
   },
   {
-    label: "驳回",
+    label: "已出货待收款",
     value: 20,
   },
   {
-    label: "审批通过",
+    label: "已收款待出货",
     value: 30,
   },
   {
-    label: "变更中",
+    label: "已完成",
     value: 60,
   },
-  {
-    label: "已变更",
-    value: 70,
-  },
-  {
-    label: "作废",
-    value: 88,
-  },
-  {
-    label: "终止",
-    value: 99,
-  },
 ]);
 const sourceList = ref({
   data: [],
@@ -89,20 +219,9 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
-      label: "审批状态",
-      prop: "status",
+      label: "订单状态",
       data: status.value,
     },
-    {
-      label: "归属公司",
-      prop: "sellCorporationId",
-      data: corporationList.value,
-    },
-    {
-      label: "业务员",
-      prop: "userId",
-      data: userList.value,
-    },
   ];
 });
 const config = computed(() => {
@@ -111,40 +230,43 @@ const config = computed(() => {
       attrs: {
         label: "订单号",
         slot: "code",
-        width: 140,
+        width: 150,
+        fixed: "left",
       },
     },
     {
       attrs: {
         label: "订单状态",
-        prop: "sellCorporationId",
-        "min-width": 220,
+        prop: "status",
+        width: 120,
+        fixed: "left",
       },
       render(type) {
-        return proxy.dictValueLabel(type, corporationList.value);
+        return proxy.dictValueLabel(type, status.value);
       },
     },
     {
       attrs: {
-        label: "订单备注",
-        prop: "userName",
-        width: 100,
+        label: "备注",
+        slot: "remarks",
+        width: 60,
+        fixed: "left",
+        align: "center",
       },
-      // render(type) {
-      //   return proxy.dictValueLabel(type, userList.value);
-      // },
     },
     {
       attrs: {
         label: "客户",
-        prop: "createTime",
-        width: 160,
+        slot: "customer",
+        "min-width": 160,
+        fixed: "left",
       },
     },
     {
       attrs: {
         label: "产品",
         slot: "buyCorporationName",
+
         "min-width": 140,
       },
     },
@@ -152,7 +274,7 @@ const config = computed(() => {
       attrs: {
         label: "条款",
         slot: "tags",
-        width: 180,
+        width: 60,
       },
     },
     {
@@ -160,78 +282,76 @@ const config = computed(() => {
         label: "定金",
         slot: "advanceRatio",
         width: 100,
-        align: "right",
+      },
+      render(money) {
+        return proxy.moneyFormat(money, 2);
       },
     },
     {
       attrs: {
         label: "定金到账时间",
-        slot: "amount",
+        prop: "aaa",
         width: 140,
-        align: "right",
       },
     },
     {
       attrs: {
-        label: "工厂",
-        prop: "rate",
-        width: 80,
-        align: "right",
+        label: "交接单",
+        slot: "aaa",
+        width: 90,
       },
-      render(rate) {
-        return proxy.moneyFormat(rate, 4);
+    },
+    {
+      attrs: {
+        label: "包装指示",
+        slot: "aaa",
+        width: 90,
       },
     },
     {
       attrs: {
-        label: "下单时间",
-        prop: "amountCNY",
-        width: 160,
-        align: "right",
+        label: "订单号",
+        slot: "code",
+        width: 150,
       },
-      render(amountCNY) {
-        return proxy.moneyFormat(amountCNY, 2);
+    },
+    {
+      attrs: {
+        label: "供应商",
+        prop: "code",
+        "min-width": 150,
       },
     },
     {
       attrs: {
-        label: "交期",
-        prop: "sumClaimMoney",
+        label: "下单时间",
+        slot: "code",
         width: 160,
-        align: "right",
-      },
-      render(sumClaimMoney) {
-        return proxy.moneyFormat(sumClaimMoney, 2);
       },
     },
     {
       attrs: {
-        label: "交接单",
-        slot: "scale",
+        label: "交",
+        slot: "code",
         width: 100,
-        align: "right",
       },
     },
-
     {
       attrs: {
-        label: "审批状态",
-        prop: "status",
-        width: 140,
-      },
-      render(type) {
-        return proxy.dictValueLabel(type, status.value);
+        label: "签样",
+        slot: "slotOne",
+        isNeedHeaderSlot: true,
+        headerSlot: "headerSlotOne",
+        width: 100,
       },
     },
     {
       attrs: {
-        label: "操作",
-        width: 160,
-        align: "center",
-        fixed: "right",
-      },
-      renderHTML(row) {
-        return [];
+        label: "LOGO",
+        slot: "slotTwo",
+        isNeedHeaderSlot: true,
+        headerSlot: "headerSlotTwo",
+        width: 100,
       },
     },
   ];
@@ -277,17 +397,115 @@ const getList = async (req) => {
 getDict();
 
 getList();
-
+const formData = reactive({
+  remarksFormData: {},
+  recordsFormData: {},
+});
 const formOption = reactive({
   inline: true,
   labelWidth: 100,
   itemWidth: 100,
   rules: [],
 });
+const remarksFormConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "备注内容",
+      itemType: "textarea",
+      disabled: false,
+    },
+    {
+      type: "slot",
+      slotName: "file",
+      label: "上传附件",
+    },
+  ];
+});
+const openRemarks = ref(false);
+const remarksForm = ref(null);
+const handleClickLookRemarks = (row) => {
+  formData.remarksFormData = {
+    fileList: [],
+    remarks: "",
+  };
+  openRemarks.value = true;
+};
+const submitRemarks = () => {
+  remarksForm.value.handleSubmit(() => {
+    console.log("asda");
+  });
+};
+// 上传文件
+const uploadFile = async (file) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  uploadData.value = res.uploadBody;
+  file.id = res.id;
+  file.fileName = res.fileName;
+  file.fileUrl = res.fileUrl;
+  file.uploadState = true;
+  return true;
+};
+const handleSuccess = (any, UploadFile) => {
+  UploadFile.raw.uploadState = false;
+};
+const onPreviewFile = (file) => {
+  window.open(file.raw.fileUrl, "_blank");
+};
+// 记录
+const rowHeaderLabel = ref("");
+const openRecords = ref(false);
+const recordsLoading = ref(false);
+const recordsData = ref([]);
+const recordsFormConfig = computed(() => {
+  return [
+    {
+      type: "date",
+      prop: "code",
+      label: "跟单时间",
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "code",
+      label: "跟单记录",
+      itemType: "textarea",
+      disabled: false,
+    },
+    {
+      type: "slot",
+      slotName: "file",
+      label: "上传附件",
+    },
+  ];
+});
+const handleClickLook = (row, item, label) => {
+  rowHeaderLabel.value = label;
+  recordsLoading.value = true;
+  setTimeout(() => (recordsLoading.value = false), 1000);
+};
+const handleClickAddRecord = () => {
+  openRecords.value = true;
+  formData.recordsFormData = {
+    fileList: [],
+  };
+};
 </script>
 
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
 }
+.public-class {
+  color: #409eff;
+  cursor: pointer;
+  word-break: break-all;
+}
+.headerSlot {
+  margin-left: 10px;
+  font-size: 14px;
+  color: #409eff;
+  cursor: pointer;
+}
 </style>

+ 43 - 2
src/views/finance/fundManage/funds/index.vue

@@ -160,7 +160,7 @@
         :formOption="formOption"
         v-model="fileData.data"
       >
-        <template #fundsFile>
+        <template #businessFile>
           <div
             style="width: 100%"
             v-if="fileData.data && fileData.data.fileList.length > 0"
@@ -176,6 +176,25 @@
           </div>
           <div v-else>暂无关联</div>
         </template>
+        <template #fundsFile>
+          <div
+            style="width: 100%"
+            v-if="fileData.data && fileData.data.fileListOne.length > 0"
+          >
+            <div
+              v-for="(item, index) in fileData.data.fileListOne"
+              :key="index"
+            >
+              <div
+                style="cursor: pointer; color: #409eff"
+                @click="openFile(item)"
+              >
+                {{ item.fileName }}
+              </div>
+            </div>
+          </div>
+          <div v-else>暂无关联</div>
+        </template>
       </byForm>
       <template #footer>
         <el-button @click="openFileDialog = false" size="large"
@@ -685,15 +704,27 @@ const fileData = reactive({
 });
 const fileConfig = computed(() => [
   {
+    type: "title",
+    title: "业务附件",
+  },
+  {
+    type: "slot",
+    slotName: "businessFile",
+  },
+  {
+    type: "title",
+    title: "打款附件",
+  },
+  {
     type: "slot",
     slotName: "fundsFile",
-    // label: "业务附件",
   },
 ]);
 const openFileDialog = ref(false);
 const handleOpenFile = (row) => {
   fileData.data = {
     fileList: [],
+    fileListOne: [],
   };
   proxy
     .post("/fileInfo/getList", { businessIdList: [row.id] })
@@ -702,6 +733,16 @@ const handleOpenFile = (row) => {
         fileData.data.fileList = fileObj[row.id];
       }
     });
+  proxy
+    .post("/fileInfo/getList", { businessIdList: [row.accountPaymentId] })
+    .then((fileObj) => {
+      if (
+        fileObj[row.accountPaymentId] &&
+        fileObj[row.accountPaymentId].length > 0
+      ) {
+        fileData.data.fileListOne = fileObj[row.accountPaymentId];
+      }
+    });
   openFileDialog.value = true;
 };
 const openFile = (item) => {

+ 426 - 102
src/views/salesMange/shipmentMange/packing/index.vue

@@ -23,18 +23,30 @@
             action: () => openModal(),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #code="{ item }">
           <div>
-            <div v-for="(row, index) in getData(item.codeAPName, 'code')" :key="index">
+            <div
+              v-for="(row, index) in getData(item.codeAPName, 'code')"
+              :key="index"
+            >
               {{ row }}
             </div>
           </div>
         </template>
         <template #productName="{ item }">
           <div>
-            <div v-for="(row, index) in getData(item.codeAPName, 'productName')" :key="index">
-              <el-tooltip class="box-item" effect="dark" :content="row" placement="top-start">
+            <div
+              v-for="(row, index) in getData(item.codeAPName, 'productName')"
+              :key="index"
+            >
+              <el-tooltip
+                class="box-item"
+                effect="dark"
+                :content="row"
+                placement="top-start"
+              >
                 <div class="hidden-text">
                   {{ row }}
                 </div>
@@ -52,14 +64,18 @@
         <template #netWeight="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              <span v-if="i.netWeight && Number(i.netWeight) > 0"> {{ i.netWeight + " kg" }}</span>
+              <span v-if="i.netWeight && Number(i.netWeight) > 0">
+                {{ i.netWeight + " kg" }}</span
+              >
             </div>
           </div>
         </template>
         <template #roughWeight="{ item }">
           <div>
             <div v-for="(i, index) in item.dataJsonListCopy" :key="index">
-              <span v-if="i.roughWeight && Number(i.roughWeight) > 0"> {{ i.roughWeight + " kg" }}</span>
+              <span v-if="i.roughWeight && Number(i.roughWeight) > 0">
+                {{ i.roughWeight + " kg" }}</span
+              >
             </div>
           </div>
         </template>
@@ -102,24 +118,62 @@
       </byTable>
     </div>
 
-    <el-dialog title="产品装箱" v-model="dialogVisible" width="800" v-loading="loading">
-      <el-form :model="formData.data" :rules="rules" ref="formDom" label-position="top">
+    <el-dialog
+      title="产品装箱"
+      v-model="dialogVisible"
+      width="800"
+      v-loading="loading"
+    >
+      <el-form
+        :model="formData.data"
+        :rules="rules"
+        ref="formDom"
+        label-position="top"
+      >
         <el-row :gutter="10">
           <el-col :span="8">
             <el-form-item label="客户名称" prop="customerId">
-              <el-select v-model="formData.data.customerId" placeholder="请选择" @change="handleChangeCustomer" filterable style="width: 100%">
-                <el-option v-for="item in customerList" :label="item.name" :value="item.id"> </el-option>
+              <el-select
+                v-model="formData.data.customerId"
+                placeholder="请选择"
+                @change="handleChangeCustomer"
+                filterable
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in customerList"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                </el-option>
               </el-select>
             </el-form-item>
           </el-col>
         </el-row>
         <el-form-item label="选择合同" prop="contractIds">
-          <el-select v-model="formData.data.contractIds" placeholder="请选择" @change="handleChangeContract" filterable style="width: 100%" multiple>
-            <el-option v-for="item in contractData" :label="item.code" :value="item.id"> </el-option>
+          <el-select
+            v-model="formData.data.contractIds"
+            placeholder="请选择"
+            @change="handleChangeContract"
+            filterable
+            style="width: 100%"
+            multiple
+          >
+            <el-option
+              v-for="item in contractData"
+              :label="item.code"
+              :value="item.id"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="合同明细" prop="contractProductData">
-          <el-table :data="formData.data.contractProductData" @select="handleSelectProduct" @select-all="handleSelectProduct" ref="tableDom">
+          <el-table
+            :data="formData.data.contractProductData"
+            @select="handleSelectProduct"
+            @select-all="handleSelectProduct"
+            ref="tableDom"
+          >
             <el-table-column type="selection" label="" width="50" />
             <el-table-column prop="contractCode" label="合同编码" />
             <el-table-column prop="productName" label="产品名称" />
@@ -127,20 +181,43 @@
             <el-table-column prop="waitQuantity" label="待装箱数量" />
             <el-table-column prop="quantity" label="装箱数量" min-width="150">
               <template #default="{ row, $index }">
-                <el-form-item :prop="'contractProductData.' + $index + '.quantity'" :inline-message="true">
-                  <el-input-number v-model="row.quantity" :precision="4" :controls="false" :min="0" onmousewheel="return false;" />
+                <el-form-item
+                  :prop="'contractProductData.' + $index + '.quantity'"
+                  :inline-message="true"
+                >
+                  <el-input-number
+                    v-model="row.quantity"
+                    :precision="4"
+                    :controls="false"
+                    :min="0"
+                    onmousewheel="return false;"
+                  />
                 </el-form-item>
               </template>
             </el-table-column>
           </el-table>
-          <el-button type="primary" style="margin-top: 10px; width: 100%" @click="handleClickPacking"> 装箱 </el-button>
+          <el-button
+            type="primary"
+            style="margin-top: 10px; width: 100%"
+            @click="handleClickPacking"
+          >
+            装箱
+          </el-button>
         </el-form-item>
         <el-form-item label="装箱明细" prop="packDetailList">
-          <div class="box" v-for="(item, index) in formData.data.packDetailList" :key="index">
+          <div
+            class="box"
+            v-for="(item, index) in formData.data.packDetailList"
+            :key="index"
+          >
             <div ref="">箱规</div>
             <el-row :gutter="10">
               <el-col :span="5">
-                <el-form-item label="箱数" :prop="'packDetailList.' + index + '.packQuantity'" :rules="rules.packQuantity">
+                <el-form-item
+                  label="箱数"
+                  :prop="'packDetailList.' + index + '.packQuantity'"
+                  :rules="rules.packQuantity"
+                >
                   <el-input-number
                     v-model="item.packQuantity"
                     :precision="0"
@@ -148,17 +225,40 @@
                     :min="1"
                     placeholder="请输入"
                     onmousewheel="return false;"
-                    @change="(val) => handleChangePackQuantity(val, index)" />
+                    @change="(val) => handleChangePackQuantity(val, index)"
+                  />
                 </el-form-item>
               </el-col>
               <el-col :span="5">
-                <el-form-item label="净重(kg)" :prop="'packDetailList.' + index + '.netWeight'" :rules="rules.netWeight">
-                  <el-input-number v-model="item.netWeight" :precision="2" :controls="false" :min="0" placeholder="请输入" onmousewheel="return false;" />
+                <el-form-item
+                  label="净重(kg)"
+                  :prop="'packDetailList.' + index + '.netWeight'"
+                  :rules="rules.netWeight"
+                >
+                  <el-input-number
+                    v-model="item.netWeight"
+                    :precision="2"
+                    :controls="false"
+                    :min="0"
+                    placeholder="请输入"
+                    onmousewheel="return false;"
+                  />
                 </el-form-item>
               </el-col>
               <el-col :span="5">
-                <el-form-item label="毛重(kg)" :prop="'packDetailList.' + index + '.roughWeight'" :rules="rules.roughWeight">
-                  <el-input-number v-model="item.roughWeight" :precision="2" :controls="false" :min="0" placeholder="请输入" onmousewheel="return false;" />
+                <el-form-item
+                  label="毛重(kg)"
+                  :prop="'packDetailList.' + index + '.roughWeight'"
+                  :rules="rules.roughWeight"
+                >
+                  <el-input-number
+                    v-model="item.roughWeight"
+                    :precision="2"
+                    :controls="false"
+                    :min="0"
+                    placeholder="请输入"
+                    onmousewheel="return false;"
+                  />
                 </el-form-item>
               </el-col>
               <el-col :span="9">
@@ -166,38 +266,53 @@
                   <el-form-item label="尺寸(cm³)" required>
                     <el-col :span="1"></el-col>
                     <el-col :span="7">
-                      <el-form-item label="" :prop="'packDetailList.' + index + '.boxLong'" :rules="rules.boxLong">
+                      <el-form-item
+                        label=""
+                        :prop="'packDetailList.' + index + '.boxLong'"
+                        :rules="rules.boxLong"
+                      >
                         <el-input-number
                           v-model="item.boxLong"
                           placeholder="长"
                           :precision="2"
                           :controls="false"
                           :min="0"
-                          onmousewheel="return false;"></el-input-number>
+                          onmousewheel="return false;"
+                        ></el-input-number>
                       </el-form-item>
                     </el-col>
                     <el-col :span="1" style="text-align: center"> * </el-col>
                     <el-col :span="7">
-                      <el-form-item label="" :prop="'packDetailList.' + index + '.boxWide'" :rules="rules.boxWide">
+                      <el-form-item
+                        label=""
+                        :prop="'packDetailList.' + index + '.boxWide'"
+                        :rules="rules.boxWide"
+                      >
                         <el-input-number
                           v-model="item.boxWide"
                           placeholder="宽"
                           :precision="2"
                           :controls="false"
                           :min="0"
-                          onmousewheel="return false;"></el-input-number>
+                          onmousewheel="return false;"
+                        ></el-input-number>
                       </el-form-item>
                     </el-col>
                     <el-col :span="1" style="text-align: center"> * </el-col>
                     <el-col :span="7">
-                      <el-form-item label="" :prop="'packDetailList.' + index + '.boxHigh'" :rules="rules.boxHigh">
+                      <el-form-item
+                        label=""
+                        :prop="'packDetailList.' + index + '.boxHigh'"
+                        :rules="rules.boxHigh"
+                      >
                         <el-input-number
                           v-model="item.boxHigh"
                           placeholder="高"
                           :precision="2"
                           :controls="false"
                           :min="0"
-                          onmousewheel="return false;"></el-input-number>
+                          onmousewheel="return false;"
+                        ></el-input-number>
                       </el-form-item>
                     </el-col>
                   </el-form-item>
@@ -207,34 +322,72 @@
             <div class="line"></div>
             <el-form-item label="关联合同产品">
               <div class="flex-box">
-                <div class="item" v-for="(product, j) in item.packDetailProductList" :key="j">
+                <div
+                  class="item"
+                  v-for="(product, j) in item.packDetailProductList"
+                  :key="j"
+                >
                   <div>合同编码:{{ product.contractCode }}</div>
                   <div>产品名称:{{ product.productName }}</div>
                   <div>每箱数量:{{ product.quantity }}</div>
                 </div>
               </div>
             </el-form-item>
-            <div class="bottom-arrow" v-show="!item.isShow" @click="item.isShow = !item.isShow">
+            <div
+              class="bottom-arrow"
+              v-show="!item.isShow"
+              @click="item.isShow = !item.isShow"
+            >
               <span style="margin-right: 5px"> 自定义装箱明细</span>
               <el-icon><ArrowDownBold /></el-icon>
             </div>
-            <div class="bottom-arrow" v-show="item.isShow" @click="item.isShow = !item.isShow">
+            <div
+              class="bottom-arrow"
+              v-show="item.isShow"
+              @click="item.isShow = !item.isShow"
+            >
               <span style="margin-right: 5px"> 收起</span>
               <el-icon><ArrowUpBold /></el-icon>
             </div>
             <el-form-item prop="packDetailGoodsList" v-show="item.isShow">
-              <el-button type="primary" style="margin-bottom: 10px" @click="handleCustomPush(index)"> 添加行 </el-button>
+              <el-button
+                type="primary"
+                style="margin-bottom: 10px"
+                @click="handleCustomPush(index)"
+              >
+                添加行
+              </el-button>
               <el-table :data="item.packDetailGoodsList">
                 <el-table-column label="货物描述">
                   <template #default="{ row, $index }">
-                    <el-form-item :prop="['packDetailList', index, 'packDetailGoodsList', $index, 'remark']" :rules="rules.remark" :inline-message="true">
+                    <el-form-item
+                      :prop="[
+                        'packDetailList',
+                        index,
+                        'packDetailGoodsList',
+                        $index,
+                        'remark',
+                      ]"
+                      :rules="rules.remark"
+                      :inline-message="true"
+                    >
                       <el-input v-model="row.remark" placeholder="请输入" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column label="单位" width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item :prop="['packDetailList', index, 'packDetailGoodsList', $index, 'unit']" :rules="rules.unit" :inline-message="true">
+                    <el-form-item
+                      :prop="[
+                        'packDetailList',
+                        index,
+                        'packDetailGoodsList',
+                        $index,
+                        'unit',
+                      ]"
+                      :rules="rules.unit"
+                      :inline-message="true"
+                    >
                       <el-input v-model="row.unit" placeholder="请输入" />
                     </el-form-item>
                   </template>
@@ -242,16 +395,34 @@
                 <el-table-column label="数量" width="150">
                   <template #default="{ row, $index }">
                     <el-form-item
-                      :prop="['packDetailList', index, 'packDetailGoodsList', $index, 'quantity']"
+                      :prop="[
+                        'packDetailList',
+                        index,
+                        'packDetailGoodsList',
+                        $index,
+                        'quantity',
+                      ]"
                       :rules="rules.quantityOne"
-                      :inline-message="true">
-                      <el-input-number v-model="row.quantity" :precision="4" :controls="false" :min="0" onmousewheel="return false;" />
+                      :inline-message="true"
+                    >
+                      <el-input-number
+                        v-model="row.quantity"
+                        :precision="4"
+                        :controls="false"
+                        :min="0"
+                        onmousewheel="return false;"
+                      />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button type="primary" link @click="handleCustomRemove(index, $index)">删除</el-button>
+                    <el-button
+                      type="primary"
+                      link
+                      @click="handleCustomRemove(index, $index)"
+                      >删除</el-button
+                    >
                   </template>
                 </el-table-column>
               </el-table>
@@ -261,25 +432,72 @@
       </el-form>
       <template #footer>
         <el-button @click="handleClose" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button
+          type="primary"
+          @click="submitForm()"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog title="合并出货" v-model="dialogVisibleOne" width="400" v-loading="loadingOne">
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.dataOne" :rules="rules" ref="byform"> </byForm>
+    <el-dialog
+      title="合并出货"
+      v-model="dialogVisibleOne"
+      width="400"
+      v-loading="loadingOne"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.dataOne"
+        :rules="rules"
+        ref="byform"
+      >
+      </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitFormOne()" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button @click="dialogVisibleOne = false" size="large"
+          >取 消</el-button
+        >
+        <el-button
+          type="primary"
+          @click="submitFormOne()"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog title="出货通知单" v-if="openPack" v-model="openPack" width="860">
-      <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
-        <div style="font-size: 24px; text-align: center; margin-bottom: 16px">出货通知单</div>
+    <el-dialog
+      title="出货通知单"
+      v-if="openPack"
+      v-model="openPack"
+      width="860"
+    >
+      <div
+        id="pdfDom"
+        style="width: 800px; padding: 16px; font-size: 12px !important"
+      >
+        <div style="font-size: 24px; text-align: center; margin-bottom: 16px">
+          出货通知单
+        </div>
         <div style="border: 1px solid black">
           <div style="display: flex; width: 100%">
-            <div style="width: 50%; border-right: 1px solid black; padding-left: 4px">
-              <div style="padding: 8px 0; width: 100%" v-html="getStyle(packDetail.remark)"></div>
+            <div
+              style="
+                width: 50%;
+                border-right: 1px solid black;
+                padding-left: 4px;
+              "
+            >
+              <div
+                style="padding: 8px 0; width: 100%"
+                v-html="getStyle(packDetail.remark)"
+              ></div>
             </div>
             <div style="width: 50%; padding-left: 4px">
               <div style="font-weight: 700">总箱数</div>
@@ -289,15 +507,23 @@
               <div style="font-weight: 700">总净重(KG)</div>
               <div>{{ packDetail.netWeight }}</div>
               <div style="font-weight: 700">总体积(m³)</div>
-              <div>{{ packDetail.volume }}</div>
+              <div>{{ (packDetail.volume / 1000000).toFixed(4) }}</div>
             </div>
           </div>
         </div>
         <div style="height: 16px"></div>
         <div>
-          <div style="font-weight: 700; padding: 4px 0">THE PACK FOR ABOVE CARGO AS BELOWING SHOWS:</div>
+          <div style="font-weight: 700; padding: 4px 0">
+            THE PACK FOR ABOVE CARGO AS BELOWING SHOWS:
+          </div>
         </div>
-        <table class="three" cellspacing="0" cellpadding="0" border="0" style="width: 100%; border-bottom: 0">
+        <table
+          class="three"
+          cellspacing="0"
+          cellpadding="0"
+          border="0"
+          style="width: 100%; border-bottom: 0"
+        >
           <thead>
             <th style="text-align: center; width: 10%">货物描述</th>
             <th style="text-align: center; width: 10%">订单编号</th>
@@ -310,14 +536,34 @@
             <th style="text-align: center; width: 10%">总毛重(KG)</th>
             <th style="text-align: center; width: 10%">总体积(m³)</th>
           </thead>
-          <tbody v-if="packDetail.packDetailList && packDetail.packDetailList.length > 0">
+          <tbody
+            v-if="
+              packDetail.packDetailList && packDetail.packDetailList.length > 0
+            "
+          >
             <template v-for="(item, index) in packDetail.packDetailList">
-              <tr v-for="(row, indexTwo) in item.packDetailProductLists" :key="indexTwo">
-                <td style="text-align: center; width: 10%">{{ row.productName }}</td>
-                <td style="text-align: center; width: 10%">{{ row.contractCode }}</td>
-                <td style="text-align: center; width: 10%">{{ row.supplierName }}</td>
+              <tr
+                v-for="(row, indexTwo) in item.packDetailProductLists"
+                :key="indexTwo"
+              >
+                <td style="text-align: center; width: 10%">
+                  {{ row.productName }}
+                </td>
+                <td style="text-align: center; width: 10%">
+                  {{ row.contractCode }}
+                </td>
+                <td style="text-align: center; width: 10%">
+                  {{ row.supplierName }}
+                </td>
                 <td style="text-align: center; width: 10%; padding: 2px">
-                  <div style="display: flex; align-items: center; justify-content: center" v-if="row.productImgUrl">
+                  <div
+                    style="
+                      display: flex;
+                      align-items: center;
+                      justify-content: center;
+                    "
+                    v-if="row.productImgUrl"
+                  >
                     <img
                       :src="row.productImgUrl"
                       style="
@@ -330,15 +576,48 @@
                         background: #fff;
                       "
                       alt=""
-                      fit="scale-down" />
+                      fit="scale-down"
+                    />
                   </div>
                 </td>
-                <td style="text-align: center; width: 10%">{{ row.quantity }}</td>
-                <td style="text-align: center; width: 10%" v-if="indexTwo === 0" :rowspan="item.packDetailProductLists.length">{{ item.packQuantity }}</td>
-                <td style="text-align: center; width: 10%" v-if="indexTwo === 0" :rowspan="item.packDetailProductLists.length">{{ computeQuantity(item) }}</td>
-                <td style="text-align: center; width: 10%" v-if="indexTwo === 0" :rowspan="item.packDetailProductLists.length">{{ item.netWeight }}</td>
-                <td style="text-align: center; width: 10%" v-if="indexTwo === 0" :rowspan="item.packDetailProductLists.length">{{ item.roughWeight }}</td>
-                <td style="text-align: center; width: 10%" v-if="indexTwo === 0" :rowspan="item.packDetailProductLists.length">{{ item.bomVolume }}</td>
+                <td style="text-align: center; width: 10%">
+                  {{ row.quantity }}
+                </td>
+                <td
+                  style="text-align: center; width: 10%"
+                  v-if="indexTwo === 0"
+                  :rowspan="item.packDetailProductLists.length"
+                >
+                  {{ item.packQuantity }}
+                </td>
+                <td
+                  style="text-align: center; width: 10%"
+                  v-if="indexTwo === 0"
+                  :rowspan="item.packDetailProductLists.length"
+                >
+                  {{ computeQuantity(item) }}
+                </td>
+                <td
+                  style="text-align: center; width: 10%"
+                  v-if="indexTwo === 0"
+                  :rowspan="item.packDetailProductLists.length"
+                >
+                  {{ item.netWeight }}
+                </td>
+                <td
+                  style="text-align: center; width: 10%"
+                  v-if="indexTwo === 0"
+                  :rowspan="item.packDetailProductLists.length"
+                >
+                  {{ item.roughWeight }}
+                </td>
+                <td
+                  style="text-align: center; width: 10%"
+                  v-if="indexTwo === 0"
+                  :rowspan="item.packDetailProductLists.length"
+                >
+                  {{ (item.bomVolume / 1000000).toFixed(4) }}
+                </td>
               </tr>
             </template>
           </tbody>
@@ -346,8 +625,12 @@
       </div>
       <template #footer>
         <el-button @click="openPack = false" size="large">取 消</el-button>
-        <el-button type="primary" v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
+        <el-button type="primary" v-print="printObj" size="large"
+          >打印</el-button
+        >
+        <el-button type="primary" @click="clickDownload()" size="large"
+          >下载PDF</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -574,11 +857,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久作废该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久作废该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 // 删除
                 proxy
                   .post("/pack/delete", {
@@ -786,7 +1073,9 @@ const handleClickPacking = () => {
       index: x.index,
     }));
     const customerId = formData.data.customerId ? formData.data.customerId : "";
-    const contractIds = formData.data.contractIds ? formData.data.contractIds.join(",") : "";
+    const contractIds = formData.data.contractIds
+      ? formData.data.contractIds.join(",")
+      : "";
     let item = {
       customerId: customerId,
       contractIds: contractIds,
@@ -803,7 +1092,10 @@ const handleClickPacking = () => {
       isShow: false,
     };
     formData.data.packDetailList.push(item);
-    handleChangePackQuantity(item.packQuantity, formData.data.packDetailList.length - 1);
+    handleChangePackQuantity(
+      item.packQuantity,
+      formData.data.packDetailList.length - 1
+    );
     tableDom.value.clearSelection();
     selectProductData.value = [];
     table.value.clearSelection();
@@ -820,14 +1112,16 @@ const handleChangePackQuantity = (val, index) => {
     const e = formData.data.contractProductData[i];
     e.index = i;
     // 唯一:合同id+产品id+产品索引
-    obj[e.contractId + "_" + e.productId + "_" + i] = Number(e.cpQuantity) - Number(e.sumPackQuantity);
+    obj[e.contractId + "_" + e.productId + "_" + i] =
+      Number(e.cpQuantity) - Number(e.sumPackQuantity);
   }
   // 计算数量 即装箱数量 * 箱数 新增字段放在最外层
   for (let i = 0; i < formData.data.packDetailList.length; i++) {
     const ele = formData.data.packDetailList[i];
     for (let j = 0; j < ele.packDetailProductList.length; j++) {
       const jele = ele.packDetailProductList[j];
-      ele[jele.contractId + "_" + jele.productId + "_" + jele.index] = Number(ele.packQuantity) * jele.quantity;
+      ele[jele.contractId + "_" + jele.productId + "_" + jele.index] =
+        Number(ele.packQuantity) * jele.quantity;
     }
   }
   // 计算新的待装箱数量
@@ -881,21 +1175,27 @@ const getSelectData = () => {
 };
 const contractData = ref([]);
 const handleChangeCustomer = (val) => {
-  proxy.get(`/contract/getNoPackContractByCustomerId?customerId=${val}`).then((res) => {
-    contractData.value = res.data;
-    formData.data.contractIds = [];
-  });
+  proxy
+    .get(`/contract/getNoPackContractByCustomerId?customerId=${val}`)
+    .then((res) => {
+      contractData.value = res.data;
+      formData.data.contractIds = [];
+    });
 };
 const handleChangeContract = (val) => {
   const customerId = formData.data.customerId ? formData.data.customerId : "";
-  proxy.get(`/contractProduct/getNoPackContractProductById?customerId=${customerId}&contractIds=${val}`).then((res) => {
-    formData.data.contractProductData = res.data.map((x) => ({
-      ...x,
-      waitQuantity: Number(x.cpQuantity) - Number(x.sumPackQuantity),
-      quantity: null,
-    }));
-    handleChangePackQuantity();
-  });
+  proxy
+    .get(
+      `/contractProduct/getNoPackContractProductById?customerId=${customerId}&contractIds=${val}`
+    )
+    .then((res) => {
+      formData.data.contractProductData = res.data.map((x) => ({
+        ...x,
+        waitQuantity: Number(x.cpQuantity) - Number(x.sumPackQuantity),
+        quantity: null,
+      }));
+      handleChangePackQuantity();
+    });
 };
 const getData = (data, type) => {
   if (!data) return [];
@@ -925,22 +1225,41 @@ const packDetail = ref({
 const openPack = ref(false);
 const clickShippingNotice = (row) => {
   openPack.value = true;
-  proxy.post("/pack/shipmentNotification", { id: row.packId }).then(async (res) => {
-    packDetail.value = res;
-    if (packDetail.value.packDetailList && packDetail.value.packDetailList.length > 0) {
-      for (let i = 0; i < packDetail.value.packDetailList.length; i++) {
-        if (packDetail.value.packDetailList[i].packDetailProductLists && packDetail.value.packDetailList[i].packDetailProductLists.length > 0) {
-          for (let j = 0; j < packDetail.value.packDetailList[i].packDetailProductLists.length; j++) {
-            if (packDetail.value.packDetailList[i].packDetailProductLists[j].productImgUrl) {
-              packDetail.value.packDetailList[i].packDetailProductLists[j].productImgUrl = await proxy.getImgBase64(
-                packDetail.value.packDetailList[i].packDetailProductLists[j].productImgUrl
-              );
+  proxy
+    .post("/pack/shipmentNotification", { id: row.packId })
+    .then(async (res) => {
+      packDetail.value = res;
+      if (
+        packDetail.value.packDetailList &&
+        packDetail.value.packDetailList.length > 0
+      ) {
+        for (let i = 0; i < packDetail.value.packDetailList.length; i++) {
+          if (
+            packDetail.value.packDetailList[i].packDetailProductLists &&
+            packDetail.value.packDetailList[i].packDetailProductLists.length > 0
+          ) {
+            for (
+              let j = 0;
+              j <
+              packDetail.value.packDetailList[i].packDetailProductLists.length;
+              j++
+            ) {
+              if (
+                packDetail.value.packDetailList[i].packDetailProductLists[j]
+                  .productImgUrl
+              ) {
+                packDetail.value.packDetailList[i].packDetailProductLists[
+                  j
+                ].productImgUrl = await proxy.getImgBase64(
+                  packDetail.value.packDetailList[i].packDetailProductLists[j]
+                    .productImgUrl
+                );
+              }
             }
           }
         }
       }
-    }
-  });
+    });
 };
 const clickDownload = () => {
   proxy.getPdf("出货通知单PDF文件");
@@ -955,7 +1274,8 @@ const getStyle = (text) => {
 const printObj = ref({
   id: "pdfDom",
   popTitle: "",
-  extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
   extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
 });
 const openFile = (path) => {
@@ -966,7 +1286,11 @@ const computeQuantity = (item) => {
   if (item.packDetailProductLists && item.packDetailProductLists.length > 0) {
     for (let i = 0; i < item.packDetailProductLists.length; i++) {
       if (item.packQuantity && item.packDetailProductLists[i].quantity) {
-        num = Number(Math.round(num + item.packQuantity * item.packDetailProductLists[i].quantity));
+        num = Number(
+          Math.round(
+            num + item.packQuantity * item.packDetailProductLists[i].quantity
+          )
+        );
       }
     }
   }