|
|
@@ -16,9 +16,9 @@
|
|
|
为平台认证产品,请优先采用,用后可改名称图片</view>
|
|
|
</view>
|
|
|
<view class="scroll-middle_bx">
|
|
|
- <block v-if="!$util.isEmpty(globalClassItemListContrapose)">
|
|
|
+ <block v-if="!$util.isEmpty(ptCpData)">
|
|
|
<view scroll-y class="item_list_bx" style="width: 100%">
|
|
|
- <template v-for="(productItem, productIndex) in globalClassItemListContrapose">
|
|
|
+ <template v-for="(productItem, productIndex) in ptCpData">
|
|
|
<view style="padding: 20upx 0">
|
|
|
<ptCpItemInfo
|
|
|
:isPrice="false"
|
|
|
@@ -35,239 +35,219 @@
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
<view style="width: 100%">
|
|
|
- <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(globalClassItemListContrapose)"/></view>
|
|
|
+ <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(ptCpData)"/></view>
|
|
|
</block>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </template>
|
|
|
- <script>
|
|
|
- import AppSearchModule from "@/components/module/app-search";
|
|
|
- import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
- import ptCpItemInfo from "./components/ptCpItem";
|
|
|
- import productMins from "@/mixins/product";
|
|
|
- import productContraposeMins from "@/mixins/ptProductContrapose";
|
|
|
- import { mapGetters } from "vuex";
|
|
|
- import { delStatusUpdate } from "@/api/product";
|
|
|
- import { changeAuth } from "@/api/pt-item";
|
|
|
- export default {
|
|
|
- name: "ptItemList",
|
|
|
- components: {
|
|
|
- AppSearchModule,
|
|
|
- AppWrapperEmpty,
|
|
|
- ptCpItemInfo
|
|
|
- },
|
|
|
- mixins: [productMins, productContraposeMins],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- autoLoad: false,
|
|
|
- selectJobType: "getPtItem",
|
|
|
- tabIndex: 0,
|
|
|
- modifyStock:{},
|
|
|
- form: {id:0,delStatus:0},
|
|
|
- };
|
|
|
- },
|
|
|
- computed:{
|
|
|
- ...mapGetters(["getMyShopInfo","getLoginInfo"]),
|
|
|
- },
|
|
|
- onLoad() {
|
|
|
- this.ptItemInit()
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import ptCpItemInfo from "./components/ptCpItem";
|
|
|
+import productMins from "@/mixins/product";
|
|
|
+import productContraposeMins from "@/mixins/ptProductContrapose";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { delStatusUpdate } from "@/api/product";
|
|
|
+import { changeAuth } from "@/api/pt-item";
|
|
|
+import { getPtCpList } from "@/api/cp"
|
|
|
+export default {
|
|
|
+ name: "ptCpList",
|
|
|
+ components: {
|
|
|
+ AppSearchModule,
|
|
|
+ AppWrapperEmpty,
|
|
|
+ ptCpItemInfo
|
|
|
+ },
|
|
|
+ mixins: [productMins, productContraposeMins],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ autoLoad: false,
|
|
|
+ selectJobType: "getPtItem",
|
|
|
+ tabIndex: 0,
|
|
|
+ modifyStock:{},
|
|
|
+ form: {id:0,delStatus:0},
|
|
|
+ finishGetCp:0,
|
|
|
+ page:1,
|
|
|
+ ptCpData:[]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ ...mapGetters(["getMyShopInfo","getLoginInfo"]),
|
|
|
+ },
|
|
|
+ onReachBottom(){
|
|
|
+ this.getPtCpList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ modifyAuth(id){
|
|
|
+ this.$util.confirmModal({content:'?'},() => {
|
|
|
+ changeAuth({id:id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg('success')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
- onReachBottom(){
|
|
|
- this.page++
|
|
|
- this.shopId = this.getMyShopInfo.id;
|
|
|
- this.initDataContrapose({ type:'waring', shopId: this.shopId,status:0,delStatus:0})
|
|
|
+ getPtCpList(){
|
|
|
+ if(this.finishGetCp == 1){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let that = this
|
|
|
+ getPtCpList({page:that.page}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.ptCpData = that.page == 1 ? res.data.list : that.ptCpData.concat(res.data.list)
|
|
|
+ if(res.data.moreData == 1){
|
|
|
+ that.page++
|
|
|
+ }else{
|
|
|
+ that.finishGetCp = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- onShow(){
|
|
|
+ init() {
|
|
|
+ this.getPtCpList()
|
|
|
},
|
|
|
- methods: {
|
|
|
- modifyAuth(id){
|
|
|
- this.$util.confirmModal({content:'?'},() => {
|
|
|
- changeAuth({id:id}).then(res=>{
|
|
|
+ selectItem(item){
|
|
|
+ let that = this
|
|
|
+ if(item.select == 2 && item.is_delete == 1){
|
|
|
+ that.$util.confirmModal({content:'确认恢复?'},() => {
|
|
|
+ delStatusUpdate({id: item.ghs_item_id, delStatus: 0}).then(res => {
|
|
|
+ uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
|
- this.$msg('success')
|
|
|
+ that.$msg("恢复成功")
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- ptItemInit(){
|
|
|
- this.shopId = this.getMyShopInfo.id;
|
|
|
- this.initDataContrapose({ type:'waring', shopId: this.shopId,status:0,delStatus:0})
|
|
|
- },
|
|
|
- init() {
|
|
|
- },
|
|
|
- selectItem(item){
|
|
|
- let that = this
|
|
|
- if(item.select == 2 && item.is_delete == 1){
|
|
|
- that.$util.confirmModal({content:'确认恢复?'},() => {
|
|
|
- delStatusUpdate({id: item.ghs_item_id, delStatus: 0}).then(res => {
|
|
|
- uni.hideLoading()
|
|
|
- if(res.code == 1){
|
|
|
- that.$msg("恢复成功")
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }else{
|
|
|
- if(item.select == 2){
|
|
|
- this.$util.confirmModal({content:'确认查看?'},() => {
|
|
|
- this.$util.pageTo({ url: '/admin/item/detail?id='+item.ghs_item_id})
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- this.$util.confirmModal({content:'确认采用?'},() => {
|
|
|
- this.$util.pageTo({ url: '/admin/item/detail',type:2,query:{ptItemId:item.id}})
|
|
|
+ }else{
|
|
|
+ if(item.select == 2){
|
|
|
+ this.$util.confirmModal({content:'确认查看?'},() => {
|
|
|
+ this.$util.pageTo({ url: '/admin/item/detail?id='+item.ghs_item_id})
|
|
|
})
|
|
|
+ return
|
|
|
}
|
|
|
- },
|
|
|
- affirm(val) {
|
|
|
- if (val.index === 0) {
|
|
|
- this.modalCancel();
|
|
|
- }
|
|
|
- },
|
|
|
- change(e) {
|
|
|
- if (this.tabIndex == e.index) {
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中"
|
|
|
- });
|
|
|
- this.tabIndex = e.index;
|
|
|
- this.globalClassItemListContrapose = this.allFilterProductInfoContrapose;
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
- },
|
|
|
- scrollTop() {},
|
|
|
- initProductInfo() {
|
|
|
- this.globalClassItemListContrapose = [];
|
|
|
- this.page = 1;
|
|
|
- this.isMore = true;
|
|
|
- },
|
|
|
- selectSussess(val) {
|
|
|
- uni.showLoading({ title: "加载中" })
|
|
|
- this.initProductInfo();
|
|
|
- let type = "waring";
|
|
|
- this.shopId = val.selectItem.id;
|
|
|
- this.initDataContrapose({ type, shopId: this.shopId,status:0,delStatus:0});
|
|
|
+ this.$util.confirmModal({content:'确认采用?'},() => {
|
|
|
+ this.$util.pageTo({ url: '/admin/item/detail',type:2,query:{ptItemId:item.id}})
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- };
|
|
|
- </script>
|
|
|
- <style lang="scss" scoped>
|
|
|
- .billing_box_bg {
|
|
|
- height: 100%;
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.billing_box_bg {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ background: white;
|
|
|
+ flex-direction: column;
|
|
|
+ .input-wrap {
|
|
|
display: flex;
|
|
|
- background: white;
|
|
|
- flex-direction: column;
|
|
|
- .input-wrap {
|
|
|
- display: flex;
|
|
|
- padding: 22upx 20upx 22upx 30upx;
|
|
|
- .search-bar {
|
|
|
- flex: 1;
|
|
|
- }
|
|
|
- .city-select {
|
|
|
- display: flex;
|
|
|
- flex-shrink: 0;
|
|
|
- align-items: center;
|
|
|
- margin-right: 15upx;
|
|
|
- margin-left: 45upx;
|
|
|
- background-color: #ffff;
|
|
|
- .iconfont {
|
|
|
- margin-left: 20upx;
|
|
|
- font-size: 30upx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- .scroll-middle_bx {
|
|
|
+ padding: 22upx 20upx 22upx 30upx;
|
|
|
+ .search-bar {
|
|
|
flex: 1;
|
|
|
+ }
|
|
|
+ .city-select {
|
|
|
display: flex;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- overflow: hidden;
|
|
|
- margin-top:155upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ align-items: center;
|
|
|
+ margin-right: 15upx;
|
|
|
+ margin-left: 45upx;
|
|
|
+ background-color: #ffff;
|
|
|
+ .iconfont {
|
|
|
+ margin-left: 20upx;
|
|
|
+ font-size: 30upx;
|
|
|
+ }
|
|
|
}
|
|
|
- .tab-view {
|
|
|
- height: 100%;
|
|
|
+ }
|
|
|
+ .scroll-middle_bx {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-top:155upx;
|
|
|
+ }
|
|
|
+ .tab-view {
|
|
|
+ height: 100%;
|
|
|
+ width: 170upx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ background-color: #f0f2f6;
|
|
|
+ .tab-bar-item {
|
|
|
+ position: relative;
|
|
|
width: 170upx;
|
|
|
- flex-shrink: 0;
|
|
|
- background-color: #f0f2f6;
|
|
|
- .tab-bar-item {
|
|
|
- position: relative;
|
|
|
- width: 170upx;
|
|
|
- height: 90upx;
|
|
|
- box-sizing: border-box;
|
|
|
+ height: 90upx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 26upx;
|
|
|
+ color: #444;
|
|
|
+ font-weight: 400;
|
|
|
+ .tag {
|
|
|
display: flex;
|
|
|
+ padding: 0 20upx;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
- font-size: 26upx;
|
|
|
- color: #444;
|
|
|
- font-weight: 400;
|
|
|
- .tag {
|
|
|
- display: flex;
|
|
|
- padding: 0 20upx;
|
|
|
- align-items: center;
|
|
|
- position: absolute;
|
|
|
- right: 0;
|
|
|
- top: 0;
|
|
|
- height: 32upx;
|
|
|
- background: #ff2842;
|
|
|
- border-radius: 16upx;
|
|
|
- color: #fff;
|
|
|
- font-size: 20upx;
|
|
|
- }
|
|
|
- &:last-child{
|
|
|
- margin-bottom: 110upx;
|
|
|
- }
|
|
|
- }
|
|
|
- .active {
|
|
|
- position: relative;
|
|
|
- color: $mainColor;
|
|
|
- font-size: 26upx;
|
|
|
- background: #fff;
|
|
|
- }
|
|
|
- .active::before {
|
|
|
- content: "";
|
|
|
position: absolute;
|
|
|
- border-left: 8upx solid $mainColor;
|
|
|
- height: 100%;
|
|
|
- left: 0;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ height: 32upx;
|
|
|
+ background: #ff2842;
|
|
|
+ border-radius: 16upx;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 20upx;
|
|
|
+ }
|
|
|
+ &:last-child{
|
|
|
+ margin-bottom: 110upx;
|
|
|
}
|
|
|
}
|
|
|
- .right-box {
|
|
|
- height: 100%;
|
|
|
- flex: 1;
|
|
|
- box-sizing: border-box;
|
|
|
+ .active {
|
|
|
+ position: relative;
|
|
|
+ color: $mainColor;
|
|
|
+ font-size: 26upx;
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
- .item_list_bx {
|
|
|
- padding: 10upx 40upx;
|
|
|
+ .active::before {
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ border-left: 8upx solid $mainColor;
|
|
|
+ height: 100%;
|
|
|
+ left: 0;
|
|
|
}
|
|
|
- .item_list_title {
|
|
|
- margin-bottom: 20upx;
|
|
|
- font-size: 24upx;
|
|
|
- font-weight: 600;
|
|
|
- color: #666666;
|
|
|
+ }
|
|
|
+ .right-box {
|
|
|
+ height: 100%;
|
|
|
+ flex: 1;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .item_list_bx {
|
|
|
+ padding: 10upx 40upx;
|
|
|
+ }
|
|
|
+ .item_list_title {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ .select-cmd_bx {
|
|
|
+ & .kc {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 400;
|
|
|
+ margin-bottom: 60upx;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 10upx;
|
|
|
}
|
|
|
- .select-cmd_bx {
|
|
|
- & .kc {
|
|
|
- color: #999999;
|
|
|
- font-size: 28upx;
|
|
|
- font-weight: 400;
|
|
|
- margin-bottom: 60upx;
|
|
|
+ & .num_bx {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 80upx;
|
|
|
+ & > input {
|
|
|
+ width: 212upx;
|
|
|
+ height: 80upx;
|
|
|
+ border: 1upx solid #dddddd;
|
|
|
+ border-radius: 4upx;
|
|
|
text-align: center;
|
|
|
- margin-top: 10upx;
|
|
|
- }
|
|
|
- & .num_bx {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 80upx;
|
|
|
- & > input {
|
|
|
- width: 212upx;
|
|
|
- height: 80upx;
|
|
|
- border: 1upx solid #dddddd;
|
|
|
- border-radius: 4upx;
|
|
|
- text-align: center;
|
|
|
- margin-right: 24upx;
|
|
|
- }
|
|
|
+ margin-right: 24upx;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- </style>
|
|
|
+}
|
|
|
+</style>
|