|
@@ -35,7 +35,7 @@
|
|
|
</div>
|
|
|
<!-- 提示 -->
|
|
|
<a-alert type="info" style="margin-bottom: 10px">
|
|
|
- <div slot="message">注意:只有当数字货架的所有信息都设置完成,才能在其他功能中看到该数字货架</div>
|
|
|
+ <div slot="message">注意:只有当数字货架的“是否设置完成”为"是",系统才会自动对该货架生成补货单,修理厂才能正常下单。</div>
|
|
|
</a-alert>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
@@ -51,22 +51,28 @@
|
|
|
bordered>
|
|
|
<!-- 货位数量 -->
|
|
|
<template slot="shelfPlaceNum" slot-scope="text, record">
|
|
|
- <div v-if="record.finishFlag=='1'">{{ record.shelfPlaceNum }}</div>
|
|
|
- <div v-else>
|
|
|
- <p style="margin: 0;">
|
|
|
- <span style="color: red;">{{ record.shelfPlaceBindNum||record.shelfPlaceBindNum==0 ? record.shelfPlaceBindNum:'' }}</span> /
|
|
|
- {{ record.shelfPlaceNum }}
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ <p style="margin: 0;">
|
|
|
+ <span style="color: red;">
|
|
|
+ {{ record.shelfPlaceBindNum||record.shelfPlaceBindNum==0 ? record.shelfPlaceBindNum:'' }}</span> /
|
|
|
+ {{ record.shelfPlaceNum }}
|
|
|
+ </p>
|
|
|
</template>
|
|
|
<!-- 是否设置完成 -->
|
|
|
<template slot="finishFlag" slot-scope="text, record">
|
|
|
- <span v-if="record.finishFlagDictValue" :style="{color: record.finishFlagDictValue=='否' ? 'red':''}">{{ record.finishFlagDictValue }}</span>
|
|
|
- <span v-else>--</span>
|
|
|
+ <a-switch
|
|
|
+ checkedChildren="是"
|
|
|
+ unCheckedChildren="否"
|
|
|
+ v-if="record.finishFlag!=undefined"
|
|
|
+ @change="changeStatus(record)"
|
|
|
+ :checked="record.finishFlag == 1"
|
|
|
+ />
|
|
|
+ <span v-else :style="{ color: record.finishFlag == 1 ? '#00aa00' : '#999' }">
|
|
|
+ {{ record.finishFlag == 1 ? '是' : (record.finishFlag!=undefined?'否':'--') }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">{{ record.finishFlag=='1'?'修改':'设置' }}</a-button>
|
|
|
+ <a-button size="small" type="link" class="button-primary" @click="handleSet(record)">设置</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -81,7 +87,7 @@ import { STable, VSelect } from '@/components'
|
|
|
import custList from '@/views/common/custList.vue'
|
|
|
import shelfSList from '@/views/common/shelfList'
|
|
|
import basicInfoModal from './basicInfoModal.vue'
|
|
|
-import { shelfList } from '@/api/shelf'
|
|
|
+import { shelfList, modifFinishFlag } from '@/api/shelf'
|
|
|
export default {
|
|
|
components: { STable, VSelect, custList, shelfSList, basicInfoModal },
|
|
|
mixins: [commonMixin],
|
|
@@ -104,7 +110,7 @@ export default {
|
|
|
{ title: '关联客户', dataIndex: 'customerEntity.customerName', width: '25%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '货位数量', scopedSlots: { customRender: 'shelfPlaceNum' }, width: '15%', align: 'center' },
|
|
|
{ title: '是否设置完成', scopedSlots: { customRender: 'finishFlag' }, width: '20%', align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'left' }
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -154,6 +160,23 @@ export default {
|
|
|
this.queryParam.customerSn = undefined
|
|
|
}
|
|
|
},
|
|
|
+ // 启用 禁用
|
|
|
+ changeStatus (record) {
|
|
|
+ const params = {
|
|
|
+ shelfSn: record.shelfSn,
|
|
|
+ finishFlag: record.finishFlag == 1 ? '0' : '1'
|
|
|
+ }
|
|
|
+ this.spinning = true
|
|
|
+ modifFinishFlag(params).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ this.spinning = false
|
|
|
+ } else {
|
|
|
+ this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.shelfSn = undefined
|