lhl 3 months ago
parent
commit
5d7fa08611

+ 52 - 0
src/api/erp.js

@@ -818,6 +818,58 @@ export function cJsAuth(id,data) {
 	  data
 	});
 }
+
+/**
+ * @description 门店盘点单列表
+ * @param {Object} param data {Object} 传值参数
+ */
+export function getMdInventory(data) {
+	return request({
+	  url: "/erp/Product/inventory_lst",
+	  method: "get",
+	  params:data
+	});
+}
+
+/**
+ * @description 门店盘点单保存
+ * @param {Object} param data {Object} 传值参数
+ */
+export function saveMdInventory(data) {
+	return request({
+	  url: "/erp/Product/inventory_save",
+	  method: "post",
+	  data
+	});
+}
+
+/**
+ * @description 门店盘点单审核
+ * @param {Object} param data {Object} 传值参数
+ */
+export function authMdInventory(data) {
+	return request({
+	  url: "/erp/Product/inventory_auth",
+	  method: "post",
+	  data
+	});
+}
+
+/**
+ * @description 门店盘点单详情
+ * @param {Object} param data {Object} 传值参数
+ */
+export function infoMdInventory(id) {
+	return request({
+	  url: "/erp/Product/inventory_info/" + id,
+	  method: "get"
+	});
+}
+
+// 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' => '门店盘点单审核']);
+// Route::get('Product/inventory_info/:id', 'v1.erp.Goods/inventory_info')->option(['real_name' => '门店盘点单详情']);
 /*
 Route::get('user/list', 'v1.erp.User/index')->option(['real_name' => '用户列表']);
 Route::get('user/info/:id', 'v1.erp.User/info')->option(['real_name' => '用户详情']);

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

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

+ 37 - 10
src/pages/erp/in/addInList.vue

@@ -66,6 +66,14 @@
 									<Input v-if="row.is_weigh == 1" v-model="goodsList[index].net_weight" :placeholder="'请输入商品净重('+row.p_unit_name+')'" v-width="'150'" type="number"/>
 									<div v-else>/</div>
 								</template>
+								<template slot-scope="{ row,index }" slot="dan">
+									<Input v-if="row.is_weigh == 1" v-model="goodsList[index].dan" placeholder="请输入单个皮重" v-width="'150'" type="number"/>
+									<div v-else>/</div>
+								</template>
+								<template slot-scope="{ row,index }" slot="zong">
+									<Input v-if="row.is_weigh == 1" v-model="goodsList[index].zong" placeholder="请输入总重" v-width="'150'" type="number"/>
+									<div v-else>/</div>
+								</template>
 								<template slot-scope="{ row,index }" slot="timeValue">
 									<el-date-picker v-model="row.timeValue" type="date" size="mini" style="width: 150px;"
 									placeholder="选择日期" @change="changeTime($event,row,index)" ></el-date-picker>
@@ -248,14 +256,24 @@
 						minWidth: 150
 					},
 					
+					// {
+					// 	title: '毛重',
+					// 	slot: 'tare_weight',
+					// 	minWidth: 150
+					// },
+					// {
+					// 	title: '净重',
+					// 	slot: 'net_weight',
+					// 	minWidth: 150
+					// },
 					{
-						title: '毛重',
-						slot: 'tare_weight',
+						title: '单个皮重(kg)',
+						slot: 'dan',
 						minWidth: 150
 					},
 					{
-						title: '净重',
-						slot: 'net_weight',
+						title: '总重(kg)',
+						slot: 'zong',
 						minWidth: 150
 					},
 					{
@@ -378,14 +396,22 @@
 					}
 					for (var i = 0; i < this.goodsList.length; i ++) {
 						if(this.goodsList[i].is_weigh == 1){
-							if(this.goodsList[i].tare_weight == '' || this.goodsList[i].tare_weight == null){
-								this.$Message.error("请输入商品毛重");
-								return;
+							if(this.goodsList[i].zong == '' ) {
+								return this.$Message.error("请输入商品总重");
 							}
-							if(this.goodsList[i].net_weight == ''|| this.goodsList[i].net_weight == null){
-								this.$Message.error("请输入商品净重");
-								return;
+							if(this.goodsList[i].dan == '' ) {
+								return this.$Message.error("请输入商品单个皮重");
 							}
+							this.goodsList[i].net_weight = (this.goodsList[i].zong*1-this.goodsList[i].dan*1*this.goodsList[i].pur_num).toFixed(3);
+							this.goodsList[i].tare_weight =(this.goodsList[i].dan*1*this.goodsList[i].pur_num).toFixed(3);
+							// if(this.goodsList[i].tare_weight == '' || this.goodsList[i].tare_weight == null){
+							// 	this.$Message.error("请输入商品毛重");
+							// 	return;
+							// }
+							// if(this.goodsList[i].net_weight == ''|| this.goodsList[i].net_weight == null){
+							// 	this.$Message.error("请输入商品净重");
+							// 	return;
+							// }
 						}
 					}
 				}else {
@@ -439,6 +465,7 @@
 			},
 			//根据采购单号获取商品
 			getGoods() {
+				this.formValidate.orderNumber = this.formValidate.orderNumber.trim()
 				in_status(this.formValidate.orderNumber).then(res => {
 					console.log(res,'根据采购单号获取商品')
 					if(res.data.status == true){

+ 103 - 55
src/pages/erp/out/addOutT.vue

@@ -145,6 +145,10 @@
 											<div class="value"><Input v-model="chooseGoods[gindex].batch[index].weight"
 													placeholder="请输入重量" v-width="'150'" type="number" /></div>
 										</div>
+										<div class="item">
+											<div>价格合计:</div>
+											<div class="value">{{ (item.out_price *(chooseGoods[gindex].batch[index].pur_number*1)*1).toFixed(2) || 0 }}</div>
+										</div>
 										<a v-if="goods.batch.length > 1" @click="delBatch(gindex,index)" class=" del-btn-1">删除</a>
 									</div>
 
@@ -169,6 +173,10 @@
 											<div class="value"><Input v-model="chooseGoods[gindex].weight"
 													placeholder="请输入重量" v-width="'150'" type="number" /></div>
 										</div>
+										<div class="item">
+											<div>价格合计:</div>
+											<div class="value">{{ (goods.out_price * 1 * chooseGoods[gindex].pur_number).toFixed(2)}}</div>
+										</div>
 									</div>
 								</div>
 
@@ -178,6 +186,11 @@
 							>添加商品</Button>
 					</FormItem>
 					</Col>
+					<Col span="24">
+					<FormItem label="总价(元):" prop="total">
+						{{total_price}}
+					</FormItem>
+					</Col>
 				</Row>
 			</Form>
 		</Card>
@@ -374,6 +387,7 @@
 					// 	trigger: "change"
 					// }, ],
 				},
+				total_price: 0,
 			};
 		},
 		computed: {
@@ -385,6 +399,26 @@
 				return this.isMobile ? "top" : "right";
 			},
 		},
+		watch:{
+			chooseGoods: {
+				 handler: function (newValue) {
+				 console.log(newValue,'change');
+				 let total = 0;
+				 newValue.forEach(item => {
+					 if(item.batch.length > 0) {
+						 item.batch.forEach(items => {
+							  console.log(items.out_price,items.pur_number,'jhjhh');
+							 total = (total*1 + (items.out_price*1*(items.pur_number*1)).toFixed(2)*1).toFixed(2)
+						 })
+					 }else {
+						  total = (total*1 + (item.pur_number * 1 * item.out_price)).toFixed(2)
+					 }
+				 })
+				 this.total_price = total
+				},
+				deep: true
+			}
+		},
 		created() {
 			this.getGodownList()
 			let data = {
@@ -447,12 +481,16 @@
 						item.name = item.store_name
 						item.product_id = item.id
 						if(item.group.length > 0) {
-							item.batch = item.group
+							item.batch = item.group.map(item => {
+								item.out_price = item.out_price|| item.price || 0
+								return item
+							})
 						}else {
 							item.batch = []
 						}
 						return item
 					})
+					console.log(this.chooseGoods,'this.chooseGoods');
 					// console.log(res, 'ddddd');
 					// let data = res.data
 					// this.formValidate.id = data.id
@@ -542,6 +580,8 @@
 								pur_number: '',
 								unit_name: e.unit_name,
 								weight: '',
+								out_price: e.out_price || e.info.price,
+								price: e.info.price,
 								batch: res.data.map(item => {
 									item.weight = 0
 									item.pur_number = 0
@@ -558,6 +598,8 @@
 								pur_number: 0,
 								unit_name: e.unit_name,
 								weight: 0,
+								out_price: e.out_price || e.info.price || 0,
+								price: e.info.price || 0,
 								batch: []
 							})
 						}
@@ -738,70 +780,76 @@
 				console.log(this.formValidate.to_wid,'towid');
 				this.$refs[name].validate((valid) => {
 					if (valid) {
-						this.formValidate.id = this.$route.query.id;
-						if (that.formValidate.outType == 1 && that.formValidate.inType == 1 && that.formValidate
-							.store_id == that.formValidate.to_store_id) {
-							return that.$Message.error("调出门店和调入门店不能一致");
-						}
-						if (that.formValidate.outType == 0 && that.formValidate.inType == 0 && that.formValidate
-							.wid == that.formValidate.to_wid) {
-							return that.$Message.error("调出仓库和调入仓库不能一致");
-						}
-
-						// 校验商品数量和重量是否为0
-						let errIndex = 0;
-						that.chooseGoods.forEach(item => {
-							if (item.batch.length > 0) {
-								// let errIndexs = 0;
-								item.batch.forEach(e => {
-									if (e.pur_number == 0) {
+							this.formValidate.id = this.$route.query.id;
+							if (that.formValidate.outType == 1 && that.formValidate.inType == 1 && that.formValidate
+								.store_id == that.formValidate.to_store_id) {
+								return that.$Message.error("调出门店和调入门店不能一致");
+							}
+							if (that.formValidate.outType == 0 && that.formValidate.inType == 0 && that.formValidate
+								.wid == that.formValidate.to_wid) {
+								return that.$Message.error("调出仓库和调入仓库不能一致");
+							}
+							
+							// 校验商品数量和重量是否为0
+							let errIndex = 0;
+							that.chooseGoods.forEach(item => {
+								if (item.batch.length > 0) {
+									// let errIndexs = 0;
+									item.batch.forEach(e => {
+										if (e.pur_number == 0) {
+											errIndex++
+										}
+										if (e.is_weigh == 1 && e.weight == 0) {
+											errIndex++
+										}
+									})
+								} else {
+									if (item.pur_number == 0) {
 										errIndex++
 									}
-									if (e.is_weigh == 1 && e.weight == 0) {
+									if (item.is_weigh == 1 && item.weight == 0) {
 										errIndex++
 									}
-								})
-							} else {
-								if (item.pur_number == 0) {
-									errIndex++
-								}
-								if (item.is_weigh == 1 && e.weight == 0) {
-									errIndex++
 								}
+							})
+							if (errIndex > 0) {
+								return that.$Message.error("商品数量或重量不能为空");
 							}
-						})
-						if (errIndex > 0) {
-							return that.$Message.error("商品数量或重量不能为空");
-						}
-						let pdata = {
-							create_uid: that.formValidate.create_uid,
-							create_admin_id: that.formValidate.create_admin_id,
-						}
-						if (that.formValidate.outType == 1) {
-							pdata.store_id = that.formValidate.store_id
-							if (that.formValidate.inType == 1) {
-								pdata.to_store_id = that.formValidate.to_store_id
-							} else {
-								pdata.to_wid = that.formValidate.to_wid
+							let pdata = {
+								create_uid: that.formValidate.create_uid,
+								create_admin_id: that.formValidate.create_admin_id,
 							}
-						} else {
-							pdata.wid = that.formValidate.wid
-							if (that.formValidate.inType == 1) {
-								pdata.to_store_id = that.formValidate.to_store_id
+							if (that.formValidate.outType == 1) {
+								pdata.store_id = that.formValidate.store_id
+								if (that.formValidate.inType == 1) {
+									pdata.to_store_id = that.formValidate.to_store_id
+								} else {
+									pdata.to_wid = that.formValidate.to_wid
+								}
 							} else {
-								pdata.to_wid = that.formValidate.to_wid
+								pdata.wid = that.formValidate.wid
+								if (that.formValidate.inType == 1) {
+									pdata.to_store_id = that.formValidate.to_store_id
+								} else {
+									pdata.to_wid = that.formValidate.to_wid
+								}
 							}
-						}
-						pdata.product_list = that.chooseGoods
+							pdata.product_list = that.chooseGoods
 						if(that.formValidate.id == 0) {
-							createOut(pdata).then(res => {
-								this.$Message.success(res.msg);
-								this.$router.push({
-									path: this.roterPre + "/erp/out_list"
-								});
-							}).catch(err => {
-								this.$Message.error(err.msg);
-							})
+							try{
+								createOut(pdata).then(res => {
+									this.$Message.success(res.msg);
+									this.$router.push({
+										path: this.roterPre + "/erp/out_list"
+									});
+								}).catch(err => {
+									this.$Message.error(err.msg);
+								})
+							}catch(e){
+								console.log('err',e)
+								//TODO handle the exception
+							}
+							
 						}else {
 							editOut(that.formValidate.id,pdata).then(res => {
 								this.$Message.success(res.msg);

+ 7 - 1
src/pages/erp/out/index.vue

@@ -810,8 +810,14 @@
 			},
 			// 编辑
 			edit(row) {
+				let url;
+				if(row.store_id && row.to_store_id) {
+					url = '/erp/out_addt?id='
+				}else {
+					url = '/erp/out_add?id='
+				}
 				this.$router.push({
-					path: this.roterPre + "/erp/out_add?id=" + row.id
+					path: this.roterPre + url + row.id
 				});
 			},
 			// 一键复制

+ 24 - 16
src/pages/erp/out/storeReceipt.vue

@@ -70,16 +70,16 @@
 											<div class="value">{{item.weight}}</div>
 										</div>
 										<div class="item" v-if="item.is_weigh == 1">
-											<div>皮重(kg):</div>
+											<div>单个皮重(kg):</div>
 											<div class="value"><Input
-													v-model="chooseGoods[gindex].group[index].tare_weight"
-													placeholder="请输入皮重" v-width="'150'" type="number" /></div>
+													v-model="chooseGoods[gindex].group[index].dan"
+													placeholder="请输入单个皮重" v-width="'150'" type="number" /></div>
 										</div>
 										<div class="item" v-if="item.is_weigh == 1">
-											<div>重(kg):</div>
+											<div>实际总重(kg):</div>
 											<div class="value"><Input
-													v-model="chooseGoods[gindex].group[index].net_weight"
-													placeholder="请输入重" v-width="'150'" type="number" /></div>
+													v-model="chooseGoods[gindex].group[index].zong"
+													placeholder="请输入实际总重" v-width="'150'" type="number" /></div>
 										</div>
 										<!-- <a v-if="goods.group.length > 1" @click="delBatch(gindex,index)" class=" del-btn-1">删除</a> -->
 									</div>
@@ -122,16 +122,16 @@
 											<div class="value">{{item.weight}}</div>
 										</div>
 										<div class="item" v-if="item.is_weigh == 1">
-											<div>皮重(kg):</div>
+											<div>单个皮重(kg):</div>
 											<div class="value"><Input
-													v-model="chooseGoods[gindex].batchs[index].tare_weight"
-													placeholder="请输入皮重" v-width="'150'" type="number" /></div>
+													v-model="chooseGoods[gindex].batchs[index].dan"
+													placeholder="请输入单个皮重" v-width="'150'" type="number" /></div>
 										</div>
 										<div class="item" v-if="item.is_weigh == 1">
-											<div>重(kg):</div>
+											<div>实际总重(kg):</div>
 											<div class="value"><Input
-													v-model="chooseGoods[gindex].batchs[index].net_weight"
-													placeholder="请输入重" v-width="'150'" type="number" /></div>
+													v-model="chooseGoods[gindex].batchs[index].zong"
+													placeholder="请输入实际总重" v-width="'150'" type="number" /></div>
 										</div>
 										<!-- <a v-if="goods.group.length > 1" @click="delBatch(gindex,index)" class=" del-btn-1">删除</a> -->
 									</div>
@@ -839,14 +839,22 @@
 					// if(item)
 					if (that.type == 1) {
 						item.group.forEach(e => {
-							if (e.is_weigh == 1 && e.net_weight == 0) {
-								errIndex++
+							if (e.is_weigh == 1) {
+								e.tare_weight = (e.dan * 1 * e.pur_number).toFixed(3);
+								e.net_weight = (e.zong*1 - e.tare_weight).toFixed(3);
+								if(e.net_weight == 0) {
+									errIndex++;
+								}
 							}
 						})
 					} else {
 						item.batchs.forEach(e => {
-							if (e.is_weigh == 1 && e.net_weight == 0) {
-								errIndex++
+							if (e.is_weigh == 1) {
+								e.tare_weight = (e.dan * 1 * e.pur_number).toFixed(3);
+								e.net_weight = (e.zong*1 - e.tare_weight).toFixed(3);
+								if(e.net_weight == 0) {
+									errIndex++;
+								}
 							}
 						})
 						if(!item.bin_number) {

+ 14 - 15
src/pages/erp/product/addProduct.vue

@@ -73,8 +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="请输入大单位">
@@ -105,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">
@@ -565,14 +564,14 @@
 						required: true,
 						message: "请选择输入条形码",
 					}],
-					unit_rate_1: [{
-						required: true,
-						message: "请输入大单位转化率",
-					}],
-					unit_rate_2: [{
-						required: true,
-						message: "请输入超大单位转化率",
-					}]
+					// unit_rate_1: [{
+					// 	required: true,
+					// 	message: "请输入大单位转化率",
+					// }],
+					// unit_rate_2: [{
+					// 	required: true,
+					// 	message: "请输入超大单位转化率",
+					// }]
 					// delivery_type:[
 					//   { required: true, type: 'array', min: 1, message: '请选择配送方式', trigger: 'change' },
 					// ]
@@ -775,10 +774,10 @@
 						price: data.price,
 						cost: data.cost,
 						unit_name: data.unit_name,
-						unit_name_1: data.unit_name_1,
-						unit_name_2: data.unit_name_2,
-						unit_rate_1: data.unit_rate_1,
-						unit_rate_2: data.unit_rate_2,
+						// unit_name_1: data.unit_name_1,
+						// unit_name_2: data.unit_name_2,
+						// unit_rate_1: data.unit_rate_1,
+						// unit_rate_2: data.unit_rate_2,
 						shelf_life: data.shelf_life,
 						is_limit: data.is_limit, //是否限购
 						limit_type: data.limit_type, //限购类型

+ 14 - 3
src/pages/erp/purchase/addPurchase.vue

@@ -88,11 +88,12 @@
 									type="number" />
 							</template>
 							<template slot-scope="{ row,index }" slot="unit_type">
-								<Select v-model="chooseGoods[index].unit_type" style="width:200px">
+								<!-- <Select v-model="chooseGoods[index].unit_type" style="width:200px">
 									<Option v-for="item in row.unitList" :value="item.value" :key="item.value">
 										{{ item.label }}
 									</Option>
-								</Select>
+								</Select> -->
+								{{row.unit_name}}
 							</template>
 							<template slot-scope="{ row,index }" slot="unit_types">
 								{{row.unit_name}}
@@ -578,6 +579,11 @@
 		},
 		methods: {
 			...mapMutations("admin/layout", ["setCopyrightShow"]),
+			//对象数组去重;
+			unique(arr,key) {
+			    const res = new Map();
+			    return arr.filter((arr) => !res.has(arr[key]) && res.set(arr[key], 1))
+			},
 			addClass() {
 				if (this.formValidate_2.want_order_id) {
 					getWantInfo(this.formValidate_2.want_order_id).then(res => {
@@ -687,7 +693,12 @@
 			},
 			setGoods(e) {
 				console.log(e, '选择商品');
-				this.chooseGoods = this.chooseGoods.concat(this.resetGoods(e, 're'))
+				e = e.map(item => {
+					item.unit_type = 0
+					return item
+				})
+				this.chooseGoods = this.unique(this.chooseGoods.concat(this.resetGoods(e, 're')),'id')
+				console.log(this.chooseGoods, '选择商品this.chooseGoods');
 			},
 			getGoods() {
 				if (this.formValidate_0.wid == 0 && this.formValidate_0.who == 0) {

+ 54 - 43
src/pages/erp/purchase/index.vue

@@ -85,44 +85,23 @@
 				<template slot-scope="{ row, index }" slot="auser">
 					<div v-if="row.auser">{{row.auser.staff_name}}</div>
 					<div v-if="row.auth_time">{{row.auth_time |formatDate }}</div>
-					<!-- <div>名称:{{row.auser.staff_name}}</div>
-					<div>管理员ID:{{row.auser.admin_id}}</div>
-					<div>ID:{{row.auser.id}}</div>
-					<div>手机:{{row.auser.phone}}</div> -->
 				</template>
 				<template slot-scope="{ row, index }" slot="supplier">
 					<div>{{row.supplier.supplier_name}}</div>
-					<!-- <div>名称:{{row.supplier.supplier_name}}</div>
-					<div>ID:{{row.supplier.id}}</div>
-					<div>手机:{{row.supplier.phone}}</div> -->
 				</template>
-				<template slot-scope="{ row, index }" slot="store">
-					<div>{{row.store.name}}</div>
-					<!-- <div>名称:{{row.store.name}}</div>
-					<div>ID:{{row.store.id}}</div>
-					<div>手机:{{row.store.phone}}</div> -->
+				<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>
 				</template>
 				<template slot-scope="{ row, index }" slot="cuser">
 					<div>{{row.cuser.staff_name}}</div>
 					<div>{{row.create_time |formatDate }}</div>
-					<!-- <div>名称:{{row.cuser.staff_name}}</div>
-					<div>管理员ID:{{row.cuser.admin_id}}</div>
-					<div>ID:{{row.cuser.id}}</div>
-					<div>手机:{{row.cuser.phone}}</div> -->
 				</template>
 				<template slot-scope="{ row, index }" slot="ware">
-					<div>{{row.ware.title}}</div>
-					<!-- <div>名称:{{row.ware.title}}</div>
-					<div>ID:{{row.ware.id}}</div>
-					<div>手机:{{row.ware.phone}}</div>
-					<div>地址:{{row.ware.detailed_address}}</div> -->
+					<div v-if="row.wid">{{row.ware.title}}</div>
+					<div v-if="row.store_id">{{row.store.name}}</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="puser">
 					<div>{{row.puser.staff_name}}</div>
-					<!-- <div>名称:{{row.ware.title}}</div>
-					<div>ID:{{row.ware.id}}</div>
-					<div>手机:{{row.ware.phone}}</div>
-					<div>地址:{{row.ware.detailed_address}}</div> -->
 				</template>
 				<template slot-scope="{ row, index }" slot="status">
 					<Tag color="default" v-if="row.status == 0">待审核</Tag>
@@ -202,13 +181,22 @@
 					<Input v-model="list[index].pur_num" placeholder="请输入采购数量" v-width="'120'" type="number" />
 				</template>
 				<template slot-scope="{ row, index }" slot="total_price">
-					<Input v-model="list[index].total_price" placeholder="请输入净重" v-width="'120'" type="number" />
+					<Input v-model="list[index].total_price" placeholder="请输入总价" v-width="'120'" type="number" />
+				</template>
+				<template slot-scope="{ row, index }" slot="total_price">
+					<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" />
+					<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" />
+					<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"/>
+				</template>
+				<template slot-scope="{ row, index }" slot="zong">
+					<Input v-model="list[index].zong" placeholder="请输入总重" v-width="'120'" type="number"/>
 				</template>
 
 			</Table>
@@ -414,17 +402,26 @@
 							slot: "total_price",
 							width: 150,
 						},
-
 						{
-							title: "净重",
-							slot: "net_weight",
+							title: "单个皮重(kg)",
+							slot: "dan",
 							width: 150,
 						},
 						{
-							title: "皮重",
-							slot: "tare_weight",
+							title: "总重(kg)",
+							slot: "zong",
 							width: 150,
 						},
+						// {
+						// 	title: "总净重",
+						// 	slot: "net_weight",
+						// 	width: 150,
+						// },
+						// {
+						// 	title: "总皮重",
+						// 	slot: "tare_weight",
+						// 	width: 150,
+						// },
 					]
 				},
 				modalend: false,
@@ -438,6 +435,7 @@
 					purchasing_person_uid: ""
 				},
 				authLists: [],
+				authList: [],
 				data1: [],
 				staffData: [],
 				supplierList: [],
@@ -465,13 +463,13 @@
 						minWidth: 200,
 					},
 					{
-						title: "采购仓库",
+						title: "采购",
 						slot: "ware",
 						minWidth: 200,
 					},
 					{
-						title: "采购门店",
-						slot: "store",
+						title: "采购商品",
+						slot: "product",
 						minWidth: 200,
 					},
 					{
@@ -479,11 +477,11 @@
 						slot: "supplier",
 						minWidth: 200,
 					},
-					{
-						title: "订单数量",
-						key: "order_num",
-						minWidth: 90,
-					},
+					// {
+					// 	title: "订单数量",
+					// 	key: "order_num",
+					// 	minWidth: 90,
+					// },
 					{
 						title: "订单金额",
 						key: "order_price",
@@ -795,15 +793,28 @@
 			},
 			putRemark1() {
 				// 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)
 					if (item.is_weigh == 0) {
 						item.pur_weigh = item.pur_num * 1 * item.rate
 					} else {
-						item.pur_weigh = item.tare_weight * 1 + item.net_weight * 1
+						item.pur_weigh = item.zong
 					}
 					return item
 				})
-				console.log('arr', arr);
+				// console.log('arr', arr);
+				let ok = true;
+				arr.forEach(item => {
+					if(item.net_weight*1 <= 0) {
+						ok = false;
+						return that.$Message.error(item.product_name + '净重不能为0');
+					}
+				})
+				if(!ok) {
+					return;
+				}
 				savePurchase(this.endobj.id, {
 					info: arr,
 					purchasing_person_admin_id: this.endobj.purchasing_person_admin_id,

+ 2 - 2
src/pages/erp/purchase/purchaseDetail.vue

@@ -203,12 +203,12 @@
 					width: 75,
 				},
 				{
-					title: "净重",
+					title: "净重(kg)",
 					key: "net_weight",
 					width: 80,
 				},
 				{
-					title: "皮重",
+					title: "皮重(kg)",
 					key: "tare_weight",
 					width: 80,
 				},

+ 266 - 0
src/pages/erp/store/goodDetail.vue

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

+ 261 - 0
src/pages/erp/store/pdgoods.vue

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

+ 550 - 0
src/pages/erp/store/stocktakingDetail.vue

@@ -0,0 +1,550 @@
+<template>
+	<Drawer :closable="false" width="1000" class-name="order_box" v-model="modals" :styles="{ padding: 0 }">
+
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<Tabs v-model="activeName">
+				<TabPane v-for="(item, index) in list" :key="index" :label="item.label" :name="item.val">
+					<template v-if="item.val === 'info'">
+						<Card>
+							<div class="user-info" v-for="(goods,gindex) in info.body">
+								<!-- <div class="section-hd">{{goods.product_name}} ( 总库存 {{goods.total_num *1 }} {{goods.unit_name}} )</span> </div> -->
+								<div class="section">
+									<div class="section-bd">
+										<div class="item">
+											<div>商品ID:</div>
+											<div class="value">{{ goods.product_id || '/'}}</div>
+										</div>
+										<div class="item">
+											<div>商品名称:</div>
+											<div class="value">{{ goods.product_name || '/'}}</div>
+										</div>
+										<div class="item">
+											<div>单位:</div>
+											<div class="value">{{ goods.unit_name}}</div>
+										</div>
+										
+										<div class="item">
+											<div>库存:</div>
+											<div class="value">{{ goods.stock}}</div>
+										</div>
+										<div class="item">
+											<div>实盘:</div>
+											<div class="value">{{ goods.new_stock || '0'}}</div>
+										</div>
+										
+									</div>
+								</div>
+							</div>
+						</Card>
+					</template>
+					<template v-if="item.val === 'base'">
+						<div class="user-info">
+							<div class="section">
+								<div class="section-hd">仓库</div>
+								<div class="section-bd" >
+									<div class="item">
+										<div>仓库ID:</div>
+										<div class="value">{{ info.store.id}}</div>
+									</div>
+									<div class="item">
+										<div>仓库名称:</div>
+										<div class="value">{{ info.store.name}}</div>
+									</div>
+									<div class="item">
+										<div>手机号码:</div>
+										<div class="value">{{ info.store.phone}}</div>
+									</div>
+									<div class="item">
+										<div>详细地址:</div>
+										<div class="value">{{info.store.detailed_address}}</div>
+									</div>
+								</div>
+							</div>
+							<div class="section" v-if="info.cuser&&info.cuser.id">
+								<div class="section-hd">创建人</div>
+								<div class="section-bd" >
+									<div class="item">
+										<div>创建人ID:</div>
+										<div class="value">{{ info.cuser.id}}</div>
+									</div>
+									<div class="item">
+										<div>创建人名称:</div>
+										<div class="value">{{ info.cuser.staff_name}}</div>
+									</div>
+									<div class="item">
+										<div>手机号码:</div>
+										<div class="value">{{ info.cuser.phone}}</div>
+									</div>
+								</div>
+							</div>
+							<div class="section" v-if="info.auser&&info.auser.id">
+								<div class="section-hd">审核人</div>
+								<div class="section-bd" >
+									<div class="item">
+										<div>审核人ID:</div>
+										<div class="value">{{ info.auser.id}}</div>
+									</div>
+									<div class="item">
+										<div>审核人名称:</div>
+										<div class="value">{{ info.auser.staff_name}}</div>
+									</div>
+									<div class="item">
+										<div>手机号码:</div>
+										<div class="value">{{ info.auser.phone}}</div>
+									</div>
+								</div>
+							</div>
+						</div>
+					</template>
+				</TabPane>
+			</Tabs>
+		</Card>
+	</Drawer>
+
+</template>
+
+<script>
+	import {
+		getGodownList,
+		createUser,
+		getUserInfo,
+		getInventoryInfo,
+		infoMdInventory
+	} from "@/api/erp";
+	import Setting from "@/setting";
+
+	export default {
+		name: 'stocktakingDetail',
+		data() {
+			return {
+				info: {},
+				roterPre: Setting.roterPre,
+				psInfo: {},
+				modals: false,
+				activeName: 'base',
+				list: [{
+						val: 'base',
+						label: '基础信息'
+					},{
+						val: 'info',
+						label: '商品信息'
+					},
+					
+				],
+				ckColumns: [
+					{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "title",
+						key: "title",
+						width: 200,
+					},
+				],
+				columns: [{
+					title: "ID",
+					key: "id",
+					width: 80,
+				},
+				{
+					title: "商品名称",
+					key: "product_name",
+					width: 150,
+				},
+				{
+					title: "采购数量",
+					key: "product_num",
+					width: 120,
+				},
+				{
+					title: "实际采购数量",
+					key: "pur_num",
+					width: 120,
+				},
+				{
+					title: "单位",
+					key: "unit_name",
+					width: 75,
+				},
+				{
+					title: "单价",
+					slot: "price",
+					width: 75,
+				},
+				{
+					title: "净重",
+					key: "net_weight",
+					width: 80,
+				},
+				{
+					title: "皮重",
+					key: "tare_weight",
+					width: 80,
+				},
+				{
+					title: "总价(元)",
+					key: "total_price",
+					width: 80,
+				},
+				 ]
+			}
+		},
+		watch: {
+
+		},
+		created() {},
+		methods: {
+			deit() {
+				this.$router.push({
+					path: this.roterPre + "/erp/user_add?id=" + this.formValidate.id
+				});
+			},
+			getInfo(id) {
+				infoMdInventory(id).then(res => {
+					console.log(res, 'res');
+					this.modals = true
+					this.info = res.data
+				}).catch(err => {
+					this.modals = false
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	/deep/.ivu-modal-body {
+		padding: 0;
+	}
+
+	.user-info {
+		.section {
+			padding: 25px 25px;
+			border-bottom: 1px dashed #EEEEEE;
+	
+			&-hd {
+				padding-left: 10px;
+				border-left: 3px solid #1890FF;
+				font-weight: 500;
+				font-size: 14px;
+				line-height: 16px;
+				color: #303133;
+			}
+	
+			&-bd {
+				display: flex;
+				flex-wrap: wrap;
+			}
+	
+			.item {
+				// flex: 0 0 calc(~"(100% - 60px) / 3");
+				width: 25%;
+				display: flex;
+				margin: 16px 30px 0 0;
+				font-size: 13px;
+				color: #606266;
+	
+				&:nth-child(3n+3) {
+					margin: 16px 0 0;
+				}
+			}
+	
+			.value {
+				flex: 1;
+			}
+	
+			.avatar {
+				width: 60px;
+				height: 60px;
+				overflow: hidden;
+	
+				img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.user-row {
+		padding: 30px 35px 0;
+
+		&-text {
+			flex: 1;
+			align-self: center;
+		}
+
+		&-action {
+
+			.ivu-btn {
+				margin-left: 12px;
+				font-size: 13px !important;
+				color: rgba(0, 0, 0, 0.85);
+
+				&:first-child {
+					margin-left: 0;
+				}
+
+				&.ivu-btn-primary {
+					border-color: #1890FF;
+					background-color: #1890FF;
+					color: #FFFFFF;
+				}
+
+				&.ivu-btn-success {
+					border-color: #00C050;
+					background-color: #00C050;
+					color: #FFFFFF;
+				}
+			}
+		}
+
+		.nickname {
+			font-weight: 500;
+			font-size: 16px;
+			line-height: 16px;
+			color: rgba(0, 0, 0, 0.85);
+		}
+
+		.iconfont {
+			margin-left: 7px;
+			font-size: 18px;
+
+			&:nth-child(2) {
+				margin-left: 9px;
+			}
+
+			&.iconxiaochengxu {
+				color: #007DFF;
+			}
+
+			&.icongongzhonghao {
+				color: #00BF00;
+			}
+
+			&.iconPC {
+				color: #F69B00;
+			}
+
+			&.iconh5 {
+				color: #9F5CE3;
+			}
+
+			&.iconapp {
+				color: #E36734;
+			}
+		}
+
+		.level {
+			margin-top: 5px;
+
+			img {
+				width: 42px;
+				height: 20px;
+				vertical-align: middle;
+
+				+span {
+					margin-left: 7px;
+				}
+			}
+
+			.vip {
+				display: inline-block;
+				width: 56px;
+				height: 26px;
+				padding-left: 30px;
+				// background: url("../../../../assets/images/vip-bg.png") left top/100% 100% no-repeat;
+				font-weight: bold;
+				font-size: 9px;
+				line-height: 26px;
+				color: #5F7DB5;
+				transform-origin: left;
+				transform: scale(0.75, 0.75);
+				vertical-align: middle;
+			}
+		}
+	}
+
+	.info-row {
+		flex-wrap: nowrap;
+		padding: 20px 35px 24px;
+
+		&-item {
+			flex: none;
+			width: 155px;
+			font-size: 14px;
+			line-height: 14px;
+			color: rgba(0, 0, 0, 0.85);
+
+			&-title {
+				margin-bottom: 12px;
+				font-size: 13px;
+				line-height: 13px;
+				color: #666666;
+			}
+		}
+	}
+
+	.ivu-tabs {
+		color: rgba(0, 0, 0, 0.85);
+
+		/deep/ .ivu-tabs-bar {
+			border-bottom: 0;
+			margin-bottom: 0;
+			background-color: #F5F7FA;
+
+			.ivu-tabs-nav-container {
+				font-size: 13px;
+			}
+
+			.ivu-tabs-ink-bar {
+				display: none;
+			}
+
+			.ivu-tabs-tab {
+				padding: 7px 19px !important;
+				margin-right: 0;
+				line-height: 26px;
+			}
+
+			.ivu-tabs-tab-active {
+				background-color: #FFFFFF;
+				color: rgba(0, 0, 0, 0.85);
+
+				&:before {
+					content: "";
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 100%;
+					height: 2px;
+					background-color: #1890FF;
+				}
+			}
+		}
+
+		/deep/ .ivu-tabs-content {
+			.ivu-tabs-tabpane {
+				padding: 15px 15px !important;
+
+				&:first-child {
+					padding: 0 25px !important;
+				}
+			}
+		}
+
+		.product {
+			display: flex;
+
+			.image {
+				width: 50px;
+				height: 50px;
+			}
+
+			img {
+				width: 100%;
+				height: 100%;
+				border-radius: 4px;
+			}
+
+			.title {
+				flex: 1;
+				padding-left: 13px;
+				text-align: left;
+			}
+		}
+	}
+
+	.avatar {
+		width: 60px;
+		height: 60px;
+		border-radius: 50%;
+		overflow: hidden;
+
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.dashboard-workplace {
+		&-header {
+			&-avatar {
+				width: 64px;
+				height: 64px;
+				border-radius: 50%;
+				margin-right: 16px;
+				font-weight: 600;
+			}
+
+			&-tip {
+				width: 82%;
+				display: inline-block;
+				vertical-align: middle;
+
+				&-title {
+					font-size: 13px;
+					color: #000000;
+					margin-bottom: 12px;
+				}
+
+				&-desc {
+					&-sp {
+						width: 33.33%;
+						color: #17233D;
+						font-size: 13px;
+						display: inline-block;
+					}
+				}
+			}
+
+			&-extra {
+				.ivu-col {
+					p {
+						text-align: right;
+					}
+
+					p:first-child {
+						span:first-child {
+							margin-right: 4px;
+						}
+
+						span:last-child {
+							color: #808695;
+						}
+					}
+
+					p:last-child {
+						font-size: 22px;
+					}
+				}
+			}
+		}
+	}
+</style>
+<style scoped lang="stylus">
+	.user_menu>>>.ivu-menu {
+		width 100% !important;
+	}
+
+	/deep/ .ivu-form-item {
+		margin: 20px 0 0 0 !important;
+	}
+
+	.info-list {
+		display: flex;
+		flex-wrap: wrap;
+		padding: 0 0 0 20px;
+
+		div {
+			width: 50%
+		}
+	}
+
+	.tit {
+		font-weight: bold;
+		padding: 20px 0 10px 0;
+	}
+</style>

+ 504 - 0
src/pages/erp/store/storeStock.vue

@@ -0,0 +1,504 @@
+<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="仓库:" prop="pid" label-for="pid">
+						<Select v-model="tableFrom.wid" @on-change="userSearchs" clearable class="input-add">
+							<Option v-for="item in data1" :value="item.id" :key="item.id">
+								{{ item.title }}
+							</Option>
+						</Select>
+					</FormItem> -->
+					<FormItem label="门店:">
+						<Select v-model="tableFrom.store_id" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in staffData" :value="item.id" :key="item.id">{{ item.name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="状态:" label-for="status">
+						<Select v-model="tableFrom.status" placeholder="请选择" clearable @on-change="userSearchs"
+							class="input-add">
+							<Option value="-3">全部</Option>
+							<Option value="0">待审核</Option>
+							<Option value="1">通过</Option>
+							<!-- <Option value="2">部分完成</Option> -->
+							<!-- <Option value="3">完成</Option> -->
+							<Option value="-1">拒绝</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="商品:">
+						<Select v-model="tableFrom.product_id" filterable :remote-method="getGoodList"
+							:loading="loading1" clearable class="input-add">
+							<Option v-for="(option, index) in options1" :value="option.value" :key="option.value">
+								{{option.label}}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="创建人:">
+						<Select v-model="tableFrom.create_uid" clearable filterable @on-change="userSearchs"
+							class="input-add">
+							<Option v-for="item in authList" :value="item.id" :key="item.id">{{ item.staff_name }}
+							</Option>
+						</Select>
+					</FormItem>
+					<FormItem label="创建时间:" label-for="data">
+						<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>
+					<Button type="primary" @click="tableSearchs()">查询</Button>
+				</Form>
+			</div>
+		</Card>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- 操作 -->
+			<Button v-auth="['admin-erp-store_stock_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="num">
+					<!-- <span> {{ row.body.length }}</span> -->
+					<div v-for="item in row.body">{{item.product_name}}:<a>{{item.new_stock}}</a></div>
+				</template>
+				<template slot-scope="{ row, index }" slot="add_time">
+					<span> {{ row.add_time |formatDate }}</span>
+				</template>
+				<template slot-scope="{ row, index }" slot="ware">
+					<div>{{row.store.name}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="status">
+					<Tag color="default" v-if="row.status == 0">待审核</Tag>
+					<Tag color="primary" v-if="row.status == 1">通过</Tag>
+					<Tag color="error" v-if="row.status == -1">拒绝</Tag>
+				</template>
+				<template slot-scope="{ row, index }" slot="action">
+					<a @click="look(row)">详情</a>
+					<template v-if="row.status == 0" v-auth="['admin-erp-store_stock_auth']">
+						<Divider type="vertical" />
+						<a @click="pass(row)">审核</a>
+					</template>
+<!-- 					<template v-if="row.status == 0" v-auth="['admin-erp-store_stock_add']">
+						<Divider type="vertical" />
+						<a @click="edit(row)">编辑</a>
+					</template> -->
+					<!-- <a @click="del(row, '删除仓位', index)">删除</a> -->
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="total" :current="tableFrom.page" show-elevator show-total @on-change="pageChange"
+					:page-size="tableFrom.limit" />
+			</div>
+		</Card>
+		<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>
+	</div>
+</template>
+
+<script>
+	import stocktakingDetail from './stocktakingDetail.vue'
+	import {
+		mapState
+	} from "vuex";
+	import {
+		integralProductListApi,
+		integralIsShowApi,
+		storeSeckillApi,
+	} from "@/api/marketing";
+	import {
+		getPositionList,
+		getUserInfo,
+		getMdInventory,
+		getGodownList,
+		getUserList,
+		authInventory,
+		authMdInventory,
+		getGoods
+	} from "@/api/erp";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		formatDate
+	} from "@/utils/validate";
+	import timeOptions from "@/utils/timeOptions";
+	import Setting from "@/setting";
+	export default {
+		name: "stocktaking",
+		components: {
+			stocktakingDetail
+		},
+		filters: {
+			formatDate(time) {
+				if (time !== 0) {
+					let date = new Date(time * 1000);
+					return formatDate(date, "yyyy-MM-dd");
+				}
+			},
+		},
+		data() {
+			return {
+				modalpass:false,
+				authList: [],
+				authLists: [],//审核员列表
+				remarks: {
+					id: 0,
+					status: '',
+					auth_uid: "",
+					auth_admin_id: "",
+					auth_remark: '',
+				},
+				data1: [],//仓库列表
+				roterPre: Setting.roterPre,
+				loading: false,
+				options: timeOptions,
+				columns1: [{
+						title: "ID",
+						key: "id",
+						width: 80,
+					},
+					{
+						title: "订单编号",
+						key: "order_id",
+						minWidth: 90,
+					},
+					{
+						title: "商品数量",
+						slot: "num",
+						minWidth: 90,
+					},
+					{
+						title: "门店",
+						slot: "ware",
+						minWidth: 90,
+					},
+					{
+						title: "盘点时间",
+						slot: "add_time",
+						minWidth: 90,
+					},
+					{
+						title: "状态",
+						slot: "status",
+						minWidth: 90,
+					},
+					{
+						title: "备注",
+						key: "auth_remark",
+						minWidth: 90,
+					},
+					{
+						title: "操作",
+						slot: "action",
+						fixed: "right",
+						width: 200,
+					},
+				],
+				tableList: [],
+				timeVal: [],
+				grid: {
+					xl: 7,
+					lg: 10,
+					md: 12,
+					sm: 24,
+					xs: 24,
+				},
+				staffData: [],
+				tableFrom: {
+					// integral_time: "",
+					// is_show: "",
+					// store_name: "",
+					// wid: '',
+					product_id: 0,
+					key: '',
+					page: 1,
+					limit: 10,
+					store_id: 0,
+					status: -3,
+					create_uid: 0,
+				},
+				total: 0,
+				loading1: false,
+				options1: []
+			};
+		},
+		computed: {
+			...mapState("admin/layout", ["isMobile"]),
+			labelWidth() {
+				return this.isMobile ? undefined : 96;
+			},
+			labelPosition() {
+				return this.isMobile ? "top" : "right";
+			},
+		},
+		created() {
+			// this.getGodownList()
+			this.getList();
+			this.staffList();
+			this.getuserList()
+		},
+		methods: {
+			getuserList() {
+				getUserList().then(res => {
+					this.authList = res.data.data
+				})
+			},
+			getGoodList(query) {
+				if (query !== '') {
+					this.loading1 = true;
+					getGoods({
+						key: query
+					}).then(res => {
+						this.loading1 = false;
+						this.options1 = res.data.data.map(item => {
+							return {
+								value: item.id,
+								label: item.store_name
+							};
+						})
+					})
+				} else {
+					this.options1 = [];
+				}
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data;
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			look(row) {
+				this.$refs.stocktakingDetail.getInfo(row.id);
+			},
+			putRemark() {
+				if(this.remarks.status == -1 && this.remarks.auth_remark == '') {
+					return this.$Message.error('请输入拒绝原因');
+				}
+				authMdInventory(this.remarks).then(res => {
+					this.cancel()
+					this.getList();
+				})
+			},
+			cancel() {
+				this.remarks = {
+					id:0,
+					status: '',
+					auth_uid: "",
+					auth_admin_id: "",}
+					this.modalpass = false
+			},
+			userSearchse(e) {
+				let auth = this.authLists.find(item => item.id == e)
+				this.remarks.auth_admin_id = auth.admin_id
+			},
+			//审核
+			pass(row) {
+				this.remarks.id = row.id
+				getUserList({
+					store_id: row.store_id
+				}).then(res => {
+					this.authLists = res.data.data
+					this.modalpass = true;
+				})
+			},
+			userSearchs(e) {
+				// this.tableFrom.page = 1;
+				// this.getList();
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+				})
+			},
+			// 添加
+			add() {
+				this.$router.push({
+					path: this.roterPre + "/erp/store_stock_add?id=0"
+				});
+			},
+			addMore() {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/add_store_integral",
+				});
+			},
+			orderList(row) {
+				this.$router.push({
+					path: this.roterPre + "/marketing/store_integral/order_list",
+					query: {
+						product_id: row.id,
+					},
+				});
+			},
+			// 导出
+			exports() {
+				let formValidate = this.tableFrom;
+				let data = {
+					start_status: formValidate.start_status,
+					status: formValidate.status,
+					store_name: formValidate.store_name,
+				};
+				storeSeckillApi(data)
+					.then((res) => {
+						location.href = res.data[0];
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 编辑
+			edit(row) {
+				this.$router.push({
+					path: this.roterPre + "/erp/store_stock_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/Warehouse/position_del/${row.id}`,
+					method: "DELETE",
+					ids: "",
+				};
+				this.$modalSure(delfromData)
+					.then((res) => {
+						this.$Message.success(res.msg);
+						this.tableList.splice(num, 1);
+						if (!this.tableList.length) {
+							this.tableFrom.page =
+								this.tableFrom.page == 1 ? 1 : this.tableFrom.page - 1;
+						}
+						this.getList();
+					})
+					.catch((res) => {
+						this.$Message.error(res.msg);
+					});
+			},
+			// 列表
+			getList() {
+				this.loading = true;
+				// this.tableFrom.start_status = this.tableFrom.start_status || "";
+				// this.tableFrom.is_show = this.tableFrom.is_show || "";
+				getMdInventory(this.tableFrom)
+					.then(async (res) => {
+						let data = res.data;
+						this.tableList = data.data;
+						this.total = data.count;
+						this.loading = false;
+					})
+					.catch((res) => {
+						this.loading = false;
+						this.$Message.error(res.msg);
+					});
+			},
+			pageChange(index) {
+				this.tableFrom.page = index;
+				this.getList();
+			},
+			// 表格搜索
+			tableSearchs() {
+				this.tableFrom.page = 1;
+				this.getList();
+			},
+			// 具体日期
+			onchangeTime(e) {
+				this.timeVal = e;
+				this.tableFrom.data = 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>

+ 589 - 0
src/pages/erp/store/storeStockAdd.vue

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

+ 39 - 33
src/pages/erp/user/addUser.vue

@@ -286,21 +286,21 @@
 				},
 				staffData: [],
 				ruleValidate: {
-					nickname: [{
-						required: true,
-						message: "请选择绑定用户",
-						trigger: "blur"
-					}],
-					kefu: [{
-						required: true,
-						message: "请选择绑定客服",
-						trigger: "blur"
-					}],
-					admin_name: [{
-						required: true,
-						message: "请选择绑定后台账号",
-						trigger: "blur"
-					}],
+					// nickname: [{
+					// 	required: true,
+					// 	message: "请选择绑定用户",
+					// 	trigger: "blur"
+					// }],
+					// kefu: [{
+					// 	required: true,
+					// 	message: "请选择绑定客服",
+					// 	trigger: "blur"
+					// }],
+					// admin_name: [{
+					// 	required: true,
+					// 	message: "请选择绑定后台账号",
+					// 	trigger: "blur"
+					// }],
 					avatar: [{
 						required: true,
 						message: "请上传用户头像",
@@ -373,25 +373,31 @@
 				getUserInfo(id).then(res => {
 					console.log('zje', res);
 					let data = res.data
-					this.formValidate = {
-						uid: data.user.uid,
-						nickname: data.user ? data.user.nickname :'',
-						id: id,
-						account: data.account || '',
-						wid: data.wid || 0,
-						staff_name: data.staff_name || '',
-						store_id: data.store_id,
-						is_manager: data.is_manager,
-						phone: data.phone,
-						kefu: data.staff ? data.staff.nickname:'',
-						staff_id: data.staff ?data.staff.id:0,
-						admin_name: data.admin? data.admin.real_name: '',
-						is_system: data.is_system + '',
-						admin_id:  data.admin?data.admin.id: 0,
-						avatar: data.avatar,
-						type: data.wid?1:(data.store_id?2:0),
-						roles: data.roles*1 || 0
+					try{
+						this.formValidate = {
+							uid: data.user ? data.uid : '',
+							nickname: data.user ? data.user.nickname :'',
+							id: id,
+							account: data.account || '',
+							wid: data.wid || 0,
+							staff_name: data.staff_name || '',
+							store_id: data.store_id,
+							is_manager: data.is_manager,
+							phone: data.phone,
+							kefu: data.staff ? data.staff.nickname:'',
+							staff_id: data.staff ?data.staff.id:0,
+							admin_name: data.admin? data.admin.real_name: '',
+							is_system: data.is_system + '',
+							admin_id:  data.admin?data.admin.id: 0,
+							avatar: data.avatar,
+							type: data.wid?1:(data.store_id?2:0),
+							roles: data.roles*1 || 0
+						}
+					}catch(e) {
+						console.log(e)
 					}
+					
+					
 
 				})
 			},

+ 4 - 2
src/pages/erp/want/addWant.vue

@@ -83,10 +83,11 @@
 								<Input v-model="chooseGoods[index].want_product_num" placeholder="请输入要货数量" v-width="'150'" type="number"/>
 							</template>
 							<template slot-scope="{ row,index }" slot="unit_type" >
-								<Select v-model="chooseGoods[index].unit_type" style="width:200px" >
+								<!-- <Select v-model="chooseGoods[index].unit_type" style="width:200px" >
 									<Option v-for="item in row.unitList" :value="item.value" :key="item.value">
 										{{ item.label }}</Option>
-								</Select>
+								</Select> -->
+								{{row.unit_name}}
 							</template>
 							<template slot-scope="{ row,index }" slot="unit_types">
 								{{row.unit_name}}
@@ -363,6 +364,7 @@
 							})
 						}
 						item.want_product_num = 0
+						item.unit_type = 0
 						return item
 					})
 					this.chooseGoods = this.chooseGoods.concat(arr)

+ 51 - 79
src/pages/marketing/super/create.vue

@@ -47,6 +47,13 @@
 						<Radio :label="1">是</Radio>
 					</RadioGroup>
 				</FormItem>
+				<!-- is_funds -->
+				<FormItem label="设置卡金">
+					<RadioGroup v-model="formData.is_funds">
+						<Radio :label="0">不设置</Radio>
+						<Radio :label="1">设置</Radio>
+					</RadioGroup>
+				</FormItem>
 				<FormItem v-show="!formData.is_forever" label="">
 					<InputNumber :min="1" v-model="formData.valid_date" :precision="0"></InputNumber>
 					<div class="info">领取后多少天内有效</div>
@@ -65,29 +72,22 @@
 					<div class="acea-row row-between-wrapper">
 						<div>
 							<Button type="primary" @click="addGoods">添加商品</Button>
-							<!-- <Button @click="batchSet" class="ml20" :disabled="!isAllChecked && !checkPidList.length">批量设置</Button>
-					      <Button @click="delAll" class="ml20" :disabled="!isAllChecked && !checkPidList.length">批量删除</Button> -->
 						</div>
-						<!-- <div class="goodsWord">
-					      <FormItem label="商品搜索:">
-					        <Input class="w_input240" v-model="keyword" placeholder="请输入商品关键词" @on-change="searchWord"></Input>
-					      </FormItem>
-					    </div> -->
 					</div>
 					</Col>
 					<Col span="20">
 					<div class="vxeTable">
 						<vxe-table border="inner" ref="xTree" :column-config="{resizable: true}" row-id="id"
-							:tree-config="{children: 'attrValue',reserve:true}" @checkbox-all="checkboxAll"
+							@checkbox-all="checkboxAll"
 							@checkbox-change="checkboxItem"
 							:data="(searchTableData.length || keyword)?searchTableData:tableData">
-							<vxe-column title="" width="90" tree-node></vxe-column>
+							<!-- <vxe-column title="" width="90" tree-node></vxe-column> -->
 							<vxe-column field="info" title="商品信息" min-width="300" >
 								<template v-slot="{ row }">
 									<div class="imgPic acea-row row-middle">
-										<viewer>
+										<!-- <viewer>
 											<div class="pictrue"><img v-lazy="row.image" /></div>
-										</viewer>
+										</viewer> -->
 										<div class="info">
 											<Tooltip max-width="200" placement="bottom" transfer>
 												<span class="line2">{{ row.store_name }}{{row.suk}}</span>
@@ -97,54 +97,38 @@
 									</div>
 								</template>
 							</vxe-column>
-							<!-- <vxe-column field="info" title="商品信息" min-width="300" v-if="$route.params.id == 0">
-								<template v-slot="{ row }">
-									<div class="imgPic acea-row row-middle">
-										<div class="info">
-											<Tooltip max-width="200" placement="bottom" transfer>
-												<span class="line2">{{ row.store_name }}{{row.suk}}</span>
-												<p slot="content">{{ row.store_name }}{{row.suk}}</p>
-											</Tooltip>
-										</div>
-									</div>
-								</template>
-							</vxe-column> -->
 							<vxe-column field="price" title="价格" min-width="150">
 								<template v-slot="{ row }">
-									<div v-if="row.parent == 1">——</div>
-									<vxe-input v-else v-model="row.price" min="0" placeholder="请输入价格" type="float"
+									<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 }">
-									<div v-if="row.parent == 1">——</div>
-									<vxe-input v-else v-model="row.days" min="0" placeholder="请输入限购天数" type="float"
+									<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 }">
-									<div v-if="row.parent == 1">——</div>
-									<vxe-input v-else 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>
-							<vxe-column field="cost" title="成本价" min-width="80"></vxe-column>
-							<vxe-column field="ot_price" title="原价" min-width="80"></vxe-column>
+							<!-- <vxe-column field="cost" title="成本价" min-width="80"></vxe-column>
+							<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-if="row.parent != 1" v-model="row.is_yue" :value="row.is_yue"
+									<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>
-									<div v-else>——</div>
 								</template>
 							</vxe-column>
 							<vxe-column field="date" title="操作" min-width="100" fixed="right" align="center">
 								<template v-slot="{ row }">
-									<a @click="del(row)" v-if="row.parent == 1">删除</a>
+									<a @click="del(row)" >删除</a>
 								</template>
 							</vxe-column>
 						</vxe-table>
@@ -239,6 +223,7 @@
 					mark: '',
 					product: [],
 					id: 0,
+					is_funds: 0
 				},
 				categoryList: [],
 				brandList: [],
@@ -282,16 +267,14 @@
 			},
 			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.parent = 1;
-					i.status = 1;
-					i.attrValue.forEach(j => {
-						j.cate_name = i.cate_name;
-						j.store_label = i.store_label;
-						j.is_yue = j.is_yue ? true : false;
-					})
+					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')
@@ -424,38 +407,20 @@
 						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 = {
-								image: item.info[0].attrValue.image,
+								id: item.product_id,
 								store_name: item.product_name,
-								cost: item.info[0].attrValue.cost,
-								ot_price: item.info[0].attrValue.ot_price,
-								parent: 1,
-								status: 1,
-								id: item.product_id
-							}
-							let arr = []
-							try{
-								item.info.forEach(j => {
-									arr.push({
-										unique: j.unique,
-										price: j.price,
-										ot_price: j.attrValue.ot_price,
-										cost: j.attrValue.cost,
-										image: j.attrValue.image,
-										suk: j.attrValue.suk,
-										is_yue: j.is_yue? true:false,
-										days: j.days || 0,
-										number: j.number|| 0
-									})
-								})
-							}catch(e){
-								console.log(e,'err')
-								//TODO handle the exception
+								price: item.price,
+								is_yue: item.is_yue? true: false,
+								days: item.days,
+								number: item.number,
+								spu: item.spu,
 							}
 							
-							obj.attrValue = arr
+							
 							list.push(obj)
 						})
 						this.tableData = list
@@ -511,21 +476,27 @@
 				let list = [];
 				that.tableData.forEach(item => {
 					let obj = {
-						product_id: item.id
+						product_id: item.id,
+						spu: item.spu,
+						price: item.price,
+						is_yue: item.is_yue? 1 : 0,
+						days: item.days,
+						number: item.number
 					}
-					let info = [];
-					item.attrValue.forEach(i => {
-						info.push({
-							unique: i.unique,
-							price: i.price,
-							is_yue: i.is_yue ? 1 : 0,
-							days: i.days,
-							number: i.number
-						})
-					})
-					obj.info = info;
+					// let info = [];
+					// item.attrValue.forEach(i => {
+					// 	info.push({
+					// 		unique: i.unique,
+					// 		price: i.price,
+					// 		is_yue: i.is_yue ? 1 : 0,
+					// 		days: i.days,
+					// 		number: i.number,
+					// 	})
+					// })
+					// obj.info = info;
 					list.push(obj)
 				})
+				console.log(list,'list')
 				addSuper({
 						id: that.formData.id,
 						name: that.formData.name,
@@ -536,6 +507,7 @@
 						icon: that.formData.icon,
 						image: that.formData.image,
 						is_show: that.formData.is_show,
+						is_funds: that.formData.is_funds,
 						mark: that.formData.mark,
 						product: list,
 					})

+ 1 - 37
src/pages/marketing/super/index.vue

@@ -4,7 +4,7 @@
 
 		<Card :bordered="false" dis-hover class="ivu-mt">
 			<!-- 操作 -->
-			<Button v-auth="['admin-marketing-store_coupon-add']" type="primary" @click="add">添加至尊卡</Button>
+			<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="暂无筛选结果">
@@ -13,17 +13,6 @@
 					<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="count">
-					<span v-if="row.is_permanent">不限量</span>
-					<div v-else>
-						<span class="fa">发布:{{row.total_count}}</span>
-						<span class="sheng">剩余:{{row.remain_count}}</span>
-					</div>
-				</template>
-				<template slot-scope="{ row }" slot="coupon_type">
-					<span v-if="row.coupon_type === 1">满减券</span>
-					<span v-else>折扣券</span>
-				</template>
 				<template slot-scope="{ row }" slot="valid_date">
 					<span>{{row.valid_date/60/60/24}}</span>天
 				</template>
@@ -33,31 +22,6 @@
 						<p slot="content">{{row.coupon_title}}</p>
 					</Tooltip>
 				</template>
-				<!-- <template slot-scope="{ row }" slot="receive_type">
-					<span v-if="row.receive_type === 1">手动领取</span>
-					<span v-else-if="row.receive_type === 3">后台发放</span>
-				</template> -->
-				<!-- <template slot-scope="{ row }" slot="start_time">
-					<div v-if="row.start_time">
-						{{row.start_time | formatDate}} - {{row.end_time | formatDate}}
-					</div>
-					<span v-else>不限时</span>
-				</template> -->
-				<!-- <template slot-scope="{ row }" slot="start_use_time">
-					<div v-if="row.start_use_time">
-						{{row.start_use_time | formatDate}} - {{row.end_use_time | formatDate}}
-					</div>
-					<div v-else>
-						{{ row.coupon_time }}天
-					</div>
-				</template> -->
-				<!-- <template slot-scope="{ row }" slot="status">
-					<i-switch v-model="row.status" :value="row.status" :true-value="1" :false-value="0" size="large"
-						@on-change="openChange(row)">
-						<span slot="open">开启</span>
-						<span slot="close">关闭</span>
-					</i-switch>
-				</template> -->
 				<template slot-scope="{ row, index }" slot="action">
 	<!-- 				<a @click="receive(row)">获取记录</a>
 					<Divider type="vertical" /> -->

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

@@ -859,6 +859,14 @@
 					</FormItem>
 					</Col>
 					<Col span="24">
+					<FormItem label="特价商品:">
+						<i-switch v-model="formValidate.is_supreme" :true-value="1" :false-value="0" size="large">
+							<span slot="open">是</span>
+							<span slot="close">否</span>
+						</i-switch>
+					</FormItem>
+					</Col>
+					<Col span="24">
 					<div class="lines"></div>
 					</Col>
 					<Col span="24" v-if="merchantType == 0">
@@ -890,8 +898,8 @@
 						</div>
 					</FormItem>
 					</Col>
-					<Col span="24" v-if="merchantType==0">
-					<FormItem label="仅会员可见:">
+					<Col span="24" >
+					<FormItem label="仅会员可见:" v-if="merchantType==0">
 						<i-switch v-model="formValidate.is_vip_product" :true-value="1" :false-value="0" size="large">
 							<span slot="open">开启</span>
 							<span slot="close">关闭</span>
@@ -1884,6 +1892,7 @@
 					ficti: 0,
 					give_integral: 0,
 					sort: 0,
+					is_supreme: false,
 					is_show: 1,
 					is_hot: 0,
 					is_benefit: 0,

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

@@ -219,6 +219,24 @@ export default {
 			},
 			component: () => import('@/pages/erp/inventory/stocktaking')
 		},
+		{
+			path:'store_stock',
+			name: `${pre}storeStock`,
+			meta: {
+				auth: ['admin-ero-store_stock'],
+				title: '门店盘点单列表'
+			},
+			component: () => import('@/pages/erp/store/storeStock')
+		},
+		{
+			path:'store_stock_add',
+			name: `${pre}storeStockAdd`,
+			meta: {
+				auth: ['admin-erp-store_stock_add'],
+				title: '添加编辑门店盘点单列表'
+			},
+			component: () => import('@/pages/erp/store/storeStockAdd')
+		},
 		{
 			path:'stocktaking_add',
 			name: `${pre}stocktaking_add`,