|
@@ -224,15 +224,22 @@
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
- icon="el-icon-edit"
|
|
|
|
|
- @click="handleUpdate(scope.row)"
|
|
|
|
|
|
|
+ icon="el-icon-document-copy"
|
|
|
|
|
+ @click="handleUpdate(scope.row, 'infoShow')"
|
|
|
>详情
|
|
>详情
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+<!-- <el-button-->
|
|
|
|
|
+<!-- size="mini"-->
|
|
|
|
|
+<!-- type="text"-->
|
|
|
|
|
+<!-- icon="el-icon-edit"-->
|
|
|
|
|
+<!-- @click="productCopy(scope.row)"-->
|
|
|
|
|
+<!-- >一键入库-->
|
|
|
|
|
+<!-- </el-button>-->
|
|
|
<el-button
|
|
<el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
- icon="el-icon-document-copy"
|
|
|
|
|
- @click="productCopy(scope.row)"
|
|
|
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
|
+ @click="handleUpdate(scope.row, 'edit')"
|
|
|
>一键入库
|
|
>一键入库
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
@@ -932,7 +939,7 @@ import {
|
|
|
genFormatAttr,
|
|
genFormatAttr,
|
|
|
listStoreProduct,
|
|
listStoreProduct,
|
|
|
getStoreProduct,
|
|
getStoreProduct,
|
|
|
- addOrEdit,copyProduct,selectForbiddenKeywords,getExemptSecondMedicalDeviceList
|
|
|
|
|
|
|
+ oneClickStorage ,copyProduct,selectForbiddenKeywords,getExemptSecondMedicalDeviceList
|
|
|
} from "@/api/store/platformProduct";
|
|
} from "@/api/store/platformProduct";
|
|
|
import {getAllStoreProductCategory} from "@/api/store/storeProductCategory";
|
|
import {getAllStoreProductCategory} from "@/api/store/storeProductCategory";
|
|
|
import {getAllStoreProductRule} from "@/api/store/storeProductRule";
|
|
import {getAllStoreProductRule} from "@/api/store/storeProductRule";
|
|
@@ -2135,15 +2142,22 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
|
|
|
|
+ handleUpdate(row, type) {
|
|
|
this.reset();
|
|
this.reset();
|
|
|
var that = this;
|
|
var that = this;
|
|
|
|
|
+ console.log("type:",type)
|
|
|
this.clearExpireErrors(); // 清空过期错误提示
|
|
this.clearExpireErrors(); // 清空过期错误提示
|
|
|
const productId = row.productId || this.ids
|
|
const productId = row.productId || this.ids
|
|
|
getStoreProduct(productId).then(response => {
|
|
getStoreProduct(productId).then(response => {
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
- this.isViewMode = true; // 编辑模式
|
|
|
|
|
- this.title = "商品详情";
|
|
|
|
|
|
|
+ if(type === 'infoShow'){
|
|
|
|
|
+ this.isViewMode = true; // 禁用编辑模式
|
|
|
|
|
+ this.title = "商品详情";
|
|
|
|
|
+ }
|
|
|
|
|
+ if(type === 'edit'){
|
|
|
|
|
+ this.isViewMode = false; // 禁用编辑模式
|
|
|
|
|
+ this.title = "一键复制到自己店铺";
|
|
|
|
|
+ }
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
this.form.isShow = response.data.isShow.toString();
|
|
this.form.isShow = response.data.isShow.toString();
|
|
|
this.form.isHot = response.data.isHot.toString();
|
|
this.form.isHot = response.data.isHot.toString();
|
|
@@ -2382,7 +2396,7 @@ export default {
|
|
|
this.form.isCertificatePermanent = this.certificateValue ? 1 : 0;
|
|
this.form.isCertificatePermanent = this.certificateValue ? 1 : 0;
|
|
|
|
|
|
|
|
// 调用API提交数据
|
|
// 调用API提交数据
|
|
|
- addOrEdit(this.form).then(response => {
|
|
|
|
|
|
|
+ oneClickStorage(this.form).then(response => {
|
|
|
if (response.code === 200) {
|
|
if (response.code === 200) {
|
|
|
this.msgSuccess("操作成功!");
|
|
this.msgSuccess("操作成功!");
|
|
|
this.open = false;
|
|
this.open = false;
|