Merge remote-tracking branch 'origin/master'
# Conflicts: # src/views/basic/corpMaintain/corpMaintain.vueprod
commit
06edd4faf0
@ -0,0 +1,20 @@
|
|||||||
|
import axios from '@/utils/request'
|
||||||
|
|
||||||
|
export function saveCode(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/warehouse/inout/saveTempCode",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export function findByCode(query) {
|
||||||
|
return axios(
|
||||||
|
{
|
||||||
|
url: "/udiwms/basic/findByCode",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
import axios from "../../utils/request";
|
||||||
|
|
||||||
|
export function getPlaceDetailList(params) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/inv/product/getPlaceDetailList",
|
||||||
|
method: "get",
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function bindInvSpace(data) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/inv/product/bindInvSpace",
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function checkCodeSpace(data) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/inv/product/checkCodeSpace",
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
import axios from "../../utils/request";
|
||||||
|
|
||||||
|
export function getInvPreProduct(params) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/inv/pre/product/filter",
|
||||||
|
method: "get",
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getInvPreProductDetail(params) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/inv/pre/product/filterDetail",
|
||||||
|
method: "get",
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteInvPreProduct(data) {
|
||||||
|
return axios({
|
||||||
|
url: "/spms/inv/pre/product/delete",
|
||||||
|
method: "post",
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form :model="editData" :rules="formRules" ref="dataForm" label-width="100px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="20">
|
||||||
|
<el-form-item label="UDI码:" prop="code">
|
||||||
|
<el-input
|
||||||
|
v-model="editData.code"
|
||||||
|
clearable
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item prop="productDate" label="生产日期">
|
||||||
|
<el-input v-model="editData.produceDate" auto-complete="off"
|
||||||
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
||||||
|
type="number"
|
||||||
|
:disabled="false"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item prop="expireDate" label="失效日期">
|
||||||
|
<el-input v-model="editData.expireDate" auto-complete="off"
|
||||||
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
||||||
|
type="number"
|
||||||
|
:disabled="false"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item prop="batchNo" label="批次号">
|
||||||
|
<el-input v-model="editData.batchNo" auto-complete="off" :disabled="false"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item prop="serialNo" label="序列号">
|
||||||
|
<el-input v-model="editData.serialNo" auto-complete="off"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item prop="count" label="扫码数量">
|
||||||
|
<el-input v-model="editData.count" auto-complete="off"
|
||||||
|
type="number"
|
||||||
|
min="1"
|
||||||
|
:disabled="editData.serialNo!=null && editData.serialNo!='' "></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-form-item>
|
||||||
|
<el-checkbox v-model="isUseDyCheck" disabled>是否以使用单元数量出入库</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div style="text-align: right;margin-top: 20px">
|
||||||
|
<el-button @click="cancelDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="saveCode()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {
|
||||||
|
findByCode,
|
||||||
|
saveCode
|
||||||
|
} from "@/api/inout/code";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "editCode",
|
||||||
|
props: {
|
||||||
|
editTye: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
closeCodeDialog: {
|
||||||
|
type: Function,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
repeatAddCode: {
|
||||||
|
type: Function,
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
|
codeDetail: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
editData: null
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
xlhEnable: false,
|
||||||
|
isUseDyCheck: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
saveCode() {
|
||||||
|
if (this.editTye == 1) {
|
||||||
|
this.repeatAddCode(this.editData);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
saveCode(this.editData)
|
||||||
|
.then((response) => {
|
||||||
|
console.log(response)
|
||||||
|
if (response.code === 20000) {
|
||||||
|
this.$message.success("提交成功");
|
||||||
|
this.codeDetail = this.editData;
|
||||||
|
this.closeCodeDialog();
|
||||||
|
} else {
|
||||||
|
this.$message.error(response.message);
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,
|
||||||
|
cancelDialog() {
|
||||||
|
this.closeCodeDialog();
|
||||||
|
}
|
||||||
|
,
|
||||||
|
findByCode() {
|
||||||
|
let query = {udiCode: this.editData.code};
|
||||||
|
findByCode(query)
|
||||||
|
.then((response) => {
|
||||||
|
if (response.code === 20000) {
|
||||||
|
if (response.data.scbssfbhxlh == "否") {
|
||||||
|
this.xlhEnable = true;
|
||||||
|
}
|
||||||
|
if (response.data.zxxsbzbhsydysl > 1) {
|
||||||
|
this.isUseDyCheck = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,
|
||||||
|
created() {
|
||||||
|
|
||||||
|
this.editData = JSON.parse(JSON.stringify(this.codeDetail));
|
||||||
|
this.findByCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,146 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<!-- <el-form :inline="true" :model="unitquery" class="query-form" size="mini">-->
|
||||||
|
<!-- <el-form-item class="query-form-item" label="关键字搜索:">-->
|
||||||
|
<!-- <el-input v-model="unitquery.key" placeholder="搜索"></el-input>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item>-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- icon="el-icon-search"-->
|
||||||
|
<!-- @click.native.stop="getUnitList()"-->
|
||||||
|
<!-- >查询-->
|
||||||
|
<!-- </el-button-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-form>-->
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="unitlist"
|
||||||
|
style="width: 100%"
|
||||||
|
highlight-current-row
|
||||||
|
height="500"
|
||||||
|
border
|
||||||
|
@current-change="handleDetail"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="往来单位ID"
|
||||||
|
prop="erpId"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="往来单位名称"
|
||||||
|
prop="name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="往来单位简写"
|
||||||
|
prop="spell"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="地址"
|
||||||
|
prop="addr"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column width="200" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click.native.stop="selectUnit(scope.row)"
|
||||||
|
>选入绑定
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getBasicUnitMaintains, getCorpFilter} from "@/api/basic/basicUnitMaintain";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "DialogSelectUnit",
|
||||||
|
props: {
|
||||||
|
codeId: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
fromCorp: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
unitquery: {key: "", page: 1, limit: 20},
|
||||||
|
unitlist: [],
|
||||||
|
unitUpdateQuery: {
|
||||||
|
id: "",
|
||||||
|
fromCorpId: "",
|
||||||
|
fromCorp: "",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getUnitList() {
|
||||||
|
this.loading = true;
|
||||||
|
getBasicUnitMaintains(this.unitquery)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.unitlist = response.data.page.list || [];
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getUnitListByCode(row) {
|
||||||
|
let query = {
|
||||||
|
udiRlIdFk: row.relId,
|
||||||
|
unitFk: this.fromCorp,
|
||||||
|
}
|
||||||
|
getCorpFilter(query)
|
||||||
|
.then((response) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (response.code == 20000) {
|
||||||
|
this.unitlist = response.data || [];
|
||||||
|
} else {
|
||||||
|
this.$message.warning(response.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDetail(row) {
|
||||||
|
this.curUnitRow = row;
|
||||||
|
},
|
||||||
|
selectUnit(row) {
|
||||||
|
this.$emit("selectSupUnit", row);
|
||||||
|
this.$emit("closeBindDialog", true);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
console.log("this.codeId = " + this.codeId)
|
||||||
|
if (this.codeId != null) {
|
||||||
|
this.getUnitListByCode(this.codeId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -0,0 +1,369 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="产品标识DI:">
|
||||||
|
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="产品名称:">
|
||||||
|
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="批次号:">
|
||||||
|
<el-input v-model="filterQuery.batchNo" placeholder="批次号"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<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%"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="规格型号:">
|
||||||
|
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="批准文号:">
|
||||||
|
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="生产厂家:">
|
||||||
|
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="所属仓库:">
|
||||||
|
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
|
||||||
|
style="width: 90%"
|
||||||
|
>
|
||||||
|
<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-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="top-right-btn">
|
||||||
|
<el-button-group>
|
||||||
|
<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 type="primary" icon="el-icon-search" @click="onSubmit"
|
||||||
|
>查询
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
|
||||||
|
border>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="cpmctymc"></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batchNo" 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="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="ylqxzcrbarmc" 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="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="操作" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click.native.stop="detailDialog(scope.row)"
|
||||||
|
>详情
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click.native.stop="deleteDialog(scope.row.id)"
|
||||||
|
>删除
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="库存详情"
|
||||||
|
:visible.sync="detailDialogVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="85%"
|
||||||
|
v-if="detailDialogVisible"
|
||||||
|
>
|
||||||
|
<invPreProductsDetail
|
||||||
|
:inputQuery="inputQuery"
|
||||||
|
v-on:closeDetailDialog="closeDetailDialog"
|
||||||
|
></invPreProductsDetail>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||||
|
import {getInvPreProduct, deleteInvPreProduct} from "@/api/inventory/invPreProduct";
|
||||||
|
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
import invPreProductsDetail from "@/views/inventory/InvPreProductsDetail.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InvPreProducts",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
filterQuery: {
|
||||||
|
nameCode: null,
|
||||||
|
cpmctymc: null,
|
||||||
|
ggxh: null,
|
||||||
|
batchNo: null,
|
||||||
|
supId: null,
|
||||||
|
zczbhhzbapzbh: null,
|
||||||
|
ylqxzcrbarmc: null,
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
invList: [],
|
||||||
|
loading: false,
|
||||||
|
deleteData: {
|
||||||
|
id: "",
|
||||||
|
status: 10,
|
||||||
|
},
|
||||||
|
corpLoading: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
fromOptions: [],
|
||||||
|
showSup: false,
|
||||||
|
detailDialogVisible: false,
|
||||||
|
inputQuery: {
|
||||||
|
cpmctymc: null,
|
||||||
|
nameCode: null,
|
||||||
|
batchNo: null,
|
||||||
|
ggxh: null,
|
||||||
|
productionDate: null,
|
||||||
|
expireDate: null,
|
||||||
|
supId: null,
|
||||||
|
deptCode: null,
|
||||||
|
invCode: null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
nameCode: null,
|
||||||
|
cpmctymc: null,
|
||||||
|
ggxh: null,
|
||||||
|
batchNo: null,
|
||||||
|
supId: null,
|
||||||
|
zczbhhzbapzbh: null,
|
||||||
|
ylqxzcrbarmc: null,
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.filterQuery.limit = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
getInvPreProduct(this.filterQuery).then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.list = res.data.list || [];
|
||||||
|
this.total = res.data.total || 0;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$message.error(error.message);
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getInvList() {
|
||||||
|
getInvListByUser()
|
||||||
|
.then((response) => {
|
||||||
|
this.invList = response.data || [];
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
findMethod(key) {
|
||||||
|
this.corpLoading = true;
|
||||||
|
this.fromOptions = [];
|
||||||
|
let params = {
|
||||||
|
key: key,
|
||||||
|
corpType: 2,
|
||||||
|
page: 1,
|
||||||
|
limit: 20
|
||||||
|
};
|
||||||
|
getBasicUnitMaintains(params).then((res) => {
|
||||||
|
this.corpLoading = false;
|
||||||
|
this.fromOptions = res.data.list || [];
|
||||||
|
}).catch(() => {
|
||||||
|
this.corpLoading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
corpChange(value) {
|
||||||
|
if (!isBlank(value)) {
|
||||||
|
this.findMethod(value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
detailDialog(row) {
|
||||||
|
this.detailDialogVisible = true;
|
||||||
|
this.inputQuery = {
|
||||||
|
relId: row.relId,
|
||||||
|
cpmctymc: row.cpmctymc,
|
||||||
|
nameCode: row.nameCode,
|
||||||
|
batchNo: row.batchNo,
|
||||||
|
ggxh: row.ggxh,
|
||||||
|
productionDate: row.productionDate,
|
||||||
|
expireDate: row.expireDate,
|
||||||
|
supId: row.supId,
|
||||||
|
deptCode: row.deptCode,
|
||||||
|
invCode: row.invCode
|
||||||
|
}
|
||||||
|
},
|
||||||
|
closeDetailDialog() {
|
||||||
|
this.detailDialogVisible = false;
|
||||||
|
},
|
||||||
|
deleteDialog(id) {
|
||||||
|
this.$confirm("此操作将永久删除此库存信息,是否继续?", "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.deleteInvPreProduct(id);
|
||||||
|
}).catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deleteInvPreProduct(id) {
|
||||||
|
let params = {id: id};
|
||||||
|
deleteInvPreProduct(params).then((res) => {
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.$message.success("删除成功!");
|
||||||
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.$message.error(error.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
invPreProductsDetail
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findMethod();
|
||||||
|
this.getInvList();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,211 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-descriptions class="margin-top" title="产品信息" :column="3" :size="size" border>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
产品名称
|
||||||
|
</template>
|
||||||
|
{{ inputQuery.cpmctymc }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
产品标识
|
||||||
|
</template>
|
||||||
|
{{ inputQuery.nameCode }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
批次号
|
||||||
|
</template>
|
||||||
|
{{ inputQuery.batchNo }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
规格型号
|
||||||
|
</template>
|
||||||
|
{{ inputQuery.ggxh }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
生产日期
|
||||||
|
</template>
|
||||||
|
{{ inputQuery.productionDate }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
失效日期
|
||||||
|
</template>
|
||||||
|
{{ inputQuery.expireDate }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<el-form :inline="true" :model="invPreProductDetailQuery" style="margin-top: 10px;" size="mini">
|
||||||
|
<el-form-item class="query-form-item" label="条码:">
|
||||||
|
<el-input v-model="invPreProductDetailQuery.code"
|
||||||
|
placeholder="条码查询"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button-group>
|
||||||
|
<el-button type="primary" icon="search" @click="onSubmit"
|
||||||
|
>查询
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-button-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="条码"
|
||||||
|
prop="code"
|
||||||
|
width="500"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="单据类型"
|
||||||
|
prop="actionName"
|
||||||
|
width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="出入库类型"
|
||||||
|
prop="mainActionStr"
|
||||||
|
width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="入库数量"
|
||||||
|
prop="inCount"
|
||||||
|
width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="出库数量"
|
||||||
|
prop="outCount"
|
||||||
|
width="120"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="订单日期"
|
||||||
|
prop="orderTime"
|
||||||
|
width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="所属单据"
|
||||||
|
prop="orderId"
|
||||||
|
show-overflow-tooltip
|
||||||
|
></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="invPreProductDetailQuery.limit"
|
||||||
|
:page.sync="invPreProductDetailQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
></pagination>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvPreProductDetail} from "@/api/inventory/invPreProduct";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InvPreProductsDetail",
|
||||||
|
props: {
|
||||||
|
inputQuery: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
invPreProductDetailQuery: {
|
||||||
|
code: null,
|
||||||
|
relId: null,
|
||||||
|
supId: null,
|
||||||
|
batchNo: null,
|
||||||
|
deptCode: null,
|
||||||
|
invCode: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.invPreProductDetailQuery = {
|
||||||
|
code: null,
|
||||||
|
page: 1,
|
||||||
|
limit: 10
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
this.invPreProductDetailQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.invPreProductDetailQuery.limit = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.invPreProductDetailQuery.page = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.invPreProductDetailQuery.relId = this.inputQuery.relId;
|
||||||
|
this.invPreProductDetailQuery.supId = this.inputQuery.supId;
|
||||||
|
this.invPreProductDetailQuery.batchNo = this.inputQuery.batchNo;
|
||||||
|
this.invPreProductDetailQuery.deptCode = this.inputQuery.deptCode;
|
||||||
|
this.invPreProductDetailQuery.invCode = this.inputQuery.invCode;
|
||||||
|
getInvPreProductDetail(this.invPreProductDetailQuery).then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.list = res.data.list || [];
|
||||||
|
this.total = res.data.total || 0;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$message.error(error.message);
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,287 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="el-card">
|
||||||
|
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="产品标识DI:">
|
||||||
|
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="产品名称:">
|
||||||
|
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="批次号:">
|
||||||
|
<el-input v-model="filterQuery.batchNo" placeholder="批次号"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<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%"
|
||||||
|
>
|
||||||
|
<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>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="规格型号:">
|
||||||
|
<el-input v-model="filterQuery.ggxh" placeholder="规格型号"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="批准文号:">
|
||||||
|
<el-input v-model="filterQuery.zczbhhzbapzbh" placeholder="批准文号"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="生产厂家:">
|
||||||
|
<el-input v-model="filterQuery.ylqxzcrbarmc" placeholder="生产厂家"
|
||||||
|
style="width: 90%"
|
||||||
|
clearable="true"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item class="query-form-item" label="所属仓库:">
|
||||||
|
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
|
||||||
|
style="width: 90%"
|
||||||
|
>
|
||||||
|
<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-row>
|
||||||
|
</el-form>
|
||||||
|
<div class="top-right-btn">
|
||||||
|
<el-button-group>
|
||||||
|
<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 type="primary" icon="el-icon-search" @click="onSubmit"
|
||||||
|
>统计
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</el-button-group>
|
||||||
|
</div>
|
||||||
|
<el-divider style="margin: 15px"></el-divider>
|
||||||
|
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
|
||||||
|
border>
|
||||||
|
<el-table-column label="序号" type="index"></el-table-column>
|
||||||
|
<el-table-column label="产品标识" prop="nameCode"></el-table-column>
|
||||||
|
<el-table-column label="产品名称" prop="cpmctymc"></el-table-column>
|
||||||
|
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
|
||||||
|
<el-table-column label="批次号" prop="batchNo" 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="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="ylqxzcrbarmc" 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="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>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:limit.sync="filterQuery.limit"
|
||||||
|
:page.sync="filterQuery.page"
|
||||||
|
@pagination="getList"
|
||||||
|
></pagination>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||||
|
import {stockStatistics} from "@/api/inventory/invPorduct";
|
||||||
|
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
||||||
|
import {isBlank} from "@/utils/strUtil";
|
||||||
|
import invProductsDetail from "@/views/inventory/InvProductsDetail.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "InvStatistics",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showSearch: true,
|
||||||
|
filterQuery: {
|
||||||
|
nameCode: null,
|
||||||
|
cpmctymc: null,
|
||||||
|
ggxh: null,
|
||||||
|
batchNo: null,
|
||||||
|
supId: null,
|
||||||
|
zczbhhzbapzbh: null,
|
||||||
|
ylqxzcrbarmc: null,
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
},
|
||||||
|
list: [],
|
||||||
|
total: 0,
|
||||||
|
invList: [],
|
||||||
|
loading: false,
|
||||||
|
corpLoading: false,
|
||||||
|
fromOptions: [],
|
||||||
|
showSup: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onReset() {
|
||||||
|
this.$router.push({
|
||||||
|
path: "",
|
||||||
|
});
|
||||||
|
this.filterQuery = {
|
||||||
|
nameCode: null,
|
||||||
|
cpmctymc: null,
|
||||||
|
ggxh: null,
|
||||||
|
batchNo: null,
|
||||||
|
supId: null,
|
||||||
|
zczbhhzbapzbh: null,
|
||||||
|
ylqxzcrbarmc: null,
|
||||||
|
invCode: this.$store.getters.locInvCode,
|
||||||
|
page: 1,
|
||||||
|
limit: 10,
|
||||||
|
};
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onSubmit() {
|
||||||
|
if (isBlank(this.filterQuery.invCode)) {
|
||||||
|
this.$message.warning("请先选择当前仓库!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//判断统计条件是否全部为空
|
||||||
|
if (isBlank(this.filterQuery.cpmctymc) && isBlank(this.filterQuery.ggxh) && isBlank(this.filterQuery.zczbhhzbapzbh) && isBlank(this.filterQuery.ylqxzcrbarmc)
|
||||||
|
&& isBlank(this.filterQuery.invCode) && isBlank(this.filterQuery.nameCode) && isBlank(this.filterQuery.batchNo) && isBlank(this.filterQuery.supId)) {
|
||||||
|
this.$message.warning("统计条件不能为空!");
|
||||||
|
} else {
|
||||||
|
this.filterQuery.page = 1;
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hideSearch() {
|
||||||
|
this.showSearch = !this.showSearch;
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.filterQuery.limit = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.filterQuery.page = val;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
stockStatistics(this.filterQuery).then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (res.code === 20000) {
|
||||||
|
this.list = res.data.list || [];
|
||||||
|
this.total = res.data.total || 0;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$message.error(error.message);
|
||||||
|
this.list = [];
|
||||||
|
this.total = 0;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getInvList() {
|
||||||
|
getInvListByUser()
|
||||||
|
.then((response) => {
|
||||||
|
this.invList = response.data || [];
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
findMethod(key) {
|
||||||
|
this.corpLoading = true;
|
||||||
|
this.fromOptions = [];
|
||||||
|
let params = {
|
||||||
|
key: key,
|
||||||
|
corpType: 2,
|
||||||
|
page: 1,
|
||||||
|
limit: 20
|
||||||
|
};
|
||||||
|
getBasicUnitMaintains(params).then((res) => {
|
||||||
|
this.corpLoading = false;
|
||||||
|
this.fromOptions = res.data.list || [];
|
||||||
|
}).catch(() => {
|
||||||
|
this.corpLoading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
corpChange(value) {
|
||||||
|
if (!isBlank(value)) {
|
||||||
|
this.findMethod(value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
document.body.ondrop = function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.findMethod();
|
||||||
|
this.getInvList();
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style type="text/scss" lang="scss">
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue