shish 4 anni fa
parent
commit
5ac06bbc2d

+ 1 - 10
ghsApp/src/admin/changePrice/components/Item.vue

@@ -27,7 +27,6 @@
 	<view class="level-price">
 		<text>散客 ¥{{skPrice}}</text>
 		<text>花店 ¥{{pdPrice}}</text>
-		<text>同行 ¥{{ydPrice}}</text>
 	</view>
 </view>
 </template>
@@ -53,9 +52,7 @@ export default {
 		return {
 			modifyPrice:'',
 			skPrice:0,
-			pdPrice:0,
-			ydPrice:0,
-			jdPrice:0
+			pdPrice:0
 		};
 	},
 	watch: {
@@ -68,8 +65,6 @@ export default {
 	mounted(){
 		this.skPrice = parseFloat(this.info.skPrice)
 		this.pdPrice = parseFloat(this.info.price)
-		this.ydPrice = parseFloat(this.info.hjPrice)
-		this.jdPrice = parseFloat(this.info.zsPrice)
 	},
 	methods: {
 		savePrice() {
@@ -81,11 +76,7 @@ export default {
 			}
 			this.pdPrice = parseFloat(pdPrice)
 			let skSub = (this.info.addPrice - this.info.skAddPrice).toFixed(2)
-			let ydSub = (this.info.addPrice - this.info.hjAddPrice).toFixed(2)
-			let jdSub = (this.info.addPrice - this.info.zsAddPrice).toFixed(2)
 			this.skPrice = parseFloat((pdPrice - skSub).toFixed(2))
-			this.ydPrice = parseFloat((pdPrice - ydSub).toFixed(2))
-			this.jdPrice = parseFloat((pdPrice - jdSub).toFixed(2))
 		}
 	}
 };

+ 3 - 4
ghsApp/src/admin/changePrice/list.vue

@@ -22,7 +22,7 @@
 					@scroll="scroll_detail"
 					lower-threshold="100"
 					@scrolltolower="scroll_bottom">
-				<!--内容部分 start -->
+
 				<block v-if="!$util.isEmpty(globalClassItemList)">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
 						<view class="item_list_title"> {{ classItem.className }}</view>
@@ -49,7 +49,6 @@
 						<app-wrapper-empty  title="暂无数据" :is-empty="$util.isEmpty(globalClassItemList)"/>
 					</view>
 				</block>
-				<!--内容部分 end -->
 
 			</scroll-view>
 		</view>
@@ -78,7 +77,7 @@ export default {
 	mixins: [productMins],
 	data() {
 		return {
-			autoLoad: false, //不自动请求数据  自定义请求
+			autoLoad: false,
 			selectJobType: "stock",
 			tabIndex: 0,
 			priceArr:[]
@@ -93,7 +92,7 @@ export default {
 	methods: {
 		downloadTable(){
 			let level = 0
-			let levelList = ['散客价', '花店价', '同行价']
+			let levelList = ['散客价', '花店价']
 			uni.showActionSheet({
 				itemList: levelList,
 				success: function (respond) {

+ 0 - 24
ghsApp/src/admin/item/add.vue

@@ -135,19 +135,6 @@
             type="digit"
           />
         </tui-list-cell>
-        <tui-list-cell class="line-cell" :hover="false">
-          <div class="tui-title">同行加价</div>
-          <input
-            v-model="form.hjAddPrice"
-            placeholder-class="phcolor"
-            class="tui-input"
-            name="hjAddPrice"
-            @focus="form.hjAddPrice=''"
-            placeholder="请填写"
-            maxlength="50"
-            type="digit"
-          />
-        </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
           <div class="tui-title">单位比</div>
@@ -262,7 +249,6 @@ export default {
         price:'',
         skAddPrice:'',
         addPrice:'',
-        hjAddPrice:'',
         discountPrice:'',
         weight:'',
         cover:[],
@@ -366,7 +352,6 @@ export default {
         this.form.price = ''
         this.form.skAddPrice =''
         this.form.addPrice =''
-        this.form.hjAddPrice =''
         this.form.discountPrice = ''
       })
     },
@@ -478,10 +463,6 @@ export default {
 					uni.showToast({title:"请填写花店加价",icon:"none"})
 					return;
 				}
-				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.hjAddPrice) == false){
-					uni.showToast({title:"请填写同行加价",icon:"none"})
-					return;
-				}
       }
       let form = JSON.parse(JSON.stringify(this.form))
       uni.showLoading({mask:true})
@@ -551,11 +532,6 @@ export default {
           rule: ["required"],
           msg: ["请填写花店加价"]
         },
-        {
-          name: "hjAddPrice",
-          rule: ["required"],
-          msg: ["请填写同行加价"]
-        },
         {
           name: "discountPrice",
           rule: ["required"],

+ 0 - 15
ghsApp/src/admin/item/copy.vue

@@ -77,10 +77,6 @@
           <view class="tui-title">花店加价</view>
           <input v-model="form.addPrice" placeholder-class="phcolor" class="tui-input" name="addPrice" @focus="form.addPrice=''" placeholder="请填写" maxlength="50" type="digit" />
         </tui-list-cell>
-        <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">同行加价</view>
-          <input v-model="form.hjAddPrice" placeholder-class="phcolor" class="tui-input" name="hjAddPrice" @focus="form.hjAddPrice=''" placeholder="请填写" maxlength="50" type="digit" />
-        </tui-list-cell>
 
         <tui-list-cell class="line-cell" :hover="false">
           <view class="tui-title">单位比</view>
@@ -172,7 +168,6 @@ export default {
         price:'',
         skAddPrice:'',
         addPrice:'',
-        hjAddPrice:'',
         discountPrice:'',
         weight:'',
         cover:[],
@@ -283,7 +278,6 @@ export default {
         this.form.price = ''
         this.form.skAddPrice =''
         this.form.addPrice =''
-        this.form.hjAddPrice =''
         this.form.discountPrice = ''
       })
     },
@@ -396,10 +390,6 @@ export default {
 					uni.showToast({title:"请填写普店加价",icon:"none"})
 					return;
 				}
-				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.hjAddPrice) == false){
-					uni.showToast({title:"请填写银店加价",icon:"none"})
-					return;
-				}
       }
       let form = JSON.parse(JSON.stringify(this.form))
       uni.showLoading({mask:true})
@@ -474,11 +464,6 @@ export default {
           rule: ["required"],
           msg: ["请填写普店加价"]
         },
-        {
-          name: "hjAddPrice",
-          rule: ["required"],
-          msg: ["请填写银店加价"]
-        },
         {
           name: "discountPrice",
           rule: ["required"],

+ 0 - 24
ghsApp/src/admin/item/detail.vue

@@ -67,14 +67,6 @@
             <text style="width:170upx;display:inline-block;">售价 ¥{{sellPrice}}</text>
           </text>
         </tui-list-cell>
-        <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">同行加价</view>
-          <input v-model="form.hjAddPrice" placeholder-class="phcolor" class="tui-input" style="width:130upx;" name="hjAddPrice" @focus="form.hjAddPrice=''" placeholder="请填写" maxlength="50" type="digit" />
-          <text style="color:#CCCCCC;">
-            <text style="width:170upx;display:inline-block;">成本 ¥{{parseFloat(cost)}}</text>
-            <text style="width:170upx;display:inline-block;">售价 ¥{{hjSellPrice}}</text>
-          </text>
-        </tui-list-cell>
         <tui-list-cell class="line-cell" :arrow="false">
           <view class="tui-title">大单位</view>
           <input v-model="form.bigUnitId" name="bigUnitId" type="text" hidden />
@@ -179,7 +171,6 @@ export default {
         price:'',
         skAddPrice:'',
         addPrice:'',
-        hjAddPrice:'',
         discountPrice:'',
         weight:'',
         cover:[],
@@ -210,11 +201,6 @@ export default {
         }
         return price
     },
-    hjSellPrice(){
-      let price = Number(this.cost) + Number(this.form.hjAddPrice)
-      price = parseFloat(price.toFixed(2))
-      return price
-    },
     sellPrice(){
       let price = Number(this.cost) + Number(this.form.addPrice)
       price = parseFloat(price.toFixed(2))
@@ -323,7 +309,6 @@ export default {
         this.form.price = ''
         this.form.skAddPrice =''
         this.form.addPrice =''
-        this.form.hjAddPrice =''
         this.form.discountPrice = ''
 
         this.cost = res.data.cost || 0
@@ -440,10 +425,6 @@ export default {
 					uni.showToast({title:"请填写普店加价",icon:"none"})
 					return;
 				}
-				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.form.hjAddPrice) == false){
-					uni.showToast({title:"请填写同行加价",icon:"none"})
-					return;
-				}
       }
       let form = JSON.parse(JSON.stringify(this.form))
       uni.showLoading({mask:true})
@@ -518,11 +499,6 @@ export default {
           rule: ["required"],
           msg: ["请填写普店加价"]
         },
-        {
-          name: "hjAddPrice",
-          rule: ["required"],
-          msg: ["请填写同行加价"]
-        },
         {
           name: "discountPrice",
           rule: ["required"],

+ 1 - 1
ghsApp/src/admin/item/list.vue

@@ -131,7 +131,7 @@ export default {
 			}
 
 			let level = 0
-			let levelList = ['散客价', '花店价', '同行价']
+			let levelList = ['散客价', '花店价']
 			uni.showActionSheet({
 				itemList: levelList,
 				success: function (respond) {

+ 3 - 15
ghsApp/src/admin/itemClass/addPrice.vue

@@ -5,8 +5,7 @@
 				<t-tr header>
                     <t-th>名称</t-th>
 					<t-th>散客</t-th>
-					<t-th>花店</t-th>
-					<t-th>同行</t-th>
+					<t-th>花店</t-th>>
 				</t-tr>
 				<view v-for="(item, index) in list.data" :key="index">
 					<t-tr>
@@ -16,9 +15,6 @@
                         </t-td>
 						<t-td align="center" color="info">
                             <view><input v-model="item.addPrice" @focus="item.addPrice=''" name="price" type="digit" style="border:1upx solid #cccccc;" /></view>
-                            </t-td>
-						<t-td align="center" color="info">
-                            <view><input v-model="item.hjAddPrice" @focus="item.hjAddPrice=''" name="hjAddPrice" type="digit" style="border:1upx solid #cccccc;" /></view>
                             </t-td>
 					</t-tr>
 				</view>
@@ -76,7 +72,7 @@ export default {
 
             this.batchStyle = styleInfo
 			let self = this
-			let levelList = ['请选择列:','散客', '花店', '同行']
+			let levelList = ['请选择列:','散客', '花店']
 			uni.showActionSheet({
 				itemList: levelList,
 				success: function (respond) {
@@ -102,8 +98,6 @@ export default {
                             array[index].skAddPrice =  parseFloat((Number(array[index].skAddPrice) + currentPrice).toFixed(2))
                         }else if(that.levelIndex == 2){
                             array[index].addPrice =  parseFloat((Number(array[index].addPrice) + currentPrice).toFixed(2))
-                        }else if(that.levelIndex == 3){
-                            array[index].hjAddPrice =  parseFloat((Number(array[index].hjAddPrice) + currentPrice).toFixed(2))
                         }else{
 
                         }
@@ -112,8 +106,6 @@ export default {
                             array[index].skAddPrice =  parseFloat((currentPrice).toFixed(2))
                         }else if(that.levelIndex == 2){
                             array[index].addPrice =  parseFloat((currentPrice).toFixed(2))
-                        }else if(that.levelIndex == 3){
-                            array[index].hjAddPrice =  parseFloat((currentPrice).toFixed(2))
                         }else{
 
                         }
@@ -137,12 +129,8 @@ export default {
                    that.$msg('【'+value.name+'】的花店加价填写错误')
                    return false
                }
-               if(that.$util.isMoney(value.hjAddPrice) == false){
-                   that.$msg('【'+value.name+'】的同行加价填写错误')
-                   return false
-               }
 
-                addData.push({id:value.id,skAddPrice:value.skAddPrice,addPrice:value.addPrice,hjAddPrice:value.hjAddPrice})
+                addData.push({id:value.id,skAddPrice:value.skAddPrice,addPrice:value.addPrice})
            })
            let addString = JSON.stringify(addData)
            batchChangeAddPrice({addData:addString}).then(res=>{