<template>
|
<GlobalAlertWindow
|
v-loading="isUploading"
|
:title="title"
|
:visible.sync="visible"
|
:confirm-working="isWorking"
|
@confirm="confirm"
|
>
|
<el-form :model="form" ref="form" label-width="120px" label-suffix=":" :rules="rules" inline>
|
<el-form-item label="备注" prop="sysInfo">
|
<el-input type="textarea" :autosize="{ minRows: 4, maxRows:4 }" v-model="form.sysInfo" placeholder="请输入备注" :maxlength="50" v-trim/>
|
</el-form-item>
|
|
</el-form>
|
</GlobalAlertWindow>
|
</template>
|
|
<script>
|
import BaseOpera from '@/components/base/BaseOpera'
|
import GlobalAlertWindow from '@/components/common/GlobalAlertWindow'
|
export default {
|
name: 'OperaOrderMarkWindow',
|
extends: BaseOpera,
|
components: { GlobalAlertWindow },
|
data () {
|
return {
|
isUploading: false,
|
// 表单数据
|
form: {
|
id: null,
|
sysInfo: ''
|
},
|
// 验证规则
|
rules: {
|
sysInfo: [
|
{ required: true, message: '请输入订单备注信息', tigger: 'blur' }
|
]
|
}
|
}
|
},
|
|
created () {
|
this.config({
|
api: '/business/goodsorder',
|
'field.id': 'id'
|
})
|
},
|
methods: {
|
confirm () {
|
this.$refs.form.validate((valid) => {
|
if (!valid) {
|
return
|
}
|
this.isWorking = true
|
this.api.orderRemark(this.form)
|
.then(() => {
|
this.visible = false
|
this.$tip.apiSuccess('添加成功')
|
this.$emit('success')
|
}).catch(e => {
|
this.$tip.apiFailed(e)
|
})
|
.finally(() => {
|
this.isWorking = false
|
})
|
// 调用新建接口
|
})
|
}
|
}
|
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
@import "@/assets/style/alertstyle.scss";
|
|
</style>
|