Commit 5afadf92 by qinjianhui

feat: 添加预计完成时间

parent 935a8b1b
...@@ -29,9 +29,10 @@ export function archiveWorkOrder(id) { ...@@ -29,9 +29,10 @@ export function archiveWorkOrder(id) {
}) })
} }
export function completeWorkOrder(id) { export function completeWorkOrder(id, estimateCompleteTime) {
return axios.post('platform/platformWorkOrder/complete', { return axios.post('platform/platformWorkOrder/complete', {
id: id, id: id,
estimateCompleteTime: estimateCompleteTime,
}) })
} }
......
...@@ -343,7 +343,8 @@ ...@@ -343,7 +343,8 @@
:editForm="editForm" :editForm="editForm"
:orderTypes="orderTypes" :orderTypes="orderTypes"
:isEdit="isEdit" :isEdit="isEdit"
ref="edit"></edit> ref="edit"
></edit>
<!-- 指派 --> <!-- 指派 -->
<el-dialog <el-dialog
title="指派给" title="指派给"
...@@ -377,6 +378,33 @@ ...@@ -377,6 +378,33 @@
> >
</span> </span>
</el-dialog> </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> </div>
</template> </template>
...@@ -455,6 +483,8 @@ export default { ...@@ -455,6 +483,8 @@ export default {
chatRecord: [], chatRecord: [],
cloneForm: {}, cloneForm: {},
editDialog: false, editDialog: false,
completeVisible: false,
estimateCompleteTime: '',
} }
}, },
mounted() { mounted() {
...@@ -463,8 +493,8 @@ export default { ...@@ -463,8 +493,8 @@ export default {
this.getSystemUserList() this.getSystemUserList()
this.getOrderTypes() this.getOrderTypes()
this.cloneForm = JSON.parse( this.cloneForm = JSON.parse(
JSON.stringify(this.editForm), JSON.stringify(this.editForm),
) )
}, },
computed: { computed: {
...mapState(['deptStaff']), ...mapState(['deptStaff']),
...@@ -531,6 +561,11 @@ export default { ...@@ -531,6 +561,11 @@ export default {
width: 130, width: 130,
}, },
{ {
label: '预计完成时间',
key: 'estimateCompleteTime',
width: 130,
},
{
label: '完成时间', label: '完成时间',
key: 'completeTime', key: 'completeTime',
width: 130, width: 130,
...@@ -803,20 +838,23 @@ export default { ...@@ -803,20 +838,23 @@ export default {
} }
}, },
async complete(item) { async complete(item) {
try { this.estimateCompleteTime = ''
await this.$confirm('确定完成吗?', '提示', { this.completeVisible = true
confirmButtonText: '确定', this.rowId = item.id
cancelButtonText: '取消', },
type: 'warning', async submitTime() {
}) if (!this.estimateCompleteTime) {
} catch { return this.$message.warning('请选择预计完成时间')
return
} }
try { try {
const res = await completeWorkOrder(item.id) const res = await completeWorkOrder(
this.rowId,
this.estimateCompleteTime,
)
if (res.code === 200) { if (res.code === 200) {
this.getlist() this.getlist()
this.getOrderTree() this.getOrderTree()
this.completeVisible = false
} }
} catch (e) { } catch (e) {
console.error(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