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

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

@ -9,7 +9,7 @@ ENV = 'production'
#林纪裕cd #林纪裕cd
# VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/' # 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/' # 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://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' import axios from '@/utils/request'
export function getCountCodesList(params) { export function getCountCodesList(params) {
return axios({ return axios({
url: "/invCount/codes/filter", url: "/invCount/codes/filter",
method: "get", method: "get",
params: params params: params
}); });
} }
export function deleteCode(data) { export function deleteCode(data) {
return axios({ return axios({
url: "/invCount/codes/deleteCode", url: "/invCount/codes/deleteCode",
method: "post", method: "post",
data: data data: data
}); });
} }
export function addCode(data) { export function addCode(data) {
return axios({ return axios({
url: "/invCount/codes/addCode", url: "/invCount/codes/addCode",
method: "post", method: "post",
data: data data: data
}); });
} }
export function getCodesNum(params) { export function getCodesNum(params) {
return axios({ return axios({
url: "/invCount/codes/getCountOrderCodesNum", url: "/invCount/codes/getCountOrderCodesNum",
method: "get", method: "get",
params: params params: params
}); });
} }

@ -1,83 +1,103 @@
import axios from '@/utils/request' import axios from '@/utils/request'
export function getCountOrderList(params) { export function getCountOrderList(params) {
return axios({ return axios({
url: "/invCount/order/filter", url: "/invCount/order/filter",
method: "get", method: "get",
params: params params: params
}); });
} }
export function deleteCountOrder(data) { export function deleteCountOrder(data) {
return axios({ return axios({
url: "/invCount/order/delete", url: "/invCount/order/delete",
method: "post", method: "post",
data: data data: data
}); });
} }
export function getCountOrderDetailList(params) { export function getCountOrderDetailList(params) {
return axios({ return axios({
url: "/invCount/order/detail/filter", url: "/invCount/order/detail/filter",
method: "get", method: "get",
params: params params: params
}); });
} }
export function saveCountOrder(data) { export function saveCountOrder(data) {
return axios({ return axios({
url: "/invCount/order/saveCountOrder", url: "/invCount/order/saveCountOrder",
method: "post", method: "post",
data: data data: data
}); });
} }
export function submitAudit(params) { export function submitAudit(params) {
return axios({ return axios({
url: "/invCount/order/submitAudit", url: "/invCount/order/submitAudit",
method: "get", method: "post",
params: params data: params
}); });
} }
export function deleteCountOrderDetail(data) { export function deleteCountOrderDetail(data) {
return axios({ return axios({
url: "/invCount/order/detail/deleteOrderDetail", url: "/invCount/order/detail/deleteOrderDetail",
method: "post", method: "post",
data: data data: data
}); });
} }
export function addCountOrderDetail(data) { export function addCountOrderDetail(data) {
return axios({ return axios({
url: "/invCount/order/detail/addCountOrderDetail", url: "/invCount/order/detail/addCountOrderDetail",
method: "post", method: "post",
data: data data: data
}); });
} }
export function updateCountOrderStatus(data) { export function updateCountOrderStatus(data) {
return axios({ return axios({
url: "/invCount/order/updateCountOrderStatus", url: "/invCount/order/updateCountOrderStatus",
method: "post", method: "post",
data: data data: data
}); });
} }
export function updateCountOrderDetail(data) {
return axios({
url: "/invCount/order/detail/updateCountOrderDetail",
method: "post",
data: data
});
}
export function verifyTemplateFile(data) { export function verifyTemplateFile(data) {
return axios({ return axios({
url: "/invCount/order/verifyTemplateFile", url: "/invCount/order/verifyTemplateFile",
method: "post", method: "post",
data: data data: data
}); });
} }
export function printOrder(data) { export function printOrder(data) {
return axios({ return axios({
url: "/invCount/order/printOrder", url: "/invCount/order/printOrder",
method: "post", method: "post",
data: data, data: data,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf 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 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 type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></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="DI/物资编码" prop="nameCode"></el-table-column>
<el-table-column label="产品名称" prop="cpmctymc"> <el-table-column label="物资名称" prop="cpmctymc"></el-table-column>
</el-table-column>
<el-table-column label="规格型号" prop="ggxh"></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="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productionDate"></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="inCount"></el-table-column>
<el-table-column label="出库数量" prop="outCount"></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="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-table>
</el-card> </el-card>

@ -1,43 +1,51 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-form :model="query" class="query-form" size="mini">
<el-form :model="query" class="query-form" size="mini" :inline="true"> <el-row>
<el-form-item class="query-form-item" label="条码:"> <el-col span="14">
<el-input v-model="query.code" placeholder="请扫描或输入条码" clearable="true"></el-input> <el-form-item class="query-form-item" label="UDI码:" label-width="80px">
</el-form-item> <el-input v-model="query.code" placeholder="请扫描或输入UDI码" clearable="true" style="width: 100%"></el-input>
<el-form-item> </el-form-item>
<el-button-group style="margin-left: 10px;display:flex;"> </el-col>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-col span="6">
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button> <el-form-item>
</el-button-group> <el-button-group style="margin-left: 15px">
</el-form-item> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
</el-form> <el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-table v-loading="loading" :data="codeArray" style="width: 100%" highlight-current-row </el-button-group>
border> </el-form-item>
<el-table-column label="序号" type="index"></el-table-column> </el-col>
<el-table-column label="条码" prop="code" show-overflow-tooltip></el-table-column> </el-row>
<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-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> </div>
</template> </template>
@ -51,6 +59,10 @@ export default {
type: Object, type: Object,
required: true, required: true,
}, },
orderIdFk: {
type: Object,
required: true,
},
getCountOrderDetail: { getCountOrderDetail: {
type: Function, type: Function,
required: true required: true
@ -77,7 +89,6 @@ export default {
this.query = { this.query = {
code: null, code: null,
productId: null, productId: null,
orderIdFk: null,
batchNo: null, batchNo: null,
page: 1, page: 1,
limit: 20 limit: 20
@ -89,9 +100,9 @@ export default {
this.getCodeList(); this.getCodeList();
}, },
getCodeList() { getCodeList() {
this.loading = true; this.loading = true;
this.query.relId = this.codeQuery.relId; this.query.relId = this.codeQuery.relId;
this.query.orderIdFk = this.codeQuery.orderIdFk; this.query.orderIdFk = this.orderIdFk;
this.query.batchNo = this.codeQuery.batchNo; this.query.batchNo = this.codeQuery.batchNo;
getCountCodesList(this.query).then((res) => { getCountCodesList(this.query).then((res) => {
this.loading = false; this.loading = false;
@ -116,7 +127,7 @@ export default {
}).then(() => { }).then(() => {
let params = { let params = {
orderIdFk: row.orderIdFk, orderIdFk: row.orderIdFk,
relId: row.relId, productId: row.productId,
code: row.code code: row.code
}; };
deleteCode(params).then((res) => { deleteCode(params).then((res) => {

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

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

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

@ -1,102 +1,101 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :model="filterQuery" class="query-form" size="mini" :inline="true"> <el-form :model="filterQuery" size="mini" label-width="120px" v-show="showSearch">
<el-form-item class="query-form-item" label="盘点单号:"> <el-row>
<el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" <el-col :span="8">
clearable="true"></el-input> <el-form-item class="query-form-item" label="盘点单号:">
</el-form-item> <el-input v-model="filterQuery.orderId" placeholder="请输入盘点单号" style="width: 90%"
<el-form-item class="query-form-item" label="领用仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择仓库" clearable="true" clearable="true"></el-input>
@change="invChange" </el-form-item>
> </el-col>
<el-option <el-col :span="8">
v-for="item in invList" <el-form-item class="query-form-item" label="盘点仓库:">
:key="item.name" <el-select v-model="filterQuery.invStorageCode" placeholder="请选择盘点仓库" clearable="true" style="width: 90%"
:label="item.name"
:value="item.code"> @change="invChange"
<span style="float: left">{{ item.name }}</span> >
</el-option> <el-option
</el-select> v-for="item in invList"
</el-form-item> :key="item.name"
<el-form-item class="query-form-item" label="领用货位:"> :label="item.name"
<el-select v-model="filterQuery.invSpaceCode" placeholder="请选择货位" clearable="true" :value="item.code">
> <span style="float: left">{{ item.name }}</span>
<el-option </el-option>
v-for="item in spaceList" </el-select>
:key="item.name" </el-form-item>
:label="item.name" </el-col>
:value="item.code"> <el-col :span="8">
<span style="float: left">{{ item.name }}</span> <el-form-item class="query-form-item" label="盘点货位:">
</el-option> <el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择盘点货位" clearable="true"
</el-select> style="width: 90%"
</el-form-item> >
<el-form-item> <el-option
<el-button-group style="margin-left: 10px;display:flex;"> v-for="item in spaceList"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> :key="item.name"
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button> :label="item.name"
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(0)"></el-button> :value="item.code">
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(1)"></el-button> <span style="float: left">{{ item.name }}</span>
<el-button type="primary" icon="el-icon-plus" @click="addCountOrder(2)"></el-button> </el-option>
</el-button-group> </el-select>
</el-form-item> </el-form-item>
</el-col>
</el-row>
</el-form> </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 <el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
@current-change="handleChange"
border> border>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="盘点单号" prop="orderId" width="300"></el-table-column> <el-table-column label="盘点单号" prop="orderId" width="180"></el-table-column>
<el-table-column label="仓库" prop="invName" width="300"></el-table-column> <el-table-column label="仓库" prop="invStorageName" width="100"></el-table-column>
<el-table-column label="货位" prop="invSpaceName" width="300"></el-table-column> <el-table-column label="货位" prop="invSubStorageName" width="100"></el-table-column>
<el-table-column label="盘点类型" prop="countType" width="150"> <el-table-column label="盘点类型" prop="countType" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ countTypeMap[scope.row.countType] }}</span> <span>{{ countTypeMap[scope.row.countType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="盘点人" prop="createUser" width="200"></el-table-column> <el-table-column label="盘点人" prop="createUser" width="140"></el-table-column>
<el-table-column label="盘点时间" prop="createTime"></el-table-column> <el-table-column label="盘点时间" prop="createTime" width="160"></el-table-column>
<el-table-column label="状态" prop="status" width="120"> <el-table-column label="状态" prop="status" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag>{{ statusMap[scope.row.status] }}</el-tag> <el-tag>{{ statusMap[scope.row.status] }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作" width="140" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-row> <el-button
<el-button type="text"
type="text" size="small"
size="small" @click.native.stop="editOrder(scope.row)"
@click.native.stop="printOrder(scope.row)" >编辑
>打印 </el-button
</el-button >
> <el-button
</el-row> type="text"
<el-row> size="small"
<el-button @click.native.stop="printOrder(scope.row)"
type="text" >打印
size="small" </el-button
@click.native.stop="editOrder(scope.row)" >
>编辑 <el-button
</el-button type="text"
> size="small"
</el-row> @click.native.stop="deleteDialog(scope.row.id)"
<el-row> >删除
<el-button </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>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -109,6 +108,51 @@
></pagination> ></pagination>
</el-card> </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 <el-dialog
:title="formMap[formName]" :title="formMap[formName]"
:visible.sync="formVisible" :visible.sync="formVisible"
@ -136,7 +180,7 @@ import {
deleteCountOrder, deleteCountOrder,
submitAudit, submitAudit,
verifyTemplateFile, verifyTemplateFile,
printOrder printOrder, getCountOrderDetailList
} from "@/api/inventory/invCountOrder"; } from "@/api/inventory/invCountOrder";
import invCountOrderModify from "@/views/inventory/count/InvCountOrderModify.vue"; import invCountOrderModify from "@/views/inventory/count/InvCountOrderModify.vue";
@ -144,10 +188,11 @@ export default {
name: "InvCountOrderNew", name: "InvCountOrderNew",
data() { data() {
return { return {
showSearch: true,
filterQuery: { filterQuery: {
orderId: null, orderId: null,
invCode: this.$store.getters.locInvCode, invStorageCode: this.$store.getters.locInvCode,
invSpaceCode: null, invWarehouseCode: null,
status: 0, status: 0,
page: 1, page: 1,
limit: 20, limit: 20,
@ -178,18 +223,29 @@ export default {
0: "整库盘点", 0: "整库盘点",
1: "货位盘点", 1: "货位盘点",
2: "部分盘点" 2: "部分盘点"
} },
detailQuery: {
orderIdFk: null,
page: 1,
limit: 20
},
detailList: [],
detailTotal: 0,
detailLoading: false,
}; };
}, },
methods: { methods: {
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
orderId: null, orderId: null,
invCode: this.$store.getters.locInvCode, invStorageCode: this.$store.getters.locInvCode,
invSpaceCode: null, invWarehouseCode: null,
status: 0, status: 0,
page: 1, page: 1,
limit: 20, limit: 20,
@ -237,7 +293,7 @@ export default {
this.getSpaceList(); this.getSpaceList();
}, },
getSpaceList() { getSpaceList() {
let params = {invWarehouseCode: this.filterQuery.invCode, status: 1}; let params = {invWarehouseCode: this.filterQuery.invStorageCode, status: 1};
getInvSpaceList(params).then((res) => { getInvSpaceList(params).then((res) => {
this.spaceList = res.data.list || []; this.spaceList = res.data.list || [];
this.getList(); this.getList();
@ -323,6 +379,28 @@ export default {
this.formVisible = false; this.formVisible = false;
this.getList(); 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: { components: {
invCountOrderModify 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