|
@@ -60,39 +60,115 @@
|
|
|
v-if="$hasPermissions('B_supplier_edit')"
|
|
|
id="supplier-edit"
|
|
|
@click="handleEdit(record)"
|
|
|
- class="actionBtn icon-blues"
|
|
|
- />
|
|
|
- <span v-else>--</span>
|
|
|
+ class="actionBtn icon-blues" />
|
|
|
+ <a-icon
|
|
|
+ type="setting"
|
|
|
+ v-if="$hasPermissions('B_supplier_setting')"
|
|
|
+ title="设置账户信息"
|
|
|
+ id="supplier-setting"
|
|
|
+ @click="handleSet(record)"
|
|
|
+ class="actionBtn icon-orange" />
|
|
|
+ <span v-if="!$hasPermissions('B_supplier_edit') && !$hasPermissions('B_supplier_setting')">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
|
|
|
<!-- 编辑 门店所属组织 -->
|
|
|
<supplier-modal :openModal="openModal" :supplierSn="supplierSn" @success="storeSubmit" @close="openModal=false" />
|
|
|
+ <!-- 编辑结算信息 -->
|
|
|
+ <supplierBank-modal :openSettingModal="openSettingModal" :supplierSn="supplierSn" @refresh="handleSetSubmit" @close="openSettingModal=false" />
|
|
|
</a-card>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { STable, VSelect } from '@/components'
|
|
|
+import {
|
|
|
+ STable,
|
|
|
+ VSelect
|
|
|
+} from '@/components'
|
|
|
import SupplierModal from './SupplierModal.vue'
|
|
|
-import { findOrgTree } from '@/api/atorg.js'
|
|
|
-import { supplierListQuery } from '@/api/supplierManagement.js'
|
|
|
+import SupplierBankModal from './SupplierBankModal.vue'
|
|
|
+import {
|
|
|
+ findOrgTree
|
|
|
+} from '@/api/atorg.js'
|
|
|
+import {
|
|
|
+ supplierListQuery
|
|
|
+} from '@/api/supplierManagement.js'
|
|
|
export default {
|
|
|
name: 'StoreManagement',
|
|
|
- components: { STable, VSelect, SupplierModal },
|
|
|
+ components: {
|
|
|
+ STable,
|
|
|
+ VSelect,
|
|
|
+ SupplierModal,
|
|
|
+ SupplierBankModal
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
queryParam: {
|
|
|
name: '', // 供应商名称
|
|
|
orgCode: null // 组织机构
|
|
|
},
|
|
|
- columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
|
- { title: '组织机构', scopedSlots: { customRender: 'orgCode' }, width: 150, align: 'center' },
|
|
|
- { title: '供应商名称', dataIndex: 'name', width: 120, align: 'center' },
|
|
|
- { title: '联系人', dataIndex: 'manager', width: 100, align: 'center', customRender: (text, record, index) => { return text || '--' } },
|
|
|
- { title: '手机号码', dataIndex: 'managerMobile', width: 100, align: 'center' },
|
|
|
- { title: '座机号码', dataIndex: 'tel', customRender: (text, record, index) => { return text || '--' }, width: 80, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }
|
|
|
+ columns: [{
|
|
|
+ title: '序号',
|
|
|
+ dataIndex: 'no',
|
|
|
+ width: 60,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '组织机构',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'orgCode'
|
|
|
+ },
|
|
|
+ width: 150,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '供应商名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ width: 120,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '联系人',
|
|
|
+ dataIndex: 'manager',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '手机号码',
|
|
|
+ dataIndex: 'managerMobile',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '座机号码',
|
|
|
+ dataIndex: 'tel',
|
|
|
+ width: 80,
|
|
|
+ align: 'center',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return text || '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '平台商户号',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return record.supplierBankAccountEntity ? record.supplierBankAccountEntity.merchantNo : '--'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ width: 100,
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'action'
|
|
|
+ }
|
|
|
+ }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -118,6 +194,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
openModal: false, // 编辑 门店所属组织 弹框展示状态
|
|
|
+ openSettingModal: false, // 编辑结算信息弹窗
|
|
|
supplierSn: '', // 供应商信息
|
|
|
supplierName: '', // 供应商名称
|
|
|
treeData: [] // 组织机构
|
|
@@ -140,11 +217,21 @@ export default {
|
|
|
this.supplierSn = item.supplierSn
|
|
|
this.openModal = true
|
|
|
},
|
|
|
- // 编辑 提交成功
|
|
|
+ // 编辑供应商 提交成功
|
|
|
storeSubmit () {
|
|
|
this.$refs.table.refresh()
|
|
|
this.openModal = false
|
|
|
},
|
|
|
+ // 编辑结算账户信息
|
|
|
+ handleSet (item) {
|
|
|
+ this.supplierSn = item.supplierSn
|
|
|
+ this.openSettingModal = true
|
|
|
+ },
|
|
|
+ // 编辑结算账户信息 提交成功
|
|
|
+ handleSetSubmit () {
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ this.openSettingModal = false
|
|
|
+ },
|
|
|
// 重置
|
|
|
reset () {
|
|
|
this.$refs.queryForm.resetFields()
|
|
@@ -162,11 +249,11 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
-.StoreManagement {
|
|
|
- .table-page-search-wrapper {
|
|
|
- .search-btn {
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+ .StoreManagement {
|
|
|
+ .table-page-search-wrapper {
|
|
|
+ .search-btn {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|