diff --git a/anrui-base/anrui-base-ui/src/api/jichuxinxi/brandManagement.js b/anrui-base/anrui-base-ui/src/api/jichuxinxi/brandManagement.js index 801090e41b..6ca5ec330d 100644 --- a/anrui-base/anrui-base-ui/src/api/jichuxinxi/brandManagement.js +++ b/anrui-base/anrui-base-ui/src/api/jichuxinxi/brandManagement.js @@ -74,6 +74,22 @@ export function getListOrg(params) { params: params }) } +// 根据登陆人sid查询分公司 (孟哲写的接口) +export function getPathSidByUserSid(data) { + return request({ + url: '/portal/v1/sysstafforg/getPathSidByUserSid', + method: 'get', + params: data + }) +} +// 根据分公司sid查询分公司name +export function fetchBySid(data) { + return request({ + url: 'portal/v1/sysorganization/fetchBySid/' + data, + method: 'get', + params: data + }) +} // 当前登陆人分公司 export function getUseOrgByUserSid(params) { return request({ diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue index cc252a23be..f2318a6057 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanli.vue @@ -7,26 +7,36 @@
{{ searchxianshitit }}
{ + if (res.code === '200') { + this.supplierType_list = res.data + console.log('厂商分类', this.supplierType_list) + } + }) + // 查询所有分公司 + getListOrg().then((res) => { + if (res.success) { + this.useOrg_list = res.data } }) + }, // 序号 indexMethod(index) { @@ -317,29 +360,22 @@ export default { }, // 查询列表信息 getList() { - this.listLoading = true - pagerList({ - current: this.listQuery.current, - size: this.listQuery.size, - params: { - manufacturerName: this.listQuery.manufacturerName, - supplyType: this.listQuery.supplyType, - } - }).then((response) => { - // console.log('列表查询结果:', response) - this.listLoading = false - if ( - response.code === '200' && - response.data && - response.data.total > 0 - ) { - this.list = response.data.records - this.total = response.data.total - } else { - this.list = [] - this.total = 0 - } - }) + this.listLoading = true + pagerList(this.listQuery).then((response) => { + // console.log('列表查询结果:', response) + this.listLoading = false + if ( + response.code === '200' && + response.data && + response.data.total > 0 + ) { + this.list = response.data.records + this.total = response.data.total + } else { + this.list = [] + this.total = 0 + } + }) }, // 查询按钮 handleFilter() { @@ -348,12 +384,25 @@ export default { }, handleReset() { this.listQuery = { - supplyType: '', - manufacturerName: '', + params: { + manufacturerName: '', + supplierType: '', + useOrgSid: '', + manufacturerTelePhone: '', + contactName: '', + }, current: 1, size: 20 - } - this.getList() + }, + // this.listQuery = { + // supplierType:'', + // useOrgSid:'', + // supplyType: '', + // manufacturerName: '', + // current: 1, + // size: 20 + // } + this.getList() }, // ----------------------------------方法-------------------- // 添加前数据初始化 @@ -366,42 +415,6 @@ export default { contactMobile: '', // } }, - // 文本模糊查询 - querySearchAsync(queryString, cb) { - console.log('查询条件:', queryString) - - if ( - queryString != null && - queryString != undefined && - queryString !== '' - ) { - // this.searchData({ - // name: queryString - // }) - getNamesDownes({ - name: queryString - }).then((response) => { - if (response.code === '200') { - response.data - cb(response.data) - } - }) - } else { - cb(this.YongHu) - } - }, - handleSelect(e) { - // 选择: - // console.log('选择:' + JSON.stringify(e)) - this.listQuery.manufacturerName = e.manufacturerName - // this.listQuery.brandCode = e.sid - }, - // 清空信息 - inputclear() { - this.listQuery.manufacturerName = '' - this.getList() - // this.listQuery.brandCode = '' - }, // 打开添加对话框 toAdd() { this.viewState = 2 @@ -482,40 +495,9 @@ export default { } }, - // 打开修改 - toEdit() { - this.$store.state.counter = 1 - // console.log(this.sids, '打开修改') - if (this.sids.length === 1) { - /* this.dialogStatus = 'update' - this.$router.push({ - path: `/changshang/changshangguanliAdd/${this.sids[0]}`, - })*/ - - // this.dialogStatus = 'update' - this.viewState = 3 - const sid = this.sids[0] - const row = this.row - this.$refs['divadd'].showEdit(sid, row) - // this.$router.push({ - // path: `/cheliang/chexingAdd/${this.sids[0]}` - // }) - } else if (this.sids.length > 1) { - this.$notify({ - title: '提示', - message: '不能选中多个商家修改!!', - type: 'info', - duration: 2000, - }) - } else { - this.$notify({ - title: '提示', - message: '没有选择厂商!!', - type: 'error', - duration: 2000, - }) - return - } + handleEdit(row) { + this.viewState = 3 + this.$refs['divadd'].showEdit(row.sid) }, // 打开查看 handleCheck(row) { diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue index 67e7787b7e..e1c917e12b 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshangguanliAdd.vue @@ -14,7 +14,7 @@
-
供应厂商信息
+
基本信息
@@ -32,24 +32,29 @@ - 厂商编码: + 编码: - - 厂商通讯地址: - + + 分类: + + + - - - 厂商传真: - + + + 通讯地址: + + + 厂商办公电话: @@ -57,18 +62,10 @@ clearable /> - - - - 邮编: - - - - - - 邮箱: - + + 传真: + @@ -102,189 +99,204 @@ - - 行业: - - - + + 邮编: + - - 供应商分类: - - - + + 邮箱: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
供应厂商开户行信息
- - 供应类别: - - - + + 国家: + - - 供应商分组: - - - + + 开户银行: + - - 使用组织: - - - - - - - - - - 地区: - - - - - - - - - - + + 银行账号: + - - -
供应厂商财务信息
- - - - 结算币种: - - - - - - - - 结算方式: - - - - - - - - - - 付款条件: - - - - - - 结算方: - - - - - - - - 单次预付额度: - - - - - - 税分类: - - - - - - - - - - 税务登记号: - - - - - - 经营类型: - - - - - - - - 收款方: - - - - - - 发票类型: - - - - - - - - 默认税率: - - - - - - 描述: - - - - -
供应厂商开户行信息
- - - - 国家: - - - - - - 开户银行: - - - - - - - - 银行账号: - - @@ -356,7 +368,7 @@ import {details, SaveList, selectListOrg, Update,} from "@/api/jichuxinxi/basema import {getCity, getCounty, getProvince} from '@/api/portal/areaPicker' // 省市区 import {typeValues} from "@/api/jichuxinxi/dictcommons"; import {getLook, getXiu, setuser} from "@/utils/baocun"; -import {getListOrg, getUseOrgByUserSid} from "@/api/jichuxinxi/brandManagement"; +import {getListOrg, getPathSidByUserSid, fetchBySid} from "@/api/jichuxinxi/brandManagement"; export default { name: "ChangshangguanliAdd1", @@ -490,6 +502,7 @@ export default { industryons: [], supplier: [], grouping: [], + supplierType_list:[], //分类 rules: { email: [{ required: true, @@ -560,17 +573,40 @@ export default { // this.infoe = this.$route.query.info; // console.log("查看传过来的状态", this.infoe); // ---------------------------------------------------------- - this.gertXiaLa(); - this.gertXiaLa2(); - this.gertXiaLa3(); - this.gertXiaLa4(); - this.getZuZhi(); - this.huoquSheng() - this.getListOrgAll() + // this.init(); }, methods: { setDetaList() { + typeValues({ + type: this.supplierType + }).then((res) => { + if (res.code === "200") { + this.supplier = res.data; + } + }); + typeValues({ + type: this.supplierGroup + }).then((res) => { + if (res.code === "200") { + this.grouping = res.data; + } + }); + typeValues({ + type: this.supplyType + }).then((res) => { + if (res.code === "200") { + this.typeOptions = res.data; + } + }); + typeValues({ + type: this.industrytype + }).then((res) => { + if (res.code === "200") { + this.industryons = res.data; + } + }); + typeValues({ type: this.settlementCurrency }).then((res) => { @@ -587,6 +623,14 @@ export default { console.log('结算方式', this.tWay) } }) + typeValues({ + type: 'supplierType' + }).then((res) => { + if (res.code === '200') { + this.supplierType_list = res.data + console.log('厂商分类', this.supplierType_list) + } + }) typeValues({ type: this.taxClassification }).then((res) => { @@ -596,6 +640,20 @@ export default { } }) }, + // 厂商分类 + getSupplierType(value){ + let bb = null + this.supplierType_list.forEach((e) => { + if (e.dictKey == value) { + bb = { + name: e.dictValue, + vaule: e.dictKey + } + } + }) + this.temp.supplierTypeValue = bb.name + console.log('厂商分类',this.temp.supplierTypeValue,this.temp.supplierType) + }, // 结算币种 getBiZhong(value) { let bb = null @@ -637,6 +695,21 @@ export default { console.log('税分类', bb) this.temp1.taxClassificationValue = bb.name }, + // 根据登陆人sid获取分公司 + getPathSid() { + const userSid = window.sessionStorage.getItem('userSid') + getPathSidByUserSid({userSid:userSid}).then((res) => { + if (res.code === '200') { + // this.temp.createOrgName = res + this.temp.createOrg = res.data + fetchBySid(res.data).then((response) => { + if (response.code === '200') { + this.temp.createOrgName = response.data.name + } + }) + } + }) + }, // 查询所有分公司 getListOrgAll() { getListOrg().then((res) => { @@ -683,6 +756,10 @@ export default { this.viewTitle = '新增厂商详细信息' this.stateId = 0 this.setDetaList() + this.getZuZhi(); + this.huoquSheng() + this.getListOrgAll() + this.getPathSid() }, init() { @@ -820,8 +897,8 @@ export default { this.temp.county = bb.name this.deCode.push(bb.districtCode) }, - showEdit(sid, row) { - console.log('编辑回显',sid) + showEdit(sid) { + console.log('编辑回显', sid) this.$nextTick(() => { this.$refs['dataForm'].clearValidate() }) @@ -846,6 +923,10 @@ export default { } }) this.setDetaList() + this.getZuZhi(); + this.huoquSheng() + this.getListOrgAll() + this.getPathSid() }, // 返回 handleReturn(isreload) { @@ -1000,45 +1081,7 @@ export default { } }); }, - // 供应商分类: - gertXiaLa() { - typeValues({ - type: this.supplierType - }).then((res) => { - if (res.code === "200") { - this.supplier = res.data; - } - }); - }, - // 供应商分组: - gertXiaLa2() { - typeValues({ - type: this.supplierGroup - }).then((res) => { - if (res.code === "200") { - this.grouping = res.data; - } - }); - }, - // 供应类别: - gertXiaLa3() { - typeValues({ - type: this.supplyType - }).then((res) => { - if (res.code === "200") { - this.typeOptions = res.data; - } - }); - }, - gertXiaLa4() { - typeValues({ - type: this.industrytype - }).then((res) => { - if (res.code === "200") { - this.industryons = res.data; - } - }); - }, + getHangYe(value) { let bb = null this.industryons.forEach((e) => { diff --git a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue index 2e17817172..e4856c2a2d 100644 --- a/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue +++ b/anrui-base/anrui-base-ui/src/views/changshang/changshangguanli/changshanglook.vue @@ -11,7 +11,7 @@
-
供应厂商信息
+
基本信息
@@ -29,42 +29,36 @@ - 厂商编码: - {{temp.manufacturerCode}} + 编码: + {{ temp.manufacturerCode }} - - 厂商通讯地址: - {{temp.manufacturerAddress}} + + 分类: + {{ temp.supplierTypeValue }} - - - 厂商传真: - {{temp.manufacturerFax}} + + + 厂商通讯地址: + {{ temp.manufacturerAddress }} + + 厂商办公电话: {{temp.manufacturerTelePhone}} - - - - 邮编: - {{temp.zipCode}} - - - - - 邮箱: - {{temp.email}} + + 厂商传真: + {{ temp.manufacturerFax }} @@ -98,131 +92,146 @@ - - 行业: - {{temp.industryValue}} - - - - - 供应商分类: - {{temp.supplierTypeValue}} - - - - - - - 供应类别: - {{temp.supplyTypeValue}} - - - - - 供应商分组: - {{temp.supplierGroupValue}} - - - - - - - 使用组织: - {{temp.useOrgName }} - - - - - 地区: - {{temp.province + temp.city + temp.county}} - - - -
供应厂商财务信息
- - - - 结算币种: - {{temp1.settlementCurrencyValue}} - - - - - 结算方式: - {{temp1.settlementWayValue}} - - - - - - - 付款条件: - {{temp1.paymentConditions}} - - - - - 结算方: - {{temp1.settlementParty}} - - - - - - - 单次预付额度: - {{temp1.singleAdvance}} - - - - - 税分类: - {{temp1.taxClassificationValue}} - - - - - - - 税务登记号: - {{temp1.taxRegistNum}} - - - - - 经营类型: - {{temp1.businessType}} - - - - - - - 收款方: - {{temp1.payee}} - - - - - 发票类型: - {{temp1.invoiceType}} - - - - - - - 默认税率: - {{temp1.defaultRate}} + + 邮编: + {{temp.zipCode}} - - 描述: - {{temp1.remarks}} + + 邮箱: + {{temp.email}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
供应厂商开户行信息
@@ -310,13 +319,13 @@ -