新增“保存”按钮,

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 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>
<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>
</view>
<u-datetime-picker :show="dateTimePickerInfo.showCheckDate" v-model='dateTimePickerInfo.defaultDateTime' @confirm="handleCheckDate" @close="dateTimePickerInfo.showCheckDate = false"

View File

@ -86,8 +86,10 @@
<query-selector :show="showPopupMainUser" :total="curTotalMainUser" :lists="mainUserLists" :defaultValue="currentOperateMainUser.NAME" @close="handleClosePopupMainUser" @search="handleSearchMainUser"
@select="handleSelectedMainUser" />
<u-picker :show="comPickerInfo.showSheet" :columns="comPickerInfo.columns" @confirm="onConfirmPicker" @close="closePicker" @cancel="closePicker" keyName="NAME"></u-picker>
<view class="bottom-button">
<u-button type="primary" @click="submit" v-if='tableKey==1||isAdd==1' color="#3d4b70">提交</u-button>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button">
<u-button type="default" @click="submit('Save')" :plain="true" color="#3d4b70" style="margin-right: 5px;">保存</u-button>
<!-- <u-button type="primary" @click="submit" v-if='tableKey==1||isAdd==1' color="#3d4b70">提交</u-button> -->
<u-button type="default" @click="submit('SaveAndNotify')" v-if='tableKey==1||isAdd==1' color="#3d4b70" style="margin-left: 5px;">提交</u-button>
</view>
</view>
</template>
@ -132,9 +134,9 @@
showPopupMainUser: false,
model: {
TITLE: "",
ADDRESS:"",
DURATION:"",
ACTIVITY_CONTENT:"",
ADDRESS: "",
DURATION: "",
ACTIVITY_CONTENT: "",
ACTIVITY_TIME: '',
ORG_ID: "",
NOTE_AKER_ID: "",
@ -256,8 +258,7 @@
const json = initFilter(orgId, "", "NAME", '', pageIndex)
extendInclude(json, "Nav_Department")
extendRule(json, 'ENABLE_STATUS', 1, '0')
if(orgId === '8b3c41aa-51b1-7ce9-1879-248a038c1b5c')
{
if (orgId === '8b3c41aa-51b1-7ce9-1879-248a038c1b5c') {
extendRule(json, 'DEPARTMENT_ID', 1, uni.getStorageSync('appInfo')?.User?.DEPARTMENT_ID)
}
if (val !== 'init') {
@ -302,8 +303,7 @@
const json = initFilter(orgId, "", "NAME", '', pageIndex)
extendInclude(json, "Nav_Department")
extendRule(json, 'ENABLE_STATUS', 1, '0')
if(orgId === '8b3c41aa-51b1-7ce9-1879-248a038c1b5c')
{
if (orgId === '8b3c41aa-51b1-7ce9-1879-248a038c1b5c') {
extendRule(json, 'DEPARTMENT_ID', 1, uni.getStorageSync('appInfo')?.User?.DEPARTMENT_ID)
}
if (val !== 'init') {
@ -390,8 +390,7 @@
getRequest(json, "/FO/TeamActivity/Get").then(res => {
this.model = res;
if(res.USER_ID == null)
{
if (res.USER_ID == null) {
// res.USER_ID = uni.getStorageSync('appInfo').User.ID;
res.Nav_MainUser = {};
}
@ -479,7 +478,7 @@
this.showCheckDate = false
this.model.ACTIVITY_TIME = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
submit() {
submit(type) {
if (this.model.TITLE == "") {
uni.$showMsgFunc('请填写活动主题!', () => {}, 'error', 1000)
return;
@ -521,6 +520,11 @@
item.TEAM_ACTIVITY_ID = this.model.ID;
}
});
if (type == 'SaveAndNotify') {
this.model.OpType = 0;
} else {
this.model.OpType = 1;
}
const ele = this.$refs
ele['wForm'].validate().then(res => {
getRequest(this.model, "/FO/FOTeamActivity/FullUpdate").then(res => {
@ -600,6 +604,7 @@
background: #edf1fd;
z-index: 999;
}
.sub-form-btn {
display: flex;
flex-direction: row;
@ -621,6 +626,7 @@
.sub-form>>>.uni-card {
border-radius: 0;
}
.sub-form>>>.u-form-item__body {
padding: 15px 0px;
}

View File

@ -137,9 +137,12 @@
</view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" 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 type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
<view style="padding: 10px 16px;display: flex;flex-direction: column;" v-if="stepsPageList === 1" class="bottom-button">
<u-button @click="submit('0')" :plain="true" color="#3d4b70">保存</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>
<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" />
@ -475,8 +478,8 @@
handleNewCheckArea() {
this.model.Nav_Details.push({
ID: guid(),
LEADER_WELL_RECORD_ID:this.model.ID,
ORG_ID:uni.getStorageSync('orgId'),
LEADER_WELL_RECORD_ID: this.model.ID,
ORG_ID: uni.getStorageSync('orgId'),
START_DATE: '',
END_DATE: '',
Nav_DetailAreas: [],
@ -730,18 +733,18 @@
this.dateTimePickerInfo.showCheckDate = false
},
submit() {
submit(type) {
this.modelEdit = JSON.parse(JSON.stringify(this.model))
delete this.modelEdit.Nav_ApplyDepartment
delete this.modelEdit.Nav_ApplyUser
delete this.modelEdit.Nav_Class
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 => {
item.PUBLISH = 'SaveAndNotify'
item.PUBLISH = type
delete item.Nav_User
if(item.Nav_DetailAreas&&item.Nav_DetailAreas.length>0){
item.Nav_DetailAreas.map(item1=>{
if (item.Nav_DetailAreas && item.Nav_DetailAreas.length > 0) {
item.Nav_DetailAreas.map(item1 => {
delete item1.Nav_Area
})
}
@ -756,7 +759,7 @@
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
this.modelEdit.ORG_ID = this.ORG_ID
this.modelEdit.PUBLISH = 'SaveAndNotify'
this.modelEdit.PUBLISH = type;
fullFOLeaderWellRecord(this.modelEdit).then(res => {
if (res) {
uni.$showMsgFunc('操作成功!', () => {

View File

@ -191,9 +191,12 @@
</view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" 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 type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
<view style="padding: 10px 16px;display: flex;flex-direction: column;" v-if="stepsPageList === 2" class="bottom-button">
<u-button @click="submit('0')" :plain="true" color="#3d4b70">保存</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>
<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" />
@ -921,7 +924,7 @@
this.dateTimePickerInfo.showCheckDate = false
},
submit() {
submit(type) {
this.modelEdit = JSON.parse(JSON.stringify(this.model))
delete this.modelEdit.Nav_ApplyDepartment
delete this.modelEdit.Nav_ApplyUser
@ -939,7 +942,7 @@
}
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
this.modelEdit.Nav_Users.map(item => {
item.PUBLISH = 'SaveAndNotify'
item.PUBLISH = type
delete item.Nav_Train
delete item.Nav_User
delete item.Nav_UserType
@ -958,8 +961,7 @@
}
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
this.modelEdit.ORG_ID = this.ORG_ID
this.modelEdit.PUBLISH = 'SaveAndNotify'
this.modelEdit.PUBLISH = type;
fullFOFireJob(this.modelEdit).then(res => {
if (res) {
uni.$showMsgFunc('操作成功!', () => {

View File

@ -124,9 +124,12 @@
</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 @click="submit('Save')" :plain="true" color="#3d4b70">保存</u-button>
<view style="display: flex;flex-direction: row;margin-top: 10px;">
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
<u-button type="primary" @click="submit('SaveAndNotify')" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
</view>
</view>
<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" />
@ -770,7 +773,7 @@
this.dateTimePickerInfo.showCheckDate = false
},
submit() {
submit(type) {
this.modelEdit = JSON.parse(JSON.stringify(this.model))
delete this.modelEdit.Nav_ApplyDepartment
delete this.modelEdit.Nav_ApplyUser
@ -789,7 +792,11 @@
}
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
this.modelEdit.Nav_Users.map(item => {
if (type == 'SaveAndNotify') {
item.PUBLISH = 'SaveAndNotify'
} else {
item.PUBLISH = null
}
delete item.Nav_Train
delete item.Nav_User
delete item.Nav_UserType
@ -809,7 +816,11 @@
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
this.modelEdit.ORG_ID = this.ORG_ID
this.modelEdit.PUBLISH = 'SaveAndNotify'
if (type == 'SaveAndNotify') {
this.modelEdit.PUBLISH = "SaveAndNotify";
} else {
this.modelEdit.PUBLISH = null;
}
fullFOFireJob(this.modelEdit).then(res => {
if (res) {
uni.$showMsgFunc('操作成功!', () => {

View File

@ -143,9 +143,12 @@
</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 @click="submit('Save')" :plain="true" color="#3d4b70">保存</u-button>
<view style="display: flex;flex-direction: row;margin-top: 10px;">
<u-button type="primary" @click="stepReduce" color="#3d4b70" :plain="true" style="margin-right: 5px;">上一步</u-button>
<u-button type="primary" @click="submit" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
<u-button type="primary" @click="submit('SaveAndNotify')" color="#3d4b70" style="margin-left: 5px;">提交</u-button>
</view>
</view>
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup" :title="selectorInfo.title" :lists="selectorInfo.dataLists" :defaultChecked="selectorInfo.defaultChecked"
@ -880,7 +883,7 @@
this.dateTimePickerInfo.showCheckDate = false
},
submit() {
submit(type) {
const isBlank = (value) => {
return typeof value !== 'string' || value.trim() === '';
};
@ -906,7 +909,11 @@
}
if (this.modelEdit.Nav_Users && this.modelEdit.Nav_Users.length > 0) {
this.modelEdit.Nav_Users.map(item => {
if (type == 'SaveAndNotify') {
item.PUBLISH = 'SaveAndNotify'
} else {
item.PUBLISH = null
}
delete item.Nav_Train
delete item.Nav_User
delete item.Nav_UserType
@ -926,7 +933,11 @@
if (this.modelEdit.ORG_ID == null || this.modelEdit.ORG_ID == '')
this.modelEdit.ORG_ID = this.ORG_ID
this.modelEdit.PUBLISH = 'SaveAndNotify'
if (type == 'SaveAndNotify') {
this.modelEdit.PUBLISH = "SaveAndNotify";
} else {
this.modelEdit.PUBLISH = null;
}
fullFOFireJob(this.modelEdit).then(res => {
if (res) {
uni.$showMsgFunc('操作成功!', () => {

View File

@ -270,11 +270,13 @@
</u--form>
</view>
</view>
<view style="padding: 10px 16px;display: flex;flex-direction: row;" class="bottom-button" v-if="stepsPage === 4">
<button type="default" @click="stepReduceTwo" :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>
<button type="default" @click="stepSubmit"
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 style="padding: 10px 16px;display: flex;flex-direction: column;" class="bottom-button" v-if="stepsPage === 4">
<u-button @click="stepSubmit('Save')" :plain="true" color="#3d4b70">保存</u-button>
<view style="display: flex;flex-direction: row;margin-top: 10px;">
<u-button @click="stepReduceTwo" :plain="true" color="#3d4b70" style="margin-right: 5px;">上一步</u-button>
<u-button @click="stepSubmit('SaveAndNotify')" color="#3d4b70" style="margin-left: 5px">提交</u-button>
</view>
</view>
<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>
@ -364,7 +366,7 @@
Nav_Department: {
NAME: ''
},
Nav_Area:{
Nav_Area: {
NAME: ''
},
// Nav_ApplyUser: {
@ -1272,7 +1274,7 @@
formIndex: undefined
}
},
stepSubmit() {
stepSubmit(type) {
this.numC = 0;
this.dataModel.Nav_DealMeasures.map((item) => {
if (item.NAME == '') {
@ -1285,7 +1287,7 @@
uni.$showErrorInfo('添加作业后处理措施信息不能为空')
} else {
this.modelEdit = JSON.parse(JSON.stringify(this.dataModel))
this.modelEdit.PUBLISH = "SaveAndNotify";
if (this.TaskID !== null) {
this.modelEdit.TaskID = this.TaskID;
}
@ -1301,6 +1303,11 @@
}
delete this.modelEdit.Nav_Department
delete this.modelEdit.Nav_Area
if (type == 'SaveAndNotify') {
this.modelEdit.PUBLISH = "SaveAndNotify";
} else {
this.modelEdit.PUBLISH = null;
}
saveJobRecord(this.modelEdit).then(res => {
uni.$showMsgFunc('操作成功!', () => {
// if (this.tableKey == null || this.tableKey == 0) {