|
@@ -1,49 +1,36 @@
|
|
|
-vbase
|
|
|
+
|
|
|
|
|
|
<script>
|
|
|
import test from "@/components/form-test/index.vue";
|
|
|
import query from "@/components/query/index.vue";
|
|
|
-
|
|
|
-import * as API from "@/api/inbound-outbound/arrivalInspection.js";
|
|
|
-
|
|
|
-import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
|
|
|
-import addInspection from "./addInspection.vue";
|
|
|
+import {
|
|
|
+ JDreGoodsList,
|
|
|
+ JDreGoodsDetails,
|
|
|
+ JDtest,
|
|
|
+} from "@/api/order-management/JDReturnGoods/index.js";
|
|
|
+import addReturnGoods from "../addReturnGoods.vue";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
test,
|
|
|
query,
|
|
|
- addInspection,
|
|
|
+ addReturnGoods,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
warehouseSelectList: [],
|
|
|
warehouseTypeList: [],
|
|
|
qualityStatusList: [],
|
|
|
- btnForm: {
|
|
|
- otherButton: {
|
|
|
- list: [
|
|
|
- {
|
|
|
- name: "发起调仓",
|
|
|
- methodsText: "send",
|
|
|
- type: "primary",
|
|
|
- send: () => {
|
|
|
- this.handleSend();
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
keyword: "",
|
|
|
- status: "",
|
|
|
+ qualityStatus: "",
|
|
|
},
|
|
|
selectConfig: [
|
|
|
{
|
|
|
label: "质检状态",
|
|
|
- prop: "status",
|
|
|
+ prop: "qualityStatus",
|
|
|
data: [],
|
|
|
},
|
|
|
],
|
|
@@ -71,30 +58,19 @@ export default {
|
|
|
label: item.dictValue,
|
|
|
value: item.dictKey,
|
|
|
}));
|
|
|
- // warehouseSelectList().then((res) => {
|
|
|
- // this.warehouseSelectList = res.data.data;
|
|
|
- // this.selectConfig[0].data = this.warehouseSelectList.map((item) => ({
|
|
|
- // label: item.name,
|
|
|
- // value: item.id,
|
|
|
- // }));
|
|
|
- // this.selectConfig[1].data = this.warehouseSelectList.map((item) => ({
|
|
|
- // label: item.name,
|
|
|
- // value: item.id,
|
|
|
- // }));
|
|
|
- // });
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- API.qualityTestingList(this.queryParams).then(
|
|
|
+ JDreGoodsList(this.queryParams).then(
|
|
|
(res) => {
|
|
|
this.tableList = res.data.data.records;
|
|
|
this.total = res.data.data.total;
|
|
|
this.loading = false;
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("qualityTestingList: " + err);
|
|
|
+ console.log("JDreGoodsList: " + err);
|
|
|
this.loading = false;
|
|
|
}
|
|
|
);
|
|
@@ -102,65 +78,46 @@ export default {
|
|
|
handleQuery() {
|
|
|
this.getList();
|
|
|
},
|
|
|
- handleSend() {
|
|
|
- this.form = {
|
|
|
- outWarehouseId: "",
|
|
|
- inWarehouseId: "",
|
|
|
- remark: "",
|
|
|
- changeProductList: [],
|
|
|
- };
|
|
|
+ handleReceive(row) {
|
|
|
this.open = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.addReturnGoods.loading = true;
|
|
|
+ JDreGoodsDetails({ id: row.id }).then((res) => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.form = {
|
|
|
+ id: row.qualityId,
|
|
|
+ resultType: "",
|
|
|
+ warehouseId: row.warehouseId,
|
|
|
+ code: row.waybill,
|
|
|
+ logisticsDetailsList: res.data.data,
|
|
|
+ };
|
|
|
+ this.$refs.addReturnGoods.loading = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
+
|
|
|
handleCancel() {
|
|
|
this.open = false;
|
|
|
},
|
|
|
|
|
|
handleSubmit() {
|
|
|
- const arr = this.form.changeProductList.map((x) => {
|
|
|
- return {
|
|
|
- id: x.id,
|
|
|
- qualifiedQuantity: x.qualifiedQuantity,
|
|
|
- disqualificationQuantity: x.disqualificationQuantity,
|
|
|
- warehouseId: x.warehouseId,
|
|
|
- };
|
|
|
- });
|
|
|
- API.addInspection(arr).then(
|
|
|
+ const data = {
|
|
|
+ id: this.form.id,
|
|
|
+ resultType: this.form.resultType,
|
|
|
+ };
|
|
|
+ JDtest(data).then(
|
|
|
() => {
|
|
|
- this.msgSuccess("添加成功");
|
|
|
- this.$refs.addInspection.loading = false;
|
|
|
+ this.msgSuccess("质检成功");
|
|
|
+ this.$refs.addReturnGoods.loading = false;
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
},
|
|
|
(err) => {
|
|
|
- console.log("addInspection: " + err);
|
|
|
- this.$refs.addInspection.loading = false;
|
|
|
+ console.log("addReturnGoods: " + err);
|
|
|
+ this.$refs.addReturnGoods.loading = false;
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
- handleReceive(row) {
|
|
|
- this.open = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.addInspection.loading = true;
|
|
|
- API.qualityTestingDetails({ qualityInfoId: row.id }).then(
|
|
|
- (res) => {
|
|
|
- let list = res.data.data;
|
|
|
-
|
|
|
- this.form = {
|
|
|
- purchaseCode: row.code,
|
|
|
- supplierName: row.supplierName,
|
|
|
- logisticsCompanyName: row.logisticsCompanyName,
|
|
|
- code: row.logisticsInfoCode,
|
|
|
- changeProductList: list,
|
|
|
- };
|
|
|
- this.$refs.addInspection.loading = false;
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- console.log("qualityTestingDetails: " + err);
|
|
|
- this.$refs.addInspection.loading = false;
|
|
|
- }
|
|
|
- );
|
|
|
- });
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -181,59 +138,31 @@ export default {
|
|
|
"
|
|
|
></query>
|
|
|
<el-table :data="tableList" v-loading="loading">
|
|
|
- <!-- <el-table-column
|
|
|
- label="采购单号"
|
|
|
- align="left"
|
|
|
- prop="code"
|
|
|
- width="150"
|
|
|
- /> -->
|
|
|
- <!-- <el-table-column label="供应商" align="left" prop="supplierName" /> -->
|
|
|
-
|
|
|
- <el-table-column
|
|
|
- label="产品名称"
|
|
|
- align="left"
|
|
|
- prop="productName"
|
|
|
- width="100"
|
|
|
- />
|
|
|
- <el-table-column label="退货数量" align="left" prop="sum" width="100" />
|
|
|
- <el-table-column label="仓库名称" align="left" prop="sum" width="100" />
|
|
|
- <el-table-column
|
|
|
- label="物流公司"
|
|
|
- align="left"
|
|
|
- prop="logisticsCompanyName"
|
|
|
- width="100"
|
|
|
- />
|
|
|
- <el-table-column
|
|
|
- label="物流/快递单号"
|
|
|
- align="left"
|
|
|
- prop="logisticsInfoCode"
|
|
|
- />
|
|
|
- <!-- <el-table-column
|
|
|
- label="采购员"
|
|
|
- align="left"
|
|
|
- prop="createUserName"
|
|
|
- width="100"
|
|
|
- /> -->
|
|
|
- <el-table-column
|
|
|
- label="采购时间"
|
|
|
- align="left"
|
|
|
- prop="createTime"
|
|
|
- width="150"
|
|
|
- />
|
|
|
- <!-- <el-table-column label="调入仓库" align="left" prop="warehouseName" /> -->
|
|
|
+ <el-table-column label="仓库名称" align="left" prop="warehouseName" />
|
|
|
+ <el-table-column label="退货时间" align="left" prop="createTime" />
|
|
|
+ <el-table-column label="物流单号" align="left" prop="waybill">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- class="show_underline" -->
|
|
|
+ <div>
|
|
|
+ {{ scope.row.waybill }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="状态"
|
|
|
align="left"
|
|
|
- prop="status"
|
|
|
+ prop="qualityStatus"
|
|
|
width="100"
|
|
|
- :formatter="(row) => dictDataEcho(row.status, qualityStatusList)"
|
|
|
+ :formatter="
|
|
|
+ (row) => dictDataEcho(row.qualityStatus, qualityStatusList)
|
|
|
+ "
|
|
|
/>
|
|
|
<el-table-column label="操作" align="center" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="handleReceive(scope.row)"
|
|
|
- v-if="scope.row.status < 3"
|
|
|
+ v-if="scope.row.qualityStatus < 3"
|
|
|
>质检
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -255,12 +184,14 @@ export default {
|
|
|
width="80%"
|
|
|
top="60px"
|
|
|
>
|
|
|
- <add-inspection
|
|
|
+ <add-return-goods
|
|
|
:form="form"
|
|
|
+ showType="details"
|
|
|
+ :isTest="true"
|
|
|
@submit="handleSubmit"
|
|
|
@cancel="handleCancel"
|
|
|
- ref="addInspection"
|
|
|
- ></add-inspection>
|
|
|
+ ref="addReturnGoods"
|
|
|
+ ></add-return-goods>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|