|
@@ -25,24 +25,17 @@
|
|
|
action: () => openModal(),
|
|
|
},
|
|
|
]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ @get-list="getList">
|
|
|
<template #code="{ item }">
|
|
|
<div>
|
|
|
- <div
|
|
|
- v-for="(item, index) in getData(item.codeAPName, 'code')"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <div v-for="(item, index) in getData(item.codeAPName, 'code')" :key="index">
|
|
|
{{ item }}
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #productName="{ item }">
|
|
|
<div>
|
|
|
- <div
|
|
|
- v-for="(item, index) in getData(item.codeAPName, 'productName')"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
+ <div v-for="(item, index) in getData(item.codeAPName, 'productName')" :key="index">
|
|
|
{{ item }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -91,107 +84,49 @@
|
|
|
</template>
|
|
|
</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="80%" 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="产品名称" />
|
|
|
- <el-table-column prop="cpQuantity" label="合同数量" />
|
|
|
- <el-table-column prop="waitQuantity" label="待装箱数量" />
|
|
|
- <el-table-column prop="quantity" label="装箱数量" min-width="150">
|
|
|
+ <el-table-column prop="contractCode" label="合同编码" width="160" />
|
|
|
+ <el-table-column prop="productName" label="产品名称" min-width="180" />
|
|
|
+ <el-table-column prop="productSpec" label="规格型号" min-width="140" />
|
|
|
+ <el-table-column prop="cpQuantity" label="合同数量" width="140" />
|
|
|
+ <el-table-column prop="waitQuantity" label="待装箱数量" width="140" />
|
|
|
+ <el-table-column prop="quantity" label="装箱数量" width="160">
|
|
|
<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 ref="">箱规</div>
|
|
|
+ <div class="box" v-for="(item, index) in formData.data.packDetailList" :key="index">
|
|
|
+ <div ref="" style="position: relative">
|
|
|
+ <span>箱规</span>
|
|
|
+ <el-button type="primary" style="position: absolute; right: 0px; top: 0px" @click="clickDelete(index)" text>删除</el-button>
|
|
|
+ </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"
|
|
@@ -199,41 +134,18 @@
|
|
|
: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">
|
|
@@ -241,53 +153,38 @@
|
|
|
<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>
|
|
@@ -297,72 +194,34 @@
|
|
|
<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>
|
|
@@ -370,34 +229,16 @@
|
|
|
<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>
|
|
@@ -407,47 +248,19 @@
|
|
|
</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>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<script setup>
|
|
|
/* eslint-disable vue/no-unused-components */
|
|
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
@@ -656,15 +469,11 @@ const config = computed(() => {
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- ElMessageBox.confirm(
|
|
|
- "此操作将永久作废该数据, 是否继续?",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }
|
|
|
- ).then(() => {
|
|
|
+ ElMessageBox.confirm("此操作将永久作废该数据, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
// 删除
|
|
|
proxy
|
|
|
.post("/pack/delete", {
|
|
@@ -876,9 +685,7 @@ const handleClickPacking = () => {
|
|
|
productName: x.productName,
|
|
|
}));
|
|
|
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,
|
|
@@ -895,10 +702,7 @@ 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();
|
|
@@ -914,18 +718,14 @@ const handleChangePackQuantity = (val, index) => {
|
|
|
const obj = {};
|
|
|
for (let i = 0; i < formData.data.contractProductData.length; i++) {
|
|
|
const e = formData.data.contractProductData[i];
|
|
|
- obj[e.contractId + "_" + e.productId + ""] = (
|
|
|
- Number(e.cpQuantity) - Number(e.sumPackQuantity)
|
|
|
- ).toFixed(2);
|
|
|
+ obj[e.contractId + "_" + e.productId + ""] = (Number(e.cpQuantity) - Number(e.sumPackQuantity)).toFixed(2);
|
|
|
}
|
|
|
// 计算数量 即装箱数量 * 箱数 新增字段放在最外层
|
|
|
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 + ""] = (
|
|
|
- Number(ele.packQuantity) * jele.quantity
|
|
|
- ).toFixed(2);
|
|
|
+ ele[jele.contractId + "_" + jele.productId + ""] = (Number(ele.packQuantity) * jele.quantity).toFixed(2);
|
|
|
}
|
|
|
}
|
|
|
// 计算新的待装箱数量
|
|
@@ -982,29 +782,21 @@ 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)
|
|
|
- ).toFixed(2),
|
|
|
- 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)).toFixed(2),
|
|
|
+ quantity: null,
|
|
|
+ }));
|
|
|
+ handleChangePackQuantity();
|
|
|
+ });
|
|
|
};
|
|
|
|
|
|
const getData = (data, type) => {
|
|
@@ -1031,8 +823,12 @@ const handleClose = () => {
|
|
|
};
|
|
|
getSelectData();
|
|
|
getList();
|
|
|
+const clickDelete = (index) => {
|
|
|
+ formData.data.packDetailList.splice(index, 1);
|
|
|
+ handleChangePackQuantity();
|
|
|
+};
|
|
|
</script>
|
|
|
-
|
|
|
+
|
|
|
<style lang="scss" scoped>
|
|
|
.tenant {
|
|
|
padding: 20px;
|
|
@@ -1051,6 +847,7 @@ getList();
|
|
|
background: #fde6c8;
|
|
|
border: 1px solid #7fb5e3;
|
|
|
margin-bottom: 10px;
|
|
|
+ width: 100%;
|
|
|
.flex-box {
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
@@ -1075,4 +872,4 @@ getList();
|
|
|
color: #0084ff;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|