退货单接口对接
This commit is contained in:
parent
ca41d8aab9
commit
7fc62e30ca
|
|
@ -0,0 +1,151 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 原料类别树
|
||||||
|
export function systemMaterialTreeApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/cook_material_type/getTree',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询原料列表
|
||||||
|
export function getMaterialListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/cook_material/list',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询货品库存列表
|
||||||
|
export function getStockMaterialListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims/inventory/list',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data,
|
||||||
|
params:{
|
||||||
|
pageNum:data.pageNum,
|
||||||
|
pageSize:data.pageSize
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询供应商列表 isPaging 0不分页 2分页
|
||||||
|
export function supplierPageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_supplier/list',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 仓库
|
||||||
|
export function drpWareHousePageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_warehouse_info/listAll',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// -------------退货单---------------
|
||||||
|
//获取退货单分页列表
|
||||||
|
export function returnMaterialPageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_refund_goods/list',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//获取退货单详情
|
||||||
|
export function getReturnMaterialInfoApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_refund_goods/page-detail',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 新增退货单-保存
|
||||||
|
export function addReturnMaterialApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_refund_goods/add',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 编辑退货单-提交
|
||||||
|
export function editReturnMaterialApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_refund_goods/commit',
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除退货单
|
||||||
|
export function delReturnMaterialApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/ims_refund_goods/remove/'+data.refundGoodsId,
|
||||||
|
method: 'post',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -272,13 +272,13 @@ export const constantRoutes = [
|
||||||
path: 'materialReturnDetail',
|
path: 'materialReturnDetail',
|
||||||
component: () => import('@/views/foodManage/returnManage/materialReturn/detail'),
|
component: () => import('@/views/foodManage/returnManage/materialReturn/detail'),
|
||||||
name: 'MaterialReturnDetail',
|
name: 'MaterialReturnDetail',
|
||||||
meta: { title: '出库详情', icon: '' }
|
meta: { title: '退货单详情', icon: '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'materialReturnEdit',
|
path: 'materialReturnEdit',
|
||||||
component: () => import('@/views/foodManage/returnManage/materialReturn/edit'),
|
component: () => import('@/views/foodManage/returnManage/materialReturn/edit'),
|
||||||
name: 'MaterialReturnOutEdit',
|
name: 'MaterialReturnOutEdit',
|
||||||
meta: { title: '出库新增/编辑', icon: '' }
|
meta: { title: '退货单新增/编辑', icon: '' }
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,6 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
this.$modal.msgError("请先选择区域,仓库");
|
this.$modal.msgError("请先选择区域,仓库");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -499,7 +498,7 @@ export default {
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.loadingBtn=true;
|
||||||
editFetchMaterialApi(param).then((response) => {
|
editFetchMaterialApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("保存成功");
|
this.$modal.msgSuccess("提交成功");
|
||||||
this.loadingBtn=false
|
this.loadingBtn=false
|
||||||
this.jumpList()
|
this.jumpList()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
|
|
||||||
|
|
@ -308,11 +308,11 @@ export default {
|
||||||
// "approveStatus": this.queryParams.approveStatus
|
// "approveStatus": this.queryParams.approveStatus
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
fetchMaterialPageApi(param).then(response => {
|
fetchMaterialPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,15 @@
|
||||||
<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>
|
<el-descriptions-item>
|
||||||
<template slot="label">退货订单号</template>
|
<template slot="label">退货订单号</template>
|
||||||
{{baseInfo.orderGoodsCode}}
|
{{baseInfo.refundGoodsCode}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">退货仓库</template>
|
||||||
|
{{ baseInfo.warehouseName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">订单标题</template>
|
<template slot="label">退货人</template>
|
||||||
{{ baseInfo.orderTitle }}
|
{{ baseInfo.refundName }}
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item>
|
|
||||||
<template slot="label">交货日期</template>
|
|
||||||
{{ baseInfo.requestArrivalTime }}
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">所属区域</template>
|
<template slot="label">所属区域</template>
|
||||||
|
|
@ -23,20 +23,8 @@
|
||||||
{{ baseInfo.supplierName }}
|
{{ baseInfo.supplierName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">所属食堂</template>
|
<template slot="label">退货时间</template>
|
||||||
{{ baseInfo.canteenName }}
|
{{ baseInfo.refundTime }}
|
||||||
</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>
|
||||||
<el-descriptions-item>
|
<el-descriptions-item>
|
||||||
<template slot="label">审批状态</template>
|
<template slot="label">审批状态</template>
|
||||||
|
|
@ -45,37 +33,7 @@
|
||||||
<span v-if="baseInfo.approveStatus==3">审批同意</span>
|
<span v-if="baseInfo.approveStatus==3">审批同意</span>
|
||||||
<span v-if="baseInfo.approveStatus==4">审批拒绝</span>
|
<span v-if="baseInfo.approveStatus==4">审批拒绝</span>
|
||||||
</el-descriptions-item>
|
</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>
|
</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>
|
</div>
|
||||||
|
|
||||||
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
|
<div style="width: 100%;height: 450px;padding: 10px;border-radius: 10px;margin-bottom: 10px;background: #FFF;">
|
||||||
|
|
@ -101,16 +59,16 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ (scope.row.singlePrice/100).toFixed(2) }}</span>
|
<!-- <span>{{ (scope.row.singlePrice/100).toFixed(2) }}</span> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="orderNum" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="退货数量" align="center" prop="refundNum" :show-overflow-tooltip="true"></el-table-column>
|
||||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
<el-table-column label="小计(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.orderNum*scope.row.singlePrice }}</span>
|
<!-- <span>{{ scope.row.refundNum*scope.row.singlePrice }}</span> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"></el-table-column>
|
<el-table-column label="退货原因" align="center" prop="refundReason" :show-overflow-tooltip="true"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -203,12 +161,12 @@ export default {
|
||||||
getContractInfo(){
|
getContractInfo(){
|
||||||
console.log(this.pageJson)
|
console.log(this.pageJson)
|
||||||
let param = {
|
let param = {
|
||||||
orderGoodsId:this.pageJson.orderGoodsId
|
refundGoodsId:this.pageJson.refundGoodsId
|
||||||
}
|
}
|
||||||
//查询查询食堂下拉结构
|
//查询查询食堂下拉结构
|
||||||
getPurchaseOrderInfoApi(param).then((response) => {
|
getPurchaseOrderInfoApi(param).then((response) => {
|
||||||
this.baseInfo = response.data;
|
this.baseInfo = this.pageJson;
|
||||||
this.materialLis = this.baseInfo.orderGoodsDetailList;
|
this.materialList = response.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,9 @@
|
||||||
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
|
<div style="padding: 10px;background: #E5EBF6;min-height: 830px;">
|
||||||
<div style="background: #FFF;padding: 10px;border-radius: 10px;margin-bottom: 20px;">
|
<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 :model="baseInfo" ref="baseInfo" :rules="baseRules" size="medium" :inline="true" label-width="110px">
|
||||||
<el-form-item label="退货订单号" prop="orderGoodsCode">
|
<el-form-item label="退货订单号" prop="refundGoodsCode">
|
||||||
<el-input v-model="baseInfo.orderGoodsCode" placeholder="退货订单号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="baseInfo.refundGoodsCode" placeholder="退货订单号自动生成" disabled maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<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-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="baseInfo.areaId"
|
<el-cascader v-model="baseInfo.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||||
|
|
@ -36,26 +24,8 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属食堂" prop="canteenId">
|
<el-form-item label="退货仓库" prop="warehouseId">
|
||||||
<el-select v-model="baseInfo.canteenId" placeholder="请选择所属食堂" style="width: 240px;" @change="handleCanteenChange">
|
<el-select v-model="baseInfo.warehouseId" clearable placeholder="请选择退货仓库" style="width: 100%;">
|
||||||
<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="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"
|
<el-option v-for="item in wareHouseOptions"
|
||||||
:key="item.warehouseId"
|
:key="item.warehouseId"
|
||||||
:label="item.warehouseName"
|
:label="item.warehouseName"
|
||||||
|
|
@ -63,34 +33,16 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="详细地址" prop="supplyAddress">
|
<el-form-item label="退货人" prop="refundName">
|
||||||
<el-input v-model="baseInfo.supplyAddress" placeholder="请输入详细地址" maxlength="20" clearable style="width: 240px"/>
|
<el-input v-model="baseInfo.refundName" placeholder="请输入退货人" maxlength="20" clearable style="width: 240px"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="付款方式" prop="payMoneyStyle">
|
<el-form-item label="退货时间" prop="refundTime">
|
||||||
<el-radio-group v-model="baseInfo.payMoneyStyle" >
|
|
||||||
<el-radio label="1" style="font-size: 14px;">一次性付款</el-radio>
|
|
||||||
<el-radio label="2" style="font-size: 14px;">分期付款</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="付款日期" prop="payMoneyDate">
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="baseInfo.payMoneyDate"
|
v-model="baseInfo.refundTime"
|
||||||
type="date" align="right"
|
type="datetime" align="right"
|
||||||
format="yyyy-MM-dd" style="width: 240px;"
|
format="yyyy-MM-dd HH:mm:ss" style="width: 240px;"
|
||||||
:picker-options="pickerOptions" @change="baseInfo.payMoneyDate=formatDate(baseInfo.payMoneyDate)">
|
:picker-options="pickerOptions" @change="baseInfo.refundTime=formatDateTime(baseInfo.refundTime)">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="收款银行" prop="collectMoneyBank">
|
|
||||||
<el-input v-model="baseInfo.collectMoneyBank" placeholder="请输入收款银行" maxlength="20" clearable style="width: 240px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="收款账户名称" prop="collectMoneyAccountName">
|
|
||||||
<el-input v-model="baseInfo.collectMoneyAccountName" placeholder="请输入收款账户名称" maxlength="20" clearable style="width: 240px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="收款账号" prop="collectMoneyAccount">
|
|
||||||
<el-input v-model="baseInfo.collectMoneyAccount" placeholder="请输入收款账号" maxlength="20" 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>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -119,24 +71,24 @@
|
||||||
<span v-if="scope.row.salesMode==2">称重</span>
|
<span v-if="scope.row.salesMode==2">称重</span>
|
||||||
</template> -->
|
</template> -->
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单价(元)" align="center" prop="singlePrice" :show-overflow-tooltip="true">
|
<el-table-column label="单价(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.singlePrice" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.singlePrice=v.replace(/[^\d.]/g,''))"/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" align="center" prop="orderNum" :show-overflow-tooltip="true">
|
<el-table-column label="当前可退库存" align="center" prop="materialNum" :show-overflow-tooltip="true"/>
|
||||||
|
<el-table-column label="小计(元)" align="center" prop="" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model.number="scope.row.orderNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.orderNum=v.replace(/[^\d]/g,''))"/>
|
<!-- <span>{{ scope.row.refundNum*scope.row.singlePrice }}</span> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总金额(元)" align="center" prop="" :show-overflow-tooltip="true">
|
<el-table-column label="退货数量" align="center" prop="refundNum" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.orderNum*scope.row.singlePrice }}</span>
|
<el-input v-model.number="scope.row.refundNum" placeholder="请输入" maxlength="10" clearable @input="(v)=>(scope.row.refundNum=v.replace(/[^\d]/g,''))"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true">
|
<el-table-column label="退货原因" align="center" prop="refundReason" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.remark" placeholder="请输入" maxlength="20" clearable/>
|
<el-input v-model="scope.row.refundReason" placeholder="请输入" maxlength="20" clearable/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -187,16 +139,8 @@
|
||||||
<el-table-column label="货品类别" align="center" prop="materialTypeName" :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="unitName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="货品规格" align="center" prop="size" :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="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-column label="货品库存" align="center" prop="materialNum" :show-overflow-tooltip="true" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
|
|
@ -216,9 +160,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||||
import { systemMaterialTreeApi,getMaterialListApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/purchaseManage";
|
import { systemMaterialTreeApi,getStockMaterialListApi,supplierPageApi,drpWareHousePageApi } from "@/api/foodManage/returnManage";
|
||||||
import { getPurchaseOrderInfoApi,addPurchaseOrderApi,editPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
|
import { getReturnMaterialInfoApi,addReturnMaterialApi,editReturnMaterialApi } from "@/api/foodManage/returnManage";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "orderEdit",
|
name: "orderEdit",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -228,14 +173,14 @@ export default {
|
||||||
loading:false,
|
loading:false,
|
||||||
loadingBtn:false,
|
loadingBtn:false,
|
||||||
baseInfo: {
|
baseInfo: {
|
||||||
orderTitle:undefined,
|
title:undefined,
|
||||||
contractType:undefined,
|
contractType:undefined,
|
||||||
areaId:undefined,
|
areaId:undefined,
|
||||||
canteenId:undefined,
|
canteenId:undefined,
|
||||||
},
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
baseRules: {
|
baseRules: {
|
||||||
orderTitle: [
|
title: [
|
||||||
{ required: true, message: "退货订单标题不能为空", trigger: "blur" }
|
{ required: true, message: "退货订单标题不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
areaId: [
|
areaId: [
|
||||||
|
|
@ -250,7 +195,7 @@ export default {
|
||||||
supplierId: [
|
supplierId: [
|
||||||
{ required: true, message: "供应商不能为空", trigger: "change" }
|
{ required: true, message: "供应商不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
requestArrivalTime: [
|
refundTime: [
|
||||||
{ required: true, message: "交货时间不能为空", trigger: "change" }
|
{ required: true, message: "交货时间不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
warehouseId: [
|
warehouseId: [
|
||||||
|
|
@ -303,23 +248,15 @@ export default {
|
||||||
getContractInfo(){
|
getContractInfo(){
|
||||||
console.log(this.pageJson)
|
console.log(this.pageJson)
|
||||||
let param = {
|
let param = {
|
||||||
orderGoodsId:this.pageJson.orderGoodsId
|
refundGoodsId:this.pageJson.refundGoodsId
|
||||||
}
|
}
|
||||||
//查询查询食堂下拉结构
|
//查询查询食堂下拉结构
|
||||||
getPurchaseOrderInfoApi(param).then((response) => {
|
getReturnMaterialInfoApi(param).then((response) => {
|
||||||
this.baseInfo = response.data;
|
this.baseInfo = this.pageJson;
|
||||||
this.materialList = this.baseInfo.orderGoodsDetailList;
|
this.materialList = response.rows;
|
||||||
this.materialList.forEach(item=>{
|
// this.materialList.forEach(item=>{
|
||||||
this.$set(item,"singlePrice",Number(item.singlePrice)/100)
|
// this.$set(item,"singlePrice",Number(item.singlePrice)/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) => {
|
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
|
||||||
this.supplierOptions = response.rows||[];
|
this.supplierOptions = response.rows||[];
|
||||||
this.$set(this.baseInfo,'supplierId',this.baseInfo.supplierId)
|
this.$set(this.baseInfo,'supplierId',this.baseInfo.supplierId)
|
||||||
|
|
@ -345,20 +282,9 @@ export default {
|
||||||
},
|
},
|
||||||
//选中区域-查询食堂
|
//选中区域-查询食堂
|
||||||
handleAreaChange(e){
|
handleAreaChange(e){
|
||||||
this.getCanteenData()
|
|
||||||
this.getSupplierData()
|
this.getSupplierData()
|
||||||
this.getWareHouseData()
|
this.getWareHouseData()
|
||||||
},
|
},
|
||||||
/** 查询查询食堂下拉结构 */
|
|
||||||
getCanteenData() {
|
|
||||||
let param= {
|
|
||||||
areaId:this.baseInfo.areaId
|
|
||||||
}
|
|
||||||
getCanteenByAreaApi(param).then((response) => {
|
|
||||||
this.canteenOptions=response.rows||[];
|
|
||||||
this.$set(this.baseInfo,"canteenId",null)
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 查询供应商下拉结构 */
|
/** 查询供应商下拉结构 */
|
||||||
getSupplierData() {
|
getSupplierData() {
|
||||||
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
|
supplierPageApi({ isPaging:1,areaIdList:[this.baseInfo.areaId] }).then((response) => {
|
||||||
|
|
@ -372,20 +298,6 @@ export default {
|
||||||
this.wareHouseOptions = response.rows||[];
|
this.wareHouseOptions = response.rows||[];
|
||||||
this.$set(this.baseInfo,'warehouseId',null)
|
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() {
|
getMaterialTree() {
|
||||||
|
|
@ -415,16 +327,15 @@ export default {
|
||||||
},
|
},
|
||||||
//添加货品
|
//添加货品
|
||||||
addMaterial(){
|
addMaterial(){
|
||||||
if(this.baseInfo.areaId!=undefined){
|
if(this.baseInfo.areaId!=undefined||this.baseInfo.warehouseId!=undefined){
|
||||||
this.openDialog=true
|
this.openDialog=true
|
||||||
this.resetQuery()
|
this.resetQuery()
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.$refs.multipleTable1.clearSelection()
|
this.$refs.multipleTable1.clearSelection()
|
||||||
},300)
|
},300)
|
||||||
}else{
|
}else{
|
||||||
this.$modal.msgError("请先选择区域");
|
this.$modal.msgError("请先选择区域,仓库");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
|
@ -442,12 +353,13 @@ export default {
|
||||||
let param = {
|
let param = {
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.baseInfo.areaId,
|
||||||
|
"warehouseId": this.baseInfo.warehouseId,
|
||||||
"materialName": this.queryParams.materialName,
|
"materialName": this.queryParams.materialName,
|
||||||
"materialCode": this.queryParams.materialCode,
|
"materialCode": this.queryParams.materialCode,
|
||||||
"materialTypeIds": this.queryParams.materialTypeIds,
|
"materialTypeIds": this.queryParams.materialTypeIds,
|
||||||
}
|
}
|
||||||
getMaterialListApi(param).then(response => {
|
getStockMaterialListApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
@ -456,8 +368,8 @@ export default {
|
||||||
handleSelectionChange2(selection) {
|
handleSelectionChange2(selection) {
|
||||||
this.batchChosenMaterial = selection;
|
this.batchChosenMaterial = selection;
|
||||||
this.batchChosenMaterial.forEach(item=>{
|
this.batchChosenMaterial.forEach(item=>{
|
||||||
this.$set(item,"orderNum",0)
|
this.$set(item,"refundNum",0)
|
||||||
this.$set(item,"singlePrice",item.unitPrice/100)
|
// this.$set(item,"singlePrice",item.unitPrice/100)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirmChosen(){
|
confirmChosen(){
|
||||||
|
|
@ -475,29 +387,27 @@ export default {
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.requestArrivalTime = this.formatDate(this.baseInfo.requestArrivalTime)
|
param.refundTime = this.formatDate(this.baseInfo.refundTime)
|
||||||
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
|
param.refundTotalAmount=0
|
||||||
param.orderAmount=0
|
param.refundTotalNum=0
|
||||||
param.totalNum=0
|
param.detailList = []
|
||||||
param.orderStatus=1
|
|
||||||
param.orderGoodsDetailList = []
|
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
if(item.singlePrice==0 || item.orderNum==0){
|
if(item.refundNum==0){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
obj.singlePrice = Number(obj.singlePrice)*100
|
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||||
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum))
|
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.refundNum))
|
||||||
param.orderAmount = param.orderAmount+obj.totalPrice;
|
// param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
|
||||||
param.totalNum = param.totalNum+Number(obj.orderNum)
|
param.refundTotalNum = param.refundTotalNum+Number(obj.refundNum)
|
||||||
param.orderGoodsDetailList.push(obj)
|
param.detailList.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(this.noMaterial){
|
if(this.noMaterial){
|
||||||
this.$modal.msgError("请输入单价和数量!");
|
this.$modal.msgError("请输入退货数量!");
|
||||||
}else{
|
}else{
|
||||||
this.noMaterial = true;
|
this.noMaterial = true;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
|
|
@ -508,23 +418,13 @@ export default {
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请添加货品!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.loadingBtn=true;
|
||||||
if (this.baseInfo.orderGoodsId != undefined) {
|
addReturnMaterialApi(param).then((response) => {
|
||||||
editPurchaseOrderApi(param).then((response) => {
|
this.$modal.msgSuccess("保存成功");
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.loadingBtn=false
|
||||||
this.loadingBtn=false
|
this.jumpList()
|
||||||
this.jumpList()
|
}).catch(() => {
|
||||||
}).catch(() => {
|
this.loadingBtn=false
|
||||||
this.loadingBtn=false
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addPurchaseOrderApi(param).then((response) => {
|
|
||||||
this.$modal.msgSuccess("保存成功");
|
|
||||||
this.loadingBtn=false
|
|
||||||
this.jumpList()
|
|
||||||
}).catch(() => {
|
|
||||||
this.loadingBtn=false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -536,29 +436,27 @@ export default {
|
||||||
this.$refs["baseInfo"].validate(valid => {
|
this.$refs["baseInfo"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = Object.assign({},this.baseInfo);
|
let param = Object.assign({},this.baseInfo);
|
||||||
param.requestArrivalTime = this.formatDate(this.baseInfo.requestArrivalTime)
|
param.refundTime = this.formatDate(this.baseInfo.refundTime)
|
||||||
param.payMoneyDate = this.formatDate(this.baseInfo.payMoneyDate)
|
param.refundTotalAmount=0
|
||||||
param.orderAmount=0
|
param.refundTotalNum=0
|
||||||
param.totalNum=0
|
param.detailList = []
|
||||||
param.orderStatus=2
|
|
||||||
param.orderGoodsDetailList = []
|
|
||||||
this.noMaterial = false;
|
this.noMaterial = false;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
this.materialList.forEach(item=>{
|
this.materialList.forEach(item=>{
|
||||||
if(item.singlePrice==0 || item.orderNum==0){
|
if(item.refundNum==0){
|
||||||
this.noMaterial = true
|
this.noMaterial = true
|
||||||
}else{
|
}else{
|
||||||
let obj = Object.assign({}, item)
|
let obj = Object.assign({}, item)
|
||||||
obj.singlePrice = Number(obj.singlePrice)*100
|
// obj.singlePrice = Number(obj.singlePrice)*100
|
||||||
obj.totalPrice = (Number(obj.singlePrice)*Number(obj.orderNum))
|
// obj.totalPrice = (Number(obj.singlePrice)*Number(obj.refundNum))
|
||||||
param.orderAmount = param.orderAmount+obj.totalPrice;
|
// param.refundTotalAmount = param.refundTotalAmount+obj.totalPrice;
|
||||||
param.totalNum = param.totalNum+Number(obj.orderNum)
|
param.refundTotalNum = param.refundTotalNum+Number(obj.refundNum)
|
||||||
param.orderGoodsDetailList.push(obj)
|
param.detailList.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(this.noMaterial){
|
if(this.noMaterial){
|
||||||
this.$modal.msgError("请输入单价和数量!");
|
this.$modal.msgError("请输入退货数量!");
|
||||||
}else{
|
}else{
|
||||||
this.noMaterial = true;
|
this.noMaterial = true;
|
||||||
if(this.materialList.length>0){
|
if(this.materialList.length>0){
|
||||||
|
|
@ -569,26 +467,17 @@ export default {
|
||||||
this.$modal.msgError("请添加货品!");
|
this.$modal.msgError("请添加货品!");
|
||||||
}else{
|
}else{
|
||||||
this.loadingBtn=true;
|
this.loadingBtn=true;
|
||||||
if (this.baseInfo.orderGoodsId != undefined) {
|
editReturnMaterialApi(param).then((response) => {
|
||||||
editPurchaseOrderApi(param).then((response) => {
|
this.$modal.msgSuccess("提交成功");
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.loadingBtn=false
|
||||||
this.loadingBtn=false
|
this.jumpList()
|
||||||
this.jumpList()
|
}).catch(() => {
|
||||||
}).catch(() => {
|
this.loadingBtn=false
|
||||||
this.loadingBtn=false
|
});
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addPurchaseOrderApi(param).then((response) => {
|
|
||||||
this.$modal.msgSuccess("保存成功");
|
|
||||||
this.loadingBtn=false
|
|
||||||
this.jumpList()
|
|
||||||
}).catch(() => {
|
|
||||||
this.loadingBtn=false
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,6 @@
|
||||||
<el-form-item label="关键字" prop="searchValue">
|
<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>
|
||||||
<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="returnMan">
|
|
||||||
<el-input v-model="queryParams.returnMan" placeholder="请输入退货人" maxlength="20" clearable style="width: 240px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="退货日期">
|
<el-form-item label="退货日期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
|
|
@ -30,6 +18,15 @@
|
||||||
:picker-options="pickerOptions" >
|
:picker-options="pickerOptions" >
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<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="areaId">
|
<el-form-item label="所属区域" prop="areaId">
|
||||||
<el-cascader v-model="queryParams.areaId"
|
<el-cascader v-model="queryParams.areaId"
|
||||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||||
|
|
@ -40,8 +37,11 @@
|
||||||
}" clearable @change="handleAreaChange">
|
}" clearable @change="handleAreaChange">
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交状态" prop="orderStatus">
|
<el-form-item label="退货人" prop="returnMan">
|
||||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择提交状态" style="width: 240px;">
|
<el-input v-model="queryParams.returnMan" placeholder="请输入退货人" maxlength="20" clearable style="width: 240px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="提交状态" prop="commitStatus">
|
||||||
|
<el-select v-model="queryParams.commitStatus" placeholder="请选择提交状态" style="width: 240px;">
|
||||||
<el-option label="待提交" :value="1"></el-option>
|
<el-option label="待提交" :value="1"></el-option>
|
||||||
<el-option label="已提交" :value="2"></el-option>
|
<el-option label="已提交" :value="2"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
@ -71,13 +71,13 @@
|
||||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退货状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
|
<el-table-column label="退货状态" align="center" prop="commitStatus" :show-overflow-tooltip="true" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.orderStatus==1">待提交</span>
|
<span v-if="scope.row.commitStatus==1">待提交</span>
|
||||||
<span v-if="scope.row.orderStatus==2">已提交</span>
|
<span v-if="scope.row.commitStatus==2">已提交</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="退货单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" />
|
<el-table-column label="退货单号" align="center" prop="refundGoodsCode" :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="areaName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
|
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
|
||||||
<!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
|
<!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
|
||||||
|
|
@ -110,17 +110,17 @@
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus==1"
|
icon="el-icon-edit" v-if="scope.row.commitStatus==1"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit" v-if="scope.row.orderStatus==2"
|
icon="el-icon-edit" v-if="scope.row.commitStatus==2"
|
||||||
@click="handleView(scope.row)"
|
@click="handleView(scope.row)"
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
size="mini" v-if="scope.row.orderStatus==1"
|
size="mini" v-if="scope.row.commitStatus==1"
|
||||||
type="text" :disabled="loadingBtn"
|
type="text" :disabled="loadingBtn"
|
||||||
icon="el-icon-top"
|
icon="el-icon-top"
|
||||||
@click="confirmSubmit(scope.row)"
|
@click="confirmSubmit(scope.row)"
|
||||||
|
|
@ -162,9 +162,9 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
import { systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi } from "@/api/base/stall";
|
||||||
import { supplierPageApi } from "@/api/foodManage/purchaseManage";
|
import { supplierPageApi } from "@/api/foodManage/returnManage";
|
||||||
import { purchaseOrderPageApi,editPurchaseOrderApi,delPurchaseOrderApi } from "@/api/foodManage/purchaseManage";
|
import { returnMaterialPageApi,delReturnMaterialApi } from "@/api/foodManage/returnManage";
|
||||||
|
//returnMaterialPageApi getReturnMaterialInfoApi addReturnMaterialApi editReturnMaterialApi delReturnMaterialApi
|
||||||
export default {
|
export default {
|
||||||
name: "",
|
name: "",
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
|
@ -274,22 +274,20 @@ export default {
|
||||||
let param = {
|
let param = {
|
||||||
"pageNum": this.queryParams.pageNum,
|
"pageNum": this.queryParams.pageNum,
|
||||||
"pageSize": this.queryParams.pageSize,
|
"pageSize": this.queryParams.pageSize,
|
||||||
"orderGoodsCode": this.queryParams.orderGoodsCode,
|
"searchValue": this.queryParams.searchValue,
|
||||||
|
"supplierId": this.queryParams.supplierId,
|
||||||
"areaId": this.queryParams.areaId,
|
"areaId": this.queryParams.areaId,
|
||||||
"canteenId": this.queryParams.canteenId,
|
"commitStatus": this.queryParams.commitStatus,
|
||||||
"stallId": this.queryParams.stallId,
|
|
||||||
"orderStatus": this.queryParams.orderStatus,
|
|
||||||
"supplierConfirmStatus": this.queryParams.supplierConfirmStatus,
|
|
||||||
// "approveStatus": this.queryParams.approveStatus
|
// "approveStatus": this.queryParams.approveStatus
|
||||||
}
|
}
|
||||||
if(this.dateRange&&this.dateRange.length>0){
|
if(this.dateRange&&this.dateRange.length>0){
|
||||||
param.startDateTime=this.formatDateTime(this.dateRange[0])
|
param.startTime=this.formatDateTime(this.dateRange[0])
|
||||||
param.endDateTime=this.formatDateTime(this.dateRange[1])
|
param.endTime=this.formatDateTime(this.dateRange[1])
|
||||||
}else{
|
}else{
|
||||||
param.startDateTime=undefined;
|
param.startTime=undefined;
|
||||||
param.endDateTime=undefined;
|
param.endTime=undefined;
|
||||||
}
|
}
|
||||||
purchaseOrderPageApi(param).then(response => {
|
returnMaterialPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.total = Number(response.total);
|
this.total = Number(response.total);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
@ -340,7 +338,7 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||||
return delPurchaseOrderApi({orderGoodsIds:[row.orderGoodsId]});
|
return delReturnMaterialApi({refundGoodsId:row.refundGoodsId});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
@ -348,16 +346,16 @@ export default {
|
||||||
},
|
},
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
confirmSubmit(row){
|
confirmSubmit(row){
|
||||||
let param = Object.assign({},row);
|
// let param = Object.assign({},row);
|
||||||
this.loadingBtn=true
|
// this.loadingBtn=true
|
||||||
param.orderStatus=2
|
// param.commitStatus=2
|
||||||
editPurchaseOrderApi(param).then((response) => {
|
// editPurchaseOrderApi(param).then((response) => {
|
||||||
this.$modal.msgSuccess("提交成功");
|
// this.$modal.msgSuccess("提交成功");
|
||||||
this.getList()
|
// this.getList()
|
||||||
this.loadingBtn=false
|
// this.loadingBtn=false
|
||||||
}).catch(() => {
|
// }).catch(() => {
|
||||||
this.loadingBtn=false
|
// this.loadingBtn=false
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
defaultDateRange() {
|
defaultDateRange() {
|
||||||
const end = new Date(new Date().toLocaleDateString());
|
const end = new Date(new Date().toLocaleDateString());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue