|
@@ -67,7 +67,7 @@
|
|
<a-switch
|
|
<a-switch
|
|
checkedChildren="是"
|
|
checkedChildren="是"
|
|
unCheckedChildren="否"
|
|
unCheckedChildren="否"
|
|
- v-if="record.finishFlag!=undefined"
|
|
|
|
|
|
+ v-if="record.finishFlag!=undefined&&record.state!='WRITE_OFF'&&record.state!='SUSPEND'"
|
|
@change="changeStatus(record)"
|
|
@change="changeStatus(record)"
|
|
:checked="record.finishFlag == 1"
|
|
:checked="record.finishFlag == 1"
|
|
/>
|
|
/>
|
|
@@ -80,18 +80,20 @@
|
|
<a-switch
|
|
<a-switch
|
|
checkedChildren="启用"
|
|
checkedChildren="启用"
|
|
unCheckedChildren="停用"
|
|
unCheckedChildren="停用"
|
|
- v-if="record.state!=undefined&&record.state!='WRITE_OFF'"
|
|
|
|
|
|
+ v-if="record.state!=undefined&&record.state!='WRITE_OFF'&&record.state!='SUSPEND'"
|
|
@change="enableShelf(record)"
|
|
@change="enableShelf(record)"
|
|
:checked="record.state == 'ENABLE'"
|
|
:checked="record.state == 'ENABLE'"
|
|
/>
|
|
/>
|
|
<span v-else :style="{ color: record.state == 'ENABLE' ? '#00aa00' : '#999' }">
|
|
<span v-else :style="{ color: record.state == 'ENABLE' ? '#00aa00' : '#999' }">
|
|
- {{ record.state == 'ENABLE' ? '启用' : (record.state!=undefined&&record.state!='WRITE_OFF'?'停用':'--') }}
|
|
|
|
|
|
+ {{ record.state == 'ENABLE' ? '启用' : (record.state!=undefined&&record.state!='WRITE_OFF'&&record.state!='SUSPEND'?'停用':'--') }}
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
- <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">{{record.state!='WRITE_OFF'?'设置':'查看'}}</a-button>
|
|
|
|
- <a-button size="small" type="link" class="button-primary" v-if="record.state!='WRITE_OFF'" @click="handleCancel(record)">注销</a-button>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <a-button size="small" type="link" class="button-primary" v-if="record.state!='SUSPEND'" @click="handleSet(record)">{{record.state!='WRITE_OFF'?'设置':'查看'}}</a-button>
|
|
|
|
+ <a-button size="small" type="link" class="button-primary" v-if="record.state!='WRITE_OFF'&&record.state!='SUSPEND'" @click="handleCancel(record)">注销</a-button>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
@@ -203,7 +205,17 @@ export default {
|
|
shelfSn: record.shelfSn,
|
|
shelfSn: record.shelfSn,
|
|
state: record.state == 'ENABLE' ? 'DISABLED' : 'ENABLE'
|
|
state: record.state == 'ENABLE' ? 'DISABLED' : 'ENABLE'
|
|
}
|
|
}
|
|
- this.updateState(params)
|
|
|
|
|
|
+ const _this = this
|
|
|
|
+ _this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: <div style="text-align:center;">是否{(record.state == 'ENABLE'?'停用':'启用')+record.shelfName}</div>,
|
|
|
|
+ centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ class: 'confirm-center',
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.updateState(params)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 注销
|
|
// 注销
|
|
handleCancel(record){
|
|
handleCancel(record){
|