|
@@ -4,7 +4,7 @@
|
|
|
import test from "@/components/form-test/index.vue";
|
|
|
import query from "@/components/query/index.vue";
|
|
|
import sendCheck from "./sendCheck.vue";
|
|
|
-import * as API from "@/api/inbound-outbound/inbound/index.js";
|
|
|
+import * as API from "@/api/inventory-management/check.js";
|
|
|
import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
|
|
|
|
|
|
export default {
|
|
@@ -17,6 +17,7 @@ export default {
|
|
|
return {
|
|
|
warehouseTypeList: [],
|
|
|
warehouseSelectList: [],
|
|
|
+ productTypeList: [],
|
|
|
btnForm: {
|
|
|
otherButton: {
|
|
|
list: [
|
|
@@ -35,39 +36,39 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
keyword: "",
|
|
|
- warehouseId: "",
|
|
|
- status: "",
|
|
|
+ warehouseType: "",
|
|
|
+ resultType: "",
|
|
|
code: "",
|
|
|
- goodsCode: "",
|
|
|
- goodsName: "",
|
|
|
- applyUserId: "",
|
|
|
- startTime: "",
|
|
|
+ warehouseName: "",
|
|
|
+ createUser: "",
|
|
|
+ beginTime: "",
|
|
|
endTime: "",
|
|
|
},
|
|
|
selectConfig: [
|
|
|
{
|
|
|
label: "仓库类型",
|
|
|
- prop: "type",
|
|
|
+ prop: "warehouseType",
|
|
|
data: [],
|
|
|
},
|
|
|
{
|
|
|
label: "盘点结论",
|
|
|
- prop: "type",
|
|
|
+ prop: "resultType",
|
|
|
data: [
|
|
|
- { label: "正常", value: "1" },
|
|
|
- { label: "异常", value: "2" },
|
|
|
+ { label: "正常", value: "0" },
|
|
|
+ { label: "异常", value: "1" },
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
tableList: [],
|
|
|
loading: false,
|
|
|
- inboundType: 10, // 入库类型 10 采购入库 20 手动入库
|
|
|
titleText: "",
|
|
|
open: false,
|
|
|
form: {
|
|
|
- id: "",
|
|
|
- changeDetailsList: [],
|
|
|
+ warehouseId: "",
|
|
|
+ checkDetailsList: [],
|
|
|
},
|
|
|
+ checkDetailsList: [],
|
|
|
+ openDetails: false,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -81,15 +82,18 @@ export default {
|
|
|
label: item.dictValue,
|
|
|
value: item.dictKey,
|
|
|
}));
|
|
|
+ this.productTypeList = businessDictData.find(
|
|
|
+ (item) => item.code === "productType"
|
|
|
+ ).children;
|
|
|
warehouseSelectList().then((res) => {
|
|
|
this.warehouseSelectList = res.data.data;
|
|
|
});
|
|
|
- // this.getList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- API.outboundList(this.queryParams).then(
|
|
|
+ API.checkList(this.queryParams).then(
|
|
|
(res) => {
|
|
|
console.log(res, "qq");
|
|
|
this.tableList = res.data.data.records;
|
|
@@ -97,7 +101,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("outboundList: " + err);
|
|
|
+ console.log("checkList: " + err);
|
|
|
this.loading = false;
|
|
|
}
|
|
|
);
|
|
@@ -107,61 +111,38 @@ export default {
|
|
|
},
|
|
|
handleSend() {
|
|
|
this.form = {
|
|
|
- id: "",
|
|
|
- changeDetailsList: [],
|
|
|
+ warehouseId: "",
|
|
|
+ checkDetailsList: [],
|
|
|
};
|
|
|
this.open = true;
|
|
|
},
|
|
|
handleCancel() {
|
|
|
- this.form = {
|
|
|
- id: "",
|
|
|
- changeDetailsList: [],
|
|
|
- };
|
|
|
this.open = false;
|
|
|
},
|
|
|
- handleEdit(row) {
|
|
|
- this.titleText = "edit";
|
|
|
- this.form = row;
|
|
|
- this.open = true;
|
|
|
- if (this.form.fileInfoList === "") {
|
|
|
- this.form.fileInfoList = [];
|
|
|
- }
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.addInbound.loading = true;
|
|
|
- this.$refs.addInbound.countryChange(this.form.countryId);
|
|
|
- this.$refs.addInbound.provinceChange(this.form.provinceId);
|
|
|
- this.$refs.addInbound.loading = false;
|
|
|
- });
|
|
|
+ handleSee(row) {
|
|
|
+ API.checkDetails({ checkInfoId: row.id }).then(
|
|
|
+ (res) => {
|
|
|
+ this.checkDetailsList = res.data.data;
|
|
|
+ this.openDetails = true;
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log("checkDetails :" + err);
|
|
|
+ }
|
|
|
+ );
|
|
|
},
|
|
|
handleSubmit() {
|
|
|
- API.purchaseAdd(this.form).then(
|
|
|
+ API.sendCheck(this.form).then(
|
|
|
() => {
|
|
|
- this.msgSuccess(this.$t("addSuccess"));
|
|
|
- this.$refs.addInbound.loading = false;
|
|
|
+ this.msgSuccess("发起成功");
|
|
|
+ this.$refs.sendCheck.loading = false;
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("purchaseAdd: " + err);
|
|
|
- this.$refs.addInbound.loading = false;
|
|
|
+ console.log("sendCheck: " + err);
|
|
|
+ this.$refs.sendCheck.loading = false;
|
|
|
}
|
|
|
);
|
|
|
- // if (this.inboundType === 10) {
|
|
|
-
|
|
|
- // } else {
|
|
|
- // API.manualAdd(this.form).then(
|
|
|
- // () => {
|
|
|
- // this.msgSuccess(this.$t("addSuccess"));
|
|
|
- // this.open = false;
|
|
|
- // this.$refs.addInbound.loading = false;
|
|
|
- // this.getList();
|
|
|
- // },
|
|
|
- // (err) => {
|
|
|
- // console.log("manualAdd: " + err);
|
|
|
- // this.$refs.addInbound.loading = false;
|
|
|
- // }
|
|
|
- // );
|
|
|
- // }
|
|
|
},
|
|
|
|
|
|
handleDelete(row) {
|
|
@@ -206,17 +187,30 @@ export default {
|
|
|
"
|
|
|
></query>
|
|
|
<el-table :data="tableList" v-loading="loading">
|
|
|
- <el-table-column label="盘点单号" align="center" prop="code" />
|
|
|
- <el-table-column label="仓库类型" align="center" prop="name" />
|
|
|
- <el-table-column label="仓库名称" align="center" />
|
|
|
- <el-table-column label="盘点时间" align="center" prop="contacts" />
|
|
|
- <el-table-column label="盘点人" align="center" prop="phone" />
|
|
|
- <el-table-column label="盘点结论" align="center" prop="phone" />
|
|
|
- <el-table-column label="盘点详情" width="100" align="center">
|
|
|
+ <el-table-column label="盘点单号" align="left" prop="code" />
|
|
|
+ <el-table-column
|
|
|
+ label="仓库类型"
|
|
|
+ align="left"
|
|
|
+ prop="warehouseType"
|
|
|
+ :formatter="
|
|
|
+ (row) => dictDataEcho(row.warehouseType, warehouseTypeList)
|
|
|
+ "
|
|
|
+ />
|
|
|
+ <el-table-column label="仓库名称" align="left" prop="warehouseName" />
|
|
|
+ <el-table-column label="盘点时间" align="left" prop="createTime" />
|
|
|
+ <el-table-column label="盘点人" align="left" prop="createUserName" />
|
|
|
+ <el-table-column label="盘点结论" align="left" prop="resultType">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div :style="{ color: scope.row.resultType === 1 ? 'red' : '' }">
|
|
|
+ {{ scope.row.resultType === 0 ? "正常" : "异常" }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="盘点详情" width="120" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="deleteRow(scope.$index)">{{
|
|
|
- $t("delete")
|
|
|
- }}</el-button>
|
|
|
+ <el-button type="text" @click="handleSee(scope.row)"
|
|
|
+ >查看</el-button
|
|
|
+ >
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -240,12 +234,37 @@ export default {
|
|
|
:form="form"
|
|
|
:warehouseSelectList="warehouseSelectList"
|
|
|
:warehouseTypeList="warehouseTypeList"
|
|
|
- :inboundType="inboundType"
|
|
|
+ :productTypeList="productTypeList"
|
|
|
@submit="handleSubmit"
|
|
|
@cancel="handleCancel"
|
|
|
ref="sendCheck"
|
|
|
></send-check>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="盘点明细"
|
|
|
+ :visible.sync="openDetails"
|
|
|
+ v-if="openDetails"
|
|
|
+ width="40%"
|
|
|
+ >
|
|
|
+ <el-table :data="checkDetailsList">
|
|
|
+ <el-table-column
|
|
|
+ label="产品类型"
|
|
|
+ align="left"
|
|
|
+ prop="type"
|
|
|
+ :formatter="(row) => dictDataEcho(row.type, productTypeList)"
|
|
|
+ />
|
|
|
+ <el-table-column label="产品编码" align="left" prop="code" />
|
|
|
+ <el-table-column label="产品名称" align="left" prop="name" />
|
|
|
+ <el-table-column label="产品单位" align="left" prop="unit" />
|
|
|
+ <el-table-column
|
|
|
+ label="库存数量"
|
|
|
+ align="left"
|
|
|
+ prop="inventoryQuantity"
|
|
|
+ />
|
|
|
+ <el-table-column label="盘点数量" align="left" prop="checkQuantity" />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|