| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <div>
- <el-button :type="disabled?'':'primary'" size="small" @click="onshow" :disabled="disabled">{{$t(`批量上架`)}}</el-button>
- </div>
- </template>
- <script>
- export default {
- name: "batchUp",
- props:["rowData","disabled"],
- methods:{
- onshow(){
- this.onBatchUp()
- },
- onBatchUp(){
- this.$confirm(this.$t('确定上架这些商品吗')+'?', this.$t('提示'), {
- confirmButtonText: this.$t('确定'),
- cancelButtonText: this.$t('取消'),
- type: 'warning'
- }).then(async () => {
- let row = []
- this.rowData.forEach(function (item,index) {
- row[index] = item.sc_points_productid
- })
- const res = await this.$api.requested({
- "id": 2026052209114006,
- "content": {
- "sc_points_productids": row.join(",")
- },
- })
- this.tool.showMessage(res,()=>{
- this.$emit('batchUpSuccess')
- })
- }).catch(async () => {
- this.$message({
- type: 'info',
- message: this.$t('已取消批量上架')
- });
- });
- }
- }
- }
- </script>
- <style scoped>
- </style>
|