|
@@ -43,7 +43,11 @@
|
|
|
<span class="item_index">{{index + 1}}</span>
|
|
|
<div class="card_item_code">{{item.inner_code}}</div>
|
|
|
</div>
|
|
|
- <div class="card_red" @click="delSteelCylinder(item,2)">删除</div>
|
|
|
+ <div style="display: flex;align-items: center;">
|
|
|
+ <div class="card_yellow" @click="overdueScrapping(item,'extended')">超期</div>
|
|
|
+ <div class="card_pale_red" @click="overdueScrapping(item,'scrap')">报废</div>
|
|
|
+ <div class="card_red" @click="delSteelCylinder(item,2)">删除</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else><el-empty :image="require('../../assets/image/empty.png')" description="暂无燃气瓶"></el-empty></div>
|
|
@@ -59,6 +63,12 @@
|
|
|
<div class="card_bottle">
|
|
|
<div class="card_district">
|
|
|
<div class="herderArea center_in title_red">不合格瓶区</div>
|
|
|
+ <div class="card_tabs_abnormal">
|
|
|
+ <div class="title_tabs_abnormal" :class="tabsStatus == 'extended' ? 'title_blue':''"
|
|
|
+ @click="getTabsStatus('extended')">超期</div>
|
|
|
+ <div class="title_tabs_abnormal" :class="tabsStatus == 'scrap' ?'title_blue':''"
|
|
|
+ @click="getTabsStatus('scrap')">报废</div>
|
|
|
+ </div>
|
|
|
<div class="same_row_in card_add_cylinder">
|
|
|
<el-input style="margin-right: 10px;" v-model="input2" placeholder="输入单位内编号搜索"
|
|
|
@input="cylinderSearch2"></el-input>
|
|
@@ -88,8 +98,8 @@
|
|
|
<el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="16">
|
|
|
- <el-form-item label="单位内编码" prop="code" :rules="formRuleList[0].rules">
|
|
|
- <el-input v-model="ruleForm.code" placeholder="请输入单位内编码"></el-input>
|
|
|
+ <el-form-item label="单位内编号" prop="code" :rules="formRuleList[0].rules">
|
|
|
+ <el-input v-model="ruleForm.code" placeholder="请输入单位内编号"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -128,7 +138,8 @@
|
|
|
import {
|
|
|
getCylinderStatus,
|
|
|
addCylinderStatus,
|
|
|
- delCylinderStatus
|
|
|
+ delCylinderStatus,
|
|
|
+ putCylinderStatus
|
|
|
} from '@/api/condition'
|
|
|
import pagination from '@/components/pagination'
|
|
|
import forms from '@/components/forms'
|
|
@@ -170,13 +181,13 @@
|
|
|
staffDialogVisible: false,
|
|
|
formRuleList: [{
|
|
|
field: 'code',
|
|
|
- label: '单位内编码',
|
|
|
- placeholder: '单位内编码',
|
|
|
+ label: '单位内编号',
|
|
|
+ placeholder: '单位内编号',
|
|
|
type: 'input',
|
|
|
colWidth: 24,
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
- message: '请输入单位内编码',
|
|
|
+ message: '请输入单位内编号',
|
|
|
trigger: 'blur'
|
|
|
}]
|
|
|
}],
|
|
@@ -189,19 +200,21 @@
|
|
|
numData: [],
|
|
|
addTitle: '添加',
|
|
|
codeType: 1,
|
|
|
+ // 报废(scrap)超期(extended)
|
|
|
+ tabsStatus: 'extended',
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList(1)
|
|
|
this.getList1(2)
|
|
|
- this.getList2(3)
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
},
|
|
|
methods: {
|
|
|
getList(state) {
|
|
|
getCylinderStatus({
|
|
|
page: this.Pagination.PageIndex,
|
|
|
pageSize: this.Pagination.PageSize,
|
|
|
- status: state,
|
|
|
+ status: String(state),
|
|
|
inner_code: this.input,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -214,7 +227,7 @@
|
|
|
getCylinderStatus({
|
|
|
page: this.Pagination1.PageIndex,
|
|
|
pageSize: this.Pagination1.PageSize,
|
|
|
- status: state,
|
|
|
+ status: String(state),
|
|
|
inner_code: this.input1,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -227,7 +240,7 @@
|
|
|
getCylinderStatus({
|
|
|
page: this.Pagination2.PageIndex,
|
|
|
pageSize: this.Pagination2.PageSize,
|
|
|
- status: state,
|
|
|
+ status: String(state),
|
|
|
inner_code: this.input2,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -236,6 +249,11 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 切换显示不合格瓶/超期。报废
|
|
|
+ getTabsStatus(value) {
|
|
|
+ this.tabsStatus = value
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
+ },
|
|
|
cylinderSearch(value) {
|
|
|
this.getList(1)
|
|
|
},
|
|
@@ -243,7 +261,7 @@
|
|
|
this.getList1(2)
|
|
|
},
|
|
|
cylinderSearch2(value) {
|
|
|
- this.getList2(3)
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
},
|
|
|
// 添加钢瓶
|
|
|
AddCylinder(type) {
|
|
@@ -275,8 +293,14 @@
|
|
|
},
|
|
|
// 添加钢瓶
|
|
|
getAddCode() {
|
|
|
+ let arr = ''
|
|
|
+ if (this.codeType == '3') {
|
|
|
+ arr = this.tabsStatus
|
|
|
+ } else {
|
|
|
+ arr = String(this.codeType)
|
|
|
+ }
|
|
|
addCylinderStatus({
|
|
|
- status: this.codeType,
|
|
|
+ status: arr,
|
|
|
innerCodeList: this.numData,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -290,7 +314,7 @@
|
|
|
} else if (this.codeType == 2) {
|
|
|
this.getList1(2)
|
|
|
} else if (this.codeType == 3) {
|
|
|
- this.getList2(3)
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -360,6 +384,22 @@
|
|
|
this.numData.splice(index, 1);
|
|
|
}
|
|
|
},
|
|
|
+ // 超期\报废
|
|
|
+ overdueScrapping(value, type) {
|
|
|
+ let arr = []
|
|
|
+ arr.push(value.inner_code)
|
|
|
+ putCylinderStatus({
|
|
|
+ status: type,
|
|
|
+ innerCodeList: arr,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.getList1(2)
|
|
|
+ if (type == this.tabsStatus) {
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 删除钢瓶
|
|
|
delSteelCylinder(value, type) {
|
|
|
this.$confirm('此操作将永久删除该钢瓶, 是否继续?', '提示', {
|
|
@@ -392,7 +432,7 @@
|
|
|
this.Pagination2.PageIndex > precisePage ? precisePage : this
|
|
|
.Pagination2.PageIndex
|
|
|
this.Pagination2.PageIndex = this.Pagination2.PageIndex < 1 ? 1 : this.Pagination2.PageIndex
|
|
|
- this.getList2(3)
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -424,11 +464,11 @@
|
|
|
// 不合格瓶区
|
|
|
changeSize2(val) {
|
|
|
this.Pagination2.PageSize = val
|
|
|
- this.getList2(3)
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
},
|
|
|
changeCurrent2(val) {
|
|
|
this.Pagination2.PageIndex = val
|
|
|
- this.getList2(3)
|
|
|
+ this.getList2(this.tabsStatus)
|
|
|
},
|
|
|
// 弹窗关闭
|
|
|
closeDialog() {
|
|
@@ -439,7 +479,15 @@
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style>
|
|
|
+ .el-tabs__item.is-active {
|
|
|
+ color: #409EFF !important;
|
|
|
+ }
|
|
|
|
|
|
+ .el-tabs__item {
|
|
|
+ color: #fff !important;
|
|
|
+ }
|
|
|
+</style>
|
|
|
<style lang="scss" scoped>
|
|
|
.card_cylinder_condition {
|
|
|
display: flex;
|
|
@@ -521,7 +569,22 @@
|
|
|
.card_red {
|
|
|
cursor: pointer;
|
|
|
color: #F56C6C;
|
|
|
- font-size: 18px;
|
|
|
+ font-size: 17px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card_yellow {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #E6A23C;
|
|
|
+ font-size: 17px;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .card_pale_red {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #b73333;
|
|
|
+ font-size: 17px;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
|
|
|
.title_num_code {
|
|
@@ -612,4 +675,29 @@
|
|
|
::v-deep .el-pager li:hover {
|
|
|
color: #409EFF !important;
|
|
|
}
|
|
|
+
|
|
|
+ .card_tabs_abnormal {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ height: 40px;
|
|
|
+ margin-top: 15px;
|
|
|
+ background-color: rgba(13, 162, 203, 0.2);
|
|
|
+ }
|
|
|
+
|
|
|
+ .title_tabs_abnormal {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #fff;
|
|
|
+ flex: 1;
|
|
|
+ height: 100%;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title_blue {
|
|
|
+ // color: #409eff;
|
|
|
+ background-color: #409EFF;
|
|
|
+ }
|
|
|
</style>
|