Browse Source

完善供应商管理

master
yunuo970428 3 years ago
parent
commit
5d44c8475d
  1. 8
      anrui-scm/anrui-scm-ui/src/api/gongyingshang/gongyingshang.js
  2. 42
      anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshangAdd.vue
  3. 248
      anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshangByHosts.vue
  4. 2
      anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshangInfo.vue
  5. 36
      anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshanggaunli.vue

8
anrui-scm/anrui-scm-ui/src/api/gongyingshang/gongyingshang.js

@ -36,6 +36,14 @@ export default {
method: 'get'
})
},
// 获取分公司按钮
saveAllByOrgSid: function(data) {
return request({
url: '/base/v1/basemanufacturer/saveAllByOrgSid',
method: 'get',
params: data
})
},
// 通过sid删除一条或多条记录
delBySids: function(data) {
return request({

42
anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshangAdd.vue

@ -4,7 +4,7 @@
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
@ -47,7 +47,7 @@
<el-col :span="8">
<el-form-item prop="supplierTypeValue">
<el-select v-model="baseManufacturerDto.supplierTypeValue" class="addinputw" placeholder="" @change="changeSupplierType">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" :disabled="item.dictValue === '主机厂'"/>
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue" :disabled="item.dictValue === '主机厂' || item.dictValue === '分公司'"/>
</el-select>
</el-form-item>
</el-col>
@ -58,8 +58,7 @@
</el-col>
<el-col :span="20">
<el-form-item prop="manufacturerAddress">
<el-input v-model="baseManufacturerDto.manufacturerAddress" maxlength="80" placeholder="" class="addinputw addinputw01"
clearable/>
<el-input v-model="baseManufacturerDto.manufacturerAddress" maxlength="80" placeholder="" class="addinputw addinputw01" clearable/>
</el-form-item>
</el-col>
</el-row>
@ -69,8 +68,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="manufacturerTelePhone">
<el-input v-model="baseManufacturerDto.manufacturerTelePhone" maxlength="20" placeholder="例:010-88888888" class="addinputw"
clearable/>
<el-input v-model="baseManufacturerDto.manufacturerTelePhone" maxlength="20" placeholder="例:010-88888888" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
@ -139,13 +137,13 @@
<div class="divStyle">
<div>开户行信息</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addBank()">新增
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="addBank()">新增
</el-button>
</div>
</div>
<el-table :key="tableKey" :data="baseManufacturerBankDto" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" align="center" width="130px">
<el-table-column fixed label="操作" align="center" width="130">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDel(baseManufacturerBankDto[scope.$index])">删除</el-button>
<el-button size="mini" type="primary" @click="handleEdit(baseManufacturerBankDto[scope.$index],scope.$index)">编辑
@ -162,6 +160,8 @@
<el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/>
<el-table-column prop="currency" width="130px" label="币种" align="center"/>
<el-table-column prop="remarks" width="240px" label="描述" align="center"/>
<el-table-column prop="actualPay" width="240px" label="厂家销售通路" align="center"/>
<el-table-column prop="paymentAccessNoValue" width="240px" label="付款通路编码" align="center"/>
</el-table>
</el-form>
</div>
@ -313,7 +313,11 @@ export default {
paymentLines: info.paymentLines,
swiftCode: info.swiftCode,
currency: info.currency,
remarks: info.remarks
remarks: info.remarks,
actualPay: info.actualPay,
actualPayKey: info.actualPayKey,
paymentAccessNoValue: info.paymentAccessNoValue,
paymentAccessNoKey: info.paymentAccessNoValue
})
return
}
@ -330,7 +334,11 @@ export default {
paymentLines: info.paymentLines,
swiftCode: info.swiftCode,
currency: info.currency,
remarks: info.remarks
remarks: info.remarks,
actualPay: info.actualPay,
actualPayKey: info.actualPayKey,
paymentAccessNoValue: info.paymentAccessNoValue,
paymentAccessNoKey: info.paymentAccessNoValue
}
return
}
@ -363,6 +371,20 @@ export default {
this.formobj = row
})
},
handleSave() {
if (this.baseManufacturerBankDto.manufacturerCode !== '') {
const tip = '请确认编码是否正确,保存后信息将无法修改'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.saveEdit()
})
} else {
this.saveEdit()
}
},
saveEdit() {
this.$refs['form_obj'].validate(valid => {
if (valid) {

248
anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshangByHosts.vue

@ -0,0 +1,248 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>{{ viewTitle }}</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="baseManufacturerDto" :rules="rules" class="formadd">
<div class="title">
<div>基本信息</div>
</div>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>厂商名称</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.manufacturerName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>简称</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.manufacturerAs }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>编码</span>
</el-col>
<el-col :span="8">
<el-form-item>
<el-input v-model="baseManufacturerDto.manufacturerCode" maxlength="20" placeholder="" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>分类</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.supplierTypeValue }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>通讯地址</span>
</el-col>
<el-col :span="20">
<el-form-item>
<span>{{ baseManufacturerDto.manufacturerAddress }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>厂商办公电话</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.manufacturerTelePhone }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>传真</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.manufacturerFax }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>联系人姓名</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.contactName }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>联系人手机号</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.contactMobile }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>联系人办公电话</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.contactTelePhone }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>微信号</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.weChatID }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>邮编</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.zipCode }}</span>
</el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>邮箱</span>
</el-col>
<el-col :span="8">
<el-form-item>
<span>{{ baseManufacturerDto.email }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div>开户行信息</div>
</div>
<el-table :key="tableKey" :data="baseManufacturerBankDto" :index="index" border style="width: 100%">
<el-table-column fixed width="60px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="dueBankValue" width="140px" label="账户类型" align="center"/>
<el-table-column prop="depositBank" width="180px" label="开户银行" align="center"/>
<el-table-column prop="bankAccount" width="160px" label="银行账号" align="center"/>
<el-table-column prop="accountName" width="130px" label="账号名称" align="center"/>
<el-table-column prop="bankingOutlets" width="180px" label="银行网点" align="center"/>
<el-table-column prop="bankAddress" width="260px" label="开户行地址" align="center"/>
<el-table-column prop="paymentLines" width="160px" label="联行号" align="center"/>
<el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/>
<el-table-column prop="currency" width="130px" label="币种" align="center"/>
<el-table-column prop="remarks" width="240px" label="描述" align="center"/>
<el-table-column prop="actualPay" width="240px" label="厂家销售通路" align="center"/>
<el-table-column prop="paymentAccessNoValue" width="240px" label="付款通路编码" align="center"/>
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/gongyingshang/gongyingshang'
export default {
name: 'gongyingshangInfo',
data() {
return {
tableKey: 0,
index: 0,
viewTitle: '',
supplierType_list: [],
baseManufacturerDto: {
manufacturerName: '',
manufacturerAs: '',
manufacturerCode: '',
supplierType: '',
supplierTypeValue: '',
manufacturerAddress: '',
manufacturerTelePhone: '',
manufacturerFax: '',
contactName: '',
contactMobile: '',
contactTelePhone: '',
weChatID: '',
zipCode: '',
email: '',
createOrg: '',
useOrg: ''
},
sid: '',
baseManufacturerBankDto: [],
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '供应商详情'
req.fetchBySid(row.sid).then(resp => {
this.sid = row.sid
this.baseManufacturerDto = resp.data.baseManufacturerDto
this.baseManufacturerBankDto = resp.data.baseManufacturerBankDto
}).catch(e => {
this.formobj = row
})
},
handleSave() {
if (this.baseManufacturerDto.manufacturerCode === '') {
this.$message({ showClose: true, type: 'error', message: '编码不能为空' })
return
}
const tip = '请确认编码是否正确,保存后信息将无法修改'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const formobj = {
baseManufacturerBankDto: this.baseManufacturerBankDto,
baseManufacturerDto: this.baseManufacturerDto
}
req.update(formobj, this.sid).then(resp => {
this.submitdisabled = false
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
})
},
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.dialogStatus = ''
this.sid = ''
this.baseManufacturerDto = {}
this.baseManufacturerBankDto = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

2
anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshangInfo.vue

@ -145,6 +145,8 @@
<el-table-column prop="swiftCode" width="200px" label="swiftcode(银行代码)" align="center"/>
<el-table-column prop="currency" width="130px" label="币种" align="center"/>
<el-table-column prop="remarks" width="240px" label="描述" align="center"/>
<el-table-column prop="actualPay" width="240px" label="厂家销售通路" align="center"/>
<el-table-column prop="paymentAccessNoValue" width="240px" label="付款通路编码" align="center"/>
</el-table>
</el-form>
</div>

36
anrui-scm/anrui-scm-ui/src/views/gongyingshang/gongyingshanggaunli.vue

@ -12,7 +12,7 @@
</el-form-item>
<el-form-item label="厂商分类">
<el-select v-model="listQuery.params.supplierType" filterable clearable placeholder="请选择厂商分类">
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" :disabled="item.dictValue === '主机厂'"/>
<el-option v-for="item in supplierType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="厂商办公电话">
@ -39,7 +39,7 @@
<el-table-column label="序号" fixed type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column label="操作" fixed align="center" width="90px" class-name="small-padding fixed-width">
<template slot-scope="{row}">
<el-button size="mini" type="primary" @click="handleEdit(row)">编辑</el-button>
<el-button size="mini" type="primary" :disabled="!row.isShow" @click="handleEdit(row)">编辑</el-button>
</template>
</el-table-column>
<el-table-column prop="jc" label="厂商名称" width="220" header-align="center" align="left">
@ -82,6 +82,7 @@
</div>
<gongyingshangAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="handleFilter"/>
<gongyingshangInfo v-show="viewState == 4" ref="divinfo" @doback="resetState"/>
<gongyingshangByHosts v-show="5" ref="divHosts" @doback="resetState" @reloadlist="handleFilter"/>
</div>
</template>
@ -93,6 +94,7 @@ import { typeValues, getPathSidByUserSid } from '@/api/cheliang/dictcommons'
import gongyingshangAdd from './gongyingshangAdd'
import gongyingshangInfo from './gongyingshangInfo'
import req from '@/api/gongyingshang/gongyingshang'
import gongyingshangByHosts from './gongyingshangByHosts'
export default {
name: 'gongyingshangguanli',
@ -101,7 +103,8 @@ export default {
pageye,
ButtonBar,
gongyingshangAdd,
gongyingshangInfo
gongyingshangInfo,
gongyingshangByHosts
},
data() {
return {
@ -121,6 +124,13 @@ export default {
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'primary',
size: 'small',
icon: '',
btnKey: 'toGain',
btnLabel: '获取分公司'
},
{
type: 'success',
size: 'small',
@ -181,6 +191,9 @@ export default {
case 'doDel':
this.doDel()
break
case 'toGain':
this.toGain()
break
case 'doExport':
this.doExport()
break
@ -304,9 +317,22 @@ export default {
return
}
},
toGain() {
req.saveAllByOrgSid({ orgSid: this.listQuery.params.createOrgSid }).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '获取成功' })
this.getList()
}
})
},
handleEdit(row) {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
if (row.supplierTypeValue !== '主机厂' && row.supplierTypeValue !== '分公司') {
this.viewState = 3
this.$refs['divadd'].showEdit(row)
} else {
this.viewState = 5
this.$refs['divHosts'].showInfo(row)
}
},
//
handleCheck(row) {

Loading…
Cancel
Save