|
@@ -180,252 +180,274 @@
|
|
|
<el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!isDetail"
|
|
|
:disabled="!formData.data.companyId">选择产品库</el-button>
|
|
|
<el-collapse v-model="activeNames">
|
|
|
- <el-collapse-item :name="index" v-for="(product,index) in formData.data.quotationProductList" :key="index">
|
|
|
- <template #title>
|
|
|
- <div style="font-size:14px;font-weight:700;padding-left:25px;width:300px">
|
|
|
- 产品编码:{{product.productCode || '定制产品'}}
|
|
|
- </div>
|
|
|
- <el-form-item label="数量" class="margin-b-0" style="width:300px !important;" :prop="'quotationProductList.' +index + '.quantity'"
|
|
|
- :rules="rules.quantity" :inline-message="true" @click.stop>
|
|
|
- <el-input-number v-model="product.quantity" placeholder="请输入" style="width: 100%" :precision="0" :controls="false" :min="1"
|
|
|
- onmousewheel="return false;" />
|
|
|
- </el-form-item>
|
|
|
- <el-button text type="primary" style="margin-left:10px" @click="handleRemove(index)">删除</el-button>
|
|
|
- </template>
|
|
|
- <div style="width:100%">
|
|
|
- <div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'主材'"></TitleInfo>
|
|
|
- </div>
|
|
|
- <div style="width: 100%;padding-left:15px">
|
|
|
- <el-row>
|
|
|
- <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-card style="margin-bottom:15px" v-for="(product,index) in formData.data.quotationProductList" :key="index">
|
|
|
+ <el-collapse-item :name="index">
|
|
|
+ <template #title>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="5">
|
|
|
+ <div style="font-size:14px;font-weight:700;padding-left:25px;">
|
|
|
+ 产品编码:{{product.productCode || '定制产品'}}
|
|
|
+ </div>
|
|
|
</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-col :span="5">
|
|
|
+ <el-form-item label="数量" class="margin-b-0" :prop="'quotationProductList.' +index + '.quantity'" :rules="rules.quantity"
|
|
|
+ :inline-message="true" @click.stop>
|
|
|
+ <el-input-number v-model="product.quantity" placeholder="请输入" style="width: 100%" :precision="0" :controls="false" :min="1"
|
|
|
+ onmousewheel="return false;" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="尺寸" class="margin-b-0 wid100" required>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
|
|
|
- :inline-message="true" label-width="0px" class="margin-b-0 wid100">
|
|
|
- <el-input-number v-model="product.productLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item :prop="'quotationProductList.' +index + '.productWidth'" :rules="rules.productWidth"
|
|
|
- :inline-message="true" label-width="0px" class="margin-b-0 wid100">
|
|
|
- <el-input-number v-model="product.productWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item :prop="'quotationProductList.' +index + '.productHeight'" :rules="rules.productHeight"
|
|
|
- :inline-message="true" label-width="0px" class="margin-b-0 wid100">
|
|
|
- <el-input-number v-model="product.productHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="单价" class="margin-b-0" @click.stop>
|
|
|
+ <el-input-number v-model="product.price" placeholder="" style="width: 100%" :precision="2" :controls="false" :min="0"
|
|
|
+ onmousewheel="return false;" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <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;" />
|
|
|
+ <el-col :span="5">
|
|
|
+ <el-form-item label="总价" class="margin-b-0" @click.stop>
|
|
|
+ <el-input-number v-model="product.amount" placeholder="" style="width: 100%" :precision="2" :controls="false" :min="0"
|
|
|
+ onmousewheel="return false;" disabled />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'辅材'"></TitleInfo>
|
|
|
- </div>
|
|
|
- <div style="width: 100%;padding-left:15px">
|
|
|
- <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="物料名称" min-width="130" />
|
|
|
- <el-table-column prop="materialCode" label="物料编码" width="150" />
|
|
|
- <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="60" align="center" fixed="right">
|
|
|
- <template #default="{ $index }">
|
|
|
- <el-button type="primary" link @click="handleRemoveBom(index,$index)">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div style="margin:10px 0">
|
|
|
- <TitleInfo :content="'附加工艺要求'"></TitleInfo>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div style="width:100%;padding-left:15px">
|
|
|
- <div class="small-title">
|
|
|
- ① 工艺线路
|
|
|
- </div>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="工艺产线" class="wid100" :prop="'quotationProductList.' + index + '.technologyId'"
|
|
|
- :rules="rules.technologyId" :inline-message="true">
|
|
|
- <el-select v-model="product.technologyId" placeholder="请选择" style="width:100%">
|
|
|
- <el-option v-for="item in technologyData" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="4" style="text-align:right">
|
|
|
+ <el-button text type="primary" style="margin-left:10px" @click="handleRemove(index)">删除</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <div class="small-title">
|
|
|
- ② LOGO
|
|
|
+ </template>
|
|
|
+ <div style="width:100%">
|
|
|
+ <div style="margin:10px 0">
|
|
|
+ <TitleInfo :content="'主材'"></TitleInfo>
|
|
|
</div>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="LOGO尺寸" class="wid100">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoLength'"
|
|
|
- :rules="rules.logoLength" :inline-message="true">
|
|
|
- <el-input-number v-model="product.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
|
|
|
- :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoWidth'"
|
|
|
- :rules="rules.logoWidth" :inline-message="true">
|
|
|
- <el-input-number v-model="product.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2" :controls="false"
|
|
|
- :min="0" onmousewheel="return false;" />
|
|
|
+ <div style="width: 100%;padding-left:15px">
|
|
|
+ <el-row>
|
|
|
+ <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 :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="尺寸" class="margin-b-0 wid100" required>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
|
|
|
+ :inline-message="true" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-input-number v-model="product.productLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item :prop="'quotationProductList.' +index + '.productWidth'" :rules="rules.productWidth"
|
|
|
+ :inline-message="true" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-input-number v-model="product.productWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item :prop="'quotationProductList.' +index + '.productHeight'" :rules="rules.productHeight"
|
|
|
+ :inline-message="true" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-input-number v-model="product.productHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <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;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="margin:10px 0">
|
|
|
+ <TitleInfo :content="'辅材'"></TitleInfo>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100%;padding-left:15px">
|
|
|
+ <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="物料编码" />
|
|
|
+ <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>
|
|
|
- </el-col>
|
|
|
- <!-- <el-col :span="8">
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" width="60" align="center" fixed="right">
|
|
|
+ <template #default="{ $index }">
|
|
|
+ <el-button type="primary" link @click="handleRemoveBom(index,$index)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="margin:10px 0">
|
|
|
+ <TitleInfo :content="'附加工艺要求'"></TitleInfo>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div style="width:100%;padding-left:15px">
|
|
|
+ <div class="small-title">
|
|
|
+ ① 工艺线路
|
|
|
+ </div>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="生产工艺" class="wid100" :prop="'quotationProductList.' + index + '.technologyId'"
|
|
|
+ :rules="rules.technologyId" :inline-message="true">
|
|
|
+ <el-select v-model="product.technologyId" placeholder="请选择" style="width:100%">
|
|
|
+ <el-option v-for="item in technologyData" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="small-title">
|
|
|
+ ② LOGO
|
|
|
+ </div>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="LOGO尺寸" class="wid100">
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoLength'"
|
|
|
+ :rules="rules.logoLength" :inline-message="true">
|
|
|
+ <el-input-number v-model="product.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoWidth'"
|
|
|
+ :rules="rules.logoWidth" :inline-message="true">
|
|
|
+ <el-input-number v-model="product.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2"
|
|
|
+ :controls="false" :min="0" onmousewheel="return false;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="8">
|
|
|
<el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoHeight'"
|
|
|
:rules="rules.logoHeight" :inline-message="true">
|
|
|
<el-input-number v-model="product.logoHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
|
|
|
:controls="false" :min="0" onmousewheel="return false;" />
|
|
|
</el-form-item>
|
|
|
</el-col> -->
|
|
|
- </el-row>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="几色印刷" class="wid100">
|
|
|
- <el-input-number v-model="product.colorCount" placeholder="请输入" style="width: 100%" :precision="0" :controls="false"
|
|
|
- :min="1" onmousewheel="return false;" />
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="几色印刷" class="wid100">
|
|
|
+ <el-input-number v-model="product.colorCount" placeholder="请输入" style="width: 100%" :precision="0" :controls="false"
|
|
|
+ :min="1" onmousewheel="return false;" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="small-title">
|
|
|
+ ③ 折叠
|
|
|
+ </div>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="是否折叠" class="wid100">
|
|
|
+ <el-select v-model="product.isFold" placeholder="请选择" style="width:100%">
|
|
|
+ <el-option :label="'否'" :value="0" />
|
|
|
+ <el-option :label="'是'" :value="1" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="折叠数" class="wid100" :prop="'quotationProductList.' +index + '.foldWay'" v-if="product.isFold==1"
|
|
|
+ :rules="product.isFold==1?rules.foldWay:''">
|
|
|
+ <el-select v-model="product.foldWay" placeholder="请选择" style="width:100%">
|
|
|
+ <el-option v-for="item in foldWayData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="small-title">
|
|
|
+ ④ 包装要求
|
|
|
+ </div>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="包装要求" class="wid100">
|
|
|
+ <el-select v-model="product.packAsk" placeholder="请选择" style="width:100%" multiple>
|
|
|
+ <el-option v-for="item in packAskData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="small-title">
|
|
|
+ ⑤ 是否定制
|
|
|
+ </div>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item prop="isCustomized" label="是否定制" class="wid100">
|
|
|
+ <el-select v-model="product.isCustomized" placeholder="请选择" style="width:100%">
|
|
|
+ <el-option :label="'否'" :value="0" />
|
|
|
+ <el-option :label="'是'" :value="1" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="width:100%">
|
|
|
+ <el-form-item label="定制内容" class="wid100" v-if="product.isCustomized==1">
|
|
|
+ <table style="width:100%" border class="table">
|
|
|
+ <tr>
|
|
|
+ <td style="width:20%">
|
|
|
+ </td>
|
|
|
+ <td style="width:40%">附件</td>
|
|
|
+ <td style="width:40%">备注</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(row,sonIndex) in product.quotationProductCustomInfoList" :key="sonIndex">
|
|
|
+ <td>
|
|
|
+ <el-checkbox v-model="row.isCheckBox" label="" /> <span style="position:relative;top:-2px">
|
|
|
+ {{getLabelOne(row.type)}}</span>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <el-upload :file-list="row.fileList" :action="uploadUrl" :data="uploadData" :limit="1" :list-type="'text'"
|
|
|
+ :before-upload="(file)=>handleBeforeUploadOne(file,index,sonIndex)"
|
|
|
+ :on-success="()=>handleSuccessOne(index,sonIndex)"
|
|
|
+ :on-remove="(file)=>handleRemoveFile(file,index,sonIndex)" :on-preview="onPreviewFile"
|
|
|
+ :on-exceed="()=>msgTip(`上传文件数量不可大于1`, 2)">
|
|
|
+ <el-button text type="primary">上传附件</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <el-form-item :prop="'quotationProductList.' + index + '.quotationProductCustomInfoList.' + sonIndex + '.remark'"
|
|
|
+ :rules="row.isCheckBox?rules.remark:''" :inline-message="true" class="margin-b-0 wid100">
|
|
|
+ <el-input v-model="row.remark" placeholder="请输入备注" />
|
|
|
+ </el-form-item>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="small-title">
|
|
|
- ③ 折叠
|
|
|
- </div>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="是否折叠" class="wid100">
|
|
|
- <el-select v-model="product.isFold" placeholder="请选择" style="width:100%">
|
|
|
- <el-option :label="'否'" :value="0" />
|
|
|
- <el-option :label="'是'" :value="1" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="折叠数" class="wid100" :prop="'quotationProductList.' +index + '.foldWay'" v-if="product.isFold==1"
|
|
|
- :rules="product.isFold==1?rules.foldWay:''">
|
|
|
- <el-select v-model="product.foldWay" placeholder="请选择" style="width:100%">
|
|
|
- <el-option v-for="item in foldWayData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="small-title">
|
|
|
- ④ 包装要求
|
|
|
- </div>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item label="包装要求" class="wid100">
|
|
|
- <el-select v-model="product.packAsk" placeholder="请选择" style="width:100%" multiple>
|
|
|
- <el-option v-for="item in packAskData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="small-title">
|
|
|
- ⑤ 是否定制
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-col :span="12">
|
|
|
- <el-form-item prop="isCustomized" label="是否定制" class="wid100">
|
|
|
- <el-select v-model="product.isCustomized" placeholder="请选择" style="width:100%">
|
|
|
- <el-option :label="'否'" :value="0" />
|
|
|
- <el-option :label="'是'" :value="1" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="width:100%">
|
|
|
- <el-form-item label="定制内容" class="wid100" v-if="product.isCustomized==1">
|
|
|
- <table style="width:100%" border class="table">
|
|
|
- <tr>
|
|
|
- <td style="width:20%">
|
|
|
- </td>
|
|
|
- <td style="width:40%">附件</td>
|
|
|
- <td style="width:40%">备注</td>
|
|
|
- </tr>
|
|
|
- <tr v-for="(row,sonIndex) in product.quotationProductCustomInfoList" :key="sonIndex">
|
|
|
- <td>
|
|
|
- <el-checkbox v-model="row.isCheckBox" label="" /> <span style="position:relative;top:-2px">
|
|
|
- {{getLabelOne(row.type)}}</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <el-upload :file-list="row.fileList" :action="uploadUrl" :data="uploadData" :limit="1" :list-type="'text'"
|
|
|
- :before-upload="(file)=>handleBeforeUploadOne(file,index,sonIndex)"
|
|
|
- :on-success="()=>handleSuccessOne(index,sonIndex)" :on-remove="(file)=>handleRemoveFile(file,index,sonIndex)"
|
|
|
- :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于1`, 2)">
|
|
|
- <el-button text type="primary">上传附件</el-button>
|
|
|
- </el-upload>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <el-form-item :prop="'quotationProductList.' + index + '.quotationProductCustomInfoList.' + sonIndex + '.remark'"
|
|
|
- :rules="row.isCheckBox?rules.remark:''" :inline-message="true" class="margin-b-0 wid100">
|
|
|
- <el-input v-model="row.remark" placeholder="请输入备注" />
|
|
|
- </el-form-item>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </el-form-item>
|
|
|
- </el-row>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </el-collapse-item>
|
|
|
-
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-card>
|
|
|
</el-collapse>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -494,7 +516,7 @@
|
|
|
<el-table-column prop="productColor" label="颜色" width="100" />
|
|
|
<el-table-column label="数量" width="110" prop="quantity">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="指导价" width="100" prop="guidePrice">
|
|
|
+ <el-table-column label="业务成本单价" width="100" prop="guidePrice">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
<span class="tag-active">{{row.guidePrice}}</span>
|
|
@@ -598,9 +620,9 @@
|
|
|
<el-table-column prop="productColor" label="颜色" width="100" />
|
|
|
<el-table-column label="数量" width="80" prop="quantity">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="工厂单价" width="100" prop="prodPrice">
|
|
|
+ <el-table-column label="工厂出厂单价" width="110" prop="prodPrice">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="指导价" width="120" prop="price">
|
|
|
+ <el-table-column label="业务成本单价" width="120" prop="price">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rulesTwo.price" :inline-message="true"
|
|
@@ -1049,54 +1071,100 @@ const getDtl = (row, flag, change = false) => {
|
|
|
openAddDialog.value = true;
|
|
|
proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
|
|
|
formData.data = res;
|
|
|
- // 城市数据回显
|
|
|
- if (formData.data.buyCountryId) {
|
|
|
- getCityData(formData.data.buyCountryId, "20");
|
|
|
- }
|
|
|
- if (formData.data.buyProvinceId) {
|
|
|
- getCityData(formData.data.buyProvinceId, "30");
|
|
|
+ if (res && res.ofCompanyId) {
|
|
|
+ handleOfCompanyIdChange(res.ofCompanyId);
|
|
|
}
|
|
|
- // 文件数据回显
|
|
|
- getFileData();
|
|
|
- let productIds = formData.data.quotationProductList.map((x) => x.productId);
|
|
|
- proxy.getFileData({
|
|
|
- businessIdList: productIds,
|
|
|
- data: formData.data.quotationProductList,
|
|
|
- att: "productId",
|
|
|
- businessType: "0",
|
|
|
- fileAtt: "productFile",
|
|
|
- filePathAtt: "fileUrl",
|
|
|
- });
|
|
|
- // 价格计算
|
|
|
- changeQuantity();
|
|
|
-
|
|
|
- //折线图
|
|
|
- if (flag && res.quotationTrendList && res.quotationTrendList.length >= 2) {
|
|
|
- nextTick(() => {
|
|
|
- myChart = echarts.init(chartDom.value);
|
|
|
- window.addEventListener("resize", () => {
|
|
|
- myChart.resize();
|
|
|
- });
|
|
|
- chartData.value = res.quotationTrendList;
|
|
|
- chartOption.data.xAxis.data = chartData.value.map((item) => {
|
|
|
- return item.createTime.slice(0, 10);
|
|
|
- });
|
|
|
- chartOption.data.series[0].data = chartData.value.map((item, index) => {
|
|
|
- if (item.code == row.code) {
|
|
|
- return {
|
|
|
- value: item.amount || 0,
|
|
|
- itemStyle: { color: "red" },
|
|
|
- };
|
|
|
- } else {
|
|
|
- return item.amount || 0;
|
|
|
+ if (
|
|
|
+ formData.data.quotationProductList &&
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
+ ) {
|
|
|
+ for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
+ const iele = formData.data.quotationProductList[i];
|
|
|
+ if (iele.packAsk) {
|
|
|
+ iele.packAsk = iele.packAsk.split(",");
|
|
|
+ } 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.quotationProductCustomInfoList &&
|
|
|
+ iele.quotationProductCustomInfoList.length > 0
|
|
|
+ ) {
|
|
|
+ for (let j = 0; j < iele.quotationProductCustomInfoList.length; j++) {
|
|
|
+ const jele = iele.quotationProductCustomInfoList[j];
|
|
|
+ if (jele.fileList) {
|
|
|
+ jele.fileList = jele.fileList.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ url: x.fileUrl,
|
|
|
+ name: x.fileName,
|
|
|
+ }));
|
|
|
+ } else {
|
|
|
+ jele.fileList = [];
|
|
|
+ }
|
|
|
+ jele.isCheckBox = jele.isCheck == 1;
|
|
|
}
|
|
|
- });
|
|
|
- myChart.setOption(chartOption.data);
|
|
|
- myChart.resize();
|
|
|
- });
|
|
|
- } else {
|
|
|
- isShowChart.value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ // 城市数据回显
|
|
|
+ // if (formData.data.buyCountryId) {
|
|
|
+ // getCityData(formData.data.buyCountryId, "20");
|
|
|
+ // }
|
|
|
+ // if (formData.data.buyProvinceId) {
|
|
|
+ // getCityData(formData.data.buyProvinceId, "30");
|
|
|
+ // }
|
|
|
+ // // 文件数据回显
|
|
|
+ // getFileData();
|
|
|
+ // let productIds = formData.data.quotationProductList.map((x) => x.productId);
|
|
|
+ // proxy.getFileData({
|
|
|
+ // businessIdList: productIds,
|
|
|
+ // data: formData.data.quotationProductList,
|
|
|
+ // att: "productId",
|
|
|
+ // businessType: "0",
|
|
|
+ // fileAtt: "productFile",
|
|
|
+ // filePathAtt: "fileUrl",
|
|
|
+ // });
|
|
|
+ // // 价格计算
|
|
|
+ // changeQuantity();
|
|
|
+
|
|
|
+ // //折线图
|
|
|
+ // if (flag && res.quotationTrendList && res.quotationTrendList.length >= 2) {
|
|
|
+ // nextTick(() => {
|
|
|
+ // myChart = echarts.init(chartDom.value);
|
|
|
+ // window.addEventListener("resize", () => {
|
|
|
+ // myChart.resize();
|
|
|
+ // });
|
|
|
+ // chartData.value = res.quotationTrendList;
|
|
|
+ // chartOption.data.xAxis.data = chartData.value.map((item) => {
|
|
|
+ // return item.createTime.slice(0, 10);
|
|
|
+ // });
|
|
|
+ // chartOption.data.series[0].data = chartData.value.map((item, index) => {
|
|
|
+ // if (item.code == row.code) {
|
|
|
+ // return {
|
|
|
+ // value: item.amount || 0,
|
|
|
+ // itemStyle: { color: "red" },
|
|
|
+ // };
|
|
|
+ // } else {
|
|
|
+ // return item.amount || 0;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // myChart.setOption(chartOption.data);
|
|
|
+ // myChart.resize();
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ // isShowChart.value = false;
|
|
|
+ // }
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -1471,7 +1539,7 @@ const selectProduct = (row) => {
|
|
|
netWeight: goods.netWeight,
|
|
|
quantity: null,
|
|
|
price: null,
|
|
|
- amount: "",
|
|
|
+ amount: null,
|
|
|
fileList: [],
|
|
|
rawMaterialId: goods.rawMaterialId,
|
|
|
technologyId: goods.technologyId,
|
|
@@ -1535,7 +1603,7 @@ const clickPushProduct = () => {
|
|
|
netWeight: null,
|
|
|
quantity: null,
|
|
|
price: null,
|
|
|
- amount: "",
|
|
|
+ amount: null,
|
|
|
fileList: [],
|
|
|
rawMaterialId: "",
|
|
|
technologyId: "",
|
|
@@ -2207,6 +2275,21 @@ const getConfirmDtl = (row, flag) => {
|
|
|
changeQuantityOne();
|
|
|
changeQuantityTwo();
|
|
|
changeMinPrice();
|
|
|
+ if (!flag) {
|
|
|
+ if (
|
|
|
+ formData.dataTwo.quotationProductList &&
|
|
|
+ formData.dataTwo.quotationProductList.length > 0
|
|
|
+ ) {
|
|
|
+ // 单个产品的价格
|
|
|
+ for (let i = 0; i < formData.dataTwo.quotationProductList.length; i++) {
|
|
|
+ let iele = formData.dataTwo.quotationProductList[i];
|
|
|
+ iele.price = Number(
|
|
|
+ parseFloat(Number(iele.prodPrice) * 1.1).toFixed(2)
|
|
|
+ );
|
|
|
+ iele.amplifyRatio = 10;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -2424,9 +2507,9 @@ const handleOfCompanyIdChange = (val) => {
|
|
|
:deep(.el-checkbox) {
|
|
|
margin-right: 0px;
|
|
|
}
|
|
|
-:deep(.el-collapse-item) {
|
|
|
- margin-bottom: 10px;
|
|
|
-}
|
|
|
+// :deep(.el-collapse-item) {
|
|
|
+// margin-bottom: 10px;
|
|
|
+// }
|
|
|
:deep(.el-collapse-item__header) {
|
|
|
background-color: #eee;
|
|
|
}
|