|
@@ -138,7 +138,7 @@
|
|
|
<button class="action-button" @click="shareItem()">分享商品</button>
|
|
<button class="action-button" @click="shareItem()">分享商品</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="action-button-item">
|
|
<view class="action-button-item">
|
|
|
- <button class="action-button" @click="getHdPosterFn()">生成海报</button>
|
|
|
|
|
|
|
+ <button class="action-button" @click="chooseItemPoster()">生成海报</button>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="action-button-item">
|
|
<view class="action-button-item">
|
|
|
<button class="action-button" @click="orderRecord()">下单记录</button>
|
|
<button class="action-button" @click="orderRecord()">下单记录</button>
|
|
@@ -176,17 +176,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</uni-popup>
|
|
</uni-popup>
|
|
|
|
|
|
|
|
- <uni-popup ref="posterShow" background-color="#fff" type="center" :animation="true" class="class-popup-style">
|
|
|
|
|
- <view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
|
|
- <text style="position:absolute;right:50upx;top:10upx;font-size:70upx;" @click="closePoster()">×</text>
|
|
|
|
|
- <view style="width:100%;text-align:center;margin-top:75upx;">
|
|
|
|
|
- <image style="width:70%;margin:0 auto;border:1upx solid #CCCCCC;" :src="posterUrl" mode="widthFix"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view style="width:100%;margin-top:65upx;text-align:center;">
|
|
|
|
|
- <button class="admin-button-com big blue" style="width:300upx;" @click="downloadImg">保存图片</button>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </uni-popup>
|
|
|
|
|
|
|
+ <item-poster-popup ref="itemPosterPopup" :poster-url="posterUrl" :title="posterPopupTitle" @close="closePoster" @save="downloadPosterImg" />
|
|
|
|
|
|
|
|
<modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="报损数量" padding="30rpx 30rpx" >
|
|
<modal-module :show="wasteShow" @click="wasteConfirm" :maskClosable="true" title="报损数量" padding="30rpx 30rpx" >
|
|
|
<template v-slot:content>
|
|
<template v-slot:content>
|
|
@@ -243,12 +233,14 @@
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import ItemStock from "./components/item2";
|
|
import ItemStock from "./components/item2";
|
|
|
|
|
+import ItemPosterPopup from "./components/item-poster-popup.vue";
|
|
|
|
|
+import itemPosterMixin from "./mixins/itemPosterMixin";
|
|
|
import productMins from "@/mixins/product2";
|
|
import productMins from "@/mixins/product2";
|
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
|
|
import { print,cancelDiscountPrice,cancelPreSell,delStatusUpdate,cancelFullOffFn } from '@/api/product';
|
|
|
import { cancelLimitBuy } from '@/api/item';
|
|
import { cancelLimitBuy } from '@/api/item';
|
|
|
-import { getHdPoster,getSkPoster,changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } from '@/api/item'
|
|
|
|
|
|
|
+import { changeFrontHide,applyAuth,moveToLosing,updateItemRemark,clearItemRemark } 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"
|
|
|
import { partItem } from "@/api/part"
|
|
import { partItem } from "@/api/part"
|
|
@@ -259,10 +251,11 @@ export default {
|
|
|
AppSearchModule,
|
|
AppSearchModule,
|
|
|
AppWrapperEmpty,
|
|
AppWrapperEmpty,
|
|
|
ItemStock,
|
|
ItemStock,
|
|
|
|
|
+ ItemPosterPopup,
|
|
|
uniPopup,
|
|
uniPopup,
|
|
|
ModalModule
|
|
ModalModule
|
|
|
},
|
|
},
|
|
|
- mixins: [productMins],
|
|
|
|
|
|
|
+ mixins: [productMins, itemPosterMixin],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
autoLoad: false,
|
|
autoLoad: false,
|
|
@@ -280,7 +273,6 @@ export default {
|
|
|
printFocus:false,
|
|
printFocus:false,
|
|
|
warning:0,
|
|
warning:0,
|
|
|
currentInfo:{},
|
|
currentInfo:{},
|
|
|
- posterUrl:'',
|
|
|
|
|
wasteNum:'',
|
|
wasteNum:'',
|
|
|
wasteShow:false,
|
|
wasteShow:false,
|
|
|
wasteFocus:false,
|
|
wasteFocus:false,
|
|
@@ -496,52 +488,17 @@ export default {
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- closePoster(){
|
|
|
|
|
- this.$refs.posterShow.close()
|
|
|
|
|
- },
|
|
|
|
|
- getHdPosterFn(){
|
|
|
|
|
- this.closeRightShow()
|
|
|
|
|
- let that = this
|
|
|
|
|
- uni.showLoading({mask:true})
|
|
|
|
|
- getHdPoster({id:this.currentInfo.id}).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.id}).then(res=>{
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.posterUrl = res.data.imgUrl
|
|
|
|
|
- that.$refs.posterShow.open('top')
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
sendStock(){
|
|
sendStock(){
|
|
|
this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.id+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name,type:2})
|
|
this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.id+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name,type:2})
|
|
|
},
|
|
},
|
|
|
- downloadImg(){
|
|
|
|
|
- let that = this
|
|
|
|
|
- uni.downloadFile({
|
|
|
|
|
- url: this.posterUrl,
|
|
|
|
|
- success: (res) => {
|
|
|
|
|
- if (res.statusCode === 200) {
|
|
|
|
|
- uni.saveImageToPhotosAlbum({
|
|
|
|
|
- filePath: res.tempFilePath,
|
|
|
|
|
- success: function (data) {
|
|
|
|
|
- that.$refs.posterShow.close()
|
|
|
|
|
- uni.showToast({title:'保存成功'})
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ chooseItemPoster() {
|
|
|
|
|
+ const that = this
|
|
|
|
|
+ uni.showActionSheet({
|
|
|
|
|
+ itemList: ['批发海报', '零售海报'],
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ that.fetchItemPoster(res.tapIndex === 0 ? 'hd' : 'sk')
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
selectFlowerNumFn(){
|
|
selectFlowerNumFn(){
|
|
|
this.showClassImg = true
|
|
this.showClassImg = true
|