|
@@ -31,9 +31,9 @@
|
|
|
<rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="4" :sm="24" v-if="queryParam.bizState != 'WAIT'">
|
|
|
+ <a-col :md="4" :sm="24" v-if="queryParam.bizState == 'PASS'">
|
|
|
<a-form-item label="是否新品">
|
|
|
- <v-select code="PRODUCT_LEVEL" id="productLaunchAuditList-isNew" v-model="queryParam.level" allowClear placeholder="请选择产品是否为新品"></v-select>
|
|
|
+ <v-select code="FLAG" id="productLaunchAuditList-isNew" v-model="queryParam.newProductFlag" allowClear placeholder="请选择产品是否为新品"></v-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="4" :sm="24" style="margin-bottom: 10px;">
|
|
@@ -69,6 +69,15 @@
|
|
|
<span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
+ <!-- 显示状态 -->
|
|
|
+ <template slot="showFlag" slot-scope="text, record">
|
|
|
+ <a-switch
|
|
|
+ checkedChildren="显示"
|
|
|
+ unCheckedChildren="隐藏"
|
|
|
+ id="productLaunchAuditList-isEnable"
|
|
|
+ v-model="record.isEnable"
|
|
|
+ @change="changeFlagHandle(record)" />
|
|
|
+ </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
@@ -78,13 +87,6 @@
|
|
|
class="button-warning"
|
|
|
@click="handleAudit(record)"
|
|
|
id="productLaunchAuditList-audit-btn">审核</a-button>
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.bizState=='PASS'"
|
|
|
- class="button-warning"
|
|
|
- @click="handleAudit(record)"
|
|
|
- id="productLaunchAuditList-audit-btn">显示</a-button>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
@@ -97,7 +99,7 @@
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { productLogList, productLogAuditBatch, productLogAudit } from '@/api/product'
|
|
|
+import { productLogList, productLogAuditBatch, productLogAudit, updateShowFlag } from '@/api/product'
|
|
|
export default {
|
|
|
name: 'ProductLaunchAuditList',
|
|
|
mixins: [commonMixin],
|
|
@@ -112,7 +114,8 @@ export default {
|
|
|
name: '', // 名称
|
|
|
code: '', // 编码
|
|
|
bizType: 'ONLINE', // 上线
|
|
|
- bizState: 'WAIT' // 状态
|
|
|
+ bizState: 'WAIT', // 状态
|
|
|
+ newProductFlag: undefined// 是否新品
|
|
|
},
|
|
|
tableHeight: 0,
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
@@ -125,6 +128,11 @@ export default {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ data.list[i].isEnable = data.list[i].showFlag + '' === '1'
|
|
|
+ }
|
|
|
this.disabled = false
|
|
|
}
|
|
|
this.spinning = false
|
|
@@ -144,11 +152,14 @@ export default {
|
|
|
{ title: '提交人', dataIndex: 'submitPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
{ title: '审核状态', dataIndex: 'bizStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
]
|
|
|
- if (this.queryParam.bizState != 'REFUSE') {
|
|
|
+ if (this.queryParam.bizState == 'WAIT') {
|
|
|
arr.splice(6, 1, { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' })
|
|
|
} else if (this.queryParam.bizState != 'WAIT') {
|
|
|
arr.splice(6, 1, { title: '审核时间', dataIndex: 'auditTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
arr.splice(7, 1, { title: '审核人', dataIndex: 'auditPerson', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true })
|
|
|
+ if (this.queryParam.bizState === 'PASS') {
|
|
|
+ arr.splice(8, 1, { title: '显示状态', scopedSlots: { customRender: 'showFlag' }, width: '10%', align: 'center' })
|
|
|
+ }
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -169,6 +180,7 @@ export default {
|
|
|
this.queryParam.code = ''
|
|
|
this.queryParam.beginDate = ''
|
|
|
this.queryParam.endDate = ''
|
|
|
+ this.queryParam.newProductFlag = undefined
|
|
|
this.time = []
|
|
|
this.$refs.rangeDate.resetDate(this.time)
|
|
|
this.$refs.table.refresh(true)
|
|
@@ -252,6 +264,21 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 修改显示状态
|
|
|
+ changeFlagHandle (record) {
|
|
|
+ const _data = {
|
|
|
+ productLogSn: record.productLogSn,
|
|
|
+ showFlag: record.isEnable ? '1' : '0'
|
|
|
+ }
|
|
|
+ this.spinning = true
|
|
|
+ updateShowFlag(_data).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$message.success(res.message)
|
|
|
+ }
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ this.spinning = false
|
|
|
+ })
|
|
|
+ },
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|