样式调整

master
taozi 3 months ago
parent 9df6167a42
commit 6449275882
  1. 30
      src/views/firstOrder/components/recordDialog.vue
  2. 2
      src/views/firstOrder/list.vue
  3. 19
      src/views/materials/expend.vue
  4. 6
      src/views/secondOrder/components/approvalProcessDialog.vue
  5. 1
      src/views/secondOrder/components/categoryDialog.vue
  6. 99
      src/views/secondOrder/components/outDialog.vue

@ -10,18 +10,22 @@
<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"
v-model:page="page"
@on-load="onLoad"
@current-change="currentChange"
@size-change="sizeChange"
@search-change="searchChange"
@search-reset="searchReset"
:page.sync="page"
></avue-crud>
<div style="display:flex; flex-direction:column; height:400px;">
<avue-crud
:data="data"
:option="dynamicOption"
v-model:page="page"
@on-load="onLoad"
@current-change="currentChange"
@size-change="sizeChange"
@search-change="searchChange"
@search-reset="searchReset"
:page.sync="page"
pagination-position="bottom"
:pagination-fixed="true"
:pagination-scroll="true"
style="flex:1; overflow:auto;"
></avue-crud>
</div>
</el-dialog>
</template>
@ -176,4 +180,4 @@ export default {
},
},
};
</script>
</script>

@ -7,7 +7,7 @@
@refresh-change="refreshChange" @on-load="onLoad">
<template slot-scope="scope" slot="menu">
<el-button type="text" size="small" @click.stop="handleLog(scope.row)">记录
<el-button type="text" @click.stop="handleLog(scope.row)">记录
</el-button>
</template>

@ -145,10 +145,10 @@ export default {
{
label: "类别",
prop: "type",
type: "select",
headerAlign: "center",
align: "center",
type: "select",
dicDta: [
dicData: [
{
label: "易耗品",
value: "YH",
@ -215,18 +215,9 @@ export default {
activeName: "first",
tableData: [],
ckTable: [
{ str1: "3", str2: "2025-04-09", str3: "部门一" },
{ str1: "37", str2: "2025-04-03", str3: "部门一" },
],
rkTable: [
{ str1: "5", str2: "2025-03-19", str3: "部门二" },
{ str1: "12", str2: "2025-03-19", str3: "部门二" },
],
bfTable: [
{ str1: "9", str2: "2025-03-19", str3: "部门三" },
{ str1: "19", str2: "2025-03-19", str3: "部门三" },
],
ckTable: [],
rkTable: [],
bfTable: [],
};
},

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

@ -262,6 +262,7 @@ export default {
//
handleConfirm() {
const uniqueList = this.uniqueById(this.allSelectedList);
console.log(uniqueList, 'uniqueList----')
this.$emit("confirm", uniqueList);
this.allSelectedList = []
},

@ -79,7 +79,11 @@
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="num" label="数量">
<template slot-scope="scope">
<el-input-number size="mini" v-model="scope.row.num" :min="0" style="width: 100%"
<el-input-number size="mini" v-model="scope.row.num"
:min="0"
:max="getMaxQuantity(scope.row)"
style="width: 100%"
:disabled="outDialogType != 'add' || scope.row.type === 'NY'" @change="
(newValue) => handleQuantityChange(newValue, scope.$index)
"></el-input-number>
@ -105,7 +109,17 @@
<el-table-column prop="materialName" label="名称">
</el-table-column>
<el-table-column prop="model" label="规格"> </el-table-column>
<el-table-column prop="type" label="类别"> </el-table-column>
<el-table-column prop="type" label="类别">
<template slot-scope="scope">
{{
scope.row.type === "NY"
? "耐用品"
: scope.row.type === "YH"
? "易耗品"
: ""
}}
</template>
</el-table-column>
<el-table-column prop="unit" label="单位"> </el-table-column>
<el-table-column prop="num" label="数量"> </el-table-column>
</el-table-column>
@ -303,9 +317,16 @@ export default {
});
});
},
//
getMaxQuantity(row) {
const stockInfo = this.statisticsList.find(stat => stat.materialCode === row.materialCode)
if (row.type === 'NY') {
return 1
} else {
return stockInfo ? stockInfo.num : 999999;
}
},
categoryHandle() {
if ((!this.sizeForm.ldTwoOutStorage.proposerInfo) || (!this.sizeForm.ldTwoOutStorage.departmentInfo)) {
this.$message.error('请先选择部门和领用人');
return false
@ -313,9 +334,25 @@ export default {
this.categoryVisible = true;
},
confirm(allSelectedList) {
this.selectionData = allSelectedList
//
const existingQuantities = {};
this.sizeForm.ldTwoOutStorageDetailList.forEach(item => {
existingQuantities[item.id] = item.num
})
const updatedList = allSelectedList.map(item => {
const existingNum = existingQuantities[item.id];
if (existingNum !== undefined) {
return {
...item,
num: existingNum
};
}
return item;
});
this.selectionData = updatedList;
this.categoryVisible = false;
this.sizeForm.ldTwoOutStorageDetailList = allSelectedList;
this.sizeForm.ldTwoOutStorageDetailList = updatedList;
this.getStatistics();
},
//
@ -329,43 +366,17 @@ export default {
JSON.stringify(this.sizeForm.ldTwoOutStorageDetailList)
);
},
handleQuantityChange(newValue, index) {
console.log(newValue,'点击数量变化数量的值')
const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index];
// selectionDataselectionData
const selectionItem = this.selectionData[index]; // selectionItem
if (!currentRow) return;
//
if (currentRow.type === "NY") {
currentRow.num = 1;
this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
return;
}
//
if (selectionItem && newValue > selectionItem.num) {
this.$message.warning(`出库数量不能超过库存数量【${selectionItem.num}】!`);
//
currentRow.num = selectionItem.num;
this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
this.getStatistics();
return;
}
// selectionData
const stockNum = selectionItem ? selectionItem.num : currentRow.oldNum || currentRow.num;
currentRow.oldNum = stockNum; //
currentRow.num = newValue; //
currentRow.newNum = stockNum - newValue; //
this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
this.getStatistics();
},
handleQuantityChange(newValue, index) {
console.log(newValue, '点击数量变化数量的值')
const currentRow = this.sizeForm.ldTwoOutStorageDetailList[index];
if (!currentRow) return;
//
currentRow.num = newValue;
this.$set(this.sizeForm.ldTwoOutStorageDetailList, index, currentRow);
this.$set(this.sizeForm.inAccountsTableData, index, { ...currentRow });
this.getStatistics()
},
//
updateGlobalTotal() {
@ -499,4 +510,4 @@ export default {
padding-right: 10px;
/* 预留滚动条空间 */
}
</style>
</style>
Loading…
Cancel
Save