维修调整
This commit is contained in:
parent
94b0972f9d
commit
a9fbc971c9
|
|
@ -915,12 +915,12 @@ onLoad((options) => {
|
|||
}
|
||||
}
|
||||
.top-content {
|
||||
max-height: 30px;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.5s ease-out;
|
||||
|
||||
&.is-expanded {
|
||||
max-height: 2000px !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -573,12 +573,12 @@ onLoad((options)=>{
|
|||
}
|
||||
}
|
||||
.top-content {
|
||||
max-height: 30px;
|
||||
height: 30px;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.5s ease-out;
|
||||
|
||||
&.is-expanded {
|
||||
max-height: 800px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ const isWithinOneMonth = (dateStr) => {
|
|||
const diffTime = inputDate.getTime() - today.getTime()
|
||||
const diffDays = diffTime / (1000 * 60 * 60 * 24)
|
||||
|
||||
return diffDays <= 30
|
||||
return diffDays <= 90
|
||||
}
|
||||
|
||||
// 获取编码列表
|
||||
|
|
|
|||
|
|
@ -20,20 +20,24 @@
|
|||
><view class="cont">{{ selectedCodesDisplay }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<uni-row :gutter="24" style="display: flex;align-items: center">
|
||||
<uni-col :span="6">维修人员:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<uni-data-select :localdata="repairPersonData" v-model="repairPerson" placeholder="请选择维修人员" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row
|
||||
:gutter="24"
|
||||
class="search-form"
|
||||
style="background: #fff; padding: 10px; margin: 5px; border-radius: 5px"
|
||||
>
|
||||
<uni-col :span="6">
|
||||
<uni-col :span="24">
|
||||
<view class="btnBox complete" @click="saveCode"> 提交 </view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<scroll-view scroll-y style="padding-bottom: 20rpx">
|
||||
<!-- -->
|
||||
<view class="table-list-item">
|
||||
<!-- 维修人员 -->
|
||||
<!-- <view class="table-list-item">
|
||||
<h2 style="padding: 4rpx 0; font-weight: bold">维修信息</h2>
|
||||
<uni-forms ref="baseForm" label-align="right">
|
||||
<uni-forms-item label="维修人员">
|
||||
|
|
@ -57,7 +61,7 @@
|
|||
</div>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 内部维修 -->
|
||||
<view class="table-list-item" v-if="repairType == 1">
|
||||
|
|
@ -101,6 +105,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="备注">
|
||||
<uni-easyinput placeholder="备注" v-model="item.remark" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件">
|
||||
<div class="upload" @click="uploadImg(item)" v-if="item.imgBeseUrl == ''">+</div>
|
||||
<div class="upload" @click="uploadImg(item)" v-else>
|
||||
<image
|
||||
:src="item.imgBeseUrl"
|
||||
style="width: 160rpx; height: 160rpx"
|
||||
mode=""
|
||||
></image>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
|
@ -212,7 +230,8 @@ const remark = ref('') //备注
|
|||
const imgBeseUrl = ref('') //图片展示
|
||||
const bmFileInfos = ref([]) //图片数组
|
||||
//上传
|
||||
const uploadImg = () => {
|
||||
const uploadImg = (item) => {
|
||||
console.log('🚀 ~ uploadImg ~ item:', item)
|
||||
uni.chooseImage({
|
||||
count: 1, //图片可选择数量
|
||||
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
||||
|
|
@ -220,7 +239,7 @@ const uploadImg = () => {
|
|||
success: (res) => {
|
||||
console.log(res)
|
||||
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
||||
imgBeseUrl.value = imgFiles[0]
|
||||
item.imgBeseUrl = imgFiles[0]
|
||||
// console.log('请求地址', baseURL+"/file/upload")
|
||||
uni.uploadFile({
|
||||
// url: baseURL+"/file/upload",//app
|
||||
|
|
@ -236,11 +255,11 @@ const uploadImg = () => {
|
|||
name: res.data.name,
|
||||
url: res.data.url,
|
||||
}
|
||||
bmFileInfos.value = [obj]
|
||||
console.log('上传成功', bmFileInfos.value)
|
||||
item.bmFileInfos = [obj]
|
||||
console.log('上传成功', item)
|
||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||
} else {
|
||||
bmFileInfos.value = []
|
||||
item.bmFileInfos = []
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
|
|
@ -286,7 +305,7 @@ const partTreeChange = (val, index) => {
|
|||
}
|
||||
|
||||
//内部维修
|
||||
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: '' }])
|
||||
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: '', remark: '', fileList: [] }])
|
||||
|
||||
const getPartItemData = async () => {
|
||||
console.log("bbbbbbbbbbbbbbbbb",queryParams.value.ids)
|
||||
|
|
@ -319,7 +338,7 @@ const getPartItemData = async () => {
|
|||
|
||||
|
||||
const addPart = () => {
|
||||
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
||||
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '', remark: '', fileList: [] })
|
||||
}
|
||||
const delPart = (index) => {
|
||||
if (partItems.value.length > 1) {
|
||||
|
|
@ -413,8 +432,8 @@ const saveCodeApi = async () => {
|
|||
rowData.value.repairDeviceList[i].repairList = [
|
||||
{
|
||||
repairer: repairPerson.value,
|
||||
remark: remark.value,
|
||||
fileList: bmFileInfos.value,
|
||||
// remark: remark.value,
|
||||
// fileList: bmFileInfos.value,
|
||||
},
|
||||
]
|
||||
// 初始化配件列表数组(如果不存在)
|
||||
|
|
@ -428,6 +447,8 @@ const saveCodeApi = async () => {
|
|||
partId: partItems.value[j].partId,
|
||||
partNum: partItems.value[j].partNum,
|
||||
storageNum: partItems.value[j].storageNum,
|
||||
remark: partItems.value[j].remark,
|
||||
fileList: partItems.value[j].bmFileInfos,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -437,6 +458,9 @@ const saveCodeApi = async () => {
|
|||
// console.log('🚀 ~ saveCodeApi ~ 提交:', rowData.value.repairDeviceList)
|
||||
const params = rowData.value.repairDeviceList.filter(item => queryParams.value.selectedCodes.includes(item.code))
|
||||
console.log('🚀 ~ saveCodeApi ~ params:', params)
|
||||
uni.showLoading({
|
||||
title: '提交中...',
|
||||
});
|
||||
saveRepairRow(params).then(async (response) => {
|
||||
if (response.code == 200) {
|
||||
uni.showToast({ title: '保存成功', icon: 'none' })
|
||||
|
|
@ -445,8 +469,10 @@ const saveCodeApi = async () => {
|
|||
})
|
||||
}
|
||||
loading.value = false
|
||||
uni.hideLoading()
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
@ -549,11 +575,12 @@ const saveCodeApi = async () => {
|
|||
margin-bottom: 24rpx;
|
||||
position: relative;
|
||||
padding-left: 24rpx;
|
||||
margin-left: 10px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
left: -10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 6rpx;
|
||||
|
|
@ -630,11 +657,11 @@ const saveCodeApi = async () => {
|
|||
|
||||
// 操作按钮组
|
||||
.search-form {
|
||||
margin-bottom: 24rpx;
|
||||
/* margin-bottom: 24rpx;
|
||||
background: #fff !important;
|
||||
border-radius: 20rpx !important;
|
||||
padding: 24rpx !important;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06); */
|
||||
|
||||
.btnBox {
|
||||
height: 88rpx;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@
|
|||
><view class="cont">{{ queryParams.repairDeviceList[rowIndex].code }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<uni-row :gutter="24" style="display: flex;align-items: center">
|
||||
<uni-col :span="6">维修人员:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<uni-data-select :localdata="repairPersonData" v-model="repairPerson" placeholder="请选择维修人员" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row
|
||||
:gutter="24"
|
||||
class="search-form"
|
||||
|
|
@ -39,10 +44,9 @@
|
|||
<view class="btnBox complete" @click="saveCode"> 提交 </view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
<scroll-view scroll-y style="padding-bottom: 20rpx">
|
||||
<!-- -->
|
||||
<view class="table-list-item">
|
||||
<!-- 维修人员 -->
|
||||
<!-- <view class="table-list-item">
|
||||
<h2 style="padding: 4rpx 0; font-weight: bold">维修信息</h2>
|
||||
<uni-forms ref="baseForm" label-align="right">
|
||||
<uni-forms-item label="维修人员">
|
||||
|
|
@ -66,7 +70,7 @@
|
|||
</div>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 内部维修 -->
|
||||
<view class="table-list-item" v-if="repairType == 1">
|
||||
|
|
@ -111,6 +115,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="备注">
|
||||
<uni-easyinput placeholder="备注" v-model="item.remark" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件">
|
||||
<div class="upload" @click="uploadImg(item)" v-if="item.imgBeseUrl == ''">+</div>
|
||||
<div class="upload" @click="uploadImg(item)" v-else>
|
||||
<image
|
||||
:src="item.imgBeseUrl"
|
||||
style="width: 160rpx; height: 160rpx"
|
||||
mode=""
|
||||
></image>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
|
@ -166,6 +184,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="备注">
|
||||
<uni-easyinput placeholder="备注" v-model="item.remark" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件">
|
||||
<div class="upload" @click="uploadImg(item)" v-if="item.imgBeseUrl == ''">+</div>
|
||||
<div class="upload" @click="uploadImg(item)" v-else>
|
||||
<image
|
||||
:src="item.imgBeseUrl"
|
||||
style="width: 160rpx; height: 160rpx"
|
||||
mode=""
|
||||
></image>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
|
@ -218,6 +250,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
|
@ -324,7 +357,7 @@ const remark = ref('') //备注
|
|||
const imgBeseUrl = ref('') //图片展示
|
||||
const bmFileInfos = ref([]) //图片数组
|
||||
//上传
|
||||
const uploadImg = () => {
|
||||
const uploadImg = (item) => {
|
||||
uni.chooseImage({
|
||||
count: 1, //图片可选择数量
|
||||
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
||||
|
|
@ -332,7 +365,7 @@ const uploadImg = () => {
|
|||
success: (res) => {
|
||||
console.log(res)
|
||||
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
||||
imgBeseUrl.value = imgFiles[0]
|
||||
item.imgBeseUrl = imgFiles[0]
|
||||
// console.log('请求地址', baseURL+"/file/upload")
|
||||
uni.uploadFile({
|
||||
// url: baseURL+"/file/upload",//app
|
||||
|
|
@ -348,11 +381,11 @@ const uploadImg = () => {
|
|||
name: res.data.name,
|
||||
url: res.data.url,
|
||||
}
|
||||
bmFileInfos.value = [obj]
|
||||
console.log('上传成功', bmFileInfos.value)
|
||||
item.bmFileInfos = [obj]
|
||||
console.log('上传成功', item)
|
||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||
} else {
|
||||
bmFileInfos.value = []
|
||||
item.bmFileInfos = []
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
|
|
@ -397,7 +430,7 @@ const partTreeChange = (val, index) => {
|
|||
}
|
||||
|
||||
//内部维修
|
||||
const partItems = ref([{ partNum: '', partType: 1, partId: '', storageNum: ''}])
|
||||
const partItems = ref([{ partNum: '', partType: 1, partId: '', storageNum: '', remark: '', fileList: [] }])
|
||||
|
||||
const getPartItemData = async () => {
|
||||
console.log("bbbbbbbbbbbbbbbbb",queryParams.value.ids)
|
||||
|
|
@ -427,7 +460,7 @@ const getPartItemData = async () => {
|
|||
}
|
||||
}
|
||||
const addPart = () => {
|
||||
partItems.value.push({ partNum: '', partType: 1, partId: '', storageNum: '' })
|
||||
partItems.value.push({ partNum: '', partType: 1, partId: '', storageNum: '', remark: '', fileList: [] })
|
||||
}
|
||||
const delPart = (index) => {
|
||||
if (partItems.value.length > 1) {
|
||||
|
|
@ -453,7 +486,7 @@ const getSupplierListData = async () => {
|
|||
}
|
||||
getSupplierListData()
|
||||
const partItemsMiddle = ref([
|
||||
{ partName: '', supplierId: '', partNum: 0, partPrice: 0, partType: 1 },
|
||||
{ partName: '', supplierId: '', partNum: 0, partPrice: 0, partType: 1, remark: '', fileList: [] },
|
||||
])
|
||||
const addMidPart = () => {
|
||||
partItemsMiddle.value.push({
|
||||
|
|
@ -462,6 +495,8 @@ const addMidPart = () => {
|
|||
partNum: 0,
|
||||
partPrice: 0,
|
||||
partType: 1,
|
||||
remark: '',
|
||||
fileList: [],
|
||||
})
|
||||
}
|
||||
const delMidPart = (index) => {
|
||||
|
|
@ -624,10 +659,13 @@ const saveCodeApi = async () => {
|
|||
rowData.value.repairDeviceList[rowIndex.value].repairList = [
|
||||
{
|
||||
repairer: repairPerson.value,
|
||||
remark: remark.value,
|
||||
fileList: bmFileInfos.value,
|
||||
// remark: remark.value,
|
||||
// fileList: bmFileInfos.value,
|
||||
},
|
||||
]
|
||||
rowData.value.repairDeviceList[rowIndex.value].codeInRepairPartList = []
|
||||
rowData.value.repairDeviceList[rowIndex.value].codeOutRepairPartList = []
|
||||
rowData.value.repairDeviceList[rowIndex.value].codeScrapRepairPartList = []
|
||||
if (repairType.value == 1) {
|
||||
for (let i = 0; i < partItems.value.length; i++) {
|
||||
rowData.value.repairDeviceList[rowIndex.value].codeInRepairPartList.push({
|
||||
|
|
@ -635,6 +673,8 @@ const saveCodeApi = async () => {
|
|||
partId: partItems.value[i].partId,
|
||||
partNum: partItems.value[i].partNum,
|
||||
storageNum: partItems.value[i].storageNum,
|
||||
remark: partItems.value[i].remark,
|
||||
fileList: partItems.value[i].bmFileInfos,
|
||||
// repairNum: formLeft.value.repairNum,
|
||||
})
|
||||
}
|
||||
|
|
@ -646,6 +686,8 @@ const saveCodeApi = async () => {
|
|||
partNum: partItemsMiddle.value[i].partNum,
|
||||
partName: partItemsMiddle.value[i].partName,
|
||||
supplierId: partItemsMiddle.value[i].supplierId,
|
||||
remark: partItemsMiddle.value[i].remark,
|
||||
fileList: partItemsMiddle.value[i].bmFileInfos,
|
||||
// repairNum: formMiddle.value.repairNum,
|
||||
})
|
||||
}
|
||||
|
|
@ -654,6 +696,7 @@ const saveCodeApi = async () => {
|
|||
}
|
||||
rowData.value.repairDeviceList[rowIndex.value].repairType = repairType.value
|
||||
console.log(rowData.value.repairDeviceList)
|
||||
uni.showLoading({ title: '提交中...' })
|
||||
saveRepairRow(rowData.value.repairDeviceList).then(async (response) => {
|
||||
if (response.code == 200) {
|
||||
uni.showToast({ title: '保存成功', icon: 'none' })
|
||||
|
|
@ -661,6 +704,10 @@ const saveCodeApi = async () => {
|
|||
delta: 2, // 返回到已存在的页面
|
||||
})
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
}).finally(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
|
@ -763,11 +810,12 @@ const saveCodeApi = async () => {
|
|||
margin-bottom: 24rpx;
|
||||
position: relative;
|
||||
padding-left: 24rpx;
|
||||
margin-left: 10px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
left: -10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 6rpx;
|
||||
|
|
@ -844,11 +892,11 @@ const saveCodeApi = async () => {
|
|||
|
||||
// 操作按钮组
|
||||
.search-form {
|
||||
margin-bottom: 24rpx;
|
||||
background: #fff !important;
|
||||
border-radius: 20rpx !important;
|
||||
padding: 24rpx !important;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
// margin-bottom: 24rpx;
|
||||
// background: #fff !important;
|
||||
// border-radius: 20rpx !important;
|
||||
// padding: 24rpx !important;
|
||||
// box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
|
||||
.btnBox {
|
||||
height: 88rpx;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
@tap="onRepairItem(item)"
|
||||
>
|
||||
<div class="title">
|
||||
<span style="font-size: 15px; font-weight: 800">维修任务</span>
|
||||
<span style="font-size: 15px; font-weight: 800">{{ item.typeName + ' ' + item.type }}</span>
|
||||
<!-- <span :style="{ color: active == 1 ? '#3784fb' : '#ff4d4f' }">{{active == 1 ? '已完成' : '未完成'}}</span> -->
|
||||
</div>
|
||||
<view class="line"></view>
|
||||
|
|
@ -63,25 +63,25 @@
|
|||
</label>
|
||||
</checkbox-group>
|
||||
</uni-col>
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.type }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">退料数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeRepairNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<!-- <uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.type }}</view>
|
||||
</uni-col>
|
||||
</uni-row> -->
|
||||
<!-- <uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">退料数量:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.typeRepairNum }}</view>
|
||||
</uni-col>
|
||||
</uni-row> -->
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">已修数量:</uni-col>
|
||||
|
|
@ -103,14 +103,14 @@
|
|||
<view class="cont">{{ Number(item.typeRepairNum)-Number(item.typeRepairedNum)-Number(item.typeScrapNum) }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<!-- <uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">单位:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.unitName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
</uni-row> -->
|
||||
<!-- <uni-row :gutter="24">
|
||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||
<uni-col :span="6">管理模式:</uni-col>
|
||||
<uni-col :span="16">
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
size="small"
|
||||
/>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-row> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<template>
|
||||
<!-- 数量出库 -->
|
||||
<view class="page-container">
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<!-- <uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="6">
|
||||
<view class="search" @click="saveNumAll">
|
||||
提交
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</uni-row> -->
|
||||
<view class="table-list-item">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">物资名称:</uni-col>
|
||||
|
|
@ -29,12 +29,23 @@
|
|||
}}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex;align-items: center">
|
||||
<uni-col :span="6">待修人员:</uni-col>
|
||||
<uni-col :span="18">
|
||||
<uni-data-select :localdata="repairPersonData" v-model="repairPerson" placeholder="请选择维修人员" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="24">
|
||||
<view class="search" @click="saveNumAll">
|
||||
提交
|
||||
</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y style="padding-bottom: 20rpx">
|
||||
<!-- -->
|
||||
<view class="table-list-item">
|
||||
<!-- 维修人员 -->
|
||||
<!-- <view class="table-list-item">
|
||||
<h2 style="padding: 4rpx 0; font-weight: bold">维修信息</h2>
|
||||
<uni-forms ref="baseForm" label-align="right">
|
||||
<uni-forms-item label="维修人员">
|
||||
|
|
@ -50,7 +61,7 @@
|
|||
</div>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 内部维修 -->
|
||||
<view class="table-list-item top-content" :class="{'is-expanded': isExpanded1}">
|
||||
|
|
@ -103,6 +114,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="备注">
|
||||
<uni-easyinput placeholder="请填写备注" maxlength="50" v-model="item.remark"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件">
|
||||
<div class="upload" @click="uploadImg(item)" v-if="item.imgBeseUrl==''">+</div>
|
||||
<div class="upload" @click="uploadImg(item)" v-else>
|
||||
<image :src="item.imgBeseUrl" style="width: 160rpx;height: 160rpx;" mode=""></image>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
|
@ -139,10 +160,6 @@
|
|||
<uni-easyinput placeholder="请填写其他原因" />
|
||||
</uni-forms-item> -->
|
||||
<uni-forms-item label="附件">
|
||||
<!-- <div class="upload" @click="uploadScrapImg" v-if="imgBeseUrl2==''">+</div>-->
|
||||
<!-- <div class="upload" @click="uploadScrapImg" v-else>-->
|
||||
<!-- <image :src="imgBeseUrl2" style="width: 160rpx;height: 160rpx;" mode=""></image>-->
|
||||
<!-- </div>-->
|
||||
<div class="upload-container">
|
||||
<div class="upload" @click="uploadImg2" v-if="imgList2.length < 3">+</div>
|
||||
<div class="image-preview" v-for="(img, index) in imgList2" :key="index">
|
||||
|
|
@ -151,6 +168,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
||||
|
|
@ -212,6 +230,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="备注">
|
||||
<uni-easyinput placeholder="请填写备注" maxlength="50" v-model="item.remark"/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件">
|
||||
<div class="upload" @click="uploadImg(item)" v-if="item.imgBeseUrl==''">+</div>
|
||||
<div class="upload" @click="uploadImg(item)" v-else>
|
||||
<image :src="item.imgBeseUrl" style="width: 160rpx;height: 160rpx;" mode=""></image>
|
||||
</div>
|
||||
</uni-forms-item>
|
||||
<div style="border-bottom: 1 solid #333;"></div>
|
||||
</div>
|
||||
</uni-forms>
|
||||
</view>
|
||||
|
|
@ -293,7 +321,7 @@ const remark = ref("") //备注
|
|||
const imgBeseUrl = ref("") //图片展示
|
||||
const bmFileInfos = ref([])//图片数组
|
||||
//上传
|
||||
const uploadImg = () => {
|
||||
const uploadImg = (item) => {
|
||||
uni.chooseImage({
|
||||
count: 1, //图片可选择数量
|
||||
sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
|
||||
|
|
@ -301,7 +329,7 @@ const uploadImg = () => {
|
|||
success: (res) => {
|
||||
console.log(res)
|
||||
let imgFiles = res.tempFilePaths //图片的本地文件路径列表
|
||||
imgBeseUrl.value = imgFiles[0]
|
||||
item.imgBeseUrl = imgFiles[0]
|
||||
// console.log('请求地址', baseURL+"/file/upload")
|
||||
uni.uploadFile({
|
||||
// url: baseURL+"/file/upload",//app
|
||||
|
|
@ -317,11 +345,11 @@ const uploadImg = () => {
|
|||
name: res.data.name,
|
||||
url: res.data.url,
|
||||
}
|
||||
bmFileInfos.value = [obj]
|
||||
console.log('上传成功', bmFileInfos.value)
|
||||
item.fileList = [obj]
|
||||
console.log('上传成功', item)
|
||||
uni.showToast({ title: '上传成功', icon: 'none' })
|
||||
} else {
|
||||
bmFileInfos.value = []
|
||||
item.fileList = []
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
|
|
@ -385,7 +413,7 @@ getSupplierListData()
|
|||
const formLeft = ref({
|
||||
repairNum: 0,
|
||||
})
|
||||
const partItems = ref([{ partNum: '', partType: 1, partId: '', storageNum: ''}])
|
||||
const partItems = ref([{ partNum: '', partType: 1, partId: '', storageNum: '', remark: '', fileList: []}])
|
||||
|
||||
const getPartItemData = async () => {
|
||||
console.log("bbbbbbbbbbbbbbbbb",rowData.value.ids)
|
||||
|
|
@ -419,7 +447,7 @@ const getPartItemData = async () => {
|
|||
}
|
||||
|
||||
const addPart = () => {
|
||||
partItems.value.push({ partNum: '', partType: 1, partId: '', storageNum: '' })
|
||||
partItems.value.push({ partNum: '', partType: 1, partId: '', storageNum: '', remark: '', fileList: [] })
|
||||
}
|
||||
const delPart = (index) => {
|
||||
if (partItems.value.length > 1) {
|
||||
|
|
@ -434,9 +462,9 @@ const formMiddle = ref({
|
|||
supplierId: undefined,
|
||||
repairNum: 0,
|
||||
})
|
||||
const partItemsMiddle = ref([{ partName: '', partNum: '', partPrice: '0', partType: 1 }])
|
||||
const partItemsMiddle = ref([{ partName: '', partNum: '', partPrice: '0', partType: 1, remark: '', fileList: [] }])
|
||||
const addMidPart = () => {
|
||||
partItemsMiddle.value.push({ partName: '', partNum: '', partPrice: '0', partType: 1 })
|
||||
partItemsMiddle.value.push({ partName: '', partNum: '', partPrice: '0', partType: 1, remark: '', fileList: [] })
|
||||
}
|
||||
const delMidPart = (index) => {
|
||||
if (partItemsMiddle.value.length > 1) {
|
||||
|
|
@ -549,10 +577,13 @@ const saveNumAll = async () => {
|
|||
rowData.value.repairDeviceList[0].repairList=[
|
||||
{
|
||||
repairer:repairPerson.value,
|
||||
remark:remark.value,
|
||||
fileList:bmFileInfos.value
|
||||
// remark:remark.value,
|
||||
// fileList:bmFileInfos.value
|
||||
}
|
||||
]
|
||||
rowData.value.repairDeviceList[0].numberInRepairPartList = []
|
||||
rowData.value.repairDeviceList[0].numberOutRepairPartList = []
|
||||
rowData.value.repairDeviceList[0].numberScrapRepairPartList = []
|
||||
//内部
|
||||
for (let i = 0; i < partItems.value.length; i++) {
|
||||
rowData.value.repairDeviceList[0].numberInRepairPartList.push({
|
||||
|
|
@ -561,6 +592,8 @@ const saveNumAll = async () => {
|
|||
partNum: partItems.value[i].partNum,
|
||||
storageNum: partItems.value[i].storageNum,
|
||||
repairNum: formLeft.value.repairNum,
|
||||
remark: partItems.value[i].remark,
|
||||
fileList: partItems.value[i].fileList
|
||||
})
|
||||
}
|
||||
// 返厂
|
||||
|
|
@ -572,6 +605,8 @@ const saveNumAll = async () => {
|
|||
partName: partItemsMiddle.value[i].partName,
|
||||
supplierId: formMiddle.value.supplierId,
|
||||
repairNum: formMiddle.value.repairNum,
|
||||
remark: partItemsMiddle.value[i].remark,
|
||||
fileList: partItemsMiddle.value[i].fileList,
|
||||
})
|
||||
}
|
||||
//报废
|
||||
|
|
@ -692,12 +727,12 @@ const costCheckNum = (item) => {
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.top-content {
|
||||
max-height: 50px;
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.5s ease-out;
|
||||
|
||||
&.is-expanded {
|
||||
max-height: 800px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.icon {
|
||||
|
|
@ -887,6 +922,7 @@ const costCheckNum = (item) => {
|
|||
padding: 24rpx !important;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
|
||||
}
|
||||
.search {
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
|
|
@ -904,7 +940,6 @@ const costCheckNum = (item) => {
|
|||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 加减按钮
|
||||
.operation-btns {
|
||||
|
|
|
|||
Loading…
Reference in New Issue