|
|
@@ -366,17 +366,17 @@
|
|
|
<text class="cell-title">验收日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(equipment.acceptdate)"
|
|
|
- @change="onAcceptDateChange"
|
|
|
+ v-model="equipment.acceptdate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(equipment.acceptdate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(equipment.acceptdate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -467,17 +467,17 @@
|
|
|
<text class="cell-title">设计日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(equipment.designdate)"
|
|
|
- @change="onDesignDateChange"
|
|
|
+ v-model="equipment.designdate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(equipment.designdate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(equipment.designdate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -536,17 +536,17 @@
|
|
|
<text class="cell-title">安装日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(equipment.installdate)"
|
|
|
- @change="onInstallDateChange"
|
|
|
+ v-model="equipment.installdate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(equipment.installdate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(equipment.installdate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -653,17 +653,17 @@
|
|
|
<text class="cell-title">下次在线检验日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(equipment.nextonlinedate)"
|
|
|
- @change="onNextOnlineDateChange"
|
|
|
+ v-model="equipment.nextonlinedate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(equipment.nextonlinedate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(equipment.nextonlinedate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1144,17 +1144,17 @@
|
|
|
<text class="cell-title">投入使用日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.commissioningDate)"
|
|
|
- @change="onPipeUseDateChange(index, $event)"
|
|
|
+ v-model="pipe.commissioningDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.commissioningDate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.commissioningDate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1181,17 +1181,17 @@
|
|
|
<text class="cell-title">开工日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.constructionStartDate)"
|
|
|
- @change="onPipeStartDateChange(index, $event)"
|
|
|
+ v-model="pipe.constructionStartDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.constructionStartDate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">
|
|
|
{{ formatDate(pipe.constructionStartDate) }}
|
|
|
</text>
|
|
|
@@ -1204,17 +1204,17 @@
|
|
|
<text class="cell-title">交工日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.handoverDate)"
|
|
|
- @change="onPipeCompleteDateChange(index, $event)"
|
|
|
+ v-model="pipe.handoverDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.handoverDate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.handoverDate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1272,17 +1272,17 @@
|
|
|
<text class="cell-title">下次在线检验日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.nextOnlineCheckDate)"
|
|
|
- @change="onPipeNextOnlineCheckDateChange(index, $event)"
|
|
|
+ v-model="pipe.nextOnlineCheckDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.nextOnlineCheckDate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.nextOnlineCheckDate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1365,17 +1365,17 @@
|
|
|
<text class="cell-title">上次全面检验日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.lastalldate)"
|
|
|
- @change="onPipeLastFullCheckDateChange(index, $event)"
|
|
|
+ v-model="pipe.lastalldate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.lastalldate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.lastalldate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1386,17 +1386,17 @@
|
|
|
<text class="cell-title">下次全面检验日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.nextLegalCheckDate)"
|
|
|
- @change="onPipeNextFullCheckDateChange(index, $event)"
|
|
|
+ v-model="pipe.nextLegalCheckDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.nextLegalCheckDate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.nextLegalCheckDate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1479,17 +1479,17 @@
|
|
|
<text class="cell-title">上次年检日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.lastonlinedate)"
|
|
|
- @change="onPipeLastYearCheckDateChange(index, $event)"
|
|
|
+ v-model="pipe.lastonlinedate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.lastonlinedate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.lastonlinedate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1500,17 +1500,17 @@
|
|
|
<text class="cell-title">下次年检日期</text>
|
|
|
</view>
|
|
|
<view class="table-cell content">
|
|
|
- <picker
|
|
|
+ <wd-datetime-picker
|
|
|
v-if="isEdit"
|
|
|
- mode="date"
|
|
|
- :value="formatDate(pipe.nextYearCheckDate)"
|
|
|
- @change="onPipeNextYearCheckDateChange(index, $event)"
|
|
|
+ v-model="pipe.nextYearCheckDate"
|
|
|
+ type="date"
|
|
|
+ style="width: 100%;"
|
|
|
>
|
|
|
<view class="edit-input">
|
|
|
<text>{{ formatDate(pipe.nextYearCheckDate) || '请选择' }}</text>
|
|
|
<image class="arrow-icon" src="/static/images/arrow-right.png" />
|
|
|
</view>
|
|
|
- </picker>
|
|
|
+ </wd-datetime-picker>
|
|
|
<text v-else class="cell-text">{{ formatDate(pipe.nextYearCheckDate) }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -1904,59 +1904,6 @@ const formatDate = (date: string | number | null | undefined): string => {
|
|
|
return date
|
|
|
}
|
|
|
|
|
|
-const parseDate = (dateStr: string): number => {
|
|
|
- if (!dateStr) return 0
|
|
|
- return new Date(dateStr).getTime()
|
|
|
-}
|
|
|
-
|
|
|
-const onAcceptDateChange = (e: any) => {
|
|
|
- equipment.acceptdate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onDesignDateChange = (e: any) => {
|
|
|
- equipment.designdate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onInstallDateChange = (e: any) => {
|
|
|
- equipment.installdate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onNextOnlineDateChange = (e: any) => {
|
|
|
- equipment.nextonlinedate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeUseDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].commissioningDate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeStartDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].constructionStartDate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeCompleteDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].handoverDate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeNextOnlineCheckDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].nextOnlineCheckDate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeLastFullCheckDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].lastalldate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeNextFullCheckDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].nextLegalCheckDate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeLastYearCheckDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].lastonlinedate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
-const onPipeNextYearCheckDateChange = (index: number, e: any) => {
|
|
|
- pipeList.value[index].nextYearCheckDate = parseDate(e.detail.value)
|
|
|
-}
|
|
|
-
|
|
|
defineExpose({
|
|
|
updateAdressInfo: (data: any) => {
|
|
|
Object.assign(equipment, data)
|