Commit 3a176dee authored by “lixuyan”'s avatar “lixuyan”

调配卡创建接口调试

parent 9c7c6dc6
<template>
<dee-as-com
:lay-config="layConfig"
@tableToolHandler="tableToolHandler"
/>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'MutualAttachmentList',
componentName: '胶漆使用需求',
props: {
basicData: {
type: Object,
default: null
}
},
data() {
return {
}
},
computed: {
layConfig() {
return {
typeName: 'ExtSupportingItem',
layKey: 'lacquerList'
}
}
},
mounted() {
},
methods: {
tableToolHandler(e) {
if (e && e.key && e.key.btnValue) {
console.log(e)
let type
const { btnValue } = e.key
switch (btnValue) {
case 'addMix': type = 'AssignCardLacquer'
break
case 'addPaint': type = 'AssignCardPaint'
break
case 'addAlodine':type = 'AssignCardAlodine'
break
}
if (e.el.selectedData.length === 0) {
this.$utils.showConfirm(
`确定不关联胶漆调配申请创建调配卡吗, 是否继续?`,
'提示',
'warning',
'确定',
'取消',
() => {
this.adjustCardCreate(e, type)
}
)
} else {
this.adjustCardCreate(e, type)
}
}
},
adjustCardCreate(e, type) {
let arr = []
if (e.el.selectedData.length === 0) {
arr = [
{
subTypeName: 'AssignCardDetail',
targetId: '',
targetIdType: 'extSupportingItem'
}
]
} else {
e.el.selectedData.forEach(element => {
arr.push({
subTypeName: 'AssignCardDetail',
targetId: element.id,
targetIdType: 'extSupportingItem'
})
})
}
const params = {
dxClassName: 'com.yonde.tf.mom.common.vo.schedule.AssignCardVO',
subTypeName: type,
operator: 'ADD',
assignCardDetails: arr
}
post(
'/AssignCard/recursion',
params
)
.then((res) => {
})
.catch((err) => console.log(err))
.finally(() => {
})
}
}
}
</script>
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