shish před 2 roky
rodič
revize
1caa458a38
1 změnil soubory, kde provedl 17 přidání a 1 odebrání
  1. 17 1
      ghsApp/src/admin/shop/add.vue

+ 17 - 1
ghsApp/src/admin/shop/add.vue

@@ -2,6 +2,9 @@
 	<view class="app-content">
 	<view class="app-content">
 		<form @submit="formSubmit">
 		<form @submit="formSubmit">
 			<view class="module-com input-line-wrap">
 			<view class="module-com input-line-wrap">
+				<view v-if="id>0" style="color:red;font-weight:bold;text-align:center;font-size:26upx;margin-bottom:12upx;">
+					不清楚的功能,请勿随意修改,出问题后果自负
+				</view>
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title">名称</view>
 					<view class="tui-title">名称</view>
 					<input v-model="form.shopName" placeholder-class="phcolor" class="tui-input" name="shopName" placeholder="请输入名称,如同安店" maxlength="50" type="text" />
 					<input v-model="form.shopName" placeholder-class="phcolor" class="tui-input" name="shopName" placeholder="请输入名称,如同安店" maxlength="50" type="text" />
@@ -155,6 +158,13 @@
 					</view>
 					</view>
 				</tui-list-cell>
 				</tui-list-cell>
 
 
+				<tui-list-cell class="line-cell" :hover="false">
+					<view class="tui-title">采购使用</view>
+					<view>
+						<switch style="transform:scale(0.7,0.7)" :checked="form.cgUnitType == 0 ? false : true" @change="cgUnitTypeChange" /> {{form.cgUnitType==1 ? '小单位' : '大单位'}}
+					</view>
+				</tui-list-cell>
+
 				<tui-list-cell class="line-cell" :hover="false">
 				<tui-list-cell class="line-cell" :hover="false">
 					<view class="tui-title " style="color:#3385FF;">整单满扎数</view>
 					<view class="tui-title " style="color:#3385FF;">整单满扎数</view>
 					<input v-model="form.meetNum" @focus="form.meetNum=''" placeholder-class="phcolor" class="tui-input" name="meetNum" placeholder="多少扎" type="digit" />
 					<input v-model="form.meetNum" @focus="form.meetNum=''" placeholder-class="phcolor" class="tui-input" name="meetNum" placeholder="多少扎" type="digit" />
@@ -242,6 +252,7 @@ export default {
 				showSold:0,
 				showSold:0,
 				afterSale:1,
 				afterSale:1,
 				pfLevel:0,
 				pfLevel:0,
+				cgUnitType:0,
 				isHd:1,
 				isHd:1,
 				itemToClass:0
 				itemToClass:0
 			},
 			},
@@ -251,10 +262,12 @@ export default {
 				long: 0
 				long: 0
 			},
 			},
 			regionData: [],
 			regionData: [],
-			cityPickerValueDefault: [0, 0]
+			cityPickerValueDefault: [0, 0],
+			id:0
 		}
 		}
 	},
 	},
 	onLoad() {
 	onLoad() {
+		this.id = this.option.id ? this.option.id : 0
 	},
 	},
 	onShow() {
 	onShow() {
 		if (this.option.id) {
 		if (this.option.id) {
@@ -317,6 +330,9 @@ export default {
 		showStockChange(e){
 		showStockChange(e){
 			this.form.showStock = e.target.value ? 1 : 0
 			this.form.showStock = e.target.value ? 1 : 0
 		},
 		},
+		cgUnitTypeChange(e){
+			this.form.cgUnitType = e.target.value ? 1 : 0
+		},
 		pfLevelChange(e){
 		pfLevelChange(e){
 			this.form.pfLevel = e.target.value ? 1 : 0
 			this.form.pfLevel = e.target.value ? 1 : 0
 		},
 		},