|
@@ -15,6 +15,19 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
+ <template #status="{ item }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ <span :style="{color: item.status ==99? 'red' :''}">{{dictValueLabel(item.status, statusData)}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <template #quotationStatus="{item}">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ <span
|
|
|
|
+ :class="{ 'tag-active-1': item.quotationStatus==1, 'tag-active': item.quotationStatus==2 }">{{dictValueLabel(item.quotationStatus, quotationStatusData)}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
<template #amount="{ item }">
|
|
<template #amount="{ item }">
|
|
<div>
|
|
<div>
|
|
<span style="padding-right: 4px">{{ item.currency }}</span>
|
|
<span style="padding-right: 4px">{{ item.currency }}</span>
|
|
@@ -25,14 +38,17 @@
|
|
<div style="width:100%;">
|
|
<div style="width:100%;">
|
|
<el-popover placement="bottom-start" title="" :width="300" trigger="hover">
|
|
<el-popover placement="bottom-start" title="" :width="300" trigger="hover">
|
|
<div default>
|
|
<div default>
|
|
- <span v-for="(product,index) in item.quotationProductList">{{product.productName}} <span
|
|
|
|
- v-if="index<item.quotationProductList.length-1">,</span></span>
|
|
|
|
|
|
+ <div v-for="(product,index) in item.quotationProductList">
|
|
|
|
+ {{index+1}}、{{product.productName}}
|
|
|
|
+ <!-- <span v-if="index<item.quotationProductList.length-1">,</span> -->
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<template #reference>
|
|
<template #reference>
|
|
<div style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer">
|
|
<div style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer">
|
|
- <span v-for="(product,index) in item.quotationProductList">{{product.productName}} <span
|
|
|
|
- v-if="index<item.quotationProductList.length-1">,</span></span>
|
|
|
|
-
|
|
|
|
|
|
+ <span v-for="(product,index) in item.quotationProductList">
|
|
|
|
+ {{product.productName}}
|
|
|
|
+ <span v-if="index<item.quotationProductList.length-1"> , </span>
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-popover>
|
|
</el-popover>
|
|
@@ -47,6 +63,7 @@
|
|
</span>
|
|
</span>
|
|
<span>
|
|
<span>
|
|
<el-button type="primary" text v-debounce v-if="item.quotationStatus==2" @click="handleBack(item)">退回</el-button>
|
|
<el-button type="primary" text v-debounce v-if="item.quotationStatus==2" @click="handleBack(item)">退回</el-button>
|
|
|
|
+ <el-button type="primary" text v-debounce v-if="item.quotationStatus==2" @click="handleForeign(item)">转对外</el-button>
|
|
<el-button type="primary" text v-debounce v-if="item.status == 30" @click="getDtl(item, false,true)">变更</el-button>
|
|
<el-button type="primary" text v-debounce v-if="item.status == 30" @click="getDtl(item, false,true)">变更</el-button>
|
|
<el-button type="danger" text v-debounce v-if="item.status !=0" @click="handleRepeal(item,'/saleQuotation/cancellation')">作废</el-button>
|
|
<el-button type="danger" text v-debounce v-if="item.status !=0" @click="handleRepeal(item,'/saleQuotation/cancellation')">作废</el-button>
|
|
</span>
|
|
</span>
|
|
@@ -523,6 +540,119 @@
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+ <el-dialog v-if="foreignDialog" v-model="foreignDialog" title="转对外报价单" width="70%" append-to-body>
|
|
|
|
+ <byForm :formConfig="formConfigOne" :formOption="formOptionOne" v-model="formData.data" :rules="rulesOne" ref="formDomOne"
|
|
|
|
+ v-loading="submitLoading">
|
|
|
|
+ <template #commodity>
|
|
|
|
+ <div style="width: 100%;padding-left:25px">
|
|
|
|
+ <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all row-key="productId">
|
|
|
|
+ <el-table-column type="expand" width="50" align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-table :data="scope.row.quotationProductBomList" style="width: 100%;" :show-header="false">
|
|
|
|
+ <el-table-column label="" width="50" />
|
|
|
|
+ <el-table-column label="商品图片" width="80">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else></div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="productCode" label="商品编码" width="150" />
|
|
|
|
+ <el-table-column prop="productName" label="商品名称" min-width="130" />
|
|
|
|
+ <el-table-column label="尺寸 cm*cm*cm" width="180">
|
|
|
|
+ <template #default="{ row, $index }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="数量" width="110" prop="quantity">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="原本单价" width="100" prop="priceCopy">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="单价" width="150">
|
|
|
|
+ <template #default="{ row, $index }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.price'"
|
|
|
|
+ :rules="rules.price" :inline-message="true" class="margin-b-0 wid100">
|
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
|
+ </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.' + scope.$index + '.quotationProductBomList.' + $index + '.coefficient'"
|
|
|
|
+ :rules="rules.coefficient" :inline-message="true" class="margin-b-0 wid100">
|
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.coefficient" placeholder="请输入" style="width: 100%"
|
|
|
|
+ :precision="2" :controls="false" :min="0" @change="totalAmount()" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="amount" label="小计" width="120">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="商品图片" width="80">
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
+ <div v-if="row.fileUrl">
|
|
|
|
+ <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else></div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="productCode" label="商品编码" width="150" />
|
|
|
|
+ <el-table-column prop="productName" label="商品名称" min-width="130" />
|
|
|
|
+ <el-table-column label="尺寸 cm*cm*cm" width="180">
|
|
|
|
+ <template #default="{ row, $index }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="数量" width="110" prop="quantity">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="原本单价" width="100" prop="priceCopy">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="单价" width="150">
|
|
|
|
+ <template #default="{ row, $index }">
|
|
|
|
+ <div style="width: 100%">
|
|
|
|
+ <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true"
|
|
|
|
+ class="margin-b-0 wid100">
|
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
|
+ </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 + '.coefficient'" :rules="rules.coefficient" :inline-message="true"
|
|
|
|
+ class="margin-b-0 wid100">
|
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.coefficient" placeholder="请输入" style="width: 100%" :precision="2"
|
|
|
|
+ :controls="false" :min="0" @change="totalAmount()" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="amount" label="小计" width="120">
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </byForm>
|
|
|
|
+ <template #footer>
|
|
|
|
+ <el-button @click="foreignDialog = false" size="default" v-debounce>关 闭</el-button>
|
|
|
|
+ <el-button type="primary" @click="handleSubmitOne()" size="default" v-debounce>提 交</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
|
|
<el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
|
|
<SelectProduct @selectProduct="selectProduct"></SelectProduct>
|
|
<SelectProduct @selectProduct="selectProduct"></SelectProduct>
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -554,25 +684,17 @@ const corporationList = ref([]);
|
|
const tradeMethods = ref([]);
|
|
const tradeMethods = ref([]);
|
|
const accountCurrency = ref([]);
|
|
const accountCurrency = ref([]);
|
|
const companyData = ref([]);
|
|
const companyData = ref([]);
|
|
-const status = ref([
|
|
|
|
|
|
+const statusData = ref([
|
|
{
|
|
{
|
|
label: "草稿",
|
|
label: "草稿",
|
|
value: 0,
|
|
value: 0,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "审批中",
|
|
|
|
- value: 10,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "驳回",
|
|
|
|
- value: 20,
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "审批通过",
|
|
|
|
|
|
+ label: "正常",
|
|
value: 30,
|
|
value: 30,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "终止",
|
|
|
|
|
|
+ label: "作废",
|
|
value: 99,
|
|
value: 99,
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
@@ -596,7 +718,7 @@ const typeData = ref([
|
|
value: "1",
|
|
value: "1",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "外销",
|
|
|
|
|
|
+ label: "外贸",
|
|
value: "2",
|
|
value: "2",
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
@@ -615,17 +737,22 @@ const loading = ref(false);
|
|
const selectConfig = computed(() => {
|
|
const selectConfig = computed(() => {
|
|
return [
|
|
return [
|
|
{
|
|
{
|
|
- label: "报价状态",
|
|
|
|
- prop: "quotationStatus",
|
|
|
|
- data: quotationStatusData.value,
|
|
|
|
|
|
+ label: "报价单状态",
|
|
|
|
+ prop: "status",
|
|
|
|
+ data: statusData.value,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "报价类型",
|
|
|
|
|
|
+ label: "报价单类型",
|
|
prop: "type",
|
|
prop: "type",
|
|
data: typeData.value,
|
|
data: typeData.value,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: "报价公司",
|
|
|
|
|
|
+ label: "子公司报价状态",
|
|
|
|
+ prop: "quotationStatus",
|
|
|
|
+ data: quotationStatusData.value,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: "报价子公司",
|
|
prop: "companyId",
|
|
prop: "companyId",
|
|
data: companyData.value,
|
|
data: companyData.value,
|
|
},
|
|
},
|
|
@@ -637,14 +764,14 @@ const selectConfig = computed(() => {
|
|
placeholderOne: "结束日期",
|
|
placeholderOne: "结束日期",
|
|
propOne: "quotationTimeEnd",
|
|
propOne: "quotationTimeEnd",
|
|
},
|
|
},
|
|
- {
|
|
|
|
- type: "time",
|
|
|
|
- label: "创建时间",
|
|
|
|
- placeholder: "开始日期",
|
|
|
|
- prop: "beginTime",
|
|
|
|
- placeholderOne: "结束日期",
|
|
|
|
- propOne: "endTime",
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // type: "time",
|
|
|
|
+ // label: "创建时间",
|
|
|
|
+ // placeholder: "开始日期",
|
|
|
|
+ // prop: "beginTime",
|
|
|
|
+ // placeholderOne: "结束日期",
|
|
|
|
+ // propOne: "endTime",
|
|
|
|
+ // },
|
|
];
|
|
];
|
|
});
|
|
});
|
|
|
|
|
|
@@ -659,7 +786,14 @@ const config = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
- label: "报价类型",
|
|
|
|
|
|
+ label: "报价单状态",
|
|
|
|
+ slot: "status",
|
|
|
|
+ width: 100,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ attrs: {
|
|
|
|
+ label: "报价单类型",
|
|
prop: "type",
|
|
prop: "type",
|
|
width: 100,
|
|
width: 100,
|
|
},
|
|
},
|
|
@@ -669,7 +803,7 @@ const config = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
- label: "报价公司",
|
|
|
|
|
|
+ label: "报价子公司",
|
|
prop: "companyName",
|
|
prop: "companyName",
|
|
"min-width": 150,
|
|
"min-width": 150,
|
|
},
|
|
},
|
|
@@ -683,6 +817,13 @@ const config = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
|
|
+ label: "子公司报价状态",
|
|
|
|
+ slot: "quotationStatus",
|
|
|
|
+ width: 130,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ attrs: {
|
|
label: "报价金额",
|
|
label: "报价金额",
|
|
slot: "amount",
|
|
slot: "amount",
|
|
width: 120,
|
|
width: 120,
|
|
@@ -704,7 +845,7 @@ const config = computed(() => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
- label: "产品",
|
|
|
|
|
|
+ label: "报价单产品",
|
|
slot: "product",
|
|
slot: "product",
|
|
"min-width": 180,
|
|
"min-width": 180,
|
|
},
|
|
},
|
|
@@ -712,7 +853,7 @@ const config = computed(() => {
|
|
{
|
|
{
|
|
attrs: {
|
|
attrs: {
|
|
label: "操作",
|
|
label: "操作",
|
|
- width: 160,
|
|
|
|
|
|
+ width: 200,
|
|
slot: "btn",
|
|
slot: "btn",
|
|
align: "center",
|
|
align: "center",
|
|
fixed: "right",
|
|
fixed: "right",
|
|
@@ -782,6 +923,34 @@ const newPriceSheet = () => {
|
|
|
|
|
|
const isDetail = ref(false);
|
|
const isDetail = ref(false);
|
|
const isChange = ref(false);
|
|
const isChange = ref(false);
|
|
|
|
+const getFileData = () => {
|
|
|
|
+ let ids = [];
|
|
|
|
+ formData.data.quotationProductList.map((x) => {
|
|
|
|
+ ids.push(x.productId);
|
|
|
|
+ x.quotationProductBomList.map((y) => {
|
|
|
|
+ ids.push(y.materialId);
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ ids = Array.from(new Set(ids));
|
|
|
|
+ proxy
|
|
|
|
+ .post("/fileInfo/getList", {
|
|
|
|
+ businessIdList: ids,
|
|
|
|
+ })
|
|
|
|
+ .then((fileObj) => {
|
|
|
|
+ formData.data.quotationProductList.map((x) => {
|
|
|
|
+ x.fileList = fileObj[x.productId] || [];
|
|
|
|
+ if (x.fileList && x.fileList.length > 0) {
|
|
|
|
+ x.fileUrl = x.fileList[0].fileUrl;
|
|
|
|
+ }
|
|
|
|
+ x.quotationProductBomList.map((y) => {
|
|
|
|
+ y.fileList = fileObj[y.materialId] || [];
|
|
|
|
+ if (y.fileList && y.fileList.length > 0) {
|
|
|
|
+ y.fileUrl = y.fileList[0].fileUrl;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+};
|
|
const getDtl = (row, flag, change = false) => {
|
|
const getDtl = (row, flag, change = false) => {
|
|
formOption.disabled = flag;
|
|
formOption.disabled = flag;
|
|
modalType.value = "edit";
|
|
modalType.value = "edit";
|
|
@@ -799,69 +968,34 @@ const getDtl = (row, flag, change = false) => {
|
|
getCityData(formData.data.buyProvinceId, "30");
|
|
getCityData(formData.data.buyProvinceId, "30");
|
|
}
|
|
}
|
|
// 文件数据回显
|
|
// 文件数据回显
|
|
- let ids = [];
|
|
|
|
- formData.data.quotationProductList.map((x) => {
|
|
|
|
- ids.push(x.productId);
|
|
|
|
- x.quotationProductBomList.map((y) => {
|
|
|
|
- ids.push(y.materialId);
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
- ids = Array.from(new Set(ids));
|
|
|
|
- proxy
|
|
|
|
- .post("/fileInfo/getList", {
|
|
|
|
- businessIdList: ids,
|
|
|
|
- })
|
|
|
|
- .then((fileObj) => {
|
|
|
|
- formData.data.quotationProductList.map((x) => {
|
|
|
|
- x.fileList = fileObj[x.productId] || [];
|
|
|
|
- if (x.fileList && x.fileList.length > 0) {
|
|
|
|
- x.fileUrl = x.fileList[0].fileUrl;
|
|
|
|
|
|
+ getFileData();
|
|
|
|
+
|
|
|
|
+ //折线图
|
|
|
|
+ if (flag && res.quotationTrendList && res.quotationTrendList.length > 0) {
|
|
|
|
+ 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;
|
|
}
|
|
}
|
|
- x.quotationProductBomList.map((y) => {
|
|
|
|
- y.fileList = fileObj[y.materialId] || [];
|
|
|
|
- if (y.fileList && y.fileList.length > 0) {
|
|
|
|
- y.fileUrl = y.fileList[0].fileUrl;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
});
|
|
});
|
|
- });
|
|
|
|
-
|
|
|
|
- //
|
|
|
|
- if (flag) {
|
|
|
|
- myChart = echarts.init(chartDom.value);
|
|
|
|
- window.addEventListener("resize", () => {
|
|
|
|
|
|
+ myChart.setOption(chartOption.data);
|
|
myChart.resize();
|
|
myChart.resize();
|
|
});
|
|
});
|
|
-
|
|
|
|
- chartOption.data.xAxis.data = ["0", "0", "2"].map((item) => {
|
|
|
|
- // return item.createTime.slice(0, 10);
|
|
|
|
- return "2022-02-09";
|
|
|
|
- });
|
|
|
|
- chartOption.data.series[0].data = ["12", "43", "23"].map((item) => {
|
|
|
|
- return item;
|
|
|
|
- });
|
|
|
|
- myChart.setOption(chartOption.data);
|
|
|
|
- myChart.resize();
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- if (flag) {
|
|
|
|
- nextTick(() => {
|
|
|
|
- myChart = echarts.init(chartDom.value);
|
|
|
|
- window.addEventListener("resize", () => {
|
|
|
|
- myChart.resize();
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- chartOption.data.xAxis.data = ["0", "0", "2"].map((item) => {
|
|
|
|
- // return item.createTime.slice(0, 10);
|
|
|
|
- return "2022-02-09";
|
|
|
|
- });
|
|
|
|
- chartOption.data.series[0].data = ["12", "43", "23"].map((item) => {
|
|
|
|
- return item;
|
|
|
|
- });
|
|
|
|
- myChart.setOption(chartOption.data);
|
|
|
|
- myChart.resize();
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
};
|
|
};
|
|
|
|
|
|
const openPrint = ref(false);
|
|
const openPrint = ref(false);
|
|
@@ -954,6 +1088,7 @@ const formOption = reactive({
|
|
});
|
|
});
|
|
let myChart = null;
|
|
let myChart = null;
|
|
const chartDom = ref(null);
|
|
const chartDom = ref(null);
|
|
|
|
+const chartData = ref([]);
|
|
const isShowChart = ref(false);
|
|
const isShowChart = ref(false);
|
|
const formConfig = computed(() => {
|
|
const formConfig = computed(() => {
|
|
return [
|
|
return [
|
|
@@ -990,7 +1125,6 @@ const formConfig = computed(() => {
|
|
{
|
|
{
|
|
type: "title1",
|
|
type: "title1",
|
|
title: "贸易信息",
|
|
title: "贸易信息",
|
|
- haveLine: true,
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: "slot",
|
|
type: "slot",
|
|
@@ -1002,7 +1136,6 @@ const formConfig = computed(() => {
|
|
{
|
|
{
|
|
type: "title1",
|
|
type: "title1",
|
|
title: "商品信息",
|
|
title: "商品信息",
|
|
- haveLine: true,
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: "slot",
|
|
type: "slot",
|
|
@@ -1012,7 +1145,6 @@ const formConfig = computed(() => {
|
|
{
|
|
{
|
|
type: "title1",
|
|
type: "title1",
|
|
title: "报价总金额",
|
|
title: "报价总金额",
|
|
- haveLine: true,
|
|
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: "input",
|
|
type: "input",
|
|
@@ -1032,7 +1164,7 @@ const rules = ref({
|
|
quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
|
|
quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
|
|
});
|
|
});
|
|
|
|
|
|
-const getCityData = (id, type, isChange) => {
|
|
|
|
|
|
+const getCityData = (id, type, isChange = false) => {
|
|
proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
|
|
proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
|
|
if (type === "20") {
|
|
if (type === "20") {
|
|
provinceData.value = res;
|
|
provinceData.value = res;
|
|
@@ -1299,18 +1431,13 @@ const chartOption = reactive({
|
|
// valueFormatter: (val) => {
|
|
// valueFormatter: (val) => {
|
|
// return val + "aaa";
|
|
// return val + "aaa";
|
|
// },
|
|
// },
|
|
- // formatter: (params, ticket, callback) => {
|
|
|
|
- // return `
|
|
|
|
- // ${params[0].axisValue}
|
|
|
|
- // <br/>
|
|
|
|
- // ${params[0].seriesName}:${params[0].data}
|
|
|
|
- // <br/> 销售合同金额:${
|
|
|
|
- // chartData.value[params[0].dataIndex].contractCurrency
|
|
|
|
- // } ${chartData.value[params[0].dataIndex].contractAmount}
|
|
|
|
- // <br/> 采购合同金额:CNY ${
|
|
|
|
- // chartData.value[params[0].dataIndex].purchaseAmount
|
|
|
|
- // }`;
|
|
|
|
- // },
|
|
|
|
|
|
+ formatter: (params, ticket, callback) => {
|
|
|
|
+ return `
|
|
|
|
+ ${params[0].seriesName}:${params[0].value}
|
|
|
|
+ <br/>
|
|
|
|
+ 报价单号:${chartData.value[params[0].dataIndex].code}
|
|
|
|
+ `;
|
|
|
|
+ },
|
|
textStyle: {
|
|
textStyle: {
|
|
fontSize: 12,
|
|
fontSize: 12,
|
|
},
|
|
},
|
|
@@ -1369,6 +1496,167 @@ const handleRepeal = (row, url) => {
|
|
})
|
|
})
|
|
.catch((err) => {});
|
|
.catch((err) => {});
|
|
};
|
|
};
|
|
|
|
+const formDomOne = ref(null);
|
|
|
|
+const foreignDialog = ref(false);
|
|
|
|
+const formConfigOne = computed(() => {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ type: "title1",
|
|
|
|
+ title: "系数",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "number",
|
|
|
|
+ prop: "coefficient",
|
|
|
|
+ label: "全局价格系数",
|
|
|
|
+ precision: 2,
|
|
|
|
+ min: 0.01,
|
|
|
|
+ controls: false,
|
|
|
|
+ itemWidth: 25,
|
|
|
|
+ fn: (val) => {
|
|
|
|
+ publicTotalAmount(val);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "title1",
|
|
|
|
+ title: "商品信息",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "slot",
|
|
|
|
+ slotName: "commodity",
|
|
|
|
+ label: "",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "title1",
|
|
|
|
+ title: "报价总金额",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ type: "input",
|
|
|
|
+ prop: "amount",
|
|
|
|
+ label: "报价总金额",
|
|
|
|
+ itemWidth: 25,
|
|
|
|
+ disabled: true,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+const formOptionOne = reactive({
|
|
|
|
+ inline: true,
|
|
|
|
+ labelWidth: 100,
|
|
|
|
+ itemWidth: 100,
|
|
|
|
+ disabled: false,
|
|
|
|
+});
|
|
|
|
+const rulesOne = ref({
|
|
|
|
+ price: [{ required: true, message: "请输入单价", trigger: "blur" }],
|
|
|
|
+ coefficient: [{ required: true, message: "请输入系数", trigger: "blur" }],
|
|
|
|
+});
|
|
|
|
+const handleForeign = (row) => {
|
|
|
|
+ foreignDialog.value = true;
|
|
|
|
+ proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
|
|
|
|
+ formData.data = res;
|
|
|
|
+ formData.data.saleQuotationId = res.id;
|
|
|
|
+ delete formData.data.id;
|
|
|
|
+ // 复制原本价格
|
|
|
|
+ for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
|
+ const iele = formData.data.quotationProductList[i];
|
|
|
|
+ iele.quotationProductId = iele.id;
|
|
|
|
+ delete iele.id;
|
|
|
|
+ iele.priceCopy = iele.price;
|
|
|
|
+ // 默认系数
|
|
|
|
+ iele.coefficient = 1;
|
|
|
|
+ for (let j = 0; j < iele.quotationProductBomList.length; j++) {
|
|
|
|
+ const jele = iele.quotationProductBomList[j];
|
|
|
|
+ jele.quotationProductBomId = jele.id;
|
|
|
|
+ delete jele.id;
|
|
|
|
+ jele.priceCopy = jele.price;
|
|
|
|
+ // 默认系数
|
|
|
|
+ jele.coefficient = 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 城市数据回显
|
|
|
|
+ if (formData.data.buyCountryId) {
|
|
|
|
+ getCityData(formData.data.buyCountryId, "20");
|
|
|
|
+ }
|
|
|
|
+ if (formData.data.buyProvinceId) {
|
|
|
|
+ getCityData(formData.data.buyProvinceId, "30");
|
|
|
|
+ }
|
|
|
|
+ // 文件数据回显
|
|
|
|
+ getFileData();
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const publicTotalAmount = (val) => {
|
|
|
|
+ if (val) {
|
|
|
|
+ let money = 0;
|
|
|
|
+ if (
|
|
|
|
+ formData.data.quotationProductList &&
|
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
|
+ ) {
|
|
|
|
+ for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
|
+ let iele = formData.data.quotationProductList[i];
|
|
|
|
+ iele.coefficient = val;
|
|
|
|
+ iele.price = iele.priceCopy * val;
|
|
|
|
+ iele.amount = parseFloat(
|
|
|
|
+ Number(iele.quantity) * Number(iele.price)
|
|
|
|
+ ).toFixed(2);
|
|
|
|
+ money += Number(iele.amount);
|
|
|
|
+ for (let j = 0; j < iele.quotationProductBomList.length; j++) {
|
|
|
|
+ const jele = iele.quotationProductBomList[j];
|
|
|
|
+ jele.coefficient = val;
|
|
|
|
+ jele.price = jele.priceCopy * val;
|
|
|
|
+ jele.amount = parseFloat(
|
|
|
|
+ Number(jele.quantity) * Number(jele.price)
|
|
|
|
+ ).toFixed(2);
|
|
|
|
+ money += Number(jele.amount);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ formData.data.amount = parseFloat(money).toFixed(2);
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const totalAmount = () => {
|
|
|
|
+ formData.data.coefficient = null;
|
|
|
|
+ let money = 0;
|
|
|
|
+ if (
|
|
|
|
+ formData.data.quotationProductList &&
|
|
|
|
+ formData.data.quotationProductList.length > 0
|
|
|
|
+ ) {
|
|
|
|
+ for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
|
+ let iele = formData.data.quotationProductList[i];
|
|
|
|
+ iele.price = iele.priceCopy * iele.coefficient;
|
|
|
|
+ iele.amount = parseFloat(
|
|
|
|
+ Number(iele.quantity) * Number(iele.price)
|
|
|
|
+ ).toFixed(2);
|
|
|
|
+ money += Number(iele.amount);
|
|
|
|
+ for (let j = 0; j < iele.quotationProductBomList.length; j++) {
|
|
|
|
+ const jele = iele.quotationProductBomList[j];
|
|
|
|
+ jele.price = jele.priceCopy * jele.coefficient;
|
|
|
|
+ jele.amount = parseFloat(
|
|
|
|
+ Number(jele.quantity) * Number(jele.price)
|
|
|
|
+ ).toFixed(2);
|
|
|
|
+ money += Number(jele.amount);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ formData.data.amount = parseFloat(money).toFixed(2);
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const handleSubmitOne = () => {
|
|
|
|
+ formDomOne.value.handleSubmit(() => {
|
|
|
|
+ proxy
|
|
|
|
+ .msgConfirm()
|
|
|
|
+ .then((res) => {
|
|
|
|
+ submitLoading.value = true;
|
|
|
|
+ proxy.post("/extQuotation/add", formData.data).then((res) => {
|
|
|
|
+ proxy.msgTip("操作成功", 1);
|
|
|
|
+ submitLoading.value = false;
|
|
|
|
+ foreignDialog.value = false;
|
|
|
|
+ getList();
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {});
|
|
|
|
+ });
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|