diff --git a/src/api/model/asm.js b/src/api/model/asm.js
index 641f2633..05520d26 100644
--- a/src/api/model/asm.js
+++ b/src/api/model/asm.js
@@ -27,6 +27,13 @@ export default {
data);
}
},
+ update: {
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/asm/assetcate/${id}/`,
+ data);
+ }
+ },
delete: {
name: "删除",
req: async function(id){
@@ -77,6 +84,13 @@ export default {
data);
}
},
+ update: {
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/asm/assetlog/${id}/`,
+ data);
+ }
+ },
delete: {
name: "删除",
req: async function(id){
diff --git a/src/components/xtSelect/index.vue b/src/components/xtSelect/index.vue
index 94c622a5..83405748 100644
--- a/src/components/xtSelect/index.vue
+++ b/src/components/xtSelect/index.vue
@@ -89,7 +89,7 @@ const props = defineProps({
options: { type: Array, default: null },
});
-const emit = defineEmits(["update:modelValue", "update:obj", "change"]);
+const emit = defineEmits(["update:modelValue", "update:obj", "change", "update::label"]);
const selectable = (row) => row.count_canhandover?row.count_canhandover>0:true;
// 控制 popover 显示与隐藏的状态
const showPopover = ref(false);
@@ -170,6 +170,7 @@ const selectValue = computed({
},
set(val) {
emit("update:modelValue", val);
+ emit("update:label", selectLabel.value);
},
});
diff --git a/src/views/asm/assetlogin_form.vue b/src/views/asm/assetlogin_form.vue
index 0058408a..bd8f0766 100644
--- a/src/views/asm/assetlogin_form.vue
+++ b/src/views/asm/assetlogin_form.vue
@@ -8,10 +8,19 @@
+
+
+
+
+
@@ -31,41 +40,71 @@
:addTemplate="addTemplate"
placeholder="暂无数据"
>
-
+
+
+ *
+ 资产类别
+
-
+
-
+
+
+ *
+ 资产名称
+
-
+
+
+ *
+ 规格型号
+
+
+ *
+ 数量
+
+
+ *
+ 可用年限
+
+
+ *
+ 资产原值
+
-
+
+
+ *
+ 供应商
+
-
+
+
+
@@ -83,21 +122,21 @@
@click="handleDel"
:loading="saveLoading"
>删除
+ 提交审批
- 提交审批
+ v-if = "formData.ticket_ && localMode=='show'"
+ :t_id="formData.id"
+ :ticket_="formData.ticket_"
+ :ticket_data="ticket_data"
+ @success="$emit('success', localMode)"
+ ref="ticketd_b"
+ >
@@ -136,7 +175,8 @@ export default {
localMode: this.mode,
saveLoading: false,
addTemplate: {
- name: null,
+ quantity: 1,
+ canuse_year: 1
}
}
},
@@ -150,7 +190,7 @@ export default {
methods: {
async getTid() {
try {
- let res = await this.$API.em.repair.item.req(this.t_id);
+ let res = await this.$API.asm.assetlog.item.req(this.t_id);
this.formData = res;
if (res.ticket_ && res.ticket_.state_.type == 1 && res.create_by == this.$TOOL.data.get("USER_INFO").id) {
this.localMode = "edit";
@@ -164,7 +204,7 @@ export default {
type: "warning",
})
.then(()=>{
- this.$API.em.repair.delete.req(this.formData.id).then(res=>{
+ this.$API.asm.assetlog.delete.req(this.formData.id).then(res=>{
this.$message.success("删除成功");
this.$emit('success');
})
@@ -173,7 +213,7 @@ export default {
async handleSave() {
if (this.localMode == "add") {
try {
- let res = await this.$API.em.repair.create.req(this.formData);
+ let res = await this.$API.asm.assetlog.create.req(this.formData);
this.$message.success("提交成功");
this.$emit('success', this.localMode);
} catch (error) {
@@ -181,7 +221,15 @@ export default {
throw error;
}
} else if (this.localMode == "edit") {
- this.$message.error("不支持编辑");
+ try{
+ let res = await this.$API.asm.assetlog.update.req(this.formData.id, this.formData);
+ this.$message.success("提交成功");
+ this.$emit('success', this.localMode);
+ }catch (error){
+ throw error;
+ }
+
+
}
}
}
diff --git a/src/views/em/repair_form.vue b/src/views/em/repair_form.vue
index 4c62764c..d3a1bf1b 100644
--- a/src/views/em/repair_form.vue
+++ b/src/views/em/repair_form.vue
@@ -80,21 +80,21 @@
@click="handleDel"
:loading="saveLoading"
>删除
-
- 提交审批
+ 提交审批
+
diff --git a/src/views/hrm/resignation_form.vue b/src/views/hrm/resignation_form.vue
index b305a6e1..274c5b40 100644
--- a/src/views/hrm/resignation_form.vue
+++ b/src/views/hrm/resignation_form.vue
@@ -42,20 +42,21 @@
@click="handleDel"
:loading="saveLoading"
>删除
-
- 提交审批
+ 提交审批
+
diff --git a/src/views/pum/supplieraudit_form.vue b/src/views/pum/supplieraudit_form.vue
index cd1d3809..dd3877b8 100644
--- a/src/views/pum/supplieraudit_form.vue
+++ b/src/views/pum/supplieraudit_form.vue
@@ -51,20 +51,21 @@
style="margin-right: 4px;"
@click="handleDel"
>删除
-
- 提交审批
+ 提交审批
+