获取数据接口

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

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

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

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

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

Loading…
Cancel
Save