Commit 7847f9d8 by HuAnYing

工单加入待定

parent 89e299a2
......@@ -65,6 +65,20 @@ export function PendingWorkOrder(data) {
data,
)
}
export function ShelveWorkOrder(data) {
return axios.post(
'platform/platformWorkOrder/shelveForPending',
data,
)
}
export function TurnBackToPending(data) {
return axios.post(
'platform/platformWorkOrder/turnBackToPending',
data,
)
}
export function replyTocustomer(id, msg) {
return axios.post('platform/platformWorkOrderChat/add', {
msg: msg,
......
......@@ -465,6 +465,20 @@
@click="closeForPendingDialog"
>不受理
</el-button>
<el-button
size="mini"
type="danger"
v-if="statusCode === 'PRE_HANDLING'"
@click="shelveForPendingDialog"
>转至待定
</el-button>
<el-button
size="mini"
type="danger"
v-if="statusCode === 'PENDING'"
@click="turnBackToPending"
>转至待受理
</el-button>
</div>
</div>
</el-dialog>
......@@ -743,7 +757,7 @@
</el-dialog>
<!-- 不受理 -->
<el-dialog
title="不受理"
:title="pendingTitle"
:close-on-click-modal="false"
:visible.sync="pendingVisible"
width="800px"
......@@ -810,6 +824,8 @@ import {
replyTocustomer,
acceptanWorkOrder,
PendingWorkOrder,
ShelveWorkOrder,
TurnBackToPending,
getOrderType,
resume,
pause,
......@@ -1004,6 +1020,8 @@ export default {
imgPreviewUrl: '',
subscript: 0,
imgList: [],
pendingTitle: '',
pendingBtn: 0
}
},
mounted() {
......@@ -1612,26 +1630,76 @@ export default {
this.currentItem = item
},
closeForPendingDialog() {
this.pendingTitle = '不受理'
this.pendingBtn = 7
this.pendingVisible = true
if (this.$refs.pendingForm) {
this.$refs.pendingForm.resetFields()
}
},
shelveForPendingDialog() {
this.pendingTitle = '转至待定'
this.pendingBtn = 9
this.pendingVisible = true
if (this.$refs.pendingForm) {
this.$refs.pendingForm.resetFields()
}
},
turnBackToPending() {
this.pendingBtn = 1
TurnBackToPending({
id: this.detail.id,
...this.pendingForm,
}).then(res => {
if (res.code === 200) {
this.pendingVisible = false
this.detailVisible = false
this.getOrderTree()
this.getlist()
}
})
},
submitPending() {
this.$refs.pendingForm.validate(v => {
if (v) {
try {
PendingWorkOrder({
id: this.detail.id,
...this.pendingForm,
}).then(res => {
if (res.code === 200) {
this.pendingVisible = false
this.detailVisible = false
this.getOrderTree()
this.getlist()
}
})
if (this.pendingBtn === 9) {
ShelveWorkOrder({
id: this.detail.id,
...this.pendingForm,
}).then(res => {
if (res.code === 200) {
this.pendingVisible = false
this.detailVisible = false
this.getOrderTree()
this.getlist()
}
})
} else if (this.pendingBtn === 1) {
TurnBackToPending({
id: this.detail.id,
...this.pendingForm,
}).then(res => {
if (res.code === 200) {
this.pendingVisible = false
this.detailVisible = false
this.getOrderTree()
this.getlist()
}
})
} else {
PendingWorkOrder({
id: this.detail.id,
...this.pendingForm,
}).then(res => {
if (res.code === 200) {
this.pendingVisible = false
this.detailVisible = false
this.getOrderTree()
this.getlist()
}
})
}
} catch (error) {}
}
})
......
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