解决无法启动以及启动时报错问题
This commit is contained in:
parent
293da5a635
commit
d2f9a8c965
File diff suppressed because it is too large
Load Diff
|
|
@ -63,7 +63,7 @@
|
||||||
"pinia": "^2.2.2",
|
"pinia": "^2.2.2",
|
||||||
"pinia-plugin-persistedstate": "^3.2.3",
|
"pinia-plugin-persistedstate": "^3.2.3",
|
||||||
"sass": "^1.32.13",
|
"sass": "^1.32.13",
|
||||||
"sass-loader": "^16.0.3",
|
"sass-loader": "^10.1.1",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.13",
|
||||||
"vue-i18n": "^9.14.1"
|
"vue-i18n": "^9.14.1"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,7 @@
|
||||||
<view class="accept page-common">
|
<view class="accept page-common">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<h2 style="padding: 4rpx 0; font-weight: bold">转出方信息</h2>
|
<h2 style="padding: 4rpx 0; font-weight: bold">转出方信息</h2>
|
||||||
<uni-forms
|
<uni-forms :model="formDataOut" ref="formOut" label-width="200rpx" :rule="rulesOut.value">
|
||||||
:model="formDataOut"
|
|
||||||
ref="formOut"
|
|
||||||
label-width="200rpx"
|
|
||||||
:rule="rulesOut.value"
|
|
||||||
>
|
|
||||||
<uni-forms-item label="转出单位:" name="unitId" required>
|
<uni-forms-item label="转出单位:" name="unitId" required>
|
||||||
<eselect
|
<eselect
|
||||||
style="width: 100%; height: 90rpx"
|
style="width: 100%; height: 90rpx"
|
||||||
|
|
@ -82,11 +77,7 @@
|
||||||
/>
|
/>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="联系电话:" name="phoneIn" required>
|
<uni-forms-item label="联系电话:" name="phoneIn" required>
|
||||||
<uni-easyinput
|
<uni-easyinput v-model="formDataIn.phoneIn" maxlength="11" placeholder="请输入联系电话" />
|
||||||
v-model="formDataIn.phoneIn"
|
|
||||||
maxlength="11"
|
|
||||||
placeholder="请输入联系电话"
|
|
||||||
/>
|
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -97,18 +88,9 @@
|
||||||
<!-- 上传按钮,仅当上传图片数量少于 3 张时显示 -->
|
<!-- 上传按钮,仅当上传图片数量少于 3 张时显示 -->
|
||||||
<div class="upload" @click="uploadImg" v-if="bmFileInfos.length < 3">+</div>
|
<div class="upload" @click="uploadImg" v-if="bmFileInfos.length < 3">+</div>
|
||||||
<!-- 动态展示已上传的图片 -->
|
<!-- 动态展示已上传的图片 -->
|
||||||
<div
|
<div class="upload" @click="uploadImg" v-for="(img, index) in bmFileInfos" :key="index">
|
||||||
class="upload"
|
|
||||||
@click="uploadImg"
|
|
||||||
v-for="(img, index) in bmFileInfos"
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
<image
|
<image :src="img.urlTemp" style="width: 160rpx; height: 160rpx" mode=""></image>
|
||||||
:src="img.urlTemp"
|
|
||||||
style="width: 160rpx; height: 160rpx"
|
|
||||||
mode=""
|
|
||||||
></image>
|
|
||||||
<!-- 删除 logo,这里用一个 span 模拟,可替换为实际的 logo 图片 -->
|
<!-- 删除 logo,这里用一个 span 模拟,可替换为实际的 logo 图片 -->
|
||||||
<span class="delete-logo" @click.stop="deleteImg(index)">×</span>
|
<span class="delete-logo" @click.stop="deleteImg(index)">×</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -136,7 +118,7 @@ import {
|
||||||
getAgreementInfoById,
|
getAgreementInfoById,
|
||||||
getListsByConfigId,
|
getListsByConfigId,
|
||||||
getTypeDataList,
|
getTypeDataList,
|
||||||
leaseTask,
|
// leaseTask,
|
||||||
} from '../../services/back.js'
|
} from '../../services/back.js'
|
||||||
import { getDirectRotationDetail } from '@/services/integratedQuery'
|
import { getDirectRotationDetail } from '@/services/integratedQuery'
|
||||||
|
|
||||||
|
|
@ -295,7 +277,7 @@ const getUnitOut = () => {
|
||||||
}
|
}
|
||||||
getUnitList(obj)
|
getUnitList(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("xxxxxxxxxx",res)
|
console.log('xxxxxxxxxx', res)
|
||||||
unitListOut.value = res.data
|
unitListOut.value = res.data
|
||||||
// getAgreement()
|
// getAgreement()
|
||||||
if (formDataOut.value.unitId && formDataOut.value.projectId) {
|
if (formDataOut.value.unitId && formDataOut.value.projectId) {
|
||||||
|
|
@ -487,7 +469,7 @@ onReady((opt) => {
|
||||||
|
|
||||||
console.log('🚀 ~ opt:', opt)
|
console.log('🚀 ~ opt:', opt)
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log("uuuuuuuuuuuuu",options)
|
console.log('uuuuuuuuuuuuu', options)
|
||||||
if (options && options.params) {
|
if (options && options.params) {
|
||||||
opt = JSON.parse(options.params)
|
opt = JSON.parse(options.params)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ import {
|
||||||
insertApp,
|
insertApp,
|
||||||
getAgreementInfoById,
|
getAgreementInfoById,
|
||||||
getTypeDataList,
|
getTypeDataList,
|
||||||
leaseTask,
|
// leaseTask,
|
||||||
discountSubmit,
|
discountSubmit,
|
||||||
} from '../../services/back.js'
|
} from '../../services/back.js'
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="accept page-common">
|
<view class="accept page-common">
|
||||||
<div class="card">
|
<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="teamId" required>
|
<uni-forms-item label="领用班组" name="teamId" required>
|
||||||
<uni-data-select v-model="formData.teamId"
|
<uni-data-select
|
||||||
|
v-model="formData.teamId"
|
||||||
placeholder="请选择领用班组"
|
placeholder="请选择领用班组"
|
||||||
:localdata="unitList" @change="getUnit" >
|
:localdata="unitList"
|
||||||
|
@change="getUnit"
|
||||||
|
>
|
||||||
</uni-data-select>
|
</uni-data-select>
|
||||||
<!-- <eselect
|
<!-- <eselect
|
||||||
style="width: 100%; height: 90rpx"
|
style="width: 100%; height: 90rpx"
|
||||||
|
|
@ -46,13 +55,13 @@
|
||||||
></eselect>
|
></eselect>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="附件" label-width="100rpx" v-if="flagFile">
|
<uni-forms-item label="附件" label-width="100rpx" v-if="flagFile">
|
||||||
<div class="upload-wrapper" style="display: flex; flex-wrap: wrap;">
|
<div class="upload-wrapper" style="display: flex; flex-wrap: wrap">
|
||||||
<!-- 上传按钮,仅当上传图片数量少于 3 张时显示 -->
|
<!-- 上传按钮,仅当上传图片数量少于 3 张时显示 -->
|
||||||
<div class="upload" @click="uploadImg" v-if="bmFileInfos.length < 3">+</div>
|
<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="upload" @click="uploadImg" v-for="(img, index) in bmFileInfos" :key="index">
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
<image :src="img.urlTemp" style="width: 160rpx;height: 160rpx;" mode=""></image>
|
<image :src="img.urlTemp" style="width: 160rpx; height: 160rpx" mode=""></image>
|
||||||
<!-- 删除 logo,这里用一个 span 模拟,可替换为实际的 logo 图片 -->
|
<!-- 删除 logo,这里用一个 span 模拟,可替换为实际的 logo 图片 -->
|
||||||
<span class="delete-logo" @click.stop="deleteImg(index)">×</span>
|
<span class="delete-logo" @click.stop="deleteImg(index)">×</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -66,17 +75,23 @@
|
||||||
<uni-row :gutter="24" style="display: flex; align-items: center">
|
<uni-row :gutter="24" style="display: flex; align-items: center">
|
||||||
<uni-col :span="10">
|
<uni-col :span="10">
|
||||||
<view>
|
<view>
|
||||||
<uni-data-select v-model="typeId"
|
<uni-data-select
|
||||||
|
v-model="typeId"
|
||||||
placeholder="请选择物资类型"
|
placeholder="请选择物资类型"
|
||||||
:localdata="maTypeSelectList" @change="getMaCode" >
|
:localdata="maTypeSelectList"
|
||||||
|
@change="getMaCode"
|
||||||
|
>
|
||||||
</uni-data-select>
|
</uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="10">
|
<uni-col :span="10">
|
||||||
<view>
|
<view>
|
||||||
<uni-data-select v-model="typeCode"
|
<uni-data-select
|
||||||
|
v-model="typeCode"
|
||||||
placeholder="请选择规格型号"
|
placeholder="请选择规格型号"
|
||||||
:localdata="maCodeSelectList" @change="selectMaCode" >
|
:localdata="maCodeSelectList"
|
||||||
|
@change="selectMaCode"
|
||||||
|
>
|
||||||
</uni-data-select>
|
</uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
|
|
@ -86,19 +101,19 @@
|
||||||
<uni-table border stripe emptyText="暂无更多数据">
|
<uni-table border stripe emptyText="暂无更多数据">
|
||||||
<!-- 表头行 -->
|
<!-- 表头行 -->
|
||||||
<uni-tr>
|
<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="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="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="70px" style="font-size: 24rpx" align="center">操作</uni-th>
|
||||||
</uni-tr>
|
</uni-tr>
|
||||||
<!-- 表格数据行 -->
|
<!-- 表格数据行 -->
|
||||||
<uni-tr v-for="(item, index) in typeList" :key="item.id">
|
<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.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.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">{{ item.unitName }}</uni-td>
|
||||||
<uni-td style="font-size: 24rpx;text-align: center;">
|
<uni-td style="font-size: 24rpx; text-align: center">
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
placeholder="预领数量"
|
placeholder="预领数量"
|
||||||
v-model="item.preNum"
|
v-model="item.preNum"
|
||||||
|
|
@ -108,7 +123,7 @@
|
||||||
:styles="{ width: '100rpx' }"
|
:styles="{ width: '100rpx' }"
|
||||||
/>
|
/>
|
||||||
</uni-td>
|
</uni-td>
|
||||||
<uni-td style="font-size: 24rpx;text-align: center;">
|
<uni-td style="font-size: 24rpx; text-align: center">
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
placeholder="备注"
|
placeholder="备注"
|
||||||
v-model="item.remark"
|
v-model="item.remark"
|
||||||
|
|
@ -116,13 +131,13 @@
|
||||||
:styles="{ width: '100rpx' }"
|
:styles="{ width: '100rpx' }"
|
||||||
/>
|
/>
|
||||||
</uni-td>
|
</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="uni-group">
|
||||||
<!-- <view class="action-btn" @click="uploadImg(item)">
|
<!-- <view class="action-btn" @click="uploadImg(item)">
|
||||||
<uni-icons type="camera" size="20" style="color: #3784fb;"/>
|
<uni-icons type="camera" size="20" style="color: #3784fb;"/>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="action-btn delete" @click="delRow(index)">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</uni-td>
|
</uni-td>
|
||||||
|
|
@ -141,7 +156,18 @@
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import eselect from '@/components/tree-select/eselect.vue'
|
import eselect from '@/components/tree-select/eselect.vue'
|
||||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||||
import { getBmTeamList,getProjectList,getConfigList,getLevelThreeType,insertApp,getAgreementInfoById,getListsByConfigId,getTypeDataList,leaseTask } from '@/services/back.js';
|
import {
|
||||||
|
getBmTeamList,
|
||||||
|
getProjectList,
|
||||||
|
getConfigList,
|
||||||
|
getLevelThreeType,
|
||||||
|
insertApp,
|
||||||
|
getAgreementInfoById,
|
||||||
|
getListsByConfigId,
|
||||||
|
getTypeDataList,
|
||||||
|
// leaseTask,
|
||||||
|
addLeaseTask,
|
||||||
|
} from '@/services/back.js'
|
||||||
const taskInfo = ref({})
|
const taskInfo = ref({})
|
||||||
const treeSelect = ref(null)
|
const treeSelect = ref(null)
|
||||||
const treeSelect2 = ref(null)
|
const treeSelect2 = ref(null)
|
||||||
|
|
@ -153,8 +179,7 @@ const formData = ref({
|
||||||
phone: '',
|
phone: '',
|
||||||
configId: '',
|
configId: '',
|
||||||
applyCode: '',
|
applyCode: '',
|
||||||
|
},
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const unitList = ref([])
|
const unitList = ref([])
|
||||||
|
|
@ -166,16 +191,15 @@ const configId = ref('')
|
||||||
const agreementId = ref('')
|
const agreementId = ref('')
|
||||||
|
|
||||||
const maTypeSelectList = ref([])
|
const maTypeSelectList = ref([])
|
||||||
const typeId = ref("")//类型
|
const typeId = ref('') //类型
|
||||||
const maCodeSelectList = ref([])
|
const maCodeSelectList = ref([])
|
||||||
const typeCode = ref("")//规格型号
|
const typeCode = ref('') //规格型号
|
||||||
const typeList = ref([])
|
const typeList = ref([])
|
||||||
const bmFileInfos = ref([]) //图片数组
|
const bmFileInfos = ref([]) //图片数组
|
||||||
// 定义 form 引用
|
// 定义 form 引用
|
||||||
const form = ref(null)
|
const form = ref(null)
|
||||||
const flagFile = ref(false)
|
const flagFile = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// 定义表单验证规则
|
// 定义表单验证规则
|
||||||
const rules = ref({
|
const rules = ref({
|
||||||
unitId: {
|
unitId: {
|
||||||
|
|
@ -183,54 +207,53 @@ const rules = ref({
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '领用单位为必填项',
|
errorMessage: '领用单位为必填项',
|
||||||
trigger: 'change'
|
trigger: 'change',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
proId: {
|
proId: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '领用工程为必填项',
|
errorMessage: '领用工程为必填项',
|
||||||
trigger: 'change'
|
trigger: 'change',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
applyCode: {
|
applyCode: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '采购申请编号为必填项',
|
errorMessage: '采购申请编号为必填项',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
leasePerson: {
|
leasePerson: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '领料人为必填项',
|
errorMessage: '领料人为必填项',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
phone: {
|
phone: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '联系电话为必填项',
|
errorMessage: '联系电话为必填项',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||||
errorMessage: '请输入正确的手机号码',
|
errorMessage: '请输入正确的手机号码',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
//单位
|
//单位
|
||||||
const getUnit = () => {
|
const getUnit = () => {
|
||||||
// proId.value=e.id;
|
// proId.value=e.id;
|
||||||
|
|
@ -242,7 +265,7 @@ const getUnit = () => {
|
||||||
console.log('🚀 ~ .班组 ~ res:', res)
|
console.log('🚀 ~ .班组 ~ res:', res)
|
||||||
// unitList.value = res.data
|
// unitList.value = res.data
|
||||||
if (res.data.rows.length > 0) {
|
if (res.data.rows.length > 0) {
|
||||||
unitList.value = res.data.rows.map(option => {
|
unitList.value = res.data.rows.map((option) => {
|
||||||
return {
|
return {
|
||||||
value: option.id,
|
value: option.id,
|
||||||
text: option.teamName,
|
text: option.teamName,
|
||||||
|
|
@ -275,17 +298,17 @@ const getProject = async () => {
|
||||||
// // "isApp":true
|
// // "isApp":true
|
||||||
// }
|
// }
|
||||||
try {
|
try {
|
||||||
const res = await getProjectList({});
|
const res = await getProjectList({})
|
||||||
proList.value = res.data;
|
proList.value = res.data
|
||||||
// proId.value=""
|
// proId.value=""
|
||||||
// treeSelect2.value.clearInput();
|
// treeSelect2.value.clearInput();
|
||||||
agreementId.value = '';
|
agreementId.value = ''
|
||||||
if (unitId.value && proId.value) {
|
if (unitId.value && proId.value) {
|
||||||
await getAgreement();
|
await getAgreement()
|
||||||
// getMaType();
|
// getMaType();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -314,7 +337,7 @@ const getConfigChange = (e) => {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200 && res.data.length > 0) {
|
if (res.code == 200 && res.data.length > 0) {
|
||||||
res.data.forEach(item => {
|
res.data.forEach((item) => {
|
||||||
let param = {
|
let param = {
|
||||||
typeId: item.typeId,
|
typeId: item.typeId,
|
||||||
typeName: item.typeName,
|
typeName: item.typeName,
|
||||||
|
|
@ -324,9 +347,9 @@ const getConfigChange = (e) => {
|
||||||
preNum: item.num,
|
preNum: item.num,
|
||||||
}
|
}
|
||||||
// 检查 typeList 中是否已经存在相同 typeId 的项
|
// 检查 typeList 中是否已经存在相同 typeId 的项
|
||||||
const exists = typeList.value.some(existingItem => existingItem.typeId === param.typeId);
|
const exists = typeList.value.some((existingItem) => existingItem.typeId === param.typeId)
|
||||||
if (!exists) {
|
if (!exists) {
|
||||||
typeList.value.push(param);
|
typeList.value.push(param)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -370,36 +393,40 @@ const getAgreement = async () => {
|
||||||
const getMaType = () => {
|
const getMaType = () => {
|
||||||
console.log('sdadasda', agreementId.value)
|
console.log('sdadasda', agreementId.value)
|
||||||
let obj = {
|
let obj = {
|
||||||
"level":3,
|
level: 3,
|
||||||
}
|
}
|
||||||
getLevelThreeType(obj).then(res => {
|
getLevelThreeType(obj)
|
||||||
|
.then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
maTypeSelectList.value = res.data.map(option => {
|
maTypeSelectList.value = res.data.map((option) => {
|
||||||
return {
|
return {
|
||||||
value: option.typeId,
|
value: option.typeId,
|
||||||
text: option.name,
|
text: option.name,
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//规格
|
//规格
|
||||||
const getMaCode = () => {
|
const getMaCode = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"typeId":typeId.value
|
typeId: typeId.value,
|
||||||
}
|
}
|
||||||
getTypeDataList(obj).then(res => {
|
getTypeDataList(obj)
|
||||||
|
.then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
maCodeSelectList.value = res.data.map(option => {
|
maCodeSelectList.value = res.data.map((option) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
...option,
|
...option,
|
||||||
value: option.typeId,
|
value: option.typeId,
|
||||||
text: option.typeName,
|
text: option.typeName,
|
||||||
}
|
}
|
||||||
return obj
|
return obj
|
||||||
});
|
})
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -407,10 +434,10 @@ const getMaCode = () => {
|
||||||
const selectMaCode = (e) => {
|
const selectMaCode = (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
// 检查 typeList 中是否已经存在相同 typeId 的项
|
// 检查 typeList 中是否已经存在相同 typeId 的项
|
||||||
const exists = typeList.value.some(existingItem => existingItem.typeId === e);
|
const exists = typeList.value.some((existingItem) => existingItem.typeId === e)
|
||||||
if (exists) {
|
if (exists) {
|
||||||
let name = ''
|
let name = ''
|
||||||
maCodeSelectList.value.forEach(item => {
|
maCodeSelectList.value.forEach((item) => {
|
||||||
if (item.typeId === e) {
|
if (item.typeId === e) {
|
||||||
name = item.typeName
|
name = item.typeName
|
||||||
}
|
}
|
||||||
|
|
@ -418,11 +445,11 @@ const selectMaCode = (e) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `${name} 已添加到列表中`,
|
title: `${name} 已添加到列表中`,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
maCodeSelectList.value.forEach(item=>{
|
maCodeSelectList.value.forEach((item) => {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (item.typeId == e) {
|
if (item.typeId == e) {
|
||||||
let param = {
|
let param = {
|
||||||
|
|
@ -440,7 +467,6 @@ const selectMaCode = (e) => {
|
||||||
}
|
}
|
||||||
//提交
|
//提交
|
||||||
const submitNum = async () => {
|
const submitNum = async () => {
|
||||||
|
|
||||||
console.log(typeList.value)
|
console.log(typeList.value)
|
||||||
// 直接使用引用调用验证方法
|
// 直接使用引用调用验证方法
|
||||||
form.value.validate(async (valid) => {
|
form.value.validate(async (valid) => {
|
||||||
|
|
@ -450,7 +476,7 @@ const submitNum = async() => {
|
||||||
await uni.showToast({
|
await uni.showToast({
|
||||||
title: '请上传附件',
|
title: '请上传附件',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -460,7 +486,7 @@ const submitNum = async() => {
|
||||||
await uni.showToast({
|
await uni.showToast({
|
||||||
title: '请添加申请数据',
|
title: '请添加申请数据',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -475,53 +501,53 @@ const submitNum = async() => {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
let obj = {
|
let obj = {
|
||||||
"leaseApplyInfo":{
|
leaseApplyInfo: {
|
||||||
"unitId":unitId.value,
|
unitId: unitId.value,
|
||||||
"teamId":formData.value.teamId,
|
teamId: formData.value.teamId,
|
||||||
"projectId":proId.value,
|
projectId: proId.value,
|
||||||
"agreementId":agreementId.value,
|
agreementId: agreementId.value,
|
||||||
"leasePerson":formData.value.leasePerson,
|
leasePerson: formData.value.leasePerson,
|
||||||
"phone":formData.value.phone,
|
phone: formData.value.phone,
|
||||||
"standardConfigId":configId.value,
|
standardConfigId: configId.value,
|
||||||
"applyCode":formData.value.applyCode,
|
applyCode: formData.value.applyCode,
|
||||||
"bmFileInfos": bmFileInfos.value,
|
bmFileInfos: bmFileInfos.value,
|
||||||
},
|
},
|
||||||
"leaseApplyDetailsList":typeList.value
|
leaseApplyDetailsList: typeList.value,
|
||||||
}
|
}
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
leaseTask(obj).then( res => {
|
addLeaseTask(obj)
|
||||||
|
.then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
console.log('xxxxxxxxxxxxxxxx')
|
console.log('xxxxxxxxxxxxxxxx')
|
||||||
uni.showToast({ title: '申请成功', icon: 'none',duration: 1000
|
uni.showToast({ title: '申请成功', icon: 'none', duration: 1000 })
|
||||||
})
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1,
|
||||||
});
|
})
|
||||||
}, 1000);
|
}, 1000)
|
||||||
} else {
|
} else {
|
||||||
console.log('yyyyyyyyyyyyy')
|
console.log('yyyyyyyyyyyyy')
|
||||||
uni.showToast({ title: res.msg, icon: 'none', duration: 1000 })
|
uni.showToast({ title: res.msg, icon: 'none', duration: 1000 })
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
})
|
||||||
|
.catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
if (form.value) {
|
if (form.value) {
|
||||||
// 设置表单验证规则
|
// 设置表单验证规则
|
||||||
form.value.setRules(rules.value);
|
form.value.setRules(rules.value)
|
||||||
} else {
|
} else {
|
||||||
console.error('表单引用未正确初始化');
|
console.error('表单引用未正确初始化')
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
getUnit()
|
getUnit()
|
||||||
|
|
@ -542,8 +568,8 @@ const uploadImg = (item) => {
|
||||||
uni.chooseImage({
|
uni.chooseImage({
|
||||||
count: 3 - bmFileInfos.value.length, //图片可选择数量
|
count: 3 - bmFileInfos.value.length, //图片可选择数量
|
||||||
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
||||||
sourceType: ['album', 'camera',], //album 从相册选图,camera 使用相机,默认二者都有。
|
sourceType: ['album', 'camera'], //album 从相册选图,camera 使用相机,默认二者都有。
|
||||||
success: res => {
|
success: (res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
||||||
imgFiles.forEach((filePath) => {
|
imgFiles.forEach((filePath) => {
|
||||||
|
|
@ -557,38 +583,38 @@ const uploadImg = (item) => {
|
||||||
bmFileInfos.value.forEach((item, index) => {
|
bmFileInfos.value.forEach((item, index) => {
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
// url: baseURL+"/file/upload",//app
|
// url: baseURL+"/file/upload",//app
|
||||||
url: "/file/upload",//h5
|
url: '/file/upload', //h5
|
||||||
filePath: item.urlTemp,
|
filePath: item.urlTemp,
|
||||||
name: 'file',
|
name: 'file',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
res = JSON.parse(res.data)
|
res = JSON.parse(res.data)
|
||||||
console.log('上传成功', res.code);
|
console.log('上传成功', res.code)
|
||||||
console.log('上传成功', res.data);
|
console.log('上传成功', res.data)
|
||||||
if (res.code && res.code == 200) {
|
if (res.code && res.code == 200) {
|
||||||
bmFileInfos.value[index] = {
|
bmFileInfos.value[index] = {
|
||||||
...bmFileInfos.value[index],
|
...bmFileInfos.value[index],
|
||||||
name: res.data.name,
|
name: res.data.name,
|
||||||
url: res.data.url
|
url: res.data.url,
|
||||||
};
|
}
|
||||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('上传失败', err);
|
console.error('上传失败', err)
|
||||||
}
|
},
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
|
||||||
// this.$refs.vForm.clearValidate()
|
// this.$refs.vForm.clearValidate()
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const deleteImg = (index) => {
|
const deleteImg = (index) => {
|
||||||
bmFileInfos.value.splice(index, 1);
|
bmFileInfos.value.splice(index, 1)
|
||||||
// bmFileInfosTemp.value.splice(index, 1);
|
// bmFileInfosTemp.value.splice(index, 1);
|
||||||
};
|
}
|
||||||
//删除
|
//删除
|
||||||
const delRow = (index) => {
|
const delRow = (index) => {
|
||||||
console.log(index)
|
console.log(index)
|
||||||
|
|
@ -661,7 +687,6 @@ const clearConfig = () => {
|
||||||
configId.value = ''
|
configId.value = ''
|
||||||
getConfig()
|
getConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -210,9 +210,7 @@ function uploadUnNotice(arr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 页面显示时获取数据
|
// 页面显示时获取数据
|
||||||
onShow(() => {
|
onShow(() => {})
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
// 顶部按钮事件
|
// 顶部按钮事件
|
||||||
onNavigationBarButtonTap((e) => {
|
onNavigationBarButtonTap((e) => {
|
||||||
|
|
@ -235,7 +233,7 @@ onNavigationBarButtonTap((e) => {
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page-bg {
|
.page-bg {
|
||||||
background: url('/src/static/bgd.png');
|
background: url('../../static/bgd.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
|
@ -355,22 +353,22 @@ onNavigationBarButtonTap((e) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.llsp {
|
.llsp {
|
||||||
background: url('/src/static/llsp.png');
|
background: url('../../static/llsp.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
.tlsp {
|
.tlsp {
|
||||||
background: url('/src/static/tlsp.png');
|
background: url('../../static/tlsp.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
.bfsh {
|
.bfsh {
|
||||||
background: url('/src/static/bfsh.png');
|
background: url('../../static/bfsh.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
.sysh {
|
.sysh {
|
||||||
background: url('/src/static/sysh.png');
|
background: url('../../static/sysh.png');
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 登录页面 -->
|
<!-- 登录页面 -->
|
||||||
|
|
||||||
|
<!-- 如果是h5时,则显示登录页面 -->
|
||||||
|
|
||||||
|
/*#ifdef H5 */
|
||||||
<view class="login" v-if="origin.indexOf('ticket') == -1">
|
<view class="login" v-if="origin.indexOf('ticket') == -1">
|
||||||
<uni-forms :modelValue="loginForm" label-position="top" class="login-form">
|
<uni-forms :modelValue="loginForm" label-position="top" class="login-form">
|
||||||
<h1>用户登录</h1>
|
<h1>用户登录</h1>
|
||||||
|
|
@ -7,16 +11,30 @@
|
||||||
<uni-easyinput v-model="loginForm.username" placeholder="请输入用户名" />
|
<uni-easyinput v-model="loginForm.username" placeholder="请输入用户名" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item required label="密码">
|
<uni-forms-item required label="密码">
|
||||||
<uni-easyinput
|
<uni-easyinput type="password" placeholder="请输入密码" v-model="loginForm.password" />
|
||||||
type="password"
|
|
||||||
placeholder="请输入密码"
|
|
||||||
v-model="loginForm.password"
|
|
||||||
/>
|
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<view class="login-btn" @tap="onHandleLogin">登录</view>
|
<view class="login-btn" @tap="onHandleLogin">登录</view>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
|
<!-- 如果是app时,则显示登录页面 -->
|
||||||
|
/* #ifdef APP-PLUS */
|
||||||
|
<view class="login">
|
||||||
|
<uni-forms :modelValue="loginForm" label-position="top" class="login-form">
|
||||||
|
<h1>用户登录</h1>
|
||||||
|
<uni-forms-item required label="用户名">
|
||||||
|
<uni-easyinput v-model="loginForm.username" placeholder="请输入用户名" />
|
||||||
|
</uni-forms-item>
|
||||||
|
<uni-forms-item required label="密码">
|
||||||
|
<uni-easyinput type="password" placeholder="请输入密码" v-model="loginForm.password" />
|
||||||
|
</uni-forms-item>
|
||||||
|
|
||||||
|
<view class="login-btn" @tap="onHandleLogin">登录</view>
|
||||||
|
</uni-forms>
|
||||||
|
</view>
|
||||||
|
/* #endif */
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
@ -24,7 +42,11 @@ import { onMounted, reactive, ref } from 'vue'
|
||||||
import { appLoginAPI, getUserInfoAPI, iwsLoginAPI } from '@/services/index.js'
|
import { appLoginAPI, getUserInfoAPI, iwsLoginAPI } from '@/services/index.js'
|
||||||
import { useMemberStore } from '@/stores'
|
import { useMemberStore } from '@/stores'
|
||||||
const memberStore = useMemberStore()
|
const memberStore = useMemberStore()
|
||||||
|
|
||||||
|
// 如果h5时才获取origin
|
||||||
|
/* #ifdef H5 */
|
||||||
const origin = window.location.href
|
const origin = window.location.href
|
||||||
|
/* #endif */
|
||||||
|
|
||||||
// 登录参数
|
// 登录参数
|
||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
|
|
@ -38,12 +60,15 @@ const loginForm = reactive({
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
console.log('🚀 ~ onMounted ~ origin:', origin)
|
|
||||||
// uni.showToast({
|
// uni.showToast({
|
||||||
// title: origin,
|
// title: origin,
|
||||||
// icon: 'none',
|
// icon: 'none',
|
||||||
// duration: 5000,
|
// duration: 5000,
|
||||||
// })
|
// })
|
||||||
|
|
||||||
|
// 如果是h5时,则获取origin
|
||||||
|
/* #ifdef H5 */
|
||||||
|
console.log('🚀 ~ onMounted ~ origin:', origin)
|
||||||
if (origin.indexOf('ticket') != -1) {
|
if (origin.indexOf('ticket') != -1) {
|
||||||
try {
|
try {
|
||||||
uni.showLoading({ title: '登录中' })
|
uni.showLoading({ title: '登录中' })
|
||||||
|
|
@ -73,6 +98,7 @@ onMounted(async () => {
|
||||||
showToast('登录失败')
|
showToast('登录失败')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* #endif */
|
||||||
})
|
})
|
||||||
|
|
||||||
// 登录按钮
|
// 登录按钮
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,10 @@ export function getMachineApi(data) {
|
||||||
return http({
|
return http({
|
||||||
url: '/material/back_apply_info/getMachine',
|
url: '/material/back_apply_info/getMachine',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: data
|
params: data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取已退料编码列表-查看
|
// 获取已退料编码列表-查看
|
||||||
export const getMaCodeList = (data) => {
|
export const getMaCodeList = (data) => {
|
||||||
return http({
|
return http({
|
||||||
|
|
@ -154,7 +153,6 @@ export const backApplyRemove = (data) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 二维码扫码获取编码信息
|
// 二维码扫码获取编码信息
|
||||||
export const getMachineByQrCodeApi = (data) => {
|
export const getMachineByQrCodeApi = (data) => {
|
||||||
return http({
|
return http({
|
||||||
|
|
@ -164,7 +162,6 @@ export const getMachineByQrCodeApi = (data) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 获取退料明细(退料人退料时间)
|
// 获取退料明细(退料人退料时间)
|
||||||
export const getDetailsByIdApi = (data) => {
|
export const getDetailsByIdApi = (data) => {
|
||||||
return http({
|
return http({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue