Browse Source

update: 调整查询条件

xyh 2 years ago
parent
commit
8f9cc7444c
4 changed files with 37 additions and 12 deletions
  1. 6 0
      src/apis/file.js
  2. 3 3
      src/apis/request.js
  3. 16 7
      src/pages/list/filter/field/index.jsx
  4. 12 2
      src/pages/list/filter/index.jsx

+ 6 - 0
src/apis/file.js

@@ -0,0 +1,6 @@
+import {uploadFile} from './request';
+
+/** 上传图片 */
+export function uploadImg(img) {
+  return uploadFile('/upload/uploadFile', img);
+}

+ 3 - 3
src/apis/request.js

@@ -67,11 +67,11 @@ export function put(options) {
   return request({...options, method: 'PUT'});
 }
 
-export function uploadFile(url, skipError) {
+export function uploadFile(url, img, skipError = false) {
   const pr = new Promise(function (res) {
     miniUpload({
-      url: 'https://www.tuyatrip.com/api/upload/uploadFile',
-      filePath: url,
+      url: NETWORK_URL + url,
+      filePath: img,
       name: 'file',
       timeout: 5000,
       header: {

+ 16 - 7
src/pages/list/filter/field/index.jsx

@@ -7,13 +7,22 @@ export default function Field({title, value, disabled, date, anomaly}) {
     function () {
       if (date) {
         return (
-          <Picker mode='date'>
-            <Input
-              className='border-0 border-b border-solid border-gray-200 mt-1 py-1'
-              placeholder={`请选择${title}`}
-              disabled
-            />
-          </Picker>
+          <View className='flex justify-between'>
+            <Picker mode='date' className='w-[48%]'>
+              <Input
+                className='border-0 border-b border-solid border-gray-200 mt-1 py-1'
+                placeholder={`请选择开始时间`}
+                disabled
+              />
+            </Picker>
+            <Picker mode='date' className='w-[48%]'>
+              <Input
+                className='border-0 border-b border-solid border-gray-200 mt-1 py-1'
+                placeholder={`请选择结束时间`}
+                disabled
+              />
+            </Picker>
+          </View>
         );
       }
 

+ 12 - 2
src/pages/list/filter/index.jsx

@@ -1,5 +1,6 @@
-import {Popup} from '@antmjs/vantui';
+import {Button, Popup} from '@antmjs/vantui';
 import Field from './field';
+import {View} from '@tarojs/components';
 
 export default function Filter({visible, onClose}) {
   return (
@@ -9,13 +10,22 @@ export default function Filter({visible, onClose}) {
       closeable
       position='bottom'
       round
-      className='pt-8 px-4 !pb-10'
+      className='pt-8 px-4 !pb-6'
     >
       <Field title='卡车号' />
       <Field title='客户号' />
       <Field title='发货时间' disabled date />
       <Field title='收货时间' disabled date />
       <Field title='异常订单' disabled anomaly />
+
+      <View className='flex justify-around mt-4'>
+        <Button round className='border border-solid border-gray-200 w-28'>
+          重置
+        </Button>
+        <Button type='primary' round className='w-28' color='#58C6EA'>
+          查询
+        </Button>
+      </View>
     </Popup>
   );
 }