Merge remote-tracking branch 'origin/main'

main
liuyiliang 11 months ago
commit f5ff0c1d41
  1. 27
      src/views/inspection/inspectionPlanDetail.vue
  2. 13
      src/views/inspection/inspectionobject.vue
  3. 10
      src/views/inspection/inspectionobjectDetail.vue
  4. 13
      src/views/inspection/inspectiontasks.vue
  5. 21
      src/views/inspection/inspectiontasksDetail.vue
  6. 8
      src/views/leger/equipmentledger.vue
  7. 30
      src/views/leger/equipmentledgerDetail.vue
  8. 10
      src/views/leger/toolinventoryrecord.vue
  9. 40
      src/views/leger/toolinventoryrecordDetail.vue
  10. 13
      src/views/release/productioninformation.vue
  11. 10
      src/views/smart/operationticket.vue
  12. 15
      src/views/smart/operationticketDetail.vue
  13. 12
      src/views/smart/workpermit.vue
  14. 24
      src/views/smart/workpermitDetail.vue
  15. 23
      src/views/spares/material.vue
  16. 1
      src/views/spares/materialDetail.vue

@ -31,11 +31,24 @@
export default { export default {
name: "inspectionPlanDetail", name: "inspectionPlanDetail",
data() { data() {
var validateTime = (rule, value, callback) => { var validateStart = (rule, value, callback) => {
if (value === '') { if (value === '') {
callback(new Error('请输入计划终了时间')); callback(new Error('请输入计划开始时间'));
} else if(this.form.startTime > value) { } else if(this.form.endTime !== null && this.form.endTime !== '') {
if(value > this.form.endTime) {
callback(new Error('输入的计划起始时间大于计划终了时间')); callback(new Error('输入的计划起始时间大于计划终了时间'));
}
} else {
callback();
}
};
var validateEnd = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入计划终了时间'));
} else if(this.form.startTime !== null && this.form.startTime !== '') {
if(this.form.startTime > value) {
callback(new Error('输入的计划终了时间小于计划起始时间'));
}
} else { } else {
callback(); callback();
} }
@ -105,11 +118,7 @@
labelWidth: 120, labelWidth: 120,
format: 'yyyy年MM月dd日', format: 'yyyy年MM月dd日',
valueFormat: "yyyyMMdd", valueFormat: "yyyyMMdd",
rules: [{ rules: [{required: true, validator: validateStart, trigger: 'blur' }]
required: true,
message: "请输入计划起始时间",
trigger: "blur"
}]
}, },
{ {
label: "计划终了时间", label: "计划终了时间",
@ -119,7 +128,7 @@
labelWidth: 120, labelWidth: 120,
format: 'yyyy年MM月dd日', format: 'yyyy年MM月dd日',
valueFormat: "yyyyMMdd", valueFormat: "yyyyMMdd",
rules: [{required: true, validator: validateTime, trigger: 'blur' }] rules: [{required: true, validator: validateEnd, trigger: 'blur' }]
}, },
{ {
label: "状态", label: "状态",

@ -24,36 +24,39 @@
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
plain plain
v-if="permission.inspectionroute_delete" v-if="permission.inspectionobject_delete"
@click="handleDelete">批量删除 @click="handleDelete">批量删除
</el-button> </el-button>
</template> </template>
<template slot="menuRight"> <template slot="menuRight">
<el-button type="primary" <el-button type="primary"
size="small" size="small"
v-if="permission.inspectionroute_add" v-if="permission.inspectionobject_add"
plain plain
@click="handleDetailAdd">新增 @click="handleDetailAdd">新增
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.inspectionobject_effect"
@click="handleTakeEffect">生效 @click="handleTakeEffect">生效
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.inspectionobject_lapse"
@click="handleLapse">失效 @click="handleLapse">失效
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.inspectionobject_export"
@click="handleExport">导出 @click="handleExport">导出
</el-button> </el-button>
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button v-if="permission.inspectionroute_view" @click="handleDetailSearch(row,index)" type="text">查看</el-button> <el-button v-if="permission.inspectionobject_view" @click="handleDetailSearch(row,index)" type="text">查看</el-button>
<el-button v-if="permission.inspectionroute_delete" @click="rowDel(row)" type="text">删除</el-button> <el-button v-if="permission.inspectionobject_delete" @click="rowDel(row)" type="text">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-dialog title="失效" <el-dialog title="失效"
@ -232,7 +235,7 @@
...mapGetters(["permission"]), ...mapGetters(["permission"]),
permissionList() { permissionList() {
// this.option.column = this.option.column.filter(v => { // this.option.column = this.option.column.filter(v => {
// return this.permission['inspectionroute_col_' + v.prop] // return this.permission['inspectionobject_col_' + v.prop]
// }) // })
return { return {
addBtn: false, addBtn: false,

@ -9,14 +9,14 @@
<div class="container"> <div class="container">
<span > <span >
<el-button type="primary" <el-button type="primary"
size="large" size="small"
@click="handleFormSubmit" @click="handleFormSubmit"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton && permission.inspectionobject_add">
确定</el-button> 确定</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="seachToUpdate" @click="seachToUpdate"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.inspectionobject_edit">
修改</el-button> 修改</el-button>
</span> </span>
</div> </div>
@ -30,7 +30,7 @@ import {getToken} from "@/util/auth";
import request from "@/router/axios"; import request from "@/router/axios";
export default { export default {
name: "inspectionrouteDetail", name: "inspectionobjectDetail",
data() { data() {
return { return {
addUpdateShowButton:{}, addUpdateShowButton:{},
@ -233,7 +233,7 @@ export default {
...mapGetters(["permission"]), ...mapGetters(["permission"]),
permissionList() { permissionList() {
// this.option.column = this.option.column.filter(v => { // this.option.column = this.option.column.filter(v => {
// return this.permission['inspectionroute_col_' + v.prop] // return this.permission['inspectionobject_col_' + v.prop]
// }) // })
return { return {
addBtn: false, addBtn: false,

@ -109,6 +109,10 @@
callback(new Error('请输入任务执行开始时间')); callback(new Error('请输入任务执行开始时间'));
} else if(this.currStartDate > value.replaceAll('/','').slice(0, 8)) { } else if(this.currStartDate > value.replaceAll('/','').slice(0, 8)) {
callback(new Error('输入的任务执行开始时间小于任务开始日期')); callback(new Error('输入的任务执行开始时间小于任务开始日期'));
}else if(this.resultForm.executeEndDate !== '' && this.resultForm.executeEndDate !== null) {
if(this.resultForm.executeEndDate.trim().replaceAll('/','') < value.trim().replaceAll('/','')) {
callback(new Error('输入的任务执行开始时间大于任务执行结束时间'));
}
} else { } else {
callback(); callback();
} }
@ -559,8 +563,12 @@
return; return;
} }
this.stopBox = true; this.stopBox = true;
this.$refs.stopForm.resetForm();
}, },
submitStop(){ submitStop(){
this.$refs.stopForm.validate((valid, done, msg) => {
if (valid) {
done()
this.$confirm("是否将选择巡检任务停止?", { this.$confirm("是否将选择巡检任务停止?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -570,7 +578,7 @@
return stop(this.ids, this.stopForm.cancelReason); return stop(this.ids, this.stopForm.cancelReason);
}) })
.then(() => { .then(() => {
this.stopForm.cancelReason = ''; this.$refs.stopForm.resetForm();
this.stopBox = false; this.stopBox = false;
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
@ -579,6 +587,9 @@
}); });
this.$refs.crud.toggleSelection(); this.$refs.crud.toggleSelection();
}); });
}
})
}, },
handleExport() { handleExport() {
this.$confirm("是否导出数据?", "提示", { this.$confirm("是否导出数据?", "提示", {

@ -52,7 +52,18 @@ import request from "@/router/axios";
export default { export default {
name: "inspectiontasksDetail", name: "inspectiontasksDetail",
data () { data () {
var validateTime = (rule, value, callback) => { var validateStartTime = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入任务开始日期'));
} else if(this.information_form.taskEndDate !== '' && this.information_form.taskEndDate !== null) {
if(this.information_form.taskEndDate < value) {
callback(new Error('输入的任务开始日期大于任务完成日期'));
}
} else {
callback();
}
};
var validateEndTime = (rule, value, callback) => {
if (value === '') { if (value === '') {
callback(new Error('请输入任务完成日期')); callback(new Error('请输入任务完成日期'));
} else if(this.information_form.taskStartDate > value) { } else if(this.information_form.taskStartDate > value) {
@ -132,11 +143,7 @@ export default {
labelWidth: 120, labelWidth: 120,
format: 'yyyy年MM月dd日', format: 'yyyy年MM月dd日',
valueFormat: "yyyyMMdd", valueFormat: "yyyyMMdd",
rules: [{ rules: [{required: true, validator: validateStartTime, trigger: 'blur' }]
required: true,
message: "请输入任务开始日期",
trigger: "blur"
}]
}, },
{ {
label: "任务完成日期", label: "任务完成日期",
@ -146,7 +153,7 @@ export default {
labelWidth: 120, labelWidth: 120,
format: 'yyyy年MM月dd日', format: 'yyyy年MM月dd日',
valueFormat: "yyyyMMdd", valueFormat: "yyyyMMdd",
rules: [{required: true, validator: validateTime, trigger: 'blur' }] rules: [{required: true, validator: validateEndTime, trigger: 'blur' }]
}, },
{ {
label: "对象编号", label: "对象编号",

@ -32,27 +32,31 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.equipmentledger_add"
@click="handleDetailAdd">新增 @click="handleDetailAdd">新增
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.equipmentledger_audit"
@click="handleAuditing">批量审核 @click="handleAuditing">批量审核
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.equipmentledger_reject"
@click="handleReject">批量驳回 @click="handleReject">批量驳回
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.equipmentledger_export"
@click="handleExport()">导出 @click="handleExport()">导出
</el-button> </el-button>
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看详情</el-button> <el-button @click="handleDetailSearch(row,index)" type="text" v-if="permission.equipmentledger_view">查看详情</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button> <el-button @click="rowDel(row)" type="text" v-if="permission.equipmentledger_delete">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>

@ -75,32 +75,32 @@
<el-button type="primary" <el-button type="primary"
size="large" size="large"
@click="handleFormSubmit" @click="handleFormSubmit"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton && permission.equipmentledger_add">
确定</el-button> 确定</el-button>
<el-button type="text" <el-button type="text"
size="large" size="large"
@click="back" @click="back"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton ">
取消</el-button> 取消</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="auditing" @click="auditing"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.equipmentledger_audit">
审核</el-button> 审核</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="reject" @click="reject"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.equipmentledger_reject">
驳回</el-button> 驳回</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="seachToUpdate" @click="seachToUpdate"
v-if="UpdateShowButton"> v-if="UpdateShowButton && permission.equipmentledger_edit">
修改</el-button> 修改</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="del" @click="del"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.equipmentledger_delete">
删除</el-button> 删除</el-button>
</span> </span>
</div> </div>
@ -128,6 +128,18 @@
export default { export default {
name: "equipmentledgerDetail", name: "equipmentledgerDetail",
data () { data () {
var validatePage = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入页数'));
} else {
var r = /^\+?[0-9][0-9]*$/;
if(!r.test(value)) {
callback(new Error('输入的页数不合法'));
} else {
callback();
}
}
};
return { return {
checkStatusValue: this.$route.query.checkstatus, checkStatusValue: this.$route.query.checkstatus,
optionCheckStatus: [{ optionCheckStatus: [{
@ -615,11 +627,7 @@
label: "页数", label: "页数",
prop: "page", prop: "page",
span: 20, span: 20,
rules: [{ rules: [{required: true, validator: validatePage, trigger: 'blur' }]
required: true,
message: "请输入页数",
trigger: "blur"
}],
}, },
{ {
label: "关键字", label: "关键字",

@ -31,27 +31,31 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.toolinventoryrecord_add"
@click="handleDetailAdd">新增 @click="handleDetailAdd">新增
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.toolinventoryrecord_audit"
@click="handleAuditing">批量审核 @click="handleAuditing">批量审核
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.toolinventoryrecord_reject"
@click="handleReject">批量驳回 @click="handleReject">批量驳回
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
@click="handleExport">导出 v-if="permission.toolinventoryrecord_export"
@click="handleExport()">导出
</el-button> </el-button>
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看</el-button> <el-button @click="handleDetailSearch(row,index)" type="text" v-if="permission.toolinventoryrecord_view">查看详情</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button> <el-button @click="rowDel(row)" type="text" v-if="permission.toolinventoryrecord_delete">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>

@ -100,35 +100,35 @@
</span> </span>
<div class="container"> <div class="container">
<span > <span >
<el-button type="text"
size="large"
@click="back"
v-if="addUpdateShowButton">
取消</el-button>
<el-button type="primary" <el-button type="primary"
size="large" size="large"
@click="handleFormSubmit" @click="handleFormSubmit"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton && permission.toolinventoryrecord_add">
确定</el-button> 确定</el-button>
<el-button type="text"
size="large"
@click="back"
v-if="addUpdateShowButton ">
取消</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="auditing" @click="auditing"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.toolinventoryrecord_audit">
审核</el-button> 审核</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="reject" @click="reject"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.toolinventoryrecord_reject">
驳回</el-button> 驳回</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="seachToUpdate" @click="seachToUpdate"
v-if="UpdateShowButton"> v-if="UpdateShowButton && permission.toolinventoryrecord_edit">
修改</el-button> 修改</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="del" @click="del"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.toolinventoryrecord_delete">
删除</el-button> 删除</el-button>
</span> </span>
</div> </div>
@ -173,8 +173,20 @@ import {readonly} from "vue";
import {getToken} from "@/util/auth"; import {getToken} from "@/util/auth";
import {getListByTaskNo} from "@/api/inspection/inspectionresult"; import {getListByTaskNo} from "@/api/inspection/inspectionresult";
export default { export default {
name: "equipmentledgerDetail", name: "toolinventoryrecordDetail",
data () { data () {
var validatePage = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入页数'));
} else {
var r = /^\+?[0-9][0-9]*$/;
if(!r.test(value)) {
callback(new Error('输入的页数不合法'));
} else {
callback();
}
}
};
return { return {
checkStatusValue:{}, checkStatusValue:{},
optionCheckStatus: [{ optionCheckStatus: [{
@ -552,11 +564,7 @@ export default {
label: "页数", label: "页数",
prop: "page", prop: "page",
span: 20, span: 20,
rules: [{ rules: [{required: true, validator: validatePage, trigger: 'blur' }]
required: true,
message: "请输入页数",
trigger: "blur"
}],
}, },
{ {
label: "关键字", label: "关键字",

@ -31,35 +31,40 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.productioninformation_add"
@click="$refs.crud.rowAdd()">新增</el-button> @click="$refs.crud.rowAdd()">新增</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.productioninformation_release"
@click="handleRelease">发布 @click="handleRelease">发布
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.productioninformation_stop"
@click="handleStop">停用 @click="handleStop">停用
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.productioninformation_reject"
@click="handleReject">批量驳回 @click="handleReject">批量驳回
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.productioninformation_audit"
@click="handleAuditing">批量审核 @click="handleAuditing">批量审核
</el-button> </el-button>
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button type="text" size="small" <el-button type="text" size="small"
@click="$refs.crud.rowEdit(row,index)">编辑</el-button> @click="$refs.crud.rowEdit(row,index)" v-if="permission.productioninformation_edit">修改</el-button>
<el-button type="text" size="small" <el-button type="text" size="small"
@click="$refs.crud.rowDel(row,index)">删除</el-button> @click="$refs.crud.rowDel(row,index)" v-if="permission.productioninformation_delete">删除</el-button>
<el-button @click="auditing(row,index)" type="text" size="small" plain>审核</el-button> <el-button @click="auditing(row,index)" type="text" size="small" plain v-if="permission.productioninformation_audit">审核</el-button>
<el-button @click="reject(row,index)" type="text" size="small" plain >驳回</el-button> <el-button @click="reject(row,index)" type="text" size="small" plain v-if="permission.productioninformation_reject">驳回</el-button>
</template> </template>
</avue-crud> </avue-crud>
</basic-container> </basic-container>

@ -32,29 +32,33 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.operationticket_add"
@click="handleDetailAdd">新增 @click="handleDetailAdd">新增
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.operationticket_reject"
@click="handleReject">批量驳回 @click="handleReject">批量驳回
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.operationticket_audit"
@click="handleAuditing">批量审核 @click="handleAuditing">批量审核
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.operationticket_export"
@click="handleExport()">导出 @click="handleExport()">导出
</el-button> </el-button>
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看</el-button> <el-button @click="handleDetailSearch(row,index)" v-if="permission.operationticket_view" type="text">查看</el-button>
<el-button @click="handleDetailcls(row,index)" type="text">关票</el-button> <el-button @click="handleDetailcls(row,index)" v-if="permission.operationticket_close" type="text">关票</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button> <el-button @click="rowDel(row)" v-if="permission.operationticket_delete" type="text">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-dialog title="关票提醒" <el-dialog title="关票提醒"

@ -43,6 +43,7 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.operationticket_add"
@click="addrow">新增</el-button> @click="addrow">新增</el-button>
</template> </template>
</avue-crud> </avue-crud>
@ -50,7 +51,7 @@
</span> </span>
<div class="container"> <div class="container">
<span > <span >
<el-button type="primary" <el-button type="text"
size="large" size="large"
@click="back" @click="back"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton">
@ -63,27 +64,27 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="handleDetailcls" @click="handleDetailcls"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.operationticket_close">
关票</el-button> 关票</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="auditing" @click="auditing"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.operationticket_audit">
审核</el-button> 审核</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="reject" @click="reject"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.operationticket_reject">
驳回</el-button> 驳回</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="searchToUpdate" @click="searchToUpdate"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.operationticket_edit">
修改</el-button> 修改</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="del" @click="del"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.operationticket_delete">
删除</el-button> 删除</el-button>
</span> </span>
</div> </div>
@ -95,7 +96,7 @@
</avue-form> </avue-form>
<div class="container"> <div class="container">
<span> <span>
<el-button type="primary" <el-button type="text"
size="small" size="small"
plain plain
@click="handleDetailCancel">取消 @click="handleDetailCancel">取消

@ -23,7 +23,7 @@
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
plain plain
v-if="permission.equipmentledger_delete" v-if="permission.workpermit_delete"
@click="handleDelete">批量删除 @click="handleDelete">批量删除
</el-button> </el-button>
</template> </template>
@ -31,28 +31,32 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.workpermit_add"
@click="handleDetailAdd">新增 @click="handleDetailAdd">新增
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.workpermit_audit"
@click="handleAuditing">批量审核 @click="handleAuditing">批量审核
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.workpermit_reject"
@click="handleReject">批量驳回 @click="handleReject">批量驳回
</el-button> </el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission.workpermit_export"
@click="handleExport()">导出 @click="handleExport()">导出
</el-button> </el-button>
</template> </template>
<template #menu="{row,index,size}"> <template #menu="{row,index,size}">
<el-button @click="handleDetailSearch(row,index)" type="text">查看详情</el-button> <el-button @click="handleDetailSearch(row,index)" type="text" v-if="permission.workpermit_view">查看详情</el-button>
<el-button @click="handleCloseTicket(row)" type="text">关票</el-button> <el-button @click="handleCloseTicket(row)" type="text" v-if="permission.workpermit_close">关票</el-button>
<el-button @click="rowDel(row)" type="text">删除</el-button> <el-button @click="rowDel(row)" type="text" v-if="permission.workpermit_delete">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-dialog title="关票提醒" <el-dialog title="关票提醒"

@ -34,6 +34,12 @@
@row-del="attachment_rowDel" @row-del="attachment_rowDel"
@row-update="attachment_rowUpdate" @row-update="attachment_rowUpdate"
@row-save="attachment_rowSave"> @row-save="attachment_rowSave">
<template slot="menuRight">
<el-button type="primary"
size="small"
plain
@click="addrow()">新增</el-button>
</template>
</avue-crud> </avue-crud>
</div> </div>
</span> </span>
@ -42,7 +48,7 @@
<el-button type="primary" <el-button type="primary"
size="large" size="large"
@click="handleFormSubmit" @click="handleFormSubmit"
v-if="addUpdateShowButton"> v-if="addUpdateShowButton && permission.workpermit_add">
确定</el-button> 确定</el-button>
<el-button type="text" <el-button type="text"
size="large" size="large"
@ -52,27 +58,27 @@
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="closeTicket" @click="closeTicket"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.workpermit_close">
关票</el-button> 关票</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="auditing" @click="auditing"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.workpermit_audit">
审核</el-button> 审核</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="reject" @click="reject"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.workpermit_reject">
驳回</el-button> 驳回</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="seachToUpdate" @click="seachToUpdate"
v-if="UpdateShowButton"> v-if="UpdateShowButton && permission.workpermit_edit">
修改</el-button> 修改</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="del" @click="del"
v-if="shouldShowButton"> v-if="shouldShowButton && permission.workorder_delete">
删除</el-button> 删除</el-button>
</span> </span>
</div> </div>
@ -505,7 +511,7 @@
...mapGetters(["permission"]), ...mapGetters(["permission"]),
permissionList() { permissionList() {
return { return {
addBtn: true, addBtn: false,
viewBtn: false, viewBtn: false,
delBtn: true, delBtn: true,
editBtn: true editBtn: true
@ -634,6 +640,10 @@
this.readonlyForm=false; this.readonlyForm=false;
this.frame_class = null; this.frame_class = null;
}, },
addrow(){
this.attachment_form.ticketCode = this.tab1_form.workTicketNo;
this.$refs.crud.rowAdd()
},
updateToSearch () { updateToSearch () {
this.readonlyForm=true; this.readonlyForm=true;
this.shouldShowButton=true; this.shouldShowButton=true;

@ -103,14 +103,31 @@
export default { export default {
data() { data() {
var validateInCount = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入入库数量'));
} else {
var r = /^\+?[0-9][0-9]*$/;
if(!r.test(value)) {
callback(new Error('入库数量不合法'));
} else {
callback();
}
}
};
var validateCount = (rule, value, callback) => { var validateCount = (rule, value, callback) => {
if (value === '') { if (value === '') {
callback(new Error('请输入出库数量')); callback(new Error('请输入出库数量'));
} else {
var r = /^\+?[0-9][0-9]*$/;
if(!r.test(value)) {
callback(new Error('出库数量不合法'));
} else if(this.count < value) { } else if(this.count < value) {
callback(new Error('输入的出库数量大于库存数量')); callback(new Error('输入的出库数量大于库存数量'));
} else { } else {
callback(); callback();
} }
}
}; };
return { return {
form: {}, form: {},
@ -329,11 +346,7 @@
label: "入库数量", label: "入库数量",
prop: "inboundCount", prop: "inboundCount",
span: 22, span: 22,
rules: [{ rules: [{required: true, validator: validateInCount, trigger: 'blur' }]
required: true,
message: "请输入入库数量",
trigger: "blur"
}]
}, },
{ {
label: "入库申领人", label: "入库申领人",

@ -442,6 +442,7 @@
}, },
methods: { methods: {
test(val) { test(val) {
this.$refs.diaForm.resetForm();
this.dialogVisible = true; this.dialogVisible = true;
}, },
handleFormSubmit() { handleFormSubmit() {

Loading…
Cancel
Save