维修,定损
This commit is contained in:
parent
98268c53ba
commit
baed3df1ec
|
|
@ -24,7 +24,7 @@ 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()
|
||||||
const origin = window.location.href
|
const origin = []
|
||||||
// 登录参数
|
// 登录参数
|
||||||
const loginForm = reactive({
|
const loginForm = reactive({
|
||||||
username: uni.getStorageSync('username'),
|
username: uni.getStorageSync('username'),
|
||||||
|
|
|
||||||
|
|
@ -109,17 +109,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, reactive } from 'vue'
|
import { computed, ref, reactive,nextTick } from 'vue'
|
||||||
import {
|
import {
|
||||||
partTypeTreeList,
|
partTypeTreeList,
|
||||||
getSupplierList,
|
getSupplierList,
|
||||||
getRepairerListApi,
|
getRepairerListApi,
|
||||||
saveRepairRow,
|
saveRepairRow,
|
||||||
getScrapReasonList,
|
getScrapReasonList,
|
||||||
|
getPartItemApi,
|
||||||
} from '@/services/repair/repair.js'
|
} from '@/services/repair/repair.js'
|
||||||
import { baseURL } from '@/utils/http'
|
import { baseURL } from '@/utils/http'
|
||||||
import treeSelect from '../tree-select/tselect.vue'
|
import treeSelect from '../tree-select/tselectTwo.vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
const queryParams = ref({})
|
const queryParams = ref({})
|
||||||
const rowIndex = ref(-1)
|
const rowIndex = ref(-1)
|
||||||
// 计算属性:将选中的编码用逗号拼接显示
|
// 计算属性:将选中的编码用逗号拼接显示
|
||||||
|
|
@ -162,6 +163,13 @@ onLoad((options) => {
|
||||||
console.log('选中的编码:', queryParams.value.selectedCodes)
|
console.log('选中的编码:', queryParams.value.selectedCodes)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
getPartTreeData()
|
||||||
|
//获取定损的配件信息
|
||||||
|
getPartItemData()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const repairType = ref(1)
|
const repairType = ref(1)
|
||||||
const changeTab = async (e) => {
|
const changeTab = async (e) => {
|
||||||
repairType.value = e
|
repairType.value = e
|
||||||
|
|
@ -255,7 +263,7 @@ const getPartTreeData = async () => {
|
||||||
const res = await partTypeTreeList({})
|
const res = await partTypeTreeList({})
|
||||||
partTreeData.value = res.data
|
partTreeData.value = res.data
|
||||||
}
|
}
|
||||||
getPartTreeData()
|
|
||||||
const treeSelectRef = ref([])
|
const treeSelectRef = ref([])
|
||||||
const clearPart = (index) => {
|
const clearPart = (index) => {
|
||||||
partItems.value[index].partId = ''
|
partItems.value[index].partId = ''
|
||||||
|
|
@ -279,6 +287,37 @@ const partTreeChange = (val, index) => {
|
||||||
|
|
||||||
//内部维修
|
//内部维修
|
||||||
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: '' }])
|
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: '' }])
|
||||||
|
|
||||||
|
const getPartItemData = async () => {
|
||||||
|
console.log("bbbbbbbbbbbbbbbbb",queryParams.value.ids)
|
||||||
|
const res = await getPartItemApi({
|
||||||
|
ids: queryParams.value.ids,
|
||||||
|
})
|
||||||
|
console.log("cccccccccccc",res)
|
||||||
|
if(res.data && res.data.length > 0) {
|
||||||
|
// 1. 先设置数据
|
||||||
|
partItems.value = res.data.map(item => ({
|
||||||
|
...item,
|
||||||
|
partType: item.partId ? 1 : 0 // 假设 partType 表示是否有 partId
|
||||||
|
}));
|
||||||
|
|
||||||
|
// 使用 nextTick 确保组件渲染完成
|
||||||
|
nextTick(() => {
|
||||||
|
partItems.value.forEach((item, index) => {
|
||||||
|
if (item.partId) {
|
||||||
|
console.log("尝试设置 partId", item.partId)
|
||||||
|
if (treeSelectRef.value[index] && treeSelectRef.value[index].setSelectedValue) {
|
||||||
|
treeSelectRef.value[index].setSelectedValue(item.partId);
|
||||||
|
} else {
|
||||||
|
console.warn(`treeSelectRef[${index}] 没有 setSelectedValue 方法`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const addPart = () => {
|
const addPart = () => {
|
||||||
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,17 +224,18 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, reactive } from 'vue'
|
import { computed, ref, reactive,nextTick } from 'vue'
|
||||||
import {
|
import {
|
||||||
partTypeTreeList,
|
partTypeTreeList,
|
||||||
getSupplierList,
|
getSupplierList,
|
||||||
getRepairerListApi,
|
getRepairerListApi,
|
||||||
saveRepairRow,
|
saveRepairRow,
|
||||||
getScrapReasonList,
|
getScrapReasonList,
|
||||||
|
getPartItemApi,
|
||||||
} from '@/services/repair/repair.js'
|
} from '@/services/repair/repair.js'
|
||||||
import { baseURL } from '@/utils/http'
|
import { baseURL } from '@/utils/http'
|
||||||
import treeSelect from '../tree-select/tselect.vue'
|
import treeSelect from '../tree-select/tselectTwo.vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad,onShow } from '@dcloudio/uni-app'
|
||||||
const queryParams = ref({})
|
const queryParams = ref({})
|
||||||
const rowIndex = ref(-1)
|
const rowIndex = ref(-1)
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
|
@ -244,6 +245,13 @@ onLoad((options) => {
|
||||||
console.log(queryParams.value)
|
console.log(queryParams.value)
|
||||||
getScrapReasonListData()
|
getScrapReasonListData()
|
||||||
})
|
})
|
||||||
|
onShow(() => {
|
||||||
|
getPartTreeData()
|
||||||
|
//获取定损的配件信息
|
||||||
|
getPartItemData()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const repairType = ref(1)
|
const repairType = ref(1)
|
||||||
const changeTab = async (e) => {
|
const changeTab = async (e) => {
|
||||||
repairType.value = e
|
repairType.value = e
|
||||||
|
|
@ -366,7 +374,6 @@ const getPartTreeData = async () => {
|
||||||
const res = await partTypeTreeList({})
|
const res = await partTypeTreeList({})
|
||||||
partTreeData.value = res.data
|
partTreeData.value = res.data
|
||||||
}
|
}
|
||||||
getPartTreeData()
|
|
||||||
const treeSelectRef = ref([])
|
const treeSelectRef = ref([])
|
||||||
const clearPart = (index) => {
|
const clearPart = (index) => {
|
||||||
partItems.value[index].partId = ''
|
partItems.value[index].partId = ''
|
||||||
|
|
@ -389,7 +396,35 @@ const partTreeChange = (val, index) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
//内部维修
|
//内部维修
|
||||||
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: '' }])
|
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: ''}])
|
||||||
|
|
||||||
|
const getPartItemData = async () => {
|
||||||
|
console.log("bbbbbbbbbbbbbbbbb",queryParams.value.ids)
|
||||||
|
const res = await getPartItemApi({
|
||||||
|
ids: queryParams.value.ids,
|
||||||
|
})
|
||||||
|
if(res.data && res.data.length > 0) {
|
||||||
|
// 1. 先设置数据
|
||||||
|
partItems.value = res.data.map(item => ({
|
||||||
|
...item,
|
||||||
|
partType: item.partId ? 1 : 0 // 假设 partType 表示是否有 partId
|
||||||
|
}));
|
||||||
|
|
||||||
|
// 使用 nextTick 确保组件渲染完成
|
||||||
|
nextTick(() => {
|
||||||
|
partItems.value.forEach((item, index) => {
|
||||||
|
if (item.partId) {
|
||||||
|
console.log("尝试设置 partId", item.partId)
|
||||||
|
if (treeSelectRef.value[index] && treeSelectRef.value[index].setSelectedValue) {
|
||||||
|
treeSelectRef.value[index].setSelectedValue(item.partId);
|
||||||
|
} else {
|
||||||
|
console.warn(`treeSelectRef[${index}] 没有 setSelectedValue 方法`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
const addPart = () => {
|
const addPart = () => {
|
||||||
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
<div v-for="(item, index) in partItems" :key="index">
|
<div v-for="(item, index) in partItems" :key="index">
|
||||||
<uni-forms-item label="配件类型">
|
<uni-forms-item label="配件类型">
|
||||||
<treeSelect style="width: 100%;height: 90rpx;" ref="treeSelectRef"
|
<treeSelect style="width: 100%;height: 90rpx;" ref="treeSelectRef"
|
||||||
:options="partTreeData" @change="partTreeChange" :index="index" @clear="clearPart" :defaultProps="defaultProps"></treeSelect>
|
:options="partTreeData" v-model="item.partId" @change="partTreeChange" :index="index" @clear="clearPart" :defaultProps="defaultProps"></treeSelect>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
<uni-forms-item label="配件数量">
|
<uni-forms-item label="配件数量">
|
||||||
<uni-easyinput
|
<uni-easyinput
|
||||||
|
|
@ -203,11 +203,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref,nextTick } from 'vue'
|
||||||
import { partTypeTreeList, getSupplierList, getRepairerListApi, saveRepairRow } from '@/services/repair/repair.js'
|
import { partTypeTreeList, getSupplierList, getRepairerListApi, saveRepairRow,getPartItemApi } from '@/services/repair/repair.js'
|
||||||
import { baseURL } from '@/utils/http'
|
import { baseURL } from '@/utils/http'
|
||||||
import treeSelect from '../tree-select/tselect.vue';
|
import treeSelect from '../tree-select/tselectTwo.vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
// const query = defineProps() // 获取上级页面传递的路由参数
|
// const query = defineProps() // 获取上级页面传递的路由参数
|
||||||
// const queryParams = JSON.parse(query.queryParams)
|
// const queryParams = JSON.parse(query.queryParams)
|
||||||
const queryParams = ref({})
|
const queryParams = ref({})
|
||||||
|
|
@ -215,8 +215,16 @@ const rowData = ref({})
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
queryParams.value = JSON.parse(options.queryParams)
|
queryParams.value = JSON.parse(options.queryParams)
|
||||||
rowData.value = JSON.parse(options.queryParams)
|
rowData.value = JSON.parse(options.queryParams)
|
||||||
|
console.log("xxxxxxxxxxx",rowData.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
getPartTreeData()
|
||||||
|
//获取定损的配件信息
|
||||||
|
getPartItemData()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const damageReasonList = ref([
|
const damageReasonList = ref([
|
||||||
{ value: 0, text: '自然损坏' },
|
{ value: 0, text: '自然损坏' },
|
||||||
{ value: 1, text: '人为损坏' },
|
{ value: 1, text: '人为损坏' },
|
||||||
|
|
@ -310,7 +318,6 @@ const getPartTreeData = async () => {
|
||||||
const res = await partTypeTreeList({})
|
const res = await partTypeTreeList({})
|
||||||
partTreeData.value = res.data;
|
partTreeData.value = res.data;
|
||||||
}
|
}
|
||||||
getPartTreeData()
|
|
||||||
// 配件清除
|
// 配件清除
|
||||||
const clearPart = (index) =>{
|
const clearPart = (index) =>{
|
||||||
partItems.value[index].partId=""
|
partItems.value[index].partId=""
|
||||||
|
|
@ -353,6 +360,35 @@ const formLeft = ref({
|
||||||
repairNum: 0,
|
repairNum: 0,
|
||||||
})
|
})
|
||||||
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: ''}])
|
const partItems = ref([{ partNum: '', partType: 0, partId: '', storageNum: ''}])
|
||||||
|
|
||||||
|
const getPartItemData = async () => {
|
||||||
|
console.log("bbbbbbbbbbbbbbbbb",rowData.value.ids)
|
||||||
|
const res = await getPartItemApi({
|
||||||
|
ids: rowData.value.ids,
|
||||||
|
})
|
||||||
|
if(res.data && res.data.length > 0) {
|
||||||
|
// 1. 先设置数据
|
||||||
|
partItems.value = res.data.map(item => ({
|
||||||
|
...item,
|
||||||
|
partType: item.partId ? 1 : 0 // 假设 partType 表示是否有 partId
|
||||||
|
}));
|
||||||
|
|
||||||
|
// 使用 nextTick 确保组件渲染完成
|
||||||
|
nextTick(() => {
|
||||||
|
partItems.value.forEach((item, index) => {
|
||||||
|
if (item.partId) {
|
||||||
|
console.log("尝试设置 partId", item.partId)
|
||||||
|
if (treeSelectRef.value[index] && treeSelectRef.value[index].setSelectedValue) {
|
||||||
|
treeSelectRef.value[index].setSelectedValue(item.partId);
|
||||||
|
} else {
|
||||||
|
console.warn(`treeSelectRef[${index}] 没有 setSelectedValue 方法`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const addPart = () => {
|
const addPart = () => {
|
||||||
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
partItems.value.push({ partNum: '', partType: 0, partId: '', storageNum: '' })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,12 @@
|
||||||
<view class="cont">{{ item.maCode }}</view>
|
<view class="cont">{{ item.maCode }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
<uni-row :gutter="24" v-if="queryParams.manageType==0" >
|
||||||
|
<uni-col :span="6">编码状态:</uni-col>
|
||||||
|
<uni-col :span="16">
|
||||||
|
<view class="cont">{{ item.status }}</view>
|
||||||
|
</uni-col>
|
||||||
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="6">维修人员:</uni-col>
|
<uni-col :span="6">维修人员:</uni-col>
|
||||||
<uni-col :span="16">
|
<uni-col :span="16">
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app'
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
import { getCodeListApi,repairInputWarehouseApi,rejectWarehouseApi,getInfoByQrcodeApi } from '@/services/repair/testedInBound.js'
|
import { getCodeListApi,repairInputWarehouseApi,rejectWarehouseApi,getInfoByQrcodeApi,repairInputWarehouseApiTwo } from '@/services/repair/testedInBound.js'
|
||||||
import { getBoxCodeListApi } from '@/services/standard.js'
|
import { getBoxCodeListApi } from '@/services/standard.js'
|
||||||
|
|
||||||
const taskInfo = ref({})
|
const taskInfo = ref({})
|
||||||
|
|
@ -108,42 +108,50 @@ const ocrScan = () => {
|
||||||
// 二维码扫码
|
// 二维码扫码
|
||||||
const codeScan = async () => {
|
const codeScan = async () => {
|
||||||
qrCode.value=""
|
qrCode.value=""
|
||||||
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
// var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
||||||
mpaasScanModule.mpaasScan({
|
uni.scanCode({
|
||||||
// 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
|
success: function (res) {
|
||||||
'scanType': ['qrCode','barCode'],
|
// qrCode.value = res.resp_result.split("qrcode=")[1];
|
||||||
// 是否隐藏相册,默认false不隐藏
|
console.log('条码内容:' + res.result);
|
||||||
'hideAlbum': false,
|
qrCode.value = res.result
|
||||||
//ios需要设置这个参数,只支持中英文 zh-Hans、en,默认中文
|
|
||||||
'language' : 'en',
|
|
||||||
//相册选择照片识别错误提示(ios)
|
|
||||||
'failedMsg': '未识别到二维码,请重试',
|
|
||||||
//Android支持全屏需要设置此参数
|
|
||||||
'screenType': 'full'
|
|
||||||
},(ret) => {
|
|
||||||
console.log(ret)
|
|
||||||
if(ret.resp_code==10){
|
|
||||||
uni.showToast({ title: '用户取消', icon: 'none' })
|
|
||||||
maInfo.value = {}
|
|
||||||
}
|
|
||||||
if(ret.resp_code==11){
|
|
||||||
uni.showToast({ title: '扫码失败', icon: 'none' })
|
|
||||||
}
|
|
||||||
if(ret.resp_code==1000){
|
|
||||||
// uni.showToast({ title: '扫码成功', icon: 'none' })
|
|
||||||
qrCode.value = ret.resp_result.split("qrcode=")[1];
|
|
||||||
codeInBound()
|
codeInBound()
|
||||||
}
|
}
|
||||||
// uni.showModal({
|
});
|
||||||
// title: "弹窗标题",
|
// mpaasScanModule.mpaasScan({
|
||||||
// // 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
// // 扫码识别类型,参数可多选,qrCode、barCode,不设置,默认识别所有
|
||||||
// // 返回值中,resp_message 表示返回结果信息
|
// 'scanType': ['qrCode','barCode'],
|
||||||
// // 返回值中,resp_result 表示扫码结果,只有成功才会有返回
|
// // 是否隐藏相册,默认false不隐藏
|
||||||
// content: JSON.stringify(ret),
|
// 'hideAlbum': false,
|
||||||
// showCancel: false,
|
// //ios需要设置这个参数,只支持中英文 zh-Hans、en,默认中文
|
||||||
// confirmText: "确定"
|
// 'language' : 'en',
|
||||||
|
// //相册选择照片识别错误提示(ios)
|
||||||
|
// 'failedMsg': '未识别到二维码,请重试',
|
||||||
|
// //Android支持全屏需要设置此参数
|
||||||
|
// 'screenType': 'full'
|
||||||
|
// },(ret) => {
|
||||||
|
// console.log(ret)
|
||||||
|
// if(ret.resp_code==10){
|
||||||
|
// uni.showToast({ title: '用户取消', icon: 'none' })
|
||||||
|
// maInfo.value = {}
|
||||||
|
// }
|
||||||
|
// if(ret.resp_code==11){
|
||||||
|
// uni.showToast({ title: '扫码失败', icon: 'none' })
|
||||||
|
// }
|
||||||
|
// if(ret.resp_code==1000){
|
||||||
|
// // uni.showToast({ title: '扫码成功', icon: 'none' })
|
||||||
|
// qrCode.value = ret.resp_result.split("qrcode=")[1];
|
||||||
|
// codeInBound()
|
||||||
|
// }
|
||||||
|
// // uni.showModal({
|
||||||
|
// // title: "弹窗标题",
|
||||||
|
// // // 返回值中,resp_code 表示返回结果值,10:用户取消,11:其他错误,1000:成功
|
||||||
|
// // // 返回值中,resp_message 表示返回结果信息
|
||||||
|
// // // 返回值中,resp_result 表示扫码结果,只有成功才会有返回
|
||||||
|
// // content: JSON.stringify(ret),
|
||||||
|
// // showCancel: false,
|
||||||
|
// // confirmText: "确定"
|
||||||
|
// // })
|
||||||
// })
|
// })
|
||||||
})
|
|
||||||
}
|
}
|
||||||
// 二维码入库
|
// 二维码入库
|
||||||
const codeInBound = async () => {
|
const codeInBound = async () => {
|
||||||
|
|
@ -158,7 +166,7 @@ const codeInBound = async () => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
maInfo.value = res.data[0]
|
maInfo.value = res.data[0]
|
||||||
if(maInfo.value.maCode!=undefined&&maInfo.value.maCode!=""){
|
if(maInfo.value.maId!=undefined&&maInfo.value.maId!=""){
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({ title: '扫码二维码未绑定设备编码!', icon: 'none'})
|
uni.showToast({ title: '扫码二维码未绑定设备编码!', icon: 'none'})
|
||||||
}
|
}
|
||||||
|
|
@ -175,14 +183,17 @@ const cinfirmCodeInBound = async () => {
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
let arr=[{"maCode":maInfo.value.maCode,"maId":maInfo.value.maId}]
|
// let arr=[{"maId":maInfo.value.maId}]
|
||||||
let param = {
|
// let param = {
|
||||||
taskId: maInfo.value.taskId,
|
// taskId: maInfo.value.taskId,
|
||||||
typeId: maInfo.value.typeId,
|
// typeId: maInfo.value.typeId,
|
||||||
agreementId: maInfo.value.agreementId,
|
// agreementId: maInfo.value.agreementId,
|
||||||
maCodeList: arr,
|
// maCodeList: arr,
|
||||||
}
|
// }
|
||||||
const res = await repairInputWarehouseApi(param)
|
let param = {qrCode:qrCode.value}
|
||||||
|
console.log("bbbbbbbbbbbbbbbbb")
|
||||||
|
const res = await repairInputWarehouseApiTwo(param)
|
||||||
|
console.log("yyyyyyyyy",res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '入库成功!',
|
title: '入库成功!',
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,38 @@
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 递归查找节点
|
||||||
|
findNodeById(id, options) {
|
||||||
|
for (const option of options) {
|
||||||
|
if (option[this.defaultProps.id] === id) {
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
if (option.children && option.children.length > 0) {
|
||||||
|
const node = this.findNodeById(id, option.children);
|
||||||
|
if (node) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新接口:设置选中值
|
||||||
|
setSelectedValue(id) {
|
||||||
|
const node = this.findNodeById(id, this.options);
|
||||||
|
if (node) {
|
||||||
|
// 获取节点路径
|
||||||
|
const path = this.getNodePath(node, this.options);
|
||||||
|
if (path) {
|
||||||
|
// 拼接路径名称
|
||||||
|
this.showLabel = path.join('/');
|
||||||
|
} else {
|
||||||
|
this.showLabel = node[this.defaultProps.label];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//展开选项
|
//展开选项
|
||||||
openOptions() {
|
openOptions() {
|
||||||
if(this.showLabel==""){
|
if(this.showLabel==""){
|
||||||
|
|
|
||||||
|
|
@ -113,3 +113,12 @@ export const getScrapReasonList = (data) => {
|
||||||
data,
|
data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取定损的配件
|
||||||
|
export const getPartItemApi = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'GET',
|
||||||
|
url: '/material/repair/getLossPart',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,14 @@ export const repairInputWarehouseApi = (data) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const repairInputWarehouseApiTwo = (data) => {
|
||||||
|
return http({
|
||||||
|
method: 'POST',
|
||||||
|
url: '/material/repair_input_details/sanQrcodeInput',
|
||||||
|
data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 修试入库-通过
|
// 修试入库-通过
|
||||||
export const rejectWarehouseApi = (data) => {
|
export const rejectWarehouseApi = (data) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue