jf 5 år sedan
förälder
incheckning
1c3e25a4d0

+ 32 - 42
ghsApp/src/admin/billing/affirm.vue

@@ -54,22 +54,29 @@
 				<view class="module-com input-line-wrap">
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
 						<view class="tui-title ">客户</view>
-						<view class="tui-input" v-if="form.customId">
-							{{ form.customName }}
-						</view>
-						<view class="tui-placeholder" v-else @click="showCustomer = true"
-							>请选择客户</view
-						>
+						<view class="tui-input" v-if="form.customId" @click="showCustomer = true">{{ form.customName }}</view>
+						<view class="tui-placeholder" style="width: 100%" v-else @click="showCustomer = true">请选择客户</view>
+					</tui-list-cell>
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+						<view class="tui-title ">运费</view>
+						<input type="number" placeholder="留空表示免运费" @input="countAllPrices" v-model="form.sendCost" placeholder-class="tui-placeholder">
 					</tui-list-cell>
-					<appFormSend :form.sync="form"> </appFormSend>
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+						<view class="tui-title ">结算方式</view>
+						<button @tap="form.clearType=1" class="admin-button-com mini-btn" :class="form.clearType==1?'blue':'default'">欠款</button>
+						<button @click="form.clearType=2" class="admin-button-com mini-btn" :class="form.clearType==2?'blue':'default'">已收款</button>
+					</tui-list-cell>
+
+
+<!--					<appFormSend :form.sync="form"> </appFormSend>-->
 				</view>
 			</form>
 		</view>
 		<view class="under-bar">
 			<view class="price-view">
-				<text class="price-title">收款</text>
+				<text class="price-title">{{ form.clearType==1?'欠款':'已收款' }}</text>
 				<text class="price-number">
-					¥ <text class="large">{{ allPrice }}</text>
+					¥ <text class="large">{{ allPrice+Number(form.sendCost)  }}</text>
 				</text>
 			</view>
 			<button class="admin-button-com blue middle" @click="formSubmit">
@@ -114,6 +121,7 @@ export default {
 		return {
 			autoLoad: false,
 			form: {
+				clearType:1,//结算方式 1欠款 2已付款
 				shopId: "",
 				shopName: "",
 				receiveProvince: "",
@@ -157,6 +165,14 @@ export default {
 		init() {
 			this._getDet();
 		},
+		countAllPrices(e){
+			this.allPrices = this.allPrices+Number(this.form.sendCost)
+			console.log('e',e)
+			console.log('this.form.sendCost',Number(this.form.sendCost))
+			console.log('this.form.sendCost',this.form.sendCost)
+			console.log('this.allPrices',this.allPrices)
+		},
+
 		// api
 		_getDet() {
 			let data = uni.getStorageSync("modifyShopB");
@@ -196,37 +212,8 @@ export default {
 		// 表单验证
 		async formSubmit(e) {
 			try {
-				// 表单规则
-				let rules = [
-					{
-						name: "sendTime",
-						rule: ["required"],
-						msg: ["请输入具体时间"]
-					}
-				];
 				// 进行表单检查
 				let formData = this.form;
-				if (formData.sendType == "1") {
-				} else {
-					let temp = [
-						{
-							name: "receiveProvince",
-							rule: ["required"],
-							msg: ["请选择地址"]
-						},
-						{
-							name: "receiveAddress",
-							rule: ["required"],
-							msg: ["请填写详细地址"]
-						},
-						{
-							name: "receiveFloor",
-							rule: ["required"],
-							msg: ["请输入门牌号"]
-						}
-					];
-					rules = rules.concat(temp);
-				}
 
 				const product = this.selectList.map(ele => {
 					return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount };
@@ -236,11 +223,11 @@ export default {
 					await this.initMerchantInfo();
 				}
 				formData.shopId = this.getMerchantInfo.id;
-				if (this.waySele == 1) {
-					formData.sendCost = "免运费";
-				}
+
 				console.log(9999, formData);
-				let checkRes = formUtil.validation(formData, rules);
+				// this.confirmFn(formData);
+				// let rules = rules.concat(temp);
+				let checkRes = formUtil.validation(formData, []);
 				// 验证通过!
 				if (!checkRes) {
 					this.confirmFn(formData);
@@ -261,6 +248,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+.admin-button-com {
+	margin-right: 20upx;
+}
 .affirm-page {
 	position: relative;
 	height: 100%;

+ 14 - 71
ghsApp/src/admin/billing/index.vue

@@ -1,65 +1,24 @@
 <template>
 	<view class="billing_box_bg">
-		<app-tabs
-			:tabs="tabs"
-			:currentTab="tabIndex"
-			@change="change"
-			itemWidth="50%"
-		/>
-		<view class="input-wrap">
-			<app-search-module
-				v-model="py"
-				placeholder="请输入关键词,支持拼音首字母搜索"
-				@search="searchFn"
-			/>
+		<app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="50%" />
+		<view class="input-wrap" v-if="tabIndex == 0">
+			<app-search-module v-model="py" placeholder="请输入关键词,支持拼音首字母搜索" @search="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"
-				>
+			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop" v-if="tabIndex == 0">
+				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass">
 					<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
-							"
-						>
+					<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 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"
-				v-if="tabIndex == 0"
-				:scroll-into-view="scrollClassId"
-			>
+			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="scrollClassId">
 				<!--内容部分 start -->
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 					<view
@@ -106,30 +65,18 @@
 			</scroll-view>
 			<block v-else>
 				<view style="width:100%">
-					<AppWrapperEmpty title="敬请期待" :is-empty="true" />
+					<AppWrapperEmpty title="敬请期待" :type="'billing'" :is-empty="true" />
 				</view>
 			</block>
 		</view>
 		<!-- :maskClosable="false" -->
-		<modal-module
-			:show="isModel"
-			@cancel="modalCancel"
-			@click="affirm"
-			:title="customData.itemName"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
+		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc"> 库存{{ customData.stock }} </view>
 					<view class="num_bx">
 						<input v-model="customData.bigCount" type="number" focus />扎
-						<input
-							v-model="customData.smallCount"
-							type="number"
-							style="margin-left:24upx"
-						/>支
+						<input v-model="customData.smallCount" type="number" style="margin-left:24upx" />支
 					</view>
 				</view>
 			</template>
@@ -144,11 +91,7 @@
 			padding="30rpx 30rpx"
 		>
 		</modal-module>
-		<FooterCart
-			:price="allPrice"
-			:count="allCount"
-			@confirm="confirmSelectEvent"
-		></FooterCart>
+		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" v-if="tabIndex == 0"></FooterCart>
 	</view>
 </template>
 

+ 16 - 13
ghsApp/src/admin/billing/result.vue

@@ -1,13 +1,12 @@
 <template>
 	<appResult>
-		<button class="admin-button-com blue big" @click="gotoOrderDetails">
-			发货详情
-		</button>
-		<button class="admin-button-com big" @click="gotoOrderPrint">打印单据</button>
-		<button class="admin-button-com big" @click="gotoPlace">
-			继续开单
-		</button>
+<!--		<button class="admin-button-com blue big" @click="gotoOrderDetails">发货详情</button>-->
+		<button class="admin-button-com blue big" @click="gotoOrderSend">发货</button>
+
+<!--		<button class="admin-button-com big" @click="gotoOrderPrint">打印单据</button>-->
+		<button class="admin-button-com big" @click="gotoOrderDetails">订单详情</button>
 		<button class="admin-button-com big" @click="gotoOrderList">订单列表</button>
+		<button class="admin-button-com big" @click="gotoPlace">继续开单</button>
 	</appResult>
 </template>
 
@@ -19,13 +18,17 @@ export default {
 		appResult
 	},
 	methods: {
+		gotoOrderSend(){
+			uni.navigateTo({url: `/pagesOrder/ship?id=${this.option.orderId}`});
+		},
 		gotoOrderDetails() {
-			uni.navigateTo({
-				url: `/admin/order/detail?id=${this.option.orderId}`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+			uni.navigateTo({url: `/pagesOrder/detail?id=${this.option.orderId}`});
+			// uni.navigateTo({
+			// 	url: `/admin/order/detail?id=${this.option.orderId}`,
+			// 	success: result => {},
+			// 	fail: () => {},
+			// 	complete: () => {}
+			// });
 		},
 		gotoPlace() {
 			uni.navigateBack({

+ 2 - 0
ghsApp/src/components/app-wrapper-empty.vue

@@ -97,6 +97,8 @@ export default {
 				return this.img
 			} else if (this.type == 'search') {
 				return `${this.$constant.imgUrl}/retail/common/img_noorder.png`
+			} else if (this.type == 'billing') {
+				return `${this.$constant.imgUrl}/ghs/common/img_nodata.png`
 			} else {
 				return `${this.$constant.imgUrl}/retail/common/img_nodata.png`
 			}