|
|
@ -86,7 +86,16 @@ |
|
|
</template> |
|
|
</template> |
|
|
<template v-else-if="scope.row.asset_status==2"> |
|
|
<template v-else-if="scope.row.asset_status==2"> |
|
|
<p class="table_p2" @click="goDetails(scope.row.id,0)">查看资产</p> |
|
|
<p class="table_p2" @click="goDetails(scope.row.id,0)">查看资产</p> |
|
|
<p class="table_p2">申请摘牌</p> |
|
|
<el-upload |
|
|
|
|
|
class="upload-demo" |
|
|
|
|
|
:action="action1" |
|
|
|
|
|
:show-file-list="false" |
|
|
|
|
|
:on-error="handleAvatarError" |
|
|
|
|
|
list-type="picture" |
|
|
|
|
|
:on-success="(res,file,id)=>{handleAvatarSuccess1(res,file,scope.row.id)}" |
|
|
|
|
|
> |
|
|
|
|
|
<p class="table_p2" >申请摘牌</p> |
|
|
|
|
|
</el-upload> |
|
|
</template> |
|
|
</template> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -106,7 +115,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
|
import {assetList,getTopAssetClass} from '../../../api/index' |
|
|
import {assetList,getTopAssetClass,soldOut} from '../../../api/index' |
|
|
export default { |
|
|
export default { |
|
|
data(){ |
|
|
data(){ |
|
|
return{ |
|
|
return{ |
|
|
@ -119,6 +128,8 @@ export default { |
|
|
asset_type_id:'', |
|
|
asset_type_id:'', |
|
|
serial_name:'' |
|
|
serial_name:'' |
|
|
}, |
|
|
}, |
|
|
|
|
|
host:'http://wenhua.xingtongworld.com', |
|
|
|
|
|
action1:'http://wenhua.xingtongworld.com/api/Index/uploadFile', |
|
|
assetLists:[], |
|
|
assetLists:[], |
|
|
pageTotal:0, |
|
|
pageTotal:0, |
|
|
headerList:[ |
|
|
headerList:[ |
|
|
@ -138,6 +149,32 @@ export default { |
|
|
this.getTopAssetClass() |
|
|
this.getTopAssetClass() |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
|
|
|
soldOut(file,id){ |
|
|
|
|
|
let data={ |
|
|
|
|
|
id:id, |
|
|
|
|
|
delist:file |
|
|
|
|
|
} |
|
|
|
|
|
soldOut(data).then(res => { |
|
|
|
|
|
console.info(res) |
|
|
|
|
|
if(res.code==100){ |
|
|
|
|
|
this.$message.success('申请成功,请等待审核~') |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleAvatarError(){ |
|
|
|
|
|
this.$message.error('文件上传失败!'); |
|
|
|
|
|
}, |
|
|
|
|
|
handleAvatarSuccess1(res,file,id){ |
|
|
|
|
|
console.info(res) |
|
|
|
|
|
if(res.code==1){ |
|
|
|
|
|
let contract=this.host+res.data.img_url; |
|
|
|
|
|
this.soldOut(contract,id) |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
getTopAssetClass(){ |
|
|
getTopAssetClass(){ |
|
|
getTopAssetClass(this.query).then(res => { |
|
|
getTopAssetClass(this.query).then(res => { |
|
|
console.info(res) |
|
|
console.info(res) |
|
|
@ -149,7 +186,6 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
goDetails(id,type){ |
|
|
goDetails(id,type){ |
|
|
console.info(111) |
|
|
|
|
|
this.$router.push({path:'/AssetListing',query:{id:id,type:type}}) |
|
|
this.$router.push({path:'/AssetListing',query:{id:id,type:type}}) |
|
|
}, |
|
|
}, |
|
|
tableRowClassName({row, rowIndex}) { |
|
|
tableRowClassName({row, rowIndex}) { |
|
|
|