|
|
@@ -28,11 +28,11 @@
|
|
|
<view v-if="!$util.isEmpty(globalCpList)">
|
|
|
<template v-for="(productItem, productIndex) in globalCpList">
|
|
|
<view style="height:255upx" :key="productIndex">
|
|
|
- <ItemStock :info="productItem" @moreAction="moreAction"
|
|
|
+ <cpStock :info="productItem" @moreAction="moreAction" @doIt="doIt"
|
|
|
@doPrintLabel="doPrintLabel" @cancelDiscountFn="cancelDiscountFn" @cancelFullOff="cancelFullOff"
|
|
|
:ref="`productRef${productItem.id}`" @hideChangeFn="hideChangeFn"
|
|
|
@cancelPreSellFn="cancelPreSellFn" @breakSingleItem="breakSingleItem">
|
|
|
- </ItemStock>
|
|
|
+ </cpStock>
|
|
|
</view>
|
|
|
</template>
|
|
|
</view>
|
|
|
@@ -93,7 +93,7 @@
|
|
|
<script>
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
- import ItemStock from "./components/cpItem";
|
|
|
+ import cpStock from "./components/cpItem";
|
|
|
import cpMins from "@/mixins/cp";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { getWeixinId } from "@/api/invite";
|
|
|
@@ -107,36 +107,37 @@
|
|
|
components: {
|
|
|
AppSearchModule,
|
|
|
AppWrapperEmpty,
|
|
|
- ItemStock,
|
|
|
+ cpStock,
|
|
|
uniPopup,
|
|
|
ModalModule
|
|
|
},
|
|
|
mixins: [cpMins],
|
|
|
data() {
|
|
|
return {
|
|
|
- autoLoad: false,
|
|
|
- selectJobType: "stock",
|
|
|
- tabIndex: 0,
|
|
|
- getAppIdList:{},
|
|
|
- status:0,
|
|
|
- delStatus:0,
|
|
|
- printItemId:0,
|
|
|
- printType:0,
|
|
|
- printLabelShow:false,
|
|
|
- printNum:'',
|
|
|
- printFocus:false,
|
|
|
- warning:0,
|
|
|
- currentInfo:{},
|
|
|
- posterUrl:'',
|
|
|
- breakNum:'',
|
|
|
- breakFocus:false,
|
|
|
- breakShow:false,
|
|
|
- classIndex: 0,
|
|
|
- globalCpClassList:[],
|
|
|
- globalCpList:[],
|
|
|
- page:1,
|
|
|
- currentClassId:0,
|
|
|
- finishGetCp:0
|
|
|
+ autoLoad: false,
|
|
|
+ selectJobType: "stock",
|
|
|
+ tabIndex: 0,
|
|
|
+ getAppIdList:{},
|
|
|
+ status:0,
|
|
|
+ delStatus:0,
|
|
|
+ printItemId:0,
|
|
|
+ printType:0,
|
|
|
+ printLabelShow:false,
|
|
|
+ printNum:'',
|
|
|
+ printFocus:false,
|
|
|
+ warning:0,
|
|
|
+ currentInfo:{},
|
|
|
+ posterUrl:'',
|
|
|
+ breakNum:'',
|
|
|
+ breakFocus:false,
|
|
|
+ breakShow:false,
|
|
|
+ classIndex: 0,
|
|
|
+ globalCpClassList:[],
|
|
|
+ globalCpList:[],
|
|
|
+ page:1,
|
|
|
+ currentClassId:0,
|
|
|
+ finishGetCp:0,
|
|
|
+ skip:0
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
@@ -144,12 +145,11 @@
|
|
|
...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
|
|
|
},
|
|
|
onLoad() {
|
|
|
-
|
|
|
let that = this
|
|
|
+ that.skip = that.option.skip ? that.option.skip : 0
|
|
|
getWeixinId().then(res => {
|
|
|
that.getAppIdList = res.data
|
|
|
})
|
|
|
-
|
|
|
getCpClassMenu().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
that.globalCpClassList = res.data.list ? res.data.list : []
|
|
|
@@ -162,6 +162,19 @@
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
+ doIt(info){
|
|
|
+ if(this.skip == 0){
|
|
|
+ this.$util.pageTo({url: '/admin/cp/item?cpId='+info.id})
|
|
|
+ }
|
|
|
+ if(this.skip == 1){
|
|
|
+ //返回上一页带参数
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let prevPage = pages[ pages.length - 2 ];
|
|
|
+ //修改上一页data里面的xjData
|
|
|
+ prevPage.$vm.returnCpInfo = {cpId:info.id,cpName:info.name,needUpdate:1}
|
|
|
+ uni.navigateBack()
|
|
|
+ }
|
|
|
+ },
|
|
|
getCpList(){
|
|
|
if(this.finishGetCp == 1){
|
|
|
return false
|