diff --git a/.env.development b/.env.development
index e69c543..8c4711a 100644
--- a/.env.development
+++ b/.env.development
@@ -1,5 +1,5 @@
-VITE_BASE_URL=http://localhost:12080/admin-api
+VITE_BASE_URL=http://192.168.0.229:12081/admin-api
#VITE_BASE_URL=http://dev.ccwin-in.com:25202/api/admin-api
-VITE_BASE_URL_IMAGE=http://192.168.0.106:12080/admin-api
+VITE_BASE_URL_IMAGE=http://192.168.0.229:12081/admin-api
diff --git a/src/api/spareParts.ts b/src/api/spareParts.ts
index 66f8cc2..25b130a 100644
--- a/src/api/spareParts.ts
+++ b/src/api/spareParts.ts
@@ -14,4 +14,8 @@ export function getApplySparePartsList() {
// 新增备件维修获取备件列表
export function getServiceSparePartsList() {
return http.get('/eam/item/getItemMaintainList')
+}
+// 备件当前库存情况
+export function getApplyItemByNumber(number) {
+ return http.get(`/eam/item/getApplyItemByNumber?number=`+number)
}
\ No newline at end of file
diff --git a/src/api/upload.ts b/src/api/upload.ts
index b56ba91..c6305fd 100644
--- a/src/api/upload.ts
+++ b/src/api/upload.ts
@@ -1,4 +1,5 @@
import upload from '@/api/uploadHttp'
+import http from './http'
// import request from '@/utils/request'
// 上传
export function uploadFile(data) {
@@ -8,4 +9,13 @@ export function uploadFile(data) {
filePath:data.filePath,
name: data.name
})
-}
\ No newline at end of file
+}
+
+
+
+
+
+
+export function uploadCommit(fileInfo) {
+ return http.post('/eam/attachment-file/upload',fileInfo)
+}
diff --git a/src/pages/overhaulOrder/addForm.vue b/src/pages/overhaulOrder/addForm.vue
index 4812096..0aaefef 100644
--- a/src/pages/overhaulOrder/addForm.vue
+++ b/src/pages/overhaulOrder/addForm.vue
@@ -27,7 +27,7 @@
-->
-
+
{{type =='DEVICE'||type == 'TECH'?'设备' : '模具'}}
否
-
+
+
+
+
+
+
+
@@ -181,6 +187,8 @@
type: '',
deviceNumber: undefined,
isRadeIn: '',
+ totalQty: '',
+ requestQty: '',
currentQty: '',
qty: '',
temporarilySpecifications: ''
@@ -280,7 +288,7 @@
// 单列模式
function openSingleNewColumn(fieldName, val, list) {
- singleColumnList.value = list
+ singleColumnList.value = []
field.value = fieldName
if (val) {
singleColumnDefaultValue.value = [list.findIndex(item => item.value == val)]
@@ -288,10 +296,10 @@
singleColumnDefaultValue.value = []
}
isShowSelectItem.value = true;
- singleColumnList.value = list
}
async function searchItem(name){
+ proxy.$modal.loading('加载中')
await getSparePartsList(name);
}
@@ -301,20 +309,18 @@
return;
}
if (type == 1) {
+ proxy.$modal.loading("加载中")
form1.value.itemNumber = forms.value.temporarilyNumber;
form1.value.name = forms.value.temporarilyName;
form1.value.specifications = forms.value.temporarilySpecifications;
- let param = {
- number:form1.value.itemNumber
- }
- await sparePartsApi.getApplySparePartsList(param).then(res => {
- const itemInfo = res.data.find(item=>item.number == form1.value.itemNumber);
- if(itemInfo){
- form1.value.currentQty = itemInfo.qty;
- form1.value.isRadeIn = itemInfo.isRadeIn;
- updataKey.value++
- }
- }).catch(() => { })
+ await sparePartsApi.getApplyItemByNumber(form1.value.itemNumber).then(res => {
+ form1.value.totalQty = res.data.totalStockQty
+ form1.value.currentQty = res.data.availableQty;
+ form1.value.requestQty = res.data.totalRequestQty;
+ form1.value.isRadeIn = res.data.isRadeIn;
+ updataKey.value++
+ }).catch(() => {
+ })
}
await getSparePartsList(null);
isShowSelectItem.value = false;
@@ -332,7 +338,11 @@
})
sparePartsList.value = res.data
singleColumnList.value = sparePartsList.value
- }).catch(() => { })
+ proxy.$modal.closeLoading()
+ }).catch(() => {
+ proxy.$modal.closeLoading()
+ })
+
}
// 单列模式
@@ -434,6 +444,8 @@
type: '',
deviceNumber: undefined,
isRadeIn: '',
+ totalQty: '',
+ requestQty: '',
currentQty: "",
qty: '',
}
@@ -449,11 +461,11 @@
// this.$modal.showToast('请选择设备')
// return;
// }
- if (!form1.value.qty || form1.value.qty == 0) {
+ if (!form1.value.qty || Number(form1.value.qty) == 0) {
proxy.$modal.showToast('请输入数量')
return;
}
- if (form1.value.qty > form1.value.currentQty) {
+ if (Number(form1.value.qty) > Number(form1.value.currentQty)) {
proxy.$modal.showToast('数量不可以大于库存')
return;
}
diff --git a/src/pages/upkeepOrder/detail.vue b/src/pages/upkeepOrder/detail.vue
index 25a57c0..25a13c1 100644
--- a/src/pages/upkeepOrder/detail.vue
+++ b/src/pages/upkeepOrder/detail.vue
@@ -137,6 +137,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+