获取数据接口

master
zhangdi 3 months ago
parent 5cc1ec6c8d
commit 860caf69d5
  1. 10
      src/views/firstOrder/components/inDialog.vue
  2. 55
      src/views/firstOrder/components/outDialog.vue
  3. 12
      src/views/secondOrder/components/inDialog.vue
  4. 32
      src/views/secondOrder/components/outDialog.vue

@ -567,6 +567,8 @@ import {
editList,
getStatistics,
} from "@/api/firstOrder/inbound";
import { mapGetters } from "vuex";
export default {
props: {
repairVisible: {
@ -608,10 +610,7 @@ export default {
quarterName: "",
purchaseEndInfo: "", //
userInfoVO: {
userId: "用户ID",
name: "用户名称",
mainErDepartment: "1",
mainErDepartmentName: "主管部门名称",
},
ldOnePutStorageDetailVOList: [], //
},
@ -624,6 +623,7 @@ export default {
};
},
computed: {
...mapGetters(["userInfo"]),
inDate() {
const now = new Date();
const year = now.getFullYear();
@ -644,6 +644,7 @@ export default {
}
this.getBatchOptions();
this.getMaterialList();
this.sizeForm.userInfoVO = this.userInfo;
},
methods: {
//
@ -979,6 +980,7 @@ export default {
this.sizeForm.option = "";
}
try {
const res = await submitData(this.sizeForm);
if (res.data.success) {
this.$message({

@ -199,7 +199,7 @@
<el-table-column prop="theOutboundQuantity" label="本次出库数量">
<template slot-scope="scope">
<div v-if="outDialogType != 'details'">
<el-input-number
<el-input-number
size="mini"
v-model="scope.row.theOutboundQuantity"
:min="0"
@ -208,13 +208,12 @@
:disabled="outDialogType == 'details'"
v-if="
sizeForm.optionType === 'YH' ||
(sizeForm.options==1&&inBatchForm.optionType === 'YH')
(sizeForm.options == 1 && inBatchForm.optionType === 'YH')
"
></el-input-number>
<span v-else>{{scope.row.outboundQuantity}}</span>
<span v-else>{{ scope.row.outboundQuantity }}</span>
</div>
<span v-else>{{scope.row.outboundQuantity}}</span>
<span v-else>{{ scope.row.outboundQuantity }}</span>
</template>
</el-table-column>
<el-table-column
@ -224,13 +223,13 @@
v-if="outDialogType != 'details'"
>
<template slot-scope="scope">
<el-button
type="text"
size="mini"
@click="handleDelete(scope.$index, scope.row)"
>
删除
</el-button>
<el-button
type="text"
size="mini"
@click="handleDelete(scope.$index, scope.row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -380,7 +379,6 @@
<el-radio-group
v-model="inBatchForm.optionType"
:disabled="outDialogType == 'details'"
>
<el-radio label="YH">易耗品</el-radio>
<el-radio label="NY">耐用品</el-radio>
@ -433,6 +431,8 @@ import {
import consumableDialog from "./consumableDialog.vue";
import batchSelectionDialog from "./batchSelectionDialog.vue";
import { getStatistics } from "@/api/firstOrder/inbound";
import { mapGetters } from "vuex";
export default {
components: {
consumableDialog,
@ -487,12 +487,7 @@ export default {
materialType: "1", //
status: "", //1 2
// materialld: '',//Id
userInfoVO: {
userId: "用户ID",
name: "用户名称",
mainErDepartment: "1",
mainErDepartmentName: "主管部门名称",
},
userInfoVO: {},
},
// inTableData: [],
inBatchDialogVisible: false, //
@ -508,6 +503,7 @@ export default {
};
},
computed: {
...mapGetters(["userInfo"]),
outDate() {
const now = new Date();
const year = now.getFullYear();
@ -524,6 +520,7 @@ export default {
this.inInit();
}
this.getDetailedItems();
this.sizeForm.userInfoVO = this.userInfo;
// this.getMaterialList()
},
methods: {
@ -572,15 +569,18 @@ export default {
//
if (
(this.sizeForm.options == 1 &&
this.inBatchForm.optionType == "NY")||(this.sizeForm.options == 2 &&
this.sizeForm.optionType == "NY")
this.inBatchForm.optionType == "NY") ||
(this.sizeForm.options == 2 && this.sizeForm.optionType == "NY")
) {
const detailList = this.sizeForm.inTableData.filter(
(item) =>
item.materialCode === stat.materialCode &&
item.materialName === stat.materialName
);
detail.theOutboundQuantity = detailList.reduce((acc, cur) => acc + cur.num, 0);
detail.theOutboundQuantity = detailList.reduce(
(acc, cur) => acc + cur.num,
0
);
}
return {
@ -947,8 +947,11 @@ export default {
this.sizeForm.outDate = ldOneOutStorage.outDate;
this.sizeForm.options = Number(ldOneOutStorage.options);
this.sizeForm.optionType = ldOneOutStorage.optionType;
this.batchSelectionVisible = false
console.log( res.data.result.ldOneOutStorageDetails, "this.sizeForm.options");
this.batchSelectionVisible = false;
console.log(
res.data.result.ldOneOutStorageDetails,
"this.sizeForm.options"
);
this.$set(
this.sizeForm,
"inTableData",
@ -1019,7 +1022,7 @@ export default {
padding-right: 10px;
}
::v-deep.el-table th.el-table__cell {
background: #F5F7FA;
font-weight: 500;
background: #f5f7fa;
font-weight: 500;
}
</style>

@ -88,6 +88,8 @@
</template>
<script>
import { getDetails, submit } from "@/api/secondOrder/inbound";
import { mapGetters } from "vuex";
export default {
props: {
repairVisible: {
@ -121,10 +123,12 @@ export default {
waNmae: "", //
argument: "", //
inTableData: [],
userInfoVO: {},
},
};
},
computed: {
...mapGetters(["userInfo"]),
inDate() {
const now = new Date();
const year = now.getFullYear();
@ -135,11 +139,13 @@ export default {
},
mounted() {
this.inDialogVisible = this.repairVisible;
this.sizeForm.userInfoVO = this.userInfo;
if (this.inDialogType == "add") {
this.addInit();
} else {
this.inInit();
}
},
methods: {
inInit() {
@ -172,7 +178,7 @@ export default {
userInfoVO: {
userId: "87",
name: "张迪",
department:'部门一',
department: "部门一",
},
};
submit(query).then((res) => {
@ -193,7 +199,7 @@ export default {
padding: 18px 0;
}
::v-deep.el-table th.el-table__cell {
background: #F5F7FA;
font-weight: 500;
background: #f5f7fa;
font-weight: 500;
}
</style>

@ -135,7 +135,12 @@
</el-row>
<div class="form-title">{{ outDateInfo }} 出库信息</div>
<div v-if="sizeForm.ldTwoOutStorage.groupName != null">
<el-table :data="groupTableData" style="width: 100%" border ref="groupTable">
<el-table
:data="groupTableData"
style="width: 100%"
border
ref="groupTable"
>
<!-- 展开行详情 -->
<el-table-column type="expand">
<template slot-scope="props">
@ -202,9 +207,7 @@
style="width: 100%"
ref="table"
>
<el-table-column
type="expand"
>
<el-table-column type="expand">
<template slot-scope="props">
<el-table
:data="scope.row.twoInventoryVOList"
@ -375,6 +378,8 @@ import {
getOutGroupName,
getGroupMaterial,
} from "@/api/secondOrder/outbound";
import { mapGetters } from "vuex";
export default {
components: {
categoryDialog,
@ -402,6 +407,7 @@ export default {
},
},
computed: {
...mapGetters(["userInfo"]),
outDateInfo() {
const now = new Date();
const year = now.getFullYear();
@ -446,13 +452,7 @@ export default {
},
ldTwoOutStorageDetailList: [], //
inAccountsTableData: [], //
userInfoVO: {
//
userId: "user001",
name: "张三2",
mainErDepartment: "20",
mainErDepartmentName: "实业公司",
},
userInfoVO: {},
},
rules: {
ldTwoOutStorage: {
@ -505,7 +505,7 @@ export default {
} else {
this.inInit();
}
this.sizeForm.userInfoVO = this.userInfo;
this.getDetailedItems();
this.getOutGroupName();
},
@ -537,12 +537,10 @@ export default {
//
this.sizeForm.ldTwoOutStorageDetailList = allDetails;
console.log(this.sizeForm.ldTwoOutStorageDetailList,'批量数据');
console.log(this.sizeForm.ldTwoOutStorageDetailList, "批量数据");
//
this.getStatistics();
},
groupNameChange() {
if (this.sizeForm.ldTwoOutStorage.groupName != null) {
@ -772,7 +770,7 @@ export default {
/* 预留滚动条空间 */
}
::v-deep.el-table th.el-table__cell {
background: #F5F7FA;
font-weight: 500;
background: #f5f7fa;
font-weight: 500;
}
</style>

Loading…
Cancel
Save