|
|
@@ -5,30 +5,34 @@
|
|
|
<div style="display: flex;padding-left: 10px">
|
|
|
<h4>1.选择物资柜</h4>
|
|
|
<el-select
|
|
|
- style="width: 215px;margin: 10px 20px;"
|
|
|
- v-model="queryParams.materialsCabinetId"
|
|
|
- placeholder="请选择物资柜"
|
|
|
- @change="handleCabinetChange"
|
|
|
+ style="width: 215px;margin: 10px 20px;"
|
|
|
+ v-model="queryParams.materialsCabinetId"
|
|
|
+ placeholder="请选择物资柜"
|
|
|
+ @change="handleCabinetChange"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="dict in cabinets"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
+ v-for="dict in cabinets"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div style="display: flex;padding-left: 10px">
|
|
|
<h4>2.</h4>
|
|
|
- <el-button @click="changeDoor(true)" style="width:60px;height:30px;padding:5px 8px;margin: 12px 10px">开柜门</el-button>
|
|
|
+ <el-button @click="changeDoor(true)" style="width:60px;height:30px;padding:5px 8px;margin: 12px 10px">开柜门
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div style="display: flex;padding-left: 10px">
|
|
|
<h4>3.取物资/还物资</h4>
|
|
|
-<!-- <el-input v-model="inputStatus" style="width:150px"></el-input>-->
|
|
|
+ <!-- <el-input v-model="inputStatus" style="width:150px"></el-input>-->
|
|
|
</div>
|
|
|
<div style="display: flex;padding-left: 10px">
|
|
|
<h4>4.</h4>
|
|
|
- <el-button :disabled="!doorOpen" @click="changeDoor(false)" style="width:60px;height:30px;padding:5px 8px;margin: 12px 10px">关柜门</el-button>
|
|
|
+ <el-button :disabled="!doorOpen" @click="changeDoor(false)"
|
|
|
+ style="width:60px;height:30px;padding:5px 8px;margin: 12px 10px"
|
|
|
+ >关柜门
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
@@ -37,8 +41,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import Konva from "konva";
|
|
|
+import Konva from 'konva'
|
|
|
import {
|
|
|
+ getExMaterials,
|
|
|
getIsMaterialsCabinets,
|
|
|
listMaterials,
|
|
|
selectMaterialsById,
|
|
|
@@ -56,36 +61,36 @@ export default {
|
|
|
listInCabinet: [], // 存储物资柜内的物资
|
|
|
listOutOfCabinet: [], // 存储物资柜外的物资
|
|
|
cabinets: [], // 物资所属柜
|
|
|
- doorOpen:false,
|
|
|
+ doorOpen: false,
|
|
|
queryParams: {
|
|
|
current: 1,
|
|
|
size: -1,
|
|
|
materialsCabinetId: null,
|
|
|
- loanState:null
|
|
|
+ loanState: null
|
|
|
},
|
|
|
- inputStatus:'当前柜门已关闭',//柜门开关状态
|
|
|
+ inputStatus: '当前柜门已关闭',//柜门开关状态
|
|
|
materialElements: [], // 存储物资图标对象
|
|
|
- materialsToUpdate: [], // 存储需要更新的物资
|
|
|
- };
|
|
|
+ materialsToUpdate: [] // 存储需要更新的物资
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
- this.initKonva();
|
|
|
- this.inputStatus='当前柜门已关闭'
|
|
|
+ this.initKonva()
|
|
|
+ this.inputStatus = '当前柜门已关闭'
|
|
|
this.materialsCabinets()
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
- changeDoor(value){
|
|
|
- this.doorOpen = value;
|
|
|
- if(this.doorOpen){
|
|
|
+ changeDoor(value) {
|
|
|
+ this.doorOpen = value
|
|
|
+ if (this.doorOpen) {
|
|
|
this.$message.success('柜门已打开')
|
|
|
this.updateDraggableStatus()
|
|
|
- this.inputStatus="当前柜门已打开"
|
|
|
- }else {
|
|
|
+ this.inputStatus = '当前柜门已打开'
|
|
|
+ } else {
|
|
|
this.$message.info('柜门已关闭')
|
|
|
- this.inputStatus="当前柜门已关闭"
|
|
|
- this.updateMaterialsBatch(); // 柜门关闭时调用批量更新接口
|
|
|
+ this.inputStatus = '当前柜门已关闭'
|
|
|
+ this.updateMaterialsBatch() // 柜门关闭时调用批量更新接口
|
|
|
}
|
|
|
},
|
|
|
// 获取物资柜信息
|
|
|
@@ -95,52 +100,69 @@ export default {
|
|
|
this.cabinets = response.data.records.map((item) => ({
|
|
|
value: item.cabinetId,
|
|
|
label: item.cabinetName
|
|
|
- }));
|
|
|
+ }))
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
handleCabinetChange() {
|
|
|
// 清空之前渲染的物资元素
|
|
|
- this.clearMaterialsFromLayer();
|
|
|
+ this.clearMaterialsFromLayer()
|
|
|
|
|
|
// 获取柜内和柜外物资
|
|
|
Promise.all([this.getMaterialsInCabinet(), this.getMaterialsOutOfCabinet()])
|
|
|
- .then(() => {
|
|
|
- // 在所有数据获取完成后,统一渲染物资
|
|
|
- this.addMaterialsToLayer();
|
|
|
- });
|
|
|
+ .then(() => {
|
|
|
+ // 在所有数据获取完成后,统一渲染物资
|
|
|
+ this.addMaterialsToLayer()
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- getMaterialsInCabinet() {
|
|
|
+ async getMaterialsInCabinet() {
|
|
|
this.queryParams.loanState = '1'; // 设置查询条件为物资柜内
|
|
|
- return listMaterials(this.queryParams).then((res) => {
|
|
|
- this.listInCabinet = res.data.records;
|
|
|
- });
|
|
|
+
|
|
|
+ try {
|
|
|
+ const res1 = await listMaterials(this.queryParams);
|
|
|
+ this.listInCabinet = res1.data.records;
|
|
|
+
|
|
|
+ const data1 = {
|
|
|
+ materialsCabinetId: this.queryParams.materialsCabinetId
|
|
|
+ };
|
|
|
+
|
|
|
+ const res2 = await getExMaterials(data1);
|
|
|
+ this.listInCabinet = [...this.listInCabinet, ...res2.data];
|
|
|
+ console.log(this.listInCabinet, '柜子内的数据demo2');
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error('Error fetching data:', error);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
getMaterialsOutOfCabinet() {
|
|
|
- this.queryParams.loanState = '0'; // 设置查询条件为物资柜外
|
|
|
- const data={
|
|
|
+ this.queryParams.loanState = '0' // 设置查询条件为物资柜外
|
|
|
+
|
|
|
+ const data = {
|
|
|
current: 1,
|
|
|
size: -1,
|
|
|
- loanState: '0',
|
|
|
+ loanState: '0'
|
|
|
}
|
|
|
- return listMaterials(data).then((res) => {
|
|
|
- this.listOutOfCabinet = res.data.records.filter((item) => {return item.materialsCabinetId!=null && item.materialsCabinetId!=='0'});
|
|
|
- console.log(this.listOutOfCabinet,'柜子外的数据demo2')
|
|
|
- });
|
|
|
+ listMaterials(data).then((res) => {
|
|
|
+ // item.status!=='3'这个判断的意思是放错柜子的数据不显示的柜子外 因为异常数据以及放在柜子里了 item.materialsCabinetId不显示未绑定柜子的 item.materialsCabinetId不显示绑定柜子是0的
|
|
|
+ this.listOutOfCabinet = res.data.records.filter((item) => {
|
|
|
+ return item.materialsCabinetId != null && item.materialsCabinetId !== '0' && item.status !== '3'
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
// 初始化Konva舞台
|
|
|
initKonva() {
|
|
|
this.stage = new Konva.Stage({
|
|
|
container: this.$refs.container,
|
|
|
width: 1600,
|
|
|
- height: 1000,
|
|
|
- });
|
|
|
+ height: 1000
|
|
|
+ })
|
|
|
|
|
|
- this.bgLayer = new Konva.Layer();
|
|
|
- const bgImage = new Image();
|
|
|
- bgImage.src = require('@/assets/images/table.png');
|
|
|
+ this.bgLayer = new Konva.Layer()
|
|
|
+ const bgImage = new Image()
|
|
|
+ bgImage.src = require('@/assets/images/table.png')
|
|
|
bgImage.onload = () => {
|
|
|
const konvaImage = new Konva.Image({
|
|
|
x: 600,
|
|
|
@@ -148,37 +170,37 @@ export default {
|
|
|
image: bgImage,
|
|
|
width: 500,
|
|
|
height: 700,
|
|
|
- draggable: false,
|
|
|
- });
|
|
|
- this.bgLayer.add(konvaImage);
|
|
|
- this.bgLayer.draw();
|
|
|
- };
|
|
|
- this.stage.add(this.bgLayer);
|
|
|
+ draggable: false
|
|
|
+ })
|
|
|
+ this.bgLayer.add(konvaImage)
|
|
|
+ this.bgLayer.draw()
|
|
|
+ }
|
|
|
+ this.stage.add(this.bgLayer)
|
|
|
},
|
|
|
|
|
|
// 清除Konva图层中的所有物资元素
|
|
|
clearMaterialsFromLayer() {
|
|
|
- if (!this.bgLayer) return;
|
|
|
- const materialNodes = this.bgLayer.find('.material');
|
|
|
- console.log('清除物资:', materialNodes);
|
|
|
- materialNodes.forEach(node => node.destroy()); // 清除已渲染的物资元素
|
|
|
- this.materialElements = []; // 清空已存储的物资图标对象
|
|
|
- this.bgLayer.draw(); // 重新绘制图层
|
|
|
+ if (!this.bgLayer) return
|
|
|
+ const materialNodes = this.bgLayer.find('.material')
|
|
|
+ console.log('清除物资:', materialNodes)
|
|
|
+ materialNodes.forEach(node => node.destroy()) // 清除已渲染的物资元素
|
|
|
+ this.materialElements = [] // 清空已存储的物资图标对象
|
|
|
+ this.bgLayer.draw() // 重新绘制图层
|
|
|
},
|
|
|
|
|
|
// 物资拖动结束时的处理
|
|
|
handleDragEnd(e) {
|
|
|
- const materialId = e.target.getAttr('materialId'); // 获取物资ID
|
|
|
- const position = e.target.getClientRect(); // 获取物资当前的位置信息
|
|
|
- const material = e.target.getAttr('material'); // 获取物资对象
|
|
|
-console.log(material,'物资移动');
|
|
|
- const isInCabinet = material.inCabinet; // 物资是否在柜子内
|
|
|
+ const materialId = e.target.getAttr('materialId') // 获取物资ID
|
|
|
+ const position = e.target.getClientRect() // 获取物资当前的位置信息
|
|
|
+ const material = e.target.getAttr('material') // 获取物资对象
|
|
|
+ console.log(material, '物资移动')
|
|
|
+ const isInCabinet = material.inCabinet // 物资是否在柜子内
|
|
|
|
|
|
selectMaterialsById(material.materialsId).then((res) => {
|
|
|
- console.log(res, '一大啊啊啊是');
|
|
|
- const originalCabinetId = res.data.materialsCabinetId;//原来的柜子ID
|
|
|
- const currentCabinetId = this.queryParams.materialsCabinetId; // 归还目标柜子ID
|
|
|
- console.log(originalCabinetId,currentCabinetId, 'originalCabinetId');
|
|
|
+ console.log(res, '一大啊啊啊是')
|
|
|
+ const originalCabinetId = res.data.materialsCabinetId//原来的柜子ID
|
|
|
+ const currentCabinetId = this.queryParams.materialsCabinetId // 归还目标柜子ID
|
|
|
+ console.log(originalCabinetId, currentCabinetId, 'originalCabinetId')
|
|
|
|
|
|
if (!currentCabinetId || position.x < 600 || position.x > 1100 || position.y < 25 || position.y > 725) {
|
|
|
// **物资移出柜子**
|
|
|
@@ -188,12 +210,12 @@ console.log(material,'物资移动');
|
|
|
materialsId: materialId,
|
|
|
loanState: 0, // "借出"
|
|
|
loanUserId: 106
|
|
|
- });
|
|
|
- material.inCabinet = false; // 更新状态
|
|
|
+ })
|
|
|
+ material.inCabinet = false // 更新状态
|
|
|
}
|
|
|
} else {
|
|
|
// **物资归还到柜子**
|
|
|
- if (!isInCabinet&&originalCabinetId === currentCabinetId) {
|
|
|
+ if (!isInCabinet && originalCabinetId === currentCabinetId) {
|
|
|
console.log('2--------')
|
|
|
// **物资从外部归还**
|
|
|
this.materialsToUpdate.push({
|
|
|
@@ -201,69 +223,51 @@ console.log(material,'物资移动');
|
|
|
loanState: 1, // "归还"
|
|
|
restitutionToId: currentCabinetId,
|
|
|
restitutionUserId: 106
|
|
|
- });
|
|
|
- material.inCabinet = true;
|
|
|
- material.materialsCabinetId = currentCabinetId; // 更新物资的柜子ID
|
|
|
+ })
|
|
|
+ material.inCabinet = true
|
|
|
+ material.materialsCabinetId = currentCabinetId // 更新物资的柜子ID
|
|
|
} else if (originalCabinetId !== currentCabinetId) {
|
|
|
console.log('3--------')
|
|
|
- // **物资从柜子 A 归还到柜子 B,需要确认**
|
|
|
- // 查找柜子名称
|
|
|
- const originalCabinetName = this.cabinets.find(cabinet => cabinet.value === originalCabinetId)?.label || '未知柜子';
|
|
|
- const currentCabinetName = this.cabinets.find(cabinet => cabinet.value === currentCabinetId)?.label || '未知柜子';
|
|
|
- this.$confirm(
|
|
|
- `物资原本属于 ${originalCabinetName},确定要归还到 ${currentCabinetName} 吗?`,
|
|
|
- '确认归还',
|
|
|
- {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }
|
|
|
- ).then(() => {
|
|
|
- // **用户确认变更柜子**
|
|
|
- this.materialsToUpdate.push({
|
|
|
- materialsId: materialId,
|
|
|
- loanState: 1,
|
|
|
- restitutionToId: currentCabinetId,
|
|
|
- restitutionUserId: 106
|
|
|
- });
|
|
|
- material.materialsCabinetId = currentCabinetId; // 更新柜子ID
|
|
|
- this.bgLayer.draw();
|
|
|
- }).catch(() => {
|
|
|
- // **用户取消,还原到原位置**
|
|
|
- e.target.position({ x: 1200, y: 120 });
|
|
|
- this.bgLayer.draw();
|
|
|
- });
|
|
|
+ // **用户确认变更柜子**
|
|
|
+ this.materialsToUpdate.push({
|
|
|
+ materialsId: materialId,
|
|
|
+ loanState: 1,
|
|
|
+ restitutionToId: currentCabinetId,
|
|
|
+ restitutionUserId: 106
|
|
|
+ })
|
|
|
+ material.materialsCabinetId = currentCabinetId // 更新柜子ID
|
|
|
+ this.bgLayer.draw()
|
|
|
} else {
|
|
|
// **物资仍在同一个柜子内**
|
|
|
- console.log('物资仍在同一个柜子内');
|
|
|
+ console.log('物资仍在同一个柜子内')
|
|
|
// 如果需要,可以在这里添加一些逻辑
|
|
|
}
|
|
|
}
|
|
|
}).catch((error) => {
|
|
|
- console.error('获取物资信息失败:', error);
|
|
|
+ console.error('获取物资信息失败:', error)
|
|
|
// 处理错误情况
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
-
|
|
|
// 将物资添加到Konva图层
|
|
|
addMaterialsToLayer() {
|
|
|
- if (!this.bgLayer) return;
|
|
|
+ if (!this.bgLayer) return
|
|
|
|
|
|
- const itemWidth = 60;
|
|
|
- const itemHeight = 60;
|
|
|
- const spacing = 40;
|
|
|
+ const itemWidth = 60
|
|
|
+ const itemHeight = 60
|
|
|
+ const spacing = 40
|
|
|
|
|
|
// 清除之前的物资元素
|
|
|
- this.clearMaterialsFromLayer();
|
|
|
+ this.clearMaterialsFromLayer()
|
|
|
|
|
|
// 渲染柜内物资
|
|
|
+ console.log(this.listInCabinet,'物资柜内部数据')
|
|
|
this.listInCabinet.forEach((material, index) => {
|
|
|
- const x = 720 + (index % 3) * (itemWidth + spacing);
|
|
|
- const y = 120 + Math.floor(index / 3) * (itemHeight + spacing);
|
|
|
+ const x = 720 + (index % 3) * (itemWidth + spacing)
|
|
|
+ const y = 120 + Math.floor(index / 3) * (itemHeight + spacing)
|
|
|
|
|
|
- const materialImage = new Image();
|
|
|
- materialImage.src = material.materialsTypeIcon;
|
|
|
+ const materialImage = new Image()
|
|
|
+ materialImage.src = material.materialsTypeIcon
|
|
|
materialImage.onload = () => {
|
|
|
const group = new Konva.Group({
|
|
|
x: x,
|
|
|
@@ -271,14 +275,14 @@ console.log(material,'物资移动');
|
|
|
draggable: this.doorOpen, // 初始时根据 doorOpen 状态设置可拖拽
|
|
|
name: 'material',
|
|
|
materialId: material.materialsId,
|
|
|
- material: material,
|
|
|
- });
|
|
|
+ material: material
|
|
|
+ })
|
|
|
|
|
|
const konvaMaterialImage = new Konva.Image({
|
|
|
image: materialImage,
|
|
|
width: itemWidth,
|
|
|
- height: itemHeight,
|
|
|
- });
|
|
|
+ height: itemHeight
|
|
|
+ })
|
|
|
|
|
|
const text = new Konva.Text({
|
|
|
x: 0,
|
|
|
@@ -287,30 +291,30 @@ console.log(material,'物资移动');
|
|
|
fontSize: 12,
|
|
|
fill: 'black',
|
|
|
align: 'center',
|
|
|
- width: itemWidth,
|
|
|
- });
|
|
|
+ width: itemWidth
|
|
|
+ })
|
|
|
|
|
|
- group.add(konvaMaterialImage);
|
|
|
- group.add(text);
|
|
|
+ group.add(konvaMaterialImage)
|
|
|
+ group.add(text)
|
|
|
|
|
|
// 给物资设置初始的柜内状态
|
|
|
- material.inCabinet = true; // 设置物资最初处于柜子内
|
|
|
+ material.inCabinet = true // 设置物资最初处于柜子内
|
|
|
|
|
|
- group.on('dragend', this.handleDragEnd); // 添加dragend事件监听
|
|
|
+ group.on('dragend', this.handleDragEnd) // 添加dragend事件监听
|
|
|
|
|
|
- this.bgLayer.add(group);
|
|
|
- this.bgLayer.draw();
|
|
|
- this.materialElements.push(group);
|
|
|
- };
|
|
|
- });
|
|
|
+ this.bgLayer.add(group)
|
|
|
+ this.bgLayer.draw()
|
|
|
+ this.materialElements.push(group)
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
// 渲染柜外物资
|
|
|
this.listOutOfCabinet.forEach((material, index) => {
|
|
|
- const x = 1200 + (index % 3) * (itemWidth + spacing); // 左侧显示柜外物资
|
|
|
- const y = 120 + Math.floor(index / 3) * (itemHeight + spacing);
|
|
|
+ const x = 1200 + (index % 3) * (itemWidth + spacing) // 左侧显示柜外物资
|
|
|
+ const y = 120 + Math.floor(index / 3) * (itemHeight + spacing)
|
|
|
|
|
|
- const materialImage = new Image();
|
|
|
- materialImage.src = material.materialsTypeIcon;
|
|
|
+ const materialImage = new Image()
|
|
|
+ materialImage.src = material.materialsTypeIcon
|
|
|
materialImage.onload = () => {
|
|
|
const group = new Konva.Group({
|
|
|
x: x,
|
|
|
@@ -318,14 +322,14 @@ console.log(material,'物资移动');
|
|
|
draggable: this.doorOpen, // 初始时设为可拖拽
|
|
|
name: 'material',
|
|
|
materialId: material.materialsId,
|
|
|
- material: material,
|
|
|
- });
|
|
|
+ material: material
|
|
|
+ })
|
|
|
|
|
|
const konvaMaterialImage = new Konva.Image({
|
|
|
image: materialImage,
|
|
|
width: itemWidth,
|
|
|
- height: itemHeight,
|
|
|
- });
|
|
|
+ height: itemHeight
|
|
|
+ })
|
|
|
|
|
|
const text = new Konva.Text({
|
|
|
x: 0,
|
|
|
@@ -334,47 +338,47 @@ console.log(material,'物资移动');
|
|
|
fontSize: 12,
|
|
|
fill: 'black',
|
|
|
align: 'center',
|
|
|
- width: itemWidth,
|
|
|
- });
|
|
|
+ width: itemWidth
|
|
|
+ })
|
|
|
|
|
|
- group.add(konvaMaterialImage);
|
|
|
- group.add(text);
|
|
|
+ group.add(konvaMaterialImage)
|
|
|
+ group.add(text)
|
|
|
|
|
|
// 给物资设置初始的柜外状态
|
|
|
- material.inCabinet = false; // 设置物资最初处于柜子外
|
|
|
+ material.inCabinet = false // 设置物资最初处于柜子外
|
|
|
|
|
|
- group.on('dragend', this.handleDragEnd); // 添加dragend事件监听
|
|
|
+ group.on('dragend', this.handleDragEnd) // 添加dragend事件监听
|
|
|
|
|
|
- this.bgLayer.add(group);
|
|
|
- this.bgLayer.draw();
|
|
|
- this.materialElements.push(group);
|
|
|
- };
|
|
|
- });
|
|
|
+ this.bgLayer.add(group)
|
|
|
+ this.bgLayer.draw()
|
|
|
+ this.materialElements.push(group)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
// 监听 doorOpen 状态变化时更新物资的 draggable 状态
|
|
|
updateDraggableStatus() {
|
|
|
this.materialElements.forEach(group => {
|
|
|
- group.draggable(this.doorOpen); // 动态更新 draggable 状态
|
|
|
- });
|
|
|
- this.bgLayer.draw();
|
|
|
+ group.draggable(this.doorOpen) // 动态更新 draggable 状态
|
|
|
+ })
|
|
|
+ this.bgLayer.draw()
|
|
|
},
|
|
|
|
|
|
-
|
|
|
// 批量更新物资状态
|
|
|
updateMaterialsBatch() {
|
|
|
- if (this.materialsToUpdate.length === 0) return; // 如果没有需要更新的物资,直接返回
|
|
|
+ console.log('我调用了这里 归还')
|
|
|
+ if (this.materialsToUpdate.length === 0) return // 如果没有需要更新的物资,直接返回
|
|
|
updateIsMaterialById(this.materialsToUpdate).then(response => {
|
|
|
if (response.data) {
|
|
|
- this.$message.success('物资更新成功');
|
|
|
- this.materialsToUpdate = []; // 清空需要更新的物资列表
|
|
|
+ this.$message.success('物资更新成功')
|
|
|
+ this.materialsToUpdate = [] // 清空需要更新的物资列表
|
|
|
} else {
|
|
|
- this.$message.error('物资更新失败');
|
|
|
+ this.$message.error('物资更新失败')
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|