From 148de2827a4e427f4ff9a5908e3f8be54870c316 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期一, 19 一月 2026 18:31:10 +0800
Subject: [PATCH] 取样单列表增加下推首件功能
---
pages/baogong/AddLineBind.vue | 849 ++++++++++++++++++++++++++++----------------------------
1 files changed, 424 insertions(+), 425 deletions(-)
diff --git a/pages/baogong/AddLineBind.vue b/pages/baogong/AddLineBind.vue
index ed7c53e..85f14cb 100644
--- a/pages/baogong/AddLineBind.vue
+++ b/pages/baogong/AddLineBind.vue
@@ -1,435 +1,434 @@
<template>
- <view>
- <view class="form" :style="{height: containerHeight + 'px',overflow: 'auto'}">
- <view class="form-item">
- <view class="title">鐢熶骇璧勬簮:</view>
- <view class="right">
- <uni-combox
- :candidates="arrayHSourceName"
- placeholder="璇烽�夋嫨鐢熶骇璧勬簮"
- v-model="hform.HSourceName"
- @input="HSourceNameChange">
- </uni-combox>
- </view>
- </view>
-
- <view class="form-item">
- <view class="title">璐熻矗浜�:</view>
- <view class="right">
- <uni-combox
- :candidates="arrayHManagerName"
- placeholder="璇烽�夋嫨璐熻矗浜�"
- v-model="hform.HManagerName"
- @input="HManagerNameChange">
- </uni-combox>
- </view>
- </view>
-
- <view class="form-item">
- <view class="title">鐝粍:</view>
- <view class="right">
- <uni-combox
- :candidates="arrayHGroupName"
- placeholder="璇烽�夋嫨鐝粍"
- v-model="hform.HGroupName"
- @input="HGroupNameChange">
- </uni-combox>
- </view>
- </view>
-
- <view class="form-item">
- <view class="title">鍒涘缓鏃ユ湡:</view>
- <view class="righton">
- <input disabled v-model="hform.HCreateDate" />
- </view>
- </view>
-
- <view class="form-item">
- <view class="title">澶囨敞:</view>
- <view class="right">
- <textarea v-model="hform.HRemark" placeholder="璇疯緭鍏ュ娉�" auto-height />
- </view>
- </view>
- </view>
-
- <!-- 鎿嶄綔鎸夐挳 -->
- <view class="buttons" id="buttons">
- <button class="btn-c" size="mini" @tap="save">淇濆瓨</button>
- <view style="flex: 1;"></view>
- <button class="btn-a" size="mini" @tap="goBack">杩斿洖</button>
- </view>
-
- </view>
+ <view>
+ <view class="form-item">
+ <view class="title">鐢熶骇璧勬簮:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHSourceName" placeholder="璇烽�夋嫨鐢熶骇璧勬簮" v-model="hform.HSourceName"
+ @input="HSourceNameChange">
+ </uni-combox>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">璐熻矗浜�:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHManagerName" placeholder="璇烽�夋嫨璐熻矗浜�" v-model="hform.HManagerName"
+ @input="HManagerNameChange">
+ </uni-combox>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">鐝粍:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHGroupName" placeholder="璇烽�夋嫨鐝粍" v-model="hform.HGroupName"
+ @input="HGroupNameChange">
+ </uni-combox>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">鍒涘缓鏃ユ湡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HCreateDate" />
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">澶囨敞:</view>
+ <view class="right">
+ <textarea v-model="hform.HRemark" placeholder="璇疯緭鍏ュ娉�" auto-height />
+ </view>
+ </view>
+
+ <!-- 鎿嶄綔鎸夐挳 -->
+ <view class="buttons" id="buttons">
+ <button class="btn-c" size="mini" @tap="save">淇濆瓨</button>
+ <view style="flex: 1;"></view>
+ <button class="btn-a" size="mini" @tap="goBack">杩斿洖</button>
+ </view>
+
+ </view>
</template>
<script>
- import dayjs from "dayjs";
- import { CommonUtils } from "@/utils/common";
- import { getUserInfo } from "@/utils/auth";
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ getUserInfo
+ } from "@/utils/auth";
- export default {
- name: 'AddLineBind',
- data() {
- return {
- // 绉婚櫎btnTop锛屾敼鐢ㄥ浐瀹氬簳閮ㄥ竷灞�
- // 鏁版嵁鍒楄〃
- HSourceNameList: [],
- HManagerNameList: [],
- HGroupNameList: [],
-
- // 鐢ㄤ簬uni-combox鐨勬暟缁�
- arrayHSourceName: [],
- arrayHManagerName: [],
- arrayHGroupName: [],
-
- hform: {
- HUserName: getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'),
- HSourceID: getUserInfo()['HSourceID'],
- HSourceName: getUserInfo()['HSource'],
- HManagerID: getUserInfo()['HKeeperID'],
- HManagerName: getUserInfo()['HKeeper'],
- HGroupID: getUserInfo()['HGroupID'],
- HGroupName: getUserInfo()['HGroup'],
- HCreateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
- HRemark: ''
- },
-
- // 鏈嶅姟鍣ㄥ湴鍧�
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
-
- // 娣诲姞绐楀彛楂樺害
- windowHeight: 0
- };
- },
- onUnload() {
- // 椤甸潰鍏抽棴鏃惰Е鍙戝埛鏂�
- uni.$emit('refreshDeviceList');
+ export default {
+ name: 'AddLineBind',
+ data() {
+ return {
+ // 绉婚櫎btnTop锛屾敼鐢ㄥ浐瀹氬簳閮ㄥ竷灞�
+ // 鏁版嵁鍒楄〃
+ HSourceNameList: [],
+ HManagerNameList: [],
+ HGroupNameList: [],
+
+ // 鐢ㄤ簬uni-combox鐨勬暟缁�
+ arrayHSourceName: [],
+ arrayHManagerName: [],
+ arrayHGroupName: [],
+
+ hform: {
+ HUserName: getUserInfo()['Czymc'] || uni.getStorageSync('HUserName'),
+ HSourceID: getUserInfo()['HSourceID'],
+ HSourceName: getUserInfo()['HSource'],
+ HManagerID: getUserInfo()['HKeeperID'],
+ HManagerName: getUserInfo()['HKeeper'],
+ HGroupID: getUserInfo()['HGroupID'],
+ HGroupName: getUserInfo()['HGroup'],
+ HCreateDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ HRemark: ''
+ },
+
+ // 鏈嶅姟鍣ㄥ湴鍧�
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+
+ // 娣诲姞绐楀彛楂樺害
+ windowHeight: 0
+ };
},
- methods: {
- // 鑾峰彇鎵�鏈夊垪琛ㄦ暟鎹�
- async getListData() {
- // 鑾峰彇鐢熶骇璧勬簮鍒楄〃
- await this.getSourceList();
- // 鑾峰彇璐熻矗浜哄垪琛紙浜哄憳鍒楄〃锛�
- await this.getManagerList();
- // 鑾峰彇鐝粍鍒楄〃
- await this.getGroupList();
- },
-
- // 鑾峰彇鐢熶骇璧勬簮鍒楄〃
- async getSourceList() {
- try {
- const res = await uni.request({
- url: this.serverUrl + '/api/newBill/getSourceList',
- data: {
- sWhere: ""
- }
- });
-
- if (res[1].data.code == 1) {
- this.HSourceNameList = res[1].data.data.Gy_Source || [];
- for (let i = 0; i < this.HSourceNameList.length; i++) {
- this.arrayHSourceName[i] = this.HSourceNameList[i].鐢熶骇璧勬簮;
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: '鑾峰彇鐢熶骇璧勬簮鍒楄〃澶辫触',
- icon: 'none'
- });
- }
- } catch (error) {
- console.log(error);
- uni.showToast({
- title: '鑾峰彇鐢熶骇璧勬簮鍒楄〃澶辫触',
- icon: 'none'
- });
- }
- },
-
- // 鑾峰彇璐熻矗浜哄垪琛紙浜哄憳鍒楄〃锛�
- async getManagerList() {
- try {
- const res = await uni.request({
- url: this.serverUrl + '/Web/GetEmployeeList_Json',
- data: {
- Employee: '',
- HGroupID: 0
- }
- });
-
- if (res[1].data.count == 1) {
- this.HManagerNameList = res[1].data.data || [];
- for (let i = 0; i < this.HManagerNameList.length; i++) {
- this.arrayHManagerName[i] = this.HManagerNameList[i].HName;
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: '鑾峰彇璐熻矗浜哄垪琛ㄥけ璐�',
- icon: 'none'
- });
- }
- } catch (error) {
- console.log(error);
- uni.showToast({
- title: '鑾峰彇璐熻矗浜哄垪琛ㄥけ璐�',
- icon: 'none'
- });
- }
- },
-
- // 鑾峰彇鐝粍鍒楄〃
- async getGroupList() {
- try {
- const res = await uni.request({
- url: this.serverUrl + '/Gy_Group/list',
- method: 'GET',
- data: {
- sWhere: "",
- user: uni.getStorageSync('HUserName')
- }
- });
-
- if (res[1].data.count == 1) {
- this.HGroupNameList = res[1].data.data || [];
- for (let i = 0; i < this.HGroupNameList.length; i++) {
- this.arrayHGroupName[i] = this.HGroupNameList[i].鐝粍鍚嶇О || this.HGroupNameList[i].HName;
- }
- this.$forceUpdate();
- } else {
- uni.showToast({
- title: '鑾峰彇鐝粍鍒楄〃澶辫触',
- icon: 'none'
- });
- }
- } catch (error) {
- console.log(error);
- uni.showToast({
- title: '鑾峰彇鐝粍鍒楄〃澶辫触',
- icon: 'none'
- });
- }
- },
-
- // 閫夋嫨鐢熶骇璧勬簮
- HSourceNameChange(e) {
- for (let i = 0; i < this.HSourceNameList.length; i++) {
- if (this.HSourceNameList[i].鐢熶骇璧勬簮 == e) {
- this.hform.HSourceName = this.HSourceNameList[i].鐢熶骇璧勬簮;
- this.hform.HSourceID = this.HSourceNameList[i].HItemID;
- this.hform.HSourceCode = this.HSourceNameList[i].璧勬簮浠g爜 || '';
- break;
- }
- }
- },
-
- // 閫夋嫨璐熻矗浜�
- HManagerNameChange(e) {
- for (let i = 0; i < this.HManagerNameList.length; i++) {
- if (this.HManagerNameList[i].HName == e) {
- this.hform.HManagerName = this.HManagerNameList[i].HName;
- this.hform.HManagerID = this.HManagerNameList[i].HItemID;
- break;
- }
- }
- },
-
- // 閫夋嫨鐝粍
- HGroupNameChange(e) {
- for (let i = 0; i < this.HGroupNameList.length; i++) {
- const groupName = this.HGroupNameList[i].鐝粍鍚嶇О || this.HGroupNameList[i].HName;
- if (groupName == e) {
- this.hform.HGroupName = groupName;
- this.hform.HGroupID = this.HGroupNameList[i].HItemID;
- break;
- }
- }
- },
-
- // 楠岃瘉琛ㄥ崟
- validateForm() {
- if (!this.hform.HSourceID || this.hform.HSourceID == 0) {
- uni.showToast({
- title: '璇烽�夋嫨鐢熶骇璧勬簮',
- icon: 'none'
- });
- return false;
- }
-
- if (!this.hform.HManagerID || this.hform.HManagerID == 0) {
- uni.showToast({
- title: '璇烽�夋嫨璐熻矗浜�',
- icon: 'none'
- });
- return false;
- }
-
- return true;
- },
-
- // 淇濆瓨鏁版嵁
- async save() {
- if (!this.validateForm()) {
- return;
- }
-
- uni.showLoading({
- title: '淇濆瓨涓�...'
- });
-
- try {
- const res = await CommonUtils.doRequest2Sync({
- url: "/ReportPlatForm/SaveGetLineBindBillList",
- data: {
- HUserName: this.hform.HUserName,
- HSourceID: this.hform.HSourceID,
- HSourceName: this.hform.HSourceName,
- HManagerID: this.hform.HManagerID,
- HManagerName: this.hform.HManagerName,
- HGroupID: this.hform.HGroupID,
- HGroupName: this.hform.HGroupName,
- HCreateDate: this.hform.HCreateDate,
- HRemark: this.hform.HRemark
- },
- method: "GET"
- });
-
- uni.hideLoading();
-
- if (res.data.count == 1) {
- uni.showToast({
- title: '淇濆瓨鎴愬姛',
- icon: 'success',
- success: () => {
- setTimeout(() => {
- // 淇濆瓨鎴愬姛鍚庤繑鍥炰笂涓�椤�
- uni.navigateBack();
- }, 1500);
- }
- });
- } else {
- uni.showToast({
- title: res.data.Message || '淇濆瓨澶辫触',
- icon: 'none'
- });
- }
- } catch (err) {
- uni.hideLoading();
- uni.showToast({
- title: '淇濆瓨澶辫触: ' + err,
- icon: 'none'
- });
- }
- },
-
- // 杩斿洖涓婁竴椤�
- goBack() {
- uni.navigateBack();
- }
- },
- onLoad() {
- // 鍒濆鍖栨暟鎹�
- this.hform.HUserName = getUserInfo()['Czymc'] || uni.getStorageSync('HUserName');
- // 鑾峰彇鎵�鏈夊垪琛ㄦ暟鎹�
- this.getListData();
-
- // 鑾峰彇绐楀彛楂樺害
- const systemInfo = uni.getSystemInfoSync();
- this.windowHeight = systemInfo.windowHeight;
- },
- onReady() {
- // 绉婚櫎鍘熸潵鐨勬寜閽綅缃绠楋紝浣跨敤鍥哄畾搴曢儴甯冨眬
- }
- }
+ onUnload() {
+ // 椤甸潰鍏抽棴鏃惰Е鍙戝埛鏂�
+ uni.$emit('refreshDeviceList');
+ },
+ methods: {
+ // 鑾峰彇鎵�鏈夊垪琛ㄦ暟鎹�
+ async getListData() {
+ // 鑾峰彇鐢熶骇璧勬簮鍒楄〃
+ await this.getSourceList();
+ // 鑾峰彇璐熻矗浜哄垪琛紙浜哄憳鍒楄〃锛�
+ await this.getManagerList();
+ // 鑾峰彇鐝粍鍒楄〃
+ await this.getGroupList();
+ },
+
+ // 鑾峰彇鐢熶骇璧勬簮鍒楄〃
+ async getSourceList() {
+ try {
+ const res = await uni.request({
+ url: this.serverUrl + '/api/newBill/getSourceList',
+ data: {
+ sWhere: ""
+ }
+ });
+
+ if (res[1].data.code == 1) {
+ this.HSourceNameList = res[1].data.data.Gy_Source || [];
+ for (let i = 0; i < this.HSourceNameList.length; i++) {
+ this.arrayHSourceName[i] = this.HSourceNameList[i].鐢熶骇璧勬簮;
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '鑾峰彇鐢熶骇璧勬簮鍒楄〃澶辫触',
+ icon: 'none'
+ });
+ }
+ } catch (error) {
+ console.log(error);
+ uni.showToast({
+ title: '鑾峰彇鐢熶骇璧勬簮鍒楄〃澶辫触',
+ icon: 'none'
+ });
+ }
+ },
+
+ // 鑾峰彇璐熻矗浜哄垪琛紙浜哄憳鍒楄〃锛�
+ async getManagerList() {
+ try {
+ const res = await uni.request({
+ url: this.serverUrl + '/Web/GetEmployeeList_Json',
+ data: {
+ Employee: '',
+ HGroupID: 0
+ }
+ });
+
+ if (res[1].data.count == 1) {
+ this.HManagerNameList = res[1].data.data || [];
+ for (let i = 0; i < this.HManagerNameList.length; i++) {
+ this.arrayHManagerName[i] = this.HManagerNameList[i].HName;
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '鑾峰彇璐熻矗浜哄垪琛ㄥけ璐�',
+ icon: 'none'
+ });
+ }
+ } catch (error) {
+ console.log(error);
+ uni.showToast({
+ title: '鑾峰彇璐熻矗浜哄垪琛ㄥけ璐�',
+ icon: 'none'
+ });
+ }
+ },
+
+ // 鑾峰彇鐝粍鍒楄〃
+ async getGroupList() {
+ try {
+ const res = await uni.request({
+ url: this.serverUrl + '/Gy_Group/list',
+ method: 'GET',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName')
+ }
+ });
+
+ if (res[1].data.count == 1) {
+ this.HGroupNameList = res[1].data.data || [];
+ for (let i = 0; i < this.HGroupNameList.length; i++) {
+ this.arrayHGroupName[i] = this.HGroupNameList[i].鐝粍鍚嶇О || this.HGroupNameList[i].HName;
+ }
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: '鑾峰彇鐝粍鍒楄〃澶辫触',
+ icon: 'none'
+ });
+ }
+ } catch (error) {
+ console.log(error);
+ uni.showToast({
+ title: '鑾峰彇鐝粍鍒楄〃澶辫触',
+ icon: 'none'
+ });
+ }
+ },
+
+ // 閫夋嫨鐢熶骇璧勬簮
+ HSourceNameChange(e) {
+ for (let i = 0; i < this.HSourceNameList.length; i++) {
+ if (this.HSourceNameList[i].鐢熶骇璧勬簮 == e) {
+ this.hform.HSourceName = this.HSourceNameList[i].鐢熶骇璧勬簮;
+ this.hform.HSourceID = this.HSourceNameList[i].HItemID;
+ this.hform.HSourceCode = this.HSourceNameList[i].璧勬簮浠g爜 || '';
+ break;
+ }
+ }
+ },
+
+ // 閫夋嫨璐熻矗浜�
+ HManagerNameChange(e) {
+ for (let i = 0; i < this.HManagerNameList.length; i++) {
+ if (this.HManagerNameList[i].HName == e) {
+ this.hform.HManagerName = this.HManagerNameList[i].HName;
+ this.hform.HManagerID = this.HManagerNameList[i].HItemID;
+ break;
+ }
+ }
+ },
+
+ // 閫夋嫨鐝粍
+ HGroupNameChange(e) {
+ for (let i = 0; i < this.HGroupNameList.length; i++) {
+ const groupName = this.HGroupNameList[i].鐝粍鍚嶇О || this.HGroupNameList[i].HName;
+ if (groupName == e) {
+ this.hform.HGroupName = groupName;
+ this.hform.HGroupID = this.HGroupNameList[i].HItemID;
+ break;
+ }
+ }
+ },
+
+ // 楠岃瘉琛ㄥ崟
+ validateForm() {
+ if (!this.hform.HSourceID || this.hform.HSourceID == 0) {
+ uni.showToast({
+ title: '璇烽�夋嫨鐢熶骇璧勬簮',
+ icon: 'none'
+ });
+ return false;
+ }
+
+ if (!this.hform.HManagerID || this.hform.HManagerID == 0) {
+ uni.showToast({
+ title: '璇烽�夋嫨璐熻矗浜�',
+ icon: 'none'
+ });
+ return false;
+ }
+
+ return true;
+ },
+
+ // 淇濆瓨鏁版嵁
+ async save() {
+ if (!this.validateForm()) {
+ return;
+ }
+
+ uni.showLoading({
+ title: '淇濆瓨涓�...'
+ });
+
+ try {
+ const res = await CommonUtils.doRequest2Sync({
+ url: "/ReportPlatForm/SaveGetLineBindBillList",
+ data: {
+ HUserName: this.hform.HUserName,
+ HSourceID: this.hform.HSourceID,
+ HSourceName: this.hform.HSourceName,
+ HManagerID: this.hform.HManagerID,
+ HManagerName: this.hform.HManagerName,
+ HGroupID: this.hform.HGroupID,
+ HGroupName: this.hform.HGroupName,
+ HCreateDate: this.hform.HCreateDate,
+ HRemark: this.hform.HRemark
+ },
+ method: "GET"
+ });
+
+ uni.hideLoading();
+
+ if (res.data.count == 1) {
+ uni.showToast({
+ title: '淇濆瓨鎴愬姛',
+ icon: 'success',
+ success: () => {
+ setTimeout(() => {
+ // 淇濆瓨鎴愬姛鍚庤繑鍥炰笂涓�椤�
+ uni.navigateBack();
+ }, 1500);
+ }
+ });
+ } else {
+ uni.showToast({
+ title: res.data.Message || '淇濆瓨澶辫触',
+ icon: 'none'
+ });
+ }
+ } catch (err) {
+ uni.hideLoading();
+ uni.showToast({
+ title: '淇濆瓨澶辫触: ' + err,
+ icon: 'none'
+ });
+ }
+ },
+
+ // 杩斿洖涓婁竴椤�
+ goBack() {
+ uni.navigateBack();
+ }
+ },
+ onLoad() {
+ // 鍒濆鍖栨暟鎹�
+ this.hform.HUserName = getUserInfo()['Czymc'] || uni.getStorageSync('HUserName');
+ // 鑾峰彇鎵�鏈夊垪琛ㄦ暟鎹�
+ this.getListData();
+
+ // 鑾峰彇绐楀彛楂樺害
+ const systemInfo = uni.getSystemInfoSync();
+ this.windowHeight = systemInfo.windowHeight;
+ },
+ onReady() {
+ // 绉婚櫎鍘熸潵鐨勬寜閽綅缃绠楋紝浣跨敤鍥哄畾搴曢儴甯冨眬
+ }
+ }
</script>
<style lang="scss" scoped>
- .form {
- padding: 20rpx;
- // 娣诲姞搴曢儴鍐呰竟璺濓紝涓哄簳閮ㄦ寜閽暀鍑虹┖闂�
- padding-bottom: 160rpx; // 鎸夐挳楂樺害 + 棰濆闂磋窛
- }
-
- .form-item {
- display: flex;
- align-items: center;
- font-size: 28rpx;
- padding: 6rpx 0;
- margin-bottom: 20rpx;
-
- .title {
- width: 180rpx;
- flex-shrink: 0;
- }
-
- .right {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #acacac;
- padding: 0 20rpx;
- min-height: 70rpx;
- display: flex;
- align-items: center;
-
- input, textarea {
- width: 100%;
- font-size: 30rpx;
- }
-
- textarea {
- padding: 20rpx 0;
- min-height: 100rpx;
- }
- }
-
- .righton {
- flex: 1;
- border-radius: 22rpx;
- border: 1px solid #e4e4e4;
- background-color: #e4e4e4;
- padding: 0 20rpx;
- min-height: 70rpx;
- display: flex;
- align-items: center;
-
- input {
- width: 100%;
- font-size: 30rpx;
- color: #666;
- }
- }
- }
-
- .buttons {
- position: fixed; // 鏀逛负鍥哄畾瀹氫綅
- bottom: 0; // 鍥哄畾鍦ㄥ簳閮�
- left: 0;
- right: 0;
- width: 100%;
- display: flex;
- padding: 20rpx;
- background-color: #fff;
- border-top: 1px solid #eee;
- box-sizing: border-box; // 纭繚鍐呰竟璺濅笉褰卞搷瀹藉害
- z-index: 999; // 纭繚鎸夐挳鍦ㄦ渶涓婂眰
-
- button {
- border-radius: 50rpx;
- width: 180rpx;
- height: 66rpx;
- line-height: 66rpx;
- font-size: 28rpx;
- }
-
- .btn-a {
- background-color: #acacac;
- color: #fff;
- }
-
- .btn-c {
- background-color: #3a78ff;
- color: #fff;
- }
- }
+ .form {
+ padding: 20rpx;
+ // 浣跨敤 calc 璁$畻楂樺害
+ height: calc(100vh - 160rpx);
+ /* 鍑忓幓搴曢儴鎸夐挳鍖哄煙鐨勯珮搴� */
+ overflow: auto;
+ box-sizing: border-box;
+ /* 纭繚鍐呰竟璺濅笉褰卞搷楂樺害璁$畻 */
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ padding: 6rpx 0;
+ margin-bottom: 20rpx;
+ margin-left: 10px;
+
+ .title {
+ width: 180rpx;
+ flex-shrink: 0;
+ }
+
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ padding: 0 20rpx;
+ min-height: 70rpx;
+ display: flex;
+ align-items: center;
+
+ input,
+ textarea {
+ width: 100%;
+ font-size: 30rpx;
+ }
+
+ textarea {
+ padding: 20rpx 0;
+ min-height: 100rpx;
+ }
+ }
+
+ .righton {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ padding: 0 20rpx;
+ min-height: 70rpx;
+ display: flex;
+ align-items: center;
+
+ input {
+ width: 100%;
+ font-size: 30rpx;
+ color: #666;
+ }
+ }
+ }
+
+ .buttons {
+ position: fixed; // 鏀逛负鍥哄畾瀹氫綅
+ bottom: 0; // 鍥哄畾鍦ㄥ簳閮�
+ left: 0;
+ right: 0;
+ width: 100%;
+ display: flex;
+ padding: 20rpx;
+ background-color: #fff;
+ border-top: 1px solid #eee;
+ box-sizing: border-box; // 纭繚鍐呰竟璺濅笉褰卞搷瀹藉害
+ z-index: 999; // 纭繚鎸夐挳鍦ㄦ渶涓婂眰
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #acacac;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1