shish 2 ani în urmă
părinte
comite
499bd744a8

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

@@ -52,8 +52,8 @@ export default {
                         {name: "收入统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/kdIncome"},
                         {name: "花材销量",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/productSale"},
                         {name: "客户下单榜",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/customSale"},
-                        {name: "采购统计",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgStat"},
-                        {name: "采购花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgItem"},
+                        {name: "向谁采购",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgStat"},
+                        {name: "由谁采购",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgItem"},
                         {name: "采购运费",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/cgFreight"},
                         {name: "库存总览",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/stock"},
                         {name: "损耗花材",img: `${this.$constant.imgUrl}/ghs/home/jyzk.png`,url: "/admin/stat/wastage"},

+ 6 - 0
ghsApp/src/admin/stat/cgItem.vue

@@ -18,6 +18,12 @@
 						<t-th><view @click="rankByFn('num')">总数量<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						<t-th><view @click="rankByFn('amount')">总金额<i class="iconfont iconsanjiao_xia"></i></view></t-th>
 						</t-tr>
+						<view style="padding:10upx 0 10upx 10upx;">
+							<view v-for="(cgItem,cgIndex) in profile.staffCg">
+							<text style="width:100upx;overflow:hidden;display:inline-block;">{{cgItem.cgStaffName?cgItem.cgStaffName:'未记名'}}</text>
+							<text>总采购:{{cgItem.num}}笔 ¥{{cgItem.amount?parseFloat(cgItem.amount):0}}</text>
+							</view>
+						</view>
 						<block v-if="profile.list && !$util.isEmpty(profile.list)">
 							<view v-for="(item, index) in profile.list" :key="index">
 								<t-tr>

+ 2 - 2
ghsApp/src/pages.json

@@ -267,8 +267,8 @@
 				{"path": "customSale","style": {"navigationBarTitleText": "客户下单排行"}},
 				{"path": "clear","style": {"navigationBarTitleText": "结账跟踪"}},
 				{"path": "incomeStat","style": {"navigationBarTitleText": "应收款"}},
-				{"path": "cgStat","style": {"navigationBarTitleText": "采购统计"}},
-				{"path": "cgItem","style": {"navigationBarTitleText": "采购花材"}},
+				{"path": "cgStat","style": {"navigationBarTitleText": "向谁采购"}},
+				{"path": "cgItem","style": {"navigationBarTitleText": "由谁采购"}},
 				{"path": "cgFreight","style": {"navigationBarTitleText": "采购运费统计"}},
 				{"path": "stock","style": {"navigationBarTitleText": "库存总览"}},
 				{"path": "mayPayStat","style": {"navigationBarTitleText": "应付款"}},

+ 32 - 1
ghsApp/src/pagesPurchase/details.vue

@@ -41,6 +41,16 @@
 						<view class="tui-title ">供货商</view>
 						<text>{{ option.ghsName }}</text>
 					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :arrow="true">
+						<div class="tui-title">采购人</div>
+						<picker mode="selector" :value="form.cgStaffId" :range="staffList" range-key="name" @change="cgManChange" class="tui-input" >
+						<input v-model="form.cgStaffId" name="cgStaffId" type="text" hidden />
+						<div style="padding:6upx 0 6upx 0;color:#ccc;" v-if="form.cgStaffName==''">请选择</div>
+						<div style="padding:6upx 0 6upx 0;" v-else>{{form.cgStaffName}}</div>
+						</picker>
+					</tui-list-cell>
+
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 						<view class="tui-title ">入库日期</view>
 						<AppDatePicker v-if="canIEdit" :dateVal.sync="form.entryTime" :placeholder="'今天'"/>
@@ -171,6 +181,7 @@ import {getPurchaseDetailApi,createPurchaseOrderApi} from "@/api/purchase";
 import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
 import AppDatePicker from "@/components/app-date-picker";
 import { getPrint } from "@/api/shop";
+import { getAllStaff } from "@/api/shop-admin"
 export default {
 	components: {
 		TuiListCell,
@@ -185,6 +196,7 @@ export default {
 			autoLoad: false,
 			selectJobType: "purchase",
 			supplier:'',
+			staffList:[],
 			form: {
 				packingCharge: "",
 				shortCharge: "",
@@ -196,7 +208,9 @@ export default {
 				remark:"",
 				avgKgWeight:'',
 				needPrint:2,
-				fistWcPrintNum:1
+				fistWcPrintNum:1,
+				cgStaffId:0,
+				cgStaffName:''
 			},
 			showCustomer: false,
 			detailsInfo: {},
@@ -238,6 +252,14 @@ export default {
 			this.showCustomer = true;
 		}
 		this.selectAllPrice;
+
+		//获取所有在职员工
+		getAllStaff().then(res=>{
+			if(res.code == 1){
+				this.staffList = res.data.list
+			}
+		})
+
 	},
 	onUnload(){
 		uni.removeStorageSync('newGhs');
@@ -295,6 +317,15 @@ export default {
 		}
 	},
 	methods: {
+		cgManChange(e){
+			let index = e.detail.value
+			if(!this.$util.isEmpty(this.staffList)){
+				if(this.staffList[index]){
+					this.form.cgStaffName = this.staffList[index].name
+					this.form.cgStaffId = this.staffList[index].id
+				}
+			}
+		},
 		changeYfPayWay(index){
 			this.form.yfPayWay = index
 			this.inputFn()

+ 5 - 1
ghsApp/src/pagesPurchase/info.vue

@@ -32,7 +32,11 @@
 					</view>
 				</view>
 				<view class="order-info_box">
-					<view>入库人员:</view>
+					<view>采购人员:</view>
+					<view>{{ detailInfo.cgStaffName }}</view>
+				</view>
+				<view class="order-info_box">
+					<view>录入人员:</view>
 					<view>{{ detailInfo.adminName }}</view>
 				</view>
 				<view class="order-info_box">

+ 5 - 1
ghsApp/src/pagesPurchase/orderItem.vue

@@ -33,7 +33,11 @@
 					<text class="info-value">{{ info.itemNum?parseFloat(info.itemNum):0 }}扎 </text>
 				</view>
 				<view class="info-row">
-					<text class="info-label"> 操作:</text>
+					<text class="info-label"> 采购:</text>
+					<text class="info-value">{{ info.cgStaffName?info.cgStaffName:'' }} </text>
+				</view>
+				<view class="info-row">
+					<text class="info-label"> 录入:</text>
 					<text class="info-value" style="overflow: hidden; text-overflow:ellipsis; white-space: nowrap;width:300upx;">{{ info.adminName }} </text>
 				</view>
 				<view v-if="!$util.isEmpty(info.remark)" class="info-row">