This commit is contained in:
xd 2024-07-04 16:48:01 +08:00
parent c09a908d39
commit 6d44dd16c9
1 changed files with 30 additions and 27 deletions

View File

@ -185,7 +185,9 @@
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
<!--
<el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/> <el-table-column label="打印人" align="center" prop="quotPrintUserNickName" width="150px" v-if="$auth.hasPermi('quot:quot:changQuotPrintStatus')"/>
-->
<el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])"> <el-table-column label="OA提交状态" align="center" prop="quotOAApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION','SALES_MAN'])">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/> <dict-tag :options="dict.type.quot_oa_approval_status" :value="scope.row.quotOAApprovalStatus" v-if="scope.row.quotOAApprovalStatus!=0"/>
@ -516,32 +518,18 @@
</el-table> </el-table>
<el-divider content-position="left" class="customer_divider_text">产品信息</el-divider> <el-divider content-position="left" class="customer_divider_text">产品信息</el-divider>
<el-row :gutter="10" class="mb8"> <div style="margin-bottom: 10px">
<!--<el-col :span="1.5"> <el-button v-if="checkRole(['SALES_MAN','QUOT','PRICE_VERIFICATION'])" type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial">删除</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">添加</el-button> <el-button v-if="checkRole(['QUOT','PRICE_VERIFICATION'])" type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col> <el-select style="float: right;width:230px" size="mini" v-model="form.quotRbDateUid" :disabled="true">
<el-col :span="1.5"> <el-option
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">删除</el-button> v-for="item in versionList"
</el-col>--> :key="item.value"
<!-- <el-col :span="1.5"> :label="item.label"
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-if="(this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null) || checkRole(['QUOT','PRICE_VERIFICATION'])">导入</el-button> :value="item.value"/>
</el-col>--> </el-select>
<el-col :span="1.5"> </div>
<el-select v-model="form.quotRbDateUid" :disabled="true">
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport">导入</el-button>
</el-col>
<el-col :span="1.5" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleExportMaterial">导出</el-button>
</el-col>
</el-row>
<el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial"> <el-table :data="quotMaterialList" height="300px" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
<el-table-column type="selection" width="80" align="center" /> <el-table-column type="selection" width="80" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/> <el-table-column label="序号" align="center" prop="index" width="50"/>
@ -1079,7 +1067,7 @@
</style> </style>
<script> <script>
import { NumberAdd } from '@/utils/number';// import { NumberAdd } from '@/utils/number';//
import { versionList } from "@/api/redBook/redBook"; import { toDecimal,versionList } from "@/api/redBook/redBook";
import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot"; import { changQuotPrintStatus,listQuot, getQuot, getReturnUpdateQuot,getAllPass,getAllReject, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, commitJswQuot, commitOAQuot, feedbackQuot, madeQuot, rejectQuot, setHandle } from "@/api/quot/quot";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
@ -1711,6 +1699,10 @@ export default {
this.quotMaterialList = quotMaterialList.filter(function(item) { this.quotMaterialList = quotMaterialList.filter(function(item) {
return checkedQuotMaterial.indexOf(item.index) == -1 return checkedQuotMaterial.indexOf(item.index) == -1
}); });
this.form.quotQuantity = this.sumMatSl;
this.form.quotTotalPrice = this.sumMatQuotAllPrice;
this.form.quotMaterialsCount = this.quotMaterialList.length;
} }
}, },
@ -1975,6 +1967,17 @@ export default {
const res = new Map(); const res = new Map();
return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1)); return arr.filter((arr) => !res.has(arr.userName) && res.set(arr.userName, 1));
}, },
},
computed: {
//
sumMatSl() {
const allMatSl = this.quotMaterialList.reduce((sum, row) => sum + parseFloat(row.matSl), 0);
return toDecimal(allMatSl);
},
sumMatQuotAllPrice() {
const allMatQuotAllPrice = this.quotMaterialList.reduce((sum, row) => sum + parseFloat(row.matQuotAllPrice), 0);
return toDecimal(allMatQuotAllPrice);
},
} }
}; };
</script> </script>