|
@@ -109,7 +109,7 @@
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
import { getCpItemList } from "@/api/cp";
|
|
import { getCpItemList } from "@/api/cp";
|
|
|
- import { print,cancelDiscountPrice,cancelPreSell } from '@/api/product';
|
|
|
|
|
|
|
+ import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate } from '@/api/product';
|
|
|
import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
|
|
import { getHdPoster,getSkPoster,breakItem,changeFrontHide,applyAuth } from '@/api/item'
|
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
import ModalModule from "@/components/plugin/modal"
|
|
@@ -164,6 +164,143 @@
|
|
|
that.getListFn()
|
|
that.getListFn()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ moreAction(item){
|
|
|
|
|
+ this.currentInfo = item
|
|
|
|
|
+ this.$refs.rightShowMore.open('top')
|
|
|
|
|
+ },
|
|
|
|
|
+ varietyManage(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: "/admin/item/xjSelect?itemId="+this.currentInfo.productId})
|
|
|
|
|
+ },
|
|
|
|
|
+ preSell(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: "/admin/item/presell?id="+this.currentInfo.productId})
|
|
|
|
|
+ },
|
|
|
|
|
+ orderRecord(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: "/admin/order/itemOrder?productId="+this.currentInfo.productId})
|
|
|
|
|
+ },
|
|
|
|
|
+ onStockChange(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: '/pagesStorehouse/stockWarn/onStockChange?id='+this.currentInfo.productId+'&name='+this.currentInfo.name})
|
|
|
|
|
+ },
|
|
|
|
|
+ sendStock(){
|
|
|
|
|
+ this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.productId+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name,type:2})
|
|
|
|
|
+ },
|
|
|
|
|
+ copyCreate(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: '/admin/item/copy?id='+this.currentInfo.productId})
|
|
|
|
|
+ },
|
|
|
|
|
+ costChange(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: '/admin/changePrice/costChangeList?id='+this.currentInfo.productId})
|
|
|
|
|
+ },
|
|
|
|
|
+ priceChange(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ this.pageTo({url: '/admin/changePrice/changeList?id='+this.currentInfo.productId})
|
|
|
|
|
+ },
|
|
|
|
|
+ delItem(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
|
|
+ delStatusUpdate({id:this.currentInfo.productId,delStatus:1}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.closeRightShow()
|
|
|
|
|
+ that.$msg('删除成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ ptAuth(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ that.$util.confirmModal({content:'确认申请?'},() => {
|
|
|
|
|
+ applyAuth({id:this.currentInfo.productId}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.closeRightShow()
|
|
|
|
|
+ that.$msg('已提交申请')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getHdPosterFn(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ uni.showLoading({mask:true})
|
|
|
|
|
+ getHdPoster({id:this.currentInfo.productId}).then(res=>{
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.posterUrl = res.data.imgUrl
|
|
|
|
|
+ that.$refs.posterShow.open('top')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getSkPosterFn(){
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ uni.showLoading({mask:true})
|
|
|
|
|
+ getSkPoster({id:this.currentInfo.productId}).then(res=>{
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.posterUrl = res.data.imgUrl
|
|
|
|
|
+ that.$refs.posterShow.open('top')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ shareItem() {
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ let id = this.currentInfo.productId
|
|
|
|
|
+ this.closeRightShow()
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
|
|
+ console.log('admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&id=0&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id)
|
|
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
|
|
+ //姜枫-2021.04.13
|
|
|
|
|
+ appId: that.getAppIdList.hd.miniAppId,
|
|
|
|
|
+ path: 'admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id,
|
|
|
|
|
+ //develop 开发版 trial 体验版 release 正式版
|
|
|
|
|
+ envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
|
|
|
|
|
+ extraData: {
|
|
|
|
|
+ 'shopId': that.loginInfo.shopId,
|
|
|
|
|
+ 'id': 0,
|
|
|
|
|
+ 'name':'',
|
|
|
|
|
+ },
|
|
|
|
|
+ success (res) {
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ if(plus.runtime.isApplicationExist({pname:'com.tencent.mm',action:'weixin://'})){
|
|
|
|
|
+ var sweixin
|
|
|
|
|
+ plus.share.getServices(function(s){
|
|
|
|
|
+ for (var i = 0; i < s.length; i++) {
|
|
|
|
|
+ var t = s[i];
|
|
|
|
|
+ if (t.id == 'weixin') {
|
|
|
|
|
+ sweixin = t;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ let miniOriginalId = that.dictInfo.miniOriginalId && that.dictInfo.miniOriginalId.current && that.dictInfo.miniOriginalId.current.hd ? that.dictInfo.miniOriginalId.current.hd : ''
|
|
|
|
|
+ if (sweixin) { //&& sweixin.nativeClient
|
|
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
|
|
+ id: miniOriginalId,
|
|
|
|
|
+ path: 'admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id,
|
|
|
|
|
+ type: 0
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$msg('没有找到微信服务');
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(e){
|
|
|
|
|
+ that.$msg("没有找到微信服务哦")
|
|
|
|
|
+ //that.$msg("获取微信失败:" + e.message)
|
|
|
|
|
+ //console.log(JSON.stringify(e));
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ this.$msg("请安装微信,再打开小程序")
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ },
|
|
|
|
|
+ closeRightShow(){
|
|
|
|
|
+ this.$refs.rightShowMore.close()
|
|
|
|
|
+ },
|
|
|
searchFn(e){
|
|
searchFn(e){
|
|
|
if(!this.$util.isEmpty(e)){
|
|
if(!this.$util.isEmpty(e)){
|
|
|
this.py = e
|
|
this.py = e
|