shish 4 лет назад
Родитель
Сommit
6749c456d3

+ 7 - 3
ghsApp/src/admin/cg/set.vue

@@ -11,7 +11,7 @@
 
 
           <tui-list-cell class="line-cell" :arrow="false" v-if="cgModel == 1">
           <tui-list-cell class="line-cell" :arrow="false" v-if="cgModel == 1">
             <div class="tui-title">运费成本:</div>
             <div class="tui-title">运费成本:</div>
-            <input v-model="form.cgPerCost" placeholder-class="phcolor" class="tui-input" name="cgPerCost" placeholder="每公斤的运费成本" />
+            <input v-model="form.cgPerCost" placeholder-class="phcolor" class="tui-input" @focus="form.cgPerCost=''" name="cgPerCost" placeholder="每公斤的运费成本" />
           </tui-list-cell>
           </tui-list-cell>
 
 
         </div>
         </div>
@@ -58,7 +58,7 @@ export default {
       currentShop().then(res=>{
       currentShop().then(res=>{
         if(res.code == 1){
         if(res.code == 1){
           this.hasLoad = true
           this.hasLoad = true
-          this.form.cost = res.data.cgPerCost
+          this.form.cgPerCost = res.data.cgPerCost
           this.cgModel = res.data.cgModel
           this.cgModel = res.data.cgModel
           this.$forceUpdate()
           this.$forceUpdate()
         }
         }
@@ -78,7 +78,11 @@ export default {
       updateCgModel({cgPerCost:that.form.cgPerCost,cgModel:that.cgModel}).then(res=>{
       updateCgModel({cgPerCost:that.form.cgPerCost,cgModel:that.cgModel}).then(res=>{
           if(res.code == 1){
           if(res.code == 1){
             that.$msg(res.msg)
             that.$msg(res.msg)
-            uni.navigateBack();
+            setTimeout(function(){
+              //这个切换得更彻底
+              that.$store.commit("setLoginInfo", {})
+              that.$util.pageTo({url: "/admin/cg/set",type: 3})
+            },1500);
           }
           }
       })
       })
     }
     }

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

@@ -3,7 +3,7 @@
     <app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="50%"/>
     <app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="50%"/>
     <view class="input-wrap">
     <view class="input-wrap">
 			<view class="search-bar">
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="输入字母搜索" @input="searchFn"/>
+				<app-search-module v-model="py" placeholder="输字母找,如小菊输入xj" @input="searchFn"/>
 			</view>
 			</view>
 			<view style="padding:0 0rpx 0 20rpx;" >
 			<view style="padding:0 0rpx 0 20rpx;" >
 				<button class="admin-button-com middle blue" style="margin-right:10rpx;" @click="downloadTable()">价格表</button>
 				<button class="admin-button-com middle blue" style="margin-right:10rpx;" @click="downloadTable()">价格表</button>

+ 3 - 4
ghsApp/src/pagesPurchase/components/pageSuccess.vue

@@ -67,6 +67,7 @@
 		</checkbox-group>
 		</checkbox-group>
 	</view>
 	</view>
 	<button class="admin-button-com big blue" style="width:80%;margin-top:50rpx;" @click="commitChange">确认修改</button>
 	<button class="admin-button-com big blue" style="width:80%;margin-top:50rpx;" @click="commitChange">确认修改</button>
+	<button class="flex-center goHome" @click="pageTo({url:'/pagesPurchase/info',query:{orderSn:option.orderSn},type:3})" >订单详情</button>
 	<navigator open-type="switchTab" class="flex-center goHome" @click="goBackHome" >返回首页</navigator>
 	<navigator open-type="switchTab" class="flex-center goHome" @click="goBackHome" >返回首页</navigator>
   </appResult>
   </appResult>
 </template>
 </template>
@@ -89,7 +90,7 @@ export default {
 		};
 		};
 	},
 	},
 	onShow(){
 	onShow(){
-  	this.flowersItemInfo  = uni.getStorageSync('flowersItemInfo');
+  		this.flowersItemInfo  = uni.getStorageSync('flowersItemInfo');
 		this.getList();
 		this.getList();
 	},
 	},
 	onLoad(e){
 	onLoad(e){
@@ -158,9 +159,7 @@ export default {
 			batchUpdatePrice({data:JSON.stringify(this.productList),type:'price',costChangeIds:JSON.stringify(this.costChangeIds)}).then(res => {
 			batchUpdatePrice({data:JSON.stringify(this.productList),type:'price',costChangeIds:JSON.stringify(this.costChangeIds)}).then(res => {
 				uni.showToast({title:res.msg})
 				uni.showToast({title:res.msg})
 				if(res.code == 1){
 				if(res.code == 1){
-					setTimeout(function(){
-						that.goBackHome()
-					},1000)
+					that.$msg('修改成功')
 				}
 				}
 			})
 			})
 		},
 		},

+ 15 - 13
ghsApp/src/pagesPurchase/details.vue

@@ -1,13 +1,12 @@
 <template>
 <template>
 	<view class="affirm-page">
 	<view class="affirm-page">
 		<view class="affirm-view overscroll">
 		<view class="affirm-view overscroll">
-			<!-- 门店信息 -->
 			<form>
 			<form>
 				<view class="module-com">
 				<view class="module-com">
 					<view class="commodity-view">
 					<view class="commodity-view">
 						<view class="commodity-list">
 						<view class="commodity-list">
 							<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
 							<view class="commodity-item" v-for="(item, index) in selectList" :key="index">
-								<image class="item-icon" :src="item.itemCover || item.cover" alt="商品图" />
+								<image class="item-icon" :src="item.itemCover || item.cover" alt="" />
 								<view class="item-info">
 								<view class="item-info">
 									<view class="info-line">
 									<view class="info-line">
 										<text class="item-name">{{ item.itemName }}</text>
 										<text class="item-name">{{ item.itemName }}</text>
@@ -45,19 +44,20 @@
 						<AppDatePicker v-if="canIEdit" :dateVal.sync="form.entryTime" :placeholder="'默认实时'"/>
 						<AppDatePicker v-if="canIEdit" :dateVal.sync="form.entryTime" :placeholder="'默认实时'"/>
 						<view v-else>{{ form.entryTime || "默认实时" }}</view>
 						<view v-else>{{ form.entryTime || "默认实时" }}</view>
 					</tui-list-cell>
 					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
+
+					<tui-list-cell v-if="myShopInfo.cgModel == 0" class="line-cell" :hover="false">
 						<view class="tui-title ">打包费</view>
 						<view class="tui-title ">打包费</view>
 						<input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.packingCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写"/>
 						<input type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.packingCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写"/>
 					</tui-list-cell>
 					</tui-list-cell>
 
 
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+					<tui-list-cell v-if="myShopInfo.cgModel == 0" class="line-cell" :hover="false" :arrow="false">
 						<view class="tui-title">运费支付</view>
 						<view class="tui-title">运费支付</view>
 						<button @click="changeYfPayWay(1)" class="admin-button-com mini-btn" :class="form.yfPayWay == 1 ? 'blue' : 'default'">寄付</button>
 						<button @click="changeYfPayWay(1)" class="admin-button-com mini-btn" :class="form.yfPayWay == 1 ? 'blue' : 'default'">寄付</button>
 						<button @click="changeYfPayWay(2)" class="admin-button-com mini-btn" :class="form.yfPayWay == 2 ? 'blue' : 'default'" style="margin-left:20rpx;">到付</button>
 						<button @click="changeYfPayWay(2)" class="admin-button-com mini-btn" :class="form.yfPayWay == 2 ? 'blue' : 'default'" style="margin-left:20rpx;">到付</button>
 					</tui-list-cell>
 					</tui-list-cell>
 				</view>
 				</view>
 
 
-				<view class="module-com input-line-wrap">
+				<view v-if="myShopInfo.cgModel == 0" class="module-com input-line-wrap">
 
 
 					<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>
@@ -70,7 +70,7 @@
 
 
 				</view>
 				</view>
 
 
-				<view class="module-com input-line-wrap">
+				<view v-if="myShopInfo.cgModel == 0" class="module-com input-line-wrap">
 					<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  type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.pickCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写"/>
 						<input  type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.pickCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写"/>
@@ -104,7 +104,8 @@
 					</tui-list-cell>
 					</tui-list-cell>
 					<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>
-						<view>{{perKgFreight}}</view>
+						<view v-if="myShopInfo.cgModel == 0">{{perKgFreight}}</view>
+						<input v-else style="border: 1px solid #eee;color: #3385FF;width: calc(100%);height:70rpx;"  type="digit" :disabled="!canIEdit"  @focus="form.avgKgWeight=''" v-model="form.avgKgWeight" placeholder-class="phcolor" class="tui-input" name="avgKgWeight" placeholder="请输入每公斤的运费成本"/>
 					</tui-list-cell>
 					</tui-list-cell>
 					<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>
@@ -139,9 +140,7 @@ import productMins from "@/mixins/product";
 import {getPurchaseDetailApi,createPurchaseOrderApi} from "@/api/purchase/index";
 import {getPurchaseDetailApi,createPurchaseOrderApi} from "@/api/purchase/index";
 import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
 import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
 import AppDatePicker from "@/components/app-date-picker";
 import AppDatePicker from "@/components/app-date-picker";
-
 export default {
 export default {
-	// 采购详情
 	components: {
 	components: {
 		TuiListCell,
 		TuiListCell,
 		AppAvatarModule,
 		AppAvatarModule,
@@ -165,6 +164,7 @@ export default {
 				ghsId: null,
 				ghsId: null,
 				yfPayWay:1,
 				yfPayWay:1,
 				remark:"",
 				remark:"",
+				avgKgWeight:''
 			},
 			},
 			showCustomer: false,
 			showCustomer: false,
 			detailsInfo: {},
 			detailsInfo: {},
@@ -176,6 +176,9 @@ export default {
 	},
 	},
 	onLoad(option) {
 	onLoad(option) {
 		this.form.ghsId = option.ghsId
 		this.form.ghsId = option.ghsId
+		if(this.myShopInfo.cgModel == 1){
+			this.form.avgKgWeight = this.myShopInfo.cgPerCost
+		}
 		this.initData();
 		this.initData();
 	},
 	},
 	onShow(){
 	onShow(){
@@ -189,6 +192,7 @@ export default {
 	},
 	},
 	computed: {
 	computed: {
 		...mapGetters(["getMerchantInfo", "getLoginInfo"]),
 		...mapGetters(["getMerchantInfo", "getLoginInfo"]),
+		...mapGetters({ myShopInfo: "getMyShopInfo" }),
 		selectAllPrice(){
 		selectAllPrice(){
 			let price = 0;
 			let price = 0;
 			if (this.selectList) {
 			if (this.selectList) {
@@ -328,12 +332,12 @@ export default {
 				if (!this.getMerchantInfo) {
 				if (!this.getMerchantInfo) {
 					await this.initMerchantInfo();
 					await this.initMerchantInfo();
 				}
 				}
-				await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice});
+				const res = await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice,cgModel:this.myShopInfo.cgModel});
 				uni.setStorageSync('flowersItemInfo', itemInfo);
 				uni.setStorageSync('flowersItemInfo', itemInfo);
 				
 				
 				this.removeMemory()
 				this.removeMemory()
 
 
-				uni.navigateTo({url:'/pagesPurchase/components/pageSuccess?title=新增成功'})
+				uni.navigateTo({url:'/pagesPurchase/components/pageSuccess?orderSn='+res.data.orderSn})
 			} catch (error) {}
 			} catch (error) {}
 		},
 		},
 		formSubmitFun(){
 		formSubmitFun(){
@@ -344,8 +348,6 @@ export default {
 				success: function (res) {
 				success: function (res) {
 					if (res.confirm) {
 					if (res.confirm) {
 						self.confirmFn();
 						self.confirmFn();
-					} else if (res.cancel) {
-						console.log('用户点击取消');
 					}
 					}
 				}
 				}
 			});
 			});

+ 1 - 1
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -24,7 +24,7 @@
     </view>
     </view>
 		<view class="input-wrap" >
 		<view class="input-wrap" >
 			<view class="search-bar">
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="输入字母搜索,如艾莎 as" @input="searchFn" />
+				<app-search-module v-model="py" placeholder="输字母找花材,如小菊输xj" @input="searchFn" />
 			</view>
 			</view>
 			<view style="padding:0 0rpx 0 20rpx;" >
 			<view style="padding:0 0rpx 0 20rpx;" >
 				<button class="admin-button-com middle blue" @click="removeMemory(option.id)">清除采购</button>
 				<button class="admin-button-com middle blue" @click="removeMemory(option.id)">清除采购</button>