Files
water_dealer-agent/src/views/stock/widgets/AddRole.vue
JasonChen b0c8ee91c5 merbe
2023-08-02 14:26:01 +08:00

75 lines
1.7 KiB
Vue

<!-- 驳回原因用户姓名输入 -->
<template>
<a-form
ref="form"
v-bind="formItemLayout"
:form="form"
>
<a-form-item label="机构状态" style="padding-top:30px;">
<a-select
v-decorator="[
'status',
{
rules: [
{ required: true, message: `请选择机构状态!`, type: 'string' },
]
}
]"
:placeholder="`请选择机构状态!`"
>
<a-select-option v-for="(it) in item.status_two.texts" :key="it.key" :value="it.key+''">
{{ it.title }}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
</template>
<script>
import { changeStatusTwo } from '@/api/organization'
export default {
name: 'AddRole',
data: () => ({
formItemLayout: {
labelCol: { span: 6 },
wrapperCol: { span: 14 }
},
loading: false
}),
beforeCreate () {
this.form = this.$form.createForm(this)
},
methods: {
onOk () {
return new Promise(resolve => {
this.form.validateFields((errors, values) => {
if (!errors) {
const params = {
status: values.status
}
changeStatusTwo(this.item.order_item_id, params).then((res) => {
this.$notification.success({
message: '成功',
description: '修改成功'
})
resolve(true)
}).catch((err) => {
this.$notification.error({
message: '失败',
description: err.message
})
resolve(false)
})
}
})
})
}
}
}
</script>
<style scoped>
</style>