Commit 59e7268e by T

bug修复及优化

parent ee5f6e69
......@@ -225,7 +225,7 @@
</td>
<th class="textHeader">保养周期</th>
<td class="textContent">
{{ detailData.TermDays }}
{{ detailData.BaoYangDays==null?"- ":detailData.BaoYangDays }} 天
</td>
<th class="textHeader">创建时间</th>
<td class="textContentLast">
......@@ -345,8 +345,8 @@
<el-input-number
class="inputA"
v-model="EditRuleForm.TermDays"
:min="1"
:max="100"
:min="0"
:max="10000"
label="数字"
></el-input-number>
</el-form-item>
......
......@@ -532,7 +532,7 @@
<template>
<el-input-number
v-model="ruleForm.BaoYangDays"
:min="1"
:min="0"
:max="10000"
></el-input-number>
</template>
......@@ -745,10 +745,10 @@ export default {
value: 1,
label: "公共装备",
},
{
value: 2,
label: "单警装备",
},
// {
// value: 2,
// label: "单警装备",
// },
],
StateType: [
{
......@@ -805,10 +805,10 @@ export default {
value: 1,
label: "公共装备",
},
{
value: 2,
label: "单警装备",
},
// {
// value: 2,
// label: "单警装备",
// },
],
selectShow: true,
......
......@@ -648,7 +648,7 @@ export default {
DepartName: "",
UserName: "",
IsAdmin: 1,
SubmitState: "0",
SubmitState: "-99",
SubmitUserName: "",
borrowType: 1,
},
......
......@@ -653,7 +653,7 @@ export default {
DepartName: "",
UserName: "",
IsAdmin: 1,
SubmitState: "0",
SubmitState: "-99",
SubmitUserName: "",
borrowType: 2,
},
......
......@@ -136,7 +136,7 @@
prop="SubmitState"
label="操作"
width="100"
width="200"
>
<template slot-scope="scope">
<a-button
......@@ -152,6 +152,16 @@
<a-button
type="primary"
class="actions"
v-if="[1].includes(scope.row.SubmitState)"
ghost
round
size="small"
@click="receive(scope.row, 2)"
>领出</a-button
>
<a-button
type="primary"
class="actions"
v-if="[0].includes(scope.row.SubmitState)"
ghost
round
......@@ -549,7 +559,7 @@ export default {
DepartName: "",
UserName: "",
IsAdmin: 1,
SubmitState: "0",
SubmitState: "-99",
SubmitUserName: "",
},
AddPlanForm: {
......@@ -929,6 +939,38 @@ export default {
console.log("rule", this.ruleForm);
this.classOption = resclass.Rows;
},
receive(row, SubmitState)
{
this.editForm.ID=row.ID;
this.editForm.SubmitState=SubmitState;
var stateName="";
if(SubmitState===2)//提交
{
stateName="领用"
}
else
{
stateName="撤销"
}
const url = "/api/Borrow/ChangeState" ;
this.$confirm("是否"+stateName+"该操作?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
const { data: res } = await this.$axios.post(url,this.editForm);
if (res.Success === true) {
this.getQueuData();
this.$message.success("已"+stateName);
} else {
this.$message.error(res.Remark);
}
})
.catch((e) => {
this.$message.warning("已取消"+stateName+"操作");
});
},
///人员选择
policeSelect(row) {
var obj = {};
......
......@@ -116,12 +116,12 @@
label="账户"
align="center"
></el-table-column>
<el-table-column
<!-- <el-table-column
prop="StoragePassword"
label="单警柜密码"
align="center"
>
</el-table-column>
</el-table-column> -->
<el-table-column
v-if="false"
prop="Remarks"
......@@ -295,7 +295,7 @@
placeholder="请输入账号密码"
></el-input>
</el-form-item>
<el-form-item label="单警柜分配">
<!-- <el-form-item label="单警柜分配">
<el-select
v-model="ruleForm.StorageId"
class="textboxInput"
......@@ -317,15 +317,15 @@
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="单警柜密码" prop="StoragePassword">
</el-form-item> -->
<!-- <el-form-item label="单警柜密码" prop="StoragePassword">
<el-input
style="width: 300px"
:disabled="cabinetDisabled"
v-model="ruleForm.StoragePassword"
placeholder="请输入单警柜密码"
></el-input>
</el-form-item>
</el-form-item> -->
</el-col>
</el-row>
<el-form-item v-if="false">
......@@ -405,16 +405,17 @@
<td class="textContent">
{{ detailData.PolicePassword }}
</td>
<th class="textHeader">单警柜密码</th>
<td class="textContentLast">
{{ detailData.StoragePassword===null?' ': detailData.StoragePassword}}
</td>
</tr>
<tr>
<th class="textHeader">警员编号</th>
<td class="textContent">
{{ detailData.PoliceCode }}
</td>
<!-- <th class="textHeader">单警柜密码</th>
<td class="textContentLast">
{{ detailData.StoragePassword===null?' ': detailData.StoragePassword}}
</td> -->
</tr>
<tr>
<th class="textHeader">备注信息</th>
<td class="textContentLast">
{{ detailData.Remarks }}
......@@ -424,7 +425,7 @@
</table>
</div>
</el-card>
<el-card
<!-- <el-card
class="box-card"
style="text-align: center; margin-top: 35px"
>
......@@ -438,7 +439,7 @@
</el-table-column>
</el-table>
</template>
</el-card>
</el-card> -->
<div slot="footer" class="dialog-footer">
<el-button @click="borrowTableVisible = false">取 消</el-button>
<el-button type="primary" @click="borrowTableVisible = false"
......
......@@ -259,7 +259,7 @@
<el-table :data="tableData" border class="details">
<el-table-column
prop="MaterielName"
label="物料名称"
label="装备名称"
align="center"
>
</el-table-column>
......
......@@ -102,7 +102,7 @@
</div>
</el-card>
<el-card style="height: 150px" class="spanbox" v-if="cabinetShow">
<!-- <el-card style="height: 150px" class="spanbox" v-if="cabinetShow">
<div slot="header">
<el-form-item label="单警柜密码: ">
......@@ -138,7 +138,7 @@
</el-row>
</div>
</el-card>
</el-card> -->
<el-card style="height: 150px" class="spanbox">
<div slot="header">
......
......@@ -92,11 +92,11 @@
>
</el-date-picker>
</el-form-item>
<el-form-item class="diaB" label="保养周期">
<el-form-item class="diaB" label="保养周期(天)">
<template>
<el-input-number
v-model="ruleForm.BaoYangDays"
:min="1"
:min="0"
:max="10000"
></el-input-number>
</template>
......@@ -621,7 +621,9 @@ export default {
return false;
}
});
this.reload();
//回调上一个弹窗的查看方法check-刷新
this.$emit('toCheck')
//this.reload();
},
//查看信息
async check(row) {
......
......@@ -263,7 +263,7 @@
</el-table-column>
<el-table-column prop="EqCode" label="装备编号" width="80" align="center">
</el-table-column>
<el-table-column prop="EqTypeName" label="装备类型" align="center">
<el-table-column prop="EqSizeCode" label="装备号型" align="center">
</el-table-column>
<el-table-column prop="StateName" label="装备状态" width="70" align="center">
</el-table-column>
......@@ -423,7 +423,7 @@
</el-dialog>
<!-- 修改装备 -->
<!-- 表单组件-引用修改装备页面 -->
<cabEditEquForm ref="cabEditEquForm" />
<cabEditEquForm ref="cabEditEquForm" @toCheck="toCheck"/>
<!-- 分页功能 -->
<el-row type="flex" justify="center" align="middle">
......@@ -474,10 +474,10 @@ export default {
value: 0,
label: "公共柜",
},
{
value: 1,
label: "单警柜",
},
// {
// value: 1,
// label: "单警柜",
// },
{
value: 2,
label: "储物柜",
......@@ -585,6 +585,7 @@ export default {
},
methods: {
//改变灯光状态
async changeLight(row){
//console.log('改变灯光状态')
......@@ -651,7 +652,7 @@ export default {
},
//查看信息
async check(row) {
this.row = row
this.row = row;
this.borrowTableVisible = true;
const borrowUrl = "/api/Storage/" + row.ID;
const { data: res } = await this.$axios.get(borrowUrl);
......@@ -713,10 +714,10 @@ export default {
value: 2,
label: "储物柜",
},
{
value: 1,
label: "单警柜",
},
// {
// value: 1,
// label: "单警柜",
// },
{ value: 0, label: "公共柜" },
]),
(this.ruleForm = JSON.parse(JSON.stringify(row)));
......@@ -767,10 +768,10 @@ export default {
value: "2",
label: "储物柜",
},
{
value: "1",
label: "单警柜",
},
// {
// value: "1",
// label: "单警柜",
// },
]),
(this.typeSelect = false);
this.cabinetDis = false;
......@@ -860,6 +861,21 @@ export default {
});
console.log('手动操作入库')
},
//修改完装备信息回调查看
async toCheck() {
console.log('回调查看'+this.row.ID);
this.borrowTableVisible = false;
//刷新查看
this.timer = setTimeout(() => {
//设置延迟3毫秒后执行
this.loading = false;
this.check(this.row)
}, 3);
//this.check(this.row)
},
// 分页功能
// 每页显示条数发生改变时
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论