|
@@ -3,14 +3,20 @@
|
|
|
import query from "@/components/query/index.vue";
|
|
|
import OrderDetails from "@/components/order/details.vue";
|
|
|
import PurchaseDetails from "@/components/purchase/details.vue";
|
|
|
+import sendGoods from "@/components/purchase/sendGoods.vue";
|
|
|
|
|
|
import * as API from "@/api/order-management/JDReturnGoods/index.js";
|
|
|
+import {
|
|
|
+ logisticsSelectData,
|
|
|
+ arrivalNotice,
|
|
|
+} from "@/api/purchase-management/deliver-goods/index.js";
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
query,
|
|
|
OrderDetails,
|
|
|
PurchaseDetails,
|
|
|
+ sendGoods,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -40,6 +46,18 @@ export default {
|
|
|
detailsText: "",
|
|
|
selectOrderId: "",
|
|
|
rowData: {},
|
|
|
+ openArrive: false,
|
|
|
+ arriveForm: {},
|
|
|
+ arriveFormRules: {
|
|
|
+ id: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请选择物流/快递单号",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ logisticsData: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -52,6 +70,7 @@ export default {
|
|
|
this.logisticsStatusList = businessDictData.find(
|
|
|
(item) => item.code === "logisticsStatus"
|
|
|
).children;
|
|
|
+ console.log(this.logisticsStatusList, "assss");
|
|
|
this.selectConfig[0].data = this.logisticsDataSourceList.map((item) => ({
|
|
|
label: item.dictValue,
|
|
|
value: item.dictKey,
|
|
@@ -77,13 +96,14 @@ export default {
|
|
|
this.getList();
|
|
|
},
|
|
|
async lookProgress(row) {
|
|
|
+ this.msgSuccess("数据请求中,请稍后!");
|
|
|
this.titleText = "查看物流";
|
|
|
const { data } = await API.queryStatus({ id: row.id });
|
|
|
- if (data.data.length > 0) {
|
|
|
- this.activities = data.data;
|
|
|
+ if (data.data.data.length > 0) {
|
|
|
+ this.activities = data.data.data;
|
|
|
this.open = true;
|
|
|
} else {
|
|
|
- this.msgInfo(data.message);
|
|
|
+ this.msgInfo("查询无结果,请隔段时间再查");
|
|
|
}
|
|
|
},
|
|
|
lookDetails(row) {
|
|
@@ -105,10 +125,17 @@ export default {
|
|
|
this.detailsDialog = true;
|
|
|
},
|
|
|
showStatus(row) {
|
|
|
+ // 有此判断原因:业务字典键值无法设置为 -1
|
|
|
if (row.logisticsStatus === -1) {
|
|
|
return "异常";
|
|
|
} else {
|
|
|
- return this.dictDataEcho(row.logisticsStatus, logisticsStatusList);
|
|
|
+ const current = this.logisticsStatusList.find(
|
|
|
+ (x) => x.dictKey == row.logisticsStatus
|
|
|
+ );
|
|
|
+
|
|
|
+ if (current) {
|
|
|
+ return current.dictValue;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
handleUpdate(row) {
|
|
@@ -123,6 +150,39 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ handleArrive(row) {
|
|
|
+ this.openArrive = true;
|
|
|
+ this.arriveForm = {
|
|
|
+ code: row.businessCode,
|
|
|
+ supplierName: row.supplierName,
|
|
|
+ purchaseId: row.businessId,
|
|
|
+ id: "",
|
|
|
+ };
|
|
|
+ logisticsSelectData({ businessId: row.businessId }).then(
|
|
|
+ (res) => {
|
|
|
+ this.logisticsData = res.data.data;
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log("logisticsSelectData: " + err);
|
|
|
+ }
|
|
|
+ );
|
|
|
+ },
|
|
|
+ handleSubmit1() {
|
|
|
+ this.$refs.arriveForm.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ delete this.arriveForm.code;
|
|
|
+ delete this.arriveForm.supplierName;
|
|
|
+ arrivalNotice(this.arriveForm).then(() => {
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
+ this.getList();
|
|
|
+ this.handleCancel1();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleCancel1() {
|
|
|
+ this.openArrive = false;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -173,7 +233,7 @@ export default {
|
|
|
</div>
|
|
|
</template></el-table-column
|
|
|
>
|
|
|
- <el-table-column label="操作" align="center" width="100">
|
|
|
+ <el-table-column label="操作" align="center" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
type="text"
|
|
@@ -182,6 +242,13 @@ export default {
|
|
|
>
|
|
|
更新状态
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ @click="handleArrive(scope.row)"
|
|
|
+ v-if="scope.row.businessType === 1"
|
|
|
+ >
|
|
|
+ 到货通知
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -207,7 +274,7 @@ export default {
|
|
|
:key="index"
|
|
|
:timestamp="activity.ftime"
|
|
|
>
|
|
|
- {{ activity.content }}
|
|
|
+ {{ activity.context }}
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</el-dialog>
|
|
@@ -225,6 +292,68 @@ export default {
|
|
|
></OrderDetails>
|
|
|
<PurchaseDetails :rowData="rowData" v-if="rowData.id"></PurchaseDetails>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="到货通知"
|
|
|
+ :visible.sync="openArrive"
|
|
|
+ v-if="openArrive"
|
|
|
+ width="30%"
|
|
|
+ top="60px"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ label-position="top"
|
|
|
+ :model="arriveForm"
|
|
|
+ ref="arriveForm"
|
|
|
+ :rules="arriveFormRules"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="采购单号" prop="code">
|
|
|
+ <el-input
|
|
|
+ v-model="arriveForm.code"
|
|
|
+ placeholder="请输入"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <!-- <el-form-item label="供应商" prop="supplierName">
|
|
|
+ <el-input
|
|
|
+ v-model="arriveForm.supplierName"
|
|
|
+ placeholder="请输入"
|
|
|
+ disabled
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="物流/快递单号" prop="id">
|
|
|
+ <el-select
|
|
|
+ v-model="arriveForm.id"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <!-- :disabled="logisticsData.length === 0" -->
|
|
|
+ <el-option
|
|
|
+ v-for="item in logisticsData"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.code"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div style="text-align: center; margin-top: 15px">
|
|
|
+ <el-button size="small" @click="handleCancel1">取消 </el-button>
|
|
|
+ <el-button type="primary" size="small" @click="handleSubmit1">
|
|
|
+ 确定</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</el-card>
|
|
|
</template>
|
|
|
|