|
@@ -6,6 +6,29 @@
|
|
|
<div ref="chartDom" style="height:300px"></div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #ofCompanyId>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item label="业务公司" class="margin-b-0 wid100" required>
|
|
|
+ <el-row style="width: 100%">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item prop="ofCompanyId" label="" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
|
|
|
+ placeholder="公司" default-expand-all
|
|
|
+ :props="{ value: 'deptId', label: 'deptName', children: 'children', disabled: 'disabled' }"
|
|
|
+ @change="handleOfCompanyIdChange" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
|
|
|
+ <el-tree-select v-model="formData.data.ofDeptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
|
|
|
+ :props="{ value: 'deptId', label: 'deptName', children: 'children', disabled: 'disabled' }" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template #buyer>
|
|
|
<div style="width: 100%">
|
|
|
<el-form-item label="客户信息" prop="buyCorporationId" class="wid100">
|
|
@@ -14,7 +37,7 @@
|
|
|
<el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-row style="width: 100%">
|
|
|
+ <!-- <el-row style="width: 100%">
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="地址" class="wid100 margin-b-0">
|
|
|
<el-row style="padding-right:5px;width:100%">
|
|
@@ -54,13 +77,13 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<template #commodity>
|
|
|
<div style="width: 100%;padding-left:25px">
|
|
|
- <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
|
|
|
+ <!-- <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
|
|
|
<el-table-column type="expand" width="50" align="center">
|
|
|
<template #default="scope">
|
|
|
<div style="padding-left:50px">
|
|
@@ -85,41 +108,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column prop="quantity" label="数量" width="110" /> -->
|
|
|
- <!-- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + scope.$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" :disabled="row.type==1" @change="changeQuantity()" />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template> -->
|
|
|
- <!-- <el-table-column prop="allQuantity" label="总量" width="80" />
|
|
|
- <el-table-column prop="price" label="单价" width="110">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- ¥ {{row.price}}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="amount" label="小计" width="110">
|
|
|
- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- ¥ {{row.amount}}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column> -->
|
|
|
<el-table-column prop="remark" label="备注" width="180" />
|
|
|
- <!-- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.remark'"
|
|
|
- :rules="rules.remark" :inline-message="true" class="margin-b-0 wid100">
|
|
|
- <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" :min="0" />
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template> -->
|
|
|
-
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -143,16 +132,6 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="productColor" label="颜色" width="100" />
|
|
|
<el-table-column prop="quantity" label="数量" width="110" />
|
|
|
- <!-- <template #default="{ row, $index }">
|
|
|
- <div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + $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" @change="changeQuantity()" />
|
|
|
-
|
|
|
- </el-form-item>
|
|
|
- </div>
|
|
|
- </template> -->
|
|
|
<el-table-column prop="price" label="单价" width="110">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
@@ -167,7 +146,248 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- </el-table>
|
|
|
+ </el-table> -->
|
|
|
+
|
|
|
+ <el-collapse v-model="activeNames">
|
|
|
+ <el-collapse-item :name="index" v-for="(product,index) in formData.data.quotationProductList" :key="index">
|
|
|
+ <template #title>
|
|
|
+ <!-- <TitleInfo :content="'主材'"></TitleInfo> -->
|
|
|
+ <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>
|
|
|
+
|
|
|
+ </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%">
|
|
|
+ <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-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
|
|
|
+ <el-table-column prop="productName" label="物料名称" min-width="130" />
|
|
|
+ <el-table-column prop="productCode" label="物料编码" width="200" />
|
|
|
+ <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>
|
|
|
+ </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>
|
|
|
+ <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" 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" 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" 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" style="width:100%" multiple placeholder=" ">
|
|
|
+ <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" 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>
|
|
|
+ <div v-for="file in row.fileList" :key="file.id" class="el-click" @click="openImg(file.fileUrl)">
|
|
|
+ {{file.fileName}}
|
|
|
+ </div>
|
|
|
+ </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" />
|
|
|
+ </el-form-item>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-collapse-item>
|
|
|
+
|
|
|
+ </el-collapse>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
@@ -179,6 +399,8 @@ import byForm from "@/components/byForm/index";
|
|
|
import selectCity from "@/components/selectCity/index.vue";
|
|
|
import * as echarts from "echarts";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
+const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
|
|
|
+const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
|
|
|
const props = defineProps({
|
|
|
rowData: Object,
|
|
|
dataType: {
|
|
@@ -186,6 +408,7 @@ const props = defineProps({
|
|
|
default: "1",
|
|
|
},
|
|
|
});
|
|
|
+const activeNames = ref([]);
|
|
|
const typeData = ref([
|
|
|
{
|
|
|
label: "内销订单",
|
|
@@ -214,6 +437,12 @@ const formOption = reactive({
|
|
|
itemWidth: 100,
|
|
|
disabled: true,
|
|
|
});
|
|
|
+const rules = ref({
|
|
|
+ price: [{ required: true, message: "单价", trigger: "blur" }],
|
|
|
+ moldId: [{ required: true, message: "请选择模具", trigger: "change" }],
|
|
|
+ quantity: [{ required: true, message: "数量", trigger: "blur" }],
|
|
|
+ totalQuantity: [{ required: true, message: "总量", trigger: "blur" }],
|
|
|
+});
|
|
|
let myChart = null;
|
|
|
const chartDom = ref(null);
|
|
|
const isShowChart = ref(false);
|
|
@@ -247,13 +476,19 @@ const formConfig = computed(() => {
|
|
|
// data: typeData.value,
|
|
|
// itemWidth: 50,
|
|
|
// },
|
|
|
+ // {
|
|
|
+ // type: "treeSelect",
|
|
|
+ // prop: "ofCompanyId",
|
|
|
+ // label: "业务公司",
|
|
|
+ // data: proxy.useUserStore().allDict["tree_company_data"],
|
|
|
+ // propsTreeLabel: "deptName",
|
|
|
+ // propsTreeValue: "deptId",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
{
|
|
|
- type: "treeSelect",
|
|
|
- prop: "ofCompanyId",
|
|
|
- label: "业务公司",
|
|
|
- data: proxy.useUserStore().allDict["tree_company_data"],
|
|
|
- propsTreeLabel: "deptName",
|
|
|
- propsTreeValue: "deptId",
|
|
|
+ type: "slot",
|
|
|
+ slotName: "ofCompanyId",
|
|
|
+ label: "",
|
|
|
itemWidth: 50,
|
|
|
},
|
|
|
{
|
|
@@ -278,20 +513,20 @@ const formConfig = computed(() => {
|
|
|
label: "",
|
|
|
itemWidth: 100,
|
|
|
},
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- itemType: "text",
|
|
|
- label: "联系人",
|
|
|
- prop: "buyContactName",
|
|
|
- itemWidth: 50,
|
|
|
- },
|
|
|
- {
|
|
|
- type: "input",
|
|
|
- itemType: "text",
|
|
|
- label: "联系人电话",
|
|
|
- prop: "buyContactNumber",
|
|
|
- itemWidth: 50,
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // itemType: "text",
|
|
|
+ // label: "联系人",
|
|
|
+ // prop: "buyContactName",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "input",
|
|
|
+ // itemType: "text",
|
|
|
+ // label: "联系人电话",
|
|
|
+ // prop: "buyContactNumber",
|
|
|
+ // itemWidth: 50,
|
|
|
+ // },
|
|
|
{
|
|
|
type: "title1",
|
|
|
title: "商品信息",
|
|
@@ -351,6 +586,28 @@ const getDict = () => {
|
|
|
treeData.value = proxy.handleTree(res.data, "deptId");
|
|
|
});
|
|
|
};
|
|
|
+const rawMaterialData = ref([]);
|
|
|
+const technologyData = ref([]);
|
|
|
+const getRawMaterialData = () => {
|
|
|
+ proxy.post("/productInfo/page", { productClassifyId: 100 }).then((res) => {
|
|
|
+ rawMaterialData.value = res.rows.map((x) => ({
|
|
|
+ ...x,
|
|
|
+ label:
|
|
|
+ x.name +
|
|
|
+ "," +
|
|
|
+ x.customCode +
|
|
|
+ "," +
|
|
|
+ `${x["length"]}*${x.width}*${x.height}(cm)` +
|
|
|
+ "," +
|
|
|
+ x.color,
|
|
|
+ value: x.id,
|
|
|
+ }));
|
|
|
+ });
|
|
|
+ proxy.post("/technology/page", { pageNum: 1, pageSize: 999 }).then((res) => {
|
|
|
+ technologyData.value = res.rows;
|
|
|
+ });
|
|
|
+};
|
|
|
+getRawMaterialData();
|
|
|
getDict();
|
|
|
|
|
|
const getFileData = () => {
|
|
@@ -481,12 +738,71 @@ const chartOption = reactive({
|
|
|
},
|
|
|
});
|
|
|
const customerList = ref([]);
|
|
|
+const deptData = ref([]);
|
|
|
+const handleOfCompanyIdChange = (val) => {
|
|
|
+ if (val) {
|
|
|
+ proxy
|
|
|
+ .get("/tenantDept/list", {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 9999,
|
|
|
+ keyword: "",
|
|
|
+ ancestors: val,
|
|
|
+ tenantId: proxy.useUserStore().user.tenantId,
|
|
|
+ // type: 2,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ deptData.value = proxy.handleTree(res.data, "deptId");
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
const getData = (query) => {
|
|
|
let url =
|
|
|
props.dataType == "1" ? "/saleQuotation/detail" : "/extQuotation/detail";
|
|
|
loading.value = true;
|
|
|
proxy.post(url, query).then((res) => {
|
|
|
formData.data = res;
|
|
|
+ if (res && res.ofCompanyId) {
|
|
|
+ handleOfCompanyIdChange(res.ofCompanyId);
|
|
|
+ }
|
|
|
+ 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
|
|
|
+ );
|
|
|
+ }
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
proxy
|
|
|
.post("/customer/selPage", { keyword: formData.data.buyCorporationName })
|
|
|
.then((res) => {
|
|
@@ -497,23 +813,23 @@ const getData = (query) => {
|
|
|
}));
|
|
|
});
|
|
|
// 城市数据回显
|
|
|
- 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 (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();
|
|
|
loading.value = false;
|
|
|
// if (res.quotationTrendList && res.quotationTrendList.length >= 2) {
|
|
|
// isShowChart.value = true;
|
|
@@ -545,6 +861,15 @@ const getData = (query) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+let obj = {
|
|
|
+ 1: "定制刀模",
|
|
|
+ 2: "定制纹路",
|
|
|
+ 3: "定制模具",
|
|
|
+};
|
|
|
+const getLabelOne = (type) => {
|
|
|
+ return obj[type];
|
|
|
+};
|
|
|
+
|
|
|
watch(
|
|
|
() => props.rowData,
|
|
|
(val) => {
|
|
@@ -571,4 +896,30 @@ watch(
|
|
|
:deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
|
|
|
background: #f4f4f5 !important;
|
|
|
}
|
|
|
+
|
|
|
+.table {
|
|
|
+ border-collapse: collapse;
|
|
|
+ border-spacing: 0;
|
|
|
+
|
|
|
+ td {
|
|
|
+ text-align: center;
|
|
|
+ padding: 2px 4px;
|
|
|
+ // padding: 5px 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.small-title {
|
|
|
+ padding-left: 15px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ color: #3366ff;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+:deep(.el-checkbox) {
|
|
|
+ margin-right: 0px;
|
|
|
+}
|
|
|
+:deep(.el-collapse-item) {
|
|
|
+ margin-bottom: 10px;
|
|
|
+}
|
|
|
+:deep(.el-collapse-item__header) {
|
|
|
+ background-color: #eee;
|
|
|
+}
|
|
|
</style>
|