供应商管理
This commit is contained in:
@@ -17,7 +17,7 @@ export function searchData(check1, supplierName, check2, businessNature, check3,
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 增加新的数据
|
// 增加新的数据
|
||||||
export function addTable(supplierName, businessNature, creationDate, registeredCapital, taxNumber, bank, account, email, address, telephone, fax, deliveryPeriod) {
|
export function addTable(supplierName, businessNature, creationDate, registeredCapital, taxNumber, bank, account, email, address, telephone, fax, deliveryPeriod, personNumber, Name) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -26,12 +26,12 @@ export function addTable(supplierName, businessNature, creationDate, registeredC
|
|||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_供应商_增加数据',
|
name: '采购管理_供应商_增加数据',
|
||||||
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod + '&output1=1=int=output'
|
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&电话号码=' + telephone + '&传真=' + fax + '&货期=' + deliveryPeriod + '&编辑人=' + personNumber + '&编辑人姓名=' + Name + '&output1=1=int=output'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function editTable(supplierName, businessNature, creationDate, registeredCapital, taxNumber, bank, account, email, address, supplierSerialNumber, fax, deliveryPeriod, telephone) {
|
export function editTable(supplierName, businessNature, creationDate, registeredCapital, taxNumber, bank, account, email, address, supplierSerialNumber, fax, deliveryPeriod, telephone, personNumber, Name) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -40,7 +40,7 @@ export function editTable(supplierName, businessNature, creationDate, registered
|
|||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_供应商_修改数据',
|
name: '采购管理_供应商_修改数据',
|
||||||
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&供应商流水号=' + supplierSerialNumber + '&传真=' + fax + '&货期=' + deliveryPeriod + '&电话号码=' + telephone
|
param: '供应商名称=' + supplierName + '&企业性质=' + businessNature + '&创立日期=' + creationDate + '&注册资本=' + registeredCapital + '&税号=' + taxNumber + '&开户行=' + bank + '&账号=' + account + '&电子信箱=' + email + '&地址=' + address + '&供应商流水号=' + supplierSerialNumber + '&传真=' + fax + '&货期=' + deliveryPeriod + '&电话号码=' + telephone + '&编辑人=' + personNumber + '&编辑人姓名=' + Name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,67 +4,9 @@
|
|||||||
<el-form ref="form1" :model="form1" label-position="right" label-width="70px" class="searchForm">
|
<el-form ref="form1" :model="form1" label-position="right" label-width="70px" class="searchForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col style="width: 180px">
|
<el-col style="width: 180px">
|
||||||
<!-- <el-form-item label="供应商">-->
|
|
||||||
<el-input v-model="supplierName" placeholder="供应商名称" size="small" clearable @change="fetchData"/>
|
<el-input v-model="supplierName" placeholder="供应商名称" size="small" clearable @change="fetchData"/>
|
||||||
<!-- </el-form-item>-->
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="法人">-->
|
|
||||||
<!-- <el-input v-model="businessNature" placeholder="法人" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="受托人">-->
|
|
||||||
<!-- <el-input v-model="registeredCapital" placeholder="受托人" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="邮编">-->
|
|
||||||
<!-- <el-input v-model="deliveryPeriod" placeholder="邮编" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="税号">-->
|
|
||||||
<!-- <el-input v-model="taxNumber" placeholder="税号" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="电子信箱">-->
|
|
||||||
<!-- <el-input v-model="email" placeholder="电子信箱" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="电话号码">-->
|
|
||||||
<!-- <el-input v-model="telephone" placeholder="电话号码" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="开户行">-->
|
|
||||||
<!-- <el-input v-model="bank" placeholder="开户行" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="帐号">-->
|
|
||||||
<!-- <el-input v-model="account" placeholder="帐号" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="地址">-->
|
|
||||||
<!-- <el-input v-model="address" placeholder="地址" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="传真">-->
|
|
||||||
<!-- <el-input v-model="fax" placeholder="传真" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col style="width: 250px">-->
|
|
||||||
<!-- <el-form-item label="主要产品">-->
|
|
||||||
<!-- <el-input v-model="mainProduction" placeholder="主要产品" size="small" clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<el-col style="width: 250px;margin:0px 0 0 15px">
|
<el-col style="width: 250px;margin:0px 0 0 15px">
|
||||||
<!-- <el-button type="primary" size="small" icon="el-icon-search" plain @click="pageCurrent = 1;fetchData()">查询</el-button>-->
|
|
||||||
<el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="handleAdd()">供应商</el-button>
|
<el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px" @click="handleAdd()">供应商</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -72,16 +14,20 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<!-- <div style="display: inline-block;margin-bottom: 5px">供应商列表</div>-->
|
|
||||||
<el-table v-loading="loading" :data="List" stripe highlight-current-row border style="width: 100%;max-height: 600px;" height="500" size="mini" @row-click="rowClick">
|
<el-table v-loading="loading" :data="List" stripe highlight-current-row border style="width: 100%;max-height: 600px;" height="500" size="mini" @row-click="rowClick">
|
||||||
<el-table-column label="供应商名称" align="center" fixed="left" min-width="250">
|
<el-table-column label="供应商名称" align="center" fixed="left" min-width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="主要产品" align="center" min-width="150">
|
<el-table-column label="编辑时间" align="center" min-width="150" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.主要产品 }}
|
{{ scope.row.编辑时间 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="编辑人" align="center" min-width="150" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.编辑人姓名 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="开户行" align="center" min-width="150" show-overflow-tooltip>
|
<el-table-column label="开户行" align="center" min-width="150" show-overflow-tooltip>
|
||||||
@@ -129,11 +75,6 @@
|
|||||||
{{ scope.row.注册资本 }}
|
{{ scope.row.注册资本 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="邮编" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.货期 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" fixed="right" width="190">
|
<el-table-column label="操作" align="center" fixed="right" width="190">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="mini" plain icon="el-icon-edit" @click="handleEdit(scope.row)"/>
|
<el-button type="text" size="mini" plain icon="el-icon-edit" @click="handleEdit(scope.row)"/>
|
||||||
@@ -204,15 +145,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<!-- <el-col :span="12">-->
|
|
||||||
<!-- <el-form-item label="邮编" prop="货期">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- v-model="form.货期"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- style="width: 200px;"-->
|
|
||||||
<!-- clearable/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="法人" prop="企业性质" size="small">
|
<el-form-item label="法人" prop="企业性质" size="small">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -340,6 +272,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchData, addTable, editTable, deleteData, getName, addPerson, editPerson, deletePerson } from '@/api/PurchasingCenter/SupplierManagement'
|
import { searchData, addTable, editTable, deleteData, getName, addPerson, editPerson, deletePerson } from '@/api/PurchasingCenter/SupplierManagement'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -417,6 +350,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters([
|
||||||
|
'name',
|
||||||
|
'id'
|
||||||
|
])
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
@@ -469,7 +408,7 @@ export default {
|
|||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.submitAdd_disable = true
|
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 => {
|
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.货期, this.id, this.name).then(response => {
|
||||||
if (Number(response.data.output[0].output1) === 0) {
|
if (Number(response.data.output[0].output1) === 0) {
|
||||||
this.$message.warning('该供应商已存在')
|
this.$message.warning('该供应商已存在')
|
||||||
} else if (response.data.result[0].result === '1') {
|
} else if (response.data.result[0].result === '1') {
|
||||||
@@ -511,7 +450,7 @@ export default {
|
|||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.handleEdit_disable = true
|
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 => {
|
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.电话号码, this.id, this.name).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('编辑成功')
|
this.$message.success('编辑成功')
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
|
|||||||
Reference in New Issue
Block a user