出入库单管理配置

20231126-yw
yuanwei 1 year ago
parent 248adc6b50
commit 0edb66eaeb

@ -27,6 +27,14 @@ export function getLocalJoinByUserOptimize(params) {
}); });
} }
export function getOrderDetailBusOptimize(params) {
return axios({
url: "/udiwms/orderDetail/busTypesOptimize",
method: "get",
params: params
});
}
export function getOrderDetailBus(params) { export function getOrderDetailBus(params) {
return axios({ return axios({

@ -259,6 +259,13 @@ export function findAllInvByUser(params) {
}); });
} }
export function findAllInvByUserOptimize(params) {
return axios({
url: "/spms/inv/warehouse/findAllInvByUserOptimize",
method: "get",
params: params
});
}

File diff suppressed because it is too large Load Diff

@ -1,145 +1,214 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch"> <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row> <!-- <el-row>-->
<el-col :span="18"> <!-- <el-col :span="18">-->
<el-form-item class="query-form-item" label="扫码查询:"> <!-- <el-form-item class="query-form-item" label="扫码查询:">-->
<el-input v-model="filterQuery.udiCode" <!-- <el-input v-model="filterQuery.udiCode"-->
style="width: 97%" <!-- style="width: 97%"-->
placeholder="请扫描或输入UDI码" <!-- placeholder="请扫描或输入UDI码"-->
clearable="true" <!-- clearable="true"-->
@keyup.enter.native="keyup_submit($event)"></el-input> <!-- @keyup.enter.native="keyup_submit($event)"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="DI/物资编码:"> <!-- <el-form-item class="query-form-item" label="DI/物资编码:">-->
<el-input v-model="filterQuery.nameCode" placeholder="DI/物资编码" <!-- <el-input v-model="filterQuery.nameCode" placeholder="DI/物资编码"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="物资名称:"> <!-- <el-form-item class="query-form-item" label="物资名称:">-->
<el-input v-model="filterQuery.cpmctymc" placeholder="物资名称" <!-- <el-input v-model="filterQuery.cpmctymc" placeholder="物资名称"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="规格型号:"> <!-- <el-form-item class="query-form-item" label="规格型号:">-->
<el-input v-model="filterQuery.ggxh" placeholder="规格型号" <!-- <el-input v-model="filterQuery.ggxh" placeholder="规格型号"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="批次号:"> <!-- <el-form-item class="query-form-item" label="批次号:">-->
<el-input v-model="filterQuery.batchNo" placeholder="批次号" <!-- <el-input v-model="filterQuery.batchNo" placeholder="批次号"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="注册/备案号:"> <!-- <el-form-item class="query-form-item" label="注册/备案号:">-->
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案号" <!-- <el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案号"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="生产企业:"> <!-- <el-form-item class="query-form-item" label="生产企业:">-->
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产企业" <!-- <el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产企业"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="所属仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="所属货位:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.invSpaceCode"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="请选择所属货位"-->
<!-- :remote-method="getSpaceList"-->
<!-- size="mini"-->
<!-- :loading="corpLoading"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in spaceList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code"-->
<!-- >-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="过滤方式:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.filterNoInv"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <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-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="供应商名称:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.supId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="请选择供应商名称"-->
<!-- :remote-method="findMethod"-->
<!-- size="mini"-->
<!-- :loading="corpLoading"-->
<!-- @change="corpChange"-->
<!-- style="width: 90%"-->
<!-- @clear="getcorp"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in fromOptions"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.erpId"-->
<!-- >-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-select v-model="filterQuery[item.columnName]"
<el-form-item class="query-form-item" label="所属仓库:"> :placeholder="item.columnDesc"
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true" :disabled="executeEval(null,item.disabledFuc,false)"
style="width: 90%" clearable>
@change="invChange"
>
<el-option <el-option
v-for="item in invList" v-for="dict in item.lableRuleObj"
:key="item.name" :key="dict.value"
:label="item.name" :label="dict.label"
:value="item.code"> :value="dict.value"
<span style="float: left">{{ item.name }}</span> />
</el-option> <span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6">
<el-form-item class="query-form-item" label="所属货位:">
<el-select <el-select
v-model="filterQuery.invSpaceCode" v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable filterable
remote remote
clearable="true" :remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
reserve-keyword clearable>
placeholder="请选择所属货位"
:remote-method="getSpaceList"
size="mini"
:loading="corpLoading"
style="width: 90%"
>
<el-option <el-option
v-for="item in spaceList" v-for="item in options[item.clickFuc]"
:key="item.name" :key="item.code"
:label="item.name" :label="item.label"
:value="item.code" :value="item.code"
> />
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span> <span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-date-picker
<el-form-item label="过滤方式:"> :picker-options="pickerOptions"
<el-select v-model="actDateRange"
v-model="filterQuery.filterNoInv" type="daterange"
style="width: 90%" format="yyyy 年 MM 月 dd 日"
clearable> value-format="yyyy-MM-dd"
<el-option label="有库存" :value="1"></el-option> range-separator="至"
<el-option label="零库存" :value="2"></el-option> start-placeholder="开始日期"
<el-option label="负库存" :value="3"></el-option> end-placeholder="结束日期"
</el-select> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-date-picker
<el-form-item class="query-form-item" label="供应商名称:"> v-model="filterQuery[item.columnName]"
<el-select :style="`width:${item.width+'px'}`"
v-model="filterQuery.supId" value-format="yyyy-MM-dd"
filterable :disabled="executeEval(null,item.disabledFuc,false)"
remote type="date"
clearable="true" :placeholder="item.columnDesc"
reserve-keyword ></el-date-picker>
placeholder="请选择供应商名称"
:remote-method="findMethod"
size="mini"
:loading="corpLoading"
@change="corpChange"
style="width: 90%"
@clear="getcorp"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
@ -160,51 +229,138 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row <el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
border> border>
<el-table-column label="序号" type="index"></el-table-column> <!-- <el-table-column label="序号" type="index"></el-table-column>-->
<el-table-column label="供应商" prop="supName" v-if="showSup" show-overflow-tooltip <!-- <el-table-column label="供应商" prop="supName" v-if="showSup" show-overflow-tooltip-->
width="120"></el-table-column> <!-- width="120"></el-table-column>-->
<el-table-column label="货架" prop="spaceName" <!-- <el-table-column label="货架" prop="spaceName"-->
v-if="filterQuery.invSpaceCode!='' && filterQuery.invSpaceCode!=null" show-overflow-tooltip <!-- v-if="filterQuery.invSpaceCode!='' && filterQuery.invSpaceCode!=null" show-overflow-tooltip-->
width="120"></el-table-column> <!-- width="120"></el-table-column>-->
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column> <!-- <el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>-->
<el-table-column label="物资名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column> <!-- <el-table-column label="物资名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column>-->
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column> <!-- <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column>-->
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column> <!-- <el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>-->
<el-table-column label="价格" prop="price" width="120"></el-table-column> <!-- <el-table-column label="价格" prop="price" width="120"></el-table-column>-->
<el-table-column label="入库数量" prop="inCount" width="120"></el-table-column> <!-- <el-table-column label="入库数量" prop="inCount" width="120"></el-table-column>-->
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column> <!-- <el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>-->
<el-table-column label="结余数量" prop="reCount" width="120"> <!-- <el-table-column label="结余数量" prop="reCount" width="120">-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="部门" prop="deptName" v-if="showSup" <!-- <el-table-column label="部门" prop="deptName" v-if="showSup"-->
show-overflow-tooltip width="120"></el-table-column> <!-- show-overflow-tooltip width="120"></el-table-column>-->
<el-table-column label="仓库" prop="invName" v-if="showSup" <!-- <el-table-column label="仓库" prop="invName" v-if="showSup"-->
show-overflow-tooltip width="120"></el-table-column> <!-- show-overflow-tooltip width="120"></el-table-column>-->
<el-table-column label="计量单位" prop="measname" width="120"></el-table-column> <!-- <el-table-column label="计量单位" prop="measname" width="120"></el-table-column>-->
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column> <!-- <el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>-->
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column> <!-- <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>-->
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip <!-- <el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip-->
width="120"></el-table-column> <!-- width="120"></el-table-column>-->
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column> <!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column>-->
<el-table-column label="操作" width="80" fixed="right"> <!-- <el-table-column label="操作" width="80" fixed="right">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
@click.native.stop="detailDialog(scope.row)" <!-- @click.native.stop="detailDialog(scope.row)"-->
>详情 <!-- >详情-->
</el-button <!-- </el-button-->
> <!-- >-->
<!-- <el-button--> <!-- &lt;!&ndash; <el-button&ndash;&gt;-->
<!-- type="text"--> <!-- &lt;!&ndash; type="text"&ndash;&gt;-->
<!-- size="small"--> <!-- &lt;!&ndash; size="small"&ndash;&gt;-->
<!-- @click.native.stop="deleteDialog(scope.row.id)"--> <!-- &lt;!&ndash; @click.native.stop="deleteDialog(scope.row.id)"&ndash;&gt;-->
<!-- >删除--> <!-- &lt;!&ndash; >删除&ndash;&gt;-->
<!-- </el-button--> <!-- &lt;!&ndash; </el-button&ndash;&gt;-->
<!-- >--> <!-- &lt;!&ndash; >&ndash;&gt;-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -233,13 +389,16 @@
</template> </template>
<script> <script>
import {findAllInvByUser} from "@/api/system/invWarehouse"; import {findAllInvByUserOptimize} from "@/api/system/invWarehouse";
import {getInvPreProduct, deleteInvPreProduct} from "@/api/inventory/invPreProduct"; import {getInvPreProduct, deleteInvPreProduct} from "@/api/inventory/invPreProduct";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintainsOptimize} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import invPreProductsDetail from "@/views/inventory/InvPreProductsDetail.vue"; import invPreProductsDetail from "@/views/inventory/InvPreProductsDetail.vue";
import {getInvSpaceList} from "@/api/inventory/invSpace"; import {getInvSpaceListOptimize} from "@/api/inventory/invSpace";
import {selectUser} from "@/api/auth/authAdmin"; import {selectUser} from "@/api/auth/authAdmin";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default { export default {
name: "InvPreProducts", name: "InvPreProducts",
@ -258,10 +417,18 @@ export default {
invSpaceCode: null, invSpaceCode: null,
page: 1, page: 1,
limit: 10, limit: 10,
filterNoInv: 1, filterNoInv: "1",
}, },
list: [], list: [],
total: 0, total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
findMethod:[],
getSpaceList:[],
},
invList: [], invList: [],
invId: null, invId: null,
spaceList: [], spaceList: [],
@ -309,7 +476,7 @@ export default {
limit: 10, limit: 10,
}; };
this.getList(); this.getList();
this.findMethod(); this.findMethod(this);
}, },
onSubmit() { onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
@ -326,12 +493,11 @@ export default {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
}, },
keyup_submit(event) { keyup_submit(_this,event) {
this.filterQuery.page = 1; _this.filterQuery.page = 1;
this.getList(); _this.getList();
event.target.select(); event.target.select();
}, },
getList() { getList() {
this.loading = true; this.loading = true;
// this.filterQuery.supId = this.$store.getters.customerId; // this.filterQuery.supId = this.$store.getters.customerId;
@ -352,51 +518,51 @@ export default {
this.total = 0; this.total = 0;
}) })
}, },
getInvList() { getInvList(_this) {
let query = { let query = {
advanceType: 3, //123 advanceType: 3, //123
}; };
findAllInvByUser(query) findAllInvByUserOptimize(query)
.then((response) => { .then((response) => {
this.invList = response.data || []; _this.options.getInvList = response.data || [];
for (var i = 0; i < this.invList.length; i++) { for (var i = 0; i < _this.options.getInvList.length; i++) {
if (this.invList[i].advanceType == 3) { if (_this.options.getInvList[i].advanceType == 3) {
this.filterQuery.invCode = this.invList[i].code; _this.filterQuery.invCode = _this.options.getInvList[i].code;
} }
} }
this.getList(); _this.getList();
this.getSpaceList(); _this.getSpaceList(_this);
}) })
.catch(() => { .catch(() => {
}); });
}, },
findMethod(key) { findMethod(_this,key) {
this.corpLoading = true; _this.corpLoading = true;
this.fromOptions = []; _this.fromOptions = [];
let params = { let params = {
key: key, key: key,
corpType: 2, corpType: 2,
page: 1, page: 1,
limit: 20 limit: 20
}; };
getBasicUnitMaintains(params).then((res) => { getBasicUnitMaintainsOptimize(params).then((res) => {
this.corpLoading = false; _this.corpLoading = false;
this.fromOptions = res.data.list || []; _this.options.findMethod = res.data.list || [];
}).catch(() => { }).catch(() => {
this.corpLoading = false; _this.corpLoading = false;
}) });
}, },
corpChange(value) { corpChange(_this,value) {
if (!isBlank(value)) { if (!isBlank(value)) {
this.findMethod(value); _this.findMethod(_this,value);
} }
}, },
getcorp() { getcorp() {
this.findMethod(); this.findMethod(this);
}, },
detailDialog(row) { detailDialog(_this,row) {
this.detailDialogVisible = true; _this.detailDialogVisible = true;
this.inputQuery = { _this.inputQuery = {
relId: row.relIdFk, relId: row.relIdFk,
cpmctymc: row.cpmctymc, cpmctymc: row.cpmctymc,
nameCode: row.nameCode, nameCode: row.nameCode,
@ -436,17 +602,17 @@ export default {
this.$message.error(error.message); this.$message.error(error.message);
}); });
}, },
getSpaceList() { getSpaceList(_this) {
if (isBlank(this.filterQuery.invCode)) { if (isBlank(_this.filterQuery.invCode)) {
return; return;
} }
let params = { let params = {
invWarehouseCode: this.filterQuery.invCode, invWarehouseCode: _this.filterQuery.invCode,
status: 1 status: 1
}; };
getInvSpaceList(params).then((res) => { getInvSpaceListOptimize(params).then((res) => {
this.spaceList = res.data.list || []; _this.options.getSpaceList = res.data.list || [];
}) })
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
@ -461,9 +627,18 @@ export default {
} }
cb(results); cb(results);
}, },
invChange() { invChange(_this) {
this.getSpaceList(); _this.getSpaceList();
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
}, },
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
}, },
components: { components: {
invPreProductsDetail invPreProductsDetail
@ -483,8 +658,15 @@ export default {
}).catch(() => { }).catch(() => {
this.corpLoading = false; this.corpLoading = false;
}); });
this.findMethod(); this.findMethod(this);
this.getInvList(); this.getInvList(this);
getHead("invPreProducts","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
//this.getList(); //this.getList();
}, },
}; };

@ -442,7 +442,8 @@ export default {
fromList:[], fromList:[],
options: { options: {
getInvList:[], getInvList:[],
getDeptList:[], findMethod:[],
getSpaceList:[],
}, },
invList: [], invList: [],
loading: false, loading: false,

@ -1,145 +1,214 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch"> <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row> <!-- <el-row>-->
<el-col :span="18"> <!-- <el-col :span="18">-->
<el-form-item class="query-form-item" label="扫码查询:"> <!-- <el-form-item class="query-form-item" label="扫码查询:">-->
<el-input v-model="filterQuery.udiCode" <!-- <el-input v-model="filterQuery.udiCode"-->
style="width: 97%" <!-- style="width: 97%"-->
placeholder="请扫描或输入UDI码" <!-- placeholder="请扫描或输入UDI码"-->
clearable="true" <!-- clearable="true"-->
@keyup.enter.native="keyup_submit($event)"></el-input> <!-- @keyup.enter.native="keyup_submit($event)"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="DI/物资编码:"> <!-- <el-form-item class="query-form-item" label="DI/物资编码:">-->
<el-input v-model="filterQuery.nameCode" placeholder="DI/物资编码" <!-- <el-input v-model="filterQuery.nameCode" placeholder="DI/物资编码"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="物资名称:"> <!-- <el-form-item class="query-form-item" label="物资名称:">-->
<el-input v-model="filterQuery.cpmctymc" placeholder="物资名称" <!-- <el-input v-model="filterQuery.cpmctymc" placeholder="物资名称"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="规格型号:"> <!-- <el-form-item class="query-form-item" label="规格型号:">-->
<el-input v-model="filterQuery.ggxh" placeholder="规格型号" <!-- <el-input v-model="filterQuery.ggxh" placeholder="规格型号"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="批次号:"> <!-- <el-form-item class="query-form-item" label="批次号:">-->
<el-input v-model="filterQuery.batchNo" placeholder="批次号" <!-- <el-input v-model="filterQuery.batchNo" placeholder="批次号"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
<el-row> <!-- <el-row>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="注册/备案号:"> <!-- <el-form-item class="query-form-item" label="注册/备案号:">-->
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案号" <!-- <el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案号"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!-- </el-col>-->
<el-col :span="6"> <!-- <el-col :span="6">-->
<el-form-item class="query-form-item" label="生产企业:"> <!-- <el-form-item class="query-form-item" label="生产企业:">-->
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产企业" <!-- <el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产企业"-->
style="width: 90%" <!-- style="width: 90%"-->
clearable="true"></el-input> <!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="所属仓库:">-->
<!-- <el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"-->
<!-- style="width: 90%"-->
<!-- @change="invChange"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="所属货位:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.invSpaceCode"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="请选择所属货位"-->
<!-- :remote-method="getSpaceList"-->
<!-- size="mini"-->
<!-- :loading="corpLoading"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in spaceList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code"-->
<!-- >-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="过滤方式:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.filterNoInv"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <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-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item class="query-form-item" label="供应商名称:">-->
<!-- <el-select-->
<!-- v-model="filterQuery.supId"-->
<!-- filterable-->
<!-- remote-->
<!-- clearable="true"-->
<!-- reserve-keyword-->
<!-- placeholder="请选择供应商名称"-->
<!-- :remote-method="findMethod"-->
<!-- size="mini"-->
<!-- :loading="corpLoading"-->
<!-- @change="corpChange"-->
<!-- style="width: 90%"-->
<!-- @clear="getcorp"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in fromOptions"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.erpId"-->
<!-- >-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-select v-model="filterQuery[item.columnName]"
<el-form-item class="query-form-item" label="所属仓库:"> :placeholder="item.columnDesc"
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true" :disabled="executeEval(null,item.disabledFuc,false)"
style="width: 90%" clearable>
@change="invChange"
>
<el-option <el-option
v-for="item in invList" v-for="dict in item.lableRuleObj"
:key="item.name" :key="dict.value"
:label="item.name" :label="dict.label"
:value="item.code"> :value="dict.value"
<span style="float: left">{{ item.name }}</span> />
</el-option> <span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6">
<el-form-item class="query-form-item" label="所属货位:">
<el-select <el-select
v-model="filterQuery.invSpaceCode" v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
filterable filterable
remote remote
clearable="true" :remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
reserve-keyword clearable>
placeholder="请选择所属货位"
:remote-method="getSpaceList"
size="mini"
:loading="corpLoading"
style="width: 90%"
>
<el-option <el-option
v-for="item in spaceList" v-for="item in options[item.clickFuc]"
:key="item.name" :key="item.code"
:label="item.name" :label="item.label"
:value="item.code" :value="item.code"
> />
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span> <span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-date-picker
<el-form-item label="过滤方式:"> :picker-options="pickerOptions"
<el-select v-model="actDateRange"
v-model="filterQuery.filterNoInv" type="daterange"
style="width: 90%" format="yyyy 年 MM 月 dd 日"
clearable> value-format="yyyy-MM-dd"
<el-option label="有库存" :value="1"></el-option> range-separator="至"
<el-option label="零库存" :value="2"></el-option> start-placeholder="开始日期"
<el-option label="负库存" :value="3"></el-option> end-placeholder="结束日期"
</el-select> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-date-picker
<el-form-item class="query-form-item" label="供应商名称:"> v-model="filterQuery[item.columnName]"
<el-select :style="`width:${item.width+'px'}`"
v-model="filterQuery.supId" value-format="yyyy-MM-dd"
filterable :disabled="executeEval(null,item.disabledFuc,false)"
remote type="date"
clearable="true" :placeholder="item.columnDesc"
reserve-keyword ></el-date-picker>
placeholder="请选择供应商名称"
:remote-method="findMethod"
size="mini"
:loading="corpLoading"
@change="corpChange"
style="width: 90%"
@clear="getcorp"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
@ -160,43 +229,130 @@
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row <el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
border> border>
<el-table-column label="序号" type="index"></el-table-column> <!-- <el-table-column label="序号" type="index"></el-table-column>-->
<el-table-column label="供应商" prop="supName" v-if="showSup" show-overflow-tooltip width="120"></el-table-column> <!-- <el-table-column label="供应商" prop="supName" v-if="showSup" show-overflow-tooltip width="120"></el-table-column>-->
<el-table-column label="货架" prop="spaceName" <!-- <el-table-column label="货架" prop="spaceName"-->
v-if="filterQuery.invSpaceCode!='' && filterQuery.invSpaceCode!=null" show-overflow-tooltip <!-- v-if="filterQuery.invSpaceCode!='' && filterQuery.invSpaceCode!=null" show-overflow-tooltip-->
width="120"></el-table-column> <!-- width="120"></el-table-column>-->
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column> <!-- <el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>-->
<el-table-column label="物资名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column> <!-- <el-table-column label="物资名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column>-->
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column> <!-- <el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column>-->
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column> <!-- <el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>-->
<el-table-column label="价格" prop="price" width="120"></el-table-column> <!-- <el-table-column label="价格" prop="price" width="120"></el-table-column>-->
<el-table-column label="入库数量" prop="inCount" width="120"></el-table-column> <!-- <el-table-column label="入库数量" prop="inCount" width="120"></el-table-column>-->
<el-table-column label="出库数量" prop="outCount" width="120"></el-table-column> <!-- <el-table-column label="出库数量" prop="outCount" width="120"></el-table-column>-->
<el-table-column label="结余数量" prop="reCount" width="120"> <!-- <el-table-column label="结余数量" prop="reCount" width="120">-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column label="部门" prop="deptName" v-if="showSup" <!-- <el-table-column label="部门" prop="deptName" v-if="showSup"-->
show-overflow-tooltip width="120"></el-table-column> <!-- show-overflow-tooltip width="120"></el-table-column>-->
<el-table-column label="仓库" prop="invName" v-if="showSup" <!-- <el-table-column label="仓库" prop="invName" v-if="showSup"-->
show-overflow-tooltip width="120"></el-table-column> <!-- show-overflow-tooltip width="120"></el-table-column>-->
<el-table-column label="计量单位" prop="measname" width="120"></el-table-column> <!-- <el-table-column label="计量单位" prop="measname" width="120"></el-table-column>-->
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column> <!-- <el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>-->
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column> <!-- <el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>-->
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip <!-- <el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip-->
width="120"></el-table-column> <!-- width="120"></el-table-column>-->
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column> <!-- <el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column>-->
<el-table-column label="操作" width="80" fixed="right"> <!-- <el-table-column label="操作" width="80" fixed="right">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
@click.native.stop="detailDialog(scope.row)" <!-- @click.native.stop="detailDialog(scope.row)"-->
>详情 <!-- >详情-->
</el-button <!-- </el-button-->
> <!-- >-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column
v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -225,13 +381,16 @@
</template> </template>
<script> <script>
import {findAllInvByUser} from "@/api/system/invWarehouse"; import {findAllInvByUserOptimize} from "@/api/system/invWarehouse";
import {getInvPreInProduct, deleteInvPreInProduct} from "@/api/inventory/invPreInSearch"; import {getInvPreInProduct, deleteInvPreInProduct} from "@/api/inventory/invPreInSearch";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintainsOptimize} from "@/api/basic/basicUnitMaintain";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import invPreProductsDetail from "@/views/inventory/InvPreInProductsDetail.vue"; import invPreProductsDetail from "@/views/inventory/InvPreInProductsDetail.vue";
import {getInvSpaceList} from "@/api/inventory/invSpace"; import {getInvSpaceListOptimize} from "@/api/inventory/invSpace";
import {selectUser} from "@/api/auth/authAdmin"; import {selectUser} from "@/api/auth/authAdmin";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default { export default {
name: "InvPreProducts", name: "InvPreProducts",
@ -250,11 +409,19 @@ export default {
invSpaceCode: null, invSpaceCode: null,
page: 1, page: 1,
limit: 10, limit: 10,
filterNoInv: 1, filterNoInv: "1",
}, },
invSpaceCode: null, invSpaceCode: null,
list: [], list: [],
total: 0, total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getInvList:[],
findMethod:[],
getSpaceList:[],
},
invList: [], invList: [],
spaceList: [], spaceList: [],
loading: false, loading: false,
@ -302,7 +469,7 @@ export default {
invCode: null, invCode: null,
}; };
this.getList(); this.getList();
this.findMethod(); this.findMethod(this);
}, },
onSubmit() { onSubmit() {
this.filterQuery.page = 1; this.filterQuery.page = 1;
@ -320,9 +487,9 @@ export default {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
}, },
keyup_submit(event) { keyup_submit(_this,event) {
this.filterQuery.page = 1; _this.filterQuery.page = 1;
this.getList(); _this.getList();
event.target.select(); event.target.select();
}, },
@ -346,51 +513,51 @@ export default {
this.total = 0; this.total = 0;
}) })
}, },
getInvList() { getInvList(_this) {
let query = { let query = {
advanceType: 2, advanceType: 2,
}; };
findAllInvByUser(query) findAllInvByUserOptimize(query)
.then((response) => { .then((response) => {
this.invList = response.data || []; _this.options.getInvList = response.data || [];
for (var i = 0; i < this.invList.length; i++) { for (var i = 0; i < _this.options.getInvList.length; i++) {
if (this.invList[i].advanceType == 2) { if (_this.options.getInvList[i].advanceType == 2) {
this.filterQuery.invCode = this.invList[i].code; _this.filterQuery.invCode = _this.options.getInvList[i].code;
} }
} }
this.getList(); _this.getList();
this.getSpaceList(); _this.getSpaceList(_this);
}) })
.catch(() => { .catch(() => {
}); });
}, },
findMethod(key) { findMethod(_this,key) {
this.corpLoading = true; _this.corpLoading = true;
this.fromOptions = []; _this.fromOptions = [];
let params = { let params = {
key: key, key: key,
corpType: 2, corpType: 2,
page: 1, page: 1,
limit: 20 limit: 20
}; };
getBasicUnitMaintains(params).then((res) => { getBasicUnitMaintainsOptimize(params).then((res) => {
this.corpLoading = false; _this.corpLoading = false;
this.fromOptions = res.data.list || []; _this.options.findMethod = res.data.list || [];
}).catch(() => { }).catch(() => {
this.corpLoading = false; _this.corpLoading = false;
}) });
}, },
corpChange(value) { corpChange(_this,value) {
if (!isBlank(value)) { if (!isBlank(value)) {
this.findMethod(value); _this.findMethod(_this,value);
} }
}, },
getcorp() { getcorp() {
this.findMethod(); this.findMethod(this);
}, },
detailDialog(row) { detailDialog(_this,row) {
this.detailDialogVisible = true; _this.detailDialogVisible = true;
this.inputQuery = { _this.inputQuery = {
relId: row.relIdFk, relId: row.relIdFk,
cpmctymc: row.cpmctymc, cpmctymc: row.cpmctymc,
nameCode: row.nameCode, nameCode: row.nameCode,
@ -401,7 +568,7 @@ export default {
supId: row.supId, supId: row.supId,
deptCode: row.deptCode, deptCode: row.deptCode,
invCode: row.invCode, invCode: row.invCode,
invSpaceCode: this.invSpaceCode, invSpaceCode: _this.invSpaceCode,
price: row.price price: row.price
} }
}, },
@ -431,17 +598,17 @@ export default {
this.$message.error(error.message); this.$message.error(error.message);
}); });
}, },
getSpaceList() { getSpaceList(_this) {
if (isBlank(this.filterQuery.invCode)) { if (isBlank(_this.filterQuery.invCode)) {
return; return;
} }
let params = { let params = {
invWarehouseCode: this.filterQuery.invCode, invWarehouseCode: _this.filterQuery.invCode,
status: 1 status: 1
}; };
getInvSpaceList(params).then((res) => { getInvSpaceListOptimize(params).then((res) => {
this.spaceList = res.data.list || []; _this.options.getSpaceList = res.data.list || [];
}) })
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
@ -456,9 +623,18 @@ export default {
} }
cb(results); cb(results);
}, },
invChange() { invChange(_this) {
this.getSpaceList(); _this.getSpaceList();
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
}, },
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
}
}, },
components: { components: {
invPreProductsDetail invPreProductsDetail
@ -478,8 +654,15 @@ export default {
}).catch(() => { }).catch(() => {
this.corpLoading = false; this.corpLoading = false;
}); });
this.findMethod(); this.findMethod(this);
this.getInvList(); this.getInvList(this);
getHead("InvSupPreInProducts","1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
});
// this.getList(); // this.getList();
}, },
}; };

@ -1,97 +1,192 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" size="mini" label-width="100px" v-show="showSearch"> <el-form v-if="queryList && queryList.length > 0" :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
<el-row> <!-- <el-row>
<el-col :span="6"> <el-col :span="18">
<el-form-item label="出入库单号:"> <el-form-item label="扫码查询:">
<el-input v-model="filterQuery.orderIdFk" placeholder="请输入出入库单号" style="width: 90%" <el-input v-model="filterQuery.udiCode"
clearable="true"></el-input> style="width: 97%"
</el-form-item> placeholder="请扫描或输入UDI码"
</el-col> clearable="true"
<el-col :span="6"> @keyup.enter.native="keyup_submit($event)"></el-input>
<el-form-item label="DI/物资编码:"> </el-form-item>
<el-input v-model="filterQuery.nameCode" placeholder="请输入DI/物资编码" style="width: 90%" </el-col>
clearable="true"></el-input> </el-row>
</el-form-item> <el-row>
</el-col> <el-col :span="6">
<el-col :span="6"> <el-form-item label="DI/物资编码:">
<el-form-item label="物资名称:"> <el-input v-model="filterQuery.nameCode" placeholder="请输入DI/物资编码"
<el-input v-model="filterQuery.coName" placeholder="请输入物资名称" style="width: 90%" style="width: 90%"
clearable="true"></el-input> clearable="true"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="规格型号:"> <el-form-item label="物资名称:">
<el-input v-model="filterQuery.spec" placeholder="请输入规格型号" style="width: 90%" <el-input v-model="filterQuery.cpmctymc" placeholder="请输入物资名称"
clearable="true"></el-input> style="width: 90%"
</el-form-item> clearable="true"></el-input>
</el-col> </el-form-item>
<el-col :span="6"> </el-col>
<el-form-item label="批次号:"> <el-col :span="6">
<el-input v-model="filterQuery.batchNo" placeholder="请输入批次号" style="width: 90%" <el-form-item label="规格型号:">
clearable="true"></el-input> <el-input v-model="filterQuery.ggxh" placeholder="请输入规格型号"
</el-form-item> style="width: 90%"
</el-col> clearable="true"></el-input>
<el-col :span="6"> </el-form-item>
<el-form-item label="注册/备案号:"> </el-col>
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="注册/备案号" <el-col :span="6">
style="width: 90%" <el-form-item label="批次号:">
clearable="true"></el-input> <el-input v-model="filterQuery.batchNo" placeholder="请输入批次号"
</el-form-item> style="width: 90%"
</el-col> clearable="true"></el-input>
<el-col :span="6"> </el-form-item>
<el-form-item label="生产企业:"> </el-col>
<el-input v-model="filterQuery.manufacturer" placeholder="生产企业" <el-col :span="6">
style="width: 90%" <el-form-item label="注册/备案号:">
clearable="true"></el-input> <el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="请输入注册/备案号"
</el-form-item> style="width: 90%"
</el-col> clearable="true"></el-input>
<el-col :span="6"> </el-form-item>
<el-form-item label="往来单位:"> </el-col>
<el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位" <el-col :span="6">
style="width: 90%" <el-form-item label="生产企业:">
clearable="true"></el-input> <el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="请输入生产企业"
style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="所属货位:">
<el-select
v-model="filterQuery.invSpaceCode"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择所属货位"
:remote-method="getSpaceList"
size="mini"
:loading="corpLoading"
style="width: 90%"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="过滤方式:">
<el-select
v-model="filterQuery.filterNoInv"
style="width: 90%"
clearable>
<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-col>
<el-col :span="6">
<el-form-item label="供应商名称:">
<el-select
v-model="filterQuery.supId"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请选择供应商名称"
:remote-method="findMethod"
size="mini"
:loading="corpLoading"
@change="corpChange"
style="width: 90%"
@clear="getcorp"
>
<el-option
v-for="item in fromOptions"
:key="item.name"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> -->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList" >
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`" :key="item.id">
<el-input
v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
:disabled="executeEval(null,item.disabledFuc,false)"
@keyup.enter.native="executeFuc($event,'5',item.clickFuc)"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6"> <el-select v-model="filterQuery[item.columnName]"
<el-form-item label="出入库类型:"> :placeholder="item.columnDesc"
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%"> :disabled="executeEval(null,item.disabledFuc,false)"
<el-option label="全部" value=""></el-option> clearable>
<el-option label="入库" value="WareHouseIn"></el-option> <el-option
<el-option label="出库" value="WareHouseOut"></el-option> v-for="dict in item.lableRuleObj"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
<span style="float: left">{{ item.name }}</span>
<span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6">
<el-form-item prop="action" label="单据类型:">
<el-select <el-select
v-model="filterQuery.action" v-model="filterQuery[item.columnName]"
placeholder="请选择单据类型" :placeholder="item.columnDesc"
style="width: 90%" :disabled="executeEval(null,item.disabledFuc,false)"
> filterable
remote
:remote-method="(query) => executeFuc(query,'5',item.clickFuc)"
clearable>
<el-option <el-option
v-for="item in busTypeOptions" v-for="item in options[item.clickFuc]"
:key="item.name" :key="item.code"
:label="item.name" :label="item.label"
:value="item.action" :value="item.code"
> />
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</span>
</el-option> <span v-if="item.isShowXx == '1'" style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> <el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-col :span="6">
<el-form-item label="打印状态:">
<el-select v-model="filterQuery.inoutPrintStatus" placeholder="请选择打印状态" style="width: 90%">
<el-option label="全部" value=""></el-option>
<el-option label="未打印" :value="0"></el-option>
<el-option label="已打印" :value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="出入库时间:">
<el-date-picker <el-date-picker
:picker-options="pickerOptions" :picker-options="pickerOptions"
v-model="actDateRange" v-model="actDateRange"
@ -101,57 +196,171 @@
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
style="width: 90%" ></el-date-picker>
> </el-form-item>
</el-date-picker> <el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" :label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
:style="`width:${item.width+'px'}`"
value-format="yyyy-MM-dd"
:disabled="executeEval(null,item.disabledFuc,false)"
type="date"
:placeholder="item.columnDesc"
></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </template>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group> <el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button> type="primary"
<el-button type="primary" icon="el-icon-document" @click="selectExport">Excel</el-button> icon="el-icon-refresh"
<el-button type="primary" icon="el-icon-document" @click="searchExport">Excel</el-button> @click="onReset"
<el-button type="primary" icon="el-icon-printer" @click="optinPrint"></el-button> >重置
<el-button type="primary" icon="el-icon-printer" @click="selectPrint"></el-button> </el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
>查询
</el-button
>
</el-button-group> </el-button-group>
</div> </div>
<el-divider style="margin: 15px"></el-divider> <el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row borderv <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row borderv
@selection-change="handleCheckedChange"> @selection-change="handleCheckedChange">
<!-- <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="供应商" prop="supName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="货架" prop="spaceName"
v-if="filterQuery.invSpaceCode!='' && filterQuery.invSpaceCode!=null" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="150"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="180"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column>
<el-table-column label="价格" prop="price" width="120"></el-table-column>
<el-table-column label="入库数量" prop="inCount" width="120"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="120">
</el-table-column>
<el-table-column label="结余数量" prop="reCount" width="120">
</el-table-column>
<el-table-column label="部门" prop="deptName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="仓库" prop="invName" v-if="showSup"
show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="计量单位" prop="measname" width="120"></el-table-column>
<el-table-column label="生产日期" prop="productionDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip
width="120"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="180" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="invRemindSet(scope.row)"
>添加预警设置
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="detailDialog(scope.row)"
>详情
</el-button
>
</template>
</el-table-column> -->
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
type="index" :label="item.columnDesc"></el-table-column>
<el-table-column
v-if="item.columnType == 'selection'"
type="selection"
:width="item.width"
:selectable="(row,number) => executeFuc(row,'3',item.clickFuc)"
></el-table-column>
<el-table-column type="selection" width="55"></el-table-column> <el-table-column
<el-table-column label="序号" type="index"></el-table-column> v-if="item.columnType == 'radio' && executeEval(row,item.expression,true)"
<el-table-column label="供应商" prop="fromCorpName" width="160" v-if="showSup"></el-table-column> :prop="item.columnName"
<el-table-column label="往来单位" prop="fromName" width="160"></el-table-column> :label="item.columnDesc"
<el-table-column label="出入库单号" prop="orderIdFk" width="160"></el-table-column> :sortable="item.sort"
<el-table-column label="DI/物资编码" prop="nameCode" width="160"></el-table-column> :width="item.width"
<el-table-column label="物资名称" prop="coName" width="160" show-overflow-tooltip></el-table-column> :show-overflow-tooltip="item.tooltip"
<el-table-column label="规格型号" prop="spec" width="180" show-overflow-tooltip></el-table-column> :key="item.columnName"
<el-table-column label="批次号" prop="batchNo" width="120"></el-table-column> >
<el-table-column label="入库数量" prop="inCount" width="100"></el-table-column> <template slot-scope="scope">
<el-table-column label="出库数量" prop="outCount" width="100" show-overflow-tooltip></el-table-column> <el-radio :label="scope.row.id" v-model="radioCheck"><span></span></el-radio>
<el-table-column label="计量单位" prop="measname" width="120"></el-table-column> </template>
<el-table-column label="单据类型" prop="billTypeName" width="120"></el-table-column> </el-table-column>
<el-table-column label="生产日期" prop="productDate" width="120" show-overflow-tooltip></el-table-column> <el-table-column
<el-table-column label="失效日期" prop="expireDate" width="120" show-overflow-tooltip></el-table-column> v-if="item.columnType == 'laber' && executeEval(row,item.expression,true)"
<el-table-column label="出入库时间" prop="auditTime" width="170" show-overflow-tooltip></el-table-column> :prop="item.columnName"
<el-table-column label="生产企业" prop="manufacturer" width="160" show-overflow-tooltip></el-table-column> :label="item.columnDesc"
<el-table-column label="注册/备案号" prop="certCode" width="160" show-overflow-tooltip></el-table-column> :sortable="item.sort"
<el-table-column label="打印状态" width="100" prop="inoutPrintStatus"> :width="item.width"
<template slot-scope="scope"> :show-overflow-tooltip="item.tooltip"
<el-tag :type="statusFilterType(scope.row.inoutPrintStatus)">{{ :key="item.columnName"
printMap[scope.row.inoutPrintStatus] >
}} <template slot-scope="scope">
</el-tag> <span :style="{color: executeFuc(scope.row,'4',item.lableRuleObj[scope.row[item.columnName]])}">{{ item.lableRuleObj[scope.row[item.columnName]] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
v-if="item.columnType == 'eltag' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<el-tag :type="executeFuc(scope.row,'4',item,item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName])">
<span>{{ item.lableRuleObj?item.lableRuleObj[scope.row[item.columnName]]:scope.row[item.columnName] }}</span>
</el-tag>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'button' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:width="item.width"
:key="item.columnName"
fixed="right"
>
<template slot-scope="scope">
<el-button v-for="(buttonItem, buttonIndex) in item.buttonRulObj"
:type="buttonItem.type"
:size="buttonItem.size"
:style="buttonItem.style"
:key="buttonItem"
v-if="executeEval(scope.row,buttonItem.hasPermi,true)"
:disabled="executeEval(scope.row,buttonItem.disabledFuc,false)"
@click.native.stop="executeFuc(scope.row,'1',buttonItem.clickFuc)"
>{{ buttonItem.name }}
</el-button>
</template>
</el-table-column>
<el-table-column
v-if="item.columnType == 'text' && executeEval(row,item.expression,true)"
:prop="item.columnName"
:label="item.columnDesc"
:sortable="item.sort"
:width="item.width"
:show-overflow-tooltip="item.tooltip"
:key="item.columnName"
>
<template slot-scope="scope">
<span :style="{color: executeFuc(scope.row,'4',item,scope.row[item.columnName])}">{{ scope.row[item.columnName] }}</span>
</template>
</el-table-column>
</template>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -160,6 +369,36 @@
@pagination="getList" @pagination="getList"
></pagination> ></pagination>
</el-card> </el-card>
<el-dialog
title="库存详情"
:visible.sync="detailDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="detailDialogVisible"
>
<invProductsDetail
:inputQuery="inputQuery"
v-on:closeDetailDialog="closeDetailDialog"
></invProductsDetail>
</el-dialog>
<el-dialog
title="添加库存预警设置"
:visible.sync="addInvRemindSetDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="60%"
v-if="addInvRemindSetDialogVisible"
>
<addInvRemindSetDialog
:invId="invId"
:closeDialog="closeRemindSetDialog"
></addInvRemindSetDialog>
</el-dialog>
</div> </div>
</template> </template>
@ -171,16 +410,19 @@ import {
printOrder, printOrder,
excelInoutImport, postExcelInoutImport excelInoutImport, postExcelInoutImport
} from '@/api/inout/orderDetailResult' } from '@/api/inout/orderDetailResult'
import {findByInvUser, getLocalJoinByUser, getOrderDetailBus} from "@/api/basic/busType"; import {findByInvUser, getLocalJoinByUser, getOrderDetailBus, getOrderDetailBusOptimize} from "@/api/basic/busType";
import {getCorrespondence} from "@/api/basic/basicUnitMaintain"; import {getCorrespondence} from "@/api/basic/basicUnitMaintain";
import {excelImport} from "@/api/inout/statData"; import {excelImport} from "@/api/inout/statData";
import {
getHead,executeFuc
} from "@/utils/customConfig";
export default { export default {
name: "supInoutSearchOrder", name: "supInoutSearchOrder",
data() { data() {
return { return {
showSearch: true, showSearch: true,
list: {}, list: [],
busTypeOptions: [], busTypeOptions: [],
filterQuery: { filterQuery: {
id: "", id: "",
@ -209,6 +451,12 @@ export default {
fromOptions: [], fromOptions: [],
loading: false, loading: false,
total: 0, total: 0,
tableHeader:[],
queryList:[],
fromList:[],
options: {
getBusTypeByInv:[],
},
orderSelection: [], orderSelection: [],
showSup: false, showSup: false,
customerId: this.$store.getters.customerId, customerId: this.$store.getters.customerId,
@ -249,7 +497,6 @@ export default {
}, },
}; };
}, },
components: {},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
@ -303,15 +550,15 @@ export default {
}, },
//, //,
getBusTypeByInv() { getBusTypeByInv(_this) {
let query = { let query = {
code: this.$store.getters.locInvCode, code: _this.$store.getters.locInvCode,
enabled: true, enabled: true,
detailType: this.actionType detailType: _this.actionType
}; };
getOrderDetailBus(query) getOrderDetailBusOptimize(query)
.then((response) => { .then((response) => {
this.busTypeOptions = response.data.list || []; _this.options.getBusTypeByInv = response.data.list || [];
}) })
.catch(() => { .catch(() => {
}); });
@ -531,6 +778,15 @@ export default {
}) })
}); });
},
executeFuc(row,type,clickFuc,value){
return executeFuc(this,row,type,clickFuc,value);
},
executeEval(row,expression,defaultRet){
if(expression){
return eval(expression);
}
return defaultRet;
} }
}, },
mounted() { mounted() {
@ -546,8 +802,15 @@ export default {
this.showSup = true; this.showSup = true;
} }
this.actionType = this.$route.query.name; this.actionType = this.$route.query.name;
this.getList(); getHead("supInoutSearchOrder","1").then((re) => {
this.getBusTypeByInv(); //
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
this.queryList = re.data.queryList;
this.fromList = re.data.fromList;
this.getList();
});
this.getBusTypeByInv(this);
} }
, ,
} }

Loading…
Cancel
Save