|
@@ -399,17 +399,17 @@
|
|
|
<!-- 新增或者编辑 -->
|
|
|
<template v-if="~[0, 1].indexOf(this.type)">
|
|
|
<el-button
|
|
|
- v-if="~[0].indexOf(this.type) || ~['SAVE'].indexOf(form.state)"
|
|
|
+ v-if="~[0].indexOf(this.type) || ~['SAVE'].indexOf(form.status)"
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="determine"
|
|
|
>保存</el-button
|
|
|
>
|
|
|
- <el-button v-if="~['SAVE', 'SUBMIT'].indexOf(form.state)" size="small" type="primary" @click="createOrder"
|
|
|
+ <el-button v-if="~['SAVE', 'SUBMIT'].indexOf(form.status)" size="small" type="primary" @click="createOrder"
|
|
|
>生成订单</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="~[0].indexOf(this.type) || ~['SAVE'].indexOf(form.state)"
|
|
|
+ v-if="~[0].indexOf(this.type) || ~['SAVE'].indexOf(form.status)"
|
|
|
size="small"
|
|
|
type="primary"
|
|
|
@click="add"
|
|
@@ -418,17 +418,17 @@
|
|
|
<el-button v-if="~[0].indexOf(this.type)" size="small" @click="reset">重置</el-button>
|
|
|
</template>
|
|
|
<template>
|
|
|
- <el-button v-if="~['SUBMIT'].indexOf(form.state)" size="small" type="primary" @click="previousStep"
|
|
|
+ <el-button v-if="~['SUBMIT'].indexOf(form.status)" size="small" type="primary" @click="previousStep"
|
|
|
>上一步</el-button
|
|
|
>
|
|
|
</template>
|
|
|
<!-- 提货 -->
|
|
|
<template v-if="~[3].indexOf(this.type)">
|
|
|
- <el-button v-if="~['PAYED'].indexOf(form.state)" size="small" type="primary" @click="confirmationDelivery"
|
|
|
+ <el-button v-if="~['PAYED'].indexOf(form.status)" size="small" type="primary" @click="confirmationDelivery"
|
|
|
>确认提货</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
- v-if="~['PAYED', 'EXCEPTION'].indexOf(form.state)"
|
|
|
+ v-if="~['PAYED', 'EXCEPTION'].indexOf(form.status)"
|
|
|
size="small"
|
|
|
type="danger"
|
|
|
@click="cancellationDelivery"
|
|
@@ -436,7 +436,7 @@
|
|
|
>
|
|
|
</template>
|
|
|
<!-- 查看 -->
|
|
|
- <template v-if="~['PAYED', 'END'].indexOf(this.type) && !~['EXCEPTION'].indexOf(form.state)">
|
|
|
+ <template v-if="~['PAYED', 'END'].indexOf(this.type) && !~['EXCEPTION'].indexOf(form.status)">
|
|
|
<el-button size="small" @click="printHtml">打印出库清单</el-button>
|
|
|
</template>
|
|
|
</el-row>
|
|
@@ -570,9 +570,9 @@ export default {
|
|
|
id: this.item.id
|
|
|
})
|
|
|
.then(res => {
|
|
|
- if (this.type === 3 || ~['SUBMIT'].indexOf(res.data.state)) {
|
|
|
+ if (this.type === 3 || ~['SUBMIT'].indexOf(res.data.status)) {
|
|
|
this.disabled = true
|
|
|
- } else if (~['SAVE'].indexOf(res.data.state)) {
|
|
|
+ } else if (~['SAVE'].indexOf(res.data.status)) {
|
|
|
this.disabled = false
|
|
|
}
|
|
|
if (res.data.websitId) {
|
|
@@ -664,9 +664,9 @@ export default {
|
|
|
id: this.item.id
|
|
|
})
|
|
|
.then(res => {
|
|
|
- if (this.type === 3 || ~['SUBMIT'].indexOf(res.data.state)) {
|
|
|
+ if (this.type === 3 || ~['SUBMIT'].indexOf(res.data.status)) {
|
|
|
this.disabled = true
|
|
|
- } else if (~['SAVE'].indexOf(res.data.state)) {
|
|
|
+ } else if (~['SAVE'].indexOf(res.data.status)) {
|
|
|
this.disabled = false
|
|
|
}
|
|
|
if (res.data.websitId) {
|
|
@@ -759,13 +759,13 @@ export default {
|
|
|
|
|
|
// 生成订单并且打开支付
|
|
|
createOrder() {
|
|
|
- if (!this.form.id || this.form.state === 'SAVE') {
|
|
|
+ if (!this.form.id || this.form.status === 'SAVE') {
|
|
|
this.determine(false, res => {
|
|
|
partsPartssalesorderSubmit({ id: res.data.id })
|
|
|
.then(res2 => {
|
|
|
- if (this.type === 3 || ~['SUBMIT'].indexOf(res2.data.state)) {
|
|
|
+ if (this.type === 3 || ~['SUBMIT'].indexOf(res2.data.status)) {
|
|
|
this.disabled = true
|
|
|
- } else if (~['SAVE'].indexOf(res2.data.state)) {
|
|
|
+ } else if (~['SAVE'].indexOf(res2.data.status)) {
|
|
|
this.disabled = false
|
|
|
}
|
|
|
this.$emit('success')
|