材料站联调
This commit is contained in:
parent
d8fbad3f46
commit
963a744d9c
|
|
@ -122,7 +122,7 @@ const getUserInfoByUserName = async () => {
|
|||
const userName = userInfo.value.userName
|
||||
console.log('🚀 ~ getUserInfoByUserName ~ userName:', userName)
|
||||
const res = await getUserInfoByUserNameApi({ userName })
|
||||
idCard.value = res.data.idCard
|
||||
idCard.value = res?.data?.idCard
|
||||
console.log('🚀 ~ getUserInfoByUserName ~ idCard.value:', idCard.value)
|
||||
uni.setStorageSync('idCard', idCard.value)
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ const getTeamList = async () => {
|
|||
const getProjectListApi = async () => {
|
||||
console.log('🚀 ~ 工程')
|
||||
try {
|
||||
const res = await getProjectList({ unitId: null, isApp: true, teamName: formData.teamName })
|
||||
const res = await getProjectList({ unitId: null, isApp: true, teamId: formData.teamId })
|
||||
if (!res.data || !res.data.length) return
|
||||
console.log('🚀 ~ getProjectListApi ~ res:', res)
|
||||
prodRange.value = res.data.map((item) => {
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@
|
|||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">规格型号:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<view class="cont">{{ item.materialModel }}</view>
|
||||
<view class="cont">{{ item.typeName }}</view>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
|
|
@ -191,7 +191,7 @@ const queryCodeParams = ref({
|
|||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
typeId: '',
|
||||
maStatus: 1,
|
||||
// maStatus: 1,
|
||||
maCode: '',
|
||||
})
|
||||
const qrCodeScan = ref('')
|
||||
|
|
@ -217,6 +217,8 @@ onLoad((opt) => {
|
|||
// queryParamsTemp.value.id = queryParamsTemp.value.parentId
|
||||
console.log('xxxxxxxx', queryParamsTemp.value)
|
||||
queryCodeParams.value.typeId = queryParamsTemp.value.typeId
|
||||
queryCodeParams.value.proId = queryParamsTemp.value.proId
|
||||
queryCodeParams.value.teamId = queryParamsTemp.value.teamId
|
||||
queryParams.value = { ...queryParamsTemp.value }
|
||||
if (queryParamsTemp.value.isBack) {
|
||||
getCodeList() // 获取编码列表
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
<uni-th width="180" align="center">规格型号</uni-th>
|
||||
<uni-th width="80" align="center">在库数</uni-th>
|
||||
<uni-th width="80" align="center">在用数</uni-th>
|
||||
<uni-th width="80" align="center">预领数</uni-th>
|
||||
<uni-th width="80" align="center" v-if="opts.isOut">预领数</uni-th>
|
||||
<uni-th width="100" align="center">{{ opts.isOut ? '出库数' : '领用数' }}</uni-th>
|
||||
<uni-th width="100" align="center">操作</uni-th>
|
||||
</uni-tr>
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
</uni-td>
|
||||
<uni-td align="center">{{ item.storageNum }}</uni-td>
|
||||
<uni-td align="center">{{ item.useNum }}</uni-td>
|
||||
<uni-td align="center">{{ item.preNum }}</uni-td>
|
||||
<uni-td align="center" v-if="opts.isOut">{{ item.preNum }}</uni-td>
|
||||
<uni-td align="center"
|
||||
><uni-easyinput
|
||||
v-if="item.manageType == 1 || !opts.isOut"
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
删除
|
||||
</button>
|
||||
<button
|
||||
v-if="item.manageType == 0 && !item.maCodeList"
|
||||
v-if="item.manageType == 0 && item.maCodeList"
|
||||
class="uni-button"
|
||||
size="mini"
|
||||
@click="handleDetail(item)"
|
||||
|
|
@ -401,8 +401,9 @@ const changeEquipment = (e) => {
|
|||
const equipment = findEquipmentById(equipmentList.value, e.parentId)
|
||||
tableData.value.push({
|
||||
...JSON.parse(JSON.stringify(e)),
|
||||
storageNum: e.num,
|
||||
maTypeName: equipment.typeName,
|
||||
preNum: e.manageType == 1 ? 1 : 0, // 数量默认为1
|
||||
preNum: 1, // 数量默认为1
|
||||
maCodeList: [],
|
||||
})
|
||||
setTimeout(() => {
|
||||
|
|
@ -441,7 +442,9 @@ const getCode = (item) => {
|
|||
}
|
||||
item.isEdit = opts.value.isEdit
|
||||
uni.navigateTo({
|
||||
url: '/pages/materialsStation/toolsLease/codeOut?params=' + JSON.stringify(item),
|
||||
url:
|
||||
'/pages/materialsStation/toolsLease/codeOut?params=' +
|
||||
JSON.stringify({ ...item, proId: formData.projectId, teamId: formData.teamId }),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -571,7 +574,7 @@ onShow(() => {
|
|||
// 监听添加编码
|
||||
uni.$on('maCodeList', (data) => {
|
||||
console.log('🚀 ~ onShow ~ data:', data)
|
||||
const item = tableData.value.find((item) => item.typeId === data[0].typeId)
|
||||
const item = tableData.value.find((item) => item.typeId == data[0].typeId)
|
||||
console.log('🚀 ~ onShow ~ item:', item)
|
||||
if (item) {
|
||||
item.maCodeList = data
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export function updateTeamProjectApi(data) {
|
|||
// 预警统计
|
||||
export function getToolsLedgerDetailsListApi(data) {
|
||||
return http({
|
||||
url: '/material/complex_query/getToolsLedgerDetailsList',
|
||||
url: '/material/material_maMachine/getToolsLedgerDetailsList',
|
||||
method: 'get',
|
||||
data,
|
||||
})
|
||||
|
|
@ -84,8 +84,8 @@ export const getProjectList = (data = {}) => {
|
|||
// 类型规格-树
|
||||
export const getTypeTreeList = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/ma_type/equipmentType',
|
||||
method: 'post',
|
||||
url: '/material/material_lease_apply_info/equipmentType',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ export const getMachineByIdApi = (data) => {
|
|||
export const getCodeDeviceListAPI = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/ma_machine/list',
|
||||
url: '/material/material_lease_apply_info/getMachineById',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ export const editBackTask = (data) => {
|
|||
export const getUseTypeTree = (data) => {
|
||||
return http({
|
||||
method: 'POST',
|
||||
url: '/material/select/getUseTypeTree',
|
||||
url: '/material/material_back_apply_info/getUseTypeTree',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ export const getMachine = (data) => {
|
|||
export const getToolsLedgerList = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/complex_query/getToolsLedgerList',
|
||||
url: '/material/material_maMachine/getToolsLedgerList',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
@ -243,7 +243,7 @@ export const getToolsLedgerList = (data) => {
|
|||
export const getTeamUseNumList = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/complex_query/getTeamUseNumList',
|
||||
url: '/material/material_maMachine/getTeamUseNumList',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
@ -251,7 +251,7 @@ export const getTeamUseNumList = (data) => {
|
|||
// 班组预警
|
||||
export function getTeamWarnDetailsListApi(data) {
|
||||
return http({
|
||||
url: '/material/complex_query/getTeamWarnDetailsList',
|
||||
url: '/material/material_maMachine/getTeamWarnDetailsList',
|
||||
method: 'get',
|
||||
data
|
||||
})
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ const httpInterceptor = {
|
|||
const memberStore = useMemberStore()
|
||||
const token = memberStore.token
|
||||
|
||||
// const token = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjQ2NDdmYjlkLWI5OTItNDRiNy05MTdkLTMwZjg0ZjUxYzM5MCIsInVzZXJuYW1lIjoiYWRtaW4ifQ.9xM5bFhrmHK09-4ZgL5SS8WraNIJjIijuB-1P0lJF-n0KlVM5Bglvyjltk1NQbdqgi1hwRocZS1OU41cLiwuig"
|
||||
if (token) {
|
||||
options.header.Authorization = token
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default defineConfig({
|
|||
// 在此处编写代理规则
|
||||
'/api': {
|
||||
// target: 'http://192.168.2.76:18080',
|
||||
target: 'http://192.168.0.41:18080',
|
||||
target: 'http://192.168.0.96:18080',
|
||||
// target: 'http://36.33.26.201:19988/prod-api/',
|
||||
// target: 'http://192.168.0.234:18080',
|
||||
// target: 'http://localhost:18080',
|
||||
|
|
|
|||
Loading…
Reference in New Issue