jsk 报价

This commit is contained in:
skjia 2025-07-20 15:12:36 +08:00
parent 43f63e365e
commit dfdef28161
4 changed files with 280 additions and 224 deletions

View File

@ -162,6 +162,28 @@ export function editGoodsInquiryApi(data) {
data: data
})
}
// 修改采购报价
export function editGoodsQuotationApi(data) {
return request({
url: '/smart-canteen/ims_quote/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
export function getGoodsInquiryDetailInfoApi(data) {
return request({
url: '/smart-canteen/ims_quote/detail',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除采购询价
export function delGoodsInquiryApi(data) {
return request({

View File

@ -1,22 +1,22 @@
<template>
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<el-descriptions-item>
<template slot="label">询价单号</template>
{{baseInfo.inquiryCode}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">询价标题</template>
{{baseInfo.title}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">询价状态</template>
<span v-if="baseInfo.inquiryState==1">未开始</span>
<span v-if="baseInfo.inquiryState==2">进行中</span>
<span v-if="baseInfo.inquiryState==3">已结束</span>
<span v-if="baseInfo.inquiryState==4">已取消</span>
</el-descriptions-item>
<span v-if="baseInfo.status==1">未开始</span>
<span v-if="baseInfo.status==2">进行中</span>
<span v-if="baseInfo.status==3">已结束</span>
<span v-if="baseInfo.status==5">已取消</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">报价时间</template>
{{ baseInfo.startTime }} - {{ baseInfo.startTime }}
@ -24,78 +24,78 @@
<el-descriptions-item>
<template slot="label">要求到货时间</template>
{{baseInfo.requestArrivalTime}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">联系人</template>
{{ baseInfo.linkMan }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">联系电话</template>
{{ baseInfo.phone }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">收货地址</template>
{{ baseInfo.address }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">所属区域</template>
{{ baseInfo.areaName }}
</el-descriptions-item>
{{ baseInfo.area }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">询价供应商</template>
</el-descriptions-item>
{{ baseInfo.supplierNames }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">备注</template>
{{ baseInfo.remark }}
</el-descriptions-item>
</el-descriptions>
{{ baseInfo.inquiryNotes }}
</el-descriptions-item>
</el-descriptions>
</div>
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
<div>
货品信息
</div>
</div>
</div>
<div style="width: 100%;height: 400px;overflow-y: auto;">
<el-table v-loading="loading" :data="materialLis" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="materialList" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
<el-table-column label="序号" align="center" width="80" type="index" />
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.salesMode==1">按份</span>
<span v-if="scope.row.salesMode==2">称重</span>
</template> -->
</el-table-column>
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true" />
<el-table-column label="报价数量" align="center" prop="quoteNum" :show-overflow-tooltip="true" />
</el-table-column>
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true" />
<el-table-column label="报价数量" align="center" prop="quoteNum" :show-overflow-tooltip="true" />
<el-table-column label="中选单价" align="center" prop="singlePrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.singlePrice/100).toFixed(2) }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="中选总价(元)" align="center" prop="totalPrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.totalPrice/100).toFixed(2) }}</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
</div>
<div style="width: 100%;height: 80px;padding: 10px;background: #FFF;border-radius: 10px;display: flex;align-items: center;justify-content: center;">
<!-- <el-button type="primary" @click="confirmSave" :loading="loadingBtn">保存草稿</el-button> -->
<el-button @click="jumpList">返回</el-button>
</div>
</div>
</div>
</template>
<script>
<script>
import { getGoodsInquiryInfoApi } from "@/api/foodManage/purchaseManage";
export default {
name: "GoodsInquiryDetail",
@ -105,12 +105,13 @@ export default {
goodsInquiryData:{},//
loading:false,
loadingBtn:false,
baseInfo: {
baseInfo: {
orderTitle:undefined,
contractType:undefined,
areaId:undefined,
canteenId:undefined,
dateRange:[],
canteenId:undefined,
materialList:[],
dateRange:[],
},
//
baseRules: {
@ -137,19 +138,19 @@ export default {
canteenOptions:[],
supplierOptions:[],
stallOptions:[],
pickerOptions: {
pickerOptions: {
disabledDate(v) {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
}
},
materialLis:[],
materialLis:[],
openDialog:false,
materialTreeOptions:[],
materialTreeOptions:[],
//
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 10,
},
//
total: 0,
@ -159,14 +160,14 @@ export default {
noMaterial:false,
};
},
created() {
if(this.$route.query.goodsInquiryData){
created() {
if(this.$route.query.goodsInquiryData){
this.goodsInquiryData = JSON.parse(this.$route.query.goodsInquiryData)
this.getContractInfo()
}
},
watch:{
'$route.query.goodsInquiryData':function(newId, oldId) {
'$route.query.goodsInquiryData':function(newId, oldId) {
if(newId){
this.goodsInquiryData = JSON.parse(newId)
this.getContractInfo()
@ -176,35 +177,36 @@ export default {
}
},
},
methods: {
methods: {
//
jumpList() {
const obj = { path: "/foodManage/purchaseManage/goodsInquiryDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/foodManage/purchaseManage/goodsInquiry" }); //
this.$router.replace({ path: "/foodManage/purchaseManage/goodsInquiry" }); //
},
getContractInfo(){
console.log(this.goodsInquiryData)
console.log(this.goodsInquiryData)
let param = {
inquiryId:this.goodsInquiryData.inquiryId
}
//
getGoodsInquiryInfoApi(param).then((response) => {
this.baseInfo = response.data;
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
this.materialList = this.baseInfo.detailList;
this.baseInfo = response.data;
console.log("this.baseInfo",this.baseInfo)
// this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
this.materialList = this.baseInfo.detailList;
// supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
// this.supplierOptions = response.rows||[];
// });
});
},
// this.supplierOptions = response.rows||[];
// });
});
},
//
handleSelectionChange(selection) {
// this.batchIds1 = selection.map(item => item.tradeId)
// this.single = selection.length !== 1
// this.multiple = !selection.length
},
//
formatDate(date) {
// YYYY-MM-DD
@ -225,7 +227,7 @@ export default {
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
}
}
};
</script>
@ -267,10 +269,10 @@ export default {
align-items: center;
cursor: pointer;
}
.dish-name:hover{
.dish-name:hover{
background-color:rgba(0, 0, 0, 0.1);
color: #4b80fd;
}
}
.dialog-center{
width: 10%;
@ -322,4 +324,4 @@ export default {
border: 1px solid #fff;
cursor: pointer;
}
</style>
</style>

View File

@ -1,27 +1,27 @@
<template>
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<el-descriptions-item>
<template slot="label">询价单号</template>
{{baseInfo.inquiryCode}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">询价标题</template>
{{baseInfo.title}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">联系人</template>
{{ baseInfo.linkMan }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">联系电话</template>
{{ baseInfo.phone }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">送货地址</template>
{{ baseInfo.address }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">交货时间</template>
<el-date-picker
@ -29,8 +29,8 @@
type="date" align="right" placeholder="请选择交货时间"
format="yyyy-MM-dd" style="width: 240px;"
:picker-options="pickerOptions" @change="baseInfo.arrivalTime=formatDate(baseInfo.arrivalTime)">
</el-date-picker>
</el-descriptions-item>
</el-date-picker>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">报价时间</template>
{{ baseInfo.startTime }} - {{ baseInfo.startTime }}
@ -38,45 +38,64 @@
<el-descriptions-item>
<template slot="label">要求到货时间</template>
{{baseInfo.requestArrivalTime}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">总金额</template>
{{ baseInfo.bidTotalPrice }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">备注</template>
{{ baseInfo.remark }}
</el-descriptions-item>
</el-descriptions>
</div>
{{ baseInfo.inquiryNotes }}
</el-descriptions-item>
<el-descriptions-item label="所属区域" prop="areaId">
<el-cascader v-model="baseInfo.areaId"
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" @change="handleAreaChange">
</el-cascader>
</el-descriptions-item>
<el-descriptions-item label="邀请供应商" prop="supplierId">
<el-select v-model="baseInfo.supplierId" @change="handleSupplierChange" placeholder="请选择供应商" style="width: 100%;">
<el-option v-for="item in supplierOptions"
:key="item.supplierId"
:label="item.supplierName"
:value="item.supplierId"
></el-option>
</el-select>
</el-descriptions-item>
</el-descriptions>
</div>
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
<div>
询价货品信息
</div>
</div>
</div>
<div style="width: 100%;height: 400px;overflow-y: auto;">
<el-table v-loading="loading" :data="materialList" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
<el-table-column label="序号" align="center" width="80" type="index" />
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="采购数量" align="center" prop="purNum" :show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g, '').replace(/^(\d*\.\d{2}).*$/, '$1'))"/>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.purNum*scope.row.singlePrice).toFixed(4) }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="notes" :show-overflow-tooltip="true"></el-table-column>
</el-table-column>
<el-table-column label="备注" align="center" prop="notes" :show-overflow-tooltip="true"></el-table-column>
</el-table>
</div>
</div>
@ -84,7 +103,7 @@
<el-button type="success" plain @click="confirmSubmit" :loading="loadingBtn">提交</el-button>
<el-button @click="jumpList">返回</el-button>
</div>
<!-- 选择菜品 -->
<el-dialog title="选择货品" :visible.sync="openDialog" width="65%" append-to-body >
<div style="width: 100%;height:620px;">
@ -92,11 +111,11 @@
<el-form-item label="货品类别" prop="materialTypeIds">
<el-cascader v-model="queryParams.materialTypeIds"
:options="materialTreeOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
:props="{
:props="{
multiple: true,
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'categoryName'
value:'id',label:'categoryName'
}" collapse-tags>
</el-cascader>
</el-form-item>
@ -119,21 +138,21 @@
</template>
</el-table-column>
<!-- <el-table-column label="图片" align="center" prop="" :show-overflow-tooltip="true" /> -->
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品编码" align="center" prop="materialCode" :show-overflow-tooltip="true" />
<el-table-column label="货品名称" align="center" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="货品类别" align="center" prop="materialTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="货品规格" align="center" prop="size" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.salesMode==1">按份</span>
<span v-if="scope.row.salesMode==2">称重</span>
</template> -->
</el-table-column>
</el-table-column>
<el-table-column label="单价(元)" align="center" prop="unitPrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.unitPrice/100).toFixed(2)||"" }}</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
@ -141,21 +160,21 @@
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="confirmChosen"> </el-button>
<el-button @click="openDialog=false"> </el-button>
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import { imgUpLoadTwo } from '@/api/system/upload'
import { systemAreaTreeApi } from "@/api/base/stall";
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/stockManage";
import { getGoodsInquiryInfoApi,addGoodsInquiryApi,editGoodsInquiryApi } from "@/api/foodManage/purchaseManage";
import { systemAreaTreeApi } from "@/api/base/stall";
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/stockManage";
import { getGoodsInquiryInfoApi,addGoodsInquiryApi,editGoodsQuotationApi,getGoodsInquiryDetailInfoApi } from "@/api/foodManage/purchaseManage";
export default {
name: "SupplierQuotationEdit",
dicts: [],
@ -164,10 +183,10 @@ export default {
supplierQuotationData:{},//
loading:false,
loadingBtn:false,
baseInfo: {
baseInfo: {
contractType:undefined,
areaId:undefined,
canteenId:undefined,
canteenId:undefined,
},
//
baseRules: {
@ -185,7 +204,7 @@ export default {
],
supplierIds: [
{ required: true, message: "邀请供应商不能为空", trigger: "change" }
],
],
phone: [
{
pattern: /^1[3456789]\d{9}$/,
@ -197,8 +216,8 @@ export default {
treeAreaOptions:[],
canteenOptions:[],
stallOptions:[],
supplierOptions:[],
pickerOptions: {
supplierOptions:[],
pickerOptions: {
disabledDate(v) {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
}
@ -206,12 +225,12 @@ export default {
materialList:[],//-
batchIds:[],//--
openDialog:false,
materialTreeOptions:[],
materialTreeOptions:[],
queryParams: { // --
pageNum: 1,
pageSize: 10,
},
pageSize: 10,
},
pickerOptions2: {
disabledDate(v) {
return v.getTime() < (new Date().getTime() - 86400000) ||v.getTime() > (new Date().getTime() + 3600 * 1000 * 24 * 60);// - 86400000
@ -225,19 +244,19 @@ export default {
total: 0, //
tableListData: [],//-
batchChosenMaterial:[],//--
noMaterial:false,
noMaterial:false,
};
},
created() {
this.getAreaTreeData()
this.getMaterialTree()
if(this.$route.query.supplierQuotationData){
this.getAreaTreeData()
this.getMaterialTree()
if(this.$route.query.supplierQuotationData){
this.supplierQuotationData = JSON.parse(this.$route.query.supplierQuotationData)
this.getContractInfo()
}
},
watch:{
watch:{
'$route.query.supplierQuotationData':function(newId, oldId) {
if(newId){
this.supplierQuotationData = JSON.parse(newId)
@ -248,27 +267,27 @@ export default {
}
},
},
methods: {
methods: {
//
jumpList() {
const obj = { path: "/foodManage/supplierFunction/supplierQuotationEdit" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); //
this.$router.replace({ path: "/foodManage/supplierFunction/supplierQuotation" }); //
},
getContractInfo(){
console.log(this.supplierQuotationData)
console.log(this.supplierQuotationData)
let param = {
inquiryId:this.supplierQuotationData.inquiryId
}
//
getGoodsInquiryInfoApi(param).then((response) => {
this.baseInfo = response.data;
this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
this.materialList = this.baseInfo.detailList;
this.baseInfo = response.data;
this.$set(this.baseInfo,'dateRange',[this.baseInfo.startTime,this.baseInfo.endTime])
this.materialList = this.baseInfo.detailList;
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
this.supplierOptions = response.rows||[];
});
});
this.supplierOptions = response.rows||[];
});
});
},
//
getAreaTreeData() {
@ -284,14 +303,26 @@ export default {
}
},
//-
handleAreaChange(e){
handleAreaChange(e){
this.getSupplierData()
},
},
/** 查询供应商下拉结构 */
getSupplierData() {
getSupplierData() {
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
this.supplierOptions = response.rows||[];
});
this.supplierOptions = response.rows||[];
});
},
handleSupplierChange(e){
let param = {
inquiryId:this.supplierQuotationData.inquiryId,
supplierId:this.baseInfo.supplierId
}
console.log("detailparam",param)
//
getGoodsInquiryDetailInfoApi(param).then((response) => {
console.log('response',response);
this.materialList = response.data;
});
},
/** 查询货品类别下拉树结构 */
getMaterialTree() {
@ -299,19 +330,19 @@ export default {
// goodsType:1
}
systemMaterialTreeApi(param).then((response) => {
this.materialTreeOptions = response.data;
this.materialTreeOptions = response.data;
});
},
},
//
changeDateRange(e){
//this.formatDate(e[0])
changeDateRange(e){
//this.formatDate(e[0])
},
//
handleSelectionChange(selection) {
this.batchIds = selection.map(item => item.materialId)
},
//
delMaterial(){
delMaterial(){
this.batchIds.forEach(ID=>{
let index = this.materialList.findIndex(v=>v.materialId==ID)
if(index>-1){
@ -325,20 +356,20 @@ export default {
this.openDialog=true
this.resetQuery()
setTimeout(()=>{
this.$refs.multipleTable1.clearSelection()
},300)
this.$refs.multipleTable1.clearSelection()
},300)
}else{
this.$modal.msgError("请先选择区域");
}
},
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
@ -350,7 +381,7 @@ export default {
"pageNum": this.queryParams.pageNum,
"areaId": this.baseInfo.areaId,
"materialName": this.queryParams.materialName,
"materialCode": this.queryParams.materialCode,
"materialCode": this.queryParams.materialCode,
"materialTypeIds": this.queryParams.materialTypeIds,
}
getMaterialListApi(param).then(response => {
@ -362,62 +393,63 @@ export default {
handleSelectionChange2(selection) {
this.batchChosenMaterial = selection;
this.batchChosenMaterial.forEach(item=>{
this.$set(item,"purNum",0)
this.$set(item,"purNum",0)
})
},
confirmChosen(){
if(this.batchChosenMaterial.length>0){
this.loading = true
this.materialList = this.batchChosenMaterial;
this.materialList.forEach(item=>{
this.$set(item,"unitPrice",item.unitPrice/100)
this.materialList = this.batchChosenMaterial;
this.materialList.forEach(item=>{
this.$set(item,"unitPrice",item.unitPrice/100)
})
setTimeout(()=>{
this.loading = false
this.openDialog=false
},500)
}
},
},500)
}
},
//
confirmSubmit(){
let param = Object.assign({},this.baseInfo);
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
param.detailList = []
confirmSubmit(){
let param = Object.assign({},this.baseInfo);
param.arrivalTime = this.formatDateTime(this.baseInfo.arrivalTime)
param.detailList = []
this.noMaterial = false;
if(this.materialList.length>0){
if(this.materialList.length>0){
this.materialList.forEach(item=>{
if(item.singlePrice==0){
this.noMaterial = true
}else{
let obj = Object.assign({}, item)
obj.quoteNum = Number(obj.purNum)
obj.singlePrice = Number(obj.singlePrice)*100
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
obj.singlePrice = Number(obj.singlePrice)*100
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.purNum))
param.detailList.push(obj)
}
})
}
}
})
}
if(this.noMaterial){
this.$modal.msgError("表格数据请填写完整!");
}else{
this.noMaterial = true;
if(this.materialList.length>0){
this.noMaterial = false;
}
this.noMaterial = false;
}
console.log(param)
if(this.noMaterial){
this.$modal.msgError("请添加货品!");
}else{
this.loadingBtn=true;
editGoodsInquiryApi(param).then((response) => {
this.loadingBtn=true;
console.log("param",param)
editGoodsQuotationApi(param).then((response) => {
this.$modal.msgSuccess("修改成功");
this.loadingBtn=false
this.jumpList()
this.jumpList()
}).catch(() => {
this.loadingBtn=false
});
}
}
});
}
}
},
//
@ -440,7 +472,7 @@ export default {
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
}
}
};
</script>
@ -482,10 +514,10 @@ export default {
align-items: center;
cursor: pointer;
}
.dish-name:hover{
.dish-name:hover{
background-color:rgba(0, 0, 0, 0.1);
color: #4b80fd;
}
}
.dialog-center{
width: 10%;
@ -537,4 +569,4 @@ export default {
border: 1px solid #fff;
cursor: pointer;
}
</style>
</style>

View File

@ -1,29 +1,29 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="询价单号" prop="inquiryCode">
<el-input v-model="queryParams.inquiryCode" placeholder="请输入询价单号" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
</el-form-item>
<el-form-item label="询价标题" prop="title">
<el-input v-model="queryParams.title" placeholder="请输入询价标题" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="询价状态" prop="inquiryState">
</el-form-item>
<el-form-item label="询价状态" prop="inquiryState">
<el-select v-model="queryParams.inquiryState" placeholder="请选择询价状态" style="width: 240px;">
<el-option label="未开始" :value="1"></el-option>
<el-option label="进行中" :value="2"></el-option>
<el-option label="已结束" :value="3"></el-option>
<el-option label="已取消" :value="4"></el-option>
</el-select>
</el-form-item>
<el-option label="进行中" :value="2"></el-option>
<el-option label="已结束" :value="3"></el-option>
<el-option label="已取消" :value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -33,38 +33,38 @@
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="询价单号" align="center" prop="inquiryCode" :show-overflow-tooltip="true" />
<el-table-column label="询价标题" align="center" prop="title" :show-overflow-tooltip="true" />
<el-table-column label="询价单号" align="center" prop="inquiryCode" :show-overflow-tooltip="true" />
<el-table-column label="询价标题" align="center" prop="title" :show-overflow-tooltip="true" />
<el-table-column label="询价状态" align="center" prop="inquiryState" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.inquiryState==1">未开始</span>
<span v-if="scope.row.inquiryState==2">进行中</span>
<span v-if="scope.row.inquiryState==3">已结束</span>
<span v-if="scope.row.inquiryState==4">已取消</span>
</template>
</el-table-column>
<el-table-column label="报价开始时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
<el-table-column label="报价结束时间" align="center" prop="endTime" :show-overflow-tooltip="true" />
<el-table-column label="决标时间" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<span v-if="scope.row.inquiryState==3">已结束</span>
<span v-if="scope.row.inquiryState==4">已取消</span>
</template>
</el-table-column>
<el-table-column label="报价开始时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
<el-table-column label="报价结束时间" align="center" prop="endTime" :show-overflow-tooltip="true" />
<el-table-column label="决标时间" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<el-table-column label="决标总价(元)" align="center" prop="bidTotalPrice" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span>{{ (scope.row.bidTotalPrice/100).toFixed(2) }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
<template slot-scope="scope">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.orderStatus==1"
@click="handleUpdate(scope.row)"
icon="el-icon-edit" v-if="scope.row.status==2"
@click="handleUpdate(scope.row)"
>报价</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
@click="handleView(scope.row)"
>详情</el-button>
icon="el-icon-edit" v-if="scope.row.status>2"
@click="handleView(scope.row)"
>详情</el-button>
</template>
</el-table-column>
</el-table>
@ -84,7 +84,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -95,9 +95,9 @@
</template>
<script>
import { systemAreaTreeApi } from "@/api/base/stall";
import { systemAreaTreeApi } from "@/api/base/stall";
import { drpWareHousePageApi } from "@/api/foodManage/stockManage";
import { goodsInquiryPageApi,delGoodsInquiryApi } from "@/api/foodManage/purchaseManage";
import { goodsInquiryPageApi,delGoodsInquiryApi } from "@/api/foodManage/purchaseManage";
export default {
name: "",
@ -122,11 +122,11 @@ export default {
//
title: "",
//
open: false,
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 10,
},
treeAreaOptions:[],//
wareHouseOptions:[],//
@ -171,8 +171,8 @@ export default {
}
};
},
created() {
this.getAreaTreeData();
created() {
this.getAreaTreeData();
// this.getWareHouseData()
this.getList();
},
@ -180,18 +180,18 @@ export default {
//
getAreaTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeAreaOptions = response.data;
this.treeAreaOptions = response.data;
});
},
handleAreaChange(e){
// this.getWareHouseData()
},
},
/** 查询货品下拉结构 */
getWareHouseData() {
getWareHouseData() {
drpWareHousePageApi({ areaId:this.queryParams.areaId }).then((response) => {
this.wareHouseOptions = response.rows||[];
this.$set(this.queryParams,'warehouseId',null)
});
this.$set(this.queryParams,'warehouseId',null)
});
},
/** 搜索按钮操作 */
handleQuery() {
@ -199,7 +199,7 @@ export default {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
resetQuery() {
this.dateRange = this.defaultDateRange()
this.resetForm("queryForm");
this.handleQuery();
@ -208,32 +208,32 @@ export default {
getList() {
this.loading = true;
let param = {
"pageNum": this.queryParams.pageNum,
"pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize,
"orderStatus": 2,
"inquiryCode": this.queryParams.inquiryCode,
"title": this.queryParams.title,
"inquiryState": this.queryParams.inquiryState,
}
"orderStatus": 2,
"inquiryCode": this.queryParams.inquiryCode,
"title": this.queryParams.title,
"inquiryState": this.queryParams.inquiryState,
}
if(this.dateRange&&this.dateRange.length>0){
param.startDateTime=this.formatDateTime(this.dateRange[0])
param.endDateTime=this.formatDateTime(this.dateRange[1])
}else{
param.startDateTime=undefined;
param.endDateTime=undefined;
}
}
goodsInquiryPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
});
},
},
/** 修改按钮操作 */
handleView(row) {
handleView(row) {
this.$router.push({ path: "/foodManage/supplierFunction/supplierQuotationDetail",query: {supplierQuotationData:JSON.stringify(row)} });
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate(row) {
this.$router.push({ path: "/foodManage/supplierFunction/supplierQuotationEdit",query: {supplierQuotationData:JSON.stringify(row)} });
},
//
@ -245,7 +245,7 @@ export default {
reset() {
this.form = {};
this.resetForm("form");
},
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
@ -266,16 +266,16 @@ export default {
}
});
},
defaultDateRange() {
const end = new Date(new Date().toLocaleDateString());
end.setTime(end.getTime() + 24 * 60 * 60 * 1000 -1);
const start = new Date((new Date().toLocaleDateString()));
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
start.setTime(start.getTime() - 30 * 24 * 60 * 60 * 1000);
this.start = parseInt(start.getTime() / 1000)
this.end = parseInt(end.getTime() / 1000)
return [start, end]
},
},
//
formatDate(date) {
// YYYY-MM-DD
@ -296,7 +296,7 @@ export default {
const minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
const seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
}
}
};
</script>