Browse Source

状态为已提交的时候,不显示调整, 调整修改为不同的接口

luckysheet-xiaowang-Intelligen
是小王呀\24601 9 months ago
parent
commit
c44be70682
  1. 29
      src/views/modules/base/smartExcel/cpts/acceptingPersonel.vue
  2. 1
      src/views/modules/base/smartExcel/cpts/excel-info.vue
  3. 12
      src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue
  4. 2
      src/views/modules/base/smartExcel/cpts/filling-info.vue

29
src/views/modules/base/smartExcel/cpts/acceptingPersonel.vue

@ -96,7 +96,7 @@ export default {
}, },
created() { }, created() { },
methods: { methods: {
handleConfirm() { async handleConfirm() {
console.log(this.selfTag),"dsfkljdslk"; console.log(this.selfTag),"dsfkljdslk";
let userIdList = this.selfTag.map(item => { let userIdList = this.selfTag.map(item => {
return item.staffId return item.staffId
@ -106,8 +106,8 @@ export default {
userIdList: userIdList, userIdList: userIdList,
taskId: this.taskId, taskId: this.taskId,
} }
this.updateState()
requestPost('/actual/base/communityOneTablePeriodPublish/changeAssignWorker', parms).then(res => { await requestPost('/actual/base/communityOneTablePeriodPublish/changeAssignWorker', parms).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success('转派成功') this.$message.success('转派成功')
return this.$emit('handelPersonel') return this.$emit('handelPersonel')
@ -115,14 +115,15 @@ export default {
this.$message.error(res.internalMsg) this.$message.error(res.internalMsg)
} }
}); });
this.updateState()
} else if (this.showType == "adjust1") { } else if (this.showType == "adjust1") {
let parms = { let parms = {
userId: userIdList.toString(), userId: userIdList.toString(),
id: this.taskId, id: this.taskId,
reassignedReason: "" reassignedReason: ""
} }
this.updateState()
requestPost('/actual/base/communityOneTablePeriodPublish/reAssignWorker', parms).then(res => { await requestPost('/actual/base/communityOneTablePeriodPublish/reAssignWorker', parms).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success('转派成功') this.$message.success('转派成功')
return this.$emit('handelPersonel') return this.$emit('handelPersonel')
@ -130,6 +131,7 @@ export default {
this.$message.error(res.internalMsg) this.$message.error(res.internalMsg)
} }
}); });
this.updateState()
} }
else { else {
let parms = { let parms = {
@ -145,8 +147,9 @@ export default {
}, },
async updateState() { async updateState() {
if(this.showType=="adjust1"){
const url = '/actual/base/communityOneTablePeriodPublish/update' const url = '/actual/base/communityOneTablePeriodPublish/update'
console.log(this.formDatas); console.log(this.formDatas,"sdfkljslkdjf");
const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } = this.formDatas; const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } = this.formDatas;
const parm = { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } const parm = { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction }
parm.taskState = 'reassigned'; parm.taskState = 'reassigned';
@ -156,6 +159,20 @@ export default {
} else { } else {
console.log(msg); console.log(msg);
} }
}else{
const url = '/actual/base/communityOneTablePublish/update'
console.log(this.formDatas,"sdfkljslkdjf");
const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } = this.formDatas;
const parm = { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction }
parm.taskState = 'reassigned';
const { code, msg } = await requestPost(url, parm)
if (code === 0) {
// this.$message.success('')
} else {
console.log(msg);
}
}
}, },
getPeriodPublish() { getPeriodPublish() {

1
src/views/modules/base/smartExcel/cpts/excel-info.vue

@ -134,6 +134,7 @@ export default {
}, },
handelPersonel() { handelPersonel() {
this.showPersonel = false; this.showPersonel = false;
this.getDetail()
}, },
oncClickPersonel(){ oncClickPersonel(){
this.showType="adjust" this.showType="adjust"

12
src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue

@ -72,12 +72,12 @@ export default {
}, },
mounted() { mounted() {
console.log(this.fileUrl, 'fileUrl===');//'http://localhost:9001/epmet-work-pc/test1.xlsx' console.log(this.fileUrl, 'fileUrl===');//'http://localhost:9001/epmet-work-pc/test1.xlsx'
// const newUrl = this.fileUrl.replace( const newUrl = this.fileUrl.replace(
// /^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/, /^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/,
// `${location.origin}` `${location.origin}`
// ); );
// this.urlToFile(newUrl,this.fileName) this.urlToFile(newUrl,this.fileName)
this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx',this.fileName) // this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx',this.fileName)
}, },
props: { props: {

2
src/views/modules/base/smartExcel/cpts/filling-info.vue

@ -45,7 +45,7 @@
<el-form-item label="任务接收人"> <el-form-item label="任务接收人">
<div style="display: flex;flex-direction: row; align-items: center;"> <div style="display: flex;flex-direction: row; align-items: center;">
<div>{{ formData.userName }}</div> <div>{{ formData.userName }}</div>
<el-button @click="oncClickInfo('adjust1')" style="margin-left: 10px;" <el-button v-if="formData.taskStateName=='处理中'" @click="oncClickInfo('adjust1')" style="margin-left: 10px;"
type="primary">转派其他接收人</el-button> type="primary">转派其他接收人</el-button>
</div> </div>

Loading…
Cancel
Save