Compare commits

..

No commits in common. '0a87bed0eebdc8b2118ebf87890064189260e785' and 'b9b5dcbaa9804f42bada18b9ee0ff3b22bd73cfc' have entirely different histories.

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

@ -594,22 +594,20 @@ 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()
@ -620,7 +618,7 @@ export default {
selectionChange(row) {
this.batchSelectionVisible = false;
this.sizeForm.inTableData = row;
this.getStatistics();
this.getStatistics();
},
confirm(allSelectedList) {
this.consumableVisible = false;

@ -5,12 +5,13 @@
: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"
@ -22,7 +23,6 @@
@search-reset="searchReset"
:page.sync="page"
></avue-crud>
</div>
</el-dialog>
</template>
@ -44,7 +44,7 @@ export default {
data() {
return {
openShow: false,
transactionType: "2",
transactionType: "1",
tableData: [],
purchaseTitle: "记录",
data: [],

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

@ -76,14 +76,12 @@ 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: "物资编码",
@ -97,14 +95,12 @@ 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,6 +41,7 @@
<script>
import { getList } from "@/api/secondOrder/list.js";
import { getList as fetchDurableApi } from "@/api/materials/expend";
export default {
props: {
categoryVisible: {
@ -52,7 +53,7 @@ export default {
default: "",
},
departmentId: {
type: String,
type: [String, Number],
default: "",
},
selectionData: {
@ -195,18 +196,26 @@ export default {
//
updateCurrentPageSelection() {
if (!this.$refs.crud || !this.data) return;
this.isUpdatingSelection = true;
const currentPageData = this.data || [];
//
this.$refs.crud.toggleSelection();
console.log(this.allSelectedList,'勾选状态数据')
// 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;
@ -216,55 +225,66 @@ 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 = 1
item.num = 0
})
// 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) {
@ -316,7 +336,7 @@ export default {
})
.finally(() => {
this.loading = false;
})
});
},
handleCancel() {

@ -411,9 +411,27 @@ export default {
this.categoryVisible = true;
},
confirm(allSelectedList) {
this.selectionData = allSelectedList
console.log("allSelectedList-------", allSelectedList);
// this.selectionData = allSelectedList
allSelectedList.map((item) => {
this.selectionData.push(item);
});
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