lhl 1 éve
szülő
commit
a589d40f31

+ 2 - 0
.env.dev

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

+ 69 - 0
src/api/erp.js

@@ -9,6 +9,20 @@
 // +----------------------------------------------------------------------
 import request from "@/plugins/request";
 
+
+//goods/main_set_show
+/**
+ * @description erp设置
+ * @param {Object} param data {Object} 传值参数
+ */
+export function mainSetShow(params) {
+  return request({
+    url: "erp/goods/main_set_show",
+    method: "get",
+	params
+  });
+}
+
 /**
  * @description erp设置
  * @param {Object} param data {Object} 传值参数
@@ -20,6 +34,18 @@ export function erpConfig() {
   });
 }
 
+/**
+ * @description erp设置
+ * @param {Object} param data {Object} 传值参数
+ */
+export function setShow(data) {
+  return request({
+    url: "erp/goods/set_show",
+    method: "get",
+	params: data
+  });
+}
+
 /**
  * @description erp门店列表
  * @param {Object} param data {Object} 传值参数
@@ -866,6 +892,49 @@ export function infoMdInventory(id) {
 	});
 }
 
+/**
+ * @description erp商品 -- 导出
+ */
+export function erpProductExport(data) {
+    return request({
+        url: `export/erpProductExport`,
+        method: 'get',
+		params:data
+    });
+}
+
+/**
+ * @description erp镜像 -- 导出
+ */
+export function mirrorExport(data) {
+    return request({
+        url: `export/mirrorExport`,
+        method: 'get',
+		params:data
+    });
+}
+/**
+ * @description erp镜像 -- 列表
+ */
+export function mirrorList(data) {
+    return request({
+        url: `/erp/goods/mirror`,
+        method: 'get',
+		params:data
+    });
+}
+
+/**
+ * @description erp镜像 -- 列表
+ */
+export function addMirror(data) {
+    return request({
+        url: `/erp/goods/mirror_save`,
+        method: 'post',
+		data
+    });
+}
+
 // Route::get('Product/inventory_lst', 'v1.erp.Goods/inventory_lst')->option(['real_name' => '门店盘点单列表']);
 // Route::post('Product/inventory_save', 'v1.erp.Goods/inventory_save')->option(['real_name' => '门店盘点单保存']);
 // Route::post('Product/inventory_auth', 'v1.erp.Goods/inventory_auth')->option(['real_name' => '门店盘点单审核']);

+ 26 - 0
src/api/finance.js

@@ -183,3 +183,29 @@ export function exportUserRechargeApi (data) {
         params: data
     });
 }
+
+//finance/getuserMoneyList
+
+/**
+ * @description 用户充值记录 -- 用户充值记录导出
+ * @param {Number} param data {Number} 请求参数data
+ */
+export function getuserMoneyList (data) {
+    return request({
+        url: `finance/finance/getuserMoneyList`,
+        method: 'get',
+        params: data
+    });
+}
+
+/**
+ * @description 用户充值记录 -- 用户充值记录导出
+ * @param {Number} param data {Number} 请求参数data
+ */
+export function userMoneyExport (data) {
+    return request({
+        url: `export/userMoneyExport`,
+        method: 'get',
+        params: data
+    });
+}

+ 58 - 0
src/api/marketing.js

@@ -8,7 +8,65 @@
 // | Author: CRMEB Team <admin@crmeb.com>
 // +----------------------------------------------------------------------
 import request from '@/plugins/request';
+// expCard
+/**
+ * @description 充值卡--列表
+ * @param {Object} param params {Object} 传值参数
+ */
+export function expCard (params) {
+    return request({
+        url: 'export/CardExport',
+        method: 'get',
+        params
+    });
+}
+// addCzcard
+/**
+ * @description 充值卡--列表
+ * @param {Object} param params {Object} 传值参数
+ */
+export function addCzcard (data) {
+    return request({
+        url: 'marketing/card/create',
+        method: 'post',
+        data
+    });
+}
+/**
+ * @description 充值卡--列表
+ * @param {Object} param params {Object} 传值参数
+ */
+export function cardListApi (params) {
+    return request({
+        url: 'marketing/card/index',
+        method: 'get',
+        params
+    });
+}
+//cardCardListApi
+/**
+ * @description 充值卡--列表
+ * @param {Object} param params {Object} 传值参数
+ */
+export function cardCardListApi (params) {
+    return request({
+        url: 'marketing/card/info_lst',
+        method: 'get',
+        params
+    });
+}
 
+/**
+ * @description 充值卡--列表
+ * @param {Object} param params {Object} 传值参数
+ */
+export function cardCreateApi (params) {
+    return request({
+        url: 'marketing/card/create',
+        method: 'get',
+        params
+    });
+}
 /**
  * @description 优惠券制作--列表
  * @param {Object} param params {Object} 传值参数

+ 34 - 0
src/api/systemAdmin.js

@@ -76,6 +76,18 @@ export function getVersion (data) {
     });
 };
 
+/**
+ * @description 获取收银台版本列表
+ * @param {Object} param data {Object} 传值
+ */
+export function getVersions (data) {
+    return request({
+        url: '/setting/vcopy',
+        method: 'get',
+		  params: data
+    });
+};
+
 
 /**
  * @description 收银台版本添加表单
@@ -87,6 +99,17 @@ export function versionFromApi () {
     });
 };
 
+
+/**
+ * @description 收银台版本添加表单
+ */
+export function versionFromApis () {
+    return request({
+        url: '/setting/vcopy/create',
+        method: 'get'
+    });
+};
+
 /**
  * @description 收银台版本编辑表单
  * @param {Number} param id {Number} 收银台版本id
@@ -96,4 +119,15 @@ export function versionEditFromApi (id) {
         url: `/setting/version/${id}/edit`,
         method: 'get'
     });
+};
+
+/**
+ * @description 收银台版本编辑表单
+ * @param {Number} param id {Number} 收银台版本id
+ */
+export function versionEditFromApis (id) {
+    return request({
+        url: `/setting/vcopy/${id}/edit`,
+        method: 'get'
+    });
 };

+ 1 - 1
src/pages/erp/inventory/stocktaking.vue

@@ -32,7 +32,7 @@
 					<span> {{ row.body.length }}</span>
 				</template>
 				<template slot-scope="{ row, index }" slot="add_time">
-					<span> {{ row.add_time |formatDate }}</span>
+					<span> {{ row.add_time  }}</span>
 				</template>
 				<template slot-scope="{ row, index }" slot="ware">
 					<div>{{row.ware.title}}</div>

+ 705 - 0
src/pages/erp/jingxiang/index.vue

@@ -0,0 +1,705 @@
+<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" :label="item.name">
+								{{item.id}}-{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<!-- <Button type="primary" @click="add" 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-product_add']" 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="is_show">
+					<i-switch v-auth="['admin-erp-product-setshow']" v-model="row.is_show" :value="row.is_show"
+						:true-value="1" :false-value="0" @on-change="changeSwitch(row)" size="large">
+						<span slot="open">上架</span>
+						<span slot="close">下架</span>
+					</i-switch>
+				</template>
+				<template slot-scope="{ row, index }" slot="unit_name_1">
+					<div v-if="row.unit_name_1">
+						<div>名称:{{row.unit_name_1}}</div>
+						<div>转换率:1{{row.unit_name_1}} = {{row.unit_rate_1*1}}{{row.unit_name}}</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="unit_name_2">
+					<div v-if="row.unit_name_2">
+						<div>名称:{{row.unit_name_2}}</div>
+						<div>转换率:1{{row.unit_name_2}} = {{row.unit_rate_2*1}}{{row.unit_name}}</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="is_weigh">
+					{{row.is_weigh == 1?'是': '否'}}
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<!-- 	<a @click="look(row)">详情</a>
+					<Divider type="vertical" /> -->
+					<a @click="edit(row)" v-auth="['admin-erp-product_add']">编辑</a>
+					<!-- <template v-auth="['admin-erp-product-del']">
+						<Divider type="vertical" />
+						<a @click="del(row, '删除商品', index)">删除</a>
+					</template> -->
+					<template v-auth="['admin-erp-product-del']">
+						<Divider type="vertical" />
+						<a @click="tbprod(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>
+		<Modal v-model="modal" scrollable title="创建" class="order_box" :closable="false" :mask-closable="false">
+			<Form ref="remarks" :model="remarks" :label-width="80" @submit.native.prevent>
+				<FormItem label="门店:">
+					<Select v-model="remarks.store_id" clearable filterable @on-change="storeChoose" 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="remarks.create_uid" clearable filterable @on-change="userSearchse" class="input-add">
+						<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
+						</Option>
+					</Select>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button type="primary" @click="putRemark()">创建</Button>
+				<Button @click="cancel()">取消</Button>
+			</div>
+		</Modal>
+		<!-- <productDetail ref="productDetail"></productDetail> -->
+	</div>
+</template>
+
+<script>
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		mapState
+	} from "vuex";
+	import {
+		productInfoApi,
+		cascaderListApi,
+		productAddApi,
+		generateAttrApi,
+		productGetRuleApi,
+		productGetTemplateApi,
+		productGetTempKeysApi,
+		checkActivityApi,
+		labelListApi,
+		productCache,
+		cacheDelete,
+		brandList,
+		productCreateApi,
+		productAllUnit,
+		productUnitCreate,
+		uploadType,
+		productAllEnsure,
+		productLabelAdd,
+		productAllSpecs,
+		allSystemForm
+	} from "@/api/product";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		mirrorList,
+		getUserInfo,
+		getGoodInfo,
+		setShow,
+		mainSetShow,
+		mirrorExport,
+		getUserList,
+		addMirror
+	} from "@/api/erp";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	// import productDetail from './productDetail.vue'
+	import exportExcel from "@/utils/newToExcel.js";
+	export default {
+		name: "jingxiang",
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				remarks: {
+					create_uid: '',
+					create_admin_id: '',
+					store_id: '',
+				},
+				modal: false,
+				staffData: [],
+				stId: '',
+				jgTime: 50,
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "商品名称",
+						key: "store_name",
+						minWidth: 90,
+					},
+
+					{
+						title: "总销量",
+						key: "all_sales",
+						minWidth: 90,
+					},
+					{
+						title: "总库存",
+						key: "stock",
+						minWidth: 90,
+					},
+					{
+						title: "单位",
+						key: "unit_name",
+						minWidth: 90,
+					},
+					{
+						title: "上下架",
+						slot: "is_show",
+						minWidth: 90,
+					},
+					{
+						title: "大单位",
+						slot: "unit_name_1",
+						minWidth: 90,
+					},
+					{
+						title: "超大单位",
+						slot: "unit_name_2",
+						minWidth: 90,
+					},
+					{
+						title: "商品条码",
+						key: "bar_code",
+						minWidth: 90,
+					},
+					{
+						title: "成本价",
+						key: "cost",
+						minWidth: 90,
+					},
+					{
+						title: "是否称重",
+						slot: "is_weigh",
+						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: "",
+					store_id: '',
+					key: '',
+					page: 1,
+					limit: 10,
+				},
+				total: 0,
+				loadingss: false,
+				isDan: false,
+				ylprod: [],
+				ylLen: 0,
+				authLists: []
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			this.getList();
+			this.staffList()
+		},
+		methods: {
+			putRemark() {
+				addMirror(this.remarks).then(res => {
+					
+				})
+			},
+			cancel(){
+				this.remarks = {
+					create_admin_id: '',
+					create_uid: '',
+					store_id: ''
+				};
+				this.modal = false
+			},
+			userSearchse(e) {
+				let auth = this.authLists.find(item => item.id == e)
+				this.remarks.create_admin_id = auth.admin_id
+			},
+			handleFileSelect(event) {
+				console.log(event, 'event')
+				const file = event.target.files[0]
+				const reader = new FileReader()
+				reader.readAsText(file, "UTF-8")
+				reader.onload = (evt) => {
+					let fileString = evt.target.result;
+					fileString = fileString.replace(/\n/g, ',').replace(/\r/g, '')
+					// const count = fileString.trim().split('\n').length
+					this.ylprod = fileString.split(',');
+					this.ylLen = this.ylprod.length;
+					// this.bgProd()
+					// console.log(typeof(fileString),fileString,arr,'fileString',evt)
+					// this.dataArr = []
+					// for (let index = 1; index < count; index++) {
+					// 	const fileline = fileString.split("\r\n")[index].split(",")[0]
+					// 	const filelineNumber = (fileline.split(/\s+/)).map(Number)
+					// 	this.dataArr.push(filelineNumber)
+					// }
+				}
+			},
+			bgProd(index = 0) {
+				let that = this
+				if (index == that.ylLen) return;
+				// 获取商品信息
+				getGoods({
+					id: that.ylprod[index]
+				}).then(res => {
+					// console.log(res.data.data)
+					let arr = res.data.data;
+					if (arr.length > 0) {
+						let qdata = that.setUpdate(arr[0])
+						// console.log(qdata)
+						productAddApi(qdata).then(ress => {
+							that.$Message.success(ress.msg);
+							index++;
+							that.bgProd(index);
+
+						})
+					}
+				})
+			},
+			tbprod(row, index) {
+				this.isDan = true;
+				this.upGoods(row, index)
+			},
+			changeSwitch(row) {
+				console.log(row, row.id, row.is_show)
+				if (!this.tableFrom.store_id) {
+					mainSetShow({
+						id: row.id,
+						is_show: row.is_show
+					}).then(res => {
+						this.$Message.success(res.msg);
+						this.getList(1)
+					}).catch(err => {
+						this.$Message.success(err.msg);
+						this.getList(1)
+					})
+				} else {
+					setShow({
+						store_id: this.tableFrom.store_id,
+						id: row.id,
+						is_show: row.is_show
+					}).then(res => {
+						this.$Message.success(res.msg);
+						this.getList(1)
+					}).catch(err => {
+						this.$Message.success(err.msg);
+						this.getList(1)
+					})
+				}
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			userSearchs(e) {
+				this.getList(1)
+			},
+			begin(index = 0) {
+				// if(this.)
+				let that = this;
+				let len = that.tableList.length;
+				if (index == len) {
+					this.tableFrom.page++;
+					this.loadingss = true
+					this.getList()
+					return;
+				};
+				console.log('开始');
+				setTimeout(() => {
+					that.upGoods(that.tableList[index], index)
+				}, that.jgTime)
+				// that.upGoods(that.tableList[index],index)
+			},
+			setUpdate(good) {
+				return {
+					"stock": 10,
+					"is_weigh": good.is_weigh,
+					"applicable_store_id": [],
+					"system_form_id": 0,
+					"is_presale_product": 0,
+					"is_limit": 0,
+					"limit_type": 1,
+					"limit_num": 1,
+					"is_vip_product": 0,
+					"is_support_refund": 1,
+					"disk_info": "",
+					"presale_day": 1,
+					"presale_time": [],
+					"auto_on_time": "",
+					"video_open": false,
+					"store_name": good.store_name,
+					"freight": 1,
+					"postage": 0,
+					"custom_form": [],
+					"cate_id": [
+						1,
+						2
+					],
+					"label_id": [],
+					"ensure_id": [],
+					"keyword": "",
+					"applicable_type": 0,
+					"unit_name": good.unit_name,
+					"specs_id": 0,
+					"store_info": "",
+					"bar_code": good.bar_code,
+					"code": "",
+					"image": "",
+					"recommend_image": "",
+					"slider_image": [
+						"https://shop.yiqucguoyuan.com/uploads/attach/2024/07/20240724/efb26cf8e741fa950209589f58e0df5a.png"
+					],
+					"description": "<p>" + good.store_name + "<br/></p>",
+					"ficti": 0,
+					"give_integral": 0,
+					"sort": 0,
+					"is_show": 1,
+					"is_hot": 0,
+					"is_benefit": 0,
+					"is_best": 0,
+					"is_new": 0,
+					"is_good": 0,
+					"is_postage": 0,
+					"is_sub": [],
+					"id": 0,
+					"spec_type": 0,
+					"video_link": "",
+					"temp_id": "",
+					"attrs": [{
+						"pic": "https://shop.yiqucguoyuan.com/uploads/attach/2024/07/20240724/efb26cf8e741fa950209589f58e0df5a.png",
+						"price": good.price,
+						"settle_price": 0,
+						"cost": 0,
+						"ot_price": 0,
+						"erp_product_id": good.id,
+						"unit": good.unit_name,
+						"uint_to_erp_unit": 1,
+						"bar_code": good.bar_code,
+						"code": "",
+						"weight": good.is_weigh,
+						"volume": 0,
+						"brokerage": 0,
+						"brokerage_two": 0,
+						"vip_price": good.vip_price,
+						"virtual_list": [],
+						"write_times": 0,
+						"write_valid": 1,
+						"days": 1
+					}],
+					"items": [],
+					"activity": [
+						"默认",
+						"秒杀",
+						"砍价",
+						"拼团"
+					],
+					"couponName": [],
+					"header": [],
+					"selectRule": "",
+					"coupon_ids": [],
+					"command_word": "",
+					"delivery_type": [
+						"1",
+						"3",
+						"2"
+					],
+					"specs": [],
+					"recommend_list": [],
+					"brand_id": [],
+					"product_type": 0,
+					"type": 0,
+					"store_label_id": []
+				}
+			},
+			upGoods(good, index) {
+				let qdata = this.setUpdate()
+				if (this.stId && this.stId > good.id) {
+					return;
+				}
+				productAddApi(qdata).then(res => {
+					this.$Message.success(res.msg);
+					if (this.isDan) {
+						return this.isDan = false;
+					} else {
+						index++;
+						this.begin(index);
+					}
+
+				})
+			},
+			look(row) {
+				try {
+					this.$refs.productDetail.getInfo(row.id)
+				} catch (e) {
+					//TODO handle the exception
+
+				}
+				// getGoodInfo(row.id).then(res=> {
+				// 	console.log(res,'商品详情');
+				// })
+
+			},
+			// 添加
+			add() {
+				this.modal = true
+				// this.$router.push({
+				// 	path: this.roterPre + "/erp/product_add?id=0"
+				// });
+			},
+			storeChoose(row) {
+				console.log('xje',row)
+				try{
+					let qdata = {}
+					qdata.store_id = row;
+					this.authLists = [];
+					this.remarks.create_uid = '';
+					this.remarks.create_admin_id = '';
+					getUserList(qdata).then(res => {
+						this.authLists = res.data.data;
+					})
+				}catch(e) {
+					console.log(e)
+				}
+				
+		},
+		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() {
+			mirrorExport({
+					store_id: this.tableFrom.store_id
+				})
+				.then((res) => {
+					// location.href = res.data[0];
+					let data = res.data
+					exportExcel(data.header, data.filekey, data.fileName, data.export);
+				})
+				.catch((res) => {
+					this.$Message.error(res.msg);
+				});
+		},
+		// 编辑
+		edit(row) {
+			this.$router.push({
+				path: this.roterPre + "/erp/product_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/goods/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 || "";
+			mirrorList(this.tableFrom)
+				.then(async (res) => {
+					let data = res.data;
+					this.tableList = data.data;
+					this.total = data.count;
+					this.loading = false;
+					if (this.loadingss && this.tableList.length > 0) {
+						this.begin(0)
+					}
+				})
+				.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>

+ 2 - 1
src/pages/erp/losses/index.vue

@@ -53,7 +53,8 @@
 			<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="where">
-					<span> {{ row.tware.title || row.tstore.name }}</span>
+					<span> {{ row.tware&& row.tware.id ?row.tware.title :''  }}{{row.tstore&&row.tstore.id? row.tstore.name:''}}</span>
+					<!-- <span> {{ row.tware&& row.tware.id ?row.tware.title + '(仓库)':''  }}{{row.tstore&&row.tstore.id? row.tstore.name + '(门店)':''}}</span> -->
 				</template>
 				<template slot-scope="{ row, index }" slot="cuser">
 					<span> {{ row.cuser.staff_name }}</span>

+ 8 - 8
src/pages/erp/out/goodDetail.vue

@@ -24,9 +24,9 @@
 				<template slot-scope="{ row, index }" slot="price">
 					<span> {{ row.out_price == 0? row.price:row.out_price }}</span>
 				</template>
-				<template slot-scope="{ row, index }" slot="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>
+				</template> -->
 				</Table>
 			<div class="acea-row row-right page">
 				<Page :total="total" :current="formValidate.page" show-elevator show-total @on-change="pageChange"
@@ -94,11 +94,11 @@
 						slot: 'price',
 						minWidth: 200
 					},
-					{
-						title: '库存',
-						key: 'product_num',
-						minWidth: 200
-					},
+					// {
+					// 	title: '库存',
+					// 	key: 'product_num',
+					// 	minWidth: 200
+					// },
 					{
 						title: '单位',
 						key: 'unit_name',
@@ -189,7 +189,7 @@
 				}
 				getOutGoodList(this.formValidate).then(async res => {
 					let data = res.data;
-					this.tabList = data.data.filter(item => item.product_num > 0);
+					this.tabList = data.data
 					this.total = data.count;
 					this.loading = false;
 				}).catch(res => {

+ 2 - 2
src/pages/erp/product/addProduct.vue

@@ -73,7 +73,7 @@
 						<span class="addClass" @click="addUnit" v-if="merchantType!=1">新增单位</span>
 					</FormItem>
 					</Col>
-					<!-- <Col span="24">
+					<Col span="24">
 					<FormItem label="大单位:" prop="unit_name_1">
 						<Select v-model="formValidate.unit_name_1" clearable filterable v-width="'50%'"
 							placeholder="请输入大单位">
@@ -104,7 +104,7 @@
 					<FormItem label="超大单位转化率:" prop="unit_rate_2" v-if="formValidate.unit_name_2">
 						<Input v-model="formValidate.unit_rate_2" placeholder="请输入超大单位转化率" v-width="'50%'" />
 					</FormItem>
-					</Col> -->
+					</Col>
 					<Col span="24">
 					<FormItem label="商品推荐图:">
 						<div class="acea-row">

+ 268 - 131
src/pages/erp/product/index.vue

@@ -4,6 +4,7 @@
 		<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">
@@ -30,10 +31,20 @@
               <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" :label="item.name">
+								{{item.id}}-{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
 					<FormItem label="商品搜索:" label-for="name">
 						<Input class="input-add mr14" placeholder="请输入商品名称" v-model="tableFrom.key" />
 						<Button type="primary" @click="tableSearchs()">查询</Button>
-						<!-- <Input class="input-add mr14" placeholder="请输入商品名称" v-model="jgTime" />
+						<!-- <input type="file" @change="handleFileSelect"> -->
+						<!-- <Input class="input-add mr14" placeholder="请输入间隔时间" v-model="jgTime" />
+						<Input class="input-add mr14" placeholder="请输入停止id" v-model="stId" />
 						<Button type="primary" @click="begin(0)">添加商品</Button>
 						<Button type="primary" @click="loadingss = false">本页结束停止</Button> -->
 					</FormItem>
@@ -45,7 +56,7 @@
             class="mr10"
             >批量添加积分商品</Button
           > -->
-					<!--<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>-->
+					<Button v-auth="['export-storeSeckill']" class="export" icon="ios-share-outline" @click="exports">导出</Button>
 				</Form>
 			</div>
 		</Card>
@@ -67,6 +78,13 @@
 				<template slot-scope="{ row, index }" slot="number">
 					<span> {{ row.bin_number.slice(4) }}</span>
 				</template>
+				<template slot-scope="{ row, index }" slot="is_show">
+					<i-switch v-auth="['admin-erp-product-setshow']" v-model="row.is_show" :value="row.is_show"
+						:true-value="1" :false-value="0" @on-change="changeSwitch(row)" size="large">
+						<span slot="open">上架</span>
+						<span slot="close">下架</span>
+					</i-switch>
+				</template>
 				<template slot-scope="{ row, index }" slot="unit_name_1">
 					<div v-if="row.unit_name_1">
 						<div>名称:{{row.unit_name_1}}</div>
@@ -83,11 +101,17 @@
 					{{row.is_weigh == 1?'是': '否'}}
 				</template>
 				<template slot-scope="{ row, index }" slot="action">
-				<!-- 	<a @click="look(row)">详情</a>
+					<!-- 	<a @click="look(row)">详情</a>
 					<Divider type="vertical" /> -->
 					<a @click="edit(row)" v-auth="['admin-erp-product_add']">编辑</a>
-					<!-- <Divider type="vertical" />
-					<a @click="del(row, '删除仓位', index)">删除</a> -->
+					<!-- <template v-auth="['admin-erp-product-del']">
+						<Divider type="vertical" />
+						<a @click="del(row, '删除商品', index)">删除</a>
+					</template> -->
+					<template v-auth="['admin-erp-product-del']">
+						<Divider type="vertical" />
+						<a @click="tbprod(row,index)">同步商品</a>
+					</template>
 				</template>
 			</Table>
 			<div class="acea-row row-right page">
@@ -95,12 +119,15 @@
 					:page-size="tableFrom.limit" />
 			</div>
 		</Card>
-		
+
 		<productDetail ref="productDetail"></productDetail>
 	</div>
 </template>
 
 <script>
+	import {
+		staffListInfo
+	} from "@/api/store";
 	import {
 		mapState
 	} from "vuex";
@@ -134,7 +161,10 @@
 	import {
 		getGoods,
 		getUserInfo,
-		getGoodInfo
+		getGoodInfo,
+		setShow,
+		mainSetShow,
+		erpProductExport
 	} from "@/api/erp";
 	import {
 		formatDate
@@ -142,6 +172,7 @@
 	import timeOptions from "@/utils/timeOptions";
 	import Setting from "@/setting";
 	import productDetail from './productDetail.vue'
+	import exportExcel from "@/utils/newToExcel.js";
 	export default {
 		name: "godownList",
 		components: {
@@ -157,6 +188,8 @@
 		},
 		data() {
 			return {
+				staffData: [],
+				stId: '',
 				jgTime: 50,
 				roterPre: Setting.roterPre,
 				loading: false,
@@ -171,7 +204,7 @@
 						key: "store_name",
 						minWidth: 90,
 					},
-					
+
 					{
 						title: "总销量",
 						key: "all_sales",
@@ -183,10 +216,15 @@
 						minWidth: 90,
 					},
 					{
-						title: "基础单位",
+						title: "单位",
 						key: "unit_name",
 						minWidth: 90,
 					},
+					{
+						title: "上下架",
+						slot: "is_show",
+						minWidth: 90,
+					},
 					{
 						title: "大单位",
 						slot: "unit_name_1",
@@ -232,12 +270,16 @@
 					// integral_time: "",
 					// is_show: "",
 					// store_name: "",
+					store_id: '',
 					key: '',
 					page: 1,
 					limit: 10,
 				},
 				total: 0,
-				loadingss: false
+				loadingss: false,
+				isDan: false,
+				ylprod: [],
+				ylLen: 0
 			};
 		},
 		computed: {
@@ -251,141 +293,238 @@
 		},
 		created() {
 			this.getList();
+			this.staffList()
 		},
 		methods: {
-			begin(index=0) {
+			handleFileSelect(event) {
+				console.log(event,'event')
+				const file = event.target.files[0]
+				const reader = new FileReader()
+				reader.readAsText(file, "UTF-8")
+				reader.onload = (evt) => {
+					let fileString = evt.target.result;
+					fileString = fileString.replace(/\n/g,',').replace(/\r/g,'')
+					// const count = fileString.trim().split('\n').length
+					this.ylprod = fileString.split(',');
+					this.ylLen = this.ylprod.length;
+					// this.bgProd()
+					// console.log(typeof(fileString),fileString,arr,'fileString',evt)
+					// this.dataArr = []
+					// for (let index = 1; index < count; index++) {
+					// 	const fileline = fileString.split("\r\n")[index].split(",")[0]
+					// 	const filelineNumber = (fileline.split(/\s+/)).map(Number)
+					// 	this.dataArr.push(filelineNumber)
+					// }
+				}
+			},
+			bgProd(index = 0) {
+				let that = this
+				if(index == that.ylLen) return;
+				// 获取商品信息
+				getGoods({
+					id: that.ylprod[index]
+				}).then(res => {
+					// console.log(res.data.data)
+					let arr = res.data.data;
+					if(arr.length > 0) {
+						let qdata = that.setUpdate(arr[0])
+						// console.log(qdata)
+						productAddApi(qdata).then(ress => {
+							that.$Message.success(ress.msg);
+							index++;
+							that.bgProd(index);
+						
+						})
+					}
+				})
+			},
+			tbprod(row, index) {
+				this.isDan = true;
+				this.upGoods(row, index)
+			},
+			changeSwitch(row) {
+				console.log(row, row.id, row.is_show)
+				if (!this.tableFrom.store_id) {
+					mainSetShow({
+						id: row.id,
+						is_show: row.is_show
+					}).then(res => {
+						this.$Message.success(res.msg);
+						this.getList(1)
+					}).catch(err => {
+						this.$Message.success(err.msg);
+						this.getList(1)
+					})
+				} else {
+					setShow({
+						store_id: this.tableFrom.store_id,
+						id: row.id,
+						is_show: row.is_show
+					}).then(res => {
+						this.$Message.success(res.msg);
+						this.getList(1)
+					}).catch(err => {
+						this.$Message.success(err.msg);
+						this.getList(1)
+					})
+				}
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			userSearchs(e) {
+				this.getList(1)
+			},
+			begin(index = 0) {
 				// if(this.)
 				let that = this;
 				let len = that.tableList.length;
-				if(index == len) {
+				if (index == len) {
 					this.tableFrom.page++;
 					this.loadingss = true
 					this.getList()
+					return;
 				};
 				console.log('开始');
-				setTimeout(()=> {
-					that.upGoods(that.tableList[index],index)
-				},that.jgTime)
+				setTimeout(() => {
+					that.upGoods(that.tableList[index], index)
+				}, that.jgTime)
 				// that.upGoods(that.tableList[index],index)
 			},
-			upGoods(good,index) {
-				let qdata = {
-				    "is_weigh": good.is_weigh,
-				    "applicable_store_id": [],
-				    "system_form_id": 0,
-				    "is_presale_product": 0,
-				    "is_limit": 0,
-				    "limit_type": 1,
-				    "limit_num": 1,
-				    "is_vip_product": 0,
-				    "is_support_refund": 1,
-				    "disk_info": "",
-				    "presale_day": 1,
-				    "presale_time": [],
-				    "auto_on_time": "",
-				    "video_open": false,
-				    "store_name": good.store_name,
-				    "freight": 1,
-				    "postage": 0,
-				    "custom_form": [],
-				    "cate_id": [
-				        1,
-				        2
-				    ],
-				    "label_id": [],
-				    "ensure_id": [],
-				    "keyword": "",
-				    "applicable_type": 1,
-				    "unit_name": good.unit_name,
-				    "specs_id": 0,
-				    "store_info": "",
-				    "bar_code": "",
-				    "code": "",
-				    "image": "",
-				    "recommend_image": "",
-				    "slider_image": [
-				        "https://shop.yiqucguoyuan.com/uploads/attach/2024/07/20240724/efb26cf8e741fa950209589f58e0df5a.png"
-				    ],
-				    "description": "<p>"+ good.store_name + "<br/></p>",
-				    "ficti": 0,
-				    "give_integral": 0,
-				    "sort": 0,
-				    "is_show": 1,
-				    "is_hot": 0,
-				    "is_benefit": 0,
-				    "is_best": 0,
-				    "is_new": 0,
-				    "is_good": 0,
-				    "is_postage": 0,
-				    "is_sub": [],
-				    "id": 0,
-				    "spec_type": 0,
-				    "video_link": "",
-				    "temp_id": "",
-				    "attrs": [
-				        {
-				            "pic": "https://shop.yiqucguoyuan.com/uploads/attach/2024/07/20240724/efb26cf8e741fa950209589f58e0df5a.png",
-				            "price": good.price,
-				            "settle_price": 0,
-				            "cost": 0,
-				            "ot_price": 0,
-				            "erp_product_id": good.id,
-				            "unit": good.unit_name,
-				            "uint_to_erp_unit": 1,
-				            "bar_code": good.bar_code,
-				            "code": "",
-				            "weight": good.is_weigh,
-				            "volume": 0,
-				            "brokerage": 0,
-				            "brokerage_two": 0,
-				            "vip_price": good.vip_price,
-				            "virtual_list": [],
-				            "write_times": 0,
-				            "write_valid": 1,
-				            "days": 1
-				        }
-				    ],
-				    "items": [],
-				    "activity": [
-				        "默认",
-				        "秒杀",
-				        "砍价",
-				        "拼团"
-				    ],
-				    "couponName": [],
-				    "header": [],
-				    "selectRule": "",
-				    "coupon_ids": [],
-				    "command_word": "",
-				    "delivery_type": [
-				        "1",
-				        "3",
-				        "2"
-				    ],
-				    "specs": [],
-				    "recommend_list": [],
-				    "brand_id": [],
-				    "product_type": 0,
-				    "type": 0,
-				    "store_label_id": []
+			setUpdate(good) {
+				return {
+					"stock": 10,
+					"is_weigh": good.is_weigh,
+					"applicable_store_id": [],
+					"system_form_id": 0,
+					"is_presale_product": 0,
+					"is_limit": 0,
+					"limit_type": 1,
+					"limit_num": 1,
+					"is_vip_product": 0,
+					"is_support_refund": 1,
+					"disk_info": "",
+					"presale_day": 1,
+					"presale_time": [],
+					"auto_on_time": "",
+					"video_open": false,
+					"store_name": good.store_name,
+					"freight": 1,
+					"postage": 0,
+					"custom_form": [],
+					"cate_id": [
+						1,
+						2
+					],
+					"label_id": [],
+					"ensure_id": [],
+					"keyword": "",
+					"applicable_type": 0,
+					"unit_name": good.unit_name,
+					"specs_id": 0,
+					"store_info": "",
+					"bar_code": good.bar_code,
+					"code": "",
+					"image": "",
+					"recommend_image": "",
+					"slider_image": [
+						"https://shop.yiqucguoyuan.com/uploads/attach/2024/07/20240724/efb26cf8e741fa950209589f58e0df5a.png"
+					],
+					"description": "<p>" + good.store_name + "<br/></p>",
+					"ficti": 0,
+					"give_integral": 0,
+					"sort": 0,
+					"is_show": 1,
+					"is_hot": 0,
+					"is_benefit": 0,
+					"is_best": 0,
+					"is_new": 0,
+					"is_good": 0,
+					"is_postage": 0,
+					"is_sub": [],
+					"id": 0,
+					"spec_type": 0,
+					"video_link": "",
+					"temp_id": "",
+					"attrs": [{
+						"pic": "https://shop.yiqucguoyuan.com/uploads/attach/2024/07/20240724/efb26cf8e741fa950209589f58e0df5a.png",
+						"price": good.price,
+						"settle_price": 0,
+						"cost": 0,
+						"ot_price": 0,
+						"erp_product_id": good.id,
+						"unit": good.unit_name,
+						"uint_to_erp_unit": 1,
+						"bar_code": good.bar_code,
+						"code": "",
+						"weight": good.is_weigh,
+						"volume": 0,
+						"brokerage": 0,
+						"brokerage_two": 0,
+						"vip_price": good.vip_price,
+						"virtual_list": [],
+						"write_times": 0,
+						"write_valid": 1,
+						"days": 1
+					}],
+					"items": [],
+					"activity": [
+						"默认",
+						"秒杀",
+						"砍价",
+						"拼团"
+					],
+					"couponName": [],
+					"header": [],
+					"selectRule": "",
+					"coupon_ids": [],
+					"command_word": "",
+					"delivery_type": [
+						"1",
+						"3",
+						"2"
+					],
+					"specs": [],
+					"recommend_list": [],
+					"brand_id": [],
+					"product_type": 0,
+					"type": 0,
+					"store_label_id": []
+				}
+			},
+			upGoods(good, index) {
+				let qdata = this.setUpdate()
+				if (this.stId && this.stId > good.id) {
+					return;
 				}
 				productAddApi(qdata).then(res => {
 					this.$Message.success(res.msg);
-					index++;
-					this.begin(index);
+					if (this.isDan) {
+						return this.isDan = false;
+					} else {
+						index++;
+						this.begin(index);
+					}
+
 				})
 			},
 			look(row) {
-				try{
+				try {
 					this.$refs.productDetail.getInfo(row.id)
-				}catch(e){
+				} catch (e) {
 					//TODO handle the exception
-					
+
 				}
 				// getGoodInfo(row.id).then(res=> {
 				// 	console.log(res,'商品详情');
 				// })
-				
+
 			},
 			// 添加
 			add() {
@@ -408,15 +547,13 @@
 			},
 			// 导出
 			exports() {
-				let formValidate = this.tableFrom;
-				let data = {
-					start_status: formValidate.start_status,
-					status: formValidate.status,
-					store_name: formValidate.store_name,
-				};
-				storeSeckillApi(data)
+				erpProductExport({
+					store_id: this.tableFrom.store_id
+				})
 					.then((res) => {
-						location.href = res.data[0];
+						// location.href = res.data[0];
+						let data = res.data
+						exportExcel(data.header, data.filekey, data.fileName, data.export);
 					})
 					.catch((res) => {
 						this.$Message.error(res.msg);
@@ -439,7 +576,7 @@
 				let delfromData = {
 					title: tit,
 					num: num,
-					url: `/erp/Warehouse/position_del/${row.id}`,
+					url: `/erp/goods/del/${row.id}`,
 					method: "DELETE",
 					ids: "",
 				};
@@ -468,7 +605,7 @@
 						this.tableList = data.data;
 						this.total = data.count;
 						this.loading = false;
-						if(this.loadingss && this.tableList.length > 0) {
+						if (this.loadingss && this.tableList.length > 0) {
 							this.begin(0)
 						}
 					})

+ 46 - 17
src/pages/erp/purchase/index.vue

@@ -13,7 +13,7 @@
 							</Option>
 						</Select>
 					</FormItem>
-					<FormItem label="审核人:" >
+					<FormItem label="审核人:">
 						<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 }}
@@ -90,7 +90,8 @@
 					<div>{{row.supplier.supplier_name}}</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="product">
-					<div v-for="item in row.info">{{item.product_name}}-<a>{{item.product_num*1}}{{item.unit_name}}</a></div>
+					<div v-for="item in row.info">{{item.product_name}}-<a>{{item.product_num*1}}{{item.unit_name}}</a>
+					</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="cuser">
 					<div>{{row.cuser.staff_name}}</div>
@@ -187,16 +188,18 @@
 					<Input v-model="list[index].total_price" placeholder="请输入总价" v-width="'120'" type="number" />
 				</template>
 				<template slot-scope="{ row, index }" slot="net_weight">
-					<Input v-model="list[index].net_weight" placeholder="请输入净重" v-width="'120'" type="number" disabled/>
+					<Input v-model="list[index].net_weight" placeholder="请输入净重" v-width="'120'" type="number"
+						disabled />
 				</template>
 				<template slot-scope="{ row, index }" slot="tare_weight">
-					<Input v-model="list[index].tare_weight" placeholder="请输入皮重" v-width="'120'" type="number" disabled/>
+					<Input v-model="list[index].tare_weight" placeholder="请输入皮重" v-width="'120'" type="number"
+						disabled />
 				</template>
 				<template slot-scope="{ row, index }" slot="dan">
-					<Input v-model="list[index].dan" placeholder="请输入单个皮重" v-width="'120'" type="number"/>
+					<Input v-model="list[index].dan" placeholder="请输入单个皮重" v-width="'120'" type="number" />
 				</template>
 				<template slot-scope="{ row, index }" slot="zong">
-					<Input v-model="list[index].zong" placeholder="请输入总重" v-width="'120'" type="number"/>
+					<Input v-model="list[index].zong" placeholder="请输入总重" v-width="'120'" type="number" />
 				</template>
 
 			</Table>
@@ -372,7 +375,8 @@
 					purchasing_person_admin_id: "",
 					purchasing_person_uid: "",
 					loading: false,
-					columns: [{
+					columns: [
+						{
 							title: "ID",
 							key: "id",
 							width: 80,
@@ -446,7 +450,32 @@
 						type: 'selection',
 						width: 60,
 						align: 'center'
-					}, {
+					},
+					{
+							type: 'expand',
+							width: 50,
+							render: (h, {
+								row: {
+									id,
+									info
+								}
+							}) => {
+								return h('div', {
+									style: {
+										'display': 'flex',
+										'flex-wrap': 'wrap'
+									}
+								}, info.map(item => {
+									return h('div', {
+										style: {
+											width: '25%'
+										}
+									}, [h('span', item.product_name + ' '), h('a', item
+										.product_num + ' ' + item.unit_name)])
+								}))
+							}
+						},
+					{
 						title: "ID",
 						key: "id",
 						width: 80,
@@ -467,11 +496,11 @@
 						slot: "ware",
 						minWidth: 200,
 					},
-					{
-						title: "采购商品",
-						slot: "product",
-						minWidth: 200,
-					},
+					// {
+					// 	title: "采购商品",
+					// 	slot: "product",
+					// 	minWidth: 200,
+					// },
 					{
 						title: "供应商",
 						slot: "supplier",
@@ -795,8 +824,8 @@
 				// console.log(this.list);
 				let that = this
 				let arr = this.list.map(item => {
-					item.tare_weight = (item.pur_num*1*item.dan).toFixed(3)
-					item.net_weight = (item.zong*1 - item.tare_weight*1).toFixed(3)
+					item.tare_weight = (item.pur_num * 1 * item.dan).toFixed(3)
+					item.net_weight = (item.zong * 1 - item.tare_weight * 1).toFixed(3)
 					if (item.is_weigh == 0) {
 						item.pur_weigh = item.pur_num * 1 * item.rate
 					} else {
@@ -807,12 +836,12 @@
 				// console.log('arr', arr);
 				let ok = true;
 				arr.forEach(item => {
-					if(item.net_weight*1 <= 0) {
+					if (item.net_weight * 1 <= 0) {
 						ok = false;
 						return that.$Message.error(item.product_name + '净重不能为0');
 					}
 				})
-				if(!ok) {
+				if (!ok) {
 					return;
 				}
 				savePurchase(this.endobj.id, {

+ 54 - 59
src/pages/erp/store/storeStock.vue

@@ -68,11 +68,12 @@
 					<span> {{ row.bin_number.slice(2,3) }}</span>
 				</template>
 				<template slot-scope="{ row, index }" slot="num">
-					<!-- <span> {{ row.body.length }}</span> -->
-					<div v-for="item in row.body">{{item.product_name}}:<a>{{item.new_stock}}</a></div>
+					<span> {{ row.body.length }}</span>
+					<!-- <div v-for="item in row.body">{{item.product_name}}:<a> {{item.new_stock}} {{item.unit_name}}</a>
+					</div> -->
 				</template>
 				<template slot-scope="{ row, index }" slot="add_time">
-					<span> {{ row.add_time |formatDate }}</span>
+					<span> {{ row.add_time }}</span>
 				</template>
 				<template slot-scope="{ row, index }" slot="ware">
 					<div>{{row.store.name}}</div>
@@ -88,7 +89,7 @@
 						<Divider type="vertical" />
 						<a @click="pass(row)">审核</a>
 					</template>
-<!-- 					<template v-if="row.status == 0" v-auth="['admin-erp-store_stock_add']">
+					<!-- 					<template v-if="row.status == 0" v-auth="['admin-erp-store_stock_add']">
 						<Divider type="vertical" />
 						<a @click="edit(row)">编辑</a>
 					</template> -->
@@ -100,54 +101,34 @@
 					:page-size="tableFrom.limit" />
 			</div>
 		</Card>
-		<Modal
-		  v-model="modalpass"
-		  scrollable
-		  title="审核"
-		  class="order_box"
-		  :closable="false"
-		  :mask-closable="false"
-		>
-		  <Form
-		    ref="remarks"
-		    :model="remarks"
-		    :label-width="80"
-		    @submit.native.prevent
-		  >
-		    <FormItem label="审核人:">
-			  <Select v-model="remarks.auth_uid" clearable filterable @on-change="userSearchse"
-			  	class="input-add">
-			  	<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
-			  	</Option>
-			  </Select>
-		    </FormItem>
-			<FormItem label="状态:">
-			  <Select v-model="remarks.status" clearable filterable 
-			  	class="input-add">
-			  	<Option :value="1" >通过</Option>
-				<Option :value="-1" >拒绝</Option>
-				<!-- <Option :value="2" >部分完成</Option>
+		<Modal v-model="modalpass" scrollable title="审核" class="order_box" :closable="false" :mask-closable="false">
+			<Form ref="remarks" :model="remarks" :label-width="80" @submit.native.prevent>
+				<FormItem label="审核人:">
+					<Select v-model="remarks.auth_uid" clearable filterable @on-change="userSearchse" class="input-add">
+						<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
+						</Option>
+					</Select>
+				</FormItem>
+				<FormItem label="状态:">
+					<Select v-model="remarks.status" clearable filterable class="input-add">
+						<Option :value="1">通过</Option>
+						<Option :value="-1">拒绝</Option>
+						<!-- <Option :value="2" >部分完成</Option>
 				<Option :value="3" >完成</Option>
 				<Option :value="-2" >无效</Option> -->
-			  </Select>
-			</FormItem>
-			<FormItem label="拒绝原因:">
-			  <Input
-			      v-model="remarks.auth_remark"
-			      maxlength="200"
-			      show-word-limit
-			      type="textarea"
-			      placeholder="如拒绝请填写原因"
-			      style="width: 100%"
-			    />
-			</FormItem>
-		  </Form>
-		  <div slot="footer">
-		    <Button type="primary" @click="putRemark()">提交</Button>
-		    <Button @click="cancel()">取消</Button>
-		  </div>
-		  </Modal>
-		  <stocktakingDetail ref="stocktakingDetail"></stocktakingDetail>
+					</Select>
+				</FormItem>
+				<FormItem label="拒绝原因:">
+					<Input v-model="remarks.auth_remark" maxlength="200" show-word-limit type="textarea"
+						placeholder="如拒绝请填写原因" style="width: 100%" />
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button type="primary" @click="putRemark()">提交</Button>
+				<Button @click="cancel()">取消</Button>
+			</div>
+		</Modal>
+		<stocktakingDetail ref="stocktakingDetail"></stocktakingDetail>
 	</div>
 </template>
 
@@ -194,9 +175,9 @@
 		},
 		data() {
 			return {
-				modalpass:false,
+				modalpass: false,
 				authList: [],
-				authLists: [],//审核员列表
+				authLists: [], //审核员列表
 				remarks: {
 					id: 0,
 					status: '',
@@ -204,11 +185,25 @@
 					auth_admin_id: "",
 					auth_remark: '',
 				},
-				data1: [],//仓库列表
+				data1: [], //仓库列表
 				roterPre: Setting.roterPre,
 				loading: false,
 				options: timeOptions,
 				columns1: [{
+						type: 'expand',
+						width: 50,
+						render: (h, {
+							row: {
+								id,
+								body
+							}
+						}) => {
+							return h('div',{style:{'display':'flex','flex-wrap':'wrap'}}, body.map(item=> {
+								return h('div',{style:{width: '25%'}},[h('span',item.product_name + ' '),h('a',item.new_stock + ' '+item.unit_name)])
+							}))
+						}
+					},
+					{
 						title: "ID",
 						key: "id",
 						width: 80,
@@ -219,7 +214,7 @@
 						minWidth: 90,
 					},
 					{
-						title: "商品数量",
+						title: "商品种类",
 						slot: "num",
 						minWidth: 90,
 					},
@@ -330,7 +325,7 @@
 				this.$refs.stocktakingDetail.getInfo(row.id);
 			},
 			putRemark() {
-				if(this.remarks.status == -1 && this.remarks.auth_remark == '') {
+				if (this.remarks.status == -1 && this.remarks.auth_remark == '') {
 					return this.$Message.error('请输入拒绝原因');
 				}
 				authMdInventory(this.remarks).then(res => {
@@ -340,11 +335,12 @@
 			},
 			cancel() {
 				this.remarks = {
-					id:0,
+					id: 0,
 					status: '',
 					auth_uid: "",
-					auth_admin_id: "",}
-					this.modalpass = false
+					auth_admin_id: "",
+				}
+				this.modalpass = false
 			},
 			userSearchse(e) {
 				let auth = this.authLists.find(item => item.id == e)
@@ -495,7 +491,6 @@
 		height: 36px;
 		border-radius: 4px;
 		cursor: pointer;
-
 		img {
 			width: 100%;
 			height: 100%;

+ 536 - 0
src/pages/finance/yue/index.vue

@@ -0,0 +1,536 @@
+<template>
+	<!-- 财务-提现申请 -->
+	<div>
+		<Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="card_pd">
+				<!-- 查询条件 -->
+				<Form ref="formValidate" inline :model="formValidate" :label-width="labelWidth"
+					:label-position="labelPosition" @submit.native.prevent>
+					<FormItem label="时间选择:">
+						<DatePicker :editable="false" @on-change="onchangeTime" :value="timeVal"
+							format="yyyy/MM/dd HH:mm" type="datetimerange" placement="bottom-end" placeholder="自定义时间"
+							class="input-width" :options="options"></DatePicker>
+					</FormItem>
+
+					<!--        <FormItem label="提现状态:">
+          <Select v-model="formValidate.status" class="input-add">
+            <Option
+              v-for="(itemn, indexn) in treeData.withdrawal"
+              :value="itemn.value"
+              :key="indexn"
+              >{{ itemn.title }}</Option
+            >
+          </Select>
+        </FormItem>
+
+        <FormItem label="提现方式:">
+          <Select v-model="formValidate.extract_type" class="input-add">
+            <Option
+              v-for="(itemn, indexn) in treeData.payment"
+              :value="itemn.value"
+              :key="indexn"
+              >{{ itemn.title }}</Option
+            >
+          </Select>
+        </FormItem>
+
+        <FormItem label="搜索:">
+          <div class="acea-row row-middle">
+            <Input
+              placeholder="微信昵称/姓名/支付宝账号/银行卡号"
+              element-id="name"
+              v-model="formValidate.nireid"
+               class="input-width"
+            />
+          </div>
+        </FormItem> -->
+					<FormItem>
+						<!-- <Button type="primary" @click="selChange" class="btn-add">查询</Button> -->
+						<Button @click="exportExcel">导出</Button>
+					</FormItem>
+				</Form>
+			</div>
+		</Card>
+		<!-- <cards-data :cardLists="cardLists" v-if="extractStatistics"></cards-data> -->
+		<Card :bordered="false" dis-hover>
+			<!-- 表格 -->
+			<Table ref="table" :columns="columns" :data="tabList" class="ivu-mt" :loading="loading" no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果">
+				<template slot-scope="{ row }" slot="nickname">
+					<div>
+						用户昵称: {{ row.user.nickname }} <br />
+						用户id:{{ row.user.uid }}
+					</div>
+				</template>
+				<template slot-scope="{ row }" slot="number">
+					<div>{{row.pm == 1?'+':'-'}}{{ row.number }}</div>
+				</template>
+				<template slot-scope="{ row }" slot="extract_fee">
+					<div>{{ row.extract_fee }}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<span> {{ row.add_time | formatDate }}</span>
+				</template>
+				<template slot-scope="{ row }" slot="extract_type">
+					<div class="type" v-if="row.extract_type === 'bank'">
+						<div class="item">姓名:{{ row.real_name }}</div>
+						<div class="item">银行卡号:{{ row.bank_code }}</div>
+						<div class="item">银行开户地址:{{ row.bank_address }}</div>
+					</div>
+					<div class="type" v-if="row.extract_type === 'weixin'">
+						<div class="item">昵称:{{ row.nickname }}</div>
+						<div class="item">微信号:{{ row.wechat }}</div>
+					</div>
+					<div class="type" v-if="row.extract_type === 'alipay'">
+						<div class="item">姓名:{{ row.real_name }}</div>
+						<div class="item">支付宝号:{{ row.alipay_code }}</div>
+					</div>
+					<div class="type" v-if="row.extract_type === 'balance'">
+						<div class="item">姓名:{{ row.real_name }}</div>
+						<div class="item">提现方式:佣金转入余额</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="qrcode_url">
+					<viewer v-if="
+              row.extract_type === 'weixin' || row.extract_type === 'alipay'
+            ">
+						<div class="tabBox_img">
+							<img v-lazy="row.qrcode_url" />
+						</div>
+					</viewer>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<div class="status" v-if="row.status === 0">
+						<div class="statusVal">申请中</div>
+						<div>
+							<Button type="error" icon="md-close" size="small" class="item"
+								@click="invalid(row)">无效</Button>
+							<Button type="info" icon="md-checkmark" size="small" class="item"
+								@click="adopt(row, '审核通过', index)">通过</Button>
+						</div>
+					</div>
+					<div class="statusVal" v-if="row.status === 1">提现通过</div>
+					<div class="statusVal" v-if="row.status === -1">
+						提现未通过<br />未通过原因:{{ row.fail_msg }}
+					</div>
+				</template>
+				<template slot-scope="{ row }" slot="createModalFrame" v-if="row.extract_type != 'balance'">
+					<a href="javascript:void(0);" @click="edit(row)">编辑</a>
+				</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>
+		</Card>
+
+		<!-- 编辑表单-->
+		<edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
+		<!-- 拒绝通过-->
+		<Modal v-model="modals" scrollable closable title="未通过原因" :mask-closable="false">
+			<Input v-model="fail_msg.message" type="textarea" :rows="4" placeholder="请输入未通过原因" />
+			<div slot="footer">
+				<Button type="primary" size="large" long :loading="modal_loading" @click="oks">确定</Button>
+			</div>
+		</Modal>
+	</div>
+</template>
+<script>
+	import exportExcel from "@/utils/newToExcel.js";
+	import cardsData from "@/components/cards/cards";
+	import searchFrom from "@/components/publicSearchFrom";
+	import {
+		mapState
+	} from "vuex";
+	import {
+		getuserMoneyList,
+		cashEditApi,
+		refuseApi,
+		userMoneyExport
+	} from "@/api/finance";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import editFrom from "@/components/from/from";
+	import timeOptions from "@/utils/timeOptions";
+	export default {
+		name: "cashApply",
+		components: {
+			cardsData,
+			searchFrom,
+			editFrom
+		},
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd hh:mm");
+				}
+			},
+		},
+		data() {
+			return {
+				modal_loading: false,
+				options: timeOptions,
+				fail_msg: {
+					message: "输入信息不完整或有误!",
+				},
+				modals: false,
+				total: 0,
+				cardLists: [],
+				loading: false,
+				columns: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "用户信息",
+						slot: "nickname",
+						minWidth: 180,
+					},
+					{
+						title: "门店",
+						key: "store_name",
+						minWidth: 90,
+					},
+					{
+						title: "类型",
+						key: "title",
+						minWidth: 90,
+					},
+					{
+						title: "详情",
+						key: "mark",
+						minWidth: 100,
+					},
+					{
+						title: "金额",
+						slot: "number",
+						minWidth: 150,
+					},
+					{
+						title: "余额",
+						key: "balance",
+						minWidth: 150,
+					},
+					{
+						title: "添加时间",
+						key: "add_time",
+						minWidth: 100,
+					},
+
+				],
+				tabList: [],
+				fromList: {
+					title: "选择时间",
+					custom: true,
+					fromTxt: [{
+							text: "全部",
+							val: ""
+						},
+						{
+							text: "昨天",
+							val: "yesterday"
+						},
+						{
+							text: "今天",
+							val: "today"
+						},
+						{
+							text: "本周",
+							val: "week"
+						},
+						{
+							text: "本月",
+							val: "month"
+						},
+						{
+							text: "本季度",
+							val: "quarter"
+						},
+						{
+							text: "本年",
+							val: "year"
+						},
+					],
+				},
+				treeData: {
+					withdrawal: [{
+							title: "全部",
+							value: "",
+						},
+						{
+							title: "未通过",
+							value: -1,
+						},
+						{
+							title: "申请中",
+							value: 0,
+						},
+						{
+							title: "已通过",
+							value: 1,
+						},
+					],
+					payment: [{
+							title: "全部",
+							value: "",
+						},
+						{
+							title: "支付宝",
+							value: "alipay",
+						},
+						{
+							title: "银行卡",
+							value: "bank",
+						},
+						{
+							title: "微信",
+							value: "wx",
+						},
+						// {
+						// 	title: '提现到余额',
+						// 	value: 'balance'
+						// }
+					],
+				},
+				formValidate: {
+					status: "",
+					extract_type: "",
+					nireid: "",
+					data: "",
+					page: 1,
+					limit: 20,
+				},
+				extractStatistics: {},
+				timeVal: [],
+				FromData: null,
+				extractId: 0,
+			};
+		},
+		watch: {
+			$route() {
+				if (
+					this.$route.fullPath === "/finance/user_extract/index?status=0"
+				) {
+					this.getPath();
+				}
+			},
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		// created() {
+		//     if(this.$route.query.key == 0){
+		//         this.formValidate.status = parseInt(this.$route.query.key)
+		//     }
+		// },
+		mounted() {
+			this.getList();
+			// this.getList();
+		},
+		methods: {
+			exportExcel() {
+				userMoneyExport()
+					.then((res) => {
+						let data = res.data
+						exportExcel(data.header, data.filekey, data.fileName, data.export);
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			getPath() {
+				this.formValidate.page = 1;
+				this.formValidate.status = parseInt(this.$route.query.status);
+				this.getList();
+			},
+			// 无效
+			invalid(row) {
+				this.extractId = row.id;
+				this.modals = true;
+			},
+			// 确定
+			oks() {
+				this.modal_loading = true;
+				refuseApi(this.extractId, this.fail_msg)
+					.then(async (res) => {
+						this.$Message.success(res.msg);
+						this.modal_loading = false;
+						this.modals = false;
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 通过
+			adopt(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `finance/extract/adopt/${row.id}`,
+					method: "put",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.formValidate.data = this.timeVal[0] ? this.timeVal.join("-") : "";
+				this.formValidate.page = 1;
+				this.getList();
+			},
+			// 选择时间
+			selectChange(tab) {
+				this.formValidate.page = 1;
+				this.formValidate.data = tab;
+				this.timeVal = [];
+				this.getList();
+			},
+			// 选择
+			selChange() {
+				this.formValidate.page = 1;
+				this.getList();
+			},
+			reset() {
+				this.formValidate = {
+					status: "",
+					extract_type: "",
+					nireid: "",
+					data: "",
+					page: 1,
+					limit: 20
+				};
+				this.timeVal = [];
+				// this.$refs.formValidate.resetFields()
+				this.getList();
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				getuserMoneyList(this.formValidate)
+					.then(async (res) => {
+						let data = res.data;
+						this.tabList = data.list;
+						this.total = data.count;
+						// this.extractStatistics = data.extract_statistics;
+						// this.cardLists = [
+						//   {
+						//     col: 6,
+						//     count: this.extractStatistics.price,
+						//     name: "待提现金额",
+						//     className: "md-basket",
+						//   },
+						//   {
+						//     col: 6,
+						//     count: this.extractStatistics.brokerage_count,
+						//     name: "佣金总金额",
+						//     className: "md-pricetags",
+						//   },
+						//   {
+						//     col: 6,
+						//     count: this.extractStatistics.priced,
+						//     name: "已提现金额",
+						//     className: "md-cash",
+						//   },
+						//   {
+						//     col: 6,
+						//     count: this.extractStatistics.brokerage_not,
+						//     name: "未提现金额",
+						//     className: "ios-cash",
+						//   },
+						// ];
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.formValidate.page = index;
+				this.getList();
+			},
+			// 编辑
+			edit(row) {
+				cashEditApi(row.id)
+					.then(async (res) => {
+						if (res.data.status === false) {
+							return this.$authLapse(res.data);
+						}
+						this.FromData = res.data;
+						this.$refs.edits.modals = true;
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑提交成功
+			submitFail() {
+				this.getList();
+			},
+		},
+	};
+</script>
+<style scoped lang="stylus">
+	.btn-add {
+		margin: 0 14px 0 -90px;
+	}
+
+	.ivu-mt .type .item {
+		margin: 3px 0;
+	}
+
+	.card_pd {
+		padding: 20px 20px 0;
+	}
+
+	.Refresh {
+		font-size: 12px;
+		color: #1890FF;
+		cursor: pointer;
+	}
+
+	.status>>>.item~.item {
+		margin-left: 6px;
+	}
+
+	.status>>>.statusVal {
+		margin-bottom: 7px;
+	}
+
+	/* .ivu-mt >>> .ivu-table-header */
+	/* border-top:1px dashed #ddd!important */
+	.type {
+		padding: 3px 0;
+		box-sizing: border-box;
+	}
+
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 371 - 0
src/pages/marketing/czcard/card.vue

@@ -0,0 +1,371 @@
+<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>
+					<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+						:label-position="labelPosition" @submit.native.prevent>
+						<FormItem label="状态:" label-for="status">
+							<Select v-model="tableFrom.status" placeholder="请选择" clearable @on-change="userSearchs"
+								class="input-add">
+								<Option :value="0">待领取</Option>
+								<Option :value="1">生效中</Option>
+								<Option :value="-1">已停用</Option>
+								<!-- <Option :value="-1">拒绝</Option> -->
+							</Select>
+						</FormItem>
+						<FormItem label="所属充值卡:" label-for="status">
+							<Select v-model="tableFrom.card_id" clearable filterable @on-change="userSearchs"
+								class="input-add">
+								<Option v-for="item in ops" :value="item.id" :key="item.id">{{ item.title }}
+								</Option>
+							</Select>
+						</FormItem>
+						<!-- <Button type="primary" @click="tableSearchs()">查询</Button> -->
+					</Form>
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-marketing-super_create']" type="primary" @click="add">添加充值卡</Button>
+			<!-- 优惠券列表-表格 -->
+			<Table :columns="columns1" :data="tableList" ref="table" class="ivu-mt" :loading="loading" highlight-row
+				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="add_time">
+					<span>{{row.add_time | formatDate}}</span>
+				</template>
+				<template slot-scope="{ row }" slot="user">
+					<!-- <span>{{row.add_time | formatDate}}</span> -->
+					<div v-if="row.user && row.user.nickname">昵称:{{row.user.nickname}}(UID: {{row.uid}})</div>
+					<div v-if="row.user && row.user.phone">联系方式:{{row.user.phone}}</div>
+				</template>
+				<template slot-scope="{ row }" slot="status">
+					<!-- <span>{{row.status == 1?'生效中':'已停用'}}</span> -->
+					<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 == 1" @click="couponDel(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>
+		<!-- 领取记录 -->
+		<Modal v-model="modals2" scrollable footer-hide closable title="获取记录" :mask-closable="false" width="700">
+			<Table :columns="columns2" :data="receiveList" ref="table" class="mt25" :loading="loading2" highlight-row
+				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+				<template slot-scope="{ row, index }" slot="avatar">
+					<viewer>
+						<div class="tabBox_img">
+							<img v-lazy="row.avatar">
+						</div>
+					</viewer>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total2" show-elevator show-total @on-change="receivePageChange"
+					:page-size="receiveFrom.limit" />
+			</div>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import {
+		releasedListApi,
+		releasedissueLogApi,
+		releaseStatusApi,
+		delCouponReleased,
+		couponStatusApi,
+		superList,
+		cardCardListApi,
+		cardListApi
+	} from "@/api/marketing";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import Setting from "@/setting";
+	export default {
+		name: "storeCouponIssue",
+		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,
+				modals2: false,
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24
+				},
+				loading: false,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80
+					},
+					{
+						title: "卡号",
+						key: "no",
+						minWidth: 150
+					},
+					{
+						title: "密码",
+						key: "pwd",
+						minWidth: 150
+					},
+					// {
+					// 	title: "次卡名称",
+					// 	key: "title",
+					// 	minWidth: 150
+					// },
+					{
+						title: "金额",
+						key: "amount",
+						minWidth: 100
+					},
+					{
+						title: "领取人",
+						slot: "user",
+						minWidth: 100
+					},
+					{
+						title: "状态",
+						slot: "status",
+						minWidth: 100
+					},
+					{
+						title: "添加时间",
+						slot: "add_time",
+						minWidth: 100
+					},
+					
+				],
+				tableFrom: {
+					// status: "",
+					// coupon_title: "",
+					// receive_type: "",
+					// coupon_type: "",
+					card_id: '',
+					page: 1,
+					limit: 15
+				},
+				receive_type: "",
+				tableList: [],
+				total: 0,
+				FromData: null,
+				receiveList: [],
+				loading2: false,
+				columns2: [{
+						title: "ID",
+						key: "uid",
+						minWidth: 80
+					},
+					{
+						title: "充值卡",
+						key: "title",
+						minWidth: 150
+					},
+					{
+						title: "用户头像",
+						slot: "avatar",
+						minWidth: 100
+					},
+					{
+						title: "领取时间",
+						key: "add_time",
+						minWidth: 140
+					}
+				],
+				total2: 0,
+				receiveFrom: {
+					page: 1,
+					limit: 15
+				},
+				rows: {},
+				ops: []
+			};
+		},
+		created() {
+			this.getCardList()
+			this.getList();
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			}
+		},
+		methods: {
+			getCardList() {
+				cardListApi().then(res => {
+					console.log(res,'res')
+					this.ops = res.data.list
+				})
+			},
+			// 失效
+			couponInvalid(row, tit, num) {
+				this.delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/coupon/status/${row.id}`,
+					method: "PUT",
+					ids: ""
+				};
+				this.$refs.modelSure.modals = true;
+			},
+			// 领取记录
+			receive(row) {
+				this.modals2 = true;
+				this.rows = row;
+				this.getReceivelist(row);
+			},
+			getReceivelist(row) {
+				this.loading2 = true;
+				releasedissueLogApi(row.id, this.receiveFrom)
+					.then(async res => {
+						let data = res.data;
+						this.receiveList = data.list;
+						this.total2 = res.data.count;
+						this.loading2 = false;
+					})
+					.catch(res => {
+						this.loading2 = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			// 领取记录改变分页
+			receivePageChange(index) {
+				this.receiveFrom.page = index;
+				this.getReceivelist(this.rows);
+			},
+			// 删除
+			couponDel(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/card/del?id=${row.id}`,
+					method: "GET",
+					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.receive_type =
+				// 	this.receive_type === "all" ? "" : this.receive_type;
+				// this.tableFrom.status = this.tableFrom.status || "";
+				cardCardListApi(this.tableFrom)
+					.then(async res => {
+						let data = res.data;
+						this.tableList = data.list;
+						this.total = res.data.count;
+						this.loading = false;
+					})
+					.catch(res => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			userSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 搜索()
+			orderSearch() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 添加优惠券
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/czcard_create"
+				});
+			},
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/czcard_create/" + row.id
+				});
+			},
+			// 复制
+			copy(data) {
+				this.$router.push({
+					path: `${this.roterPre}/marketing/czcard/create/${data.id}`
+				});
+			},
+			// 是否开启
+			openChange(data) {
+				couponStatusApi(data).then(() => this.getList());
+			}
+		}
+	};
+</script>
+
+<style scoped lang="stylus">
+	.fa {
+		color: #0a6aa1;
+		display: block;
+	}
+
+	.sheng {
+		color: #ff0000;
+		display: block;
+	}
+
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 652 - 0
src/pages/marketing/czcard/create.vue

@@ -0,0 +1,652 @@
+<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}/marketing/czcard_list` }">
+						<div class="font-sm after-line">
+							<span class="iconfont iconfanhui"></span>
+							<span class="pl10">返回</span>
+						</div>
+					</router-link>
+					<span v-text="$route.params.id ? '编辑充值卡' : '添加充值卡'" class="mr20 ml16"></span>
+				</div>
+			</PageHeader>
+		</div>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Form :model="formData" :label-width="150">
+
+				<FormItem label="名称" required>
+					<Input v-model="formData.title" v-width="320" placeholder="请输入充值卡名称"></Input>
+				</FormItem>
+				<FormItem label="金额" required>
+					<Input v-model="formData.amount" v-width="320" type="number" placeholder="请输入充值卡金额"></Input>
+				</FormItem>
+				<!-- <FormItem label="等级" required>
+					<Input v-model="formData.level" v-width="320" type="number" placeholder="请输入充值卡等级"></Input>
+				</FormItem> -->
+				<FormItem label="次卡数量" required>
+					<Input v-model="formData.batch_num" v-width="320" type="number" placeholder="请输入次卡数量"></Input>
+				</FormItem>
+			</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="save">立即创建</Button>
+				</FormItem>
+			</Form>
+		</Card>
+		<!-- 选择商品-->
+		<Modal v-model="modals" title="商品列表" footerHide scrollable width="900" @on-cancel="cancel">
+			<goods-list ref="goodslist" :ischeckbox="true" :isdiy="true" :goodsType="1" @getProductId="getProductId"
+				v-if="modals"></goods-list>
+		</Modal>
+		<Modal v-model="storeModals" title="门店列表" footerHide scrollable width="900" @on-cancel="cancelStore">
+			<store-list ref="storelist" @getStoreId="getStoreId" v-if="storeModals"></store-list>
+		</Modal>
+
+		<Modal v-model="modalPic" width="960px" scrollable footer-hide closable title='上传' :mask-closable="false"
+			:z-index="1">
+			<uploadPictures :isChoice="isChoice" @getPic="getPic" :gridBtn="gridBtn" :gridPic="gridPic" v-if="modalPic">
+			</uploadPictures>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import {
+		mapState
+	} from "vuex";
+	import storeList from "@/components/storeList";
+	import goodsList from '@/components/goodsList';
+	import {
+		couponCategoryApi,
+		couponSaveApi,
+		addSuper,
+		couponDetailApi,
+		superInfo,
+		addCzcard
+	} from "@/api/marketing";
+	import {
+		brandList
+	} from "@/api/product";
+	// import { formatDate } from '@/utils/validate';
+	import Setting from "@/setting";
+	import uploadPictures from '@/components/uploadPictures';
+	export default {
+		name: "storeCouponCreate",
+		components: {
+			goodsList,
+			storeList,
+			uploadPictures
+		},
+		data() {
+			return {
+				checkPidList: [], //父级有关id集合 (需求禁止删除子级,用于删除整个商品)
+				isAllChecked: false, //表头是否被选中
+				gridPic: {
+					xl: 6,
+					lg: 8,
+					md: 12,
+					sm: 12,
+					xs: 12
+				},
+				gridBtn: {
+					xl: 4,
+					lg: 8,
+					md: 8,
+					sm: 8,
+					xs: 8
+				},
+				isChoice: '单选',
+				modalPic: false,
+				roterPre: Setting.roterPre,
+				disabled: false,
+				storesList: [],
+				formData: {
+					title: '',
+					amount: '',
+					batch_num: '',
+					// level: '',
+					type: 0
+				},
+				categoryList: [],
+				brandList: [],
+				productList: [],
+				isMinPrice: 0,
+				isCouponTime: 1,
+				isReceiveTime: 0,
+				modals: false,
+				datetime1: [],
+				datetime2: [],
+				storeModals: false,
+				currentTab: '1',
+				imageType: '',
+				chooseModals: false,
+				keyword: '',
+				searchTableData: [],
+				tableData: [],
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile", "menuCollapse"]),
+		},
+		created() {
+			this.getBrandList();
+			this.getCategoryList();
+			if (this.$route.params.id) {
+				this.formData.id = this.$route.params.id
+				this.getCouponDetail();
+			}
+		},
+		methods: {
+			onchangeIsShow(row) {
+				// this.tableData.forEach(item=>{
+				// item.attrValue.forEach(i => {
+				// 	if(row.unique == i.unique) {
+				// 		console.log('i.is_yue:',i.is_yue);
+				// 		// i.is_yue = !i.is_yue;
+				// 	}
+				// })
+				// })
+			},
+			getProductId(data) {
+				this.modals = false;
+				// console.log(data)
+				// let uni = 
+				let list = this.tableData.concat(data);
+				let uni = this.unique(list);
+				uni.forEach((i) => {
+					i.is_yue = i.is_yue ? true : false;
+					i.number = i.number || 0;
+					i.days = i.days || 0;
+				})
+				this.tableData = uni;
+				console.log(uni,'uni')
+			},
+			checkboxItem(e) {
+				let id = parseInt(e.rowid);
+				if (e.row.product_id) {
+					// let index = this.checkUidList.indexOf(id);
+					// if(index !== -1){
+					//   this.checkUidList = this.checkUidList.filter((item)=> item !== id);
+					// }else{
+					//   this.checkUidList.push(id);
+					// }
+					let pIndex = this.checkPidList.indexOf(e.row.product_id);
+					if (pIndex !== -1 && !e.checked) {
+						this.checkPidList = this.checkPidList.filter((item) => item !== e.row.product_id);
+					}
+					if (pIndex === -1 && e.checked) {
+						this.checkPidList.push(e.row.product_id);
+					}
+				} else {
+					let pIndex = this.checkPidList.indexOf(id);
+					if (pIndex !== -1 && !e.checked) {
+						this.checkPidList = this.checkPidList.filter((item) => item !== id);
+					}
+					if (pIndex === -1 && e.checked) {
+						this.checkPidList.push(id);
+					}
+				}
+				this.isAllChecked = this.$refs.xTree.isAllCheckboxChecked();
+			},
+			checkboxAll() {
+				this.isAllChecked = this.$refs.xTree.isAllCheckboxChecked();
+				if (!this.isAllChecked) {
+					this.checkPidList = [];
+				}
+				console.log('fgfg', this.isAllChecked);
+			},
+			searchWord() {
+				let list = []
+				this.tableData.forEach(item => {
+					let obj = item.store_name.indexOf(this.keyword);
+					if (obj != -1) {
+						list.push(item)
+					}
+				})
+				if (this.keyword) {
+					this.searchTableData = list;
+				} else {
+					this.searchTableData = []
+				}
+			},
+			addGoods() {
+				this.modals = true;
+			},
+			// 选择商品
+			changeGoods() {
+				this.modals = true;
+			},
+			// 选择图片
+			modalPicTap(type) {
+				this.imageType = type;
+				this.modalPic = true;
+				this.$refs.formItem.validateField("image")
+			},
+			// 选中图片
+			getPic(pc) {
+				this.formData[this.imageType] = pc.att_dir;
+				this.modalPic = false;
+				// this.$refs.formItem.validateField("image")
+			},
+			//删除门店
+			delte(row) {
+				this.storesList.forEach((item, index) => {
+					if (row.id == item.id) {
+						this.storesList.splice(index, 1)
+					}
+				})
+			},
+
+			//添加门店
+			addStore() {
+				this.storeModals = true;
+			},
+
+			//关闭门店弹窗
+			cancelStore() {
+				this.storeModals = false;
+			},
+			uniqueId(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
+			},
+			unique(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
+			},
+			getStoreId(data) {
+				this.storeModals = false;
+				let list = this.storesList.concat(data);
+				let uni = this.uniqueId(list);
+				this.storesList = uni;
+			},
+			// 品类
+			getCategoryList() {
+				couponCategoryApi(1).then(async (res) => {
+					res.data.forEach((val) => {
+						val.cate_name = `${val.html}${val.cate_name}`;
+					});
+					this.categoryList = res.data;
+				});
+			},
+			//品牌
+			getBrandList() {
+				brandList().then(res => {
+					this.brandList = res.data;
+				})
+			},
+			// 充值卡
+			getCouponDetail() {
+				superInfo(this.$route.params.id)
+					.then((res) => {
+						let data = res.data[0];
+						this.formData.name = data.name;
+						this.formData.is_forever = data.is_forever;
+						this.formData.grade = data.grade;
+						this.formData.discount = data.discount;
+						this.formData.valid_date = data.valid_date / 60 / 60 / 24;
+						this.formData.icon = data.icon;
+						this.formData.image = data.image;
+						this.formData.is_show = data.is_show;
+						this.formData.mark = data.mark;
+						this.formData.is_funds = data.is_funds;
+						let list = []
+						data.product.forEach(item => {
+							let obj = {
+								id: item.product_id,
+								store_name: item.product_name,
+								price: item.price,
+								is_yue: item.is_yue? true: false,
+								days: item.days,
+								number: item.number,
+								spu: item.spu,
+							}
+							
+							
+							list.push(obj)
+						})
+						this.tableData = list
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			makeDate(data) {
+				let date = new Date(data);
+				let YY = date.getFullYear() + "-";
+				let MM =
+					(date.getMonth() + 1 < 10 ?
+						"0" + (date.getMonth() + 1) :
+						date.getMonth() + 1) + "-";
+				let DD = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+				let hh =
+					(date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
+				let mm =
+					(date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes()) +
+					":";
+				let ss =
+					date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+				return YY + MM + DD + " " + hh + mm + ss;
+			},
+			// 上一页:
+			upTab() {
+				if (this.currentTab == '2') {
+					this.currentTab = (Number(this.currentTab) - 1).toString();
+				}
+			},
+			// 创建
+			save() {
+				let that = this
+				if (!that.formData.title) {
+					return that.$Message.error("请输入充值卡名称");
+				}
+				// if (!that.formData.level) {
+				// 	return that.$Message.error("请输入充值卡等级");
+				// }
+				
+				if (!that.formData.batch_num) {
+					return that.$Message.error("请输入充值卡次卡数量");
+				}
+				if (!that.formData.amount) {
+					return that.$Message.error("请输入充值卡金额");
+				}
+	
+				addCzcard(that.formData)
+					.then((res) => {
+						this.disabled = true;
+						this.$Message.success(res.msg);
+						setTimeout(() => {
+							this.$router.push({
+								path: this.roterPre + "/marketing/czcard_list",
+							});
+						}, 1000);
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			cancel() {
+				this.modals = false;
+			},
+			// 删除商品
+			remove(productId) {
+				for (let index = 0; index < this.productList.length; index++) {
+					if (this.productList[index].product_id == productId) {
+						this.productList.splice(index, 1);
+					}
+				}
+				this.formData.product_id = "";
+				this.productList.forEach((value) => {
+					if (this.formData.product_id) {
+						this.formData.product_id += `,${value.product_id}`;
+					} else {
+						this.formData.product_id += `${value.product_id}`;
+					}
+				});
+			},
+			//批量设置
+			batchSet() {
+				this.modalsSet = true;
+			},
+			//批量删除
+			delAll() {
+				if (this.isAllChecked && (this.tableData.length == this.searchTableData.length || !this.searchTableData
+						.length)) {
+					this.tableData = []
+				} else {
+					this.tableData = this.tableData.filter(item => !this.checkPidList.some(ele => ele === item.id));
+				}
+				this.checkPidList = [];
+				this.isAllChecked = false;
+			},
+			//删除
+			del(row) {
+				if (this.searchTableData.length) {
+					this.searchTableData.forEach((i, index) => {
+						if (row.id == i.id) {
+							this.searchTableData.splice(index, 1)
+						}
+					})
+					this.tableData.forEach((i, index) => {
+						if (row.id == i.id) {
+							return this.tableData.splice(index, 1)
+						}
+					})
+				} else {
+					this.tableData.forEach((i, index) => {
+						if (row.id == i.id) {
+							return this.tableData.splice(index, 1)
+						}
+					})
+				}
+				if (this.isAllChecked && !this.tableData.length) {
+					this.isAllChecked = false;
+					this.checkPidList = []
+				} else {
+					let index = this.checkPidList.indexOf(row.id);
+					this.checkPidList.splice(index, 1)
+				}
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.tips {
+		display: inline-bolck;
+		font-size: 12px;
+		font-weight: 400;
+		color: #999999;
+		margin-top: 10px;
+	}
+
+	.imgPic {
+		.info {
+			width: 60%;
+			margin-left: 10px;
+		}
+
+		.pictrue {
+			height: 36px;
+			margin: 7px 3px 0 3px;
+
+			img {
+				height: 100%;
+				display: block;
+			}
+		}
+	}
+
+	.productType {
+		width: 120px;
+		height: 60px;
+		background: #FFFFFF;
+		border-radius: 3px;
+		border: 1px solid #E7E7E7;
+		float: left;
+		text-align: center;
+		padding-top: 8px;
+		position: relative;
+		cursor: pointer;
+		line-height: 23px;
+		margin-right: 12px;
+
+		&.on {
+			border-color: #1890FF;
+		}
+
+		.name {
+			font-size: 14px;
+			font-weight: 600;
+			color: rgba(0, 0, 0, 0.85);
+
+			&.on {
+				color: #1890FF;
+			}
+		}
+
+		.title {
+			font-size: 12px;
+			font-weight: 400;
+			color: #999999;
+		}
+
+		.jiao {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			width: 0;
+			height: 0;
+			border-bottom: 26px solid #1890FF;
+			border-left: 26px solid transparent;
+		}
+
+		.iconfont {
+			position: absolute;
+			bottom: -3px;
+			right: 1px;
+			color: #FFFFFF;
+			font-size: 12px;
+		}
+	}
+
+	.info {
+		color: #888;
+		font-size: 12px;
+	}
+
+	.ivu-input-wrapper {
+		width: 320px;
+	}
+
+	.ivu-input-number {
+		width: 160px;
+	}
+
+	.ivu-date-picker {
+		width: 320px;
+	}
+
+	.ivu-icon-ios-camera-outline {
+		width: 58px;
+		height: 58px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		border-radius: 4px;
+		background-color: rgba(0, 0, 0, 0.02);
+		line-height: 58px;
+		cursor: pointer;
+		vertical-align: middle;
+	}
+
+	.upload-list {
+		width: 58px;
+		height: 58px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		border-radius: 4px;
+		margin-right: 15px;
+		display: inline-block;
+		position: relative;
+		cursor: pointer;
+		vertical-align: middle;
+	}
+
+	.upload-list img {
+		display: block;
+		width: 100%;
+		height: 100%;
+	}
+
+	.ivu-icon-ios-close-circle {
+		position: absolute;
+		top: 0;
+		right: 0;
+		transform: translate(50%, -50%);
+	}
+
+	.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;
+			}
+		}
+	}
+
+	/deep/.vxe-tree-cell {
+		padding-left: 0 !important;
+	}
+
+	.picBox {
+		display: inline-block;
+		cursor: pointer;
+
+		.upLoad {
+			width: 58px;
+			height: 58px;
+			line-height: 58px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			border-radius: 4px;
+			background: rgba(0, 0, 0, 0.02);
+		}
+
+		.pictrue {
+			width: 60px;
+			height: 60px;
+			border: 1px dotted rgba(0, 0, 0, 0.1);
+			margin-right: 10px;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+
+		}
+
+		.iconfont {
+			color: #CCCCCC;
+			font-size 26px;
+			text-align center
+		}
+
+	}
+
+	.vxeTable {
+		border-top: 1px dotted #eee;
+		margin-top 20px;
+	}
+
+	/deep/ .vxe-tree--btn-wrapper {
+		left: 0;
+	}
+</style>

+ 359 - 0
src/pages/marketing/czcard/index.vue

@@ -0,0 +1,359 @@
+<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>
+					<Form ref="tableFrom" inline :model="tableFrom" :label-width="labelWidth"
+						:label-position="labelPosition" @submit.native.prevent>
+						<FormItem label="状态:" label-for="status">
+							<Select v-model="tableFrom.status" placeholder="请选择" clearable @on-change="userSearchs"
+								class="input-add">
+								<!-- <Option :value="0">全部</Option> -->
+								<Option :value="1">生效中</Option>
+								<Option :value="-1">已停用</Option>
+								<!-- <Option :value="-1">拒绝</Option> -->
+							</Select>
+						</FormItem>
+						<!-- <Button type="primary" @click="tableSearchs()">查询</Button> -->
+					</Form>
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-marketing-super_create']" type="primary" @click="add">添加充值卡</Button>
+			<!-- 优惠券列表-表格 -->
+			<Table :columns="columns1" :data="tableList" ref="table" class="ivu-mt" :loading="loading" highlight-row
+				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="add_time">
+					<span>{{row.add_time | formatDate}}</span>
+				</template>
+				<template slot-scope="{ row }" 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>
+					<!-- <Tag color="success" v-if="row.status == 2">部分完成</Tag>
+					<Tag color="warning" v-if="row.status == 3">已完成</Tag> -->
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="expout(row.id)">导出</a>
+					<Divider v-if="row.status == 1" type="vertical" />
+					<a v-if="row.status == 1" @click="couponDel(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>
+		<!-- 领取记录 -->
+		<Modal v-model="modals2" scrollable footer-hide closable title="获取记录" :mask-closable="false" width="700">
+			<Table :columns="columns2" :data="receiveList" ref="table" class="mt25" :loading="loading2" highlight-row
+				no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+				<template slot-scope="{ row, index }" slot="avatar">
+					<viewer>
+						<div class="tabBox_img">
+							<img v-lazy="row.avatar">
+						</div>
+					</viewer>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total2" show-elevator show-total @on-change="receivePageChange"
+					:page-size="receiveFrom.limit" />
+			</div>
+		</Modal>
+	</div>
+</template>
+
+<script>
+	import exportExcel from "@/utils/newToExcel.js";
+	import {
+		mapState
+	} from "vuex";
+	import {
+		releasedListApi,
+		releasedissueLogApi,
+		releaseStatusApi,
+		delCouponReleased,
+		couponStatusApi,
+		superList,
+		cardListApi,
+		expCard
+	} from "@/api/marketing";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import Setting from "@/setting";
+	export default {
+		name: "storeCouponIssue",
+		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,
+				modals2: false,
+				grid: {
+					xl: 7,
+					lg: 7,
+					md: 12,
+					sm: 24,
+					xs: 24
+				},
+				loading: false,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80
+					},
+					{
+						title: "充值卡名称",
+						key: "title",
+						minWidth: 150
+					},
+					{
+						title: "金额",
+						key: "amount",
+						minWidth: 100
+					},
+					{
+						title: "次卡数量",
+						key: "batch_num",
+						minWidth: 100
+					},
+					{
+						title: "状态",
+						slot: "status",
+						minWidth: 100
+					},
+					{
+						title: "添加时间",
+						slot: "add_time",
+						minWidth: 100
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						minWidth: 200
+					}
+				],
+				tableFrom: {
+					// status: "",
+					// coupon_title: "",
+					// receive_type: "",
+					// coupon_type: "",
+					status: 1,
+					page: 1,
+					limit: 15
+				},
+				receive_type: "",
+				tableList: [],
+				total: 0,
+				FromData: null,
+				receiveList: [],
+				loading2: false,
+				columns2: [{
+						title: "ID",
+						key: "uid",
+						minWidth: 80
+					},
+					{
+						title: "充值卡",
+						key: "title",
+						minWidth: 150
+					},
+					{
+						title: "用户头像",
+						slot: "avatar",
+						minWidth: 100
+					},
+					{
+						title: "领取时间",
+						key: "add_time",
+						minWidth: 140
+					}
+				],
+				total2: 0,
+				receiveFrom: {
+					page: 1,
+					limit: 15
+				},
+				rows: {}
+			};
+		},
+		created() {
+			this.getList();
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			}
+		},
+		methods: {
+			expout(id) {
+				expCard({
+					id: id
+				}).then(res => {
+					let data = res.data
+					exportExcel(data.header, data.filekey, data.filename,data.export);
+					return;
+				})
+			},
+			// 失效
+			couponInvalid(row, tit, num) {
+				this.delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/coupon/status/${row.id}`,
+					method: "PUT",
+					ids: ""
+				};
+				this.$refs.modelSure.modals = true;
+			},
+			// 领取记录
+			receive(row) {
+				this.modals2 = true;
+				this.rows = row;
+				this.getReceivelist(row);
+			},
+			getReceivelist(row) {
+				this.loading2 = true;
+				releasedissueLogApi(row.id, this.receiveFrom)
+					.then(async res => {
+						let data = res.data;
+						this.receiveList = data.list;
+						this.total2 = res.data.count;
+						this.loading2 = false;
+					})
+					.catch(res => {
+						this.loading2 = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			// 领取记录改变分页
+			receivePageChange(index) {
+				this.receiveFrom.page = index;
+				this.getReceivelist(this.rows);
+			},
+			// 删除
+			couponDel(row, tit, num) {
+				let delfromData = {
+					title: tit,
+					num: num,
+					url: `marketing/card/del?id=${row.id}`,
+					method: "GET",
+					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.receive_type =
+				// 	this.receive_type === "all" ? "" : this.receive_type;
+				// this.tableFrom.status = this.tableFrom.status || "";
+				cardListApi(this.tableFrom)
+					.then(async res => {
+						let data = res.data;
+						this.tableList = data.list;
+						this.total = res.data.count;
+						this.loading = false;
+					})
+					.catch(res => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			userSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 搜索()
+			orderSearch() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 添加优惠券
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/czcard_create"
+				});
+			},
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/czcard_create/" + row.id
+				});
+			},
+			// 复制
+			copy(data) {
+				this.$router.push({
+					path: `${this.roterPre}/marketing/czcard/create/${data.id}`
+				});
+			},
+			// 是否开启
+			openChange(data) {
+				couponStatusApi(data).then(() => this.getList());
+			}
+		}
+	};
+</script>
+
+<style scoped lang="stylus">
+	.fa {
+		color: #0a6aa1;
+		display: block;
+	}
+
+	.sheng {
+		color: #ff0000;
+		display: block;
+	}
+
+	.tabBox_img {
+		width: 36px;
+		height: 36px;
+		border-radius: 4px;
+		cursor: pointer;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+</style>

+ 46 - 19
src/pages/marketing/super/create.vue

@@ -25,6 +25,12 @@
 				<FormItem label="全局折扣(%)" required>
 					<Input v-model="formData.discount" v-width="320" type="number" placeholder="请输入全局折扣"></Input>
 				</FormItem>
+				<FormItem label="不影响分类:" prop="cate_id">
+					<el-cascader placeholder="请选择不影响分类" v-width="'50%'" size="mini" v-model="formData.cate_id"
+						:options="treeSelect" :props="props" filterable clearable>
+					</el-cascader>
+					<!-- <span class="addClass" @click="addClass" v-if="merchantType!=1">新增分类</span> -->
+				</FormItem>
 				<FormItem label="图标:" prop="icon">
 					<div class="picBox" @click="modalPicTap('icon')">
 						<div class="pictrue" v-if="formData.icon"><img v-lazy="formData.icon"></div>
@@ -78,11 +84,10 @@
 					<Col span="20">
 					<div class="vxeTable">
 						<vxe-table border="inner" ref="xTree" :column-config="{resizable: true}" row-id="id"
-							@checkbox-all="checkboxAll"
-							@checkbox-change="checkboxItem"
+							@checkbox-all="checkboxAll" @checkbox-change="checkboxItem"
 							:data="(searchTableData.length || keyword)?searchTableData:tableData">
 							<!-- <vxe-column title="" width="90" tree-node></vxe-column> -->
-							<vxe-column field="info" title="商品信息" min-width="300" >
+							<vxe-column field="info" title="商品信息" min-width="300">
 								<template v-slot="{ row }">
 									<div class="imgPic acea-row row-middle">
 										<!-- <viewer>
@@ -99,19 +104,19 @@
 							</vxe-column>
 							<vxe-column field="price" title="价格" min-width="150">
 								<template v-slot="{ row }">
-									<vxe-input  v-model="row.price" min="0" placeholder="请输入价格" type="float"
-										digits="2" step="1"></vxe-input>
+									<vxe-input v-model="row.price" min="0" placeholder="请输入价格" type="float" digits="2"
+										step="1"></vxe-input>
 								</template>
 							</vxe-column>
 							<vxe-column field="price" title="限购天数" min-width="150">
 								<template v-slot="{ row }">
-									<vxe-input  v-model="row.days" min="0" placeholder="请输入限购天数" type="float"
-										digits="2" step="1"></vxe-input>
+									<vxe-input v-model="row.days" min="0" placeholder="请输入限购天数" type="float" digits="2"
+										step="1"></vxe-input>
 								</template>
 							</vxe-column>
 							<vxe-column field="price" title="限购次数" min-width="150">
 								<template v-slot="{ row }">
-									<vxe-input  v-model="row.number" min="0" placeholder="请输入限购次数" type="float"
+									<vxe-input v-model="row.number" min="0" placeholder="请输入限购次数" type="float"
 										digits="2" step="1"></vxe-input>
 								</template>
 							</vxe-column>
@@ -119,8 +124,8 @@
 							<vxe-column field="ot_price" title="原价" min-width="80"></vxe-column> -->
 							<vxe-column field="is_yue" title="不可用余额" min-width="100">
 								<template v-slot="{ row }">
-									<i-switch  v-model="row.is_yue" :value="row.is_yue"
-										@on-change="onchangeIsShow(row)" size="large">
+									<i-switch v-model="row.is_yue" :value="row.is_yue" @on-change="onchangeIsShow(row)"
+										size="large">
 										<span slot="open">是</span>
 										<span slot="close">否</span>
 									</i-switch>
@@ -128,7 +133,7 @@
 							</vxe-column>
 							<vxe-column field="date" title="操作" min-width="100" fixed="right" align="center">
 								<template v-slot="{ row }">
-									<a @click="del(row)" >删除</a>
+									<a @click="del(row)">删除</a>
 								</template>
 							</vxe-column>
 						</vxe-table>
@@ -141,7 +146,8 @@
 			:style="{ left: `${!menuCollapse ? '200px' : isMobile ? '0' : '80px'}` }">
 			<Form>
 				<FormItem>
-					<Button type="primary" class="submission" @click="save" :disabled="disabled">{{$route.params.id == 0?'立即创建': '修改'}}</Button>
+					<Button type="primary" class="submission" @click="save"
+						:disabled="disabled">{{$route.params.id == 0?'立即创建': '修改'}}</Button>
 				</FormItem>
 			</Form>
 		</Card>
@@ -176,7 +182,8 @@
 		superInfo
 	} from "@/api/marketing";
 	import {
-		brandList
+		brandList,
+		cascaderListApi
 	} from "@/api/product";
 	// import { formatDate } from '@/utils/validate';
 	import Setting from "@/setting";
@@ -190,6 +197,7 @@
 		},
 		data() {
 			return {
+				treeSelect: [],
 				checkPidList: [], //父级有关id集合 (需求禁止删除子级,用于删除整个商品)
 				isAllChecked: false, //表头是否被选中
 				gridPic: {
@@ -212,6 +220,7 @@
 				disabled: false,
 				storesList: [],
 				formData: {
+					cate_id: [],
 					name: "",
 					is_forever: 0,
 					valid_date: 0,
@@ -241,12 +250,18 @@
 				keyword: '',
 				searchTableData: [],
 				tableData: [],
+				props: {
+					emitPath: false,
+					multiple: true,
+					checkStrictly: true
+				},
 			};
 		},
 		computed: {
 			...mapState("admin/layout", ["isMobile", "menuCollapse"]),
 		},
 		created() {
+			this.goodsCategory()
 			this.getBrandList();
 			this.getCategoryList();
 			if (this.$route.params.id) {
@@ -255,6 +270,15 @@
 			}
 		},
 		methods: {
+			goodsCategory() {
+				cascaderListApi(1)
+					.then((res) => {
+						this.treeSelect = res.data;
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
 			onchangeIsShow(row) {
 				// this.tableData.forEach(item=>{
 				// item.attrValue.forEach(i => {
@@ -277,7 +301,7 @@
 					i.days = i.days || 0;
 				})
 				this.tableData = uni;
-				console.log(uni,'uni')
+				console.log(uni, 'uni')
 			},
 			checkboxItem(e) {
 				let id = parseInt(e.rowid);
@@ -408,19 +432,20 @@
 						this.formData.is_show = data.is_show;
 						this.formData.mark = data.mark;
 						this.formData.is_funds = data.is_funds;
+						this.formData.cate_id = data.cate_id;
 						let list = []
 						data.product.forEach(item => {
 							let obj = {
 								id: item.product_id,
 								store_name: item.product_name,
 								price: item.price,
-								is_yue: item.is_yue? true: false,
+								is_yue: item.is_yue ? true : false,
 								days: item.days,
 								number: item.number,
 								spu: item.spu,
 							}
-							
-							
+
+
 							list.push(obj)
 						})
 						this.tableData = list
@@ -479,7 +504,7 @@
 						product_id: item.id,
 						spu: item.spu,
 						price: item.price,
-						is_yue: item.is_yue? 1 : 0,
+						is_yue: item.is_yue ? 1 : 0,
 						days: item.days,
 						number: item.number
 					}
@@ -496,7 +521,7 @@
 					// obj.info = info;
 					list.push(obj)
 				})
-				console.log(list,'list')
+				console.log(list, 'list')
 				addSuper({
 						id: that.formData.id,
 						name: that.formData.name,
@@ -510,6 +535,8 @@
 						is_funds: that.formData.is_funds,
 						mark: that.formData.mark,
 						product: list,
+						cate_id: that.formData.cate_id
+						
 					})
 					.then((res) => {
 						this.disabled = true;

+ 1 - 0
src/pages/order/orderList/components/tableFrom.vue

@@ -251,6 +251,7 @@ export default {
         { label: '支付宝支付', val: '4' },
         { label: '余额支付', val: '2' },
         { label: '线下支付', val: '3' },
+		{ label: '汇付', val: '5' },
       ],
       manualModal: false,
       uploadAction: `${Setting.apiBaseURL}/file/upload/1`,

+ 1647 - 1735
src/pages/order/orderList/components/tableList.vue

@@ -1,1767 +1,1679 @@
 <template>
-<!-- 订单列表-表格组件 -->
-  <div>
-    <!-- :loading="loading" -->
-    <!-- tab切换栏 -->
-    <div class="new_tab">
-      <Tabs v-model="currentTab" @on-click="onClickTab">
-        <!-- <TabPane :label=" '全部订单('+(tablists.all || 0)+')'" name=" "/>
+	<!-- 订单列表-表格组件 -->
+	<div>
+		<!-- :loading="loading" -->
+		<!-- tab切换栏 -->
+		<div class="new_tab">
+			<Tabs v-model="currentTab" @on-click="onClickTab">
+				<!-- <TabPane :label=" '全部订单('+(tablists.all || 0)+')'" name=" "/>
           <TabPane :label=" '普通订单 ('+(tablists.general || 0)+')'" name="0"/>
           <TabPane :label=" '拼团订单 ('+(tablists.pink || 0)+')'" name="3"/>
           <TabPane :label=" '秒杀订单 ('+(tablists.seckill || 0)+')'" name="1"/>
           <TabPane :label=" '砍价订单 ('+(tablists.bargain || 0)+')'" name="2"/> -->
-        <TabPane :label="'所有订单 (' + (tablists.all || 0) + ')'" name="-1" />
-        <TabPane :label="'平台订单 (' + (tablists.plat || 0) + ')'" name="0" />
-        <TabPane :label="'门店订单 (' + (tablists.store || 0) + ')'" name="1" />
-        <TabPane
-          :label="'供应商订单 (' + (tablists.supplier || 0) + ')'"
-          name="2"
-        />
-      </Tabs>
-    </div>
-    <div class="acea-row row-between">
-      <!-- 相关操作 -->
-      <div>
-        <Tooltip
-          content="本页至少选中一项"
-          :disabled="!!checkUidList.length && isAll==0"
-          v-auth="['order-batch-del_orders']"
-        >
-          <Button
-            class="mr10"
-            type="primary"
-            :disabled="!checkUidList.length && isAll==0"
-            @click="delAll"
-            >批量删除订单</Button
-          >
-        </Tooltip>
-        <Button
-          class="mr10"
-          v-auth="['order-hand-batch_delivery']"
-          type="primary"
-          @click="manualModal = true"
-          >手动批量发货</Button
-        >
-        <Tooltip
-          content="本页至少选中一项"
-          :disabled="!!checkUidList.length && isAll==0"
-          v-auth="['order-other-batch_delivery']"
-        >
-          <Button
-            class="mr10"
-            type="primary"
-            :disabled="!checkUidList.length && isAll==0"
-            @click="onAuto"
-            >自动批量发货</Button
-          >
-        </Tooltip>
-        <Tooltip
-          content="本页至少选中一项"
-          :disabled="!!checkUidList.length && isAll==0"
-        >
-          <Button
-            class="mr10"
-            type="primary"
-            :disabled="!checkUidList.length && isAll==0"
-            @click="printOreder"
-            >打印配货单</Button
-          >
-        </Tooltip>
-        <Dropdown
-          v-auth="['export-storeOrder']"
-          class="mr10"
-          @on-click="exports"
-        >
-          <Button style="width: 110px">
-            {{ exportList[exportListOn].label }}
-            <Icon type="ios-arrow-down"></Icon>
-          </Button>
-          <DropdownMenu slot="list">
-            <DropdownItem
-              v-for="(item, index) in exportList"
-              :key="index"
-              :name="item.name"
-              style="font-size: 12px !important"
-              >{{ item.label }}</DropdownItem
-            >
-          </DropdownMenu>
-        </Dropdown>
-        <Button
-          v-auth="['order-write']"
-          class="mr10 greens"
-          size="default"
-          @click="writeOff"
-          >订单核销</Button
-        >
-      </div>
-      <div class="caozuo">
-        <Button v-auth="['queue-index']" class="mr10" @click="queuemModal"
-          >批量发货记录</Button
-        >
-        <Button
-          v-auth="['export-expressList']"
-          class="mr10"
-          @click="getExpressList"
-          >下载物流公司对照表</Button
-        >
-      </div>
-    </div>
-    <!-- 订单列表表格 -->
-    <vxe-table
-        ref="xTable"
-        class="mt25"
-        :loading="loading"
-        row-id="id"
-        :expand-config="{accordion: true}"
-        :checkbox-config="{reserve: true}"
-        @checkbox-all="checkboxAll"
-        @checkbox-change="checkboxItem"
-        :data="orderList">
-      <vxe-column type="" width="0"></vxe-column>
-      <vxe-column type="expand" width="35">
-        <template #content="{ row }">
-          <div class="tdinfo">
-            <Row class="expand-row">
-              <Col span="8">
-                <span class="expand-key">商品总价:</span>
-                <span class="expand-value" v-text="row.total_price"></span>
-              </Col>
-              <Col span="8">
-                <span class="expand-key">下单时间:</span>
-                <span class="expand-value" v-text="row.add_time"></span>
-              </Col>
-              <Col span="8">
-                <span class="expand-key">推广人:</span>
-                <span class="expand-value" v-text="row.spread_nickname?row.spread_nickname:'无'"></span>
-              </Col>
-            </Row>
-            <Row class="expand-row">
-              <Col span="8">
-                <span class="expand-key">用户备注:</span>
-                <span class="expand-value" v-text="row.mark?row.mark:'无'"></span>
-              </Col>
-              <Col span="8">
-                <span class="expand-key">商家备注:</span>
-                <span class="expand-value" v-text="row.remark?row.remark:'无'"></span>
-              </Col>
-            </Row>
-          </div>
-        </template>
-      </vxe-column>
-      <vxe-column type="checkbox" width="100">
-        <template #header>
-          <div>
-            <Dropdown transfer @on-click="allPages">
-              <a href="javascript:void(0)" class="acea-row row-middle">
-                <span>全选({{isAll==1?(page.total-checkUidList.length):checkUidList.length}})</span>
-                <Icon type="ios-arrow-down"></Icon>
-              </a>
-              <template #list>
-                <DropdownMenu>
-                  <DropdownItem name="0">当前页</DropdownItem>
-                  <DropdownItem name="1">所有页</DropdownItem>
-                </DropdownMenu>
-              </template>
-            </Dropdown>
-          </div>
-        </template>
-      </vxe-column>
-      <vxe-column field="order_id" title="订单号" min-width="175">
-        <template v-slot="{ row }">
-          <Tooltip
-		      :transfer="true"
-              theme="dark"
-              max-width="300"
-              :delay="600"
-              content="用户已删除"
-              v-if="row.is_del === 1 && row.delete_time == null"
-          >
-            <span style="color: #ed4014; display: block">{{ row.order_id }}</span>
-          </Tooltip>
-          <span
-              @click="changeMenu(row, '2')"
-              v-else
-              style="color: #2d8cf0; display: block; cursor: pointer"
-          >{{ row.order_id }}</span
-          >
-        </template>
-      </vxe-column>
-      <vxe-column field="pink_name" title="订单类型" min-width="120"></vxe-column>
-      <vxe-column field="nickname" title="用户信息" min-width="130">
-        <template v-slot="{ row }">
-          <a @click="showUserInfo(row)">{{ row.nickname }}</a>
-          <span style="color: #ed4014" v-if="row.delete_time != null">
-          (已注销)</span>
-        </template>
-      </vxe-column>
-      <vxe-column field="info" title="商品信息" min-width="330">
-        <template v-slot="{ row }">
-          <Tooltip :transfer="true" theme="dark" max-width="300" :delay="600">
-            <div class="tabBox" v-for="(val, i) in row._info" :key="i">
-              <div class="tabBox_img" v-viewer>
-                <img v-lazy="val.cart_info.productInfo.attrInfo? val.cart_info.productInfo.attrInfo.image: val.cart_info.productInfo.image" />
-              </div>
-              <span class="tabBox_tit line1">
-              <span class="font-color-red" v-if="val.cart_info.is_gift"
-              >赠品</span>
-
-              {{ val.cart_info.productInfo.store_name + ' | ' }}
-              {{val.cart_info.productInfo.attrInfo?val.cart_info.productInfo.attrInfo.suk: ''}} </span>
-            </div>
-            <div slot="content">
-              <div v-for="(val, i) in row._info" :key="i">
-                <p class="font-color-red" v-if="val.cart_info.is_gift">赠品</p>
-                <p>{{ val.cart_info.productInfo.store_name }}</p>
-                <p> {{ val.cart_info.productInfo.attrInfo? val.cart_info.productInfo.attrInfo.suk: ''}}</p>
-                <p class="tabBox_pice">{{'¥' + val.cart_info.sum_price +' x ' + val.cart_info.cart_num }} </p>
-              </div>
-            </div>
-          </Tooltip>
-        </template>
-      </vxe-column>
-      <vxe-column field="pay_price" title="实际支付" align="center" min-width="70">
-        <template v-slot="{ row }">
-          <span>{{ row.paid > 0 ? row.pay_price : 0 }}</span>
-        </template>
-      </vxe-column>
-      <vxe-column field="_pay_time" title="支付时间" min-width="150"></vxe-column>
-      <vxe-column field="pay_type_name" title="支付类型" min-width="100">
-        <template v-slot="{ row }">
-          <span>{{ row.pay_type_name }}</span>
-        </template>
-      </vxe-column>
-      <vxe-column field="statusName" title="订单状态" min-width="100">
-        <template v-slot="{ row }">
-          <Tag color="default" size="medium" v-show="row.status == 3">{{
+				<TabPane :label="'所有订单 (' + (tablists.all || 0) + ')'" name="-1" />
+				<TabPane :label="'平台订单 (' + (tablists.plat || 0) + ')'" name="0" />
+				<TabPane :label="'门店订单 (' + (tablists.store || 0) + ')'" name="1" />
+				<TabPane :label="'供应商订单 (' + (tablists.supplier || 0) + ')'" name="2" />
+			</Tabs>
+		</div>
+		<div class="acea-row row-between">
+			<!-- 相关操作 -->
+			<div>
+				<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0"
+					v-auth="['order-batch-del_orders']">
+					<Button class="mr10" type="primary" :disabled="!checkUidList.length && isAll==0"
+						@click="delAll">批量删除订单</Button>
+				</Tooltip>
+				<Button class="mr10" v-auth="['order-hand-batch_delivery']" type="primary"
+					@click="manualModal = true">手动批量发货</Button>
+				<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0"
+					v-auth="['order-other-batch_delivery']">
+					<Button class="mr10" type="primary" :disabled="!checkUidList.length && isAll==0"
+						@click="onAuto">自动批量发货</Button>
+				</Tooltip>
+				<Tooltip content="本页至少选中一项" :disabled="!!checkUidList.length && isAll==0">
+					<Button class="mr10" type="primary" :disabled="!checkUidList.length && isAll==0"
+						@click="printOreder">打印配货单</Button>
+				</Tooltip>
+				<Dropdown v-auth="['export-storeOrder']" class="mr10" @on-click="exports">
+					<Button style="width: 110px">
+						{{ exportList[exportListOn].label }}
+						<Icon type="ios-arrow-down"></Icon>
+					</Button>
+					<DropdownMenu slot="list">
+						<DropdownItem v-for="(item, index) in exportList" :key="index" :name="item.name"
+							style="font-size: 12px !important">{{ item.label }}</DropdownItem>
+					</DropdownMenu>
+				</Dropdown>
+				<Button v-auth="['order-write']" class="mr10 greens" size="default" @click="writeOff">订单核销</Button>
+			</div>
+			<div class="caozuo">
+				<Button v-auth="['queue-index']" class="mr10" @click="queuemModal">批量发货记录</Button>
+				<Button v-auth="['export-expressList']" class="mr10" @click="getExpressList">下载物流公司对照表</Button>
+			</div>
+		</div>
+		<!-- 订单列表表格 -->
+		<vxe-table ref="xTable" class="mt25" :loading="loading" row-id="id" :expand-config="{accordion: true}"
+			:checkbox-config="{reserve: true}" @checkbox-all="checkboxAll" @checkbox-change="checkboxItem"
+			:data="orderList">
+			<vxe-column type="" width="0"></vxe-column>
+			<vxe-column type="expand" width="35">
+				<template #content="{ row }">
+					<div class="tdinfo">
+						<Row class="expand-row">
+							<Col span="8">
+							<span class="expand-key">商品总价:</span>
+							<span class="expand-value" v-text="row.total_price"></span>
+							</Col>
+							<Col span="8">
+							<span class="expand-key">下单时间:</span>
+							<span class="expand-value" v-text="row.add_time"></span>
+							</Col>
+							<Col span="8">
+							<span class="expand-key">推广人:</span>
+							<span class="expand-value" v-text="row.spread_nickname?row.spread_nickname:'无'"></span>
+							</Col>
+						</Row>
+						<Row class="expand-row">
+							<Col span="8">
+							<span class="expand-key">用户备注:</span>
+							<span class="expand-value" v-text="row.mark?row.mark:'无'"></span>
+							</Col>
+							<Col span="8">
+							<span class="expand-key">商家备注:</span>
+							<span class="expand-value" v-text="row.remark?row.remark:'无'"></span>
+							</Col>
+						</Row>
+					</div>
+				</template>
+			</vxe-column>
+			<vxe-column type="checkbox" width="100">
+				<template #header>
+					<div>
+						<Dropdown transfer @on-click="allPages">
+							<a href="javascript:void(0)" class="acea-row row-middle">
+								<span>全选({{isAll==1?(page.total-checkUidList.length):checkUidList.length}})</span>
+								<Icon type="ios-arrow-down"></Icon>
+							</a>
+							<template #list>
+								<DropdownMenu>
+									<DropdownItem name="0">当前页</DropdownItem>
+									<DropdownItem name="1">所有页</DropdownItem>
+								</DropdownMenu>
+							</template>
+						</Dropdown>
+					</div>
+				</template>
+			</vxe-column>
+			<vxe-column field="order_id" title="订单号" min-width="175">
+				<template v-slot="{ row }">
+					<Tooltip :transfer="true" theme="dark" max-width="300" :delay="600" content="用户已删除"
+						v-if="row.is_del === 1 && row.delete_time == null">
+						<span style="color: #ed4014; display: block">{{ row.order_id }}</span>
+						<span style="color: #ed4014; display: block">{{ row.store_name }}</span>
+					</Tooltip>
+					<template v-else>
+						<span @click="changeMenu(row, '2')"
+							style="color: #2d8cf0; display: block; cursor: pointer">{{ row.order_id }}</span>
+						<br />
+						<span style="color: #2d8cf0; display: block; cursor: pointer">{{ row.store_name }}</span>
+					</template>
+
+
+				</template>
+			</vxe-column>
+			<vxe-column field="pink_name" title="订单类型" min-width="120"></vxe-column>
+			<vxe-column field="nickname" title="用户信息" min-width="130">
+				<template v-slot="{ row }">
+					<a @click="showUserInfo(row)">{{ row.nickname }}</a>
+					<span style="color: #ed4014" v-if="row.delete_time != null">
+						(已注销)</span>
+				</template>
+			</vxe-column>
+			<vxe-column field="info" title="商品信息" min-width="330">
+				<template v-slot="{ row }">
+					<Tooltip :transfer="true" theme="dark" max-width="300" :delay="600">
+						<div class="tabBox" v-for="(val, i) in row._info" :key="i">
+							<div class="tabBox_img" v-viewer>
+								<img
+									v-lazy="val.cart_info.productInfo.attrInfo? val.cart_info.productInfo.attrInfo.image: val.cart_info.productInfo.image" />
+							</div>
+							<span class="tabBox_tit line1">
+								<span class="font-color-red" v-if="val.cart_info.is_gift">赠品</span>
+
+								{{ val.cart_info.productInfo.store_name + ' | ' }}
+								{{val.cart_info.productInfo.attrInfo?val.cart_info.productInfo.attrInfo.suk: ''}}
+							</span>
+						</div>
+						<div slot="content">
+							<div v-for="(val, i) in row._info" :key="i">
+								<p class="font-color-red" v-if="val.cart_info.is_gift">赠品</p>
+								<p>{{ val.cart_info.productInfo.store_name }}</p>
+								<p> {{ val.cart_info.productInfo.attrInfo? val.cart_info.productInfo.attrInfo.suk: ''}}
+								</p>
+								<p class="tabBox_pice">
+									{{'¥' + val.cart_info.sum_price +' x ' + val.cart_info.cart_num }} </p>
+							</div>
+						</div>
+					</Tooltip>
+				</template>
+			</vxe-column>
+			<vxe-column field="pay_price" title="实际支付" align="center" min-width="70">
+				<template v-slot="{ row }">
+					<span>{{ row.paid > 0 ? row.pay_price : 0 }}</span>
+				</template>
+			</vxe-column>
+			<vxe-column field="_pay_time" title="支付时间" min-width="150"></vxe-column>
+			<vxe-column field="pay_type_name" title="支付类型" min-width="100">
+				<template v-slot="{ row }">
+					<span>{{ row.pay_type_name }}</span>
+				</template>
+			</vxe-column>
+			<vxe-column field="statusName" title="订单状态" min-width="100">
+				<template v-slot="{ row }">
+					<Tag color="default" size="medium" v-show="row.status == 3">{{
               row.status_name.status_name
             }}</Tag>
-          <Tag color="orange" size="medium" v-show="row.status == 4">{{
+					<Tag color="orange" size="medium" v-show="row.status == 4">{{
               row.status_name.status_name
             }}</Tag>
-          <Tag
-              color="orange"
-              size="medium"
-              v-show="row.status == 1 || row.status == 2 || row.status == 5"
-              v-html = "row.status_name.status_name"
-          >{{ row.status_name.status_name }}</Tag>
-          <Tag color="red" size="medium" v-show="row.status == 0">{{
+					<Tag color="orange" size="medium" v-show="row.status == 1 || row.status == 2 || row.status == 5"
+						v-html="row.status_name.status_name">{{ row.status_name.status_name }}</Tag>
+					<Tag color="red" size="medium" v-show="row.status == 0">{{
               row.status_name.status_name
             }}</Tag>
-          <Tag
-              color="orange"
-              size="medium"
-              v-if="!row.is_all_refund && row.refund.length"
-          >部分退款中</Tag
-          >
-          <Tag
-              color="orange"
-              size="medium"
-              v-if="row.is_all_refund && row.refund.length && row.refund_type != 6"
-          >退款中</Tag
-          >
-          <div class="pictrue-box" size="medium" v-if="row.status_name.pics">
-            <div
-                v-viewer
-                v-for="(item, index) in row.status_name.pics || []"
-                :key="index"
-            >
-              <img class="pictrue mr10" v-lazy="item" :src="item" />
-            </div>
-          </div>
-        </template>
-      </vxe-column>
-      <vxe-column field="action" title="操作" align="center" width="140" fixed="right">
-        <template v-slot="{ row }">
-          <a
-              :disabled="openErp"
-              @click="sendOrder(row)"
-              v-if="
+					<Tag color="orange" size="medium" v-if="!row.is_all_refund && row.refund.length">部分退款中</Tag>
+					<Tag color="orange" size="medium"
+						v-if="row.is_all_refund && row.refund.length && row.refund_type != 6">退款中</Tag>
+					<div class="pictrue-box" size="medium" v-if="row.status_name.pics">
+						<div v-viewer v-for="(item, index) in row.status_name.pics || []" :key="index">
+							<img class="pictrue mr10" v-lazy="item" :src="item" />
+						</div>
+					</div>
+				</template>
+			</vxe-column>
+			<vxe-column field="action" title="操作" align="center" width="140" fixed="right">
+				<template v-slot="{ row }">
+					<a :disabled="openErp" @click="sendOrder(row)" v-if="
             (row._status === 2 || row._status === 8 || row.status === 4) &&
             row.shipping_type === 1 &&
             (row.pinkStatus === null || row.pinkStatus === 2) &&
             row.delete_time == null &&
             row.store_id === 0 &&
             row.supplier_id === 0
-          "
-          >发送货</a
-          >
-          <a
-              :disabled="openErp"
-              @click="btnClick(row)"
-              v-if="row.supplier_id!==0 && row.status_name.status_name == '未发货'"
-          >提醒发货</a
-          >
-          <Divider
-              type="vertical"
-              v-if="row.supplier_id!==0 && row.status_name.status_name == '未发货'"
-          />
-          <!--    -->
-          <Divider
-              type="vertical"
-              v-if="
+          ">发送货</a>
+					<a :disabled="openErp" @click="btnClick(row)"
+						v-if="row.supplier_id!==0 && row.status_name.status_name == '未发货'">提醒发货</a>
+					<Divider type="vertical" v-if="row.supplier_id!==0 && row.status_name.status_name == '未发货'" />
+					<!--    -->
+					<Divider type="vertical" v-if="
             (row._status === 2 || row._status === 8 || row.status === 4) &&
             row.shipping_type === 1 &&
             (row.pinkStatus === null || row.pinkStatus === 2) &&
             row.delete_time == null &&
             row.store_id === 0 &&
             row.supplier_id === 0
-          "
-          />
-          <a @click="changeMenu(row, '2')">详情</a>
-        </template>
-      </vxe-column>
-    </vxe-table>
-    <div class="acea-row row-right page">
-      <Page
-          :total="page.total"
-          :current="page.pageNum"
-          show-elevator
-          show-total
-          @on-change="pageChange"
-          :page-size="page.pageSize"
-          @on-page-size-change="limitChange"
-          show-sizer
-      />
-    </div>
-    <!-- 分配 -->
-    <Distribution ref="distshow"></Distribution>
-    <!-- 编辑 退款 退积分 不退款-->
-    <edit-from
-      ref="edits"
-      :FromData="FromData"
-      @submitFail="submitFail"
-    ></edit-from>
-    <!-- 会员详情-->
-    <user-details ref="userDetails" fromType="order"></user-details>
-    <!-- 详情 -->
-    <details-from
-      ref="detailss"
-      :orderDatalist="orderDatalist"
-      :orderId="orderId"
-      :row-active="rowActive"
-      :openErp="openErp"
-      :formType="1"
-    ></details-from>
-    <!-- 备注 -->
-    <order-remark
-      ref="remarks"
-      :orderId="orderId"
-      @submitFail="submitFail"
-    ></order-remark>
-    <!-- 记录 -->
-    <order-record ref="record"></order-record>
-    <!-- 发送货 -->
-    <order-send
-      ref="send"
-      :orderId="orderId"
-      :status="status"
-      :pay_type="pay_type"
-      @submitFail="submitFail(1)"
-    ></order-send>
-    <Modal
-      v-model="manualModal"
-      title="手动批量发货"
-      @on-ok="manualModalOk"
-      @on-cancel="manualModalCancel"
-      class-name="vertical-center-modal"
-    >
-      <Row type="flex">
-        <Col span="4">
-          <div style="line-height: 32px; text-align: right">文件:</div>
-        </Col>
-        <Col span="20">
-          <Upload
-            ref="upload"
-            :action="uploadAction"
-            :headers="uploadHeaders"
-            accept=".xlsx,.xls"
-            :format="['xlsx', 'xls']"
-            :disabled="!!fileList.length"
-            :on-success="uploadSuccess"
-            :on-remove="removeFile"
-          >
-            <Button icon="ios-cloud-upload-outline">上传文件</Button>
-          </Upload>
-        </Col>
-      </Row>
-    </Modal>
-    <!--订单核销模态框-->
-    <Modal
-      v-model="modals2"
-      title="订单核销"
-      class="paymentFooter"
-      scrollable
-      width="400"
-      class-name="vertical-center-modal"
-    >
-      <Form
-        ref="writeOffFrom"
-        :model="writeOffFrom"
-        :rules="writeOffRules"
-        :label-position="labelPosition"
-        class="tabform"
-        @submit.native.prevent
-      >
-        <FormItem prop="code" label-for="code">
-          <Input
-            search
-            enter-button="验证"
-            style="width: 100%"
-            type="text"
-            placeholder="请输入12位核销码"
-            @on-search="search('writeOffFrom')"
-            v-model.number="writeOffFrom.code"
-            number
-          />
-        </FormItem>
-      </Form>
-      <div slot="footer">
-        <Button type="primary" @click="ok">立即核销</Button>
-        <Button @click="del('writeOffFrom')">取消</Button>
-      </div>
-    </Modal>
-    <auto-send ref="sends" :selectArr="checkUidList" :isAll="isAll"></auto-send>
-    <queue-list ref="queue"></queue-list>
-    <Modal v-model="refundModal" title="手动退款" width="960" class-name="refund-modal" @on-visible-change="visibleChange">
-      <Form :label-width="100">
-        <FormItem label="退款金额:" required>
-          <InputNumber v-model="refundMoney" style="width: 408px;"></InputNumber>
-        </FormItem>
-        <FormItem v-if="refundProductNum > 1" label="分单退款:">
-          <i-switch v-model="is_split_order" :true-value="1" :false-value="0" size="large">
-            <span slot="open">开启</span>
-            <span slot="close">关闭</span>
-          </i-switch>
-          <div class="tips">可选择表格中的商品单独退款,退款后且不能撤回,请谨慎操作!</div>
-          <Table v-show="is_split_order" ref="refundTable" max-height="500" :columns="refundColumns" :data="refundProduct" @on-selection-change="refundSelectionChange">
-            <template slot-scope="{ row }" slot="product">
-              <div class="image-wrap" v-viewer><img :src="row.attrInfo.image" class="image"></div>
-              <div class="title">{{ row.productInfo.store_name }}</div>
-            </template>
-            <template slot-scope="{ row }" slot="action">
-              <InputNumber v-model="row.refundNum" :max="row.cart_num - row.refund_num" :min="1" :precision="0" controls-outside @on-change="refundNumChange(row)"></InputNumber>
-            </template>
-          </Table>
-        </FormItem>
-      </Form>
-      <div slot="footer">
-        <Button @click="cancelRefundModal">取消</Button>
-        <Button type="primary" @click="putOpenRefund">提交</Button>
-      </div>
-    </Modal>
-  </div>
+          " />
+					<a @click="changeMenu(row, '2')">详情</a>
+					<template v-auth="['order-qudou-re']" v-if="row.use_pay_price*1 > 0">
+						<Divider type="vertical" />
+						<a @click="qudou(row)">退趣豆</a>
+					</template>
+					
+				</template>
+			</vxe-column>
+		</vxe-table>
+		<div class="acea-row row-right page">
+			<Page :total="page.total" :current="page.pageNum" show-elevator show-total @on-change="pageChange"
+				:page-size="page.pageSize" @on-page-size-change="limitChange" show-sizer />
+		</div>
+		<!-- 分配 -->
+		<Distribution ref="distshow"></Distribution>
+		<!-- 编辑 退款 退积分 不退款-->
+		<edit-from ref="edits" :FromData="FromData" @submitFail="submitFail"></edit-from>
+		<!-- 会员详情-->
+		<user-details ref="userDetails" fromType="order"></user-details>
+		<!-- 详情 -->
+		<details-from ref="detailss" :orderDatalist="orderDatalist" :orderId="orderId" :row-active="rowActive"
+			:openErp="openErp" :formType="1"></details-from>
+		<!-- 备注 -->
+		<order-remark ref="remarks" :orderId="orderId" @submitFail="submitFail"></order-remark>
+		<!-- 记录 -->
+		<order-record ref="record"></order-record>
+		<!-- 发送货 -->
+		<order-send ref="send" :orderId="orderId" :status="status" :pay_type="pay_type"
+			@submitFail="submitFail(1)"></order-send>
+		<Modal v-model="manualModal" title="手动批量发货" @on-ok="manualModalOk" @on-cancel="manualModalCancel"
+			class-name="vertical-center-modal">
+			<Row type="flex">
+				<Col span="4">
+				<div style="line-height: 32px; text-align: right">文件:</div>
+				</Col>
+				<Col span="20">
+				<Upload ref="upload" :action="uploadAction" :headers="uploadHeaders" accept=".xlsx,.xls"
+					:format="['xlsx', 'xls']" :disabled="!!fileList.length" :on-success="uploadSuccess"
+					:on-remove="removeFile">
+					<Button icon="ios-cloud-upload-outline">上传文件</Button>
+				</Upload>
+				</Col>
+			</Row>
+		</Modal>
+		<!--订单核销模态框-->
+		<Modal v-model="modals2" title="订单核销" class="paymentFooter" scrollable width="400"
+			class-name="vertical-center-modal">
+			<Form ref="writeOffFrom" :model="writeOffFrom" :rules="writeOffRules" :label-position="labelPosition"
+				class="tabform" @submit.native.prevent>
+				<FormItem prop="code" label-for="code">
+					<Input search enter-button="验证" style="width: 100%" type="text" placeholder="请输入12位核销码"
+						@on-search="search('writeOffFrom')" v-model.number="writeOffFrom.code" number />
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button type="primary" @click="ok">立即核销</Button>
+				<Button @click="del('writeOffFrom')">取消</Button>
+			</div>
+		</Modal>
+		<auto-send ref="sends" :selectArr="checkUidList" :isAll="isAll"></auto-send>
+		<queue-list ref="queue"></queue-list>
+		<Modal v-model="refundModal" title="手动退款" width="960" class-name="refund-modal"
+			@on-visible-change="visibleChange">
+			<Form :label-width="100">
+				<FormItem label="退款金额:" required>
+					<InputNumber v-model="refundMoney" style="width: 408px;"></InputNumber>
+				</FormItem>
+				<FormItem v-if="refundProductNum > 1" label="分单退款:">
+					<i-switch v-model="is_split_order" :true-value="1" :false-value="0" size="large">
+						<span slot="open">开启</span>
+						<span slot="close">关闭</span>
+					</i-switch>
+					<div class="tips">可选择表格中的商品单独退款,退款后且不能撤回,请谨慎操作!</div>
+					<Table v-show="is_split_order" ref="refundTable" max-height="500" :columns="refundColumns"
+						:data="refundProduct" @on-selection-change="refundSelectionChange">
+						<template slot-scope="{ row }" slot="product">
+							<div class="image-wrap" v-viewer><img :src="row.attrInfo.image" class="image"></div>
+							<div class="title">{{ row.productInfo.store_name }}</div>
+						</template>
+						<template slot-scope="{ row }" slot="action">
+							<InputNumber v-model="row.refundNum" :max="row.cart_num - row.refund_num" :min="1"
+								:precision="0" controls-outside @on-change="refundNumChange(row)"></InputNumber>
+						</template>
+					</Table>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button @click="cancelRefundModal">取消</Button>
+				<Button type="primary" @click="putOpenRefund">提交</Button>
+			</div>
+		</Modal>
+	</div>
 </template>
 
 <script>
-import Distribution from './distribution.vue'
-import expandRow from './tableExpand.vue'
-import {
-  orderList,
-  getOrdeDatas,
-  getDataInfo,
-  getRefundFrom,
-  getnoRefund,
-  refundIntegral,
-  getDistribution,
-  writeUpdate,
-  storeOrderApi,
-  handBatchDelivery,
-  putWrite,
-  exportExpressList,
-   remindOrder,
-   putOpenRefund
-} from '@/api/order'
-import { erpConfig } from '@/api/erp'
-import { mapState, mapMutations } from 'vuex'
-import editFrom from '../../../../components/from/from'
-import detailsFrom from '../handle/orderDetails'
-import orderRemark from '../handle/orderRemark'
-import orderRecord from '../handle/orderRecord'
-import orderSend from '../handle/orderSend'
-import userDetails from '@/pages/user/list/handle/userDetails'
-import autoSend from '../handle/autoSend'
-import queueList from '../handle/queueList'
-import Setting from '@/setting'
-import util from '@/libs/util'
-import exportExcel from '@/utils/newToExcel.js'
-import Template from '../../../setting/devise/template.vue'
-import printJS from 'print-js';
-
-export default {
-  name: 'table_list',
-  components: {
-    expandRow,
-    editFrom,
-    detailsFrom,
-    orderRemark,
-    orderRecord,
-    orderSend,
-    userDetails,
-    Distribution,
-    autoSend,
-    queueList,
-    Template,
-  },
-  props: ['where'],
-  data() {
-    const codeNum = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('请填写核销码'))
-      }
-      // 模拟异步验证效果
-      if (!Number.isInteger(value)) {
-        callback(new Error('请填写12位数字'))
-      } else {
-        // const reg = /[0-9]{12}/;
-        const reg = /\b\d{12}\b/
-        if (!reg.test(value)) {
-          callback(new Error('请填写12位数字'))
-        } else {
-          callback()
-        }
-      }
-    }
-    return {
-      roterPre: Setting.roterPre,
-      openErp: false,
-      currentTab: '-1',
-      distshow: false, //分配的弹窗
-      delfromData: {},
-      modal: false,
-      orderList: [],
-      pay_type: '',
-      orderCards: [],
-      loading: false,
-      orderId: 0,
-      page: {
-        total: 0, // 总条数
-        pageNum: 1, // 当前页
-        pageSize: 10, // 每页显示条数
-      },
-      data: [],
-      FromData: null,
-      orderDatalist: null,
-      modalTitleSs: '',
-      isDelIdList: [],
-      checkBox: false,
-      formSelection: [],
-      display: 'none',
-      autoDisabled: false,
-      status: 0, //发货状态判断
-      isAll: 0,
-      rowActive: {},
-      tablists: {},
-      selectArr: [],
-      exportList: [
-        {
-          name: '1',
-          label: '导出发货单',
-        },
-        {
-          name: '0',
-          label: '导出订单',
-        },
-      ],
-      exportListOn: 0,
-      manualModal: false,
-      uploadAction: `${Setting.apiBaseURL}/file/upload/1`,
-      uploadHeaders: {},
-      autoModal: false,
-      isShow: false,
-      recordModal: false,
-      sendOutValue: '',
-      fileList: [],
-      file: '',
-      modals2: false,
-      writeOffRules: {
-        code: [{ validator: codeNum, trigger: 'blur', required: true }],
-      },
-      writeOffFrom: {
-        code: '',
-        confirm: 0,
-      },
-      orderConNum: 0,
-      orderConId: 0,
-      checkUidList: [],
-      refundModal: false,
-      refundColumns: [
-        {
-          type: 'selection',
-          width: 60,
-          align: 'center'
-        },
-        {
-          title: '商品信息',
-          width: 210,
-          slot: 'product'
-        },
-        {
-          title: '规格',
-          render: (h, params) => {
-            return h('div', params.row.attrInfo.suk);
-          }
-        },
-        {
-          title: '售价',
-          render: (h, params) => {
-            return h('div', params.row.attrInfo.price);
-          }
-        },
-        {
-          title: '优惠价',
-          key: 'refundPrice'
-        },
-        {
-          title: '总数',
-          key: 'cart_num'
-        },
-        {
-          title: '退款数量',
-          slot: 'action',
-          width: 160,
-        }
-      ],
-      refundProduct: [],
-      refundSelection: [],
-      refundMoney: 0,
-      is_split_order: 0,
-    }
-  },
-  computed: {
-    ...mapState('admin/layout', ['isMobile']),
-    ...mapState('admin/order', [
-      'orderPayType',
-      'orderStatus',
-      'orderTime',
-      'orderNum',
-      'fieldKey',
-      'orderType',
-      'orderChartType',
-      'supplier_id',
-      'store_id',
-      'type_id',
-    ]),
-    labelWidth() {
-      return this.isMobile ? undefined : 96
-    },
-    labelPosition() {
-      return this.isMobile ? 'top' : 'right'
-    },
-    refundProductNum() {
-      return this.refundProduct.reduce((total, { refundNum }) => (total + refundNum), 0);
-    },
-  },
-  mounted() {},
-  created() {
-    this.getList()
-    this.getToken()
-    this.getErpConfig()
-  },
-  watch: {
-    orderType: function () {
-      this.page.pageNum = 1
-      this.getList()
-    },
-    formSelection(value) {
-      // this.$emit('order-select', value)
-      // if (value.length) {
-      //   this.$emit('auto-disabled', 0)
-      // } else {
-      //   this.$emit('auto-disabled', 1)
-      // }
-      // let isDel = value.some((item) => {
-      //   return item.is_del === 1
-      // })
-      // this.getIsDel(isDel)
-      // this.getisDelIdListl(value)
-    },
-    orderList: {
-      deep: true,
-      handler(value) {
-        value.forEach((item) => {
-          this.formSelection.forEach((itm) => {
-            if (itm.id === item.id) {
-              item.checkBox = true
-            }
-          })
-        })
-        const arr = this.orderList.filter((item) => item.checkBox)
-        if (this.orderList.length) {
-          this.checkBox = this.orderList.length === arr.length
-        } else {
-          this.checkBox = false
-        }
-      },
-    },
-    refundSelection: {
-      handler(value) {
-        this.refundMoney = value.reduce((total, { refundPrice, refundNum }) => {
-          return this.$computes.Add(total, this.$computes.Mul(refundPrice, refundNum));
-        }, 0);
-      },
-      deep: true
-    },
-    is_split_order(value) {
-      this.$nextTick(() => {
-        this.$refs.refundTable.selectAll(!!value);
-      });
-    },
-    refundMoney(value) {
-      this.$nextTick(() => {
-        if (typeof value != 'number') {
-          return;
-        }
-        if (parseFloat(value) == parseInt(value)) {
-          return;
-        }
-        if (value.toString().length - (value.toString().indexOf('.') + 1) > 2) {
-          this.refundMoney = Number(value.toFixed(2));
-        }
-      });
-    },
-  },
-  methods: {
-    ...mapMutations('admin/order', [
-      'getIsDel',
-      'getisDelIdListl',
-      'onChangeTabs',
-      'getStore_id',
-      'getSupplier_id',
-    ]),
-    visibleChange(visible) {
-      this.is_split_order = 0;
-      if (!visible) {
-        this.refundSelection = [];
-      }
-    },
-    cancelRefundModal() {
-      this.refundModal = false;
-    },
-    putOpenRefund() {
-      let data = {
-        id: this.orderId,
-        refund_price: this.refundMoney,
-        type: 1,
-        is_split_order: this.is_split_order
-      };
-      if (this.is_split_order) {
-        if (!this.refundSelection.length) {
-          return this.$Message.error('请选择需要退款的商品');
-        }
-        data.cart_ids = this.refundSelection.map(({ id, refundNum }) => ({
-          cart_id: id,
-          cart_num: refundNum
-        }));
-      }
-      putOpenRefund(data).then(res => {
-        this.$Message.success(res.msg);
-        this.refundModal = false;
-        this.getData(this.orderDatalist.orderInfo.id);
-      }).catch(err => {
-        this.$Message.error(err.msg);
-      });
-    },
-    refundSelectionChange(selection) {
-      this.refundSelection = selection;
-    },
-    refundNumChange({ id, refundNum }) {
-      let result = this.refundSelection.find(item => item.id === id);
-      if (result) {
-        result.refundNum = refundNum;
-      }
-    },
-    checkboxItem(e){
-      let id = parseInt(e.rowid);
-      let index = this.checkUidList.indexOf(id);
-      if(index !== -1){
-        this.checkUidList = this.checkUidList.filter((item)=> item !== id);
-      }else{
-        this.checkUidList.push(id);
-      }
-    },
-    checkboxAll(){
-      // 获取选中当前值
-      let obj2 = this.$refs.xTable.getCheckboxRecords(true);
-      // 获取之前选中值
-      let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
-	  if(this.isAll == 0 && this.checkUidList.length <= obj.length && !this.isCheckBox){
-	  	 obj = [];
-	  }
-      obj = obj.concat(obj2);
-      let ids = [];
-      obj.forEach((item)=>{
-        ids.push(parseInt(item.id))
-      })
-      this.checkUidList = ids;
-      if(!obj2.length){
-        this.isCheckBox = false;
-      }
-    },
-    allPages(e){
-      this.isAll = e;
-      if(e==0){
-        this.$refs.xTable.toggleAllCheckboxRow();
-        // this.checkboxAll();
-      }else{
-        if(!this.isCheckBox){
-          this.$refs.xTable.setAllCheckboxRow(true);
-          this.isCheckBox = true;
-          this.isAll = 1;
-        }else{
-          this.$refs.xTable.setAllCheckboxRow(false);
-          this.isCheckBox = false;
-          this.isAll = 0;
-        }
-        this.checkUidList = []
-      }
-    },
-    //erp配置
-    getErpConfig() {
-      erpConfig()
-        .then((res) => {
-          this.openErp = res.data.open_erp
-        })
-        .catch((err) => {
-          this.$Message.error(err.msg)
-        })
-    },
-    printOreder() {
-      if (this.checkUidList.length > 10 || (this.isAll==1 && this.page.total>10)) {
-        return this.$Message.error('最多批量打印10个订单')
-      }
-      let ids = []
-      if (this.isAll==1 && this.page.total<=10){
-        this.orderList.forEach(item=>{
-          ids.push(parseInt(item.id))
-        })
-      }
-      let pathInfo = this.$router.resolve({
-        path: this.roterPre + '/supplier/order/distribution',
-        query: {
-          id: this.isAll==1?ids.join(','):this.checkUidList.join(','),
-          status: 2,
-        },
-      })
-      window.open(pathInfo.href, '_blank')
-    },
-
-    delAll() {
-      if (this.checkUidList.length === 0 && this.isAll==0) {
-        return this.$Message.error('请先选择删除的订单!')
-      }
-      let idss = {
-        all: this.isAll,
-        ids: this.checkUidList,
-      }
-      let delfromData = {
-        title: '删除订单',
-        url: `/order/dels`,
-        method: 'post',
-        ids: idss,
-      }
-      this.$modalSure(delfromData)
-          .then((res) => {
-            this.$Message.success(res.msg)
-            this.checkUidList = []
-            this.getList()
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg)
-          })
-    },
-
-    onAuto() {
-      this.$refs.sends.modals = true;
-      this.$refs.sends.getList();
-      this.$refs.sends.getDeliveryList();
-    },
-    // 提醒发货
-       btnClick(row) {
-      let data = {
-        supplier_id: row.supplier_id,
-        id: row.id,
-      }
-      remindOrder(data)
-        .then(async (res) => {
-          this.$Message.success(res.msg)
-        })
-        .catch((res) => {
-          this.$Message.error(res.msg)
-        })
-    },
-
-    queuemModal() {
-      this.$refs.queue.modal = true
-    },
-
-    // 下载物流公司对照表
-    async getExpressList() {
-      let [th, filekey, data, fileName] = [[], [], [], '']
-      let lebData = await this.getExcelData()
-      if (!fileName) fileName = lebData.filename
-      if (!filekey.length) {
-        filekey = lebData.filekey
-      }
-      if (!th.length) th = lebData.header
-      data = lebData.export
-      exportExcel(th, filekey, fileName, data)
-    },
-
-    getExcelData() {
-      return new Promise((resolve, reject) => {
-        exportExpressList().then((res) => {
-          return resolve(res.data)
-        })
-      })
-    },
-
-    // 订单核销
-    writeOff() {
-      this.modals2 = true
-    },
-
-    // 验证
-    search(name) {
-      this.$refs[name].validate((valid) => {
-        if (valid) {
-          this.writeOffFrom.confirm = 0
-          putWrite(this.writeOffFrom)
-            .then(async (res) => {
-              if (res.status === 200) {
-                // this.orderInfo = res.data;
-                this.$Message.success(res.msg)
-              } else {
-                this.$Message.error(res.msg)
-              }
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg)
-            })
-        } else {
-          this.$Message.error('请填写正确的核销码')
-        }
-      })
-    },
-
-    // 订单核销
-    ok() {
-      if (!this.writeOffFrom.code) {
-        this.$Message.warning('请先验证订单!')
-      } else {
-        this.writeOffFrom.confirm = 1
-        putWrite(this.writeOffFrom)
-          .then(async (res) => {
-            if (res.status === 200) {
-              this.$Message.success(res.msg)
-              this.modals2 = false
-              this.$refs[name].resetFields()
-              this.$emit('getList')
-            } else {
-              this.$Message.error(res.msg)
-            }
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg)
-          })
-      }
-    },
-
-    del(name) {
-      // this.orderInfo = ''
-      this.modals2 = false
-      this.writeOffFrom.confirm = 0
-      this.$refs[name].resetFields()
-    },
-
-    // 上传头部token
-    getToken() {
-      this.uploadHeaders['Authori-zation'] =
-        'Bearer ' + util.cookies.get('token')
-    },
-
-    // 上传成功
-    uploadSuccess(res, file, fileList) {
-      if (res.status === 200) {
-        this.$Message.success(res.msg)
-        this.file = res.data.src
-        this.fileList = fileList
-      } else {
-        this.$Message.error(res.msg)
-      }
-    },
-
-    //移除文件
-    removeFile(file, fileList) {
-      this.file = ''
-      this.fileList = fileList
-    },
-
-    // 手动批量发货-确定
-    manualModalOk() {
-      this.$refs.upload.clearFiles()
-      handBatchDelivery({ file: this.file })
-        .then((res) => {
-          this.$Message.success(res.msg)
-          this.fileList = []
-        })
-        .catch((err) => {
-          this.$Message.error(err.msg)
-          this.fileList = []
-        })
-    },
-
-    // 手动批量发货-取消
-    manualModalCancel() {
-      this.fileList = []
-      this.$refs.upload.clearFiles()
-    },
-
-    getTabs() {
-      this.spinShow = true
-      this.$store
-        .dispatch('admin/order/getOrderTabs', {
-          status: this.orderStatus,
-          pay_type: this.orderPayType,
-          data: this.orderTime,
-          real_name: this.orderNum,
-          field_key: this.fieldKey,
-          type: this.type_id,
-          plat_type: this.currentTab,
-          store_id: this.store_id,
-          supplier_id: this.supplier_id,
-        })
-        .then((res) => {
-          this.tablists = res.data
-          // this.onChangeChart(this.tablists)
-          this.spinShow = false
-        })
-        .catch((res) => {
-          this.spinShow = false
-          this.$Message.error(res.msg)
-        })
-    },
-    onClickTab() {
-      this.onChangeTabs(this.currentTab)
-      this.isAll = 0;
-      this.isCheckBox = false;
-      this.$refs.xTable.setAllCheckboxRow(false);
-      this.checkUidList = [];
-      if (this.currentTab == 1) {
-        this.getSupplier_id('')
-      }
-      if (this.currentTab == 2) {
-        this.getStore_id('')
-      }
-      this.getList()
-      this.$store.dispatch('admin/order/getOrderTabs', {
-        type: this.currentTab,
-      })
-    },
-    closeDetail() {
-      this.$refs.detailss.modals = false
-    },
-    distribution(row) {
-      this.$refs.distshow.modals = true
-      this.$refs.distshow.formValidate.keywords = ''
-      this.$refs.distshow.getList(row.id)
-    },
-    showUserInfo(row) {
-      this.$refs.userDetails.modals = true
-      this.$refs.userDetails.activeName = 'info'
-      this.$refs.userDetails.getDetails(row.uid)
-    },
-	//修改增加打印方法
-	printImg(url) {
-	  printJS({
-	    printable: url,
-	    type: 'image',
-	    documentTitle: '快递信息',
-	    style: `img{
+	import Distribution from './distribution.vue'
+	import expandRow from './tableExpand.vue'
+	import {
+		orderList,
+		getOrdeDatas,
+		getDataInfo,
+		getRefundFrom,
+		getnoRefund,
+		refundIntegral,
+		getDistribution,
+		writeUpdate,
+		storeOrderApi,
+		handBatchDelivery,
+		putWrite,
+		exportExpressList,
+		remindOrder,
+		putOpenRefund
+	} from '@/api/order'
+	import {
+		erpConfig
+	} from '@/api/erp'
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
+	import editFrom from '../../../../components/from/from'
+	import detailsFrom from '../handle/orderDetails'
+	import orderRemark from '../handle/orderRemark'
+	import orderRecord from '../handle/orderRecord'
+	import orderSend from '../handle/orderSend'
+	import userDetails from '@/pages/user/list/handle/userDetails'
+	import autoSend from '../handle/autoSend'
+	import queueList from '../handle/queueList'
+	import Setting from '@/setting'
+	import util from '@/libs/util'
+	import exportExcel from '@/utils/newToExcel.js'
+	import Template from '../../../setting/devise/template.vue'
+	import printJS from 'print-js';
+
+	export default {
+		name: 'table_list',
+		components: {
+			expandRow,
+			editFrom,
+			detailsFrom,
+			orderRemark,
+			orderRecord,
+			orderSend,
+			userDetails,
+			Distribution,
+			autoSend,
+			queueList,
+			Template,
+		},
+		props: ['where'],
+		data() {
+			const codeNum = (rule, value, callback) => {
+				if (!value) {
+					return callback(new Error('请填写核销码'))
+				}
+				// 模拟异步验证效果
+				if (!Number.isInteger(value)) {
+					callback(new Error('请填写12位数字'))
+				} else {
+					// const reg = /[0-9]{12}/;
+					const reg = /\b\d{12}\b/
+					if (!reg.test(value)) {
+						callback(new Error('请填写12位数字'))
+					} else {
+						callback()
+					}
+				}
+			}
+			return {
+				roterPre: Setting.roterPre,
+				openErp: false,
+				currentTab: '-1',
+				distshow: false, //分配的弹窗
+				delfromData: {},
+				modal: false,
+				orderList: [],
+				pay_type: '',
+				orderCards: [],
+				loading: false,
+				orderId: 0,
+				page: {
+					total: 0, // 总条数
+					pageNum: 1, // 当前页
+					pageSize: 10, // 每页显示条数
+				},
+				data: [],
+				FromData: null,
+				orderDatalist: null,
+				modalTitleSs: '',
+				isDelIdList: [],
+				checkBox: false,
+				formSelection: [],
+				display: 'none',
+				autoDisabled: false,
+				status: 0, //发货状态判断
+				isAll: 0,
+				rowActive: {},
+				tablists: {},
+				selectArr: [],
+				exportList: [{
+						name: '1',
+						label: '导出发货单',
+					},
+					{
+						name: '0',
+						label: '导出订单',
+					},
+				],
+				exportListOn: 0,
+				manualModal: false,
+				uploadAction: `${Setting.apiBaseURL}/file/upload/1`,
+				uploadHeaders: {},
+				autoModal: false,
+				isShow: false,
+				recordModal: false,
+				sendOutValue: '',
+				fileList: [],
+				file: '',
+				modals2: false,
+				writeOffRules: {
+					code: [{
+						validator: codeNum,
+						trigger: 'blur',
+						required: true
+					}],
+				},
+				writeOffFrom: {
+					code: '',
+					confirm: 0,
+				},
+				orderConNum: 0,
+				orderConId: 0,
+				checkUidList: [],
+				refundModal: false,
+				refundColumns: [{
+						type: 'selection',
+						width: 60,
+						align: 'center'
+					},
+					{
+						title: '商品信息',
+						width: 210,
+						slot: 'product'
+					},
+					{
+						title: '规格',
+						render: (h, params) => {
+							return h('div', params.row.attrInfo.suk);
+						}
+					},
+					{
+						title: '售价',
+						render: (h, params) => {
+							return h('div', params.row.attrInfo.price);
+						}
+					},
+					{
+						title: '优惠价',
+						key: 'refundPrice'
+					},
+					{
+						title: '总数',
+						key: 'cart_num'
+					},
+					{
+						title: '退款数量',
+						slot: 'action',
+						width: 160,
+					}
+				],
+				refundProduct: [],
+				refundSelection: [],
+				refundMoney: 0,
+				is_split_order: 0,
+			}
+		},
+		computed: {
+			...mapState('admin/layout', ['isMobile']),
+			...mapState('admin/order', [
+				'orderPayType',
+				'orderStatus',
+				'orderTime',
+				'orderNum',
+				'fieldKey',
+				'orderType',
+				'orderChartType',
+				'supplier_id',
+				'store_id',
+				'type_id',
+			]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96
+			},
+			labelPosition() {
+				return this.isMobile ? 'top' : 'right'
+			},
+			refundProductNum() {
+				return this.refundProduct.reduce((total, {
+					refundNum
+				}) => (total + refundNum), 0);
+			},
+		},
+		mounted() {},
+		created() {
+			this.getList()
+			this.getToken()
+			this.getErpConfig()
+		},
+		watch: {
+			orderType: function() {
+				this.page.pageNum = 1
+				this.getList()
+			},
+			formSelection(value) {
+				// this.$emit('order-select', value)
+				// if (value.length) {
+				//   this.$emit('auto-disabled', 0)
+				// } else {
+				//   this.$emit('auto-disabled', 1)
+				// }
+				// let isDel = value.some((item) => {
+				//   return item.is_del === 1
+				// })
+				// this.getIsDel(isDel)
+				// this.getisDelIdListl(value)
+			},
+			orderList: {
+				deep: true,
+				handler(value) {
+					value.forEach((item) => {
+						this.formSelection.forEach((itm) => {
+							if (itm.id === item.id) {
+								item.checkBox = true
+							}
+						})
+					})
+					const arr = this.orderList.filter((item) => item.checkBox)
+					if (this.orderList.length) {
+						this.checkBox = this.orderList.length === arr.length
+					} else {
+						this.checkBox = false
+					}
+				},
+			},
+			refundSelection: {
+				handler(value) {
+					this.refundMoney = value.reduce((total, {
+						refundPrice,
+						refundNum
+					}) => {
+						return this.$computes.Add(total, this.$computes.Mul(refundPrice, refundNum));
+					}, 0);
+				},
+				deep: true
+			},
+			is_split_order(value) {
+				this.$nextTick(() => {
+					this.$refs.refundTable.selectAll(!!value);
+				});
+			},
+			refundMoney(value) {
+				this.$nextTick(() => {
+					if (typeof value != 'number') {
+						return;
+					}
+					if (parseFloat(value) == parseInt(value)) {
+						return;
+					}
+					if (value.toString().length - (value.toString().indexOf('.') + 1) > 2) {
+						this.refundMoney = Number(value.toFixed(2));
+					}
+				});
+			},
+		},
+		methods: {
+			...mapMutations('admin/order', [
+				'getIsDel',
+				'getisDelIdListl',
+				'onChangeTabs',
+				'getStore_id',
+				'getSupplier_id',
+			]),
+			qudou(row) {
+				let delfromData = {
+					title: '退还趣豆',
+					url: `/qudou_ref/${row.id}`,
+					method: 'post',
+					ids: idss,
+				}
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg)
+						this.checkUidList = []
+						this.getList()
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+			visibleChange(visible) {
+				this.is_split_order = 0;
+				if (!visible) {
+					this.refundSelection = [];
+				}
+			},
+			cancelRefundModal() {
+				this.refundModal = false;
+			},
+			putOpenRefund() {
+				let data = {
+					id: this.orderId,
+					refund_price: this.refundMoney,
+					type: 1,
+					is_split_order: this.is_split_order
+				};
+				if (this.is_split_order) {
+					if (!this.refundSelection.length) {
+						return this.$Message.error('请选择需要退款的商品');
+					}
+					data.cart_ids = this.refundSelection.map(({
+						id,
+						refundNum
+					}) => ({
+						cart_id: id,
+						cart_num: refundNum
+					}));
+				}
+				putOpenRefund(data).then(res => {
+					this.$Message.success(res.msg);
+					this.refundModal = false;
+					this.getData(this.orderDatalist.orderInfo.id);
+				}).catch(err => {
+					this.$Message.error(err.msg);
+				});
+			},
+			refundSelectionChange(selection) {
+				this.refundSelection = selection;
+			},
+			refundNumChange({
+				id,
+				refundNum
+			}) {
+				let result = this.refundSelection.find(item => item.id === id);
+				if (result) {
+					result.refundNum = refundNum;
+				}
+			},
+			checkboxItem(e) {
+				let id = parseInt(e.rowid);
+				let index = this.checkUidList.indexOf(id);
+				if (index !== -1) {
+					this.checkUidList = this.checkUidList.filter((item) => item !== id);
+				} else {
+					this.checkUidList.push(id);
+				}
+			},
+			checkboxAll() {
+				// 获取选中当前值
+				let obj2 = this.$refs.xTable.getCheckboxRecords(true);
+				// 获取之前选中值
+				let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
+				if (this.isAll == 0 && this.checkUidList.length <= obj.length && !this.isCheckBox) {
+					obj = [];
+				}
+				obj = obj.concat(obj2);
+				let ids = [];
+				obj.forEach((item) => {
+					ids.push(parseInt(item.id))
+				})
+				this.checkUidList = ids;
+				if (!obj2.length) {
+					this.isCheckBox = false;
+				}
+			},
+			allPages(e) {
+				this.isAll = e;
+				if (e == 0) {
+					this.$refs.xTable.toggleAllCheckboxRow();
+					// this.checkboxAll();
+				} else {
+					if (!this.isCheckBox) {
+						this.$refs.xTable.setAllCheckboxRow(true);
+						this.isCheckBox = true;
+						this.isAll = 1;
+					} else {
+						this.$refs.xTable.setAllCheckboxRow(false);
+						this.isCheckBox = false;
+						this.isAll = 0;
+					}
+					this.checkUidList = []
+				}
+			},
+			//erp配置
+			getErpConfig() {
+				erpConfig()
+					.then((res) => {
+						this.openErp = res.data.open_erp
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg)
+					})
+			},
+			printOreder() {
+				if (this.checkUidList.length > 10 || (this.isAll == 1 && this.page.total > 10)) {
+					return this.$Message.error('最多批量打印10个订单')
+				}
+				let ids = []
+				if (this.isAll == 1 && this.page.total <= 10) {
+					this.orderList.forEach(item => {
+						ids.push(parseInt(item.id))
+					})
+				}
+				let pathInfo = this.$router.resolve({
+					path: this.roterPre + '/supplier/order/distribution',
+					query: {
+						id: this.isAll == 1 ? ids.join(',') : this.checkUidList.join(','),
+						status: 2,
+					},
+				})
+				window.open(pathInfo.href, '_blank')
+			},
+
+			delAll() {
+				if (this.checkUidList.length === 0 && this.isAll == 0) {
+					return this.$Message.error('请先选择删除的订单!')
+				}
+				let idss = {
+					all: this.isAll,
+					ids: this.checkUidList,
+				}
+				let delfromData = {
+					title: '删除订单',
+					url: `/order/dels`,
+					method: 'post',
+					ids: idss,
+				}
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg)
+						this.checkUidList = []
+						this.getList()
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			onAuto() {
+				this.$refs.sends.modals = true;
+				this.$refs.sends.getList();
+				this.$refs.sends.getDeliveryList();
+			},
+			// 提醒发货
+			btnClick(row) {
+				let data = {
+					supplier_id: row.supplier_id,
+					id: row.id,
+				}
+				remindOrder(data)
+					.then(async (res) => {
+						this.$Message.success(res.msg)
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			queuemModal() {
+				this.$refs.queue.modal = true
+			},
+
+			// 下载物流公司对照表
+			async getExpressList() {
+				let [th, filekey, data, fileName] = [
+					[],
+					[],
+					[], ''
+				]
+				let lebData = await this.getExcelData()
+				if (!fileName) fileName = lebData.filename
+				if (!filekey.length) {
+					filekey = lebData.filekey
+				}
+				if (!th.length) th = lebData.header
+				data = lebData.export
+				exportExcel(th, filekey, fileName, data)
+			},
+
+			getExcelData() {
+				return new Promise((resolve, reject) => {
+					exportExpressList().then((res) => {
+						return resolve(res.data)
+					})
+				})
+			},
+
+			// 订单核销
+			writeOff() {
+				this.modals2 = true
+			},
+
+			// 验证
+			search(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.writeOffFrom.confirm = 0
+						putWrite(this.writeOffFrom)
+							.then(async (res) => {
+								if (res.status === 200) {
+									// this.orderInfo = res.data;
+									this.$Message.success(res.msg)
+								} else {
+									this.$Message.error(res.msg)
+								}
+							})
+							.catch((res) => {
+								this.$Message.error(res.msg)
+							})
+					} else {
+						this.$Message.error('请填写正确的核销码')
+					}
+				})
+			},
+
+			// 订单核销
+			ok() {
+				if (!this.writeOffFrom.code) {
+					this.$Message.warning('请先验证订单!')
+				} else {
+					this.writeOffFrom.confirm = 1
+					putWrite(this.writeOffFrom)
+						.then(async (res) => {
+							if (res.status === 200) {
+								this.$Message.success(res.msg)
+								this.modals2 = false
+								this.$refs[name].resetFields()
+								this.$emit('getList')
+							} else {
+								this.$Message.error(res.msg)
+							}
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg)
+						})
+				}
+			},
+
+			del(name) {
+				// this.orderInfo = ''
+				this.modals2 = false
+				this.writeOffFrom.confirm = 0
+				this.$refs[name].resetFields()
+			},
+
+			// 上传头部token
+			getToken() {
+				this.uploadHeaders['Authori-zation'] =
+					'Bearer ' + util.cookies.get('token')
+			},
+
+			// 上传成功
+			uploadSuccess(res, file, fileList) {
+				if (res.status === 200) {
+					this.$Message.success(res.msg)
+					this.file = res.data.src
+					this.fileList = fileList
+				} else {
+					this.$Message.error(res.msg)
+				}
+			},
+
+			//移除文件
+			removeFile(file, fileList) {
+				this.file = ''
+				this.fileList = fileList
+			},
+
+			// 手动批量发货-确定
+			manualModalOk() {
+				this.$refs.upload.clearFiles()
+				handBatchDelivery({
+						file: this.file
+					})
+					.then((res) => {
+						this.$Message.success(res.msg)
+						this.fileList = []
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg)
+						this.fileList = []
+					})
+			},
+
+			// 手动批量发货-取消
+			manualModalCancel() {
+				this.fileList = []
+				this.$refs.upload.clearFiles()
+			},
+
+			getTabs() {
+				this.spinShow = true
+				this.$store
+					.dispatch('admin/order/getOrderTabs', {
+						status: this.orderStatus,
+						pay_type: this.orderPayType,
+						data: this.orderTime,
+						real_name: this.orderNum,
+						field_key: this.fieldKey,
+						type: this.type_id,
+						plat_type: this.currentTab,
+						store_id: this.store_id,
+						supplier_id: this.supplier_id,
+					})
+					.then((res) => {
+						this.tablists = res.data
+						// this.onChangeChart(this.tablists)
+						this.spinShow = false
+					})
+					.catch((res) => {
+						this.spinShow = false
+						this.$Message.error(res.msg)
+					})
+			},
+			onClickTab() {
+				this.onChangeTabs(this.currentTab)
+				this.isAll = 0;
+				this.isCheckBox = false;
+				this.$refs.xTable.setAllCheckboxRow(false);
+				this.checkUidList = [];
+				if (this.currentTab == 1) {
+					this.getSupplier_id('')
+				}
+				if (this.currentTab == 2) {
+					this.getStore_id('')
+				}
+				this.getList()
+				this.$store.dispatch('admin/order/getOrderTabs', {
+					type: this.currentTab,
+				})
+			},
+			closeDetail() {
+				this.$refs.detailss.modals = false
+			},
+			distribution(row) {
+				this.$refs.distshow.modals = true
+				this.$refs.distshow.formValidate.keywords = ''
+				this.$refs.distshow.getList(row.id)
+			},
+			showUserInfo(row) {
+				this.$refs.userDetails.modals = true
+				this.$refs.userDetails.activeName = 'info'
+				this.$refs.userDetails.getDetails(row.uid)
+			},
+			//修改增加打印方法
+			printImg(url) {
+				printJS({
+					printable: url,
+					type: 'image',
+					documentTitle: '快递信息',
+					style: `img{
 	      width: 100%;
 	      height: 476px;
 	    }`,
-	  });
-	},
-    // 操作
-    changeMenu(row, name, num) {
-      this.orderId = row.id
-      this.orderConId = row.pid > 0 ? row.pid : row.id
-      this.orderConNum = num
-      switch (name) {
-        case '1':
-          this.delfromData = {
-            title: '修改立即支付',
-            url: `/order/pay_offline/${row.id}`,
-            method: 'post',
-            ids: '',
-          }
-          this.$modalSure(this.delfromData)
-            .then((res) => {
-              this.$Message.success(res.msg)
-              this.$emit('changeGetTabs')
-              this.getData(row.id, 1)
-              this.getList()
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg)
-            })
-          // this.modalTitleSs = '修改立即支付';
-          break
-        case '2':
-          this.rowActive = row
-          this.getData(row.id)
-          break
-        case '3':
-          this.$refs.record.modals = true
-          this.$refs.record.getList(row.id)
-          break
-        case '4':
-          this.$refs.remarks.formValidate.remark = row.remark
-          this.$refs.remarks.modals = true
-          break
-        case '5':
-          this.getOnlyrefundData(row.id, row.refund_type)
-          break
-        case '55':
-          this.getrefundData(row.id, row.refund_type)
-          break
-        case '6':
-          this.getRefundIntegral(row.id)
-          break
-        case '7':
-          this.getNorefundData(row.id)
-          break
-        case '8':
-          this.delfromData = {
-            title: '修改确认收货',
-            url: `/order/take/${row.id}`,
-            method: 'put',
-            ids: '',
-          }
-          this.$modalSure(this.delfromData)
-            .then((res) => {
-              this.$Message.success(res.msg)
-              this.$emit('changeGetTabs')
-              this.getList()
-              if (num) {
-                this.$refs.detailss.getSplitOrder(row.pid)
-              } else {
-                this.getData(row.id, 1)
-              }
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg)
-            })
-          // this.modalTitleSs = '修改确认收货';
-          break
-        case '10':
-          this.delfromData = {
-            title: '立即打印订单',
-            info: '您确认打印此订单吗?',
-            url: `/order/print/${row.id}`,
-            method: 'get',
-            ids: '',
-          }
-          this.$modalSure(this.delfromData)
-            .then((res) => {
-              this.$Message.success(res.msg)
-              this.$emit('changeGetTabs')
-              this.getList()
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg)
-            })
-          break
-        case '11':
-          this.delfromData = {
-            title: '立即打印电子面单',
-            info: '您确认打印此电子面单吗?',
-            url: `/order/order_dump/${row.id}`,
-            method: 'get',
-            ids: '',
-          }
-          this.$modalSure(this.delfromData)
-            .then((res) => {
-              this.$Message.success(res.msg)
-              this.getList()
-            })
-            .catch((res) => {
-              this.$Message.error(res.msg)
-            })
-          break
-        case '12':
-          let pathInfo = this.$router.resolve({
-            path: this.roterPre + '/supplier/order/distribution',
-            query: {
-              id: row.id,
-              status: 2,
-            },
-          })
-          window.open(pathInfo.href, '_blank')
-          break
-		case '13':
-		  this.printImg(row.kuaidi_label);
-		  break;  
-        default:
-          this.delfromData = {
-            title: '删除订单',
-            url: `/order/del/${row.id}`,
-            method: 'DELETE',
-            ids: '',
-          }
-          // this.modalTitleSs = '删除订单';
-          this.delOrder(row, this.delfromData)
-      }
-    },
-
-    // 立即支付 /确认收货//删除单条订单
-    submitModel() {
-      this.getList()
-    },
-    pageChange(index) {
-      this.page.pageNum = index
-      this.getList()
-    },
-    limitChange(limit) {
-      this.page.pageSize = limit
-      this.getList()
-    },
-
-    // 订单列表
-    getList(res) {
-      if(res==1){
-        this.isAll = 0;
-        this.$refs.xTable.setAllCheckboxRow(false);
-        this.checkUidList = [];
-      }
-      this.page.pageNum = res === 1 ? 1 : this.page.pageNum
-      this.loading = true
-      orderList({
-        page: this.page.pageNum,
-        limit: this.page.pageSize,
-        status: this.orderStatus,
-        pay_type: this.orderPayType,
-        data: this.orderTime,
-        real_name: this.orderNum,
-        field_key: this.fieldKey,
-        type: this.type_id,
-        plat_type: this.currentTab,
-        store_id: this.store_id,
-        supplier_id: this.supplier_id,
-      })
-        .then(async (res) => {
-          let data = res.data
-          data.data.forEach((item) => {
-            item.checkBox = this.isAll == 1;
-            if (item.id == this.orderId) {
-              this.rowActive = item
-            }
-          })
-          // this.orderList = data.data;
-          this.$set(this, 'orderList', data.data)
-          this.orderCards = data.stat
-          this.page.total = data.count
-          this.$emit('on-changeCards', data.stat)
-          this.loading = false
-          this.getTabs()
-          this.$nextTick(function(){
-            if (this.isAll == 1) {
-              if(this.isCheckBox){
-                this.$refs.xTable.setAllCheckboxRow(true);
-              }else{
-                this.$refs.xTable.setAllCheckboxRow(false);
-              }
-            }else{
-			  let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
-			  if(!this.checkUidList.length || this.checkUidList.length <= obj.length){
-			    this.$refs.xTable.setAllCheckboxRow(false);
-			  }
-            }
-          })
-        })
-        .catch((res) => {
-          this.loading = false
-          this.$Message.error(res.msg)
-        })
-    },
-
-    // 编辑
-    edit(row) { 
-      this.getOrderData(row.id)
-    },
-    splitOrderDetail(row) {
-      this.$router.push({
-        path: this.roterPre + 'split_list',
-        query: {
-          id: row.id,
-          orderChartType: this.orderStatus,
-        },
-      })
-    },
-
-    // 删除单条订单
-    delOrder(row, data) {
-      if (row.is_del === 1) {
-        this.$modalSure(data)
-          .then((res) => {
-            this.$Message.success(res.msg)
-            this.getList()
-            this.$refs.detailss.modals = false
-            this.$emit('changeGetTabs')
-          })
-          .catch((res) => {
-            this.$Message.error(res.msg)
-          })
-      } else {
-        const title = '错误!'
-        const content =
-          '<p>您选择的的订单存在用户未删除的订单,无法删除用户未删除的订单!</p>'
-        this.$Modal.error({
-          title: title,
-          content: content,
-        })
-      }
-    },
-
-    // 获取编辑表单数据
-    getOrderData(id) {
-      getOrdeDatas(id)
-        .then(async (res) => {
-          if (res.data.status === false) {
-            return this.$authLapse(res.data)
-          }
-          this.$authLapse(res.data)
-          this.FromData = res.data
-          this.$refs.edits.modals = true
-        })
-        .catch((res) => {
-          this.$Message.error(res.msg)
-        })
-    },
-
-    // 获取详情表单数据
-    getData(id, type) {
-      // this.$refs.detailss.modals = true;
-      getDataInfo(id)
-        .then(async (res) => {
-          if (!type) {
-            this.$refs.detailss.modals = true
-          }
-          // this.$refs.detailss.activeName = 'detail'
-          this.orderDatalist = res.data
-          if (this.orderDatalist.orderInfo.refund_reason_wap_img) {
-            try {
-              this.orderDatalist.orderInfo.refund_reason_wap_img = JSON.parse(
-                this.orderDatalist.orderInfo.refund_reason_wap_img
-              )
-            } catch (e) {
-              this.orderDatalist.orderInfo.refund_reason_wap_img = []
-            }
-          }
-        })
-        .catch((res) => {
-          this.$Message.error(res.msg)
-        })
-    },
-
-    // 修改成功
-    submitFail(type) {
-      this.status = 0
-      this.getList()
-      if (this.orderConNum != 1) {
-        this.getData(this.orderId, 1)
-      } else {
-        this.$refs.detailss.getSplitOrder(this.orderConId)
-      }
-      if (type) {
-        this.$emit('changeGetTabs')
-      }
-    },
-
-    // 仅退款
-    getOnlyrefundData(id, refund_type) {
-      // this.$modalForm(getRefundFrom(id)).then(() => {
-      //   this.getList()
-      //   this.$emit('changeGetTabs')
-      //   this.$refs.detailss.modals = false
-      // })
-      let _info = this.rowActive._info;
-      let cart_info = Object.keys(_info).map((key) => {
-        return _info[key].cart_info;
-      });
-      cart_info.forEach((value) => {
-        value.refundPrice = this.$computes.Div(value.refund_price, value.cart_num);
-        value.refundNum = value.cart_num - value.refund_num;
-        value._disabled = !value.refundNum;
-      });
-      this.refundProduct = cart_info;
-      if (this.refundProductNum === 1) {
-        this.refundSelection = cart_info;
-      }
-      this.refundModal = true;
-    },
-
-    // 退货退款
-    getrefundData(id, refund_type) {
-      this.delfromData = {
-        title: '是否立即退货退款',
-        url: `/refund/agree/${id}`,
-        method: 'get',
-      }
-      this.$modalSure(this.delfromData)
-        .then((res) => {
-          this.$Message.success(res.msg)
-          this.getList()
-          this.$emit('changeGetTabs')
-        })
-        .catch((res) => {
-          this.$Message.error(res.msg)
-        })
-    },
-
-    // 获取退积分表单数据
-    getRefundIntegral(id) {
-      refundIntegral(id)
-        .then(async (res) => {
-          this.FromData = res.data
-          this.$refs.edits.modals = true
-        })
-        .catch((res) => {
-          this.$Message.error(res.msg)
-        })
-    },
-
-    // 不退款表单数据
-    getNorefundData(id) {
-      this.$modalForm(getnoRefund(id)).then(() => {
-        this.getList()
-        this.$emit('changeGetTabs')
-      })
-    },
-
-    // 发送货
-    sendOrder(row, num) {
-      this.orderConId = row.pid
-      this.orderConNum = num
-      this.$store.commit('admin/order/setSplitOrder', row.total_num)
-      this.$refs.send.modals = true
-      this.orderId = row.id
-      this.status = row._status
-      this.pay_type = row.pay_type
-      this.$refs.send.getList()
-      this.$refs.send.getDeliveryList()
-      this.$nextTick((e) => {
-        this.$refs.send.getCartInfo(row._status, row.id)
-      })
-    },
-
-    // 配送信息表单数据
-    delivery(row, num) {
-      getDistribution(row.id)
-        .then(async (res) => {
-          this.orderConNum = num
-          this.orderConId = row.pid
-          this.FromData = res.data
-          this.$refs.edits.modals = true
-          if (num != 1) {
-            this.getData(this.orderId, 1)
-          }
-        })
-        .catch((res) => {
-          this.$Message.error(res.msg)
-        })
-    },
-
-    // 订单导出
-    change(status) {},
-    async exports(value) {
-      this.exportListOn = this.exportList.findIndex(
-          (item) => item.name === value
-      )
-      let [th, filekey, data, fileName] = [[], [], [], '']
-      let excelData = {
-        ...this.where,
-        page: 1,
-        export_type: value,
-        ids: this.checkUidList.join()
-      }
-      for (let i = 0; i < excelData.page; i++) {
-        let lebData = await this.downOrderData(excelData)
-        if (!lebData.export.length) {
-          break;
-        }
-        if (!fileName) {
-          fileName = lebData.filename
-        }
-        if (!filekey.length) {
-          filekey = lebData.filekey
-        }
-        if (!th.length) {
-          th = lebData.header
-        }
-        data = data.concat(lebData.export)
-        excelData.page++
-      }
-      let sheetData = []
-      for (let j = 0; j < data.length; j++) {
-        let goodsList = data[j].goods_name.split('\n')
-        for (let k = 0; k < goodsList.length; k++) {
-          let row = {...data[j]}
-          row.goods_name = goodsList[k]
-          if (k) {
-            for (const key in row) {
-              if (Object.hasOwnProperty.call(row, key)) {
-                if (key !== 'goods_name') {
-                  row[key] = null
-                }
-              }
-            }
-          }
-          sheetData.push(row)
-        }
-      }
-      exportExcel(th, filekey, fileName, sheetData)
-    },
-
-    downOrderData(excelData) {
-      return new Promise((resolve, reject) => {
-        storeOrderApi(excelData).then((res) => {
-          return resolve(res.data)
-        })
-      })
-    },
-
-    // 核销订单
-    bindWrite(row) {
-      let self = this
-      this.$Modal.confirm({
-        title: '提示',
-        content: '确定要核销该订单吗?',
-        cancelText: '取消',
-        closable: true,
-        maskClosable: true,
-        onOk: function () {
-          writeUpdate(row.order_id).then((res) => {
-            self.$Message.success(res.msg)
-            self.getList()
-          })
-        },
-        onCancel: () => {},
-      })
-    },
-  },
-}
+				});
+			},
+			// 操作
+			changeMenu(row, name, num) {
+				this.orderId = row.id
+				this.orderConId = row.pid > 0 ? row.pid : row.id
+				this.orderConNum = num
+				switch (name) {
+					case '1':
+						this.delfromData = {
+							title: '修改立即支付',
+							url: `/order/pay_offline/${row.id}`,
+							method: 'post',
+							ids: '',
+						}
+						this.$modalSure(this.delfromData)
+							.then((res) => {
+								this.$Message.success(res.msg)
+								this.$emit('changeGetTabs')
+								this.getData(row.id, 1)
+								this.getList()
+							})
+							.catch((res) => {
+								this.$Message.error(res.msg)
+							})
+						// this.modalTitleSs = '修改立即支付';
+						break
+					case '2':
+						this.rowActive = row
+						this.getData(row.id)
+						break
+					case '3':
+						this.$refs.record.modals = true
+						this.$refs.record.getList(row.id)
+						break
+					case '4':
+						this.$refs.remarks.formValidate.remark = row.remark
+						this.$refs.remarks.modals = true
+						break
+					case '5':
+						this.getOnlyrefundData(row.id, row.refund_type)
+						break
+					case '55':
+						this.getrefundData(row.id, row.refund_type)
+						break
+					case '6':
+						this.getRefundIntegral(row.id)
+						break
+					case '7':
+						this.getNorefundData(row.id)
+						break
+					case '8':
+						this.delfromData = {
+							title: '修改确认收货',
+							url: `/order/take/${row.id}`,
+							method: 'put',
+							ids: '',
+						}
+						this.$modalSure(this.delfromData)
+							.then((res) => {
+								this.$Message.success(res.msg)
+								this.$emit('changeGetTabs')
+								this.getList()
+								if (num) {
+									this.$refs.detailss.getSplitOrder(row.pid)
+								} else {
+									this.getData(row.id, 1)
+								}
+							})
+							.catch((res) => {
+								this.$Message.error(res.msg)
+							})
+						// this.modalTitleSs = '修改确认收货';
+						break
+					case '10':
+						this.delfromData = {
+							title: '立即打印订单',
+							info: '您确认打印此订单吗?',
+							url: `/order/print/${row.id}`,
+							method: 'get',
+							ids: '',
+						}
+						this.$modalSure(this.delfromData)
+							.then((res) => {
+								this.$Message.success(res.msg)
+								this.$emit('changeGetTabs')
+								this.getList()
+							})
+							.catch((res) => {
+								this.$Message.error(res.msg)
+							})
+						break
+					case '11':
+						this.delfromData = {
+							title: '立即打印电子面单',
+							info: '您确认打印此电子面单吗?',
+							url: `/order/order_dump/${row.id}`,
+							method: 'get',
+							ids: '',
+						}
+						this.$modalSure(this.delfromData)
+							.then((res) => {
+								this.$Message.success(res.msg)
+								this.getList()
+							})
+							.catch((res) => {
+								this.$Message.error(res.msg)
+							})
+						break
+					case '12':
+						let pathInfo = this.$router.resolve({
+							path: this.roterPre + '/supplier/order/distribution',
+							query: {
+								id: row.id,
+								status: 2,
+							},
+						})
+						window.open(pathInfo.href, '_blank')
+						break
+					case '13':
+						this.printImg(row.kuaidi_label);
+						break;
+					default:
+						this.delfromData = {
+							title: '删除订单',
+							url: `/order/del/${row.id}`,
+							method: 'DELETE',
+							ids: '',
+						}
+						// this.modalTitleSs = '删除订单';
+						this.delOrder(row, this.delfromData)
+				}
+			},
+
+			// 立即支付 /确认收货//删除单条订单
+			submitModel() {
+				this.getList()
+			},
+			pageChange(index) {
+				this.page.pageNum = index
+				this.getList()
+			},
+			limitChange(limit) {
+				this.page.pageSize = limit
+				this.getList()
+			},
+
+			// 订单列表
+			getList(res) {
+				if (res == 1) {
+					this.isAll = 0;
+					this.$refs.xTable.setAllCheckboxRow(false);
+					this.checkUidList = [];
+				}
+				this.page.pageNum = res === 1 ? 1 : this.page.pageNum
+				this.loading = true
+				orderList({
+						page: this.page.pageNum,
+						limit: this.page.pageSize,
+						status: this.orderStatus,
+						pay_type: this.orderPayType,
+						data: this.orderTime,
+						real_name: this.orderNum,
+						field_key: this.fieldKey,
+						type: this.type_id,
+						plat_type: this.currentTab,
+						store_id: this.store_id,
+						supplier_id: this.supplier_id,
+					})
+					.then(async (res) => {
+						let data = res.data
+						data.data.forEach((item) => {
+							item.checkBox = this.isAll == 1;
+							if (item.id == this.orderId) {
+								this.rowActive = item
+							}
+						})
+						// this.orderList = data.data;
+						this.$set(this, 'orderList', data.data)
+						this.orderCards = data.stat
+						this.page.total = data.count
+						this.$emit('on-changeCards', data.stat)
+						this.loading = false
+						this.getTabs()
+						this.$nextTick(function() {
+							if (this.isAll == 1) {
+								if (this.isCheckBox) {
+									this.$refs.xTable.setAllCheckboxRow(true);
+								} else {
+									this.$refs.xTable.setAllCheckboxRow(false);
+								}
+							} else {
+								let obj = this.$refs.xTable.getCheckboxReserveRecords(true);
+								if (!this.checkUidList.length || this.checkUidList.length <= obj.length) {
+									this.$refs.xTable.setAllCheckboxRow(false);
+								}
+							}
+						})
+					})
+					.catch((res) => {
+						this.loading = false
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 编辑
+			edit(row) {
+				this.getOrderData(row.id)
+			},
+			splitOrderDetail(row) {
+				this.$router.push({
+					path: this.roterPre + 'split_list',
+					query: {
+						id: row.id,
+						orderChartType: this.orderStatus,
+					},
+				})
+			},
+
+			// 删除单条订单
+			delOrder(row, data) {
+				if (row.is_del === 1) {
+					this.$modalSure(data)
+						.then((res) => {
+							this.$Message.success(res.msg)
+							this.getList()
+							this.$refs.detailss.modals = false
+							this.$emit('changeGetTabs')
+						})
+						.catch((res) => {
+							this.$Message.error(res.msg)
+						})
+				} else {
+					const title = '错误!'
+					const content =
+						'<p>您选择的的订单存在用户未删除的订单,无法删除用户未删除的订单!</p>'
+					this.$Modal.error({
+						title: title,
+						content: content,
+					})
+				}
+			},
+
+			// 获取编辑表单数据
+			getOrderData(id) {
+				getOrdeDatas(id)
+					.then(async (res) => {
+						if (res.data.status === false) {
+							return this.$authLapse(res.data)
+						}
+						this.$authLapse(res.data)
+						this.FromData = res.data
+						this.$refs.edits.modals = true
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 获取详情表单数据
+			getData(id, type) {
+				// this.$refs.detailss.modals = true;
+				getDataInfo(id)
+					.then(async (res) => {
+						if (!type) {
+							this.$refs.detailss.modals = true
+						}
+						// this.$refs.detailss.activeName = 'detail'
+						this.orderDatalist = res.data
+						if (this.orderDatalist.orderInfo.refund_reason_wap_img) {
+							try {
+								this.orderDatalist.orderInfo.refund_reason_wap_img = JSON.parse(
+									this.orderDatalist.orderInfo.refund_reason_wap_img
+								)
+							} catch (e) {
+								this.orderDatalist.orderInfo.refund_reason_wap_img = []
+							}
+						}
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 修改成功
+			submitFail(type) {
+				this.status = 0
+				this.getList()
+				if (this.orderConNum != 1) {
+					this.getData(this.orderId, 1)
+				} else {
+					this.$refs.detailss.getSplitOrder(this.orderConId)
+				}
+				if (type) {
+					this.$emit('changeGetTabs')
+				}
+			},
+
+			// 仅退款
+			getOnlyrefundData(id, refund_type) {
+				// this.$modalForm(getRefundFrom(id)).then(() => {
+				//   this.getList()
+				//   this.$emit('changeGetTabs')
+				//   this.$refs.detailss.modals = false
+				// })
+				let _info = this.rowActive._info;
+				let cart_info = Object.keys(_info).map((key) => {
+					return _info[key].cart_info;
+				});
+				cart_info.forEach((value) => {
+					value.refundPrice = this.$computes.Div(value.refund_price, value.cart_num);
+					value.refundNum = value.cart_num - value.refund_num;
+					value._disabled = !value.refundNum;
+				});
+				this.refundProduct = cart_info;
+				if (this.refundProductNum === 1) {
+					this.refundSelection = cart_info;
+				}
+				this.refundModal = true;
+			},
+
+			// 退货退款
+			getrefundData(id, refund_type) {
+				this.delfromData = {
+					title: '是否立即退货退款',
+					url: `/refund/agree/${id}`,
+					method: 'get',
+				}
+				this.$modalSure(this.delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg)
+						this.getList()
+						this.$emit('changeGetTabs')
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 获取退积分表单数据
+			getRefundIntegral(id) {
+				refundIntegral(id)
+					.then(async (res) => {
+						this.FromData = res.data
+						this.$refs.edits.modals = true
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 不退款表单数据
+			getNorefundData(id) {
+				this.$modalForm(getnoRefund(id)).then(() => {
+					this.getList()
+					this.$emit('changeGetTabs')
+				})
+			},
+
+			// 发送货
+			sendOrder(row, num) {
+				this.orderConId = row.pid
+				this.orderConNum = num
+				this.$store.commit('admin/order/setSplitOrder', row.total_num)
+				this.$refs.send.modals = true
+				this.orderId = row.id
+				this.status = row._status
+				this.pay_type = row.pay_type
+				this.$refs.send.getList()
+				this.$refs.send.getDeliveryList()
+				this.$nextTick((e) => {
+					this.$refs.send.getCartInfo(row._status, row.id)
+				})
+			},
+
+			// 配送信息表单数据
+			delivery(row, num) {
+				getDistribution(row.id)
+					.then(async (res) => {
+						this.orderConNum = num
+						this.orderConId = row.pid
+						this.FromData = res.data
+						this.$refs.edits.modals = true
+						if (num != 1) {
+							this.getData(this.orderId, 1)
+						}
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg)
+					})
+			},
+
+			// 订单导出
+			change(status) {},
+			async exports(value) {
+				this.exportListOn = this.exportList.findIndex(
+					(item) => item.name === value
+				)
+				let [th, filekey, data, fileName] = [
+					[],
+					[],
+					[], ''
+				]
+				let excelData = {
+					...this.where,
+					page: 1,
+					export_type: value,
+					ids: this.checkUidList.join()
+				}
+				for (let i = 0; i < excelData.page; i++) {
+					let lebData = await this.downOrderData(excelData)
+					if (!lebData.export.length) {
+						break;
+					}
+					if (!fileName) {
+						fileName = lebData.filename
+					}
+					if (!filekey.length) {
+						filekey = lebData.filekey
+					}
+					if (!th.length) {
+						th = lebData.header
+					}
+					data = data.concat(lebData.export)
+					excelData.page++
+				}
+				let sheetData = []
+				for (let j = 0; j < data.length; j++) {
+					let goodsList = data[j].goods_name.split('\n')
+					for (let k = 0; k < goodsList.length; k++) {
+						let row = {
+							...data[j]
+						}
+						row.goods_name = goodsList[k]
+						if (k) {
+							for (const key in row) {
+								if (Object.hasOwnProperty.call(row, key)) {
+									if (key !== 'goods_name') {
+										row[key] = null
+									}
+								}
+							}
+						}
+						sheetData.push(row)
+					}
+				}
+				exportExcel(th, filekey, fileName, sheetData)
+			},
+
+			downOrderData(excelData) {
+				return new Promise((resolve, reject) => {
+					storeOrderApi(excelData).then((res) => {
+						return resolve(res.data)
+					})
+				})
+			},
+
+			// 核销订单
+			bindWrite(row) {
+				let self = this
+				this.$Modal.confirm({
+					title: '提示',
+					content: '确定要核销该订单吗?',
+					cancelText: '取消',
+					closable: true,
+					maskClosable: true,
+					onOk: function() {
+						writeUpdate(row.order_id).then((res) => {
+							self.$Message.success(res.msg)
+							self.getList()
+						})
+					},
+					onCancel: () => {},
+				})
+			},
+		},
+	}
 </script>
 
 <style scoped lang="stylus">
-/deep/.ivu-dropdown-item{
-  font-size: 12px!important;
-}
-/deep/.vxe-table--render-default .vxe-cell{
-  font-size: 12px;
-}
-.tdinfo{
-  margin-left: 75px;
-  margin-top: 16px;
-}
-.expand-row{
-  margin-bottom: 16px;
-  font-size: 12px;
-}
-.ivu-tag-orange{
-  color #fa8c16;
-}
-img {
-  height: 36px;
-  display: block;
-}
-
-.tabBox {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  align-items: center;
-
-  .tabBox_img {
-    width: 30px;
-    height: 30px;
-
-    img {
-      width: 100%;
-      height: 100%;
-    }
-  }
-
-  .tabBox_tit {
-    width: 290px;
-    height: 30px;
-    line-height: 30px;
-    font-size: 12px !important;
-    margin: 0 2px 0 10px;
-    letter-spacing: 1px;
-    box-sizing: border-box;
-  }
-}
-
-.tabBox +.tabBox {
-  margin-top: 5px;
-}
-
-.vertical-center-modal {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-/deep/.select-item:hover {
-  background-color: #f3f3f3;
-}
-
-/deep/.select-on {
-  display: block;
-}
-
-/deep/.select-item.on {
-  /* background: #f3f3f3; */
-}
-
-.pictrue-box {
-  display: flex;
-  align-item: center;
-}
-
-.pictrue {
-  width: 25px;
-  height: 25px;
-}
-
-.trip {
-  color: orange;
-}
-
-.new_tab {
-  >>>.ivu-tabs-nav .ivu-tabs-tab {
-    padding: 4px 16px 20px !important;
-    font-weight: 500;
-  }
-}
->>> .ivu-table-fixed-body {
-  background-color: #f8f8f9;
-}
->>>.ivu-table th {
-  overflow: visible;
-}
-
->>>.refund-modal {
-  .ivu-input-number-controls-outside {
-    width: 105px;
-    height: 28px;
-    border: 0;
-    border-radius: 0;
-    background-color: transparent;
-    font-size: 16px;
-    line-height: 28px;
-    box-shadow: none;
-  }
-
-  .ivu-input-number-controls-outside:focus {
-    box-shadow: none;
-  }
-
-  .ivu-input-number-controls-outside-btn {
-    width: 28px;
-    height: 28px;
-    border: 0;
-    border-radius: 50%;
-    background-color: #1890FF;
-    line-height: 28px;
-    color: #FFFFFF;
-  }
-
-  .ivu-input-number-input-wrap {
-    height: 28px;
-  }
-
-  .ivu-input-number-controls-outside .ivu-input-number-input {
-    height: 28px;
-    background-color: transparent;
-    text-align: center;
-    line-height: 28px;
-  }
-
-  .ivu-input-number-controls-outside-btn i {
-    font-weight: bold;
-  }
-
-  .ivu-input-number-controls-outside-btn:hover i {
-    color: inherit;
-  }
-
-  .ivu-input-number-controls-outside-btn-disabled, .ivu-input-number-controls-outside-btn-disabled:hover {
-    background-color: #F5F5F5;
-  }
-
-  .ivu-input-number-controls-outside-btn-disabled i, .ivu-input-number-controls-outside-btn-disabled:hover i {
-    color: rgba(0, 0, 0, 0.85);
-  }
-
-  .tips {
-    padding: 12px 0 23px;
-    font-size: 12px;
-    line-height: 14px;
-    color: #999999;
-  }
-
-  .ivu-modal-footer {
-    padding-bottom: 30px;
-    border: 0;
-    text-align: center;
-  }
-
-  .ivu-modal-footer button + button {
-    margin-left: 20px;
-  }
-
-  .ivu-btn {
-    height: 46px;
-    padding: 0 71px;
-    border-color: #F5F5F5;
-    border-radius: 23px;
-    background-color: #F5F5F5;
-    font-size: 16px !important;
-    color: #666666;
-  }
-
-  .ivu-btn:focus {
-    box-shadow: none;
-  }
-
-  .ivu-btn-primary {
-    border-color: #1890FF;
-    background-color: #1890FF;
-    color: #FFFFFF;
-  }
-
-  .ivu-form .ivu-form-item-label {
-    font-size: 13px !important;
-  }
-
-  .ivu-table {
-    font-size: 14px !important;
-    line-height: 20px;
-  }
-
-  .image-wrap {
-    float: left;
-  }
-
-  .image {
-    width: 46px;
-    height: 46px;
-  }
-
-  .title {
-    margin-left: 52px;
-  }
-}
-</style>
+	/deep/.ivu-dropdown-item {
+		font-size: 12px !important;
+	}
+
+	/deep/.vxe-table--render-default .vxe-cell {
+		font-size: 12px;
+	}
+
+	.tdinfo {
+		margin-left: 75px;
+		margin-top: 16px;
+	}
+
+	.expand-row {
+		margin-bottom: 16px;
+		font-size: 12px;
+	}
+
+	.ivu-tag-orange {
+		color #fa8c16;
+	}
+
+	img {
+		height: 36px;
+		display: block;
+	}
+
+	.tabBox {
+		width: 100%;
+		height: 100%;
+		display: flex;
+		align-items: center;
+
+		.tabBox_img {
+			width: 30px;
+			height: 30px;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.tabBox_tit {
+			width: 290px;
+			height: 30px;
+			line-height: 30px;
+			font-size: 12px !important;
+			margin: 0 2px 0 10px;
+			letter-spacing: 1px;
+			box-sizing: border-box;
+		}
+	}
+
+	.tabBox+.tabBox {
+		margin-top: 5px;
+	}
+
+	.vertical-center-modal {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	/deep/.select-item:hover {
+		background-color: #f3f3f3;
+	}
+
+	/deep/.select-on {
+		display: block;
+	}
+
+	/deep/.select-item.on {
+		/* background: #f3f3f3; */
+	}
+
+	.pictrue-box {
+		display: flex;
+		align-item: center;
+	}
+
+	.pictrue {
+		width: 25px;
+		height: 25px;
+	}
+
+	.trip {
+		color: orange;
+	}
+
+	.new_tab {
+		>>>.ivu-tabs-nav .ivu-tabs-tab {
+			padding: 4px 16px 20px !important;
+			font-weight: 500;
+		}
+	}
+
+	>>>.ivu-table-fixed-body {
+		background-color: #f8f8f9;
+	}
+
+	>>>.ivu-table th {
+		overflow: visible;
+	}
+
+	>>>.refund-modal {
+		.ivu-input-number-controls-outside {
+			width: 105px;
+			height: 28px;
+			border: 0;
+			border-radius: 0;
+			background-color: transparent;
+			font-size: 16px;
+			line-height: 28px;
+			box-shadow: none;
+		}
+
+		.ivu-input-number-controls-outside:focus {
+			box-shadow: none;
+		}
+
+		.ivu-input-number-controls-outside-btn {
+			width: 28px;
+			height: 28px;
+			border: 0;
+			border-radius: 50%;
+			background-color: #1890FF;
+			line-height: 28px;
+			color: #FFFFFF;
+		}
+
+		.ivu-input-number-input-wrap {
+			height: 28px;
+		}
+
+		.ivu-input-number-controls-outside .ivu-input-number-input {
+			height: 28px;
+			background-color: transparent;
+			text-align: center;
+			line-height: 28px;
+		}
+
+		.ivu-input-number-controls-outside-btn i {
+			font-weight: bold;
+		}
+
+		.ivu-input-number-controls-outside-btn:hover i {
+			color: inherit;
+		}
+
+		.ivu-input-number-controls-outside-btn-disabled,
+		.ivu-input-number-controls-outside-btn-disabled:hover {
+			background-color: #F5F5F5;
+		}
+
+		.ivu-input-number-controls-outside-btn-disabled i,
+		.ivu-input-number-controls-outside-btn-disabled:hover i {
+			color: rgba(0, 0, 0, 0.85);
+		}
+
+		.tips {
+			padding: 12px 0 23px;
+			font-size: 12px;
+			line-height: 14px;
+			color: #999999;
+		}
+
+		.ivu-modal-footer {
+			padding-bottom: 30px;
+			border: 0;
+			text-align: center;
+		}
+
+		.ivu-modal-footer button+button {
+			margin-left: 20px;
+		}
+
+		.ivu-btn {
+			height: 46px;
+			padding: 0 71px;
+			border-color: #F5F5F5;
+			border-radius: 23px;
+			background-color: #F5F5F5;
+			font-size: 16px !important;
+			color: #666666;
+		}
+
+		.ivu-btn:focus {
+			box-shadow: none;
+		}
+
+		.ivu-btn-primary {
+			border-color: #1890FF;
+			background-color: #1890FF;
+			color: #FFFFFF;
+		}
+
+		.ivu-form .ivu-form-item-label {
+			font-size: 13px !important;
+		}
+
+		.ivu-table {
+			font-size: 14px !important;
+			line-height: 20px;
+		}
+
+		.image-wrap {
+			float: left;
+		}
+
+		.image {
+			width: 46px;
+			height: 46px;
+		}
+
+		.title {
+			margin-left: 52px;
+		}
+	}
+</style>

+ 10 - 2
src/pages/product/productAdd/index.vue

@@ -75,7 +75,7 @@
 						<span class="addClass" @click="addUnit" v-if="merchantType!=1">新增单位</span>
 					</FormItem>
 					</Col>
-					<!--  <Col span="24">
+					 <Col span="24">
               <FormItem label="商品条形码:" prop="">
                 <Input
                   v-model="formValidate.bar_code"
@@ -83,7 +83,7 @@
                   v-width="'50%'"
                 />
               </FormItem>
-            </Col> -->
+            </Col>
 					<Col span="24">
 					<FormItem label="商品编码:" prop="">
 						<Input v-model="formValidate.code" placeholder="请输入商品编码" v-width="'50%'" />
@@ -401,6 +401,14 @@
 						</RadioGroup>
 					</FormItem>
 					</Col>
+					<Col span="24">
+					<FormItem label="是否称重:" props="is_weigh">
+						<RadioGroup v-model="formValidate.is_weigh" >
+							<Radio :label="0" class="radio">否</Radio>
+							<Radio :label="1">是</Radio>
+						</RadioGroup>
+					</FormItem>
+					</Col>
 					<!-- 多规格添加-->
 					<Col span="24" v-if="formValidate.spec_type === 1 && formValidate.product_type != 4" class="noForm">
 					<Col span="24">

+ 227 - 0
src/pages/setting/systemAdmin/vcope.vue

@@ -0,0 +1,227 @@
+<template>
+<!-- 管理员列表 -->
+    <div>
+      <!-- <Card :bordered="false" dis-hover class="ivu-mt" :padding="0">
+			<div class="new_card_pd">
+                <Form ref="formValidate" :model="formValidate" inline 
+                :label-width="labelWidth" :label-position="labelPosition" 
+                @submit.native.prevent>
+                    <FormItem label="状态:"  label-for="status1">
+                        <Select v-model="formValidate.status" placeholder="请选择" 
+                         clearable class="input-add">
+                            <Option value="">全部</Option>
+                            <Option value="1">开启</Option>
+                            <Option value="0">关闭</Option>
+                        </Select>
+                    </FormItem>
+                    <FormItem label="搜索:"  label-for="status2">
+                        <Input placeholder="请输入姓名或者账号" 
+                        v-model="formValidate.name"
+                        class="input-add mr14"/>
+                        <Button @click="userSearchs()" type="primary">查询</Button>
+                    </FormItem>
+                </Form>
+			</div>
+		</Card> -->
+        <Card :bordered="false" dis-hover class="ivu-mt">
+            <Button v-auth="['setting-system_admin-add']" type="primary" @click="add">添加版本</Button>
+            <Table :columns="columns1" :data="list" class="mt25" no-userFrom-text="暂无数据"
+                   no-filtered-userFrom-text="暂无筛选结果"  :loading="loading" highlight-row>
+                <template slot-scope="{ row }" slot="roles">
+                    <div v-if="row.roles.length!==0">
+                        <Tag color="blue" v-for="(item,index) in row.roles.split(',')" :key="index" v-text="item"></Tag>
+                    </div>
+                </template>
+                <template slot-scope="{ row }" slot="status">
+                    <i-switch v-model="row.status" :value="row.status" :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="formValidate.page" show-elevator show-total @on-change="pageChange"
+                      :page-size="formValidate.limit"/>
+            </div>
+        </Card>
+       <!-- 添加 编辑 -->
+        <admin-from :FromData="FromData" ref="adminfrom" @submitFail="submitFail"></admin-from>
+    </div>
+</template>
+
+<script>
+    import { mapState } from 'vuex';
+    import { adminListApi, adminFromApi, adminEditFromApi, setShowApi,getVersions,versionFromApis,versionEditFromApis } from '@/api/systemAdmin';
+    import adminFrom from '../../../components/from/from';
+    export default {
+        name: 'systemAdmin',
+        components: { adminFrom },
+        data () {
+            return {
+                grid: {
+                    xl: 7,
+                    lg: 7,
+                    md: 12,
+                    sm: 24,
+                    xs: 24
+                },
+                total: 0,
+                loading: false,
+                roleData: {
+                    status1: ''
+                },
+                formValidate: {
+                    roles: '',
+                    status: '',
+                    name: '',
+                    page: 1, // 当前页
+                    limit: 20 // 每页显示条数
+                },
+                list: [],
+                columns1: [
+					{
+					    title: 'ID',
+					    key: 'id',
+					    minWidth: 80
+					},
+                    {
+                        title: '版本名称',
+                        key: 'version',
+                        minWidth: 120
+                    },
+                    {
+                        title: '版本号',
+                        key: 'version_code',
+                        minWidth: 150
+                    },
+                    {
+                        title: '更新内容',
+                        key: 'update_info',
+                        minWidth: 250
+                    },
+                    {
+                        title: '更新时间',
+                        key: 'add_time',
+                        minWidth: 180
+                    },
+                    {
+                        title: '操作',
+                        key: 'action',
+                        slot: 'action',
+                        fixed: 'right',
+                        minWidth: 120
+                    }
+                ],
+                FromData: null,
+                modalTitleSs: '',
+                ids: Number
+            }
+        },
+        computed: {
+            ...mapState('admin/layout', [
+                'isMobile'
+            ]),
+            labelWidth () {
+                return this.isMobile ? undefined : 96;
+            },
+            labelPosition () {
+                return this.isMobile ? 'top' : 'right';
+            }
+        },
+        created () {
+            this.getList();
+        },
+        methods: {
+            // 修改是否开启
+            onchangeIsShow (row) {
+                let data = {
+                    id: row.id,
+                    status: row.status
+                }
+                setShowApi(data).then(async res => {
+                    this.$Message.success(res.msg);
+                }).catch(res => {
+                    this.$Message.error(res.msg);
+                })
+            },
+            // 请求列表
+            submitFail () {
+                this.getList();
+            },
+            // 列表
+            getList () {
+                this.loading = true;
+                this.formValidate.roles = this.formValidate.roles || ''
+                getVersions(this.formValidate).then(async res => {
+                    this.total = res.data.count;
+                    this.list = res.data.list;
+                    this.loading = false;
+                }).catch(res => {
+                    this.loading = false;
+                    this.$Message.error(res.msg);
+                })
+            },
+            pageChange (index) {
+                this.formValidate.page = index
+                this.getList();
+            },
+            // 添加表单
+            add () {
+                versionFromApis().then(async res => {
+                    this.FromData = res.data;
+                    this.$refs.adminfrom.modals = true;
+                }).catch(res => {
+                    this.$Message.error(res.msg);
+                })
+            },
+            // 编辑
+            edit (row) {
+                versionEditFromApis(row.id).then(async res => {
+                    if (res.data.status === false) {
+                        return this.$authLapse(res.data);
+                    }
+                    this.FromData = res.data;
+                    this.$refs.adminfrom.modals = true;
+                }).catch(res => {
+                    this.$Message.error(res.msg);
+                })
+            },
+            // 删除
+            del (row, tit, num) {
+                let delfromData = {
+                    title: tit,
+                    num: num,
+                    url: `setting/version/${row.id}`,
+                    method: 'DELETE',
+                    ids: ''
+                };
+                this.$modalSure(delfromData).then((res) => {
+                    this.$Message.success(res.msg);
+                    this.list.splice(num, 1);
+                    if (!this.list.length) {
+                      this.formValidate.page =
+                          this.formValidate.page == 1 ? 1 : this.formValidate.page - 1;
+                    }
+                    this.getList();
+                }).catch(res => {
+                    this.$Message.error(res.msg);
+                });
+            },
+            // 表格搜索
+            userSearchs () {
+                this.formValidate.page = 1;
+                this.list = [];
+                this.getList();
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 14 - 1
src/pages/store/components/addStore.vue

@@ -51,6 +51,13 @@
 							</Col>
 							<Col span="24">
 							<Col v-bind="grid">
+							<FormItem label="汇付账号:" prop="huifu_id" label-for="huifu_id">
+								<Input v-model="formItem.huifu_id" placeholder="请输入汇付账号" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
 							<FormItem label="门店名称:" prop="name" label-for="name">
 								<Input v-model="formItem.name" maxlength="20" show-word-limit placeholder="请输入门店名称" />
 							</FormItem>
@@ -270,6 +277,7 @@
 	import uploadPictures from '@/components/uploadPictures';
 	import erpList from './erpList.vue';
 	import Maps from '@/components/map/map.vue'
+import { FormItem } from 'element-ui';
 	export default {
 		name: 'systemStore',
 		components: {
@@ -339,7 +347,8 @@
 					product_status: 1,
 					type: 1,
 					negative_stock:0,
-					applicable_type: 1
+					applicable_type: 1,
+					huifu_id: ''
 				},
 				spinShow: false,
 				addresData: [],
@@ -499,6 +508,7 @@
 			clearFrom() {
 				this.goodsList = [];
 				this.formItem = {
+					huifu_id: '',
 					cate_id: [],
 					id: 0,
 					store_account: '',
@@ -651,6 +661,9 @@
 						if (this.formItem.valid_range == '' || this.formItem.valid_range < 0) {
 							return this.$Message.error('请输入有效的门店范围');
 						}
+						if(this.formItem.huifu_id && this.formItem.huifu_id.length != 16) {
+							return this.$Message.error('请输入有效的汇付账号');
+						}
 						let product_id = []
 						this.goodsList.forEach(item => {
 							product_id.push(item.product_id)

+ 9 - 0
src/router/modules/erp.js

@@ -291,6 +291,15 @@ export default {
 			},
 			component: () => import('@/pages/erp/product/addProduct')
 		},
+		{
+			path: 'jx',
+			name: `${pre}jx`,
+			meta: {
+				auth: ['admin-erp-jx'],
+				title: '镜像'
+			},
+			component: () => import('@/pages/erp/jingxiang/index')
+		},
 		{
 			path: 'batch',
 			name: `${pre}batch`,

+ 10 - 1
src/router/modules/finance.js

@@ -58,6 +58,15 @@ export default {
                 title: '佣金记录'
             },
             component: () => import('@/pages/finance/commission/index')
-        }
+        },
+		{
+		    path: 'yue',
+		    name: `${pre}yue`,
+		    meta: {
+		        auth: ['admin-finance-yue'],
+		        title: '余额记录'
+		    },
+		    component: () => import('@/pages/finance/yue/index')
+		}
     ]
 };

+ 27 - 0
src/router/modules/marketing.js

@@ -29,6 +29,33 @@ export default {
             },
             component: () => import('@/pages/marketing/home/index')
         },
+		{
+		    path: 'czcard_list',
+		    name: `${pre}czcardlist`,
+		    meta: {
+		        auth: ['admin-marketing-czcard_list'],
+		        title: '充值卡列表'
+		    },
+		    component: () => import('@/pages/marketing/czcard/index')
+		},
+		{
+		    path: 'czcard_card_list',
+		    name: `${pre}czcardCardlist`,
+		    meta: {
+		        auth: ['admin-marketing-czcard_card_list'],
+		        title: '次卡列表'
+		    },
+		    component: () => import('@/pages/marketing/czcard/card')
+		},
+		{
+		    path: 'czcard_create/:id?',
+		    name: `${pre}czcardcreate`,
+		    meta: {
+		        auth: ['admin-marketing-czcard_create'],
+		        title: '添加充值卡'
+		    },
+		    component: () => import('@/pages/marketing/czcard/create')
+		},
         {
             path: 'store_combination/index',
             name: `${pre}combinalist`,

+ 9 - 0
src/router/modules/setting.js

@@ -114,6 +114,15 @@ export default {
 		    },
 		    component: () => import('@/pages/setting/systemAdmin/version')
 		},
+		{
+		    path: 'system_admin/vcope',
+		    name: `${pre}systemAdminVcope`,
+		    meta: {
+		        auth: ['setting-system-vcope'],
+		        title: 'ERP版本列表'
+		    },
+		    component: () => import('@/pages/setting/systemAdmin/vcope')
+		},
         {
             path: 'system_menus/index',
             name: `${pre}systemMenus`,

+ 1 - 0
src/setting.js

@@ -12,6 +12,7 @@
  * */
 // 请求接口地址 如果没有配置自动获取当前网址路径
 const VUE_APP_API_URL = process.env.VUE_APP_API_URL || `${location.origin}/adminapi`;
+console.log(process,'process')
 // 管理端ws
 const VUE_APP_WS_ADMIN_URL = process.env.VUE_APP_WS_ADMIN_URL || `ws:${location.hostname}/ws`
 // 路由前缀