|
@@ -67,6 +67,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
selectData: [],
|
|
|
+ logisticsData: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -77,7 +78,7 @@ export default {
|
|
|
(item) => item.code === "purchaseStatus"
|
|
|
).children;
|
|
|
this.selectConfig[0].data = this.purchaseStatusList
|
|
|
- .filter((x) => Number(x.dictKey) > 20)
|
|
|
+ .filter((x) => Number(x.dictKey) > 2)
|
|
|
.map((item) => ({
|
|
|
label: item.dictValue,
|
|
|
value: item.dictKey,
|
|
@@ -113,10 +114,12 @@ export default {
|
|
|
},
|
|
|
handleSend(row) {
|
|
|
this.form = {
|
|
|
- businessId: "",
|
|
|
+ businessId: row.id,
|
|
|
businessType: "1",
|
|
|
logisticsCompanyCode: "",
|
|
|
code: "",
|
|
|
+ puCode: row.code,
|
|
|
+ supplierName: row.supplierName,
|
|
|
details: [],
|
|
|
fileInfos: [],
|
|
|
};
|
|
@@ -124,9 +127,16 @@ export default {
|
|
|
this.open = true;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.sendGoods.loading = true;
|
|
|
- API.logisticsSelectData({ id: row.id }).then(
|
|
|
+ API.purchaseDetails({ id: row.id }).then(
|
|
|
(res) => {
|
|
|
- console.log(res, "aa");
|
|
|
+ this.form.details = res.data.data.goodsList.map((x) => ({
|
|
|
+ goodsCode: x.goodsCode,
|
|
|
+ goodsName: x.goodsName,
|
|
|
+ quantity: x.quantity,
|
|
|
+ purchaseId: row.id,
|
|
|
+ applyPurchaseId: x.id,
|
|
|
+ shipmentQuantity: "",
|
|
|
+ }));
|
|
|
this.$refs.sendGoods.loading = false;
|
|
|
},
|
|
|
(err) => {
|
|
@@ -134,6 +144,18 @@ export default {
|
|
|
}
|
|
|
);
|
|
|
});
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.sendGoods.loading = true;
|
|
|
+ // API.logisticsSelectData({ id: row.id }).then(
|
|
|
+ // (res) => {
|
|
|
+ // console.log(res, "aa");
|
|
|
+ // this.$refs.sendGoods.loading = false;
|
|
|
+ // },
|
|
|
+ // (err) => {
|
|
|
+ // this.$refs.sendGoods.loading = false;
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // });
|
|
|
},
|
|
|
|
|
|
handleCancel() {
|
|
@@ -163,18 +185,21 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
handleArrive(row) {
|
|
|
+ API.logisticsSelectData({ id: row.id }).then(
|
|
|
+ (res) => {
|
|
|
+ this.logisticsData = res.data.data;
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log("logisticsSelectData: " + err);
|
|
|
+ }
|
|
|
+ );
|
|
|
this.titleText = "到货通知";
|
|
|
this.openArrive = true;
|
|
|
- // this.$confirm('是否确认此操作 ?', {
|
|
|
- // confirmButtonText: '确定',
|
|
|
- // cancelButtonText: '取消',
|
|
|
- // type: "warning",
|
|
|
- // }).then(() => {
|
|
|
- // API.completePurchase({ id: row.id }).then(() => {
|
|
|
- // this.msgSuccess('删除成功');
|
|
|
- // this.getList();
|
|
|
- // });
|
|
|
- // });
|
|
|
+ this.arriveForm = {
|
|
|
+ code: row.code,
|
|
|
+ supplierName: row.supplierName,
|
|
|
+ id: "",
|
|
|
+ };
|
|
|
},
|
|
|
handlePurchaseEnd(row) {
|
|
|
this.$confirm("是否确定此操作 ?", {
|
|
@@ -261,7 +286,7 @@ export default {
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="供应商" align="left" prop="price" />
|
|
|
+ <el-table-column label="供应商" align="left" prop="supplierName" />
|
|
|
<el-table-column
|
|
|
label="采购总金额"
|
|
|
align="left"
|
|
@@ -286,12 +311,12 @@ export default {
|
|
|
width="120"
|
|
|
:formatter="(row) => dictDataEcho(row.status, purchaseStatusList)"
|
|
|
/>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
label="付款状态"
|
|
|
align="left"
|
|
|
prop="createName"
|
|
|
width="120"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
<el-table-column label="操作" align="center" width="240">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="handleSend(scope.row)">
|
|
@@ -358,9 +383,9 @@ export default {
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-form-item label="供应商" prop="name">
|
|
|
+ <el-form-item label="供应商" prop="supplierName">
|
|
|
<el-input
|
|
|
- v-model="arriveForm.name"
|
|
|
+ v-model="arriveForm.supplierName"
|
|
|
placeholder="请输入"
|
|
|
disabled
|
|
|
></el-input>
|
|
@@ -375,9 +400,9 @@ export default {
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in logisticsData"
|
|
|
- :key="item.code"
|
|
|
- :label="item.name"
|
|
|
- :value="item.code"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.code"
|
|
|
+ :value="item.id"
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|