|
@@ -217,18 +217,18 @@
|
|
|
</template>
|
|
|
<div style="width:100%">
|
|
|
<div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'主材'"></TitleInfo>
|
|
|
+ <TitleInfo :content="'基本信息'"></TitleInfo>
|
|
|
</div>
|
|
|
<div style="width: 100%;padding-left:15px">
|
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
+ <!-- <el-col :span="12">
|
|
|
<el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId" :inline-message="true"
|
|
|
label="原材料" class="wid100">
|
|
|
<el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%" filterable>
|
|
|
<el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="颜色" class="margin-b-0 wid100">
|
|
|
<el-row style="width: 100%">
|
|
@@ -245,10 +245,8 @@
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="尺寸" class="margin-b-0 wid100" required>
|
|
|
+ <el-form-item label="尺寸" required>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
|
|
@@ -274,6 +272,8 @@
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="净重(kg)" prop="netWeight" class="margin-b-0 wid100">
|
|
|
<el-input-number v-model="product.netWeight" placeholder="请输入" style="width: 100%" :precision="2" :controls="false"
|
|
@@ -285,10 +285,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'辅材'"></TitleInfo>
|
|
|
+ <TitleInfo :content="'BOM'"></TitleInfo>
|
|
|
</div>
|
|
|
<div style="width: 100%;padding-left:15px">
|
|
|
- <el-button type="primary" @click="handleClickSelectMaterial(index)" plain>选择包材/配件/辅材</el-button>
|
|
|
+ <!-- <el-button type="primary" @click="handleClickSelectMaterial(index)" plain>选择包材/配件/辅材</el-button>
|
|
|
<el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column prop="materialName" label="物料名称" />
|
|
|
<el-table-column prop="materialCode" label="物料编码" />
|
|
@@ -308,6 +308,70 @@
|
|
|
<el-button type="primary" link @click="handleRemoveBom(index,$index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ </el-table> -->
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" @click="openDialog(index,1)" plain>主材</el-button>
|
|
|
+ <el-button type="primary" @click="openDialog(index,2)" plain>工艺</el-button>
|
|
|
+ <el-button type="primary" @click="openDialog(index,3)" plain>辅材</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
+ <el-table-column prop="materialName" label="物料名称" width="170" />
|
|
|
+ <el-table-column prop="materialCode" label="物料编码" width="190" />
|
|
|
+ <el-table-column label="规格尺寸 (cm)" width="140">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%" v-if="row.materialLength&&row.materialWidth && row.materialHeight">
|
|
|
+ {{row.materialLength}}*{{row.materialWidth}}*{{row.materialHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialColor" label="颜色" width="170" />
|
|
|
+ <el-table-column label="数量" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.quantity'"
|
|
|
+ :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%"
|
|
|
+ :precision="0" :controls="false" :min="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="标准用量" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.standardDosage'"
|
|
|
+ :rules="rules.standardDosage" :inline-message="true" class="margin-b-0 wid100">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.standardDosage" placeholder="请输入" style="width: 100%"
|
|
|
+ :precision="0" :controls="false" :min="1" />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="损耗率(%)" width="150">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.lossRate'"
|
|
|
+ :rules="rules.lossRate" :inline-message="true" class="margin-b-0 wid100">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.lossRate" placeholder="请输入" style="width: 100%"
|
|
|
+ :precision="2" :controls="false" :min="0" :max="100" />
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" min-width="200">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item class="margin-b-0 wid100">
|
|
|
+ <el-input v-model="row.remark" placeholder="请输入"> </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="60" align="center" fixed="right">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <el-button type="primary" link @click="handleRemoveBom(index,$index)" v-if="row.type !=3">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -316,7 +380,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="width:100%;padding-left:15px">
|
|
|
- <div class="small-title">
|
|
|
+ <!-- <div class="small-title">
|
|
|
① 工艺线路
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
@@ -328,9 +392,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
<div class="small-title">
|
|
|
- ② LOGO
|
|
|
+ ① LOGO
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -368,7 +432,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ③ 折叠
|
|
|
+ ② 折叠
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -389,7 +453,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ④ 包装要求
|
|
|
+ ③ 包装要求
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -401,7 +465,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ⑤ 是否定制
|
|
|
+ ④ 是否定制
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -587,18 +651,18 @@
|
|
|
<el-form disabled label-width="100px">
|
|
|
<div style="width:100%">
|
|
|
<div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'主材'"></TitleInfo>
|
|
|
+ <TitleInfo :content="'基本信息'"></TitleInfo>
|
|
|
</div>
|
|
|
<div style="width: 100%;padding-left:15px">
|
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
+ <!-- <el-col :span="12">
|
|
|
<el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId"
|
|
|
:inline-message="true" label="原材料" class="wid100">
|
|
|
<el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%">
|
|
|
<el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="颜色" class="margin-b-0 wid100">
|
|
|
<el-row style="width: 100%">
|
|
@@ -615,10 +679,8 @@
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="尺寸" class="margin-b-0 wid100" required>
|
|
|
+ <el-form-item label="尺寸" required>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
|
|
@@ -644,6 +706,9 @@
|
|
|
</el-row>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="净重(kg)" prop="netWeight" class="margin-b-0 wid100">
|
|
|
<el-input-number v-model="product.netWeight" placeholder="请输入" style="width: 100%" :precision="2" :controls="false"
|
|
@@ -655,23 +720,24 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'辅材'"></TitleInfo>
|
|
|
+ <TitleInfo :content="'BOM'"></TitleInfo>
|
|
|
</div>
|
|
|
<div style="width: 100%;padding-left:15px">
|
|
|
<el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
- <el-table-column prop="productName" label="物料名称" />
|
|
|
- <el-table-column prop="productCode" label="物料编码" />
|
|
|
- <el-table-column label="数量" width="150">
|
|
|
+ <el-table-column prop="productName" label="物料名称" width="170" />
|
|
|
+ <el-table-column prop="productCode" label="物料编码" width="180" />
|
|
|
+ <el-table-column label="规格尺寸(cm)" width="130">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.quantity'"
|
|
|
- :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
|
|
|
- <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder=" " style="width: 100%"
|
|
|
- :precision="0" :controls="false" :min="1" />
|
|
|
- </el-form-item>
|
|
|
+ <div style="width: 100%" v-if="row.productLength&&row.productWidth && row.productHeight">
|
|
|
+ {{row.productLength}}*{{row.productWidth}}*{{row.productHeight}}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="productColor" label="颜色" width="170" />
|
|
|
+ <el-table-column prop="quantity" label="数量" width="100" />
|
|
|
+ <el-table-column prop="standardDosage" label="标准用量" width="100" />
|
|
|
+ <el-table-column prop="lossRate" label="损耗率(%)" width="100" />
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="150" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -680,7 +746,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="width:100%;padding-left:15px">
|
|
|
- <div class="small-title">
|
|
|
+ <!-- <div class="small-title">
|
|
|
① 工艺线路
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
@@ -692,9 +758,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
<div class="small-title">
|
|
|
- ② LOGO
|
|
|
+ ① LOGO
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -732,7 +798,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ③ 折叠
|
|
|
+ ② 折叠
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -753,7 +819,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ④ 包装要求
|
|
|
+ ③ 包装要求
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -765,7 +831,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ⑤ 是否定制
|
|
|
+ ④ 是否定制
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -887,38 +953,20 @@
|
|
|
<el-form disabled label-width="100px">
|
|
|
<div style="width:100%">
|
|
|
<div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'主材'"></TitleInfo>
|
|
|
+ <TitleInfo :content="'基本信息'"></TitleInfo>
|
|
|
</div>
|
|
|
<div style="width: 100%;padding-left:15px">
|
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
+ <!-- <el-col :span="12">
|
|
|
<el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId"
|
|
|
:inline-message="true" label="原材料" class="wid100">
|
|
|
<el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%">
|
|
|
<el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="颜色" class="margin-b-0 wid100">
|
|
|
- <el-row style="width: 100%">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item prop="productColor" label-width="0px" class="margin-b-0 wid100">
|
|
|
- <el-input v-model="product.productColor" placeholder="颜色" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item prop="colorCardCode" label-width="0px" class="margin-b-0 wid100">
|
|
|
- <el-input v-model="product.colorCardCode" placeholder="色卡号" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="尺寸" class="margin-b-0 wid100" required>
|
|
|
+ <el-form-item label="尺寸" required>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
|
|
@@ -945,6 +993,25 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
+ <el-form-item label="颜色" class="margin-b-0 wid100">
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item prop="productColor" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-input v-model="product.productColor" placeholder="颜色" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item prop="colorCardCode" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-input v-model="product.colorCardCode" placeholder="色卡号" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
<el-form-item label="净重(kg)" prop="netWeight" class="margin-b-0 wid100">
|
|
|
<el-input-number v-model="product.netWeight" placeholder="请输入" style="width: 100%" :precision="2" :controls="false"
|
|
|
:min="0" onmousewheel="return false;" />
|
|
@@ -955,10 +1022,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'辅材'"></TitleInfo>
|
|
|
+ <TitleInfo :content="'BOM'"></TitleInfo>
|
|
|
</div>
|
|
|
<div style="width: 100%;padding-left:15px">
|
|
|
- <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
+ <!-- <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column prop="productName" label="物料名称" />
|
|
|
<el-table-column prop="productCode" label="物料编码" />
|
|
|
<el-table-column label="数量" width="150">
|
|
@@ -972,6 +1039,22 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ </el-table> -->
|
|
|
+ <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
+ <el-table-column prop="productName" label="物料名称" width="170" />
|
|
|
+ <el-table-column prop="productCode" label="物料编码" width="180" />
|
|
|
+ <el-table-column label="规格尺寸(cm)" width="130">
|
|
|
+ <template #default="{ row, $index }">
|
|
|
+ <div style="width: 100%" v-if="row.productLength&&row.productWidth && row.productHeight">
|
|
|
+ {{row.productLength}}*{{row.productWidth}}*{{row.productHeight}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="productColor" label="颜色" width="170" />
|
|
|
+ <el-table-column prop="quantity" label="数量" width="100" />
|
|
|
+ <el-table-column prop="standardDosage" label="标准用量" width="100" />
|
|
|
+ <el-table-column prop="lossRate" label="损耗率(%)" width="100" />
|
|
|
+ <el-table-column prop="remark" label="备注" min-width="150" />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
@@ -980,7 +1063,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div style="width:100%;padding-left:15px">
|
|
|
- <div class="small-title">
|
|
|
+ <!-- <div class="small-title">
|
|
|
① 工艺线路
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
@@ -992,9 +1075,9 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
<div class="small-title">
|
|
|
- ② LOGO
|
|
|
+ ① LOGO
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -1032,7 +1115,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ③ 折叠
|
|
|
+ ② 折叠
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -1053,7 +1136,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ④ 包装要求
|
|
|
+ ③ 包装要求
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -1065,7 +1148,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="small-title">
|
|
|
- ⑤ 是否定制
|
|
|
+ ④ 是否定制
|
|
|
</div>
|
|
|
<el-row style="width:100%">
|
|
|
<el-col :span="12">
|
|
@@ -1128,6 +1211,20 @@
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
+ <el-dialog :title="'原材料选择'" v-model="openSelectRawMaterial" width="90%" destroy-on-close>
|
|
|
+ <SelectMaterial :ancestors="100" @selectMaterial="selectRawMaterial"></SelectMaterial>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openSelectRawMaterial = false" size="defualt" v-debounce>取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog :title="'工艺选择'" v-model="openSelectTechnology" width="90%" destroy-on-close>
|
|
|
+ <SelectTechnology :isSelect="true" @selectTechnology="selectTechnology"></SelectTechnology>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openSelectTechnology = false" size="defualt" v-debounce>取 消</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-dialog :title="'物料选择'" v-model="openSelectMaterial" width="90%" destroy-on-close>
|
|
|
<SelectMaterial :isNeRawMaterial="'1'" @selectMaterial="selectMaterial"></SelectMaterial>
|
|
|
<template #footer>
|
|
@@ -1175,6 +1272,7 @@ import SelectProduct from "@/components/product/SelectProduct.vue";
|
|
|
import SelectMaterial from "@/components/product/SelectMaterial.vue";
|
|
|
import * as echarts from "echarts";
|
|
|
import PriceSheetDetailList from "@/views/EHSD/saleContract/PriceSheetDetailList";
|
|
|
+import SelectTechnology from "@/views/production/project/technology/index.vue";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const uploadData = ref({});
|
|
@@ -1821,6 +1919,10 @@ const rules = ref({
|
|
|
{ required: true, message: "请选择客户公司", trigger: "change" },
|
|
|
],
|
|
|
quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
|
|
|
+ standardDosage: [
|
|
|
+ { required: true, message: "请输入标准用量", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ lossRate: [{ required: true, message: "请输入损耗率", trigger: "blur" }],
|
|
|
productLength: [
|
|
|
{ required: true, message: "请输入长 (cm)", trigger: "blur" },
|
|
|
],
|
|
@@ -2002,9 +2104,10 @@ const selectProduct = (row) => {
|
|
|
foldWay: goods.foldWay,
|
|
|
packAsk: packAsk,
|
|
|
isCustomized: goods.isCustomized || 0,
|
|
|
- quotationProductBomList: goods.productBomDetailList.filter(
|
|
|
- (x) => x.type == 2
|
|
|
- ),
|
|
|
+ // quotationProductBomList: goods.productBomDetailList.filter(
|
|
|
+ // (x) => x.type == 2
|
|
|
+ // ),
|
|
|
+ quotationProductBomList: goods.productBomDetailList,
|
|
|
quotationProductCustomInfoList: quotationProductCustomInfoList,
|
|
|
});
|
|
|
activeNames.value.push(formData.data.quotationProductList.length - 1);
|
|
@@ -2140,37 +2243,6 @@ const handleRemoveBom = (index, sonIndex) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
-const selectMaterial = (goods) => {
|
|
|
- let flag = formData.data.quotationProductList[
|
|
|
- indexValue.value
|
|
|
- ].quotationProductBomList.some((x) => x.materialId == goods.id);
|
|
|
- if (!flag) {
|
|
|
- let fileUrl = "";
|
|
|
- if (goods.fileList && goods.fileList.length > 0) {
|
|
|
- fileUrl = goods.fileList[0].fileUrl;
|
|
|
- }
|
|
|
- formData.data.quotationProductList[
|
|
|
- indexValue.value
|
|
|
- ].quotationProductBomList.push({
|
|
|
- fileUrl: fileUrl,
|
|
|
- materialId: goods.id,
|
|
|
- materialName: goods.name,
|
|
|
- materialCode: goods.customCode,
|
|
|
- // productLength: goods["length"],
|
|
|
- // productWidth: goods.width,
|
|
|
- // productHeight: goods.height,
|
|
|
- quantity: null,
|
|
|
- price: null,
|
|
|
- amount: "",
|
|
|
- fileList: [],
|
|
|
- type: 2,
|
|
|
- });
|
|
|
- proxy.msgTip("选择成功");
|
|
|
- } else {
|
|
|
- proxy.msgTip("该物料已选择", 2);
|
|
|
- }
|
|
|
-};
|
|
|
-
|
|
|
// const selectMaterial = (goods) => {
|
|
|
// let flag = formData.data.quotationProductList[
|
|
|
// indexValue.value
|
|
@@ -2537,18 +2609,18 @@ const handleForeign = (row) => {
|
|
|
} else {
|
|
|
iele.packAsk = [];
|
|
|
}
|
|
|
- if (
|
|
|
- iele.quotationProductBomList &&
|
|
|
- iele.quotationProductBomList.length > 0
|
|
|
- ) {
|
|
|
- iele.quotationProductBomList = iele.quotationProductBomList
|
|
|
- .filter((x) => x.type == 2)
|
|
|
- .map((x) => ({
|
|
|
- ...x,
|
|
|
- materialName: x.productName,
|
|
|
- materialCode: x.productCode,
|
|
|
- }));
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // iele.quotationProductBomList &&
|
|
|
+ // iele.quotationProductBomList.length > 0
|
|
|
+ // ) {
|
|
|
+ // iele.quotationProductBomList = iele.quotationProductBomList
|
|
|
+ // .filter((x) => x.type == 2)
|
|
|
+ // .map((x) => ({
|
|
|
+ // ...x,
|
|
|
+ // materialName: x.productName,
|
|
|
+ // materialCode: x.productCode,
|
|
|
+ // }));
|
|
|
+ // }
|
|
|
if (
|
|
|
iele.quotationProductCustomInfoList &&
|
|
|
iele.quotationProductCustomInfoList.length > 0
|
|
@@ -2851,7 +2923,7 @@ const changeMinPrice = () => {
|
|
|
const isDetailData = ref(false);
|
|
|
const getConfirmDtl = (row, flag) => {
|
|
|
if (!proxy.useUserStore().roles.includes("GM")) {
|
|
|
- return;
|
|
|
+ return proxy.msgTip("您的身份不对,无法进行确认", 2);
|
|
|
}
|
|
|
isDetailData.value = flag;
|
|
|
formOptionTwo.disabled = flag;
|
|
@@ -2881,18 +2953,18 @@ const getConfirmDtl = (row, flag) => {
|
|
|
} else {
|
|
|
iele.packAsk = [];
|
|
|
}
|
|
|
- if (
|
|
|
- iele.quotationProductBomList &&
|
|
|
- iele.quotationProductBomList.length > 0
|
|
|
- ) {
|
|
|
- iele.quotationProductBomList = iele.quotationProductBomList
|
|
|
- .filter((x) => x.type == 2)
|
|
|
- .map((x) => ({
|
|
|
- ...x,
|
|
|
- materialName: x.productName,
|
|
|
- materialCode: x.productCode,
|
|
|
- }));
|
|
|
- }
|
|
|
+ // if (
|
|
|
+ // iele.quotationProductBomList &&
|
|
|
+ // iele.quotationProductBomList.length > 0
|
|
|
+ // ) {
|
|
|
+ // iele.quotationProductBomList = iele.quotationProductBomList
|
|
|
+ // .filter((x) => x.type == 2)
|
|
|
+ // .map((x) => ({
|
|
|
+ // ...x,
|
|
|
+ // materialName: x.productName,
|
|
|
+ // materialCode: x.productCode,
|
|
|
+ // }));
|
|
|
+ // }
|
|
|
if (
|
|
|
iele.quotationProductCustomInfoList &&
|
|
|
iele.quotationProductCustomInfoList.length > 0
|
|
@@ -3125,6 +3197,146 @@ const handleOfCompanyIdChange = (val) => {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+const dialogOpenType = ref(-1);
|
|
|
+const openSelectRawMaterial = ref(false);
|
|
|
+const openSelectTechnology = ref(false);
|
|
|
+const openDialog = (index, type) => {
|
|
|
+ indexValue.value = index;
|
|
|
+ dialogOpenType.value = type;
|
|
|
+ if (type == 1) {
|
|
|
+ openSelectRawMaterial.value = true;
|
|
|
+ }
|
|
|
+ if (type == 2) {
|
|
|
+ openSelectTechnology.value = true;
|
|
|
+ }
|
|
|
+ if (type == 3) {
|
|
|
+ handleClickSelectMaterial(index);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectRawMaterial = (row) => {
|
|
|
+ // formData.data.rawMaterialId = row.id;
|
|
|
+ // formData.data.rawMaterialIdLabel = row.name + "," + row.customCode;
|
|
|
+ // formData.data.rawMaterialSize = `${row["length"]}*${row.width}*${row.height}`;
|
|
|
+ // formData.data.rawMaterialColor = row.color;
|
|
|
+
|
|
|
+ // formData.data.rawMaterialList = [
|
|
|
+ // {
|
|
|
+ // rawMaterialName: row.name,
|
|
|
+ // rawMaterialCode: row.customCode,
|
|
|
+ // rawMaterialLength: row["length"],
|
|
|
+ // rawMaterialWidth: row.width,
|
|
|
+ // rawMaterialHeight: row.height,
|
|
|
+ // rawMaterialColor: row.color,
|
|
|
+ // },
|
|
|
+ // ];
|
|
|
+ // openSelectRawMaterial.value = false;
|
|
|
+ if (dialogOpenType.value == 1) {
|
|
|
+ let flag = formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.some((x) => x.materialId == row.id);
|
|
|
+ if (!flag) {
|
|
|
+ formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.unshift({
|
|
|
+ materialId: row.id,
|
|
|
+ type: 1,
|
|
|
+ materialName: row.name,
|
|
|
+ materialCode: row.customCode,
|
|
|
+ materialLength: row["length"],
|
|
|
+ materialWidth: row.width,
|
|
|
+ materialHeight: row.height,
|
|
|
+ materialColor: row.color,
|
|
|
+ quantity: null,
|
|
|
+ standardDosage: null,
|
|
|
+ lossRate: null,
|
|
|
+ remark: "",
|
|
|
+ price: null,
|
|
|
+ amount: "",
|
|
|
+ fileList: [],
|
|
|
+ });
|
|
|
+ proxy.msgTip("选择成功");
|
|
|
+ } else {
|
|
|
+ proxy.msgTip("该物料已选择", 2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectTechnology = (row) => {
|
|
|
+ if (
|
|
|
+ dialogOpenType.value == 2 &&
|
|
|
+ row.processRouteList &&
|
|
|
+ row.processRouteList.length > 0
|
|
|
+ ) {
|
|
|
+ formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList = formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.filter((x) => x.type != 3);
|
|
|
+ let index = formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.findIndex((x) => x.type == 2);
|
|
|
+ let arr = row.processRouteList.map((x) => ({
|
|
|
+ type: 3,
|
|
|
+ materialId: x.id,
|
|
|
+ materialName: x.name,
|
|
|
+ quantity: null,
|
|
|
+ standardDosage: null,
|
|
|
+ lossRate: null,
|
|
|
+ remark: "",
|
|
|
+ }));
|
|
|
+
|
|
|
+ if (index >= 0) {
|
|
|
+ formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.splice(index, 0, ...arr);
|
|
|
+ } else {
|
|
|
+ let arrLength =
|
|
|
+ formData.data.quotationProductList[indexValue.value]
|
|
|
+ .quotationProductBomList.length;
|
|
|
+ formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.splice(arrLength ? arrLength : 0, 0, ...arr);
|
|
|
+ }
|
|
|
+ openSelectTechnology.value = false;
|
|
|
+ return proxy.msgTip("选择成功", 1);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectMaterial = (goods) => {
|
|
|
+ let flag = formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.some((x) => x.materialId == goods.id);
|
|
|
+ if (!flag) {
|
|
|
+ let fileUrl = "";
|
|
|
+ if (goods.fileList && goods.fileList.length > 0) {
|
|
|
+ fileUrl = goods.fileList[0].fileUrl;
|
|
|
+ }
|
|
|
+ formData.data.quotationProductList[
|
|
|
+ indexValue.value
|
|
|
+ ].quotationProductBomList.push({
|
|
|
+ fileUrl: fileUrl,
|
|
|
+ materialId: goods.id,
|
|
|
+ materialName: goods.name,
|
|
|
+ materialCode: goods.customCode,
|
|
|
+ materialLength: goods["length"],
|
|
|
+ materialWidth: goods.width,
|
|
|
+ materialHeight: goods.height,
|
|
|
+ quantity: null,
|
|
|
+ standardDosage: null,
|
|
|
+ lossRate: null,
|
|
|
+ remark: "",
|
|
|
+ price: null,
|
|
|
+ amount: "",
|
|
|
+ fileList: [],
|
|
|
+ type: 2,
|
|
|
+ });
|
|
|
+ proxy.msgTip("选择成功");
|
|
|
+ } else {
|
|
|
+ proxy.msgTip("该物料已选择", 2);
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|