Browse Source

优化登录页 优化财务管理 回款管理

hml 11 tháng trước cách đây
mục cha
commit
ae021d7dd9

+ 78 - 43
src/pages/login/Login.vue

@@ -1,49 +1,56 @@
 <template>
   <wd-toast />
   <view class="login">
-    <view class="login-main">
-      <view style="text-align: center; width: 100%">
-        <image src="@/static/logo.png" style="height: 400rpx; width: 560rpx" />
+    <view class="login-bg">
+      <view class="login-bg-logo">
+        <image src="@/static/logo2.png" style="height: 150rpx; width: 130rpx" />
       </view>
-      <!--      <text class="login-main-title">欢迎登陆</text>-->
+      <text class="login-main-title">你好,欢迎登陆!</text>
+    </view>
+    <view class="login-main">
       <!--      <view class="login-main-subtitle">樟木实业有限公司</view>-->
       <view class="login-main-body">
         <view class="h-30" />
         <div class="flex justify-center" />
         <view class="h-20" />
-        <wd-input
-          key="username"
-          v-model="username"
-          label-width="140rpx"
-          label="用户名:"
-          clearable
-          placeholder="请输入用户名"
-          :maxlength="20"
-        />
-        <view class="border border-full h-1" />
-        <wd-input
-          key="username"
-          v-model="password"
-          label-width="140rpx"
-          label="密码:"
-          show-password
-          clearable
-          placeholder="请输入密码"
-        />
-        <wd-input
-          key="username"
-          v-model="code"
-          label-width="140rpx"
-          label="验证码:"
-          :focus="codeFocus"
-          clearable
-          placeholder="验证码"
-          :use-suffix-slot="true"
-        >
-          <template #suffix>
-            <wd-img :width="'200rpx'" :height="'90rpx'" :src="codeSrc" @click="getCode" />
-          </template>
-        </wd-input>
+        <div class="login-main-body-input">
+          <wd-input
+            key="username"
+            v-model="username"
+            :no-border="true"
+            clearable
+            placeholder="请输入用户名"
+            :maxlength="20"
+          />
+        </div>
+        <!-- <view class="border border-full h-1" /> -->
+        <div class="login-main-body-input">
+          <wd-input
+            key="username"
+            v-model="password"
+            :no-border="true"
+            show-password
+            clearable
+            placeholder="请输入密码"
+          />
+        </div>
+
+        <div class="login-main-body-input">
+          <wd-input
+            key="username"
+            v-model="code"
+            :no-border="true"
+            :focus="codeFocus"
+            clearable
+            placeholder="验证码"
+            :use-suffix-slot="true"
+          >
+            <template #suffix>
+              <wd-img :width="'200rpx'" :height="'70rpx'" :src="codeSrc" @click="getCode" />
+            </template>
+          </wd-input>
+        </div>
+
         <view class="login-password">
           <view class="h-20" />
           <wd-button size="large" block type="success" @click="doLogin">登录</wd-button>
@@ -163,16 +170,35 @@ const openPrivacyContract = () => {
 <style lang="scss" scoped>
 .login {
   font-family: PingFangSC-Regular, PingFang SC;
-  background-image: url('https://pic.imgdb.cn/item/65796604c458853aef1aec2a.jpg');
+  // background-image: url('https://miniapp.zhangmushiye.com/img/bg/miniappbg.png');
   height: calc(100vh - var(--window-top));
   width: 100vw;
   box-sizing: border-box;
   display: flex;
+  flex-direction: column;
   align-items: center;
-  background-size: 100% 100%;
-
+  // background-position: 75% 100%;
+  &-bg {
+    width: 100%;
+    height: 55%;
+    background-image: url('https://miniapp.zhangmushiye.com/img/bg/miniappbg.png');
+    background-size: 100% 100%;
+    &-logo {
+      width: 170rpx;
+      height: 170rpx;
+      margin: 0 auto;
+      padding: 25rpx;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      border-radius: 50rpx;
+      background-color: #fff;
+      margin-top: 280rpx;
+    }
+  }
   &-main {
-    padding: 75rpx 40rpx;
+    width: 100%;
+    // padding: 0rpx 40rpx;
     position: relative;
     display: flex;
     flex-direction: column;
@@ -189,6 +215,7 @@ const openPrivacyContract = () => {
       line-height: 64rpx;
       letter-spacing: 8rpx;
       color: #ffffff;
+      margin-top: 50rpx;
     }
 
     &-subtitle {
@@ -207,10 +234,18 @@ const openPrivacyContract = () => {
       width: 100%;
       border-radius: 30rpx;
       background-color: rgba(255, 255, 255);
-      padding: 20rpx 20rpx 60rpx 20rpx;
-      margin-top: 100rpx;
+      padding: 20rpx 60rpx;
+      margin-top: -100rpx;
+      border-radius: 40rpx;
+      &-input {
+        background-color: rgb(244, 248, 251);
+        padding: 20rpx 30rpx;
+        border-radius: 15rpx;
+        margin-bottom: 20rpx;
+      }
       .login-password {
         padding: 10rpx;
+        margin-top: 100rpx;
       }
     }
   }

+ 18 - 9
src/pages/payment/list.vue

@@ -1,13 +1,7 @@
 <template>
   <view class="list">
     <view class="search">
-      <wd-search
-        ref="search"
-        v-model="value"
-        cancel-txt="搜索"
-        @cancel="onSearch"
-        :disabled="searchType === '项目名称'"
-      >
+      <wd-search ref="search" v-model="value" cancel-txt="搜索" @cancel="onSearch" @focus="onFocus">
         <template #prefix>
           <wd-popover v-model="show" mode="menu" :content="menu" @menuclick="changeSearchType">
             <view class="search-type">
@@ -76,14 +70,18 @@
     @select="onSelect"
     cancel-text="取消"
   ></wd-action-sheet>
+  <wd-popup v-model="dateShow" position="bottom" custom-style="height: 600px;">
+    <wd-calendar-view type="monthrange" :min-date="minDate" v-model="dateValue" />
+  </wd-popup>
   <wd-message-box />
   <wd-toast />
 </template>
 <script setup>
 import { onLoad, onReachBottom, onShow, onUnload } from '@dcloudio/uni-app';
 import dataService from '@/api/procure';
-import { ref, onMounted } from 'vue';
+import { ref, onMounted, computed } from 'vue';
 import { useMessage, useToast } from 'wot-design-uni';
+import moment from 'moment';
 import config from '@/http/config';
 const message = useMessage();
 const toast = useToast();
@@ -94,6 +92,9 @@ const columns = ref([]);
 const columnDict = ref({});
 const show = ref(false);
 const sheetShow = ref(false);
+const dateValue = ref([]);
+const dateShow = ref(false);
+const minDate = ref(0);
 const menu = ref([
   {
     content: '汇款单位名称',
@@ -142,6 +143,12 @@ onUnload(() => {
   uni.$off('refresh');
 });
 
+function onFocus() {
+  if (searchType.value === '项目名称') {
+    sheetShow.value = true;
+  }
+}
+
 // 查看详情
 function detailClick(item) {
   uni.navigateTo({
@@ -321,7 +328,7 @@ function changeSearchType(e) {
   isMore.value = true;
   if (e.item.value === 3) {
     sheetShow.value = true;
-  } else {
+  } else if (e.item.value === 2) {
     form.value.paramList = [
       {
         cubeColumnId: 558,
@@ -330,6 +337,8 @@ function changeSearchType(e) {
       },
     ];
     getFormList();
+  } else {
+    dateShow.value = true;
   }
 }
 

+ 2 - 2
src/pages/payment/view.vue

@@ -15,9 +15,9 @@
       <wd-cell :title="detail.COL_ALIAS_3.text" :value="detail.COL_ALIAS_3.value"></wd-cell>
       <wd-cell :title="detail.COL_ALIAS_8.text" :value="detail.COL_ALIAS_8.value"></wd-cell>
       <wd-cell :title="detail.COL_ALIAS_17.text" :value="detail.COL_ALIAS_17.value"></wd-cell>
+      <wd-cell :title="detail.COL_ALIAS_9.text" :value="detail.COL_ALIAS_9.value"></wd-cell>
+      <wd-cell :title="detail.COL_ALIAS_10.text" :value="detail.COL_ALIAS_10.value"></wd-cell>
       <!-- <wd-cell :title="detail.COL_ALIAS_0.text" :value="detail.COL_ALIAS_0.value"></wd-cell>
-      <wd-cell :title="detail.COL_ALIAS_0.text" :value="detail.COL_ALIAS_0.value"></wd-cell>
-      <wd-cell :title="detail.COL_ALIAS_0.text" :value="detail.COL_ALIAS_0.value"></wd-cell>
       <wd-cell :title="detail.COL_ALIAS_0.text" :value="detail.COL_ALIAS_0.value"></wd-cell> -->
     </wd-cell-group>
   </view>

+ 12 - 6
src/pages/procure/edit.vue

@@ -8,7 +8,6 @@
         @confirm="handleConfirm($event, 1)"
       />
       <wd-input label="采购单号" readonly v-model="detail.COL_ALIAS_23.value" />
-      <wd-input label="采购单名称" required v-model="detail.COL_ALIAS_1.value" />
       <wd-picker
         :columns="columns"
         @confirm="projectClick($event, 1)"
@@ -16,6 +15,7 @@
         v-model="detail.COL_ALIAS_7.value"
         required
       />
+      <wd-input v-if="detail.COL_ALIAS_7.value" label="采购单名称" required v-model="detail.COL_ALIAS_1.value" />
       <wd-picker
         :columns="oilList"
         required
@@ -56,7 +56,6 @@
         @confirm="handleConfirm($event, 2)"
       />
       <wd-input label="采购单号" placeholder="自动生成" readonly v-model="fields[875]" />
-      <wd-input required label="采购单名称" v-model="fields[572]" />
       <wd-picker
         :columns="columns"
         @confirm="projectClick($event, 2)"
@@ -64,6 +63,7 @@
         v-model="fields[578]"
         required
       />
+      <wd-input v-if="fields[578] != ''" required label="采购单名称" v-model="fields[572]" />
       <wd-picker
         v-if="fields[578] != ''"
         :columns="oilList"
@@ -91,7 +91,7 @@
       <wd-input required type="digit" label="采购单价(元)" v-model="fields[585]" />
       <wd-input required type="digit" label="采购金额(元)" v-model="fields[586]" />
       <wd-input required label="市场价" type="digit" v-model="fields[587]" />
-      <wd-input required label="折吨价" type="digit" v-model="fields[588]" />
+      <wd-input label="折吨价" type="digit" v-model="fields[588]" />
       <wd-input required label="下浮价" type="digit" v-model="fields[589]" />
       <wd-input required label="销售价格" type="digit" v-model="fields[590]" />
       <wd-input required label="价差" type="digit" v-model="fields[591]" />
@@ -199,7 +199,6 @@ function formAdd() {
     fields.value[585] == '' ||
     fields.value[586] == '' ||
     fields.value[587] == '' ||
-    fields.value[588] == '' ||
     fields.value[589] == '' ||
     fields.value[590] == '' ||
     fields.value[591] == ''
@@ -210,6 +209,9 @@ function formAdd() {
   const date = new Date();
   fields.value[581] = moment(date).valueOf();
   fields.value[582] = moment(date).valueOf();
+  if (fields.value[588] == '') {
+    fields.value[588] = null;
+  }
   const params = {
     formKey: formId.value,
     data: [
@@ -278,12 +280,14 @@ function getOilList() {
 function projectClick(e, num) {
   if (num == 1) {
     detail.value.COL_ALIAS_7.value = e.value;
+    detail.value.COL_ALIAS_1.value = e.value;
     detail.value.COL_ALIAS_6.value = projectArr.value.find(
       (child) => child['项目名称'] === e.value
     )['项目编号'];
     getOilList();
   } else {
     fields.value[578] = e.value;
+    fields.value[572] = e.value;
     fields.value[577] = projectArr.value.find((child) => child['项目名称'] === e.value)['项目编号'];
   }
   getCollection();
@@ -321,7 +325,6 @@ function formSubmit() {
     detail.value.COL_ALIAS_14.value == '' ||
     detail.value.COL_ALIAS_15.value == '' ||
     detail.value.COL_ALIAS_16.value == '' ||
-    detail.value.COL_ALIAS_17.value == '' ||
     detail.value.COL_ALIAS_18.value == '' ||
     detail.value.COL_ALIAS_19.value == '' ||
     detail.value.COL_ALIAS_20.value == ''
@@ -330,8 +333,11 @@ function formSubmit() {
     return;
   }
   detail.value.COL_ALIAS_0.value = moment(detail.value.COL_ALIAS_0.value).valueOf();
-  detail.value.COL_ALIAS_10.value = moment(new Date()).valueOf();
+  detail.value.COL_ALIAS_10.value = moment(detail.value.COL_ALIAS_10.value).valueOf();
   detail.value.COL_ALIAS_11.value = moment(new Date()).valueOf();
+  if(detail.value.COL_ALIAS_17.value==''){
+    detail.value.COL_ALIAS_17.value = null;
+  }
   delete detail.value.COL_ALIAS_21;
   let dataObj = {};
   for (const key in detail.value) {

+ 7 - 1
src/pages/procure/list.vue

@@ -6,7 +6,7 @@
         v-model="value"
         cancel-txt="搜索"
         @cancel="onSearch"
-        :disabled="searchType == '项目名称'"
+        @focus="searchClick"
       >
         <template #prefix>
           <wd-popover v-model="show" mode="menu" :content="menu" @menuclick="changeSearchType">
@@ -153,6 +153,12 @@ onReachBottom(() => {
   }
 });
 
+function searchClick() {
+  if (searchType.value === '项目名称') {
+    sheetShow.value = true;
+  }
+}
+
 // 查看详情
 function detailClick(item) {
   uni.navigateTo({

+ 2 - 0
src/pages/procure/view.vue

@@ -20,6 +20,8 @@
       <wd-cell :title="detail.COL_ALIAS_5.text" :value="detail.COL_ALIAS_5.value"></wd-cell>
       <wd-cell :title="detail.COL_ALIAS_6.text" :value="detail.COL_ALIAS_6.value"></wd-cell>
       <wd-cell :title="detail.COL_ALIAS_9.text" :value="detail.COL_ALIAS_9.value"></wd-cell>
+      <wd-cell :title="detail.COL_ALIAS_10.text" :value="detail.COL_ALIAS_10.value"></wd-cell>
+      <wd-cell :title="detail.COL_ALIAS_11.text" :value="detail.COL_ALIAS_11.value"></wd-cell>
     </wd-cell-group>
   </view>
 </template>

BIN
src/static/logo2.png