65 changed files with 1293 additions and 1149 deletions
@ -1,14 +0,0 @@ |
|||||
VITE_BASE_URL=http://172.21.32.13:81/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api |
|
||||
|
|
||||
# 租户配置 |
|
||||
VITE_TENANT='[{"text":"长春1379","value":1}]' |
|
||||
|
|
||||
# 是否是测试环境 |
|
||||
VITE_isDevelopment=false |
|
||||
|
|
||||
# 积木报表请求路径 |
|
||||
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' |
|
||||
|
|
||||
# 项目管理模式 批次货/包装 |
|
||||
VITE_MANAGE_MODEL="BY_BATCH" |
|
@ -1,14 +0,0 @@ |
|||||
VITE_BASE_URL=http://172.21.32.14:81/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=http://172.21.32.14:81/admin-api |
|
||||
|
|
||||
# 租户配置 |
|
||||
VITE_TENANT='[{"text":"长春1379","value":1}]' |
|
||||
|
|
||||
# 是否是测试环境 |
|
||||
VITE_isDevelopment=true |
|
||||
|
|
||||
# 积木报表请求路径 |
|
||||
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' |
|
||||
|
|
||||
# 项目管理模式 批次货/包装 |
|
||||
VITE_MANAGE_MODEL="BY_BATCH" |
|
@ -1,14 +0,0 @@ |
|||||
VITE_BASE_URL=https://scp.faway-hella.com:81/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=https://scp.faway-hella.com:81/admin-api |
|
||||
|
|
||||
# 租户配置 |
|
||||
VITE_TENANT='[{"text":"长春1379","value":1}]' |
|
||||
|
|
||||
# 是否是测试环境 |
|
||||
VITE_isDevelopment=true |
|
||||
|
|
||||
# 积木报表请求路径 |
|
||||
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com' |
|
||||
|
|
||||
# 项目管理模式 批次货/包装 |
|
||||
VITE_MANAGE_MODEL="BY_BATCH" |
|
@ -1,14 +0,0 @@ |
|||||
VITE_BASE_URL=https://scptest.faway-hella.com:81/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=https://scptest.faway-hella.com:81/admin-api |
|
||||
|
|
||||
# 租户配置 |
|
||||
VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' |
|
||||
|
|
||||
# 是否是测试环境 |
|
||||
VITE_isDevelopment=true |
|
||||
|
|
||||
# 积木报表请求路径 |
|
||||
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' |
|
||||
|
|
||||
# 项目管理模式 批次货/包装 |
|
||||
VITE_MANAGE_MODEL="BY_BATCH" |
|
@ -1,15 +0,0 @@ |
|||||
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api |
|
||||
|
|
||||
# 租户配置 |
|
||||
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' |
|
||||
|
|
||||
# 是否是测试环境 |
|
||||
VITE_isDevelopment=false |
|
||||
|
|
||||
|
|
||||
# 积木报表请求路径 |
|
||||
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' |
|
||||
|
|
||||
# 项目管理模式 批次货/包装 |
|
||||
VITE_MANAGE_MODEL="BY_BATCH" |
|
@ -1,14 +0,0 @@ |
|||||
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api |
|
||||
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api |
|
||||
|
|
||||
# 租户配置 |
|
||||
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' |
|
||||
|
|
||||
# 是否是测试环境 |
|
||||
VITE_isDevelopment=true |
|
||||
|
|
||||
# 积木报表请求路径 |
|
||||
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' |
|
||||
|
|
||||
# 项目管理模式 批次货/包装 |
|
||||
VITE_MANAGE_MODEL="BY_BATCH" |
|
@ -1,15 +1,14 @@ |
|||||
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api |
VITE_BASE_URL=http://192.168.120.34:81/api/admin-api |
||||
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api |
VITE_BASE_URL_IMAGE=http://192.168.120.34:81/admin-api |
||||
|
|
||||
# 租户配置 |
# 租户配置 |
||||
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' |
VITE_TENANT='[{"text":"英泰","value":1}]' |
||||
|
|
||||
# 是否是测试环境 |
# 是否是测试环境 |
||||
VITE_isDevelopment=false |
VITE_isDevelopment=true |
||||
|
|
||||
|
|
||||
# 积木报表请求路径 |
# 积木报表请求路径 |
||||
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' |
VITE_JMREPORT_BASE_URL='http://192.168.120.34:81/api' |
||||
|
|
||||
# 项目管理模式 批次货/包装 |
# 项目管理模式 批次货/包装 |
||||
VITE_MANAGE_MODEL="BY_BATCH" |
VITE_MANAGE_MODEL="BY_BATCH" |
@ -1,12 +1,14 @@ |
|||||
|
VITE_BASE_URL=http://192.168.120.35:81/api/admin-api |
||||
VITE_BASE_URL=http://dev.ccwin-in.com:25300/api/admin-api |
VITE_BASE_URL_IMAGE=http://192.168.120.35:81/admin-api |
||||
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:25300/admin-api |
|
||||
|
|
||||
# 租户配置 |
# 租户配置 |
||||
VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' |
VITE_TENANT='[{"text":"英泰","value":1}]' |
||||
|
|
||||
# 是否是测试环境 |
# 是否是测试环境 |
||||
VITE_isDevelopment=true |
VITE_isDevelopment=true |
||||
|
|
||||
# 积木报表请求路径 |
# 积木报表请求路径 |
||||
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' |
VITE_JMREPORT_BASE_URL='http://192.168.120.35:81/api' |
||||
|
|
||||
|
# 项目管理模式 批次货/包装 |
||||
|
VITE_MANAGE_MODEL="BY_BATCH" |
@ -0,0 +1,15 @@ |
|||||
|
VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api |
||||
|
VITE_BASE_URL_IMAGE=http://dev.ccwin-in.com:28051/admin-api |
||||
|
|
||||
|
# 租户配置 |
||||
|
VITE_TENANT='[{"text":"英泰","value":1}]' |
||||
|
|
||||
|
# 是否是测试环境 |
||||
|
VITE_isDevelopment=false |
||||
|
|
||||
|
|
||||
|
# 积木报表请求路径 |
||||
|
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:28051' |
||||
|
|
||||
|
# 项目管理模式 批次货/包装 |
||||
|
VITE_MANAGE_MODEL="BY_BATCH" |
@ -1,7 +0,0 @@ |
|||||
# 设置基础镜像 |
|
||||
FROM win-nginx |
|
||||
|
|
||||
WORKDIR /opt/sfms3.0-uniapp |
|
||||
COPY nginx_prod.conf /usr/local/nginx/conf/nginx.conf |
|
||||
# 将dist/build/h5/文件中的内容复制到 /opt/sfms3.0-uniapp 这个目录下面 |
|
||||
COPY dist/build/h5/ /opt/sfms3.0-uniapp |
|
@ -1,57 +0,0 @@ |
|||||
user root; |
|
||||
worker_processes 2; |
|
||||
|
|
||||
events { |
|
||||
worker_connections 1024; |
|
||||
} |
|
||||
|
|
||||
http { |
|
||||
include mime.types; |
|
||||
charset utf-8,gbk; |
|
||||
default_type application/octet-stream; |
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
|
||||
'$status $body_bytes_sent "$http_referer" ' |
|
||||
'"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; |
|
||||
|
|
||||
proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g; |
|
||||
access_log logs/access.log main; |
|
||||
sendfile on; |
|
||||
#tcp_nopush on; |
|
||||
keepalive_timeout 600s; |
|
||||
client_max_body_size 200m; |
|
||||
gzip on; |
|
||||
gzip_min_length 10k; |
|
||||
gzip_comp_level 9; |
|
||||
gzip_buffers 4 16k; |
|
||||
gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; |
|
||||
gzip_vary on; |
|
||||
gzip_disable "MSIE [1-6]\."; |
|
||||
upstream sfms3.0 { |
|
||||
server localhost:90 weight=10 max_fails=3 fail_timeout=10s; |
|
||||
} |
|
||||
server { |
|
||||
listen 81; |
|
||||
server_name_in_redirect off; |
|
||||
server_name _; |
|
||||
location /api/ { |
|
||||
proxy_pass http://sfms3.0/; |
|
||||
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; |
|
||||
proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; |
|
||||
proxy_set_header Host $http_host; |
|
||||
proxy_set_header X-Real-IP $remote_addr; |
|
||||
proxy_set_header X-Forwarded-For $http_x_forwarded_for; |
|
||||
} |
|
||||
location /profile/ { |
|
||||
alias /opt/profile/; |
|
||||
index index.html index.htm; |
|
||||
} |
|
||||
location / { |
|
||||
proxy_cache my_zone; |
|
||||
proxy_cache_valid 200 304 12h; |
|
||||
proxy_cache_key $host$uri$is_args$args; |
|
||||
try_files $uri $uri/ /index.html; |
|
||||
root /opt/sfms3.0-uniapp; |
|
||||
index index.html index.htm; |
|
||||
} |
|
||||
} |
|
||||
} |
|
File diff suppressed because it is too large
@ -0,0 +1,297 @@ |
|||||
|
<template> |
||||
|
<view class=""> |
||||
|
<u-popup v-model="showOne" mode="bottom" border-radius="14" z-index='12'> |
||||
|
<view class="title"> |
||||
|
<view class="title-txt"> |
||||
|
需求信息 |
||||
|
</view> |
||||
|
<u-icon name="close" color="#4f4f4f" size="28" @click="showOne = false"></u-icon> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">来源库位:</view> |
||||
|
<view class="value"><u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg"></u-input></view> |
||||
|
<view class="searchIcon"> |
||||
|
<image src="/static/search.svg" mode="" @click="fromLocationClick"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">零件:</view> |
||||
|
<view class="value"><u-input v-model="itemCode" @confirm="itemCodeScanMsg"></u-input></view> |
||||
|
<view class="searchIcon"> |
||||
|
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">批次:</view> |
||||
|
<view class="value"> |
||||
|
<u-input v-model='batch'></u-input> |
||||
|
</view> |
||||
|
<view class="searchIcon"></view> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<view class="label">数量:</view> |
||||
|
<view class="value1"> |
||||
|
<u-number-box v-model="handleQty" @change="valChange"></u-number-box> |
||||
|
<view class="uom">EA</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="uni-flex uni-row hide_border"> |
||||
|
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="showOne = false">取消</button> |
||||
|
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
||||
|
</view> |
||||
|
</u-popup> |
||||
|
|
||||
|
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation' |
||||
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> --> |
||||
|
<comMessage ref="comMessage"></comMessage> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
||||
|
import { |
||||
|
getBusinessType |
||||
|
} from '@/common/record.js'; |
||||
|
|
||||
|
import { |
||||
|
getLabelInfo |
||||
|
} from '../../../common/label.js'; |
||||
|
|
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
winScanLocation |
||||
|
}, |
||||
|
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'], |
||||
|
data() { |
||||
|
return { |
||||
|
show:true, |
||||
|
handleQty:0, |
||||
|
fromLocationCode:'', |
||||
|
itemCode:'', |
||||
|
batch:'', |
||||
|
showOne:true |
||||
|
} |
||||
|
}, |
||||
|
props: { |
||||
|
fromLocationCodeProps:{ |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
// 是否显示第一层弹窗 |
||||
|
showOnePop: { |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
itemCodeProps:{ |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
batchProps:{ |
||||
|
type: String, |
||||
|
default: '' |
||||
|
}, |
||||
|
isClearFromLocationCode:{ |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
isClearItemCode:{ |
||||
|
type: Boolean, |
||||
|
default: false |
||||
|
}, |
||||
|
}, |
||||
|
mounted() { |
||||
|
}, |
||||
|
methods: { |
||||
|
// 打开扫描来源库位组件 |
||||
|
fromLocationClick(){ |
||||
|
// this.$refs.scanLocationCode.openScanPopup() |
||||
|
this.$emit("showFromLocationPopup"); |
||||
|
}, |
||||
|
// 显示箱码 |
||||
|
itemCodeClick(){ |
||||
|
// this.$refs.scanLocationCode.openScanPopup() |
||||
|
if(!this.fromLocationCode){ |
||||
|
this.$refs.comMessage.showMessage("请先扫描来源库位") |
||||
|
return |
||||
|
} |
||||
|
this.$emit("itemCodeClick"); |
||||
|
}, |
||||
|
confirm(){ |
||||
|
// this.$refs.scanLocationCode.openScanPopup() |
||||
|
|
||||
|
let obj = { |
||||
|
fromLocationCode:this.fromLocationCode, |
||||
|
itemCode:this.itemCode, |
||||
|
batch:this.batch, |
||||
|
handleQty:this.handleQty, |
||||
|
} |
||||
|
this.$emit("confirm",obj); |
||||
|
}, |
||||
|
fromLocationScanMsg(){ |
||||
|
console.log(111,this.fromLocationCode) |
||||
|
this.scanMsg = this.fromLocationCode |
||||
|
this.fromWitch = 'fromLocationScanMsg' |
||||
|
this.handelScanMsg() |
||||
|
}, |
||||
|
itemCodeScanMsg(){ |
||||
|
if(!this.fromLocationCode){ |
||||
|
this.$refs.comMessage.showMessage("请先扫描来源库位") |
||||
|
return |
||||
|
} |
||||
|
this.fromWitch = 'itemCodeScanMsg' |
||||
|
this.scanMsg = this.itemCode |
||||
|
this.handelScanMsg() |
||||
|
}, |
||||
|
handelScanMsg() { |
||||
|
//点击了回车 |
||||
|
// uni.showLoading({ |
||||
|
// title: '解析中...', |
||||
|
// mask: true |
||||
|
// }) |
||||
|
let that = this; |
||||
|
console.log(777,that.scanMsg) |
||||
|
// if(index==-1){ |
||||
|
// that.scanMsg =that.scanMsg + "\n"; |
||||
|
// } |
||||
|
console.log(that.scanMsg.includes('\n')) |
||||
|
// if (that.scanMsg.includes('\n')) { |
||||
|
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; |
||||
|
setTimeout(() => { |
||||
|
that.losefocus(); |
||||
|
let content = uni.$u.trim(that.scanMsg) |
||||
|
if (content == "") { |
||||
|
// that.getfocus(); |
||||
|
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { |
||||
|
if (res) { |
||||
|
that.scanMsg = "" |
||||
|
that.getfocus(); |
||||
|
} |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
if (that.isShowHistory) { |
||||
|
that.scanList.unshift(content); |
||||
|
} |
||||
|
|
||||
|
getLabelInfo(content, this.headerType, callback => { |
||||
|
// uni.hideLoading(); |
||||
|
let scanResult = callback; |
||||
|
scanResult.scanMessage = content |
||||
|
if (scanResult.success) { |
||||
|
// that.getfocus();//不能自动获取焦点 |
||||
|
console.log(scanResult) |
||||
|
that.$emit("getInputMsgResult", scanResult,this.fromWitch); |
||||
|
} else { |
||||
|
that.losefocus(); |
||||
|
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { |
||||
|
if (res) { |
||||
|
that.getfocus(); |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}); |
||||
|
}, 200); |
||||
|
// } |
||||
|
}, |
||||
|
losefocus() { |
||||
|
let that = this; |
||||
|
this.$nextTick(r => { |
||||
|
that.boxfocus = false; |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
fromLocationCodeProps:{ |
||||
|
handler(newVal, oldVal) { |
||||
|
console.log('wer',this.isClearFromLocationCode) |
||||
|
console.log('wer',newVal) |
||||
|
if(this.isClearFromLocationCode){ |
||||
|
this.fromLocationCode='' |
||||
|
}else{ |
||||
|
this.fromLocationCode = newVal |
||||
|
} |
||||
|
}, |
||||
|
// deep: true, |
||||
|
// immediate: true |
||||
|
}, |
||||
|
itemCodeProps: { |
||||
|
handler(newVal, oldVal) { |
||||
|
if(this.isClearItemCode){ |
||||
|
this.itemCode='' |
||||
|
this.batch='' |
||||
|
}else{ |
||||
|
this.itemCode = newVal |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
batchProps(newVal) { |
||||
|
this.batch = newVal |
||||
|
console.log(999,this.batch) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.title{ |
||||
|
padding:30rpx 20rpx; |
||||
|
display: flex; |
||||
|
border-bottom:1px solid rgba(230, 230, 230, 1); |
||||
|
.title-txt{ |
||||
|
flex:1; |
||||
|
font-weight: bold; |
||||
|
font-size: 32rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
.select{ |
||||
|
display: flex; |
||||
|
} |
||||
|
.border{ |
||||
|
border:1px solid rgba(230, 230, 230, 1) |
||||
|
} |
||||
|
::v-deep .u-input__right-icon__clear{ |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
color: #a7a7a7; |
||||
|
} |
||||
|
.item{ |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
padding: 20rpx; |
||||
|
border-bottom: 1px solid #dedede; |
||||
|
.value{ |
||||
|
flex:1; |
||||
|
width: 0px; |
||||
|
height: 80rpx; |
||||
|
border: 1px solid #dedede; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
font-size: 32rpx; |
||||
|
padding: 0px 20rpx; |
||||
|
} |
||||
|
.value1{ |
||||
|
flex:1; |
||||
|
width: 0px; |
||||
|
height: 80rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
font-size: 32rpx; |
||||
|
} |
||||
|
.searchIcon{ |
||||
|
width: 40rpx; |
||||
|
margin-left: 20rpx; |
||||
|
image{ |
||||
|
width: 40rpx; |
||||
|
height:40rpx |
||||
|
} |
||||
|
} |
||||
|
.uom{ |
||||
|
margin-left: 10rpx; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -1,327 +0,0 @@ |
|||||
<!-- 合格转隔离扫码组件 --> |
|
||||
<template> |
|
||||
<u-popup |
|
||||
v-model="show" |
|
||||
:mode="mode" |
|
||||
:mask='mask' |
|
||||
:length='length' |
|
||||
:zoom='zoom' |
|
||||
:safe-area-inset-bottom='safeAreaInsetBottom' |
|
||||
:mask-close-able='maskCloseAble' |
|
||||
:custom-style='customStyle' |
|
||||
:border-radius='borderBadius' |
|
||||
:z-index='zIndex' |
|
||||
:closeable='closeable' |
|
||||
:close-icon='closeIcon' |
|
||||
:close-icon-pos='closeIconPos' |
|
||||
:close-icon-color='closeIconColor' |
|
||||
:close-icon-size='closeIconSize' |
|
||||
:width='width' |
|
||||
:height='height' |
|
||||
:negative-top='negativeTop' |
|
||||
:mask-custom-style='maskCustomStyle' |
|
||||
:duration='duration' |
|
||||
:blur='blur' |
|
||||
@open='open' |
|
||||
@close='close' |
|
||||
> |
|
||||
<view> |
|
||||
<view class="title"> |
|
||||
<view class="title-txt"> |
|
||||
需求 |
|
||||
</view> |
|
||||
<u-icon name="close" color="#4f4f4f" size="28"></u-icon> |
|
||||
</view> |
|
||||
<u-form |
|
||||
class="form" |
|
||||
:model="allData" |
|
||||
ref="formRef" |
|
||||
:rules="rules" |
|
||||
:error-type="errorType" |
|
||||
:border-bottom="borderBottom" |
|
||||
:label-position="labelPosition" |
|
||||
:label-width="labelWidth" |
|
||||
:label-style="labelStyle" |
|
||||
:label-align="labelAlign" |
|
||||
@setRules='setRules' |
|
||||
@resetFields='resetFields' |
|
||||
@validate='validate' |
|
||||
> |
|
||||
<u-form-item |
|
||||
:label="item.label" |
|
||||
:prop="item.field" |
|
||||
v-for="(item,index) in formField" |
|
||||
:key='index' |
|
||||
:border-bottom="item.form.formItemBorderBottom == true || item.form.formItemBorderBottom == false ? item.form.formItemBorderBottom : true" |
|
||||
:label-position="item.form.formItemLabelPosition || 'left'" |
|
||||
:label-width="item.form.formItemLabelWidth || ''" |
|
||||
:label-style="item.form.formItemLabelStyle || {}" |
|
||||
:label-align="item.form.formItemLabelAlign || ''" |
|
||||
:right-icon="item.form.rightIcon || ''" |
|
||||
:left-icon="item.form.leftIcon || ''" |
|
||||
:left-icon-style="item.form.leftIconStyle || ''" |
|
||||
:right-icon-style="item.form.righIconStyle || ''" |
|
||||
:required="item.form.required || false" |
|
||||
> |
|
||||
<view :class="item.form.border ? 'border' : formItemBorder ? 'border' : ''" class="item"> |
|
||||
|
|
||||
<u-input |
|
||||
v-if="item.form.type == 'text'||item.form.type == 'password'||item.form.type == 'textarea'||item.form.type == 'number'" |
|
||||
v-model="allData[item.field]" |
|
||||
:type='item.form.type' |
|
||||
:clearable='item.form.clearable == true || item.form.clearable == false ? item.form.clearable : true' |
|
||||
:input-align="item.form.inputAlign || 'left'" |
|
||||
:placeholder="item.form.placeholder || `请输入${[item.label]}`" |
|
||||
:disabled='item.form.disabled || false' |
|
||||
:maxlength='item.form.maxlength || 140' |
|
||||
:placeholder-style='item.form.placeholderStyle || "color: #c0c4cc;"' |
|
||||
:confirm-type='item.form.confirmType ||"done"' |
|
||||
:custom-style='item.form.customStyle' |
|
||||
:focus='item.form.focus || false' |
|
||||
:fixed='item.form.fixed || false' |
|
||||
:password-icon='item.form.passwordIcon == true || item.form.passwordIcon == false ? item.form.passwordIcon : true' |
|
||||
:border-color='item.form.borderColor ? item.form.borderColor : formItemBorderColor ? formItemBorderColor : "#dcdfe6"' |
|
||||
:auto-height='item.form.autoHeight == true || item.form.autoHeight == false ? item.form.autoHeight : true' |
|
||||
:height='item.form.height' |
|
||||
:cursor-spacing='item.form.cursorSpacing' |
|
||||
:selection-start='item.form.selectionStart' |
|
||||
:selection-end='item.form.selectionEnd' |
|
||||
:show-confirmbar='item.form.showConfirmbar' |
|
||||
:adjust-position='item.form.adjustPosition' |
|
||||
/> |
|
||||
<!-- <u-input v-model="allData[item.field]" v-if="item.form.type == 'Select'"/> --> |
|
||||
<view class="select" v-if="item.form.type == 'select'"> |
|
||||
<u-input |
|
||||
v-model="allData[item.field]" |
|
||||
type='text' |
|
||||
:clearable='item.form.clearable == true || item.form.clearable == false ? item.form.clearable : true' |
|
||||
:input-align="item.form.inputAlign || 'left'" |
|
||||
:placeholder="item.form.placeholder || `请输入${[item.label]}`" |
|
||||
:disabled='item.form.disabled || false' |
|
||||
:maxlength='item.form.maxlength || 140' |
|
||||
:placeholder-style='item.form.placeholderStyle || "color: #c0c4cc;"' |
|
||||
:confirm-type='item.form.confirmType ||"done"' |
|
||||
:custom-style='item.form.customStyle' |
|
||||
:focus='item.form.focus || false' |
|
||||
:fixed='item.form.fixed || false' |
|
||||
:password-icon='item.form.passwordIcon == true || item.form.passwordIcon == false ? item.form.passwordIcon : true' |
|
||||
:border='false' |
|
||||
:border-color='item.form.borderColor ? item.form.borderColor : formItemBorderColor ? formItemBorderColor : "#dcdfe6"' |
|
||||
:auto-height='item.form.autoHeight == true || item.form.autoHeight == false ? item.form.autoHeight : true' |
|
||||
:height='item.form.height' |
|
||||
:cursor-spacing='item.form.cursorSpacing' |
|
||||
:selection-start='item.form.selectionStart' |
|
||||
:selection-end='item.form.selectionEnd' |
|
||||
:show-confirmbar='item.form.showConfirmbar' |
|
||||
:adjust-position='item.form.adjustPosition' |
|
||||
/> |
|
||||
<u-icon name="arrow-down-fill" color="#878787" size="28"></u-icon> |
|
||||
</view> |
|
||||
</view> |
|
||||
</u-form-item> |
|
||||
</u-form> |
|
||||
</view> |
|
||||
</u-popup> |
|
||||
</template> |
|
||||
<script> |
|
||||
export default { |
|
||||
components: { |
|
||||
|
|
||||
}, |
|
||||
props: { |
|
||||
// 弹窗参数 |
|
||||
mode:{ |
|
||||
type: String, |
|
||||
default: 'bottom', |
|
||||
}, |
|
||||
mask:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
length:{ |
|
||||
type: String, |
|
||||
default: 'auto' |
|
||||
}, |
|
||||
zoom:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
safeAreaInsetBottom:{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
maskCloseAble:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
customStyle:{ |
|
||||
type: Number, |
|
||||
default: ()=>{} |
|
||||
}, |
|
||||
borderBadius:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
zIndex:{ |
|
||||
type: Number, |
|
||||
default: 10075 |
|
||||
}, |
|
||||
closeable:{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
closeIcon:{ |
|
||||
type: String, |
|
||||
default: 'close' |
|
||||
}, |
|
||||
closeIconPos:{ |
|
||||
type: String, |
|
||||
default: 'top-right' |
|
||||
}, |
|
||||
closeIconColor:{ |
|
||||
type: String, |
|
||||
default: '#909399' |
|
||||
}, |
|
||||
closeIconSize:{ |
|
||||
type: Number, |
|
||||
default: 30 |
|
||||
}, |
|
||||
width:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
height:{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
negativeTop:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
maskCustomStyle:{ |
|
||||
type: Object, |
|
||||
default:()=>{} |
|
||||
}, |
|
||||
duration:{ |
|
||||
type: Number, |
|
||||
default: 250 |
|
||||
}, |
|
||||
blur:{ |
|
||||
type: Number, |
|
||||
default: 0 |
|
||||
}, |
|
||||
|
|
||||
// 表单参数 |
|
||||
// 表单字段 |
|
||||
formField:{ |
|
||||
type: Array, |
|
||||
default: ()=>[] |
|
||||
}, |
|
||||
// 数据 |
|
||||
allData:{ |
|
||||
|
|
||||
}, |
|
||||
rules:{ |
|
||||
type: Object, |
|
||||
default: ()=>{} |
|
||||
}, |
|
||||
errorType:{ |
|
||||
type: Array, |
|
||||
default:()=>['message'] |
|
||||
}, |
|
||||
borderBottom:{ |
|
||||
type: Boolean, |
|
||||
default: true |
|
||||
}, |
|
||||
labelPosition:{ |
|
||||
type: String, |
|
||||
default: 'left' |
|
||||
}, |
|
||||
labelWidth:{ |
|
||||
type: Number, |
|
||||
default: 90 |
|
||||
}, |
|
||||
labelStyle:{ |
|
||||
type: Object, |
|
||||
default: ()=>{} |
|
||||
}, |
|
||||
labelAlign:{ |
|
||||
type: String, |
|
||||
default: 'left' |
|
||||
}, |
|
||||
formItemBorder :{ |
|
||||
type: Boolean, |
|
||||
default: false |
|
||||
}, |
|
||||
formItemBorderColor :{ |
|
||||
type: String, |
|
||||
default: '' |
|
||||
}, |
|
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
show:true, |
|
||||
|
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
mounted() { |
|
||||
// this.$refs.form1.setRules(this.rules); |
|
||||
}, |
|
||||
methods: { |
|
||||
// 打开弹窗 |
|
||||
open(){ |
|
||||
|
|
||||
}, |
|
||||
// 关闭弹窗 |
|
||||
close(){ |
|
||||
|
|
||||
}, |
|
||||
// 设置校验规则 |
|
||||
setRules(){ |
|
||||
|
|
||||
}, |
|
||||
// 对整个表单进行重置,将所有字段值重置为初始值并移除校验结果 |
|
||||
resetFields(){ |
|
||||
|
|
||||
}, |
|
||||
// 对整个表单进行校验的方法 |
|
||||
validate(){ |
|
||||
|
|
||||
}, |
|
||||
} |
|
||||
} |
|
||||
</script> |
|
||||
|
|
||||
<style> |
|
||||
.form{ |
|
||||
padding: 0px 20rpx; |
|
||||
font-size: 24rpx; |
|
||||
} |
|
||||
.item{ |
|
||||
flex:1;padding: 0px 20rpx; |
|
||||
} |
|
||||
.title{ |
|
||||
padding:20rpx; |
|
||||
display: flex; |
|
||||
border-bottom:1px solid rgba(230, 230, 230, 1); |
|
||||
.title-txt{ |
|
||||
flex:1; |
|
||||
font-weight: bold; |
|
||||
font-size: 32rpx; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
.select{ |
|
||||
display: flex; |
|
||||
} |
|
||||
.border{ |
|
||||
border:1px solid rgba(230, 230, 230, 1) |
|
||||
} |
|
||||
::v-deep .u-input__right-icon__clear{ |
|
||||
display: flex; |
|
||||
align-items: center; |
|
||||
justify-content: center; |
|
||||
color: #a7a7a7; |
|
||||
} |
|
||||
</style> |
|
Loading…
Reference in new issue