jsk 询价管理

This commit is contained in:
skjia 2025-07-20 12:36:08 +08:00
parent 71b4067b19
commit 43f63e365e
3 changed files with 258 additions and 212 deletions

View File

@ -23,7 +23,7 @@ export function getMaterialListApi(data) {
//查询供应商列表 isPaging 0不分页 2分页
export function supplierPageApi(data) {
return request({
url: '/smart-canteen/ims_supplier/list',
url: '/smart-canteen/ims_inquiry_supplier/list',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
@ -118,7 +118,7 @@ export function delPurchaseContractApi(data) {
//获取采购询价分页列表
export function goodsInquiryPageApi(data) {
return request({
url: '/smart-canteen/ims_purchase_inquiry/list',
url: '/smart-canteen/ims_inquiry/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
@ -133,8 +133,8 @@ export function goodsInquiryPageApi(data) {
//获取采购询价分页详情
export function getGoodsInquiryInfoApi(data) {
return request({
url: '/smart-canteen/ims_purchase_inquiry/'+data.inquiryId,
method: 'get',
url: '/smart-canteen/ims_inquiry/'+data.inquiryId,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
@ -143,7 +143,7 @@ export function getGoodsInquiryInfoApi(data) {
// 新增采购询价
export function addGoodsInquiryApi(data) {
return request({
url: '/smart-canteen/ims_purchase_inquiry',
url: '/smart-canteen/ims_inquiry',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
@ -154,7 +154,7 @@ export function addGoodsInquiryApi(data) {
// 修改采购询价
export function editGoodsInquiryApi(data) {
return request({
url: '/smart-canteen/ims_purchase_inquiry/edit',
url: '/smart-canteen/ims_inquiry/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
@ -173,7 +173,6 @@ export function delGoodsInquiryApi(data) {
})
}
// -------------生产计划---------------
//获取生产计划分页列表
export function productionPlanPageApi(data) {

View File

@ -58,8 +58,8 @@
<el-form-item label="收货地址" prop="address">
<el-input v-model="baseInfo.address" placeholder="请输入收货地址" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="baseInfo.remark" placeholder="请输入备注" maxlength="30" clearable style="width: 240px"/>
<el-form-item label="备注" prop="inquiryNotes">
<el-input v-model="baseInfo.inquiryNotes" placeholder="请输入备注" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
</el-form>
</div>
@ -281,11 +281,13 @@ export default {
//
getGoodsInquiryInfoApi(param).then((response) => {
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.baseInfo.supplierIds= this.baseInfo.supplierIdstr.split(",");
});
},
//
@ -406,6 +408,10 @@ export default {
param.requestArrivalTime = this.formatDateTime(this.baseInfo.requestArrivalTime)
param.status=1
param.detailList = []
if(param.supplierIds.length==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
this.noMaterial = false;
if(this.materialList.length>0){
this.materialList.forEach(item=>{
@ -430,6 +436,15 @@ export default {
}else{
this.loadingBtn=true;
if (this.baseInfo.inquiryId != undefined) {
console.log("param",param);
if(param.supplierIds.length==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
if(param.supplierIds.detailList==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
editGoodsInquiryApi(param).then((response) => {
this.$modal.msgSuccess("修改成功");
this.loadingBtn=false
@ -438,6 +453,15 @@ export default {
this.loadingBtn=false
});
} else {
console.log("param",param);
if(param.supplierIds.length==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
if(param.supplierIds.detailList==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
addGoodsInquiryApi(param).then((response) => {
this.$modal.msgSuccess("保存成功");
this.loadingBtn=false
@ -462,6 +486,10 @@ export default {
param.requestArrivalTime = this.formatDateTime(this.baseInfo.requestArrivalTime)
param.status=2
param.detailList = []
if(param.supplierIds.length==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
this.noMaterial = false;
if(this.materialList.length>0){
this.materialList.forEach(item=>{
@ -486,6 +514,15 @@ export default {
}else{
this.loadingBtn=true;
if (this.baseInfo.inquiryId != undefined) {
console.log("param",param);
if(param.supplierIds.length==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
if(param.supplierIds.detailList==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
editGoodsInquiryApi(param).then((response) => {
this.$modal.msgSuccess("修改成功");
this.loadingBtn=false
@ -494,6 +531,15 @@ export default {
this.loadingBtn=false
});
} else {
console.log("param",param);
if(param.supplierIds.length==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
if(param.supplierIds.detailList==0){
this.$modal.msgError("表格数据请填写完整!");
return;
}
addGoodsInquiryApi(param).then((response) => {
this.$modal.msgSuccess("保存成功");
this.loadingBtn=false

View File

@ -81,25 +81,25 @@
<el-table-column label="报价结束时间" align="center" prop="endTime" :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>
<span v-if="scope.row.status==1">--</span>
<span v-if="scope.row.status==3">进行中</span>
<span v-if="scope.row.status==2">已决价</span>
<span v-if="scope.row.status==5">已取消</span>
</template>
</el-table-column>
<el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.orderStatus==1">待提交</span>
<span v-if="scope.row.orderStatus==2">已提交</span>
<span v-if="scope.row.status==1">待提交</span>
<span v-if="scope.row.status!=1">已提交</span>
</template>
</el-table-column>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<el-table-column label="邀请供应商(家)" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="已报价供应商(家)" align="center" prop="" :show-overflow-tooltip="true" />
<el-table-column label="邀请供应商(家)" align="center" prop="inquirySupplierNum" :show-overflow-tooltip="true" />
<el-table-column label="已报价供应商(家)" align="center" prop="supplierNum" :show-overflow-tooltip="true" />
<el-table-column label="中选状态" align="center" prop="status" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.status==1">已中选</span>
<span v-if="scope.row.status==2">未中选</span>
<span v-if="scope.row.status==3">已中选</span>
<span v-if="scope.row.status!=3">未中选</span>
</template>
</el-table-column>
<el-table-column label="中选供应商" align="center" prop="" :show-overflow-tooltip="true" />
@ -113,19 +113,19 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.orderStatus==1"
icon="el-icon-edit" v-if="scope.row.status==1"
@click="handleUpdate(scope.row)"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
icon="el-icon-edit" v-if="scope.row.status==2"
@click="handleView(scope.row)"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete" v-if="scope.row.orderStatus==1"
icon="el-icon-delete" v-if="scope.row.status==1"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
@ -280,13 +280,14 @@ export default {
"orderStatus": this.queryParams.orderStatus
}
if(this.dateRange&&this.dateRange.length>0){
param.startDateTime=this.formatDateTime(this.dateRange[0])
param.endDateTime=this.formatDateTime(this.dateRange[1])
param.startTime=this.formatDateTime(this.dateRange[0])
param.endTime=this.formatDateTime(this.dateRange[1])
}else{
param.startDateTime=undefined;
param.endDateTime=undefined;
param.startTime=undefined;
param.endTime=undefined;
}
goodsInquiryPageApi(param).then(response => {
console.log("this.tableListData",response)
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;