|
|
@@ -428,6 +428,14 @@
|
|
|
v-hasPermi="['store:storeProduct:remove']"
|
|
|
>删除
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-document-copy"
|
|
|
+ @click="productCopy(scope.row)"
|
|
|
+ v-hasPermi="['his:storeProduct:copyProduct']"
|
|
|
+ >一键复制
|
|
|
+ </el-button>
|
|
|
<!-- <el-button-->
|
|
|
<!-- size="mini"-->
|
|
|
<!-- type="text"-->
|
|
|
@@ -1187,7 +1195,7 @@ import {
|
|
|
importTemplate,
|
|
|
batchModify,
|
|
|
sync580,
|
|
|
- updateIsShow, exportDrugProduct,getAuthInfo
|
|
|
+ updateIsShow, exportDrugProduct,getAuthInfo,copyProduct
|
|
|
} from "@/api/hisStore/storeProduct";
|
|
|
import {getAllStoreProductCategory} from "@/api/hisStore/storeProductCategory";
|
|
|
import {getAllStoreProductRule} from "@/api/hisStore/storeProductRule";
|
|
|
@@ -2388,6 +2396,25 @@ export default {
|
|
|
done();
|
|
|
})
|
|
|
.catch(_ => {});
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 复制商品
|
|
|
+ * **/
|
|
|
+ productCopy(row){
|
|
|
+ this.$confirm('确认是否复制当前《'+row.productName+'》商品!', '复制商品', {
|
|
|
+ confirmButtonText: '确 认',
|
|
|
+ cancelButtonText: '取 消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ copyProduct(row).then(response => {
|
|
|
+ if(response.code === 200){
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|