diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js
index 7104687..bff2566 100644
--- a/src/utils/ruoyi.js
+++ b/src/utils/ruoyi.js
@@ -197,7 +197,16 @@ export function handleTree(data, id, parentId, children) {
adaptToChildrenList(c);
}
}
+
+ if (o.buyPrice !== undefined) {
+ o.buyPrice = formatBuyPrice(o.buyPrice);
+ }
}
+ function formatBuyPrice(price) {
+ if (price === undefined || price === null) return '';
+ return parseFloat(price).toFixed(2);
+ }
+
return tree;
}
diff --git a/src/views/repairTest/repair/dialogOneForm.vue b/src/views/repairTest/repair/dialogOneForm.vue
index e046eb7..12e7f5b 100644
--- a/src/views/repairTest/repair/dialogOneForm.vue
+++ b/src/views/repairTest/repair/dialogOneForm.vue
@@ -97,24 +97,24 @@
:disabled="!isRequired"
>
-
-
-
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
diff --git a/src/views/repairTest/repair/dialogTwoForm.vue b/src/views/repairTest/repair/dialogTwoForm.vue
index 2fb4dfe..0b6e52e 100644
--- a/src/views/repairTest/repair/dialogTwoForm.vue
+++ b/src/views/repairTest/repair/dialogTwoForm.vue
@@ -252,19 +252,19 @@
trigger: 'blur',
}"
> -->
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ console.log(this.deptList)
this.deptList = this.handleTree(response.data, 'paId')
+ console.log(this.deptList)
this.loading = false
})
.catch((err) => {
@@ -544,7 +546,7 @@ export default {
handleUpdate(row) {
this.reset()
this.open = true
- this.title = '修改部门'
+ this.title = '修改配件'
this.isEdit = true
this.initGetPartType(row)
},
@@ -554,6 +556,11 @@ export default {
if (valid) {
if (this.form.paId != undefined) {
delete this.form.currentId
+ // 检查 buyPrice 是否为空或未定义,若如此则设为 null
+ this.form.buyPrice = this.form.buyPrice ? Number(this.form.buyPrice) : null;
+ // 检查 num 是否为空或未定义,若如此则设为 null
+ this.form.num = this.form.num ? Number(this.form.num) : null;
+ console.log(this.form)
updatePartTypeById(this.form).then((response) => {
this.$modal.msgSuccess('修改成功')
this.open = false
@@ -641,6 +648,7 @@ export default {
this.form.currentId = row.parentId
},
async initGetPartType(row) {
+ console.log(row, '-----------------------')
const currentItem = this.getAllParentArr(
this.deptList,
row.parentId,
diff --git a/src/views/warehouseManage/machinery/type/index.vue b/src/views/warehouseManage/machinery/type/index.vue
index e796523..711be38 100644
--- a/src/views/warehouseManage/machinery/type/index.vue
+++ b/src/views/warehouseManage/machinery/type/index.vue
@@ -135,13 +135,13 @@
prop="buyPrice"
show-overflow-tooltip
/>
-
+
+
+
+
+
+
+
diff --git a/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue b/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue
index 853b301..b8e51a6 100644
--- a/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue
+++ b/src/views/warehouseManage/newPurchase/partsAcceptance/component/addParts.vue
@@ -75,7 +75,7 @@
:disable-branch-nodes="true"
placeholder="请选择机具类型"
@select="select"
- :disabled="isDisabled"
+ :disabled="isDisabled "
style="width: 240px"
/>
@@ -140,7 +140,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
- @click="handleDelete"
+ @click="handleDelete"
>删除
-->
@@ -358,9 +358,9 @@
>