5 changed files with 881 additions and 10 deletions
@ -0,0 +1,270 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!--列表页面--> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<button-bar view-title="供应商管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/> |
||||
|
<!--Start查询列表部分--> |
||||
|
<div class="main-content"> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header"> |
||||
|
<el-form-item label="供应商"> |
||||
|
<el-input v-model="listQuery.params.supplierName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="分类"> |
||||
|
<el-input v-model="listQuery.params.supplierTypeName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="办公电话"> |
||||
|
<el-input v-model="listQuery.params.contactTelePhone" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="联系人"> |
||||
|
<el-input v-model="listQuery.params.contactName" placeholder="" clearable/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" icon="el-icon-search" size="small" @click="handleFilter">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">销售开单列表</div> |
||||
|
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--Start 主页面主要部分 --> |
||||
|
<div class=""> |
||||
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" style="width: 100%;" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" align="center" width="50" /> |
||||
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center" /> |
||||
|
<el-table-column label="操作" width="180px" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toEdit(scope.row)">编辑</el-button> |
||||
|
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="supplierName" label="厂商名称" align="center" /> |
||||
|
<el-table-column prop="supplierTypeName" label="厂商分类" align="center" /> |
||||
|
<el-table-column prop="address" label="厂商通讯地址" align="center" /> |
||||
|
<el-table-column prop="contactTelePhone" label="厂商办公电话" align="center" /> |
||||
|
<el-table-column prop="contactName" label="联系人" align="center" /> |
||||
|
<el-table-column prop="contactMobile" label="联系电话" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!--End 主页面主要部分--> |
||||
|
<div class="pages"> |
||||
|
<div class="tit"/> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
||||
|
</div> |
||||
|
<!--End查询列表部分--> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--新增及修改 --> |
||||
|
<supplierAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList" /> |
||||
|
<!-- 详情 --> |
||||
|
<supplierInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import req from '@/api/basicinformation/supplier' |
||||
|
import supplierAdd from './supplierAdd' |
||||
|
import supplierInfo from './supplierInfo' |
||||
|
|
||||
|
export default { |
||||
|
name: 'Supplier', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
ButtonBar, |
||||
|
supplierAdd, |
||||
|
supplierInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
btndisabled: false, |
||||
|
btnList: [ |
||||
|
{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '新增' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'del', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 |
||||
|
tableKey: 0, |
||||
|
list: [], |
||||
|
sids: [], // 用于导出的时候保存已选择的SIDs |
||||
|
FormLoading: false, |
||||
|
listLoading: false, |
||||
|
// 翻页 |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
supplierName: '', |
||||
|
supplierTypeName: '', |
||||
|
contactTelePhone: '', |
||||
|
contactName: '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 初始化变量 |
||||
|
this.getList() |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
console.log('XXXXXXXXXXXXXXX ' + btnKey) |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
// 信息条数 获取点击时当前的sid |
||||
|
handleSelectionChange(row) { |
||||
|
const aa = [] |
||||
|
row.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
// 表中序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
req.listPage(this.listQuery).then((response) => { |
||||
|
this.listLoading = false |
||||
|
if (response.success) { |
||||
|
this.list = response.data.records |
||||
|
this.listQuery.total = response.data.total |
||||
|
} else { |
||||
|
this.list = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 查询按钮 |
||||
|
handleFilter() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 点击重置 |
||||
|
handleReset() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
supplierName: '', |
||||
|
supplierTypeName: '', |
||||
|
contactTelePhone: '', |
||||
|
contactName: '' |
||||
|
} |
||||
|
} |
||||
|
this.init() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divAdd'].showAdd() |
||||
|
}, |
||||
|
toEdit(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divAdd'].showEdit(row) |
||||
|
}, |
||||
|
toInfo(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divInfo'].showInfo(row) |
||||
|
}, |
||||
|
doDel() { |
||||
|
if (this.sids.length === 0) { |
||||
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
||||
|
return |
||||
|
} |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.delBySids(this.sids).then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ type: 'success', message: resp.msg, showClose: true }) |
||||
|
} |
||||
|
this.getList() |
||||
|
loading.close() |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => { |
||||
|
}) |
||||
|
}, |
||||
|
// 修改、编辑、详情返回列表页面 |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,395 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<div class="title">基本信息</div> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商名称</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.supplierName" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商简称</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.supplierPY" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商编码</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.supplierCode" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商类型</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.supplierTypeName" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">供应商电话</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactTelePhone" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">传真</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.fax" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">详细地址</div> |
||||
|
<el-form-item> |
||||
|
<div class="addinputInfo" style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center"> |
||||
|
<el-select v-model="formobj.provinceSid" filterable placeholder="请选择省" style="width:160px" @change="provinceChange"> |
||||
|
<el-option v-for="item in province_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
||||
|
</el-select> |
||||
|
<el-select v-model="formobj.citySid" filterable placeholder="请选择市" style="width:160px" @change="cityChange"> |
||||
|
<el-option v-for="item in city_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
||||
|
</el-select> |
||||
|
<el-select v-model="formobj.countySid" filterable placeholder="请选择县" style="width:160px" @change="countyChange"> |
||||
|
<el-option v-for="item in county_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
||||
|
</el-select> |
||||
|
<el-input style="width: 30%" v-model="formobj.address" clearable placeholder=""/> |
||||
|
</div> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">联系人</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactName" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">联系电话</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.contactMobile" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">邮编</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.zipCode" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">电子邮件</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.email" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">网址</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.website" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">开票公司名称</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.billingCompanyName" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">税号</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.registNum" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">法人</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.legalName" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">采购员</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.purchaser" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">开票类型</div> |
||||
|
<el-form-item> |
||||
|
<el-select class="addinputInfo" v-model="formobj.billingTypeValue" filterable placeholder="" @change="billingTypeChange"> |
||||
|
<el-option v-for="item in billingType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">税率</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.taxRate" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder=""/></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title titleOne"> |
||||
|
<div>开户行列表</div> |
||||
|
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd">新增</el-button> |
||||
|
</div> |
||||
|
<el-table :key="tableKey" :data="formobj.baseSupplierBankList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column fixed width="150" label="操作" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="handleEdit(scope.row)">编辑</el-button> |
||||
|
<el-button type="danger" size="mini" @click="handleDelete(scope.$index)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="dueBankValue" label="账户类型" align="center" width="100" /> |
||||
|
<el-table-column prop="bankName" label="开户银行" align="center" width="120"/> |
||||
|
<el-table-column prop="bankAccount" label="银行账号" align="center" width="100" /> |
||||
|
<el-table-column prop="accountName" label="账号名称" align="center" width="160" /> |
||||
|
<el-table-column prop="bankingOutlets" label="银行网点" align="center" width="100" /> |
||||
|
<el-table-column prop="bankAddress" label="开户行地址" align="center" min-width="200"/> |
||||
|
<el-table-column prop="paymentLines" label="联行号" align="center" width="100"/> |
||||
|
<el-table-column prop="swiftCode" label="swifcode(银行代码)" align="center" width="150" /> |
||||
|
<el-table-column prop="currency" label="币种" align="center" width="100"/> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<openingbank v-show="viewState == 2 || viewState == 3" ref="divOpen" @backData="backData" @doback="resetState" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/basicinformation/supplier' |
||||
|
import openingbank from './relation/openingbank' |
||||
|
import { getProvince, getCity, getCounty, typeValues } from '@/api/Common/dictcommons' |
||||
|
|
||||
|
export default { |
||||
|
name: 'SupplierAdd', |
||||
|
components: { |
||||
|
openingbank |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
province_list: [], |
||||
|
city_list: [], |
||||
|
county_list: [], |
||||
|
billingType_list: [], |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
supplierCode: '', |
||||
|
supplierName: '', |
||||
|
supplierPY: '', |
||||
|
supplierTypeSid: '', |
||||
|
supplierTypeName: '', |
||||
|
provinceSid: '', |
||||
|
province: '', |
||||
|
citySid: '', |
||||
|
city: '', |
||||
|
countySid: '', |
||||
|
county: '', |
||||
|
address: '', |
||||
|
contactMobile: '', |
||||
|
contactTelePhone: '', |
||||
|
contactName: '', |
||||
|
fax: '', |
||||
|
zipCode: '', |
||||
|
email: '', |
||||
|
website: '', |
||||
|
billingCompanyName: '', |
||||
|
registNum: '', |
||||
|
legalName: '', |
||||
|
purchaser: '', |
||||
|
sortNo: '', |
||||
|
billingTypeKey: '', |
||||
|
billingTypeValue: '', |
||||
|
useOrgSid: '', |
||||
|
createOrgName: '', |
||||
|
createOrgSid: '', |
||||
|
taxRate: '', |
||||
|
remarks: '', |
||||
|
baseSupplierBankList: [] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
typeValues({ type: 'billingType' }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.billingType_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
getProvince().then((res) => { |
||||
|
if (res.success) { |
||||
|
this.province_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
provinceChange(value) { |
||||
|
const choose = this.province_list.filter((item) => item.sid === value) |
||||
|
if (choose !== null && choose.length > 0) { |
||||
|
this.formobj.province = choose[0].name |
||||
|
this.getCity(value) |
||||
|
} |
||||
|
}, |
||||
|
getCity(val) { |
||||
|
getCity({ sid: val }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.city_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
cityChange(value) { |
||||
|
const choose = this.city_list.filter((item) => item.sid === value) |
||||
|
if (choose !== null && choose.length > 0) { |
||||
|
this.formobj.city = choose[0].name |
||||
|
this.getCounty(value) |
||||
|
} |
||||
|
}, |
||||
|
getCounty(val) { |
||||
|
getCounty({ sid: val }).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.county_list = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
countyChange(value) { |
||||
|
const choose = this.county_list.filter((item) => item.sid === value) |
||||
|
if (choose !== null && choose.length > 0) { |
||||
|
this.formobj.county = choose[0].name |
||||
|
} |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.viewTitle = '【新增】供应商' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.init() |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.viewTitle = '【编辑】供应商' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
this.init() |
||||
|
req.fetchDetailsBySid(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
billingTypeChange(value) { |
||||
|
const choose = this.billingType_list.filter((item) => item.dictValue === value) |
||||
|
if (choose !== null && choose.length > 0) { |
||||
|
this.formobj.billingTypeKey = choose[0].dictKey |
||||
|
} |
||||
|
}, |
||||
|
handleAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divOpen'].showAdd() |
||||
|
}, |
||||
|
handleEdit(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divOpen'].showEdit(row) |
||||
|
}, |
||||
|
handleDelete(index) { |
||||
|
this.formobj.baseSupplierBankList.splice(index, 1) |
||||
|
}, |
||||
|
backData(value) { |
||||
|
this.viewState = 1 |
||||
|
this.formobj.baseSupplierBankList.push({ |
||||
|
sid: value.sid, |
||||
|
supplierSid: value.supplierSid, |
||||
|
bankName: value.bankName, |
||||
|
bankAccount: value.bankAccount, |
||||
|
accountName: value.accountName, |
||||
|
dueBankKey: value.dueBankKey, |
||||
|
dueBankValue: value.dueBankValue, |
||||
|
bankingOutlets: value.bankingOutlets, |
||||
|
bankAddress: value.bankAddress, |
||||
|
paymentLines: value.paymentLines, |
||||
|
swiftCode: value.swiftCode, |
||||
|
currency: value.currency |
||||
|
}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
saveOrUpdate() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.saveOrUpdate(this.formobj).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.$message({ showClose: true, type: 'success', message: '保存成功' }) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
this.submitdisabled = false |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.submitdisabled = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
supplierCode: '', |
||||
|
supplierName: '', |
||||
|
supplierPY: '', |
||||
|
supplierTypeSid: '', |
||||
|
supplierTypeName: '', |
||||
|
provinceSid: '', |
||||
|
province: '', |
||||
|
citySid: '', |
||||
|
city: '', |
||||
|
countySid: '', |
||||
|
county: '', |
||||
|
address: '', |
||||
|
contactMobile: '', |
||||
|
contactTelePhone: '', |
||||
|
contactName: '', |
||||
|
fax: '', |
||||
|
zipCode: '', |
||||
|
email: '', |
||||
|
website: '', |
||||
|
billingCompanyName: '', |
||||
|
registNum: '', |
||||
|
legalName: '', |
||||
|
purchaser: '', |
||||
|
sortNo: '', |
||||
|
billingTypeKey: '', |
||||
|
billingTypeValue: '', |
||||
|
useOrgSid: '', |
||||
|
createOrgName: '', |
||||
|
createOrgSid: '', |
||||
|
taxRate: '', |
||||
|
remarks: '', |
||||
|
baseSupplierBankList: [] |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
||||
|
margin-left: 120px !important; |
||||
|
width: calc(100% - 115px); |
||||
|
} |
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,206 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<div class="title">基本信息</div> |
||||
|
<el-row style="border-top: 1px solid #e0e3eb"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">厂商名称</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">简称</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierPY }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">编码</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierCode }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">分类</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.supplierTypeName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="24"> |
||||
|
<div class="span-sty">详细地址</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.address }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">厂家办公电话</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.contactTelePhone }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">传真</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.fax }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">联系人</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.contactName }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">联系电话</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.contactMobile }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">邮编</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.zipCode }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">邮箱</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.email }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<el-row> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">税号</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.registNum }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty">发票类型</div> |
||||
|
<el-form-item><span class="addinputInfo">{{ formobj.billingTypeValue }}</span></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
<div class="title">开户行列表</div> |
||||
|
<el-table :key="tableKey" :data="formobj.baseSupplierBankList" :index="index" border style="width: 100%"> |
||||
|
<el-table-column fixed width="80" label="序号" type="index" :index="index + 1" align="center"/> |
||||
|
<el-table-column prop="dueBankValue" label="账户类型" align="center" width="100" /> |
||||
|
<el-table-column prop="bankName" label="开户银行" align="center" width="120"/> |
||||
|
<el-table-column prop="bankAccount" label="银行账号" align="center" width="100" /> |
||||
|
<el-table-column prop="accountName" label="账号名称" align="center" width="160" /> |
||||
|
<el-table-column prop="bankingOutlets" label="银行网点" align="center" width="100" /> |
||||
|
<el-table-column prop="bankAddress" label="开户行地址" align="center" min-width="200"/> |
||||
|
<el-table-column prop="paymentLines" label="联行号" align="center" width="100"/> |
||||
|
<el-table-column prop="swiftCode" label="swifcode(银行代码)" align="center" width="150" /> |
||||
|
<el-table-column prop="currency" label="币种" align="center" width="100"/> |
||||
|
</el-table> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/basicinformation/supplier' |
||||
|
|
||||
|
export default { |
||||
|
name: 'SupplierInfo', |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
tableKey: 0, |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
supplierCode: '', |
||||
|
supplierName: '', |
||||
|
supplierPY: '', |
||||
|
supplierTypeSid: '', |
||||
|
supplierTypeName: '', |
||||
|
provinceSid: '', |
||||
|
province: '', |
||||
|
citySid: '', |
||||
|
city: '', |
||||
|
countySid: '', |
||||
|
county: '', |
||||
|
address: '', |
||||
|
contactMobile: '', |
||||
|
contactTelePhone: '', |
||||
|
contactName: '', |
||||
|
fax: '', |
||||
|
zipCode: '', |
||||
|
email: '', |
||||
|
website: '', |
||||
|
billingCompanyName: '', |
||||
|
registNum: '', |
||||
|
legalName: '', |
||||
|
purchaser: '', |
||||
|
sortNo: '', |
||||
|
billingTypeKey: '', |
||||
|
billingTypeValue: '', |
||||
|
useOrgSid: '', |
||||
|
createOrgName: '', |
||||
|
createOrgSid: '', |
||||
|
taxRate: '', |
||||
|
baseSupplierBankList: [] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfo(row) { |
||||
|
this.viewTitle = '供应商详情' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.fetchDetailsBySid(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
handleReturn() { |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
supplierCode: '', |
||||
|
supplierName: '', |
||||
|
supplierPY: '', |
||||
|
supplierTypeSid: '', |
||||
|
supplierTypeName: '', |
||||
|
provinceSid: '', |
||||
|
province: '', |
||||
|
citySid: '', |
||||
|
city: '', |
||||
|
countySid: '', |
||||
|
county: '', |
||||
|
address: '', |
||||
|
contactMobile: '', |
||||
|
contactTelePhone: '', |
||||
|
contactName: '', |
||||
|
fax: '', |
||||
|
zipCode: '', |
||||
|
email: '', |
||||
|
website: '', |
||||
|
billingCompanyName: '', |
||||
|
registNum: '', |
||||
|
legalName: '', |
||||
|
purchaser: '', |
||||
|
sortNo: '', |
||||
|
billingTypeKey: '', |
||||
|
billingTypeValue: '', |
||||
|
useOrgSid: '', |
||||
|
createOrgName: '', |
||||
|
createOrgSid: '', |
||||
|
taxRate: '', |
||||
|
baseSupplierBankList: [] |
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
} |
||||
|
.addinputInfo { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue