jufubao-admin-library 1.1.161 → 1.1.163

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,7 +124,7 @@
124
124
  >{{item.label}}</el-radio>
125
125
  </el-radio-group>
126
126
  </el-form-item>
127
- <el-form-item prop="partner_product_tags" label="商品标签">
127
+ <el-form-item prop="partner_product_tags" label="平台标签">
128
128
  <el-checkbox-group
129
129
  v-model="setForm.partner_product_tags"
130
130
  >
@@ -110,6 +110,7 @@ export default {
110
110
  cookieKey: '',
111
111
  cityData:[],
112
112
  marketTagsList:[],
113
+ productTagsList:[],
113
114
  }
114
115
  },
115
116
  computed: {
@@ -167,6 +168,10 @@ export default {
167
168
  server: "product-public", fn: "product", path: "p1", params: { market_tag: 1 },
168
169
  })
169
170
  this.marketTagsList = tagsOptions.data.market_tag
171
+ let productTagsOptions = await getOptions({
172
+ server: "product-partner", fn: "product", path: "p3",params: { partner_product_tag: 1 },
173
+ })
174
+ this.productTagsList = productTagsOptions.data.partner_product_tag
170
175
  this.initSearchForm()
171
176
  },
172
177
  methods: {
@@ -223,6 +228,18 @@ export default {
223
228
  if (this.custom_category_id && this.$xdHelper.checkVarType(this.custom_category_id) === 'array') {
224
229
  filters['custom_category_id'] = this.custom_category_id[this.custom_category_id.length - 1]
225
230
  }
231
+ //平台标签
232
+ let copyPartnerProductTags = this.$xdHelper.cloneDeep(filters['partner_product_tags_obj'])
233
+ let obj = {
234
+ partner_product_tags:{
235
+ includes:[],
236
+ }
237
+ }
238
+ if(copyPartnerProductTags && copyPartnerProductTags.length>0){
239
+ delete filters['partner_product_tags_obj']
240
+ obj['partner_product_tags']['includes'] = copyPartnerProductTags
241
+ filters = Object.assign({},filters,obj)
242
+ }
226
243
  return { tab: this.channelActiveName, filters: filters }
227
244
  },
228
245
 
@@ -382,6 +399,15 @@ export default {
382
399
  multiple: true, //多选
383
400
  list: this.marketTagsList,
384
401
  },
402
+ this.channelParams&&this.channelParams.scene === 'selected'&&{
403
+ label: "平台标签:", //label
404
+ ele: "xd-select-list", //package 名称
405
+ valueKey: "partner_product_tags_obj", //form[valueKey]
406
+ value: [], //v-model
407
+ placeholder: "请选择",
408
+ multiple: true, //多选
409
+ list: this.productTagsList,
410
+ },
385
411
  this.pagesType === 'special'&&{
386
412
  label: "状态:", //label
387
413
  ele: "xd-select-list", //package 名称
@@ -67,7 +67,18 @@ const balanceRouter = {
67
67
  activeMenu: "/balance/list",
68
68
  roles: [tradeRecord.listOpenApi]
69
69
  }
70
- }
70
+ },
71
+ {
72
+ path: "detail_invoice/:id",
73
+ name: "PageInvoiceDetail",
74
+ component: () => import("@/viewsFinance/balance/detail_invoice"),
75
+ hidden: true,
76
+ meta: {
77
+ title: "供应商明细对账",
78
+ activeMenu: "/balance/list",
79
+ // roles: [tradeRecord.listSupplier]
80
+ }
81
+ },
71
82
  ]
72
83
  }
73
84
 
@@ -161,6 +161,107 @@ module.exports = {
161
161
  },
162
162
  disabled: true,
163
163
  },
164
+ {
165
+ title: "供货商发票管理-列表",
166
+ mapFn: "billListInvoiceStat",
167
+ path: '/finance-partner/v1/supplier-bill/list-invoice-stat',
168
+ isRule: false,
169
+ params: {
170
+ supplier_id: ["supplier_id", "Number", "选填"],
171
+ start_uninvoice_amount: ["待开票开始金额", "Number", "选填"],
172
+ end_uninvoice_amount: ["待开票结束金额", "Number", "选填"],
173
+ supplier_name: ["供货商名称", "string", "选填"],
174
+ page_size: ["每页条数", "number", "非必填"],
175
+ page_token: ["翻页标识", "string", "非必填"],
176
+ },
177
+ disabled: true,
178
+ role: "FINANCE-PARTNER.BILL_LIST_INVOICE_STAT"
179
+ },
180
+ {
181
+ title: "供货商发票管理-统计",
182
+ mapFn: "billCountInvoiceStat",
183
+ path: '/finance-partner/v1/supplier-bill/count-invoice-stat',
184
+ isRule: false,
185
+ params: {
186
+ supplier_id: ["supplier_id", "Number", "选填"],
187
+ start_uninvoice_amount: ["待开票开始金额", "Number", "选填"],
188
+ end_uninvoice_amount: ["待开票结束金额", "Number", "选填"],
189
+ supplier_name: ["供货商名称", "string", "选填"],
190
+ page_size: ["每页条数", "number", "非必填"],
191
+ page_token: ["翻页标识", "string", "非必填"],
192
+ },
193
+ disabled: true,
194
+ role: ""
195
+ },
196
+ {
197
+ title: "供货商发票管理-对账明细",
198
+ mapFn: "billListInvoiceStatRecord",
199
+ path: '/finance-partner/v1/supplier-bill/list-invoice-stat-record',
200
+ isRule: false,
201
+ params: {
202
+ supplier_id: ["supplier_id", "Number", "选填"],
203
+ start_time: ["start_time", "Number", "选填"],
204
+ end_time: ["end_time", "Number", "选填"],
205
+ invoice_number: ["发票号", "string", "选填"],
206
+ type: ["类型", "string", "选填"],
207
+ op_user_id: ["操作人", "string", "选填"],
208
+ page_size: ["每页条数", "number", "非必填"],
209
+ page_token: ["翻页标识", "string", "非必填"],
210
+ },
211
+ disabled: true,
212
+ role: "FINANCE-PARTNER.LIST_INVOICE_STAT_RECORD"
213
+ },
214
+ {
215
+ title: "供货商发票管理-对账明细统计",
216
+ mapFn: "billCountInvoiceStatRecord",
217
+ path: '/finance-partner/v1/supplier-bill/count-invoice-stat-record',
218
+ isRule: false,
219
+ params: {
220
+ supplier_id: ["supplier_id", "Number", "选填"],
221
+ start_time: ["start_time", "Number", "选填"],
222
+ end_time: ["end_time", "Number", "选填"],
223
+ invoice_number: ["发票号", "string", "选填"],
224
+ type: ["类型", "string", "选填"],
225
+ op_user_id: ["操作人", "string", "选填"],
226
+ page_size: ["每页条数", "number", "非必填"],
227
+ page_token: ["翻页标识", "string", "非必填"],
228
+ },
229
+ disabled: true,
230
+ role: ""
231
+ },
232
+ {
233
+ title: "供货商发票管理-对账明细导出",
234
+ mapFn: "billListInvoiceStatRecordExport",
235
+ isRule: false,
236
+ disabled: true,
237
+ role: "FINANCE-PARTNER.LIST_INVOICE_STAT_RECORD_EXPORT"
238
+ },
239
+ {
240
+ title: "供货商发票管理-发票金额矫正",
241
+ mapFn: "billCorrectInvoiceRecord",
242
+ path: '/finance-partner/v1/supplier-bill/correct-invoice-record',
243
+ isRule: false,
244
+ data: {
245
+ supplier_id: ["supplier_id", "Number", "必填"],
246
+ amount: ["金额", "Number", "必填"],
247
+ info_des: ["信息", "Number", "必填"],
248
+ },
249
+ disabled: true,
250
+ role: "FINANCE-PARTNER.CORRECT_INVOICE_RECORD"
251
+ },
252
+ {
253
+ mapFn: 'walletListSubPartnerLib',
254
+ isRule: false,
255
+ title: '下级加盟商列表',
256
+ path: '/finance-partner/v1/wallet/list-sub-partner',
257
+ params: {
258
+ partner_id: ['partner_id', 'String', '选填'],
259
+ partner_name: ['partner_name', 'String', '选填'],
260
+ page_size: ['每页', 'Number', '必填'],
261
+ page_token: ['页数', 'String', '必填'],
262
+ },
263
+ disabled: true,
264
+ },
164
265
  ],
165
266
 
166
267
  }
@@ -0,0 +1,222 @@
1
+ <template>
2
+ <div class="app-container">
3
+ <el-card class="app-container__search">
4
+ <xd-search
5
+ dateFilter
6
+ v-if="searchForm.length > 0"
7
+ v-model="searchParams"
8
+ :list="searchForm"
9
+ @onSearch="handleSearch"
10
+ @onDone="getList"
11
+ >
12
+ </xd-search>
13
+ </el-card>
14
+ <el-card class="app-container__list">
15
+ <div class="app-container__list-table">
16
+ <xd-table
17
+ :headers="headers"
18
+ :list="tables"
19
+ is-border
20
+ @onClick="handleTableClick"
21
+ ></xd-table>
22
+ </div>
23
+ <div class="app-container__list-pagination">
24
+ <xd-pagination
25
+ :page="page_token"
26
+ :total="total"
27
+ :limit.sync="page_size"
28
+ :autoScroll="false"
29
+ @onPagination="handlePagination"
30
+ ></xd-pagination>
31
+ </div>
32
+ </el-card>
33
+ </div>
34
+ </template>
35
+
36
+
37
+ <script>
38
+ import XdSearch from "@/components/XdSearch";
39
+ import XdPagination from "@/components/XdPagination.vue";
40
+ import XdTable from "@/components/XdTable";
41
+ import { mapActions } from "vuex"
42
+ import { getOptions } from "@/utils/options"
43
+ import { baseJsDateToTime } from "@/utils/xd.base.js"
44
+ import checkPermission from "@/utils/permission"
45
+ import roleTRecord from "@/constant/modules/tradeRecord.js"
46
+
47
+ export default {
48
+ name: "listInvoice",
49
+ components: {
50
+ XdPagination, //翻译插件
51
+ XdSearch, //搜查插件
52
+ XdTable
53
+ },
54
+ data() {
55
+ return {
56
+
57
+ //分页参数
58
+ page_token: 1, //当前页面数量
59
+ hasNextPage: true, //是否有下一页
60
+ page_size: 20, //搜索参数
61
+ searchForm: [], //搜索区域模块表单
62
+ searchParams: null, //搜索参数
63
+ totalData: {},
64
+ total: 0,
65
+ categoryList: [],
66
+
67
+ //列表对象
68
+ tables: [],
69
+ }
70
+ },
71
+ computed: {
72
+ isDetail(){
73
+ return checkPermission(roleTRecord.billListInvoiceStatRecord);
74
+ },
75
+ //列表头部配置项
76
+ headers(){
77
+ return [
78
+ { "type": "normal", "prop": "supplier_id", "align": "center", "label": "供货商ID" },
79
+ { "type": "normal", "prop": "supplier_name", "align": "center", "minWidth": 200, "label": "供货商名称" },
80
+ { "type": "price", "prop": "invoice_amount", "align": "center", "width": 100, "label": "已开票金额", "unit": "元"},
81
+ { "type": "price", "prop": "uninvoice_amount", "align": "center", "width": 100, "label": "待开票金额", "unit": "元"},
82
+ { "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
83
+ this.isDetail&&{
84
+ "type": "operate", "align": "center", "label": "操作",
85
+ "values": [
86
+ { "ui": "text-button", "name": "对账", "type": "text", "event": "detail" },
87
+ ]
88
+ }
89
+ ].filter(item => item);
90
+ }
91
+ },
92
+ created() {
93
+ this.initSearchForm();
94
+ },
95
+ methods: {
96
+ ...mapActions("tradeRecord", ["billListInvoiceStat","billCountInvoiceStat",]),
97
+ //相除
98
+ divide(price) {
99
+ return this.$xdHelper.divisionFloatNumber(price, 100);
100
+ },
101
+ /**
102
+ * @description 获取数据列表
103
+ */
104
+ getList() {
105
+ let copySearchParams = this.$xdHelper.cloneDeep(this.searchParams)
106
+ if(this.searchParams.start_uninvoice_amount){
107
+ copySearchParams.start_uninvoice_amount = this.searchParams.start_uninvoice_amount*100;
108
+ }
109
+ if(this.searchParams.end_uninvoice_amount){
110
+ copySearchParams.end_uninvoice_amount = this.searchParams.end_uninvoice_amount*100;
111
+ }
112
+ //请求数据
113
+ let params = {
114
+ ...copySearchParams,
115
+ page_token: this.page_token,
116
+ page_size: this.page_size
117
+ };
118
+ console.log(params)
119
+ let loading = this.$loading({});
120
+ this.billListInvoiceStat(params).then(res => {
121
+ loading.close();
122
+ this.tables = res.data.list.map(item => {
123
+ item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
124
+ return item;
125
+ });
126
+ this.getCount();
127
+ }).catch(err => {
128
+ loading.close();
129
+ })
130
+ },
131
+ getCount(){
132
+ let params = {
133
+ ...this.searchParams,
134
+ page_token: this.page_token,
135
+ page_size: this.page_size
136
+ };
137
+ this.billCountInvoiceStat(params).then(res => {
138
+ this.total = res.data.total_size;
139
+ }).catch(err => {
140
+
141
+ })
142
+ },
143
+
144
+ /**
145
+ * @description 点击搜索进行搜索操作
146
+ * @param action 动作
147
+ * @param form 搜索请求参数
148
+ */
149
+ handleSearch({ action, form }) {
150
+ this.page_token = 1;
151
+ this.getList();
152
+ },
153
+ handleTableClick({value, row}){
154
+ if(value.event === "detail"){
155
+ this.$router.push({
156
+ path: "/balance/detail_invoice/" + row.supplier_id,
157
+ query: {
158
+ supplier_id: row.supplier_id,
159
+ supplier_name: row.supplier_name,
160
+ }
161
+ })
162
+ }
163
+ },
164
+ /**
165
+ * @description 初始化搜索模块
166
+ */
167
+ initSearchForm() {
168
+ getOptions({
169
+ server: 'finance-partner',
170
+ fn: 'wallet',
171
+ path: 'p1',
172
+ params: {
173
+ type: 'supplier'
174
+ }
175
+ }).then(res=>{
176
+ let {list_settlement_method} = res.data
177
+ list_settlement_method.unshift({
178
+ label: "全部",
179
+ value: ""
180
+ })
181
+ this.searchForm = [
182
+ {
183
+ label: "供货商名称",
184
+ ele: "el-input",
185
+ valueKey: "supplier_name",
186
+ value: "",
187
+ placeholder: "请输入供货商名称"
188
+ },
189
+ {
190
+ label: "供货商ID",
191
+ ele: "el-input",
192
+ valueKey: "supplier_id",
193
+ value: "",
194
+ placeholder: "请输入供货商ID"
195
+ },
196
+ {
197
+ label: '待开票金额', //label
198
+ ele: 'xd-range', //package 名称
199
+ valueKey: ['start_uninvoice_amount', 'end_uninvoice_amount'], //form[valueKey]
200
+ value: ['', ''], //v-model
201
+ placeholder: ['开始金额', '结束金额'],
202
+ width: 400
203
+ },
204
+ ];
205
+ })
206
+ },
207
+ /**
208
+ * @description 翻页处理方法
209
+ * @param page {Number} 访问页面页码数
210
+ */
211
+ handlePagination(page) {
212
+ this.page_token = page;
213
+ this.getList();
214
+ }, //todo
215
+ }
216
+ }
217
+ </script>
218
+
219
+ <style scoped lang="scss">
220
+
221
+ </style>
222
+
@@ -74,6 +74,8 @@ export default {
74
74
  { "type": "normal", "prop": "partner_name", "align": "center", "minWidth": 200, "label": "加盟商名称" },
75
75
  { "type": "normal", "prop": "wallet_type_name", "align": "center", "minWidth": 200, "label": "账户类型" },
76
76
  { "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "账户余额", "unit": "元"},
77
+ { "type": "price", "prop": "today_pure_amount", "align": "center", "minWidth": 100, "label": "今日消费", "unit": "元"},
78
+ { "type": "price", "prop": "yesterday_pure_amount", "align": "center", "minWidth": 100, "label": "昨日消费", "unit": "元"},
77
79
  { "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
78
80
  checkPermission([roleTRecord.listPartner]) && {
79
81
  "type": "operate", "align": "center", "label": "操作",
@@ -119,7 +121,7 @@ export default {
119
121
  let params = {
120
122
  ...this.searchParams,
121
123
  page_token: this.page_token,
122
- page_size: this.page_size
124
+ page_size: this.page_size,
123
125
  };
124
126
  console.log(params)
125
127
  let loading = this.$loading({});
@@ -127,6 +129,8 @@ export default {
127
129
  loading.close();
128
130
  this.tables = res.data.list.map(item => {
129
131
  item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
132
+ item.today_pure_amount = item['trade_stat']['today_pure_amount']
133
+ item.yesterday_pure_amount = item['trade_stat']['yesterday_pure_amount']
130
134
  return item;
131
135
  });
132
136
  this.total = res.data.total_size;
@@ -0,0 +1,470 @@
1
+ <template>
2
+ <div class="app-container">
3
+ <el-card class="app-container__search">
4
+ <div slot="header" class="flex list_header">
5
+ <div>供应商发票对账明细</div>
6
+ </div>
7
+ <xd-search
8
+ dateFilter
9
+ timeType
10
+ v-if="searchForm.length > 0"
11
+ v-model="searchParams"
12
+ :list="searchForm"
13
+ @onSearch="handleSearch"
14
+ @onDone="getList"
15
+ >
16
+ </xd-search>
17
+ </el-card>
18
+ <el-card class="app-container__list">
19
+ <div class="app-container__list-pagination">
20
+ <div></div>
21
+ <div class="table-stat">
22
+ <p v-if="countData">
23
+ 总充值:<span class="_mo">{{divide(countData.total_recharge_amount)}}元</span>
24
+ 提现总额:<span class="_mo">{{divide(countData.total_withdraw_amount)}}元</span>
25
+ 矫正金额:<span class="_mo">{{divide(countData.total_correct_amount)}}元</span>
26
+ 已开票金额:<span class="_mo">{{divide(countData.total_invoiced_amount)}}元</span>
27
+ 发票矫正金额:<span class="_mo">{{divide(countData.total_invoice_correct_amount)}}元</span>
28
+ 待开票金额:<span class="_mo p_red">{{divide(countData.total_invoiced_amount)}}元</span>
29
+ </p>
30
+ <div style="display: flex;">
31
+ <el-button type="primary" v-if="isEdit" @click="handleCorrect">发票金额矫正</el-button>
32
+ <el-button type="primary" v-if="isExport" @click="doExport">导出</el-button>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <div class="app-container__list-table">
37
+ <xd-table
38
+ :headers="headers"
39
+ :list="tables"
40
+ is-border
41
+ >
42
+ <template slot="amount" slot-scope="scope">
43
+ <div><span :style="{color:scope.row.amount>=0?'red':'green'}">{{ $xdHelper.divisionFloatNumber(scope.row.amount, 100).toFixed(2) }}</span>元</div>
44
+ </template>
45
+ </xd-table>
46
+ </div>
47
+ <div class="app-container__list-pagination">
48
+ <xd-pagination
49
+ :page="page_token"
50
+ :total="total"
51
+ :limit.sync="page_size"
52
+ :autoScroll="false"
53
+ @onPagination="handlePagination"
54
+ ></xd-pagination>
55
+ </div>
56
+ </el-card>
57
+ <xd-dialog :show.sync="dialogShow" width="50%" title="发票金额矫正">
58
+ <xd-base-dynamic-field
59
+ ref="form"
60
+ :list="formList"
61
+ size="medium"
62
+ :key="formKey"
63
+ v-model="formParams"
64
+ :picker-options="{}"
65
+ :time-type="true"
66
+ label-width="120px"
67
+ >
68
+ </xd-base-dynamic-field>
69
+ <div slot="btn">
70
+ <el-button @click="handleCorrectCancel">取消</el-button>
71
+ <el-button type="primary" @click="handleCorrectSure">确定矫正</el-button>
72
+ </div>
73
+ </xd-dialog>
74
+ <xd-dialog @onConfirm="handleExport" :show.sync="showExport" width="350px" title="导出文件名称">
75
+ <el-input maxlength="20" v-model="exportName" placeholder=""></el-input>
76
+ </xd-dialog>
77
+ </div>
78
+ </template>
79
+
80
+
81
+ <script>
82
+ import XdSearch from "@/components/XdSearch";
83
+ import XdPagination from "@/components/XdPagination.vue";
84
+ import XdTable from "@/components/XdTable";
85
+ import { mapActions } from "vuex"
86
+ import { getOptions } from "@/utils/options"
87
+ import XdDialog from "@/components/XdDialog"
88
+ import { baseJsDateToTime } from "@/utils/xd.base.js"
89
+ import checkPermission from "@/utils/permission"
90
+ import roleTRecord from "@/constant/modules/tradeRecord.js"
91
+ import roleWallet from "@/constant/modules/wallet.js"
92
+ import XdBaseDynamicField from "@/components/XdBaseDynamicField"
93
+ import { Loading } from 'element-ui'
94
+
95
+ export default {
96
+ name: "PageInvoiceDetail",
97
+ components: {
98
+ XdPagination, //翻译插件
99
+ XdSearch, //搜查插件
100
+ XdTable,
101
+ XdDialog,
102
+ XdBaseDynamicField,
103
+ },
104
+ data() {
105
+ return {
106
+ roleWallet,
107
+
108
+ //分页参数
109
+ page_token: 1, //当前页面数量
110
+ hasNextPage: true, //是否有下一页
111
+ page_size: 20, //搜索参数
112
+ searchForm: [], //搜索区域模块表单
113
+ searchParams: null, //搜索参数
114
+ totalData: {},
115
+ total: 0,
116
+ categoryList: [],
117
+ dialogShow: false,
118
+ correctForm: {},
119
+
120
+ //列表对象
121
+ tables: [],
122
+ headers: [
123
+ { "type": "normal", "prop": "record_id", "align": "center","label": "记录ID" },
124
+ { "type": "normal", "prop": "type_name", "align": "center", "label": "记录类型" },
125
+ { "type": "price", "prop": "amount", "align": "center", "label": "总金额" },
126
+ { "type": "normal", "prop": "info_des", "align": "center","label": "信息" },
127
+ { "type": "normal", "prop": "op_user_name", "align": "center", "label": "操作人" },
128
+ { "type": "normal", "prop": "created_time", "align": "center", "label": "操作时间" },
129
+ ],
130
+ showExport: false,
131
+ exportName: '供货商明细对账',
132
+ formParams:null,
133
+ formList:[],
134
+ formKey:'formKey',
135
+ countData:null,
136
+ listTypeData:[],
137
+ }
138
+ },
139
+ computed: {
140
+ supplier_id(){
141
+ return this.$route.params.id;
142
+ },
143
+ supplier_name(){
144
+ return this.$route.query.supplier_name;
145
+ },
146
+ isEdit(){
147
+ return checkPermission(roleTRecord.billCorrectInvoiceRecord);
148
+ },
149
+ isExport(){
150
+ return checkPermission(roleTRecord.billListInvoiceStatRecordExport);
151
+ }
152
+ },
153
+ created() {
154
+ getOptions({
155
+ server: 'finance-partner',
156
+ fn: 'supplier-bill/invoice',
157
+ path: 'p1',
158
+ }).then(res=>{
159
+ this.listTypeData = res.data.list_type
160
+ this.initSearchForm();
161
+ })
162
+
163
+ },
164
+ methods: {
165
+ ...mapActions("tradeRecord", ["billListInvoiceStatRecord","billCountInvoiceStatRecord","billCorrectInvoiceRecord"]),
166
+ handleCorrectSure(){
167
+ this.$refs.form.submit().then(res=>{
168
+ let copyFormParams = this.$xdHelper.cloneDeep(this.formParams);
169
+ copyFormParams.amount = copyFormParams.amount*100;
170
+ let loading = Loading.service({})
171
+ this.billCorrectInvoiceRecord({...copyFormParams,supplier_id:this.supplier_id})
172
+ .then(res=>{
173
+ this.dialogShow = false;
174
+ this.formParams = null;
175
+ this.$message.success('操作成功');
176
+ this.getList();
177
+ loading.close();
178
+ })
179
+ }).catch(err=>{
180
+ loading.close();
181
+ });
182
+ },
183
+ handleCorrectCancel(){
184
+ this.formParams = null;
185
+ this.dialogShow = false;
186
+ },
187
+ //相除
188
+ divide(price) {
189
+ return this.$xdHelper.divisionFloatNumber(price, 100);
190
+ },
191
+ getParams(){
192
+ let copySearchParams = this.$xdHelper.cloneDeep(this.searchParams);
193
+ if(this.searchParams.op_user_id){
194
+ copySearchParams.op_user_id = copySearchParams.op_user_id[0]['value']
195
+ }
196
+ return {
197
+ ...copySearchParams,
198
+ wallet_type: this.wallet_type,
199
+ supplier_id: this.supplier_id,
200
+ }
201
+ },
202
+ doExport(){
203
+ this.exportName= '供货商明细对账'
204
+ this.showExport=true;
205
+ },
206
+ handleExport(){
207
+ if(!this.exportName) {
208
+ this.$message.error('请输入导出名称');
209
+ return
210
+ }
211
+ const other = this.getParams();
212
+ let params = {
213
+ ...other,
214
+ export: true,
215
+ file_ext: "xlsx",
216
+ file_name: this.exportName,
217
+ export_data_tag: "ExportSupplierInvoiceStatRecordList"
218
+ };
219
+ let loading = this.$loading({});
220
+ this.billListInvoiceStatRecord(params).then(res => {
221
+ loading.close();
222
+ this.showExport=false
223
+ this.$alert('导出任务已经开始执行,请去任务管理查看下载状态', '提示', {
224
+ confirmButtonText: '确定',
225
+ });
226
+ }).catch(err => {
227
+ this.$message.error(err.msg);
228
+ loading.close();
229
+ })
230
+ },
231
+ /**
232
+ * @description 获取数据列表
233
+ */
234
+ getList() {
235
+ //请求数据
236
+ const other = this.getParams();
237
+ let params = {
238
+ ...other,
239
+ page_token: this.page_token,
240
+ page_size: this.page_size
241
+ };
242
+ console.log(params)
243
+ let loading = this.$loading({});
244
+ this.billListInvoiceStatRecord(params).then(res => {
245
+ loading.close();
246
+ this.tables = res.data.list.map(item => {
247
+ item['created_time'] = item['created_time'] ? baseJsDateToTime(item['created_time']) :'-'
248
+ return item;
249
+ });
250
+ // this.total = res.data.total_size;
251
+ this.getCount();
252
+ })
253
+ .catch(err => {
254
+ loading.close();
255
+ })
256
+ },
257
+ getCount(){
258
+ const other = this.getParams();
259
+ let params = {
260
+ ...other,
261
+ page_token: this.page_token,
262
+ page_size: this.page_size
263
+ };
264
+ console.log(params)
265
+ this.billCountInvoiceStatRecord(params).then(res => {
266
+ this.countData = res.data;
267
+ this.total = res.data.total_size;
268
+ })
269
+ .catch(err => {
270
+ })
271
+ },
272
+
273
+ /**
274
+ * @description 点击搜索进行搜索操作
275
+ * @param action 动作
276
+ * @param form 搜索请求参数
277
+ */
278
+ handleSearch({ action, form }) {
279
+ this.page_token = 1;
280
+ this.getList();
281
+ },
282
+ /**
283
+ * @description 初始化搜索模块
284
+ */
285
+ initSearchForm() {
286
+ this.searchForm = [
287
+ {
288
+ label: "供应商",
289
+ ele: "xd-select-list",
290
+ valueKey: "supplier_id",
291
+ value: this.supplier_id,
292
+ placeholder: "请输入供应商",
293
+ disabled: true,
294
+ list: [
295
+ { label: this.supplier_name, value: this.supplier_id },
296
+ ]
297
+ },
298
+ // {
299
+ // label: "账户类型",
300
+ // ele: "xd-select-list",
301
+ // valueKey: "wallet_type",
302
+ // value: this.wallet_type,
303
+ // placeholder: "请输入渠道ID",
304
+ // disabled: true,
305
+ // list: [
306
+ // { label: "供货商账户", value: "PP" },
307
+ // ]
308
+ // },
309
+ {
310
+ label: "记录类型",
311
+ ele: "xd-select-list",
312
+ valueKey: "type",
313
+ value: "",
314
+ placeholder: "请输入记录类型",
315
+ list: this.listTypeData
316
+ },
317
+ {
318
+ label: "发票号",
319
+ ele: "el-input",
320
+ valueKey: "invoice_number",
321
+ value: "",
322
+ placeholder: "请输入发票号"
323
+ },
324
+ {
325
+ label: '操作人',
326
+ ele: 'xd-remote-select',
327
+ valueKey: 'op_user_id',
328
+ value: [],
329
+ className: 'input40',
330
+ placeholder: `请选择操作人`,
331
+ multiple: false,
332
+ collapseTags: false,
333
+ remoteSearch: (query, resolve) => {
334
+ getOptions({
335
+ server: 'idaas-partner',
336
+ fn: 'users',
337
+ path: 'p1',
338
+ params: {
339
+ page_token: '1',
340
+ page_size: '500',
341
+ keyword: query
342
+ }
343
+ })
344
+ .then(res => {
345
+ resolve(res.data.list)
346
+ })
347
+ .catch()
348
+ },
349
+ },
350
+ {
351
+ label: '时间', //label
352
+ ele: 'xd-date', //package 名称
353
+ valueKey: ['start_time', 'end_time'], //form[valueKey]
354
+ value: [], //v-model
355
+ format: 'yyyy-MM-dd HH:mm:ss', //时间显示格式
356
+ formatValue: 'timestamp', //输出时间格式
357
+ placeholder: ['开始时间', '结束时间'],
358
+ },
359
+ ];
360
+ },
361
+ /**
362
+ * @description 翻页处理方法
363
+ * @param page {Number} 访问页面页码数
364
+ */
365
+ handlePagination(page) {
366
+ this.page_token = page;
367
+ this.getList();
368
+ }, //todo
369
+
370
+ handleCorrect(){
371
+ this.initForm({})
372
+ },
373
+ initForm (params = {}) {
374
+ let formList = [
375
+ {
376
+ label:'供应商名称:',
377
+ ele:'el-html',
378
+ value:this.supplier_name,
379
+ },
380
+ {
381
+ label: '发票矫正金额:', //label
382
+ ele: 'el-input', //package 名称
383
+ valueKey: 'amount', //form[valueKey]
384
+ type:'number',
385
+ value: params.amount || '', //v-model
386
+ placeholder: '输入发票矫正金额',
387
+ rules: [
388
+ { required: true, message: `请输入发票矫正金额`, trigger: 'change' },
389
+ ]
390
+ },
391
+ {
392
+ label: '备注:', //label
393
+ ele: 'el-input', //package 名称
394
+ valueKey: 'info_des', //form[valueKey]
395
+ value: params.info_des || '', //v-model
396
+ placeholder: '输入备注',
397
+ },
398
+
399
+ ]
400
+ this.formList = formList.filter(i => i)
401
+ this.formKey = Date.now()
402
+ this.dialogShow = true;
403
+ },
404
+ }
405
+ }
406
+ </script>
407
+
408
+ <style scoped lang="scss">
409
+ .list_header{
410
+ .total_wrap{
411
+ font-size: 13px;
412
+ margin-left: 30px;
413
+ }
414
+ .amount_wrap{
415
+ margin-right: 20px;
416
+ .amount_label{
417
+ font-size: 14px;
418
+ font-weight: 500;
419
+ }
420
+ }
421
+ }
422
+ .table-stat{
423
+ display: flex;
424
+ justify-content: space-between;
425
+ align-items: center;
426
+ p{
427
+ margin: 0;
428
+ font-weight: 500;
429
+ font-size: 14px;
430
+ ._mo{
431
+ font-weight: 400;
432
+ margin-right: 20px;
433
+ font-size: 12px;
434
+ }
435
+ }
436
+ }
437
+ .flex{
438
+ display: flex;
439
+ align-items: center;
440
+ }
441
+ .table-product{
442
+ display: flex;
443
+ align-items: center;
444
+ .table-product__img{
445
+ width: 50px;
446
+ height: 50px;
447
+ img{
448
+ width: 100%;
449
+ height: 100%;
450
+ }
451
+ }
452
+ .table-product__id,
453
+ .table-product__name{
454
+ width: 120px;
455
+ p{
456
+ width: 100%;
457
+ overflow: hidden;
458
+ text-overflow: ellipsis;
459
+ white-space: nowrap;
460
+ }
461
+ }
462
+ }
463
+ ::v-deep .xd-base-field .xd-html {
464
+ margin-bottom: 22px!important;
465
+ }
466
+ .p_red{
467
+ color: red;
468
+ }
469
+ </style>
470
+
@@ -27,7 +27,7 @@
27
27
  >
28
28
  <template slot="time" slot-scope="scope">
29
29
  <div>
30
- <el-select v-model="channel_code" filterable clearable placeholder="请输入加盟商名称">
30
+ <el-select v-model="channel_code" filterable clearable placeholder="请选择供货商">
31
31
  <el-option
32
32
  v-for="item in channelList"
33
33
  :key="item.value"
@@ -97,6 +97,7 @@
97
97
  v-for="(prod, i) in scope.row.product_list"
98
98
  :key="i"
99
99
  >
100
+ <template v-if="scope.row.is_card_open==='N'">
100
101
  <div v-if="scope.row.scene==='online'" class="table-product__img">
101
102
  <img :src="prod.product_thumb" alt="" />
102
103
  </div>
@@ -150,6 +151,34 @@
150
151
  }}
151
152
  </p>
152
153
  </div>
154
+ </template>
155
+ <template v-else>
156
+ <el-tooltip placement="top">
157
+ <div slot="content">
158
+ <div class="table-product__name">
159
+ <p>{{ prod.product_name}}</p>
160
+ </div>
161
+ </div>
162
+ <div class="table-product__name" style="margin-right: 5px;">
163
+ <p>{{ prod.product_name}}</p>
164
+ </div>
165
+ </el-tooltip>
166
+ <div class="table-product__id" style="margin-right: 5px;">
167
+ <p style="white-space: pre-wrap;">{{ prod.product_id }}</p>
168
+ </div>
169
+ <div style="display: flex;">
170
+ <p style="margin-right: 5px;">
171
+ {{
172
+ `面额(${divide(prod.dist_price)}${prod.product_sku_name}/张)`
173
+ }}
174
+ </p>
175
+ <p>
176
+ {{
177
+ `数量(${prod.product_num}张)`
178
+ }}
179
+ </p>
180
+ </div>
181
+ </template>
153
182
  </div>
154
183
  </template>
155
184
  <template slot="amount" slot-scope="scope">
@@ -295,7 +324,7 @@ export default {
295
324
  prop: "products",
296
325
  align: "center",
297
326
  minWidth: 500,
298
- label: "商品图片/名称/ID/公式",
327
+ label: "商品信息",
299
328
  },
300
329
  // { "type": "normal", "prop": "category_name", "align": "center", "minWidth": 200, "label": "公式" },
301
330
  {
@@ -349,6 +378,13 @@ export default {
349
378
  minWidth: 200,
350
379
  label: "发票名称",
351
380
  },
381
+ {
382
+ type: "normal",
383
+ prop: "rebate_from_partner_name",
384
+ align: "center",
385
+ minWidth: 200,
386
+ label: "来源",
387
+ },
352
388
  {
353
389
  type: "normal",
354
390
  prop: "comment",
@@ -404,7 +440,8 @@ export default {
404
440
  "listPartner",
405
441
  "countPartner",
406
442
  "getSupplierList",
407
- 'getByCardFeeInfo'
443
+ 'getByCardFeeInfo',
444
+ 'walletListSubPartnerLib'
408
445
  ]),
409
446
  ...mapActions("wallet", ["correctPartnerAmount"]),
410
447
 
@@ -504,6 +541,9 @@ export default {
504
541
  channel_codes = []
505
542
  channel_codes.push(this.channel_code)
506
543
  }
544
+ if(other.rebate_from_partner_list&&other.rebate_from_partner_list.length){
545
+ other.rebate_from_partner_id = other.rebate_from_partner_list[0]['value']
546
+ }
507
547
  return {
508
548
  ...other,
509
549
  supplier_ids,
@@ -662,6 +702,30 @@ export default {
662
702
  placeholder: "请选择",
663
703
  list: res[1].data.list_trade_type
664
704
  },
705
+ {
706
+ label: '来源:',
707
+ ele: 'xd-remote-select',
708
+ valueKey: 'rebate_from_partner_list',
709
+ value: [],
710
+ className: 'input40',
711
+ placeholder: `请选择来源`,
712
+ multiple: false,
713
+ collapseTags: false,
714
+ remoteSearch: (query, resolve) => {
715
+ let params = {
716
+ page_token: 1,
717
+ page_size:20,
718
+ partner_name:query,
719
+ };
720
+ this.walletListSubPartnerLib(params).then(res=>{
721
+ res.data.list.map(item=>{
722
+ item.value = item.partner_id;
723
+ item.label = item.partner_name;
724
+ })
725
+ resolve(res.data.list);
726
+ })
727
+ },
728
+ },
665
729
  {
666
730
  label: "订单类型",
667
731
  ele: "xd-select-list",
@@ -14,6 +14,9 @@
14
14
  <el-tab-pane v-if="has_openapi_wallet" label="open API余额" name="openapi">
15
15
  <listOpenapi v-if="activeName==='openapi'"></listOpenapi>
16
16
  </el-tab-pane>
17
+ <el-tab-pane v-if="has_supplier_invoice" label="供应商发票管理" name="invoice">
18
+ <listInvoice v-if="activeName==='invoice'"></listInvoice>
19
+ </el-tab-pane>
17
20
  </el-tabs>
18
21
  </el-card>
19
22
 
@@ -26,6 +29,7 @@ import listPartner from "./components/listPartner.vue"
26
29
  import listChannel from "./components/listChannel.vue"
27
30
  import listSupplier from "./components/listSupplier.vue"
28
31
  import listOpenapi from './components/listOpenapi.vue'
32
+ import listInvoice from './components/listInvoice.vue'
29
33
  import checkPermission from "@/utils/permission"
30
34
  import roleTRecord from "@/constant/modules/tradeRecord.js"
31
35
  import roleWallet from "@/constant/modules/wallet.js"
@@ -36,7 +40,8 @@ export default {
36
40
  listChannel,
37
41
  listPartner,
38
42
  listSupplier,
39
- listOpenapi
43
+ listOpenapi,
44
+ listInvoice,
40
45
  },
41
46
 
42
47
  data () {
@@ -58,10 +63,13 @@ export default {
58
63
  },
59
64
  has_openapi_wallet() {
60
65
  return checkPermission([roleWallet.listOpenApiWallet])
61
- }
66
+ },
67
+ has_supplier_invoice(){
68
+ return checkPermission([roleTRecord.billListInvoiceStat])
69
+ },
62
70
  },
63
71
  created () {
64
- this.activeName = this.has_partner_wallet ? "partner" : this.has_channel_wallet ? "channel" : this.has_openapi_wallet?'openapi': "supplier"
72
+ this.activeName = this.has_partner_wallet ? "partner" : this.has_channel_wallet ? "channel" :this.has_supplier_wallet?'supplier':this.has_openapi_wallet?'openapi': "invoice"
65
73
  },
66
74
  methods: {
67
75
 
@@ -201,8 +201,10 @@ export default {
201
201
  headers(){
202
202
  return [
203
203
  { "type": "normal", "prop": "partner_id", "align": "center", "label": "ID" },
204
- { "type": "normal", "prop": "wallet_type_name", "align": "center", "minWidth": 200, "label": "账户类型" },
205
- { "type": "price", "prop": "amount", "align": "center", "width": 100, "label": "账户余额", "unit": "元"},
204
+ { "type": "normal", "prop": "wallet_type_name", "align": "center", "minWidth": 100, "label": "账户类型" },
205
+ { "type": "price", "prop": "amount", "align": "center", "minWidth": 100, "label": "账户余额", "unit": "元"},
206
+ { "type": "price", "prop": "today_pure_amount", "align": "center", "minWidth": 100, "label": "今日消费", "unit": "元"},
207
+ { "type": "price", "prop": "yesterday_pure_amount", "align": "center", "minWidth": 100, "label": "昨日消费", "unit": "元"},
206
208
  { "type": "normal", "prop": "updated_time", "align": "center", "minWidth": 200, "label": "更新时间" },
207
209
  checkPermission([roleTRecord.listPartner]) && {
208
210
  "type": "operate", "align": "center", "label": "操作",
@@ -239,7 +241,7 @@ export default {
239
241
  let params = {
240
242
  ...this.searchParams,
241
243
  page_token: this.page_token,
242
- page_size: this.page_size
244
+ page_size: this.page_size,
243
245
  };
244
246
  console.log(params)
245
247
  let loading = this.$loading({});
@@ -247,6 +249,8 @@ export default {
247
249
  loading.close();
248
250
  this.tables = res.data.list.map(item => {
249
251
  item['updated_time'] = item['updated_time'] ? baseJsDateToTime(item['updated_time']) : "";
252
+ item.today_pure_amount = item['trade_stat']['today_pure_amount']
253
+ item.yesterday_pure_amount = item['trade_stat']['yesterday_pure_amount']
250
254
  return item;
251
255
  });
252
256
  this.total = res.data.total_size;
@@ -630,9 +630,12 @@
630
630
  return new Promise((resolve, reject) => {
631
631
  this.isImageInfo(file)
632
632
  .then((res) => {
633
+
634
+ let size = this.size
635
+ if(file.type === 'image/gif') size = 2 * size //gif放到到2倍
633
636
  //判断文件大小
634
- if (isLt2M > this.size) {
635
- this.message(`上传文件大小: ${this.size} MB, 当前上传文件: ${isLt2M.toFixed(2)}MB.`);
637
+ if (isLt2M > size) {
638
+ this.message(`上传文件大小: ${size} MB, 当前上传文件: ${isLt2M.toFixed(2)}MB.`);
636
639
  reject();
637
640
  return;
638
641
  }
@@ -26,7 +26,7 @@
26
26
  :is-material="false"
27
27
  action="action"
28
28
  :size="5"
29
- :type="['jpg', 'jpeg', 'png']"
29
+ :type="['jpg', 'jpeg', 'png','gif']"
30
30
  tipsformet="上传文件格式:@imageType@,不超过@size@MB."
31
31
  styleType="list"
32
32
  uploadName="替换"
@@ -3,12 +3,12 @@
3
3
  <div class="form-wrap">
4
4
  <div class="form-input">
5
5
  <div>
6
- <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG,不超过5MB)</span></div>
6
+ <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
7
7
  <cus-upload
8
8
  v-model="form.file_info"
9
9
  action="action"
10
10
  :size="5"
11
- :type="['jpg', 'jpeg', 'png']"
11
+ :type="['jpg', 'jpeg', 'png','gif']"
12
12
  tipsformet="上传文件格式:@imageType@,不超过@size@MB."
13
13
  styleType="list"
14
14
  uploadType="aliyun"
@@ -226,4 +226,4 @@ export default {
226
226
  color: #409eff;
227
227
  background: #ecf5ff;
228
228
  }
229
- </style>
229
+ </style>
@@ -136,13 +136,13 @@
136
136
  width="width"
137
137
  >
138
138
  <div>
139
- <div style="margin-bottom: 10px">添加素材:<span style="color: #999999; font-size: 12px">(上传文件格式:JPG/PNG/JPEG,不超过5MB)</span></div>
139
+ <div style="margin-bottom: 10px">添加素材:<span style="color: #999999; font-size: 12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
140
140
  <cus-upload
141
141
  v-model="file_info"
142
142
  :isMaterial="false"
143
143
  action="action"
144
144
  :size="5"
145
- :type="['jpg', 'jpeg', 'png']"
145
+ :type="['jpg', 'jpeg', 'png','gif']"
146
146
  tipsformet="上传文件格式:@imageType@,不超过@size@MB."
147
147
  styleType="list"
148
148
  uploadType="aliyun"
@@ -147,14 +147,14 @@
147
147
  width="width"
148
148
  >
149
149
  <div>
150
- <div style="margin-bottom: 10px">添加素材:<span style="color: #999999; font-size: 12px">(上传文件格式:JPG/PNG/JPEG,不超过5MB)</span>
150
+ <div style="margin-bottom: 10px">添加素材:<span style="color: #999999; font-size: 12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span>
151
151
  </div>
152
152
  <cus-upload
153
153
  v-model="file_info"
154
154
  :isMaterial="false"
155
155
  action="action"
156
156
  :size="5"
157
- :type="['jpg', 'jpeg', 'png']"
157
+ :type="['jpg', 'jpeg', 'png', 'gif']"
158
158
  tipsformet="上传文件格式:@imageType@,不超过@size@MB."
159
159
  styleType="list"
160
160
  uploadType="aliyun"
@@ -564,6 +564,9 @@ export default {
564
564
  trigger: ["blur", "change"],
565
565
  },
566
566
  ];
567
+ }else {
568
+ let key = item.valueKey;
569
+ item.value = params[key] || '';
567
570
  }
568
571
  });
569
572
  // #endif
@@ -1367,7 +1367,7 @@ export default {
1367
1367
  trigger: ["blur", "change"],
1368
1368
  },
1369
1369
  ];
1370
- }else if(item.ele === "el-input"){
1370
+ }else{
1371
1371
  let key = item.valueKey;
1372
1372
  item.value = params[key] || '';
1373
1373
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.161",
3
+ "version": "1.1.163",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {