流程更改日期

master
lion 3 months ago
parent 861c2ebc96
commit ee92cb0a9c

@ -282,14 +282,22 @@ import {getToken} from "@/utils/auth";
})
console.log('this.list', this.list)
// flow_id / id getItemNum
const ids = (this.payList || [])
.map(i => i && (i.id))
.filter(id => !!id)
.join(',')
// id getItemNum payList data.caigoumingxi
const ids = []
;(this.payList || []).forEach(pay => {
try {
const subList = JSON.parse(pay?.data?.caigoumingxi || '[]')
subList.forEach(item => {
if (item && item.id) ids.push(item.id)
})
} catch(e) {
//
}
})
const idsStr = ids.join(',')
if (ids) {
await this.getItemNum(ids)
if (idsStr) {
await this.getItemNum(idsStr)
}
// sub_custom_model_id
@ -371,13 +379,13 @@ import {getToken} from "@/utils/auth";
async getItemNum(id) {
try {
const item = await getItems({
flow_id: id
wuzicaigou_item_id: id
})
console.log("item", item)
if (item.length > 0) {
const itemMap = new Map();
item.forEach(item => {
itemMap.set(item.wuzicaigou_item_id, item.total_num);
itemMap.set(item.wuzicaigou_item_id, parseFloat(item.total_num));
});
// list id Map total_num hasPayNum
this.list.forEach(row => {

@ -271,6 +271,29 @@
frameborder="0"
/>
</vxe-modal>
<!-- 更改时间 -->
<el-dialog
title="请选择时间"
:visible.sync="isShowTime"
:close-on-click-modal="false"
width="30%"
>
<!-- 日期时间选择器 -->
<el-date-picker
v-model="selectedDateTime"
type="datetime"
placeholder="选择日期时间"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
:clearable="false"
style="width: 100%"
></el-date-picker>
<div slot="footer" class="dialog-footer">
<el-button @click="isShowTime = false,timeId='',selectedDateTime=''">取消</el-button>
<el-button type="primary" @click="updateTime"></el-button>
</div>
</el-dialog>
</div>
</template>
@ -307,6 +330,10 @@ export default {
},
data() {
return {
timeId:'',
isShowTime:false,
selectedDateTime:'',
selectedDateType:'',
isShowModal:false,
contractUrl:'',
printKey: 0,
@ -828,7 +855,7 @@ export default {
}
})
}
}
console.log("copyForm",copyForm,this.fields)
console.log("this.writeableFields",this.writeableFields)
@ -889,24 +916,43 @@ export default {
async cellDblclickEvent({ row, column }) {
// if(this.$store.state.user.username !== 'admin') return
if(!this.$store.state.user.roles.includes("全局流程监管")) return
if(column.field === 'created_at' || column.field === 'updated_at') {
this.$prompt('请输入时间', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
inputErrorMessage: '时间格式不正确'
}).then(({ value }) => {
updateNodeTime({
id: row.id,
date: value,
date_type: column.field
}).then(_ => {
this.$message.success('更新成功')
this.getConfig()
})
})
this.timeId = row.id
this.selectedDateType = column.field
this.selectedDateTime = row[column.field]
this.isShowTime = true
// this.$prompt('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// inputPattern: /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
// inputErrorMessage: ''
// }).then(({ value }) => {
// updateNodeTime({
// id: row.id,
// date: value,
// date_type: column.field
// }).then(_ => {
// this.$message.success('')
// this.getConfig()
// })
// })
}
},
updateTime(){
updateNodeTime({
id: this.timeId,
date: this.selectedDateTime,
date_type:this.selectedDateType,
}).then((_) => {
this.$message.success("更新成功");
this.timeId = ''
this.selectedDateTime = ''
this.selectedDateType = ''
this.isShowTime = false
this.getConfig()
});
},
},
computed: {
device() {

@ -213,6 +213,29 @@
></rollback>
<el-backtop></el-backtop>
<!-- 更改时间 -->
<el-dialog
title="请选择时间"
:visible.sync="isShowTime"
:close-on-click-modal="false"
width="30%"
>
<!-- 日期时间选择器 -->
<el-date-picker
v-model="selectedDateTime"
type="datetime"
placeholder="选择日期时间"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
:clearable="false"
style="width: 100%"
></el-date-picker>
<div slot="footer" class="dialog-footer">
<el-button @click="isShowTime = false,timeId='',selectedDateTime=''">取消</el-button>
<el-button type="primary" @click="updateTime"></el-button>
</div>
</el-dialog>
</div>
</template>
@ -248,6 +271,10 @@ export default {
},
data() {
return {
timeId:'',
isShowTime:false,
selectedDateTime:'',
selectedDateType:'',
printKey: 0,
isShowRollback: false,
isShowForward: false,
@ -805,24 +832,43 @@ export default {
async cellDblclickEvent({ row, column }) {
// if(this.$store.state.user.username !== 'admin') return
if(!this.$store.state.user.roles.includes("全局流程监管")) return
if(column.field === 'created_at' || column.field === 'updated_at') {
this.$prompt('请输入时间', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
inputErrorMessage: '时间格式不正确'
}).then(({ value }) => {
updateNodeTime({
id: row.id,
date: value,
date_type: column.field
}).then(_ => {
this.$message.success('更新成功')
this.getConfig()
})
})
this.timeId = row.id
this.selectedDateType = column.field
this.selectedDateTime = row[column.field]
this.isShowTime = true
// this.$prompt('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// inputPattern: /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
// inputErrorMessage: ''
// }).then(({ value }) => {
// updateNodeTime({
// id: row.id,
// date: value,
// date_type: column.field
// }).then(_ => {
// this.$message.success('')
// this.getConfig()
// })
// })
}
},
updateTime(){
updateNodeTime({
id: this.timeId,
date: this.selectedDateTime,
date_type:this.selectedDateType,
}).then((_) => {
this.$message.success("更新成功");
this.timeId = ''
this.selectedDateTime = ''
this.selectedDateType = ''
this.isShowTime = false
this.getConfig()
});
},
},
computed: {
device() {

@ -196,6 +196,29 @@
</el-card>
<el-backtop></el-backtop>
<!-- 更改时间 -->
<el-dialog
title="请选择时间"
:visible.sync="isShowTime"
:close-on-click-modal="false"
width="30%"
>
<!-- 日期时间选择器 -->
<el-date-picker
v-model="selectedDateTime"
type="datetime"
placeholder="选择日期时间"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
:clearable="false"
style="width: 100%"
></el-date-picker>
<div slot="footer" class="dialog-footer">
<el-button @click="isShowTime = false,timeId='',selectedDateTime=''">取消</el-button>
<el-button type="primary" @click="updateTime"></el-button>
</div>
</el-dialog>
</div>
</template>
@ -223,6 +246,10 @@ export default {
},
data() {
return {
timeId:'',
isShowTime:false,
selectedDateTime:'',
selectedDateType:'',
printKey: 0,
isShowRollback: false,
isShowForward: false,
@ -627,24 +654,43 @@ export default {
async cellDblclickEvent({ row, column }) {
// if(this.$store.state.user.username !== 'admin') return
if(!this.$store.state.user.roles.includes("全局流程监管")) return
if(column.field === 'created_at' || column.field === 'updated_at') {
this.$prompt('请输入时间', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
inputErrorMessage: '时间格式不正确'
}).then(({ value }) => {
updateNodeTime({
id: row.id,
date: value,
date_type: column.field
}).then(_ => {
this.$message.success('更新成功')
this.getConfig()
})
})
this.timeId = row.id
this.selectedDateType = column.field
this.selectedDateTime = row[column.field]
this.isShowTime = true
// this.$prompt('', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// inputPattern: /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
// inputErrorMessage: ''
// }).then(({ value }) => {
// updateNodeTime({
// id: row.id,
// date: value,
// date_type: column.field
// }).then(_ => {
// this.$message.success('')
// this.getConfig()
// })
// })
}
},
updateTime(){
updateNodeTime({
id: this.timeId,
date: this.selectedDateTime,
date_type:this.selectedDateType,
}).then((_) => {
this.$message.success("更新成功");
this.timeId = ''
this.selectedDateTime = ''
this.selectedDateType = ''
this.isShowTime = false
this.getConfig()
});
},
},
computed: {
device() {

@ -620,6 +620,8 @@
"
:total="total"
></el-pagination>
<!-- 更改时间 -->
</div>
</template>
</el-card>
@ -641,6 +643,29 @@
:is-show.sync="isShowFieldExport"
:select="select"
/>
<!-- 更改时间 -->
<el-dialog
title="请选择时间"
:visible.sync="isShowTime"
:close-on-click-modal="false"
width="30%"
>
<!-- 日期时间选择器 -->
<el-date-picker
v-model="selectedDateTime"
type="datetime"
placeholder="选择日期时间"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
:clearable="false"
style="width: 100%"
></el-date-picker>
<div slot="footer" class="dialog-footer">
<el-button @click="isShowTime = false,timeId='',selectedDateTime=''">取消</el-button>
<el-button type="primary" @click="updateTime"></el-button>
</div>
</el-dialog>
</div>
</template>
@ -675,6 +700,10 @@ export default {
data() {
return {
isShowFieldExport: false,
timeId:'',
isShowTime:false,
selectedDateTime:'',
selectedDateType:'',
can_pay:'',
beforeList:[],
todoTotal: [],
@ -851,7 +880,7 @@ export default {
//
async toOutPay(row) {
// this.$refs.payMx.payId = row.id;
this.$refs.payMx.payList = row;
this.$refs.payMx.payList = [row];
this.isShowPay = true;
},
//
@ -1025,25 +1054,47 @@ export default {
},
async cellDblclickEvent({ row, column }) {
if (this.$store.state.user.username !== "admin") return;
// if (this.$store.state.user.username !== "admin") return;
if(!this.$store.state.user.roles.includes("全局流程监管")) return
if (column.field === "created_at" || column.field === "updated_at") {
this.$prompt("请输入时间", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
inputPattern:
/^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
inputErrorMessage: "时间格式不正确",
}).then(({ value }) => {
updateFlowTime({
id: row.id,
date: value,
}).then((_) => {
this.$message.success("更新成功");
this.getList();
});
});
this.timeId = row.id
this.selectedDateType = column.field
this.selectedDateTime = row[column.field]
this.isShowTime = true
// this.$prompt("", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// inputType:'datetime',
// inputPattern:
// /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1])) (?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/,
// inputErrorMessage: "",
// }).then(({ value }) => {
// updateFlowTime({
// id: row.id,
// date: value,
// }).then((_) => {
// this.$message.success("");
// this.getList();
// });
// });
}
},
updateTime(){
updateFlowTime({
id: this.timeId,
date: this.selectedDateTime,
date_type:this.selectedDateType,
}).then((_) => {
this.$message.success("更新成功");
this.timeId = ''
this.selectedDateTime = ''
this.selectedDateType = ''
this.isShowTime = false
this.getList();
});
},
checkboxChange() {
const reserveRecords =

Loading…
Cancel
Save