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