Commit 59e7268e by T

bug修复及优化

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