2026-07-23 09:31:02 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="page-wrap">
|
|
|
|
|
|
<view class="card">
|
|
|
|
|
|
<uni-card margin="0" :is-shadow="true">
|
|
|
|
|
|
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="dataModel" :rules="rules" ref="wForm" errorType="border-bottom">
|
|
|
|
|
|
|
|
|
|
|
|
<u-form-item label="编号" prop="CODE" borderBottom>
|
|
|
|
|
|
<u--input v-model="dataModel.CODE" disabled disabledColor="#ffffff" placeholder="请输入编号" border="none" inputAlign="right">
|
|
|
|
|
|
</u--input>
|
2026-05-22 11:47:30 +08:00
|
|
|
|
</u-form-item>
|
2026-07-23 09:31:02 +08:00
|
|
|
|
<u-form-item label="作业名称" prop="stepName" borderBottom required>
|
|
|
|
|
|
<u--input v-model="dataModel.Nav_OperationStep.NAME" disabled disabledColor="#ffffff" placeholder="请输入作业名称" border="none" inputAlign="right"></u--input>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item label="作业地点" prop="JOB_LOCATION" borderBottom>
|
|
|
|
|
|
<u--input v-model="dataModel.JOB_LOCATION" placeholder="请输入作业地点" border="none" inputAlign="right"></u--input>
|
|
|
|
|
|
</u-form-item>
|
2026-08-03 10:32:31 +08:00
|
|
|
|
<u-form-item label="交底时间" prop="DISCLOSURE_DATE" borderBottom required @click="showCheckDate()">
|
2026-07-23 09:31:02 +08:00
|
|
|
|
<u--input v-model="dataModel.DISCLOSURE_DATE" placeholder="请输入交底时间" border="none" inputAlign="right">
|
|
|
|
|
|
</u--input>
|
|
|
|
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item label="交底人" prop="disclosurePerson" borderBottom required>
|
|
|
|
|
|
<u--input v-model="dataModel.Nav_DisclosurePerson.NAME" placeholder="请输入交底人" border="none" inputAlign="right">
|
|
|
|
|
|
</u--input>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item label="交底内容" prop="DisclosureContent" borderBottom required class="demo-ruleForm">
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
<u--textarea maxlength="1000" count v-model="dataModel.DisclosureContent" placeholder="请输入交底内容" border="none" inputAlign="left">
|
|
|
|
|
|
</u--textarea>
|
|
|
|
|
|
|
2026-05-22 11:47:30 +08:00
|
|
|
|
<view class="upload-title">附件:</view>
|
2026-07-23 09:31:02 +08:00
|
|
|
|
<full-upload v-model="dataModel.Nav_Files"></full-upload>
|
|
|
|
|
|
<u-form-item label="关联内部工作票" prop="disclosurePerson" borderBottom>
|
|
|
|
|
|
<u--input v-model="(dataModel.Nav_JobName||{}).CODE" disabled disabledColor="#ffffff" border="none" inputAlign="right">
|
|
|
|
|
|
</u--input>
|
|
|
|
|
|
<u-icon style="margin-left: 4px;" slot="right" name="info-circle" v-if="dataModel.Nav_JobName" @click="naviJob(dataModel.Nav_JobName.ID)"></u-icon>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item label="关联动火工作票" prop="disclosurePerson" borderBottom>
|
|
|
|
|
|
<u--input v-model="(dataModel.Nav_FireJob||{}).CODE" disabled disabledColor="#ffffff" border="none" inputAlign="right">
|
|
|
|
|
|
</u--input>
|
|
|
|
|
|
<u-icon style="margin-left: 4px;" slot="right" name="info-circle" v-if="dataModel.Nav_FireJob" @click="naviJob(dataModel.Nav_FireJob.ID)"></u-icon>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
</u--form>
|
|
|
|
|
|
</uni-card>
|
|
|
|
|
|
</view>
|
2026-08-03 10:32:31 +08:00
|
|
|
|
<view class="sub-form" :style="{display:this.isVisble}">
|
|
|
|
|
|
<view class="sub-form-wrap">
|
|
|
|
|
|
<view class="sub-form-btns">
|
|
|
|
|
|
<view class="sub-form-btn" @click="handleAddUser">
|
|
|
|
|
|
<u-icon class="icon" name="plus-circle" color="#3c9cff" size="21"></u-icon>
|
|
|
|
|
|
<u--text type="primary" text="新增作业人员"></u--text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" errorType="border-bottom" ref="sForm1">
|
|
|
|
|
|
<uni-collapse :border="false" accordion>
|
|
|
|
|
|
<uni-card style="margin-bottom: 16px;" margin="0" spacing="0" :is-shadow="false" v-for="(item, index) in dataModel.Nav_Person">
|
|
|
|
|
|
<uni-collapse-item title-border="none" :show-arrow="false" :border="false" :open="true">
|
|
|
|
|
|
<view slot="title" class="custom-collapse-title">
|
|
|
|
|
|
<view class="down">
|
|
|
|
|
|
<uni-icons type="bottom"></uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text" v-if="item.Nav_User">{{index + 1 + '. ' +item.Nav_User.NAME}}</view>
|
|
|
|
|
|
<view class="action" @click.stop>
|
|
|
|
|
|
<u-icon @click="handleDelRowBefore(index)" class="icon" name="trash" color="#ff4d4f" size="21"></u-icon>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<u-form-item v-if="item.Nav_User" label="人员姓名" prop="personName" borderBottom @click="handleChangeUser(item['Nav_User'])">
|
|
|
|
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_User'].NAME" placeholder="请选择人员姓名" border="none" inputAlign="right"></u--input>
|
|
|
|
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down">
|
|
|
|
|
|
</u-icon>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
<u-form-item v-if="item.Nav_User" label="人员编号" prop="personNo" borderBottom>
|
|
|
|
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_User'].CODE" border="none" inputAlign="right"></u--input>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
</uni-collapse-item>
|
|
|
|
|
|
</uni-card>
|
|
|
|
|
|
</uni-collapse>
|
|
|
|
|
|
</u--form>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="sub-form" :style="{display:this.isVisbleOut}">
|
|
|
|
|
|
<view class="sub-form-wrap">
|
|
|
|
|
|
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" errorType="border-bottom" ref="sForm1">
|
|
|
|
|
|
<uni-collapse :border="false" accordion>
|
|
|
|
|
|
<uni-card style="margin-bottom: 16px;" margin="0" spacing="0" :is-shadow="false" v-for="(item, index) in dataModel.Nav_Person">
|
|
|
|
|
|
<uni-collapse-item title-border="none" :show-arrow="false" :border="false" :open="true">
|
|
|
|
|
|
<view slot="title" class="custom-collapse-title">
|
|
|
|
|
|
<view class="down">
|
|
|
|
|
|
<uni-icons type="bottom"></uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="text" v-if="item.Nav_RelatedUser">{{index + 1 + '. ' +item.Nav_RelatedUser.NAME}}</view>
|
|
|
|
|
|
<view class="action" @click.stop>
|
|
|
|
|
|
<u-icon @click="handleDelRowBefore(index)" class="icon" name="trash" color="#ff4d4f" size="21"></u-icon>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<u-form-item label="人员姓名" v-if="item.Nav_RelatedUser" prop="personName" borderBottom>
|
|
|
|
|
|
<u--input disabled disabledColor="#fff" v-model="item['Nav_RelatedUser'].NAME" placeholder="请选择人员姓名" border="none" inputAlign="right"></u--input>
|
|
|
|
|
|
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down">
|
|
|
|
|
|
</u-icon>
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
</uni-collapse-item>
|
|
|
|
|
|
</uni-card>
|
|
|
|
|
|
</uni-collapse>
|
|
|
|
|
|
</u--form>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-07-23 09:31:02 +08:00
|
|
|
|
<u-popup :show="showJobPopup" @close="closeJobPopup" mode="center" :round="12" :closeable="true" :closeOnClickOverlay="true">
|
|
|
|
|
|
<view class="job-popup-wrap">
|
|
|
|
|
|
<view class="job-popup-header">
|
|
|
|
|
|
<text class="job-popup-title">关联工作票详情</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<scroll-view class="job-popup-body" scroll-y :style="{ height: popupHeight + 'px' }">
|
|
|
|
|
|
<!-- 使用 jobShow 组件,传入 id 属性 -->
|
|
|
|
|
|
<job-show v-if="jobShowId&&dataModel.Nav_JobName" :id="jobShowId" ref="jobShowRef"></job-show>
|
|
|
|
|
|
<job-fire-show :isPopupMode="true" v-if="jobShowId&&dataModel.Nav_FireJob" :id="jobShowId" ref="jobFireShowRef"></job-fire-show>
|
|
|
|
|
|
</scroll-view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</u-popup>
|
2026-08-03 10:32:31 +08:00
|
|
|
|
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" title="确认删除?"></u-modal>
|
|
|
|
|
|
<query-selector :show="showPopup" :total="curTotal" :lists="userLists" :defaultValue="currentOperateUser.NAME" @close="handleClosePopup" @search="handleSearchUser" @select="handleSelectedUser" />
|
|
|
|
|
|
<u-picker :show="comPickerInfo.showSheet" :columns="comPickerInfo.columns" @confirm="onConfirmPicker" @close="closePicker" @cancel="closePicker" keyName="NAME"></u-picker>
|
|
|
|
|
|
<u-datetime-picker :show="dateTimePickerInfo.showCheckDate" mode="datetime" v-model='dateTimePickerInfo.defaultDateTime' :formatter="formatter" @confirm="handleCheckDate"
|
|
|
|
|
|
@close="dateTimePickerInfo.showCheckDate = false;" @cancel="dateTimePickerInfo.showCheckDate = false;"></u-datetime-picker>
|
2026-07-23 09:31:02 +08:00
|
|
|
|
<view class="bottom-button">
|
|
|
|
|
|
<button type="primary" @click="submit">提交</button>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
mapState,
|
|
|
|
|
|
mapMutations
|
|
|
|
|
|
} from 'vuex'
|
|
|
|
|
|
import {
|
|
|
|
|
|
extendFilterGroup,
|
|
|
|
|
|
extendGroupRule,
|
|
|
|
|
|
extendInclude,
|
|
|
|
|
|
extendOrder,
|
|
|
|
|
|
extendRule,
|
|
|
|
|
|
guid,
|
|
|
|
|
|
initFilter,
|
|
|
|
|
|
initFilterGroup,
|
|
|
|
|
|
extendIgnoreDataRule
|
|
|
|
|
|
} from '../../../../utils/common'
|
|
|
|
|
|
import {
|
|
|
|
|
|
getRequest,
|
|
|
|
|
|
getUserLists,
|
|
|
|
|
|
saveTechRecord
|
|
|
|
|
|
} from '../../../../services/apply/FOServices/FOServices.js'
|
|
|
|
|
|
import config from '../../../../config/common'
|
2026-08-03 10:32:31 +08:00
|
|
|
|
// 引入 jobShow 组件
|
|
|
|
|
|
import jobShow from './jobShow.vue'
|
|
|
|
|
|
import jobFireShow from './../FO/jobFireShow.vue'
|
2026-07-23 09:31:02 +08:00
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
|
|
|
jobShow,
|
|
|
|
|
|
jobFireShow
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
ID: '',
|
|
|
|
|
|
TaskID: '',
|
|
|
|
|
|
curTotal: 0,
|
|
|
|
|
|
isVisble: 'none',
|
|
|
|
|
|
isVisbleOut: 'none',
|
|
|
|
|
|
showDelModalIndex: undefined,
|
|
|
|
|
|
isLoadOK: false,
|
|
|
|
|
|
tableKey: 0,
|
|
|
|
|
|
formatter: null,
|
|
|
|
|
|
userLists: [],
|
|
|
|
|
|
showJobPopup: false,
|
|
|
|
|
|
jobShowId: null,
|
|
|
|
|
|
popupHeight: 500, // 弹窗内容高度
|
|
|
|
|
|
dataModel: {
|
|
|
|
|
|
CODE: '',
|
|
|
|
|
|
NAME: '',
|
|
|
|
|
|
JOB_LOCATION: '',
|
|
|
|
|
|
Nav_OperationStep: {
|
|
|
|
|
|
NAME: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
Nav_DisclosurePerson: {
|
|
|
|
|
|
NAME: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
subDataModel: {
|
|
|
|
|
|
Nav_Person: {
|
|
|
|
|
|
Nav_User: {
|
|
|
|
|
|
NAME: '',
|
|
|
|
|
|
CODE: '',
|
|
|
|
|
|
},
|
|
|
|
|
|
Nav_RelatedUser: {
|
|
|
|
|
|
NAME: '',
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
options: [{
|
|
|
|
|
|
text: '删除',
|
|
|
|
|
|
style: {
|
|
|
|
|
|
backgroundColor: '#f56c6c'
|
|
|
|
|
|
}
|
|
|
|
|
|
}],
|
|
|
|
|
|
comPickerInfo: {
|
|
|
|
|
|
showSheet: false,
|
|
|
|
|
|
columns: [],
|
|
|
|
|
|
title: '',
|
|
|
|
|
|
dataIndex: undefined,
|
|
|
|
|
|
formIndex: undefined,
|
|
|
|
|
|
name: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
currentOperateUser: {},
|
|
|
|
|
|
showPopup: false,
|
|
|
|
|
|
dateTimePickerInfo: {
|
|
|
|
|
|
showCheckDate: false,
|
|
|
|
|
|
dataIndex: undefined,
|
|
|
|
|
|
defaultDateTime: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM'),
|
|
|
|
|
|
value: '',
|
|
|
|
|
|
name: ''
|
|
|
|
|
|
},
|
|
|
|
|
|
rules: {
|
|
|
|
|
|
'JOB_LOCATION': {
|
|
|
|
|
|
type: 'string',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
trigger: ['blur', 'change']
|
|
|
|
|
|
},
|
|
|
|
|
|
'DisclosureContent': {
|
|
|
|
|
|
type: 'string',
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
trigger: ['blur', 'change']
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(opt) {
|
|
|
|
|
|
this.handleGetTechGet(opt)
|
|
|
|
|
|
// 计算弹窗高度
|
2026-08-03 10:32:31 +08:00
|
|
|
|
this.calcPopupHeight()
|
2026-07-23 09:31:02 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2026-08-03 10:32:31 +08:00
|
|
|
|
// 计算弹窗高度
|
|
|
|
|
|
calcPopupHeight() {
|
|
|
|
|
|
const systemInfo = uni.getSystemInfoSync()
|
|
|
|
|
|
const windowHeight = systemInfo.windowHeight
|
|
|
|
|
|
// 弹窗占屏幕高度的 70%,减去头部高度
|
|
|
|
|
|
this.popupHeight = Math.floor(windowHeight * 0.7) - 60
|
|
|
|
|
|
},
|
2026-07-23 09:31:02 +08:00
|
|
|
|
naviJob(id) {
|
|
|
|
|
|
if (!id) {
|
|
|
|
|
|
uni.$showErrorInfo('未找到关联的工作票')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
this.jobShowId = id
|
|
|
|
|
|
this.showJobPopup = true
|
|
|
|
|
|
},
|
|
|
|
|
|
// 关闭弹窗
|
2026-08-03 10:32:31 +08:00
|
|
|
|
closeJobPopup() {
|
|
|
|
|
|
this.showJobPopup = false
|
|
|
|
|
|
// 延迟清空 id,避免组件销毁问题
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.jobShowId = null
|
|
|
|
|
|
}, 300)
|
|
|
|
|
|
},
|
2026-07-23 09:31:02 +08:00
|
|
|
|
handleGetTechGet(opt) {
|
|
|
|
|
|
this.TaskID = opt.taskID ? opt.taskID : '';
|
|
|
|
|
|
this.ID = opt.ID ? opt.ID : '';
|
|
|
|
|
|
const orgId = uni.getStorageSync('orgId')
|
|
|
|
|
|
const json = initFilter(orgId, "", "")
|
|
|
|
|
|
extendRule(json, 'ID', 1, opt.ID)
|
|
|
|
|
|
// extendIgnoreDataRule(json)
|
|
|
|
|
|
// TODO: id 未获取
|
|
|
|
|
|
getRequest(json, "/FO/FOTechDisclosureFrom/GetEdit").then(res => {
|
|
|
|
|
|
this.dataModel = res
|
|
|
|
|
|
if (res.Nav_Person && res.Nav_Person.length > 0) {
|
|
|
|
|
|
for (let i = 0; i < res.Nav_Person.length; i++) {
|
|
|
|
|
|
if (res.Nav_Person[i].User_ID === null) {
|
|
|
|
|
|
res.Nav_Person[i].Nav_User = null
|
|
|
|
|
|
}
|
|
|
|
|
|
if (res.Nav_Person[i].RELATED_USER_ID === null) {
|
|
|
|
|
|
res.Nav_Person[i].Nav_RelatedUser = null
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (res.IS_OUTSOURCE == true && res.RELATED_ID != null) {
|
|
|
|
|
|
this.isVisble = 'none'
|
|
|
|
|
|
this.isVisbleOut = 'block'
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.isVisble = 'block'
|
|
|
|
|
|
this.isVisbleOut = 'none'
|
|
|
|
|
|
}
|
|
|
|
|
|
this.isLoadOK = true
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2026-08-03 10:32:31 +08:00
|
|
|
|
//显示时间控件
|
|
|
|
|
|
showCheckDate() {
|
|
|
|
|
|
if (this.dataModel.DISCLOSURE_DATE == null) {
|
|
|
|
|
|
this.dataModel.DISCLOSURE_DATE = uni.$u.timeFormat(new Date(),
|
|
|
|
|
|
'yyyy-mm-dd hh:MM:ss')
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dateTimePickerInfo = {
|
|
|
|
|
|
showCheckDate: true,
|
|
|
|
|
|
defaultDateTime: this.dataModel.DISCLOSURE_DATE,
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
//隐藏控件 显示时间
|
|
|
|
|
|
handleCheckDate(e) {
|
|
|
|
|
|
this.dataModel.DISCLOSURE_DATE = uni.$u.timeFormat(e.value,
|
|
|
|
|
|
'yyyy-mm-dd hh:MM:ss')
|
|
|
|
|
|
this.dateTimePickerInfo.showCheckDate = false
|
|
|
|
|
|
},
|
|
|
|
|
|
handleSearchUser(val, pageIndex) {
|
|
|
|
|
|
const orgId = uni.getStorageSync('orgId')
|
|
|
|
|
|
const json = initFilter(orgId, "", "NAME", '', pageIndex)
|
|
|
|
|
|
extendInclude(json, "Nav_Department")
|
|
|
|
|
|
extendRule(json, 'ENABLE_STATUS', 1, '0')
|
|
|
|
|
|
if (val !== 'init') {
|
|
|
|
|
|
const tempGroup = initFilterGroup(false);
|
|
|
|
|
|
extendGroupRule(tempGroup, 'NAME', 9, val)
|
|
|
|
|
|
extendFilterGroup(json, tempGroup);
|
|
|
|
|
|
}
|
|
|
|
|
|
json.Limit = 20
|
|
|
|
|
|
if (pageIndex) {
|
|
|
|
|
|
json.Start = (pageIndex - 1) * 20;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getUserLists(json).then(res => {
|
|
|
|
|
|
if (res.IsSuccessful) {
|
|
|
|
|
|
this.userLists = res.Data.map(i => {
|
|
|
|
|
|
return {
|
|
|
|
|
|
...i,
|
|
|
|
|
|
name: i.NAME,
|
|
|
|
|
|
code: i.CODE
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
this.curTotal = res.TotalCount
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
handleSelectedUser(val) {
|
|
|
|
|
|
this.showPopup = false
|
|
|
|
|
|
this.lists = []
|
|
|
|
|
|
const result = this.dataModel.Nav_Person.map((obj) => {
|
|
|
|
|
|
const {
|
|
|
|
|
|
Nav_User
|
|
|
|
|
|
} = obj
|
|
|
|
|
|
if (Nav_User.CODE === this.currentOperateUser.CODE) {
|
|
|
|
|
|
return Object.assign({}, obj, {
|
|
|
|
|
|
Nav_User: val,
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
return obj
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.dataModel.Nav_Person = result
|
|
|
|
|
|
},
|
|
|
|
|
|
handleClosePopup() {
|
|
|
|
|
|
this.showPopup = false
|
|
|
|
|
|
},
|
|
|
|
|
|
handleChangeUser(user) {
|
|
|
|
|
|
this.currentOperateUser = user
|
|
|
|
|
|
this.showPopup = true
|
|
|
|
|
|
this.handleSearchUser('init')
|
|
|
|
|
|
},
|
|
|
|
|
|
handleAddUser() {
|
|
|
|
|
|
const identifyUser = JSON.parse(JSON.stringify(this.subDataModel.Nav_Person))
|
|
|
|
|
|
this.dataModel.Nav_Person.unshift(identifyUser)
|
|
|
|
|
|
// this.dataModel.Nav_Person.unshift(this.subDataModel)
|
|
|
|
|
|
},
|
|
|
|
|
|
handleDelRowBefore(index) {
|
|
|
|
|
|
this.showDelModalIndex = index
|
|
|
|
|
|
},
|
|
|
|
|
|
confirmDel() {
|
|
|
|
|
|
this.dataModel.Nav_Person.splice(this.showDelModalIndex, 1)
|
|
|
|
|
|
this.showDelModalIndex = undefined
|
|
|
|
|
|
},
|
|
|
|
|
|
onConfirmPicker(e) {
|
|
|
|
|
|
const {
|
|
|
|
|
|
name,
|
|
|
|
|
|
dataIndex,
|
|
|
|
|
|
formIndex
|
|
|
|
|
|
} = this.comPickerInfo
|
|
|
|
|
|
if (formIndex === "sForm1") {
|
|
|
|
|
|
const result = this.dataModel.Nav_Person.map((obj, index) => {
|
|
|
|
|
|
if (index === dataIndex) {
|
|
|
|
|
|
return Object.assign({}, obj, {
|
|
|
|
|
|
// ATTEND_STATUS: e.value[0].ID,
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
return obj
|
|
|
|
|
|
})
|
|
|
|
|
|
this.dataModel.Nav_Person = result
|
|
|
|
|
|
} else {
|
2026-07-23 09:31:02 +08:00
|
|
|
|
|
2026-08-03 10:32:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
this.comPickerInfo.showSheet = false
|
|
|
|
|
|
},
|
|
|
|
|
|
closePicker() {
|
|
|
|
|
|
this.comPickerInfo = {
|
|
|
|
|
|
showSheet: false,
|
|
|
|
|
|
columns: [],
|
|
|
|
|
|
title: '',
|
|
|
|
|
|
name: '',
|
|
|
|
|
|
dataIndex: undefined,
|
|
|
|
|
|
formIndex: undefined
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
handleDelAction({
|
|
|
|
|
|
name
|
|
|
|
|
|
}) {
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
title: '是否删除数据?',
|
|
|
|
|
|
success: (res) => {
|
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
submit() {
|
|
|
|
|
|
const ele = this.$refs
|
|
|
|
|
|
this.dataModel.PUBLISH = "SaveAndNotify";
|
|
|
|
|
|
if (this.TaskID !== null) {
|
|
|
|
|
|
this.dataModel.TaskID = this.TaskID;
|
|
|
|
|
|
}
|
|
|
|
|
|
this.dataModel.ID = this.ID ? this.ID : guid();
|
|
|
|
|
|
this.dataModel.ORG_ID = uni.getStorageSync('orgId')
|
|
|
|
|
|
ele['wForm'].validate().then(res => {
|
|
|
|
|
|
saveTechRecord(this.dataModel).then(res => {
|
|
|
|
|
|
uni.$showMsgFunc('操作成功!', () => {
|
|
|
|
|
|
// if (this.tableKey == null || this.tableKey == 0) {
|
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
|
// url: 'techRecord'
|
|
|
|
|
|
// })
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
uni.navigateBack()
|
|
|
|
|
|
// }
|
|
|
|
|
|
}, 'success', 1000)
|
|
|
|
|
|
})
|
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
|
uni.$showErrorInfo('请检查必填项,必填项不能为空')
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
uploadFilePromise(url) {
|
|
|
|
|
|
const appInfoData = uni.getStorageSync('appInfo')
|
|
|
|
|
|
const userId = appInfoData?.User?.ID || ''
|
|
|
|
|
|
const orgId = uni.getStorageSync('orgId')
|
|
|
|
|
|
const tenant = uni.getStorageSync('Tenant') || ''
|
|
|
|
|
|
const remoteUrl = config.serviceHost('/PF/File/UploadFile')
|
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
|
uni.uploadFile({
|
|
|
|
|
|
url: remoteUrl,
|
|
|
|
|
|
filePath: url,
|
|
|
|
|
|
fileList: url,
|
|
|
|
|
|
name: 'file',
|
|
|
|
|
|
formData: {
|
|
|
|
|
|
OrgId: orgId
|
|
|
|
|
|
},
|
|
|
|
|
|
header: {
|
|
|
|
|
|
Tenant: tenant,
|
|
|
|
|
|
userid: userId
|
|
|
|
|
|
},
|
|
|
|
|
|
success: (res) => {
|
|
|
|
|
|
if (res.statusCode === 200) {
|
|
|
|
|
|
const uploadResult = JSON.parse(res.data)
|
|
|
|
|
|
if (uploadResult.IsSuccessful) {
|
|
|
|
|
|
resolve(uploadResult.Data)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2026-07-23 09:31:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
@import url("../../../../style/css/editTemplate.css");
|
|
|
|
|
|
|
|
|
|
|
|
.page-wrap {
|
|
|
|
|
|
padding: 16px 16px 166px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.card {
|
|
|
|
|
|
margin-bottom: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sub-form {
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.demo-ruleForm>>>.u-textarea {
|
|
|
|
|
|
padding: 9px 9px 25px 9px;
|
|
|
|
|
|
/* padding: 6px 9px; */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bottom-button {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
bottom: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
padding: 10px 16px;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
z-index: 999;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.upload-title {
|
|
|
|
|
|
color: #303133;
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.page-wrap>>>.u-upload__button {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
/* 弹窗样式 */
|
2026-08-03 10:32:31 +08:00
|
|
|
|
.job-popup-wrap {
|
|
|
|
|
|
width: 92vw;
|
|
|
|
|
|
max-width: 600px;
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.job-popup-header {
|
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.job-popup-title {
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.job-popup-body {
|
|
|
|
|
|
/* padding: 0 16px 16px; */
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 弹窗内部滚动条样式 */
|
|
|
|
|
|
.job-popup-body::-webkit-scrollbar {
|
|
|
|
|
|
width: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.job-popup-body::-webkit-scrollbar-thumb {
|
|
|
|
|
|
background: #ddd;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
}
|
2026-07-23 09:31:02 +08:00
|
|
|
|
</style>
|