|
@@ -282,9 +282,10 @@
|
|
|
fixed="right"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- width="280"
|
|
|
+ width="170"
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button v-if="isAuth('pro:product:synchronization')" type="text" size="small" @click="syncHandle(scope.row.productId)">同步仓库</el-button>
|
|
|
<el-button v-if="isAuth('pro:product:info')" type="text" size="small" @click="detailHandle(scope.row.productId)">查看</el-button>
|
|
|
<el-button v-if="isAuth('pro:product:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.productId, false)">编辑</el-button>
|
|
|
<el-button v-if="isAuth('pro:product:change')" type="text" size="small" @click="changeHandle(scope.row.productId)">变更</el-button>
|
|
@@ -699,6 +700,33 @@ export default {
|
|
|
})
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
+ syncHandle (id) {
|
|
|
+ if (!id) return
|
|
|
+ this.$confirm(`确定同步仓库?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl(`/biz-service/product/synchronization`),
|
|
|
+ method: 'POST',
|
|
|
+ data: {id: id}
|
|
|
+ }).then(({data}) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.getDataList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
+ },
|
|
|
importFromExcel () {
|
|
|
this.importVisible = true
|
|
|
},
|