Commit 5afadf92 by qinjianhui

feat: 添加预计完成时间

parent 935a8b1b
......@@ -29,9 +29,10 @@ export function archiveWorkOrder(id) {
})
}
export function completeWorkOrder(id) {
export function completeWorkOrder(id, estimateCompleteTime) {
return axios.post('platform/platformWorkOrder/complete', {
id: id,
estimateCompleteTime: estimateCompleteTime,
})
}
......
......@@ -343,7 +343,8 @@
:editForm="editForm"
:orderTypes="orderTypes"
:isEdit="isEdit"
ref="edit"></edit>
ref="edit"
></edit>
<!-- 指派 -->
<el-dialog
title="指派给"
......@@ -377,6 +378,33 @@
>
</span>
</el-dialog>
<el-dialog
title="预计完成时间"
:visible.sync="completeVisible"
width="500px"
:close-on-click-modal="false"
>
<el-form size="mini">
<el-form-item label="预计完成时间">
<el-date-picker
style="width:100%"
v-model="estimateCompleteTime"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
default-time="23:59:59"
placeholder="选择日期"
></el-date-picker>
</el-form-item>
</el-form>
<span slot="footer">
<el-button size="small" @click="completeVisible = false"
>取消</el-button
>
<el-button size="small" type="primary" @click="submitTime"
>确认</el-button
>
</span>
</el-dialog>
</div>
</template>
......@@ -455,6 +483,8 @@ export default {
chatRecord: [],
cloneForm: {},
editDialog: false,
completeVisible: false,
estimateCompleteTime: '',
}
},
mounted() {
......@@ -463,8 +493,8 @@ export default {
this.getSystemUserList()
this.getOrderTypes()
this.cloneForm = JSON.parse(
JSON.stringify(this.editForm),
)
JSON.stringify(this.editForm),
)
},
computed: {
...mapState(['deptStaff']),
......@@ -531,6 +561,11 @@ export default {
width: 130,
},
{
label: '预计完成时间',
key: 'estimateCompleteTime',
width: 130,
},
{
label: '完成时间',
key: 'completeTime',
width: 130,
......@@ -803,20 +838,23 @@ export default {
}
},
async complete(item) {
try {
await this.$confirm('确定完成吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
} catch {
return
this.estimateCompleteTime = ''
this.completeVisible = true
this.rowId = item.id
},
async submitTime() {
if (!this.estimateCompleteTime) {
return this.$message.warning('请选择预计完成时间')
}
try {
const res = await completeWorkOrder(item.id)
const res = await completeWorkOrder(
this.rowId,
this.estimateCompleteTime,
)
if (res.code === 200) {
this.getlist()
this.getOrderTree()
this.completeVisible = false
}
} catch (e) {
console.error(e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment