jiangping
2023-08-18 40609a1bd11ce79445562ac23f16af23a48c3933
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
@@ -139,6 +139,7 @@
        {
            batch: '',
            locationId: '',
            locationIdLabel: '',
            locationName: '',
            materialId: '',
            materialName: '',
@@ -165,6 +166,9 @@
    }
    // 打开选择物料
    const openQ = (index: number) => {
        if (list.value[index].locationIdLabel == 'APPLIANCE_ONTEST' || list.value[index].locationIdLabel == 'APPLIANCE_OFFTEST' || list.value[index].locationIdLabel == 'APPLIANCE_USELESS') {
            return
        }
        i.value = index
        qualityShow.value = true
    }
@@ -180,18 +184,19 @@
        locationShow.value = true
    }
    const addItem = () => {
        // if (!form.warehouseId) return Toast('请选择入库仓库')
        if (!form.warehouseId) return Toast('请选择入库仓库')
        list.value.push({
            batch: '',
            locationId: '',
            locationName: '',
            locationIdLabel: list.value[list.value.length - 1].locationIdLabel,
            materialId: '',
            materialName: '',
            num: '',
            procedureId: '',
            procedureName: '',
            qualityType: '',
            qualityTypeName: '',
            qualityType: list.value[list.value.length - 1].qualityType,
            qualityTypeName: list.value[list.value.length - 1].qualityTypeName,
            unitId: '',
            unitName: ''
        })
@@ -301,6 +306,17 @@
                            item.locationId = res.data[0].id
                            item.locationName = res.data[0].unionName
                        })
                        list.value[i.value].locationIdLabel = res.data[0].label
                        if (res.data[0].label === 'APPLIANCE_ONTEST') {
                            list.value[i.value].qualityType = '0'
                            list.value[i.value].qualityTypeName = '合格'
                        } else if (res.data[0].label === 'APPLIANCE_OFFTEST') {
                            list.value[i.value].qualityType = '1'
                            list.value[i.value].qualityTypeName = '不良'
                        } else if (res.data[0].label === 'APPLIANCE_USELESS') {
                            list.value[i.value].qualityType = '2'
                            list.value[i.value].qualityTypeName = '报废'
                        }
                    } else {
                        location.value = true
                        list.value.forEach(item => {
@@ -340,6 +356,19 @@
    const getValue3 = (item: any): void => {
        list.value[i.value].locationId = item.id
        list.value[i.value].locationName = item.unionName
        list.value[i.value].qualityType = ''
        list.value[i.value].qualityTypeName = ''
        list.value[i.value].locationIdLabel = item.label
        if (item.label === 'APPLIANCE_ONTEST') {
            list.value[i.value].qualityType = '0'
            list.value[i.value].qualityTypeName = '合格'
        } else if (item.label === 'APPLIANCE_OFFTEST') {
            list.value[i.value].qualityType = '1'
            list.value[i.value].qualityTypeName = '不良'
        } else if (item.label === 'APPLIANCE_USELESS') {
            list.value[i.value].qualityType = '2'
            list.value[i.value].qualityTypeName = '报废'
        }
        locationShow.value = false
    }
    // 选择工序