二级出库勾选调整

master
taozi 3 months ago
parent 5fab6cdd98
commit f15747ff8d
  1. 9
      src/views/firstOrder/components/approvalProcessDialog.vue
  2. 16
      src/views/firstOrder/components/outDialog.vue
  3. 6
      src/views/firstOrder/components/recordDialog.vue
  4. 4
      src/views/firstOrder/inbound.vue
  5. 4
      src/views/materials/index.vue
  6. 52
      src/views/secondOrder/components/categoryDialog.vue
  7. 20
      src/views/secondOrder/components/outDialog.vue

@ -89,9 +89,16 @@ export default {
}
.teps-con {
margin: 0 auto 0
margin: 0 auto 0;
:deep(.el-step) {
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
}
}
// :deep(.el-dialog__body) {
// height: 300px;
// }

@ -594,20 +594,22 @@ export default {
},
getStatistics() {
getStatistics(this.sizeForm.inTableData).then((res) => {
this.statisticsList = res.data.result;
this.statisticsList = res.data.result
this.statisticsList = this.statisticsList.map((stat) => {
const detail = this.sizeForm.inTableData.find(
(item) => item.materialCode === stat.materialCode
);
console.log("detail", detail, stat);
)
console.log("detail", detail, stat)
return {
...stat,
theOutboundQuantity: detail.theOutboundQuantity, //
unitPrice: detail.unitPrice,
totalQuantity: stat.num - detail.theOutboundQuantity,
};
});
});
department: detail.department, // ID
departmentName: detail.departmentName || this.getDepartmentName(detail.department),
}
})
})
},
changeDepartment(){
this.getStatistics()
@ -618,7 +620,7 @@ export default {
selectionChange(row) {
this.batchSelectionVisible = false;
this.sizeForm.inTableData = row;
this.getStatistics();
this.getStatistics();
},
confirm(allSelectedList) {
this.consumableVisible = false;

@ -5,13 +5,12 @@
:visible.sync="openShow"
width="50%"
@close="closeDialog"
:style="{ height: '600px' }"
>
<el-tabs v-model="transactionType" @tab-click="handleTabClick">
<el-tab-pane label="入库" name="2"></el-tab-pane>
<el-tab-pane label="出库" name="1"></el-tab-pane>
</el-tabs>
<div style="height: 400px; overflow: hidden;">
<avue-crud
:data="data"
:option="dynamicOption"
@ -23,6 +22,7 @@
@search-reset="searchReset"
:page.sync="page"
></avue-crud>
</div>
</el-dialog>
</template>
@ -44,7 +44,7 @@ export default {
data() {
return {
openShow: false,
transactionType: "1",
transactionType: "2",
tableData: [],
purchaseTitle: "记录",
data: [],

@ -236,6 +236,10 @@ export default {
label: "已审批",
value: 3,
},
{
label: "审批失败",
value: 4,
},
],
},
],

@ -76,12 +76,14 @@ export default {
search: true,
headerAlign: "center",
align: "center",
rules: [{ required: true, message: "请输入物资名称", trigger: "blur" }]
},
{
label: "规格/型号",
prop: "model",
headerAlign: "center",
align: "center",
rules: [{ required: true, message: "请输入规格/型号", trigger: "blur" }]
},
{
label: "物资编码",
@ -95,12 +97,14 @@ export default {
value: "value",
},
dataType: "string",
rules: [{ required: true, message: "请选择物资编码", trigger: "change" }]
},
{
label: "单位",
prop: "unit",
headerAlign: "center",
align: "center",
rules: [{ required: true, message: "请输入单位", trigger: "blur" }]
},
{
label: "描述",

@ -41,7 +41,6 @@
<script>
import { getList } from "@/api/secondOrder/list.js";
import { getList as fetchDurableApi } from "@/api/materials/expend";
export default {
props: {
categoryVisible: {
@ -53,7 +52,7 @@ export default {
default: "",
},
departmentId: {
type: [String, Number],
type: String,
default: "",
},
selectionData: {
@ -196,26 +195,18 @@ export default {
//
updateCurrentPageSelection() {
if (!this.$refs.crud || !this.data) return;
this.isUpdatingSelection = true;
const currentPageData = this.data || [];
//
this.$refs.crud.toggleSelection();
// allSelectedList
console.log(this.allSelectedList,'勾选状态数据')
currentPageData.forEach((item) => {
const isSelected = this.allSelectedList.some(
(selectedItem) => selectedItem.id === item.id
);
if (isSelected) {
this.$refs.crud.toggleRowSelection(item, true);
}
});
//
})
this.$nextTick(() => {
setTimeout(() => {
this.isUpdatingSelection = false;
@ -225,66 +216,55 @@ export default {
//
selectionChange(selection,row) {
let isSelectedInfo = selection.filter(
(item) => item.id==row.id
);
if (this.isUpdatingSelection) {
return;
}
// ID
const currentPageIds = this.data.map((item) => item.id);
const otherPageSelected = this.allSelectedList.filter(
(item) => !currentPageIds.includes(item.id)
);
const currentSelected = selection.map((item) => ({
...item,
twoInventoryId: item.id,
}));
//
const combinedSelection = [
...otherPageSelected, //
...currentSelected, //
];
...otherPageSelected,
...currentSelected,
]
// allSelectedList
this.allSelectedList = this.uniqueById(combinedSelection);
if(isSelectedInfo.length<=0){
this.allSelectedList=this.allSelectedList.filter(
(item) => item.id!==row.id
if(isSelectedInfo.length <= 0){
this.allSelectedList = this.allSelectedList.filter(
(item) => item.id !== row.id
);
}
console.log('isSelectedInfo', this.allSelectedList);
this.allSelectedList.forEach(item=>{
item.num = 0
item.num = 1
})
// console.log("allSelectedList:", this.allSelectedList);
},
//
uniqueById(arr) {
const uniqueObj = {};
arr.forEach((item) => {
if (item.id && !uniqueObj[item.id]) {
uniqueObj[item.id] = item;
uniqueObj[item.id] = item
}
});
return Object.values(uniqueObj);
})
return Object.values(uniqueObj)
},
//
handleConfirm() {
const uniqueList = this.uniqueById(this.allSelectedList);
this.$emit("confirm", uniqueList);
this.allSelectedList = []
},
selectionClear() {
this.allSelectedList = [];
if (this.$refs.crud) {
@ -336,7 +316,7 @@ export default {
})
.finally(() => {
this.loading = false;
});
})
},
handleCancel() {

@ -411,27 +411,9 @@ export default {
this.categoryVisible = true;
},
confirm(allSelectedList) {
console.log("allSelectedList-------", allSelectedList);
// this.selectionData = allSelectedList
allSelectedList.map((item) => {
this.selectionData.push(item);
});
this.selectionData = allSelectedList
this.categoryVisible = false;
//
const newItems = allSelectedList.filter(
(newItem) =>
!this.sizeForm.ldTwoOutStorageDetailList.some(
(oldItem) => oldItem.id === newItem.id
)
);
//
this.sizeForm.ldTwoOutStorageDetailList = allSelectedList;
console.log(
"ldTwoOutStorageDetailList--------",
this.sizeForm.ldTwoOutStorageDetailList
);
//
// this.summaryTableData();
this.getStatistics();
},
//

Loading…
Cancel
Save