@yoooloo42/joker 1.0.294 → 1.0.296

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.
package/dist/index.esm.js CHANGED
@@ -16868,7 +16868,7 @@ var lookup = [];
16868
16868
  var revLookup = [];
16869
16869
  var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
16870
16870
  var inited = false;
16871
- function init$2 () {
16871
+ function init$3 () {
16872
16872
  inited = true;
16873
16873
  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
16874
16874
  for (var i = 0, len = code.length; i < len; ++i) {
@@ -16882,7 +16882,7 @@ function init$2 () {
16882
16882
 
16883
16883
  function toByteArray (b64) {
16884
16884
  if (!inited) {
16885
- init$2();
16885
+ init$3();
16886
16886
  }
16887
16887
  var i, j, l, tmp, placeHolders, arr;
16888
16888
  var len = b64.length;
@@ -16941,7 +16941,7 @@ function encodeChunk (uint8, start, end) {
16941
16941
 
16942
16942
  function fromByteArray (uint8) {
16943
16943
  if (!inited) {
16944
- init$2();
16944
+ init$3();
16945
16945
  }
16946
16946
  var tmp;
16947
16947
  var len = uint8.length;
@@ -22924,7 +22924,7 @@ const getPgData = async _ref5 => {
22924
22924
  };
22925
22925
 
22926
22926
  // 初始化
22927
- const init$1 = async _ref6 => {
22927
+ const init$2 = async _ref6 => {
22928
22928
  let {
22929
22929
  scopeThis
22930
22930
  } = _ref6;
@@ -23132,7 +23132,7 @@ var withTable = {
23132
23132
  pageSizeChange,
23133
23133
  currentPageChange,
23134
23134
  getPgData,
23135
- init: init$1,
23135
+ init: init$2,
23136
23136
  popupFind,
23137
23137
  popupInsertOne,
23138
23138
  popupUpdateOne,
@@ -44196,10 +44196,8 @@ var formProps = {
44196
44196
  await scopeThis.handles.submit({
44197
44197
  scopeThis
44198
44198
  });
44199
- await scopeThis.handles.init({
44200
- scopeThis
44201
- });
44202
- }
44199
+ },
44200
+ submitted: false // 提交监听,用于支付记录的刷新
44203
44201
  }
44204
44202
  };
44205
44203
 
@@ -44218,7 +44216,7 @@ var qrcode$1 = {
44218
44216
  };
44219
44217
 
44220
44218
  const ly0session = ly0request.ly0sessionLoad();
44221
- function init(_ref) {
44219
+ function init$1(_ref) {
44222
44220
  let {
44223
44221
  scopeThis
44224
44222
  } = _ref;
@@ -44256,6 +44254,8 @@ function submit(_ref2) {
44256
44254
  }
44257
44255
  // 关闭收银窗口
44258
44256
  scopeThis.formProps.popup.visible = false;
44257
+ // 通知外部组件已提交
44258
+ scopeThis.formProps.submitted = true;
44259
44259
  });
44260
44260
  } else if (scopeThis.formData.process_code === "wxzf0") {
44261
44261
  // 微信支付.客户付款码付款
@@ -44281,6 +44281,8 @@ function submit(_ref2) {
44281
44281
  }
44282
44282
  // 关闭收银窗口
44283
44283
  scopeThis.formProps.popup.visible = false;
44284
+ // 通知外部组件已提交
44285
+ scopeThis.formProps.submitted = true;
44284
44286
  });
44285
44287
  } else if (scopeThis.formData.process_code === "wxzf2") {
44286
44288
  // 微信支付.商户二维码收款
@@ -44305,6 +44307,8 @@ function submit(_ref2) {
44305
44307
  }
44306
44308
  // 关闭收银窗口
44307
44309
  scopeThis.formProps.popup.visible = false;
44310
+ // 通知外部组件已提交
44311
+ scopeThis.formProps.submitted = true;
44308
44312
 
44309
44313
  // 弹出二维码窗口
44310
44314
  if (result.code === 0 && result.code_url) {
@@ -44322,8 +44326,8 @@ function submit(_ref2) {
44322
44326
  ElMessage("未选择:系统内置支付流程");
44323
44327
  }
44324
44328
  }
44325
- var handles$1 = {
44326
- init,
44329
+ var handles$2 = {
44330
+ init: init$1,
44327
44331
  submit
44328
44332
  };
44329
44333
 
@@ -47398,7 +47402,7 @@ function requireBrowser () {
47398
47402
 
47399
47403
  var browserExports = requireBrowser();
47400
47404
 
47401
- var handles = {
47405
+ var handles$1 = {
47402
47406
  async init(_ref) {
47403
47407
  let {
47404
47408
  scopeThis
@@ -47497,11 +47501,11 @@ const scopeThis = reactive({
47497
47501
  props: props.myProps,
47498
47502
  // 第二块屏幕 - 客户付费窗口
47499
47503
  winPayAnother: null,
47500
- handles
47504
+ handles: handles$1
47501
47505
  });
47502
47506
 
47503
47507
  onMounted(()=>{
47504
- handles.init({scopeThis});
47508
+ handles$1.init({scopeThis});
47505
47509
  });
47506
47510
 
47507
47511
  return (_ctx, _cache) => {
@@ -47517,7 +47521,7 @@ return (_ctx, _cache) => {
47517
47521
  "append-to-body": "",
47518
47522
  title: unref(qrcode$1).popup.title,
47519
47523
  width: '600px',
47520
- "before-close": unref(handles).beforeClose
47524
+ "before-close": unref(handles$1).beforeClose
47521
47525
  }, {
47522
47526
  default: withCtx(() => [
47523
47527
  createVNode(_component_el_row, { class: "qrcode-box" }, {
@@ -47536,7 +47540,7 @@ return (_ctx, _cache) => {
47536
47540
  createVNode(_component_el_button, {
47537
47541
  type: "success",
47538
47542
  round: "",
47539
- onClick: unref(handles).confirm
47543
+ onClick: unref(handles$1).confirm
47540
47544
  }, {
47541
47545
  default: withCtx(() => [...(_cache[2] || (_cache[2] = [
47542
47546
  createTextVNode("支付完成后,点击这里以确认", -1 /* CACHED */)
@@ -47579,7 +47583,7 @@ const props = __props;
47579
47583
  const scopeThis = reactive({
47580
47584
  formData: unclassified.deepClone.deepDefaults(props.modelValue, formData),
47581
47585
  formProps: unclassified.deepClone.deepDefaults(props.myProps, formProps),
47582
- handles: handles$1,
47586
+ handles: handles$2,
47583
47587
  pgData: {
47584
47588
  arrBusinessType: [],
47585
47589
  arrProcess: [],
@@ -48068,23 +48072,37 @@ var doc = {
48068
48072
  }
48069
48073
  };
48070
48074
 
48075
+ async function init(_ref) {
48076
+ let {
48077
+ scopeThis
48078
+ } = _ref;
48079
+ scopeThis.queryInit.formData.id_business = scopeThis.initBox.id_business;
48080
+ scopeThis.queryInit.formData.businesstype_code = scopeThis.initBox.businesstype_code;
48081
+ await withTable.init({
48082
+ scopeThis
48083
+ });
48084
+ const txt = scopeThis.pgData.data.arrBusinessType.find(i => {
48085
+ return i.code === scopeThis.initBox.businesstype_code;
48086
+ }).text;
48087
+ scopeThis.initBox.popup.title = '支付记录[' + txt + '] - 订单id: ' + scopeThis.initBox.id_business;
48088
+ }
48089
+ var handles = {
48090
+ init
48091
+ };
48092
+
48071
48093
  var amountBox = {
48072
48094
  fun(_ref) {
48073
48095
  let {
48074
48096
  scopeThis
48075
48097
  } = _ref;
48076
- let unpaid = 0,
48077
- // 未支付
48078
- started = 0,
48098
+ let started = 0,
48079
48099
  // 支付中
48080
48100
  succeeded = 0,
48081
48101
  // 支付成功
48082
48102
  failed = 0; // 支付失败
48083
48103
 
48084
48104
  scopeThis.tableData.data.forEach(i => {
48085
- if (i.status_code === '0') {
48086
- unpaid = unpaid + i.amount;
48087
- } else if (i.status_code === '1') {
48105
+ if (i.status_code === '1') {
48088
48106
  started = started + i.amount;
48089
48107
  } else if (i.status_code === '2') {
48090
48108
  succeeded = succeeded + i.amount;
@@ -48093,11 +48111,11 @@ var amountBox = {
48093
48111
  }
48094
48112
  });
48095
48113
  return {
48096
- sum: succeeded + started + unpaid,
48097
- succeeded,
48098
48114
  started,
48115
+ succeeded,
48099
48116
  failed,
48100
- unpaid
48117
+ // 未支付
48118
+ unpaid: scopeThis.initBox.deal - succeeded - started
48101
48119
  };
48102
48120
  }
48103
48121
  };
@@ -48140,6 +48158,7 @@ const scopeThis = reactive({
48140
48158
  arrStatus: []
48141
48159
  }
48142
48160
  },
48161
+ handles,
48143
48162
  initBox: props.myProps,
48144
48163
  amountBox: computed(()=>{
48145
48164
  return amountBox.fun({scopeThis})
@@ -48148,13 +48167,14 @@ const scopeThis = reactive({
48148
48167
  });
48149
48168
 
48150
48169
  onMounted(async ()=>{
48151
- scopeThis.queryInit.formData.id_business = scopeThis.initBox.id_business;
48152
- scopeThis.queryInit.formData.businesstype_code = scopeThis.initBox.businesstype_code;
48153
- await withTable.init({scopeThis});
48154
- const txt = scopeThis.pgData.data.arrBusinessType.find(i=>{
48155
- return i.code === scopeThis.initBox.businesstype_code
48156
- }).text;
48157
- scopeThis.initBox.popup.title = '支付记录[' + txt + '] - 订单id: ' + scopeThis.initBox.id_business;
48170
+ await scopeThis.handles.init({scopeThis});
48171
+ });
48172
+
48173
+ watch(() => scopeThis.cashBox.formProps.submitted, async (newVal) => {
48174
+ if(!!newVal){
48175
+ await scopeThis.handles.init({scopeThis});
48176
+ scopeThis.cashBox.formProps.submitted = false;
48177
+ }
48158
48178
  });
48159
48179
 
48160
48180
  const style = ref({
@@ -48177,9 +48197,8 @@ return (_ctx, _cache) => {
48177
48197
  _cache[3] || (_cache[3] = createElementVNode("thead", null, [
48178
48198
  createElementVNode("tr", null, [
48179
48199
  createElementVNode("th", null, "订单金额(应收应付)"),
48180
- createElementVNode("th", null, "支付金额合计"),
48181
- createElementVNode("th", null, "支付成功"),
48182
48200
  createElementVNode("th", null, "支付中"),
48201
+ createElementVNode("th", null, "支付成功"),
48183
48202
  createElementVNode("th", null, "支付失败"),
48184
48203
  createElementVNode("th", null, "未支付")
48185
48204
  ])
@@ -48191,13 +48210,10 @@ return (_ctx, _cache) => {
48191
48210
  }, toDisplayString(Math.floor(scopeThis.initBox.deal) / 100), 5 /* TEXT, STYLE */),
48192
48211
  createElementVNode("td", {
48193
48212
  style: normalizeStyle(style.value.amount)
48194
- }, toDisplayString(Math.floor(scopeThis.amountBox.sum) / 100), 5 /* TEXT, STYLE */),
48213
+ }, toDisplayString(Math.floor(scopeThis.amountBox.started) / 100), 5 /* TEXT, STYLE */),
48195
48214
  createElementVNode("td", {
48196
48215
  style: normalizeStyle(style.value.amount)
48197
48216
  }, toDisplayString(Math.floor(scopeThis.amountBox.succeeded) / 100), 5 /* TEXT, STYLE */),
48198
- createElementVNode("td", {
48199
- style: normalizeStyle(style.value.amount)
48200
- }, toDisplayString(Math.floor(scopeThis.amountBox.started) / 100), 5 /* TEXT, STYLE */),
48201
48217
  createElementVNode("td", {
48202
48218
  style: normalizeStyle(style.value.amount)
48203
48219
  }, toDisplayString(Math.floor(scopeThis.amountBox.failed) / 100), 5 /* TEXT, STYLE */),