盘点相关功能--盘点方式,部分盘点修改

20231126-yw
anthonywj 1 year ago
parent 69e9fb5e3b
commit 0759271628

@ -9,7 +9,7 @@ ENV = 'production'
#林纪裕cd
# VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://www.linjiyu.lol:83/UDI_WMS_MC/'
VUE_APP_BASE_API = 'http://www.linjiyu.lol:83/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/'
@ -30,7 +30,7 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://192.168.0.242:9150/UDI_WMS_MC/'
# 平潭正式
VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# 吴总测试服务器.

@ -1,33 +1,33 @@
import axios from '@/utils/request'
export function getCountCodesList(params) {
return axios({
url: "/invCount/codes/filter",
method: "get",
params: params
});
return axios({
url: "/invCount/codes/filter",
method: "get",
params: params
});
}
export function deleteCode(data) {
return axios({
url: "/invCount/codes/deleteCode",
method: "post",
data: data
});
return axios({
url: "/invCount/codes/deleteCode",
method: "post",
data: data
});
}
export function addCode(data) {
return axios({
url: "/invCount/codes/addCode",
method: "post",
data: data
});
return axios({
url: "/invCount/codes/addCode",
method: "post",
data: data
});
}
export function getCodesNum(params) {
return axios({
url: "/invCount/codes/getCountOrderCodesNum",
method: "get",
params: params
});
return axios({
url: "/invCount/codes/getCountOrderCodesNum",
method: "get",
params: params
});
}

@ -1,83 +1,103 @@
import axios from '@/utils/request'
export function getCountOrderList(params) {
return axios({
url: "/invCount/order/filter",
method: "get",
params: params
});
return axios({
url: "/invCount/order/filter",
method: "get",
params: params
});
}
export function deleteCountOrder(data) {
return axios({
url: "/invCount/order/delete",
method: "post",
data: data
});
return axios({
url: "/invCount/order/delete",
method: "post",
data: data
});
}
export function getCountOrderDetailList(params) {
return axios({
url: "/invCount/order/detail/filter",
method: "get",
params: params
});
return axios({
url: "/invCount/order/detail/filter",
method: "get",
params: params
});
}
export function saveCountOrder(data) {
return axios({
url: "/invCount/order/saveCountOrder",
method: "post",
data: data
});
return axios({
url: "/invCount/order/saveCountOrder",
method: "post",
data: data
});
}
export function submitAudit(params) {
return axios({
url: "/invCount/order/submitAudit",
method: "get",
params: params
});
return axios({
url: "/invCount/order/submitAudit",
method: "post",
data: params
});
}
export function deleteCountOrderDetail(data) {
return axios({
url: "/invCount/order/detail/deleteOrderDetail",
method: "post",
data: data
});
return axios({
url: "/invCount/order/detail/deleteOrderDetail",
method: "post",
data: data
});
}
export function addCountOrderDetail(data) {
return axios({
url: "/invCount/order/detail/addCountOrderDetail",
method: "post",
data: data
});
return axios({
url: "/invCount/order/detail/addCountOrderDetail",
method: "post",
data: data
});
}
export function updateCountOrderStatus(data) {
return axios({
url: "/invCount/order/updateCountOrderStatus",
method: "post",
data: data
});
return axios({
url: "/invCount/order/updateCountOrderStatus",
method: "post",
data: data
});
}
export function updateCountOrderDetail(data) {
return axios({
url: "/invCount/order/detail/updateCountOrderDetail",
method: "post",
data: data
});
}
export function verifyTemplateFile(data) {
return axios({
url: "/invCount/order/verifyTemplateFile",
method: "post",
data: data
});
return axios({
url: "/invCount/order/verifyTemplateFile",
method: "post",
data: data
});
}
export function printOrder(data) {
return axios({
url: "/invCount/order/printOrder",
method: "post",
data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
return axios({
url: "/invCount/order/printOrder",
method: "post",
data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}
export function batchAddDetail(data) {
return axios({
url: "/inv/count/order/detail/batchAddDetail",
method: "post",
data: data
});
}

@ -41,9 +41,8 @@
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="false" border ref="multipleTable">
<el-table-column type="selection" width="55"></el-table-column>
<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="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc"></el-table-column>
<el-table-column label="规格型号" prop="ggxh"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></el-table-column>
@ -51,6 +50,9 @@
<el-table-column label="入库数量" prop="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></el-table-column>
<el-table-column label="结余数量" prop="reCount"></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="200"></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="200"></el-table-column>
<el-table-column label="供应商" prop="supName" width="260"></el-table-column>
</el-table>
</el-card>

@ -1,43 +1,51 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="query" class="query-form" size="mini" :inline="true">
<el-form-item class="query-form-item" label="条码:">
<el-input v-model="query.code" placeholder="请扫描或输入条码" clearable="true"></el-input>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<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>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="codeArray" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="条码" prop="code" show-overflow-tooltip></el-table-column>
<el-table-column label="扫码数量" prop="count"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="deleteCountCode(scope.row)"
>减一
</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="query.limit"
:page.sync="query.page"
@pagination="getCodeList"
></pagination>
<el-form :model="query" class="query-form" size="mini">
<el-row>
<el-col span="14">
<el-form-item class="query-form-item" label="UDI码:" label-width="80px">
<el-input v-model="query.code" placeholder="请扫描或输入UDI码" clearable="true" style="width: 100%"></el-input>
</el-form-item>
</el-col>
<el-col span="6">
<el-form-item>
<el-button-group style="margin-left: 15px">
<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>
</el-form-item>
</el-col>
</el-row>
</el-card>
</el-form>
<el-table v-loading="loading" :data="codeArray" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="UDI码" prop="code" show-overflow-tooltip width="300"></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="扫码数量" prop="count" width="90"></el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="deleteCountCode(scope.row)"
>减一
</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="query.limit"
:page.sync="query.page"
@pagination="getCodeList"
></pagination>
</div>
</template>
@ -51,6 +59,10 @@ export default {
type: Object,
required: true,
},
orderIdFk: {
type: Object,
required: true,
},
getCountOrderDetail: {
type: Function,
required: true
@ -77,7 +89,6 @@ export default {
this.query = {
code: null,
productId: null,
orderIdFk: null,
batchNo: null,
page: 1,
limit: 20
@ -89,9 +100,9 @@ export default {
this.getCodeList();
},
getCodeList() {
this.loading = true;
this.loading = true;
this.query.relId = this.codeQuery.relId;
this.query.orderIdFk = this.codeQuery.orderIdFk;
this.query.orderIdFk = this.orderIdFk;
this.query.batchNo = this.codeQuery.batchNo;
getCountCodesList(this.query).then((res) => {
this.loading = false;
@ -116,7 +127,7 @@ export default {
}).then(() => {
let params = {
orderIdFk: row.orderIdFk,
relId: row.relId,
productId: row.productId,
code: row.code
};
deleteCode(params).then((res) => {

@ -1,64 +1,79 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
@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-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<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>
</el-form-item>
<el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点仓库:">
<el-select v-model="filterQuery.invStorageCode" 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="8">
<el-form-item class="query-form-item" label="盘点货位:">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择盘点货位" clearable="true"
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>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="margin-left: 10px;display:flex;">
<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-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="300"></el-table-column>
<el-table-column label="仓库" prop="invName" width="300"></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="300"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="150">
<el-table-column label="盘点单号" prop="orderId" width="160"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="120"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="200"></el-table-column>
<el-table-column label="盘点时间" prop="createTime"></el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="180"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button
type="text"
@ -90,15 +105,15 @@
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品名称" prop="productName" width="220"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="180"
show-overflow-tooltip></el-table-column>
<el-table-column label="生产日期" prop="produceDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="盘点数量" prop="countNum" width="150"></el-table-column>
<el-table-column label="账面数量" prop="invNum" width="150"></el-table-column>
<el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column>
<el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="盘盈数量" prop="profitNum" width="100"></el-table-column>
<el-table-column label="盘亏数量" prop="lossNum" width="100"></el-table-column>
<el-table-column label="盈亏状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag>
@ -106,17 +121,22 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="showCode(scope.row)"
>详情
</el-button
>
</template>
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="操作" fixed="right" width="120">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="showCode(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="detailTotal>0"
@ -159,6 +179,7 @@ export default {
name: "InvCountOrderAudit",
data() {
return {
showSearch: true,
filterQuery: {
orderId: null,
invCode: this.$store.getters.locInvCode,
@ -208,6 +229,10 @@ export default {
};
},
methods: {
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.$router.push({
path: "",

@ -1,58 +1,72 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
@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-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<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>
</el-form-item>
<el-form :model="filterQuery" class="query-form" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点仓库:">
<el-select v-model="filterQuery.invStorageCode" 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="8">
<el-form-item class="query-form-item" label="盘点货位:">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择盘点货位" clearable="true"
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>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="margin-left: 10px;display:flex;">
<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-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="300"></el-table-column>
<el-table-column label="仓库" prop="invName" width="300"></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="300"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="150">
<el-table-column label="盘点单号" prop="orderId" width="160"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="120"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="120"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="200"></el-table-column>
<el-table-column label="盘点时间" prop="createTime"></el-table-column>
<el-table-column label="盘点人" prop="createUser" width="120"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="180"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
@ -72,15 +86,15 @@
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品名称" prop="productName" width="220"></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="180"
show-overflow-tooltip></el-table-column>
<el-table-column label="生产日期" prop="produceDate" width="120"></el-table-column>
<el-table-column label="失效日期" prop="expireDate" width="120"></el-table-column>
<el-table-column label="盘点数量" prop="countNum" width="150"></el-table-column>
<el-table-column label="账面数量" prop="invNum" width="150"></el-table-column>
<el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column>
<el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="盘盈数量" prop="profitNum" width="100"></el-table-column>
<el-table-column label="盘亏数量" prop="lossNum" width="100"></el-table-column>
<el-table-column label="盈亏状态" prop="status" width="100">
<template slot-scope="scope">
<el-tag>
@ -88,7 +102,11 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作">
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button
type="text"
@ -140,6 +158,7 @@ export default {
name: "InvCountOrderCompleted",
data() {
return {
showSearch: true,
filterQuery: {
orderId: null,
invCode: this.$store.getters.locInvCode,
@ -205,6 +224,11 @@ export default {
this.getList();
this.getSpaceList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onSubmit() {
this.filterQuery.page = 1;
this.getList();

@ -1,25 +1,17 @@
<template>
<div>
<el-card style="margin: 5px;margin-top: -20px">
<el-form :model="formData" ref="dataForm" label-width="100px" style="margin-bottom: -15px">
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<el-button
v-if="countType != 2"
type="primary"
:disabled="this.codeArray.length > 0"
@click.native="startCount(1)"
>开始盘点
</el-button>
<el-form :model="formData" ref="dataForm" label-width="100px" style="margin-bottom: -15px;margin-bottom: -1px">
<el-button-group style="display: flex;margin: 0px 0 1px 70%; height: 35px">
<el-button
type="primary"
:disabled="this.codeArray.length > 0"
@click.native="startCount()"
>录入产品
@click.native="saveOrder()"
>草稿保存
</el-button>
<el-button
type="primary"
@click.native="saveOrder()"
>保存
@click.native="submitAudit()"
>提交审核
</el-button>
</el-button-group>
@ -49,8 +41,8 @@
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="盘点仓库:">
<el-select v-model="formData.invCode" placeholder="盘点仓库信息"
:disabled="codeArray.length >0 "
<el-select v-model="formData.invStorageCode" placeholder="盘点仓库信息"
:disabled="countProductList.length >0 "
@change="invChange"
style="width: 90%"
clearable>
@ -68,8 +60,8 @@
<el-col :span="10">
<el-form-item class="query-form-item" label="盘点货位:">
<el-select v-model="formData.invSpaceCode" placeholder="盘点货位信息"
:disabled="codeArray.length >0 || this.countType == 0"
<el-select v-model="formData.invWarehouseCode" placeholder="盘点货位信息"
:disabled="countProductList.length >0 || this.countType == 0"
@change="invSpaceChange"
style="width: 90%;"
clearable>
@ -87,6 +79,18 @@
</el-row>
<el-row>
<el-col :span="10">
<el-form-item class="query-form-item" label="盘点方式:">
<el-select v-model="formData.codeCount" style="width: 90%" placeholder="请选择盘点方式"
:disabled="countProductList.length >0 ">
<el-option label="手动盘点" :value="1"></el-option>
<el-option label="扫码盘点" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="formData.codeCount == 2">
<el-col :span="18">
<el-form-item class="query-form-item" label="扫码录入:">
<el-input
@ -100,38 +104,78 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-col :span="6">
<el-button
type="primary"
style="margin-top: 8px"
size="mini"
@click.native.stop="addCode()"
style="margin-left: 15px"
>添加
</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;margin-top: 20px;"
</el-form>
</el-card>
<el-tabs type="border-card" style="margin: 5px">
<el-tab-pane label="盘点详情">
<el-button-group style="display: flex;margin: 0px 0 10px 85%; ">
<el-button
v-if="countType != 2"
type="primary"
size="mini"
:disabled="this.countProductList.length > 0"
@click.native="startCount(1)"
>录入产品
</el-button>
<el-button
v-if="countType == 2"
type="primary" size="mini"
:disabled="this.countProductList.length > 0"
@click.native="startCount()"
>录入产品
</el-button>
</el-button-group>
<el-table v-loading="loading" :data="countProductList" style="width: 100%;"
highlight-current-row
border max-height="300" height="300">
<el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column width="150" label="产品通用名" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="150" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="150" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="150" label="库存数量" prop="invNum"></el-table-column>
<el-table-column width="150" label="盘点数量" prop="countNum"></el-table-column>
<el-table-column label="生产日期(yyMMdd)" prop="produceDate"></el-table-column>
<el-table-column label="失效日期(yyMMdd)" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="操作">
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="库存数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
<template slot-scope="scope" v-if="formData.codeCount == 1">
<el-input v-model="scope.row.countNum"
:disabled="scope.row.id !== selectedIndex"
ref='inputBatchNoRef'
placeholder="请输入盘点数量"></el-input>
</template>
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button type="text" size="small" v-if="scope.row.id == selectedIndex" @click.stop="true"
@click.native="saveChange(scope.row)">保存
</el-button>
<el-button
type="text"
size="small"
v-if="scope.row.id != selectedIndex && formData.codeCount == 1"
@click.stop="true"
@click.native="showCodes(scope.$index, scope.row)"
>码详情
@click.native="rowChange(scope.row)"
>编辑
</el-button>
<el-button
type="text"
@ -143,64 +187,123 @@
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-form>
</el-card>
<el-tab-pane label="滴码明细" v-if="formData.codeCount == 2">
<invCountCodes
:codeQuery="codeQuery"
:getCountOrderDetail="getList"
:orderIdFk="formData.orderId"
v-if="isCodeAlive"
></invCountCodes>
</el-tab-pane>
</el-tabs>
<el-dialog
title="库存产品录入"
:visible.sync="selectInvProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
width="80%"
v-if="selectInvProductVisible"
:append-to-body='true'
>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-form label-width="100px" :model="filterQuery" size="mini" v-show="showSearch" style="margin-top: -10px">
<el-row>
<el-form-item class="query-form-item" label="产品标识DI:">
<el-input v-model="filterQuery.nameCode" placeholder="产品标识DI" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="产品名称:">
<el-input v-model="filterQuery.cpmctymc" placeholder="产品名称" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="批次号:">
<el-input v-model="filterQuery.batchNo" placeholder="批次号" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="queryInvProductsList"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="combine"></el-button>
</el-button-group>
</el-form-item>
<el-col :span="8">
<el-form-item class="query-form-item" label="仓库:">
<el-select v-model="filterQuery.invCode" placeholder="" disabled style="width: 90%" clearable>
<el-option
v-for="item in invList"
: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="8">
<el-form-item class="query-form-item" label="货位:">
<el-select v-model="filterQuery.invSpaceCode" placeholder="" disabled style="width: 90%" clearable>
<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="8">
<el-form-item class="query-form-item" label="DI/物资编码:">
<el-input v-model="filterQuery.nameCode" style="width: 90%" placeholder="请输入DI/物资编码"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="设备名称:">
<el-input v-model="filterQuery.cpmctymc" style="width: 90%" placeholder="请输入设备名称"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="规格型号:">
<el-input v-model="filterQuery.ggxh" style="width: 90%" placeholder="请输入规格型号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="生产企业:">
<el-input v-model="filterQuery.manufactory" style="width: 90%" placeholder="请输入生产企业"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="注册/备案号:">
<el-input v-model="filterQuery.zczbhhzbapzbh" style="width: 90%" placeholder="请输入注册/备案号"
clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="供应商:">
<el-input v-model="filterQuery.supName" style="width: 90%" placeholder="请输入供应商"
clearable></el-input>
</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="queryInvProductsList"></el-button>
<el-button type="primary" icon="el-icon-check" @click="combine"></el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="productList" style="width: 100%"
highlight-current-row="false"
<el-table v-loading="loading" :data="productList" style="width: 100%" highlight-current-row="false"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" border
ref="multipleTable">
<el-table-column
type="selection"
:reserve-selection="true"
width="55">
</el-table-column>
<el-table-column type="selection" :reserve-selection="true" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="产品标识" prop="nameCode" width="180"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" width="200"></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="100"></el-table-column>
<el-table-column label="出库数量" prop="outCount" width="100"></el-table-column>
<el-table-column label="结余数量" prop="reCount" width="100"></el-table-column>
<el-table-column label="DI/物资编码" prop="nameCode" width="140" show-overflow-tooltip></el-table-column>
<el-table-column label="物资名称" prop="cpmctymc" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="规格型号" prop="ggxh" width="160" show-overflow-tooltip></el-table-column>
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip></el-table-column>
<el-table-column label="生产日期" prop="productionDate" show-overflow-tooltip></el-table-column>
<el-table-column label="失效日期" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="入库数量" prop="inCount" show-overflow-tooltip></el-table-column>
<el-table-column label="出库数量" prop="outCount" show-overflow-tooltip></el-table-column>
<el-table-column label="结余数量" prop="reCount" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" prop="manufactory" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh" width="180" show-overflow-tooltip></el-table-column>
<el-table-column label="供应商" prop="supName" width="180" show-overflow-tooltip></el-table-column>
</el-table>
<pagination
@ -236,13 +339,14 @@ import {
getCountOrderDetailList,
deleteCountOrderDetail,
addCountOrderDetail,
batchAddDetail
batchAddDetail, submitAudit, updateCountOrderStatus, updateCountOrderDetail
} from "@/api/inventory/invCountOrder";
import {addCode} from "@/api/inventory/invCountCodes";
import {getCountInvProductProduct} from "@/api/inventory/invPorduct";
import {isBlank} from "@/utils/strUtil";
import {getInvListByUser} from "@/api/system/invWarehouse";
import invCountCodes from "@/views/inventory/count/InvCountCodes.vue";
import {updateBizProduct} from "@/api/inout/orderDetailCode";
export default {
props: {
@ -271,11 +375,11 @@ export default {
orderId: null,
createTime: null,
deptCode: null,
invCode: null,
invSpaceCode: null,
countType: this.countType
invWarehouseCode: null,
invStorageCode: null,
countType: this.countType,
codeCount: 1,
},
codeArray: [],
total: 0,
loading: false,
index: null,
@ -291,6 +395,7 @@ export default {
page: 1,
limit: 10
},
showSearch: true,
productList: [],
scanText: "扫码录入:",
codesList: [],
@ -309,7 +414,9 @@ export default {
},
codesVisible: false,
disableSpace: false,
multiProduct: []
multiProduct: [],
selectedIndex: null,
isCodeAlive: true,
}
},
methods: {
@ -319,9 +426,9 @@ export default {
this.invList = res.data || [];
if (!isBlank(this.countOrder.invSpaceCode)) {
this.getSpaceList();
this.formData.invCode = this.countOrder.invCode;
this.formData.invStorageCode = this.countOrder.invStorageCode;
this.invList.forEach((item) => {
if (item.code === this.formData.invCode) {
if (item.code === this.formData.invStorageCode) {
this.formData.deptCode = item.parentId;
}
})
@ -332,7 +439,7 @@ export default {
invChange() {
// ID
this.invList.forEach((item) => {
if (item.code === this.formData.invCode) {
if (item.code === this.formData.invStorageCode) {
this.formData.deptCode = item.parentId;
}
});
@ -341,10 +448,10 @@ export default {
},
getSpaceList() {
this.spaceList = [];
let params = {invWarehouseCode: this.formData.invCode, status: 1};
let params = {invWarehouseCode: this.formData.invStorageCode, status: 1};
getInvSpaceList(params).then((res) => {
if (!isBlank(this.countOrder.invSpaceCode)) {
this.formData.invSpaceCode = this.countOrder.invSpaceCode;
if (!isBlank(this.countOrder.invWarehouseCode)) {
this.formData.invWarehouseCode = this.countOrder.invWarehouseCode;
}
this.spaceList = res.data.list || [];
});
@ -357,9 +464,10 @@ export default {
orderId: this.formData.orderId,
createTime: this.formData.billDate,
deptCode: this.formData.deptCode,
invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode,
countType: this.countOrder.countType
invStorageCode: this.formData.invStorageCode,
invWarehouseCode: this.formData.invWarehouseCode,
countType: this.countOrder.countType,
codeCount: this.formData.codeCount,
};
saveCountOrder(orderData).then((res) => {
if (res.code === 20000) {
@ -368,30 +476,7 @@ export default {
this.$message.success("保存成功");
if (type != null) {
//
let orderDetails = [];
this.countProductList.forEach(product => {
let detailData = {
orderIdFk: this.formData.orderId,
relId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate,
invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode
};
orderDetails.push(detailData);
});
let params = {
orderId: this.formData.orderId,
countOrderDetailList: orderDetails
}
batchAddDetail(params).then((res) => {
if (res.code === 20000) {
this.getList();
this.getCountOrderList();
}
})
this.saveOrderDetail();
} else {
this.closeDialog();
}
@ -400,11 +485,55 @@ export default {
}
});
},
saveOrderDetail() {
let orderDetails = [];
this.countProductList.forEach(product => {
let detailData = {
orderIdFk: this.formData.orderId,
productId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate,
invCode: this.formData.invStorageCode,
invSpaceCode: this.formData.invSpaceCode,
invNum: product.reCount,
};
orderDetails.push(detailData);
});
let params = {
orderId: this.formData.orderId,
countOrderDetailList: orderDetails
}
batchAddDetail(params).then((res) => {
if (res.code === 20000) {
this.getList();
this.getCountOrderList();
}
})
},
submitAudit() {
submitAudit(this.formData).then((res) => {
if (res.code === 20000) {
this.$message.success("提交成功!");
this.getList();
this.closeDialog();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.$message.error(error.message);
});
},
getInputFocus(event) {
event.currentTarget.select();
},
enterKey(event) {
if (this.codeArray.length === 0) {
if (this.countProductList.length === 0) {
this.$message.error("请先录入盘点产品!");
return;
}
@ -414,18 +543,18 @@ export default {
},
addCode() {
if (this.countType != 1) {
if (isBlank(this.formData.invCode)) {
if (isBlank(this.formData.invStorageCode)) {
this.$message.error("请先选择盘点仓库信息")
return;
}
} else if (this.countType === 1) {
if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) {
if (isBlank(this.formData.invStorageCode) || isBlank(this.formData.invWarehouseCode)) {
this.$message.error("请先选择盘点仓库和货位信息");
return;
}
}
if (this.codeArray.length < 1) {
if (this.countProductList.length < 1) {
this.$message.error("未选择盘点产品!")
return;
}
@ -437,11 +566,37 @@ export default {
addCode(params).then((res) => {
if (res.code === 20000) {
this.getList()
this.refreshCodesPanel();
} else {
this.$message.error(res.message);
}
})
},
rowChange(val) {
this.selectedIndex = val.id;
},
saveChange(row) {
updateCountOrderDetail(row)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("保存成功!");
this.selectedIndex = null;
this.getCountOrderList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
deleteOrderDetail(index, row) {
this.$confirm('此操作将删除单据详情,是否继续?', '提示', {
confirmButtonText: '确定',
@ -462,7 +617,7 @@ export default {
let params = {orderIdFk: this.formData.orderId};
getCountOrderDetailList(params).then((res) => {
if (res.code === 20000) {
this.codeArray = res.data.list || [];
this.countProductList = res.data.list || [];
}
});
},
@ -479,13 +634,18 @@ export default {
this.countProductList = [];
this.queryInvProducts();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
queryInvProductsList() {
this.filterQuery.page = 1;
this.queryInvProducts();
},
queryInvProducts() {
this.filterQuery.invCode = this.formData.invCode;
this.filterQuery.invSpaceCode = this.formData.invSpaceCode;
this.filterQuery.invCode = this.formData.invStorageCode;
this.filterQuery.invSpaceCode = this.formData.invWarehouseCode;
getCountInvProductProduct(this.filterQuery).then((res) => {
if (res.code === 20000) {
this.productList = res.data.list || [];
@ -506,11 +666,13 @@ export default {
this.$message.warning("请选择产品");
return;
}
this.multiProduct.forEach(product => {
this.countProductList.push(product);
})
if (this.codeArray.length === 0) {
if (this.countProductList.length === 0) {
//
this.multiProduct.forEach(product => {
this.countProductList.push(product);
});
// this.saveOrderDetail();
this.saveOrder(1);
}
this.selectInvProductVisible = false;
@ -527,18 +689,14 @@ export default {
startCount(val) {
this.countProductList = [];
if (this.countType === 0 && val === 1) {
if (isBlank(this.formData.invCode)) {
if (isBlank(this.formData.invStorageCode)) {
this.$message.warning("请先选择盘点仓库");
return;
}
// if (this.codeArray.length === 0) {
// this.$message.warning("");
// return;
// }
//
let params = {
invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode
invCode: this.formData.invStorageCode,
invSpaceCode: this.formData.invWarehouseCode
};
getCountInvProductProduct(params).then((res) => {
if (res.data.total !== 0) {
@ -550,22 +708,25 @@ export default {
}
});
} else if (this.countType === 0) {
if (isBlank(this.formData.invCode)) {
if (isBlank(this.formData.invStorageCode)) {
this.$message.warning("请先选择盘点仓库");
return;
}
this.filterQuery.invCode = this.formData.invStorageCode
this.filterQuery.invSpaceCode = this.formData.invWarehouseCode
this.productList = [];
this.selectInvProductVisible = true;
this.queryInvProducts();
} else if (this.countType === 1) {
if (isBlank(this.formData.invCode) || isBlank(this.formData.invSpaceCode)) {
if (isBlank(this.formData.invStorageCode) || isBlank(this.formData.invWarehouseCode)) {
this.$message.warning("请先选择盘点仓库和货位");
return;
}
if (val === 1) {
let params = {
invCode: this.formData.invCode,
invSpaceCode: this.formData.invSpaceCode
invCode: this.formData.invStorageCode,
invSpaceCode: this.formData.invWarehouseCode
};
getCountInvProductProduct(params).then((res) => {
if (res.data.total !== 0) {
@ -577,16 +738,20 @@ export default {
}
});
} else {
this.filterQuery.invCode = this.formData.invStorageCode
this.filterQuery.invSpaceCode = this.formData.invWarehouseCode
this.productList = [];
this.selectInvProductVisible = true;
this.queryInvProducts();
}
} else if (this.countType === 2) {
if (isBlank(this.formData.invCode)) {
if (isBlank(this.formData.invStorageCode)) {
this.$message.warning("请先选盘点仓库");
return;
}
this.multiProduct = [];
this.filterQuery.invCode = this.formData.invStorageCode
this.filterQuery.invSpaceCode = this.formData.invWarehouseCode
this.selectInvProductVisible = true;
this.queryInvProducts();
}
@ -600,24 +765,48 @@ export default {
edit: true
}
},
refreshCodesPanel() {
this.isCodeAlive = false;
this.$nextTick(() => {
//
this.isCodeAlive = true;
});
},
},
components: {
invCountCodes
},
created() {
this.getInvList();
this.formData = this.countOrder;
if (!isBlank(this.formData.orderId)) {
if (!isBlank(this.countOrder.orderId)) {
//
this.formData = this.countOrder;
let params = {orderIdFk: this.countOrder.orderId};
getCountOrderDetailList(params).then((res) => {
if (res.code === 20000) {
this.codeArray = res.data.list || [];
this.countProductList = res.data.list || [];
this.total = res.data.total || 0;
}
})
}
},
};
</script>
<style scoped>
.query-form-item {
display: block !important;
margin-right: 10px;
margin-bottom: 1px;
margin-top: 8px;
}
</style>

@ -1,102 +1,101 @@
<template>
<div>
<el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号"
clearable="true"></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true"
@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-form-item class="query-form-item" label="领用货位:">
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true"
>
<el-option
v-for="item in spaceList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="margin-left: 10px;display:flex;">
<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 type="primary" icon="el-icon-plus" @click="addCountOrder(0)"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(1)"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(2)"></el-button>
</el-button-group>
</el-form-item>
<el-form :model="filterQuery" size="mini" label-width="120px" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点单号:">
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
clearable="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="盘点仓库:">
<el-select v-model="filterQuery.invStorageCode" 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="8">
<el-form-item class="query-form-item" label="盘点货位:">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择盘点货位" clearable="true"
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>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group style="margin-left: 10px;display:flex;">
<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 type="primary" icon="el-icon-plus" @click="addCountOrder(0)"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(1)"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(2)"></el-button>
</el-button-group>
</div>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="300"></el-table-column>
<el-table-column label="仓库" prop="invName" width="300"></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="300"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="150">
<el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" width="100"></el-table-column>
<el-table-column label="货位" prop="invSubStorageName" width="100"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span>
</template>
</el-table-column>
<el-table-column label="盘点人" prop="createUser" width="200"></el-table-column>
<el-table-column label="盘点时间" prop="createTime"></el-table-column>
<el-table-column label="盘点人" prop="createUser" width="140"></el-table-column>
<el-table-column label="盘点时间" prop="createTime" width="160"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template>
</el-table-column>
<el-table-column label="操作">
<el-table-column label="操作" width="140" fixed="right">
<template slot-scope="scope">
<el-row>
<el-button
type="text"
size="small"
@click.native.stop="printOrder(scope.row)"
>打印
</el-button
>
</el-row>
<el-row>
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
</el-row>
<el-row>
<el-button
type="text"
size="small"
@click.native.stop="submitAudit(scope.row)"
>提交审核
</el-button
>
</el-row>
<el-row>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button>
</el-row>
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="printOrder(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>
@ -109,6 +108,51 @@
></pagination>
</el-card>
<el-card>
<el-table v-loading="detailLoading" :data="detailList" style="width: 100%" highlight-current-row
border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column width="160" label="物资名称" prop="productName" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="DI/物资编码" prop="nameCode" show-overflow-tooltip></el-table-column>
<el-table-column width="160" label="规格型号" prop="ggxh" show-overflow-tooltip></el-table-column>
<el-table-column width="120" label="批次号" prop="batchNo"></el-table-column>
<el-table-column width="100" label="账目数量" prop="invNum"></el-table-column>
<el-table-column width="100" label="盘点数量" prop="countNum">
</el-table-column>
<el-table-column label="生产日期" width="120" prop="produceDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate" show-overflow-tooltip></el-table-column>
<el-table-column label="生产企业" width="180" prop="ylqxzcrbarmc" show-overflow-tooltip></el-table-column>
<el-table-column label="注册/备案凭证号" width="180" prop="zczbhhzbapzbh" show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="盘盈数量" prop="profitNum" width="150"></el-table-column>-->
<!-- <el-table-column label="盘亏数量" prop="lossNum" width="150"></el-table-column>-->
<!-- <el-table-column label="盈亏状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag>-->
<!-- {{ countStatusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="showCode(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:limit.sync="detailQuery.limit"
:page.sync="detailQuery.page"
@pagination="getCountOrderDetailList"
></pagination>
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="formVisible"
@ -136,7 +180,7 @@ import {
deleteCountOrder,
submitAudit,
verifyTemplateFile,
printOrder
printOrder, getCountOrderDetailList
} from "@/api/inventory/invCountOrder";
import invCountOrderModify from "@/views/inventory/count/InvCountOrderModify.vue";
@ -144,10 +188,11 @@ export default {
name: "InvCountOrderNew",
data() {
return {
showSearch: true,
filterQuery: {
orderId: null,
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
invStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: null,
status: 0,
page: 1,
limit: 20,
@ -178,18 +223,29 @@ export default {
0: "整库盘点",
1: "货位盘点",
2: "部分盘点"
}
},
detailQuery: {
orderIdFk: null,
page: 1,
limit: 20
},
detailList: [],
detailTotal: 0,
detailLoading: false,
};
},
methods: {
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
orderId: null,
invCode: this.$store.getters.locInvCode,
invSpaceCode: null,
invStorageCode: this.$store.getters.locInvCode,
invWarehouseCode: null,
status: 0,
page: 1,
limit: 20,
@ -237,7 +293,7 @@ export default {
this.getSpaceList();
},
getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.invCode, status: 1};
let params = {invWarehouseCode: this.filterQuery.invStorageCode, status: 1};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
this.getList();
@ -323,6 +379,28 @@ export default {
this.formVisible = false;
this.getList();
},
handleChange(row) {
this.detailQuery.orderIdFk = row.orderId;
this.detailQuery.page = 1;
this.getCountOrderDetailList()
},
getCountOrderDetailList() {
this.detailLoading = true;
getCountOrderDetailList(this.detailQuery).then((res) => {
this.detailLoading = false;
if (res.code === 20000) {
this.detailList = res.data.list || [];
this.detailTotal = res.data.total || 0;
} else {
this.detailList = [];
this.detailTotal = 0;
}
}).catch(() => {
this.detailLoading = false;
this.detailList = [];
this.detailTotal = 0;
});
},
},
components: {
invCountOrderModify

@ -0,0 +1,424 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row>
<el-col :span="24">
<el-form-item class="query-form-item" label="盘点仓库:">
<el-select v-model="filterQuery.invStorageCode" 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-form-item>
<el-button-group>
<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 type="primary" icon="el-icon-plus" @click="addSetting"
>添加盘点设置
</el-button
>
</el-button-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%"
border
highlight-current-row="true"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点仓库" prop="invName" width="120"
show-overflow-tooltip></el-table-column>
<el-table-column label="盘点货位" prop="spaceName" width="120"
show-overflow-tooltip></el-table-column>
<el-table-column label="盘盈单据类型" prop="inBusTypeName" width="160"
show-overflow-tooltip></el-table-column>
<el-table-column label="盘盈单往来单位" prop="inFromCorpName" width="160"
show-overflow-tooltip></el-table-column>
<el-table-column label="盘亏单据类型" prop="outBusTypeName" width="160"
show-overflow-tooltip></el-table-column>
<el-table-column label="盘亏往来单位" prop="outFromCorpName" width="160"
show-overflow-tooltip></el-table-column>
<el-table-column label="备注" prop="remark" width="180"
show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="handleEdit(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="handleDel(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<!-- <el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>-->
</el-card>
<el-dialog
:title="formMap[formName]"
:visible.sync="settingFormVisible"
width="45%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="settingFormVisible"
append-to-body
>
<el-form :model="formData" ref="dataForm" label-width="160px"
:rules="rules">
<el-form-item class="query-form-item" label="盘点仓库:" prop="invStorageCode">
<el-select v-model="formData.invStorageCode" placeholder="盘点仓库信息"
@change="setInvChange"
style="width: 80%"
clearable>
<el-option
v-for="item in setInvList"
: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-form-item class="query-form-item" label="盘点货位:">
<el-select v-model="formData.invWarehouseCode" placeholder="盘点货位信息"
style="width: 80%"
clearable>
<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.parentName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="盘盈单据类型:" prop="inAction">
<el-select v-model="formData.inAction" placeholder="请选择单据类型" style="width: 80%"
>
<el-option
v-for="item in inBusList"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="盘盈往来单位:" prop="inFromCorp">
<el-select
v-model="formData.inFromCorp"
filterable
remote
clearable="true"
style="width: 80%"
reserve-keyword
placeholder="请输入往来单位"
:remote-method="findMethod"
:loading="loading"
>
<el-option
v-for="item in corpList"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="盘亏单据类型:" prop="outAction">
<el-select v-model="formData.outAction" placeholder="请选择单据类型" style="width: 80%"
>
<el-option
v-for="item in outBusList"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="盘亏往来单位:" prop="outFromCorp">
<el-select
v-model="formData.outFromCorp"
filterable
remote
clearable="true"
style="width: 80%"
reserve-keyword
placeholder="请输入往来单位"
:remote-method="findMethod"
:loading="loading"
>
<el-option
v-for="item in corpList"
:key="item.erpId"
:label="item.name"
:value="item.erpId"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="settingFormVisible = false">取消</el-button>
<el-button type="primary" size="small" @click.native="save">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {getSettingList, saveCountSetting, verifyAdd} from "@/api/inventory/invCountSetting";
import {getJoinBussinessType} from "@/api/basic/bussinessType";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvSpaceList} from "@/api/inventory/invSpace";
import {isBlank} from "@/utils/strUtil";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
export default {
data() {
return {
filterQuery: {
id: null,
page: 1,
limit: 20,
},
list: [],
total: 0,
loading: true,
formName: null,
formMap: {
add: "添加盘点设置参数",
edit: "编辑盘点设置参数"
},
settingFormVisible: false,
formData: {
inAction: null,
outAction: null
},
inBusList: [],
outBusList: [],
invList: [],
setInvList: [],
spaceList: [],
corpList: [],
rules: {
invStorageCode: [{required: true, message: "请选择盘点仓库", trigger: "blur"},],
inAction: [{required: true, message: "请选择盘盈单据类型", trigger: "blur"}],
inFromCorp: [{required: true, message: "请选择盘盈往来单位", trigger: "blur"}],
outAction: [{required: true, message: "请选择盘亏单据类型", trigger: "blur"}],
outFromCorp: [{required: true, message: "请选择盘亏往来单位", trigger: "blur"}],
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
id: null,
page: 1,
limit: 20,
};
this.invChange();
this.getList();
},
onSubmit() {
this.loading = true;
this.filterQuery.page = 1;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleEdit(row) {
this.settingFormVisible = true;
this.formName = 'edit';
this.formData = row;
this.getInBusType();
this.getOutBusType();
this.findMethod(this.formData.inFromCorp)
this.findMethod(this.formData.outFromCorp)
},
handleDel(row) {
},
addSetting() {
this.settingFormVisible = true;
this.formName = 'add';
this.formData = {
invAction: null,
outAction: null
}
},
getList() {
this.loading = true;
let params = {};
getSettingList(params).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
}
}).catch((error) => {
this.loading = false;
this.list = [];
this.total = 0;
})
},
getInvList() {
getInvListByUser()
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
},
getSetInvList() {
getInvListByUser()
.then((response) => {
this.setInvList = response.data || [];
})
.catch(() => {
});
},
setInvChange() {
// ID
this.formData.invSpaceCode = null;
this.getSpaceList();
this.getInBusType();
this.getOutBusType();
},
getSpaceList() {
this.spaceList = [];
let params = {invWarehouseCode: this.formData.invStorageCode, status: 1};
getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || [];
});
},
save() {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
saveCountSetting(this.formData, this.formName).then((res) => {
if (res.code === 20000) {
this.settingFormVisible = false;
this.getList();
} else {
this.$message.error(res.message);
}
});
} else {
return false;
}
});
},
getInBusType() {
let params = {
code: this.formData.invStorageCode,
enable: true,
mainAction: "WareHouseIn"
}
getLocalJoinByUser(params).then((res) => {
this.inBusList = res.data.list || [];
})
},
getOutBusType() {
let params = {
code: this.formData.invStorageCode,
enable: true,
mainAction: "WareHouseOut"
};
getLocalJoinByUser(params).then((res) => {
this.outBusList = res.data.list || [];
})
},
//
findMethod(query) {
this.corpList = [];
let cQuery = {
key: query,
corpType: 4,
page: 1,
limit: 20
};
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.corpList = response.data.list || [];
})
.catch(() => {
this.loading = false;
});
},
},
created() {
this.getSetInvList()
this.getList();
},
};
</script>
<style type="text/scss" lang="scss">
</style>
Loading…
Cancel
Save