|
|
@@ -27,6 +27,12 @@
|
|
|
</el-input>
|
|
|
</template>
|
|
|
|
|
|
+ <template #table-column-cpName="{ scope }">
|
|
|
+ <div v-for="(item, index) in scope.row.cpList" :key="index">
|
|
|
+ {{item.name}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template #slot-modify="{ scope }">
|
|
|
<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id)" >修改</el-button >
|
|
|
</template>
|
|
|
@@ -69,14 +75,14 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="toAuth">申请认证</el-dropdown-item>
|
|
|
<el-dropdown-item command="cancelAuth">取消认证</el-dropdown-item>
|
|
|
- <el-dropdown-item command="delCpRelate">删除产品</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="delCpRelate">删除花材</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</template>
|
|
|
|
|
|
<template #slot-select-cp="{scope}">
|
|
|
<el-select @change="searchSelectCp" v-model="selectCpName" filterable remote reserve-keyword placeholder="请搜索产品" :remote-method="searchCpInfo" :loading="loading" style="width:200px;margin-left:20px;" size="medium">
|
|
|
- <el-option v-for="item in cpInfoList" :key="item.id" :label="`${item.id} ${item.name}(${item.auth == 1 ?'认证':'未认证'})`" :value="item.id"> </el-option>
|
|
|
+ <el-option v-for="item in cpInfoList" :key="item.id" :label="`${item.name}(${item.auth == 1 ?'认证':'未认证'})${item.id} ${item.delStatus==1?' 已删除': ''}`" :value="item.id"> </el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
|
|
|
@@ -277,6 +283,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
installCp(){
|
|
|
+ let that = this
|
|
|
if (this.$util.isEmpty(this.selectedIds)) {
|
|
|
this.$message.error('请选花材')
|
|
|
return false
|
|
|
@@ -285,8 +292,14 @@ export default {
|
|
|
this.$message.error('请选产品')
|
|
|
return false
|
|
|
}
|
|
|
- this.$service.ptCpItem.setCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId}).then((res) => {
|
|
|
-
|
|
|
+ this.$confirm('确认设置?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
+ this.$service.ptCpItem.setCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId}).then((res) => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ that.selectCpId = 0
|
|
|
+ that.selectCpName =''
|
|
|
+ that.cpInfoList = []
|
|
|
+ that.app.refresh({ classId: this.classId,cpId:this.cpId,cpClassStyle:this.cpClassStyle })
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
doMore(cmd){
|
|
|
@@ -301,8 +314,14 @@ export default {
|
|
|
this.$message.error('请选产品')
|
|
|
return false
|
|
|
}
|
|
|
- this.$service.ptCpItem.delCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId}).then((res) => {
|
|
|
-
|
|
|
+ this.$confirm('确认删除?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
|
|
|
+ this.$service.ptCpItem.delCpRelate({ids:JSON.stringify(this.selectedIds),cpId:this.selectCpId}).then((res) => {
|
|
|
+ that.$message.success('操作成功')
|
|
|
+ that.selectCpId = 0
|
|
|
+ that.selectCpName =''
|
|
|
+ that.cpInfoList = []
|
|
|
+ that.app.refresh({ classId: this.classId,cpId:this.cpId,cpClassStyle:this.cpClassStyle })
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
//申请认证
|
|
|
@@ -474,12 +493,13 @@ export default {
|
|
|
prop: 'id',
|
|
|
label: 'ID',
|
|
|
align: 'center',
|
|
|
+ 'min-width':50
|
|
|
},
|
|
|
{
|
|
|
prop: 'cover',
|
|
|
label: '封面',
|
|
|
align: 'center',
|
|
|
- 'min-width': 100,
|
|
|
+ 'min-width':60,
|
|
|
},
|
|
|
{
|
|
|
prop: 'name',
|
|
|
@@ -493,6 +513,12 @@ export default {
|
|
|
align: 'center',
|
|
|
'min-width':90,
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'cpName',
|
|
|
+ label: '产品',
|
|
|
+ align: 'center',
|
|
|
+ 'min-width':90,
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'stockWarning',
|
|
|
label: '预警值',
|
|
|
@@ -515,13 +541,13 @@ export default {
|
|
|
prop: 'inTurn',
|
|
|
label: '排序',
|
|
|
align: 'center',
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 90,
|
|
|
},
|
|
|
{
|
|
|
prop: 'addTime',
|
|
|
label: '创建时间',
|
|
|
align: 'center',
|
|
|
- minWidth: 180,
|
|
|
+ minWidth: 120,
|
|
|
},
|
|
|
],
|
|
|
on: {
|
|
|
@@ -532,7 +558,7 @@ export default {
|
|
|
op: {
|
|
|
visible: true,
|
|
|
props: {
|
|
|
- width: 250,
|
|
|
+ width: 200,
|
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
|
label: '操作',
|