领料出库-增加查询条件
This commit is contained in:
parent
f7ec877efa
commit
fbaf1a31b4
|
|
@ -26,6 +26,15 @@ export function getUnitList(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分公司-下拉
|
||||||
|
export function getImpUnitNameListApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/select/getImpUnitNameList',
|
||||||
|
method: 'get',
|
||||||
|
params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 往来单位下拉选,过滤掉班组
|
// 往来单位下拉选,过滤掉班组
|
||||||
// 往来单位下拉选
|
// 往来单位下拉选
|
||||||
export function getUnitListFilterTeam(data) {
|
export function getUnitListFilterTeam(data) {
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,34 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item prop="leaseUnitId">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.leaseUnitId"
|
||||||
|
:options="unitList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择往来单位" @select="unitChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="leaseProjectId">
|
||||||
|
<treeselect
|
||||||
|
v-model="queryParams.leaseProjectId"
|
||||||
|
:options="proList" :normalizer="normalizer"
|
||||||
|
:show-count="true" style="width: 240px" :disable-branch-nodes="true"
|
||||||
|
noChildrenText="没有数据了" noOptionsText="没有数据" noResultsText="没有搜索结果"
|
||||||
|
placeholder="请选择工程名称" @select="proChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="impUnitName">
|
||||||
|
<el-select v-model="queryParams.impUnitName" placeholder="请选择分公司" style="width: 240px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in impUnitNameList"
|
||||||
|
:key="item.impUnitName"
|
||||||
|
:label="item.impUnitName"
|
||||||
|
:value="item.impUnitName"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
|
@ -729,13 +757,20 @@
|
||||||
<script>
|
<script>
|
||||||
import { getListLeaseApply, getApplyInfo, getCheckInfo } from '@/api/lease/apply'
|
import { getListLeaseApply, getApplyInfo, getCheckInfo } from '@/api/lease/apply'
|
||||||
import { outInfoList, getDetailsByTypeId, submitOut, submitNumOut, rejectLeaseOut, getOutNumApi,deleteLeaseOut,updatePreNum } from '@/api/lease/out'
|
import { outInfoList, getDetailsByTypeId, submitOut, submitNumOut, rejectLeaseOut, getOutNumApi,deleteLeaseOut,updatePreNum } from '@/api/lease/out'
|
||||||
|
import {
|
||||||
|
getProjectList,
|
||||||
|
getUnitList,
|
||||||
|
getImpUnitNameListApi
|
||||||
|
} from '@/api/back/index.js'
|
||||||
import vueEasyPrint from 'vue-easy-print'
|
import vueEasyPrint from 'vue-easy-print'
|
||||||
|
import Treeselect from "@riophae/vue-treeselect"
|
||||||
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
|
||||||
// import chapter from '../../../../utils/chapter';
|
// import chapter from '../../../../utils/chapter';
|
||||||
import printJS from 'print-js'
|
import printJS from 'print-js'
|
||||||
export default {
|
export default {
|
||||||
name: 'OutBound',
|
name: 'OutBound',
|
||||||
dicts: ['lease_task_status'],
|
dicts: ['lease_task_status'],
|
||||||
components: { vueEasyPrint },
|
components: { vueEasyPrint, Treeselect },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -781,8 +816,14 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
time: null, //申请时间
|
time: null, //申请时间
|
||||||
taskStatus: '',
|
taskStatus: '',
|
||||||
keyWord: ''
|
keyWord: '',
|
||||||
|
leaseUnitId: null,
|
||||||
|
leaseProjectId: null,
|
||||||
|
impUnitName: null,
|
||||||
},
|
},
|
||||||
|
unitList: [],
|
||||||
|
proList: [],
|
||||||
|
impUnitNameList: [],
|
||||||
//出库的搜索栏
|
//出库的搜索栏
|
||||||
queryOutInfo: {
|
queryOutInfo: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -847,8 +888,54 @@ export default {
|
||||||
start.setMonth(start.getMonth() - 1)
|
start.setMonth(start.getMonth() - 1)
|
||||||
this.queryParams.time = [this.format(end), this.format(end)]
|
this.queryParams.time = [this.format(end), this.format(end)]
|
||||||
this.getOutNum()
|
this.getOutNum()
|
||||||
|
this.GetUnitData()
|
||||||
|
this.GetProData()
|
||||||
|
this.getImpUnitNameList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 转换菜单数据结构 */
|
||||||
|
normalizer(node) {
|
||||||
|
if (node.children && !node.children.length) {
|
||||||
|
delete node.children;
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.children,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
// 获取 来往单位 列表数据
|
||||||
|
async GetUnitData() {
|
||||||
|
const res = await getUnitList({})
|
||||||
|
this.unitList = res.data
|
||||||
|
console.log('🚀 ~ this.unitList:', this.unitList)
|
||||||
|
},
|
||||||
|
unitChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetProData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
// 获取 工程名称 列表数据
|
||||||
|
async GetProData() {
|
||||||
|
const params = { unitId: this.queryParams.leaseUnitId}
|
||||||
|
const res = await getProjectList(params)
|
||||||
|
this.proList = res.data
|
||||||
|
this.queryParams.leaseProjectId=null
|
||||||
|
},
|
||||||
|
proChange(val){
|
||||||
|
setTimeout(()=>{
|
||||||
|
this.GetUnitData()
|
||||||
|
},500)
|
||||||
|
},
|
||||||
|
// 分公司下拉
|
||||||
|
async getImpUnitNameList () {
|
||||||
|
try {
|
||||||
|
const res = await getImpUnitNameListApi()
|
||||||
|
this.impUnitNameList = res.data
|
||||||
|
} catch (error) {
|
||||||
|
console.log('🚀 ~ error:', error)
|
||||||
|
}
|
||||||
|
},
|
||||||
async getOutNum() {
|
async getOutNum() {
|
||||||
try {
|
try {
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -928,6 +1015,7 @@ export default {
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const params = {
|
const params = {
|
||||||
|
...this.queryParams,
|
||||||
keyWord: this.queryParams.keyWord,
|
keyWord: this.queryParams.keyWord,
|
||||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue