Browse Source

2023-1-12

cmy 2 năm trước cách đây
mục cha
commit
98d0f5c3df

+ 9 - 0
src/access/node.js

@@ -361,6 +361,9 @@ export const warehouseManageGroupEditLocationManagement =
 export const warehouseManageGroupAuditLocationManagement =
   "warehouseManageGroup_auditLocationManagement"; //审核状态
 
+// 消耗品管理
+export const StockConsumeList = "stockConsume_List"; //编辑
+
 //报损单
 export const LossReport = "warehouseManageGroup_LossReport";
 export const LossReportAddLossReport = "LossReport_addLossReport"; //新增
@@ -767,6 +770,12 @@ export const TemplateListsave = "TemplateList_save"; //保存
 
 //股东管理
 export const RewardList = "Reward_List";//股东列表
+export const RewardAddUser = "Reward_addUser";//添加股东
+export const RewardEditUser= "Reward_editUser";//修改股东
+export const RewardDelUser= "Reward_delUser";//删除股东
+export const RewardEditShares= "Reward_editShares";//修改股份
+export const RewardSharesList= "Reward_editShares";//股份变动记录
+export const RewardABonusList= "Reward_aBonusList";//分红记录
 
 // 收银台
 export const Cashier = "Application_Cashier";

+ 27 - 0
src/api/Holders.js

@@ -26,3 +26,30 @@ export function Getinfo(data) {
     data,
   });
 }
+
+// 增加减少股份
+export function editShares(data) {
+  return request({
+    url: "/Holders/Holders/edit_shares",
+    method: "post",
+    data,
+  });
+}
+// 股份记录
+export function sharesList(data) {
+  return request({
+    url: "/Holders/HoldersRecord/list",
+    method: "post",
+    data,
+  });
+}
+
+// 分红记录
+export function holdersBonusList(data) {
+  return request({
+    url: "/Holders/HoldersBonus/list",
+    method: "post",
+    data,
+  });
+}
+

+ 27 - 0
src/api/Stock.js

@@ -687,3 +687,30 @@ export function getAllPickingGoodsDetail(data) {
     data,
   });
 }
+
+//消耗品列表
+export function ConsumeList(data) {
+  return request({
+    url: `/Stock/Consume/list`,
+    method: "post",
+    data,
+  });
+}
+//消耗品核销
+export function ConsumeWrite_off(data) {
+  return request({
+    url: `/Stock/Consume/write_off`,
+    method: "post",
+    data,
+  });
+}
+//消耗品调拨
+export function allocationConsume(data) {
+  return request({
+    url: `/Stock/Consume/allocation`,
+    method: "post",
+    data,
+  });
+}
+
+

+ 82 - 40
src/router/index.js

@@ -659,6 +659,34 @@ export const asyncRoutes = [{
 				},
 				component: () => import("@/views/goods/sale/AddGoodsAdjustPrice"),
 			},
+			// 预约订单
+			{
+				path: "item/OrderItem",
+				name: "OrderItem",
+				meta: {
+					title: "服务项目",
+					remixIcon: "list-unordered",
+				},
+				component: () => import("@/views/goods/item/OrderItem"),
+			},
+			{
+				path: "item/AddItem",
+				name: "AddItem",
+				meta: {
+					title: "新增服务项目",
+					remixIcon: "list-unordered",
+				},
+				component: () => import("@/views/goods/item/components/addItem"),
+			},
+			{
+				path: "item/editItem",
+				name: "EditItem",
+				meta: {
+					title: "编辑服务项目",
+					remixIcon: "list-unordered",
+				},
+				component: () => import("@/views/goods/item/components/addItem"),
+			},
 		],
 	},
 	{
@@ -2907,7 +2935,7 @@ export const asyncRoutes = [{
 				title: "应用",
 				remixIcon: "app-store-line",
 			},
-		}, ],
+		}]
 	},
 	{
 		path: "MoneyGoodsBill",
@@ -3221,7 +3249,7 @@ export const asyncRoutes = [{
 			{
 				path: "infoArticleList",
 				name: "InfoArticleList",
-				component: () => import("@/views/info/infoArticleList"),
+				component: () => import("@/views/AppBase/info/infoArticleList"),
 				meta: {
 					title: "文章列表",
 					// access: nodes.RewardList,
@@ -3230,7 +3258,7 @@ export const asyncRoutes = [{
 			{
 				path: "infoHomeList",
 				name: "InfoHomeList",
-				component: () => import("@/views/info/infoHomeList"),
+				component: () => import("@/views/AppBase/info/infoHomeList"),
 				meta: {
 					title: "自定义项",
 					// access: nodes.infoHomeList,
@@ -3252,45 +3280,68 @@ export const asyncRoutes = [{
 		children: [{
 				path: "RewardList",
 				name: "RewardList",
-				component: () => import("@/views/Shareholders/RewardList"),
+				component: () => import("@/views/AppBase/Shareholders/RewardList"),
 				meta: {
 					title: "股东列表",
 					// access: nodes.RewardList,
 				},
 			},
 			{
-				path: "CommissionStatistic",
-				name: "CommissionStatistic",
-				component: () => import("@/views/Shareholders/CommissionStatistic"),
+				path: "aBonus",
+				name: "ABonus",
+				component: () => import("@/views/AppBase/Shareholders/aBonus"),
 				meta: {
-					title: "提成统计",
-					// access: nodes.CommissionStatistic,
+					title: "分红记录",
+					// access: nodes.RewardABonusList,
 				},
 			},
 			{
-				path: "RuleCommission",
-				name: "RuleCommission",
-				component: () => import("@/views/Shareholders/RuleCommission"),
+				path: "addReward",
+				name: "AddReward",
+				component: () => import("@/views/AppBase/Shareholders/addReward"),
 				meta: {
 					title: "添加股东",
-					// access: nodes.CommissionRuleAddCommissionRule,
+					// access: nodes.RewardAddUser,
 				},
 			},
 			{
-				path: "RuleCommissionEdit",
-				name: "RuleCommissionEdit",
-				component: () => import("@/views/Shareholders/RuleCommission"),
+				path: "editReward",
+				name: "EditReward",
+				component: () => import("@/views/AppBase/Shareholders/addReward"),
 				meta: {
 					title: "修改股东",
-					// access: nodes.CommissionRuleEditCommissionRule,
+					// access: nodes.RewardEditUser,
 				},
 			},
 			{
-				path: "CommissionList",
-				name: "CommissionList",
-				component: () => import("@/views/Shareholders/CommissionList"),
+				path: "sharesList",
+				name: "SharesList",
+				component: () => import("@/views/AppBase/Shareholders/sharesList"),
 				meta: {
-					title: "提成记录",
+					title: "股份记录",
+					// access: nodes.RewardSharesList,
+				},
+			},
+		],
+	},
+	// 阶梯奖励
+	{
+		path: "ladder",
+		component: Layout,
+		redirect: "/ladder/ladderList",
+		alwaysShow: true,
+		hidden: true,
+		meta: {
+			title: "阶梯奖励",
+			remixIcon: "store-2-line",
+		},
+		children: [{
+				path: "ladderList",
+				name: "LadderList",
+				component: () => import("@/views/Shareholders/RewardList"),
+				meta: {
+					title: "股东列表",
+					// access: nodes.RewardList,
 				},
 			},
 		],
@@ -4121,25 +4172,6 @@ export const asyncRoutes = [{
 				},
 				component: () => import("@/views/SingleStore/order/ReturnOrder"),
 			},
-			// 预约订单
-			{
-				path: "goods/OrderItem",
-				name: "OrderItem",
-				meta: {
-					title: "服务项目",
-					remixIcon: "list-unordered",
-				},
-				component: () => import("@/views/SingleStore/subscribe/OrderItem"),
-			},
-			{
-				path: "goods/AddItem",
-				name: "AddItem",
-				meta: {
-					title: "新增服务项目",
-					remixIcon: "list-unordered",
-				},
-				component: () => import("@/views/SingleStore/subscribe/components/addItem"),
-			},
 			{
 				path: "order/OrderSubscribe",
 				name: "OrderSubscribe",
@@ -4303,6 +4335,16 @@ export const asyncRoutes = [{
 				},
 				component: () => import("@/views/stock/WarehouseManagement/Management"),
 			},
+			{
+				path: "Inventory/Consume/list",
+				name: "ConsumeList",
+				meta: {
+					title: "消耗品列表",
+					// access: nodes.StockConsumeList,
+					remixIcon: "home-6-line",
+				},
+				component: () => import("@/views/stock/Consume/consumeList"),
+			},
 			{
 				path: "Inventory/InventoryCheck",
 				name: "InventoryCheck",

+ 2 - 2
src/vab/components/GalleryBar/menus.js

@@ -114,13 +114,13 @@ const menusList = [{
 						fullPath: "/goods/manageG/GoodsGrouping",
 					},
 					{
-						path: "/SingleStore/goods/OrderItem",
+						path: "/goods/item/OrderItem",
 						name: "OrderSubscribe",
 						meta: {
 							title: "服务项目",
 							access: nodes.OrderItem,
 						},
-						fullPath: "/SingleStore/goods/OrderItem",
+						fullPath: "/goods/item/OrderItem",
 					}
 				],
 			},

+ 18 - 0
src/vab/components/GalleryBar/storeMenus.js

@@ -410,6 +410,7 @@ const menusList = [{
 					},
 				],
 			},
+			
 			{
 				path: "/SingleStore/Inventory/InventoryManagement",
 				meta: {
@@ -443,6 +444,23 @@ const menusList = [{
 					},
 				],
 			},
+			{
+				path: "/SingleStore/Inventory/Consume/list",
+				meta: {
+					title: "消耗品管理",
+					remixIcon: "home-6-line",
+				},
+				fullPath: "/SingleStore/Inventory/Consume/list",
+				children: [{
+						path: "/SingleStore/Inventory/Consume/list",
+						name: "InventoryManagement",
+						meta: {
+							title: "消耗品列表",
+						},
+						fullPath: "/SingleStore/Inventory/Consume/list",
+					},
+				],
+			},
 		],
 	},
 	{

+ 37 - 14
src/views/Shareholders/RewardList.vue → src/views/AppBase/Shareholders/RewardList.vue

@@ -1,9 +1,15 @@
 <template>
 	<ContainerQuery>
-		<div v-if="$accessCheck($Access.CommissionRuleAddCommissionRule)" slot="left">
-			<el-button size="small" type="primary" @click="$router.push('/Shareholders/RuleCommission')">
+		<div v-if="$accessCheck($Access.RewardList)" slot="left">
+			<el-button size="small" type="primary" @click="$router.push('/Shareholders/addReward')">
 				新增股东
 			</el-button>
+			<el-button size="small" type="primary" @click="$router.push('/Shareholders/sharesList')">
+				股份记录
+			</el-button>
+			<el-button size="small" type="primary" @click="$router.push('/Shareholders/aBonus')">
+				分红记录
+			</el-button>
 		</div>
 		<div slot="more">
 			<el-form size="small" :inline="true">
@@ -14,6 +20,7 @@
 			</el-form>
 		</div>
 		<el-table :data="rule_list">
+			<el-table-column prop="id" label="ID" show-overflow-tooltip min-width="50"></el-table-column>
 			<el-table-column prop="name" label="股东名称" show-overflow-tooltip min-width="155"></el-table-column>
 			<el-table-column prop="number" label="联系方式" show-overflow-tooltip min-width="155"></el-table-column>
 			<el-table-column prop="dends" label="分红股份" min-width="140"></el-table-column>
@@ -21,22 +28,27 @@
 			<el-table-column prop="createTime" label="添加时间" min-width="140"></el-table-column>
 			<el-table-column prop="name" label="操作" min-width="120">
 				<template slot-scope="scope">
-					<el-button v-if="$accessCheck($Access.CommissionRuleEditCommissionRule)" type="text" @click="
+					<el-button v-if="$accessCheck($Access.RewardEditUser)" type="text" @click="
               $router.push(
-                '/Shareholders/RuleCommissionEdit?id=' + scope.row.id
+                '/Shareholders/EditReward?id=' + scope.row.id
               )
             ">
 						修改
 					</el-button>
-					<el-button v-if="$accessCheck($Access.CommissionRuleDelCommissionRule)" type="text"
-						@click="delData(scope.row.id)">
+					<el-button v-if="$accessCheck($Access.RewardDelUser)" type="text" @click="delData(scope.row.id)">
 						删除
 					</el-button>
+					<el-button v-if="$accessCheck($Access.RewardEditShares)" type="text"
+						@click="showRewardChange(scope.row.id)">
+						股份
+					</el-button>
 				</template>
 			</el-table-column>
 		</el-table>
 		<FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
 			@sizeChange="sizeChange"></FooterPage>
+		<SharesChange v-if="show_reward" :id='rewardId' :is-edit='true' :visible="show_reward"
+			@close="show_reward = false" @confirm="sharesConfirm"></SharesChange>
 	</ContainerQuery>
 </template>
 
@@ -44,15 +56,18 @@
 	import {
 		Lst,
 	} from "@/api/Holders";
-	import {
-		enableRewardRule,
-		getAllRewardRule,
-		deleteRewardRule,
-	} from "@/api/Reward";
+	import SharesChange from "./components/sharesChange.vue";
 	export default {
 		name: "RewardList",
+		components: {
+			SharesChange,
+		},
 		data() {
 			return {
+				// 股东id
+				rewardId: '',
+				// 显示修改股份弹窗
+				show_reward: false,
 				rule_list: [],
 				time: '',
 				search_form: {
@@ -71,6 +86,15 @@
 			this.Lst();
 		},
 		methods: {
+			// 股份修改完成
+			sharesConfirm() {
+				this.Lst();
+			},
+			// 显示股份修改
+			showRewardChange(id) {
+				this.rewardId = id;
+				this.show_reward = true;
+			},
 			//  订单时间
 			changeTime(val) {
 				if (val && val.length) {
@@ -89,7 +113,6 @@
 				this.pageSize = val;
 				this.pageChange(1);
 			},
-			editData(index) {},
 			async Lst() {
 				const {
 					data,
@@ -110,7 +133,7 @@
 			},
 			// 删除
 			async delData(id) {
-				this.$confirm("是否要将该提成规则删除?", "提示", {
+				this.$confirm("是否要将该股东删除?", "提示", {
 					confirmButtonText: "确定",
 					cancelButtonText: "取消",
 					type: "warning",
@@ -121,7 +144,7 @@
 						type: "success",
 						message: "操作成功!",
 					});
-					this.getAllRewardRule();
+					this.Lst();
 				});
 			},
 		},

+ 128 - 0
src/views/AppBase/Shareholders/aBonus.vue

@@ -0,0 +1,128 @@
+<template>
+	<ContainerQuery>
+		<div slot="more">
+			<el-form inline size="small">
+				<el-form-item>
+					<el-input v-model="searchKey" style="width: 220px" placeholder="股东名称/股东ID" clearable
+						@keyup.enter.native="pageChange(1)" @clear="pageChange(1)">
+						<el-button slot="append" @click="pageChange(1)">
+							<i class="el-icon-search"></i>
+						</el-button>
+					</el-input>
+				</el-form-item>
+				<el-form-item label="股份类型">
+					<el-select v-model="searchType" placeholder="股份类型" style="width: 150px" clearable
+						@change="pageChange(1)">
+						<el-option label="全部" value=""></el-option>
+						<el-option label="原始股份" :value="1"></el-option>
+						<el-option label="分红股份" :value="2"></el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="查询月份">
+					<el-date-picker v-model="time" clearable type="month" end-placeholder="选择月份" @change="pageChange(1)">
+					</el-date-picker>
+				</el-form-item>
+			</el-form>
+		</div>
+		<!--    表格-->
+		<div class="table">
+			<el-table :data="tableData" style="width: 100%" type="index">
+				<el-table-column prop="goods" label="股东" width="180">
+					<template slot-scope="scope">
+						{{ scope.row.name }}<br />
+						ID:{{ scope.row.hol_id}}
+					</template>
+				</el-table-column>
+				<el-table-column prop="originNo" label="股份类型" width="180">
+					<template slot-scope="scope">
+						<span :class="{'success-status': scope.row.type === 1,'danger-status': scope.row.type === 2}">
+							{{ scope.row.type === 1 ? "原始股份" : "分红股份" }}
+						</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="shares" label="我的分红">
+					<template slot-scope="scope">
+						持有股份:{{scope.row.shares}}<br/>
+						分红奖金:{{scope.row.number}}<br/>
+					</template>
+				</el-table-column>
+				<el-table-column prop="number" label="股份奖池">
+					<template slot-scope="scope">
+						分红总金额:{{scope.row.total}}<br/>
+						分红总股份:{{scope.row.total_shares}}<br/>
+					</template>
+				</el-table-column>
+				<el-table-column prop="before" label="金额变动">
+					<template slot-scope="scope">
+						分红前:{{scope.row.before}}<br/>
+						分红后:{{scope.row.after}}<br/>
+					</template>
+				</el-table-column>
+				<el-table-column prop="createTime" label="分红时间">
+					<template slot-scope="scope">
+						{{ $_common.formatDate(scope.row.createTime,'yyyy-MM-dd') }}
+					</template>
+				</el-table-column>
+			</el-table>
+		</div>
+		<!--    分页查询-->
+		<FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
+			@sizeChange="sizeChange"></FooterPage>
+	</ContainerQuery>
+</template>
+<script>
+	import {
+		holdersBonusList
+	} from "@/api/Holders";
+
+	export default {
+		name: "ABonus",
+		data() {
+			return {
+				// 查询的时间
+				time:'',
+				state: "状态",
+				searchType: '',//1原始股份2分红股份
+				searchKey: '',
+				searchPm:'',//1增加2减少
+				total: 0,
+				page: 1,
+				pageSize: 10,
+				tableData: [],
+			};
+		},
+		created() {
+			this.holdersBonusList();
+		},
+		activated() {
+			if (this.$_isInit()) return;
+			this.holdersBonusList();
+		},
+		methods: {
+			async holdersBonusList() {
+				const {
+					data,
+					pageTotal
+				} = await holdersBonusList({
+					name: this.searchKey,
+					start_time: this.$_common.formatDate(new Date( this.time).getTime(),"yyyy-MM-dd") ,
+					type: this.searchType,
+					page: this.page,
+					pageSize: this.pageSize,
+				});
+				this.tableData = data;
+				this.total = pageTotal;
+			},
+			pageChange(page) {
+				this.page = page;
+				this.holdersBonusList();
+			},
+			// 每页数据大小改变
+			sizeChange(val) {
+				this.pageSize = val;
+				this.pageChange(1);
+			},
+		},
+	};
+</script>
+<style></style>

+ 131 - 0
src/views/AppBase/Shareholders/addReward.vue

@@ -0,0 +1,131 @@
+<template>
+	<ContainerTit>
+		<div slot="headr">
+			<el-button :loading="sub_load" type="primary" @click="submit">
+				提交保存
+			</el-button>
+		</div>
+		<div class="detail-tab-item">
+			<div class="detail-tab-title">添加股东</div>
+			<div class="detail-tab-main">
+				<el-form ref="add_form" label-position="right" :model="add_form" :rules="form_rules" size="small"
+					label-width="100px">
+					<el-form-item label="股东名称" prop="name">
+						<el-input v-model="add_form.name" style="width: 300px" size="small" placeholder="股东名称">
+						</el-input>
+					</el-form-item>
+					<el-form-item label="联系方式" prop="number">
+						<el-input v-model="add_form.number" style="width: 300px" size="small" placeholder="联系方式">
+						</el-input>
+					</el-form-item>
+
+					<el-form-item label="联系地址" prop="address">
+						<el-input v-model="add_form.address" style="width: 300px" size="small" placeholder="联系地址">
+						</el-input>
+					</el-form-item>
+					<el-form-item label="备注" prop="remk">
+						<el-input v-model="add_form.remk" style="width: 300px" size="small" placeholder="备注"></el-input>
+					</el-form-item>
+				</el-form>
+			</div>
+		</div>
+	</ContainerTit>
+</template>
+
+<script>
+	import {
+		add,
+		Getinfo,
+	} from "@/api/Holders";
+	export default {
+		name: "AddReward",
+		data() {
+			return {
+				sub_load:false,
+				form_rules: {
+					name: [{
+						required: true,
+						message: "请输入股东姓名",
+						trigger: "blur"
+					}, ],
+					number: [{
+						required: true,
+						message: "请输入股东联系电话",
+						trigger: "blur"
+					}, ],
+					address: [{
+						required: true,
+						message: "请输入股东联系地址",
+						trigger: "blur"
+					}, ],
+				},
+				add_form: {
+					name: "",
+					number: '',
+					address: "",
+					remk: "",
+					id: 0
+				},
+			};
+		},
+		created() {
+			if (this.$route.query.id) {
+				this.rule_id = this.$route.query.id;
+				this.Get();
+			}
+		},
+		activated() {
+			if (this.$_isInit()) return;
+			if (this.$route.query.id) {
+				this.rule_id = this.$route.query.id;
+				this.Get();
+			}
+		},
+		methods: {
+			// 获取详情
+			async Get() {
+				const {
+					data
+				} = await Getinfo({
+					id: this.rule_id
+				});
+				this.add_form = {
+					name: data.name,
+					number: data.number,
+					address: data.address,
+					remk: data.remk,
+					id: data.id,
+				};
+			},
+			async submit() {
+				this.$refs["add_form"].validate(async (valid) => {
+					if (valid) {
+						if (this.add_form.name == "") {
+							this.$message.warning("股东姓名不能为空");
+							return;
+						}
+						if (this.add_form.number == '') {
+							this.$message.warning("股东联系电话不能为空");
+							return;
+						}
+						if (this.add_form.address == '') {
+							this.$message.warning("股东联系地址不能为空");
+							return;
+						}
+						this.sub_load = true;
+						try {
+							const data = await add(this.add_form);
+							this.sub_load = false;
+							this.$message.success(data.data);
+							this.$closeCurrentGoEdit("/Shareholders/RewardList");
+						} finally {
+							this.sub_load = false;
+						}
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped></style>

+ 141 - 0
src/views/AppBase/Shareholders/components/sharesChange.vue

@@ -0,0 +1,141 @@
+<template>
+	<div>
+		<el-drawer class="edit-drawer" title="股份修改" size="650px" :visible.sync="visible"
+			direction="rtl" :modal="modal" :wrapper-closable="false" @close="close">
+			<el-form ref="form" :rules="rules" size="small" :model="form" label-width="120px">
+				<el-form-item label="股份数" prop="number">
+					<el-input-number v-model="form.number" controls-position="right" :min="1" @change="handleChange" ></el-input-number>
+				</el-form-item>
+				<el-form-item label="增加减少" prop="pm" style="margin-bottom: 20px">
+					<el-radio v-model="form.pm" label="1">增加</el-radio>
+					<el-radio v-model="form.pm" label="2">减少</el-radio>
+				</el-form-item>
+				<el-form-item label="股份类型" prop="type" style="margin-bottom: 20px">
+					<el-radio v-model="form.type" label="1">原始股份</el-radio>
+					<el-radio v-model="form.type" label="2">分红股份</el-radio>
+				</el-form-item>
+				<el-form-item label="备注" prop="remarks">
+					<el-input v-model="form.remarks" style="width: 300px" size="small" placeholder="备注"></el-input>
+				</el-form-item>
+				<el-form-item style="text-align: right; padding-right: 10px">
+					<el-button type="primary" @click="confirm">确 定</el-button>
+					<el-button @click="close">取 消</el-button>
+				</el-form-item>
+			</el-form>
+		</el-drawer>
+	</div>
+</template>
+
+<script>
+	import {
+		editShares,
+	} from "@/api/Holders";
+	export default {
+		name: "SharesChange",
+		props: {
+			visible: {
+				type: Boolean,
+				default: false,
+			},
+			isEdit: {
+				type: Boolean,
+				default: false,
+			},
+			// 是否需要遮罩层
+			modal: {
+				type: Boolean,
+				default: true,
+			},
+			id: {
+				type: [Number, String],
+				default: 0,
+			},
+		},
+		data() {
+			return {
+				isserch: true,
+				form: {
+					type: '1', //1原始股份2分红股份
+					// 股份数量
+					number: 1,
+					// 股份增加减少
+					pm: '1',
+					//备注
+					remarks: '',
+				},
+				rules: {
+					name: [{
+						required: true,
+						message: "请输入组名称",
+						trigger: "blur"
+					}]
+				}
+			};
+		},
+		created() {},
+		methods: {
+			close() {
+				this.$emit("close");
+			},
+			async confirm() {
+				this.$refs.form.validate(async (valid) => {
+					if (valid) {
+						const loading = this.$loading({
+							lock: true,
+							text: '提交中',
+							spinner: 'el-icon-loading',
+						});
+						const upData = {
+							"id": this.id, //仓库商品id
+							"type": this.form.type, //1原始股份2分红股份
+							"number": this.form.number, //数量
+							"pm": this.form.pm, //1增加2减少
+							"remarks": this.form.remarks //备注
+						}
+						const data = await editShares(upData);
+						loading.close();
+						this.$message({
+							message: data.data,
+							type: "success",
+						});
+						this.close();
+						this.$emit("confirm");
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped>
+	.item {
+		margin-right: 5px;
+		margin-left: 0 !important;
+		margin-bottom: 5px;
+	}
+
+	.btn-up {
+		position: relative;
+	}
+
+	.btn-department {
+		position: absolute;
+		left: 270px;
+		top: 4px;
+	}
+
+	.btn-role-up {
+		position: relative;
+	}
+
+	.add-role {
+		position: absolute;
+		left: 270px;
+		top: 4px;
+	}
+
+	.creat-shop {
+		color: #1890ff;
+		font-size: 12px;
+	}
+</style>

+ 139 - 0
src/views/AppBase/Shareholders/sharesList.vue

@@ -0,0 +1,139 @@
+<template>
+	<Container>
+		<div slot="left">
+			<el-form inline size="small">
+				<el-form-item>
+					<el-input v-model="searchKey" style="width: 220px" placeholder="股东名称/股东ID" clearable
+						@keyup.enter.native="pageChange(1)" @clear="pageChange(1)">
+						<el-button slot="append" @click="pageChange(1)">
+							<i class="el-icon-search"></i>
+						</el-button>
+					</el-input>
+				</el-form-item>
+				<el-form-item label="股份类型">
+					<el-select v-model="searchType" placeholder="股份类型" style="width: 150px" clearable
+						@change="pageChange(1)">
+						<el-option label="全部" value=""></el-option>
+						<el-option label="原始股份" :value="1"></el-option>
+						<el-option label="分红股份" :value="2"></el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="变动类型">
+					<el-select v-model="searchPm" placeholder="变动类型" style="width: 150px" clearable
+						@change="pageChange(1)">
+						<el-option label="全部" value=""></el-option>
+						<el-option label="增加" :value="1"></el-option>
+						<el-option label="减少" :value="2"></el-option>
+					</el-select>
+				</el-form-item>
+			</el-form>
+		</div>
+		<!--    表格-->
+		<div class="table">
+			<el-table :data="tableData" style="width: 100%" type="index">
+				<el-table-column prop="goods" label="股东" width="180">
+					<template slot-scope="scope">
+						{{ scope.row.name }}<br />
+						ID:{{ scope.row.hol_id}}
+					</template>
+				</el-table-column>
+				<el-table-column prop="originNo" label="股份类型" width="180">
+					<template slot-scope="scope">
+						<span :class="{'success-status': scope.row.type === 1,'danger-status': scope.row.type === 2}">
+							<span v-if="scope.row.type === 1">
+								原始股份
+							</span>
+							<span v-if="scope.row.type === 2">
+								分红股份
+							</span>
+						</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="remarks" label="说明"></el-table-column>
+				<el-table-column prop="amount" label="奖金">
+					<template slot-scope="scope">
+						<span :class="[
+                scope.row.pm === 1 ? 'success-status' : 'danger-status',
+              ]">
+							{{ scope.row.pm === 1 ? "+" : "-" }}{{ scope.row.number }}
+						</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="before" label="变动后股份"></el-table-column>
+				<el-table-column prop="time" label="创建时间">
+					<template slot-scope="scope">
+						{{ $_common.formatDate(scope.row.createTime) }}
+					</template>
+				</el-table-column>
+			</el-table>
+		</div>
+		<!--    分页查询-->
+		<FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
+			@sizeChange="sizeChange"></FooterPage>
+	</Container>
+</template>
+<script>
+	import {
+		sharesList
+	} from "@/api/Holders";
+
+	export default {
+		name: "SharesList",
+		data() {
+			return {
+				state: "状态",
+				searchType: '',//1原始股份2分红股份
+				searchKey: '',
+				searchPm:'',//1增加2减少
+				total: 0,
+				page: 1,
+				pageSize: 10,
+				tableData: [],
+			};
+		},
+		created() {
+			this.sharesList();
+		},
+		activated() {
+			if (this.$_isInit()) return;
+			this.sharesList();
+		},
+		methods: {
+			//  订单时间
+			// changeTime(val) {
+			// 	if (val && val.length) {
+			// 		this.search_form.start = val[0] / 1000;
+			// 		this.search_form.end = val[1] / 1000 + 86399;
+			// 	} else {
+			// 		this.search_form.start = "";
+			// 		this.search_form.end = "";
+			// 	}
+			// 	this.pageChange(1);
+			// },
+			async sharesList() {
+				const {
+					data,
+					pageTotal
+				} = await sharesList({
+					name: this.searchKey,
+					pm: this.searchPm,
+					type: this.searchType,
+					page: this.page,
+					pageSize: this.pageSize,
+				});
+				this.tableData = data;
+				this.total = pageTotal;
+			},
+			pageChange(page) {
+				this.page = page;
+				this.sharesList();
+			},
+			// 每页数据大小改变
+			sizeChange(val) {
+				this.pageSize = val;
+				this.pageChange(1);
+			},
+		},
+	};
+</script>
+<style></style>

+ 0 - 0
src/views/info/components/InfoAdd.vue → src/views/AppBase/info/components/InfoAdd.vue


+ 0 - 0
src/views/info/components/infoUpdate.vue → src/views/AppBase/info/components/infoUpdate.vue


+ 0 - 0
src/views/info/infoArticleList.vue → src/views/AppBase/info/infoArticleList.vue


+ 0 - 0
src/views/info/infoHomeList.vue → src/views/AppBase/info/infoHomeList.vue


+ 31 - 23
src/views/Application/Application.vue

@@ -39,19 +39,19 @@
 				application_list: [{
 						label: "应用",
 						children: [{
-								icon: "icon-kuaijierukou",
-								color: "#E6A23C",
-								label: "服务优惠卡",
-								access: nodes.DiscountCard,
-								description: "用于管理优惠卡",
-								path: "/Marketing/card/cardList",
-							},
-							{
 								icon: "icon-gd",
-								color: "#ff0000",
+								color: "#ff4c4c",
 								label: "股东分红",
 								// access: nodes.RewardList,
-								description: "股东分红",
+								description: "股东管理、股份记录、分红记录",
+								path: "/Shareholders/RewardList",
+							},
+							{
+								icon: "icon-kehu",
+								color: "#ffaeae",
+								label: "员工阶梯奖励",
+								// access: nodes.RewardList,
+								description: "用于员工阶梯奖励设置",
 								path: "/Shareholders/RewardList",
 							},
 							{
@@ -79,20 +79,20 @@
 								access: nodes.getTodayStatistics,
 							},
 							{
-							  icon: "icon-bianji",
-							  color: "#1890FF",
-							  label: "文章管理",
-							  access: nodes.RewardList,
-							  description: "文章富文本管理",
-							  path: "/info/infoArticleList",
+								icon: "icon-bianji",
+								color: "#1890FF",
+								label: "文章管理",
+								access: nodes.RewardList,
+								description: "文章富文本管理",
+								path: "/info/infoArticleList",
 							},
 							{
-							  icon: "icon-kucun",
-							  color: "#1890FF",
-							  label: "公司展示",
-							  access: nodes.infoHomeList,
-							  description: "用于APP自定义展示",
-							  path: "/info/infoHomeList",
+								icon: "icon-kucun",
+								color: "#1890FF",
+								label: "公司展示",
+								access: nodes.infoHomeList,
+								description: "用于APP自定义展示",
+								path: "/info/infoHomeList",
 							},
 							// {
 							//   icon: "icon-dayin",
@@ -101,12 +101,20 @@
 							//   access: nodes.TemplateListgetAll,
 							//   description: "单据模板打印",
 							//   path: "/BillTemplate/TemplateList",
-			  		// },
+							// },
 						],
 					},
 					{
 						label: "营销",
 						children: [{
+								icon: "icon-kuaijierukou",
+								color: "#E6A23C",
+								label: "服务优惠卡",
+								access: nodes.DiscountCard,
+								description: "服务抵用优惠卡,可抵用服务费用",
+								path: "/Marketing/card/cardList",
+							},
+							{
 								icon: "icon-coupon",
 								color: "#E6A23C",
 								label: "优惠券",

+ 0 - 143
src/views/Shareholders/CommissionList.vue

@@ -1,143 +0,0 @@
-<template>
-  <Container>
-    <div slot="left">
-      <el-form inline size="small">
-        <el-form-item>
-          <el-date-picker
-            v-model="value_time"
-            clearable
-            type="daterange"
-            value-format="timestamp"
-            range-separator="-"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-            @change="changeTime"
-          ></el-date-picker>
-        </el-form-item>
-      </el-form>
-    </div>
-    <!--    表格-->
-    <div class="table">
-      <el-table :data="tableData" style="width: 100%" type="index">
-        <el-table-column prop="goods" label="奖励对象" width="180">
-          <template>
-            {{ staffName }}
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="originNo"
-          label="关联订单号"
-          width="180"
-        ></el-table-column>
-        <el-table-column prop="title" label="说明"></el-table-column>
-        <el-table-column prop="amount" label="奖金">
-          <template slot-scope="scope">
-            <span
-              :class="[
-                scope.row.type === 5 ? 'success-status' : 'danger-status',
-              ]"
-            >
-              {{ scope.row.type === 5 ? "+" : "-" }}{{ scope.row.amount }}
-            </span>
-          </template>
-        </el-table-column>
-        <el-table-column
-          prop="changeAmount"
-          label="变动后奖金"
-        ></el-table-column>
-        <el-table-column prop="time" label="创建时间">
-          <template slot-scope="scope">
-            {{ $_common.formatDate(scope.row.createTime) }}
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <!--    分页查询-->
-    <FooterPage
-      :page-size="pageSize"
-      :total-page.sync="total"
-      :current-page.sync="page"
-      @pageChange="pageChange"
-      @sizeChange="sizeChange"
-    ></FooterPage>
-  </Container>
-</template>
-<script>
-  import { getAllStaffRewardDesc } from "@/api/Department";
-
-  export default {
-    data() {
-      return {
-        state: "状态",
-        total: 0,
-        page: 1,
-        pageSize: 10,
-        index: "",
-        value: "",
-        status: [
-          { value: "启用", lable: "选项一" },
-          { value: "禁用", lable: "选项二" },
-        ],
-        value_time: [],
-        tableData: [],
-        search_form: {
-          start: "",
-          end: "",
-          enableStatus: "",
-        },
-        staffId: "",
-        staffName: "",
-      };
-    },
-    created() {
-      if (this.$route.query.id) {
-        this.staffId = this.$route.query.id - 0;
-        this.staffName = this.$route.query.name;
-      }
-      this.getAllStaffRewardDesc();
-    },
-    activated() {
-      if (this.$_isInit()) return;
-      if (this.$route.query.id) {
-        this.staffId = this.$route.query.id - 0;
-        this.staffName = this.$route.query.name;
-      }
-      this.getAllStaffRewardDesc();
-    },
-    methods: {
-      //  订单时间
-      changeTime(val) {
-        if (val && val.length) {
-          this.search_form.start = val[0] / 1000;
-          this.search_form.end = val[1] / 1000 + 86399;
-        } else {
-          this.search_form.start = "";
-          this.search_form.end = "";
-        }
-        this.pageChange(1);
-      },
-      async getAllStaffRewardDesc() {
-        const { data, pageTotal } = await getAllStaffRewardDesc({
-          staffId: this.staffId,
-          source: "",
-          star: this.search_form.start,
-          end: this.search_form.end,
-          page: this.page,
-          pageSize: this.pageSize,
-        });
-        this.tableData = data;
-        this.total = pageTotal;
-      },
-      pageChange(page) {
-        this.page = page;
-        this.getAllStaffRewardDesc();
-      },
-      // 每页数据大小改变
-      sizeChange(val) {
-        this.pageSize = val;
-        this.pageChange(1);
-      },
-    },
-  };
-</script>
-<style></style>

+ 0 - 142
src/views/Shareholders/CommissionStatistic.vue

@@ -1,142 +0,0 @@
-<template>
-  <Container>
-    <div>
-      <el-table :data="tableData" style="width: 100%">
-        <el-table-column prop="id" label="序号" width="180"></el-table-column>
-        <el-table-column
-          prop="staffName"
-          label="姓名"
-          width="180"
-        ></el-table-column>
-        <el-table-column prop="target" label="目标"></el-table-column>
-        <el-table-column prop="completed" label="已完成"></el-table-column>
-        <el-table-column prop="rewardOrder" label="订单奖金"></el-table-column>
-        <el-table-column prop="rewardGoods" label="商品奖金"></el-table-column>
-        <el-table-column prop="rewardOut" label="已经发放"></el-table-column>
-        <el-table-column prop="reward" label="未发放"></el-table-column>
-        <el-table-column fixed="right" label="操作" width="210">
-          <template slot-scope="scope">
-            <el-button
-              v-if="
-                $accessCheck(
-                  $Access.CommissionStatisticDetailCommissionStatistic
-                )
-              "
-              type="text"
-              size="small"
-              @click="
-                $router.push(
-                  `/saleCommission/CommissionList?id=${scope.row.id}&name=${scope.row.staffName}`
-                )
-              "
-            >
-              明细
-            </el-button>
-            <el-button
-              v-if="$accessCheck($Access.CommissionStatisticSetTarget)"
-              type="text"
-              size="small"
-              @click="handleClick(scope.row)"
-            >
-              设置目标
-            </el-button>
-            <el-button
-              v-if="$accessCheck($Access.CommissionStatisticAmountIssued)"
-              type="text"
-              size="small"
-              @click="moneyClick(scope.row)"
-            >
-              发放金额
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <!--    分页查询-->
-    <FooterPage
-      :page-size="pageSize"
-      :total-page.sync="total"
-      :current-page.sync="page"
-      @pageChange="pageChange"
-      @sizeChange="sizeChange"
-    ></FooterPage>
-  </Container>
-</template>
-
-<script>
-  import { getAllStaff, updateStaffTargetAndReward } from "@/api/Department";
-  export default {
-    data() {
-      return {
-        total: 0,
-        page: 1,
-        pageSize: 10,
-        tableData: [],
-        departmentId: "",
-        search_key: "",
-      };
-    },
-    created() {
-      this.getAllStaff();
-    },
-    activated() {
-      if (this.$_isInit()) return;
-      this.getAllStaff();
-    },
-    methods: {
-      //  获取列表
-      async getAllStaff() {
-        const data = await getAllStaff({
-          page: this.page,
-          pageSize: this.page_size,
-          departmentId: this.departmentId,
-          keyword: this.search_key,
-        });
-
-        this.tableData = data.data;
-        this.total = data.pageTotal;
-      },
-      pageChange(page) {
-        this.page = page;
-        this.getAllStaff();
-      },
-      sizeChange(size) {
-        this.page_size = size;
-        this.pageChange(1);
-      },
-      // 设置目标
-      handleClick(item) {
-        this.$prompt("请输入金额", "设置目标", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-        }).then(({ value }) => {
-          this.updateStaffTargetAndReward(item.id, value, 0);
-        });
-      },
-      // 设置金额
-      moneyClick(item) {
-        this.$prompt("请输入金额", "发放金额", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-        }).then(({ value }) => {
-          this.updateStaffTargetAndReward(item.id, 0, value);
-        });
-      },
-      async updateStaffTargetAndReward(id, target, rewardGo) {
-        let params = {};
-        if (target) {
-          params.target = target;
-        }
-        if (rewardGo) {
-          params.rewardGo = rewardGo;
-        }
-
-        const { data } = await updateStaffTargetAndReward(id, params);
-        this.$message.success("设置成功");
-        this.getAllStaff();
-      },
-    },
-  };
-</script>
-
-<style scoped></style>

+ 0 - 665
src/views/Shareholders/EditTemplate.vue

@@ -1,665 +0,0 @@
-<template>
-  <ContainerTit>
-    <div slot="headr">
-      <el-button type="primary" style="margin-right: 20px" @click="saveTem">
-        保存
-      </el-button>
-    </div>
-    <div class="page-div">
-      <el-row class="tem-row" :gutter="20">
-        <el-col :span="14">
-          <div class="tem-img">
-            <div class="top_view" style="margin-right: 40px; margin-left: 20px">
-              <div class="time_view">
-                <p>2020-08-25 09:10 09</p>
-                <p v-if="form_obj.other.indexOf('printingNum') > -1">
-                  第1次打印
-                </p>
-              </div>
-              <div class="name_view">
-                <span v-if="form_obj.basic.indexOf('enterprise') > -1">
-                  {{ enterprise_title }}
-                </span>
-                {{ info_list.title }}
-              </div>
-              <div class="num_view">
-                <p style="font-weight: bold; padding-bottom: 3px">
-                  202010101010
-                </p>
-                <p>{{ enterprise_title }}提供技术支持</p>
-              </div>
-            </div>
-            <div
-              v-if="form_obj.basic.indexOf('printing') > -1"
-              class="print-tag"
-            >
-              <img :src="require('@/assets/img/print-tag.png')" alt="" />
-            </div>
-            <div class="infomation">
-              <el-row :gutter="20">
-                <el-col :span="7">
-                  <div v-if="form_obj.basic.indexOf('operatorName') > -1">
-                    制单人:肖肖
-                  </div>
-                </el-col>
-                <el-col :span="10">
-                  <div v-if="form_obj.basic.indexOf('orderNo') > -1">
-                    单据号:XSCK45202008240199885036
-                  </div>
-                </el-col>
-                <el-col :span="7">
-                  <div v-if="form_obj.basic.indexOf('createTime') > -1">
-                    制单日期:2020-08-22
-                  </div>
-                </el-col>
-              </el-row>
-            </div>
-            <div class="infomation">
-              <div
-                v-if="form_obj.basic.indexOf('customerName') > -1"
-                style="display: inline-block; margin-right: 20px"
-              >
-                客户姓名:肖肖
-              </div>
-              <div
-                v-if="form_obj.basic.indexOf('customerMobile') > -1"
-                style="display: inline-block; margin-right: 20px"
-              >
-                客户电话:18888888888
-              </div>
-              <div
-                v-if="form_obj.basic.indexOf('deliveryType') > -1"
-                style="display: inline-block; margin-right: 20px"
-              >
-                配送方式:上门自提
-              </div>
-              <div
-                v-if="form_obj.basic.indexOf('receivedName') > -1"
-                style="display: inline-block; margin-right: 20px"
-              >
-                {{ target_id === 6 ? "退货人" : "收货人" }}:六牛科技联系人
-              </div>
-              <div
-                v-if="form_obj.basic.indexOf('receivedMobile') > -1"
-                style="display: inline-block; margin-right: 20px"
-              >
-                {{ target_id === 6 ? "退货" : "收货" }}电话:18888888888
-              </div>
-              <div
-                v-if="
-                  target_id != 6 &&
-                  form_obj.basic.indexOf('customerAddress') > -1
-                "
-                style="display: inline-block; margin-right: 20px"
-              >
-                收货地址:陕西省西安市未央区大明宫万达广场
-              </div>
-              <p
-                v-if="form_obj.basic.indexOf('remark') > -1"
-                style="font-weight: 560"
-              >
-                {{ self_label }}:销售单
-              </p>
-            </div>
-
-            <div style="margin-left: 20px">
-              <div id="second">
-                <table
-                  border="1"
-                  style="width: 94%; margin-top: 10px"
-                  class="goods-table"
-                >
-                  <tr>
-                    <th v-for="(item, index) in tabelTd" :key="index">
-                      {{ item.fields }}
-                    </th>
-                  </tr>
-                  <tr v-for="(td, tdI) in tableData" :key="tdI">
-                    <template v-for="(item, index) in tabelTd">
-                      <td :key="index">
-                        <span v-if="item.alias !== 'images'">
-                          {{ td[item.alias] }}
-                        </span>
-                        <img
-                          v-else
-                          :src="td[item.alias]"
-                          style="width: 50px; height: 50px"
-                        />
-                      </td>
-                    </template>
-                  </tr>
-                  <tr>
-                    <td style="text-align: center">合计:</td>
-                    <template v-for="(item, index) in tabelTd">
-                      <td v-if="index > 0" :key="index">
-                        <span
-                          v-if="
-                            item.alias.indexOf('num') > -1 ||
-                            item.alias.indexOf('Num') > -1
-                          "
-                        >
-                          2.00
-                        </span>
-                        <span
-                          v-else-if="
-                            item.alias.indexOf('total') > -1 ||
-                            item.alias.indexOf('Total') > -1
-                          "
-                        >
-                          200
-                        </span>
-                        <span v-else>--</span>
-                      </td>
-                    </template>
-                  </tr>
-                  <tr>
-                    <td
-                      v-if="form_obj.other.indexOf('shopDescribe') > -1"
-                      :colspan="add_form.goods.length"
-                      style="text-align: left"
-                    >
-                      主营:进口食品,化妆品
-                    </td>
-                  </tr>
-                </table>
-              </div>
-            </div>
-            <div
-              v-if="target_id === 1"
-              style="font-weight: bold; margin: 10px 0 0 20px"
-            >
-              <span
-                v-if="form_obj.fiance.indexOf('accountName') > -1"
-                class="add_num"
-              >
-                收款账户:肖肖
-              </span>
-              <span
-                v-if="form_obj.fiance.indexOf('receivable') > -1"
-                class="add_num"
-              >
-                应收:90
-              </span>
-              <span
-                v-if="form_obj.fiance.indexOf('orderPreferential') > -1"
-                class="add_num"
-              >
-                优惠:10
-              </span>
-              <span
-                v-if="form_obj.fiance.indexOf('netReceipts') > -1"
-                class="add_num"
-              >
-                实收:90元
-              </span>
-              <span
-                v-if="form_obj.fiance.indexOf('currentShortage') > -1"
-                class="add_num"
-              >
-                本单欠:90元
-              </span>
-              <span
-                v-if="form_obj.fiance.indexOf('upOwe') > -1"
-                class="add_num"
-              >
-                上欠:90元
-              </span>
-              <span
-                v-if="form_obj.fiance.indexOf('totalDeficit') > -1"
-                class="add_num"
-              >
-                总欠:90元
-              </span>
-            </div>
-            <div class="infomation">
-              <el-row :gutter="20">
-                <el-col :span="7">
-                  <div v-if="form_obj.other.indexOf('shopName') > -1">
-                    商家名称:{{ enterprise_title }}
-                  </div>
-                </el-col>
-                <el-col :span="7">
-                  <div v-if="form_obj.other.indexOf('shopMobile') > -1">
-                    商家电话:18888888888
-                  </div>
-                </el-col>
-                <el-col :span="10">
-                  <div v-if="form_obj.other.indexOf('shopAddress') > -1">
-                    商家地址:陕西省西安市未央区大明宫万达广场
-                  </div>
-                </el-col>
-              </el-row>
-            </div>
-            <div class="sign clearfix">
-              <span
-                v-if="form_obj.other.indexOf('signature') > -1"
-                class="float_left"
-              >
-                {{ target_id === 3 ? "签字确认:" : "客户签字:" }}
-              </span>
-              <span class="float_right">经手人: {{ enterprise_title }}</span>
-            </div>
-            <div
-              v-if="
-                (info_list.describe && target_id === 1) ||
-                (info_list.describe && target_id === 5)
-              "
-              class="sign"
-              style="text-align: left"
-            >
-              <pre>{{ info_list.describe }}</pre>
-            </div>
-          </div>
-        </el-col>
-        <el-col :span="9" style="margin-left: 50px">
-          <div style="overflow-y: auto">
-            <el-form :model="info_list" size="small" label-width="100px">
-              <span class="info-tit">基本信息</span>
-              <el-form-item label="模板名称:">
-                <el-input
-                  v-model="info_list.title"
-                  placeholder="请输入内容"
-                  style="width: 200px"
-                ></el-input>
-              </el-form-item>
-              <el-form-item
-                v-if="target_id === 1 || target_id === 5"
-                label="打印说明:"
-              >
-                <el-input
-                  v-model="info_list.describe"
-                  type="textarea"
-                  placeholder="请输入内容"
-                  :rows="2"
-                ></el-input>
-              </el-form-item>
-            </el-form>
-            <span class="info-tit">模板信息</span>
-            <el-form size="small" label-width="100px">
-              <el-form-item
-                v-if="add_form.basic && add_form.basic.length > 0"
-                label="基本信息:"
-                prop="name"
-              >
-                <el-checkbox-group v-model="form_obj.basic">
-                  <div
-                    v-for="(item, index) in add_form.basic"
-                    :key="index"
-                    style="display: inline-block; padding-right: 30px"
-                  >
-                    <el-checkbox :label="item.alias">
-                      <span v-if="item.fields === '备注'">
-                        {{ item.selfLabel || item.fields }}
-                      </span>
-                      <span v-else>{{ item.fields }}</span>
-                    </el-checkbox>
-                    <div
-                      v-if="item.fields === '备注'"
-                      style="
-                        display: inline-block;
-                        padding-left: 5px;
-                        cursor: pointer;
-                      "
-                      @click="dialogVisible = true"
-                    >
-                      <i style="font-size: 14px" class="el-icon-edit"></i>
-                    </div>
-                  </div>
-                </el-checkbox-group>
-                <!--<div>
-                  <span class="font-label">字号:</span>
-                  <el-input-number
-                    v-model="value"
-                    size="small"
-                    :min="12"
-                  ></el-input-number>
-                </div>-->
-              </el-form-item>
-              <el-form-item
-                v-if="add_form.fiance && add_form.fiance.length > 0"
-                label="合计信息:"
-                prop="name"
-              >
-                <el-checkbox-group v-model="form_obj.fiance">
-                  <el-checkbox
-                    v-for="(item, index) in add_form.fiance"
-                    :key="index"
-                    :label="item.alias"
-                  >
-                    {{ item.fields }}
-                  </el-checkbox>
-                </el-checkbox-group>
-                <!--<div>
-                  <span class="font-label">字号:</span>
-                  <el-input-number
-                    v-model="value"
-                    size="small"
-                    :min="12"
-                  ></el-input-number>
-                </div>-->
-              </el-form-item>
-              <el-form-item
-                v-if="add_form.goods && add_form.goods.length > 0"
-                label="商品信息:"
-                prop="name"
-              >
-                <el-checkbox-group
-                  v-model="form_obj.goods"
-                  @change="tableChange"
-                >
-                  <el-checkbox
-                    v-for="(item, index) in add_form.goods"
-                    :key="index"
-                    :label="item.alias"
-                  >
-                    {{ item.fields }}
-                  </el-checkbox>
-                </el-checkbox-group>
-                <!--<div>
-                  <span class="font-label">字号:</span>
-                  <el-input-number
-                    v-model="value"
-                    size="small"
-                    :min="12"
-                  ></el-input-number>
-                </div>-->
-              </el-form-item>
-              <el-form-item
-                v-if="add_form.other && add_form.other.length > 0"
-                label="其他信息:"
-                prop="name"
-              >
-                <el-checkbox-group v-model="form_obj.other">
-                  <el-checkbox
-                    v-for="(item, index) in add_form.other"
-                    :key="index"
-                    :label="item.alias"
-                  >
-                    {{ item.fields }}
-                  </el-checkbox>
-                </el-checkbox-group>
-                <!-- <div>
-                  <span class="font-label">字号:</span>
-                  <el-input-number
-                    v-model="value"
-                    size="small"
-                    :min="12"
-                  ></el-input-number>
-                </div>-->
-              </el-form-item>
-            </el-form>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
-    <el-dialog
-      :close-on-press-escape="false"
-      :close-on-click-modal="false"
-      title="名称修改"
-      :visible.sync="dialogVisible"
-      width="30%"
-    >
-      <span>
-        <el-input v-model="markName" placeholder="请输入新的名称"></el-input>
-      </span>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="enFields">确 定</el-button>
-      </span>
-    </el-dialog>
-  </ContainerTit>
-</template>
-
-<script>
-  import { saveReceiptTemplate, getInfoReceiptTemplate } from "@/api/System";
-  export default {
-    name: "EditTemplate",
-    data() {
-      return {
-        value: 14,
-        sortable: "",
-        dropCol: [],
-        info_list: {
-          describe: "",
-        },
-        markName: "",
-        self_label: "备注",
-        dialogVisible: false,
-        tableData: [
-          {
-            goodsId: 1,
-            images:
-              "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
-            goodsName: "男士衬衫",
-            barCode: 562969523266,
-            strageCode: "09-09-09",
-            purchase: 100,
-            unitName: "件",
-            unitPrice: 100,
-            totalPrice: 100,
-            originTotalPrice: 100,
-            buyNum: "1.00",
-            outNum: "1.00",
-            purchaseNum: "1.00",
-            WarehousingNum: "1.00",
-            specName: "白色L",
-            skuValue: "1箱*10盒",
-          },
-          {
-            goodsId: 1,
-            images:
-              "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
-            goodsName: "男士衬衫",
-            barCode: 562969523266,
-            strageCode: "09-09-09",
-            purchase: 100,
-            unitName: "件",
-            unitPrice: 100,
-            totalPrice: 100,
-            originTotalPrice: 100,
-            buyNum: "1.00",
-            outNum: "1.00",
-            specName: "白色L",
-            skuValue: "1箱*10盒",
-            purchaseNum: "1.00",
-            WarehousingNum: "1.00",
-          },
-        ],
-        add_form: {},
-        form_obj: {
-          basic: [],
-          fiance: [],
-          goods: [],
-          other: [],
-        },
-        tabelTd: [],
-        meal_id: "",
-        num: 6,
-        target_id: "",
-      };
-    },
-    mounted() {
-      // this.rowDrop()
-      this.meal_id = this.$route.params.id;
-      // this.columnDrop() // 表格拖拽事件
-      this.getInfoReceiptTemplate();
-    },
-    methods: {
-      tableChange(val) {
-        this.tabelTd = this.add_form.goods.filter(
-          (item) => val.indexOf(item.alias) > -1
-        );
-      },
-      enFields() {
-        const target = this.$_common.deepClone(this.add_form);
-        target.basic.forEach((item) => {
-          if (item.fields === "备注") {
-            item.selfLabel = this.markName;
-          }
-        });
-        this.add_form = target;
-        this.self_label = this.markName;
-        this.dialogVisible = false;
-      },
-      // 保存
-      async saveTem() {
-        let basic = [];
-        if (this.add_form.basic && this.add_form.basic.length) {
-          basic = this.add_form.basic.map((item) => {
-            return {
-              ...item,
-              isShow: this.form_obj.basic.indexOf(item.alias) > -1 ? 5 : 4,
-            };
-          });
-        }
-        let goods = [];
-        if (this.add_form.goods && this.add_form.goods.length) {
-          goods = this.add_form.goods.map((item) => {
-            return {
-              ...item,
-              isShow: this.form_obj.goods.indexOf(item.alias) > -1 ? 5 : 4,
-            };
-          });
-        }
-
-        let fiance = [];
-        if (this.add_form.fiance && this.add_form.fiance.length) {
-          fiance = this.add_form.fiance.map((item) => {
-            return {
-              ...item,
-              isShow: this.form_obj.fiance.indexOf(item.alias) > -1 ? 5 : 4,
-            };
-          });
-        }
-        let other = [];
-        if (this.add_form.other && this.add_form.other.length) {
-          other = this.add_form.other.map((item) => {
-            return {
-              ...item,
-              isShow: this.form_obj.other.indexOf(item.alias) > -1 ? 5 : 4,
-            };
-          });
-        }
-        const data = await saveReceiptTemplate({
-          id: this.meal_id,
-          title: this.info_list.title,
-          describe: this.info_list.describe,
-          fieldsData: {
-            templateName: this.info_list.title,
-            templateInfo: {
-              basic: basic,
-              goods: goods,
-              fiance: fiance,
-              other: other,
-            },
-          },
-        });
-
-        this.$message.success("操作成功");
-        this.getInfoReceiptTemplate();
-      },
-      // 详情
-      async getInfoReceiptTemplate() {
-        const { data } = await getInfoReceiptTemplate(this.meal_id);
-
-        if (JSON.stringify(data) === "{}") return;
-        this.target_id = data.receiptType;
-        this.info_list = data;
-        if (!this.info_list.describe) {
-          this.info_list.describe = `以上商品均已履行进货检查验收法定程序,索验票证齐全,商家特此声明。↵此联由批发单位直接用于批发台账资料留存。`;
-        } else {
-          this.info_list.describe = this.info_list.describe.replace(
-            /<br\/>/g,
-            "\n"
-          );
-        }
-        this.add_form = data.fieldsData.templateInfo;
-        this.form_obj.basic = this.add_form.basic
-          .filter((item) => item.isShow === 5)
-          .map((item) => item.alias);
-
-        if (this.add_form.fiance && this.add_form.fiance.length) {
-          this.form_obj.fiance = this.add_form.fiance
-            .filter((item) => item.isShow === 5)
-            .map((item) => item.alias);
-        }
-        //表格显示字段
-        this.tabelTd = this.add_form.goods.filter((item) => item.isShow === 5);
-        this.form_obj.goods = this.tabelTd.map((item) => item.alias);
-
-        this.add_form.basic.forEach((item) => {
-          if (item.fields === "备注") {
-            if (!item.selfLabel) {
-              item.selfLabel = "";
-            } else {
-              this.self_label = item.selfLabel;
-            }
-          }
-        });
-        this.form_obj.other = this.add_form.other
-          .filter((item) => item.isShow === 5)
-          .map((item) => item.alias);
-      },
-    },
-  };
-</script>
-
-<style scoped lang="scss">
-  .tem-img {
-    box-shadow: 0 3px 10px #dcdcdc;
-    width: 100%;
-    padding: 20px 0 20px 0;
-    font-size: 13px;
-    position: relative;
-    .print-tag {
-      position: absolute;
-      right: 190px;
-      top: 0;
-      img {
-        width: 120px;
-      }
-    }
-  }
-  .infomation {
-    margin: 6px 20px;
-  }
-  .sign {
-    margin: 10px 20px;
-  }
-  .add_num {
-    margin-right: 10px;
-  }
-  .goods-table th,
-  .goods-table td {
-    text-align: center;
-    line-height: 22px;
-  }
-  .info-tit {
-    font-size: 14px;
-    margin-bottom: 10px;
-    display: block;
-    font-weight: 600;
-  }
-  .top_view {
-    font-size: 12px;
-    position: relative;
-    height: 40px;
-  }
-  .time_view {
-    position: absolute;
-    left: 0;
-    top: 0;
-  }
-  .name_view {
-    text-align: center;
-    font-size: 22px;
-  }
-  .num_view {
-    position: absolute;
-    right: 0;
-    top: 0;
-  }
-  .font-label {
-    color: #6c6c6c;
-  }
-</style>

+ 0 - 160
src/views/Shareholders/RuleCommission.vue

@@ -1,160 +0,0 @@
-<template>
-  <ContainerTit>
-    <div slot="headr">
-      <el-button :loading="sub_load" type="primary" @click="submit">
-        提交保存
-      </el-button>
-    </div>
-    <div class="detail-tab-item">
-      <div class="detail-tab-title">添加股东</div>
-      <div class="detail-tab-main">
-        <el-form
-          ref="add_form"
-          label-position="right"
-          :model="add_form"
-          :rules="form_rules"
-          size="small"
-          label-width="100px"
-        >
-          <el-form-item label="股东名称" prop="name">
-            <el-input
-              v-model="add_form.name"
-              style="width: 300px"
-              size="small"
-              placeholder="股东名称"
-            ></el-input>
-          </el-form-item>
-          <el-form-item label="联系方式" prop="number">
-            <el-input
-              v-model="add_form.number"
-              style="width: 300px"
-              size="small"
-              placeholder="联系方式"
-            ></el-input>
-          </el-form-item>
-
-          <el-form-item label="联系地址" prop="address">
-            <el-input
-              v-model="add_form.address"
-              style="width: 300px"
-              size="small"
-              placeholder="联系地址"
-            ></el-input>
-          </el-form-item>
-
-          <el-form-item label="备注" prop="remk">
-            <el-input
-              v-model="add_form.remk"
-              style="width: 300px"
-              size="small"
-              placeholder="备注"
-            ></el-input>
-          </el-form-item>
-        </el-form>
-
-
-      </div>
-    </div>
-  </ContainerTit>
-</template>
-
-<script>
-  import {
-    add,
-    Getinfo,
-  } from "@/api/Holders";
-  export default {
-    name: "RuleCommission",
-    data() {
-      const staffValidate = (rule, value, callback) => {
-
-
-      };
-      return {
-        form_rules: {
-          name: [
-            { required: true, message: "请输入股东姓名", trigger: "blur" },
-          ],
-          number: [
-            { required: true, message: "请输入股东联系电话", trigger: "blur" },
-          ],
-          address: [
-            { required: true, message: "请输入股东联系地址", trigger: "blur" },
-          ],
-          staff: [
-            {
-              type: "array",
-              required: true,
-              validator: staffValidate,
-              trigger: "change",
-            },
-          ],
-        },
-        add_form: {
-          name: "",
-          number: '',
-          address: "",
-          remk: "",
-          id:0
-        },
-      };
-    },
-    created() {
-      if (this.$route.query.id) {
-        this.rule_id = this.$route.query.id;
-        this.Get();
-      }
-    },
-    activated() {
-      if (this.$_isInit()) return;
-      if (this.$route.query.id) {
-        this.rule_id = this.$route.query.id;
-        this.Get();
-      }
-    },
-    methods: {
-      // 获取详情
-      async Get() {
-        const { data } = await Getinfo({
-          id:this.rule_id
-        });
-        this.add_form = {
-          name: data. name,
-          number: data.number,
-          address: data.address,
-          remk: data.remk,
-          id: data.id,
-        };
-      },
-      async submit() {
-        this.$refs["add_form"].validate(async (valid) => {
-          if (valid) {
-              if (this.add_form.name=="") {
-                this.$message.warning("股东姓名不能为空");
-                return;
-              }
-              if (this.add_form.number=='') {
-                this.$message.warning("股东联系电话不能为空");
-                return;
-              }
-              if (this.add_form.address=='') {
-                this.$message.warning("股东联系地址不能为空");
-                return;
-              }
-            this.sub_load = true;
-            try {
-                const data = await add(this.add_form);
-              this.sub_load = false;
-              this.$message.success("提交成功");
-              this.$closeCurrentGoEdit("/Shareholders/CommissionRule");
-            } finally {
-              this.sub_load = false;
-            }
-          }
-        });
-      },
-    },
-  };
-</script>
-
-<style scoped></style>

+ 1 - 44
src/views/SystemSettings/components/addSingGroup.vue

@@ -1,6 +1,6 @@
 <template>
 	<div>
-		<el-drawer class="edit-drawer" :title="isEdit ? '修改班次' : '新增班次'" size="650px" :visible.sync="visible"
+		<el-drawer class="edit-drawer" :title="isEdit ? '修改考勤组' : '新增考勤组'" size="650px" :visible.sync="visible"
 			direction="rtl" :modal="modal" :wrapper-closable="false" @close="close">
 			<!-- <div v-if="!isEdit" class="page-tip-div" style="margin-top: 0">
 				<span>温馨提示:</span>
@@ -70,24 +70,6 @@
 		components: {
 			staffListModal,
 		},
-		filters: {
-			startTimeConfig: function(value) {
-				return {
-					start: '08:00',
-					step: '00:15',
-					end: '20:30',
-					minTime: value
-				}
-			},
-			endTimeConfig: function(value) {
-				return {
-					start: '08:00',
-					step: '00:15',
-					end: '24:00',
-					minTime: value
-				};
-			}
-		},
 		props: {
 			visible: {
 				type: Boolean,
@@ -172,31 +154,6 @@
 				// console.log(val,'xz');
 				this.checkedStaff.push(...val)
 			},
-			// 删除上下班
-			delTime(ind) {
-				this.form.sections.splice(ind, 1)
-			},
-			// 添加上下班
-			addTime() {
-				this.form.sections.push({
-					times: [{
-						"check_type": "OnDuty", //类型(OnDuty上班,OffDuty下班)
-						"across": 0, //是否跨天
-						"end_min": -1, //允许的最玩打卡时间,分钟为单位(-1表示不限制)
-						"check_time": "", //check时间
-						"free_check": false, //是否免打卡
-						"begin_min": 0 //允许的最早提前打卡时间,分钟为单位}
-					}, {
-						"check_type": "OffDuty", //类型(OnDuty上班,OffDuty下班)
-						"across": 0, //是否跨天
-						"end_min": -1, //允许的最玩打卡时间,分钟为单位(-1表示不限制)
-						"check_time": "", //check时间
-						"free_check": false, //是否免打卡
-						"begin_min": 0 //允许的最早提前打卡时间,分钟为单位
-					}],
-				})
-			},
-
 			close() {
 				this.$emit("close");
 			},

+ 2 - 2
src/views/SingleStore/subscribe/OrderItem.vue → src/views/goods/item/OrderItem.vue

@@ -177,7 +177,7 @@
 			},
 			//  编辑员工
 			openEditModel(id) {
-				this.$router.push(`/SingleStore/goods/AddItem?id=${id}&setDetail=1`);
+				this.$router.push(`/goods/item/editItem?id=${id}&setDetail=1`);
 			},
 			// 打开添加班次页面
 			openModel() {
@@ -186,7 +186,7 @@
 				// } else {
 				//   this.$router.push("/goods/sale/AddGoods");
 				// }
-				this.$router.push("/SingleStore/goods/AddItem?setDetail=0");
+				this.$router.push("/goods/item/AddItem?setDetail=0");
 			},
 		},
 	};

+ 1 - 1
src/views/SingleStore/subscribe/components/addItem.vue → src/views/goods/item/components/addItem.vue

@@ -248,7 +248,7 @@
 							message: data.data,
 							type: "success",
 						});
-						this.$closeCurrentGoEdit(`/SingleStore/goods/OrderItem`);
+						this.$closeCurrentGoEdit(`/goods/item/OrderItem`);
 					}
 				});
 			},

+ 2 - 0
src/views/goods/sale/AddGoods.vue

@@ -1104,7 +1104,9 @@
         await this.getDetail();
       } else {
         await this.getPauseSave();
+		
         if ([2, 3].includes(this.systemType)) {
+			console.log( this.pageName);
           this.base_form.shopId = this.storeData.id; // 店铺
           this.base_form.shopName = this.storeData.name; // 店铺
         }

+ 166 - 0
src/views/stock/Consume/addConsume.vue

@@ -0,0 +1,166 @@
+<template>
+	<div>
+		<el-drawer class="edit-drawer" title="消耗品调拨" size="650px" :visible.sync="visible"
+			direction="rtl" :modal="modal" :wrapper-closable="false" @close="close">
+			<el-form ref="form" :rules="rules" size="small" :model="form" label-width="120px">
+				<el-form-item label="选择商品:" prop="goodsId">
+					<el-input v-model="base_form.goodsName" style="width: 200px"
+						:disabled="!base_form.shopName " readonly placeholder="请选择商品">
+						<i slot="suffix" class="el-input__icon el-icon-search" @click="openGoodsModel"></i>
+					</el-input>
+				</el-form-item>
+				<el-form-item label="出库数量" prop="number">
+					<el-input-number v-model="form.number" controls-position="right" :min="1"></el-input-number>
+				</el-form-item>
+				<el-form-item style="text-align: right; padding-right: 10px">
+					<el-button type="primary" @click="confirm">确 定</el-button>
+					<el-button @click="close">取 消</el-button>
+				</el-form-item>
+			</el-form>
+		</el-drawer>
+		<!--    商品列表-->
+		<GoodsWarehouse v-if="show_goods" :modal="false" :shop-id="base_form.shopId" goods-warehouse
+			:is-check="false" :is-show="show_goods" :enable="true" @cancel="show_goods = false" @confirm="selGoods" />
+	</div>
+</template>
+
+<script>
+	import {
+		// postClassDetails,
+		allocationConsume
+	} from "@/api/Stock";
+	import {
+	  getGoodsBasicInfoById,
+	} from "@/api/goods";
+	import {
+		mapGetters
+	} from "vuex";
+	import GoodsWarehouse from "@/component/goods/GoodsWarehouse";
+	export default {
+		name: "AddConsume",
+		components: {
+			GoodsWarehouse
+		},
+		props: {
+			visible: {
+				type: Boolean,
+				default: false,
+			},
+			isEdit: {
+				type: Boolean,
+				default: false,
+			},
+			// 是否需要遮罩层
+			modal: {
+				type: Boolean,
+				default: true,
+			},
+		},
+
+		data() {
+			return {
+				// 显示选择商品
+				show_goods: false,
+				form: {
+					// 选中的商品ID
+					goodsId: '',
+					//数量
+					number: '',
+				},
+				base_form: {
+					// 商店id
+					shopId: '',
+					shopName: '',
+					// 商品名称
+					goodsName: ''
+				},
+				rules: {
+					number: [{
+						required: true,
+						message: "请输入商品数量",
+						trigger: "blur"
+					}],
+					basicGoodsId: [{
+						required: true,
+						message: "请选择商品",
+						trigger: "blur"
+					}],
+				}
+			};
+		},
+		computed: {
+			...mapGetters({
+				systemType: "MUser/systemType",
+				storeData: "MUser/storeData",
+			}),
+		},
+		created() {
+			// 判断是否为门店页面
+			if ([2, 3].includes(this.systemType)) {
+				this.base_form.shopId = this.storeData.id; // 店铺
+				this.base_form.shopName = this.storeData.name; // 店铺
+			}
+		},
+		methods: {
+			// 选择商品
+			async selGoods(row,) {
+				//保存选中商品
+				this.form.goodsId = row[0].id;
+				this.base_form.goodsName = row[0].title;
+			},
+			// 打开商品选择
+			openGoodsModel() {
+				if (!this.base_form.shopName ) return;
+				this.show_goods = true;
+			},
+			close() {
+				this.$emit("close");
+			},
+			// 提交
+			async confirm() {
+				this.$refs.form.validate(async (valid) => {
+					if (valid) {
+						const data = await allocationConsume({
+							"id": this.form.goodsId, //仓库商品id
+							"number": this.form.number //调拨数量
+						});
+						this.$message({
+							message: data.data,
+							type: "success",
+						});
+
+						this.close();
+						this.$emit("confirm");
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped>
+	.btn-up {
+		position: relative;
+	}
+
+	.btn-department {
+		position: absolute;
+		left: 270px;
+		top: 4px;
+	}
+
+	.btn-role-up {
+		position: relative;
+	}
+
+	.add-role {
+		position: absolute;
+		left: 270px;
+		top: 4px;
+	}
+
+	.creat-shop {
+		color: #1890ff;
+		font-size: 12px;
+	}
+</style>

+ 206 - 0
src/views/stock/Consume/consumeList.vue

@@ -0,0 +1,206 @@
+<template>
+	<ContainerQuery>
+		<div slot="left">
+			<el-button size="small" type="primary" @click="add_consume=true">
+				消耗品调拨
+			</el-button>
+		</div>
+		<div slot="more">
+			<el-form inline size="small">
+				<el-form-item>
+					<el-input v-model="searchKey" style="width: 220px" placeholder="商品名称" clearable
+						@keyup.enter.native="pageChange(1)" @clear="pageChange(1)">
+						<el-button slot="append" @click="pageChange(1)">
+							<i class="el-icon-search"></i>
+						</el-button>
+					</el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-input v-model="mobile" style="width: 220px" placeholder="调拨人手机号" clearable
+						@keyup.enter.native="pageChange(1)" @clear="pageChange(1)">
+						<el-button slot="append" @click="pageChange(1)">
+							<i class="el-icon-search"></i>
+						</el-button>
+					</el-input>
+				</el-form-item>
+				<el-form-item>
+					<el-input v-model="write_mobile" style="width: 220px" placeholder="核销人手机号" clearable
+						@keyup.enter.native="pageChange(1)" @clear="pageChange(1)">
+						<el-button slot="append" @click="pageChange(1)">
+							<i class="el-icon-search"></i>
+						</el-button>
+					</el-input>
+				</el-form-item>
+			</el-form>
+		</div>
+		<!-- 切换类型-->
+		<el-tabs v-model="state" type="card" @tab-click="selTopType">
+			<el-tab-pane label="全部" name="All"></el-tab-pane>
+			<el-tab-pane label="使用中" name="in"></el-tab-pane>
+			<el-tab-pane label="已核销" name="out"></el-tab-pane>
+		</el-tabs>
+		<!--    表格-->
+		<div class="table">
+			<el-table :data="tableData" style="width: 100%" type="index">
+				<el-table-column prop="goods" label="商品名" width="180">
+					<template slot-scope="scope">
+						{{ scope.row.name }}<br />
+					</template>
+				</el-table-column>
+				<el-table-column prop="number" label="数量">
+				</el-table-column>
+				<el-table-column prop="createTime" label="出仓日期" min-width="150">
+					<template slot-scope="scope">
+						{{ $_common.formatDate(scope.row.createTime) }}
+					</template>
+				</el-table-column>
+				<el-table-column prop="mobile" label="调拨人" min-width="100">
+					<template slot-scope="scope">
+						{{ scope.row.transferor }}<br />
+						{{ scope.row.mobile }}
+					</template>
+				</el-table-column>
+				<el-table-column prop="writeTime" label="核销日期" min-width="150">
+					<template slot-scope="scope">
+						{{ $_common.formatDate(scope.row.writeTime) }}
+					</template>
+				</el-table-column>
+				<el-table-column prop="write_mobile" label="核销人" min-width="100">
+					<template slot-scope="scope">
+						{{ scope.row.write_off_person }}<br />
+						{{ scope.row.write_mobile }}
+					</template>
+				</el-table-column>
+				<el-table-column prop="status" label="状态" min-width="100">
+					<template slot-scope="scope">
+						<span v-if="scope.row.status==1" class='success-status'>使用中</span>
+						<span v-if="scope.row.status==2" class='info-status'>已核销</span>
+					</template>
+				</el-table-column>
+				<el-table-column label="操作" min-width="130" fixed="right" header->
+					<template slot-scope="scope">
+						<!-- <el-button type="text" @click="openEditModel(scope.row.id)">
+							编辑
+						</el-button> -->
+						<el-button v-if="scope.row.status==1" type="text" @click="writeOff(scope.row.id)">
+							核销
+						</el-button>
+					</template>
+				</el-table-column>
+			</el-table>
+		</div>
+		<!--    分页查询-->
+		<FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
+			@sizeChange="sizeChange"></FooterPage>
+		<AddConsume v-if="add_consume" :visible="add_consume" @close="add_consume = false"
+			@confirm="addConfirm"></AddConsume>
+	</ContainerQuery>
+</template>
+<script>
+	import {
+		ConsumeList,
+		ConsumeWrite_off
+	} from "@/api/Stock";
+	import AddConsume from "./addConsume.vue";
+	export default {
+		name: "ConsumeList",
+		components: {
+			AddConsume,
+		},
+		data() {
+			return {
+				// 显示弹窗
+				add_consume:false,
+				state: "All",
+				searchKey: '', //商品名称
+				"mobile": "", //调拨人
+				"write_mobile": "", //核销人
+				searchPm: '', //1使用中2使用完 搜索条件
+				total: 0,
+				page: 1,
+				pageSize: 10,
+				tableData: [],
+			};
+		},
+		created() {
+			if (this.$route.query.id) {
+				this.staffId = this.$route.query.id - 0;
+				this.staffName = this.$route.query.name;
+			}
+			this.ConsumeList();
+		},
+		activated() {
+			if (this.$_isInit()) return;
+			if (this.$route.query.id) {
+				this.staffId = this.$route.query.id - 0;
+				this.staffName = this.$route.query.name;
+			}
+			this.ConsumeList();
+		},
+		methods: {
+			// 添加完成
+			addConfirm(res){
+				this.ConsumeList();
+				console.log(res);
+			},
+			// 切换类型
+			selTopType(tag) {
+				switch (this.state) {
+					case "All": // 全部
+						this.searchPm = '';
+						break;
+					case "in": // 使用中
+						this.searchPm = 1;
+						break;
+					case "out": // 已核销
+						this.searchPm = 2;
+						break;
+				}
+				this.pageChange(1);
+			},
+			//  核销消耗品
+			writeOff(id) {
+				console.log(id);
+				this.$confirm("你确定核销消耗品吗?", {
+					confirmButtonText: "确定",
+					cancelButtonText: "取消",
+					type: "warning",
+				}).then(async () => {
+					const data = await ConsumeWrite_off({
+						id: id
+					});
+					this.ConsumeList();
+					this.$message({
+						type: "success",
+						message: "核销成功!",
+					});
+				});
+			},
+			async ConsumeList() {
+				const {
+					data,
+					pageTotal
+				} = await ConsumeList({
+					name: this.searchKey, //商品名称
+					status: this.searchPm, //1使用中2使用完 搜索条件
+					mobile: this.mobile, //调拨人
+					write_mobile: this.write_mobile, //核销人
+					page: this.page,
+					pageSize: this.pageSize,
+				});
+				this.tableData = data;
+				this.total = pageTotal;
+			},
+			pageChange(page) {
+				this.page = page;
+				this.ConsumeList();
+			},
+			// 每页数据大小改变
+			sizeChange(val) {
+				this.pageSize = val;
+				this.pageChange(1);
+			},
+		},
+	};
+</script>
+<style></style>

+ 556 - 674
src/views/stock/OutIn/outgoing.vue

@@ -1,698 +1,580 @@
 <template>
-  <ContainerQuery>
-    <div
-      v-if="parseInt(printTag) === 5"
-      slot="tip"
-      class="page-tip-div"
-      style="margin-top: 0"
-    >
-      <i class="el-icon-info"></i>
-      <span>温馨提示:当前页面按键盘【F8】可进行页面刷新</span>
-    </div>
-    <div slot="left">
-      <el-button
-        v-if="parseInt(printTag) === 5"
-        type="primary"
-        plain
-        size="small"
-        @click="resetPage"
-      >
-        刷新页面
-      </el-button>
-      <el-button size="small" type="primary" @click="getAllSaleOut(1)">
-        导出
-      </el-button>
-    </div>
-    <div
-      v-if="$accessCheck($Access.InventoryOutSearchAllInventoryOut)"
-      slot="more"
-    >
-      <el-form inline size="small">
-        <!--        <el-form-item>-->
-        <!--          <el-input-->
-        <!--            v-model="searchData.goodsName"-->
-        <!--            placeholder="操作人"-->
-        <!--            style="width: 220px"-->
-        <!--            clearable-->
-        <!--            @keyup.enter.native="pageChange(1)"-->
-        <!--            @clear="pageChange(1)"-->
-        <!--          >-->
-        <!--            <el-button-->
-        <!--              slot="append"-->
-        <!--              class="el-icon-search"-->
-        <!--              @click="pageChange(1)"-->
-        <!--            ></el-button>-->
-        <!--          </el-input>-->
-        <!--        </el-form-item>-->
-        <!--        <el-form-item v-if="systemType === 1">-->
-        <!--          <el-select-->
-        <!--            v-model="searchData.warehouseId"-->
-        <!--            placeholder="出库仓库"-->
-        <!--            clearable-->
-        <!--            style="width: 150px"-->
-        <!--            @change="pageChange(1)"-->
-        <!--          >-->
-        <!--            <el-option-->
-        <!--              v-for="item in warehouseData"-->
-        <!--              :key="item.id"-->
-        <!--              :label="item.warehouseName"-->
-        <!--              :value="item.id"-->
-        <!--            ></el-option>-->
-        <!--          </el-select>-->
-        <!--        </el-form-item>-->
-        <el-form-item>
-          <el-select
-            v-model="searchData.statusArr"
-            multiple
-            placeholder="审核状态(可多选)"
-            style="width: 150px"
-            @change="pageChange(1)"
-          >
-            <el-option
-              v-for="item in status"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item>
-          <el-date-picker
-            v-model="search_time"
-            type="datetimerange"
-            :unlink-panels="true"
-            range-separator="-"
-            start-placeholder="制单开始时间"
-            end-placeholder="制单结束时间"
-            @change="searchTimeChange"
-          ></el-date-picker>
-        </el-form-item>
-        <!--        <el-form-item>-->
-        <!--          <el-input-->
-        <!--            v-model="goods"-->
-        <!--            placeholder="请输入商品名称"-->
-        <!--            style="width: 220px"-->
-        <!--            clearable-->
-        <!--            @keyup.enter.native="getUserList()"-->
-        <!--            @clear="getUserList()"-->
-        <!--          >-->
-        <!--            <el-button-->
-        <!--              slot="append"-->
-        <!--              icon="el-icon-search"-->
-        <!--              @click="getUserList()"-->
-        <!--            ></el-button>-->
-        <!--          </el-input>-->
-        <!--        </el-form-item>-->
-      </el-form>
-    </div>
-    <el-tabs
-      v-if="$accessCheck($Access.InventoryOutStatisticsAllInventoryOut)"
-      v-model="top_sel"
-      type="card"
-      @tab-click="selTopType"
-    >
-      <el-tab-pane
-        :label="'销售出库(' + census[0].count + ')'"
-        name="salesStock"
-      ></el-tab-pane>
-      <el-tab-pane
-        :label="'采购退货(' + census[2].count + ')'"
-        name="purchaseReturns"
-      ></el-tab-pane>
-      <el-tab-pane
-        :label="'调拨出库(' + census[1].count + ')'"
-        name="outBound"
-      ></el-tab-pane>
-      <el-tab-pane
-        :label="
+	<ContainerQuery>
+		<div v-if="parseInt(printTag) === 5" slot="tip" class="page-tip-div" style="margin-top: 0">
+			<i class="el-icon-info"></i>
+			<span>温馨提示:当前页面按键盘【F8】可进行页面刷新</span>
+		</div>
+		<div slot="left">
+			<el-button v-if="parseInt(printTag) === 5" type="primary" plain size="small" @click="resetPage">
+				刷新页面
+			</el-button>
+			<el-button size="small" type="primary" @click="getAllSaleOut(1)">
+				导出
+			</el-button>
+		</div>
+		<div v-if="$accessCheck($Access.InventoryOutSearchAllInventoryOut)" slot="more">
+			<el-form inline size="small">
+				<!--        <el-form-item>-->
+				<!--          <el-input-->
+				<!--            v-model="searchData.goodsName"-->
+				<!--            placeholder="操作人"-->
+				<!--            style="width: 220px"-->
+				<!--            clearable-->
+				<!--            @keyup.enter.native="pageChange(1)"-->
+				<!--            @clear="pageChange(1)"-->
+				<!--          >-->
+				<!--            <el-button-->
+				<!--              slot="append"-->
+				<!--              class="el-icon-search"-->
+				<!--              @click="pageChange(1)"-->
+				<!--            ></el-button>-->
+				<!--          </el-input>-->
+				<!--        </el-form-item>-->
+				<!--        <el-form-item v-if="systemType === 1">-->
+				<!--          <el-select-->
+				<!--            v-model="searchData.warehouseId"-->
+				<!--            placeholder="出库仓库"-->
+				<!--            clearable-->
+				<!--            style="width: 150px"-->
+				<!--            @change="pageChange(1)"-->
+				<!--          >-->
+				<!--            <el-option-->
+				<!--              v-for="item in warehouseData"-->
+				<!--              :key="item.id"-->
+				<!--              :label="item.warehouseName"-->
+				<!--              :value="item.id"-->
+				<!--            ></el-option>-->
+				<!--          </el-select>-->
+				<!--        </el-form-item>-->
+				<el-form-item>
+					<el-select v-model="searchData.statusArr" multiple placeholder="审核状态(可多选)" style="width: 150px"
+						@change="pageChange(1)">
+						<el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value">
+						</el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item>
+					<el-date-picker v-model="search_time" type="datetimerange" :unlink-panels="true" range-separator="-"
+						start-placeholder="制单开始时间" end-placeholder="制单结束时间" @change="searchTimeChange"></el-date-picker>
+				</el-form-item>
+				<!--        <el-form-item>-->
+				<!--          <el-input-->
+				<!--            v-model="goods"-->
+				<!--            placeholder="请输入商品名称"-->
+				<!--            style="width: 220px"-->
+				<!--            clearable-->
+				<!--            @keyup.enter.native="getUserList()"-->
+				<!--            @clear="getUserList()"-->
+				<!--          >-->
+				<!--            <el-button-->
+				<!--              slot="append"-->
+				<!--              icon="el-icon-search"-->
+				<!--              @click="getUserList()"-->
+				<!--            ></el-button>-->
+				<!--          </el-input>-->
+				<!--        </el-form-item>-->
+			</el-form>
+		</div>
+		<el-tabs v-if="$accessCheck($Access.InventoryOutStatisticsAllInventoryOut)" v-model="top_sel" type="card"
+			@tab-click="selTopType">
+			<el-tab-pane :label="'销售出库(' + census[0].count + ')'" name="salesStock"></el-tab-pane>
+			<el-tab-pane :label="'采购退货(' + census[2].count + ')'" name="purchaseReturns"></el-tab-pane>
+			<el-tab-pane :label="'调拨出库(' + census[1].count + ')'" name="outBound"></el-tab-pane>
+			<el-tab-pane :label="
           '全部单据(' +
           $NP.plus(census[1].count, census[0].count, census[2].count) +
           ')'
-        "
-        name="allDocuments"
-      ></el-tab-pane>
-    </el-tabs>
-    <el-tabs v-else v-model="top_sel" type="card" @tab-click="selTopType">
-      <el-tab-pane label="销售出库" name="salesStock"></el-tab-pane>
-      <el-tab-pane label="采购退货" name="purchaseReturns"></el-tab-pane>
-      <el-tab-pane label="调拨出库" name="outBound"></el-tab-pane>
-      <el-tab-pane label="全部单据" name="allDocuments"></el-tab-pane>
-    </el-tabs>
-    <!-- 表格 -->
-    <el-table
-      :data="outgoingList"
-      :row-class-name="tableRowClassName"
-      @row-dblclick="goDetail"
-    >
-      <el-table-column
-        prop="id"
-        label="ID"
-        fixed="left"
-        min-width="80"
-      ></el-table-column>
-      <el-table-column
-        prop="no"
-        min-width="210"
-        label="单据编号"
-        show-overflow-tooltip
-      >
-        <template slot-scope="scope">
-          <span
-            v-if="$accessCheck($Access.InventoryOutGetInventoryOutInfo)"
-            class="click-div"
-            @click="goDetail(scope.row)"
-          >
-            {{ scope.row.no }}
-          </span>
-          <span v-else>{{ scope.row.no }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        v-if="timeFlag"
-        prop="creatTime"
-        min-width="160"
-        label="制单时间"
-      >
-        <template slot-scope="scope">
-          {{ $_common.formatDate(scope.row.createTime) }}
-        </template>
-      </el-table-column>
-      <el-table-column
-        v-if="top_sel === 'outBound'"
-        prop="warehouseName"
-        min-width="160"
-        label="调出仓库"
-      ></el-table-column>
-      <el-table-column
-        v-if="clientFlag && top_sel !== 'outBound'"
-        min-width="140"
-        prop="customerName"
-        show-overflow-tooltip
-        label="客户"
-      />
-      <el-table-column
-        v-if="customerCallsFlag && top_sel !== 'outBound'"
-        min-width="120"
-        prop="customerMobile"
-        label="客户电话"
-      />
-      <el-table-column
-        v-if="sourceNumberFlag"
-        prop="sourceNo"
-        min-width="210"
-        label="来源单号"
-      >
-        <template slot-scope="scope">
-          <span
-            v-if="
+        " name="allDocuments"></el-tab-pane>
+		</el-tabs>
+		<el-tabs v-else v-model="top_sel" type="card" @tab-click="selTopType">
+			<el-tab-pane label="销售出库" name="salesStock"></el-tab-pane>
+			<el-tab-pane label="采购退货" name="purchaseReturns"></el-tab-pane>
+			<el-tab-pane label="调拨出库" name="outBound"></el-tab-pane>
+			<el-tab-pane label="全部单据" name="allDocuments"></el-tab-pane>
+		</el-tabs>
+		<!-- 表格 -->
+		<el-table :data="outgoingList" :row-class-name="tableRowClassName" @row-dblclick="goDetail">
+			<el-table-column prop="id" label="ID" fixed="left" min-width="80"></el-table-column>
+			<el-table-column prop="no" min-width="210" label="单据编号" show-overflow-tooltip>
+				<template slot-scope="scope">
+					<span v-if="$accessCheck($Access.InventoryOutGetInventoryOutInfo)" class="click-div"
+						@click="goDetail(scope.row)">
+						{{ scope.row.no }}
+					</span>
+					<span v-else>{{ scope.row.no }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column v-if="timeFlag" prop="creatTime" min-width="160" label="制单时间">
+				<template slot-scope="scope">
+					{{ $_common.formatDate(scope.row.createTime) }}
+				</template>
+			</el-table-column>
+			<el-table-column v-if="top_sel === 'outBound'" prop="warehouseName" min-width="160" label="调出仓库">
+			</el-table-column>
+			<el-table-column v-if="clientFlag && top_sel !== 'outBound'" min-width="140" prop="customerName"
+				show-overflow-tooltip label="客户" />
+			<el-table-column v-if="customerCallsFlag && top_sel !== 'outBound'" min-width="120" prop="customerMobile"
+				label="客户电话" />
+			<el-table-column v-if="sourceNumberFlag" prop="sourceNo" min-width="210" label="来源单号">
+				<template slot-scope="scope">
+					<span v-if="
               (scope.row.type === 8 &&
                 $accessCheck($Access.AllocationFormGetAllocateInfo)) ||
               (scope.row.type === 5 &&
                 $accessCheck($Access.newOrderLitGetOrderInfoById)) ||
               (scope.row.type === 14 &&
                 $accessCheck($Access.PurchaseReturnOrderGetPurchaseOutInfoById))
-            "
-            class="click-div"
-            @click="goOtherDetail(scope.row)"
-          >
-            {{ scope.row.sourceNo }}
-          </span>
-          <span v-else>{{ scope.row.sourceNo }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        v-if="modeOfDistributionFlag"
-        prop="deliveryName"
-        min-width="120"
-        label="配送方式"
-      >
-        <template slot-scope="scope">
-          {{ scope.row.deliveryName || "--" }}
-        </template>
-      </el-table-column>
-      <el-table-column
-        v-if="outboundTypeFlag"
-        prop="typeName"
-        label="出库类型"
-        min-width="120"
-      ></el-table-column>
-      <el-table-column
-        v-if="auditorFlag"
-        prop="auditName"
-        label="审核人"
-        min-width="110"
-      ></el-table-column>
-      <el-table-column
-        v-if="parseInt(printTag) === 5"
-        prop="printNum"
-        label="打印次数"
-        min-width="80"
-      ></el-table-column>
-      <el-table-column label="操作" fixed="right" min-width="120">
-        <template slot="header" slot-scope="scope">
-          <span v-if="false">{{ scope.$index }}</span>
-          <span class="operation">操作</span>
-          <el-popover popper-class="custom-table-checkbox" trigger="click">
-            <el-checkbox-group v-model="checkList">
-              <el-checkbox
-                v-for="(item, index) in columns"
-                :key="index"
-                :label="item.label"
-                @change="change"
-              ></el-checkbox>
-            </el-checkbox-group>
-            <el-button
-              slot="reference"
-              icon="el-icon-setting"
-              type="text"
-            ></el-button>
-          </el-popover>
-        </template>
-        <template slot-scope="scope">
-          <!--           @click="updateSaleOutStatus(scope.row)"-->
-          <el-button
-            v-if="$accessCheck($Access.InventoryOutUpdateInventoryOutStatus)"
-            type="text"
-            :disabled="scope.row.auditStatus === 2"
-            @click="goDetail(scope.row)"
-          >
-            审核
-          </el-button>
-          <el-button
-            v-if="
+            " class="click-div" @click="goOtherDetail(scope.row)">
+						{{ scope.row.sourceNo }}
+					</span>
+					<span v-else>{{ scope.row.sourceNo }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column v-if="modeOfDistributionFlag" prop="deliveryName" min-width="120" label="配送方式">
+				<template slot-scope="scope">
+					{{ scope.row.deliveryName || "--" }}
+				</template>
+			</el-table-column>
+			<el-table-column v-if="outboundTypeFlag" prop="typeName" label="出库类型" min-width="120"></el-table-column>
+			<el-table-column v-if="auditorFlag" prop="auditName" label="审核人" min-width="110"></el-table-column>
+			<el-table-column v-if="parseInt(printTag) === 5" prop="printNum" label="打印次数" min-width="80">
+			</el-table-column>
+			<el-table-column label="操作" fixed="right" min-width="120">
+				<template slot="header" slot-scope="scope">
+					<span v-if="false">{{ scope.$index }}</span>
+					<span class="operation">操作</span>
+					<el-popover popper-class="custom-table-checkbox" trigger="click">
+						<el-checkbox-group v-model="checkList">
+							<el-checkbox v-for="(item, index) in columns" :key="index" :label="item.label"
+								@change="change"></el-checkbox>
+						</el-checkbox-group>
+						<el-button slot="reference" icon="el-icon-setting" type="text"></el-button>
+					</el-popover>
+				</template>
+				<template slot-scope="scope">
+					<!--           @click="updateSaleOutStatus(scope.row)"-->
+					<el-button v-if="$accessCheck($Access.InventoryOutUpdateInventoryOutStatus)" type="text"
+						:disabled="scope.row.auditStatus === 2" @click="goDetail(scope.row)">
+						审核
+					</el-button>
+					<el-button v-if="
               $accessCheck($Access.outgoingGetSaleOutInfo) &&
               scope.row.typeName === '销售出库'
-            "
-            type="text"
-            @click="openUrl(scope.row)"
-          >
-            打印
-          </el-button>
-          <el-button
-            v-if="scope.row.typeName === '调拨出库'"
-            type="text"
-            @click="openAllocating(scope.row)"
-          >
-            打印
-          </el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <!-- // 表格 -->
-    <FooterPage
-      :page-size="pageSize"
-      :total-page.sync="total"
-      :current-page.sync="page"
-      @pageChange="pageChange"
-      @sizeChange="sizeChange"
-    ></FooterPage>
-    <OrderOut
-      v-if="show_out"
-      :out-id="out_id"
-      :is-show="show_out"
-      @cancel="show_out = false"
-      @confirm="orderAuditConfirm"
-    ></OrderOut>
-  </ContainerQuery>
+            " type="text" @click="openUrl(scope.row)">
+						打印
+					</el-button>
+					<el-button v-if="scope.row.typeName === '调拨出库'" type="text" @click="openAllocating(scope.row)">
+						打印
+					</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+		<!-- // 表格 -->
+		<FooterPage :page-size="pageSize" :total-page.sync="total" :current-page.sync="page" @pageChange="pageChange"
+			@sizeChange="sizeChange"></FooterPage>
+		<OrderOut v-if="show_out" :out-id="out_id" :is-show="show_out" @cancel="show_out = false"
+			@confirm="orderAuditConfirm"></OrderOut>
+	</ContainerQuery>
 </template>
 
 <script>
-  import OrderOut from "@/views/order/components/OrderOut.vue";
-  import {
-    statisticsAllSaleOut,
-    updateSaleOutStatus,
-    getAllSaleOut,
-    exportGetAllSaleOut,
-    searchAllSaleOut,
-    getAllWarehouse,
-    getAllPurchaseIn,
-  } from "@/api/Stock";
-  import { mapGetters } from "vuex";
-  export default {
-    name: "Outgoing",
-    components: {
-      OrderOut,
-    },
-    data() {
-      return {
-        goods: "",
-        search_time: [],
-        out_id: 0,
-        show_out: false,
-        census: [{ count: 0 }, { count: 0 }, { count: 0 }],
-        warehouseData: [], // 所有仓库数据
-        page: 1,
-        pageSize: 10,
-        total: 0,
-        top_sel: "salesStock",
-        source: 5,
-        //  选择审核状态
-        status: [
-          { value: 1, label: "待审核" },
-          { value: 2, label: "审核通过" },
-        ],
-        searchData: {
-          source: 5,
-          shopId: "",
-          shopName: "",
-          statusArr: [],
-          goodsName: "", // 商品名称
-          warehouseId: "", // 仓库id
-          startTime: "", // 制单开始时间
-          endTime: "", // 制单结束时间
-        },
-        operatorList: [], // 获取所有操作人列表
-        outgoingList: [], // 列表数据
-        checkList: [
-          "制单时间",
-          "客户",
-          "客户电话",
-          "来源单号",
-          "配送方式",
-          "出库类型",
-          "审核人",
-        ],
-        columns: [
-          {
-            label: "制单时间",
-          },
-          {
-            label: "客户",
-          },
-          {
-            label: "客户电话",
-          },
-          {
-            label: "来源单号",
-          },
-          {
-            label: "配送方式",
-          },
-          {
-            label: "出库类型",
-          },
-          {
-            label: "审核人",
-          },
-        ],
-        timeFlag: true,
-        clientFlag: true,
-        customerCallsFlag: true,
-        sourceNumberFlag: true,
-        modeOfDistributionFlag: true,
-        outboundTypeFlag: true,
-        auditorFlag: true,
-      };
-    },
-    computed: {
-      ...mapGetters({
-        printTag: "MUser/printTag",
-      }),
-      type_on_color() {
-        return { color: this.themeA };
-      },
-      type_on_style() {
-        return {
-          borderColor: this.themeA,
-          // backgroundColor: this.hexToRgba(this.themeA, 10).rgba,
-        };
-      },
-    },
-    created() {
-      // this.getAllWarehouse();
-      this.getAllSaleOut();
-      this.statisticsAllSaleOut();
-    },
-    activated() {
-      if (this.$_isInit()) return;
-      this.getData();
-      this.statisticsAllSaleOut();
-    },
-    mounted() {
-      //当前页面监视键盘输入
-      // if (parseInt(this.printTag) === 5) {
-      //   document.onkeydown = (e) => {
-      //     let e1 =
-      //       e || event || window.event || arguments.callee.caller.arguments[0];
-      //     if (e1 && e1.keyCode === 40) {
-      //       if (parseInt(this.printTag) === 5) {
-      //         if (this.$route.name === "Outgoing") {
-      //           this.resetPage();
-      //         }
-      //       }
-      //     }
-      //   };
-      // }
-    },
-    methods: {
-      tabClick() {},
-      goDetail(row) {
-        if (!this.$accessCheck(this.$Access.InventoryOutGetInventoryOutInfo)) {
-          return;
-        }
-        this.$router.push("/stock/OutIn/outgoingInfo/" + row.id);
-      },
-      goOtherDetail(row) {
-        switch (row.type) {
-          case 5: // 销售出库
-            this.$router.push("/order/manageO/OrderDetails/1/" + row.sourceId);
-            break;
-          case 8: // 调拨出库
-            this.$router.push(
-              "/stock/WarehouseManagement/DetailAllocationForm/" + row.sourceId
-            );
-            break;
-          case 14: // 采购退货
-            this.$router.push(
-              "/Purchase/ManageP/PurchaseReturnOrderLook/" + row.sourceId
-            );
-            break;
-        }
-      },
-      // 打印
-      openUrl(row) {
-        let routeData = this.$router.resolve({
-          path: `/OutgoingPrinting/${row.id}`,
-        });
-        window.open(routeData.href, "_blank");
-      },
-      // 打印调拨出库单
-      openAllocating(row) {
-        let routeData = this.$router.resolve({
-          path: `/AllocatingOutbound/${row.id}`,
-        });
-        window.open(routeData.href, "_blank");
-      },
-      clearShop() {
-        this.searchData.shopId = "";
-        this.searchData.shopName = "";
-        this.searchData.warehouseId = "";
-        this.pageChange(1);
-      },
-      selShop(val, row) {
-        this.searchData.shopName = row[0].name;
-        this.searchData.warehouseId = row[0].warehouseId;
-        this.pageChange(1);
-      },
-      //  出库统计
-      async statisticsAllSaleOut() {
-        if (
-          !this.$accessCheck(this.$Access.InventoryOutStatisticsAllInventoryOut)
-        ) {
-          return;
-        }
-        const { data } = await statisticsAllSaleOut({
-          type: [
-            5, // 销售
-            8, // 调拨
-            14, // 采购
-          ],
-        });
+	import OrderOut from "@/views/order/components/OrderOut.vue";
+	import {
+		statisticsAllSaleOut,
+		updateSaleOutStatus,
+		getAllSaleOut,
+		exportGetAllSaleOut,
+		searchAllSaleOut,
+		getAllWarehouse,
+		getAllPurchaseIn,
+	} from "@/api/Stock";
+	import {
+		mapGetters
+	} from "vuex";
+	export default {
+		name: "Outgoing",
+		components: {
+			OrderOut,
+		},
+		data() {
+			return {
+				goods: "",
+				search_time: [],
+				out_id: 0,
+				show_out: false,
+				census: [{
+					count: 0
+				}, {
+					count: 0
+				}, {
+					count: 0
+				}],
+				warehouseData: [], // 所有仓库数据
+				page: 1,
+				pageSize: 10,
+				total: 0,
+				top_sel: "salesStock",
+				source: 5,
+				//  选择审核状态
+				status: [{
+						value: 1,
+						label: "待审核"
+					},
+					{
+						value: 2,
+						label: "审核通过"
+					},
+				],
+				searchData: {
+					source: 5,
+					shopId: "",
+					shopName: "",
+					statusArr: [],
+					goodsName: "", // 商品名称
+					warehouseId: "", // 仓库id
+					startTime: "", // 制单开始时间
+					endTime: "", // 制单结束时间
+				},
+				operatorList: [], // 获取所有操作人列表
+				outgoingList: [], // 列表数据
+				checkList: [
+					"制单时间",
+					"客户",
+					"客户电话",
+					"来源单号",
+					"配送方式",
+					"出库类型",
+					"审核人",
+				],
+				columns: [{
+						label: "制单时间",
+					},
+					{
+						label: "客户",
+					},
+					{
+						label: "客户电话",
+					},
+					{
+						label: "来源单号",
+					},
+					{
+						label: "配送方式",
+					},
+					{
+						label: "出库类型",
+					},
+					{
+						label: "审核人",
+					},
+				],
+				timeFlag: true,
+				clientFlag: true,
+				customerCallsFlag: true,
+				sourceNumberFlag: true,
+				modeOfDistributionFlag: true,
+				outboundTypeFlag: true,
+				auditorFlag: true,
+			};
+		},
+		computed: {
+			...mapGetters({
+				printTag: "MUser/printTag",
+			}),
+			type_on_color() {
+				return {
+					color: this.themeA
+				};
+			},
+			type_on_style() {
+				return {
+					borderColor: this.themeA,
+					// backgroundColor: this.hexToRgba(this.themeA, 10).rgba,
+				};
+			},
+		},
+		created() {
+			// this.getAllWarehouse();
+			this.getAllSaleOut();
+			this.statisticsAllSaleOut();
+		},
+		activated() {
+			if (this.$_isInit()) return;
+			this.getData();
+			this.statisticsAllSaleOut();
+		},
+		mounted() {
+			//当前页面监视键盘输入
+			// if (parseInt(this.printTag) === 5) {
+			//   document.onkeydown = (e) => {
+			//     let e1 =
+			//       e || event || window.event || arguments.callee.caller.arguments[0];
+			//     if (e1 && e1.keyCode === 40) {
+			//       if (parseInt(this.printTag) === 5) {
+			//         if (this.$route.name === "Outgoing") {
+			//           this.resetPage();
+			//         }
+			//       }
+			//     }
+			//   };
+			// }
+		},
+		methods: {
+			tabClick() {},
+			goDetail(row) {
+				if (!this.$accessCheck(this.$Access.InventoryOutGetInventoryOutInfo)) {
+					return;
+				}
+				this.$router.push("/stock/OutIn/outgoingInfo/" + row.id);
+			},
+			goOtherDetail(row) {
+				switch (row.type) {
+					case 5: // 销售出库
+						this.$router.push("/order/manageO/OrderDetails/1/" + row.sourceId);
+						break;
+					case 8: // 调拨出库
+						this.$router.push(
+							"/stock/WarehouseManagement/DetailAllocationForm/" + row.sourceId
+						);
+						break;
+					case 14: // 采购退货
+						this.$router.push(
+							"/Purchase/ManageP/PurchaseReturnOrderLook/" + row.sourceId
+						);
+						break;
+				}
+			},
+			// 打印
+			openUrl(row) {
+				let routeData = this.$router.resolve({
+					path: `/OutgoingPrinting/${row.id}`,
+				});
+				window.open(routeData.href, "_blank");
+			},
+			// 打印调拨出库单
+			openAllocating(row) {
+				let routeData = this.$router.resolve({
+					path: `/AllocatingOutbound/${row.id}`,
+				});
+				window.open(routeData.href, "_blank");
+			},
+			clearShop() {
+				this.searchData.shopId = "";
+				this.searchData.shopName = "";
+				this.searchData.warehouseId = "";
+				this.pageChange(1);
+			},
+			selShop(val, row) {
+				this.searchData.shopName = row[0].name;
+				this.searchData.warehouseId = row[0].warehouseId;
+				this.pageChange(1);
+			},
+			//  出库统计
+			async statisticsAllSaleOut() {
+				if (
+					!this.$accessCheck(this.$Access.InventoryOutStatisticsAllInventoryOut)
+				) {
+					return;
+				}
+				const {
+					data
+				} = await statisticsAllSaleOut({
+					type: [
+						5, // 销售
+						8, // 调拨
+						14, // 采购
+					],
+				});
 
-        this.census = data;
-      },
-      // 出库 审核状态
-      orderAuditConfirm() {
-        this.getData();
-      },
-      updateSaleOutStatus(row) {
-        if (row.deliveryType === 1 && row.type === 5) {
-          this.out_id = row.id;
-          this.show_out = true;
-          return;
-        }
-        this.$confirm("确定要审核该出库单吗?", "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
-        }).then(async () => {
-          const data = await updateSaleOutStatus({
-            id: row.id,
-            auditName: this.userName,
-          });
+				this.census = data;
+			},
+			// 出库 审核状态
+			orderAuditConfirm() {
+				this.getData();
+			},
+			updateSaleOutStatus(row) {
+				if (row.deliveryType === 1 && row.type === 5) {
+					this.out_id = row.id;
+					this.show_out = true;
+					return;
+				}
+				this.$confirm("确定要审核该出库单吗?", "提示", {
+					confirmButtonText: "确定",
+					cancelButtonText: "取消",
+					type: "warning",
+				}).then(async () => {
+					const data = await updateSaleOutStatus({
+						id: row.id,
+						auditName: this.userName,
+					});
 
-          this.$message({
-            type: "success",
-            message: "操作成功!",
-          });
-          this.getData();
-        });
-      },
-      //  获取列表
-      async getAllSaleOut(exports) {
-        const params = {
-          type: this.searchData.source,
-          warehouseId: this.searchData.warehouseId,
-          auditStatus: this.searchData.statusArr,
-          start: this.searchData.startTime,
-          end: this.searchData.endTime,
-          search: this.searchData.goodsName,
-          page: this.page,
-          pageSize: this.pageSize,
-        };
-        if (exports) {
-          params.export = exports;
-          const target = await exportGetAllSaleOut({
-            ...params,
-          });
-        } else {
-          const data = await getAllSaleOut({
-            ...params,
-          });
-          this.outgoingList = data.data;
-          this.total = data.pageTotal;
-        }
-      },
-      //  搜索
-      async searchAllSaleOut() {
-        const data = await searchAllSaleOut({
-          type: this.searchData.source,
-          warehouseId: this.searchData.warehouseId,
-          auditStatus: this.searchData.statusArr,
-          start: this.searchData.startTime,
-          end: this.searchData.endTime,
-          search: this.searchData.goodsName,
-          page: this.page,
-          pageSize: this.pageSize,
-        });
-        this.outgoingList = data.data;
-        this.total = data.pageTotal;
-      },
-      //  判断
-      getData() {
-        // const searchData = this.$_common.deepClone(this.searchData);
-        // delete searchData.source;
-        // const isKey = this.$_common.isSerch(searchData);
-        // if (isKey) {
-        //   this.searchAllSaleOut();
-        // } else {
-        //   this.getAllSaleOut();
-        // }
-        this.getAllSaleOut();
-      },
-      //  请求所有仓库列表
-      async getAllWarehouse() {
-        const data = await getAllWarehouse({
-          page: 1,
-          pageSize: 999,
-        });
-        this.warehouseData = data.data;
-      },
-      // 顶部筛选
-      selTopType(tag) {
-        switch (this.top_sel) {
-          case "outBound": // 调拨出库
-            this.searchData.source = 8;
-            break;
-          case "salesStock": // 销售出库
-            this.searchData.source = 5;
-            break;
-          case "purchaseReturns": // 采购退货
-            this.searchData.source = 14;
-            break;
-          case "allDocuments": // 全部单据
-            // this.searchData.statusArr = []
-            this.searchData.source = "";
-            break;
-        }
-        this.source = this.searchData.source;
-        this.pageChange(1);
-      },
-      pageChange(page) {
-        this.page = page;
-        this.getData();
-      },
-      sizeChange(size) {
-        this.pageSize = size;
-        this.pageChange(1);
-      },
-      // 搜索条件时间回调
-      searchTimeChange(val) {
-        if (val && val.length) {
-          this.searchData.startTime = parseInt(val[0] / 1000);
-          this.searchData.endTime = parseInt(val[1] / 1000);
-        } else {
-          this.searchData.startTime = "";
-          this.searchData.endTime = "";
-        }
-        this.pageChange(1);
-      },
-      tableRowClassName({ row, rowIndex }) {
-        if (parseInt(this.printTag) === 5 && row.printNum > 0) {
-          return "print-row";
-        }
-        return "";
-      },
-      // 刷新页面
-      resetPage() {
-        this.getData();
-      },
-      change() {
-        this.timeFlag = this.checkList.some((item) => item === "制单时间");
-        this.clientFlag = this.checkList.some((item) => item === "客户");
-        this.customerCallsFlag = this.checkList.some(
-          (item) => item === "客户电话"
-        );
-        this.sourceNumberFlag = this.checkList.some(
-          (item) => item === "来源单号"
-        );
-        this.modeOfDistributionFlag = this.checkList.some(
-          (item) => item === "配送方式"
-        );
-        this.outboundTypeFlag = this.checkList.some(
-          (item) => item === "出库类型"
-        );
-        this.auditorFlag = this.checkList.some((item) => item === "审核人");
-      },
-    },
-  };
+					this.$message({
+						type: "success",
+						message: "操作成功!",
+					});
+					this.getData();
+				});
+			},
+			//  获取列表
+			async getAllSaleOut(exports) {
+				const params = {
+					type: this.searchData.source,
+					warehouseId: this.searchData.warehouseId,
+					auditStatus: this.searchData.statusArr,
+					start: this.searchData.startTime,
+					end: this.searchData.endTime,
+					search: this.searchData.goodsName,
+					page: this.page,
+					pageSize: this.pageSize,
+				};
+				if (exports) {
+					params.export = exports;
+					const target = await exportGetAllSaleOut({
+						...params,
+					});
+				} else {
+					const data = await getAllSaleOut({
+						...params,
+					});
+					this.outgoingList = data.data;
+					this.total = data.pageTotal;
+				}
+			},
+			//  搜索
+			async searchAllSaleOut() {
+				const data = await searchAllSaleOut({
+					type: this.searchData.source,
+					warehouseId: this.searchData.warehouseId,
+					auditStatus: this.searchData.statusArr,
+					start: this.searchData.startTime,
+					end: this.searchData.endTime,
+					search: this.searchData.goodsName,
+					page: this.page,
+					pageSize: this.pageSize,
+				});
+				this.outgoingList = data.data;
+				this.total = data.pageTotal;
+			},
+			//  判断
+			getData() {
+				// const searchData = this.$_common.deepClone(this.searchData);
+				// delete searchData.source;
+				// const isKey = this.$_common.isSerch(searchData);
+				// if (isKey) {
+				//   this.searchAllSaleOut();
+				// } else {
+				//   this.getAllSaleOut();
+				// }
+				this.getAllSaleOut();
+			},
+			//  请求所有仓库列表
+			async getAllWarehouse() {
+				const data = await getAllWarehouse({
+					page: 1,
+					pageSize: 999,
+				});
+				this.warehouseData = data.data;
+			},
+			// 顶部筛选
+			selTopType(tag) {
+				switch (this.top_sel) {
+					case "outBound": // 调拨出库
+						this.searchData.source = 8;
+						break;
+					case "salesStock": // 销售出库
+						this.searchData.source = 5;
+						break;
+					case "purchaseReturns": // 采购退货
+						this.searchData.source = 14;
+						break;
+					case "allDocuments": // 全部单据
+						// this.searchData.statusArr = []
+						this.searchData.source = "";
+						break;
+				}
+				this.source = this.searchData.source;
+				this.pageChange(1);
+			},
+			pageChange(page) {
+				this.page = page;
+				this.getData();
+			},
+			sizeChange(size) {
+				this.pageSize = size;
+				this.pageChange(1);
+			},
+			// 搜索条件时间回调
+			searchTimeChange(val) {
+				if (val && val.length) {
+					this.searchData.startTime = parseInt(val[0] / 1000);
+					this.searchData.endTime = parseInt(val[1] / 1000);
+				} else {
+					this.searchData.startTime = "";
+					this.searchData.endTime = "";
+				}
+				this.pageChange(1);
+			},
+			tableRowClassName({
+				row,
+				rowIndex
+			}) {
+				if (parseInt(this.printTag) === 5 && row.printNum > 0) {
+					return "print-row";
+				}
+				return "";
+			},
+			// 刷新页面
+			resetPage() {
+				this.getData();
+			},
+			change() {
+				this.timeFlag = this.checkList.some((item) => item === "制单时间");
+				this.clientFlag = this.checkList.some((item) => item === "客户");
+				this.customerCallsFlag = this.checkList.some(
+					(item) => item === "客户电话"
+				);
+				this.sourceNumberFlag = this.checkList.some(
+					(item) => item === "来源单号"
+				);
+				this.modeOfDistributionFlag = this.checkList.some(
+					(item) => item === "配送方式"
+				);
+				this.outboundTypeFlag = this.checkList.some(
+					(item) => item === "出库类型"
+				);
+				this.auditorFlag = this.checkList.some((item) => item === "审核人");
+			},
+		},
+	};
 </script>
 
 <style scoped lang="scss">
-  .query-form-view {
-    padding: 10px;
-    border: 1px solid #eee;
-    margin-bottom: 10px;
-  }
-  .customer-type-li {
-    background: #fff;
-    padding: 10px;
-    border: 1px solid #eee;
-    cursor: pointer;
-    box-shadow: 0 0 4px 0 hsla(0, 0%, 73%, 0.5);
-  }
-  .num-p {
-    font-size: 12px;
-    color: #969799;
-  }
+	.query-form-view {
+		padding: 10px;
+		border: 1px solid #eee;
+		margin-bottom: 10px;
+	}
 
-  /* .type-row{
+	.customer-type-li {
+		background: #fff;
+		padding: 10px;
+		border: 1px solid #eee;
+		cursor: pointer;
+		box-shadow: 0 0 4px 0 hsla(0, 0%, 73%, 0.5);
+	}
+
+	.num-p {
+		font-size: 12px;
+		color: #969799;
+	}
+
+	/* .type-row{
     padding-bottom: 10px;
   } */
-  .custom-table-checkbox {
-    .el-checkbox {
-      display: block !important;
-      margin: 0 0 $base-padding/4 0;
-    }
-  }
+	.custom-table-checkbox {
+		.el-checkbox {
+			display: block !important;
+			margin: 0 0 $base-padding/4 0;
+		}
+	}
 </style>