Compare commits

..

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

  1. 9
      src/views/firstOrder/components/approvalProcessDialog.vue
  2. 14
      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. 46
      src/views/secondOrder/components/categoryDialog.vue
  7. 20
      src/views/secondOrder/components/outDialog.vue

@ -89,15 +89,8 @@ export default {
} }
.teps-con { .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) { // :deep(.el-dialog__body) {
// height: 300px; // height: 300px;

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

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

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

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

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

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

Loading…
Cancel
Save