This commit is contained in:
2023-11-15 10:13:54 +08:00
parent 26100af90a
commit 76cdc34af1
4 changed files with 21 additions and 22 deletions

View File

@@ -203,6 +203,7 @@ export default {
methods: {
init(data, param) {
this.form.orderId = data.id
this.form.orderName = data.name
this.getList()
if (param === 'add') {
this.isBind = false
@@ -253,12 +254,20 @@ export default {
})
} else {
// 新增工单
this.form.planStartTime = this.planStartTime ? new Date(this.planStartTime).valueOf() : ''
this.form.planFinishTime = this.planFinishTime ? new Date(this.planFinishTime).valueOf() : ''
orderIssue({ ...this.form }).then(res => {
let _this = this
_this.form.planStartTime = _this.planStartTime ? new Date(_this.planStartTime).valueOf() : ''
_this.form.planFinishTime = _this.planFinishTime ? new Date(_this.planFinishTime).valueOf() : ''
orderIssue({ ..._this.form }).then(res => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功")
this.$emit('addWorkOrderSubmit')
_this.$modal.msgSuccess("操作成功")
let name = this.form.orderName
_this.$emit('addWorkOrderSubmit')
// 询问是否添加预使用主原料
_this.$modal.confirm('是否添加预使用主原料信息?').then(function() {
_this.$router.push({
path: '/core/core-work-order?orderName='+encodeURI(name)
})
})
}
})
}