yyw提交
This commit is contained in:
parent
ca38b360b3
commit
69b8ebee3c
@ -46,6 +46,10 @@
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" circle @click="handleEdit(scope.row)"><el-icon><Edit /></el-icon></el-button>
|
||||
|
||||
<el-tooltip effect="dark" content="上传商品到聚水潭" placement="top">
|
||||
<el-button type="primary" circle @click="handleUpload(scope.row)"><el-icon><Upload /></el-icon></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -131,13 +135,13 @@
|
||||
<script>
|
||||
import { onMounted, reactive, toRefs } from "vue"
|
||||
import { get, post } from "@/api/request"
|
||||
import { Search, Plus, Edit, ZoomIn, Delete } from '@element-plus/icons'
|
||||
import { Search, Plus, Edit, ZoomIn, Delete, Upload } from '@element-plus/icons'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { parseErrors } from 'components/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Search, Plus, Edit, ZoomIn, Delete
|
||||
Search, Plus, Edit, ZoomIn, Delete, Upload
|
||||
},
|
||||
setup() {
|
||||
const data = reactive({
|
||||
@ -255,6 +259,18 @@ export default {
|
||||
})
|
||||
}
|
||||
|
||||
function handleUpload(row) {
|
||||
ElMessageBox.confirm('确定操作上传吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
post(`/api/combination/goods/jstUpload/${row.id}`, {}, 'PUT').then(() => {
|
||||
ElMessage({ type: 'success', message: '操作成功' })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
getSkusList()
|
||||
@ -271,7 +287,8 @@ export default {
|
||||
commitOpa,
|
||||
handleSkuDelete,
|
||||
toAddSku,
|
||||
getSkusList
|
||||
getSkusList,
|
||||
handleUpload
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,6 +66,10 @@
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" circle @click="handleEdit(scope.row)"><el-icon><Edit /></el-icon></el-button>
|
||||
|
||||
<el-tooltip effect="dark" content="上传商品到聚水潭" placement="top">
|
||||
<el-button type="primary" circle @click="handleUpload(scope.row)"><el-icon><Upload /></el-icon></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -145,13 +149,13 @@
|
||||
<script>
|
||||
import { onMounted, reactive, toRefs } from "vue"
|
||||
import { get, post } from "@/api/request"
|
||||
import { Search, Plus, Edit, ZoomIn, Delete } from '@element-plus/icons'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Search, Plus, Edit, ZoomIn, Delete, Upload } from '@element-plus/icons'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { parseErrors } from 'components/common'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Search, Plus, Edit, ZoomIn, Delete
|
||||
Search, Plus, Edit, ZoomIn, Delete, Upload
|
||||
},
|
||||
setup() {
|
||||
const data = reactive({
|
||||
@ -220,6 +224,18 @@ export default {
|
||||
data.itemInfo = JSON.parse(JSON.stringify(item))
|
||||
data.showDialog = true
|
||||
}
|
||||
|
||||
function handleUpload(row) {
|
||||
ElMessageBox.confirm('确定操作上传吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
post(`/api/goods/sku/jstUpload/${row.id}`, {}, 'PUT').then(() => {
|
||||
ElMessage({ type: 'success', message: '操作成功' })
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function commitOpa() {
|
||||
data.opa_loading = true
|
||||
@ -291,6 +307,7 @@ export default {
|
||||
fetchData,
|
||||
handleAdd,
|
||||
handleEdit,
|
||||
handleUpload,
|
||||
commitOpa,
|
||||
getWarehouseList,
|
||||
getGoodsList
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user