shish 2 лет назад
Родитель
Сommit
a3a396ea27

+ 2 - 1
ghsApp/src/admin/home/apply.vue

@@ -64,7 +64,8 @@ export default {
                     list:[
                         {name: "客户预订",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},
                         {name: "运费设置",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/order/freight"},
-                        {name: "物流",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/shop/wl"}
+                        {name: "物流",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/shop/wl"},
+                        {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/customList"}
                     ]
                 },
                 {

+ 1 - 1
ghsApp/src/admin/item/list.vue

@@ -124,7 +124,7 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import ItemStock from "./components/item";
 import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
-import { getWeixinId } from "@/api/invite/index";
+import { getWeixinId } from "@/api/invite";
 import { print,cancelDiscountPrice,cancelPreSell } from '@/api/product';
 import { getHdPoster,getSkPoster,breakItem,changeFrontHide } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';

+ 377 - 0
ghsApp/src/admin/item/simple.vue

@@ -0,0 +1,377 @@
+<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">
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<t-tr header>
+							<t-th><view style="width:230upx;text-align:left;">名称</view></t-th>
+							<t-th> </t-th>
+							<t-th> </t-th>
+							<t-th> </t-th>
+							<t-th> </t-th>
+						</t-tr>
+						<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;" 
+										@click="pageTo({url:'/admin/item/detail?id='+productItem.id})">
+											{{productItem.name}}
+										</view>
+									</t-td>
+									<t-td>
+										<view style="color:#333333;font-size:29upx;" @click.stop="doPrintLabel(productItem,1)">打价码</view>
+									</t-td>
+									<t-td>
+										<view style="color:#333333;font-size:29upx;" @click.stop="doPrintLabel(productItem,0)">打标签</view>
+									</t-td>
+									<t-td>
+										<view style="color:#333333;font-size:29upx;" 
+										@click="goToStockDetail(productItem)">
+											库明细
+										</view>
+									</t-td>
+									<t-td>
+										<view style="color:#333333;font-size:29upx;" @click="moreAction(productItem)">
+											更多
+										</view>
+									</t-td>
+								</t-tr>
+							</block>
+						</block>
+					</t-table>
+				</view>
+			</scroll-view>
+		</view>
+
+		<uni-popup ref="rightShowMore" 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;">
+				<view style="width:100vw;"><button @click="costChange()">成本变动记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="priceChange()">价格变动记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="varietyManage()">多颜色</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="preSell()">预售</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="orderRecord()">下单记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="copyCreate()">复制新建</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="sendStock()">分配库存</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="shareItem()">打开分享(批发)</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="getHdPosterFn()">分享海报(批发)</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="getSkPosterFn()">分享海报(零售)</button></view>
+				<view style="width:100vw;margin-top:30upx;"><button @click="closeRightShow()">取消</button></view>
+			</view>
+		</uni-popup>
+
+		<modal-module :show="printLabelShow" @click="dialogInputConfirm" :maskClosable="true" title="数量" padding="30rpx 30rpx" >
+		<template v-slot:content>
+			<div class="app-modal-input-wrap">
+			<div class="inp-list-line">
+				<div class="line-input">
+				<input type="number" ref="input" style="width:61.8%;text-align:center;" @blur="blur" :focus="printFocus" v-model="printNum" :adjust-position="false" class="inp-input" />
+				</div>
+			</div>
+			</div>
+		</template>
+		</modal-module>
+
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { getProductDataApi,print,cancelDiscountPrice,cancelPreSell } 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";
+export default {
+	components: { SelectList, AppWrapperEmpty,ShopSelect,DateSelect,AppSearchModule,ModalModule},
+	mixins: [list],
+	computed: {		
+        ...mapGetters(["getDictionariesInfo","getLoginInfo","getMyShopInfo"])	
+    },
+	data() {
+		return {
+			py:'',
+			currentInfo:{},
+			printLabelShow:false,
+			getAppIdList:{},
+			printItemId:0,
+			printType:0,
+			printNum:'',
+			printFocus:false,
+			warning:0,
+			posterUrl:'',
+			breakNum:'',
+			breakFocus:false,
+			breakShow:false
+		};
+	},
+	onLoad() {
+		this.getSimpleData()
+		let that = this
+		getWeixinId().then(res => {
+			that.getAppIdList = res.data
+		})
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getSimpleData()
+		uni.stopPullDownRefresh()
+	},
+	onReachBottom() {
+		if (!this.list.finished) {
+			this.getSimpleData().then((res) => {
+				uni.stopPullDownRefresh()
+			})
+		} else {
+			uni.stopPullDownRefresh()
+		}
+	},
+	methods: {
+		goToStockDetail(item){
+			this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+item.id+'&name='+item.name})
+		},
+		moreAction(item){
+			this.currentInfo = item
+			this.$refs.rightShowMore.open('top')
+		},
+		sendStock(){
+			this.pageTo({url: '/admin/item/sendStock?id='+this.currentInfo.id+'&price='+this.currentInfo.price+'&stock='+this.currentInfo.stock+'&name='+this.currentInfo.name})
+		},
+		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:'保存成功'})
+						}
+						});
+					}
+				}
+			});
+		},
+		changeClass(index){
+			this.$refs.selectFlowerNumRef.close()
+			this.swichClass(index)
+		},
+		selectFlowerNumFn(){
+			this.$refs.selectFlowerNumRef.open('top')
+		},
+		blur() {
+			this.printFocus = false
+		},
+		doPrintLabel(item,type){
+			this.printItemId = item.id
+			this.printType = type
+			this.printLabelShow = true
+			this.printNum = null
+			setTimeout(x => {
+				this.$nextTick(() => this.setFocus())
+			}, 200)
+		},
+		setFocus() {
+			this.printFocus = true
+		},
+		dialogInputConfirm(val) {
+			let that = this
+			if (val.index == 0) {
+				that.printLabelShow = false
+				that.printFocus = false
+				return
+			}
+			let currentNum = this.printNum
+			let itemId = this.printItemId
+			if (currentNum == null) {
+				that.$msg('请填写数量')
+				that.printFocus = true
+				return
+			}
+			if (currentNum <= 0) {
+				that.$msg('数量不能小于1')
+				that.printFocus = true
+				return
+			}
+			if (itemId == 0) {
+				that.$msg('打印的花材id出错')
+				that.printLabelShow = false
+				that.printFocus = false
+				return
+			}
+			print({id:itemId,num:currentNum,type:this.printType}).then(res=>{
+				if(res.code == 1){
+					that.printLabelShow = false
+					that.printFocus = false
+					uni.showToast({ title: '操作成功', duration: 1500 })
+				} else if(res.code == 0){
+					that.printLabelShow = false
+					that.printFocus = false
+					that.$msg(res.msg)
+				}
+			})
+		},
+		closeRightShow(){
+			this.$refs.rightShowMore.close()
+		},
+		costChange(){
+			this.closeRightShow()
+			this.pageTo({url: '/admin/changePrice/costChangeList?id='+this.currentInfo.id})
+		},
+		priceChange(){
+			this.closeRightShow()
+			this.pageTo({url: '/admin/changePrice/changeList?id='+this.currentInfo.id})
+		},
+		varietyManage(){
+			this.closeRightShow()
+			this.pageTo({url: "/admin/item/xjSelect?itemId="+this.currentInfo.id})
+		},
+		copyCreate(){
+			this.closeRightShow()
+			this.pageTo({url: '/admin/item/copy?id='+this.currentInfo.id})
+		},
+		orderRecord(){
+			this.closeRightShow()
+			this.pageTo({url: "/admin/order/itemOrder?productId="+this.currentInfo.id})
+		},
+		preSell(){
+			this.closeRightShow()
+			this.pageTo({url: "/admin/item/presell?id="+this.currentInfo.id})
+		},
+		init(){
+
+		},
+		closeRightShow(){
+			this.$refs.rightShowMore.close()
+		},
+		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;
+	padding-top:20upx;
+	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:20upx;
+		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>

+ 4 - 0
ghsApp/src/api/item/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getSimleList = data => {
+	return https.get('/item/simple-list', data)
+}
+
 export const batchAddItem = data => {
 	return https.post('/item-ms/batch-add-item', data)
 }

+ 2 - 1
ghsApp/src/pages.json

@@ -399,7 +399,8 @@
 				{"path": "xjSelect","style": {"navigationBarTitleText": "多颜色"}},
 				{"path": "presell","style": {"navigationBarTitleText": "预售管理"}},
 				{"path": "rechargeHb","style": {"navigationBarTitleText": "充值活动"}},
-				{"path": "sendStock","style": {"navigationBarTitleText": "分配库存"}}
+				{"path": "sendStock","style": {"navigationBarTitleText": "分配库存"}},
+				{"path": "simple","style": {"navigationBarTitleText": "花材"}}
 			]
 		},
 		{