新增“保存”按钮,

This commit is contained in:
yunkexin 2026-07-13 15:44:38 +08:00
parent aae9f75c91
commit 7faa266357
7 changed files with 2434 additions and 2394 deletions

View File

@ -83,9 +83,9 @@
</view> --> </view> -->
<view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button"> <view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button">
<button type="default" @click="submit('Save')" :plain="true" <button @click="submit('Save')" :plain="true"
style="margin-right: 5px;background-color: #fff;color: #3d4b70;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">保存</button> style="margin-right: 5px;background-color: #fff;color: #3d4b70;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">保存</button>
<button type="default" @click="submit('SaveAndNotify')" <button @click="submit('SaveAndNotify')"
style="margin-left: 5px;background-color: #3d4b70;color: #fff;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">提交</button> style="margin-left: 5px;background-color: #3d4b70;color: #fff;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">提交</button>
</view> </view>
<u-datetime-picker :show="dateTimePickerInfo.showCheckDate" v-model='dateTimePickerInfo.defaultDateTime' @confirm="handleCheckDate" @close="dateTimePickerInfo.showCheckDate = false" <u-datetime-picker :show="dateTimePickerInfo.showCheckDate" v-model='dateTimePickerInfo.defaultDateTime' @confirm="handleCheckDate" @close="dateTimePickerInfo.showCheckDate = false"

File diff suppressed because it is too large Load Diff

View File

@ -9,12 +9,12 @@
</view> </view>
<view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">基本信息填写</view> <view style="font-size: 15px; font-weight: bold;color: #3d4b70;margin-bottom: 10px;">基本信息填写</view>
<u-form-item label="发起人:" prop="Nav_User.NAME" @click="handleChangeMonitor('Nav_ApplyUser')" borderBottom> <u-form-item label="发起人:" prop="Nav_User.NAME" @click="handleChangeMonitor('Nav_ApplyUser')" borderBottom>
<u--input disabledColor="#fff" v-model="(model.Nav_ApplyUser||{}).NAME" disabled placeholder="请选择发起人" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px" <u--input disabledColor="#fff" v-model="(model.Nav_ApplyUser||{}).NAME" disabled placeholder="请选择发起人" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right"> customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
</u--input> </u--input>
</u-form-item> </u-form-item>
<u-form-item label="发起部门:" prop="Nav_User.NAME" @click="handleChangeMonitor('Nav_ApplyDepartment')" borderBottom> <u-form-item label="发起部门:" prop="Nav_User.NAME" @click="handleChangeMonitor('Nav_ApplyDepartment')" borderBottom>
<u--input disabledColor="#fff" v-model="(model.Nav_ApplyDepartment||{}).NAME" disabled placeholder="请选择发起部门" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px" <u--input disabledColor="#fff" v-model="(model.Nav_ApplyDepartment||{}).NAME" disabled placeholder="请选择发起部门" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right"> customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
</u--input> </u--input>
@ -33,12 +33,12 @@
<u--input disabled disabledColor="#fff" v-model="model.JOB_END_DATE" placeholder="请选择值班结束时间" border="none" inputAlign="right" fontSize="14px"></u--input> <u--input disabled disabledColor="#fff" v-model="model.JOB_END_DATE" placeholder="请选择值班结束时间" border="none" inputAlign="right" fontSize="14px"></u--input>
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon> <u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="班次:" prop="Nav_Class.NAME" @click="handleChangeMonitor('Nav_Class')" borderBottom> <u-form-item label="班次:" prop="Nav_Class.NAME" @click="handleChangeMonitor('Nav_Class')" borderBottom>
<u--input disabledColor="#fff" v-model="(model.Nav_Class||{}).NAME" disabled placeholder="请选择班次" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px" <u--input disabledColor="#fff" v-model="(model.Nav_Class||{}).NAME" disabled placeholder="请选择班次" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right"> customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
</u--input> </u--input>
</u-form-item> </u-form-item>
<u-form-item label="值班领导" @click="handleShowSheet({title: '值班领导', name: 'Nav_Users'})"> <u-form-item label="值班领导" @click="handleShowSheet({title: '值班领导', name: 'Nav_Users'})">
<u-icon name="man-add" size="24" color="#3d9cff" slot="right"></u-icon> <u-icon name="man-add" size="24" color="#3d9cff" slot="right"></u-icon>
</u-form-item> </u-form-item>
<view class="tag-view" v-if="model.Nav_Users"> <view class="tag-view" v-if="model.Nav_Users">
@ -49,7 +49,7 @@
<u-form-item label="交接班地点" prop="LOCATION" borderBottom> <u-form-item label="交接班地点" prop="LOCATION" borderBottom>
<u--input disabledColor="#ffffff" v-model="model.PLACE" border="none" inputAlign="right" fontSize="14px" placeholder="请输入地点"></u--input> <u--input disabledColor="#ffffff" v-model="model.PLACE" border="none" inputAlign="right" fontSize="14px" placeholder="请输入地点"></u--input>
</u-form-item> </u-form-item>
<u-form-item label="接班人" @click="handleShowSheet({title: '接班人', name: 'Nav_AfterUsers'})"> <u-form-item label="接班人" @click="handleShowSheet({title: '接班人', name: 'Nav_AfterUsers'})">
<u-icon name="man-add" size="24" color="#3d9cff" slot="right"></u-icon> <u-icon name="man-add" size="24" color="#3d9cff" slot="right"></u-icon>
</u-form-item> </u-form-item>
<view class="tag-view" v-if="model.Nav_AfterUsers"> <view class="tag-view" v-if="model.Nav_AfterUsers">
@ -92,7 +92,7 @@
<u--input disabled disabledColor="#fff" v-model="item.END_DATE" placeholder="请选择结束时间" border="none" inputAlign="right" fontSize="14px"></u--input> <u--input disabled disabledColor="#fff" v-model="item.END_DATE" placeholder="请选择结束时间" border="none" inputAlign="right" fontSize="14px"></u--input>
<u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon> <u-icon style="margin-left: 4px;" name="arrow-down" size="12"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="巡视区域" @click="handleShowSheet({title: '巡视区域', name: 'Nav_DetailAreas',itemData:item})"> <u-form-item label="巡视区域" @click="handleShowSheet({title: '巡视区域', name: 'Nav_DetailAreas',itemData:item})">
<u-icon name="man-add" size="24" color="#3d9cff" slot="right"></u-icon> <u-icon name="man-add" size="24" color="#3d9cff" slot="right"></u-icon>
</u-form-item> </u-form-item>
<view class="tag-view" v-if="item.Nav_DetailAreas"> <view class="tag-view" v-if="item.Nav_DetailAreas">
@ -110,7 +110,7 @@
</u-form-item> </u-form-item>
<u--textarea autoHeight v-model="item.MEASURE" placeholder="请输入处置措施" border="surround"></u--textarea> <u--textarea autoHeight v-model="item.MEASURE" placeholder="请输入处置措施" border="surround"></u--textarea>
<u-form-item label="现场责任人:" prop="Nav_User.NAME" @click="handleShowSheet({title: '现场责任人', name: 'Nav_User',itemData:item})" borderBottom> <u-form-item label="现场责任人:" prop="Nav_User.NAME" @click="handleShowSheet({title: '现场责任人', name: 'Nav_User',itemData:item})" borderBottom>
<u--input disabledColor="#fff" v-model="(item.Nav_User||{}).NAME" disabled placeholder="请选择现场责任人" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px" <u--input disabledColor="#fff" v-model="(item.Nav_User||{}).NAME" disabled placeholder="请选择现场责任人" suffixIcon="arrow-down" suffixIconStyle="font-size:12px" fontSize="14px"
customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right"> customStyle="margin:0px;display:flex;padding:3px 0px" border="none" inputAlign="right">
</u--input> </u--input>
@ -137,9 +137,12 @@
</view> </view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPageList === 1" class="bottom-button"> <view style="padding: 10px 16px;display: flex;flex-direction: column;" v-if="stepsPageList === 1" class="bottom-button">
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button> <u-button @click="submit('0')" :plain="true" color="#3d4b70">保存</u-button>
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button> <view style="display: flex;flex-direction: row;margin-top: 10px;">
<u-button @click="stepReduce" :plain="true" color="#3d4b70" style="margin-right: 5px;">上一步</u-button>
<u-button @click="submit('SaveAndNotify')" color="#3d4b70" style="margin-left: 5px">提交</u-button>
</view>
</view> </view>
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked" <query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" /> @search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
@ -475,8 +478,8 @@
handleNewCheckArea() { handleNewCheckArea() {
this.model.Nav_Details.push({ this.model.Nav_Details.push({
ID: guid(), ID: guid(),
LEADER_WELL_RECORD_ID:this.model.ID, LEADER_WELL_RECORD_ID: this.model.ID,
ORG_ID:uni.getStorageSync('orgId'), ORG_ID: uni.getStorageSync('orgId'),
START_DATE: '', START_DATE: '',
END_DATE: '', END_DATE: '',
Nav_DetailAreas: [], Nav_DetailAreas: [],
@ -730,24 +733,24 @@
this.dateTimePickerInfo.showCheckDate = false this.dateTimePickerInfo.showCheckDate = false
}, },
submit() { submit(type) {
this.modelEdit = JSON.parse(JSON.stringify(this.model)) this.modelEdit = JSON.parse(JSON.stringify(this.model))
delete this.modelEdit.Nav_ApplyDepartment delete this.modelEdit.Nav_ApplyDepartment
delete this.modelEdit.Nav_ApplyUser delete this.modelEdit.Nav_ApplyUser
delete this.modelEdit.Nav_Class delete this.modelEdit.Nav_Class
delete this.modelEdit.Nav_ProductionUnit delete this.modelEdit.Nav_ProductionUnit
if(this.modelEdit.Nav_Details&&this.modelEdit.Nav_Details.length>0){ if (this.modelEdit.Nav_Details && this.modelEdit.Nav_Details.length > 0) {
this.modelEdit.Nav_Details.map(item => { this.modelEdit.Nav_Details.map(item => {
item.PUBLISH = 'SaveAndNotify' item.PUBLISH = type
delete item.Nav_User delete item.Nav_User
if(item.Nav_DetailAreas&&item.Nav_DetailAreas.length>0){ if (item.Nav_DetailAreas && item.Nav_DetailAreas.length > 0) {
item.Nav_DetailAreas.map(item1=>{ item.Nav_DetailAreas.map(item1 => {
delete item1.Nav_Area delete item1.Nav_Area
}) })
} }
}) })
} }
if (this.TaskID == null || this.TaskID == '') { if (this.TaskID == null || this.TaskID == '') {
this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000' this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000'
} else { } else {
@ -756,7 +759,7 @@
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '') if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
this.modelEdit.ORG_ID = this.ORG_ID this.modelEdit.ORG_ID = this.ORG_ID
this.modelEdit.PUBLISH = 'SaveAndNotify' this.modelEdit.PUBLISH = type;
fullFOLeaderWellRecord(this.modelEdit).then(res => { fullFOLeaderWellRecord(this.modelEdit).then(res => {
if (res) { if (res) {
uni.$showMsgFunc('操作成功!', () => { uni.$showMsgFunc('操作成功!', () => {

View File

@ -191,9 +191,12 @@
</view> </view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" v-if="stepsPageList === 2" class="bottom-button"> <view style="padding: 10px 16px;display: flex;flex-direction: column;" v-if="stepsPageList === 2" class="bottom-button">
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button> <u-button @click="submit('0')" :plain="true" color="#3d4b70">保存</u-button>
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button> <view style="display: flex;flex-direction: row;margin-top: 10px;">
<u-button @click="stepReduce" :plain="true" color="#3d4b70" style="margin-right: 5px;">上一步</u-button>
<u-button @click="submit('SaveAndNotify')" color="#3d4b70" style="margin-left: 5px">提交</u-button>
</view>
</view> </view>
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked" <query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
@search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" /> @search="handleSearch" @select="handleSelected" @close="selectorInfo.showPopup=false" :total="selectorInfo.totalCount" />
@ -921,7 +924,7 @@
this.dateTimePickerInfo.showCheckDate = false this.dateTimePickerInfo.showCheckDate = false
}, },
submit() { submit(type) {
this.modelEdit = JSON.parse(JSON.stringify(this.model)) this.modelEdit = JSON.parse(JSON.stringify(this.model))
delete this.modelEdit.Nav_ApplyDepartment delete this.modelEdit.Nav_ApplyDepartment
delete this.modelEdit.Nav_ApplyUser delete this.modelEdit.Nav_ApplyUser
@ -939,7 +942,7 @@
} }
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) { if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
this.modelEdit.Nav_Users.map(item => { this.modelEdit.Nav_Users.map(item => {
item.PUBLISH = 'SaveAndNotify' item.PUBLISH = type
delete item.Nav_Train delete item.Nav_Train
delete item.Nav_User delete item.Nav_User
delete item.Nav_UserType delete item.Nav_UserType
@ -958,8 +961,7 @@
} }
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '') if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
this.modelEdit.ORG_ID = this.ORG_ID this.modelEdit.ORG_ID = this.ORG_ID
this.modelEdit.PUBLISH = type;
this.modelEdit.PUBLISH = 'SaveAndNotify'
fullFOFireJob(this.modelEdit).then(res => { fullFOFireJob(this.modelEdit).then(res => {
if (res) { if (res) {
uni.$showMsgFunc('操作成功!', () => { uni.$showMsgFunc('操作成功!', () => {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -270,11 +270,13 @@
</u--form> </u--form>
</view> </view>
</view> </view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button" v-if="stepsPage === 4"> <view style="padding: 10px 16px;display: flex;flex-direction: column;" class="bottom-button" v-if="stepsPage === 4">
<button type="default" @click="stepReduceTwo" :plain="true" <u-button @click="stepSubmit('Save')" :plain="true" color="#3d4b70">保存</u-button>
style="margin-right: 5px;background-color: #fff;color: #3d4b70;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">上一步</button> <view style="display: flex;flex-direction: row;margin-top: 10px;">
<button type="default" @click="stepSubmit" <u-button @click="stepReduceTwo" :plain="true" color="#3d4b70" style="margin-right: 5px;">上一步</u-button>
style="margin-left: 5px;background-color: #3d4b70;color: #fff;width: 50%;height: 40px;display: flex;align-items: center;justify-content: center;font-size: 14px;">提交</button> <u-button @click="stepSubmit('SaveAndNotify')" color="#3d4b70" style="margin-left: 5px">提交</u-button>
</view>
</view> </view>
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal> <u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" @cancel="cacelDel" :showCancelButton="true" title="确认删除?"></u-modal>
<u-modal :show="showDelModalDetail >= 0" @confirm="confirmDelDetail" @cancel="cacelDelDetail" :showCancelButton="true" title="确认删除?"></u-modal> <u-modal :show="showDelModalDetail >= 0" @confirm="confirmDelDetail" @cancel="cacelDelDetail" :showCancelButton="true" title="确认删除?"></u-modal>
@ -364,7 +366,7 @@
Nav_Department: { Nav_Department: {
NAME: '' NAME: ''
}, },
Nav_Area:{ Nav_Area: {
NAME: '' NAME: ''
}, },
// Nav_ApplyUser: { // Nav_ApplyUser: {
@ -1272,7 +1274,7 @@
formIndex: undefined formIndex: undefined
} }
}, },
stepSubmit() { stepSubmit(type) {
this.numC = 0; this.numC = 0;
this.dataModel.Nav_DealMeasures.map((item) => { this.dataModel.Nav_DealMeasures.map((item) => {
if (item.NAME == '') { if (item.NAME == '') {
@ -1285,7 +1287,7 @@
uni.$showErrorInfo('添加作业后处理措施信息不能为空') uni.$showErrorInfo('添加作业后处理措施信息不能为空')
} else { } else {
this.modelEdit = JSON.parse(JSON.stringify(this.dataModel)) this.modelEdit = JSON.parse(JSON.stringify(this.dataModel))
this.modelEdit.PUBLISH = "SaveAndNotify";
if (this.TaskID !== null) { if (this.TaskID !== null) {
this.modelEdit.TaskID = this.TaskID; this.modelEdit.TaskID = this.TaskID;
} }
@ -1300,7 +1302,12 @@
} }
} }
delete this.modelEdit.Nav_Department delete this.modelEdit.Nav_Department
delete this.modelEdit.Nav_Area delete this.modelEdit.Nav_Area
if (type == 'SaveAndNotify') {
this.modelEdit.PUBLISH = "SaveAndNotify";
} else {
this.modelEdit.PUBLISH = null;
}
saveJobRecord(this.modelEdit).then(res => { saveJobRecord(this.modelEdit).then(res => {
uni.$showMsgFunc('操作成功!', () => { uni.$showMsgFunc('操作成功!', () => {
// if (this.tableKey == null || this.tableKey == 0) { // if (this.tableKey == null || this.tableKey == 0) {