材料站联调

This commit is contained in:
bb_pan 2025-06-26 17:46:00 +08:00
parent d8fbad3f46
commit 963a744d9c
7 changed files with 24 additions and 20 deletions

View File

@ -122,7 +122,7 @@ const getUserInfoByUserName = async () => {
const userName = userInfo.value.userName const userName = userInfo.value.userName
console.log('🚀 ~ getUserInfoByUserName ~ userName:', userName) console.log('🚀 ~ getUserInfoByUserName ~ userName:', userName)
const res = await getUserInfoByUserNameApi({ userName }) const res = await getUserInfoByUserNameApi({ userName })
idCard.value = res.data.idCard idCard.value = res?.data?.idCard
console.log('🚀 ~ getUserInfoByUserName ~ idCard.value:', idCard.value) console.log('🚀 ~ getUserInfoByUserName ~ idCard.value:', idCard.value)
uni.setStorageSync('idCard', idCard.value) uni.setStorageSync('idCard', idCard.value)
} catch (error) { } catch (error) {

View File

@ -218,7 +218,7 @@ const getTeamList = async () => {
const getProjectListApi = async () => { const getProjectListApi = async () => {
console.log('🚀 ~ 工程') console.log('🚀 ~ 工程')
try { 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 if (!res.data || !res.data.length) return
console.log('🚀 ~ getProjectListApi ~ res:', res) console.log('🚀 ~ getProjectListApi ~ res:', res)
prodRange.value = res.data.map((item) => { prodRange.value = res.data.map((item) => {

View File

@ -135,7 +135,7 @@
<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">
<view class="cont">{{ item.materialModel }}</view> <view class="cont">{{ item.typeName }}</view>
</uni-col> </uni-col>
</uni-row> </uni-row>
<uni-row :gutter="24"> <uni-row :gutter="24">
@ -191,7 +191,7 @@ const queryCodeParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 9999, pageSize: 9999,
typeId: '', typeId: '',
maStatus: 1, // maStatus: 1,
maCode: '', maCode: '',
}) })
const qrCodeScan = ref('') const qrCodeScan = ref('')
@ -217,6 +217,8 @@ onLoad((opt) => {
// queryParamsTemp.value.id = queryParamsTemp.value.parentId // queryParamsTemp.value.id = queryParamsTemp.value.parentId
console.log('xxxxxxxx', queryParamsTemp.value) console.log('xxxxxxxx', queryParamsTemp.value)
queryCodeParams.value.typeId = queryParamsTemp.value.typeId queryCodeParams.value.typeId = queryParamsTemp.value.typeId
queryCodeParams.value.proId = queryParamsTemp.value.proId
queryCodeParams.value.teamId = queryParamsTemp.value.teamId
queryParams.value = { ...queryParamsTemp.value } queryParams.value = { ...queryParamsTemp.value }
if (queryParamsTemp.value.isBack) { if (queryParamsTemp.value.isBack) {
getCodeList() // getCodeList() //

View File

@ -82,7 +82,7 @@
<uni-th width="180" align="center">规格型号</uni-th> <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">在用数</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">{{ opts.isOut ? '出库数' : '领用数' }}</uni-th>
<uni-th width="100" align="center">操作</uni-th> <uni-th width="100" align="center">操作</uni-th>
</uni-tr> </uni-tr>
@ -94,7 +94,7 @@
</uni-td> </uni-td>
<uni-td align="center">{{ item.storageNum }}</uni-td> <uni-td align="center">{{ item.storageNum }}</uni-td>
<uni-td align="center">{{ item.useNum }}</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-td align="center"
><uni-easyinput ><uni-easyinput
v-if="item.manageType == 1 || !opts.isOut" v-if="item.manageType == 1 || !opts.isOut"
@ -130,7 +130,7 @@
删除 删除
</button> </button>
<button <button
v-if="item.manageType == 0 && !item.maCodeList" v-if="item.manageType == 0 && item.maCodeList"
class="uni-button" class="uni-button"
size="mini" size="mini"
@click="handleDetail(item)" @click="handleDetail(item)"
@ -401,8 +401,9 @@ const changeEquipment = (e) => {
const equipment = findEquipmentById(equipmentList.value, e.parentId) const equipment = findEquipmentById(equipmentList.value, e.parentId)
tableData.value.push({ tableData.value.push({
...JSON.parse(JSON.stringify(e)), ...JSON.parse(JSON.stringify(e)),
storageNum: e.num,
maTypeName: equipment.typeName, maTypeName: equipment.typeName,
preNum: e.manageType == 1 ? 1 : 0, // 1 preNum: 1, // 1
maCodeList: [], maCodeList: [],
}) })
setTimeout(() => { setTimeout(() => {
@ -441,7 +442,9 @@ const getCode = (item) => {
} }
item.isEdit = opts.value.isEdit item.isEdit = opts.value.isEdit
uni.navigateTo({ 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) => { uni.$on('maCodeList', (data) => {
console.log('🚀 ~ onShow ~ data:', 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) console.log('🚀 ~ onShow ~ item:', item)
if (item) { if (item) {
item.maCodeList = data item.maCodeList = data

View File

@ -39,7 +39,7 @@ export function updateTeamProjectApi(data) {
// 预警统计 // 预警统计
export function getToolsLedgerDetailsListApi(data) { export function getToolsLedgerDetailsListApi(data) {
return http({ return http({
url: '/material/complex_query/getToolsLedgerDetailsList', url: '/material/material_maMachine/getToolsLedgerDetailsList',
method: 'get', method: 'get',
data, data,
}) })
@ -84,8 +84,8 @@ export const getProjectList = (data = {}) => {
// 类型规格-树 // 类型规格-树
export const getTypeTreeList = (data) => { export const getTypeTreeList = (data) => {
return http({ return http({
method: 'GET', method: 'post',
url: '/material/ma_type/equipmentType', url: '/material/material_lease_apply_info/equipmentType',
data, data,
}) })
} }
@ -162,7 +162,7 @@ export const getMachineByIdApi = (data) => {
export const getCodeDeviceListAPI = (data) => { export const getCodeDeviceListAPI = (data) => {
return http({ return http({
method: 'GET', method: 'GET',
url: '/material/ma_machine/list', url: '/material/material_lease_apply_info/getMachineById',
data, data,
}) })
} }
@ -207,7 +207,7 @@ export const editBackTask = (data) => {
export const getUseTypeTree = (data) => { export const getUseTypeTree = (data) => {
return http({ return http({
method: 'POST', method: 'POST',
url: '/material/select/getUseTypeTree', url: '/material/material_back_apply_info/getUseTypeTree',
data, data,
}) })
} }
@ -234,7 +234,7 @@ export const getMachine = (data) => {
export const getToolsLedgerList = (data) => { export const getToolsLedgerList = (data) => {
return http({ return http({
method: 'GET', method: 'GET',
url: '/material/complex_query/getToolsLedgerList', url: '/material/material_maMachine/getToolsLedgerList',
data, data,
}) })
} }
@ -243,7 +243,7 @@ export const getToolsLedgerList = (data) => {
export const getTeamUseNumList = (data) => { export const getTeamUseNumList = (data) => {
return http({ return http({
method: 'GET', method: 'GET',
url: '/material/complex_query/getTeamUseNumList', url: '/material/material_maMachine/getTeamUseNumList',
data, data,
}) })
} }
@ -251,7 +251,7 @@ export const getTeamUseNumList = (data) => {
// 班组预警 // 班组预警
export function getTeamWarnDetailsListApi(data) { export function getTeamWarnDetailsListApi(data) {
return http({ return http({
url: '/material/complex_query/getTeamWarnDetailsList', url: '/material/material_maMachine/getTeamWarnDetailsList',
method: 'get', method: 'get',
data data
}) })

View File

@ -42,7 +42,6 @@ const httpInterceptor = {
const memberStore = useMemberStore() const memberStore = useMemberStore()
const token = memberStore.token const token = memberStore.token
// const token = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjQ2NDdmYjlkLWI5OTItNDRiNy05MTdkLTMwZjg0ZjUxYzM5MCIsInVzZXJuYW1lIjoiYWRtaW4ifQ.9xM5bFhrmHK09-4ZgL5SS8WraNIJjIijuB-1P0lJF-n0KlVM5Bglvyjltk1NQbdqgi1hwRocZS1OU41cLiwuig"
if (token) { if (token) {
options.header.Authorization = token options.header.Authorization = token
} }

View File

@ -21,7 +21,7 @@ export default defineConfig({
// 在此处编写代理规则 // 在此处编写代理规则
'/api': { '/api': {
// target: 'http://192.168.2.76:18080', // 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://36.33.26.201:19988/prod-api/',
// target: 'http://192.168.0.234:18080', // target: 'http://192.168.0.234:18080',
// target: 'http://localhost:18080', // target: 'http://localhost:18080',