|
@@ -5,7 +5,21 @@
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
<a-row :gutter="48">
|
|
<a-row :gutter="48">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
- <a-form-item label="供应商名称"><a-input allowClear v-model.trim="searchData.name" :maxLength="30" placeholder="请输入" id="OperateJournal-name"/></a-form-item>
|
|
|
|
|
|
+ <a-form-item label="结算时间:" :label-col="{ span: 3 }" :wrapper-col="{ span: 12 }">
|
|
|
|
+ <a-range-picker
|
|
|
|
+ style="width:100%"
|
|
|
|
+ id="PaySettlementRecords-queryOrderDate"
|
|
|
|
+ :disabledDate="disabledDate"
|
|
|
|
+ v-model="queryOrderDate"
|
|
|
|
+ format="YYYY-MM-DD"
|
|
|
|
+ :placeholder="['开始时间', '结束时间']" />
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="供应商名称"><a-input allowClear v-model.trim="queryParam.name" :maxLength="30" placeholder="请输入" id="OperateJournal-name"/></a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="负责人手机号码"><a-input allowClear v-model.trim="queryParam.contactPhone" :maxLength="30" placeholder="请输入" id="OperateJournal-name"/></a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="OperateJournal-refreshTable">查询</a-button>
|
|
<a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)" id="OperateJournal-refreshTable">查询</a-button>
|
|
@@ -24,14 +38,18 @@
|
|
:data="loadData"
|
|
:data="loadData"
|
|
bordered>
|
|
bordered>
|
|
<span slot="action" slot-scope="text, record">
|
|
<span slot="action" slot-scope="text, record">
|
|
- <a-icon
|
|
|
|
- v-if="record.state==0"
|
|
|
|
- type="edit"
|
|
|
|
- id="bannerSetting-handleEdit"
|
|
|
|
- title="编辑"
|
|
|
|
- class="actionBtn icon-blues"
|
|
|
|
- @click="handleEdit(record)" />
|
|
|
|
- <span v-if="record.state==1">--</span>
|
|
|
|
|
|
+ <template>
|
|
|
|
+ <a-icon
|
|
|
|
+ v-if="record.state==0"
|
|
|
|
+ type="edit"
|
|
|
|
+ id="bannerSetting-handleEdit"
|
|
|
|
+ title="编辑"
|
|
|
|
+ class="actionBtn icon-blues"
|
|
|
|
+ @click="handleEdit(record)" />
|
|
|
|
+ <span v-if="record.state==1">--</span>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <a-icon type="qrcode" title="查看小程序码" @click="getQrCode(record)" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" />
|
|
</span>
|
|
</span>
|
|
<span slot="state" slot-scope="text, record">
|
|
<span slot="state" slot-scope="text, record">
|
|
<a-switch
|
|
<a-switch
|
|
@@ -45,12 +63,25 @@
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 新增编辑弹窗 -->
|
|
<!-- 新增编辑弹窗 -->
|
|
<add-partner-modal :itemId="itemId" :itemData="itemData" :openSupplierModal="openSupplierModal" @refresh="$refs.table.refresh(true)" @close="cancel"></add-partner-modal>
|
|
<add-partner-modal :itemId="itemId" :itemData="itemData" :openSupplierModal="openSupplierModal" @refresh="$refs.table.refresh(true)" @close="cancel"></add-partner-modal>
|
|
|
|
+ <!-- 查看小程序码 -->
|
|
|
|
+ <a-modal
|
|
|
|
+ class="qrCodeModal"
|
|
|
|
+ title="查看小程序码"
|
|
|
|
+ :width="500"
|
|
|
|
+ :footer="null"
|
|
|
|
+ :destroyOnClose="true"
|
|
|
|
+ @cancel="isQrCodeModal = false"
|
|
|
|
+ v-model="isQrCodeModal">
|
|
|
|
+ <img :src="qrCode" width="400" height="400" class="qrCode" />
|
|
|
|
+ <a-button type="primary" class="downQrCode" @click="downloadCode">下载小程序码</a-button>
|
|
|
|
+ </a-modal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import moment from 'moment'
|
|
import { Upload, STable, VSelect } from '@/components'
|
|
import { Upload, STable, VSelect } from '@/components'
|
|
-import { getSupplierList, changeSupplierStatus } from '@/api/shopSetting.js'
|
|
|
|
|
|
+import { getSellerList, changeSellerStatus, sellerQrCode } from '@/api/businessManage.js'
|
|
import addPartnerModal from './addPartnerModal.vue'
|
|
import addPartnerModal from './addPartnerModal.vue'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -61,8 +92,16 @@ export default {
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
- searchData: { name: '' },
|
|
|
|
|
|
+ queryParam: {
|
|
|
|
+ name: '',
|
|
|
|
+ beginDate: '',
|
|
|
|
+ endDate: '',
|
|
|
|
+ contactPhone: ''
|
|
|
|
+ },
|
|
|
|
+ queryOrderDate: undefined,
|
|
openSupplierModal: false, // 默认关闭弹窗
|
|
openSupplierModal: false, // 默认关闭弹窗
|
|
|
|
+ isQrCodeModal: false, // 查看小程序码 弹框展示状态
|
|
|
|
+ qrCode: '',
|
|
itemId: null, // 编辑行id
|
|
itemId: null, // 编辑行id
|
|
itemData: {}, // 编辑行数据
|
|
itemData: {}, // 编辑行数据
|
|
// 表头
|
|
// 表头
|
|
@@ -74,19 +113,20 @@ export default {
|
|
align: 'center'
|
|
align: 'center'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '供应商名称',
|
|
|
|
- width: 200,
|
|
|
|
- dataIndex: 'name',
|
|
|
|
- align: 'center'
|
|
|
|
|
|
+ title: '创建时间',
|
|
|
|
+ width: 200,
|
|
|
|
+ dataIndex: 'createDate',
|
|
|
|
+ align: 'center'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '供应商简称',
|
|
|
|
|
|
+ title: '商户名称',
|
|
width: 100,
|
|
width: 100,
|
|
- dataIndex: 'simpleName',
|
|
|
|
|
|
+ dataIndex: 'name',
|
|
align: 'center'
|
|
align: 'center'
|
|
},
|
|
},
|
|
|
|
+
|
|
{
|
|
{
|
|
- title: '联系人',
|
|
|
|
|
|
+ title: '负责人',
|
|
width: 100,
|
|
width: 100,
|
|
dataIndex: 'contactName',
|
|
dataIndex: 'contactName',
|
|
align: 'center'
|
|
align: 'center'
|
|
@@ -109,15 +149,6 @@ export default {
|
|
customRender: 'state'
|
|
customRender: 'state'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- title: '备注',
|
|
|
|
- width: 200,
|
|
|
|
- dataIndex: 'remarks',
|
|
|
|
- align: 'center',
|
|
|
|
- customRender: (text) => {
|
|
|
|
- return text || '--'
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
align: 'center',
|
|
align: 'center',
|
|
@@ -129,8 +160,17 @@ export default {
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
- return getSupplierList(
|
|
|
|
- Object.assign(parameter, this.searchData)
|
|
|
|
|
|
+ const searchData = Object.assign(parameter, this.queryParam)
|
|
|
|
+ console.log(this.queryOrderDate, 'this.queryOrderDate')
|
|
|
|
+ if (this.queryOrderDate && this.queryOrderDate.length) {
|
|
|
|
+ searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
|
|
|
|
+ searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
|
|
|
|
+ } else {
|
|
|
|
+ searchData.beginDate = ''
|
|
|
|
+ searchData.endDate = ''
|
|
|
|
+ }
|
|
|
|
+ return getSellerList(
|
|
|
|
+ searchData
|
|
).then(res => {
|
|
).then(res => {
|
|
const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -156,6 +196,10 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 禁止不可选日期
|
|
|
|
+ disabledDate (current) {
|
|
|
|
+ return current && current > moment().endOf('day')
|
|
|
|
+ },
|
|
showModal () {
|
|
showModal () {
|
|
this.itemId = null
|
|
this.itemId = null
|
|
this.itemData = {}
|
|
this.itemData = {}
|
|
@@ -174,7 +218,11 @@ export default {
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
resetForm () {
|
|
resetForm () {
|
|
- this.searchData.name = ''
|
|
|
|
|
|
+ this.queryOrderDate = undefined
|
|
|
|
+ this.queryParam.name = ''
|
|
|
|
+ this.queryParam.beginDate = ''
|
|
|
|
+ this.queryParam.endDate = ''
|
|
|
|
+ this.queryParam.contactPhone = ''
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
// 更改启用禁用状态
|
|
// 更改启用禁用状态
|
|
@@ -185,39 +233,52 @@ export default {
|
|
id: record.id,
|
|
id: record.id,
|
|
flag: record.state == 1 ? '0' : '1'
|
|
flag: record.state == 1 ? '0' : '1'
|
|
}
|
|
}
|
|
- if (record.state == 1) {
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- centered: true,
|
|
|
|
- content: '确定禁用该供货商吗?',
|
|
|
|
- okText: '确定',
|
|
|
|
- cancelText: '取消',
|
|
|
|
- onOk () {
|
|
|
|
- changeSupplierStatus(_data).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- changeSupplierStatus(_data).then(res => {
|
|
|
|
|
|
+ changeSellerStatus(_data).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
|
|
+ _this.$message.success(res.message)
|
|
|
|
+ _this.$refs.table.refresh()
|
|
} else {
|
|
} else {
|
|
- record.state = !record.state
|
|
|
|
|
|
+ record.state = !record.state
|
|
}
|
|
}
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 查看小程序码
|
|
|
|
+ getQrCode (item) {
|
|
|
|
+ sellerQrCode({ officialPartnerNo: item.officialPartnerNo }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.qrCode = 'data:image/png;base64,' + res.data
|
|
|
|
+ this.isQrCodeModal = true
|
|
|
|
+ } else {
|
|
|
|
+ this.qrCode = ''
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 下载小程序码
|
|
|
|
+ downloadCode () {
|
|
|
|
+ const link = document.createElement('a')
|
|
|
|
+ link.href = this.qrCode
|
|
|
|
+ link.download = 'qrCode.png'
|
|
|
|
+ link.click()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
.addBtn {
|
|
.addBtn {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
}
|
|
}
|
|
|
|
+// 查看小程序码 弹框
|
|
|
|
+.qrCodeModal {
|
|
|
|
+ .qrCode {
|
|
|
|
+ display: block;
|
|
|
|
+ max-width: 100%;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ }
|
|
|
|
+ .downQrCode {
|
|
|
|
+ display: block;
|
|
|
|
+ margin: 40px auto 30px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|