@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.cjs.js CHANGED
@@ -16872,7 +16872,7 @@ var lookup = [];
16872
16872
  var revLookup = [];
16873
16873
  var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
16874
16874
  var inited = false;
16875
- function init$2 () {
16875
+ function init$3 () {
16876
16876
  inited = true;
16877
16877
  var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
16878
16878
  for (var i = 0, len = code.length; i < len; ++i) {
@@ -16886,7 +16886,7 @@ function init$2 () {
16886
16886
 
16887
16887
  function toByteArray (b64) {
16888
16888
  if (!inited) {
16889
- init$2();
16889
+ init$3();
16890
16890
  }
16891
16891
  var i, j, l, tmp, placeHolders, arr;
16892
16892
  var len = b64.length;
@@ -16945,7 +16945,7 @@ function encodeChunk (uint8, start, end) {
16945
16945
 
16946
16946
  function fromByteArray (uint8) {
16947
16947
  if (!inited) {
16948
- init$2();
16948
+ init$3();
16949
16949
  }
16950
16950
  var tmp;
16951
16951
  var len = uint8.length;
@@ -22928,7 +22928,7 @@ const getPgData = async _ref5 => {
22928
22928
  };
22929
22929
 
22930
22930
  // 初始化
22931
- const init$1 = async _ref6 => {
22931
+ const init$2 = async _ref6 => {
22932
22932
  let {
22933
22933
  scopeThis
22934
22934
  } = _ref6;
@@ -23136,7 +23136,7 @@ var withTable = {
23136
23136
  pageSizeChange,
23137
23137
  currentPageChange,
23138
23138
  getPgData,
23139
- init: init$1,
23139
+ init: init$2,
23140
23140
  popupFind,
23141
23141
  popupInsertOne,
23142
23142
  popupUpdateOne,
@@ -44200,10 +44200,8 @@ var formProps = {
44200
44200
  await scopeThis.handles.submit({
44201
44201
  scopeThis
44202
44202
  });
44203
- await scopeThis.handles.init({
44204
- scopeThis
44205
- });
44206
- }
44203
+ },
44204
+ submitted: false // 提交监听,用于支付记录的刷新
44207
44205
  }
44208
44206
  };
44209
44207
 
@@ -44222,7 +44220,7 @@ var qrcode$1 = {
44222
44220
  };
44223
44221
 
44224
44222
  const ly0session = ly0request$1.ly0sessionLoad();
44225
- function init(_ref) {
44223
+ function init$1(_ref) {
44226
44224
  let {
44227
44225
  scopeThis
44228
44226
  } = _ref;
@@ -44260,6 +44258,8 @@ function submit(_ref2) {
44260
44258
  }
44261
44259
  // 关闭收银窗口
44262
44260
  scopeThis.formProps.popup.visible = false;
44261
+ // 通知外部组件已提交
44262
+ scopeThis.formProps.submitted = true;
44263
44263
  });
44264
44264
  } else if (scopeThis.formData.process_code === "wxzf0") {
44265
44265
  // 微信支付.客户付款码付款
@@ -44285,6 +44285,8 @@ function submit(_ref2) {
44285
44285
  }
44286
44286
  // 关闭收银窗口
44287
44287
  scopeThis.formProps.popup.visible = false;
44288
+ // 通知外部组件已提交
44289
+ scopeThis.formProps.submitted = true;
44288
44290
  });
44289
44291
  } else if (scopeThis.formData.process_code === "wxzf2") {
44290
44292
  // 微信支付.商户二维码收款
@@ -44309,6 +44311,8 @@ function submit(_ref2) {
44309
44311
  }
44310
44312
  // 关闭收银窗口
44311
44313
  scopeThis.formProps.popup.visible = false;
44314
+ // 通知外部组件已提交
44315
+ scopeThis.formProps.submitted = true;
44312
44316
 
44313
44317
  // 弹出二维码窗口
44314
44318
  if (result.code === 0 && result.code_url) {
@@ -44326,8 +44330,8 @@ function submit(_ref2) {
44326
44330
  elementPlus.ElMessage("未选择:系统内置支付流程");
44327
44331
  }
44328
44332
  }
44329
- var handles$1 = {
44330
- init,
44333
+ var handles$2 = {
44334
+ init: init$1,
44331
44335
  submit
44332
44336
  };
44333
44337
 
@@ -47402,7 +47406,7 @@ function requireBrowser () {
47402
47406
 
47403
47407
  var browserExports = requireBrowser();
47404
47408
 
47405
- var handles = {
47409
+ var handles$1 = {
47406
47410
  async init(_ref) {
47407
47411
  let {
47408
47412
  scopeThis
@@ -47501,11 +47505,11 @@ const scopeThis = vue.reactive({
47501
47505
  props: props.myProps,
47502
47506
  // 第二块屏幕 - 客户付费窗口
47503
47507
  winPayAnother: null,
47504
- handles
47508
+ handles: handles$1
47505
47509
  });
47506
47510
 
47507
47511
  vue.onMounted(()=>{
47508
- handles.init({scopeThis});
47512
+ handles$1.init({scopeThis});
47509
47513
  });
47510
47514
 
47511
47515
  return (_ctx, _cache) => {
@@ -47521,7 +47525,7 @@ return (_ctx, _cache) => {
47521
47525
  "append-to-body": "",
47522
47526
  title: vue.unref(qrcode$1).popup.title,
47523
47527
  width: '600px',
47524
- "before-close": vue.unref(handles).beforeClose
47528
+ "before-close": vue.unref(handles$1).beforeClose
47525
47529
  }, {
47526
47530
  default: vue.withCtx(() => [
47527
47531
  vue.createVNode(_component_el_row, { class: "qrcode-box" }, {
@@ -47540,7 +47544,7 @@ return (_ctx, _cache) => {
47540
47544
  vue.createVNode(_component_el_button, {
47541
47545
  type: "success",
47542
47546
  round: "",
47543
- onClick: vue.unref(handles).confirm
47547
+ onClick: vue.unref(handles$1).confirm
47544
47548
  }, {
47545
47549
  default: vue.withCtx(() => [...(_cache[2] || (_cache[2] = [
47546
47550
  vue.createTextVNode("支付完成后,点击这里以确认", -1 /* CACHED */)
@@ -47583,7 +47587,7 @@ const props = __props;
47583
47587
  const scopeThis = vue.reactive({
47584
47588
  formData: unclassified.deepClone.deepDefaults(props.modelValue, formData),
47585
47589
  formProps: unclassified.deepClone.deepDefaults(props.myProps, formProps),
47586
- handles: handles$1,
47590
+ handles: handles$2,
47587
47591
  pgData: {
47588
47592
  arrBusinessType: [],
47589
47593
  arrProcess: [],
@@ -48072,23 +48076,37 @@ var doc = {
48072
48076
  }
48073
48077
  };
48074
48078
 
48079
+ async function init(_ref) {
48080
+ let {
48081
+ scopeThis
48082
+ } = _ref;
48083
+ scopeThis.queryInit.formData.id_business = scopeThis.initBox.id_business;
48084
+ scopeThis.queryInit.formData.businesstype_code = scopeThis.initBox.businesstype_code;
48085
+ await withTable.init({
48086
+ scopeThis
48087
+ });
48088
+ const txt = scopeThis.pgData.data.arrBusinessType.find(i => {
48089
+ return i.code === scopeThis.initBox.businesstype_code;
48090
+ }).text;
48091
+ scopeThis.initBox.popup.title = '支付记录[' + txt + '] - 订单id: ' + scopeThis.initBox.id_business;
48092
+ }
48093
+ var handles = {
48094
+ init
48095
+ };
48096
+
48075
48097
  var amountBox = {
48076
48098
  fun(_ref) {
48077
48099
  let {
48078
48100
  scopeThis
48079
48101
  } = _ref;
48080
- let unpaid = 0,
48081
- // 未支付
48082
- started = 0,
48102
+ let started = 0,
48083
48103
  // 支付中
48084
48104
  succeeded = 0,
48085
48105
  // 支付成功
48086
48106
  failed = 0; // 支付失败
48087
48107
 
48088
48108
  scopeThis.tableData.data.forEach(i => {
48089
- if (i.status_code === '0') {
48090
- unpaid = unpaid + i.amount;
48091
- } else if (i.status_code === '1') {
48109
+ if (i.status_code === '1') {
48092
48110
  started = started + i.amount;
48093
48111
  } else if (i.status_code === '2') {
48094
48112
  succeeded = succeeded + i.amount;
@@ -48097,11 +48115,11 @@ var amountBox = {
48097
48115
  }
48098
48116
  });
48099
48117
  return {
48100
- sum: succeeded + started + unpaid,
48101
- succeeded,
48102
48118
  started,
48119
+ succeeded,
48103
48120
  failed,
48104
- unpaid
48121
+ // 未支付
48122
+ unpaid: scopeThis.initBox.deal - succeeded - started
48105
48123
  };
48106
48124
  }
48107
48125
  };
@@ -48144,6 +48162,7 @@ const scopeThis = vue.reactive({
48144
48162
  arrStatus: []
48145
48163
  }
48146
48164
  },
48165
+ handles,
48147
48166
  initBox: props.myProps,
48148
48167
  amountBox: vue.computed(()=>{
48149
48168
  return amountBox.fun({scopeThis})
@@ -48152,13 +48171,14 @@ const scopeThis = vue.reactive({
48152
48171
  });
48153
48172
 
48154
48173
  vue.onMounted(async ()=>{
48155
- scopeThis.queryInit.formData.id_business = scopeThis.initBox.id_business;
48156
- scopeThis.queryInit.formData.businesstype_code = scopeThis.initBox.businesstype_code;
48157
- await withTable.init({scopeThis});
48158
- const txt = scopeThis.pgData.data.arrBusinessType.find(i=>{
48159
- return i.code === scopeThis.initBox.businesstype_code
48160
- }).text;
48161
- scopeThis.initBox.popup.title = '支付记录[' + txt + '] - 订单id: ' + scopeThis.initBox.id_business;
48174
+ await scopeThis.handles.init({scopeThis});
48175
+ });
48176
+
48177
+ vue.watch(() => scopeThis.cashBox.formProps.submitted, async (newVal) => {
48178
+ if(!!newVal){
48179
+ await scopeThis.handles.init({scopeThis});
48180
+ scopeThis.cashBox.formProps.submitted = false;
48181
+ }
48162
48182
  });
48163
48183
 
48164
48184
  const style = vue.ref({
@@ -48181,9 +48201,8 @@ return (_ctx, _cache) => {
48181
48201
  _cache[3] || (_cache[3] = vue.createElementVNode("thead", null, [
48182
48202
  vue.createElementVNode("tr", null, [
48183
48203
  vue.createElementVNode("th", null, "订单金额(应收应付)"),
48184
- vue.createElementVNode("th", null, "支付金额合计"),
48185
- vue.createElementVNode("th", null, "支付成功"),
48186
48204
  vue.createElementVNode("th", null, "支付中"),
48205
+ vue.createElementVNode("th", null, "支付成功"),
48187
48206
  vue.createElementVNode("th", null, "支付失败"),
48188
48207
  vue.createElementVNode("th", null, "未支付")
48189
48208
  ])
@@ -48195,13 +48214,10 @@ return (_ctx, _cache) => {
48195
48214
  }, vue.toDisplayString(Math.floor(scopeThis.initBox.deal) / 100), 5 /* TEXT, STYLE */),
48196
48215
  vue.createElementVNode("td", {
48197
48216
  style: vue.normalizeStyle(style.value.amount)
48198
- }, vue.toDisplayString(Math.floor(scopeThis.amountBox.sum) / 100), 5 /* TEXT, STYLE */),
48217
+ }, vue.toDisplayString(Math.floor(scopeThis.amountBox.started) / 100), 5 /* TEXT, STYLE */),
48199
48218
  vue.createElementVNode("td", {
48200
48219
  style: vue.normalizeStyle(style.value.amount)
48201
48220
  }, vue.toDisplayString(Math.floor(scopeThis.amountBox.succeeded) / 100), 5 /* TEXT, STYLE */),
48202
- vue.createElementVNode("td", {
48203
- style: vue.normalizeStyle(style.value.amount)
48204
- }, vue.toDisplayString(Math.floor(scopeThis.amountBox.started) / 100), 5 /* TEXT, STYLE */),
48205
48221
  vue.createElementVNode("td", {
48206
48222
  style: vue.normalizeStyle(style.value.amount)
48207
48223
  }, vue.toDisplayString(Math.floor(scopeThis.amountBox.failed) / 100), 5 /* TEXT, STYLE */),