lhl 1 yıl önce
ebeveyn
işleme
764bbaa90f

+ 2 - 2
.env.dev

@@ -4,7 +4,7 @@ VUE_APP_ENV='dev'
 # 页面 title
 VUE_APP_TITLE=易趣水果
 # socket 系统长连接地址
-VUE_APP_WS_ADMIN_URL='ws://store.jlxnykj.cn/ws'
+VUE_APP_WS_ADMIN_URL='ws://shop.yiqucbb.cn/ws'
 # 接口请求地址
-VUE_APP_API_URL='https://store.jlxnykj.cn/adminapi'
+VUE_APP_API_URL='https://shop.yiqucbb.cn/adminapi'
 

+ 2 - 2
.env.production

@@ -5,6 +5,6 @@ VUE_APP_ENV='production'
 # 页面 title
 VUE_APP_TITLE=易趣水果
 # socket 系统连接地址 (ws)或(wss)://www.crmeb.com(换成你的域名)/ws 非独立部署默认为空
-VUE_APP_WS_ADMIN_URL='ws://store.jlxnykj.cn/ws'
+VUE_APP_WS_ADMIN_URL=''
 # 接口请求地址 (http)或 (https)://www.crmeb.com(换成你的域名)/adminapi 非独立部署默认为空
-VUE_APP_API_URL='https://store.jlxnykj.cn/adminapi'
+VUE_APP_API_URL=''

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 26276
package-lock.json


+ 3 - 1
package.json

@@ -5,7 +5,9 @@
   "scripts": {
     "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --open  --mode=dev",
     "dev": "npm run serve --mode=dev",
-    "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode=production"
+    "devs": "vue-cli-service serve --open  --mode=dev",
+    "build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build --mode=production",
+	"builds": "vue-cli-service build --mode=production"
   },
   "dependencies": {
     "@babel/polyfill": "^7.12.1",

+ 292 - 0
src/api/erp.js

@@ -56,4 +56,296 @@ export function erpGoods(data) {
   });
 }
 
+/**
+ * @description 用户列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getUserList(data) {
+  return request({
+    url: "/erp/user/list",
+    method: "get",
+    params: data,
+  });
+}
+
+
+/**
+ * @description 用户详情
+ * @param {Object} param id {number} 传值参数
+ */
+export function getUserInfo(id) {
+  return request({
+    url: "/erp/user/info/" + id,
+    method: "get"
+  });
+}
+
+/**
+ * @description 仓库列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getGodownList(data) {
+  return request({
+    url: "/erp/Warehouse/list",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 创建/编辑仓库
+ * @param {Object} param data {Object} 传值参数 
+ */
+export function createGodown(id,data) {
+  return request({
+    url: "/erp/Warehouse/create/" + id,
+    method: "post",
+	data,
+  });
+}
+
+/**
+ * @description 仓库详情
+ * @param {Object} param data {Object} 传值参数 
+ */
+export function getGodownInfo(id) {
+  return request({
+    url: "/erp/Warehouse/info/" + id,
+    method: "get"
+  });
+}
+
+/**
+ * @description 仓位列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getPositionList(data) {
+  return request({
+    url: "/erp/Warehouse/position",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 添加/编辑仓位
+ * @param {Object} param data {Object} 传值参数
+ */
+export function createPosition(data) {
+  return request({
+    url: "/erp/Warehouse/position_save",
+    method: "post",
+    data
+  });
+}
+
+//Warehouse/position_info/
+/**
+ * @description 添加/编辑仓位
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getPosition(id) {
+  return request({
+    url: "/erp/Warehouse/position_info/" + id,
+    method: "get",
+  });
+}
+
+
+
+/**
+ * @description 要货列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getWantList(data) {
+  return request({
+    url: "/erp/want/list",
+    method: "get",
+    params: data,
+  });
+}
+
+
+/**
+ * @description 采购列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getPurchaselist(data) {
+  return request({
+    url: "/erp/purchase/list",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 出库列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getOutList(data) {
+  return request({
+    url: "/erp/out/list",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 库间流转/商品在途列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getOutSimpleList(data) {
+  return request({
+    url: "/erp/out/simple_lst",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 库间流转/商品在途列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getReceiveList(data) {
+  return request({
+    url: "/erp/store_delivery_lst",
+    method: "get",
+    params: data,
+  });
+}
+
+
+/**
+ * @description 入库列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getInList(data) {
+  return request({
+    url: "/erp/in/list",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 调价列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getAdjustList(data) {
+  return request({
+    url: "/erp/goods/adjust_price_lst",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 要货商品列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getOutGoods(data) {
+  return request({
+    url: "/erp/Warehouse/out_goods_lst",
+    method: "get",
+    params: data,
+  });
+}
+
+/**
+ * @description 商品批次列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getProductBatch(data) {
+  return request({
+    url: "/erp/Warehouse/product_batch",
+    method: "get",
+    params: data,
+  });
+}
+
+
+/**
+ * @description 创建编辑要货单
+ * @param {Object} param data {Object} 传值参数
+ */
+export function createWant(id,data) {
+  return request({
+    url: "/erp/want/create/" + id,
+    method: "post",
+    data,
+  });
+}
+
+/**
+ * @description 要货单详情
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getWantInfo(id) {
+  return request({
+    url: "/erp/want/info/" + id,
+    method: "get",
+  });
+}
+
+/*
+Route::get('user/list', 'v1.erp.User/index')->option(['real_name' => '用户列表']);
+Route::get('user/info/:id', 'v1.erp.User/info')->option(['real_name' => '用户详情']);
+Route::post('user/create/:id', 'v1.erp.User/create')->option(['real_name' => '创建用户']);
+
+//要货
+Route::get('want/list', 'v1.erp.Want/index')->option(['real_name' => '要货列表']);
+Route::get('want/info/:id', 'v1.erp.Want/info')->option(['real_name' => '要货详情']);
+Route::post('want/create/:id', 'v1.erp.Want/create')->option(['real_name' => '创建要货']);
+Route::put('want/auth_save/:id', 'v1.erp.Want/auth_save')->option(['real_name' => '审核要货']);
+Route::delete('want/del/:id', 'v1.erp.Want/del')->option(['real_name' => '删除要货']);
+
+//采购
+Route::get('purchase/list', 'v1.erp.Purchase/index')->option(['real_name' => '采购列表']);
+Route::get('purchase/info/:id', 'v1.erp.Purchase/info')->option(['real_name' => '采购详情']);
+Route::post('purchase/create/:id', 'v1.erp.Purchase/create')->option(['real_name' => '创建采购']);
+Route::put('purchase/auth_save/:id', 'v1.erp.Purchase/auth_save')->option(['real_name' => '审核采购']);
+Route::delete('purchase/del/:id', 'v1.erp.Purchase/del')->option(['real_name' => '删除采购']);
+Route::get('purchase/in_status/:purchase_order_id', 'v1.erp.Purchase/in_status')->option(['real_name' => '采购入库状态']);
+Route::get('purchase/get_order_id/:purchase_order_id', 'v1.erp.Purchase/get_order_id')->option(['real_name' => '采购单号']);
+
+//入库
+Route::get('in/list', 'v1.erp.Inbound/index')->option(['real_name' => '入库列表']);
+Route::get('in/info/:id', 'v1.erp.Inbound/info')->option(['real_name' => '入库详情']);
+Route::post('in/create/:id', 'v1.erp.Inbound/create')->option(['real_name' => '创建入库']);
+Route::put('in/auth_save/:id', 'v1.erp.Inbound/auth_save')->option(['real_name' => '审核入库']);
+Route::delete('in/del/:id', 'v1.erp.Inbound/del')->option(['real_name' => '删除入库']);
+Route::get('in/get_order_id/:in_order_id', 'v1.erp.Inbound/get_order_id')->option(['real_name' => '入库单号']);
+Route::get('in/in_status/:in_order_id', 'v1.erp.Inbound/in_status')->option(['real_name' => '入库状态']);
+Route::get('Warehouse/list', 'v1.erp.Warehouse/index')->option(['real_name' => '仓库列表']);
+Route::post('Warehouse/create/:id', 'v1.erp.Warehouse/create')->option(['real_name' => '创建仓库']);
+Route::delete('Warehouse/del/:id', 'v1.erp.Warehouse/del')->option(['real_name' => '删除仓库']);
+Route::get('Warehouse/position', 'v1.erp.Warehouse/position')->option(['real_name' => '仓位列表']);
+Route::post('Warehouse/position_save', 'v1.erp.Warehouse/position_save')->option(['real_name' =>'仓位保存']);
+Route::get('Warehouse/position_info/:id', 'v1.erp.Warehouse/position_info')->option(['real_name' => '仓位详情']);
+Route::post('Warehouse/position_save/:id', 'v1.erp.Warehouse/position_save')->option(['real_name' => '仓位修改']);
+Route::get('Warehouse/position_info_list', 'v1.erp.Warehouse/position_info_list')->option(['real_name' => '仓位商品列表']);
+Route::get('Warehouse/position_info_lst', 'v1.erp.Warehouse/position_info_lst')->option(['real_name' => '仓位商品列表1']);
+Route::get('Warehouse/out_goods_lst', 'v1.erp.Warehouse/out_goods_lst')->option(['real_name' => '出库商品列表']);
+Route::get('Warehouse/product_batch', 'v1.erp.Warehouse/product_batch')->option(['real_name' => '商品批次列表']);
+Route::get('Warehouse/inventory_lst', 'v1.erp.Warehouse/inventory_lst')->option(['real_name' => '盘点单列表']);
+Route::post('Warehouse/inventory_save', 'v1.erp.Warehouse/inventory_save')->option(['real_name' => '盘点单保存']);
+Route::post('Warehouse/inventory_auth', 'v1.erp.Warehouse/inventory_auth')->option(['real_name' => '盘点单审核']);
+Route::get('Warehouse/inventory_info/:id', 'v1.erp.Warehouse/inventory_info')->option(['real_name' => '盘点单详情']);
+
+//出库
+Route::get('out/list', 'v1.erp.Outbound/index')->option(['real_name' => '出库列表']);
+Route::get('out/info/:id', 'v1.erp.Outbound/info')->option(['real_name' => '出库详情']);
+Route::post('out/create/:id', 'v1.erp.Outbound/create')->option(['real_name' => '创建出库']);
+Route::put('out/auth_save/:id', 'v1.erp.Outbound/auth_save')->option(['real_name' => '审核出库']);
+Route::delete('out/del/:id', 'v1.erp.Outbound/del')->option(['real_name' => '删除出库']);
+Route::get('out/simple_lst', 'v1.erp.Outbound/simple_lst')->option(['simple_lst' => '出库(库间流转,商品在途)列表']);
+Route::get('out/new_lst', 'v1.erp.Outbound/new_lst')->option(['real_name' => '出库列表新']);
+
+//收货
+Route::post('ware_delivery', 'v1.erp.Inbound/ware_delivery')->option(['real_name' => '库间收货']);//库间收货
+Route::post('store_delivery', 'v1.erp.Inbound/store_delivery')->option(['real_name' => '门店收货']);//门店收货
+Route::get('store_delivery_lst', 'v1.erp.Inbound/store_delivery_lst')->option(['real_name' => '收货列表']);
+Route::post('stock/auth', 'v1.erp.stock/auth')->option(['real_name' => '门店收货审核']);//门店收货审核
+Route::get('stock/info', 'v1.erp.stock/info')->option(['real_name' => '门店收货详情']);//门店收货详情
 
+*/

+ 2 - 2
src/pages/account/login/index.vue

@@ -131,8 +131,8 @@ export default {
             imgcode: '',
             iscaptcha: false,
             formInline: {
-                username: '',
-                password: '',
+                username: 'zxhxx',
+                password: '7663130',
                 phone: '',
                 // code: '',
                 new_pwd: ''

+ 393 - 0
src/pages/erp/adjust/index.vue

@@ -0,0 +1,393 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+		  <FormItem label="门店:">
+		  	<Select v-model="tableFrom.store_id" clearable filterable @on-change="userSearchs"
+		  		class="input-add">
+		  		<Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
+		  		</Option>
+		  	</Select>
+		  </FormItem>
+		  <FormItem label="创建人:">
+		  	<Select v-model="tableFrom.create_uid" clearable filterable @on-change="userSearchs"
+		  		class="input-add">
+		  		<Option v-for="item in authList" :value="item.id" :key="item.id">{{ item.staff_name }}
+		  		</Option>
+		  	</Select>
+		  </FormItem>
+					<!-- <FormItem label="仓位搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem> -->
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">添加调价单</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="cuser">
+					<div>名称:{{row.cuser.title}}</div>
+					<div>ID:{{row.cuser.id}}</div>
+					<div>手机:{{row.cuser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="store">
+					<div>名称:{{row.store.name}}</div>
+					<div>ID:{{row.store.id}}</div>
+					<div>手机:{{row.store.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="type">
+					<div>{{row.type == 1?"比例调整": "价格调整"}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<div>{{row.add_time|formatDate}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="body">
+					<div v-for="(item,index) in row.body" class="info">
+						<div>名称:{{item.product_name}}</div>
+						<div>ID:{{item.product_id}}</div>
+						<div>价格:{{item.price}}</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Tag color="default" v-if="row.status == 0">待审核</Tag>
+					<Tag color="primary" v-if="row.status == 1">通过</Tag>
+					<Tag color="error" v-if="row.status == -1">拒绝</Tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a v-if="row.status == 0" @click="edit(row)">审核</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getAdjustList,
+		getUserInfo,
+		getUserList
+	} from "@/api/erp";
+	import {staffListInfo} from '@/api/store'
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "godownList",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd hh:mm");
+				}
+			},
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: '调价单编号',
+						key: 'order_id',
+						width: 150,
+					},
+					{
+						title: '类型',
+						slot: 'type',
+						width: 80,
+					},
+					{
+						title: "门店",
+						slot: "store",
+						minWidth: 200,
+					},
+					{
+						title: "创建人",
+						slot: "cuser",
+						minWidth: 200,
+					},
+					{
+						title: "详情",
+						slot: "body",
+						minWidth: 200,
+					},
+					{
+						title: "备注",
+						slot: "auth_remark",
+						minWidth: 200,
+					},
+					{
+						title: "创建时间",
+						slot: "add_time",
+						minWidth: 200,
+					},
+					{
+						title: "状态",
+						slot: "status",
+						minWidth: 200,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					store_id: 0,
+					create_uid: 0,
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+				staffData:[],
+				authList:[],
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+			this.getUserList();
+			this.staffList()
+		},
+		methods: {
+			getUserList() {
+				getUserList().then(res => {
+					// console.log(res);
+					this.authList = res.data.data
+				})
+			},
+			userSearchs(e) {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getAdjustList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.info {
+		padding-top: 10px;
+		border-bottom: 1px dashed #515a6e;
+	
+		&:last-of-type {
+			border: none;
+		}
+	}
+</style>

+ 332 - 0
src/pages/erp/batch/index.vue

@@ -0,0 +1,332 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓位搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">添加仓位</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="passageway">
+					<span> {{ row.bin_number.slice(0,2) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="control">
+					<span> {{ row.bin_number.slice(2,3) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="layer">
+					<span> {{ row.bin_number.slice(3,4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="number">
+					<span> {{ row.bin_number.slice(4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<div>地址:{{row.ware.detailed_address}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="del(row, '删除仓位', index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo,
+		getProductBatch
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "outGoods",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "仓位名称",
+						key: "title",
+						minWidth: 90,
+					},
+					{
+						title: "通道",
+						slot: "passageway",
+						minWidth: 90,
+					},
+					{
+						title: "左右",
+						slot: "control",
+						minWidth: 90,
+					},
+					{
+						title: "层数",
+						slot: "layer",
+						minWidth: 90,
+					},
+					{
+						title: "仓位编号",
+						slot: "number",
+						minWidth: 90,
+					},
+					{
+						title: "编号",
+						key: "bin_number",
+						minWidth: 90,
+					},
+					{
+						title: "仓库信息",
+						slot: "ware",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		methods: {
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getProductBatch(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 660 - 0
src/pages/erp/erpMenus/components/menusFrom.vue

@@ -0,0 +1,660 @@
+<template>
+  <div>
+    <Modal
+      v-model="modals"
+      width="850"
+      scrollable
+      footer-hide
+      closable
+      :title="titleFrom"
+      :mask-closable="false"
+      :z-index="1"
+      @on-cancel="handleReset"
+      @on-visible-change="visible"
+      class-name="vertical-center-modal"
+    >
+      <Form
+        ref="formValidate"
+        :model="formValidate"
+        :label-width="110"
+        :rules="ruleValidate"
+        @submit.native.prevent
+      >
+        <Row type="flex" :gutter="24">
+          <Col span="24">
+            <FormItem label="类型:">
+              <RadioGroup
+                v-model="formValidate.auth_type"
+                @on-change="changeRadio"
+              >
+                <Radio
+                  :label="item.value"
+                  v-for="(item, i) in optionsRadio"
+                  :key="i"
+                >
+                  <Icon type="social-apple"></Icon>
+                  <span>{{ item.label }}</span>
+                </Radio>
+              </RadioGroup>
+            </FormItem>
+          </Col>
+        </Row>
+        <Row type="flex" :gutter="24">
+          <Col v-bind="grid">
+						<FormItem :label="authType?'按钮名称':'接口名称'" prop="menu_name">
+						  <div class="add">
+						    <Input
+						      v-model="formValidate.menu_name"
+						      :placeholder="authType?'请输入按钮名称':'请输入接口名称'"
+						    >
+						    </Input>
+						    <Button
+						      class="ml10 df"
+						      v-show="!authType && formValidate.auth_type == 2"
+						      @click="getRuleList()"
+						      icon="ios-apps"
+						    >
+						    </Button>
+						  </div>
+						</FormItem>
+          </Col>
+          <Col v-bind="grid">
+            <FormItem label="父级分类:">
+              <Cascader
+                :data="menuList"
+                change-on-select
+                v-model="formValidate.path"
+                filterable
+              ></Cascader>
+            </FormItem>
+          </Col>
+          <!-- <Col v-bind="grid">
+                        <FormItem label="父级分类:">
+                            <Select v-model="formValidate.pid" filterable>
+                                <Option v-for="(item,i) in optionsList" :value="item.value" :key="i">{{ item.label }}
+                                </Option>
+                            </Select>
+                        </FormItem>
+                    </Col> -->
+          <!--<Col v-bind="grid" v-if="authType">-->
+          <!--<FormItem label="模块名:">-->
+          <!--<Select v-model="formValidate.module">-->
+          <!--<Option :value="item.value" v-for="(item,i) in optionsListmodule" :key="i">-->
+          <!--{{item.label}}-->
+          <!--</Option>-->
+          <!--</Select>-->
+          <!--</FormItem>-->
+          <!--</Col>-->
+          <!--<Col v-bind="grid" v-if="authType">-->
+          <!--<FormItem label="控制器名:">-->
+          <!--<Input v-model="formValidate.controller" placeholder="请输入控制器名"></Input>-->
+          <!--</FormItem>-->
+          <!--</Col>-->
+          <!--<Col v-bind="grid" v-if="authType">-->
+          <!--<FormItem label="方法名:">-->
+          <!--<Input v-model="formValidate.action" placeholder="请输入方法名"></Input>-->
+          <!--</FormItem>-->
+          <!--</Col>-->
+          <Col v-bind="grid" v-if="!authType">
+            <FormItem label="请求方式:" prop="methods">
+              <Select v-model="formValidate.methods">
+                <Option value="">请求</Option>
+                <Option value="GET">GET</Option>
+                <Option value="POST">POST</Option>
+                <Option value="PUT">PUT</Option>
+                <Option value="DELETE">DELETE</Option>
+              </Select>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid" v-if="!authType">
+            <FormItem label="接口地址:">
+              <Input
+                v-model="formValidate.api_url"
+                placeholder="请输入接口地址"
+                prop="api_url"
+              ></Input>
+            </FormItem>
+          </Col>
+          <!-- <Col v-bind="grid" v-if="authType">
+            <FormItem label="接口参数:">
+              <Input
+                v-model="formValidate.params"
+                placeholder="举例:a/123/b/234"
+              ></Input>
+            </FormItem>
+          </Col> -->
+          <Col v-bind="grid" v-if="authType">
+            <FormItem label="路由地址:" prop="menu_path">
+              <Input
+                v-model="formValidate.menu_path"
+                placeholder="请输入路由地址"
+              ></Input>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid" v-if="authType">
+            <FormItem label="权限标识:" prop="unique_auth">
+              <Input
+                v-model="formValidate.unique_auth"
+                placeholder="请输入权限标识"
+              ></Input>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid" v-if="authType">
+            <FormItem label="图标:">
+              <Input
+                v-model="formValidate.icon"
+                placeholder="请选择图标,点击右面图标"
+                icon="ios-appstore"
+                @on-click="iconClick"
+              ></Input>
+            </FormItem>
+          </Col>
+          <!--<Col v-bind="grid" v-if="authType">-->
+          <!--<FormItem label="顶部菜单:">-->
+          <!--<Select v-model="formValidate.header" filterable allow-create @on-create="handleCreate1">-->
+          <!--<Option v-for="(item,i) in headerOptionsList" :value="item.value" :key="i">{{ item.label-->
+          <!--}}-->
+          <!--</Option>-->
+          <!--</Select>-->
+          <!--</FormItem>-->
+          <!--</Col>-->
+          <Col v-bind="grid">
+            <FormItem label="排序:">
+              <Input
+                type="number"
+                v-model="formValidate.sort"
+                placeholder="请输入排序"
+                number
+              ></Input>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid">
+            <FormItem label="状态:">
+              <RadioGroup v-model="formValidate.is_show">
+                <Radio
+                  :label="item.value"
+                  v-for="(item, i) in isShowRadio"
+                  :key="i"
+                >
+                  <Icon type="social-apple"></Icon>
+                  <span>{{ item.label }}</span>
+                </Radio>
+              </RadioGroup>
+            </FormItem>
+          </Col>
+          <Col v-bind="grid" v-if="authType">
+            <FormItem label="是否为隐藏菜单:">
+              <RadioGroup v-model="formValidate.is_show_path">
+                <Radio
+                  :label="item.value"
+                  v-for="(item, i) in isShowPathRadio"
+                  :key="i"
+                >
+                  <Icon type="social-apple"></Icon>
+                  <span>{{ item.label }}</span>
+                </Radio>
+              </RadioGroup>
+            </FormItem>
+          </Col>
+          <Col span="24">
+            <Button
+              type="primary"
+              long
+              @click="handleSubmit('formValidate')"
+              :disabled="valids"
+              >提交</Button
+            >
+          </Col>
+        </Row>
+      </Form>
+    </Modal>
+    <Modal
+      v-model="modal12"
+      scrollable
+      width="600"
+      title="图标选择"
+      footer-hide
+    >
+      <Input
+        v-model="iconVal"
+        placeholder="输入关键词搜索,注意全是英文"
+        clearable
+        class="input-add"
+        @on-change="upIcon(iconVal)"
+        ref="search"
+      />
+      <div class="trees-coadd">
+        <div class="scollhide">
+          <div class="iconlist">
+            <ul class="list-inline">
+              <li
+                class="icons-item"
+                v-for="(item, i) in list"
+                :key="i"
+                :title="item.type"
+              >
+                <Icon
+                  :type="item.type"
+                  @click="iconChange(item.type)"
+                  class="ivu-icon"
+                />
+              </li>
+            </ul>
+          </div>
+        </div>
+      </div>
+    </Modal>
+    <Modal
+      v-model="ruleModal"
+      scrollable
+      width="1100"
+      title="权限列表"
+      footer-hide
+      @on-visible-change="modalchange"
+    >
+      <div class="search-rule">
+        <Input
+          class="input-add mr10"
+          v-model="searchRule"
+          placeholder="输入关键词搜索"
+          clearable
+          ref="search"
+        />
+        <Button class="mr10" type="primary" @click="searchRules">搜索</Button>
+        <Button @click="init">重置</Button>
+      </div>
+      <div class="rule">
+        <div
+          class="rule-list"
+          v-show="!arrs.length || arrs.includes(index)"
+          :class="{ 'select-rule': arrs.includes(index) }"
+          v-for="(item, index) in ruleList"
+          :key="index"
+          @click="selectRule(item)"
+        >
+          <div>按钮名称:{{ item.real_name }}</div>
+          <div>请求方式:{{ item.method }}</div>
+          <div>接口地址:{{ item.rule }}</div>
+        </div>
+      </div>
+    </Modal>
+  </div>
+</template>
+
+<script>
+import { addMenusApi, addMenus, getRuleList } from "@/api/systemMenus";
+import icon from "@/utils/icon";
+
+export default {
+  name: "menusFrom",
+  props: {
+    formValidate: {
+      type: Object,
+      default: null,
+    },
+    titleFrom: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      arrs: [],
+      searchRule: "",
+      iconVal: "",
+      grid: {
+        xl: 12,
+        lg: 12,
+        md: 12,
+        sm: 24,
+        xs: 24,
+      },
+      modals: false,
+      modal12: false,
+      ruleValidate: {
+        // menu_name: [
+        //   { required: true, message: "请输入按钮名称", trigger: "blur" },
+        // ],
+        // menu_path: [
+        //   { required: true, message: "请输入路由名称", trigger: "blur" },
+        // ],
+        // methods: [
+        //   { required: true, message: "请选择接口请求方式", trigger: "blur" },
+        // ],
+        // api_url: [
+        //   { required: true, message: "请填写接口请求地址", trigger: "blur" },
+        // ],
+      },
+      FromData: [],
+      valids: false,
+      list2: [],
+      list: icon,
+      authType: true,
+      search: icon,
+      ruleModal: false,
+      ruleList: [],
+    };
+  },
+  watch: {
+    "formValidate.header": function(n) {
+      this.formValidate.is_header = n ? 1 : 0;
+    },
+    "formValidate.auth_type": function(n) {
+      if (n === undefined) {
+        n = 1;
+      }
+      this.authType = n === 1;
+    },
+    "formValidate.data": function(n) {},
+  },
+  computed: {
+    /* eslint-disable */
+    optionsList() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("pid" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    headerOptionsList() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("header" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    optionsListmodule() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("module" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    optionsRadio() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("auth_type" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    isheaderRadio() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("is_header" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    isShowRadio() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("is_show" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    isShowPathRadio() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("is_show_path" === item.field) {
+          a = item.options;
+        }
+      });
+      return a;
+    },
+    menuList() {
+      let a = [];
+      this.FromData.map((item) => {
+        if ("menu_list" === item.field) {
+          a = item.props.data;
+        }
+      });
+      return a;
+    },
+  },
+  methods: {
+    // 获取权限列表
+    getRuleList() {
+      getRuleList(2).then((res) => {
+        this.ruleList = res.data;
+        this.ruleModal = true;
+      });
+    },
+    modalchange(type) {
+      if (!type) {
+        this.arrs = [];
+        this.ruleModal = "";
+        this.ruleModal = false;
+      }
+    },
+    visible(type) {
+      if (!type) {
+        this.authType = true;
+      }
+    },
+    selectRule(data) {
+      this.$emit("selectRule", data);
+      this.$nextTick((e) => {
+        this.ruleModal = false;
+      });
+      // this.$set(this, "ruleModal", false);
+    },
+    changeRadio(n) {
+      this.authType = n === 1 ? true : false;
+    },
+    // 搜索
+    upIcon(n) {
+      let arrs = [];
+      for (var i = 0; i < this.search.length; i++) {
+        if (this.search[i].type.indexOf(n) !== -1) {
+          arrs.push(this.search[i]);
+          this.list = arrs;
+        }
+      }
+    },
+    // 搜索规则
+    searchRules() {
+      if (this.searchRule.trim()) {
+        this.arrs = [];
+        for (var i = 0; i < this.ruleList.length; i++) {
+          if (this.ruleList[i].real_name.indexOf(this.searchRule) !== -1) {
+            this.arrs.push(i);
+          }
+        }
+      } else {
+        this.arrs = [];
+      }
+    },
+    init() {
+      this.searchRule = "";
+      this.arrs = [];
+    },
+    handleCreate1(val) {
+      this.headerOptionsList.push({
+        value: val,
+        label: val,
+      });
+    },
+    // 获取新增表单
+    getAddFrom() {
+      addMenus(2)
+        .then(async (res) => {
+          this.FromData = res.data.rules;
+        })
+        .catch((res) => {
+          this.$Message.error(res.msg);
+        });
+    },
+    iconClick() {
+      this.modal12 = true;
+    },
+    iconChange(n) {
+      this.formValidate.icon = n;
+      this.modal12 = false;
+    },
+    // 提交
+    handleSubmit(name) {
+      //判断是否选择父级分类
+      if (this.formValidate.path) {
+        let length = this.formValidate.path.length;
+        this.formValidate.pid = this.formValidate.path[length - 1] || 0;
+      }
+      let data = {
+        url: this.formValidate.id
+          ? `/setting/menus/${this.formValidate.id}?type=2`
+          : "/setting/menus?type=2",
+        method: this.formValidate.id ? "put" : "post",
+        datas: this.formValidate,
+      };
+			if(this.authType){
+				if(!this.formValidate.menu_name){
+					return this.$Message.error("请添加按钮名称!");
+				}
+				if(!this.formValidate.menu_path){
+					return this.$Message.error("请添加路由地址!");
+				}
+			}else{
+				if (!this.formValidate.menu_name){
+					return this.$Message.error("请添加接口名称!");
+				}
+				if(!this.formValidate.api_url){
+					return this.$Message.error("请添加接口地址!");
+				}
+			}
+      this.$refs[name].validate((valid) => {
+        if (valid) {
+          this.valids = true;
+          addMenusApi(data)
+            .then(async (res) => {
+              this.$Message.success(res.msg);
+              this.modals = false;
+              this.$emit("getList");
+              this.getAddFrom();
+              this.$store.dispatch("admin/menus/getMenusNavList");
+            })
+            .catch((res) => {
+							this.valids = false;
+              this.$Message.error(res.msg);
+            });
+        }
+      });
+    },
+    handleReset() {
+      this.modals = false;
+      this.authType = true;
+      // this.$refs["formValidate"].resetFields();
+      this.$emit("clearFrom");
+    },
+  },
+  created() {
+    this.list = this.search;
+    this.getAddFrom();
+  },
+};
+</script>
+
+<style scoped>
+.input-add {
+ width: 300px;
+}
+.trees-coadd {
+  width: 100%;
+  height: 500px;
+  border-radius: 4px;
+  overflow: hidden;
+}
+.scollhide {
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+  margin-left: 18px;
+  padding: 10px 0 10px 0;
+  box-sizing: border-box;
+}
+.content {
+  font-size: 12px;
+}
+
+.time {
+  font-size: 12px;
+  color: #2d8cf0;
+}
+
+.icons-item {
+  float: left;
+  margin: 6px 6px 6px 0;
+  width: 53px;
+  text-align: center;
+  list-style: none;
+  cursor: pointer;
+  height: 50px;
+  color: #5c6b77;
+  transition: all 0.2s ease;
+  position: relative;
+  padding-top: 10px;
+}
+.search-rule {
+  display: flex;
+  align-items: center;
+  padding: 10px;
+  background-color: #f2f2f2;
+}
+.rule {
+  display: flex;
+  flex-wrap: wrap;
+  max-height: 700px;
+  overflow: scroll;
+}
+/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
+.rule::-webkit-scrollbar {
+  width: 6px;
+  height: 6px;
+  background-color: #f5f5f5;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+.rule::-webkit-scrollbar-track {
+  border-radius: 4px;
+  background-color: #f5f5f5;
+}
+
+/*定义滑块 内阴影+圆角*/
+.rule::-webkit-scrollbar-thumb {
+  border-radius: 4px;
+  background-color: #555;
+}
+.rule-list {
+  background-color: #f2f2f2;
+  width: 32%;
+  margin: 5px;
+  border-radius: 3px;
+  padding: 10px;
+  color: #333;
+  cursor: pointer;
+  transition: all 0.1s;
+  overflow: hidden;
+}
+.rule-list:hover {
+  background-color: #c5d1dd;
+}
+.rule-list div {
+  white-space: nowrap;
+}
+.select-rule {
+  background-color: #c5d1dd;
+}
+.add {
+  display: flex;
+  align-items: center;
+}
+</style>

+ 333 - 0
src/pages/erp/erpMenus/index.vue

@@ -0,0 +1,333 @@
+<template>
+<!-- 门店-门店菜单 -->
+  <div>
+    <Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+      <div class="new_card_pd">
+        <!-- 查询条件 -->
+        <Form
+          inline
+          ref="roleData"
+          :model="roleData"
+          :label-width="labelWidth"
+          :label-position="labelPosition"
+          @submit.native.prevent
+        >
+          <FormItem label="规则状态:">
+            <Select
+              v-model="roleData.is_show"
+              placeholder="请选择"
+              clearable
+              @on-change="getData"
+             class="input-add"
+            >
+              <Option value="1">显示</Option>
+              <Option value="0">不显示</Option>
+            </Select>
+          </FormItem>
+          <FormItem label="按钮名称:" prop="status2" label-for="status2">
+            <Input
+              v-model="roleData.keyword"
+              placeholder="请输入按钮名称"
+              class="input-add mr14"
+            />
+             <Button type="primary" @click="getData()">查询</Button>
+          </FormItem>
+          
+        </Form>
+      </div>
+    </Card>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <!-- 操作 -->
+      <Button
+        v-auth="['setting-system_menus-add']"
+        type="primary"
+        @click="menusAdd('添加规则')"
+        >添加规则</Button
+      >
+      <!-- 表格 -->
+      <vxe-table
+        :border="false"
+        class="vxeTable ivu-mt"
+        highlight-hover-row
+        highlight-current-row
+        :loading="loading"
+        ref="xTable"
+        row-id="id"
+        header-row-class-name="false"
+        :tree-config="{ children: 'children', reserve: true }"
+        :data="tableData"
+      >
+        <vxe-table-column
+          field="id"
+          title="ID"
+          tooltip
+          min-width="70"
+        ></vxe-table-column>
+        <vxe-table-column
+          field="menu_name"
+          tree-node
+          title="按钮名称"
+          min-width="200"
+        ></vxe-table-column>
+        <vxe-table-column field="api_url" title="接口路径" min-width="150">
+          <template v-slot="{ row }">
+            <span>{{
+              row.methods
+                ? "[" + row.methods + "]  " + row.api_url
+                : row.api_url
+            }}</span>
+          </template>
+        </vxe-table-column>
+        <vxe-table-column
+          field="unique_auth"
+          title="前端权限"
+          min-width="300"
+        ></vxe-table-column>
+        <vxe-table-column
+          field="menu_path"
+          title="页面路由"
+          min-width="240"
+          tooltip="true"
+        ></vxe-table-column>
+        <vxe-table-column field="flag" title="规则状态" min-width="120">
+          <template v-slot="{ row }">
+            <i-switch
+              v-if="row.auth_type == 1"
+              v-model="row.is_show"
+              :value="row.is_show"
+              :true-value="1"
+              :false-value="0"
+              @on-change="onchangeIsShow(row)"
+              size="large"
+            >
+              <span slot="open">显示</span>
+              <span slot="close">隐藏</span>
+            </i-switch>
+          </template>
+        </vxe-table-column>
+        <vxe-table-column
+          field="date"
+          title="操作"
+          align="center"
+          width="200"
+          fixed="right"
+        >
+          <template v-slot="{ row }">
+            <span v-auth="['setting-system_menus-add']">
+              <a @click="addE(row, '添加子菜单')" v-if="row.auth_type === 1"
+                >添加子菜单</a
+              >
+              <a @click="addE(row, '添加规则')" v-else>添加规则</a>
+            </span>
+            <Divider type="vertical" />
+            <a @click="edit(row, '编辑')">编辑</a>
+            <Divider type="vertical" />
+            <a @click="del(row, '删除规则')">删除</a>
+          </template>
+        </vxe-table-column>
+      </vxe-table>
+    </Card>
+    <menus-from
+      :formValidate="formValidate"
+      :titleFrom="titleFrom"
+      @getList="getList"
+      @selectRule="selectRule"
+      ref="menusFrom"
+      @clearFrom="clearFrom"
+    ></menus-from>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import {
+  getTable,
+  menusDetailsApi,
+  isShowApi,
+  editMenus,
+} from "@/api/systemMenus";
+import formCreate from "@form-create/iview";
+import menusFrom from "./components/menusFrom";
+export default {
+  name: "systemMenus",
+  data() {
+    return {
+      spinShow: false,
+      grid: {
+        xl: 7,
+        lg: 7,
+        md: 12,
+        sm: 24,
+        xs: 24,
+      },
+      roleData: {
+        is_show: "",
+        keyword: "",
+      },
+      loading: false,
+      tableData: [],
+      FromData: null,
+      icons: "",
+      formValidate: {},
+      titleFrom: "",
+      modalTitleSs: "",
+    };
+  },
+  components: { menusFrom, formCreate: formCreate.$form() },
+  computed: {
+    ...mapState("admin/layout", ["isMobile"]),
+    labelWidth() {
+      return this.isMobile ? undefined : 96;
+    },
+    labelPosition() {
+      return this.isMobile ? "top" : "right";
+    },
+  },
+  mounted() {
+    // this.formValidate.auth_type = '1';
+    this.getData();
+  },
+  methods: {
+    // 修改规则状态
+    onchangeIsShow(row) {
+      let data = {
+        id: row.id,
+        is_show: row.is_show,
+      };
+      isShowApi(data)
+        .then(async (res) => {
+          this.$Message.success(res.msg);
+          this.$store.dispatch("admin/menus/getMenusNavList");
+        })
+        .catch((res) => {
+          this.$Message.error(res.msg);
+        });
+    },
+    // 请求列表
+    getList() {
+      this.formValidate = Object.assign({}, this.$options.data().formValidate);
+      this.getData();
+    },
+    selectRule(data) {
+      this.formValidate.menu_name = data.real_name;
+      this.formValidate.methods = data.method;
+      this.formValidate.api_url = data.rule;
+    },
+    // 清除表单数据
+    clearFrom() {
+      this.formValidate = Object.assign({}, this.$options.data().formValidate);
+    },
+    // 添加子菜单
+    addE(row, title) {
+      this.formValidate = {};
+
+      let pid = row.id.toString();
+      if (pid) {
+        menusDetailsApi(row.id, 5)
+          .then(async (res) => {
+            this.formValidate.path = res.data.path;
+            this.formValidate.path.push(row.id);
+            this.formValidate.pid = pid;
+            this.$refs.menusFrom.modals = true;
+            this.$refs.menusFrom.valids = false;
+            this.titleFrom = title;
+            this.formValidate.auth_type = 1;
+            this.formValidate.is_show = "0";
+          })
+          .catch((res) => {
+            this.$Message.error(res.msg);
+          });
+      } else {
+        this.formValidate.pid = pid;
+        this.$refs.menusFrom.modals = true;
+        this.$refs.menusFrom.valids = false;
+        this.titleFrom = title;
+        this.formValidate.auth_type = 1;
+        this.formValidate.is_show = "0";
+      }
+      // this.formValidate.pid = row.id.toString();
+      // this.$refs.menusFrom.modals = true;
+      // this.$refs.menusFrom.valids = false;
+      // this.titleFrom = title;
+      // this.formValidate.auth_type = 1;
+      // this.formValidate.is_show = '0';
+    },
+    // 删除
+    del(row, tit) {
+      let delfromData = {
+        title: tit,
+        url: `/setting/menus/${row.id}`,
+        method: "DELETE",
+        ids: "",
+      };
+      this.$modalSure(delfromData)
+        .then((res) => {
+          this.$Message.success(res.msg);
+          this.getData();
+          this.$store.dispatch("admin/menus/getMenusNavList");
+        })
+        .catch((res) => {
+          this.$Message.error(res.msg);
+        });
+    },
+    // 规则详情
+    menusDetails(id) {
+      menusDetailsApi(id, 5)
+        .then(async (res) => {
+          this.formValidate = res.data;
+          this.$refs.menusFrom.modals = true;
+        })
+        .catch((res) => {
+          this.$Message.error(res.msg);
+        });
+    },
+    // 编辑
+    edit(row, title, index) {
+      this.formValidate = {};
+      this.menusDetails(row.id);
+      this.titleFrom = title;
+      this.$refs.menusFrom.valids = false;
+      this.$refs.menusFrom.getAddFrom(row.id);
+    },
+    // 添加
+    menusAdd(title) {
+      this.formValidate = {};
+      this.$refs.menusFrom.modals = true;
+      this.$refs.menusFrom.valids = false;
+      // this.formValidate = Object.assign(this.$data, this.$options.formValidate());
+      this.titleFrom = title;
+      this.formValidate.auth_type = 1;
+      this.formValidate.is_show = 0;
+      this.formValidate.is_show_path = 0;
+      this.$refs.menusFrom.getAddFrom();
+    },
+    // 列表
+    getData() {
+      this.loading = true;
+      this.roleData.is_show = this.roleData.is_show || "";
+      getTable(this.roleData, 5)
+        .then(async (res) => {
+          this.tableData = res.data;
+          this.loading = false;
+        })
+        .catch((res) => {
+          this.loading = false;
+          this.$Message.error(res.msg);
+        });
+    },
+    // 关闭按钮
+    cancel() {
+      this.$emit("onCancel");
+    },
+  },
+};
+</script>
+
+<style scoped lang="stylus">
+.input-add {
+ width: 250px
+}
+.mr14 {
+ margin-right:14px;
+}
+</style>

+ 371 - 0
src/pages/erp/godown/addGodown.vue

@@ -0,0 +1,371 @@
+<template>
+	<div class="form-submit">
+		<div class="i-layout-page-header">
+			<PageHeader class="product_tabs" hidden-breadcrumb>
+				<div slot="title">
+					<router-link :to="{ path: `${roterPre}/erp/godown_list` }">
+						<!-- <Button icon="ios-arrow-back" size="small" class="mr20"
+              >返回</Button
+            > -->
+						<div class="font-sm after-line">
+							<span class="iconfont iconfanhui"></span>
+							<span class="pl10">返回</span>
+						</div>
+					</router-link>
+					<span v-text="
+              $route.params.id !== '0' ? '编辑仓库' : '添加仓库'
+            " class="mr20 ml16"></span>
+				</div>
+			</PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form class="formValidate mt20" ref="formValidate" :rules="ruleValidate" :model="formValidate"
+				:label-width="labelWidth" :label-position="labelPosition" @submit.native.prevent>
+				<Row :gutter="24" type="flex">
+					<Col span="24">
+					<FormItem label="仓库名称:" prop="title">
+						<Input v-model="formValidate.title" placeholder="请输入仓库名称" v-width="'400'" />
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="上级仓库:" prop="pid">
+						<el-cascader placeholder="请选择上级仓库" class="input-add" size="mini" v-model="formValidate.pid"
+							:options="data1" :props="props" @change="userSearchs" filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+
+					<Col span="24">
+					<FormItem label="经度:" prop="latitude">
+						<Input v-model="formValidate.latitude" placeholder="请输入经度" v-width="'400'" />
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="纬度:" prop="longitude">
+						<Input v-model="formValidate.longitude" placeholder="请输入纬度" v-width="'400'" />
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="省市区地址:" label-for="address" prop="address">
+						<Cascader :data="addresData" :load-data="loadData" v-model="formValidate.addressSelect"
+							@on-change="addchack" class="inputW" v-width="'400'"></Cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="详细地址:" prop="detailed_address">
+						<Input v-model="formValidate.detailed_address" placeholder="请输入详细地址" v-width="'400'" />
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="手机号:" prop="phone">
+						<Input v-model="formValidate.phone" placeholder="请输入手机号" v-width="'400'" />
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="是否自营:">
+					  <i-switch
+					    v-model="formValidate.self_support"
+					    :true-value="1"
+					    :false-value="0"
+					    size="large"
+					  >
+					    <span slot="open">是</span>
+					    <span slot="close">否</span>
+					  </i-switch>
+					</FormItem>
+					</Col>
+				</Row>
+			</Form>
+		</Card>
+		<Card :bordered="false" dis-hover class="fixed-card"
+			:style="{ left: `${!menuCollapse ? '200px' : isMobile ? '0' : '80px'}` }">
+			<Form>
+				<FormItem>
+					<Button type="primary" class="submission" @click="handleSubmit('formValidate')">保存</Button>
+				</FormItem>
+			</Form>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from "vuex";
+	import {
+		getGodownList,
+		createGodown,
+		getGodownInfo
+	} from "@/api/erp";
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList
+	} from '@/api/store';
+	import {
+		productSpecs,
+		productSpecsInfo
+	} from "@/api/product";
+	import Setting from "@/setting";
+	export default {
+		name: "specsAdd",
+		data() {
+			return {
+				addresData: [],
+				props: {
+					emitPath: false,
+					multiple: false,
+					checkStrictly: true,
+					value: "id",
+					label: "title"
+				},
+				roterPre: Setting.roterPre,
+				data1: [],
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				formValidate: {
+					id: 0,
+					title: "",
+					pid:0,
+					province: "",
+					city: "",
+					area: "",
+					detailed_address: "",
+					phone: "",
+					self_support: 0,
+					latitude: "",
+					longitude: "",
+					addressSelect: [],
+					address: ""
+				},
+				ruleValidate: {
+					title: [{
+						required: true,
+						message: "请输入仓库名称",
+						trigger: "blur"
+					}, ],
+					latitude: [{
+						required: true,
+						message: "请输入经度",
+						trigger: "blur"
+					}, ],
+					longitude: [{
+						required: true,
+						message: "请输入纬度",
+						trigger: "blur"
+					}, ],
+					detailed_address: [{
+						required: true,
+						message: "请输入详细地址",
+						trigger: "blur"
+					}, ],
+					address: [{
+						required: true,
+						message: '请选择省市区地址',
+						trigger: 'blur',
+					}, ],
+					phone: [{
+						required: true,
+						message: '请输入手机号',
+						trigger: 'blur',
+					}, ],
+				},
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile", "menuCollapse"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 120;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getGodownList()
+			let data = {
+				pid: 0
+			}
+			this.cityInfo(data);
+		},
+		mounted() {
+			// this.setCopyrightShow({
+			// 	value: false
+			// });
+			if(this.$route.params.id != 0) {
+				this.getGodownInfo(this.$route.params.id)
+			}
+		},
+		destroyed() {
+			// this.setCopyrightShow({
+			// 	value: true
+			// });
+		},
+		methods: {
+			...mapMutations("admin/layout", ["setCopyrightShow"]),
+			getGodownInfo(id) {
+				getGodownInfo(id).then(res => {
+					this.formValidate = res.data
+					this.formValidate.addressSelect = this.formValidate.addressSelect.map(item => item*1)
+					console.log(this.formValidate.addressSelect);
+				})
+			},
+			addchack(e, selectedData) {
+				console.log(selectedData,'selectedData');
+				e.forEach((i, index) => {
+					if (index == 0) {
+						this.formValidate.province = i
+					} else if (index == 1) {
+						this.formValidate.city = i
+					} else if (index == 2) {
+						this.formValidate.area = i
+					} else {
+						this.formValidate.street = i
+					}
+				})
+				this.formValidate.address = (selectedData.map(o => o.label)).join('/')
+				// console.log('this.formValidate.addressSelect',this.formValidate.addressSelect);
+				
+			},
+			cityInfo(data) {
+				cityApi(data).then(res => {
+					this.addresData = res.data
+				})
+			},
+			loadData(item, callback) {
+				item.loading = true;
+					cityApi({
+						pid: item.value
+					}).then(res => {
+						item.children = res.data;
+						item.loading = false;
+						callback();
+					});
+				
+
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+				})
+			},
+			del(index) {
+				this.data.splice(index, 1);
+			},
+			userSearchs(e) {
+
+			},
+			handleSubmit(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.formValidate.id = this.$route.params.id;
+						createGodown(this.formValidate.id,this.formValidate).then(res => {
+							this.$Message.success(res.msg);
+									this.$router.push({
+										path: this.roterPre + "/erp/godown_list"
+									});
+						}).catch(err => {
+							this.$Message.error(err.msg);
+						})
+						// productSpecs(this.formValidate)
+						// 	.then((res) => {
+						// 		this.$Message.success(res.msg);
+						// 		this.$router.push({
+						// 			path: this.roterPre + "/erp/godown_list"
+						// 		});
+						// 	})
+						// 	.catch((err) => {
+						// 		this.$Message.error(err.msg);
+						// 	});
+						console.log('this.formValidate:',this.formValidate);
+					} else {
+						// this.$Message.error("请输入参数模板名称");
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.table {
+		/deep/.ivu-table-header table {
+			border: 0 !important;
+		}
+
+		/deep/.ivu-table-header thead tr th:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table td:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table-cell {
+			padding: 0 !important;
+		}
+
+		/deep/.ivu-table-border th,
+		/deep/.ivu-table-border td {
+			border-right: unset;
+		}
+
+		/deep/.ivu-table td {
+			height: 59px;
+		}
+	}
+
+	.form-submit {
+		/deep/.ivu-card {
+			border-radius: 0;
+		}
+
+		margin-bottom: 79px;
+
+		.fixed-card {
+			position: fixed;
+			right: 0;
+			bottom: 0;
+			left: 200px;
+			z-index: 99;
+			box-shadow: 0 -1px 2px rgb(240, 240, 240);
+
+			/deep/ .ivu-card-body {
+				padding: 15px 16px 14px;
+			}
+
+			.ivu-form-item {
+				margin-bottom: 0;
+			}
+
+			/deep/ .ivu-form-item-content {
+				margin-right: 124px;
+				text-align: center;
+			}
+
+			.ivu-btn {
+				height: 36px;
+				padding: 0 20px;
+			}
+		}
+	}
+
+	.after-line {
+		display: inline-block;
+		position: relative;
+		margin-right: 16px;
+	}
+
+	.ml16 {
+		margin-left: 16px;
+	}
+</style>

+ 383 - 0
src/pages/erp/godown/addPosition.vue

@@ -0,0 +1,383 @@
+<template>
+	<div class="form-submit">
+		<div class="i-layout-page-header">
+			<PageHeader class="product_tabs" hidden-breadcrumb>
+				<div slot="title">
+					<router-link :to="{ path: `${roterPre}/erp/position_list` }">
+						<!-- <Button icon="ios-arrow-back" size="small" class="mr20"
+              >返回</Button
+            > -->
+						<div class="font-sm after-line">
+							<span class="iconfont iconfanhui"></span>
+							<span class="pl10">返回</span>
+						</div>
+					</router-link>
+					<span v-text="
+              $route.params.id !== '0' ? '编辑仓位' : '添加仓位'
+            " class="mr20 ml16"></span>
+				</div>
+			</PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form class="formValidate mt20" ref="formValidate" :rules="ruleValidate" :model="formValidate"
+				:label-width="labelWidth" :label-position="labelPosition" @submit.native.prevent>
+				<Row :gutter="24" type="flex">
+					<Col span="24">
+					<FormItem label="仓位名称:" prop="title">
+						<Input v-model="formValidate.title" placeholder="请输入仓位名称/编号" v-width="'400'" />
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="所属仓库:" prop="wid">
+						<el-cascader placeholder="请选择所属仓库" class="input-add" size="mini" v-model="formValidate.wid"
+							:options="data1" :props="props" @change="userSearchs" filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="通道:" prop="passageway">
+						<Input v-model="formValidate.passageway" placeholder="请输入通道" type="number" v-width="'400'" :disabled="formValidate.id != 0"/> (1~99)
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="左右:" prop="control">
+						<RadioGroup v-model="formValidate.control" >
+							<Radio label="L" :disabled="formValidate.id != 0">
+								<Icon type="social-apple"></Icon>
+								<span>左</span>
+							</Radio>
+							<Radio label="R" :disabled="formValidate.id != 0">
+								<Icon type="social-android"></Icon>
+								<span>右</span>
+							</Radio>
+						</RadioGroup>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="层数:" prop="layer">
+						<Input v-model="formValidate.layer" placeholder="请输入层数" type="number" v-width="'400'" :disabled="formValidate.id != 0"/> (1~9)
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="仓位编号:" prop="number">
+						<Input v-model="formValidate.number" placeholder="请输入仓位编号" type="number" v-width="'400'" :disabled="formValidate.id != 0"/> (1~999)
+					</FormItem>
+					</Col>
+				</Row>
+			</Form>
+		</Card>
+		<Card :bordered="false" dis-hover class="fixed-card"
+			:style="{ left: `${!menuCollapse ? '200px' : isMobile ? '0' : '80px'}` }">
+			<Form>
+				<FormItem>
+					<Button type="primary" class="submission" @click="handleSubmit('formValidate')">保存</Button>
+				</FormItem>
+			</Form>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from "vuex";
+	import {
+		getGodownList,
+		createGodown,
+		getGodownInfo,
+		createPosition,
+		getPosition
+	} from "@/api/erp";
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList
+	} from '@/api/store';
+	import {
+		productSpecs,
+		productSpecsInfo
+	} from "@/api/product";
+	import Setting from "@/setting";
+	
+	const jy = (min,max)=>{
+		return {
+	        validator(rule, value){
+	            if (!value || value > max || value < min) {
+	                return [{message:`范围为${min}~${max}`}];
+	            } else {
+	                return [];
+	            }
+	        }
+	    }
+	}
+	
+
+	export default {
+		name: "specsAdd",
+		data() {
+			return {
+				addresData: [],
+				props: {
+					emitPath: false,
+					multiple: false,
+					checkStrictly: true,
+					value: "id",
+					label: "title"
+				},
+				roterPre: Setting.roterPre,
+				data1: [],
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				formValidate: {
+					id: 0,
+					title: "",
+					wid:'0',
+					passageway:'',
+					control: "L",
+					layer: '',
+					number:''
+				},
+				ruleValidate: {
+					title: [{
+						required: true,
+						message: "请输入仓位名称",
+						trigger: "blur"
+					}, ],
+					wid: [{
+						required: true,
+						message: "请选择仓库",
+						trigger: "blur"
+					}, ],
+					passageway: [{
+						required: true,
+						message: "请输入通道",
+						trigger: "blur"
+					},jy(1,99) ],
+					control: [{
+						required: true,
+						message: "请选择左右",
+						trigger: "blur"
+					}, ],
+					layer: [{
+						required: true,
+						message: '请输入层数',
+						trigger: 'blur',
+					},jy(1,9) ],
+					number: [{
+						required: true,
+						message: '请输入仓位编号',
+						trigger: 'blur',
+					}, jy(1,999)],
+				},
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile", "menuCollapse"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 120;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getGodownList()
+		},
+		mounted() {
+			// this.setCopyrightShow({
+			// 	value: false
+			// });
+			if(this.$route.query.id != 0) {
+				this.getPosition(this.$route.query.id)
+			}else {
+				this.formValidate.id = 0
+			}
+		},
+		destroyed() {
+			// this.setCopyrightShow({
+			// 	value: true
+			// });
+		},
+		methods: {
+			...mapMutations("admin/layout", ["setCopyrightShow"]),
+			getPosition(id) {
+				getPosition(id).then(res => {
+					this.formValidate = res.data
+					let bin_number = this.formValidate.bin_number
+					this.formValidate.wid = this.formValidate.wid + ''
+					this.formValidate.passageway = bin_number.slice(0,2)
+					this.formValidate.control = bin_number.slice(2,3)
+					this.formValidate.layer = bin_number.slice(3,4)
+					this.formValidate.number = bin_number.slice(4)
+					console.log(this.formValidate.number);
+					// this.formValidate.bin_number.slice
+				})
+			},
+			addchack(e, selectedData) {
+				console.log(selectedData,'selectedData');
+				e.forEach((i, index) => {
+					if (index == 0) {
+						this.formValidate.province = i
+					} else if (index == 1) {
+						this.formValidate.city = i
+					} else if (index == 2) {
+						this.formValidate.area = i
+					} else {
+						this.formValidate.street = i
+					}
+				})
+				this.formValidate.address = (selectedData.map(o => o.label)).join('/')
+				// console.log('this.formValidate.addressSelect',this.formValidate.addressSelect);
+				
+			},
+			cityInfo(data) {
+				cityApi(data).then(res => {
+					this.addresData = res.data
+				})
+			},
+			loadData(item, callback) {
+				item.loading = true;
+					cityApi({
+						pid: item.value
+					}).then(res => {
+						item.children = res.data;
+						item.loading = false;
+						callback();
+					});
+				
+
+			},
+			getGodownList() {
+				getGodownList({
+					page: 1,
+					limit: 10000
+				}).then(res => {
+					console.log(res);
+					this.data1 = res.data.data.map(item => {
+						item.id = item.id + ''
+						return item
+					})
+					console.log(this.data1,'this.data1');
+				})
+			},
+			del(index) {
+				this.data.splice(index, 1);
+			},
+			userSearchs(e) {
+				console.log(e,'ddd');
+				if(e) {
+					this.formValidate.wid = e + ''
+				}else {
+					this.formValidate.wid = ''
+				}
+			},
+			handleSubmit(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.formValidate.id = this.$route.query.id;
+						createPosition({
+							id: this.formValidate.id,
+							title: this.formValidate.title,
+							wid:this.formValidate.wid,
+							passageway:this.formValidate.passageway,
+							control:this.formValidate.control,
+							layer: this.formValidate.layer,
+							number:this.formValidate.number
+						}).then(res => {
+							this.$Message.success(res.msg);
+									this.$router.push({
+										path: this.roterPre + "/erp/position_list"
+									});
+						}).catch(err => {
+							this.$Message.error(err.msg);
+						})
+					} else {
+						// this.$Message.error("请输入参数模板名称");
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.table {
+		/deep/.ivu-table-header table {
+			border: 0 !important;
+		}
+
+		/deep/.ivu-table-header thead tr th:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table td:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table-cell {
+			padding: 0 !important;
+		}
+
+		/deep/.ivu-table-border th,
+		/deep/.ivu-table-border td {
+			border-right: unset;
+		}
+
+		/deep/.ivu-table td {
+			height: 59px;
+		}
+	}
+
+	.form-submit {
+		/deep/.ivu-card {
+			border-radius: 0;
+		}
+
+		margin-bottom: 79px;
+
+		.fixed-card {
+			position: fixed;
+			right: 0;
+			bottom: 0;
+			left: 200px;
+			z-index: 99;
+			box-shadow: 0 -1px 2px rgb(240, 240, 240);
+
+			/deep/ .ivu-card-body {
+				padding: 15px 16px 14px;
+			}
+
+			.ivu-form-item {
+				margin-bottom: 0;
+			}
+
+			/deep/ .ivu-form-item-content {
+				margin-right: 124px;
+				text-align: center;
+			}
+
+			.ivu-btn {
+				height: 36px;
+				padding: 0 20px;
+			}
+		}
+	}
+
+	.after-line {
+		display: inline-block;
+		position: relative;
+		margin-right: 16px;
+	}
+
+	.ml16 {
+		margin-left: 16px;
+	}
+</style>

+ 873 - 0
src/pages/erp/godown/godownDetail.vue

@@ -0,0 +1,873 @@
+<template>
+	<!-- <div style="width: 100%"> -->
+	<Drawer :closable="false" width="1000" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
+		<div class="acea-row user-row">
+			
+		</div>
+		
+		<Tabs v-model="activeName">
+			<TabPane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.val">
+				<template v-if="item.val === 'position'">
+					<div>顶顶顶顶顶</div>
+					<!-- <user-form v-if="isEdit" ref="userForm" :ps-info="psInfo" @change-menu="changeMenu"></user-form>
+					<user-info v-else :ps-info="psInfo" :workMemberInfo="workMemberInfo"
+						:workClientInfo="workClientInfo"></user-info> -->
+				</template>
+				<template v-else>
+					<Table :columns="columns" :data="userLists" ref="table" :loading="loading" no-userFrom-text="暂无数据"
+						no-filtered-userFrom-text="暂无筛选结果">
+						<template slot-scope="{ row }" slot="coupon_price">
+							<span v-if="row.coupon_type==1">{{row.coupon_price}}元</span>
+							<span
+								v-if="row.coupon_type==2">{{parseFloat(row.coupon_price)/10}}折({{row.coupon_price.toString().split(".")[0]}}%)</span>
+						</template>
+						<template slot-scope="{ row }" slot="product">
+							<div class="product">
+								<div class="image" v-viewer>
+									<img v-lazy="row.image">
+								</div>
+								<div class="title">{{ row.store_name }}</div>
+							</div>
+						</template>
+					</Table>
+					<div class="acea-row row-right page">
+						<Page :total="total" :current.sync="userFrom.page" show-elevator show-total
+							@on-change="pageChange" :page-size="userFrom.limit" />
+					</div>
+				</template>
+			</TabPane>
+		</Tabs>
+	</Drawer>
+	<!-- <Modal v-model="modals" scrollable footer-hide closable title="用户详情" :mask-closable="false" width="1000" :z-index="2"> -->
+	<!-- <Spin size="large" fix v-if="spinShow"></Spin> -->
+	<!-- <div class="acea-row">
+                <div class="avatar mr15"><img :src="psInfo.avatar"></div>
+                <div class="dashboard-workplace-header-tip">
+                    <p class="dashboard-workplace-header-tip-title" v-text="psInfo.nickname || '-'"></p>
+                    <div class="dashboard-workplace-header-tip-desc">
+                        <span class="dashboard-workplace-header-tip-desc-sp" v-for="(item, index) in detailsData" :key="index">{{item.title+':'+item.value}}</span>
+                    </div>
+                </div>
+            </div> -->
+	<!-- <Row type="flex" justify="space-between" class="mt25">
+                <Col span="4" class="user_menu">
+                    <Menu :theme="theme2" :active-name="activeName" @on-select="changeType">
+                        <MenuItem :name="item.val" v-for="(item, index) in list" :key="index" >
+                            {{item.label}}
+                        </MenuItem>
+                    </Menu>
+                </Col>
+                <Col span="20">
+                    <Table :columns="columns" :data="userLists" max-height="400"
+                           ref="table"
+                           :loading="loading"
+                           no-userFrom-text="暂无数据"
+                           no-filtered-userFrom-text="暂无筛选结果"
+                    ></Table>
+                    <div class="acea-row row-right page">
+                        <Page :total="total" :current="userFrom.page" show-elevator show-total @on-change="pageChange"
+                              :page-size="userFrom.limit"  /></div>
+                </Col>
+            </Row> -->
+	<!-- </Modal> -->
+	<!-- </div> -->
+</template>
+
+<script>
+	import {
+		detailsApi,
+		infoApi,
+		visitList,
+		spreadList
+	} from '@/api/user';
+	// import userForm from './userForm';
+	// import userInfo from './userInfo';
+
+	export default {
+		name: 'userDetails',
+		components: {
+			// userForm,
+			// userInfo
+		},
+		props: ['levelList', 'labelList', 'groupList', 'fromType'],
+		data() {
+			return {
+				theme2: 'light',
+				list: [{
+						val: 'position',
+						label: '仓位列表'
+					},
+					{
+						val: 'order',
+						label: '消费记录'
+					},
+					{
+						val: 'integral',
+						label: '积分明细'
+					},
+					{
+						val: 'sign',
+						label: '签到记录'
+					},
+					{
+						val: 'coupon',
+						label: '持有优惠券'
+					},
+					{
+						val: 'balance_change',
+						label: '余额变动'
+					},
+					{
+						val: 'spread',
+						label: '好友关系'
+					},
+					{
+						val: 'visit',
+						label: '浏览足迹'
+					},
+					{
+						val: 'spread_change',
+						label: '推荐人变更记录'
+					}
+				],
+				modals: false,
+				spinShow: false,
+				detailsData: [],
+				userId: 0,
+				loading: false,
+				userFrom: {
+					type: 'position',
+					page: 1, // 当前页
+					limit: 12 // 每页显示条数
+				},
+				total: 0,
+				columns: [],
+				userLists: [],
+				psInfo: {},
+				workMemberInfo: {},
+				workClientInfo: {},
+				activeName: 'position',
+				isEdit: false,
+				groupOptions: [],
+				labelOptions: []
+			}
+		},
+		watch: {
+			activeName(value) {
+				this.userFrom.page = 1;
+				if (value == 'position') return;
+				this.isEdit = false;
+				this.changeType(value);
+			},
+			modals(value) {
+				if (value) {
+					this.isEdit = false;
+				}
+			}
+		},
+		created() {},
+		methods: {
+			changeMenu(value) {
+				if (value === '99') {
+					this.getDetails(this.userId);
+					this.$parent.getList();
+					this.isEdit = false;
+					return;
+				}
+				this.$parent.changeMenu(this.psInfo, value);
+			},
+			// 完成
+			finish() {
+				this.$refs.userForm[0].detailsPut();
+			},
+			// 推荐人变更记录
+			getSpreadList() {
+				this.loading = true;
+				spreadList({
+					id: this.userId,
+					datas: {
+						page: this.userFrom.page,
+						limit: this.userFrom.limit
+					}
+				}).then(async res => {
+					if (res.status === 200) {
+						let data = res.data;
+						this.userLists = data.list;
+						this.total = data.count;
+						this.columns = [{
+								title: '推荐人ID',
+								key: 'spread_uid',
+								minWidth: 120
+							},
+							{
+								title: '推荐人',
+								key: 'nickname',
+								minWidth: 120,
+								render: (h, params) => {
+									return h('div', [
+										h('img', {
+											style: {
+												borderRadius: '50%',
+												marginRight: '10px',
+												verticalAlign: 'middle'
+											},
+											attrs: {
+												with: 38,
+												height: 38
+											},
+											directives: [{
+													name: 'lazy',
+													value: params.row.avatar
+												},
+												{
+													name: 'viewer'
+												}
+											]
+										}),
+										h('span', {
+											style: {
+												verticalAlign: 'middle'
+											}
+										}, params.row.nickname)
+									]);
+								}
+							},
+							{
+								title: '变更方式',
+								key: 'type',
+								minWidth: 120
+							},
+							{
+								title: '变更时间',
+								key: 'spread_time',
+								minWidth: 120
+							}
+						];
+						this.loading = false;
+					} else {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				});
+			},
+			// 浏览足迹
+			getVisitList() {
+				this.loading = true;
+				visitList({
+					id: this.userId,
+					datas: {
+						page: this.userFrom.page,
+						limit: this.userFrom.limit
+					}
+				}).then(async res => {
+					if (res.status === 200) {
+						let data = res.data;
+						this.userLists = data.list;
+						this.total = data.count;
+						this.columns = [{
+								title: '商品信息',
+								slot: 'product',
+								minWidth: 400
+							},
+							{
+								title: '价格',
+								key: 'product_price',
+								minWidth: 120,
+								render: (h, params) => {
+									return h('div', `¥${params.row.product_price}`);
+								}
+							},
+							{
+								title: '浏览时间',
+								key: 'add_time',
+								minWidth: 120
+							}
+						];
+						this.loading = false;
+					} else {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				});
+			},
+			// 会员详情
+			getDetails(id) {
+				this.userId = id;
+				this.spinShow = true;
+				detailsApi(id).then(async res => {
+					if (res.status === 200) {
+						let data = res.data
+						this.detailsData = data.headerList;
+						if (this.fromType !== 'order') {
+							let groupItem = this.groupList.find(item => item.id == data.ps_info.group_id);
+							if (groupItem) {
+								data.ps_info.group_name = groupItem.group_name;
+							}
+						}
+						this.psInfo = data.ps_info;
+						this.workMemberInfo = data.workMemberInfo;
+						this.workClientInfo = data.workClientInfo;
+						this.spinShow = false;
+					} else {
+						this.spinShow = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.spinShow = false;
+					this.$Message.error(res.msg);
+				})
+			},
+			pageChange(index) {
+				this.userFrom.page = index
+				this.changeType(this.userFrom.type);
+				// switch (this.activeName) {
+				//     case 'visit':
+				//        this.changeType(this.userFrom.type);
+				//         break;
+				//     case 'spread_change':
+				//        this.changeType(this.userFrom.type);
+				//         break;
+				//     default:
+				//         this.changeType(this.userFrom.type);
+				//         break;
+				// }
+			},
+			// tab选项
+			changeType(name) {
+				this.loading = true;
+				this.userFrom.type = name;
+				this.activeName = name;
+				let data = {
+					id: this.userId,
+					datas: this.userFrom
+				}
+				infoApi(data).then(async res => {
+					if (res.status === 200) {
+						let data = res.data
+						this.userLists = data.list;
+						this.total = data.count;
+						switch (this.userFrom.type) {
+							case 'order':
+								this.columns = [{
+										title: '订单ID',
+										key: 'order_id',
+										minWidth: 160
+									},
+									{
+										title: '收货人',
+										key: 'real_name',
+										minWidth: 100
+									},
+									{
+										title: '商品数量',
+										key: 'total_num',
+										minWidth: 90
+									},
+									{
+										title: '商品总价',
+										key: 'total_price',
+										minWidth: 110
+									},
+									{
+										title: '实付金额',
+										key: 'pay_price',
+										minWidth: 120
+									},
+									{
+										title: '交易完成时间',
+										key: 'pay_time',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'integral':
+								this.columns = [{
+										title: '来源/用途',
+										key: 'title',
+										minWidth: 120
+									},
+									{
+										title: '积分变化',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '变化后积分',
+										key: 'balance',
+										minWidth: 120
+									},
+									{
+										title: '日期',
+										key: 'add_time',
+										minWidth: 120
+									},
+									{
+										title: '备注',
+										key: 'mark',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'sign':
+								this.columns = [
+									// {
+									//     title: '动作',
+									//     key: 'title',
+									//     minWidth: 120
+									// },
+									{
+										title: '获得积分',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '签到时间',
+										key: 'add_time',
+										minWidth: 120
+									},
+									{
+										title: '备注',
+										key: 'mark',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'coupon':
+								this.columns = [{
+										title: '优惠券名称',
+										key: 'coupon_title',
+										minWidth: 120
+									},
+									{
+										title: '面值',
+										slot: 'coupon_price',
+										minWidth: 120
+									},
+									{
+										title: '有效期(天)',
+										key: 'coupon_time',
+										minWidth: 120
+									},
+									{
+										title: '兑换时间',
+										key: '_add_time',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'balance_change':
+								this.columns = [{
+										title: '动作',
+										key: 'title',
+										minWidth: 120
+									},
+									{
+										title: '变动金额',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '变动后',
+										key: 'balance',
+										minWidth: 120
+									},
+									{
+										title: '创建时间',
+										key: 'add_time',
+										minWidth: 120
+									},
+									{
+										title: '备注',
+										key: 'mark',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'visit':
+								this.columns = [{
+										title: '商品信息',
+										slot: 'product',
+										minWidth: 400,
+									},
+									{
+										title: '价格',
+										key: 'product_price',
+										minWidth: 120,
+										render: (h, params) => {
+											return h('div', `¥${params.row.product_price}`)
+										},
+									},
+									{
+										title: '浏览时间',
+										key: 'add_time',
+										minWidth: 120,
+									},
+								]
+								break
+							case 'spread_change':
+								this.columns = [{
+										title: '推荐人ID',
+										key: 'spread_uid',
+										minWidth: 120,
+									},
+									{
+										title: '推荐人',
+										key: 'nickname',
+										minWidth: 120,
+										render: (h, params) => {
+											return h('div', [
+												h('img', {
+													style: {
+														borderRadius: '50%',
+														marginRight: '10px',
+														verticalAlign: 'middle',
+													},
+													attrs: {
+														with: 38,
+														height: 38,
+													},
+													directives: [{
+															name: 'lazy',
+															value: params.row.avatar,
+														},
+														{
+															name: 'viewer',
+														},
+													],
+												}),
+												h(
+													'span', {
+														style: {
+															verticalAlign: 'middle',
+														},
+													},
+													params.row.nickname
+												),
+											])
+										},
+									},
+									{
+										title: '变更方式',
+										key: 'type',
+										minWidth: 120,
+									},
+									{
+										title: '变更时间',
+										key: 'spread_time',
+										minWidth: 120,
+									},
+								]
+								break;
+							default:
+								this.columns = [{
+										title: 'ID',
+										key: 'uid',
+										minWidth: 120
+									},
+									{
+										title: '昵称',
+										key: 'nickname',
+										minWidth: 120
+									},
+									{
+										title: '等级',
+										key: 'type',
+										minWidth: 120
+									},
+									{
+										title: '加入时间',
+										key: 'add_time',
+										minWidth: 120
+									}
+								]
+						}
+						this.loading = false;
+					} else {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	/deep/.ivu-modal-body {
+		padding: 0;
+	}
+
+	.user-info {
+		// padding: 15px;
+	}
+
+	.user-row {
+		padding: 30px 35px 0;
+
+		&-text {
+			flex: 1;
+			align-self: center;
+		}
+
+		&-action {
+
+			.ivu-btn {
+				margin-left: 12px;
+				font-size: 13px !important;
+				color: rgba(0, 0, 0, 0.85);
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.ivu-btn-primary {
+					border-color: #1890FF;
+					background-color: #1890FF;
+					color: #FFFFFF;
+				}
+
+				&.ivu-btn-success {
+					border-color: #00C050;
+					background-color: #00C050;
+					color: #FFFFFF;
+				}
+			}
+		}
+
+		.nickname {
+			font-weight: 500;
+			font-size: 16px;
+			line-height: 16px;
+			color: rgba(0, 0, 0, 0.85);
+		}
+
+		.iconfont {
+			margin-left: 7px;
+			font-size: 18px;
+
+			&:nth-child(2) {
+				margin-left: 9px;
+			}
+
+			&.iconxiaochengxu {
+				color: #007DFF;
+			}
+
+			&.icongongzhonghao {
+				color: #00BF00;
+			}
+
+			&.iconPC {
+				color: #F69B00;
+			}
+
+			&.iconh5 {
+				color: #9F5CE3;
+			}
+
+			&.iconapp {
+				color: #E36734;
+			}
+		}
+
+		.level {
+			margin-top: 5px;
+
+			img {
+				width: 42px;
+				height: 20px;
+				vertical-align: middle;
+
+				+span {
+					margin-left: 7px;
+				}
+			}
+
+			.vip {
+				display: inline-block;
+				width: 56px;
+				height: 26px;
+				padding-left: 30px;
+				// background: url("../../../../assets/images/vip-bg.png") left top/100% 100% no-repeat;
+				font-weight: bold;
+				font-size: 9px;
+				line-height: 26px;
+				color: #5F7DB5;
+				transform-origin: left;
+				transform: scale(0.75, 0.75);
+				vertical-align: middle;
+			}
+		}
+	}
+
+	.info-row {
+		flex-wrap: nowrap;
+		padding: 20px 35px 24px;
+
+		&-item {
+			flex: none;
+			width: 155px;
+			font-size: 14px;
+			line-height: 14px;
+			color: rgba(0, 0, 0, 0.85);
+
+			&-title {
+				margin-bottom: 12px;
+				font-size: 13px;
+				line-height: 13px;
+				color: #666666;
+			}
+		}
+	}
+
+	.ivu-tabs {
+		color: rgba(0, 0, 0, 0.85);
+
+		/deep/ .ivu-tabs-bar {
+			border-bottom: 0;
+			margin-bottom: 0;
+			background-color: #F5F7FA;
+
+			.ivu-tabs-nav-container {
+				font-size: 13px;
+			}
+
+			.ivu-tabs-ink-bar {
+				display: none;
+			}
+
+			.ivu-tabs-tab {
+				padding: 7px 19px !important;
+				margin-right: 0;
+				line-height: 26px;
+			}
+
+			.ivu-tabs-tab-active {
+				background-color: #FFFFFF;
+				color: rgba(0, 0, 0, 0.85);
+
+				&:before {
+					content: "";
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 2px;
+					background-color: #1890FF;
+				}
+			}
+		}
+
+		/deep/ .ivu-tabs-content {
+			.ivu-tabs-tabpane {
+				padding: 15px 15px !important;
+
+				&:first-child {
+					padding: 0 25px !important;
+				}
+			}
+		}
+
+		.product {
+			display: flex;
+
+			.image {
+				width: 50px;
+				height: 50px;
+			}
+
+			img {
+				width: 100%;
+				height: 100%;
+				border-radius: 4px;
+			}
+
+			.title {
+				flex: 1;
+				padding-left: 13px;
+				text-align: left;
+			}
+		}
+	}
+
+	.avatar {
+		width: 60px;
+		height: 60px;
+		border-radius: 50%;
+		overflow: hidden;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.dashboard-workplace {
+		&-header {
+			&-avatar {
+				width: 64px;
+				height: 64px;
+				border-radius: 50%;
+				margin-right: 16px;
+				font-weight: 600;
+			}
+
+			&-tip {
+				width: 82%;
+				display: inline-block;
+				vertical-align: middle;
+
+				&-title {
+					font-size: 13px;
+					color: #000000;
+					margin-bottom: 12px;
+				}
+
+				&-desc {
+					&-sp {
+						width: 33.33%;
+						color: #17233D;
+						font-size: 13px;
+						display: inline-block;
+					}
+				}
+			}
+
+			&-extra {
+				.ivu-col {
+					p {
+						text-align: right;
+					}
+
+					p:first-child {
+						span:first-child {
+							margin-right: 4px;
+						}
+
+						span:last-child {
+							color: #808695;
+						}
+					}
+
+					p:last-child {
+						font-size: 22px;
+					}
+				}
+			}
+		}
+	}
+</style>
+<style scoped lang="stylus">
+	.user_menu>>>.ivu-menu {
+		width 100% !important;
+	}
+</style>

+ 341 - 0
src/pages/erp/godown/list.vue

@@ -0,0 +1,341 @@
+<template>
+	<!-- 商品-商品分类 -->
+	<div class="article-manager">
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<Form ref="artFrom" :model="artFrom" :label-width="labelWidth" inline :label-position="labelPosition"
+					@submit.native.prevent>
+					<!-- <FormItem label="商品分类:" prop="pid" label-for="pid">
+						<Select v-model="artFrom.id" @on-change="userSearchs" clearable class="input-add">
+							<Option v-for="item in treeSelect" :value="item.id" :key="item.id">{{ item.cate_name }}
+							</Option>
+						</Select>
+					</FormItem> -->
+					<FormItem label="状态:" label-for="is_show">
+						<Select v-model="artFrom.is_show" placeholder="请选择" clearable @on-change="userSearchs"
+							class="input-add">
+							<Option value="-1">全部</Option>
+							<Option value="1">显示</Option>
+							<Option value="0">隐藏</Option>
+						</Select>
+					</FormItem>
+					<!-- <FormItem label="分类名称:" label-for="status2">
+						<Input placeholder="请输入" v-model="artFrom.cate_name" class="input-add mr14" />
+						<Button type="primary" @click="userSearchs()">查询</Button>
+					</FormItem> -->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 相关操作 -->
+			<div>
+				<Button v-auth="['product-save-cate']" type="primary" class="bnt" @click="addClass">添加仓库</Button>
+			</div>
+			<!-- 商品分类表格 -->
+			<vxe-table :data="tableData" ref="xTable" class="ivu-mt" highlight-hover-row :loading="loading"
+				header-row-class-name="false" row-id="id"
+				 :tree-config="{transform: true, rowField: 'id', parentField: 'pid'}">
+				<vxe-table-column field="id" title="ID" tooltip width="80"></vxe-table-column>
+				<vxe-table-column field="title" tree-node title="仓库名称" min-width="250"></vxe-table-column>
+				<vxe-table-column field="address"  title="省市区地址" min-width="300"></vxe-table-column>
+				<vxe-table-column field="phone"  title="手机号" min-width="200"></vxe-table-column>
+				<vxe-table-column field="detailed_address"  title="详细地址" min-width="250"></vxe-table-column>
+				<vxe-table-column field="latitude"  title="经度" min-width="200"></vxe-table-column>
+				<vxe-table-column field="longitude"  title="纬度" min-width="200"></vxe-table-column>
+				<vxe-table-column field="self_support" title="是否自营" min-width="100" tooltip="true">
+					<template v-slot="{ row }">
+						{{row.self_support? '是': '否'}}
+						</template>
+				</vxe-table-column>
+				<vxe-table-column field="is_show" title="是否显示" min-width="120">
+					<template v-slot="{ row }">
+						<i-switch v-model="row.is_show" :value="row.is_show" :true-value="1" :false-value="0"
+							@on-change="onchangeIsShow(row)" size="large">
+							<span slot="open">显示</span>
+							<span slot="close">隐藏</span>
+						</i-switch>
+					</template>
+				</vxe-table-column>
+				<vxe-table-column field="date" title="操作" width="250" align="left">
+					<template v-slot="{ row, index }">
+						<a @click="edit(row)">编辑</a>
+						<Divider type="vertical" />
+						<a @click="lookMore(row)">详情</a>
+						<!-- <a @click="del(row,'删除商品分类',index)">删除</a> -->
+					</template>
+				</vxe-table-column>
+			</vxe-table>
+			<!--            <div class="acea-row row-right page" v-if="total">-->
+			<!--                <Page :total="total" :current="artFrom.page" show-elevator show-total @on-change="pageChange"-->
+			<!--                      :page-size="artFrom.limit"/>-->
+			<!--            </div>-->
+		</Card>
+		<!-- 添加 编辑表单-->
+		<edit-from ref="edits" :FromData="FromData" @submitFail="userSearchs"></edit-from>
+		<godown-detail ref="godownDetail" :group-list="groupList"></godown-detail>
+	</div>
+</template>
+
+<script>
+	import godownDetail from './godownDetail.vue'
+	
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		getGodownList,
+		getUserInfo,
+		createGodown
+	} from "@/api/erp";
+	import {
+		productListApi,
+		productCreateApi,
+		productEditApi,
+		setShowApi,
+		treeListApi
+	} from '@/api/product';
+	import editFrom from '../../../components/from/from';
+	import Setting from '@/setting';
+	export default {
+		name: 'product_productClassify',
+		components: {
+			editFrom,
+			godownDetail
+		},
+		data() {
+			return {
+				groupList: [],
+				roterPre: Setting.roterPre,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "仓库名称",
+						key: "title",
+						minWidth: 90,
+					},
+					{
+						title: "上级编号",
+						key: "pid",
+						minWidth: 90,
+					},
+					{
+						title: "省市区",
+						slot: "pca",
+						minWidth: 90,
+					},
+					{
+						title: "详细地址",
+						key: "detailed_address",
+						minWidth: 90,
+					},
+					{
+						title: "经纬度",
+						slot: "ln",
+						minWidth: 90,
+					},
+					{
+						title: "是否自营",
+						slot: "self_support",
+						minWidth: 90,
+					},
+					{
+						title: "是否显示",
+						slot: "is_show",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				treeSelect: [],
+				FromData: null,
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24
+				},
+				loading: false,
+				artFrom: {
+					// pid: 0,
+					is_show: '-1',
+					page: 1,
+					cate_name: '',
+					limit: 10000,
+					id: 0
+				},
+				total: 0,
+				tableData: []
+			}
+		},
+		computed: {
+			...mapState('admin/layout', [
+				'isMobile'
+			]),
+			...mapState('admin/userLevel', [
+				'categoryId'
+			]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'right';
+			}
+		},
+		mounted() {
+			this.goodsCategory();
+			this.getList();
+		},
+		methods: {
+			lookMore() {
+				this.$refs.godownDetail.modals = true;
+				this.$refs.godownDetail.activeName = "position";
+				this.$refs.godownDetail.getDetails(row.uid);
+			},
+			// 商品分类;
+			goodsCategory() {
+				treeListApi(0).then(res => {
+					this.treeSelect = res.data;
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				})
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				this.artFrom.is_show = this.artFrom.is_show || '';
+				getGodownList(this.artFrom).then(async res => {
+					let data = res.data
+					this.tableData = data.data;
+					this.total = data.count;
+					this.loading = false;
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				})
+			},
+			loadChildrenMethod({
+				row
+			}) {
+				return new Promise((resolve, reject) => {
+					productListApi({
+						pid: row.id
+					}).then(res => {
+						let arr = res.data.list;
+						resolve(arr);
+					})
+				})
+			},
+			pageChange(index) {
+				this.artFrom.page = index;
+				this.getList();
+			},
+			// 添加
+			addClass() {
+				this.$router.push({ path: this.roterPre + "/erp/add_godown/" + 0 });
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({ path: this.roterPre + "/erp/add_godown/" + row.id });
+			},
+			findSupId(data, supplierId, res) {
+				var fun = function(i, n) {
+					if (i && i.length > 0) {
+						for (let v in i) {
+							if (i[v].id == n) {
+								i[v].cate_name = res.data.cate_name
+								i[v].is_show = res.data.is_show
+								i[v].sort = res.data.sort
+								i[v].pic = res.data.pic
+								return
+							} else {
+								if (i[v].children && i[v].children.length > 0) {
+									fun(i[v].children, n)
+								}
+							}
+						}
+					}
+				}
+				fun(data, supplierId);
+			},
+
+			// 修改状态
+			onchangeIsShow(row) {
+				// let data = {
+				// 	id: row.id,
+				// 	is_show: row.is_show
+				// }
+				createGodown(row.id,row).then(async res => {
+					this.$Message.success(res.msg);
+					// this.artFrom.pid = 0;
+					this.getList()
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				})
+			},
+			// 下拉树
+			handleCheckChange(data) {
+				let value = ''
+				let title = ''
+				this.list = []
+				this.artFrom.pid = 0;
+				data.forEach((item, index) => {
+					value += `${item.id},`
+					title += `${item.title},`
+				});
+				value = value.substring(0, value.length - 1)
+				title = title.substring(0, title.length - 1)
+				this.list.push({
+					value,
+					title
+				});
+				this.artFrom.pid = value;
+				this.getList();
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `product/category/${row.id}`,
+					method: 'DELETE',
+					ids: ''
+				};
+				this.$modalSure(delfromData).then((res) => {
+					this.$Message.success(res.msg);
+					this.artFrom.pid = 0;
+					this.getList();
+					this.goodsCategory();
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				});
+			},
+			// 表格搜索
+			userSearchs() {
+				// this.artFrom.pid = 0;
+				this.artFrom.page = 1;
+				this.getList();
+			}
+		}
+	}
+</script>
+<style scoped lang="stylus">
+	.treeSel>>>.ivu-select-dropdown-list {
+		padding 0 10px !important box-sizing border-box
+	}
+	.tabBox_img {
+		width 36px height 36px border-radius:4px cursor pointer img {
+			width 100% height 100%
+		}
+	}
+	/deep/.ivu-input {
+		font-size 14px !important
+	}
+</style>

+ 331 - 0
src/pages/erp/godown/position.vue

@@ -0,0 +1,331 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓位搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">添加仓位</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="passageway">
+					<span> {{ row.bin_number.slice(0,2) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="control">
+					<span> {{ row.bin_number.slice(2,3) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="layer">
+					<span> {{ row.bin_number.slice(3,4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="number">
+					<span> {{ row.bin_number.slice(4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<div>地址:{{row.ware.detailed_address}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="del(row, '删除仓位', index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "godownList",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "仓位名称",
+						key: "title",
+						minWidth: 90,
+					},
+					{
+						title: "通道",
+						slot: "passageway",
+						minWidth: 90,
+					},
+					{
+						title: "左右",
+						slot: "control",
+						minWidth: 90,
+					},
+					{
+						title: "层数",
+						slot: "layer",
+						minWidth: 90,
+					},
+					{
+						title: "仓位编号",
+						slot: "number",
+						minWidth: 90,
+					},
+					{
+						title: "编号",
+						key: "bin_number",
+						minWidth: 90,
+					},
+					{
+						title: "仓库信息",
+						slot: "ware",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		methods: {
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getPositionList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 367 - 0
src/pages/erp/in/index.vue

@@ -0,0 +1,367 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<!-- tab切换栏 -->
+		
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓位搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">创建入库单</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="passageway">
+					<span> {{ row.bin_number.slice(0,2) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="control">
+					<span> {{ row.bin_number.slice(2,3) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="layer">
+					<span> {{ row.bin_number.slice(3,4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="number">
+					<span> {{ row.bin_number.slice(4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="cuser">
+					<div>名称:{{row.cuser.staff_name}}</div>
+					<!-- <div>管理员ID:{{row.cuser.admin_id}}</div> -->
+					<div>ID:{{row.cuser.id}}</div>
+					<div>手机:{{row.cuser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="cadmin">
+					<div>名称:{{row.cadmin.account}}</div>
+					<div>ID:{{row.cadmin.id}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<!-- <div>地址:{{row.ware.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="tware">
+					<div>名称:{{row.tware.title}}</div>
+					<div>ID:{{row.tware.id}}</div>
+					<div>手机:{{row.tware.phone}}</div>
+					<!-- <div>地址:{{row.tware.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="store">
+					<div>名称:{{row.store.name}}</div>
+					<div>ID:{{row.store.id}}</div>
+					<div>手机:{{row.store.phone}}</div>
+					<!-- <div>地址:{{row.store.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="tstore">
+					<div>名称:{{row.tstore.name}}</div>
+					<div>ID:{{row.tstore.id}}</div>
+					<div>手机:{{row.tstore.phone}}</div>
+					<!-- <div>地址:{{row.tstore.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="create_time">
+					<div>{{row.create_time|formatDate}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="del(row, '删除仓位', index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo,
+		getInList,
+		getOutSimpleList
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "inList",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd hh:mm");
+				}
+			},
+		},
+		data() {
+			return {
+				currentTab: 0,
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "入库单号",
+						key: "in_order_id",
+						minWidth: 200,
+					},
+					{
+						title: "创建人",
+						slot: "cuser",
+						minWidth: 200,
+					},
+					{
+						title: "仓库",
+						slot: "ware",
+						minWidth: 100,
+					},
+					{
+						title: "总数量",
+						key: "total_num",
+						minWidth: 90,
+					},
+					{
+						title: "总价格",
+						key: "total_price",
+						minWidth: 90,
+					},
+					{
+						title: "创建时间",
+						slot: "create_time",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					type: 0,
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		methods: {
+			onClickTab(e) {
+				console.log(e);
+				this.current = e
+				this.tableList = []
+				this.getList()
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				getInList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 332 - 0
src/pages/erp/out/goods.vue

@@ -0,0 +1,332 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓位搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">添加仓位</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="passageway">
+					<span> {{ row.bin_number.slice(0,2) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="control">
+					<span> {{ row.bin_number.slice(2,3) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="layer">
+					<span> {{ row.bin_number.slice(3,4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="number">
+					<span> {{ row.bin_number.slice(4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<div>地址:{{row.ware.detailed_address}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="del(row, '删除仓位', index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo,
+		getOutGoods
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "outGoods",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "仓位名称",
+						key: "title",
+						minWidth: 90,
+					},
+					{
+						title: "通道",
+						slot: "passageway",
+						minWidth: 90,
+					},
+					{
+						title: "左右",
+						slot: "control",
+						minWidth: 90,
+					},
+					{
+						title: "层数",
+						slot: "layer",
+						minWidth: 90,
+					},
+					{
+						title: "仓位编号",
+						slot: "number",
+						minWidth: 90,
+					},
+					{
+						title: "编号",
+						key: "bin_number",
+						minWidth: 90,
+					},
+					{
+						title: "仓库信息",
+						slot: "ware",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		methods: {
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getOutGoods(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 400 - 0
src/pages/erp/out/index.vue

@@ -0,0 +1,400 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<!-- tab切换栏 -->
+		
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓位搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<div class="new_tab">
+			  <Tabs v-model="currentTab" @on-click="onClickTab">
+			    <TabPane label="门店订单" name="0" />
+			    <TabPane label="库间流转" name="1" />
+				<TabPane label="商品在途" name="2" />
+			  </Tabs>
+			</div>
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">创建出库单</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="passageway">
+					<span> {{ row.bin_number.slice(0,2) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="control">
+					<span> {{ row.bin_number.slice(2,3) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="layer">
+					<span> {{ row.bin_number.slice(3,4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="number">
+					<span> {{ row.bin_number.slice(4) }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="cuser">
+					<div>名称:{{row.cuser.staff_name}}</div>
+					<!-- <div>管理员ID:{{row.cuser.admin_id}}</div> -->
+					<div>ID:{{row.cuser.id}}</div>
+					<div>手机:{{row.cuser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="cadmin">
+					<div>名称:{{row.cadmin.account}}</div>
+					<div>ID:{{row.cadmin.id}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<!-- <div>地址:{{row.ware.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="tware">
+					<div>名称:{{row.tware.title}}</div>
+					<div>ID:{{row.tware.id}}</div>
+					<div>手机:{{row.tware.phone}}</div>
+					<!-- <div>地址:{{row.tware.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="store">
+					<div>名称:{{row.store.name}}</div>
+					<div>ID:{{row.store.id}}</div>
+					<div>手机:{{row.store.phone}}</div>
+					<!-- <div>地址:{{row.store.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="tstore">
+					<div>名称:{{row.tstore.name}}</div>
+					<div>ID:{{row.tstore.id}}</div>
+					<div>手机:{{row.tstore.phone}}</div>
+					<!-- <div>地址:{{row.tstore.detailed_address}}</div> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="create_time">
+					<div>{{row.create_time|formatDate}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="del(row, '删除仓位', index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo,
+		getOutList,
+		getOutSimpleList
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "outList",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd hh:mm");
+				}
+			},
+		},
+		data() {
+			return {
+				currentTab: 0,
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "出库单号",
+						key: "out_order_id",
+						minWidth: 200,
+					},
+					{
+						title: "创建人",
+						slot: "cuser",
+						minWidth: 200,
+					},
+					{
+						title: "系统创建人",
+						slot: "cadmin",
+						minWidth: 100,
+					},
+					{
+						title: "出货仓库",
+						slot: "ware",
+						minWidth: 100,
+					},
+					{
+						title: "接收仓库",
+						slot: "tware",
+						minWidth: 100,
+					},
+					{
+						title: "出货门店",
+						slot: "store",
+						minWidth: 100,
+					},
+					{
+						title: "接收门店",
+						slot: "tstore",
+						minWidth: 100,
+					},
+					{
+						title: "总数量",
+						key: "total_num",
+						minWidth: 90,
+					},
+					{
+						title: "总价格",
+						key: "total_price",
+						minWidth: 90,
+					},
+					{
+						title: "创建时间",
+						slot: "create_time",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					type: 0,
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		methods: {
+			onClickTab(e) {
+				console.log(e);
+				this.current = e
+				this.tableList = []
+				this.getList()
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				let getList = getOutList;
+				this.tableFrom.type = this.current
+				if(this.current == 1 || this.current == 2) {
+					getList = getOutSimpleList
+					
+				}
+				getList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 479 - 0
src/pages/erp/purchase/index.vue

@@ -0,0 +1,479 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓库:" prop="pid" label-for="pid">
+						<Select v-model="tableFrom.wid" @on-change="userSearchss" clearable class="input-add">
+							<Option v-for="item in data1" :value="item.id" :key="item.id">
+								{{ item.title }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="审核人:" v-if="tableFrom.wid">
+						<Select v-model="tableFrom.auth_uid" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in authList" :value="item.id" :key="item.id">{{ item.staff_name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="供应商:" prop="pid" label-for="pid">
+						<Select v-model="tableFrom.supplier_id" @on-change="userSearchs" clearable class="input-add">
+							<Option v-for="item in supplierList" :value="item.id" :key="item.id">
+								{{ item.supplier_name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="门店:">
+						<Select v-model="tableFrom.store_id" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="状态:" label-for="status">
+						<Select v-model="tableFrom.status" placeholder="请选择" clearable @on-change="userSearchs"
+							class="input-add">
+							<Option value="-3">全部</Option>
+							<Option value="0">待审核</Option>
+							<Option value="1">通过</Option>
+							<Option value="2">部分完成</Option>
+							<Option value="3">完成</Option>
+							<Option value="-1">拒绝</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="关键字搜索:" label-for="key">
+						<Input class="input-add mr14" placeholder="请输入要货单或采购单" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-add_position']" type="primary" @click="add" class="mr10">添加采购单</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="auser">
+					<!-- <span v-if="row.auth_time"> {{ row.auth_time | formatDate }}</span> -->
+					<div>名称:{{row.auser.staff_name}}</div>
+					<div>管理员ID:{{row.auser.admin_id}}</div>
+					<div>ID:{{row.auser.id}}</div>
+					<div>手机:{{row.auser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="supplier">
+					<!-- <span v-if="row.auth_time"> {{ row.auth_time | formatDate }}</span> -->
+					<div>名称:{{row.supplier.supplier_name}}</div>
+					<div>ID:{{row.supplier.id}}</div>
+					<div>手机:{{row.supplier.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="store">
+					<!-- <span v-if="row.auth_time"> {{ row.auth_time | formatDate }}</span> -->
+					<div>名称:{{row.store.name}}</div>
+					<div>ID:{{row.store.id}}</div>
+					<div>手机:{{row.store.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="cuser">
+					<!-- <span v-if="row.auth_time"> {{ row.auth_time | formatDate }}</span> -->
+					<div>名称:{{row.cuser.staff_name}}</div>
+					<div>管理员ID:{{row.cuser.admin_id}}</div>
+					<div>ID:{{row.cuser.id}}</div>
+					<div>手机:{{row.cuser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<div>地址:{{row.ware.detailed_address}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Tag color="default" v-if="row.status == 0">待审核</Tag>
+					<Tag color="primary" v-if="row.status == 1">通过</Tag>
+					<Tag color="success" v-if="row.status == 3">完成</Tag>
+					<Tag color="error" v-if="row.status == -1">拒绝</Tag>
+					<Tag color="warning" v-if="row.status == 2">部分完成</Tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">编辑</a>
+					<Divider type="vertical" />
+					<a @click="del(row, '删除仓位', index)">删除</a>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo,
+		getPurchaselist,
+		getGodownList,
+		getUserList
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	import {
+		getSupplierList
+	} from "@/api/supplier";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	export default {
+		name: "purchaseList",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				data1:[],
+				staffData: [],
+				supplierList: [],
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+
+					{
+						title: "采购单号",
+						key: "purchase_order_id",
+						minWidth: 200,
+					},
+					{
+						title: "要货单号",
+						key: "want_order_id",
+						minWidth: 200,
+					},
+					{
+						title: "仓库信息",
+						slot: "ware",
+						minWidth: 200,
+					},
+					{
+						title: "供应商",
+						slot: "supplier",
+						minWidth: 200,
+					},
+					{
+						title: "门店",
+						slot: "store",
+						minWidth: 200,
+					},
+					{
+						title: "订单数量",
+						key: "order_num",
+						minWidth: 90,
+					},
+					{
+						title: "订单金额",
+						key: "order_price",
+						minWidth: 90,
+					},
+					{
+						title: "运费",
+						key: "freight",
+						minWidth: 90,
+					},
+					{
+						title: "审核人消息",
+						slot: "auser",
+						minWidth: 200,
+					},
+					{
+						title: "创建人消息",
+						slot: "auser",
+						minWidth: 200,
+					},
+					{
+						title: "审核状态",
+						slot: "status",
+						minWidth: 200,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					supplier_id: "",
+					status: '-3',
+					auth_uid: "",
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+
+		},
+		mounted() {
+			this.getSupplierList()
+			this.staffList()
+			this.getGodownList()
+		},
+		methods: {
+			getUserList() {
+				getUserList({
+					wid: this.tableFrom.wid
+				}).then(res => {
+					// console.log(res);
+					this.authList = res.data.data
+				})
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+				})
+			},
+			userSearchs(e) {
+				console.log('zhix');
+				this.tableFrom.page = 1;
+				
+				this.getList();
+			},
+			userSearchss(e) {
+				this.tableFrom.auth_uid = ""
+				this.authList = []
+				this.getUserList()
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			//获取供应商列表;
+			getSupplierList() {
+				getSupplierList()
+					.then(async (res) => {
+						this.supplierList = res.data;
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/add_position?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `/erp/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getPurchaselist(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 502 - 0
src/pages/erp/receive/index.vue

@@ -0,0 +1,502 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓库:" prop="pid" label-for="pid">
+						<Select v-model="tableFrom.wid" @on-change="userSearchs" clearable class="input-add">
+							<Option v-for="item in data1" :value="item.id" :key="item.id">
+								{{ item.title }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="门店:">
+						<Select v-model="tableFrom.store_id" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="创建人:">
+						<Select v-model="tableFrom.create_uid" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in authList" :value="item.id" :key="item.id">{{ item.staff_name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<!-- <FormItem label="用户搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入用户昵称/手机号" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem> -->
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['marketing-store_seckill-create']" type="primary" @click="add" class="mr10">添加要货</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="image">
+					<viewer>
+						<div class="tabBox_img">
+							<img v-lazy="row.avatar" />
+						</div>
+					</viewer>
+				</template>
+				<template slot-scope="{ row, index }" slot="create_time">
+					<span> {{ row.create_time | formatDate }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="auth_time">
+					<span v-if="row.auth_time"> {{ row.auth_time | formatDate }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="pm">
+					<div>{{row.pm == 1?'入':'出'}}库</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="auser">
+					<div>名称:{{row.auser.staff_name}}</div>
+					<div>管理员ID:{{row.auser.admin_id}}</div>
+					<div>ID:{{row.auser.id}}</div>
+					<div>手机:{{row.auser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="cuser">
+					<div>名称:{{row.cuser.staff_name}}</div>
+					<div>管理员ID:{{row.cuser.admin_id}}</div>
+					<div>ID:{{row.cuser.id}}</div>
+					<div>手机:{{row.cuser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<div>地址:{{row.ware.detailed_address}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="info">
+					<!-- {{row.info}} -->
+					<div v-for="item in row.info" class="info">
+						<div>
+							商品名称:{{item.product_name}}
+						</div>
+						<div>
+							商品ID:{{item.product_id}}
+						</div>
+						<!-- <div>
+							数量:{{item.want_product_num*1}}{{' '}}{{item.unit_name}}
+						</div> -->
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="store">
+					<viewer style="display: flex;">
+						<div class="tabBox_img">
+							<img v-lazy="row.store.image" />
+						</div>
+						<div>门店:{{row.store.name}}<br>ID:{{row.store.id}}</div>
+					</viewer>
+
+				</template>
+				<template slot-scope="{ row, index }" slot="is_system">
+					<span> {{ row.is_system ? '是': '否'}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="is_show">
+					<i-switch v-model="row.is_show" :value="row.is_show" :true-value="1" :false-value="0"
+						@on-change="onchangeIsShow(row)" size="large">
+						<span slot="open">上架</span>
+						<span slot="close">下架</span>
+					</i-switch>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Tag color="default" v-if="row.status == 0">待审核</Tag>
+					<Tag color="primary" v-if="row.status == 1">已审核</Tag>
+					<Tag color="success" v-if="row.status == 2">完成</Tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">详情</a>
+					<!-- <Divider type="vertical" />
+					<a @click="del(row, '删除积分商品', index)">删除</a> -->
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getWantList,
+		getUserInfo,
+		getGodownList,
+		getUserList,
+		getReceiveList
+	} from "@/api/erp";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "receive",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd hh:mm:ss");
+				}
+			},
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "订单编号",
+						key: "order_id",
+						minWidth: 150,
+					},
+					{
+						title: "出入库",
+						slot: "pm",
+						minWidth: 150,
+					},
+					{
+						title: "出库单号",
+						key: "out_order_id",
+						minWidth: 150,
+					},
+					{
+						title: '商品信息',
+						slot: 'info',
+						minWidth: 300,
+					},
+					// {
+					// 	title: "门店信息",
+					// 	slot: "store",
+					// 	minWidth: 200,
+					// },
+					{
+						title: "创建人",
+						slot: "cuser",
+						minWidth: 200,
+					},
+					{
+						title: "总数量",
+						key: "total_num",
+						minWidth: 90,
+					},
+					{
+						title:"运费",
+						key:"freight",
+						minWidth: 90,
+					},
+					{
+						title: "总价格",
+						key: "total_price",
+						minWidth: 90,
+					},
+					// {
+					// 	title: "仓库信息",
+					// 	slot: "ware",
+					// 	minWidth: 200,
+					// },
+					{
+						title: "审核人",
+						slot: "auser",
+						minWidth: 200,
+					},
+					{
+						title: '审核时间',
+						slot: 'auth_time',
+						minWidth: 80,
+					},
+					{
+						title: "状态",
+						slot: "status",
+						minWidth: 100,
+					},
+					{
+						title: "创建时间",
+						slot: "create_time",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					// key: '',
+					create_uid:"",
+					store_id:"",
+					wid:"",
+					page: 1,
+					limit: 15,
+					type: 1
+				},
+				total: 0,
+				staffData:[],
+				data1:[],
+				authList:[]
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		mounted() {
+			this.getGodownList()
+			this.staffList()
+			this.getUserList()
+		},
+		methods: {
+			getUserList() {
+				getUserList().then(res => {
+					// console.log(res);
+					this.authList = res.data.data
+				})
+			},
+			userSearchs(e) {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+				})
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				try {
+					getUserInfo(row.id).then(res => {
+						console.log(res)
+					})
+				} catch (e) {
+					//TODO handle the exception
+					console.log('zhje', e);
+				}
+
+				// this.$router.push({
+				// 	path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/0",
+				// });
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/integral/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getReceiveList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.info {
+		padding-top: 10px;
+		border-bottom: 1px dashed #515a6e;
+
+		&:last-of-type {
+			border: none;
+		}
+	}
+</style>

+ 362 - 0
src/pages/erp/user/index.vue

@@ -0,0 +1,362 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="用户搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入用户昵称/手机号" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem>
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['marketing-store_seckill-create']" type="primary" @click="add" class="mr10">添加用户</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="image">
+					<viewer>
+						<div class="tabBox_img">
+							<img v-lazy="row.avatar" />
+						</div>
+					</viewer>
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<span> {{ row.add_time | formatDate }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="is_system">
+					<span> {{ row.is_system ? '是': '否'}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="is_show">
+					<i-switch v-model="row.is_show" :value="row.is_show" :true-value="1" :false-value="0"
+						@on-change="onchangeIsShow(row)" size="large">
+						<span slot="open">上架</span>
+						<span slot="close">下架</span>
+					</i-switch>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="edit(row)">详情</a>
+					<!-- <Divider type="vertical" />
+					<a @click="del(row, '删除积分商品', index)">删除</a> -->
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getUserList,
+		getUserInfo
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "storeIntegral",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "账号",
+						key: "account",
+						minWidth: 90,
+					},
+					{
+						title: "用户头像",
+						slot: "image",
+						minWidth: 90,
+					},
+					{
+						title: "ERP用户名称",
+						key: "staff_name",
+						minWidth: 90,
+					},
+					{
+						title: "手机号",
+						key: "phone",
+						minWidth: 90,
+					},
+					{
+						title: "级别",
+						key: "level",
+						minWidth: 80,
+					},
+					{
+						title: "管理员id",
+						key: "admin_id",
+						minWidth: 80,
+					},
+					{
+						title: "是否系统用户",
+						slot: "is_system",
+						minWidth: 80,
+					},
+					{
+						title: '仓库id',
+						key: 'wid',
+						minWidth: 80,
+					},
+					{
+						title: '客户id',
+						key: 'staff_id',
+						minWidth: 80,
+					},
+					{
+						title: "创建时间",
+						slot: "add_time",
+						minWidth: 130,
+					},
+					{
+						title: "状态",
+						key: "status",
+						minWidth: 100,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					key: '',
+					page: 1,
+					limit: 15,
+				},
+				total: 0,
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		methods: {
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				try{
+					getUserInfo(row.id).then(res=> {
+						console.log(res)
+					})
+				}catch(e){
+					//TODO handle the exception
+					console.log('zhje',e);
+				}
+				
+				// this.$router.push({
+				// 	path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/0",
+				// });
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/integral/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getUserList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 595 - 0
src/pages/erp/want/addWant.vue

@@ -0,0 +1,595 @@
+<template>
+	<div class="form-submit">
+		<div class="i-layout-page-header">
+			<PageHeader class="product_tabs" hidden-breadcrumb>
+				<div slot="title">
+					<router-link :to="{ path: `${roterPre}/erp/goods` }">
+						<!-- <Button icon="ios-arrow-back" size="small" class="mr20"
+              >返回</Button
+            > -->
+						<div class="font-sm after-line">
+							<span class="iconfont iconfanhui"></span>
+							<span class="pl10">返回</span>
+						</div>
+					</router-link>
+					<span v-text="
+              $route.params.id !== '0' ? '编辑要货单' : '添加要货单'
+            " class="mr20 ml16"></span>
+				</div>
+			</PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form class="formValidate mt20" ref="formValidate" :rules="ruleValidate" :model="formValidate"
+				:label-width="labelWidth" :label-position="labelPosition" @submit.native.prevent>
+				<Row :gutter="24" type="flex">
+					<Col span="24">
+					<FormItem label="要货途径:" prop="control">
+						<RadioGroup v-model="formValidate.type">
+							<Radio :label="0" :disabled="formValidate.id != 0">
+								<Icon type="social-apple"></Icon>
+								<span>仓库要货</span>
+							</Radio>
+							<Radio :label="1" :disabled="formValidate.id != 0">
+								<Icon type="social-android"></Icon>
+								<span>门店</span>
+							</Radio>
+						</RadioGroup>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="出货门店:" prop="store_id" v-if="formValidate.type == 1">
+						<el-cascader placeholder="请选择出货门店" class="input-add" size="mini" v-model="formValidate.store_id"
+							:options="staffData" :props="propss" @change="userSearchs" filterable clearable
+							v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="出货仓库:" prop="wid" v-if="formValidate.type == 0">
+						<el-cascader placeholder="请选择仓库" class="input-add" size="mini" v-model="formValidate.wid"
+							:options="data1" :props="props" @change="userSearchss" filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="到货门店:" prop="my_store_id">
+						<el-cascader placeholder="请选择到货门店" class="input-add" size="mini"
+							v-model="formValidate.my_store_id" :options="staffData" :props="propss"
+							@change="userSearchs" filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="创建人:" prop="create_uid" v-if="formValidate.wid != 0">
+						<el-cascader placeholder="请选择创建人" class="input-add" size="mini"
+							v-model="formValidate.create_uid" :options="authList" :props="propsss" @change="userSearchs"
+							filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="商品:" prop="goods">
+						<Table :columns="columns" :data="chooseGoods" ref="table" :loading="loading"
+							no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+							<!-- <template slot-scope="{ row }" slot="coupon_price">
+								<span v-if="row.coupon_type==1">{{row.coupon_price}}元</span>
+								<span
+									v-if="row.coupon_type==2">{{parseFloat(row.coupon_price)/10}}折({{row.coupon_price.toString().split(".")[0]}}%)</span>
+							</template> -->
+							<!-- want_product_num -->
+							<!-- //chooseUnit -->
+							<template slot-scope="{ row,index }" slot="want_product_num">
+								<Input v-model="chooseGoods[index].want_product_num" placeholder="请输入要货数量" v-width="'150'" type="number"/>
+							</template>
+							<template slot-scope="{ row,index }" slot="unit_type" v-if="formValidate.id == 0">
+								<Select v-model="chooseGoods[index].unit_type" style="width:200px" >
+									<Option v-for="item in row.unitList" :value="item.value" :key="item.value">
+										{{ item.label }}</Option>
+								</Select>
+							</template>
+							<template slot-scope="{ row,index }" slot="unit_type" v-if="formValidate.id != 0">
+								{{row.unit_name}}
+							</template>
+							<template slot-scope="{ row,index }" slot="store_num">
+								<span> {{ row.my.stock }}{{row.my.unit_name}}</span>
+							</template>
+							<template slot-scope="{ row, index }" slot="action">
+								<a @click="del(index)">删除</a>
+							</template>
+							<!-- <template slot-scope="{ row }" slot="product">
+								<div class="product">
+									<div class="image" v-viewer>
+										<img v-lazy="row.image">
+									</div>
+									<div class="title">{{ row.store_name }}</div>
+								</div>
+							</template> -->
+						</Table>
+						<Button type="primary" class="submission" style="margin-top:20px;" @click="getGoods()" v-if="formValidate.id == 0">选择商品</Button>
+					</FormItem>
+					</Col>
+				</Row>
+			</Form>
+		</Card>
+		<Card :bordered="false" dis-hover class="fixed-card"
+			:style="{ left: `${!menuCollapse ? '200px' : isMobile ? '0' : '80px'}` }">
+			<Form>
+				<FormItem>
+					<Button type="primary" class="submission" @click="handleSubmit('formValidate')">保存</Button>
+				</FormItem>
+			</Form>
+		</Card>
+		<good-detail ref="goodDetail" @setGoods="setGoods"></good-detail>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from "vuex";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		getGodownList,
+		createGodown,
+		getGodownInfo,
+		getUserList,
+		getOutGoods,
+		createWant,
+		getWantInfo
+	} from "@/api/erp";
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList
+	} from '@/api/store';
+	import {
+		productSpecs,
+		productSpecsInfo
+	} from "@/api/product";
+	import Setting from "@/setting";
+	import goodDetail from './goodDetail.vue'
+	export default {
+		name: "specsAdd",
+		components: {
+			goodDetail
+		},
+		data() {
+			return {
+				loading: false,
+				authList: [],
+				columns: [{
+						title: '商品名称',
+						key: 'product_name',
+						minWidth: 160
+					},
+					{
+						title: '要货数量',
+						slot: 'want_product_num',
+						minWidth: 90
+					},
+					{
+						title: '要货单位',
+						slot: 'unit_type',
+						minWidth: 150
+					},
+					// {
+					// 	title: '门店库存',
+					// 	slot: 'store_num',
+					// 	minWidth: 120
+					// },
+					{
+						title: '操作',
+						slot: 'action',
+						minWidth: 120
+					},
+					
+				],
+				chooseGoods: [],
+				staffData: [],
+				addresData: [],
+				props: {
+					emitPath: false,
+					multiple: false,
+					checkStrictly: true,
+					value: "id",
+					label: "title"
+				},
+				propss: {
+					emitPath: false,
+					multiple: false,
+					checkStrictly: true,
+					value: "id",
+					label: "name"
+				},
+				propsss: {
+					emitPath: false,
+					multiple: false,
+					checkStrictly: true,
+					value: "id",
+					label: "staff_name"
+				},
+				roterPre: Setting.roterPre,
+				data1: [],
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				formValidate: {
+					type: 0,
+					id: 0,
+					wid: 0,
+					store_id: 0,
+					goods: [],
+					my_store_id: 0,
+					create_uid: 0,
+				},
+				ruleValidate: {
+					store_id: [{
+						type: "number",
+						required: true,
+						message: "请选择门店",
+						trigger: "blur"
+					}, ],
+					my_store_id: [{
+						type: "number",
+						required: true,
+						message: "请选择门店",
+						trigger: "blur"
+					}, ],
+					wid: [{
+						type: "number",
+						required: true,
+						message: "请选择仓库",
+						trigger: "blur"
+					}, ],
+					create_uid: [{
+						type: "number",
+						required: true,
+						message: "请选择创建人",
+						trigger: "blur"
+					}, ],
+					// goods: [{
+					// 	type: "array",
+					// 	required: true,
+					// 	message: "请选择商品",
+					// 	trigger: "change"
+					// }, ],
+				},
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile", "menuCollapse"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 120;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getGodownList()
+			let data = {
+				pid: 0
+			}
+			// this.cityInfo(data);
+		},
+		mounted() {
+			// this.setCopyrightShow({
+			// 	value: false
+			// });
+			this.staffList()
+			if (this.$route.query.id != 0) {
+				this.getWantInfo(this.$route.query.id)
+			}
+		},
+		destroyed() {
+			// this.setCopyrightShow({
+			// 	value: true
+			// });
+		},
+		methods: {
+			...mapMutations("admin/layout", ["setCopyrightShow"]),
+			getWantInfo(id) {
+				getWantInfo(id).then(res => {
+					console.log(res,'ddddd');
+					let data = res.data
+					this.formValidate.id = data.id
+					this.formValidate.create_uid = data.create_uid
+					this.chooseGoods = data.info
+					this.formValidate.store_id = data.store_id
+					console.log(this.formValidate.goods,'this.formValidate.goods');
+					if(data.wid) {
+						this.formValidate.type = 0
+						this.formValidate.wid = data.wid
+						this.getUserList()
+					}
+				})
+			},
+			setGoods(e) {
+				console.log(e, 'ddd');
+				try {
+					let arr = e.map(item => {
+						item.unitList = [{
+							value: 0,
+							label: item.info.unit_name
+						}]
+						if (item.info.unit_name_1) {
+							item.unitList.push({
+								value: 1,
+								label: item.info.unit_name_1
+							})
+						}
+						if (item.info.unit_name_2) {
+							item.unitList.push({
+								value: 2,
+								label: item.info.unit_name_1
+							})
+						}
+						item.want_product_num = 0
+						return item
+					})
+					this.chooseGoods = this.chooseGoods.concat(arr)
+				} catch (e) {
+					//TODO handle the exception
+					console.log('err', e);
+				}
+
+
+				console.log(this.chooseGoods, 'this.chooseGoods');
+			},
+			getGoods() {
+				console.log(this.chooseGoods, 'this.chooseGoods555');
+				if ((this.formValidate.wid || this.formValidate.store_id) && this.formValidate.my_store_id) {
+					this.$refs.goodDetail.clearChoose()
+					this.$refs.goodDetail.modals = true;
+					this.$refs.goodDetail.formValidate.type = this.formValidate.type
+					this.$refs.goodDetail.formValidate.wid = this.formValidate.wid
+					this.$refs.goodDetail.formValidate.my_store_id = this.formValidate.my_store_id
+					this.$refs.goodDetail.formValidate.store_id = this.formValidate.store_id
+				} else {
+					console.log('this.formValidate.my_store_id', this.formValidate.my_store_id);
+					try {
+						if (this.formValidate.wid == 0 && this.formValidate.type == 0) {
+							return this.$Message.error('请选择要货仓库');
+						}
+						if (this.formValidate.store_id == 0 && this.formValidate.type == 1) {
+							return this.$Message.error('请选择要货门店');
+						}
+						if (!this.formValidate.my_store_id) {
+							console.log('ddd');
+							return this.$Message.error('请选择到货门店');
+						}
+					} catch (e) {
+						console.log(e);
+						//TODO handle the exception
+					}
+
+				}
+
+				// this.$refs.goodDetail.getList();
+			},
+			getUserList() {
+				getUserList({
+					wid: this.formValidate.wid
+				}).then(res => {
+					// console.log(res);
+					this.authList = res.data.data
+					// .map(item => {
+					// 		item.id += ''
+					// 		return item
+					// 	});
+				})
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data
+						// .map(item => {
+						// 	item.id += ''
+						// 	return item
+						// });
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			getGodownInfo(id) {
+				getGodownInfo(id).then(res => {
+					this.formValidate = res.data
+					this.formValidate.addressSelect = this.formValidate.addressSelect.map(item => item * 1)
+					console.log(this.formValidate.addressSelect);
+				})
+			},
+			addchack(e, selectedData) {
+				console.log(selectedData, 'selectedData');
+				e.forEach((i, index) => {
+					if (index == 0) {
+						this.formValidate.province = i
+					} else if (index == 1) {
+						this.formValidate.city = i
+					} else if (index == 2) {
+						this.formValidate.area = i
+					} else {
+						this.formValidate.street = i
+					}
+				})
+				this.formValidate.address = (selectedData.map(o => o.label)).join('/')
+				// console.log('this.formValidate.addressSelect',this.formValidate.addressSelect);
+
+			},
+			cityInfo(data) {
+				cityApi(data).then(res => {
+					this.addresData = res.data
+				})
+			},
+			loadData(item, callback) {
+				item.loading = true;
+				cityApi({
+					pid: item.value
+				}).then(res => {
+					item.children = res.data;
+					item.loading = false;
+					callback();
+				});
+
+
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+					// .map(item => {
+					// 		item.id += ''
+					// 		return item
+					// 	});
+				})
+			},
+			del(index) {
+				this.chooseGoods.splice(index, 1);
+			},
+			userSearchs(e) {
+
+			},
+			userSearchss(e) {
+				this.formValidate.create_uid = "";
+				this.authList = []
+				this.goods = []
+				this.getUserList()
+			},
+			handleSubmit(name) {
+				if(this.formValidate.id == 0) {
+					let arr = []
+					let arr1 = JSON.parse(JSON.stringify(this.chooseGoods))
+					let uniqueArray = arr1.filter(function(item, index, self) {
+					  return !self.slice(index + 1).some(function(otherItem) {
+					    return item.product_id === otherItem.product_id && item.unit_type === otherItem.unit_type;
+					  });
+					});
+					arr = uniqueArray.map(item => {
+						let want = 0;
+						for (let i = 0; i < arr1.length; i++) {
+							if(item.product_id === arr1[i].product_id && item.unit_type === arr1[i].unit_type) {
+								console.log(arr1[i].want_product_num*1,i,'i');
+								want += arr1[i].want_product_num*1
+							}
+						}
+						item.want_product_num = want
+						return item
+					})
+					this.formValidate.goods = arr.map(item => {
+						item.unit_name = item.info['unit_name' + (item.unit_type == 0 ? '':(item.unit_type == 1?"_1":"_2"))]
+						return item
+					})
+				}else {
+					this.formValidate.goods = this.chooseGoods
+				}
+				
+				
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.formValidate.id = this.$route.query.id;
+						
+						createWant(this.formValidate.id,{
+							wid: this.formValidate.wid,
+							store_id: this.formValidate.store_id,
+							my_store_id: this.formValidate.my_store_id,
+							goods: this.formValidate.goods,
+							create_uid: this.formValidate.create_uid
+						}).then(res => {
+							this.$Message.success(res.msg);
+							this.$router.push({
+								path: this.roterPre + "/erp/goods"
+							});
+						}).catch(err => {
+							this.$Message.error(err.msg);
+						})
+					} else {
+						// this.$Message.error("请输入参数模板名称");
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.table {
+		/deep/.ivu-table-header table {
+			border: 0 !important;
+		}
+
+		/deep/.ivu-table-header thead tr th:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table td:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table-cell {
+			padding: 0 !important;
+		}
+
+		/deep/.ivu-table-border th,
+		/deep/.ivu-table-border td {
+			border-right: unset;
+		}
+
+		/deep/.ivu-table td {
+			height: 59px;
+		}
+	}
+
+	.form-submit {
+		/deep/.ivu-card {
+			border-radius: 0;
+		}
+
+		margin-bottom: 79px;
+
+		.fixed-card {
+			position: fixed;
+			right: 0;
+			bottom: 0;
+			left: 200px;
+			z-index: 99;
+			box-shadow: 0 -1px 2px rgb(240, 240, 240);
+
+			/deep/ .ivu-card-body {
+				padding: 15px 16px 14px;
+			}
+
+			.ivu-form-item {
+				margin-bottom: 0;
+			}
+
+			/deep/ .ivu-form-item-content {
+				margin-right: 124px;
+				text-align: center;
+			}
+
+			.ivu-btn {
+				height: 36px;
+				padding: 0 20px;
+			}
+		}
+	}
+
+	.after-line {
+		display: inline-block;
+		position: relative;
+		margin-right: 16px;
+	}
+
+	.ml16 {
+		margin-left: 16px;
+	}
+</style>

+ 253 - 0
src/pages/erp/want/goodDetail.vue

@@ -0,0 +1,253 @@
+<template>
+	<div style="width: 100%">
+		<Modal v-model="modals" scrollable footer-hide closable title="商品列表" :mask-closable="false" width="700">
+			<Form ref="formValidate" :label-width="labelWidth" :label-position="labelPosition" class="tabform"
+				@submit.native.prevent>
+				<Row :gutter="24" type="flex">
+					<Col span="12">
+					<FormItem label="关键字:">
+						<Input enter-button placeholder="请输入商品名称/编码" element-id="name" v-model="formValidate.key" clearable />
+					</FormItem>
+					</Col>
+					<Col span="4">
+					<Button type="primary" icon="ios-search" @click="userSearchs">搜索</Button>
+					</Col>
+				</Row>
+			</Form>
+			<!-- <Divider dashed/> -->
+			<Table :columns="columns" :data="tabList" ref="table" :loading="loading" no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="table" @on-selection-change="change">
+				<template slot-scope="{ row, index }" slot="store">
+					<span> {{ row.my.stock }}{{row.my.unit_name}}</span>
+				</template>
+				<!-- product_num -->
+				<template slot-scope="{ row, index }" slot="product_num">
+					<span> {{ row.product_num }}{{row.unit_name || row.info['unit_name' + (row.unit_type == 0 ? '':(row.unit_type == 1?"_1":"_2"))]}}</span>
+				</template>
+				</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="formValidate.page" show-elevator show-total @on-change="pageChange"
+					:page-size="formValidate.limit" />
+			</div>
+			<Button type="primary"  @click="ok" style="width: 100%;margin-top:20px;">确认</Button>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import {
+		commissionDetailApi,
+		extractlistApi
+	} from '@/api/finance';
+	import {
+		getGodownList,
+		createGodown,
+		getGodownInfo,
+		getUserList,
+		getOutGoods
+	} from "@/api/erp";
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		name: 'commissionDetails',
+		data() {
+			return {
+				chooseGoods:[],
+				key: '',
+				wid: '',
+				my_store_id: '',
+				store_id: '',
+				type: 0,
+				modals: false,
+				spinShow: false,
+				detailsData: {},
+				Ids: 0,
+				loading: false,
+				formValidate: {
+					page: 1, // 当前页
+					limit: 20 ,// 每页显示条数
+					key: '',
+					wid: '',
+					my_store_id: '',
+					store_id: '',
+					type: 0,
+				},
+				total: 0,
+				columns: [{
+						type: 'selection',
+						width: 60,
+						align: 'center'
+					},
+					{
+						title: 'ID',
+						key: 'product_id',
+						minWidth: 50
+					},
+					{
+						title: '商品名称',
+						key: 'product_name',
+						minWidth: 200
+					},
+					{
+						title: '仓库库存',
+						slot: 'product_num',
+						minWidth: 150
+					},
+					{
+						title: '门店库存',
+						slot: 'store',
+						minWidth: 330
+					}
+				],
+				tabList: []
+
+			}
+		},
+		computed: {
+			...mapState('admin/layout', [
+				'isMobile'
+			]),
+			labelWidth() {
+				return this.isMobile ? undefined : 80;
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'left';
+			}
+		},
+		mounted() {
+			// if (this.Ids) {
+			//     this.getList();
+			// }
+			this.chooseGoods = []
+		},
+		methods: {
+			clearChoose() {
+				this.chooseGoods = []
+				this.$refs.table.selectAll(false);
+				
+			},
+			change(e) {
+				this.chooseGoods = e
+			},
+			ok() {
+				this.modals = false;
+				 this.$emit('setGoods',this.chooseGoods);
+			},
+			// 时间
+			onchangeTime(e) {
+				this.formValidate.start_time = e[0];
+				this.formValidate.end_time = e[1];
+			},
+			// 详情
+			getDetails(id) {
+				this.Ids = id;
+				this.spinShow = true;
+				commissionDetailApi(id).then(async res => {
+					if (res.status === 200) {
+						let data = res.data
+						this.detailsData = data.user_info;
+						this.spinShow = false;
+					} else {
+						this.spinShow = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.spinShow = false;
+					this.$Message.error(res.msg);
+				})
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				if (this.formValidate.type == 1) {
+					this.formValidate.wid = ''
+				} else {
+					this.formValidate.store_id = ''
+				}
+				getOutGoods(this.formValidate).then(async res => {
+					let data = res.data;
+					this.tabList = data;
+					this.total = data.count;
+					this.loading = false;
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				})
+			},
+			pageChange(index) {
+				this.formValidate.page = index
+				this.getList();
+			},
+			// 搜索
+			userSearchs() {
+				this.formValidate.page = 1;
+				this.getList();
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.table {
+		.ivu-table-default {
+			overflow-y: auto;
+			max-height: 350px;
+		}
+	}
+
+	.dashboard-workplace {
+		&-header {
+			&-avatar {
+				width: 64px;
+				height: 64px;
+				border-radius: 50%;
+				margin-right: 16px;
+				font-weight: 600;
+			}
+
+			&-tip {
+				width: 82%;
+				display: inline-block;
+				vertical-align: middle;
+
+				&-title {
+					font-size: 13px;
+					color: #000000;
+					margin-bottom: 12px;
+				}
+
+				&-desc {
+					&-sp {
+						width: 33.33%;
+						color: #17233D;
+						font-size: 12px;
+						display: inline-block;
+					}
+				}
+			}
+
+			&-extra {
+				.ivu-col {
+					p {
+						text-align: right;
+					}
+
+					p:first-child {
+						span:first-child {
+							margin-right: 4px;
+						}
+
+						span:last-child {
+							color: #808695;
+						}
+					}
+
+					p:last-child {
+						font-size: 22px;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 499 - 0
src/pages/erp/want/index.vue

@@ -0,0 +1,499 @@
+<template>
+	<!-- 营销-积分商品 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+				<!-- 查询条件 -->
+				<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<!-- <FormItem label="创建时间:" label-for="user_time">
+            <DatePicker
+                :editable="false"
+                @on-change="onchangeTime"
+                :value="timeVal"
+                format="yyyy/MM/dd"
+                type="datetimerange"
+                placement="bottom-start"
+                placeholder="自定义时间"
+                class="mr20 input-add"
+                :options="options"
+            ></DatePicker>
+          </FormItem> -->
+					<!-- <FormItem label="上架状态:">
+            <Select
+                placeholder="请选择"
+                clearable
+                class="input-add"
+                v-model="tableFrom.is_show"
+            >
+              <Option value="1">上架</Option>
+              <Option value="0">下架</Option>
+            </Select>
+          </FormItem> -->
+					<FormItem label="仓库:" prop="pid" label-for="pid">
+						<Select v-model="tableFrom.wid" @on-change="userSearchs" clearable class="input-add">
+							<Option v-for="item in data1" :value="item.id" :key="item.id">
+								{{ item.title }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="门店:">
+						<Select v-model="tableFrom.store_id" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="创建人:">
+						<Select v-model="tableFrom.create_uid" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in authList" :value="item.id" :key="item.id">{{ item.staff_name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<!-- <FormItem label="用户搜索:" label-for="store_name">
+						<Input class="input-add mr14" placeholder="请输入用户昵称/手机号" v-model="tableFrom.key" />
+						<Button type="primary" @click="tableSearchs()">查询</Button>
+					</FormItem> -->
+					<!-- <Button
+            v-auth="['marketing-store_seckill-create']"
+            type="primary"
+            icon="md-add"
+            @click="addMore"
+            class="mr10"
+            >批量添加积分商品</Button
+          > -->
+					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['marketing-store_seckill-create']" type="primary" @click="add" class="mr10">添加要货</Button>
+			<!-- 积分商品-表格 -->
+			<Table :columns="columns1" :data="tableList" :loading="loading" highlight-row no-userFrom-text="暂无数据"
+				no-filtered-userFrom-text="暂无筛选结果" class="ivu-mt">
+				<template slot-scope="{ row, index }" slot="image">
+					<viewer>
+						<div class="tabBox_img">
+							<img v-lazy="row.avatar" />
+						</div>
+					</viewer>
+				</template>
+				<template slot-scope="{ row, index }" slot="create_time">
+					<span> {{ row.create_time | formatDate }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="auth_time">
+					<span v-if="row.auth_time"> {{ row.auth_time | formatDate }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="auser">
+					<div>名称:{{row.auser.staff_name}}</div>
+					<div>管理员ID:{{row.auser.admin_id}}</div>
+					<div>ID:{{row.auser.id}}</div>
+					<div>手机:{{row.auser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="cuser">
+					<div>名称:{{row.cuser.staff_name}}</div>
+					<div>管理员ID:{{row.cuser.admin_id}}</div>
+					<div>ID:{{row.cuser.id}}</div>
+					<div>手机:{{row.cuser.phone}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>名称:{{row.ware.title}}</div>
+					<div>ID:{{row.ware.id}}</div>
+					<div>手机:{{row.ware.phone}}</div>
+					<div>地址:{{row.ware.detailed_address}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="info">
+					<!-- {{row.info}} -->
+					<div v-for="item in row.info" class="info">
+						<div>
+							商品名称:{{item.product_name}}
+						</div>
+						<div>
+							商品ID:{{item.product_id}}
+						</div>
+						<div>
+							数量:{{item.want_product_num*1}}{{' '}}{{item.unit_name}}
+						</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="store">
+					<viewer style="display: flex;">
+						<div class="tabBox_img">
+							<img v-lazy="row.store.image" />
+						</div>
+						<div>门店:{{row.store.name}}<br>ID:{{row.store.id}}</div>
+					</viewer>
+
+				</template>
+				<template slot-scope="{ row, index }" slot="is_system">
+					<span> {{ row.is_system ? '是': '否'}}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="is_show">
+					<i-switch v-model="row.is_show" :value="row.is_show" :true-value="1" :false-value="0"
+						@on-change="onchangeIsShow(row)" size="large">
+						<span slot="open">上架</span>
+						<span slot="close">下架</span>
+					</i-switch>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Tag color="default" v-if="row.status == 0">待审核</Tag>
+					<Tag color="primary" v-if="row.status == 1">通过</Tag>
+					<Tag color="success" v-if="row.status == 3">完成</Tag>
+					<Tag color="error" v-if="row.status == -1">拒绝</Tag>
+					<Tag color="warning" v-if="row.status == 2">部分完成</Tag>
+					<Tag color="magenta" v-if="row.status == -2">无效</Tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="look(row)">详情</a>
+					<template v-if="row.status == 0">
+						<Divider type="vertical" />
+						<a @click="edit(row)">编辑</a>
+						<Divider type="vertical" />
+						<a @click="del(row, '删除要货单', index)">删除</a>
+					</template>
+					
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getWantList,
+		getUserInfo,
+		getGodownList,
+		getUserList
+	} from "@/api/erp";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "want",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+			showStatus(status) {
+				let str = ''
+				switch (status) {
+					case 0:
+						str = '待审核';
+						break;
+					case -2:
+						str = '无效';
+						break;
+					case -1:
+						str = '拒绝';
+						break;
+					case 1:
+						str = '通过';
+						break;
+					case 2:
+						str = '部分完成';
+						break;
+					case 3:
+						str = '完成';
+						break;
+					default:
+						str = '';
+						break;
+				}
+				return str
+			}
+		},
+		data() {
+			return {
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "要货单号",
+						key: "want_order_id",
+						minWidth: 150,
+					},
+					{
+						title: '商品信息',
+						slot: 'info',
+						minWidth: 300,
+					},
+					{
+						title: "门店信息",
+						slot: "store",
+						minWidth: 200,
+					},
+					{
+						title: "创建人",
+						slot: "cuser",
+						minWidth: 200,
+					},
+
+					{
+						title: "仓库信息",
+						slot: "ware",
+						minWidth: 200,
+					},
+					{
+						title: "审核人信息",
+						slot: "auser",
+						minWidth: 200,
+					},
+					{
+						title: '审核时间',
+						slot: 'auth_time',
+						minWidth: 80,
+					},
+					{
+						title: "状态",
+						slot: "status",
+						minWidth: 100,
+					},
+					{
+						title: "创建时间",
+						slot: "create_time",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					// key: '',
+					create_uid:"",
+					store_id:"",
+					wid:"",
+					page: 1,
+					limit: 15,
+				},
+				total: 0,
+				staffData:[],
+				data1:[],
+				authList:[]
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+		},
+		mounted() {
+			this.getGodownList()
+			this.staffList()
+			this.getUserList()
+		},
+		methods: {
+			getUserList() {
+				getUserList().then(res => {
+					// console.log(res);
+					this.authList = res.data.data
+				})
+			},
+			userSearchs(e) {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+				})
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/want_add?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/want_add?id=" + row.id
+				});
+			},
+			// 一键复制
+			copy(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/create/" + row.id + "/1",
+				});
+			},
+			// 删除
+			del(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `erp/want/del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getWantList(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.integral_time = this.timeVal[0] ? this.timeVal.join("-") : "";
+			},
+			// 修改是否显示
+			onchangeIsShow(row) {
+				let data = {
+					id: row.id,
+					is_show: row.is_show,
+				};
+				integralIsShowApi(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.info {
+		padding-top: 10px;
+		border-bottom: 1px dashed #515a6e;
+
+		&:last-of-type {
+			border: none;
+		}
+	}
+</style>

+ 868 - 849
src/pages/user/list/handle/userDetails.vue

@@ -1,79 +1,75 @@
 <template>
-    <!-- <div style="width: 100%"> -->
-  <Drawer :closable="false" width="1000" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
-        <div class="acea-row user-row">
-            <div class="avatar mr15">
-                <img :src="psInfo.avatar">
-            </div>
-            <div class="user-row-text">
-                <div>
-                    <span class="nickname">{{ psInfo.nickname || '-' }}{{psInfo.delete_time != null?' (已注销)':''}}</span>
-                    <i
-                      :class="{
+	<!-- <div style="width: 100%"> -->
+	<Drawer :closable="false" width="1000" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
+		<div class="acea-row user-row">
+			<div class="avatar mr15">
+				<img :src="psInfo.avatar">
+			</div>
+			<div class="user-row-text">
+				<div>
+					<span class="nickname">{{ psInfo.nickname || '-' }}{{psInfo.delete_time != null?' (已注销)':''}}</span>
+					<i :class="{
                         iconxiaochengxu: psInfo.user_type === 'routine',
                         icongongzhonghao: psInfo.user_type === 'wechat',
                         iconPC: psInfo.user_type === 'pc',
                         iconh5: psInfo.user_type === 'h5',
                         iconapp: psInfo.user_type === 'app'
-                      }"
-                      class="iconfont"
-                    ></i>
-                </div>
-                <div class="level">
-                    <img v-if="psInfo.is_money_level" src="@/assets/images/svip-user.png">
-                    <span v-if="psInfo.level" class="vip">V{{ psInfo.level }}</span>
-                </div>
-            </div>
-            <div class="user-row-action" v-if="fromType !== 'order' && psInfo.delete_time == null ">
-                <Button v-show="isEdit" @click="isEdit = false">取消</Button>
-                <Button v-show="isEdit" type="primary" @click="finish">完成</Button>
-                <Button v-show="!isEdit && activeName === 'info'" type="primary" @click="isEdit = true">编辑</Button>
-                <Button type="success" @click="changeMenu('2')">积分余额</Button>
-                <Button @click="changeMenu('3')">赠送会员</Button>
-            </div>
-        </div>
-        <div class="acea-row info-row">
-            <div v-for="(item, index) in detailsData" :key="index" class="info-row-item">
-                <div class="info-row-item-title">{{ item.title }}</div>
-                <div>{{ item.value }}{{ item.key }}</div>
-            </div>
-        </div>
-        <Tabs v-model="activeName">
-            <TabPane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.val">
-                <template v-if="item.val === 'info'">
-                    <user-form v-if="isEdit" ref="userForm" :ps-info="psInfo" @change-menu="changeMenu"></user-form>
-                    <user-info v-else :ps-info="psInfo" :workMemberInfo="workMemberInfo" :workClientInfo="workClientInfo"></user-info>
-                </template>
-                <template v-else>
-                    <Table :columns="columns" :data="userLists"
-                        ref="table"
-                        :loading="loading"
-                        no-userFrom-text="暂无数据"
-                        no-filtered-userFrom-text="暂无筛选结果"
-                    >
-										    <template slot-scope="{ row }" slot="coupon_price">
-										       <span v-if="row.coupon_type==1">{{row.coupon_price}}元</span>
-										    	 <span v-if="row.coupon_type==2">{{parseFloat(row.coupon_price)/10}}折({{row.coupon_price.toString().split(".")[0]}}%)</span>
-										    </template>
-                        <template slot-scope="{ row }" slot="product">
-                            <div class="product">
-                                <div class="image" v-viewer>
-                                    <img v-lazy="row.image">
-                                </div>
-                                <div class="title">{{ row.store_name }}</div>
-                            </div>
-                        </template>
-                    </Table>
-                    <div class="acea-row row-right page">
-                        <Page :total="total" :current.sync="userFrom.page" show-elevator show-total @on-change="pageChange" :page-size="userFrom.limit"  />
-                    </div>
-                </template>
-            </TabPane>
-        </Tabs>
-    </Drawer>
-        <!-- <Modal v-model="modals" scrollable footer-hide closable title="用户详情" :mask-closable="false" width="1000" :z-index="2"> -->
-            <!-- <Spin size="large" fix v-if="spinShow"></Spin> -->
-            <!-- <div class="acea-row">
+                      }" class="iconfont"></i>
+				</div>
+				<div class="level">
+					<img v-if="psInfo.is_money_level" src="@/assets/images/svip-user.png">
+					<span v-if="psInfo.level" class="vip">V{{ psInfo.level }}</span>
+				</div>
+			</div>
+			<div class="user-row-action" v-if="fromType !== 'order' && psInfo.delete_time == null ">
+				<Button v-show="isEdit" @click="isEdit = false">取消</Button>
+				<Button v-show="isEdit" type="primary" @click="finish">完成</Button>
+				<Button v-show="!isEdit && activeName === 'info'" type="primary" @click="isEdit = true">编辑</Button>
+				<Button type="success" @click="changeMenu('2')">积分余额</Button>
+				<Button @click="changeMenu('3')">赠送会员</Button>
+			</div>
+		</div>
+		<div class="acea-row info-row">
+			<div v-for="(item, index) in detailsData" :key="index" class="info-row-item">
+				<div class="info-row-item-title">{{ item.title }}</div>
+				<div>{{ item.value }}{{ item.key }}</div>
+			</div>
+		</div>
+		<Tabs v-model="activeName">
+			<TabPane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.val">
+				<template v-if="item.val === 'info'">
+					<user-form v-if="isEdit" ref="userForm" :ps-info="psInfo" @change-menu="changeMenu"></user-form>
+					<user-info v-else :ps-info="psInfo" :workMemberInfo="workMemberInfo"
+						:workClientInfo="workClientInfo"></user-info>
+				</template>
+				<template v-else>
+					<Table :columns="columns" :data="userLists" ref="table" :loading="loading" no-userFrom-text="暂无数据"
+						no-filtered-userFrom-text="暂无筛选结果">
+						<template slot-scope="{ row }" slot="coupon_price">
+							<span v-if="row.coupon_type==1">{{row.coupon_price}}元</span>
+							<span
+								v-if="row.coupon_type==2">{{parseFloat(row.coupon_price)/10}}折({{row.coupon_price.toString().split(".")[0]}}%)</span>
+						</template>
+						<template slot-scope="{ row }" slot="product">
+							<div class="product">
+								<div class="image" v-viewer>
+									<img v-lazy="row.image">
+								</div>
+								<div class="title">{{ row.store_name }}</div>
+							</div>
+						</template>
+					</Table>
+					<div class="acea-row row-right page">
+						<Page :total="total" :current.sync="userFrom.page" show-elevator show-total
+							@on-change="pageChange" :page-size="userFrom.limit" />
+					</div>
+				</template>
+			</TabPane>
+		</Tabs>
+	</Drawer>
+	<!-- <Modal v-model="modals" scrollable footer-hide closable title="用户详情" :mask-closable="false" width="1000" :z-index="2"> -->
+	<!-- <Spin size="large" fix v-if="spinShow"></Spin> -->
+	<!-- <div class="acea-row">
                 <div class="avatar mr15"><img :src="psInfo.avatar"></div>
                 <div class="dashboard-workplace-header-tip">
                     <p class="dashboard-workplace-header-tip-title" v-text="psInfo.nickname || '-'"></p>
@@ -82,7 +78,7 @@
                     </div>
                 </div>
             </div> -->
-            <!-- <Row type="flex" justify="space-between" class="mt25">
+	<!-- <Row type="flex" justify="space-between" class="mt25">
                 <Col span="4" class="user_menu">
                     <Menu :theme="theme2" :active-name="activeName" @on-select="changeType">
                         <MenuItem :name="item.val" v-for="(item, index) in list" :key="index" >
@@ -102,789 +98,812 @@
                               :page-size="userFrom.limit"  /></div>
                 </Col>
             </Row> -->
-        <!-- </Modal> -->
-    <!-- </div> -->
+	<!-- </Modal> -->
+	<!-- </div> -->
 </template>
 
 <script>
-    import { detailsApi, infoApi, visitList, spreadList } from '@/api/user';
-    import userForm from './userForm';
-    import userInfo from './userInfo';
-
-    export default {
-        name: 'userDetails',
-        components: {
-            userForm,
-            userInfo
-        },
-        props: ['levelList', 'labelList', 'groupList', 'fromType'],
-        data () {
-            return {
-                theme2: 'light',
-                list: [
-                    { val: 'info', label: '用户信息' },
-                    { val: 'order', label: '消费记录' },
-                    { val: 'integral', label: '积分明细' },
-                    { val: 'sign', label: '签到记录' },
-                    { val: 'coupon', label: '持有优惠券' },
-                    { val: 'balance_change', label: '余额变动' },
-                    { val: 'spread', label: '好友关系' },
-                    { val: 'visit', label: '浏览足迹' },
-                    { val: 'spread_change', label: '推荐人变更记录' }
-                ],
-                modals: false,
-                spinShow: false,
-                detailsData: [],
-                userId: 0,
-                loading: false,
-                userFrom: {
-                    type: 'info',
-                    page: 1, // 当前页
-                    limit: 12 // 每页显示条数
-                },
-                total: 0,
-                columns: [],
-                userLists: [],
-                psInfo: {},
-                workMemberInfo:{},
-                workClientInfo:{},
-                activeName: 'info',
-                isEdit: false,
-                groupOptions: [],
-                labelOptions: []
-            }
-        },
-        watch: {
-            activeName (value) {
-							  this.userFrom.page = 1;
-                if (value == 'info') return;
-                this.isEdit = false;
-                 this.changeType(value);
-                // if (value == 'visit') {
-                //     this.changeType(value);
-                // } else if (value == 'spread_change') {
-                //    this.changeType(value);
-                // } else {
-                //     this.changeType(value);
-                // }
-            },
-            modals (value) {
-                if (value) {
-                    this.isEdit = false;
-                }
-            }
-        },
-        created () {
-        },
-        methods: {
-            changeMenu (value) {
-                if (value === '99') {
-                    this.getDetails(this.userId);
-                    this.$parent.getList();
-                    this.isEdit = false;
-                    return;
-                }
-                this.$parent.changeMenu(this.psInfo, value);
-            },
-            // 完成
-            finish () {
-                this.$refs.userForm[0].detailsPut();
-            },
-            // 推荐人变更记录
-            getSpreadList () {
-                this.loading = true;
-                spreadList({
-                    id: this.userId,
-                    datas: {
-                        page: this.userFrom.page,
-                        limit: this.userFrom.limit
-                    }
-                }).then(async res => {
-                    if (res.status === 200) {
-                        let data = res.data;
-                        this.userLists = data.list;
-                        this.total = data.count;
-                        this.columns = [
-                            {
-                                title: '推荐人ID',
-                                key: 'spread_uid',
-                                minWidth: 120
-                            },
-                            {
-                                title: '推荐人',
-                                key: 'nickname',
-                                minWidth: 120,
-                                render: (h, params) => {
-                                    return h('div', [
-                                        h('img', {
-                                            style: {
-                                                borderRadius: '50%',
-                                                marginRight: '10px',
-                                                verticalAlign: 'middle'
-                                            },
-                                            attrs: {
-                                                with: 38,
-                                                height: 38
-                                            },
-                                            directives: [
-                                                {
-                                                    name: 'lazy',
-                                                    value: params.row.avatar
-                                                },
-                                                {
-                                                    name: 'viewer'
-                                                }
-                                            ]
-                                        }),
-                                        h('span', {
-                                            style: {
-                                                verticalAlign: 'middle'
-                                            }
-                                        }, params.row.nickname)
-                                    ]);
-                                }
-                            },
-                            {
-                                title: '变更方式',
-                                key: 'type',
-                                minWidth: 120
-                            },
-                            {
-                                title: '变更时间',
-                                key: 'spread_time',
-                                minWidth: 120
-                            }
-                        ];
-                        this.loading = false;
-                    } else {
-                        this.loading = false;
-                        this.$Message.error(res.msg);
-                    }
-                }).catch(res => {
-                    this.loading = false;
-                    this.$Message.error(res.msg);
-                });
-            },
-            // 浏览足迹
-            getVisitList () {
-                this.loading = true;
-                visitList({
-                    id: this.userId,
-                    datas: {
-                        page: this.userFrom.page,
-                        limit: this.userFrom.limit
-                    }
-                }).then(async res => {
-                    if (res.status === 200) {
-                        let data = res.data;
-                        this.userLists = data.list;
-                        this.total = data.count;
-                        this.columns = [
-                            {
-                                title: '商品信息',
-                                slot: 'product',
-                                minWidth: 400
-                            },
-                            {
-                                title: '价格',
-                                key: 'product_price',
-                                minWidth: 120,
-                                render: (h, params) => {
-                                    return h('div', `¥${params.row.product_price}`);
-                                }
-                            },
-                            {
-                                title: '浏览时间',
-                                key: 'add_time',
-                                minWidth: 120
-                            }
-                        ];
-                        this.loading = false;
-                    } else {
-                        this.loading = false;
-                        this.$Message.error(res.msg);
-                    }
-                }).catch(res => {
-                    this.loading = false;
-                    this.$Message.error(res.msg);
-                });
-            },
-            // 会员详情
-            getDetails (id) {
-                this.userId = id;
-                this.spinShow = true;
-                detailsApi(id).then(async res => {
-                    if (res.status === 200) {
-                        let data = res.data
-                        this.detailsData = data.headerList;
-                        if(this.fromType !== 'order'){
-                            let groupItem = this.groupList.find(item => item.id == data.ps_info.group_id);
-                            if (groupItem) {
-                                data.ps_info.group_name = groupItem.group_name;
-                            }
-                        }
-                        this.psInfo = data.ps_info;
-                        this.workMemberInfo = data.workMemberInfo;
-                        this.workClientInfo = data.workClientInfo;
-                        this.spinShow = false;
-                    } else {
-                        this.spinShow = false;
-                        this.$Message.error(res.msg);
-                    }
-                }).catch(res => {
-                    this.spinShow = false;
-                    this.$Message.error(res.msg);
-                })
-            },
-            pageChange (index) {
-                this.userFrom.page = index
-                   this.changeType(this.userFrom.type);
-                // switch (this.activeName) {
-                //     case 'visit':
-                //        this.changeType(this.userFrom.type);
-                //         break;
-                //     case 'spread_change':
-                //        this.changeType(this.userFrom.type);
-                //         break;
-                //     default:
-                //         this.changeType(this.userFrom.type);
-                //         break;
-                // }
-            },
-            // tab选项
-            changeType (name) {
-                this.loading = true;
-                this.userFrom.type = name;
-                this.activeName = name;
-                let data = {
-                    id: this.userId,
-                    datas: this.userFrom
-                }
-                infoApi(data).then(async res => {
-                    if (res.status === 200) {
-                        let data = res.data
-                        this.userLists = data.list;
-                        this.total = data.count;
-                        switch (this.userFrom.type) {
-                        case 'order':
-                            this.columns = [
-                                {
-                                    title: '订单ID',
-                                    key: 'order_id',
-                                    minWidth: 160
-                                },
-                                {
-                                    title: '收货人',
-                                    key: 'real_name',
-                                    minWidth: 100
-                                },
-                                {
-                                    title: '商品数量',
-                                    key: 'total_num',
-                                    minWidth: 90
-                                },
-                                {
-                                    title: '商品总价',
-                                    key: 'total_price',
-                                    minWidth: 110
-                                },
-                                {
-                                    title: '实付金额',
-                                    key: 'pay_price',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '交易完成时间',
-                                    key: 'pay_time',
-                                    minWidth: 120
-                                }
-                            ]
-                            break;
-                        case 'integral':
-                            this.columns = [
-                                {
-                                    title: '来源/用途',
-                                    key: 'title',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '积分变化',
-                                    key: 'number',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '变化后积分',
-                                    key: 'balance',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '日期',
-                                    key: 'add_time',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '备注',
-                                    key: 'mark',
-                                    minWidth: 120
-                                }
-                            ]
-                            break;
-                        case 'sign':
-                            this.columns = [
-                                // {
-                                //     title: '动作',
-                                //     key: 'title',
-                                //     minWidth: 120
-                                // },
-                                {
-                                    title: '获得积分',
-                                    key: 'number',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '签到时间',
-                                    key: 'add_time',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '备注',
-                                    key: 'mark',
-                                    minWidth: 120
-                                }
-                            ]
-                            break;
-                        case 'coupon':
-                            this.columns = [
-                                {
-                                    title: '优惠券名称',
-                                    key: 'coupon_title',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '面值',
-                                    slot: 'coupon_price',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '有效期(天)',
-                                    key: 'coupon_time',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '兑换时间',
-                                    key: '_add_time',
-                                    minWidth: 120
-                                }
-                            ]
-                            break;
-                        case 'balance_change':
-                            this.columns = [
-                                {
-                                    title: '动作',
-                                    key: 'title',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '变动金额',
-                                    key: 'number',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '变动后',
-                                    key: 'balance',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '创建时间',
-                                    key: 'add_time',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '备注',
-                                    key: 'mark',
-                                    minWidth: 120
-                                }
-                            ]
-                            break;
-                              case 'visit':
-                this.columns = [
-                  {
-                    title: '商品信息',
-                    slot: 'product',
-                    minWidth: 400,
-                  },
-                  {
-                    title: '价格',
-                    key: 'product_price',
-                    minWidth: 120,
-                    render: (h, params) => {
-                      return h('div', `¥${params.row.product_price}`)
-                    },
-                  },
-                  {
-                    title: '浏览时间',
-                    key: 'add_time',
-                    minWidth: 120,
-                  },
-                ]
-                break
-              case 'spread_change':
-                this.columns = [
-                  {
-                    title: '推荐人ID',
-                    key: 'spread_uid',
-                    minWidth: 120,
-                  },
-                  {
-                    title: '推荐人',
-                    key: 'nickname',
-                    minWidth: 120,
-                    render: (h, params) => {
-                      return h('div', [
-                        h('img', {
-                          style: {
-                            borderRadius: '50%',
-                            marginRight: '10px',
-                            verticalAlign: 'middle',
-                          },
-                          attrs: {
-                            with: 38,
-                            height: 38,
-                          },
-                          directives: [
-                            {
-                              name: 'lazy',
-                              value: params.row.avatar,
-                            },
-                            {
-                              name: 'viewer',
-                            },
-                          ],
-                        }),
-                        h(
-                          'span',
-                          {
-                            style: {
-                              verticalAlign: 'middle',
-                            },
-                          },
-                          params.row.nickname
-                        ),
-                      ])
-                    },
-                  },
-                  {
-                    title: '变更方式',
-                    key: 'type',
-                    minWidth: 120,
-                  },
-                  {
-                    title: '变更时间',
-                    key: 'spread_time',
-                    minWidth: 120,
-                  },
-                ]
-                break;
-                        default:
-                            this.columns = [
-                                {
-                                    title: 'ID',
-                                    key: 'uid',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '昵称',
-                                    key: 'nickname',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '等级',
-                                    key: 'type',
-                                    minWidth: 120
-                                },
-                                {
-                                    title: '加入时间',
-                                    key: 'add_time',
-                                    minWidth: 120
-                                }
-                            ]
-                        }
-                        this.loading = false;
-                    } else {
-                        this.loading = false;
-                        this.$Message.error(res.msg);
-                    }
-                }).catch(res => {
-                    this.loading = false;
-                    this.$Message.error(res.msg);
-                })
-            }
-        }
-    }
+	import {
+		detailsApi,
+		infoApi,
+		visitList,
+		spreadList
+	} from '@/api/user';
+	import userForm from './userForm';
+	import userInfo from './userInfo';
+
+	export default {
+		name: 'userDetails',
+		components: {
+			userForm,
+			userInfo
+		},
+		props: ['levelList', 'labelList', 'groupList', 'fromType'],
+		data() {
+			return {
+				theme2: 'light',
+				list: [{
+						val: 'info',
+						label: '用户信息'
+					},
+					{
+						val: 'order',
+						label: '消费记录'
+					},
+					{
+						val: 'integral',
+						label: '积分明细'
+					},
+					{
+						val: 'sign',
+						label: '签到记录'
+					},
+					{
+						val: 'coupon',
+						label: '持有优惠券'
+					},
+					{
+						val: 'balance_change',
+						label: '余额变动'
+					},
+					{
+						val: 'spread',
+						label: '好友关系'
+					},
+					{
+						val: 'visit',
+						label: '浏览足迹'
+					},
+					{
+						val: 'spread_change',
+						label: '推荐人变更记录'
+					}
+				],
+				modals: false,
+				spinShow: false,
+				detailsData: [],
+				userId: 0,
+				loading: false,
+				userFrom: {
+					type: 'info',
+					page: 1, // 当前页
+					limit: 12 // 每页显示条数
+				},
+				total: 0,
+				columns: [],
+				userLists: [],
+				psInfo: {},
+				workMemberInfo: {},
+				workClientInfo: {},
+				activeName: 'info',
+				isEdit: false,
+				groupOptions: [],
+				labelOptions: []
+			}
+		},
+		watch: {
+			activeName(value) {
+				this.userFrom.page = 1;
+				if (value == 'info') return;
+				this.isEdit = false;
+				this.changeType(value);
+				// if (value == 'visit') {
+				//     this.changeType(value);
+				// } else if (value == 'spread_change') {
+				//    this.changeType(value);
+				// } else {
+				//     this.changeType(value);
+				// }
+			},
+			modals(value) {
+				if (value) {
+					this.isEdit = false;
+				}
+			}
+		},
+		created() {},
+		methods: {
+			changeMenu(value) {
+				if (value === '99') {
+					this.getDetails(this.userId);
+					this.$parent.getList();
+					this.isEdit = false;
+					return;
+				}
+				this.$parent.changeMenu(this.psInfo, value);
+			},
+			// 完成
+			finish() {
+				this.$refs.userForm[0].detailsPut();
+			},
+			// 推荐人变更记录
+			getSpreadList() {
+				this.loading = true;
+				spreadList({
+					id: this.userId,
+					datas: {
+						page: this.userFrom.page,
+						limit: this.userFrom.limit
+					}
+				}).then(async res => {
+					if (res.status === 200) {
+						let data = res.data;
+						this.userLists = data.list;
+						this.total = data.count;
+						this.columns = [{
+								title: '推荐人ID',
+								key: 'spread_uid',
+								minWidth: 120
+							},
+							{
+								title: '推荐人',
+								key: 'nickname',
+								minWidth: 120,
+								render: (h, params) => {
+									return h('div', [
+										h('img', {
+											style: {
+												borderRadius: '50%',
+												marginRight: '10px',
+												verticalAlign: 'middle'
+											},
+											attrs: {
+												with: 38,
+												height: 38
+											},
+											directives: [{
+													name: 'lazy',
+													value: params.row.avatar
+												},
+												{
+													name: 'viewer'
+												}
+											]
+										}),
+										h('span', {
+											style: {
+												verticalAlign: 'middle'
+											}
+										}, params.row.nickname)
+									]);
+								}
+							},
+							{
+								title: '变更方式',
+								key: 'type',
+								minWidth: 120
+							},
+							{
+								title: '变更时间',
+								key: 'spread_time',
+								minWidth: 120
+							}
+						];
+						this.loading = false;
+					} else {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				});
+			},
+			// 浏览足迹
+			getVisitList() {
+				this.loading = true;
+				visitList({
+					id: this.userId,
+					datas: {
+						page: this.userFrom.page,
+						limit: this.userFrom.limit
+					}
+				}).then(async res => {
+					if (res.status === 200) {
+						let data = res.data;
+						this.userLists = data.list;
+						this.total = data.count;
+						this.columns = [{
+								title: '商品信息',
+								slot: 'product',
+								minWidth: 400
+							},
+							{
+								title: '价格',
+								key: 'product_price',
+								minWidth: 120,
+								render: (h, params) => {
+									return h('div', `¥${params.row.product_price}`);
+								}
+							},
+							{
+								title: '浏览时间',
+								key: 'add_time',
+								minWidth: 120
+							}
+						];
+						this.loading = false;
+					} else {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				});
+			},
+			// 会员详情
+			getDetails(id) {
+				this.userId = id;
+				this.spinShow = true;
+				detailsApi(id).then(async res => {
+					if (res.status === 200) {
+						let data = res.data
+						this.detailsData = data.headerList;
+						if (this.fromType !== 'order') {
+							let groupItem = this.groupList.find(item => item.id == data.ps_info.group_id);
+							if (groupItem) {
+								data.ps_info.group_name = groupItem.group_name;
+							}
+						}
+						this.psInfo = data.ps_info;
+						this.workMemberInfo = data.workMemberInfo;
+						this.workClientInfo = data.workClientInfo;
+						this.spinShow = false;
+					} else {
+						this.spinShow = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.spinShow = false;
+					this.$Message.error(res.msg);
+				})
+			},
+			pageChange(index) {
+				this.userFrom.page = index
+				this.changeType(this.userFrom.type);
+				// switch (this.activeName) {
+				//     case 'visit':
+				//        this.changeType(this.userFrom.type);
+				//         break;
+				//     case 'spread_change':
+				//        this.changeType(this.userFrom.type);
+				//         break;
+				//     default:
+				//         this.changeType(this.userFrom.type);
+				//         break;
+				// }
+			},
+			// tab选项
+			changeType(name) {
+				this.loading = true;
+				this.userFrom.type = name;
+				this.activeName = name;
+				let data = {
+					id: this.userId,
+					datas: this.userFrom
+				}
+				infoApi(data).then(async res => {
+					if (res.status === 200) {
+						let data = res.data
+						this.userLists = data.list;
+						this.total = data.count;
+						switch (this.userFrom.type) {
+							case 'order':
+								this.columns = [{
+										title: '订单ID',
+										key: 'order_id',
+										minWidth: 160
+									},
+									{
+										title: '收货人',
+										key: 'real_name',
+										minWidth: 100
+									},
+									{
+										title: '商品数量',
+										key: 'total_num',
+										minWidth: 90
+									},
+									{
+										title: '商品总价',
+										key: 'total_price',
+										minWidth: 110
+									},
+									{
+										title: '实付金额',
+										key: 'pay_price',
+										minWidth: 120
+									},
+									{
+										title: '交易完成时间',
+										key: 'pay_time',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'integral':
+								this.columns = [{
+										title: '来源/用途',
+										key: 'title',
+										minWidth: 120
+									},
+									{
+										title: '积分变化',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '变化后积分',
+										key: 'balance',
+										minWidth: 120
+									},
+									{
+										title: '日期',
+										key: 'add_time',
+										minWidth: 120
+									},
+									{
+										title: '备注',
+										key: 'mark',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'sign':
+								this.columns = [
+									// {
+									//     title: '动作',
+									//     key: 'title',
+									//     minWidth: 120
+									// },
+									{
+										title: '获得积分',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '签到时间',
+										key: 'add_time',
+										minWidth: 120
+									},
+									{
+										title: '备注',
+										key: 'mark',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'coupon':
+								this.columns = [{
+										title: '优惠券名称',
+										key: 'coupon_title',
+										minWidth: 120
+									},
+									{
+										title: '面值',
+										slot: 'coupon_price',
+										minWidth: 120
+									},
+									{
+										title: '有效期(天)',
+										key: 'coupon_time',
+										minWidth: 120
+									},
+									{
+										title: '兑换时间',
+										key: '_add_time',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'balance_change':
+								this.columns = [{
+										title: '动作',
+										key: 'title',
+										minWidth: 120
+									},
+									{
+										title: '变动金额',
+										key: 'number',
+										minWidth: 120
+									},
+									{
+										title: '变动后',
+										key: 'balance',
+										minWidth: 120
+									},
+									{
+										title: '创建时间',
+										key: 'add_time',
+										minWidth: 120
+									},
+									{
+										title: '备注',
+										key: 'mark',
+										minWidth: 120
+									}
+								]
+								break;
+							case 'visit':
+								this.columns = [{
+										title: '商品信息',
+										slot: 'product',
+										minWidth: 400,
+									},
+									{
+										title: '价格',
+										key: 'product_price',
+										minWidth: 120,
+										render: (h, params) => {
+											return h('div', `¥${params.row.product_price}`)
+										},
+									},
+									{
+										title: '浏览时间',
+										key: 'add_time',
+										minWidth: 120,
+									},
+								]
+								break
+							case 'spread_change':
+								this.columns = [{
+										title: '推荐人ID',
+										key: 'spread_uid',
+										minWidth: 120,
+									},
+									{
+										title: '推荐人',
+										key: 'nickname',
+										minWidth: 120,
+										render: (h, params) => {
+											return h('div', [
+												h('img', {
+													style: {
+														borderRadius: '50%',
+														marginRight: '10px',
+														verticalAlign: 'middle',
+													},
+													attrs: {
+														with: 38,
+														height: 38,
+													},
+													directives: [{
+															name: 'lazy',
+															value: params.row.avatar,
+														},
+														{
+															name: 'viewer',
+														},
+													],
+												}),
+												h(
+													'span', {
+														style: {
+															verticalAlign: 'middle',
+														},
+													},
+													params.row.nickname
+												),
+											])
+										},
+									},
+									{
+										title: '变更方式',
+										key: 'type',
+										minWidth: 120,
+									},
+									{
+										title: '变更时间',
+										key: 'spread_time',
+										minWidth: 120,
+									},
+								]
+								break;
+							default:
+								this.columns = [{
+										title: 'ID',
+										key: 'uid',
+										minWidth: 120
+									},
+									{
+										title: '昵称',
+										key: 'nickname',
+										minWidth: 120
+									},
+									{
+										title: '等级',
+										key: 'type',
+										minWidth: 120
+									},
+									{
+										title: '加入时间',
+										key: 'add_time',
+										minWidth: 120
+									}
+								]
+						}
+						this.loading = false;
+					} else {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					}
+				}).catch(res => {
+					this.loading = false;
+					this.$Message.error(res.msg);
+				})
+			}
+		}
+	}
 </script>
 
 <style lang="less" scoped>
-    /deep/.ivu-modal-body {
-        padding: 0;
-    }
-    .user-info {
-        // padding: 15px;
-    }
-    .user-row {
-        padding: 30px 35px 0;
-
-        &-text {
-            flex: 1;
-            align-self: center;
-        }
-
-        &-action {
-
-            .ivu-btn {
-                margin-left: 12px;
-                font-size: 13px !important;
-                color: rgba(0, 0, 0, 0.85);
-
-                &:first-child {
-                    margin-left: 0;
-                }
-
-                &.ivu-btn-primary {
-                    border-color: #1890FF;
-                    background-color: #1890FF;
-                    color: #FFFFFF;
-                }
-
-                &.ivu-btn-success {
-                    border-color: #00C050;
-                    background-color: #00C050;
-                    color: #FFFFFF;
-                }
-            }
-        }
-
-        .nickname {
-            font-weight: 500;
-            font-size: 16px;
-            line-height: 16px;
-            color: rgba(0, 0, 0, 0.85);
-        }
-
-        .iconfont {
-            margin-left: 7px;
-            font-size: 18px;
-
-            &:nth-child(2) {
-                margin-left: 9px;
-            }
-
-            &.iconxiaochengxu {
-                color: #007DFF;
-            }
-
-            &.icongongzhonghao {
-                color: #00BF00;
-            }
-
-            &.iconPC {
-                color: #F69B00;
-            }
-
-            &.iconh5 {
-                color: #9F5CE3;
-            }
-
-            &.iconapp {
-                color: #E36734;
-            }
-        }
-
-        .level {
-            margin-top: 5px;
-
-            img {
-                width: 42px;
-                height: 20px;
-                vertical-align: middle;
-
-                + span {
-                    margin-left: 7px;
-                }
-            }
-
-            .vip {
-                display: inline-block;
-                width: 56px;
-                height: 26px;
-                padding-left: 30px;
-                background: url("../../../../assets/images/vip-bg.png") left top/100% 100% no-repeat;
-                font-weight: bold;
-                font-size: 9px;
-                line-height: 26px;
-                color: #5F7DB5;
-                transform-origin: left;
-                transform: scale(0.75, 0.75);
-                vertical-align: middle;
-            }
-        }
-    }
-
-    .info-row {
-        flex-wrap: nowrap;
-        padding: 20px 35px 24px;
-
-        &-item {
-            flex: none;
-            width: 155px;
-            font-size: 14px;
-            line-height: 14px;
-            color: rgba(0, 0, 0, 0.85);
-
-            &-title {
-                margin-bottom: 12px;
-                font-size: 13px;
-                line-height: 13px;
-                color: #666666;
-            }
-        }
-    }
-
-    .ivu-tabs {
-        color: rgba(0, 0, 0, 0.85);
-
-        /deep/ .ivu-tabs-bar {
-            border-bottom: 0;
-            margin-bottom: 0;
-            background-color: #F5F7FA;
-
-            .ivu-tabs-nav-container {
-                font-size: 13px;
-            }
-
-            .ivu-tabs-ink-bar {
-                display: none;
-            }
-
-            .ivu-tabs-tab {
-                padding: 7px 19px !important;
-                margin-right: 0;
-                line-height: 26px;
-            }
-
-            .ivu-tabs-tab-active {
-                background-color: #FFFFFF;
-                color: rgba(0, 0, 0, 0.85);
-
-                &:before {
-                    content: "";
-                    position: absolute;
-                    top: 0;
-                    left: 0;
-                    width: 100%;
-                    height: 2px;
-                    background-color: #1890FF;
-                }
-            }
-        }
-
-        /deep/ .ivu-tabs-content {
-            .ivu-tabs-tabpane {
-                padding: 15px 15px !important;
-
-                &:first-child {
-                    padding: 0 25px !important;
-                }
-            }
-        }
-
-        .product {
-            display: flex;
-
-            .image {
-                width: 50px;
-                height: 50px;
-            }
-
-            img {
-                width: 100%;
-                height: 100%;
-                border-radius: 4px;
-            }
-
-            .title {
-                flex: 1;
-                padding-left: 13px;
-                text-align: left;
-            }
-        }
-    }
-
-    .avatar{
-        width: 60px;
-        height: 60px;
-        border-radius: 50%;
-        overflow: hidden;
-        img{
-            width: 100%;
-            height: 100%;
-        }
-    }
-    .dashboard-workplace {
-        &-header {
-            &-avatar {
-                width: 64px;
-                height: 64px;
-                border-radius: 50%;
-                margin-right: 16px;
-                font-weight: 600;
-            }
-
-            &-tip {
-                width: 82%;
-                display: inline-block;
-                vertical-align: middle;
-
-                &-title {
-                    font-size: 13px;
-                    color: #000000;
-                    margin-bottom: 12px;
-                }
-
-                &-desc {
-                    &-sp {
-                        width: 33.33%;
-                        color: #17233D;
-                        font-size: 13px;
-                        display: inline-block;
-                    }
-                }
-            }
-
-            &-extra {
-                .ivu-col {
-                    p {
-                        text-align: right;
-                    }
-
-                    p:first-child {
-                        span:first-child {
-                            margin-right: 4px;
-                        }
-
-                        span:last-child {
-                            color: #808695;
-                        }
-                    }
-
-                    p:last-child {
-                        font-size: 22px;
-                    }
-                }
-            }
-        }
-    }
+	/deep/.ivu-modal-body {
+		padding: 0;
+	}
+
+	.user-info {
+		// padding: 15px;
+	}
+
+	.user-row {
+		padding: 30px 35px 0;
+
+		&-text {
+			flex: 1;
+			align-self: center;
+		}
+
+		&-action {
+
+			.ivu-btn {
+				margin-left: 12px;
+				font-size: 13px !important;
+				color: rgba(0, 0, 0, 0.85);
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.ivu-btn-primary {
+					border-color: #1890FF;
+					background-color: #1890FF;
+					color: #FFFFFF;
+				}
+
+				&.ivu-btn-success {
+					border-color: #00C050;
+					background-color: #00C050;
+					color: #FFFFFF;
+				}
+			}
+		}
+
+		.nickname {
+			font-weight: 500;
+			font-size: 16px;
+			line-height: 16px;
+			color: rgba(0, 0, 0, 0.85);
+		}
+
+		.iconfont {
+			margin-left: 7px;
+			font-size: 18px;
+
+			&:nth-child(2) {
+				margin-left: 9px;
+			}
+
+			&.iconxiaochengxu {
+				color: #007DFF;
+			}
+
+			&.icongongzhonghao {
+				color: #00BF00;
+			}
+
+			&.iconPC {
+				color: #F69B00;
+			}
+
+			&.iconh5 {
+				color: #9F5CE3;
+			}
+
+			&.iconapp {
+				color: #E36734;
+			}
+		}
+
+		.level {
+			margin-top: 5px;
+
+			img {
+				width: 42px;
+				height: 20px;
+				vertical-align: middle;
+
+				+span {
+					margin-left: 7px;
+				}
+			}
+
+			.vip {
+				display: inline-block;
+				width: 56px;
+				height: 26px;
+				padding-left: 30px;
+				background: url("../../../../assets/images/vip-bg.png") left top/100% 100% no-repeat;
+				font-weight: bold;
+				font-size: 9px;
+				line-height: 26px;
+				color: #5F7DB5;
+				transform-origin: left;
+				transform: scale(0.75, 0.75);
+				vertical-align: middle;
+			}
+		}
+	}
+
+	.info-row {
+		flex-wrap: nowrap;
+		padding: 20px 35px 24px;
+
+		&-item {
+			flex: none;
+			width: 155px;
+			font-size: 14px;
+			line-height: 14px;
+			color: rgba(0, 0, 0, 0.85);
+
+			&-title {
+				margin-bottom: 12px;
+				font-size: 13px;
+				line-height: 13px;
+				color: #666666;
+			}
+		}
+	}
+
+	.ivu-tabs {
+		color: rgba(0, 0, 0, 0.85);
+
+		/deep/ .ivu-tabs-bar {
+			border-bottom: 0;
+			margin-bottom: 0;
+			background-color: #F5F7FA;
+
+			.ivu-tabs-nav-container {
+				font-size: 13px;
+			}
+
+			.ivu-tabs-ink-bar {
+				display: none;
+			}
+
+			.ivu-tabs-tab {
+				padding: 7px 19px !important;
+				margin-right: 0;
+				line-height: 26px;
+			}
+
+			.ivu-tabs-tab-active {
+				background-color: #FFFFFF;
+				color: rgba(0, 0, 0, 0.85);
+
+				&:before {
+					content: "";
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 2px;
+					background-color: #1890FF;
+				}
+			}
+		}
+
+		/deep/ .ivu-tabs-content {
+			.ivu-tabs-tabpane {
+				padding: 15px 15px !important;
+
+				&:first-child {
+					padding: 0 25px !important;
+				}
+			}
+		}
+
+		.product {
+			display: flex;
+
+			.image {
+				width: 50px;
+				height: 50px;
+			}
+
+			img {
+				width: 100%;
+				height: 100%;
+				border-radius: 4px;
+			}
+
+			.title {
+				flex: 1;
+				padding-left: 13px;
+				text-align: left;
+			}
+		}
+	}
+
+	.avatar {
+		width: 60px;
+		height: 60px;
+		border-radius: 50%;
+		overflow: hidden;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.dashboard-workplace {
+		&-header {
+			&-avatar {
+				width: 64px;
+				height: 64px;
+				border-radius: 50%;
+				margin-right: 16px;
+				font-weight: 600;
+			}
+
+			&-tip {
+				width: 82%;
+				display: inline-block;
+				vertical-align: middle;
+
+				&-title {
+					font-size: 13px;
+					color: #000000;
+					margin-bottom: 12px;
+				}
+
+				&-desc {
+					&-sp {
+						width: 33.33%;
+						color: #17233D;
+						font-size: 13px;
+						display: inline-block;
+					}
+				}
+			}
+
+			&-extra {
+				.ivu-col {
+					p {
+						text-align: right;
+					}
+
+					p:first-child {
+						span:first-child {
+							margin-right: 4px;
+						}
+
+						span:last-child {
+							color: #808695;
+						}
+					}
+
+					p:last-child {
+						font-size: 22px;
+					}
+				}
+			}
+		}
+	}
 </style>
 <style scoped lang="stylus">
-    .user_menu >>> .ivu-menu
-       width 100% !important
-</style>
+	.user_menu>>>.ivu-menu {
+		width 100% !important;
+	}
+</style>

+ 112 - 3
src/router/modules/erp.js

@@ -20,6 +20,106 @@ export default {
 	// },
 	component: BasicLayout,
 	children: [
+		{
+			path:'user',
+			name: `${pre}user`,
+			meta: {
+				auth: ['admin-erp-user'],
+				title: '用户管理'
+			},
+			component: () => import('@/pages/erp/user/index')
+		},
+		{
+			path:'purchase_list',
+			name: `${pre}purchase_list`,
+			meta: {
+				auth: ['admin-erp-purchase_list'],
+				title: '采购单列表'
+			},
+			component: () => import('@/pages/erp/purchase/index')
+		},
+		{
+			path:'godown_list',
+			name: `${pre}godown_list`,
+			meta: {
+				auth: ['admin-erp-godown_list'],
+				title: '仓库列表'
+			},
+			component: () => import('@/pages/erp/godown/list')
+		},
+		//receive
+		{
+			path:'receive_list',
+			name: `${pre}receive_list`,
+			meta: {
+				auth: ['admin-erp-receive_list'],
+				title: '收货列表'
+			},
+			component: () => import('@/pages/erp/receive/index')
+		},
+		{
+			path:'out_list',
+			name: `${pre}out_list`,
+			meta: {
+				auth: ['admin-erp-out_list'],
+				title: '出库列表'
+			},
+			component: () => import('@/pages/erp/out/index')
+		},
+		{
+			path:'out_goods',
+			name: `${pre}out_goods`,
+			meta: {
+				auth: ['admin-erp-out_goods'],
+				title: '出库列表'
+			},
+			component: () => import('@/pages/erp/out/goods')
+		},
+		{
+			path:'in_list',
+			name: `${pre}in_list`,
+			meta: {
+				auth: ['admin-erp-in_list'],
+				title: '入库列表'
+			},
+			component: () => import('@/pages/erp/in/index')
+		},
+		{
+			path:'adjust_list',
+			name: `${pre}in_list`,
+			meta: {
+				auth: ['admin-erp-adjust_list'],
+				title: '调价列表'
+			},
+			component: () => import('@/pages/erp/adjust/index')
+		},
+		{
+			path:'add_godown/:id?',
+			name: `${pre}add_godown`,
+			meta: {
+				auth: ['admin-erp-add_godown'],
+				title: '添加/编辑仓库'
+			},
+			component: () => import('@/pages/erp/godown/addGodown')
+		},
+		{
+			path:'position_list',
+			name: `${pre}position_list`,
+			meta: {
+				auth: ['admin-erp-position_list'],
+				title: '仓位列表'
+			},
+			component: () => import('@/pages/erp/godown/position')
+		},
+		{
+			path:'add_position',
+			name: `${pre}add_position`,
+			meta: {
+				auth: ['admin-erp-add_position'],
+				title: '添加/编辑仓库'
+			},
+			component: () => import('@/pages/erp/godown/addPosition')
+		},
 		{
 			path:'inventory',
 			name: `${pre}inventory`,
@@ -45,7 +145,16 @@ export default {
 				auth: ['admin-erp-goods'],
 				title: '要货'
 			},
-			component: () => import('@/pages/store/storeMenus/index')
+			component: () => import('@/pages/erp/want/index')
+		},
+		{
+			path: 'want_add',
+			name: `${pre}want_add`,
+			meta: {
+				auth: ['admin-erp-want_add'],
+				title: '添加要货单'
+			},
+			component: () => import('@/pages/erp/want/addWant')
 		},
 		{
 			path: 'product',
@@ -63,7 +172,7 @@ export default {
 				auth: ['admin-erp-batch'],
 				title: '商品批次'
 			},
-			component: () => import('@/pages/store/statistics/index')
+			component: () => import('@/pages/erp/batch/index')
 		},
 		{
 			path: 'warehouse',
@@ -81,7 +190,7 @@ export default {
 				auth: ['admin-erp-menus'],
 				title: '仓库菜单'
 			},
-			component: () => import('@/pages/store/order/index')
+			component: () => import('@/pages/erp/erpMenus/index')
 		},
 		{
 			path: 'locator',

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor