This commit is contained in:
hongchao 2025-07-03 11:11:15 +08:00
commit c2d716bb99
3 changed files with 404 additions and 315 deletions

View File

@ -1,7 +1,13 @@
<template>
<view class="accept page-common">
<div class="card">
<uni-forms :model="formData" ref="form" label-width="200rpx" :rule="rules.value" :border="true" >
<uni-forms
:model="formData"
ref="form"
label-width="200rpx"
:rule="rules.value"
:border="true"
>
<uni-forms-item label="领用单位" name="unitId" required>
<eselect
style="width: 100%; height: 90rpx"
@ -22,16 +28,24 @@
@clear="clearPro"
></eselect>
</uni-forms-item>
<!-- <uni-forms-item label="采购申请编号" name="applyCode" required>
<!-- <uni-forms-item label="采购申请编号" name="applyCode" required>
<uni-easyinput v-model="formData.applyCode" maxlength="10" placeholder="请输入采购申请编号" />
</uni-forms-item> -->
<uni-forms-item label="领料人" name="leasePerson" required>
<uni-easyinput v-model="formData.leasePerson" maxlength="10" placeholder="请输入领料人" />
<uni-easyinput
v-model="formData.leasePerson"
maxlength="10"
placeholder="请输入领料人"
/>
</uni-forms-item>
<uni-forms-item label="联系电话" name="phone" required>
<uni-easyinput v-model="formData.phone" maxlength="11" placeholder="请输入联系电话" />
<uni-easyinput
v-model="formData.phone"
maxlength="11"
placeholder="请输入联系电话"
/>
</uni-forms-item>
<uni-forms-item label="标准配置" name="configId" >
<uni-forms-item label="标准配置" name="configId">
<eselect
style="width: 100%; height: 90rpx"
v-model="formData.configId"
@ -41,20 +55,41 @@
@clear="clearConfig"
></eselect>
</uni-forms-item>
<uni-forms-item label="附件" label-width="100rpx" v-if="flagFile">
<div class="upload-wrapper" style="display: flex; flex-wrap: wrap;">
<!-- 上传按钮仅当上传图片数量少于 3 张时显示 -->
<div class="upload" @click="uploadImg" v-if="bmFileInfos.length < 3">+</div>
<!-- 动态展示已上传的图片 -->
<div class="upload" @click="uploadImg" v-for="(img, index) in bmFileInfos" :key="index">
<div class="image-container">
<image :src="img.urlTemp" style="width: 160rpx;height: 160rpx;" mode=""></image>
<!-- 删除 logo这里用一个 span 模拟可替换为实际的 logo 图片 -->
<span class="delete-logo" @click.stop="deleteImg(index)">&times;</span>
<uni-forms-item label="附件" label-width="100rpx" v-if="flagFile">
<div class="upload-wrapper" style="display: flex; flex-wrap: wrap">
<!-- 上传按钮仅当上传图片数量少于 3 张时显示 -->
<div class="upload" @click="uploadImg" v-if="bmFileInfos.length < 3">+</div>
<!-- 动态展示已上传的图片 -->
<div
class="upload"
@click="uploadImg"
v-for="(img, index) in bmFileInfos"
:key="index"
>
<div class="image-container">
<image
:src="img.urlTemp"
style="width: 160rpx; height: 160rpx"
mode=""
></image>
<!-- 删除 logo这里用一个 span 模拟可替换为实际的 logo 图片 -->
<span class="delete-logo" @click.stop="deleteImg(index)"
>&times;</span
>
</div>
</div>
</div>
</div>
</div>
</uni-forms-item>
</uni-forms-item>
<uni-forms-item label="适用班组数" name="fitNum">
<uni-easyinput
v-model="formData.fitNum"
type="number"
placeholder="请输入内容"
maxlength="10"
:clearable="false"
@blur="fitNumChange"
></uni-easyinput>
</uni-forms-item>
</uni-forms>
</div>
<div class="card">
@ -62,17 +97,23 @@
<uni-row :gutter="24" style="display: flex; align-items: center">
<uni-col :span="10">
<view>
<uni-data-select v-model="typeId"
<uni-data-select
v-model="typeId"
placeholder="请选择物资类型"
:localdata="maTypeSelectList" @change="getMaCode" >
:localdata="maTypeSelectList"
@change="getMaCode"
>
</uni-data-select>
</view>
</uni-col>
<uni-col :span="10">
<view>
<uni-data-select v-model="typeCode"
<uni-data-select
v-model="typeCode"
placeholder="请选择规格型号"
:localdata="maCodeSelectList" @change="selectMaCode" >
:localdata="maCodeSelectList"
@change="selectMaCode"
>
</uni-data-select>
</view>
</uni-col>
@ -82,43 +123,61 @@
<uni-table border stripe emptyText="暂无更多数据">
<!-- 表头行 -->
<uni-tr>
<uni-th width="100px" style="font-size: 24rpx;" align="center">类型名称</uni-th>
<uni-th width="100px" style="font-size: 24rpx;" align="center">规格型号</uni-th>
<uni-th width="90px" style="font-size: 24rpx;" align="center">计量单位</uni-th>
<uni-th width="90px" style="font-size: 24rpx;" align="center">预领数量</uni-th>
<uni-th width="90px" style="font-size: 24rpx;" align="center">备注</uni-th>
<uni-th width="70px" style="font-size: 24rpx;" align="center">操作</uni-th>
<uni-th width="100px" style="font-size: 24rpx" align="center"
>类型名称</uni-th
>
<uni-th width="100px" style="font-size: 24rpx" align="center"
>规格型号</uni-th
>
<uni-th width="90px" style="font-size: 24rpx" align="center"
>计量单位</uni-th
>
<uni-th width="90px" style="font-size: 24rpx" align="center"
>预领数量</uni-th
>
<uni-th width="90px" style="font-size: 24rpx" align="center">备注</uni-th>
<uni-th width="70px" style="font-size: 24rpx" align="center">操作</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item,index) in typeList" :key="item.id">
<uni-td style="font-size: 24rpx;text-align: center;">{{item.maTypeName}}</uni-td>
<uni-td style="font-size: 24rpx;text-align: center;">{{item.typeName}}</uni-td>
<uni-td style="font-size: 24rpx;text-align: center;">{{item.unitName}}</uni-td>
<uni-td style="font-size: 24rpx;text-align: center;">
<uni-easyinput
placeholder="预领数量"
v-model="item.preNum"
type="number"
:clearable="false"
<uni-tr v-for="(item, index) in typeList" :key="item.id">
<uni-td style="font-size: 24rpx; text-align: center">{{
item.maTypeName
}}</uni-td>
<uni-td style="font-size: 24rpx; text-align: center">{{
item.typeName
}}</uni-td>
<uni-td style="font-size: 24rpx; text-align: center">{{
item.unitName
}}</uni-td>
<uni-td style="font-size: 24rpx; text-align: center">
<uni-easyinput
placeholder="预领数量"
v-model="item.preNum"
type="number"
:clearable="false"
@input="onChangeNumber(item)"
:styles="{width: '100rpx'}"
:styles="{ width: '100rpx' }"
/>
</uni-td>
<uni-td style="font-size: 24rpx;text-align: center;">
<uni-easyinput
placeholder="备注"
v-model="item.remark"
:clearable="false"
:styles="{width: '100rpx'}"
<uni-td style="font-size: 24rpx; text-align: center">
<uni-easyinput
placeholder="备注"
v-model="item.remark"
:clearable="false"
:styles="{ width: '100rpx' }"
/>
</uni-td>
<uni-td style="font-size: 24rpx;text-align: center;">
<uni-td style="font-size: 24rpx; text-align: center">
<view class="uni-group">
<!-- <view class="action-btn" @click="uploadImg(item)">
<uni-icons type="camera" size="20" style="color: #3784fb;"/>
</view> -->
<view class="action-btn delete" @click="delRow(index)">
<uni-icons type="trash-filled" size="20" style="color: red;margin-left:10px;"/>
<uni-icons
type="trash-filled"
size="20"
style="color: red; margin-left: 10px"
/>
</view>
</view>
</uni-td>
@ -133,25 +192,36 @@
</view>
</template>
<script setup >
<script setup>
import { ref, reactive } from 'vue'
import eselect from '@/components/tree-select/eselect.vue'
import { onLoad,onReady } from '@dcloudio/uni-app'
import { getUnitList,getProjectList,getConfigList,getLevelThreeType,insertApp,getAgreementInfoById,getListsByConfigId,getTypeDataList,leaseTask,getLeaseCode } from '../../services/back.js';
const taskInfo = ref({})
import { onLoad, onReady } from '@dcloudio/uni-app'
import {
getUnitList,
getProjectList,
getConfigList,
getLevelThreeType,
insertApp,
getAgreementInfoById,
getListsByConfigId,
getTypeDataList,
leaseTask,
getLeaseCode,
} from '../../services/back.js'
const taskInfo = ref({})
const treeSelect = ref(null)
const treeSelect2 = ref(null)
const formData = ref({
value: {
unitId: '',
proId: '',
leasePerson: '',
phone: '',
configId: '',
// applyCode: '',
code:''
}
unitId: '',
proId: '',
leasePerson: '',
phone: '',
configId: '',
// applyCode: '',
code: '',
fitNum: 1, //
})
const lastFitNum = ref(formData.value.fitNum)
const unitList = ref([])
const proList = ref([])
@ -162,16 +232,15 @@ const configId = ref('')
const agreementId = ref('')
const maTypeSelectList = ref([])
const typeId = ref("")//
const typeId = ref('') //
const maCodeSelectList = ref([])
const typeCode = ref("")//
const typeList = ref([])
const bmFileInfos = ref([])//
const typeCode = ref('') //
const typeList = ref([])
const bmFileInfos = ref([]) //
// form
const form = ref(null)
const flagFile = ref(false)
//
const rules = ref({
unitId: {
@ -179,18 +248,18 @@ const rules = ref({
{
required: true,
errorMessage: '领用单位为必填项',
trigger: 'change'
}
]
trigger: 'change',
},
],
},
proId: {
rules: [
{
required: true,
errorMessage: '领用工程为必填项',
trigger: 'change'
}
]
trigger: 'change',
},
],
},
// applyCode: {
// rules: [
@ -199,33 +268,50 @@ const rules = ref({
// errorMessage: '',
// trigger: 'blur'
// }
// ]
// ]
// },
leasePerson: {
rules: [
{
required: true,
errorMessage: '领料人为必填项',
trigger: 'blur'
}
]
trigger: 'blur',
},
],
},
phone: {
rules: [
{
required: true,
errorMessage: '联系电话为必填项',
trigger: 'blur'
trigger: 'blur',
},
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
errorMessage: '请输入正确的手机号码',
trigger: 'blur'
}
]
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
errorMessage: '请输入正确的手机号码',
trigger: 'blur',
},
],
},
})
//
const fitNumChange = () => {
const newVal = Math.min(5, Math.max(1, parseInt(formData.value.fitNum) || 1))
console.log('🚀 ~ fitNumChange ~ newVal:', newVal)
//
const ratio = newVal / lastFitNum.value
//
typeList.value.forEach((item) => {
item.preNum = Math.max(1, Math.floor(Number(item.preNum) * ratio)) // 1
})
// formData.fitNum lastFitNum
formData.value.fitNum = newVal
lastFitNum.value = newVal
}
//
const getUnit = () => {
@ -249,7 +335,7 @@ const getUnit = () => {
//
const getProject = async (e) => {
flagFile.value = false
if (e.typeKey == 'fbs') {
if (e && e.typeKey == 'fbs') {
flagFile.value = true
}
console.log('🚀 ~ getProject ~ e:', e)
@ -260,32 +346,32 @@ const getProject = async (e) => {
// "isApp":true
}
try {
const res = await getProjectList(obj);
proList.value = res.data;
const res = await getProjectList(obj)
proList.value = res.data
// proId.value=""
// treeSelect2.value.clearInput();
agreementId.value = '';
agreementId.value = ''
if (unitId.value && proId.value) {
await getAgreement();
await getAgreement()
// getMaType();
}
} catch (error) {
console.log(error);
console.log(error)
}
}
//
const getConfig = () => {
let obj = {
unitId: null,
}
unitId: null,
}
getConfigList(obj)
.then((res) => {
configList.value = res.data
})
.catch((error) => {
console.log(error)
})
})
}
//
@ -293,25 +379,27 @@ const getConfigChange = (e) => {
configId.value = e?.id || ''
formData.value.configId = e?.id || ''
let obj = {
configId: e?.id || '',
}
configId: e?.id || '',
}
getListsByConfigId(obj)
.then((res) => {
console.log(res)
if (res.code == 200 && res.data.length > 0) {
res.data.forEach(item => {
res.data.forEach((item) => {
let param = {
typeId: item.typeId,
typeName: item.typeName,
maTypeName: item.maTypeName,
unitName: item.unitName,
remark: '',
preNum: item.num,
typeId: item.typeId,
typeName: item.typeName,
maTypeName: item.maTypeName,
unitName: item.unitName,
remark: '',
preNum: item.num,
}
// typeList typeId
const exists = typeList.value.some(existingItem => existingItem.typeId === param.typeId);
const exists = typeList.value.some(
(existingItem) => existingItem.typeId === param.typeId,
)
if (!exists) {
typeList.value.push(param);
typeList.value.push(param)
}
})
}
@ -319,7 +407,7 @@ const getConfigChange = (e) => {
})
.catch((error) => {
console.log(error)
})
})
}
//
@ -352,117 +440,119 @@ const getAgreement = async () => {
}
//
const getMaType = () => {
console.log('sdadasda',agreementId.value)
const getMaType = () => {
console.log('sdadasda', agreementId.value)
let obj = {
"level":3,
}
getLevelThreeType(obj).then(res => {
console.log(res)
maTypeSelectList.value = res.data.map(option => {
return {
value:option.typeId,
text:option.name,
}
});
}).catch(error => {
console.log(error)
})
}
level: 3,
}
getLevelThreeType(obj)
.then((res) => {
console.log(res)
maTypeSelectList.value = res.data.map((option) => {
return {
value: option.typeId,
text: option.name,
}
})
})
.catch((error) => {
console.log(error)
})
}
//
const getMaCode = () => {
const getMaCode = () => {
let obj = {
"typeId":typeId.value
}
getTypeDataList(obj).then(res => {
console.log(res)
maCodeSelectList.value = res.data.map(option => {
let obj = {
...option,
value:option.typeId,
text:option.typeName,
typeId: typeId.value,
}
getTypeDataList(obj)
.then((res) => {
console.log(res)
maCodeSelectList.value = res.data.map((option) => {
let obj = {
...option,
value: option.typeId,
text: option.typeName,
}
return obj
})
})
.catch((error) => {
console.log(error)
})
}
const getCode = () => {
let obj = {
typeId: '',
}
getLeaseCode(obj)
.then((res) => {
console.log('xxxxxxxxxxxx', res)
if (res.code == 200) {
formData.value.code = res.data.taskCode
}
return obj
});
}).catch(error => {
console.log(error)
})
})
.catch((error) => {
console.log(error)
})
}
const getCode = () => {
let obj = {
"typeId":''
}
getLeaseCode(obj).then(res => {
console.log('xxxxxxxxxxxx',res)
if(res.code == 200){
formData.value.code = res.data.taskCode
}
}).catch(error => {
console.log(error)
})
}
//
const selectMaCode = (e) => {
const selectMaCode = (e) => {
console.log(e)
// typeList typeId
const exists = typeList.value.some(existingItem => existingItem.typeId === e);
const exists = typeList.value.some((existingItem) => existingItem.typeId === e)
if (exists) {
let name = ''
maCodeSelectList.value.forEach(item => {
maCodeSelectList.value.forEach((item) => {
if (item.typeId === e) {
name = item.typeName
}
name = item.typeName
}
})
uni.showToast({
title: `${name} 已添加到列表中`,
icon: 'none',
duration: 1000
duration: 1000,
})
return
}
maCodeSelectList.value.forEach(item=>{
maCodeSelectList.value.forEach((item) => {
console.log(item)
if(item.typeId==e){
if (item.typeId == e) {
let param = {
typeId:item.typeId,
typeName:item.typeName,
maTypeName:item.maTypeName,
unitName:item.unitName,
remark:'',
preNum:item.num,
typeId: item.typeId,
typeName: item.typeName,
maTypeName: item.maTypeName,
unitName: item.unitName,
remark: '',
preNum: item.num,
}
typeList.value.push(param)
}
})
console.log(typeList.value)
}
}
//
const submitNum = async() => {
const submitNum = async () => {
console.log(typeList.value)
// 使
form.value.validate(async(valid)=>{
console.log('🚀 ~ submitNum ~ valid:', valid)
if(!valid){
if(flagFile.value && bmFileInfos.value.length==0){
await uni.showToast({
// 使
form.value.validate(async (valid) => {
console.log('🚀 ~ submitNum ~ valid:', valid)
if (!valid) {
if (flagFile.value && bmFileInfos.value.length == 0) {
await uni.showToast({
title: '请上传附件',
icon: 'none',
duration: 1000
})
duration: 1000,
})
return
}
// preNum 0
if (typeList.value.length === 0) {
console.log('🚀 ~ submitNum ~ typeList.value:', typeList.value)
await uni.showToast({
await uni.showToast({
title: '请添加申请数据',
icon: 'none',
duration: 1000
duration: 1000,
})
return
}
@ -471,59 +561,59 @@ const submitNum = async() => {
uni.showToast({
title: '预领数量不能为空或等于0',
icon: 'none',
duration: 1000
duration: 1000,
})
return
}
}
let obj = {
"leaseApplyInfo":{
"unitId":unitId.value,
"projectId":proId.value,
"agreementId":agreementId.value,
"leasePerson":formData.value.leasePerson,
"phone":formData.value.phone,
"code": formData.value.code,
"standardConfigId":configId.value,
leaseApplyInfo: {
unitId: unitId.value,
projectId: proId.value,
agreementId: agreementId.value,
leasePerson: formData.value.leasePerson,
phone: formData.value.phone,
code: formData.value.code,
standardConfigId: configId.value,
// "applyCode":formData.value.applyCode,
"bmFileInfos": bmFileInfos.value,
bmFileInfos: bmFileInfos.value,
},
"leaseApplyDetailsList":typeList.value
leaseApplyDetailsList: typeList.value,
}
console.log(obj)
leaseTask(obj).then( res => {
console.log(res)
if(res.code==200){
console.log('xxxxxxxxxxxxxxxx')
uni.showToast({ title: '申请成功', icon: 'none',duration: 1000
})
setTimeout(() => {
uni.navigateBack({
delta: 1
});
}, 1000);
}else{
console.log('yyyyyyyyyyyyy')
uni.showToast({ title: res.msg, icon: 'none',duration: 1000 })
}
}).catch(error => {
console.log(error)
})
}else{
return;
}
})
leaseTask(obj)
.then((res) => {
console.log(res)
if (res.code == 200) {
console.log('xxxxxxxxxxxxxxxx')
uni.showToast({ title: '申请成功', icon: 'none', duration: 1000 })
setTimeout(() => {
uni.navigateBack({
delta: 1,
})
}, 1000)
} else {
console.log('yyyyyyyyyyyyy')
uni.showToast({ title: res.msg, icon: 'none', duration: 1000 })
}
})
.catch((error) => {
console.log(error)
})
} else {
return
}
})
}
}
onReady(() => {
if (form.value) {
//
form.value.setRules(rules.value);
form.value.setRules(rules.value)
} else {
console.error('表单引用未正确初始化');
console.error('表单引用未正确初始化')
}
});
})
onLoad((options) => {
getUnit()
@ -535,7 +625,7 @@ onLoad((options) => {
})
//
const uploadImg = (item) => {
if(bmFileInfos.value.length>=3){
if (bmFileInfos.value.length >= 3) {
uni.showToast({
title: '最多上传3张图片',
icon: 'none',
@ -543,60 +633,60 @@ const uploadImg = (item) => {
return
}
uni.chooseImage({
count: 3 - bmFileInfos.value.length, //
sizeType: ['original', 'compressed'], //original compressed
sourceType: ['album', 'camera',], //album camera 使
success: res => {
console.log(res)
let imgFiles = res.tempFilePaths //
imgFiles.forEach((filePath) => {
console.log('2222222222222222222222')
bmFileInfos.value.push({urlTemp:filePath})
})
console.log('🚀 ~ uploadImg ~ imgFiles:', imgFiles)
// imgBeseUrl.value = imgFiles[0]
// console.log('', imgFiles)
// console.log('', baseURL+"/file/upload")
bmFileInfos.value.forEach((item,index) => {
uni.uploadFile({
// url: baseURL+"/file/upload",//app
url: "/file/upload",//h5
filePath: item.urlTemp,
name: 'file',
success: (res) => {
res = JSON.parse(res.data)
console.log('上传成功', res.code);
console.log('上传成功', res.data);
if(res.code&&res.code==200){
bmFileInfos.value[index] = {
...bmFileInfos.value[index],
name: res.data.name,
url: res.data.url
};
uni.showToast({ title: '上传成功', icon: 'none' })
}else{
uni.showToast({ title: '上传失败', icon: 'none' })
}
},
fail: (err) => {
console.error('上传失败', err);
}
});
});
count: 3 - bmFileInfos.value.length, //
sizeType: ['original', 'compressed'], //original compressed
sourceType: ['album', 'camera'], //album camera 使
success: (res) => {
console.log(res)
let imgFiles = res.tempFilePaths //
imgFiles.forEach((filePath) => {
console.log('2222222222222222222222')
bmFileInfos.value.push({ urlTemp: filePath })
})
console.log('🚀 ~ uploadImg ~ imgFiles:', imgFiles)
// imgBeseUrl.value = imgFiles[0]
// console.log('', imgFiles)
// console.log('', baseURL+"/file/upload")
bmFileInfos.value.forEach((item, index) => {
uni.uploadFile({
// url: baseURL+"/file/upload",//app
url: '/file/upload', //h5
filePath: item.urlTemp,
name: 'file',
success: (res) => {
res = JSON.parse(res.data)
console.log('上传成功', res.code)
console.log('上传成功', res.data)
if (res.code && res.code == 200) {
bmFileInfos.value[index] = {
...bmFileInfos.value[index],
name: res.data.name,
url: res.data.url,
}
uni.showToast({ title: '上传成功', icon: 'none' })
} else {
uni.showToast({ title: '上传失败', icon: 'none' })
}
},
fail: (err) => {
console.error('上传失败', err)
},
})
})
// this.$refs.vForm.clearValidate()
}
})
// this.$refs.vForm.clearValidate()
},
})
}
const deleteImg = (index) => {
bmFileInfos.value.splice(index, 1);
bmFileInfos.value.splice(index, 1)
// bmFileInfosTemp.value.splice(index, 1);
};
}
//
const delRow = (index) => {
console.log(index)
console.log(typeList.value)
typeList.value.splice(index,1)
typeList.value.splice(index, 1)
}
// change
const onChangeNumber = (item) => {
@ -605,23 +695,23 @@ const onChangeNumber = (item) => {
// console.log(item.num)
// let maxNum = Number(item.num)
// // outboundNum.value
// setTimeout(()=>{
// if(item.unitValue==1){
// item.preNum = Number(String(item.preNum).replace(/[^\d.]/g,''))
// }else{
// item.preNum = Number(String(item.preNum).replace(/[^\d]/g,''))
// }
// if (Number(item.preNum)<= 0) {
// item.preNum = 0;
// setTimeout(()=>{
// if(item.unitValue==1){
// item.preNum = Number(String(item.preNum).replace(/[^\d.]/g,''))
// }else{
// item.preNum = Number(String(item.preNum).replace(/[^\d]/g,''))
// }
// if (Number(item.preNum)<= 0) {
// item.preNum = 0;
// }
// if (Number(item.preNum) > maxNum) {
// uni.showToast({
// title: '',
// icon: 'none',
// })
// item.preNum = maxNum;
// })
// item.preNum = maxNum;
// }
// },500)
// },500)
}
const changeNum = (row) => {
// console.log('🚀 ~ changeNum ~ row:', row)
@ -642,7 +732,7 @@ const changeNum = (row) => {
// uni.showToast({
// title: '退',
// icon: 'none',
// })
// })
// row.badNum = 0
// row.goodNum = 0
// }
@ -664,7 +754,6 @@ const clearConfig = () => {
configId.value = ''
getConfig()
}
</script>
<style lang="scss">
@ -718,23 +807,23 @@ const clearConfig = () => {
}
}
}
//
.uni-group {
display: flex;
justify-content: center;
align-items: center;
.uni-icons {
padding: 8rpx;
border-radius: 8rpx;
transition: all 0.3s ease;
&:active {
transform: scale(0.9);
opacity: 0.8;
}
}
}
//
.uni-group {
display: flex;
justify-content: center;
align-items: center;
.uni-icons {
padding: 8rpx;
border-radius: 8rpx;
transition: all 0.3s ease;
&:active {
transform: scale(0.9);
opacity: 0.8;
}
}
}
//
.select-area {
@ -811,29 +900,29 @@ const clearConfig = () => {
}
//
.upload {
width: 160rpx;
height: 160rpx;
background-color: #f7f8fa;
border: 2rpx dashed #d9d9d9;
border-radius: 12rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 48rpx;
color: #bfbfbf;
transition: all 0.3s ease;
width: 160rpx;
height: 160rpx;
background-color: #f7f8fa;
border: 2rpx dashed #d9d9d9;
border-radius: 12rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 48rpx;
color: #bfbfbf;
transition: all 0.3s ease;
&:active {
background-color: #f0f0f0;
border-color: #3784fb;
}
&:active {
background-color: #f0f0f0;
border-color: #3784fb;
}
image {
width: 100%;
height: 100%;
border-radius: 12rpx;
object-fit: cover;
}
image {
width: 100%;
height: 100%;
border-radius: 12rpx;
object-fit: cover;
}
}
.image-container {
position: relative;

View File

@ -64,7 +64,7 @@
maxlength="200"
></uni-easyinput>
</uni-forms-item>
<uni-forms-item label="适用班组数" name="fitNum" v-if="!opts.isOut">
<!-- <uni-forms-item label="适用班组数" name="fitNum" v-if="!opts.isOut">
<uni-easyinput
v-model="formData.fitNum"
type="number"
@ -73,7 +73,7 @@
:clearable="false"
@blur="fitNumChange"
></uni-easyinput>
</uni-forms-item>
</uni-forms-item> -->
<uni-section title="领用工具器" type="line" />
<eselect
v-model="equipmentId"

View File

@ -1,7 +1,7 @@
<template>
<view class="accept">
<div class="card">
<uni-forms label-width="170rpx" :border="true">
<uni-forms label-width="91px" :border="true">
<uni-forms-item label="机具类型:" name="maName" required>
<select-one style="width: 100%; height: 90rpx" :options="maNameList" placeholder="请选择机具类型"
@change="onMaNameChange" @clear="onMaNameClear" />