详情审批bug修改

main
liuyiliang 1 year ago
parent 9b3446fe68
commit d158bfa6b0
  1. 56
      src/views/leger/equipmentledgerDetail.vue
  2. 56
      src/views/leger/toolinventoryrecordDetail.vue
  3. 2
      src/views/smart/workorder.vue
  4. 51
      src/views/smart/workorderDetail.vue

@ -100,7 +100,7 @@
<!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81--> <!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81-->
</template> </template>
<script> <script>
import {getList, getDetail, add, update, remove} from "@/api/leger/equipmentledger"; import {getList, getDetail, add, update, remove, reject, auditing} from "@/api/leger/equipmentledger";
import { import {
parameters_add, parameters_add,
parameters_update, parameters_update,
@ -958,8 +958,7 @@
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus="2" this.submitRejectOrauditing('2');
this.submitRejectOrauditing();
}); });
}, },
reject() { reject() {
@ -968,26 +967,45 @@
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus="3" this.submitRejectOrauditing('3');
this.submitRejectOrauditing();
}); });
}, },
submitRejectOrauditing() { submitRejectOrauditing(status) {
update(this.tab1_form).then(() => { if (status === '2') {
this.$router.push({ auditing(this.tab1_form.id).then(() => {
path: "/leger/equipmentledger", this.$router.push({
query: {}, path: "/leger/equipmentledger",
}); query: {},
this.$message({ });
type: "success", this.$message({
message: "操作成功!" type: "success",
message: "操作成功!"
});
}).catch((error) => {
console.log(error);
this.$message({
type: "error",
message: "操作失败!"
});
}); });
}).catch((error) => { } else if (status === '3') {
this.$message({ reject(this.tab1_form.id).then(() => {
type: "error", this.$router.push({
message: "操作失败!" path: "/leger/equipmentledger",
query: {},
});
this.$message({
type: "success",
message: "操作成功!"
});
}).catch((error) => {
console.log(error);
this.$message({
type: "error",
message: "操作失败!"
});
}); });
}); }
}, },
del() { del() {
this.$confirm("是否将选择数据删除?", { this.$confirm("是否将选择数据删除?", {

@ -146,7 +146,7 @@
<!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81--> <!-- https://avuejs.com/form/form-rules.html#%E5%A4%96%E7%BD%AE%E9%AA%8C%E8%AF%81-->
</template> </template>
<script> <script>
import {getList, getDetail, add, update, remove} from "@/api/leger/toolinventoryrecord"; import {getList, getDetail, add, update, remove, reject, auditing} from "@/api/leger/toolinventoryrecord";
import { import {
inspection_add, inspection_add,
inspection_update, inspection_update,
@ -951,8 +951,7 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus = "2" this.submitRejectOrauditing('2');
this.submitRejectOrauditing();
}); });
}, },
reject() { reject() {
@ -961,26 +960,45 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.checkStatus = "3" this.submitRejectOrauditing('3');
this.submitRejectOrauditing();
}); });
}, },
submitRejectOrauditing() { submitRejectOrauditing(status) {
update(this.tab1_form).then(() => { if (status === '2') {
this.$router.push({ auditing(this.tab1_form.id).then(() => {
path: "/leger/toolinventoryrecord", this.$router.push({
query: {}, path: "/leger/toolinventoryrecord",
}); query: {},
this.$message({ });
type: "success", this.$message({
message: "操作成功!" type: "success",
message: "操作成功!"
});
}).catch((error) => {
console.log(error);
this.$message({
type: "error",
message: "操作失败!"
});
}); });
}).catch((error) => { } else if (status === '3') {
this.$message({ reject(this.tab1_form.id).then(() => {
type: "error", this.$router.push({
message: "操作失败!" path: "/leger/toolinventoryrecord",
query: {},
});
this.$message({
type: "success",
message: "操作成功!"
});
}).catch((error) => {
console.log(error);
this.$message({
type: "error",
message: "操作失败!"
});
}); });
}); }
}, },
del() { del() {
this.$confirm("是否将选择数据删除?", { this.$confirm("是否将选择数据删除?", {

@ -625,11 +625,11 @@
}); });
}, },
submitForm() { submitForm() {
debugger
this.$refs['dialogForm'].validate((valid) => { this.$refs['dialogForm'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
var formData = {...this.dialogForm}; var formData = {...this.dialogForm};
formData.approvalStatus = 1;
update(formData).then(() => { update(formData).then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({

@ -32,7 +32,7 @@
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {getDetail, add, update, remove} from "@/api/smart/workorder"; import {getDetail, add, update, remove, reject, auditing} from "@/api/smart/workorder";
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
export default { export default {
@ -440,6 +440,7 @@
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.tab1_form.approvalStatus = 1;
update(this.tab1_form).then(() => { update(this.tab1_form).then(() => {
this.$router.push({ this.$router.push({
path: "/smart/workorder", path: "/smart/workorder",
@ -482,23 +483,41 @@
}); });
}, },
submitRejectOrauditing(status) { submitRejectOrauditing(status) {
var formData = {id: this.tab1_form.id, approvalStatus: status}; if (status === '2') {
update(formData).then(() => { auditing(this.tab1_form.id).then(() => {
this.$router.push({ this.$router.push({
path: "/smart/workorder", path: "/smart/workorder",
query: {}, query: {},
}); });
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
});
}).catch((error) => {
console.log(error);
this.$message({
type: "error",
message: "操作失败!"
});
}); });
}).catch((error) => { } else if (status === '3') {
console.log(error); reject(this.tab1_form.id).then(() => {
this.$message({ this.$router.push({
type: "error", path: "/smart/workorder",
message: "操作失败!" query: {},
});
this.$message({
type: "success",
message: "操作成功!"
});
}).catch((error) => {
console.log(error);
this.$message({
type: "error",
message: "操作失败!"
});
}); });
}); }
}, },
seachToUpdate() { seachToUpdate() {
this.tab1_option.column[1].disabled = true; this.tab1_option.column[1].disabled = true;

Loading…
Cancel
Save