|
@@ -77,31 +77,34 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 保存
|
|
// 保存
|
|
handleSubmit () {
|
|
handleSubmit () {
|
|
- const _this = this
|
|
|
|
- _this.$refs.ruleForm.validate(valid => {
|
|
|
|
|
|
+ this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- const ajax_form = {
|
|
|
|
- allocateSn: _this.form.allocateSn,
|
|
|
|
- printState: _this.form.printStateInfo
|
|
|
|
- }
|
|
|
|
- _this.spinning = true
|
|
|
|
- _this.confirmLoading = true
|
|
|
|
- updatePrintState(ajax_form).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.cancel()
|
|
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
- }
|
|
|
|
- _this.confirmLoading = false
|
|
|
|
- })
|
|
|
|
|
|
+ this.handleSave()
|
|
} else {
|
|
} else {
|
|
console.log('error submit!!')
|
|
console.log('error submit!!')
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ handleSave () {
|
|
|
|
+ const _this = this
|
|
|
|
+ const ajax_form = {
|
|
|
|
+ allocateSn: _this.form.allocateSn,
|
|
|
|
+ printState: _this.form.printStateInfo
|
|
|
|
+ }
|
|
|
|
+ _this.spinning = true
|
|
|
|
+ _this.confirmLoading = true
|
|
|
|
+ updatePrintState(ajax_form).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.cancel()
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ } else {
|
|
|
|
+ _this.spinning = false
|
|
|
|
+ }
|
|
|
|
+ _this.confirmLoading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
cancel () {
|
|
cancel () {
|
|
this.opened = false
|
|
this.opened = false
|
|
this.$emit('cancel')
|
|
this.$emit('cancel')
|