|
|
|
|
@ -11,55 +11,55 @@
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="物资名称搜索" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-cascader v-model="select.fenlei" placeholder="请选择所属种类" ref="cascaders" clearable popper-class="select_popper"
|
|
|
|
|
style="margin-right: 10px;flex-basis: 20%;" :options="fenleiList" :props="{label:'name',value:'id'}"
|
|
|
|
|
@change="(e)=>{changeFenlei(e)}" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.suozaicangku" style="width:100%" placeholder="请选择所在仓库">
|
|
|
|
|
<el-option v-for="item in cangkuList" :key="item.id" :label="item.cangkumingcheng" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-date-picker type="daterange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="入库日期开始"
|
|
|
|
|
end-placeholder="入库日期结束"
|
|
|
|
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="select.rukuriqi"></el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-date-picker format="yyyy-MM-dd"
|
|
|
|
|
type="daterange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="生产日期开始"
|
|
|
|
|
end-placeholder="生产日期结束"
|
|
|
|
|
value-format="yyyy-MM-dd" v-model="select.shengchanriqi"></el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.wuzizhuangtai" style="width:100%" placeholder="请选择物资状态">
|
|
|
|
|
<el-option v-for="item in paraOptions.materials_status" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.chanquanxinxi" style="width:100%" placeholder="请选择产权信息">
|
|
|
|
|
<el-option v-for="item in paraOptions.materials_property" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.chubeifangshi" style="width:100%" placeholder="请选择储备方式">
|
|
|
|
|
<el-option v-for="item in paraOptions.material_reserve" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.dengjifenlei" style="width:100%" placeholder="请选择等级分类">
|
|
|
|
|
<el-option v-for="item in paraOptions.dengjifenlei" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
@change="(e)=>{changeFenlei(e)}" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.suozaicangku" style="width:100%" placeholder="请选择所在仓库">
|
|
|
|
|
<el-option v-for="item in cangkuList" :key="item.id" :label="item.cangkumingcheng" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-date-picker type="daterange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="入库日期开始"
|
|
|
|
|
end-placeholder="入库日期结束"
|
|
|
|
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" v-model="select.rukuriqi"></el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-date-picker format="yyyy-MM-dd"
|
|
|
|
|
type="daterange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="生产日期开始"
|
|
|
|
|
end-placeholder="生产日期结束"
|
|
|
|
|
value-format="yyyy-MM-dd" v-model="select.shengchanriqi"></el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.wuzizhuangtai" style="width:100%" placeholder="请选择物资状态">
|
|
|
|
|
<el-option v-for="item in paraOptions.materials_status" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.chanquanxinxi" style="width:100%" placeholder="请选择产权信息">
|
|
|
|
|
<el-option v-for="item in paraOptions.materials_property" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.chubeifangshi" style="width:100%" placeholder="请选择储备方式">
|
|
|
|
|
<el-option v-for="item in paraOptions.material_reserve" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="selector-item">
|
|
|
|
|
<el-select clearable v-model="select.dengjifenlei" style="width:100%" placeholder="请选择等级分类">
|
|
|
|
|
<el-option v-for="item in paraOptions.dengjifenlei" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="selector-item">
|
|
|
|
|
<span class="selector-item__label">入库数量:</span>
|
|
|
|
|
@ -73,11 +73,11 @@
|
|
|
|
|
<span class="selector-item__label">~</span>
|
|
|
|
|
<Input v-model="select.max" clearable style="width: 60px;margin:0 3px" placeholder="" />
|
|
|
|
|
</div> -->
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="getindex">查询</el-button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="toprint">打印</el-button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;"
|
|
|
|
|
@click="exportExcel(new Date().getTime().toString())">导出</el-button>
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="getindex">查询</el-button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="toprint">打印</el-button>
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;"
|
|
|
|
|
@click="exportExcel(new Date().getTime().toString())">导出</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</slot>
|
|
|
|
|
@ -94,16 +94,16 @@
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
</template> -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:btns>
|
|
|
|
|
<!-- <div></div> isPandian==='pandian' && -->
|
|
|
|
|
<el-table-column v-if="(isCkName=='仓库管理员'||roleName=='系统管理员')" fixed="right"
|
|
|
|
|
align="center" label="操作" width="120" header-align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<!-- <Button type="primary" size="small" @click="editorIn(scope.row.id,'editor')">盘点</Button> -->
|
|
|
|
|
<Button type="primary" size="small" @click="editorStocks(scope.row.id)">编辑明细</Button>
|
|
|
|
|
<!-- <Button type="primary" size="small" @click="editorIn(scope.row.id,'editor')">盘点</Button> -->
|
|
|
|
|
<Button type="primary" size="small" @click="editorStocks(scope.row.id)">编辑明细</Button>
|
|
|
|
|
<!-- -->
|
|
|
|
|
<!-- <Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteIn(scope.row)">
|
|
|
|
|
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
|
|
|
|
|
@ -128,19 +128,19 @@
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
index,
|
|
|
|
|
destroy,
|
|
|
|
|
destroy,
|
|
|
|
|
save
|
|
|
|
|
} from '@/api/inventory.js'
|
|
|
|
|
import {
|
|
|
|
|
index as getFenleilist
|
|
|
|
|
} from '@/api/fenlei.js'
|
|
|
|
|
import {
|
|
|
|
|
index as baseFormIndex
|
|
|
|
|
} from '@/api/inventory.js'
|
|
|
|
|
import {
|
|
|
|
|
index as getFenleilist
|
|
|
|
|
} from '@/api/fenlei.js'
|
|
|
|
|
import {
|
|
|
|
|
index as baseFormIndex
|
|
|
|
|
} from '@/api/system/baseForm.js'
|
|
|
|
|
import {
|
|
|
|
|
getInfo
|
|
|
|
|
} from '@/api/user.js'
|
|
|
|
|
import addInventorys from './components/addInventorys.vue'
|
|
|
|
|
import addInventorys from './components/addInventorys.vue'
|
|
|
|
|
import editStockItem from './components/editStockItem.vue'
|
|
|
|
|
import QRCode from 'qrcodejs2'
|
|
|
|
|
import {
|
|
|
|
|
@ -157,15 +157,15 @@
|
|
|
|
|
import {
|
|
|
|
|
saveAs
|
|
|
|
|
} from 'file-saver'
|
|
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
import {
|
|
|
|
|
getparameteritemMore
|
|
|
|
|
} from '@/api/system/dictionary.js'
|
|
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
import {
|
|
|
|
|
getparameteritemMore
|
|
|
|
|
} from '@/api/system/dictionary.js'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
imports,
|
|
|
|
|
addInventorys,
|
|
|
|
|
addInventorys,
|
|
|
|
|
editStockItem
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
@ -175,29 +175,29 @@
|
|
|
|
|
authName: '',
|
|
|
|
|
roleName: '',
|
|
|
|
|
isCkName: '',
|
|
|
|
|
isPandian: '',
|
|
|
|
|
fenleiList:[],
|
|
|
|
|
cangkuList:[],
|
|
|
|
|
paraOptions: {
|
|
|
|
|
'materials_status': [],
|
|
|
|
|
'material_reserve': [],
|
|
|
|
|
'materials_property': [],
|
|
|
|
|
'materials_level': []
|
|
|
|
|
// 'materials_fenlei':[],
|
|
|
|
|
isPandian: '',
|
|
|
|
|
fenleiList:[],
|
|
|
|
|
cangkuList:[],
|
|
|
|
|
paraOptions: {
|
|
|
|
|
'materials_status': [],
|
|
|
|
|
'material_reserve': [],
|
|
|
|
|
'materials_property': [],
|
|
|
|
|
'materials_level': []
|
|
|
|
|
// 'materials_fenlei':[],
|
|
|
|
|
},
|
|
|
|
|
select: {
|
|
|
|
|
pageSize: 40,
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
keyword: '',
|
|
|
|
|
wzbm: '',
|
|
|
|
|
wzbm: '',
|
|
|
|
|
fenlei:'',
|
|
|
|
|
is_export: 0,
|
|
|
|
|
wuzizhuangtai:'',
|
|
|
|
|
chanquanxinxi:'',
|
|
|
|
|
chubeifangshi:'',
|
|
|
|
|
suozaicangku:'',
|
|
|
|
|
rukuriqi:'',
|
|
|
|
|
shengchanriqi:'',
|
|
|
|
|
is_export: 0,
|
|
|
|
|
wuzizhuangtai:'',
|
|
|
|
|
chanquanxinxi:'',
|
|
|
|
|
chubeifangshi:'',
|
|
|
|
|
suozaicangku:'',
|
|
|
|
|
rukuriqi:'',
|
|
|
|
|
shengchanriqi:'',
|
|
|
|
|
dengjifenlei:'',
|
|
|
|
|
min: '',
|
|
|
|
|
max: '',
|
|
|
|
|
@ -222,30 +222,30 @@
|
|
|
|
|
label: '物资信息',
|
|
|
|
|
align: 'left',
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation',
|
|
|
|
|
multiHd: [
|
|
|
|
|
{
|
|
|
|
|
label: '一级分类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.material_info_type',
|
|
|
|
|
align: 'center',
|
|
|
|
|
multiHd: [
|
|
|
|
|
{
|
|
|
|
|
label: '一级分类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.material_info_type',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value ? value.split("-")[0] : ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '二级分类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.material_info_type',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value ? (value.split("-").length>1?value.split("-")[1]:value.split("-")[0]) : ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '所属种类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.fenlei_detail.name',
|
|
|
|
|
align: 'center'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '二级分类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.material_info_type',
|
|
|
|
|
align: 'center',
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return value ? (value.split("-").length>1?value.split("-")[1]:value.split("-")[0]) : ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '所属种类',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wuzibianma_material_infos_wuzibianma_relation.fenlei_detail.name',
|
|
|
|
|
align: 'center'
|
|
|
|
|
},{
|
|
|
|
|
label: '物资名称',
|
|
|
|
|
prop: 'zichanmingcheng',
|
|
|
|
|
@ -302,20 +302,20 @@
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
return (<span>{row.row.zaikushuliang}{row.row.jiliangdanwei?row.row.jiliangdanwei:''}</span>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '顺序号',
|
|
|
|
|
width: 180,
|
|
|
|
|
prop: 'shunxuhao',
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
return (<span>{row.row.shunxuhao?row.row.shunxuhao:''}</span>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
label: '待出库',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wait_num'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '顺序号',
|
|
|
|
|
width: 180,
|
|
|
|
|
prop: 'shunxuhao',
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
return (<span>{row.row.shunxuhao?row.row.shunxuhao:''}</span>)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
label: '待出库',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'wait_num'
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
@ -362,14 +362,14 @@
|
|
|
|
|
label: '产权信息',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'chanquanxinxi_detail.value'
|
|
|
|
|
},{
|
|
|
|
|
},{
|
|
|
|
|
label: '是否为固定资产',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'shifouweigudingzichan',
|
|
|
|
|
},{
|
|
|
|
|
prop: 'shifouweigudingzichan',
|
|
|
|
|
},{
|
|
|
|
|
label: '固定资产编码',
|
|
|
|
|
width: 120,
|
|
|
|
|
prop: 'gudingzichanbianma',
|
|
|
|
|
prop: 'gudingzichanbianma',
|
|
|
|
|
}, {
|
|
|
|
|
label: '储备年限',
|
|
|
|
|
width: 120,
|
|
|
|
|
@ -408,71 +408,71 @@
|
|
|
|
|
if (path[1]) {
|
|
|
|
|
this.isPandian = 'pandian'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.getFenlei()
|
|
|
|
|
this.getField()
|
|
|
|
|
this.getField()
|
|
|
|
|
this.getCangku()
|
|
|
|
|
this.getindex()
|
|
|
|
|
this.getUserName()
|
|
|
|
|
this.getUserName()
|
|
|
|
|
this.getData()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async updateGd(id,value){
|
|
|
|
|
const res = await save({
|
|
|
|
|
id:id,
|
|
|
|
|
'shifouweigudingzichan':value
|
|
|
|
|
})
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '更新成功'
|
|
|
|
|
})
|
|
|
|
|
this.getindex()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async updateGdbm(id,value){
|
|
|
|
|
const res = await save({
|
|
|
|
|
id:id,
|
|
|
|
|
'gudingzichanbianma':value
|
|
|
|
|
})
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '更新成功'
|
|
|
|
|
})
|
|
|
|
|
this.getindex()
|
|
|
|
|
},
|
|
|
|
|
// 获取仓库
|
|
|
|
|
methods: {
|
|
|
|
|
async updateGd(id,value){
|
|
|
|
|
const res = await save({
|
|
|
|
|
id:id,
|
|
|
|
|
'shifouweigudingzichan':value
|
|
|
|
|
})
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '更新成功'
|
|
|
|
|
})
|
|
|
|
|
this.getindex()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async updateGdbm(id,value){
|
|
|
|
|
const res = await save({
|
|
|
|
|
id:id,
|
|
|
|
|
'gudingzichanbianma':value
|
|
|
|
|
})
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '更新成功'
|
|
|
|
|
})
|
|
|
|
|
this.getindex()
|
|
|
|
|
},
|
|
|
|
|
// 获取仓库
|
|
|
|
|
async getCangku() {
|
|
|
|
|
const res = await baseFormIndex({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
page: 1,
|
|
|
|
|
table_name: 'materialstorages',
|
|
|
|
|
sort_name: 'sort',
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'shifouzili',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: '是'
|
|
|
|
|
sort_type: 'ASC',
|
|
|
|
|
filter: [{
|
|
|
|
|
key: 'shifouzili',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: '是'
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
this.cangkuList = res.data
|
|
|
|
|
},
|
|
|
|
|
// 获取数据字典
|
|
|
|
|
async getData() {
|
|
|
|
|
const res = await getparameteritemMore({
|
|
|
|
|
'number[0]': 'materials_status', // 物资状态
|
|
|
|
|
'number[1]': 'material_reserve', // 储备方式
|
|
|
|
|
'number[2]': 'materials_property', // 产权信息
|
|
|
|
|
'number[3]': 'materials_level' // 等级分类
|
|
|
|
|
// 'number[4]':'materials_fenlei', //所属种类
|
|
|
|
|
})
|
|
|
|
|
for (var k in this.paraOptions) {
|
|
|
|
|
res.map(item => {
|
|
|
|
|
if (item.number === k) {
|
|
|
|
|
this.paraOptions[k] = item.detail
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
console.log(this.paraOptions)
|
|
|
|
|
},
|
|
|
|
|
// 获取数据字典
|
|
|
|
|
async getData() {
|
|
|
|
|
const res = await getparameteritemMore({
|
|
|
|
|
'number[0]': 'materials_status', // 物资状态
|
|
|
|
|
'number[1]': 'material_reserve', // 储备方式
|
|
|
|
|
'number[2]': 'materials_property', // 产权信息
|
|
|
|
|
'number[3]': 'materials_level' // 等级分类
|
|
|
|
|
// 'number[4]':'materials_fenlei', //所属种类
|
|
|
|
|
})
|
|
|
|
|
for (var k in this.paraOptions) {
|
|
|
|
|
res.map(item => {
|
|
|
|
|
if (item.number === k) {
|
|
|
|
|
this.paraOptions[k] = item.detail
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
console.log(this.paraOptions)
|
|
|
|
|
},
|
|
|
|
|
// filterSpans
|
|
|
|
|
getSpanArr(data) {
|
|
|
|
|
@ -616,39 +616,39 @@
|
|
|
|
|
search() {
|
|
|
|
|
this.select.pageIndex = 1
|
|
|
|
|
this.getindex()
|
|
|
|
|
},
|
|
|
|
|
async getFenlei() {
|
|
|
|
|
const res = await getFenleilist({
|
|
|
|
|
tree: 1,
|
|
|
|
|
sort_type:'ASC',
|
|
|
|
|
sort_name:'sort'
|
|
|
|
|
})
|
|
|
|
|
this.fenleiList = this.removeEmptyChildren(res)
|
|
|
|
|
},
|
|
|
|
|
changeFenlei(e, row) {
|
|
|
|
|
console.log('e', e)
|
|
|
|
|
if (e) {
|
|
|
|
|
this.select.fenlei = e[e.length - 1]
|
|
|
|
|
} else {
|
|
|
|
|
this.select.fenlei = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 移除children=[]
|
|
|
|
|
removeEmptyChildren(node) {
|
|
|
|
|
if (Array.isArray(node)) {
|
|
|
|
|
return node.map(child => {
|
|
|
|
|
if (child.children) {
|
|
|
|
|
// 递归处理子节点
|
|
|
|
|
child.children = this.removeEmptyChildren(child.children);
|
|
|
|
|
// 若处理后 children 为空,删除该属性
|
|
|
|
|
if (child.children.length === 0) {
|
|
|
|
|
delete child.children;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return child;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
async getFenlei() {
|
|
|
|
|
const res = await getFenleilist({
|
|
|
|
|
tree: 1,
|
|
|
|
|
sort_type:'ASC',
|
|
|
|
|
sort_name:'sort'
|
|
|
|
|
})
|
|
|
|
|
this.fenleiList = this.removeEmptyChildren(res)
|
|
|
|
|
},
|
|
|
|
|
changeFenlei(e, row) {
|
|
|
|
|
console.log('e', e)
|
|
|
|
|
if (e) {
|
|
|
|
|
this.select.fenlei = e[e.length - 1]
|
|
|
|
|
} else {
|
|
|
|
|
this.select.fenlei = ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 移除children=[]
|
|
|
|
|
removeEmptyChildren(node) {
|
|
|
|
|
if (Array.isArray(node)) {
|
|
|
|
|
return node.map(child => {
|
|
|
|
|
if (child.children) {
|
|
|
|
|
// 递归处理子节点
|
|
|
|
|
child.children = this.removeEmptyChildren(child.children);
|
|
|
|
|
// 若处理后 children 为空,删除该属性
|
|
|
|
|
if (child.children.length === 0) {
|
|
|
|
|
delete child.children;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return child;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return [];
|
|
|
|
|
},
|
|
|
|
|
async getindex() {
|
|
|
|
|
this.loading = true
|
|
|
|
|
@ -661,25 +661,25 @@
|
|
|
|
|
page: this.select.pageIndex,
|
|
|
|
|
table_name: 'inventorys',
|
|
|
|
|
sort_type: 'DESC',
|
|
|
|
|
sort_name: 'wuzibianma',
|
|
|
|
|
fenlei:this.select.fenlei,
|
|
|
|
|
wuzizhuangtai:this.select.wuzizhuangtai,
|
|
|
|
|
chanquanxinxi:this.select.chanquanxinxi,
|
|
|
|
|
chubeifangshi:this.select.chubeifangshi,
|
|
|
|
|
suozaicangku:this.select.suozaicangku,
|
|
|
|
|
start_rukuriqi:this.select.rukuriqi?this.select.rukuriqi[0]:'',
|
|
|
|
|
end_rukuriqi:this.select.rukuriqi?this.select.rukuriqi[1]:'',
|
|
|
|
|
start_shengchanriqi:this.select.shengchanriqi?this.select.shengchanriqi[0]:'',
|
|
|
|
|
end_shengchanriqi:this.select.shengchanriqi?this.select.shengchanriqi[1]:'',
|
|
|
|
|
// shengchanriqi:this.select.shengchanriqi?this.select.shengchanriqi.join(","):'',
|
|
|
|
|
sort_name: 'wuzibianma',
|
|
|
|
|
fenlei:this.select.fenlei,
|
|
|
|
|
wuzizhuangtai:this.select.wuzizhuangtai,
|
|
|
|
|
chanquanxinxi:this.select.chanquanxinxi,
|
|
|
|
|
chubeifangshi:this.select.chubeifangshi,
|
|
|
|
|
suozaicangku:this.select.suozaicangku,
|
|
|
|
|
start_rukuriqi:this.select.rukuriqi?this.select.rukuriqi[0]:'',
|
|
|
|
|
end_rukuriqi:this.select.rukuriqi?this.select.rukuriqi[1]:'',
|
|
|
|
|
start_shengchanriqi:this.select.shengchanriqi?this.select.shengchanriqi[0]:'',
|
|
|
|
|
end_shengchanriqi:this.select.shengchanriqi?this.select.shengchanriqi[1]:'',
|
|
|
|
|
// shengchanriqi:this.select.shengchanriqi?this.select.shengchanriqi.join(","):'',
|
|
|
|
|
dengjifenlei:this.select.dengjifenlei,
|
|
|
|
|
// is_export:this.select.is_export,
|
|
|
|
|
filter: [
|
|
|
|
|
// {
|
|
|
|
|
// 'key': 'wuzibianma',
|
|
|
|
|
// 'op': 'like',
|
|
|
|
|
// 'value': this.select.wzbm
|
|
|
|
|
// },
|
|
|
|
|
filter: [
|
|
|
|
|
/* {
|
|
|
|
|
'key': 'wuzibianma',
|
|
|
|
|
'op': 'like',
|
|
|
|
|
'value': this.select.wzbm
|
|
|
|
|
}, */
|
|
|
|
|
{
|
|
|
|
|
'key': 'zichanmingcheng',
|
|
|
|
|
'op': 'like',
|
|
|
|
|
@ -700,11 +700,11 @@
|
|
|
|
|
// 筛选出 入库批次
|
|
|
|
|
// let stocks_items_arr = []
|
|
|
|
|
// res.list.data.map(item => {
|
|
|
|
|
// stocks_items_arr = item.stocks_items.filter(f => f.id === item.stocks_item_id)
|
|
|
|
|
// stocks_items_arr = item.stocks_items.filter(f => f.id === item.stocks_item_id)
|
|
|
|
|
// console.log("stocks_items_arr",stocks_items_arr)
|
|
|
|
|
// item.stocks_items_info = stocks_items_arr.length > 0 ? stocks_items_arr[0] : {},
|
|
|
|
|
// item.stocks_items_info = stocks_items_arr.length > 0 ? stocks_items_arr[0] : {},
|
|
|
|
|
// console.log("item.stocks_items_info",item.stocks_items_info)
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
this.list = res.list.data
|
|
|
|
|
this.total = res.list.total
|
|
|
|
|
@ -723,10 +723,10 @@
|
|
|
|
|
this.$refs['addInventorys'].id = id
|
|
|
|
|
this.$refs['addInventorys'].isShow = true
|
|
|
|
|
this.$refs['addInventorys'].type = type
|
|
|
|
|
},
|
|
|
|
|
editorStocks(id){
|
|
|
|
|
this.$refs['editStockItem'].id = id
|
|
|
|
|
this.$refs['editStockItem'].isShowMingxi = true
|
|
|
|
|
},
|
|
|
|
|
editorStocks(id){
|
|
|
|
|
this.$refs['editStockItem'].id = id
|
|
|
|
|
this.$refs['editStockItem'].isShowMingxi = true
|
|
|
|
|
},
|
|
|
|
|
deleteIn(row) {
|
|
|
|
|
console.log(row.id)
|
|
|
|
|
@ -813,9 +813,9 @@
|
|
|
|
|
height: 100%;
|
|
|
|
|
z-index: 9999
|
|
|
|
|
}
|
|
|
|
|
.selector-item{
|
|
|
|
|
margin-right:10px;
|
|
|
|
|
margin-bottom:5px;
|
|
|
|
|
.selector-item{
|
|
|
|
|
margin-right:10px;
|
|
|
|
|
margin-bottom:5px;
|
|
|
|
|
}
|
|
|
|
|
#qrCode {
|
|
|
|
|
position: absolute;
|
|
|
|
|
@ -823,4 +823,4 @@
|
|
|
|
|
left: 50%;
|
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|