Merge remote-tracking branch 'origin/ma-mall-ui' into ma-mall-ui
This commit is contained in:
commit
874f797815
|
|
@ -43,3 +43,11 @@ export const addProjectOutAPI = (data) => {
|
|||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取省份
|
||||
export const getProvinceListAPI = () => {
|
||||
return request({
|
||||
url: '/material-mall/cnarea/provinces',
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
||||
|
|
@ -248,14 +248,14 @@
|
|||
<el-button
|
||||
type="text"
|
||||
@click="showEquipmentInput(row.id, false)"
|
||||
v-if="row.status === '3'"
|
||||
v-if="row.orderStatus == '3'"
|
||||
>
|
||||
<i class="el-icon-edit"></i> 编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="deleteItem(row)"
|
||||
v-if="row.status === '3'"
|
||||
v-if="row.orderStatus == '3'"
|
||||
>
|
||||
<i class="el-icon-delete"></i> 删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -198,10 +198,10 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="下次维保日期" prop="purchaseDate">
|
||||
<el-form-item label="采购日期" prop="purchaseDate">
|
||||
<el-date-picker
|
||||
v-model="form.purchaseDate"
|
||||
placeholder="请选择下次维保日期"
|
||||
placeholder="请选择采购日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
style="width: 100%"
|
||||
|
|
@ -401,6 +401,9 @@ export default {
|
|||
unit: [
|
||||
{ required: true, message: '请输入计数单位', trigger: 'blur' }
|
||||
],
|
||||
purchaseDate: [
|
||||
{ required: true, message: '请选择采购日期', trigger: 'change' }
|
||||
],
|
||||
// deviceTypeList: [
|
||||
// { required: true, message: '请选择装备类型', trigger: 'change' }
|
||||
// ],
|
||||
|
|
|
|||
|
|
@ -257,14 +257,14 @@
|
|||
<el-button
|
||||
type="text"
|
||||
@click="editRowInfo(row.maId)"
|
||||
v-if="row.status === '3' && !isAddVisible"
|
||||
v-if="row.orderStatus == '3' && !isAddVisible"
|
||||
>
|
||||
<i class="el-icon-edit"></i> 编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="deleteRowInfo(row)"
|
||||
v-if="row.status === '3' && !isAddVisible"
|
||||
v-if="row.orderStatus == '3' && !isAddVisible"
|
||||
>
|
||||
<i class="el-icon-delete"></i> 删除
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="生产厂家" prop="manufacturer">
|
||||
<el-input v-model="form.manufacturerName" placeholder="生产厂家" readonly />
|
||||
<el-input v-model="form.manufacturer" placeholder="生产厂家" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
|
@ -101,6 +101,11 @@
|
|||
<el-input v-model="form.unit" placeholder="计数单位" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购日期" prop="purchaseDate">
|
||||
<el-input v-model="form.purchaseDate" placeholder="采购日期" readonly />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="display: flex; padding-bottom: 10px">
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="产权单位" prop="propertyUnit">
|
||||
<el-form-item label="产权单位" prop="propertyUnitId">
|
||||
<el-select
|
||||
v-model="queryParams.propertyUnit"
|
||||
v-model="queryParams.propertyUnitId"
|
||||
placeholder="请选择产权单位"
|
||||
clearable
|
||||
filterable
|
||||
|
|
@ -94,9 +94,9 @@
|
|||
>
|
||||
<el-option
|
||||
v-for="item in propertyUnitList"
|
||||
:key="item.value"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -752,7 +752,8 @@ import {
|
|||
getManufacturerSelectApi
|
||||
} from '@/api/EquipmentLedger/index.js'
|
||||
import { firstLevel, secondAndThirdLevel } from '@/api/EquipmentEntryApply'
|
||||
import { getMaxFeatureAPI } from '@/api/EquipmentLedger/equ-out.js'
|
||||
import { getMaxFeatureAPI, getProvinceListAPI } from '@/api/EquipmentLedger/equ-out.js'
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
|
||||
export default {
|
||||
name: 'EquipmentLedger',
|
||||
|
|
@ -765,7 +766,7 @@ export default {
|
|||
// 查询参数
|
||||
queryParams: {
|
||||
province: undefined, // 省份
|
||||
propertyUnit: undefined, // 产权单位
|
||||
propertyUnitId: undefined, // 产权单位
|
||||
name: undefined, // 装备名称
|
||||
specificationModel: undefined, // 规格型号
|
||||
major: undefined, // 专业
|
||||
|
|
@ -901,6 +902,29 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取省份
|
||||
getProvinceList() {
|
||||
getProvinceListAPI().then((res) => {
|
||||
this.provinceList = res.data
|
||||
})
|
||||
},
|
||||
// 获取产权单位
|
||||
getDeptTreeSelect() {
|
||||
deptTreeSelect().then((res) => {
|
||||
this.propertyUnitList = this.filterTree(res.data)
|
||||
console.log('🚀 ~ getDeptTreeSelect ~ this.propertyUnitList:', this.propertyUnitList)
|
||||
})
|
||||
},
|
||||
filterTree(nodes) {
|
||||
return nodes
|
||||
.map(node => {
|
||||
if (node.children) {
|
||||
node.children = this.filterTree(node.children)
|
||||
}
|
||||
return node
|
||||
})
|
||||
.filter(node => node.status !== '1')
|
||||
},
|
||||
// 获取厂家
|
||||
getManufacturerSelectList() {
|
||||
getManufacturerSelectApi().then((res) => {
|
||||
|
|
@ -1340,8 +1364,10 @@ export default {
|
|||
},
|
||||
|
||||
async created() {
|
||||
this.getProvinceList()
|
||||
this.getFirstLevel()
|
||||
this.getManufacturerSelectList()
|
||||
this.getDeptTreeSelect()
|
||||
// 并行加载初始数据
|
||||
await Promise.all([this.getDeviceTree(), this.getDeviceStatusCount()])
|
||||
// 最后加载列表数据
|
||||
|
|
|
|||
|
|
@ -80,11 +80,11 @@
|
|||
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column align="center" show-overflow-tooltip type="index" label="序号" width="50"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="companyName" label="单位名称"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="deviceName" label="装备名称"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="devModel" label="装备型号"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="propertyUnit" label="单位名称"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="name" label="装备名称"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="specificationModel" label="装备型号"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="code" label="装备编码"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="brand" label="装备厂家"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="manufacturer" label="装备厂家"/>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="productionDate" label="出厂日期">
|
||||
<template slot-scope="scope">
|
||||
{{ formatDate(scope.row.productionDate) }}
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" show-overflow-tooltip prop="deviceStatus" label="预警情况">
|
||||
<template slot-scope="scope">
|
||||
<span :class="scope.row.deviceStatus=='临近364天退役'?'red':''">{{ scope.row.deviceStatus }}
|
||||
<span :class="scope.row.status=='临近364天退役'?'red':''">{{ scope.row.status }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
Loading…
Reference in New Issue