采购订单接口对接

This commit is contained in:
zzyuan 2025-07-03 14:28:01 +08:00
parent 3606291a95
commit 978c6f7d93
8 changed files with 460 additions and 323 deletions

View File

@ -32,6 +32,20 @@ export function supplierPageApi(data) {
})
}
// 仓库
export function drpWareHousePageApi(data) {
return request({
url: '/smart-canteen/ims_warehouse_info/listAll',
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
},
params: data
})
}
// -------------采购合同---------------
//获取采购合同分页列表
export function purchaseContractPageApi(data) {
return request({
@ -91,7 +105,7 @@ export function delPurchaseContractApi(data) {
}
// -------------采购计划---------------
//获取采购计划分页列表
export function purchasePlanPageApi(data) {
return request({
@ -148,4 +162,77 @@ export function delPurchasePlanApi(data) {
//"merchant-id":"378915229716713472",
}
})
}
}
// -------------采购计划---------------
//查询采购订单主列表
export function purchaseOrderPageApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/list',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data:data,
params:{
pageNum:data.pageNum,
pageSize:data.pageSize
}
})
}
//获取采购订单主详细信息
export function getPurchaseOrderInfoApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/'+data.orderGoodsId,
method: 'get',
headers: {
//"merchant-id":"378915229716713472",
}
})
}
// 新增采购订单
export function addPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 修改采购订单
export function editPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/edit',
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
},
data: data
})
}
// 删除采购订单
export function delPurchaseOrderApi(data) {
return request({
url: '/smart-canteen/ims_order_goods/del/'+data.orderGoodsIds,
method: 'post',
headers: {
//"merchant-id":"378915229716713472",
}
})
}

View File

@ -39,7 +39,7 @@
<el-form-item label="签订日期" prop="contractSigningTime">
<el-date-picker
v-model="baseInfo.contractSigningTime"
type="date" align="right"
type="date" align="right" placeholder="请选择签订日期"
format="yyyy-MM-dd" style="width: 240px;"
:picker-options="pickerOptions" @change="baseInfo.contractSigningTime=formatDate(baseInfo.contractSigningTime)">
</el-date-picker>
@ -67,7 +67,7 @@
<el-form-item label="付款日期" prop="payMoneyDate">
<el-date-picker
v-model="baseInfo.payMoneyDate"
type="date" align="right"
type="date" align="right" placeholder="请选择付款日期"
format="yyyy-MM-dd" style="width: 240px;"
:picker-options="pickerOptions" @change="baseInfo.payMoneyDate=formatDate(baseInfo.payMoneyDate)">
</el-date-picker>
@ -86,9 +86,6 @@
</el-form-item>
<el-form-item label="负责人" prop="contractPerson">
<el-input v-model="baseInfo.contractPerson" placeholder="请输入负责人" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="合同总金额" prop="contractAmount">
<el-input v-model="baseInfo.contractAmount" placeholder="请输入合同总金额" maxlength="20" clearable style="width: 240px" @input="(v)=>(baseInfo.contractAmount=v.replace(/[^\d.]/g,''))"/>
</el-form-item>
<el-form-item label="合同附件" prop="contractAttachmentList">
<el-upload
@ -249,6 +246,7 @@ export default {
areaId:undefined,
canteenId:undefined,
dateRange:[],
contractAttachmentList:[],
},
//
baseRules: {
@ -269,7 +267,10 @@ export default {
],
dateRange: [
{ required: true, message: "合同生效周期不能为空", trigger: "change" }
]
],
contractAttachmentList: [
{ required: true, message: "合同附件不能为空", trigger: "change" }
],
},
treeAreaOptions:[],
canteenOptions:[],
@ -329,8 +330,7 @@ export default {
this.baseInfo.contractAttachmentList.forEach(item=>{
this.attachmentList.push({name:item,url:item})
})
}
this.$set(this.baseInfo,"contractAmount",Number(this.baseInfo.contractAmount)/100)
}
getCanteenByAreaApi({areaId:this.baseInfo.areaId}).then((response) => {
this.canteenOptions=response.rows||[];
this.$set(this.baseInfo,"canteenId",this.baseInfo.canteenId)
@ -471,8 +471,8 @@ export default {
param.contractStartTime = this.formatDateTime(this.baseInfo.dateRange[0])
param.contractEndTime = this.formatDateTime(this.baseInfo.dateRange[1])
param.contractSigningTime = this.formatDate(this.baseInfo.contractSigningTime)
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.contractAmount = this.baseInfo.contractAmount*100;
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.contractAmount = 0;
param.commitStatus=1
param.purchaseContractDetailList = []
param.contractAttachment = ""
@ -490,6 +490,7 @@ export default {
}else{
let obj = Object.assign({}, item)
obj.singlePrice = Number(obj.singlePrice)*100
param.contractAmount = param.contractAmount+(Number(obj.singlePrice)*Number(obj.orderNum))
param.purchaseContractDetailList.push(obj)
}
})
@ -538,7 +539,7 @@ export default {
param.contractEndTime = this.formatDateTime(this.baseInfo.dateRange[1])
param.contractSigningTime = this.formatDate(this.baseInfo.contractSigningTime)
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.contractAmount = this.baseInfo.contractAmount*100;
param.contractAmount = 0;
param.commitStatus=2
param.purchaseContractDetailList = []
this.noMaterial = false;
@ -549,6 +550,7 @@ export default {
}else{
let obj = Object.assign({}, item)
obj.singlePrice = Number(obj.singlePrice)*100
param.contractAmount = param.contractAmount+(Number(obj.singlePrice)*Number(obj.orderNum))
param.purchaseContractDetailList.push(obj)
}
})
@ -595,6 +597,7 @@ export default {
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {
this.attachmentList.push(res.data)
this.baseInfo.contractAttachmentList.push(res.data.url)
} else {
this.$modal.msgError(res.msg);
}
@ -611,6 +614,7 @@ export default {
}
})
this.attachmentList.splice(sum, 1)
this.baseInfo.contractAttachmentList.splice(sum, 1)
},
//
formatDate(date) {

View File

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="searchValue">
<el-input v-model="queryParams.searchValue" placeholder="请输入用户姓名,编号,手机号" maxlength="20" clearable style="width: 240px"/>
<el-input v-model="queryParams.searchValue" placeholder="请输入合同编号,合同标题" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="合同日期">
<el-date-picker

View File

@ -1,73 +1,80 @@
<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-item>
<template slot="label">合同编号</template>
{{baseInfo.contractCode}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">合同标题</template>
{{ baseInfo.contractTitle }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">所属区域</template>
{{ baseInfo.areaName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">供应商</template>
{{ baseInfo.supplierName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">配送食堂</template>
{{ baseInfo.canteenName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">签订日期</template>
{{ baseInfo.contractSigningTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">合同生效周期</template>
{{ baseInfo.contractStartTime }} - {{ baseInfo.contractEndTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">合同状态</template>
{{ baseInfo.deptName }}
<el-tag size="small" v-if="baseInfo.contractStatus==1">待生效</el-tag>
<el-tag size="small" v-if="baseInfo.contractStatus==2">履行中</el-tag>
<el-tag size="small" v-if="baseInfo.contractStatus==3">已失效</el-tag>
<el-tag size="small" v-if="baseInfo.contractStatus==4">已终止</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">合同附件</template>
<div v-for="(item,index) in baseInfo.contractAttachmentList" :key="index">
<a :href="item" download="demo">{{ item }}</a>
</div>
</el-descriptions-item>
</el-descriptions>
<el-descriptions style="margin-bottom: 20px;" title="付款信息" :column="4" size="medium" border>
<el-descriptions-item>
<template slot="label">付款方式</template>
<span v-if="baseInfo.payMoneyStyle==1">一次性付款</span>
<span v-if="baseInfo.payMoneyStyle==2">分期付款</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">付款日期</template>
{{ baseInfo.payMoneyDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">收款银行</template>
{{ baseInfo.collectMoneyBank }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">收款账户名称</template>
{{ baseInfo.collectMoneyAccountName }}
</el-descriptions-item>
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<el-descriptions-item>
<template slot="label">采购订单号</template>
{{baseInfo.orderGoodsCode}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">订单标题</template>
{{ baseInfo.orderTitle }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">交货日期</template>
{{ baseInfo.requestArrivalTime }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">所属区域</template>
{{ baseInfo.areaName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">供应商</template>
{{ baseInfo.supplierName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">所属食堂</template>
{{ baseInfo.canteenName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">所属档口</template>
{{ baseInfo.stallName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">送货仓库</template>
{{ baseInfo.warehouseName }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">送货地址</template>
{{ baseInfo.supplyAddress }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">审批状态</template>
<span v-if="baseInfo.approveStatus==1">待审批</span>
<span v-if="baseInfo.approveStatus==2">已发布</span>
<span v-if="baseInfo.approveStatus==3">已发布</span>
<span v-if="baseInfo.approveStatus==4">已发布</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">确认状态</template>
<span v-if="baseInfo.supplierConfirmStatus==1">待确认</span>
<span v-if="baseInfo.supplierConfirmStatus==2">确认通过</span>
<span v-if="baseInfo.supplierConfirmStatus==3">已拒绝</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">备注</template>
{{ baseInfo.remark }}
</el-descriptions-item>
</el-descriptions-item>
</el-descriptions>
<el-descriptions style="margin-bottom: 20px;" title="付款信息" :column="4" size="medium" border>
<el-descriptions-item>
<template slot="label">付款方式</template>
<span v-if="baseInfo.payMoneyStyle==1">一次性付款</span>
<span v-if="baseInfo.payMoneyStyle==2">分期付款</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">付款日期</template>
{{ baseInfo.payMoneyDate }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">收款银行</template>
{{ baseInfo.collectMoneyBank }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">收款账户名称</template>
{{ baseInfo.collectMoneyAccountName }}
</el-descriptions-item>
</el-descriptions>
</div>
@ -78,7 +85,7 @@
</div>
</div>
<div style="width: 100%;height: 400px;overflow-y: auto;">
<el-table v-loading="loading" :data="contractMaterialList" ref="multipleTable" height="380" :row-key="(row)=>{return row.materialId}" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="materialLis" 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" /> -->
@ -115,9 +122,9 @@
</template>
<script>
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
import { getCanteenByAreaApi, } from "@/api/base/stall";
import { supplierPageApi } from "@/api/foodManage/purchaseManage";
import { getPurchaseOrderInfoApi } from "@/api/foodManage/purchaseManage";
export default {
name: "orderDetail",
dicts: [],
@ -127,7 +134,7 @@ export default {
loading:false,
loadingBtn:false,
baseInfo: {
contractTitle:undefined,
orderTitle:undefined,
contractType:undefined,
areaId:undefined,
canteenId:undefined,
@ -135,7 +142,7 @@ export default {
},
//
baseRules: {
contractTitle: [
orderTitle: [
{ required: true, message: "菜谱名称不能为空", trigger: "blur" }
],
areaId: [
@ -164,7 +171,7 @@ export default {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
}
},
contractMaterialList:[],
materialLis:[],
openDialog:false,
materialTreeOptions:[],
//
@ -189,29 +196,19 @@ export default {
methods: {
//
jumpList() {
const obj = { path: "foodManage/purchaseManage/contractDetail" };
const obj = { path: "foodManage/purchaseManage/orderDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/foodManage/purchaseManage/contractList" }); //
this.$router.replace({ path: "/foodManage/purchaseManage/purchaseOrder" }); //
},
getContractInfo(){
console.log(this.pageJson)
let param = {
contractId:this.pageJson.contractId
orderGoodsId:this.pageJson.orderGoodsId
}
//
getPurchaseContractInfoApi(param).then((response) => {
getPurchaseOrderInfoApi(param).then((response) => {
this.baseInfo = response.data;
this.$set(this.baseInfo,'dateRange',[this.baseInfo.contractStartTime,this.baseInfo.contractEndTime])
this.contractMaterialList = this.baseInfo.purchaseContractDetailList;
this.$set(this.baseInfo,"contractAmount",this.baseInfo.contractAmount/100)
getCanteenByAreaApi({areaId:this.baseInfo.areaId}).then((response) => {
this.canteenOptions=response.rows||[];
this.$set(this.baseInfo,"canteenId",this.baseInfo.canteenId)
});
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
this.supplierOptions = response.rows||[];
this.$set(this.baseInfo,'supplierId',this.baseInfo.supplierId)
});
this.materialLis = this.baseInfo.orderGoodsDetailList;
});
},
//

View File

@ -2,12 +2,21 @@
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
<el-form :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
<el-form-item label="合同编号" prop="contractCode">
<el-input v-model="baseInfo.contractCode" placeholder="合同编号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
<el-form-item label="采购订单号" prop="orderGoodsCode">
<el-input v-model="baseInfo.orderGoodsCode" placeholder="采购订单号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="合同标题" prop="contractTitle">
<el-input v-model="baseInfo.contractTitle" placeholder="请输入合同标题" maxlength="20" clearable style="width: 240px"/>
<el-form-item label="采购订单标题" prop="orderTitle">
<el-input v-model="baseInfo.orderTitle" placeholder="请输入采购订单标题" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="交货时间" prop="requestArrivalTime">
<el-date-picker
v-model="baseInfo.requestArrivalTime"
type="date" align="right"
format="yyyy-MM-dd" style="width: 240px;"
:picker-options="pickerOptions" @change="baseInfo.requestArrivalTime=formatDate(baseInfo.requestArrivalTime)">
</el-date-picker>
</el-form-item>
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="baseInfo.areaId"
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
@ -18,15 +27,6 @@
}" @change="handleAreaChange">
</el-cascader>
</el-form-item>
<el-form-item label="所属食堂" prop="canteenId">
<el-select v-model="baseInfo.canteenId" placeholder="请选择所属食堂" style="width: 240px;">
<el-option v-for="item in canteenOptions"
:key="item.canteenId"
:label="item.canteenName"
:value="item.canteenId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="供应商" prop="supplierId">
<el-select v-model="baseInfo.supplierId" placeholder="请选择供应商" style="width: 240px;">
<el-option v-for="item in supplierOptions"
@ -36,28 +36,36 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="签订日期" prop="contractSigningTime">
<el-date-picker
v-model="baseInfo.contractSigningTime"
type="date" align="right"
format="yyyy-MM-dd" style="width: 240px;"
:picker-options="pickerOptions" @change="baseInfo.contractSigningTime=formatDate(baseInfo.contractSigningTime)">
</el-date-picker>
<el-form-item label="所属食堂" prop="canteenId">
<el-select v-model="baseInfo.canteenId" placeholder="请选择所属食堂" style="width: 240px;" @change="handleCanteenChange">
<el-option v-for="item in canteenOptions"
:key="item.canteenId"
:label="item.canteenName"
:value="item.canteenId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="合同生效周期" prop="dateRange">
<el-date-picker
v-model="baseInfo.dateRange"
type="datetimerange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd HH:mm:ss" style="width: 400px"
:default-time="['00:00:00', '23:59:59']"
:picker-options="pickerOptions" >
</el-date-picker>
<el-form-item label="所属档口" prop="stallId">
<el-select v-model="baseInfo.stallId" placeholder="请选择所属档口" style="width: 240px;">
<el-option v-for="item in stallOptions"
:key="item.stallId"
:label="item.stallName"
:value="item.stallId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="送货仓库" prop="warehouseId">
<el-select v-model="baseInfo.warehouseId" clearable placeholder="请选择送货仓库" style="width: 100%;">
<el-option v-for="item in wareHouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="详细地址" prop="supplyAddress">
<el-input v-model="baseInfo.supplyAddress" placeholder="请输入详细地址" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="付款方式" prop="payMoneyStyle">
<el-radio-group v-model="baseInfo.payMoneyStyle" >
<el-radio label="1" style="font-size: 14px;">一次性付款</el-radio>
@ -84,30 +92,6 @@
<el-form-item label="备注" prop="remark">
<el-input v-model="baseInfo.remark" placeholder="请输入备注" maxlength="30" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="负责人" prop="contractPerson">
<el-input v-model="baseInfo.contractPerson" placeholder="请输入负责人" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="合同总金额" prop="contractAmount">
<el-input v-model="baseInfo.contractAmount" placeholder="请输入合同总金额" maxlength="20" clearable style="width: 240px" @input="(v)=>(baseInfo.contractAmount=v.replace(/[^\d.]/g,''))"/>
</el-form-item>
<el-form-item label="合同附件" prop="contractAttachmentList">
<el-upload
ref="upload"
:http-request="fileUpLoad"
action="#" :limit="5"
accept=".xlsx, .xls, .png, .jpg, .jpeg, .docx, .doc"
:show-file-list="true"
:file-list="attachmentList"
:on-remove="handleRemoveFile"
>
<el-button
:disabled="attachmentList.length==5"
type="primary"
size="mini"
>上传附件
</el-button>
</el-upload>
</el-form-item>
</el-form>
</div>
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
@ -121,7 +105,7 @@
</div>
</div>
<div style="width: 100%;height: 400px;overflow-y: auto;">
<el-table v-loading="loading" :data="contractMaterialList" 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" /> -->
@ -233,8 +217,8 @@
<script>
import { imgUpLoadTwo } from '@/api/system/upload'
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi } from "@/api/foodManage/purchaseManage";
import { getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/purchaseManage";
import { getPurchaseOrderInfoApi,addPurchaseOrderApi,editPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
export default {
name: "orderEdit",
dicts: [],
@ -244,15 +228,14 @@ export default {
loading:false,
loadingBtn:false,
baseInfo: {
contractTitle:undefined,
orderTitle:undefined,
contractType:undefined,
areaId:undefined,
canteenId:undefined,
dateRange:[],
canteenId:undefined,
},
//
baseRules: {
contractTitle: [
orderTitle: [
{ required: true, message: "菜谱名称不能为空", trigger: "blur" }
],
areaId: [
@ -261,27 +244,33 @@ export default {
canteenId: [
{ required: true, message: "所属食堂不能为空", trigger: "change" }
],
stallId: [
{ required: true, message: "所属档口不能为空", trigger: "change" }
],
supplierId: [
{ required: true, message: "供应商不能为空", trigger: "change" }
],
contractSigningTime: [
{ required: true, message: "签订日期不能为空", trigger: "change" }
requestArrivalTime: [
{ required: true, message: "交货时间不能为空", trigger: "change" }
],
dateRange: [
{ required: true, message: "合同生效周期不能为空", trigger: "change" }
warehouseId: [
{ required: true, message: "送货仓库不能为空", trigger: "change" }
],
supplyAddress: [
{ required: true, message: "详细地址不能为空", trigger: "change" }
]
},
treeAreaOptions:[],
canteenOptions:[],
supplierOptions:[],
stallOptions:[],
supplierOptions:[],
wareHouseOptions:[],
pickerOptions: {
disabledDate(v) {
return v.getTime() < (new Date().getTime() - 86400000);// - 86400000
}
},
attachmentList:[],
contractMaterialList:[],//-
},
materialList:[],//-
batchIds:[],//--
openDialog:false,
materialTreeOptions:[],
@ -298,8 +287,7 @@ export default {
},
created() {
this.getAreaTreeData()
this.getMaterialTree()
this.attachmentList=[]
this.getMaterialTree()
if(this.$route.query.pageJson){
this.pageJson = JSON.parse(this.$route.query.pageJson)
this.getContractInfo()
@ -308,47 +296,44 @@ export default {
methods: {
//
jumpList() {
const obj = { path: "foodManage/purchaseManage/contractDetail" };
const obj = { path: "foodManage/purchaseManage/orderEdit" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/foodManage/purchaseManage/contractList" }); //
this.$router.replace({ path: "/foodManage/purchaseManage/purchaseOrder" }); //
},
getContractInfo(){
console.log(this.pageJson)
let param = {
contractId:this.pageJson.contractId
orderGoodsId:this.pageJson.orderGoodsId
}
//
getPurchaseContractInfoApi(param).then((response) => {
this.baseInfo = response.data;
this.$set(this.baseInfo,'dateRange',[this.baseInfo.contractStartTime,this.baseInfo.contractEndTime])
this.contractMaterialList = this.baseInfo.purchaseContractDetailList;
this.contractMaterialList.forEach(item=>{
getPurchaseOrderInfoApi(param).then((response) => {
this.baseInfo = response.data;
this.materialList = this.baseInfo.orderGoodsDetailList;
this.materialList.forEach(item=>{
this.$set(item,"singlePrice",Number(item.singlePrice)/100)
})
if(this.baseInfo.contractAttachmentList.length>0){
this.baseInfo.contractAttachmentList.forEach(item=>{
this.attachmentList.push({name:item,url:item})
})
}
this.$set(this.baseInfo,"contractAmount",Number(this.baseInfo.contractAmount)/100)
getCanteenByAreaApi({areaId:this.baseInfo.areaId}).then((response) => {
this.canteenOptions=response.rows||[];
this.$set(this.baseInfo,"canteenId",this.baseInfo.canteenId)
});
getStallByCanteenApi({ canteenId:this.baseInfo.canteenId }).then((response) => {
this.stallOptions=response.rows||[]
this.$set(this.baseInfo,"stallId",this.baseInfo.stallId)
});
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
this.supplierOptions = response.rows||[];
this.$set(this.baseInfo,'supplierId',this.baseInfo.supplierId)
});
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
this.wareHouseOptions = response.rows||[];
this.$set(this.baseInfo,'warehouseId',this.baseInfo.warehouseId)
});
});
},
//
getAreaTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeAreaOptions = response.data;
// if(this.treeAreaOptions.length>0){
// this.baseInfo.areaId = this.getFirstChild(this.treeAreaOptions[0]).id;
// this.handleAreaChange()
// }
});
},
getFirstChild(node) {
@ -362,6 +347,7 @@ export default {
handleAreaChange(e){
this.getCanteenData()
this.getSupplierData()
this.getWareHouseData()
},
/** 查询查询食堂下拉结构 */
getCanteenData() {
@ -372,14 +358,35 @@ export default {
this.canteenOptions=response.rows||[];
this.$set(this.baseInfo,"canteenId",null)
});
},
},
/** 查询供应商下拉结构 */
getSupplierData() {
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
this.supplierOptions = response.rows||[];
this.$set(this.baseInfo,"supplierId",null)
});
},
},
/** 查询供应商下拉结构 */
getWareHouseData() {
drpWareHousePageApi({ areaId:this.baseInfo.areaId }).then((response) => {
this.wareHouseOptions = response.rows||[];
this.$set(this.baseInfo,'warehouseId',null)
});
},
//-
handleCanteenChange(e){
this.getStallData()
},
/** 查询档口下拉结构 */
getStallData() {
let param= {
canteenId:this.baseInfo.canteenId
}
getStallByCanteenApi(param).then((response) => {
this.stallOptions=response.rows||[]
this.$set(this.baseInfo,"stallId",null)
});
},
/** 查询货品类别下拉树结构 */
getMaterialTree() {
let param = {
@ -400,9 +407,9 @@ export default {
//
delMaterial(){
this.batchIds.forEach(ID=>{
let index = this.contractMaterialList.findIndex(v=>v.materialId==ID)
let index = this.materialList.findIndex(v=>v.materialId==ID)
if(index>-1){
this.contractMaterialList.splice(index,1)
this.materialList.splice(index,1)
}
})
},
@ -456,7 +463,7 @@ export default {
confirmChosen(){
if(this.batchChosenMaterial.length>0){
this.loading = true
this.contractMaterialList = this.batchChosenMaterial;
this.materialList = this.batchChosenMaterial;
setTimeout(()=>{
this.loading = false
this.openDialog=false
@ -467,30 +474,25 @@ export default {
confirmSave(){
this.$refs["baseInfo"].validate(valid => {
if (valid) {
let param = Object.assign({},this.baseInfo);
param.contractStartTime = this.formatDateTime(this.baseInfo.dateRange[0])
param.contractEndTime = this.formatDateTime(this.baseInfo.dateRange[1])
param.contractSigningTime = this.formatDate(this.baseInfo.contractSigningTime)
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.contractAmount = this.baseInfo.contractAmount*100;
param.commitStatus=1
param.purchaseContractDetailList = []
param.contractAttachment = ""
if(this.attachmentList.length>0){
console.log(this.attachmentList)
let arr = this.attachmentList.map(item=>item.url)
param.contractAttachment = arr.join(',')
console.log(param)
}
let param = Object.assign({},this.baseInfo);
param.requestArrivalTime = this.formatDate(this.baseInfo.requestArrivalTime)
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.orderAmount=0
param.totalNum=0
param.orderStatus=1
param.orderGoodsDetailList = []
this.noMaterial = false;
if(this.contractMaterialList.length>0){
this.contractMaterialList.forEach(item=>{
if(this.materialList.length>0){
this.materialList.forEach(item=>{
if(item.singlePrice==0 || item.orderNum==0){
this.noMaterial = true
}else{
let obj = Object.assign({}, item)
obj.singlePrice = Number(obj.singlePrice)*100
param.purchaseContractDetailList.push(obj)
obj.singlePrice = Number(obj.singlePrice)*100
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum))
param.orderAmount = param.orderAmount+obj.totalPrice;
param.totalNum = param.totalNum+Number(obj.orderNum)
param.orderGoodsDetailList.push(obj)
}
})
}
@ -498,7 +500,7 @@ export default {
this.$modal.msgError("请输入单价和数量!");
}else{
this.noMaterial = true;
if(this.contractMaterialList.length>0){
if(this.materialList.length>0){
this.noMaterial = false;
}
console.log(param)
@ -506,8 +508,8 @@ export default {
this.$modal.msgError("请添加货品!");
}else{
this.loadingBtn=true;
if (this.baseInfo.contractId != undefined) {
editPurchaseContractApi(param).then((response) => {
if (this.baseInfo.orderGoodsId != undefined) {
editPurchaseOrderApi(param).then((response) => {
this.$modal.msgSuccess("修改成功");
this.loadingBtn=false
this.jumpList()
@ -515,7 +517,7 @@ export default {
this.loadingBtn=false
});
} else {
addPurchaseContractApi(param).then((response) => {
addPurchaseOrderApi(param).then((response) => {
this.$modal.msgSuccess("保存成功");
this.loadingBtn=false
this.jumpList()
@ -533,23 +535,25 @@ export default {
confirmSubmit(){
this.$refs["baseInfo"].validate(valid => {
if (valid) {
let param = Object.assign({},this.baseInfo);
param.contractStartTime = this.formatDateTime(this.baseInfo.dateRange[0])
param.contractEndTime = this.formatDateTime(this.baseInfo.dateRange[1])
param.contractSigningTime = this.formatDate(this.baseInfo.contractSigningTime)
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.contractAmount = this.baseInfo.contractAmount*100;
param.commitStatus=2
param.purchaseContractDetailList = []
let param = Object.assign({},this.baseInfo);
param.requestArrivalTime = this.formatDate(this.baseInfo.requestArrivalTime)
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
param.orderAmount=0
param.totalNum=0
param.orderStatus=2
param.orderGoodsDetailList = []
this.noMaterial = false;
if(this.contractMaterialList.length>0){
this.contractMaterialList.forEach(item=>{
if(this.materialList.length>0){
this.materialList.forEach(item=>{
if(item.singlePrice==0 || item.orderNum==0){
this.noMaterial = true
}else{
let obj = Object.assign({}, item)
obj.singlePrice = Number(obj.singlePrice)*100
param.purchaseContractDetailList.push(obj)
obj.singlePrice = Number(obj.singlePrice)*100
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum))
param.orderAmount = param.orderAmount+obj.totalPrice;
param.totalNum = param.totalNum+Number(obj.orderNum)
param.orderGoodsDetailList.push(obj)
}
})
}
@ -557,7 +561,7 @@ export default {
this.$modal.msgError("请输入单价和数量!");
}else{
this.noMaterial = true;
if(this.contractMaterialList.length>0){
if(this.materialList.length>0){
this.noMaterial = false;
}
console.log(param)
@ -565,8 +569,8 @@ export default {
this.$modal.msgError("请添加货品!");
}else{
this.loadingBtn=true;
if (this.baseInfo.contractId != undefined) {
editPurchaseContractApi(param).then((response) => {
if (this.baseInfo.orderGoodsId != undefined) {
editPurchaseOrderApi(param).then((response) => {
this.$modal.msgSuccess("修改成功");
this.loadingBtn=false
this.jumpList()
@ -574,7 +578,7 @@ export default {
this.loadingBtn=false
});
} else {
addPurchaseContractApi(param).then((response) => {
addPurchaseOrderApi(param).then((response) => {
this.$modal.msgSuccess("保存成功");
this.loadingBtn=false
this.jumpList()
@ -589,29 +593,6 @@ export default {
});
},
//
fileUpLoad(param){
param.type = 'canteen'
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {
this.attachmentList.push(res.data)
} else {
this.$modal.msgError(res.msg);
}
}).catch((error) => {
this.$modal.msgError(error)
})
},
handleRemoveFile(file, fileList){
console.log(this.attachmentList)
let sum = 0
this.attachmentList.forEach((item, index) => {
if (item.url == file.url) {
sum = index
}
})
this.attachmentList.splice(sum, 1)
},
//
formatDate(date) {
// YYYY-MM-DD

View File

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="关键字" prop="searchValue">
<el-input v-model="queryParams.searchValue" placeholder="请输入用户姓名,编号,手机号" maxlength="20" clearable style="width: 240px"/>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="采购单编号" prop="orderGoodsCode">
<el-input v-model="queryParams.orderGoodsCode" placeholder="请输入采购单编号" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="合同日期">
<el-form-item label="采购日期">
<el-date-picker
v-model="dateRange"
type="datetimerange"
@ -18,30 +18,66 @@
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams.areaId"
:options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="提交状态" prop="commitStatus">
<el-select v-model="queryParams.commitStatus" placeholder="请选择提交状态" style="width: 240px;">
<el-form-item label="供应商" prop="supplierId">
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" style="width: 240px;">
<el-option v-for="item in supplierOptions"
:key="item.supplierId"
:label="item.supplierName"
:value="item.supplierId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="提交状态" prop="orderStatus">
<el-select v-model="queryParams.orderStatus" placeholder="请选择提交状态" style="width: 240px;">
<el-option label="待提交" :value="1"></el-option>
<el-option label="已提交" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="合同状态" prop="contractStatus">
<el-select v-model="queryParams.contractStatus" 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-form-item label="审批状态" prop="approveStatus">
<el-select v-model="queryParams.approveStatus" 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-form-item label="确认状态" prop="supplierConfirmStatus">
<el-select v-model="queryParams.supplierConfirmStatus" 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-select>
</el-form-item>
<el-form-item label="所属区域" prop="areaId">
<el-cascader v-model="queryParams.areaId"
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'id',label:'label'
}" clearable @change="handleAreaChange">
</el-cascader>
</el-form-item>
<el-form-item label="所属食堂" prop="canteenId">
<el-select v-model="queryParams.canteenId" placeholder="请选择所属食堂" style="width: 100%;" @change="handleCanteenChange">
<el-option v-for="item in canteenOptions"
:key="item.canteenId"
:label="item.canteenName"
:value="item.canteenId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="所属档口" prop="stallId">
<el-select v-model="queryParams.stallId" placeholder="请选择所属档口" style="width: 100%;" >
<el-option v-for="item in stallOptions"
:key="item.stallId"
:label="item.stallName"
:value="item.stallId"
></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>
@ -67,39 +103,37 @@
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" prop="contractCode" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="合同标题" align="center" prop="contractTitle" :show-overflow-tooltip="true" width="120" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="签订日期" align="center" prop="contractSigningTime" :show-overflow-tooltip="true"/>
<el-table-column label="合同状态" align="center" prop="contractStatus" :show-overflow-tooltip="true" width="100">
<el-table-column label="采购订单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" />
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" />
<el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.contractStatus==1">待生效</span>
<span v-if="scope.row.contractStatus==2">履行中</span>
<span v-if="scope.row.contractStatus==3">已失效</span>
<span v-if="scope.row.contractStatus==4">已终止</span>
<span v-if="scope.row.orderStatus==1">待提交</span>
<span v-if="scope.row.orderStatus==2">已提交</span>
</template>
</el-table-column>
<el-table-column label="提交状态" align="center" prop="commitStatus" :show-overflow-tooltip="true" width="100">
<el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.commitStatus==1">待提交</span>
<span v-if="scope.row.commitStatus==2">已提交</span>
<span v-if="scope.row.supplierConfirmStatus==1">待确认</span>
<span v-if="scope.row.supplierConfirmStatus==2">确认通过</span>
<span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span>
</template>
</el-table-column>
<el-table-column label="合同总金额(元)" align="center" prop="contractAmount" :show-overflow-tooltip="true" width="120">
<el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span>{{ (scope.row.contractAmount/100).toFixed(2) }}</span>
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="货品数量" align="center" prop="totalNum" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="配送食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="合同周期" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.contractStartTime }} - {{ scope.row.contractEndTime }}</span>
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" prop="requestArrivalTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="120"/>
<!-- <el-table-column label="审批人" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="审批完成时间" align="center" prop="" :show-overflow-tooltip="true" width="120"/> -->
<el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/>
<!-- <el-table-column label="负责人" align="center" prop="contractPerson" :show-overflow-tooltip="true" width="120"/> -->
<!-- <el-table-column label="制表人" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="制表时间" align="center" prop="" :show-overflow-tooltip="true" width="120"/> -->
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
@ -107,17 +141,17 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.commitStatus==1"
icon="el-icon-edit" v-if="scope.row.orderStatus==1"
@click="handleUpdate(scope.row)"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit" v-if="scope.row.commitStatus==2"
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
@click="handleView(scope.row)"
>详情</el-button>
<!-- <el-button
size="mini" v-if="scope.row.commitStatus==1"
size="mini" v-if="scope.row.orderStatus==1"
type="text" :disabled="loadingBtn"
icon="el-icon-top"
@click="confirmSubmit(scope.row)"
@ -158,8 +192,9 @@
</template>
<script>
import { systemAreaTreeApi,getCanteenByAreaApi } from "@/api/base/stall";
import { purchaseContractPageApi,getPurchaseContractInfoApi,addPurchaseContractApi,editPurchaseContractApi,delPurchaseContractApi } from "@/api/foodManage/purchaseManage";
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
import { supplierPageApi } from "@/api/foodManage/purchaseManage";
import { purchaseOrderPageApi,editPurchaseOrderApi,delPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
export default {
name: "",
@ -190,7 +225,10 @@ export default {
pageNum: 1,
pageSize: 10,
},
treeOptions:[],//
treeAreaOptions:[],//
canteenOptions:[],//
stallOptions:[],//
supplierOptions:[],
dateRange:[],//
pickerOptions: {
shortcuts: [{
@ -233,16 +271,43 @@ export default {
};
},
created() {
this.getTreeData();
this.getAreaTreeData();
this.getSupplierData();
this.getList();
},
methods: {
//
getTreeData() {
getAreaTreeData() {
systemAreaTreeApi({}).then((response) => {
this.treeOptions = response.data;
this.treeAreaOptions = response.data;
});
},
handleAreaChange(e){
let param= {
areaId:e,canteenType: 1
}
getCanteenByAreaApi(param).then((response) => {
this.canteenOptions=response.rows||[]
this.$set(this.queryParams,"canteenId",null)
this.stallOptions = []
this.$set(this.queryParams,"stallId",null)
});
},
handleCanteenChange(e){
let param= {
canteenId:e
}
getStallByCanteenApi(param).then((response) => {
this.stallOptions=response.rows||[]
this.$set(this.queryParams,"stallId",null)
});
},
/** 查询供应商下拉结构 */
getSupplierData() {
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
this.supplierOptions = response.rows||[];
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -260,10 +325,13 @@ export default {
let param = {
"pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize,
"searchValue": this.queryParams.searchValue,
"orderGoodsCode": this.queryParams.orderGoodsCode,
"areaId": this.queryParams.areaId,
"commitStatus": this.queryParams.commitStatus,
"contractStatus": this.queryParams.contractStatus
"canteenId": this.queryParams.canteenId,
"stallId": this.queryParams.stallId,
"orderStatus": this.queryParams.orderStatus,
"supplierConfirmStatus": this.queryParams.supplierConfirmStatus,
// "approveStatus": this.queryParams.approveStatus
}
if(this.dateRange.length>0){
param.startDateTime = this.formatDate(this.dateRange[0])
@ -272,7 +340,7 @@ export default {
param.startDateTime = ""
param.endDateTime = ""
}
purchaseContractPageApi(param).then(response => {
purchaseOrderPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
this.loading = false;
@ -323,7 +391,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('是否确认删除数据项?').then(function() {
return delPurchaseContractApi({contractIds:[row.contractId]});
return delPurchaseOrderApi({contractIds:[row.contractId]});
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
@ -333,8 +401,8 @@ export default {
confirmSubmit(row){
let param = Object.assign({},row);
this.loadingBtn=true
param.commitStatus=2
editPurchaseContractApi(param).then((response) => {
param.orderStatus=2
editPurchaseOrderApi(param).then((response) => {
this.$modal.msgSuccess("提交成功");
this.getList()
this.loadingBtn=false

View File

@ -33,7 +33,7 @@
</el-descriptions>
<el-descriptions style="margin-bottom: 20px;" title="基本信息" :column="4" size="medium" border>
<el-descriptions-item>
<template slot="label">采购单号</template>
<template slot="label">采购计划单号</template>
{{baseInfo.planCode}}
</el-descriptions-item>
<el-descriptions-item>
@ -183,9 +183,9 @@ export default {
methods: {
//
jumpList() {
const obj = { path: "foodManage/purchaseManage/contractDetail" };
const obj = { path: "foodManage/purchaseManage/planEdit" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/foodManage/purchaseManage/contractList" }); //
this.$router.replace({ path: "/foodManage/purchaseManage/purchasePlan" }); //
},
getContractInfo(){
console.log(this.pageJson)

View File

@ -15,7 +15,7 @@
:picker-options="pickerOptions" >
</el-date-picker>
</el-form-item>
<el-form-item label="采购单号" prop="planCode">
<el-form-item label="采购计划单号" prop="planCode">
<el-input v-model="queryParams.planCode" placeholder="请输入采购单号" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="计划状态" prop="status">
@ -79,7 +79,7 @@
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="采购单号" align="center" prop="planCode" :show-overflow-tooltip="true" />
<el-table-column label="采购计划单号" align="center" prop="planCode" :show-overflow-tooltip="true" />
<el-table-column label="采购计划时间" align="center" prop="purchaseDate" :show-overflow-tooltip="true" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="120"/>