Просмотр исходного кода

自动获取地址 与 结帐订单

shish 5 лет назад
Родитель
Сommit
5ef0f4ce63

+ 0 - 404
ghsApp/src/admin/clear/add.vue

@@ -1,404 +0,0 @@
-<template>
-	<view class="billing_box_bg">
-		<view class="input-wrap">
-			<app-search-module v-model="py" placeholder="请输入关键词,支持拼音首字母搜索" @input="searchFn"/>
-		</view>
-
-		<view class="scroll-middle_bx">
-			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
-				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
-					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
-					</text>
-				</div>
-			</scroll-view>
-<!--			<scroll-view scroll-y class="right-box" :scroll-into-view="scrollClassId">-->
-			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
-																@scroll="scroll_detail"
-																lower-threshold="100"
-																@scrolltolower="scroll_bottom">
-				<!--内容部分 start -->
-				<block v-if="!$util.isEmpty(filterProductInfo)">
-					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
-						<view class="item_list_title">
-							{{ classItem.className }}
-						</view>
-						<template v-for="(productItem, productIndex) in classItem.child">
-							<CommodityPurchase
-								:type="pageType"
-								:key="productIndex"
-								:info="productItem"
-								:bigCount=" getSelectItemById(productItem.id, classItem.classId).bigCount"
-								:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
-								:itemPrice="getSelectItemById(productItem.id, classItem.classId).itemPrice"
-								:realityWeight="getSelectItemById(productItem.id, classItem.classId).realityWeight"
-								@customNum="customNum"
-								@add="addEvent"
-								@addOneEvent="addCustomNumEvent"
-								@del="delAllEvent"
-							></CommodityPurchase>
-						</template>
-					</view>
-				</block>
-				<block v-else>
-					<app-wrapper-empty
-						title="暂无数据"
-						:is-empty="$util.isEmpty(filterProductInfo)"
-					/>
-				</block>
-				<!--内容部分 end -->
-			</scroll-view>
-		</view>
-		<!-- :maskClosable="false" -->
-		<modal-module
-			:show="isModel"
-			@cancel="modalCancel"
-			@click="affirm"
-			:title="customData.itemName"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
-			<template slot="customContent">
-				<view class="select-view">
-					<view class="select-cmd_bx">
-						<view class="num_bx">
-							<view class="kc">总价</view>
-							<input v-model="customData.itemPrice" @focus="customData.itemPrice = null" type="number" placeholder="采购金额" />
-							<!--<allSelectInput :isActive="isAloneAllActive" :isFocus="isAloneAllFocus" :value="customData.itemPrice" :placeholder="'采购金额'"-->
-																							<!--:width="416" :height="80" :fontSize="40"-->
-																							<!--@deleteInputVal="deleteAloneInputVal" @initAllInput="initAloneAllInput" @moveAllInput="moveAloneAllInput">-->
-							<!--</allSelectInput> -->
-							<text style="margin-left: 20rpx">元</text>
-						</view>
-					</view>
-					<view class="select-cmd_bx">
-						<view class="num_bx">
-							<view class="kc">
-								数量
-							</view>
-							<!--<allMoreSelectInput-->
-								<!--:isActive="isActive" :isFocus="isFocus" :value="customData.bigCount"-->
-								<!--:isActiveOne="isActiveOne" :isFocusOne="isFocusOne" :valueOne="customData.smallCount"-->
-								<!--@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"-->
-								<!--@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">-->
-							<!--</allMoreSelectInput>-->
-							<input v-model="customData.bigCount" @input="countWeight" @focus="customData.bigCount = null" type="number"  />扎
-							<input v-model="customData.smallCount" @input="countWeight" @focus="customData.smallCount = null" type="number" style="margin-left:24upx"/>支
-						</view>
-					</view>
-					<view class="select-cmd_bx">
-						<view class="num_bx">
-							<view class="kc">重量</view>
-							<input v-model="customData.realityWeight" @focus="customData.realityWeight = null" type="number" placeholder="公斤" />
-							<!--<allSelectInput :isActive="isWeightActive" :isFocus="isWeightFocus" :value="customData.realityWeight" :placeholder="'公斤'"-->
-																							<!--:width="416" :height="80" :fontSize="40"-->
-																							<!--@deleteInputVal="deleteWeightInputVal" @initAllInput="initWeightAllInput" @moveAllInput="moveWeightAllInput">-->
-							<!--</allSelectInput>-->
-						</view>
-					</view>
-				</view>
-			</template>
-		</modal-module>
-		<!-- <modal-module
-			:show="showSubmitModel"
-			@cancel="cancelEvent"
-			@click="submitEvent"
-			title="有花材库存不足,确认下一步?"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
-		</modal-module> -->
-		<FooterCart :price="allPriceFun" :count="allCount" @confirm="confirmSelectEvent"></FooterCart>
-	</view>
-</template>
-
-<script>
-import AppSearchModule from "@/components/module/app-search";
-import AppTabs from "@/components/plugin/tabs";
-import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import CommodityPurchase from "./components/CommodityPurchase";
-import ModalModule from "@/components/plugin/modal";
-import FooterCart from "@/components/module/app-footer-cart";
-import productMins from "@/mixins/product";
-
-// import allMoreSelectInput from "@/components/module/allMoreSelectInput";
-// import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
-
-// import allSelectInput from "@/components/module/allSelectInput";
-// import allSelectInputMins from "@/mixins/allSelectInput";
-export default {
-	name: "purchase", // 采购
-	components: {
-		AppTabs,
-		AppSearchModule,
-		AppWrapperEmpty,
-		CommodityPurchase,
-		ModalModule,
-		FooterCart
-	},
-	mixins: [productMins],
-	data() {
-		return {
-			pageType: "purchase",
-
-			isAloneAllActive: false,
-			isAloneAllFocus: false,
-
-			isWeightActive: false,
-			isWeightFocus: false,
-
-			isModel: false,
-			showSubmitModel: false,
-			customData: {
-				bigCount: null,
-				smallCount: null,
-				itemPrice: null,
-				weight:null,
-				realityWeight:null,
-			}
-		};
-	},
-	onLoad() {},
-	methods: {
-		// 计算重量
-		countWeight(){
-			let ratio = this.customData.ratio;
-			let smallCount = this.customData.smallCount;
-			let bigCount = this.customData.bigCount;
-			let weight = this.customData.weight;
-			this.customData.realityWeight = (smallCount * weight / ratio + bigCount * weight).toFixed(2)
-		},
-		// 离开全选input alone
-		moveAloneAllInput(e){
-			this.isAloneAllActive=false;
-			this.isAloneAllFocus=false;
-			if(e==''){return}
-			this.customData.itemPrice = e;
-		},
-		// 公斤离开全选input alone
-		moveWeightAllInput(e){
-			this.isWeightActive=false;
-			this.isWeightFocus=false;
-			if(e==''){return}
-			this.customData.realityWeight = e;
-		},
-		//input点击删除按键
-		deleteAloneInputVal(){
-			this.isAloneAllActive=false;
-			this.customData.itemPrice = '';
-		},
-		//input重量点击删除按键
-		deleteWeightInputVal(){
-			this.isWeightActive=false;
-			this.customData.realityWeight = '';
-		},
-		//自定义数量
-		customNum(info) {
-			this.isModel = true;
-			console.log(info,'customData')
-			this.customData = info;
-			// this.$nextTick(()=>{
-			// 	// this.initAllInput();
-			// 	this.initAloneAllInput();
-			// })
-		},
-		modalCancel() {
-			this.isModel = false;
-			this.customData = {};
-		}, // 取消 确认
-		affirm(val) {
-
-			this.$nextTick(()=>{
-				console.log('customData',this.customData);
-				console.log('val.index',val.index);
-				if (val.index === 3) {
-					this.modalCancel();
-					this.delAllEvent(this.customData);
-					return
-				}
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
-
-				if (val.index === 0) {
-					this.modalCancel();
-				} else {
-					if(this.customData.itemPrice<=0){
-						uni.showToast({title:"请输入总价格",icon:"none"})
-						return;
-					}
-					if(this.customData.bigCount<=0&&this.customData.smallCount<=0){
-						uni.showToast({title:"请输入花材数量",icon:"none"})
-						return;
-					}
-					if(this.customData.realityWeight<=0){
-						uni.showToast({title:"请输入花材重量",icon:"none"})
-						return;
-					}
-					// delAllEvent
-					//超过库存时 设置为库存最大值
-					this.updateItemEvent(this.customData);
-					this.modalCancel();
-				}
-			})
-
-		},
-		cancelEvent() {},
-		submitEvent(val) {
-			if (val.index === 0) {
-				this.cancelEvent();
-			} else {
-				console.log(444, this.selectList);
-				uni.navigateTo({
-					url: "/pagesPurchase/details"
-				});
-				this.cancelEvent();
-			}
-		},
-		confirmSelectEvent() {
-			if (this.selectList.length > 0) {
-				uni.navigateTo({
-					url: "/pagesPurchase/details"
-				});
-				this.cancelEvent();
-			}
-		},
-		changePriceEvent(e) {
-			const {
-				detail: { value }
-			} = e;
-			const maxPrice = Number(value);
-			this.customData.itemPrice = maxPrice;
-
-			if (maxPrice > 0) {
-				const { smallPrice, ratio } = this.customData;
-				const ratioNum = Number(ratio);
-
-				const num = Math.floor(maxPrice / Number(smallPrice));
-
-				this.customData.bigCount = Math.floor(num / ratioNum);
-				this.customData.smallCount = Math.floor(num % ratioNum);
-			}
-		},
-
-		scrollTop() {}
-	}
-};
-</script>
-<style>
-	.change-input{
-		width: 170rpx !important;
-	}
-</style>
-<style lang="scss" scoped>
-
-.billing_box_bg {
-	height: 100%;
-	display: flex;
-	flex-direction: column;
-	.input-wrap {
-		padding: 22px 20px 22px 30px;
-	}
-	.scroll-middle_bx {
-		flex: 1;
-		width: 100%;
-		height: 100%;
-		display: flex;
-		overflow: hidden;
-	}
-	.tab-view {
-		height: 100%;
-		width: 170upx;
-		flex-shrink: 0;
-		background-color: #f0f2f6;
-		.tab-bar-item {
-			position: relative;
-			width: 170upx;
-			height: 90upx;
-			box-sizing: border-box;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			font-size: 26upx;
-			color: #444;
-			font-weight: 400;
-			.tag {
-				display: flex;
-				padding: 0 20px;
-				align-items: center;
-				position: absolute;
-				right: 0;
-				top: 0;
-				height: 32px;
-				background: #ff2842;
-				border-radius: 16px;
-				color: #fff;
-				font-size: 20px;
-			}
-      &:last-child{
-        margin-bottom: 110upx;
-      }
-		}
-
-		.active {
-			position: relative;
-			color: $mainColor;
-			font-size: 26px;
-			background: #fff;
-		}
-
-		.active::before {
-			content: "";
-			position: absolute;
-			border-left: 8upx solid $mainColor;
-			height: 100%;
-			left: 0;
-		}
-	}
-	.right-box {
-		height: 100%;
-		flex: 1;
-		box-sizing: border-box;
-	}
-	.item_list_bx {
-		padding: 40px 16px;
-    &:last-child{
-      margin-bottom: 70upx;
-    }
-	}
-	.item_list_title {
-		margin-bottom: 20px;
-		font-size: 24px;
-		font-weight: 600;
-		color: #666666;
-	}
-	.select-view {
-		margin-bottom: 30upx;
-	}
-	.select-cmd_bx {
-		margin-top: 30px;
-		& .num_bx {
-			display: flex;
-			align-items: center;
-			.kc {
-				width: 80upx;
-			}
-			& > input {
-				flex: 1;
-				height: 80px;
-				border: 1px solid #dddddd;
-				border-radius: 4px;
-				text-align: center;
-				margin-right: 24px;
-				font-size: 40rpx;
-			}
-		}
-	}
-}
-</style>

+ 0 - 555
ghsApp/src/admin/clear/detail.vue

@@ -1,555 +0,0 @@
-<template>
-	<view class="affirm-page">
-		<view class="affirm-view overscroll">
-			<!-- 门店信息 -->
-			<form>
-				<view class="module-com">
-					<view class="commodity-view">
-						<view class="commodity-list">
-							<view
-								class="commodity-item"
-								v-for="(item, index) in selectList"
-								:key="index"
-							>
-								<image
-									class="item-icon"
-									:src="item.itemCover || item.cover"
-									alt=""
-								/>
-
-								<view class="item-info">
-									<view class="info-line">
-										<text class="item-name">{{ item.itemName }}</text>
-										<text class="item-price">
-											<text class="unit">¥</text>
-
-											<text class="price">{{
-												item.itemPrice || getSelectItemPrice(item)
-											}}</text>
-										</text>
-									</view>
-									<view class="info-line">
-										<text class="item-type">b级</text>
-										<text class="item-count">
-											<text >{{`${item.bigCount}`}}</text>
-											<text >/</text>
-											<text >{{ `${item.smallCount}` }}</text>
-										</text>
-									</view>
-								</view>
-							</view>
-						</view>
-						<view class="summary-bar">
-							<view class="operate-view" @click="gobackEvent">
-								<text class="iconfont icongouwuche"></text>
-								重选花材
-							</view>
-							<view class="describe-view">
-								共{{ selectList.length }}种,
-								<!-- 共16扎9支, -->
-								合计 {{`${selectAllRealityWeight}kg`}} ¥{{ selectAllPrice }}
-							</view>
-						</view>
-					</view>
-				</view>
-
-				<view class="module-com input-line-wrap">
-					<tui-list-cell class="line-cell" :hover="false" :arrow="true" @tap="showCustomer = true">
-						<view class="tui-title ">供应商</view>
-						<text :style="!supplier.name?'color:#cccccc':''">
-							{{ supplier.name || "请选择" }}
-						</text>
-					</tui-list-cell>
-				</view>
-				<view class="module-com input-line-wrap">
-
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">包装重量</view>
-						<input type="digit" :disabled="!canIEdit" v-model="form.packWeight" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="公斤"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">总重量</view>
-						<view>{{(Number(selectAllRealityWeight) + Number(form.packWeight)).toFixed(2)}}</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<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="请填写,留空没有费用"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">短途运费</view>
-						<input  type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.shortCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">长途运费</view>
-						<input  type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.longCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<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="请填写,留空没有费用"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">本地运费</view>
-						<input  type="digit" @input="inputFn" :disabled="!canIEdit" v-model="form.localCharge" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
-						<view class="tui-title ">入库日期</view>
-						<AppDatePicker v-if="canIEdit" :dateVal="form.entryTime" :placeholder="'请选择日期'"/>
-						<view v-else>{{ form.entryTime || "请选择日期" }}</view>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">总金额</view>
-						<view>{{totalPrice}}</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">实付金额</view>
-						<input style="border: 1px solid #eee;color: #3385FF;width: calc(100%);height:70rpx;"  type="digit" :disabled="!canIEdit"  @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="phcolor" class="tui-input" name="floor" placeholder="请填写,留空没有费用"/>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title ">报损减免</view>
-						<view>{{(totalPrice - modifyPrice).toFixed(2) }}</view>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell remark-wrap" :hover="false">
-						<view class="tui-title">备注</view>
-						<view class="tui-input">
-							<textarea
-								:disabled="!canIEdit"
-								v-model="form.introduction"
-								class="tui-textarea remark"
-								placeholder-class="phcolor"
-								placeholder="请输入备注"
-							/>
-						</view>
-					</tui-list-cell>
-				</view>
-			</form>
-		</view>
-		<view class="under-bar">
-			<view class="price-view">
-				<text class="price-title">实付金额</text>
-				<text class="price-number">
-					<!--¥ <text class="large">{{ Number(allPrice) + Number(form.packingCharge) + Number(form.shortCharge) + Number(form.longCharge) + Number(form.pickCharge) + Number(form.localCharge) }}</text>-->
-					¥ <text class="large">{{ modifyPrice }}</text>
-				</text>
-			</view>
-			<button class="admin-button-com blue middle" v-if="canIEdit" @click="formSubmit">
-				确认
-			</button>
-		</view>
-		<!-- 选择客户 -->
-		<AppSupplierSel
-			:show.sync="showCustomer"
-			@change="changeCustomerFn"
-		/>
-	</view>
-</template>
-
-<script>
-import { mapGetters, mapActions } from "vuex";
-import TuiListCell from "@/components/plugin/list-cell";
-import AppAvatarModule from "@/components/module/app-avatar";
-import AppCustomerSel from "@/components/app-customer-sel";
-const form = require("@/utils/formValidation.js");
-import productMins from "@/mixins/product";
-import {
-	getPurchaseDetailApi,
-	createPurchaseOrderApi
-} from "@/api/purchase/index";
-import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
-
-import AppDatePicker from "@/components/app-date-picker";
-import AppSupplierSel from "@/components/app-supplier-sel";
-
-export default {
-	// 采购详情
-	components: {
-		TuiListCell,
-		AppAvatarModule,
-		AppCustomerSel,
-		AppDatePicker,
-		AppSupplierSel
-	},
-	mixins: [productMins],
-	data() {
-		return {
-			PURCHASE_ORDER_STATUS,
-			autoLoad: false,
-			pageType: "purchase",
-			supplier:'',
-			form: {
-				packingCharge: "", //打包费
-				shortCharge: "",
-				longCharge: "",
-				pickCharge: "",
-				localCharge: "",
-				packWeight: "",
-
-				entryTime: "",
-				ghsId: null
-			},
-			showCustomer: false,
-			detailsInfo: {},
-			totalPrice:0,
-			modifyPrice:0,
-		};
-	},
-	onLoad() {
-		this.initData();
-	},
-	onShow(){
-		if(!this.$util.isEmpty(uni.getStorageSync("newGhs"))){
-			this.showCustomer = true;
-		}
-		this.selectAllPrice;
-	},
-	onUnload(){
-		uni.removeStorageSync('newGhs');
-	},
-	computed: {
-		...mapGetters(["getMerchantInfo", "getLoginInfo"]),
-		selectAllPrice(){
-			let price = 0;
-			if (this.selectList) {
-				console.log(this.selectList,'selectList')
-				for (const item of this.selectList) {
-					if (item.itemPrice) {
-						price += Number(item.itemPrice);
-					} else {
-						price += this.getSelectItemPrice(item);
-					}
-				}
-			}
-			this.modifyPrice = price.toFixed(2);
-			this.totalPrice = price.toFixed(2);
-			return price.toFixed(2);
-		},
-		selectAllRealityWeight(){
-			let realityWeight = 0;
-			if (this.selectList) {
-				for (const item of this.selectList) {
-					if (item.realityWeight) {
-						realityWeight += Number(item.realityWeight);
-					}
-				}
-			}
-			return realityWeight.toFixed(2);
-		},
-		canIEdit() {
-			const { orderSn } = this.option || {};
-
-			if (!orderSn || this.detailsInfo.status == PURCHASE_ORDER_STATUS.CONFIRM) {
-				return true;
-			}
-			return false;
-		}
-	},
-	methods: {
-		...mapActions(["initMerchantInfo"]),
-		init() {
-			this._getDet();
-		},
-		inputFn(e) {
-			let price = Number(this.selectAllPrice);
-			price = price + Number(this.form.packingCharge) + Number(this.form.shortCharge) + Number(this.form.longCharge) + Number(this.form.pickCharge) + Number(this.form.localCharge)
-			this.totalPrice = price.toFixed(2);
-			this.modifyPrice = price.toFixed(2);
-		},
-		_getDet() {
-			let data = uni.getStorageSync("modifyShopB");
-			if (this.$util.isEmpty(data)) return;
-			Object.keys(this.form).forEach((i, index) => {
-				this.form[i] = data[i];
-			});
-		},
-
-		async initData() {
-			try {
-				const { orderSn } = this.option;
-				if (!orderSn) {
-					return;
-				}
-				const { data } = await getPurchaseDetailApi(orderSn);
-				console.log(11111, data);
-				Object.keys(this.form).forEach((i, index) => {
-					this.form[i] = data[i];
-				});
-
-				this.detailsInfo = data;
-
-				if (data.itemInfo) {
-					let list = data.itemInfo;
-					list.forEach(element => {
-						element.bigCount = element.bigNum;
-						element.smallCount = element.smallNum;
-					});
-					this.setSelectInfoByType({ type: this.pageType, info: list });
-				}
-
-				if (!this.getMerchantInfo) {
-					await this.initMerchantInfo();
-				}
-				console.log(66666, this.getMerchantInfo);
-			} catch (error) {
-				console.log(4444, error);
-			}
-		},
-
-		changeCustomerFn(e) {
-			console.log("changeCustomerFn", e);
-			this.supplier = e;
-			this.form.ghsId = e.id;
-		},
-
-		onCityConfirm(e) {
-			this.form.province = e.provinceName;
-			this.form.city = e.cityName;
-		},
-		async confirmFn() {
-			try {
-				const { orderSn } = this.option;
-				let formData = this.form;
-				if (orderSn) {
-					formData.orderSn = orderSn;
-				}
-				const itemInfo = this.selectList.map(ele => {
-					return {
-						classId: ele.classId,
-						productId: ele.id,
-						bigNum: ele.bigCount,
-						smallNum: ele.smallCount,
-						itemId:ele.itemId,
-						weight:ele.realityWeight,
-						itemPrice: ele.itemPrice || this.getSelectItemPrice(ele)
-					};
-				});
-				formData.itemInfo = JSON.stringify(itemInfo);
-				if (!this.getMerchantInfo) {
-					await this.initMerchantInfo();
-				}
-				await createPurchaseOrderApi({...formData,modifyPrice:this.modifyPrice});
-				uni.setStorageSync('flowersItemInfo', itemInfo);
-				this.resetSelectInfoByType(this.pageType);
-				uni.navigateTo({url:'/pagesPurchase/components/pageSuccess?title=新增成功'})
-			} catch (error) {}
-		},
-		formSubmitFun(){
-			let self = this;
-			uni.showModal({
-				title: '提示',
-				content: '确认提交订单?',
-				success: function (res) {
-					if (res.confirm) {
-						self.confirmFn();
-						// this.confirmFn();
-
-					} else if (res.cancel) {
-						console.log('用户点击取消');
-					}
-				}
-			});
-		},
-		// 表单验证
-		formSubmit(e) {
-
-			if(this.supplier==''){
-				uni.showToast({title:'请选择供应商',icon:'none'});return;
-			}
-			// 表单规则
-			let rules = [
-				{
-					name: "itemInfo",
-					rule: ["minLength", 1],
-					msg: ["请选择花材"]
-				}
-			];
-			// 进行表单检查
-			let formData = this.form;
-			formData.itemInfo = this.selectList;
-			let checkRes = form.validation(formData, rules);
-			// 验证通过!
-			if (!checkRes) {
-				this.formSubmitFun();
-			} else {
-				this.$msg(checkRes);
-			}
-		},
-		gobackEvent() {
-			uni.navigateBack({
-				delta: 1,
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.affirm-page {
-	position: relative;
-	height: 100%;
-	display: flex;
-	flex-direction: column;
-
-	.affirm-view {
-		flex: 1;
-		padding: 20upx;
-		background-color: #f0f2f6;
-
-		.tag-list {
-			width: 100%;
-			display: flex;
-			// justify-content: flex-end;
-			align-items: center;
-			.tag-item {
-				padding: 0 28upx;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				flex-wrap: wrap;
-				margin: 0 10upx 10upx 0;
-				height: 50upx;
-				font-size: 26upx;
-
-				border: 1px solid #eeeeee;
-				border-radius: 4upx;
-			}
-		}
-
-		.commodity-view {
-			display: flex;
-			flex-direction: column;
-			.commodity-list {
-				padding: 20upx;
-				.commodity-item {
-					display: flex;
-					margin-bottom: 20upx;
-					.item-icon {
-						flex-shrink: 0;
-						width: 140upx;
-						height: 140upx;
-					}
-					.item-info {
-						display: flex;
-						flex-direction: column;
-						justify-content: center;
-						flex: 1;
-						margin-left: 20upx;
-						.info-line {
-							margin-bottom: 20upx;
-							display: flex;
-							justify-content: space-between;
-							align-items: flex-end;
-							.item-name {
-								color: #666;
-								font-size: 28upx;
-							}
-							.item-price {
-								color: #333;
-								font-size: 22upx;
-								.price {
-									font-size: 32upx;
-									font-weight: bold;
-								}
-							}
-							.item-type {
-								color: #999;
-								font-size: 24upx;
-							}
-							.item-count {
-								color: #666;
-								font-size: 24upx;
-							}
-						}
-					}
-				}
-			}
-			.summary-bar {
-				padding: 0 20upx;
-				height: 90upx;
-				display: flex;
-
-				align-items: center;
-				justify-content: space-between;
-				border-top: 1upx solid #eeeeee;
-				.operate-view {
-					display: flex;
-
-					align-items: center;
-					color: #3385ff;
-					font-size: 26upx;
-					.iconfont {
-						margin-right: 20upx;
-						font-size: 40upx;
-					}
-				}
-				.describe-view {
-					display: flex;
-
-					align-items: center;
-					color: #333;
-					font-size: 24upx;
-					.price {
-						font-weight: bold;
-						font-size: 36upx;
-					}
-				}
-			}
-		}
-
-		.module-com {
-			background-color: #fff;
-			margin-bottom: 20upx;
-
-			border-radius: 10upx;
-			overflow: hidden;
-			.member-wrap {
-				.member-det {
-					font-size: 24upx;
-					margin-left: 20upx;
-				}
-			}
-			.remark-wrap {
-				align-items: flex-start;
-				.remark {
-					height: 240upx;
-				}
-			}
-			// .tui-placeholder,
-			// .tui-input {
-			// 	padding-right: 30upx;
-			// 	width: 100%;
-			// 	text-align: right;
-			// }
-		}
-	}
-	.under-bar {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 0 20upx;
-		width: 100%;
-		height: 100upx;
-		background-color: #fff;
-
-		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
-		.price-view {
-			display: flex;
-			align-items: center;
-			font-size: 24upx;
-			.price-title {
-				color: #333;
-			}
-			.price-number {
-				margin: 0 20upx;
-				color: #ff2842;
-				.large {
-					font-size: 40upx;
-				}
-			}
-		}
-		.admin-button-com {
-			width: 200upx;
-		}
-	}
-}
-</style>

+ 38 - 76
ghsApp/src/admin/clear/info.vue

@@ -1,23 +1,6 @@
 <template>
 	<view class="app-content">
 		<view v-if="!$util.isEmpty(detailInfo)" class="info-content_box">
-			<view class="title">
-				供应商
-			</view>
-			<view class="address-des_bx content-box">
-				<view>
-					<view> {{ detailInfo.supplierName }} {{ detailInfo.supplierMobile }} </view>
-					<view class="">
-						{{ detailInfo.supplierAddress}}
-					</view>
-				</view>
-				<view>
-					<i
-						@click="callUp(detailInfo.supplierMobile)"
-						class="iconfont icondianhua1"
-					></i>
-				</view>
-			</view>
 			<view class="title">
 				单据信息
 			</view>
@@ -39,46 +22,31 @@
 					</view>
 				</view>
 				<view class="order-info_box">
-					<view>入库人员:</view>
-					<view>{{ detailInfo.adminName }}</view>
-				</view>
-				<view class="order-info_box">
-					<view>入库日期:</view>
-					<view>{{ detailInfo.entryTime }}</view>
+					<view>操作人员:</view>
+					<view>{{ detailInfo.operator }}</view>
 				</view>
 				<view class="order-info_box">
 					<view>状态:</view>
-					<view>{{ 
-						detailInfo.status==1?'待付款'
-						:detailInfo.status==2?'待配送'
-						:detailInfo.status==3?'配送中'
-						:detailInfo.status==4?'已签收'
-						:detailInfo.status==5?'已入库'
-						:detailInfo.status==6?'已取消'
-						:'已退款'
-						 }}</view>
+					<view>已结账</view>
 				</view>
 			</view>
 			<view class="title">
-				商品信息
+				订单信息
 			</view>
 			<view class="module-com content-box">
 				<view class="commodity-view">
 					<view class="commodity-list">
 						<view
-							v-for="(s, idx) in detailInfo.itemInfo"
+							v-for="(s, idx) in detailInfo.orderList"
 							:key="idx"
 							class="commodity-item"
 						>
-							<image class="item-icon" :src="s.itemCover" alt="商品图片" />
-
-							<view class="item-info">
+							<view class="item-info" @click="pageTo({url: '/pagesOrder/detail',query: {id: s.id,},})" >
 								<view class="info-line">
-									<text class="item-name">{{ s.itemName }}</text>
+									<text class="item-name">单号:{{ s.orderSn }}</text>
 									<text class="item-price">
 										<text class="unit">¥</text>
-
-										<text class="price">{{ s.itemPrice }}</text>
+										<text class="price">{{ s.realPrice }}</text>
 									</text>
 								</view>
 								<view class="info-line">
@@ -91,53 +59,29 @@
 					<view class="summary-bar">
 						<view class="operate-view" ></view>
 						<view class="describe-view">
-							共{{ detailInfo.kind || 0 }}种, 共{{ detailInfo.bigNum }}扎{{
-								detailInfo.smallNum}}支,合计 ¥<text class="price">{{ detailInfo.price }}</text>
+							共{{ detailInfo.orderNum || 0 }}个订单
 						</view>
 					</view>
 				</view>
 			</view>
 			<view class="content-box price-detail">
 				<div class="module-com input-line-wrap">
-					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">包装重量</div>
-						<div class="detail-price_box" style="font-size: 28rpx;">{{ detailInfo.packWeight }}</div>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">打包费</div>
-						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.packingCharge }}</div>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">短途运费</div>
-						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.shortCharge }}</div>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">长途运费</div>
-						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.longCharge }}</div>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">提货费</div>
-						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.pickCharge }}</div>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<div class="tui-title">本地运费</div>
-						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.localCharge }}</div>
-					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
 						<div class="tui-title">总金额</div>
-						<div class="detail-price_box red" style="font-size: 30rpx;">¥{{ detailInfo.prePrice || 0.00 }}</div>
+						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.prePrice }}</div>
 					</tui-list-cell>
-					<tui-list-cell v-if="detailInfo.discountAmount > 0" class="line-cell" :hover="false">
-						<div class="tui-title">减免</div>
-						<div class="detail-price_box red" style="font-size: 30rpx;">¥{{ detailInfo.discountAmount || 0.00 }}</div>
+					<tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.discountAmount > 0">
+						<div class="tui-title">扣除</div>
+						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.discountAmount }}</div>
 					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
 						<div class="tui-title">实付</div>
-						<div class="detail-price_box red" style="font-size: 30rpx;">¥{{ detailInfo.realPrice || 0.00 }}</div>
+						<div class="detail-price_box" style="font-size: 28rpx;">¥{{ detailInfo.realPrice }}</div>
 					</tui-list-cell>
+
 				</div>
 			</view>
-			<view class="content-box price-detail">
+			<view class="content-box price-detail" v-if="detailInfo.remark.length > 0">
 				<div class="module-com input-line-wrap">
 					<tui-list-cell class="line-cell" :hover="false">
 						<div class="tui-title">备注</div>
@@ -153,6 +97,22 @@
 					</tui-list-cell>
 				</div>
 			</view>
+
+			<view class="title">
+				客户
+			</view>
+			<view class="address-des_bx content-box">
+				<view>
+					<view> {{ detailInfo.customName }} {{ detailInfo.customMobile }} </view>
+				</view>
+				<view>
+					<i
+						@click="callUp(detailInfo.supplierMobile)"
+						class="iconfont icondianhua1"
+					></i>
+				</view>
+			</view>
+
 		</view>
 	</view>
 </template>
@@ -179,7 +139,9 @@ export default {
 			loading: false
 		};
 	},
-	onShow() {},
+	onShow() {
+		console.log('aabbcc')
+	},
 	methods: {
 		copy(val) {
 			const self = this;
@@ -196,11 +158,11 @@ export default {
 			});
 		},
 		async init() {
-			const { orderSn } = this.option;
-			if (!orderSn) {
+			const { id } = this.option;
+			if (!id) {
 				return;
 			}
-			const { data } = await getDetail(orderSn);
+			const { data } = await getDetail(id);
 			this.detailInfo = data;
 		}
 	}

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

@@ -46,7 +46,7 @@ export default {
 		},
 		gotoDetail(item) {
 			uni.navigateTo({
-				url: `/admin/clear/info?orderSn=${item.orderSn}`,
+				url: `/admin/clear/info?id=${item.id}`,
 				success: result => {},
 				fail: () => {},
 				complete: () => {}

+ 0 - 241
ghsApp/src/admin/clear/order.vue

@@ -1,241 +0,0 @@
-<template>
-	<view class="order-page">
-		<view scroll-y class="order-list">
-			<block v-if="!$util.isEmpty(list.data)">
-				<OrderItem v-for="(item, index) in list.data" :key="index" :info="item" @click="gotoDetails(item)"></OrderItem>
-			</block>
-			<block v-else>
-				<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
-			</block>
-		</view>
-
-		<view class="app-footer open_btn">
-			<view @click="addEvent" class="admin-button-com middle blue">新增采购</view>
-		</view>
-	</view>
-</template>
-<script>
-import Tabs from "@/components/plugin/tabs";
-import OrderItem from "./orderItem";
-import AppWrapperEmpty from "@/components/app-wrapper-empty";
-
-import { list } from "@/mixins";
-import { PURCHASE_ORDER_STATUS } from "@/utils/declare";
-import { getPurchaseListApi } from "@/api/purchase/index";
-export default {
-	components: {
-		Tabs,
-		OrderItem,
-		AppWrapperEmpty
-	},
-	mixins: [list],
-
-	data() {
-		return {
-			PURCHASE_ORDER_STATUS,
-			tabIndex: 0,
-			tabs: [
-				{
-					name: "全部",
-					key: "",
-					value: "25"
-				},
-				{
-					name: "待确认",
-					key: "1",
-					value: "25"
-				},
-				{
-					name: "待配送",
-					key: "2",
-					value: "25"
-				},
-				{
-					name: "配送中",
-					key: "3",
-					value: "25"
-				},
-				{
-					name: "已完成",
-					key: "4",
-					value: "25"
-				}
-			]
-		};
-	},
-	onPullDownRefresh() {
-		this.resetList();
-		this._list().then(res => {
-			uni.stopPullDownRefresh();
-		});
-	},
-	methods: {
-		async init() {
-			this._list();
-		},
-		_list() {
-			let options = {
-				page: this.list.page,
-				pageSize: this.list.pageSize,
-				status: this.tabs[this.tabIndex].key
-			};
-			return getPurchaseListApi(options)
-				.then(res => {
-					const {
-						data: { allNum, unPayNum, unSendNum, sendingNum, finishNum }
-					} = res;
-
-					this.completes(res);
-					for (let index = 0; index < this.tabs.length; index++) {
-						const element = this.tabs[index];
-						if (element.key == "") {
-							// this.tabs[index].value = allNum;
-							this.$set(this.tabs, index, {
-								...this.tabs[index],
-								value: allNum
-							});
-						} else if (element.key == PURCHASE_ORDER_STATUS.CONFIRM) {
-							this.tabs[index].value = unPayNum;
-						} else if (element.key == PURCHASE_ORDER_STATUS.UNDIS) {
-							this.tabs[index].value = unSendNum;
-						} else if (element.key == PURCHASE_ORDER_STATUS.DIS) {
-							this.tabs[index].value = sendingNum;
-						} else if (element.key == PURCHASE_ORDER_STATUS.DONE) {
-							this.tabs[index].value = finishNum;
-						}
-					}
-				})
-				.catch(err => {
-					console.log(3333, err);
-				});
-		},
-		changeTabEvent(info) {
-			const { index } = info;
-			if (this.tabIndex == index) {
-				return false;
-			} else {
-				this.tabIndex = index;
-				this.resetList();
-				this._list();
-			}
-		},
-		getItemStatusName(status) {
-			let name = "";
-			switch (status) {
-				case OUT_STATUS.CONFIRM:
-					name = "待出库";
-					break;
-				case OUT_STATUS.DONE:
-					name = "已出库";
-					break;
-
-				default:
-					break;
-			}
-			return name;
-		},
-		addEvent() {
-			uni.navigateTo({
-				url: `/pagesPurchase/add`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
-		},
-		gotoDetails(item) {
-			uni.navigateTo({
-				url: `/pagesPurchase/info?orderSn=${item.orderSn}`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
-		}
-	}
-};
-</script>
-<style lang="scss" scoped>
-.order-page {
-	height: 100%;
-	display: flex;
-	flex-direction: column;
-	background-color: #f9fbfc;
-	.order-list {
-		padding-top: 20upx;
-		padding-bottom: 80upx;
-		flex: 1;
-		// padding-bottom: 50upx;
-		.allot-item {
-			margin-bottom: 1px;
-			padding: 30upx;
-			display: flex;
-			align-items: center;
-			box-shadow: 0px 1px 0px 0px #eeeeee;
-			background-color: #fff;
-			.info {
-				flex: 1;
-				margin-right: 20px;
-				.info-order {
-					font-size: 32upx;
-					font-weight: 600;
-					color: #333333;
-				}
-				.info-name {
-					margin: 40upx 0 20upx;
-					font-size: 28upx;
-					font-weight: 400;
-					color: #666666;
-				}
-				.info-time {
-					margin-right: 30upx;
-					font-size: 28upx;
-					font-weight: 400;
-					color: #666666;
-				}
-			}
-			.status {
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				flex-shrink: 0;
-				width: 100upx;
-				color: #cccccc;
-				.status-name {
-					margin-top: 10upx;
-					font-size: 24upx;
-				}
-				.iconfont {
-					font-size: 46upx;
-				}
-				&.primary {
-					color: #3385ff;
-				}
-				&.gray {
-					color: #cccccc;
-				}
-				&.warn {
-					color: #ffaf1d;
-				}
-			}
-		}
-	}
-	.bar-view {
-		flex-shrink: 0;
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		padding: 0 30upx;
-		width: 100%;
-		height: 100upx;
-
-		box-shadow: 0px -1px 6px 0px rgba(4, 0, 0, 0.06);
-
-		.btn-view {
-			display: flex;
-			.admin-button-com {
-				margin: 0 10upx;
-				width: 140upx;
-			}
-		}
-	}
-}
-</style>

+ 1 - 0
ghsApp/src/admin/clear/orderItem.vue

@@ -28,6 +28,7 @@
 				>¥{{ info.realPrice }} <text class="iconfont iconxiangyou"></text>
 			</view>
 		</view>
+		
 	</view>
 </template>
 <script>

+ 0 - 31
ghsApp/src/admin/clear/result.vue

@@ -1,31 +0,0 @@
-<template>
-	<appResult :title="'入库成功'">
-		<button class="admin-button-com blue big" @click="goOn">继续入库</button>
-		<button class="admin-button-com big" @click="goClose">关闭</button>
-	</appResult>
-</template>
-
-<script>
-import appResult from "@/components/app-result";
-export default {
-	name: "BillingResult", // 开单结果
-	components: {
-		appResult
-	},
-	methods: {
-		goOn() {
-			this.$util.pageTo({ url: "/pagesPurchase/add", type: 2 });
-		},
-		goClose() {
-			this.$util.pageTo({ url: "/pagesPurchase/order", type: 2 });
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.admin-button-com {
-	margin-bottom: 20px;
-	width: 100%;
-}
-</style>

+ 0 - 161
ghsApp/src/admin/clear/suppAdd.vue

@@ -1,161 +0,0 @@
-<template>
-  <div class="app-content">
-      <form @submit="formSubmit" @reset="formReset">
-        <!-- 名称 -->
-        <div class="module-com input-line-wrap">
-          <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title required">名称</div>
-            <input
-              v-model="form.name"
-              class="tui-input"
-              placeholder="请填写名称"
-              maxlength="50"
-              type="text"
-              name="username"
-            />
-          </tui-list-cell>
-        
-        <!-- 手机号 -->
-        <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title required">手机号</div>
-            <input
-              v-model="form.mobile"
-              class="tui-input"
-              placeholder="请填写手机号"
-              maxlength="50"
-              type="number"
-              name="phone"
-            />
-          </tui-list-cell>
-          <!-- 确认手机号 -->
-        <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title required">确认手机号</div>
-            <input
-              v-model="form.confirmMobile"
-              class="tui-input"
-              placeholder="请确认手机号"
-              maxlength="50"
-              type="number"
-              name="requirePhone"
-            />
-          </tui-list-cell>
-          <!-- 地址 -->
-        <tui-list-cell class="line-cell" :hover="false">
-            <div class="tui-title">地址</div>
-            <input
-              v-model="form.address"
-              class="tui-input"
-              placeholder="选填"
-              maxlength="50"
-              type="text"
-            />
-          </tui-list-cell>
-        </div>
-        
-        <!-- 提交 -->
-        <div class="confirm-btn">
-          <button class="admin-button-com big blue" formType="submit">确认</button>
-        </div>
-      </form>
-  </div>
-</template>
-
-<script>
-import TuiListCell from "@/components/plugin/list-cell";
-import { ghsAdd } from "@/api/ghs"
-const form = require("@/utils/formValidation.js");
-export default {
-  components: {
-    TuiListCell,
-  },
-  data() {
-    return {
-      form: {
-        mobile: '',
-        confirmMobile: '',
-        name: '',
-        address: ''
-      }
-    }
-  },
-  methods: {
-    // 表单验证
-    formSubmit(e) {
-      // 表单规则
-      let rules = [
-        {
-          name: "username",
-          rule: ["required"],
-          msg: ["请填写名称"]
-        },
-        {
-          name: "phone",
-          rule: ["required"],
-          msg: ["请填写手机号"]
-        },
-        {
-          name: "requirePhone",
-          rule: ["required"],
-          msg: ["请确认手机号"]
-        }
-      ];
-      // 进行表单检查
-      let formData = e.detail.value;
-      let checkRes = form.validation(formData, rules);
-      // 验证通过!
-      if (!checkRes) {
-        this.confirmFn();
-      } else {
-        this.$msg(checkRes);
-      }
-    },
-    confirmFn() {
-      uni.showLoading({
-        title:"加载中..."
-      })
-      ghsAdd(this.form).then(res => {
-							uni.setStorageSync('newGhs', res.data);
-        uni.hideLoading()
-        setTimeout(() => {
-          this.$util.pageTo(1);
-        }, 1000);
-      }).catch(err => {})
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.app-content {
-  min-height: calc(100vh - 20px);
-  padding-top: 20px;
-}
-.prompt-text {
-  color: $fontColor3;
-  padding-left: 30px;
-  margin-bottom: 30px;
-}
-.module-com {
-  margin-bottom: 20px;
-  .member-wrap {
-    .member-det {
-      font-size: 24px;
-      margin-left: 20px;
-    }
-  }
-  .remark-wrap {
-    align-items: flex-start;
-    .remark {
-      height: 240px;
-    }
-  }
-}
-// 按钮
-.confirm-btn {
-  width: calc(100% - 60px);
-  margin: 60px 30px 20px;
-  .admin-button-com {
-    width: 100%;
-  }
-}
-</style>

+ 0 - 184
ghsApp/src/admin/clear/supplier.vue

@@ -1,184 +0,0 @@
-<template>
-  <view class="order-page">
-    <scroll-view
-      scroll-y
-      class="order_list"
-      scroll-view
-    >
-    <block>
-        <!-- 供应商列表 -->
-        <block v-if="!$util.isEmpty(supplierList)">
-          <view
-            class="list_item"
-            v-for="(item, index) in supplierList"
-            :key="index"
-            @click="gotoDetails"
-          >
-            <image :src="item.avatar"></image>
-            <view class="store_name">
-              <view class="store_title">{{item.name}}</view>
-              <view class="accumulative">欠款: {{item.debtAmount}}</view>
-            </view>
-            <view class="store_btn">
-              <view class="btn_entrance" v-if="Number(item.debtAmount) > 0" @click.stop="gotoDetailsEvent(item)" >
-                结账
-              </view>
-              <view class="btn_entrance btn_forbid" v-else @click.stop="" >
-                结账
-              </view>
-              <view class="btn_entrance" @click.stop="gotoDetails" >
-                采购
-              </view>
-            </view>
-          </view>
-        </block>
-        <block v-else>
-          <AppWrapperEmpty
-            title="暂无数据"
-            :is-empty="$util.isEmpty(supplierList)"
-          />
-        </block>
-      </block>
-    </scroll-view>
-    <!-- 按钮 -->
-			<div class="app-footer">
-				<div class="admin-button-com middle blue" @click="add">添加</div>
-			</div>
-  </view>
-</template>
-
-<script>
-import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import { getList } from "@/api/ghs";
-export default {
-  components: {
-    AppWrapperEmpty,
-  },
-  data () {
-    return {
-      list: {
-        data: []
-      },
-      supplierList: [],
-      tabIndex: 0
-    }
-  },
-	onShow(){
-		uni.removeStorageSync('newGhs');
-	},
-  onPullDownRefresh() {
-    this.getGHSList().then(res => {
-      uni.stopPullDownRefresh();
-    })
-  },
-  methods: {
-    init() {
-      this.getGHSList()
-    },
-    getGHSList () {
-      return getList().then(res => {
-        this.supplierList = res.data.list
-        console.log(this.supplierList, 111)
-      }).catch(err => { console.log(err) })
-    },
-    gotoDetailsEvent(item) {
-			uni.navigateTo({
-				url: `/pagesGys/details?id=${item.id}`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
-		},
-    // 采购记录详情
-    gotoDetails () {
-      this.pageTo({
-        url: '/pagesPurchase/add',
-        type:2
-      })
-    },
-    // 添加供应商
-    add() {
-      this.pageTo({
-        url: '/pagesPurchase/suppAdd'
-      })
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.order-page {
-  .order_list {
-    // height: 200upx;
-    height: 100%;
-    background: #f0f2f6;
-    padding: 0 0 120upx;
-    .list_item {
-      margin: 20upx 0 0;
-      // padding-left: 20upx;
-      position: relative;
-      height: 180upx;
-      width: 100vw;
-      background: #fff;
-      display: flex;
-      align-items: center;
-      & > image {
-        margin-left: 30upx;
-        width: 120upx;
-        height: 120upx;
-        border-radius: 60upx;
-      }
-      & > .store_name {
-        margin-left: 30upx;
-        width: 280rpx;
-        display: block;
-        & > .store_title {
-          margin-bottom: 30upx;
-          width: 100%;
-          white-space: nowrap;
-          text-overflow: ellipsis;
-          overflow: hidden;
-          word-break: break-all;
-          font-size: 32upx;
-          font-weight: 700;
-          color: #333;
-        }
-        & > .accumulative {
-          font-size: 26upx;
-          color: #999;
-        }
-      }
-      & > .store_btn {
-        position: absolute;
-        right: 30upx;
-        // padding-right: 30upx;
-        & > .btn_entrance {
-          display: inline-block;
-          font-size: 26upx;
-          color: #3385ff;
-          border: 1px solid #3385ff;
-          border-radius: 8px;
-          padding: 15upx 30upx;
-          margin-left: 30upx;
-        }
-        & > .btn_forbid {
-          border: 1px solid #999;
-          color: #999;
-        }
-      }
-    }
-  }
-  .pay_list {
-    padding-top: 20upx;
-    background-color: #f0f2f6;
-  }
-  // 按钮
-.app-footer {
-	justify-content: flex-end;
-	.admin-button-com {
-		width: 180px;
-		margin-right: 30px;
-	}
-}
-}
-</style>

+ 2 - 2
ghsApp/src/api/clear/index.js

@@ -3,8 +3,8 @@ import https from "@/plugins/luch-request_0.0.7/request";
 /** *
  * 采购订单详情
  */
-export const getDetail = async orderSn => {
-	return https.get("/clear/get-full-info", { orderSn });
+export const getDetail = async id => {
+	return https.get("/clear/get-full-info", { id });
 };
 
 /** *

+ 6 - 6
ghsApp/src/pagesClient/member/detail.vue

@@ -50,6 +50,9 @@
       </view>
       <view class="module-com user-open_bx">
         <view class="input-line-wrap">
+            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/clear/list',query: {customId: userInfo.id}})">
+              <div class="tui-title">结帐订单</div>
+            </tui-list-cell>
             <tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">允许欠款</div>
               <div class="switch_bx">
@@ -57,14 +60,11 @@
                 <switch :checked="form.debt == 0 ? false : true" @change="remindChangeFn" />
               </div>
             </tui-list-cell>
-											<tui-list-cell class="line-cell" :hover="false">
+						<tui-list-cell class="line-cell" :hover="false">
               <div class="tui-title">欠款额度</div>
-              <input v-model="debtLimit" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="text" style="width:50%;border:1px solid #ddd" />
+              <input v-model="debtLimit" placeholder-class="phcolor" class="tui-input" confirm-type="go" placeholder="请填写" type="digit" style="width:50%;border:1px solid #ddd" />
            			<view @tap="amendMoney" style="color: #0A98D5;margin-left: 20rpx">确定</view>
-											</tui-list-cell>
-            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/clear/list',query: {customId: userInfo.id}})">
-              <div class="tui-title">结帐记录</div>
-            </tui-list-cell>
+						</tui-list-cell>
         </view>
       </view>
     </templete>

+ 17 - 7
ghsApp/src/pagesClient/official/apply.vue

@@ -190,6 +190,8 @@ import AppBindInfo from "@/components/app-bind-info";
 const form = require("@/utils/formValidation.js");
 import {getIntroduce,applyRegister} from "@/api/official";
 import { mapResolve } from "@/api/map";
+import util from '@/utils/util';
+
 export default {
   name: "apply-data",
   components: {
@@ -239,13 +241,21 @@ export default {
 			type: 'wgs84',
 			success: function (res) {
 				mapResolve({lat:res.latitude,long:res.longitude}).then((obj) => {
-					console.log(obj)
-					self.form.longitude=res.longitude,
-						self.form.latitude=res.latitude,
-						self.form.province = obj.data.province
-					self.form.city = obj.data.city
-					self.form.address = obj.data.address
-					self.form.showAddress = obj.data.showAddress
+          if(!util.isEmpty(obj.data)){
+            console.log(obj)
+            self.form.longitude=res.longitude,
+            self.form.latitude=res.latitude,
+            self.form.province = obj.data.province
+            self.form.city = obj.data.city
+            self.form.address = obj.data.address
+            self.form.showAddress = obj.data.showAddress
+
+            uni.showToast({
+                title: '已自动填写地址',
+                duration: 2500
+            });
+
+          }
 				})
 				// console.log('当前位置的经度:' + res.longitude);
 				// console.log('当前位置的纬度:' + res.latitude);

+ 5 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -60,7 +60,11 @@
 				</view>
 				<view class="order-info_box">
 					<view>欠款:</view>
-					<view>{{ detailInfo.debt==1?'是':'-' }}</view>
+					<view v-if="detailInfo.debt==1">是</view>
+					<view v-else>
+						<view v-if="detailInfo.clearId > 0">已结清 <span style="color:blue;margin-left:10rpx;" @click="pageTo({url: '/admin/clear/info',query: {id: detailInfo.clearId}})">结帐单</span></view>
+						<view v-else>-</view>
+					</view>
 				</view>
 				<view class="order-info_box">
 					<view>配送方式:</view>

+ 20 - 7
hdApp/src/pagesClient/official/apply.vue

@@ -158,6 +158,8 @@ import AppBindInfo from "@/components/app-bind-info";
 const form = require("@/utils/formValidation.js");
 import { getIntroduce, applyRegister } from "@/api/official";
 import { mapResolve } from "@/api/map";
+import util from '@/utils/util';
+
 export default {
   name: "apply-data",
   components: {
@@ -206,13 +208,24 @@ export default {
 				type: 'wgs84',
 				success: function (res) {
 					mapResolve({lat:res.latitude,long:res.longitude}).then((obj) => {
-						console.log(obj)
-						self.form.longitude=res.longitude,
-						self.form.latitude=res.latitude,
-						self.form.province = obj.data.province
-						self.form.city = obj.data.city
-						self.form.address = obj.data.address
-						self.form.showAddress = obj.data.showAddress
+
+            if(!util.isEmpty(obj.data)){
+
+              console.log(obj)
+              self.form.longitude=res.longitude,
+              self.form.latitude=res.latitude,
+              self.form.province = obj.data.province
+              self.form.city = obj.data.city
+              self.form.address = obj.data.address
+              self.form.showAddress = obj.data.showAddress
+
+              uni.showToast({
+                  title: '已自动填写地址',
+                  duration: 2500
+              });
+
+            }
+
 					})
 					// console.log('当前位置的经度:' + res.longitude);
 					// console.log('当前位置的纬度:' + res.latitude);