|
@@ -114,7 +114,7 @@
|
|
|
<template #commodity>
|
|
|
<div style="width: 100%">
|
|
|
<el-button @click="openProduct = true">添加商品</el-button>
|
|
|
- <el-table :data="formData.data.quotationProductList" style="width: 100%; margin-top: 16px">
|
|
|
+ <el-table :data="formData.data.contractProductList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="商品图片" width="80">
|
|
|
<template #default="{ row }">
|
|
|
<div v-if="row.productId">
|
|
@@ -127,7 +127,7 @@
|
|
|
<el-table-column label="商品名称">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProductList.' + $index + '.productName'" :rules="rules.productName" :inline-message="true">
|
|
|
<el-input v-model="row.productName" placeholder="请输入商品名称" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -136,7 +136,7 @@
|
|
|
<el-table-column label="规格型号" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProductList.' + $index + '.productModel'" :rules="rules.productModel" :inline-message="true">
|
|
|
<el-input v-model="row.productModel" placeholder="请输入规格型号" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -146,7 +146,7 @@
|
|
|
<el-table-column label="数量" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
|
|
|
<el-input-number
|
|
|
v-model="row.quantity"
|
|
|
placeholder="请输入数量"
|
|
@@ -162,7 +162,7 @@
|
|
|
<el-table-column label="单价" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
|
|
|
<el-input-number
|
|
|
v-model="row.price"
|
|
|
placeholder="请输入单价"
|
|
@@ -188,11 +188,11 @@
|
|
|
<template #otherCharge>
|
|
|
<div style="width: 100%">
|
|
|
<el-button type="primary" @click="clickAdd()">添加行</el-button>
|
|
|
- <el-table :data="formData.data.quotationPayList" style="width: 100%; margin-top: 16px">
|
|
|
+ <el-table :data="formData.data.contractProjectList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="收费项目" width="220">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationPayList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProjectList.' + $index + '.payName'" :rules="rules.payName" :inline-message="true">
|
|
|
<el-autocomplete v-model="row.payName" :fetch-suggestions="querySearch" clearable class="inline-input w-50" placeholder="请输入收费项目" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -201,7 +201,7 @@
|
|
|
<el-table-column label="金额" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationPayList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
|
|
|
+ <el-form-item :prop="'contractProjectList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true">
|
|
|
<el-input-number
|
|
|
v-model="row.amount"
|
|
|
placeholder="请输入金额"
|
|
@@ -217,7 +217,7 @@
|
|
|
<el-table-column label="备注">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item :prop="'quotationPayList.' + $index + '.remark'">
|
|
|
+ <el-form-item :prop="'contractProjectList.' + $index + '.remark'">
|
|
|
<el-input v-model="row.remark" placeholder="请输入备注" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -422,8 +422,8 @@ const openProduct = ref(false);
|
|
|
const formData = reactive({
|
|
|
data: {
|
|
|
amount: undefined,
|
|
|
- quotationProductList: [],
|
|
|
- quotationPayList: [],
|
|
|
+ contractProductList: [],
|
|
|
+ contractProjectList: [],
|
|
|
contractShipmentList: [],
|
|
|
},
|
|
|
});
|
|
@@ -780,7 +780,7 @@ const handlePerson = (item) => {
|
|
|
};
|
|
|
const pushGoods = (goods) => {
|
|
|
if (goods && goods.length > 0) {
|
|
|
- formData.data.quotationProductList = formData.data.quotationProductList.concat(
|
|
|
+ formData.data.contractProductList = formData.data.contractProductList.concat(
|
|
|
goods.map((item) => {
|
|
|
let fileUrl = "";
|
|
|
if (item.fileList && item.fileList.length > 0) {
|
|
@@ -901,9 +901,9 @@ const onPreviewFile = (file) => {
|
|
|
};
|
|
|
const submitHandoverForm = () => {
|
|
|
if (fileList.value && fileList.value.length > 0) {
|
|
|
- formData.data.quotationProductList[productIndex.value].remark = productRow.data.remark;
|
|
|
+ formData.data.contractProductList[productIndex.value].remark = productRow.data.remark;
|
|
|
if (fileList.value && fileList.value.length > 0) {
|
|
|
- formData.data.quotationProductList[productIndex.value].fileList = fileList.value.map((item) => {
|
|
|
+ formData.data.contractProductList[productIndex.value].fileList = fileList.value.map((item) => {
|
|
|
return {
|
|
|
id: item.raw.id,
|
|
|
fileName: item.raw.fileName,
|
|
@@ -911,23 +911,23 @@ const submitHandoverForm = () => {
|
|
|
};
|
|
|
});
|
|
|
} else {
|
|
|
- formData.data.quotationProductList[productIndex.value].fileList = [];
|
|
|
+ formData.data.contractProductList[productIndex.value].fileList = [];
|
|
|
}
|
|
|
openHandover.value = false;
|
|
|
}
|
|
|
};
|
|
|
const handleRemove = (index) => {
|
|
|
- formData.data.quotationProductList.splice(index, 1);
|
|
|
+ formData.data.contractProductList.splice(index, 1);
|
|
|
};
|
|
|
const calculationAmount = () => {
|
|
|
nextTick(() => {
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
- for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
+ if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
|
|
|
+ for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
let money = 0;
|
|
|
- if (formData.data.quotationProductList[i].quantity && formData.data.quotationProductList[i].price) {
|
|
|
- money = parseFloat(Number(formData.data.quotationProductList[i].quantity) * Number(formData.data.quotationProductList[i].price)).toFixed(2);
|
|
|
+ if (formData.data.contractProductList[i].quantity && formData.data.contractProductList[i].price) {
|
|
|
+ money = parseFloat(Number(formData.data.contractProductList[i].quantity) * Number(formData.data.contractProductList[i].price)).toFixed(2);
|
|
|
}
|
|
|
- formData.data.quotationProductList[i].amount = money;
|
|
|
+ formData.data.contractProductList[i].amount = money;
|
|
|
}
|
|
|
}
|
|
|
nextTick(() => {
|
|
@@ -937,31 +937,31 @@ const calculationAmount = () => {
|
|
|
};
|
|
|
const totalAmount = () => {
|
|
|
let money = 0;
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
- for (let i = 0; i < formData.data.quotationProductList.length; i++) {
|
|
|
- if (formData.data.quotationProductList[i].amount) {
|
|
|
- money = parseFloat(Number(money) + Number(formData.data.quotationProductList[i].amount)).toFixed(2);
|
|
|
+ if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
|
|
|
+ for (let i = 0; i < formData.data.contractProductList.length; i++) {
|
|
|
+ if (formData.data.contractProductList[i].amount) {
|
|
|
+ money = parseFloat(Number(money) + Number(formData.data.contractProductList[i].amount)).toFixed(2);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
|
|
|
- for (let i = 0; i < formData.data.quotationPayList.length; i++) {
|
|
|
- if (formData.data.quotationPayList[i].amount) {
|
|
|
- money = parseFloat(Number(money) + Number(formData.data.quotationPayList[i].amount)).toFixed(2);
|
|
|
+ if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
|
|
|
+ for (let i = 0; i < formData.data.contractProjectList.length; i++) {
|
|
|
+ if (formData.data.contractProjectList[i].amount) {
|
|
|
+ money = parseFloat(Number(money) + Number(formData.data.contractProjectList[i].amount)).toFixed(2);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
formData.data.amount = money;
|
|
|
};
|
|
|
const clickAdd = () => {
|
|
|
- if (formData.data.quotationPayList && formData.data.quotationPayList.length > 0) {
|
|
|
- formData.data.quotationPayList.push({ payName: "", amount: undefined, remark: "" });
|
|
|
+ if (formData.data.contractProjectList && formData.data.contractProjectList.length > 0) {
|
|
|
+ formData.data.contractProjectList.push({ payName: "", amount: undefined, remark: "" });
|
|
|
} else {
|
|
|
- formData.data.quotationPayList = [{ payName: "", amount: undefined, remark: "" }];
|
|
|
+ formData.data.contractProjectList = [{ payName: "", amount: undefined, remark: "" }];
|
|
|
}
|
|
|
};
|
|
|
const handleDelete = (index) => {
|
|
|
- formData.data.quotationPayList.splice(index, 1);
|
|
|
+ formData.data.contractProjectList.splice(index, 1);
|
|
|
};
|
|
|
const querySearch = (queryString, callback) => {
|
|
|
proxy.post("/quotationPay/page", { payName: queryString }).then((res) => {
|
|
@@ -993,7 +993,7 @@ const clickDelete = (index) => {
|
|
|
const handleSubmit = async () => {
|
|
|
let status = await submit.value.handleSubmit(() => {});
|
|
|
if (status) {
|
|
|
- if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
|
|
|
+ if (formData.data.contractProductList && formData.data.contractProductList.length > 0) {
|
|
|
return true;
|
|
|
} else {
|
|
|
ElMessage("请添加至少一件商品");
|