|
@@ -3,10 +3,9 @@
|
|
|
<script>
|
|
|
import test from "@/components/form-test/index.vue";
|
|
|
import query from "@/components/query/index.vue";
|
|
|
-
|
|
|
import byTable from "@/components/by-table/index.js";
|
|
|
import addCombination from "./addCombination.vue";
|
|
|
-import { supplySelect } from "@/api/product-material/supply/index.js";
|
|
|
+import * as API from "@/api/inventory-management/combination.js";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -17,8 +16,6 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- supplyTypeList: [],
|
|
|
- supplySelectList: [],
|
|
|
btnForm: {
|
|
|
otherButton: {
|
|
|
list: [
|
|
@@ -37,14 +34,6 @@ export default {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
keyword: "",
|
|
|
- warehouseId: "",
|
|
|
- status: "",
|
|
|
- code: "",
|
|
|
- goodsCode: "",
|
|
|
- goodsName: "",
|
|
|
- applyUserId: "",
|
|
|
- startTime: "",
|
|
|
- endTime: "",
|
|
|
},
|
|
|
selectConfig: [
|
|
|
// {
|
|
@@ -57,40 +46,26 @@ export default {
|
|
|
loading: false,
|
|
|
titleText: "组合操作",
|
|
|
open: false,
|
|
|
- form: {
|
|
|
- id: "",
|
|
|
- receiptWarehouseId: "",
|
|
|
- planArrivalTime: "",
|
|
|
- cause: "",
|
|
|
- goodsId: [{}],
|
|
|
- },
|
|
|
+ form: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
const businessDictData = JSON.parse(
|
|
|
window.localStorage.getItem("businessDict")
|
|
|
);
|
|
|
-
|
|
|
- this.supplyTypeList = businessDictData.find(
|
|
|
- (item) => item.code === "supplyType"
|
|
|
- ).children;
|
|
|
-
|
|
|
- supplySelect({ name: "", code: "", type: "" }).then((res) => {
|
|
|
- this.supplySelectList = res.data.data;
|
|
|
- });
|
|
|
- // this.getList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- API.outboundList(this.queryParams).then(
|
|
|
+ API.getCombinationList(this.queryParams).then(
|
|
|
(res) => {
|
|
|
this.tableList = res.data.data.records;
|
|
|
this.total = res.data.data.total;
|
|
|
this.loading = false;
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("outboundList: " + err);
|
|
|
+ console.log("getCombinationList: " + err);
|
|
|
this.loading = false;
|
|
|
}
|
|
|
);
|
|
@@ -100,84 +75,29 @@ export default {
|
|
|
},
|
|
|
handleAdd() {
|
|
|
this.form = {
|
|
|
- id: "",
|
|
|
- receiptWarehouseId: "",
|
|
|
- planArrivalTime: "",
|
|
|
- cause: "",
|
|
|
- goodsId: [],
|
|
|
+ productId: "",
|
|
|
+ combinationWarehouseId: "",
|
|
|
+ sourceWarehouseId: "",
|
|
|
+ combinationQuantity: "",
|
|
|
};
|
|
|
this.open = true;
|
|
|
},
|
|
|
handleCancel() {
|
|
|
- this.form = {
|
|
|
- id: "",
|
|
|
- receiptWarehouseId: "",
|
|
|
- planArrivalTime: "",
|
|
|
- cause: "",
|
|
|
- goodsId: [],
|
|
|
- };
|
|
|
this.open = false;
|
|
|
},
|
|
|
- handleEdit(row) {
|
|
|
- this.form = row;
|
|
|
- this.open = true;
|
|
|
- if (this.form.fileInfoList === "") {
|
|
|
- this.form.fileInfoList = [];
|
|
|
- }
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.addCustomer.loading = true;
|
|
|
- this.$refs.addCustomer.countryChange(this.form.countryId);
|
|
|
- this.$refs.addCustomer.provinceChange(this.form.provinceId);
|
|
|
- this.$refs.addCustomer.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
+ handleEdit(row) {},
|
|
|
handleSubmit() {
|
|
|
- if (!this.form.id) {
|
|
|
- API.outboundAdd(this.form).then(
|
|
|
- () => {
|
|
|
- this.msgSuccess(this.$t("addSuccess"));
|
|
|
- this.$refs.addCustomer.loading = false;
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- console.log("outboundAdd: " + err);
|
|
|
- this.$refs.addCustomer.loading = false;
|
|
|
- }
|
|
|
- );
|
|
|
- } else {
|
|
|
- API.outboundEdit(this.form).then(
|
|
|
- () => {
|
|
|
- this.msgSuccess(this.$t("editSuccess"));
|
|
|
- this.open = false;
|
|
|
- this.$refs.addCustomer.loading = false;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- console.log("outboundEdit: " + err);
|
|
|
- this.$refs.addCustomer.loading = false;
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- handleDelete(row) {
|
|
|
- this.$confirm(this.$t("askDeleteData"), {
|
|
|
- confirmButtonText: this.$t("submitText"),
|
|
|
- cancelButtonText: this.$t("cancelText"),
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
- API.outboundDel({ id: row.id }).then(() => {
|
|
|
- this.msgSuccess(this.$t("deleteSuccess"));
|
|
|
+ API.addCombination(this.form).then(
|
|
|
+ () => {
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
+ this.$refs.addCombination.loading = false;
|
|
|
+ this.open = false;
|
|
|
this.getList();
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- showAddress(row) {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- {row.countryName} , {row.provinceName} , {row.cityName}
|
|
|
- </div>
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log("addCombination: " + err);
|
|
|
+ this.$refs.addCombination.loading = false;
|
|
|
+ }
|
|
|
);
|
|
|
},
|
|
|
},
|
|
@@ -194,7 +114,7 @@ export default {
|
|
|
<query
|
|
|
:selectConfig="selectConfig"
|
|
|
:req="queryParams"
|
|
|
- :isShowMore="true"
|
|
|
+ :isShowMore="false"
|
|
|
@handleQuery="handleQuery"
|
|
|
@handleMore="
|
|
|
() => {
|
|
@@ -203,24 +123,34 @@ export default {
|
|
|
"
|
|
|
></query>
|
|
|
<el-table :data="tableList" v-loading="loading">
|
|
|
- <el-table-column label="产品组合编码" align="left" prop="code" />
|
|
|
-
|
|
|
- <el-table-column label="产品组合名称" align="left" prop="code" />
|
|
|
- <el-table-column label="规格" align="left" prop="name" />
|
|
|
- <el-table-column label="单位" align="left" :formatter="showAddress" />
|
|
|
- <el-table-column label="组合后放置仓库" align="left" prop="contacts" />
|
|
|
- <el-table-column label="半成品所在仓库" align="left" prop="phone" />
|
|
|
- <el-table-column label="组合数量" align="left" prop="phone" />
|
|
|
- <el-table-column label="操作人" align="left" prop="phone" />
|
|
|
- <el-table-column label="操作时间" align="left" prop="phone" />
|
|
|
-
|
|
|
- <el-table-column label="操作" align="left" width="120">
|
|
|
+ <el-table-column label="产品组合编码" align="left" prop="productCode" />
|
|
|
+ <el-table-column label="产品组合名称" align="left" prop="productName" />
|
|
|
+ <el-table-column label="规格" align="left" prop="productSpecs" />
|
|
|
+ <el-table-column label="单位" align="left" prop="productUnit" />
|
|
|
+ <el-table-column
|
|
|
+ label="组合后放置仓库"
|
|
|
+ align="left"
|
|
|
+ prop="sourceWarehouseName"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="半成品所在仓库"
|
|
|
+ align="left"
|
|
|
+ prop="combinationWarehouseName"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="组合数量"
|
|
|
+ align="left"
|
|
|
+ prop="combinationQuantity"
|
|
|
+ />
|
|
|
+ <el-table-column label="操作人" align="left" prop="createUserName" />
|
|
|
+ <el-table-column label="操作时间" align="left" prop="createTime" />
|
|
|
+ <!-- <el-table-column label="操作" align="left" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="handleEdit(scope.row)"
|
|
|
>查看
|
|
|
</el-button>
|
|
|
</template>
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
</el-table>
|
|
|
</el-card>
|
|
|
|
|
@@ -233,9 +163,6 @@ export default {
|
|
|
>
|
|
|
<add-combination
|
|
|
:form="form"
|
|
|
- :supplyTypeList="supplyTypeList"
|
|
|
- :supplySelectList="supplySelectList"
|
|
|
- :productTypeList="productTypeList"
|
|
|
@submit="handleSubmit"
|
|
|
@cancel="handleCancel"
|
|
|
ref="addCombination"
|