This commit is contained in:
Vergil
2020-04-08 11:21:34 +08:00
parent 307598eb96
commit 0d0e0dcb6f
7 changed files with 80 additions and 54 deletions

View File

@@ -7,19 +7,8 @@
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">不合格原因</div> <div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">不合格原因</div>
</el-row> </el-row>
<el-button size="small" type="warning" icon="el-icon-circle-plus-outline" plain style="margin-left: 80%;margin-top: 15px" @click="handleAdd1()">新增</el-button> <el-button size="small" type="warning" icon="el-icon-circle-plus-outline" plain style="margin-left: 80%;margin-top: 15px" @click="handleAdd1()">新增</el-button>
<el-table <el-table :data="tableData" border style="width: 100%;max-height: 450px;margin-top: 10px" height="350px" size="mini" stripe highlight-current-row>
:data="tableData" <el-table-column type="index" label="序号" align="center" width="50"/>
border
style="width: 100%;max-height: 450px;margin-top: 10px"
height="350px"
size="mini"
stripe
highlight-current-row>
<el-table-column
type="index"
label="序号"
align="center"
width="50"/>
<el-table-column label="不合格原因" align="center"> <el-table-column label="不合格原因" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.不合格原因文本 }} {{ scope.row.不合格原因文本 }}
@@ -27,11 +16,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" fixed="right" width="70px"> <el-table-column label="操作" align="center" fixed="right" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"/>
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -247,17 +232,20 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible=false">取消</el-button> <el-button @click="dialogFormVisible=false">取消</el-button>
<el-button type="primary" @click="submitAdd()">确定</el-button> <el-button :disabled="disable" type="primary" @click="submitAdd()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script>import { initReasons, initHandle, initSize, initAppearance, initPosition, initTest, initTesting, addReasons, addHandle, addSize, addAppearance, addPosition, <script>
import { initReasons, initHandle, initSize, initAppearance, initPosition, initTest, initTesting, addReasons, addHandle, addSize, addAppearance, addPosition,
addTest, addTesting, deleteReasons, deleteHandle, deleteSize, deleteAppearance, deletePosition, deleteTest, deleteTesting } from '@/api/Assembly/QualityBasicData' addTest, addTesting, deleteReasons, deleteHandle, deleteSize, deleteAppearance, deletePosition, deleteTest, deleteTesting } from '@/api/Assembly/QualityBasicData'
export default { export default {
data() { data() {
return { return {
disable: false,
tableData: [], tableData: [],
tableData1: [], tableData1: [],
tableData2: [], tableData2: [],
@@ -329,33 +317,41 @@ export default {
}, },
handleAdd1() { handleAdd1() {
this.title = '增加不合格原因' this.title = '增加不合格原因'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
handleAdd2() { handleAdd2() {
this.title = '增加不合格处理' this.title = '增加不合格处理'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
handleAdd3() { handleAdd3() {
this.title = '增加质检尺寸' this.title = '增加质检尺寸'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
handleAdd4() { handleAdd4() {
this.title = '增加质检外观' this.title = '增加质检外观'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
handleAdd5() { handleAdd5() {
this.title = '增加质检形位' this.title = '增加质检形位'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
handleAdd6() { handleAdd6() {
this.title = '增加检测项' this.title = '增加检测项'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
handleAdd7() { handleAdd7() {
this.title = '增加检测项明细' this.title = '增加检测项明细'
this.disable = false
this.dialogFormVisible = true this.dialogFormVisible = true
}, },
submitAdd() { submitAdd() {
this.disable = true
if (this.title === '增加不合格原因') { if (this.title === '增加不合格原因') {
addReasons(this.Reasons).then(response => { addReasons(this.Reasons).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {

View File

@@ -589,11 +589,7 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button <el-button :disabled="AddTableData_disable" type="primary" size="small" icon="el-icon-check" @click="submitTable">确定</el-button>
type="primary"
size="small"
icon="el-icon-check"
@click="submitTable">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -770,6 +766,7 @@ export default {
this.groupNumber = [] this.groupNumber = []
this.procedureNum = [] this.procedureNum = []
this.operators = [] this.operators = []
this.AddTableData_disable = false
this.dialogFormVisible10 = true this.dialogFormVisible10 = true
}, },
formatJson(filterVal, jsonData) { formatJson(filterVal, jsonData) {
@@ -876,6 +873,7 @@ export default {
submitTable() { submitTable() {
this.$refs['form2'].validate((valid) => { this.$refs['form2'].validate((valid) => {
if (valid) { if (valid) {
this.AddTableData_disable = true
submitTable(this.form2.工序, this.form2.质检类型, this.form2.检测数, this.form2.质检情况, this.id, this.form2.不合格数量, this.form2.不合格原因, this.form2.不合格处理, this.form2.备注, this.form2.操作工).then(response => { submitTable(this.form2.工序, this.form2.质检类型, this.form2.检测数, this.form2.质检情况, this.id, this.form2.不合格数量, this.form2.不合格原因, this.form2.不合格处理, this.form2.备注, this.form2.操作工).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.dialogFormVisible10 = false this.dialogFormVisible10 = false

View File

@@ -219,8 +219,8 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button v-if="department_Title==='新增部门'" type="primary" @click="submitAdd('department_Form')">确定</el-button> <el-button v-if="department_Title==='新增部门'" :disabled="handleAdd_disable" type="primary" @click="submitAdd('department_Form')">确定</el-button>
<el-button v-else-if="department_Title==='编辑部门'" type="primary" @click="submitEdit('department_Form')">确定</el-button> <el-button v-else-if="department_Title==='编辑部门'" :disabled="handleAdd_disable" type="primary" @click="submitEdit('department_Form')">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -321,8 +321,8 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button :loading="btnLoading" @click="cancel">取消</el-button> <el-button :loading="btnLoading" @click="cancel">取消</el-button>
<el-button v-if="people_title === '新增人员'" :loading="btnLoading" type="primary" @click="submitAddPeople">确定</el-button> <el-button v-if="people_title === '新增人员'" :disabled="addPeople_disable" :loading="btnLoading" type="primary" @click="submitAddPeople">确定</el-button>
<el-button v-else-if="people_title === '编辑人员'" :loading="btnLoading" type="primary" @click="submitEditPeople">确定</el-button> <el-button v-else-if="people_title === '编辑人员'" :disabled="addPeople_disable" :loading="btnLoading" type="primary" @click="submitEditPeople">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -445,6 +445,8 @@ import request from '@/utils/request'
export default { export default {
data() { data() {
return { return {
handleAdd_disable: false,
addPeople_disable: false,
limit: 999, limit: 999,
readFile: readFile, readFile: readFile,
disabledMove: true, disabledMove: true,
@@ -636,20 +638,22 @@ export default {
this.$refs.upload.submit() this.$refs.upload.submit()
}, },
handleAdd(formName) { handleAdd(formName) {
this.department_Title = '新增部门'
this.department_DFV = true
this.department_Form.DepartmentName = '' this.department_Form.DepartmentName = ''
this.count1 = this.count1 + 1 this.count1 = this.count1 + 1
if (this.count1 !== 1) { if (this.count1 !== 1) {
this.$refs[formName].resetFields() this.$refs[formName].resetFields()
} }
this.department_Title = '新增部门'
this.handleAdd_disable = false
this.department_DFV = true
}, },
handleEdit() { handleEdit() {
this.addForm('department_Form') this.addForm('department_Form')
if (this.id) { if (this.id) {
this.department_Title = '编辑部门' this.department_Title = '编辑部门'
this.department_DFV = true
this.department_Form.DepartmentName = this.nodeName this.department_Form.DepartmentName = this.nodeName
this.handleAdd_disable = false
this.department_DFV = true
} else { } else {
this.$message.warning(`请选择要修改的部门`) this.$message.warning(`请选择要修改的部门`)
} }
@@ -657,6 +661,7 @@ export default {
submitAdd(formName) { submitAdd(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.handleAdd_disable = true
this.department_DFV = false this.department_DFV = false
if (this.id) { if (this.id) {
addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => { addDepartmentName(this.id, this.department_Form.DepartmentName, 0).then(response => {
@@ -687,6 +692,7 @@ export default {
submitEdit(formName) { submitEdit(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.handleAdd_disable = true
this.department_DFV = false this.department_DFV = false
editList(this.id, this.department_Form.DepartmentName).then(response => { editList(this.id, this.department_Form.DepartmentName).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
@@ -755,6 +761,7 @@ export default {
addPeople() { addPeople() {
if (this.id) { if (this.id) {
this.people_title = '新增人员' this.people_title = '新增人员'
this.addPeople_disable = false
this.people_DFV = true this.people_DFV = true
this.addForm('people_form') this.addForm('people_form')
} else { } else {
@@ -762,6 +769,7 @@ export default {
} }
}, },
submitAddPeople() { submitAddPeople() {
this.addPeople_disable = true
this.btnLoading = true this.btnLoading = true
addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => { addPeople(this.id, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
this.btnLoading = false this.btnLoading = false
@@ -794,6 +802,7 @@ export default {
this.people_form.ContactInformation = row.联系电话 this.people_form.ContactInformation = row.联系电话
}, },
submitEditPeople() { submitEditPeople() {
this.addPeople_disable = true
this.btnLoading = true this.btnLoading = true
editPeople(this.people_form.PeopleID, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => { editPeople(this.people_form.PeopleID, this.people_form.Sex, this.people_form.Education, this.people_form.Address, this.people_form.Nation, this.people_form.Post, this.people_form.AccountNumber, this.people_form.Password, this.people_form.Name, this.people_form.IDcard, this.people_form.TimeOfEntry, this.people_form.Birthday, this.people_form.ContactInformation).then(response => {
this.btnLoading = false this.btnLoading = false

View File

@@ -54,7 +54,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogFormVisible1 = false">取消</el-button> <el-button size="small" @click="dialogFormVisible1 = false">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button> <el-button :disabled="handleAdd_disable" type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -71,7 +71,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogFormVisible2 = false">取消</el-button> <el-button size="small" @click="dialogFormVisible2 = false">取消</el-button>
<el-button type="primary" size="small" @click="submitAdd2('form2')">确定</el-button> <el-button :disabled="handleAdd_disable" type="primary" size="small" @click="submitAdd2('form2')">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -82,6 +82,7 @@ import { InitRolefunction, deleteData, searchTable, addData, addData2 } from '@/
export default { export default {
data() { data() {
return { return {
handleAdd_disable: false,
RoleFunctioning: '', RoleFunctioning: '',
loading: false, loading: false,
tableData: [], tableData: [],
@@ -134,6 +135,7 @@ export default {
if (this.$refs['form2'] !== undefined) { if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields() this.$refs['form2'].resetFields()
} }
this.handleAdd_disable = false
this.dialogFormVisible2 = true this.dialogFormVisible2 = true
this.form2.角色功能 = row.角色功能 this.form2.角色功能 = row.角色功能
this.num = row.角色编号 this.num = row.角色编号
@@ -141,6 +143,7 @@ export default {
submitAdd2(formName) { // 编辑角色功能 submitAdd2(formName) { // 编辑角色功能
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.handleAdd_disable = true
addData2(this.form2.角色功能, this.num).then(response => { addData2(this.form2.角色功能, this.num).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('编辑成功') this.$message.success('编辑成功')
@@ -154,6 +157,7 @@ export default {
submitAdd1(formName) { // 增加角色功能 submitAdd1(formName) { // 增加角色功能
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.handleAdd_disable = true
addData(this.form.角色功能).then(response => { addData(this.form.角色功能).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
@@ -169,6 +173,7 @@ export default {
if (this.$refs['form'] !== undefined) { if (this.$refs['form'] !== undefined) {
this.$refs['form'].resetFields() this.$refs['form'].resetFields()
} }
this.handleAdd_disable = false
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
}, },
handleDelete(row) { // 删除 handleDelete(row) { // 删除

View File

@@ -1,11 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<table style="width: 100%"> <table style="width: 100%">
<el-card> <el-card>
<!-- <span>员工姓名:</span>-->
<el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px;margin: 0px 10px"/> <el-input v-model="staffName" placeholder="员工姓名" size="small" clearable style="width:200px;margin: 0px 10px"/>
<!-- <span style="margin-left: 15px">角色名称:</span>-->
<el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px;margin: 0px 10px"> <el-select v-model="roleName" placeholder="角色名称" clearable size="small" style="width:200px;margin: 0px 10px">
<el-option <el-option
v-for="item in roleNames" v-for="item in roleNames"
@@ -18,12 +15,8 @@
</el-card> </el-card>
<el-card> <el-card>
<el-table :data="tableData" highlight-current-row stripe size="mini" height="820" border style="width: 100%"> <el-table :data="tableData" highlight-current-row stripe size="mini" height="700" border style="width: 100%">
<el-table-column <el-table-column label="序号" align="center" type="index" width="50"/>
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="员工姓名" align="center"> <el-table-column label="员工姓名" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
@@ -151,7 +144,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="callOFF"> </el-button> <el-button @click="callOFF"> </el-button>
<el-button type="primary" @click="submitAdd1()"> </el-button> <el-button :disabled="handelAdd_disable" type="primary" @click="submitAdd1()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -188,7 +181,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="callOFF">取消</el-button> <el-button @click="callOFF">取消</el-button>
<el-button type="primary" @click="submitAdd2()">确定</el-button> <el-button :disabled="handelAdd_disable" type="primary" @click="submitAdd2()">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
@@ -200,6 +193,7 @@ import { dialogtablevisible, deleteData, getTree, fn, getTable8, initOrderType,
export default { export default {
data() { data() {
return { return {
handelAdd_disable: false,
number: '', number: '',
form1: { form1: {
staffName: '', staffName: '',
@@ -247,24 +241,26 @@ export default {
}, },
methods: { methods: {
handelAdd(row) { handelAdd(row) {
this.dialogFormVisible1 = true
this.ssks = '' this.ssks = ''
this.cjscgy = '' this.cjscgy = ''
if (this.$refs['form1'] !== undefined) { if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields() this.$refs['form1'].resetFields()
} }
this.handelAdd_disable = false
this.dialogFormVisible1 = true
}, },
submitEdit(index, row) { submitEdit(index, row) {
if (this.$refs['form2'] !== undefined) { if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields() this.$refs['form2'].resetFields()
} }
this.dialogFormVisible2 = true
this.personnelStream = row.人员角色流水号 this.personnelStream = row.人员角色流水号
this.form2.staffName = row.姓名 this.form2.staffName = row.姓名
this.ssks = row.部门名称 this.ssks = row.部门名称
this.personnelNumber = row.人员编号 this.personnelNumber = row.人员编号
this.form2.roleName = parseInt(row.角色编号) this.form2.roleName = parseInt(row.角色编号)
this.cjscgy = row.考勤编号 this.cjscgy = row.考勤编号
this.handelAdd_disable = false
this.dialogFormVisible2 = true
}, },
callOFF() { callOFF() {
this.dialogFormVisible1 = false this.dialogFormVisible1 = false
@@ -316,6 +312,7 @@ export default {
submitAdd1() { submitAdd1() {
this.$refs['form1'].validate((valid) => { this.$refs['form1'].validate((valid) => {
if (valid) { if (valid) {
this.handelAdd_disable = true
addData1(this.personnelNumber, this.form1.roleName).then(response => { addData1(this.personnelNumber, this.form1.roleName).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('增加成功')
@@ -335,6 +332,7 @@ export default {
submitAdd2() { submitAdd2() {
this.$refs['form2'].validate((valid) => { this.$refs['form2'].validate((valid) => {
if (valid) { if (valid) {
this.handelAdd_disable = true
addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => { addData2(this.personnelStream, this.personnelNumber, this.form2.roleName).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('修改成功') this.$message.success('修改成功')

View File

@@ -267,7 +267,7 @@
<el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button> <el-button size="small" type="primary" plain icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button>
<el-button size="small" type="distribution" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="createList()">创建领料单</el-button> <el-button size="small" type="distribution" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="createList()">创建领料单</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">
<el-button size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button> <el-button :disabled="selectInto_disable" size="small" type="success" plain icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button>
</el-tooltip> </el-tooltip>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button> <el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button>
<el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button> <el-button :disabled="Number(审批情况)===1" size="small" plain type="danger" icon="el-icon-right" style="margin-right: 20px;float: right" @click="dropListDetail()">移除领料明细</el-button>
@@ -412,7 +412,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1=false">取消</el-button> <el-button @click="dialogFormVisible1=false">取消</el-button>
<el-button type="primary" @click="submitCreateList()"> </el-button> <el-button :disabled="createList_disable" type="primary" @click="submitCreateList()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -426,6 +426,8 @@ export default {
name: 'CreatePickingList', name: 'CreatePickingList',
data() { data() {
return { return {
createList_disable: false,
selectInto_disable: false,
审批情况: '', 审批情况: '',
peopleName: '', peopleName: '',
ListMX: '', ListMX: '',
@@ -764,10 +766,12 @@ export default {
} }
this.form1.领料人流水号 = '' this.form1.领料人流水号 = ''
this.form1.领料单备注 = '' this.form1.领料单备注 = ''
this.createList_disable = false
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
}, },
// 提交创建领料单 // 提交创建领料单
submitCreateList() { submitCreateList() {
this.createList_disable = true
let isElectrical let isElectrical
Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长 Number(this.token) === 37 || Number(this.token) === 36 || Number(this.token) === 35 ? isElectrical = 1 : isElectrical = 0 // 35电工 36电气部长 37电气副部长
createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical).then(response => { createList(this.form1.领料人流水号, this.form1.领料单备注, isElectrical).then(response => {
@@ -845,6 +849,7 @@ export default {
}, },
// 选入 // 选入
selectInto() { selectInto() {
this.selectInto_disable = true
if (this.PartType === '离线采购件') { if (this.PartType === '离线采购件') {
const materialGroup = [] const materialGroup = []
const groupPartGroup = [] const groupPartGroup = []
@@ -871,7 +876,11 @@ export default {
this.$message.success('操作成功') this.$message.success('操作成功')
this.searchTable() this.searchTable()
this.clickList() this.clickList()
} else { this.$message.error('操作失败') } this.selectInto_disable = false
} else {
this.$message.error('操作失败')
this.selectInto_disable = false
}
}) })
} else { } else {
const basePartGroup = [] const basePartGroup = []
@@ -893,7 +902,11 @@ export default {
this.$message.success('操作成功') this.$message.success('操作成功')
this.searchTable() this.searchTable()
this.clickList() this.clickList()
} else { this.$message.error('操作失败') } this.selectInto_disable = false
} else {
this.$message.error('操作失败')
this.selectInto_disable = false
}
}) })
} else { // 标准件外购件 } else { // 标准件外购件
selectIntoList(null, purchasePartGroup, this.pickingListNum).then(response => { selectIntoList(null, purchasePartGroup, this.pickingListNum).then(response => {
@@ -901,7 +914,11 @@ export default {
this.$message.success('操作成功') this.$message.success('操作成功')
this.searchTable() this.searchTable()
this.clickList() this.clickList()
} else { this.$message.error('操作失败') } this.selectInto_disable = false
} else {
this.$message.error('操作失败')
this.selectInto_disable = false
}
}) })
} }
} }

View File

@@ -349,7 +349,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="submitApproval('form2')">确定</el-button> <el-button :disabled="Open_disable" type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@@ -363,6 +363,7 @@ import QRCode from 'qrcode'
export default { export default {
data() { data() {
return { return {
Open_disable: false,
RMB: '', RMB: '',
TotalAmount: '', TotalAmount: '',
check1: 0, check1: 0,
@@ -486,9 +487,10 @@ export default {
this.form2.审批是否通过 = 1 this.form2.审批是否通过 = 1
this.form2.未通过原因 = '' this.form2.未通过原因 = ''
this.disabled = true this.disabled = true
this.dialogVisible3 = true
this.ProcurementContractNum = row.采购合同流水号 this.ProcurementContractNum = row.采购合同流水号
this.QGNUM = row.请购单流水号 this.QGNUM = row.请购单流水号
this.Open_disable = false
this.dialogVisible3 = true
}, },
selectChange() { selectChange() {
if (this.form2.审批是否通过 === 2) { if (this.form2.审批是否通过 === 2) {
@@ -500,6 +502,7 @@ export default {
submitApproval(formName) { submitApproval(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.Open_disable = true
submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因, this.QGNUM).then(response => { submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因, this.QGNUM).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('审批成功') this.$message.success('审批成功')