Browse Source

js&js-auth

lhl 4 months ago
parent
commit
3a30d2b117

+ 48 - 0
src/api/erp.js

@@ -770,6 +770,54 @@ export function getlqList(data) {
 	  params:data
 	});
 }
+
+/**
+ * @description 出库提交结算
+ * @param {Object} param data {Object} 传值参数
+ */
+export function pJs(id,data) {
+	return request({
+	  url: "/erp/out/update_pay/" + id,
+	  method: "post",
+	  data
+	});
+}
+
+/**
+ * @description 出库结算审核
+ * @param {Object} param data {Object} 传值参数
+ */
+export function pJsAuth(id,data) {
+	return request({
+	  url: "/erp/out/pay_auth/" + id,
+	  method: "post",
+	  data
+	});
+}
+
+/**
+ * @description 采购提交结算
+ * @param {Object} param data {Object} 传值参数
+ */
+export function cJs(id,data) {
+	return request({
+	  url: "/erp/purchase/update_pay/" + id,
+	  method: "post",
+	  data
+	});
+}
+
+/**
+ * @description 采购结算审核
+ * @param {Object} param data {Object} 传值参数
+ */
+export function cJsAuth(id,data) {
+	return request({
+	  url: "/erp/purchase/pay_auth/" + id,
+	  method: "post",
+	  data
+	});
+}
 /*
 Route::get('user/list', 'v1.erp.User/index')->option(['real_name' => '用户列表']);
 Route::get('user/info/:id', 'v1.erp.User/info')->option(['real_name' => '用户详情']);

+ 2 - 1
src/pages/erp/adjust/addAdjust.vue

@@ -587,7 +587,8 @@
 							type: this.formValidate.type,
 							store_id: this.formValidate.store_id,
 							create_admin_id: this.formValidate.create_admin_id,
-							create_uid: this.formValidate.create_uid
+							create_uid: this.formValidate.create_uid,
+							adjust_type:0//0-门店 1-仓库
 						}).then(res => {
 							this.$Message.success(res.msg);
 							this.$router.push({

+ 650 - 0
src/pages/erp/adjusts/addAdjust.vue

@@ -0,0 +1,650 @@
+<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/adjusts_list` }">
+						<!-- <Button icon="ios-arrow-back" size="small" class="mr20"
+              >返回</Button
+            > -->
+						<div class="font-sm after-line">
+							<span class="iconfont iconfanhui"></span>
+							<span class="pl10">返回</span>
+						</div>
+					</router-link>
+					<span v-text="
+              $route.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="control">
+						<RadioGroup v-model="formValidate.type" @on-change="typeChange">
+							<Radio :label="0" :disabled="formValidate.id != 0">
+								<Icon type="social-apple"></Icon>
+								<span>价格调整</span>
+							</Radio>
+							<Radio :label="1" :disabled="formValidate.id != 0">
+								<Icon type="social-android"></Icon>
+								<span>比例调整</span>
+							</Radio>
+						</RadioGroup>
+					</FormItem>
+					</Col>
+					<!-- <Col span="24">
+					<FormItem label="门店:" prop="store_id">
+						<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="wid" >
+						<el-cascader placeholder="请选择仓库" class="input-add" size="mini" v-model="formValidate.wid"
+							:options="data1" :props="props" @change="userSearchse" filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="创建人:" prop="create_uid" v-if="formValidate.wid != 0 ">
+						<el-cascader placeholder="请选择创建人" class="input-add" size="mini"
+							v-model="formValidate.create_uid" :options="authList" :props="propsss" @change="userSearchsss"
+							filterable clearable v-width="'400'">
+						</el-cascader>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="调价比例:" prop="scale" v-if="formValidate.type == 1">
+						<Input v-model="formValidate.scale" placeholder="请输入调价比例" v-width="'150'" type="number"/>
+					</FormItem>
+					</Col>
+					<Col span="24">
+					<FormItem label="商品:" prop="goods">
+						<Table :columns="formValidate.id == 0 ?columns:columnss" :data="chooseGoods" ref="table" :loading="loading"
+							no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
+							<!-- <template slot-scope="{ row }" slot="coupon_price">
+								<span v-if="row.coupon_type==1">{{row.coupon_price}}元</span>
+								<span
+									v-if="row.coupon_type==2">{{parseFloat(row.coupon_price)/10}}折({{row.coupon_price.toString().split(".")[0]}}%)</span>
+							</template> -->
+							<!-- want_product_num -->
+							<!-- //chooseUnit -->
+							<!-- <template slot-scope="{ row,index }" slot="want_product_num">
+								<Input v-model="chooseGoods[index].want_product_num" placeholder="请输入要货数量" v-width="'150'" type="number"/>
+							</template> -->
+							<template slot-scope="{ row,index }" slot="price">
+								<Input v-model="chooseGoods[index].price" placeholder="请输入价格" v-width="'150'" type="number" v-if="formValidate.type == 0"/>
+								<div v-else>{{(row.ot_price * (1 + formValidate.scale*0.01)).toFixed(2)}}</div>
+							</template>
+							<!-- <template slot-scope="{ row,index }" slot="ot_price">
+								<Input v-model="chooseGoods[index].ot_price" 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" >
+									<Option v-for="item in row.unitList" :value="item.value" :key="item.value">
+										{{ item.label }}</Option>
+								</Select>
+							</template> -->
+							<template slot-scope="{ row,index }" slot="unit_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>
+							<!-- <template slot-scope="{ row }" slot="product">
+								<div class="product">
+									<div class="image" v-viewer>
+										<img v-lazy="row.image">
+									</div>
+									<div class="title">{{ row.store_name }}</div>
+								</div>
+							</template> -->
+						</Table>
+						<Button type="primary" class="submission" style="margin-top:20px;" @click="getGoods()" v-if="formValidate.id == 0">选择商品</Button>
+					</FormItem>
+					</Col>
+				</Row>
+			</Form>
+		</Card>
+		<Card :bordered="false" dis-hover class="fixed-card"
+			:style="{ left: `${!menuCollapse ? '200px' : isMobile ? '0' : '80px'}` }">
+			<Form>
+				<FormItem>
+					<Button type="primary" class="submission" @click="handleSubmit('formValidate')">保存</Button>
+				</FormItem>
+			</Form>
+		</Card>
+		<!-- <good-detail ref="goodDetail" @setGoods="setGoods"></good-detail> -->
+		<pdgoods ref="pdgoods" @setGoods="setGoods"></pdgoods>
+	</div>
+</template>
+
+<script>
+	import pdgoods from './pdgoods.vue'
+	import {
+		mapState,
+		mapMutations
+	} from "vuex";
+	import {
+		staffListInfo
+	} from "@/api/store";
+	import {
+		getGodownList,
+		createGodown,
+		getGodownInfo,
+		getUserList,
+		getOutGoods,
+		createAdjust,
+		getWantInfo
+	} from "@/api/erp";
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList
+	} from '@/api/store';
+	import {
+		productSpecs,
+		productSpecsInfo
+	} from "@/api/product";
+	import Setting from "@/setting";
+	// import goodDetail from './goodDetail.vue'
+	export default {
+		name: "erp_adjusts_Add",
+		components: {
+			// goodDetail,
+			pdgoods
+		},
+		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: 'ot_price',
+						minWidth: 90
+					},
+					{
+						title: '修改后价格',
+						slot: 'price',
+						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) {
+				getWantInfo(id).then(res => {
+					console.log(res,'ddddd');
+					let data = res.data
+					this.formValidate.id = data.id
+					this.formValidate.create_uid = data.create_uid
+					this.chooseGoods = data.info
+					this.formValidate.store_id = data.store_id
+					console.log(this.formValidate.goods,'this.formValidate.goods');
+					if(data.wid) {
+						this.formValidate.type = 0
+						this.formValidate.wid = data.wid
+						this.getUserList({
+							wid: this.formValidate.wid
+						})
+					}else {
+						this.formValidate.type = 1
+						this.getUserList({
+							store_id: this.formValidate.store_id
+						})
+					}
+				})
+			},
+			setGoods(e) {
+				console.log(e, 'ddd');
+				try{
+					// this.chooseGoods.push({
+					// 	product_name:item.product_name,
+					// 	product_id:item.product.id,
+					// 	price:item.product.price,
+					// 	ot_price: item.product.price
+					// })
+					let arr = this.chooseGoods.concat([{
+						product_name:e.product_name,
+						product_id:e.product.id,
+						price:e.out_price == 0?e.price:e.out_price,
+						ot_price: e.out_price == 0?e.price:e.out_price
+					}])
+					// let arr = this.chooseGoods.concat(e.map(item => {
+					// 	let good = {
+					// 		product_name:item.product_name,
+					// 		product_id:item.product.id,
+					// 		price:item.product.price,
+					// 		ot_price: item.product.price
+					// 	}
+					// 	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()
+				}catch(e){
+					//TODO handle the exception
+					console.log(e,';ee');
+				}
+				this.$refs.pdgoods.modals = false
+				console.log(this.chooseGoods, 'this.chooseGoods');
+			},
+			getGoods() {
+				if(!this.formValidate.wid) {
+					return this.$Message.error('请选择仓库')
+				}
+				this.$refs.pdgoods.formValidate.wid = this.formValidate.wid
+				this.$refs.pdgoods.modals = true
+				this.$refs.pdgoods.getList()
+				
+			},
+			getUserList() {
+				getUserList({
+					wid: this.formValidate.wid
+				}).then(res => {
+					// console.log(res);
+					this.authList = res.data.data
+					// .map(item => {
+					// 		item.id += ''
+					// 		return item
+					// 	});
+				})
+			},
+			staffList() {
+				staffListInfo()
+					.then((res) => {
+						this.staffData = res.data
+						// .map(item => {
+						// 	item.id += ''
+						// 	return item
+						// });
+					})
+					.catch((err) => {
+						this.$Message.error(err.msg);
+					});
+			},
+			getGodownInfo(id) {
+				getGodownInfo(id).then(res => {
+					this.formValidate = res.data
+					this.formValidate.addressSelect = this.formValidate.addressSelect.map(item => item * 1)
+					console.log(this.formValidate.addressSelect);
+				})
+			},
+			addchack(e, selectedData) {
+				console.log(selectedData, 'selectedData');
+				e.forEach((i, index) => {
+					if (index == 0) {
+						this.formValidate.province = i
+					} else if (index == 1) {
+						this.formValidate.city = i
+					} else if (index == 2) {
+						this.formValidate.area = i
+					} else {
+						this.formValidate.street = i
+					}
+				})
+				this.formValidate.address = (selectedData.map(o => o.label)).join('/')
+				// console.log('this.formValidate.addressSelect',this.formValidate.addressSelect);
+
+			},
+			cityInfo(data) {
+				cityApi(data).then(res => {
+					this.addresData = res.data
+				})
+			},
+			loadData(item, callback) {
+				item.loading = true;
+				cityApi({
+					pid: item.value
+				}).then(res => {
+					item.children = res.data;
+					item.loading = false;
+					callback();
+				});
+
+
+			},
+			getGodownList() {
+				getGodownList().then(res => {
+					console.log(res);
+					this.data1 = res.data.data
+					// .map(item => {
+					// 		item.id += ''
+					// 		return item
+					// 	});
+				})
+			},
+			del(index) {
+				this.chooseGoods.splice(index, 1);
+			},
+			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 = []
+						if(this.formValidate.type == 1 ) {
+							if(!this.formValidate.scale) return this.$Message.error('请输入调价比例')
+							if(this.formValidate.scale % 1 !== 0) return this.$Message.error('调价比例须为整数')
+						}
+						this.chooseGoods.forEach(item => {
+							if(item.price < 0) {
+								errIndex++
+							}
+							if(this.formValidate.type == 1) {
+								item.price = (item.price*(1 + this.formValidate.scale*0.01)).toFixed(2)
+								item.scale = this.formValidate.scale
+							}
+							if(item.price != item.ot_price) {
+								arr.push(item)
+							}
+						})
+						if(errIndex> 0) {
+							return this.$Message.error('调整后的价格不能为负值')
+						}
+						if(arr.length == 0) {
+							return this.$Message.error('请选择商品进行调价')
+						}
+						if(this.formValidate.type == 1) {
+							
+						}
+						createAdjust({
+							id: this.formValidate.id,
+							body: arr,
+							type: this.formValidate.type,
+							wid: this.formValidate.wid,
+							create_admin_id: this.formValidate.create_admin_id,
+							create_uid: this.formValidate.create_uid,
+							adjust_type:1//0-门店 1-仓库
+						}).then(res => {
+							this.$Message.success(res.msg);
+							this.$router.push({
+								path: this.roterPre + "/erp/adjusts_list"
+							});
+						}).catch(err => {
+							this.$Message.error(err.msg);
+						})
+					} else {
+						// this.$Message.error("请输入参数模板名称");
+					}
+				});
+			},
+		},
+	};
+</script>
+
+<style scoped lang="stylus">
+	.table {
+		/deep/.ivu-table-header table {
+			border: 0 !important;
+		}
+
+		/deep/.ivu-table-header thead tr th:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table td:nth-of-type(1) {
+			padding-left: 16px;
+		}
+
+		/deep/.ivu-table-cell {
+			padding: 0 !important;
+		}
+
+		/deep/.ivu-table-border th,
+		/deep/.ivu-table-border td {
+			border-right: unset;
+		}
+
+		/deep/.ivu-table td {
+			height: 59px;
+		}
+	}
+
+	.form-submit {
+		/deep/.ivu-card {
+			border-radius: 0;
+		}
+
+		margin-bottom: 79px;
+
+		.fixed-card {
+			position: fixed;
+			right: 0;
+			bottom: 0;
+			left: 200px;
+			z-index: 99;
+			box-shadow: 0 -1px 2px rgb(240, 240, 240);
+
+			/deep/ .ivu-card-body {
+				padding: 15px 16px 14px;
+			}
+
+			.ivu-form-item {
+				margin-bottom: 0;
+			}
+
+			/deep/ .ivu-form-item-content {
+				margin-right: 124px;
+				text-align: center;
+			}
+
+			.ivu-btn {
+				height: 36px;
+				padding: 0 20px;
+			}
+		}
+	}
+
+	.after-line {
+		display: inline-block;
+		position: relative;
+		margin-right: 16px;
+	}
+
+	.ml16 {
+		margin-left: 16px;
+	}
+</style>

+ 266 - 0
src/pages/erp/adjusts/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>

+ 416 - 0
src/pages/erp/adjusts/index.vue

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

+ 261 - 0
src/pages/erp/adjusts/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>

+ 59 - 38
src/pages/erp/out/addOut.vue

@@ -90,30 +90,6 @@
 					</Col>
 					<Col span="24">
 					<FormItem label="商品:" prop="goods">
-						<!-- 						<Table :columns="formValidate.id == 0 ?columns:columnss" :data="chooseGoods" ref="table" :loading="loading"
-							no-userFrom-text="暂无数据" no-filtered-userFrom-text="暂无筛选结果">
-							<template slot-scope="{ row,index }" slot="pur_number">
-								<Input v-model="chooseGoods[index].pur_number" placeholder="请输入数量" v-width="'150'" type="number" />
-							</template>
-							<template slot-scope="{ row,index }" slot="weight">
-								<Input v-model="chooseGoods[index].weight" 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" >
-									<Option v-for="item in row.unitList" :value="item.value" :key="item.value">
-										{{ item.label }}</Option>
-								</Select>
-							</template>
-							<template slot-scope="{ row,index }" slot="unit_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> -->
 						<Card>
 							<div class="user-info" v-for="(goods,gindex) in chooseGoods">
 								<Button type="primary" @click="delGood(gindex)" class="del-btn">删除</Button>
@@ -132,6 +108,10 @@
 											<div>单位:</div>
 											<div class="value">{{ item.unit_name}}</div>
 										</div>
+										<div class="item">
+											<div>单价(元):</div>
+											<div class="value">{{ item.out_price}}</div>
+										</div>
 										<div class="item">
 											<div>数量:</div>
 											<div class="value"><Input
@@ -141,10 +121,14 @@
 											</div>
 										</div>
 										<div class="item" v-if="item.is_weigh == 1">
-											<div>总重量:</div>
+											<div>总重量(kg):</div>
 											<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)).toFixed(2) }}</div>
+										</div>
 										<a v-if="goods.batch.length > 1" @click="delBatch(gindex,index)" class=" del-btn-1">删除</a>
 									</div>
 
@@ -159,16 +143,24 @@
 											<div>单位:</div>
 											<div class="value">{{ goods.unit_name}}</div>
 										</div>
+										<div class="item">
+											<div>单价(元):</div>
+											<div class="value">{{ goods.out_price}}</div>
+										</div>
 										<div class="item">
 											<div>数量:</div>
 											<div class="value"><Input v-model="chooseGoods[gindex].pur_number"
 													placeholder="请输入数量" v-width="'150'" type="number" /></div>
 										</div>
 										<div class="item">
-											<div>总重量:</div>
+											<div>总重量(kg):</div>
 											<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 +170,11 @@
 							>添加商品</Button>
 					</FormItem>
 					</Col>
+					<Col span="24">
+					<FormItem label="总价(元):" prop="total">
+						{{total_price}}
+					</FormItem>
+					</Col>
 				</Row>
 			</Form>
 		</Card>
@@ -374,6 +371,7 @@
 					// 	trigger: "change"
 					// }, ],
 				},
+				total_price: 0,
 			};
 		},
 		computed: {
@@ -385,6 +383,24 @@
 				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)
+						 })
+					 }
+				 })
+				 this.total_price = total
+				},
+				deep: true
+			}
+		},
 		created() {
 			this.getGodownList()
 			let data = {
@@ -542,24 +558,29 @@
 								pur_number: '',
 								unit_name: e.unit_name,
 								weight: '',
+								out_price: e.out_price == 0?e.price: e.out_price,
+								price: e.price,
 								batch: res.data.map(item => {
 									item.weight = 0
 									item.pur_number = 0
+									item.out_price = item.out_price == 0?item.price: item.out_price;
 									return item
-								})
+								}).filter(ites => ites.product_num > 0)
 							})
+							console.log(this.chooseGoods,'this.chooseGoods');
 						} else {
-							this.chooseGoods = this.chooseGoods.concat({
-								bar_code: e.bar_code,
-								is_weigh: e.info.is_weigh,
-								name: e.product_name,
-								product_id: e.product_id,
-								product_num: e.product_num,
-								pur_number: 0,
-								unit_name: e.unit_name,
-								weight: 0,
-								batch: []
-							})
+							// this.chooseGoods = this.chooseGoods.concat({
+							// 	bar_code: e.bar_code,
+							// 	is_weigh: e.info.is_weigh,
+							// 	name: e.product_name,
+							// 	product_id: e.product_id,
+							// 	product_num: e.product_num,
+							// 	pur_number: 0,
+							// 	price: e.out_price == 0?e.price: e.out_price,
+							// 	unit_name: e.unit_name,
+							// 	weight: 0,
+							// 	batch: []
+							// }).filter(item => item.product_num > 0)
 						}
 					})
 					// this.chooseGoods = this.chooseGoods.concat(e)

+ 10 - 2
src/pages/erp/out/goodDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<div style="width: 100%">
-		<Modal v-model="modals" scrollable footer-hide closable title="商品列表" :mask-closable="false" width="700">
+		<Modal v-model="modals" scrollable footer-hide closable title="商品列表" :mask-closable="false" width="900">
 			<Form ref="formValidate" :label-width="labelWidth" :label-position="labelPosition" class="tabform"
 				@submit.native.prevent>
 				<Row :gutter="24" type="flex">
@@ -21,6 +21,9 @@
 					<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>
@@ -86,6 +89,11 @@
 						key: 'product_name',
 						minWidth: 200
 					},
+					{
+						title: '出库价格',
+						slot: 'price',
+						minWidth: 200
+					},
 					{
 						title: '库存',
 						key: 'product_num',
@@ -181,7 +189,7 @@
 				}
 				getOutGoodList(this.formValidate).then(async res => {
 					let data = res.data;
-					this.tabList = data.data;
+					this.tabList = data.data.filter(item => item.product_num > 0);
 					this.total = data.count;
 					this.loading = false;
 				}).catch(res => {

+ 329 - 41
src/pages/erp/out/index.vue

@@ -81,29 +81,17 @@
 					</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?row.ware.title: ''}}{{row.store?row.store.name:''}}</div>
 				</template>
 				<template slot-scope="{ row, index }" slot="tware">
-					<div>{{row.tware.title}}</div>
-					<!-- <div>名称:{{row.tware.title}}</div>
-					<div>ID:{{row.tware.id}}</div>
-					<div>手机:{{row.tware.phone}}</div> -->
+					<div>{{row.tware?row.tware.title:''}}{{row.tstore?row.tstore.name:''}}</div>
 				</template>
-				<template slot-scope="{ row, index }" slot="store">
+				<!-- <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>
 				<template slot-scope="{ row, index }" slot="tstore">
 					<div>{{row.tstore.name}}</div>
-					<!-- <div>名称:{{row.tstore.name}}</div>
-					<div>ID:{{row.tstore.id}}</div>
-					<div>手机:{{row.tstore.phone}}</div> -->
-				</template>
+				</template> -->
 				<template slot-scope="{ row, index }" slot="create_time">
 					<div>{{row.create_time|formatDate}}</div>
 				</template>
@@ -111,8 +99,8 @@
 					<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>
+					<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="look(row.id)">详情</a>
@@ -127,6 +115,11 @@
 						<a @click="storeReceipt(row,1)" v-if="row.to_store_id">门店收货</a>
 						<a @click="storeReceipt(row,2)" v-if="row.to_wid">添加入库</a>
 					</template>
+					<template v-if="row.status == 3 && row.is_pay == 0">
+						<Divider type="vertical" />
+						<a @click="updatePay(row)" v-if="row.pay_status != 1 && row.pay_status != 2" v-auth="['admin-erp-adjusts_pjs']">提交结算</a>
+						<a @click="authPay(row)" v-if="row.pay_status == 1 " v-auth="['admin-erp-adjusts_shjs']">结算审核</a>
+					</template>
 					<template v-if="row.status <= 0">
 						<Divider type="vertical" />
 						<a @click="del(row, '删除出库单', index)">删除</a>
@@ -154,14 +147,7 @@
 		    @submit.native.prevent
 		  >
 		    <FormItem label="审核人:">
-		     <!-- <Input
-		        v-model="remarks.mark"
-		        maxlength="200"
-		        show-word-limit
-		        type="textarea"
-		        placeholder="请填写备注~"
-		        style="width: 100%"
-		      /> -->
+		    
 			  <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 }}
@@ -178,27 +164,141 @@
 				<Option :value="-2" >无效</Option> -->
 			  </Select>
 			</FormItem>
+			
 		  </Form>
+		 
 		  <div slot="footer">
 		    <Button type="primary" @click="putRemark()">提交</Button>
 		    <Button @click="cancel()">取消</Button>
 		  </div>
 		</Modal>
+		<Modal
+		  v-model="modalJs"
+		  scrollable
+		  title="提交结算"
+		  class="order_box"
+		  :closable="false"
+		  :mask-closable="false"
+		>
+		  <Form
+		    ref="jsmodel"
+		    :model="jsData"
+		    :label-width="80"
+		    @submit.native.prevent
+		  >
+		    <FormItem label="结算人:">
+			  <Select v-model="jsData.pay_uid" clearable filterable @on-change="userSearchses"
+			  	class="input-add">
+			  	<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
+			  	</Option>
+			  </Select>
+		    </FormItem>
+			<FormItem label="凭证:">
+			  <div class="acea-row">
+			  	<div v-if="jsData.prove" class="pictrue">
+			  		<img v-lazy="jsData.prove" />
+			  		<Button shape="circle" icon="md-close" @click.native="jsData.prove = ''"
+			  			class="btndel"></Button>
+			  	</div>
+			  	<div v-else class="upLoad acea-row row-center-wrapper"
+			  		@click="modalPicTap('dan')">
+			  		<Icon type="ios-camera-outline" size="26" />
+			  	</div>
+			  	<!-- <Input v-model="jsData.prove" class="input-display"></Input> -->
+			  </div>
+			</FormItem>
+			<FormItem label="支付时间">
+			  <DatePicker
+			    :value="jsData.pay_time"
+			    type="datetime"
+			    placeholder="请选择支付时间"
+			    style="width: 200px"
+			    @on-change="onChange"
+			  />
+			</FormItem>
+		  </Form>
+		  <div slot="footer">
+		    <Button type="primary" @click="putJs()()">提交</Button>
+		    <Button @click="cancels()">取消</Button>
+		  </div>
+		  </Modal>
+		  <Modal
+		    v-model="modalAuthJs"
+		    scrollable
+		    title="提交结算"
+		    class="order_box"
+		    :closable="false"
+		    :mask-closable="false"
+		  >
+		    <Form
+		      ref="authjsmodel"
+		      :model="jsDatas"
+		      :label-width="80"
+		      @submit.native.prevent
+		    >
+		      <FormItem label="审核人:">
+		  	  <Select v-model="jsDatas.pay_auth_uid" clearable filterable @on-change="userSearchsess"
+		  	  	class="input-add">
+		  	  	<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
+		  	  	</Option>
+		  	  </Select>
+		      </FormItem>
+		  	<FormItem label="凭证:">
+		  	  <div class="acea-row">
+		  	  	<!-- <div  class="pictrue">
+		  	  		<img v-lazy="jsDatas.prove" :preview-src-list="srcList"/>
+		  	  	</div> -->
+				<viewer>
+				  <div class="tabBox_img">
+				    <img v-lazy="jsDatas.prove" />
+				  </div>
+				</viewer>
+		  	  </div>
+		  	</FormItem>
+			<FormItem label="状态:">
+			  <Select v-model="jsDatas.pay_status" clearable filterable 
+			  	class="input-add">
+			  	<Option :value="2" >通过</Option>
+				<Option :value="-1" >拒绝</Option>
+			  </Select>
+			</FormItem>
+			<FormItem label="驳回原因:">
+			 <Input
+			    v-model="jsDatas.pay_remark"
+			    maxlength="200"
+			    show-word-limit
+			    type="textarea"
+			    placeholder="请填写驳回原因"
+			    style="width: 100%"
+			  />
+			</FormItem>
+		    </Form>
+		  <div slot="footer">
+		    <Button type="primary" @click="pJsAuth()">提交</Button>
+		    <Button @click="cancelss()">取消</Button>
+		  </div>
+		</Modal>
+		<Modal v-model="modalPic" width="960px" scrollable footer-hide closable title="上传凭证" :mask-closable="false"
+			:z-index="1">
+			<uploadPictures :isChoice="isChoice" @getPic="getPic" @getPicD="getPicD" :gridBtn="gridBtn"
+				:gridPic="gridPic" v-if="modalPic"></uploadPictures>
+		</Modal>
 	</div>
 </template>
 
 <script>
 	import  outDetails from './outDetail.vue'
-	
+	import uploadPictures from "@/components/uploadPictures";
 	import {mapState} from "vuex";
-	import {getOutSimpleList,getReceiveList,getOutLists,getOutInfo,getUserList,outSave,wareDelivery} from "@/api/erp";
+	import {getOutSimpleList,getReceiveList,getOutLists,getOutInfo,getUserList,outSave,wareDelivery,pJs,pJsAuth} from "@/api/erp";
 	import {formatDate} from "@/utils/validate";
 	import timeOptions from "@/utils/timeOptions";
 	import Setting from "@/setting";
 	export default {
 		name: "outList",
 		components: {
-			outDetails
+			outDetails,
+			uploadPictures
 		},
 		filters: {
 			formatDate(time) {
@@ -210,6 +310,40 @@
 		},
 		data() {
 			return {
+				modalAuthJs: false,
+				modalJs: false,
+				isChoice: "",
+				gridPic: {
+					xl: 6,
+					lg: 8,
+					md: 12,
+					sm: 12,
+					xs: 12,
+				},
+				gridBtn: {
+					xl: 4,
+					lg: 8,
+					md: 8,
+					sm: 8,
+					xs: 8,
+				},
+				modalPic: false,
+				jsDatas: {
+					id: 0,
+					prove:'',
+					pay_remark:'',
+					pay_status:1,
+					pay_auth_uid:'',
+					pay_auth_admin_id:''
+				},
+				jsData: {
+					id: 0,
+					is_pay: 0,
+					prove:'',
+					pay_time:'',
+					pay_admin_id:0,
+					pay_uid: 0,
+				},
 				authLists:[],
 				remarks: {
 					id: 0,
@@ -248,27 +382,27 @@
 						minWidth: 200,
 					},
 					{
-						title: "调出仓库",
+						title: "调出仓库/门店",
 						slot: "ware",
 						minWidth: 100,
 					},
 					
-					{
-						title: "调出门店",
-						slot: "store",
-						minWidth: 100,
-					},
+					// {
+					// 	title: "调出门店",
+					// 	slot: "store",
+					// 	minWidth: 100,
+					// },
 					
 					{
-						title: "调入仓库",
+						title: "调入仓库/门店",
 						slot: "tware",
 						minWidth: 100,
 					},
-					{
-						title: "调入门店",
-						slot: "tstore",
-						minWidth: 100,
-					},
+					// {
+					// 	title: "调入门店",
+					// 	slot: "tstore",
+					// 	minWidth: 100,
+					// },
 					{
 						title: "总数量",
 						key: "total_num",
@@ -320,6 +454,94 @@
 			this.getList();
 		},
 		methods: {
+			pJsAuth() {
+				let that = this
+				if(!that.jsDatas.pay_auth_uid) {
+					return this.$Message.error('请选择审核人')
+				}
+				if(that.jsDatas.pay_status == 0 && that.jsDatas.pay_remark == '') {
+					return this.$Message.error('请输入驳回原因')
+				}
+				pJsAuth(that.jsDatas.id,{
+					pay_remark:that.jsDatas.pay_remark,
+					pay_status:that.jsDatas.pay_status,
+					pay_auth_uid:that.jsDatas.pay_auth_uid,
+					pay_auth_admin_id:that.jsDatas.pay_auth_admin_id
+				}).then(res => {
+					that.$Message.success(res.msg);
+					that.cancelss()
+					that.getList()
+				})
+			},
+			putJs() {
+				let that = this
+				if(!that.jsData.pay_uid) {
+					return this.$Message.error('请选择结算人')
+				}
+				if(!that.jsData.prove) {
+					return this.$Message.error('请上传凭证')
+				}
+				if(!that.jsData.pay_time) {
+					return this.$Message.error('请选择支付时间')
+				}
+				pJs(that.jsData.id,this.jsData).then(res => {
+					that.$Message.success(res.msg);
+					that.cancels()
+					that.getList()
+				})
+			},
+			// 获取单张图片信息
+			getPic(pc) {
+				this.jsData.prove = pc.att_dir
+				this.modalPic = false;
+				this.modalJs = true
+			},
+			// 获取多张图信息
+			getPicD(pc) {
+				this.images = pc;
+				this.images.map((item) => {
+					this.formValidate.slider_image.push(item.att_dir);
+					this.formValidate.slider_image = this.formValidate.slider_image.splice(
+						0,
+						10
+					);
+				});
+				// this.oneFormValidate[0].pic = this.formValidate.slider_image[0];
+				this.modalPic = false;
+			},
+			modalPicTap(tit) {
+				this.isChoice = tit === "dan" ? "单选" : "多选";
+				this.modalJs = false;
+				this.modalPic = true;
+				// this.picTit = picTit;
+				// this.tableIndex = index;
+			},
+			authPay(row) {
+				this.jsDatas.prove= row.prove;
+				 this.jsDatas.id = row.id;
+				 getUserList().then(res => {
+				 	this.authLists = res.data.data
+				 	this.modalAuthJs = true;
+				 })
+			},
+			updatePay(row) {
+				let qdata = {}
+				// if(row.tware && row.tware.id) {
+				// 	qdata.wid = row.tware.id
+				// }else {
+				// 	qdata.store_id = row.tstore.id
+				// }
+				this.authLists = []
+				this.jsData.id = row.id
+				getUserList().then(res => {
+					this.authLists = res.data.data
+					this.modalJs = true;
+				})
+				
+			},
+			onChange(date) {
+			  this.jsData.pay_time = date;
+			},
 			checkItem(e) {
 				this.checKList = e
 			},
@@ -361,6 +583,28 @@
 					auth_admin_id: "",}
 					this.modalpass = false
 			},
+			cancels() {
+				this.jsData= {
+					id: 0,
+					is_pay: 0,
+					prove:'',
+					pay_time:'',
+					pay_admin_id:0,
+					pay_uid: 0,
+				},
+				this.modalJs = false
+			},
+			cancelss() {
+				this.jsDatas= {
+					id: 0,
+					prove:'',
+					pay_remark:'',
+					pay_status:'',
+					pay_auth_uid:'',
+					pay_auth_admin_id:''
+				},
+				this.modalAuthJs = false
+			},
 			pass(row) {
 				let qdata = {}
 				if(row.wid) {
@@ -380,6 +624,16 @@
 				console.log(auth,'auth');
 				this.remarks.auth_admin_id = auth.admin_id
 			},
+			userSearchses(e) {
+				let auth = this.authLists.find(item => item.id == e)
+				console.log(auth,'auth');
+				this.jsData.pay_admin_id = auth.admin_id
+			},
+			userSearchsess(e) {
+				let auth = this.authLists.find(item => item.id == e)
+				console.log(auth,'auth');
+				this.jsDatas.pay_auth_admin_id = auth.admin_id
+			},
 			look(id) {
 					this.$refs.outDetail.getInfo(id);
 				// this.
@@ -573,4 +827,38 @@
 			border: none;
 		}
 	}
+	.pictrue {
+		width: 60px;
+		height: 60px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		margin-right: 15px;
+		margin-bottom 10px;
+		display: inline-block;
+		position: relative;
+		cursor: pointer;
+	
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	
+		.btndel {
+			position: absolute;
+			z-index: 1;
+			width: 20px !important;
+			height: 20px !important;
+			left: 46px;
+			top: -4px;
+		}
+	}
+	
+	.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);
+		cursor: pointer;
+	}
 </style>

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

@@ -299,7 +299,7 @@
 
 	import {
 		addProduct,
-		getGoodInfo
+		getGoodInfo,
 	} from "@/api/erp"
 	import {
 		productInfoApi,

+ 3 - 3
src/pages/erp/product/index.vue

@@ -30,10 +30,10 @@
               <Option value="0">下架</Option>
             </Select>
           </FormItem> -->
-					<!-- <FormItem label="仓位搜索:" label-for="store_name">
-						<Input class="input-add mr14" placeholder="请输入仓位名称" v-model="tableFrom.key" />
+					<FormItem label="商品搜索:" label-for="name">
+						<Input class="input-add mr14" placeholder="请输入商品名称" v-model="tableFrom.key" />
 						<Button type="primary" @click="tableSearchs()">查询</Button>
-					</FormItem> -->
+					</FormItem>
 					<!-- <Button
             v-auth="['marketing-store_seckill-create']"
             type="primary"

+ 326 - 2
src/pages/erp/purchase/index.vue

@@ -152,6 +152,11 @@
 					<a @click="end(row)" v-if="row.status == 1">完成</a>
 					<Divider type="vertical" v-if="row.status <1" />
 					<a @click="del(row, '删除采购单', index)" v-if="row.status <1">删除</a>
+					<template v-if="row.status == 3 && row.is_pay == 0">
+						<Divider type="vertical" />
+						<a @click="updatePay(row)" v-if="row.pay_status != 1 && row.pay_status != 2" v-auth="['admin-erp-purchase-pjs']">提交结算</a>
+						<a @click="authPay(row)" v-if="row.pay_status == 1 " v-auth="['admin-erp-purchase-shjs']">结算审核</a>
+					</template>
 				</template>
 			</Table>
 			<div class="acea-row row-right page">
@@ -221,10 +226,119 @@
 				<Button @click="cancel1()">取消</Button>
 			</div>
 		</Modal>
+		<Modal
+		  v-model="modalJs"
+		  scrollable
+		  title="提交结算"
+		  class="order_box"
+		  :closable="false"
+		  :mask-closable="false"
+		>
+		  <Form
+		    ref="jsmodel"
+		    :model="jsData"
+		    :label-width="80"
+		    @submit.native.prevent
+		  >
+		    <FormItem label="结算人:">
+			  <Select v-model="jsData.pay_uid" clearable filterable @on-change="pJsAuthList"
+			  	class="input-add">
+			  	<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
+			  	</Option>
+			  </Select>
+		    </FormItem>
+			<FormItem label="凭证:">
+			  <div class="acea-row">
+			  	<div v-if="jsData.prove" class="pictrue">
+			  		<img v-lazy="jsData.prove" />
+			  		<Button shape="circle" icon="md-close" @click.native="jsData.prove = ''"
+			  			class="btndel"></Button>
+			  	</div>
+			  	<div v-else class="upLoad acea-row row-center-wrapper"
+			  		@click="modalPicTap('dan')">
+			  		<Icon type="ios-camera-outline" size="26" />
+			  	</div>
+			  	<!-- <Input v-model="jsData.prove" class="input-display"></Input> -->
+			  </div>
+			</FormItem>
+			<FormItem label="支付时间">
+			  <DatePicker
+			    :value="jsData.pay_time"
+			    type="datetime"
+			    placeholder="请选择支付时间"
+			    style="width: 200px"
+			    @on-change="onChange"
+			  />
+			</FormItem>
+		  </Form>
+		  <div slot="footer">
+		    <Button type="primary" @click="putJs()">提交</Button>
+		    <Button @click="cancels()">取消</Button>
+		  </div>
+		  </Modal>
+		  <Modal
+		    v-model="modalAuthJs"
+		    scrollable
+		    title="审核结算"
+		    class="order_box"
+		    :closable="false"
+		    :mask-closable="false"
+		  >
+		    <Form
+		      ref="authjsmodel"
+		      :model="jsDatas"
+		      :label-width="80"
+		      @submit.native.prevent
+		    >
+		      <FormItem label="审核人:">
+		  	  <Select v-model="jsDatas.pay_auth_uid" clearable filterable @on-change="pJsAuthAuthList"
+		  	  	class="input-add">
+		  	  	<Option v-for="item in authLists" :value="item.id" :key="item.id">{{ item.staff_name }}
+		  	  	</Option>
+		  	  </Select>
+		      </FormItem>
+		  	<FormItem label="凭证:">
+		  	  <div class="acea-row">
+				<viewer>
+				  <div class="tabBox_img">
+				    <img v-lazy="jsDatas.prove" />
+				  </div>
+				</viewer>
+		  	  </div>
+		  	</FormItem>
+			<FormItem label="状态:">
+			  <Select v-model="jsDatas.pay_status" clearable filterable 
+			  	class="input-add">
+			  	<Option :value="2" >通过</Option>
+				<Option :value="-1" >拒绝</Option>
+			  </Select>
+			</FormItem>
+			<FormItem label="驳回原因:">
+			 <Input
+			    v-model="jsDatas.pay_remark"
+			    maxlength="200"
+			    show-word-limit
+			    type="textarea"
+			    placeholder="请填写驳回原因"
+			    style="width: 100%"
+			  />
+			</FormItem>
+		    </Form>
+		  <div slot="footer">
+		    <Button type="primary" @click="pJsAuth()">提交</Button>
+		    <Button @click="cancelss()">取消</Button>
+		  </div>
+		</Modal>
+		<Modal v-model="modalPic" width="960px" scrollable footer-hide closable title="上传凭证" :mask-closable="false"
+			:z-index="1">
+			<uploadPictures :isChoice="isChoice" @getPic="getPic" @getPicD="getPicD" :gridBtn="gridBtn"
+				:gridPic="gridPic" v-if="modalPic"></uploadPictures>
+		</Modal>
 	</div>
 </template>
 
 <script>
+	import uploadPictures from "@/components/uploadPictures";
 	import purchaseDetail from './purchaseDetail.vue'
 	import {
 		mapState
@@ -242,7 +356,9 @@
 		getUserList,
 		sevePurchase,
 		savePurchase,
-		getPurchaseDetail
+		getPurchaseDetail,
+		cJs,
+		cJsAuth
 	} from "@/api/erp";
 	import {
 		formatDate
@@ -261,7 +377,8 @@
 	export default {
 		name: "purchaseList",
 		components: {
-			purchaseDetail
+			purchaseDetail,
+			uploadPictures
 		},
 		filters: {
 			formatDate(time) {
@@ -273,6 +390,40 @@
 		},
 		data() {
 			return {
+				modalAuthJs: false,
+				modalJs: false,
+				isChoice: "",
+				gridPic: {
+					xl: 6,
+					lg: 8,
+					md: 12,
+					sm: 12,
+					xs: 12,
+				},
+				gridBtn: {
+					xl: 4,
+					lg: 8,
+					md: 8,
+					sm: 8,
+					xs: 8,
+				},
+				modalPic: false,
+				jsDatas: {
+					id: 0,
+					prove:'',
+					pay_remark:'',
+					pay_status:1,
+					pay_auth_uid:'',
+					pay_auth_admin_id:''
+				},
+				jsData: {
+					id: 0,
+					is_pay: 0,
+					prove:'',
+					pay_time:'',
+					pay_admin_id:0,
+					pay_uid: 0,
+				},
 				list: [],
 				endobj: {
 					id: 0,
@@ -460,6 +611,145 @@
 			this.getGodownList()
 		},
 		methods: {
+			pJsAuthList(e) {
+				let auth = this.authLists.find(item => item.id == e)
+				console.log(auth,'auth');
+				this.jsData.pay_admin_id = auth.admin_id
+			},
+			pJsAuthAuthList(e) {
+				let auth = this.authLists.find(item => item.id == e)
+				console.log(auth,'auth');
+				this.jsDatas.pay_auth_admin_id = auth.admin_id
+			},
+			putJs() {
+				let that = this
+				if(!that.jsData.pay_uid) {
+					return this.$Message.error('请选择结算人')
+				}
+				if(!that.jsData.prove) {
+					return this.$Message.error('请上传凭证')
+				}
+				if(!that.jsData.pay_time) {
+					return this.$Message.error('请选择支付时间')
+				}
+				pJs(that.jsData.id,this.jsData).then(res => {
+					that.$Message.success(res.msg);
+					that.cancels()
+					that.getList()
+				})
+			},
+			onChange(date) {
+			  this.jsData.pay_time = date;
+			},
+			pJsAuth() {
+				let that = this
+				if(!that.jsDatas.pay_auth_uid) {
+					return this.$Message.error('请选择审核人')
+				}
+				if(that.jsDatas.pay_status == 0 && that.jsDatas.pay_remark == '') {
+					return this.$Message.error('请输入驳回原因')
+				}
+				cJsAuth(that.jsDatas.id,{
+					pay_remark:that.jsDatas.pay_remark,
+					pay_status:that.jsDatas.pay_status,
+					pay_auth_uid:that.jsDatas.pay_auth_uid,
+					pay_auth_admin_id:that.jsDatas.pay_auth_admin_id
+				}).then(res => {
+					that.$Message.success(res.msg);
+					that.cancelss()
+					that.getList()
+				})
+			},
+			putJs() {
+				let that = this
+				if(!that.jsData.pay_uid) {
+					return this.$Message.error('请选择结算人')
+				}
+				if(!that.jsData.prove) {
+					return this.$Message.error('请上传凭证')
+				}
+				if(!that.jsData.pay_time) {
+					return this.$Message.error('请选择支付时间')
+				}
+				cJs(that.jsData.id,this.jsData).then(res => {
+					that.$Message.success(res.msg);
+					that.cancels()
+					that.getList()
+				})
+			},
+			// 获取单张图片信息
+			getPic(pc) {
+				this.jsData.prove = pc.att_dir
+				this.modalPic = false;
+				this.modalJs = true
+			},
+			// 获取多张图信息
+			getPicD(pc) {
+				this.images = pc;
+				this.images.map((item) => {
+					this.formValidate.slider_image.push(item.att_dir);
+					this.formValidate.slider_image = this.formValidate.slider_image.splice(
+						0,
+						10
+					);
+				});
+				// this.oneFormValidate[0].pic = this.formValidate.slider_image[0];
+				this.modalPic = false;
+			},
+			cancelss() {
+				this.jsDatas= {
+					id: 0,
+					prove:'',
+					pay_remark:'',
+					pay_status:'',
+					pay_auth_uid:'',
+					pay_auth_admin_id:''
+				},
+				this.modalAuthJs = false
+			},
+			cancels() {
+				this.jsData= {
+					id: 0,
+					is_pay: 0,
+					prove:'',
+					pay_time:'',
+					pay_admin_id:0,
+					pay_uid: 0,
+				},
+				this.modalJs = false
+			},
+			modalPicTap(tit) {
+				this.isChoice = tit === "dan" ? "单选" : "多选";
+				this.modalJs = false;
+				this.modalPic = true;
+				// this.picTit = picTit;
+				// this.tableIndex = index;
+			},
+			authPay(row) {
+				this.jsDatas.prove= row.prove;
+				 this.jsDatas.id = row.id;
+				 getUserList().then(res => {
+				 	this.authLists = res.data.data
+				 	this.modalAuthJs = true;
+				 })
+			},
+			updatePay(row) {
+				try{
+					this.authLists = []
+					this.jsData.id = row.id
+					getUserList().then(res => {
+						this.authLists = res.data.data
+						this.modalJs = true;
+					})
+				}catch(e){
+					console.log(e)
+					//TODO handle the exception
+				}
+				
+					
+				
+				
+			},
 			printing(name) {
 				if (this.checKList.length == 0) {
 					return this.$Message.error('请选择要打印的要货单')
@@ -776,4 +1066,38 @@
 			height: 100%;
 		}
 	}
+	.pictrue {
+		width: 60px;
+		height: 60px;
+		border: 1px dotted rgba(0, 0, 0, 0.1);
+		margin-right: 15px;
+		margin-bottom 10px;
+		display: inline-block;
+		position: relative;
+		cursor: pointer;
+	
+		img {
+			width: 100%;
+			height: 100%;
+		}
+	
+		.btndel {
+			position: absolute;
+			z-index: 1;
+			width: 20px !important;
+			height: 20px !important;
+			left: 46px;
+			top: -4px;
+		}
+	}
+	
+	.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);
+		cursor: pointer;
+	}
 </style>

+ 35 - 8
src/pages/product/productAdd/index.vue

@@ -513,9 +513,11 @@
 							</template>
 							<template slot-scope="{ row, index }" slot="erp_product_id">
 								<Select v-model="oneFormBatch[0].erp_product_id" filterable 
-									:remote-method="queryWarehouseList" :loading="warehouseListLoding">
+									:remote-method="queryWarehouseList" :loading="warehouseListLoding"  @on-change="changeErpProductId">
 									<Option v-for="(option, index) in warehouseList" :value="option.id" :key="index">
-										{{option.store_name}}({{option.unit_name}})
+										<div>
+											{{option.store_name}}({{option.unit_name}})
+										</div>
 									</Option>
 								</Select>
 							</template>
@@ -599,7 +601,7 @@
 								</InputNumber>
 							</template>
 							<template slot-scope="{ row, index }" slot="erp_product_id">
-								<Select v-model="manyFormValidate[index].erp_product_id" filterable :remote-method="queryWarehouseList" :loading="warehouseListLoding">
+								<Select v-model="manyFormValidate[index].erp_product_id" filterable :remote-method="queryWarehouseList" :loading="warehouseListLoding" @on-change="changeErpProductId">
 									<Option v-for="(option, index) in warehouseList" :value="option.id" :key="index">
 										{{option.store_name}}({{option.unit_name}})
 									</Option>
@@ -726,7 +728,7 @@
 						<Col span="24">
 						<FormItem label="仓库商品:">
 							<Select v-model="oneFormValidate[0].erp_product_id" filterable v-width="'50%'"
-								:remote-method="queryWarehouseList" :loading="warehouseListLoding">
+								:remote-method="queryWarehouseList" :loading="warehouseListLoding" @on-change="changeErpProductId" >
 								<Option v-for="(option, index) in warehouseList" :value="option.id" :key="index">
 									{{option.store_name}}({{option.unit_name}})
 								</Option>
@@ -1846,6 +1848,7 @@
 					xs: 8,
 				},
 				formValidate: {
+					is_weigh: 0,
 					applicable_store_id: [],
 					system_form_id: 0, //自定义表单id
 					// supplier_id:0,//供应商
@@ -2234,6 +2237,7 @@
 							this.storeDataLabel = data.store_label_id;
 							this.specsList = data.specs;
 							this.oneFormValidate = data.attrs;
+							console.log(data.attrs,'data.attrs')
 							this.formValidate.header = [];
 							this.generate(0);
 							this.addmanyData(data.attrs);
@@ -2304,17 +2308,36 @@
 			...mapMutations('admin/layout', [
 				'setCopyrightShow'
 			]),
+			changeErpProductId(e) {
+				erpGoods({
+					id:e
+				}).then(res => {
+					// this.for
+					this.formValidate.is_weigh = res.data.data[0].is_weigh;
+					console.log(this.formValidate.is_weigh,'this.formValidate.is_weigh');
+				})
+			},
+			containsChinese(str) {
+			  return /[\u4e00-\u9fa5]/.test(str);
+			},
 			// 查询仓库商品
 			queryWarehouseList(query) {
 				console.log(query,'query')
 				const that = this;
+				
 				if (query !== '') {
+					query = query.trim()
 					that.warehouseListLoding = true;
-					erpGoods({
-						key: query,
+					let qdata = {
 						page: 1,
 						limit: 100,
-					}).then(res => {
+					}
+					if(this.containsChinese(query)) {
+						qdata.key = query
+					}else {
+						qdata.id = query
+					}
+					erpGoods(qdata).then(res => {
 						that.warehouseListLoding = false;
 						that.warehouseList = res.data.data;
 					}).catch(err => {
@@ -2892,6 +2915,7 @@
 				this.content = data;
 			},
 			infoData(data) {
+				console.log(data,'productInfo');
 				this.storesList = data.stores || [];
 				let cate_id = data.cate_id.map(Number);
 				this.attrs = data.items || [];
@@ -2910,6 +2934,8 @@
 					brandIds.push(item.toString())
 				})
 				this.formValidate = data;
+				// this.formValidate.
+				console.log('na',this.formValidate);
 				this.formTypeList = data.custom_form_info;
 				this.formValidate.brand_id = brandIds;
 				// this.formValidate.supplier_id = data.relation_id;
@@ -3293,7 +3319,7 @@
 							this.$set(val, "unit", this.oneFormBatch[0].unit);
 						}
 						if (this.oneFormBatch[0].uint_to_erp_unit > 0) {
-							this.$set(val, "uint_to_erp_unit", this.oneFormBatch[0].uint_to_erp_unit);
+							this.$set(val, "uint_to_erp_unit", this.oneFormBatch[0].uint_to_erp_unit*1);
 						}
 						// if (this.oneFormBatch[0].stock > 0) {
 						// 	this.$set(val, "stock", this.oneFormBatch[0].stock);
@@ -3477,6 +3503,7 @@
 				productInfoApi(that.$route.params.id || this.$route.query.copy)
 					.then(async (res) => {
 						let data = res.data.productInfo;
+						
 						this.merchantType = parseInt(data.type);
 						if (this.merchantType == 2) {
 							let obj = {

+ 490 - 403
src/pages/store/components/addStore.vue

@@ -1,232 +1,285 @@
 <template>
-    <div>
-        <Modal v-model="isTemplate" scrollable  footer-hide closable :title="title"  :z-index="1" width="700" @on-cancel="cancel">
-            <div class="article-manager">
-                <Card :bordered="false" dis-hover>
-                    <Form ref="formItem" :model="formItem" :label-width="labelWidth" :label-position="labelPosition" :rules="ruleValidate" @submit.native.prevent>
-                        <Row type="flex" :gutter="24">
+	<div>
+		<Modal v-model="isTemplate" scrollable footer-hide closable :title="title" :z-index="1" width="700"
+			@on-cancel="cancel">
+			<div class="article-manager">
+				<Card :bordered="false" dis-hover>
+					<Form ref="formItem" :model="formItem" :label-width="labelWidth" :label-position="labelPosition"
+						:rules="ruleValidate" @submit.native.prevent>
+						<Row type="flex" :gutter="24">
 							<Col span="24" v-if="openErp">
-								<Col v-bind="grid">
-									<FormItem label="erp门店:" prop="erp_shop_id">
-										<Button @click="tapErp">{{formItem.erp_shop_id?formItem.erp_shop_id:"请选择erp门店"}}</Button>
-									</FormItem>
-								</Col>
+							<Col v-bind="grid">
+							<FormItem label="erp门店:" prop="erp_shop_id">
+								<Button
+									@click="tapErp">{{formItem.erp_shop_id?formItem.erp_shop_id:"请选择erp门店"}}</Button>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店照片:" prop="image">
+								<div class="picBox" @click="modalPicTap('单选')">
+									<div class="pictrue" v-if="formItem.image"><img v-lazy="formItem.image"></div>
+									<div class="upLoad" v-else>
+										<div class="iconfont">+</div>
+									</div>
+								</div>
+							</FormItem>
+							</Col>
 							</Col>
 							<Col span="24">
-							    <Col v-bind="grid">
-							        <FormItem label="门店照片:" prop="image">
-							            <div class="picBox" @click="modalPicTap('单选')">
-							                <div class="pictrue" v-if="formItem.image"><img v-lazy="formItem.image"></div>
-							                <div class="upLoad" v-else>
-												<div class="iconfont">+</div>
-							                </div>
-							            </div>
-							        </FormItem>
-							    </Col>
-							</Col>
-              <Col span="24">
-                 <Col v-bind="grid" >
-                    <FormItem label="门店分类:" prop="cate_id" label-for="cate_id">
-                      <Cascader
-                          :data="treeSelect"
-                          placeholder="请选择门店分类"
-                          change-on-select
-                          v-model="formItem.cate_id"
-                          filterable
-                      ></Cascader>
-                    </FormItem>
-                 </Col>
-              </Col>
+							<Col v-bind="grid">
+							<FormItem label="门店分类:" prop="cate_id" label-for="cate_id">
+								<Cascader :data="treeSelect" placeholder="请选择门店分类" change-on-select
+									v-model="formItem.cate_id" filterable></Cascader>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24" v-if="formItem.id == 0">
-							    <Col v-bind="grid" >
-							        <FormItem label="管理员账号:" prop="store_account" label-for="store_account">
-							            <Input v-model="formItem.store_account"  placeholder="请输入管理员账号"/>
-							        </FormItem>
-							    </Col>
-							</Col>
-							<Col span="24"  v-if="formItem.id == 0">
-							    <Col v-bind="grid">
-							        <FormItem label="管理员密码:" prop="store_password" label-for="store_password">
-							            <Input type="password" v-model="formItem.store_password"  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>
-                                </Col>
-                            </Col>
-                            <Col span="24">
-                            	<Col v-bind="grid">
-                            		<FormItem label="门店简介:" label-for="introduction">
-                            			<Input v-model="formItem.introduction"  maxlength="100" show-word-limit :rows="4" :autosize="{maxRows:4,minRows: 4}" type="textarea"   placeholder="请输入门店简介"s/>
-                            		</FormItem>
-                            	</Col>
-                            </Col>
-                            <Col span="24">
-                                <Col v-bind="grid">
-                                    <FormItem label="门店手机号:" label-for="phone" prop="phone">
-                                        <Input v-model="formItem.phone"  placeholder="请输入门店手机号"/>
-                                    </FormItem>
-                                </Col>
-                            </Col>
+							<Col v-bind="grid">
+							<FormItem label="管理员账号:" prop="store_account" label-for="store_account">
+								<Input v-model="formItem.store_account" placeholder="请输入管理员账号" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" v-if="formItem.id == 0">
+							<Col v-bind="grid">
+							<FormItem label="管理员密码:" prop="store_password" label-for="store_password">
+								<Input type="password" v-model="formItem.store_password" 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>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店简介:" label-for="introduction">
+								<Input v-model="formItem.introduction" maxlength="100" show-word-limit :rows="4"
+									:autosize="{maxRows:4,minRows: 4}" type="textarea" placeholder="请输入门店简介" s />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店手机号:" label-for="phone" prop="phone">
+								<Input v-model="formItem.phone" placeholder="请输入门店手机号" />
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="营业状态:" label-for="is_show" prop="is_show">
+								<Switch size="large" v-model="formItem.is_show" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24">
-								<Col v-bind="grid">
-									<FormItem label="营业状态:" label-for="is_show" prop="is_show">
-										<Switch size="large" v-model="formItem.is_show" :false-value="0" :true-value="1">
-											<span slot="open" :true-value="1">开启</span>
-											<span slot="close" :false-value="0">关闭</span>
-										</Switch>
-									</FormItem>
-								</Col>
+							<Col v-bind="grid" v-if="formItem.is_show == 1">
+							<FormItem label="营业时间:" label-for="day_time" prop="day_time">
+								<TimePicker type="timerange" @on-change="onchangeTime" v-model="formItem.day_time"
+									format="HH:mm:ss" :value="formItem.day_time" placement="bottom-end"
+									placeholder="请选择营业时间" class="inputW"></TimePicker>
+							</FormItem>
+							</Col>
 							</Col>
 							<Col span="24">
-								<Col v-bind="grid" v-if="formItem.is_show == 1">
-									<FormItem label="营业时间:" label-for="day_time"  prop="day_time">
-										<TimePicker type="timerange" @on-change="onchangeTime" v-model="formItem.day_time"  format="HH:mm:ss" :value="formItem.day_time" placement="bottom-end" placeholder="请选择营业时间" class="inputW" ></TimePicker>
-									</FormItem>
-								</Col>
-							</Col>
-              <Col span="24">
-                <Col v-bind="grid">
-                  <FormItem label="门店类型:">
-                    <RadioGroup v-model="formItem.type">
-                      <Radio :label="1">
-                        <Icon type="social-apple"></Icon>
-                        <span>自营</span>
-                      </Radio>
-                      <Radio :label="2">
-                        <Icon type="social-android"></Icon>
-                        <span>加盟</span>
-                      </Radio>
-                    </RadioGroup>
-                    <div class="tips">自营店不支持自主上传商品,加盟店有自主上传商品的权限</div>
-                  </FormItem>
-                </Col>
-              </Col>
+							<Col v-bind="grid">
+							<FormItem label="门店类型:">
+								<RadioGroup v-model="formItem.type">
+									<Radio :label="1">
+										<Icon type="social-apple"></Icon>
+										<span>自营</span>
+									</Radio>
+									<Radio :label="2">
+										<Icon type="social-android"></Icon>
+										<span>加盟</span>
+									</Radio>
+								</RadioGroup>
+								<div class="tips">自营店不支持自主上传商品,加盟店有自主上传商品的权限</div>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" v-if="formItem.type==2">
+							<Col v-bind="grid">
+							<FormItem label="商品免审:" label-for="product_verify_status" prop="product_verify_status">
+								<Switch size="large" v-model="formItem.product_verify_status" :false-value="0"
+									:true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24" v-if="formItem.type==2">
-								<Col v-bind="grid">
-									<FormItem label="商品免审:" label-for="product_verify_status" prop="product_verify_status">
-										<Switch size="large" v-model="formItem.product_verify_status" :false-value="0" :true-value="1">
-											<span slot="open" :true-value="1">开启</span>
-											<span slot="close" :false-value="0">关闭</span>
-										</Switch>
-									</FormItem>
-								</Col>
-							</Col>
-              <Col span="24" v-if="formItem.type==2">
-                <Col v-bind="grid">
-                  <FormItem label="自主添加商品:" label-for="product_status" prop="product_status">
-                    <Switch size="large" v-model="formItem.product_status" :false-value="0" :true-value="1">
-                      <span slot="open" :true-value="1">开启</span>
-                      <span slot="close" :false-value="0">关闭</span>
-                    </Switch>
-                  </FormItem>
-                </Col>
-              </Col>
+							<Col v-bind="grid">
+							<FormItem label="自主添加商品:" label-for="product_status" prop="product_status">
+								<Switch size="large" v-model="formItem.product_status" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
+							<!-- <Col span="24" >
+							<Col v-bind="grid">
+							<FormItem label="负库存销售:" label-for="negative_stock" prop="negative_stock">
+								<Switch size="large" v-model="formItem.negative_stock" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col> -->
 							<Col span="24">
-								<Col v-bind="grid">
-									<FormItem label="到店自提:" label-for="mention" prop="mention">
-										<Switch size="large" v-model="formItem.is_store" :false-value="0" :true-value="1">
-											<span slot="open" :true-value="1">开启</span>
-											<span slot="close" :false-value="0">关闭</span>
-										</Switch>
-									</FormItem>
-								</Col>
-							</Col>
-                            <Col span="24">
-                            	<Col v-bind="grid">
-                            		<FormItem label="门店地址:" label-for="address" prop="address">
-                            			<Cascader :data="addresData" :load-data="loadData" v-model="formItem.addressSelect" @on-change="addchack" class="inputW"></Cascader>
-                            		</FormItem>
-                            	</Col>
-                            </Col>
+							<Col v-bind="grid">
+							<FormItem label="负库存销售:" label-for="negative_stock" prop="negative_stock">
+								<Switch size="large" v-model="formItem.negative_stock" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24">
-								<Col v-bind="grid">
-									<FormItem required label="配送范围(半径):" label-for="valid_range" prop="valid_range">
-										<InputNumber :min="0.01" :max="100000" v-model="formItem.valid_range" :formatter="value => `${formItem.valid_range}`" :parser="value => value.replace('%', '')" style="width: 90px;"></InputNumber><span class="ml10">km</span>
-									</FormItem>
-								</Col>
-							</Col>
-                            <Col span="24">
-                            	<Col v-bind="grid">
-                            		<FormItem label="门店详细地址:" label-for="detailed_address" prop="detailed_address">
-                            			<Input search enter-button="查找位置" v-model="formItem.detailed_address"  placeholder="输入地址(包含城市名称,否则会影响搜索精度)" class="inputW" @on-search="onSearch" />
-                            		  <!-- 提示:定位地址后,手动补充完详细地址,禁止再次点击查找 -->
-									</FormItem>
-                            	</Col>
-                            </Col>
+							<Col v-bind="grid">
+							<FormItem label="到店自提:" label-for="mention" prop="mention">
+								<Switch size="large" v-model="formItem.is_store" :false-value="0" :true-value="1">
+									<span slot="open" :true-value="1">开启</span>
+									<span slot="close" :false-value="0">关闭</span>
+								</Switch>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店地址:" label-for="address" prop="address">
+								<Cascader :data="addresData" :load-data="loadData" v-model="formItem.addressSelect"
+									@on-change="addchack" class="inputW"></Cascader>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem required label="配送范围(半径):" label-for="valid_range" prop="valid_range">
+								<InputNumber :min="0.01" :max="100000" v-model="formItem.valid_range"
+									:formatter="value => `${formItem.valid_range}`"
+									:parser="value => value.replace('%', '')" style="width: 90px;"></InputNumber><span
+									class="ml10">km</span>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24">
+							<Col v-bind="grid">
+							<FormItem label="门店详细地址:" label-for="detailed_address" prop="detailed_address">
+								<Input search enter-button="查找位置" v-model="formItem.detailed_address"
+									placeholder="输入地址(包含城市名称,否则会影响搜索精度)" class="inputW" @on-search="onSearch" />
+								<!-- 提示:定位地址后,手动补充完详细地址,禁止再次点击查找 -->
+							</FormItem>
+							</Col>
+							</Col>
 							<Col span="24" v-if="isApi || add">
-								<Maps v-if="mapKey" ref="mapChild" class="map-sty" :mapKey="mapKey" :lat="Number(formItem.latitude || 34.34127)" :lon="Number(formItem.longitude || 108.93984)" :address="formItem.detailed_address" @getCoordinates="getCoordinates" />
-							</Col>
-                          <Col span="24" class="mt20" v-if="!formItem.id">
-                            <Col v-bind="grid">
-                              <FormItem label="同步商品:">
-                                <RadioGroup v-model="formItem.applicable_type">
-                                  <Radio :label="1">
-                                    <Icon type="social-apple"></Icon>
-                                    <span>全部商品</span>
-                                  </Radio>
-                                  <Radio :label="2">
-                                    <Icon type="social-android"></Icon>
-                                    <span>部分商品</span>
-                                  </Radio>
-                                </RadioGroup>
-                              </FormItem>
-                            </Col>
-                          </Col>
-                          <Col span="24" v-if="!formItem.id && formItem.applicable_type == 2" >
-                          <FormItem label="选择商品:" label-for="product_id" prop="">
-                            <div class="box">
-                              <div class="box-item" v-for="(item,index) in goodsList" :key="index">
-                                <img :src="item.image" alt="">
-                                <Icon class="icon" type="ios-close-circle" size="20" @click="bindDelete(index)" />
-                              </div>
-                              <div class="upload-box" @click="modals = true"><Icon type="ios-camera-outline" size="36" /></div>
-                            </div>
-                          </FormItem>
-                        </Col>
-                        </Row>
-                        <Row style="justify-content: space-around;">
-                            <Col>
-                                <Button type="primary" class="btn" @click="handleSubmit('formItem')">{{formItem.id!=0?'修改':'提交'}}</Button>
-                            </Col>
-                        </Row>
-                        <Spin size="large" fix v-if="spinShow"></Spin>
-                    </Form>
-                </Card>
+							<Maps v-if="mapKey" ref="mapChild" class="map-sty" :mapKey="mapKey"
+								:lat="Number(formItem.latitude || 34.34127)"
+								:lon="Number(formItem.longitude || 108.93984)" :address="formItem.detailed_address"
+								@getCoordinates="getCoordinates" />
+							</Col>
+							<Col span="24" class="mt20" v-if="!formItem.id">
+							<Col v-bind="grid">
+							<FormItem label="同步商品:">
+								<RadioGroup v-model="formItem.applicable_type">
+									<Radio :label="1">
+										<Icon type="social-apple"></Icon>
+										<span>全部商品</span>
+									</Radio>
+									<Radio :label="2">
+										<Icon type="social-android"></Icon>
+										<span>部分商品</span>
+									</Radio>
+								</RadioGroup>
+							</FormItem>
+							</Col>
+							</Col>
+							<Col span="24" v-if="!formItem.id && formItem.applicable_type == 2">
+							<FormItem label="选择商品:" label-for="product_id" prop="">
+								<div class="box">
+									<div class="box-item" v-for="(item,index) in goodsList" :key="index">
+										<img :src="item.image" alt="">
+										<Icon class="icon" type="ios-close-circle" size="20"
+											@click="bindDelete(index)" />
+									</div>
+									<div class="upload-box" @click="modals = true">
+										<Icon type="ios-camera-outline" size="36" />
+									</div>
+								</div>
+							</FormItem>
+							</Col>
+						</Row>
+						<Row style="justify-content: space-around;">
+							<Col>
+							<Button type="primary" class="btn"
+								@click="handleSubmit('formItem')">{{formItem.id!=0?'修改':'提交'}}</Button>
+							</Col>
+						</Row>
+						<Spin size="large" fix v-if="spinShow"></Spin>
+					</Form>
+				</Card>
 
-                <Modal v-model="modalPic" width="960px" scrollable  footer-hide closable title='上传提货点logo' :mask-closable="false" :z-index="1">
-                    <uploadPictures :isChoice="isChoice" @getPic="getPic" :gridBtn="gridBtn" :gridPic="gridPic" v-if="modalPic"></uploadPictures>
-                </Modal>
-				<Modal v-model="modalErp" width="700px" scrollable  footer-hide closable title='erp门店' :mask-closable="false" :z-index="1">
+				<Modal v-model="modalPic" width="960px" scrollable footer-hide closable title='上传提货点logo'
+					:mask-closable="false" :z-index="1">
+					<uploadPictures :isChoice="isChoice" @getPic="getPic" :gridBtn="gridBtn" :gridPic="gridPic"
+						v-if="modalPic"></uploadPictures>
+				</Modal>
+				<Modal v-model="modalErp" width="700px" scrollable footer-hide closable title='erp门店'
+					:mask-closable="false" :z-index="1">
 					<erpList ref="refErp" @getProductId="getProductId"></erpList>
 				</Modal>
-            </div>
-        </Modal>
-        <Modal v-model="modals" title="商品列表"  class="paymentFooter" scrollable width="900" :footer-hide="true">
-          <goods-list ref="goodslist"  @getProductId="getGoodsId" v-if="modals" :ischeckbox="true" :isLive="true" :storeType="1"></goods-list>
-        </Modal>
-    </div>
+			</div>
+		</Modal>
+		<Modal v-model="modals" title="商品列表" class="paymentFooter" scrollable width="900" :footer-hide="true">
+			<goods-list ref="goodslist" @getProductId="getGoodsId" v-if="modals" :ischeckbox="true" :isLive="true"
+				:storeType="1"></goods-list>
+		</Modal>
+	</div>
 </template>
 
 <script>
 	// import { keyApi} from '@/api/setting';
-  import goodsList from '@/components/goodsList'
-	import { keyApi, storeGetInfoApi, cityApi, storeUpdateApi, cascaderList } from '@/api/store';
-	import { erpConfig } from "@/api/erp";
+	import goodsList from '@/components/goodsList'
+	import {
+		keyApi,
+		storeGetInfoApi,
+		cityApi,
+		storeUpdateApi,
+		cascaderList
+	} from '@/api/store';
+	import {
+		erpConfig
+	} from "@/api/erp";
 	// import { keyApi, storeUpdateApi, storeGetInfoApi, cityApi } from '@/api/setting';
-	import { mapState } from 'vuex';
+	import {
+		mapState
+	} from 'vuex';
 	import uploadPictures from '@/components/uploadPictures';
 	import erpList from './erpList.vue';
 	import Maps from '@/components/map/map.vue'
 	export default {
 		name: 'systemStore',
-		components: { uploadPictures,Maps,erpList,goodsList },
-		props: { },
-		data () {
+		components: {
+			uploadPictures,
+			Maps,
+			erpList,
+			goodsList
+		},
+		props: {},
+		data() {
 			let validatePhone = (rule, value, callback) => {
 				if (!value) {
 					return callback(new Error('请填写手机号'));
@@ -251,16 +304,16 @@
 				}
 			};
 			return {
-        goodsList:[],
-        modals:false,
-        treeSelect:[],
-				modalErp:false,
-				openErp:false,
+				goodsList: [],
+				modals: false,
+				treeSelect: [],
+				modalErp: false,
+				openErp: false,
 				isTemplate: false,
 				title: '',
 				formItem: {
-          product_id:[],
-          cate_id:[],
+					product_id: [],
+					cate_id: [],
 					id: 0,
 					erp_shop_id: 0,
 					store_account: '',
@@ -274,58 +327,79 @@
 					is_store: 0,
 					address: '',
 					detailed_address: '',
-					latitude:'',
-					longitude:'',
-					province:0,
-					city:0,
-					area:0,
-					street:0,
-					addressSelect:[],
-					valid_range:0,
-					product_verify_status:0,
-          product_status:1,
-          type:1,
-          applicable_type:1
+					latitude: '',
+					longitude: '',
+					province: 0,
+					city: 0,
+					area: 0,
+					street: 0,
+					addressSelect: [],
+					valid_range: 0,
+					product_verify_status: 0,
+					product_status: 1,
+					type: 1,
+					negative_stock:0,
+					applicable_type: 1
 				},
 				spinShow: false,
 				addresData: [],
 				ruleValidate: {
-					name: [
-						{ required: true, message: '请输入门店名称', trigger: 'blur' }
-					],
-					erp_shop_id: [
-						{ required: true, validator: validateErp, trigger: 'change' }
-					],
-					store_account: [
-						{ required: true, message: '请输入管理员账号', trigger: 'blur' }
-					],
-					store_password: [
-						{ required: true, message: '请输入管理员密码', trigger: 'blur' }
-					],
-					address: [
-						{ required: true, message: '请选择门店地址', trigger: 'change' }
-					],
-					day_time: [ 
-						{required: true,type: "array", message: "请选择营业时间",trigger: "change"},
-						{validator(rule, value, callback, source, options) 
-							{
+					name: [{
+						required: true,
+						message: '请输入门店名称',
+						trigger: 'blur'
+					}],
+					erp_shop_id: [{
+						required: true,
+						validator: validateErp,
+						trigger: 'change'
+					}],
+					store_account: [{
+						required: true,
+						message: '请输入管理员账号',
+						trigger: 'blur'
+					}],
+					store_password: [{
+						required: true,
+						message: '请输入管理员密码',
+						trigger: 'blur'
+					}],
+					address: [{
+						required: true,
+						message: '请选择门店地址',
+						trigger: 'change'
+					}],
+					day_time: [{
+							required: true,
+							type: "array",
+							message: "请选择营业时间",
+							trigger: "change"
+						},
+						{
+							validator(rule, value, callback, source, options) {
 								if (value[0] === "") {
-								callback("时间不能为空");
+									callback("时间不能为空");
 								}
-							 callback();//这个一定要有。不然无法验证通过
+								callback(); //这个一定要有。不然无法验证通过
 							}
 						}
-				    ],//TimePicker-timerange,自定义的
+					], //TimePicker-timerange,自定义的
 
-					phone: [
-						{ required: true, validator: validatePhone, trigger: 'blur' }
-					],
-					detailed_address: [
-						{ required: true, message: '请输入详细地址', trigger: 'blur' }
-					],
-					image: [
-						{ required: true, validator: validateUpload, trigger: 'change' }
-					]
+					phone: [{
+						required: true,
+						validator: validatePhone,
+						trigger: 'blur'
+					}],
+					detailed_address: [{
+						required: true,
+						message: '请输入详细地址',
+						trigger: 'blur'
+					}],
+					image: [{
+						required: true,
+						validator: validateUpload,
+						trigger: 'change'
+					}]
 				},
 				mapKey: '',
 				grid: {
@@ -351,84 +425,86 @@
 				},
 				modalPic: false,
 				isChoice: '单选',
-				pid:0,
-				isApi:0,
-				add:0
+				pid: 0,
+				isApi: 0,
+				add: 0
 			}
 		},
-		created () {
-      this.goodsCategory();
+		created() {
+			this.goodsCategory();
 			this.getErpConfig();
 			this.getKey();
 			// this.getInfo();
-			let data = {pid:0}
+			let data = {
+				pid: 0
+			}
 			this.cityInfo(data);
 		},
 		computed: {
 			...mapState('admin/layout', [
 				'isMobile'
 			]),
-			labelWidth () {
+			labelWidth() {
 				return this.isMobile ? undefined : 120;
 			},
-			labelPosition () {
+			labelPosition() {
 				return this.isMobile ? 'top' : 'right';
 			}
 		},
-		mounted: function () {},
+		mounted: function() {},
 		methods: {
-      //对象数组去重;
-      unique(arr) {
-        const res = new Map();
-        return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1))
-      },
-      getGoodsId (data) {
-        let list = this.goodsList.concat(data);
-        let uni = this.unique(list);
-        this.goodsList = uni;
-        this.$nextTick(res=>{
-          setTimeout(()=>{
-            this.modals = false
-          },300)
-        })
-      },
-      bindDelete (index) {
-        this.goodsList.splice(index, 1)
-      },
-      // 门店分类;
-      goodsCategory () {
-        cascaderList(1).then(res => {
-          this.treeSelect = res.data;
-        }).catch(res => {
-          this.$Message.error(res.msg);
-        })
-      },
-			getProductId(id){
+			//对象数组去重;
+			unique(arr) {
+				const res = new Map();
+				return arr.filter((arr) => !res.has(arr.product_id) && res.set(arr.product_id, 1))
+			},
+			getGoodsId(data) {
+				let list = this.goodsList.concat(data);
+				let uni = this.unique(list);
+				this.goodsList = uni;
+				this.$nextTick(res => {
+					setTimeout(() => {
+						this.modals = false
+					}, 300)
+				})
+			},
+			bindDelete(index) {
+				this.goodsList.splice(index, 1)
+			},
+			// 门店分类;
+			goodsCategory() {
+				cascaderList(1).then(res => {
+					this.treeSelect = res.data;
+				}).catch(res => {
+					this.$Message.error(res.msg);
+				})
+			},
+			getProductId(id) {
 				this.formItem.erp_shop_id = id;
 				this.modalErp = false;
 				this.$refs.formItem.validateField("erp_shop_id");
 			},
-			tapErp(){
+			tapErp() {
 				this.$refs.refErp.currentid = this.formItem.erp_shop_id;
 				this.modalErp = true;
 				this.$refs.formItem.validateField("erp_shop_id");
 			},
-			getErpConfig(){
-				erpConfig().then(res=>{
+			getErpConfig() {
+				erpConfig().then(res => {
 					this.openErp = res.data.open_erp;
-				}).catch(err=>{
+				}).catch(err => {
 					this.$Message.error(err.msg);
 				})
 			},
-			clearFrom () {
-          this.goodsList = [];
-			    this.formItem = {
-          cate_id: [],
+			clearFrom() {
+				this.goodsList = [];
+				this.formItem = {
+					cate_id: [],
 					id: 0,
 					store_account: '',
 					store_password: "",
 					image: '',
-					erp_shop_id:0,
+					erp_shop_id: 0,
 					name: '',
 					introduction: '',
 					phone: '',
@@ -437,49 +513,52 @@
 					is_store: 0,
 					address: '',
 					detailed_address: '',
-					latitude:'',
-					longitude:'',
-					province:0,
-					city:0,
-					area:0,
-					street:0,
-					addressSelect:[],
-					valid_range:0,
-          product_verify_status:0,
-          product_status:1,
-          type:1,
-          applicable_type:1
+					latitude: '',
+					longitude: '',
+					province: 0,
+					city: 0,
+					area: 0,
+					street: 0,
+					addressSelect: [],
+					valid_range: 0,
+					product_verify_status: 0,
+					product_status: 1,
+					type: 1,
+					negative_stock:0,
+					applicable_type: 1
 				}
 				this.add = 0;
 				this.isApi = 0;
 			},
-			cancel () {
+			cancel() {
 				this.isTemplate = false;
-			    // this.$refs['formItem'].resetFields();
-			    this.clearFrom();
+				// this.$refs['formItem'].resetFields();
+				this.clearFrom();
 			},
-			addchack(e,selectedData){
-				e.forEach((i,index)=>{
-					if(index==0){
+			addchack(e, selectedData) {
+				e.forEach((i, index) => {
+					if (index == 0) {
 						this.formItem.province = i
-					}else if(index==1){
+					} else if (index == 1) {
 						this.formItem.city = i
-					}else if(index==2){
+					} else if (index == 2) {
 						this.formItem.area = i
-					}else {
+					} else {
 						this.formItem.street = i
 					}
 				})
 				this.formItem.address = (selectedData.map(o => o.label)).join("/");
 			},
-			cityInfo(data){
-				cityApi(data).then(res=>{
+			cityInfo(data) {
+				cityApi(data).then(res => {
 					this.addresData = res.data
 				})
 			},
 			loadData(item, callback) {
 				item.loading = true;
-				cityApi({pid:item.value}).then(res=>{
+				cityApi({
+					pid: item.value
+				}).then(res => {
 					item.children = res.data;
 					item.loading = false;
 					callback();
@@ -489,22 +568,22 @@
 			getCoordinates(data) {
 				this.formItem.latitude = data.location.lat || 34.34127
 				this.formItem.longitude = data.location.lng || 108.93984
-				if(this.isApi){
+				if (this.isApi) {
 					// // this.formItem.detailed_address = data.address
 					let components = data.addressComponents;
-					if(this.formItem.detailed_address.indexOf(components.street) == -1){
-						this.formItem.detailed_address = data.address+(components.town?components.town:'');
+					if (this.formItem.detailed_address.indexOf(components.street) == -1) {
+						this.formItem.detailed_address = data.address + (components.town ? components.town : '');
 					}
 				}
 			},
 			// 查找位置
 			onSearch() {
-				if(this.$refs.mapChild){
+				if (this.$refs.mapChild) {
 					this.$refs.mapChild.searchKeyword(this.formItem.detailed_address)
 				}
 			},
 			// key值
-			getKey () {
+			getKey() {
 				keyApi().then(res => {
 					this.mapKey = res.data.key
 				}).catch(res => {
@@ -512,12 +591,12 @@
 				})
 			},
 			// 详情
-			getInfo (id) {
-			    let that = this;
-          that.$refs['formItem'].resetFields();
-			    that.formItem.id = id;
-			    that.spinShow = true;
-			    storeGetInfoApi(id).then(res => {
+			getInfo(id) {
+				let that = this;
+				that.$refs['formItem'].resetFields();
+				that.formItem.id = id;
+				that.spinShow = true;
+				storeGetInfoApi(id).then(res => {
 					this.isApi = 1;
 					let addressSelect = [];
 					this.formItem = res.data.info;
@@ -526,59 +605,60 @@
 					a.push(res.data.info.day_start)
 					a.push(res.data.info.day_end)
 					this.formItem.day_time = a
-					if(res.data.info.province){
+					if (res.data.info.province) {
 						addressSelect.push(res.data.info.province)
 					}
-					if(res.data.info.city){
+					if (res.data.info.city) {
 						addressSelect.push(res.data.info.city)
 					}
-					if(res.data.info.area){
+					if (res.data.info.area) {
 						addressSelect.push(res.data.info.area)
 					}
-					if(res.data.info.street){
+					if (res.data.info.street) {
 						addressSelect.push(res.data.info.street)
 					}
-					this.$set(this.formItem,'valid_range',(this.formItem.valid_range)/1000)
+					this.$set(this.formItem, 'valid_range', (this.formItem.valid_range) / 1000)
 					this.formItem.addressSelect = addressSelect;
 					this.onSearch();
 					that.spinShow = false;
-				}).catch(function (res) {
+				}).catch(function(res) {
 					that.spinShow = false;
 					that.$Message.error(res.msg);
 				})
 			},
 			// 选择图片
-			modalPicTap () {
+			modalPicTap() {
 				this.modalPic = true;
 				this.$refs.formItem.validateField("image")
 			},
 			// 选中图片
-			getPic (pc) {
+			getPic(pc) {
 				this.formItem.image = pc.att_dir;
 				this.modalPic = false;
 				this.$refs.formItem.validateField("image")
 			},
 			// 营业时间
-			onchangeTime (e) {
+			onchangeTime(e) {
 				this.formItem.day_time = e;
 			},
 			// 提交
-			handleSubmit (name) {
+			handleSubmit(name) {
 				this.$refs[name].validate((valid) => {
 					if (valid) {
-						if(this.formItem.day_time[0] == ''){
+						if (this.formItem.day_time[0] == '') {
 							this.formItem.day_time = ['00:00:00', '23:59:59']
 						}
-						if(this.formItem.valid_range == ''||this.formItem.valid_range<0){
+						if (this.formItem.valid_range == '' || this.formItem.valid_range < 0) {
 							return this.$Message.error('请输入有效的门店范围');
 						}
-            let product_id = []
-            this.goodsList.forEach(item=>{
-              product_id.push(item.product_id)
-            })
-            this.formItem.product_id = product_id;
-            // this.formItem.valid_range = this.formItem.valid_range/1000
-						storeUpdateApi(this.formItem.id,this.formItem).then(async res => {
+						let product_id = []
+						this.goodsList.forEach(item => {
+							product_id.push(item.product_id)
+						})
+						this.formItem.product_id = product_id;
+						// console.log(this.formItem,'this.formItem')
+						// this.formItem.valid_range = this.formItem.valid_range/1000
+						storeUpdateApi(this.formItem.id, this.formItem).then(async res => {
 							this.$Message.success(res.msg);
 							this.isTemplate = false;
 							this.$parent.getList();
@@ -591,95 +671,102 @@
 						return false;
 					}
 				})
-				
+
 			}
 		}
 	}
 </script>
 
 <style scoped lang="stylus">
-.tips {
-  display: inline-bolck;
-  font-size: 12px;
-  font-weight: 400;
-  color: #999;
-}
-.box{
-  display flex
-  flex-wrap wrap
-  .box-item{
-    position relative
-    margin-right 20px
-    width 60px
-    height 60px
-    margin-bottom 10px
-    img{
-      width 100%
-      height 100%
-    }
-    .icon{
-      position absolute;
-      top:-10px;
-      right -10px;
-    }
-  }
-  .upload-box{
-    width 60px
-    height 60px
-    margin-bottom 10px
-    display flex
-    align-items center
-    justify-content center
-    background #ccc
-  }
-}
+	.tips {
+		display: inline-bolck;
+		font-size: 12px;
+		font-weight: 400;
+		color: #999;
+	}
+
+	.box {
+		display flex flex-wrap wrap .box-item {
+			position relative margin-right 20px width 60px height 60px margin-bottom 10px img {
+				width 100% height 100%
+			}
+
+			.icon {
+				position absolute;
+				top: -10px;
+				right -10px;
+			}
+		}
+
+		.upload-box {
+			width 60px height 60px margin-bottom 10px display flex align-items center justify-content center background #ccc
+		}
+	}
+
 	.map-sty {
 		width: 90%;
 		text-align: right;
 		margin: 0 0 0 10%;
 	}
-	/deep/.ivu-card-body{
-		padding 16px 0 0 0!important;
+
+	/deep/.ivu-card-body {
+		padding 16px 0 0 0 !important;
 	}
-	.footer{
+
+	.footer {
 		width 100%;
 		height 50px;
 		box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.05);
 		margin-top 50px;
 	}
-.btn /deep/.ivu-btn-primary{
+
+	.btn /deep/.ivu-btn-primary {
 		width 86px;
 	}
-	.btn{
+
+	.btn {
 		margin-top: 20px;
 	}
-	.inputW{
+
+	.inputW {
 		width 400px;
 	}
-	.ivu-mt{
+
+	.ivu-mt {
 		min-width 580px;
 	}
-	.picBox
+
+	.picBox {
 		display: inline-block;
 		cursor: pointer;
-		.upLoad
+
+		.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
+		}
+
+		.pictrue {
 			width: 60px;
 			height: 60px;
 			border: 1px dotted rgba(0, 0, 0, 0.1);
 			margin-right: 10px;
-			img
+
+			img {
 				width: 100%;
 				height: 100%;
-		.iconfont
+			}
+
+		}
+
+		.iconfont {
 			color: #CCCCCC;
 			font-size 26px;
 			text-align center
-			
-</style>
+		}
+
+	}
+</style>

+ 2 - 1
src/pages/store/storeCategory/index.vue

@@ -75,7 +75,8 @@ import { mapState } from 'vuex';
 import { storeCategory, categoryCreate, categorySetShow, categoryTree } from '@/api/store';
 import editFrom from '../../../components/from/from';
 export default {
-  name: 'product_productClassify',
+  // name: 'product_productClassify',
+  name:'store_category',
   components: {
     editFrom
   },

+ 19 - 1
src/router/modules/erp.js

@@ -140,7 +140,7 @@ export default {
 		},
 		{
 			path:'adjust_list',
-			name: `${pre}in_list`,
+			name: `${pre}adjust_list`,
 			meta: {
 				auth: ['admin-erp-adjust_list'],
 				title: '调价列表'
@@ -156,6 +156,24 @@ export default {
 			},
 			component: () => import('@/pages/erp/adjust/addAdjust')
 		},
+		{
+			path:'adjusts_list',
+			name: `${pre}adjusts_list`,
+			meta: {
+				auth: ['admin-erp-adjusts_list'],
+				title: '仓库调价列表'
+			},
+			component: () => import('@/pages/erp/adjusts/index')
+		},
+		{
+			path:'adjusts_add',
+			name: `${pre}adjusts_add`,
+			meta: {
+				auth: ['admin-erp-adjusts_add'],
+				title: '添加仓库调价单'
+			},
+			component: () => import('@/pages/erp/adjusts/addAdjust')
+		},
 		{
 			path:'add_godown/:id?',
 			name: `${pre}add_godown`,

+ 1 - 0
src/router/modules/store.js

@@ -33,6 +33,7 @@ export default {
 			path: 'category/index',
 			name: `${pre}category`,
 			meta: {
+				keepAlive: true,
 				auth: ['admin-store-store_category'],
 				title: '门店分类'
 			},