10.25
This commit is contained in:
parent
3937a4d0f2
commit
42b9df78a8
@ -2,9 +2,11 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="card-change" >
|
<div class="card-change" >
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<el-form-item label="" prop="supplierName">
|
<el-form-item label="" prop="purchaseNo">
|
||||||
<el-select v-model="queryParams.supplierId" placeholder="供应商名称" style="width:100%" clearable
|
<el-input v-model="queryParams.purchaseNo" placeholder="请输入进货单号" />
|
||||||
>
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="supplierId">
|
||||||
|
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in suppliersList"
|
v-for="option in suppliersList"
|
||||||
:key="option.id"
|
:key="option.id"
|
||||||
@ -14,14 +16,18 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="" prop="tankName">
|
<el-form-item label="" prop="numberId">
|
||||||
<el-input v-model="queryParams.tankName" placeholder="油罐名称" />
|
<el-select v-model="queryParams.numberId" placeholder="请选择油品油号" >
|
||||||
|
<el-option
|
||||||
|
v-for="option in selectOilTypeByPrice"
|
||||||
|
:key="option.numberId"
|
||||||
|
:label="option.oilType +' '+option.oilName"
|
||||||
|
:value="option.numberId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="" v-model="queryParams.status" prop="status">
|
<el-form-item label="" v-model="queryParams.status" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="状态" style="width:100%" clearable
|
<el-select v-model="queryParams.status" placeholder="请选择状态" clearable>
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.oilPurchasedStatus"
|
v-for="dict in dict.type.oilPurchasedStatus"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
@ -30,26 +36,31 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="日期选择" prop="status">-->
|
|
||||||
<!-- <el-date-picker-->
|
|
||||||
<!-- v-model="dateRange"-->
|
|
||||||
<!-- type="datetimerange"-->
|
|
||||||
<!-- range-separator="至"-->
|
|
||||||
<!-- start-placeholder="开始日期"-->
|
|
||||||
<!-- end-placeholder="结束日期">-->
|
|
||||||
<!-- </el-date-picker>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
|
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="beginTime"
|
||||||
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始日期">
|
||||||
|
</el-date-picker>
|
||||||
|
至
|
||||||
|
<el-date-picker
|
||||||
|
v-model="endTime"
|
||||||
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item style="float: right;margin-right: 0px">
|
<el-form-item style="float: right;margin-right: 0px">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
|
||||||
@click="purchaseAdd"
|
@click="purchaseAdd"
|
||||||
v-hasPermi="['oilConfig:oilPurchase:list:add']"
|
v-hasPermi="['oilConfig:oilPurchase:list:add']"
|
||||||
|
|
||||||
>添加采购</el-button>
|
>新增采购</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -58,6 +69,7 @@
|
|||||||
:data="purchaseList"
|
:data="purchaseList"
|
||||||
border
|
border
|
||||||
:default-sort="defaultSort">
|
:default-sort="defaultSort">
|
||||||
|
<el-table-column label="序号" align="center" type="index"/>
|
||||||
<el-table-column label="进货单号" align="center" prop="purchaseNo"/>
|
<el-table-column label="进货单号" align="center" prop="purchaseNo"/>
|
||||||
<el-table-column label="供应商" align="center" prop="supplierss"/>
|
<el-table-column label="供应商" align="center" prop="supplierss"/>
|
||||||
<el-table-column label="油品-油号" align="center" prop="oils"/>
|
<el-table-column label="油品-油号" align="center" prop="oils"/>
|
||||||
@ -66,10 +78,10 @@
|
|||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
<el-tag v-if ="scope.row.status == 'await'" size="medium">待审核</el-tag>
|
<div style="color: #FF770F" v-if="scope.row.status == 'await'">待审核</div>
|
||||||
<el-tag v-if ="scope.row.status == 'qrts'" type="success" size="medium">已审核入库</el-tag>
|
<div style="color: #0DC291" v-if="scope.row.status == 'qrts'">已审核入库</div>
|
||||||
<el-tag v-if ="scope.row.status == 'yzf'" type="danger" size="medium">已作废</el-tag>
|
<div style="color: #F44522" v-if="scope.row.status == 'yzf'">已作废</div>
|
||||||
<el-tag v-if ="scope.row.status == 'ysh'" type="success" size="medium">已审核</el-tag>
|
<div style="color: #00CAFF" v-if="scope.row.status == 'ysh'">已审核</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -96,9 +108,21 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
v-if="scope.row.status == 'await'"
|
||||||
@click="dispose(scope.row)"
|
@click="dispose(scope.row)"
|
||||||
>{{ scope.row.status == 'qrts'?'查看单据':'处理单据' }}</el-button>
|
>油品入库</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
v-else-if="scope.row.status == 'ysh'"
|
||||||
|
@click="dispose(scope.row)"
|
||||||
|
>采购审核</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
v-else
|
||||||
|
@click="dispose(scope.row)"
|
||||||
|
>查看详情</el-button>
|
||||||
<!-- <el-button-->
|
<!-- <el-button-->
|
||||||
<!-- size="mini"-->
|
<!-- size="mini"-->
|
||||||
<!-- type="text"-->
|
<!-- type="text"-->
|
||||||
@ -127,6 +151,7 @@
|
|||||||
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
|
import {getPurchaseApi, getPurchaseOrderApi} from "@/api/oilConfig/oilPurchase";
|
||||||
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
|
import {getSuppliersListApi2} from "@/api/oilConfig/oilSuppliers";
|
||||||
import {getName,parseTime} from "../../../utils/fuint";
|
import {getName,parseTime} from "../../../utils/fuint";
|
||||||
|
import {getOilNameListApi} from "@/api/oilPrice";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -156,6 +181,9 @@ export default {
|
|||||||
page:null,
|
page:null,
|
||||||
pageSize:null
|
pageSize:null
|
||||||
},
|
},
|
||||||
|
selectOilTypeByPrice:[],
|
||||||
|
beginTime: "",
|
||||||
|
endTime: "",
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
// 默认排序
|
// 默认排序
|
||||||
@ -172,12 +200,25 @@ export default {
|
|||||||
async created() {
|
async created() {
|
||||||
await this.getList();
|
await this.getList();
|
||||||
this.selectSuppliers();
|
this.selectSuppliers();
|
||||||
|
this.getOilNameList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getOilNameList() {
|
||||||
|
var this_ = this
|
||||||
|
getOilNameListApi().then(response => {
|
||||||
|
var list = response.data
|
||||||
|
this_.selectOilTypeByPrice = list
|
||||||
|
});
|
||||||
|
},
|
||||||
// 获取列表
|
// 获取列表
|
||||||
getList(){
|
getList(){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getPurchaseApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
let dateRange = []
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
|
getPurchaseApi(this.addDateRange(this.queryParams, dateRange)).then(response => {
|
||||||
this.purchaseList = response.data.records;
|
this.purchaseList = response.data.records;
|
||||||
console.log("this.tankList",this.purchaseList)
|
console.log("this.tankList",this.purchaseList)
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
@ -221,6 +262,8 @@ export default {
|
|||||||
page:null,
|
page:null,
|
||||||
pageSize:null
|
pageSize:null
|
||||||
};
|
};
|
||||||
|
this.beginTime = ''
|
||||||
|
this.endTime = ''
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,8 @@ public class OilNumber extends BaseEntity {
|
|||||||
public String amplitudeOfChange; //涨幅
|
public String amplitudeOfChange; //涨幅
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
public String oilNames;
|
public String oilNames;
|
||||||
|
@TableField(exist = false)
|
||||||
|
public String oilNameId;
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
|
@ -126,7 +126,8 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getOilName" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
<select id="getOilName" resultType="com.fuint.business.petrolStationManagement.entity.OilNumber">
|
||||||
select name.id id, onm.number_id numberId,name.oil_name oilName, name.oil_type oilType,onm.oil_price oilPrice ,onm.gb_price gbPrice, name.oil_density oilDensity,onm.unit unit
|
select name.id id, onm.number_id numberId,name.oil_name oilName, name.oil_type oilType,onm.oil_price oilPrice ,onm.gb_price gbPrice,
|
||||||
|
name.oil_density oilDensity,onm.unit unit,name.id oilNameId
|
||||||
from oil_number onm
|
from oil_number onm
|
||||||
left join oil_name name on onm.oil_name = name.id
|
left join oil_name name on onm.oil_name = name.id
|
||||||
<where>
|
<where>
|
||||||
|
@ -183,9 +183,21 @@
|
|||||||
<if test="oilPurchase.supplierId != null and oilPurchase.supplierId != ''">
|
<if test="oilPurchase.supplierId != null and oilPurchase.supplierId != ''">
|
||||||
and opo.supplier_id = #{oilPurchase.supplierId}
|
and opo.supplier_id = #{oilPurchase.supplierId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="oilPurchase.numberId != null and oilPurchase.numberId != ''">
|
||||||
|
and opo.number_id = #{oilPurchase.numberId}
|
||||||
|
</if>
|
||||||
|
<if test="oilPurchase.purchaseNo != null and oilPurchase.purchaseNo != ''">
|
||||||
|
and op.purchase_no LIKE CONCAT('%', #{oilPurchase.purchaseNo}, '%')
|
||||||
|
</if>
|
||||||
<if test="oilPurchase.tankName != null and oilPurchase.tankName != ''">
|
<if test="oilPurchase.tankName != null and oilPurchase.tankName != ''">
|
||||||
and ot.tank_name LIKE CONCAT('%', #{oilPurchase.tankName}, '%')
|
and ot.tank_name LIKE CONCAT('%', #{oilPurchase.tankName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="oilPurchase.params.beginTime != null and oilPurchase.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(op.created_at,'%y%m%d') >= date_format(#{oilPurchase.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="oilPurchase.params.endTime != null and oilPurchase.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(op.created_at,'%y%m%d') <= date_format(#{oilPurchase.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
group by op.id
|
group by op.id
|
||||||
order by op.create_time desc
|
order by op.create_time desc
|
||||||
|
@ -10,4 +10,5 @@ public class OilPurchaseVO extends OilPurchase {
|
|||||||
private String tanks;
|
private String tanks;
|
||||||
private String creatorName;
|
private String creatorName;
|
||||||
private String reviewerName;
|
private String reviewerName;
|
||||||
|
private String numberId;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user