|
@@ -0,0 +1,234 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <view class="app-content">
|
|
|
|
|
+ <view class="ex-page">
|
|
|
|
|
+ <view class="input-wrap">
|
|
|
|
|
+ <view class="search-bar">
|
|
|
|
|
+ <app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="searchFn"/>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <scroll-view scroll-y scroll-with-animation class="main-view">
|
|
|
|
|
+ <view class="space-view ex-table">
|
|
|
|
|
+ <view style="line-height:55upx;">
|
|
|
|
|
+ <text v-for="(item, index) in selectList" :key="index" style="margin-right:36upx;font-size:30upx;" @click="delProduct(item)">{{ item.name }} {{ item.bigCount }} x</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
|
|
+ <block v-for="(productItem, productIndex) in list.data" :key="productIndex">
|
|
|
|
|
+ <t-tr>
|
|
|
|
|
+ <t-td>
|
|
|
|
|
+ <view style="width:230upx;text-align:left;color:black;font-size:28upx;
|
|
|
|
|
+ overflow: hidden; white-space: nowrap; text-overflow: ellipsis;font-weight:bold;"
|
|
|
|
|
+ @click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
|
|
|
|
|
+ <text style="color:#3385ff;margin-right:3upx;" v-if="productItem.frontHide == 1">隐</text>
|
|
|
|
|
+ {{productItem.name}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </t-td>
|
|
|
|
|
+ <t-td>
|
|
|
|
|
+ <input type="text" v-model="productItem.bigCount" class="inp-input" style="border:1upx solid #CCCCCC;font-size:29upx;color:black;" />
|
|
|
|
|
+ </t-td>
|
|
|
|
|
+ <t-td>
|
|
|
|
|
+ <button @click="addItem(productItem)" class="admin-button-com default middle">添加</button>
|
|
|
|
|
+ </t-td>
|
|
|
|
|
+ </t-tr>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ </t-table>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </scroll-view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
|
|
+import SelectList from "@/components/plugin/selectList";
|
|
|
|
|
+import { getProductDataApi,print,cancelDiscountPrice,cancelPreSell,delStatusUpdate } from "@/api/product";
|
|
|
|
|
+import { getSimleList } from "@/api/item";
|
|
|
|
|
+import { allOut } from "@/api/stock-out"
|
|
|
|
|
+import { list } from "@/mixins";
|
|
|
|
|
+import ShopSelect from "@/components/module/shopSelect";
|
|
|
|
|
+import DateSelect from "@/components/module/dateSelect";
|
|
|
|
|
+import {mapActions, mapGetters} from "vuex";
|
|
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
|
|
+import ModalModule from "@/components/plugin/modal"
|
|
|
|
|
+import { getWeixinId } from "@/api/invite";
|
|
|
|
|
+import productMins from "@/mixins/product";
|
|
|
|
|
+export default {
|
|
|
|
|
+ components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule,ModalModule},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapGetters(["getDictionariesInfo","getLoginInfo","getMyShopInfo"])
|
|
|
|
|
+ },
|
|
|
|
|
+ mixins: [productMins,list],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ selectJobType: "selectitem",
|
|
|
|
|
+ py:'',
|
|
|
|
|
+ currentInfo:{},
|
|
|
|
|
+ printLabelShow:false,
|
|
|
|
|
+ getAppIdList:{},
|
|
|
|
|
+ printItemId:0,
|
|
|
|
|
+ printType:0,
|
|
|
|
|
+ printNum:'',
|
|
|
|
|
+ printFocus:false,
|
|
|
|
|
+ warning:0,
|
|
|
|
|
+ posterUrl:'',
|
|
|
|
|
+ breakNum:'',
|
|
|
|
|
+ breakFocus:false,
|
|
|
|
|
+ breakShow:false,
|
|
|
|
|
+ checkStock:false
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad() {
|
|
|
|
|
+ this.getSimpleData()
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ getWeixinId().then(res => {
|
|
|
|
|
+ that.getAppIdList = res.data
|
|
|
|
|
+ })
|
|
|
|
|
+ this.selectJobId = this.option.id ? this.option.id : 0
|
|
|
|
|
+ },
|
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
|
+ this.resetList();
|
|
|
|
|
+ this.getSimpleData()
|
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
|
+ },
|
|
|
|
|
+ onReachBottom() {
|
|
|
|
|
+ if (!this.list.finished) {
|
|
|
|
|
+ this.getSimpleData().then((res) => {
|
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ delProduct(item){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ that.$util.confirmModal({content:'确认删除?'},() => {
|
|
|
|
|
+ that.delItem(item)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ addItem(item){
|
|
|
|
|
+ this.customData = item
|
|
|
|
|
+ this.customData.userPrice = 0.1
|
|
|
|
|
+ this.confirmAddItemModel(this.customData)
|
|
|
|
|
+ item.bigCount=''
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ },
|
|
|
|
|
+ init(){
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ searchFn(){
|
|
|
|
|
+ this.resetList()
|
|
|
|
|
+ this.getSimpleData()
|
|
|
|
|
+ },
|
|
|
|
|
+ getSimpleData(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ getSimleList({name:this.py,page: this.list.page}).then(res=>{
|
|
|
|
|
+ this.completes(res)
|
|
|
|
|
+ if (this.$util.isEmpty(res.data)){
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.ex-page {
|
|
|
|
|
+ background: white;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ .input-wrap {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ padding: 22upx 20upx 22upx 13upx;
|
|
|
|
|
+ .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;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .top-bar {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ top:130upx;
|
|
|
|
|
+ z-index: 20;
|
|
|
|
|
+ .bar{
|
|
|
|
|
+ width: 50%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ &:nth-child(1){
|
|
|
|
|
+ border-right: 1upx solid #eeeeec;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .main-view {
|
|
|
|
|
+ margin-top:10upx;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ background-color: #f9fbfc;
|
|
|
|
|
+ .space-view {
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ }
|
|
|
|
|
+ .ex-info {
|
|
|
|
|
+ padding: 30upx;
|
|
|
|
|
+ .info-cell {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ &:not(:first-child) {
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .cell-label {
|
|
|
|
|
+ width: 110upx;
|
|
|
|
|
+ color: #666666;
|
|
|
|
|
+ }
|
|
|
|
|
+ .cell-value {
|
|
|
|
|
+ margin-left: 40upx;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ &.warning {
|
|
|
|
|
+ color: #ffaf1d;
|
|
|
|
|
+ }
|
|
|
|
|
+ &.success {
|
|
|
|
|
+ color: #27c325;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .ex-table {
|
|
|
|
|
+ ::v-deep.icon-info {
|
|
|
|
|
+ color: #333333;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .bar-view {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 0 30upx;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100upx;
|
|
|
|
|
+
|
|
|
|
|
+ box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
|
|
|
|
|
+ .info-view {
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ .btn-view {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ .admin-button-com {
|
|
|
|
|
+ margin: 0 10upx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|