This commit is contained in:
parent
caa22e1cb2
commit
52b4614688
|
|
@ -242,7 +242,9 @@
|
|||
</el-form-item>
|
||||
<!-- 多选 -->
|
||||
<el-form-item v-if="item.inputType == 3" :label="item.propertyName">
|
||||
<el-select v-model="item.propertyValue" multiple placeholder="请选择" clearable style="width: 100%">
|
||||
<el-select v-model="item.propertyValue" multiple placeholder="请选择"
|
||||
:clearable="item.propertyValue !='' && item.propertyValue != null"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="(item, index) in handleData(item.value)"
|
||||
:key="index"
|
||||
|
|
|
|||
|
|
@ -346,7 +346,8 @@
|
|||
<template v-slot="{ row }" v-else-if="item.prop == 'devType'">
|
||||
<span>
|
||||
{{ row.mainCategory ? row.mainCategory + '>' : '' }}
|
||||
{{ row.branch ? row.subCategory + '>' : row.subCategory }}{{ row.branch }}
|
||||
{{ row.branch ? row.subCategory : row.subCategory }}
|
||||
<!-- {{ row.branch }}-->
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="item.prop == 'upDownStatus'">
|
||||
|
|
@ -783,7 +784,7 @@ export default {
|
|||
manufacturerList: [], // 生产厂家
|
||||
columns2: [],
|
||||
columns: [
|
||||
{ key: 0, label: `所属省份`, prop: 'province', visible: true },
|
||||
// { key: 0, label: `所属省份`, prop: 'province', visible: true },
|
||||
{ key: 1, label: `产权单位`, prop: 'propertyUnit', visible: true },
|
||||
{ key: 2, label: `专业`, prop: 'major', visible: true },
|
||||
{ key: 3, label: `工序`, prop: 'process', visible: true },
|
||||
|
|
@ -792,14 +793,14 @@ export default {
|
|||
{ key: 6, label: `规格型号`, prop: 'specificationModel', visible: true },
|
||||
{ key: 7, label: `装备编码`, prop: 'code', visible: true },
|
||||
{ key: 8, label: `装备状态`, prop: 'status', visible: true },
|
||||
{ key: 44, label: `上下架状态`, prop: 'upDownStatus', visible: true },
|
||||
// { key: 44, label: `上下架状态`, prop: 'upDownStatus', visible: true },
|
||||
{ key: 9, label: `使用年限`, prop: 'serviceLife', visible: true },
|
||||
{ key: 10, label: `使用项目`, prop: 'usingProject', visible: true },
|
||||
{ key: 11, label: `使用到期时间`, prop: 'expirationTime', visible: true },
|
||||
{ key: 12, label: `使用次数`, prop: 'usageCount', visible: true },
|
||||
{ key: 13, label: `维修次数`, prop: 'repairCount', visible: true },
|
||||
{ key: 14, label: `装备原始编码`, prop: 'originalCode', visible: true },
|
||||
{ key: 15, label: `计量单位`, prop: 'unit', visible: true },
|
||||
// { key: 15, label: `计量单位`, prop: 'unit', visible: true },
|
||||
{ key: 16, label: `生产厂家`, prop: 'manufacturer', visible: true },
|
||||
{ key: 17, label: `出厂日期`, prop: 'productionDate', visible: true },
|
||||
{ key: 18, label: `采购日期`, prop: 'purchaseDate', visible: true },
|
||||
|
|
|
|||
|
|
@ -142,9 +142,7 @@
|
|||
<td>{{ item.devCode }}</td>
|
||||
<td>{{ item.devNum }}</td>
|
||||
<td>
|
||||
{{ item.useStartTime ? item.useStartTime : '-' }}
|
||||
至
|
||||
{{ item.useEndTime ? item.useEndTime : '-' }}
|
||||
{{item.useTime}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -566,7 +566,20 @@ export default {
|
|||
row.num = 1
|
||||
}
|
||||
},
|
||||
// 工具函数:格式化日期为 yyyy-MM-dd(仅保留日期,去除时间)
|
||||
formatDateToYmd(dateVal) {
|
||||
if (!dateVal) return null
|
||||
// 兼容 Date 对象和字符串格式
|
||||
const date = new Date(dateVal)
|
||||
// 处理无效日期
|
||||
if (isNaN(date.getTime())) return null
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
},
|
||||
|
||||
// 提交
|
||||
// 提交
|
||||
async submit() {
|
||||
this.$refs.queryForm.validate(async(valid) => {
|
||||
|
|
@ -585,12 +598,22 @@ export default {
|
|||
// 构造提交参数
|
||||
this.queryParams.type = 1
|
||||
this.queryParams.leaseType = 0
|
||||
|
||||
// 处理主表退库日期:仅保留 yyyy-MM-dd 格式
|
||||
const submitQueryParams = {
|
||||
...this.queryParams,
|
||||
useTime: this.formatDateToYmd(this.queryParams.useTime)
|
||||
}
|
||||
|
||||
// 处理明细表退库日期:仅保留 yyyy-MM-dd 格式
|
||||
const tempTableList = this.ids.map(item => ({
|
||||
...item,
|
||||
category: null // 后端不需要category字段
|
||||
category: null, // 后端不需要category字段
|
||||
useTime: this.formatDateToYmd(item.useTime)
|
||||
}))
|
||||
|
||||
const params = {
|
||||
devInfo: this.queryParams,
|
||||
devInfo: submitQueryParams,
|
||||
devDetailsList: tempTableList // 包含devType字段
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue