|
@@ -259,9 +259,14 @@ const materialList = ref<any[]>([]);
|
|
|
|
|
|
const boxInputValue = ref("");
|
|
|
const enterBoxInput = () => {
|
|
|
- currentBox.value = currentBox.value.trim();
|
|
|
- getBoxDetailByLabel(currentBox.value).then((res: any) => {
|
|
|
- toSendBoxInfo.value = res.data;
|
|
|
+ boxInputValue.value = boxInputValue.value.trim();
|
|
|
+ getBoxDetailByLabel(boxInputValue.value).then((res: any) => {
|
|
|
+ toSendBoxInfo.value = {
|
|
|
+ vehicleName: res.data.name,
|
|
|
+ vehicleCode: res.data.code,
|
|
|
+ vehicleId: res.data.id,
|
|
|
+ };
|
|
|
+ boxInputValue.value = "";
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -335,22 +340,23 @@ const createTask = () => {
|
|
|
const params = {
|
|
|
circulationDetail: [...materialList.value],
|
|
|
// coordinate: "",
|
|
|
- houseNo: outingBox.value.houseNo,
|
|
|
+ // houseNo: outingBox.value.houseNo,
|
|
|
// locationNo: "",
|
|
|
stationId: currentDestination.value.id,
|
|
|
targetType: currentDestination.value.targetType,
|
|
|
- vehicleCode: outingBox.value.vehicleCode,
|
|
|
- vehicleId: outingBox.value.vehicleId,
|
|
|
- vehicleName: outingBox.value.vehicleName,
|
|
|
+ vehicleCode: toSendBoxInfo.value.vehicleCode,
|
|
|
+ vehicleId: toSendBoxInfo.value.vehicleId,
|
|
|
+ vehicleName: toSendBoxInfo.value.vehicleName,
|
|
|
};
|
|
|
|
|
|
addMaterialFlow(params).then((res: any) => {
|
|
|
ElMessage.success(res.msg ?? "派发成功");
|
|
|
- // currentBox.value = {};
|
|
|
- // currentBoxIndex.value = -1;
|
|
|
- // boxSearch.value = "";
|
|
|
- // outingBox.value = {};
|
|
|
- // outingMaterials.value = [];
|
|
|
+ currentBox.value = {};
|
|
|
+ currentBoxIndex.value = -1;
|
|
|
+ boxSearch.value = "";
|
|
|
+ outingBox.value = {};
|
|
|
+ outingMaterials.value = [];
|
|
|
+ toSendBoxInfo.value = {};
|
|
|
materialList.value = [];
|
|
|
currentDestination.value = {};
|
|
|
currentDestinationIndex.value = -1;
|