采购部采购禁用
This commit is contained in:
@@ -306,8 +306,8 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-show="title==='新增供应商'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
<el-button v-show="title==='新增供应商'" :disabled="submitAdd_disable" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" :disabled="handleEdit_disable" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -331,8 +331,8 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-show="title2==='增加'" type="primary" @click="submitAdd2('form2')">确定</el-button>
|
||||
<el-button v-show="title2==='编辑'" type="primary" @click="submitEdit2('form2')">确定</el-button>
|
||||
<el-button v-show="title2==='增加'" :disabled="submitAdd2_disable" type="primary" @click="submitAdd2('form2')">确定</el-button>
|
||||
<el-button v-show="title2==='编辑'" :disabled="submitEdit2_disable" type="primary" @click="submitEdit2('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -344,6 +344,10 @@ import { searchData, addTable, editTable, deleteData, getName, addPerson, editPe
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
handleEdit_disable: false,
|
||||
submitAdd_disable: false,
|
||||
submitAdd2_disable: false,
|
||||
submitEdit2_disable: false,
|
||||
loading: false,
|
||||
loading2: false,
|
||||
mainProduction: '', // 主要产品
|
||||
@@ -444,7 +448,6 @@ export default {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '新增供应商'
|
||||
this.form.供应商名称 = ''
|
||||
this.form.企业性质 = ''
|
||||
@@ -459,10 +462,13 @@ export default {
|
||||
this.form.传真 = ''
|
||||
this.form.货期 = ''
|
||||
this.supplierSerialNumber = ''
|
||||
this.submitAdd_disable = false
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submitAdd(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitAdd_disable = true
|
||||
addTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.form.电话号码, this.form.传真, this.form.货期).then(response => {
|
||||
if (Number(response.data.output[0].output1) === 0) {
|
||||
this.$message.warning('该供应商已存在')
|
||||
@@ -481,11 +487,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
console.log(row)
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '编辑'
|
||||
this.form.供应商名称 = row.供应商名称
|
||||
this.form.企业性质 = row.企业性质
|
||||
@@ -500,10 +504,13 @@ export default {
|
||||
this.form.传真 = row.传真
|
||||
this.form.货期 = row.货期
|
||||
this.supplierSerialNumber = row.供应商流水号
|
||||
this.handleEdit_disable = false
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.handleEdit_disable = true
|
||||
editTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.supplierSerialNumber, this.form.传真, this.form.货期, this.form.电话号码).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
@@ -565,17 +572,19 @@ export default {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.title2 = '增加'
|
||||
this.form2.姓名 = ''
|
||||
this.form2.职务 = ''
|
||||
this.form2.电话 = ''
|
||||
this.form2.手机 = ''
|
||||
this.form2.传真 = ''
|
||||
this.submitAdd2_disable = false
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
submitAdd2(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitAdd2_disable = true
|
||||
addPerson(this.form2.姓名, this.form2.职务, this.form2.电话, this.form2.手机, this.form2.传真, this.form2.供应商流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
@@ -595,7 +604,6 @@ export default {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.title2 = '编辑'
|
||||
this.form2.姓名 = row.姓名
|
||||
this.form2.职务 = row.职务
|
||||
@@ -603,10 +611,13 @@ export default {
|
||||
this.form2.手机 = row.手机
|
||||
this.form2.传真 = row.传真
|
||||
this.form2.供应商联系人流水号 = row.供应商联系人流水号
|
||||
this.submitEdit2_disable = false
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
submitEdit2(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitEdit2_disable = true
|
||||
editPerson(this.form2.姓名, this.form2.职务, this.form2.电话, this.form2.手机, this.form2.传真, this.form2.供应商联系人流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
|
||||
Reference in New Issue
Block a user