kts-component-invoice-operate 3.2.181-7 → 3.2.181-8

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
@@ -9875,6 +9875,8 @@ var onChangeSwitchTax = /*#__PURE__*/function () {
9875
9875
 
9876
9876
  var importGoodsDrawer = /*#__PURE__*/(function () {
9877
9877
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(s, record, controller) {
9878
+ var _s$goodsListState$edi, _s$goodsListState$edi2, _s$goodsListState$edi3, _s$goodsListState$edi4, _s$goodsListState$edi5, _s$goodsListState$edi6, _s$goodsListState$edi7, _s$goodsListState$edi8, _s$goodsListState$edi9, _s$goodsListState$edi10, _s$goodsListState$edi11, _s$goodsListState$edi12, _s$goodsListState$edi13, _s$goodsListState$edi14, _s$goodsListState$edi15, _s$goodsListState$edi16;
9879
+
9878
9880
  var between, editGood;
9879
9881
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9880
9882
  while (1) {
@@ -9894,24 +9896,28 @@ var importGoodsDrawer = /*#__PURE__*/(function () {
9894
9896
  return _context.abrupt("return");
9895
9897
 
9896
9898
  case 3:
9897
- // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
9899
+ console.log('aaaaaaaa122222:'); // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
9900
+
9898
9901
  record.quantity = undefined;
9899
9902
  record.lineAmountExcludeTax = undefined;
9900
9903
  record.lineAmountIncludeTax = undefined; // 中间数据
9901
9904
 
9902
- between = _objectSpread2({}, record);
9905
+ between = _objectSpread2({}, record); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
9906
+ // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
9907
+ // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
9908
+
9903
9909
  between.itemCode = record.itemCode;
9904
9910
  between.shorthand = record.shorthand;
9905
9911
  between.itemName = record.itemName;
9906
9912
  between.itemNameOther = record.itemName;
9907
- between.itemModelName = record.itemModelName;
9908
- between.unit = record.unit;
9909
- between.quantity = record.quantity;
9910
- between.priceIncludeTax = record.priceIncludeTax;
9911
- between.lineAmountIncludeTax = record.lineAmountIncludeTax;
9912
- between.lineAmountExcludeTax = record.lineAmountExcludeTax;
9913
- between.taxRate = record.taxRate;
9914
- between.taxAmount = record.taxAmount; // 设置编辑货物
9913
+ between.itemModelName = (_s$goodsListState$edi = (_s$goodsListState$edi2 = s.goodsListState.editGood) === null || _s$goodsListState$edi2 === void 0 ? void 0 : _s$goodsListState$edi2.itemModelName) !== null && _s$goodsListState$edi !== void 0 ? _s$goodsListState$edi : record.itemModelName;
9914
+ between.unit = (_s$goodsListState$edi3 = (_s$goodsListState$edi4 = s.goodsListState.editGood) === null || _s$goodsListState$edi4 === void 0 ? void 0 : _s$goodsListState$edi4.itemModelName) !== null && _s$goodsListState$edi3 !== void 0 ? _s$goodsListState$edi3 : record.unit;
9915
+ between.quantity = (_s$goodsListState$edi5 = (_s$goodsListState$edi6 = s.goodsListState.editGood) === null || _s$goodsListState$edi6 === void 0 ? void 0 : _s$goodsListState$edi6.itemModelName) !== null && _s$goodsListState$edi5 !== void 0 ? _s$goodsListState$edi5 : record.quantity;
9916
+ between.priceIncludeTax = (_s$goodsListState$edi7 = (_s$goodsListState$edi8 = s.goodsListState.editGood) === null || _s$goodsListState$edi8 === void 0 ? void 0 : _s$goodsListState$edi8.itemModelName) !== null && _s$goodsListState$edi7 !== void 0 ? _s$goodsListState$edi7 : record.priceIncludeTax;
9917
+ between.lineAmountIncludeTax = (_s$goodsListState$edi9 = (_s$goodsListState$edi10 = s.goodsListState.editGood) === null || _s$goodsListState$edi10 === void 0 ? void 0 : _s$goodsListState$edi10.itemModelName) !== null && _s$goodsListState$edi9 !== void 0 ? _s$goodsListState$edi9 : record.lineAmountIncludeTax;
9918
+ between.lineAmountExcludeTax = (_s$goodsListState$edi11 = (_s$goodsListState$edi12 = s.goodsListState.editGood) === null || _s$goodsListState$edi12 === void 0 ? void 0 : _s$goodsListState$edi12.itemModelName) !== null && _s$goodsListState$edi11 !== void 0 ? _s$goodsListState$edi11 : record.lineAmountExcludeTax;
9919
+ between.taxRate = (_s$goodsListState$edi13 = (_s$goodsListState$edi14 = s.goodsListState.editGood) === null || _s$goodsListState$edi14 === void 0 ? void 0 : _s$goodsListState$edi14.itemModelName) !== null && _s$goodsListState$edi13 !== void 0 ? _s$goodsListState$edi13 : record.taxRate;
9920
+ between.taxAmount = (_s$goodsListState$edi15 = (_s$goodsListState$edi16 = s.goodsListState.editGood) === null || _s$goodsListState$edi16 === void 0 ? void 0 : _s$goodsListState$edi16.itemModelName) !== null && _s$goodsListState$edi15 !== void 0 ? _s$goodsListState$edi15 : record.taxAmount; // 设置编辑货物
9915
9921
 
9916
9922
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
9917
9923
 
@@ -9942,22 +9948,22 @@ var importGoodsDrawer = /*#__PURE__*/(function () {
9942
9948
 
9943
9949
 
9944
9950
  if (!s.goodsListState.isTaxIncluded) {
9945
- _context.next = 29;
9951
+ _context.next = 30;
9946
9952
  break;
9947
9953
  }
9948
9954
 
9949
- _context.next = 27;
9955
+ _context.next = 28;
9950
9956
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
9951
9957
 
9952
- case 27:
9953
- _context.next = 31;
9958
+ case 28:
9959
+ _context.next = 32;
9954
9960
  break;
9955
9961
 
9956
- case 29:
9957
- _context.next = 31;
9962
+ case 30:
9963
+ _context.next = 32;
9958
9964
  return updateUnitPriceTax(controller, s.goodsListState.form, record);
9959
9965
 
9960
- case 31:
9966
+ case 32:
9961
9967
  case "end":
9962
9968
  return _context.stop();
9963
9969
  }
@@ -14120,7 +14126,10 @@ var useColumns = (function (form) {
14120
14126
  while (1) {
14121
14127
  switch (_context10.prev = _context10.next) {
14122
14128
  case 0:
14123
- // await controller.wait();
14129
+ _context10.next = 2;
14130
+ return controller.wait();
14131
+
14132
+ case 2:
14124
14133
  // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
14125
14134
  // const isvalue = !!value || value === 0;
14126
14135
  // if (isvalue || isQuantity === isvalue) return;
@@ -14130,29 +14139,29 @@ var useColumns = (function (form) {
14130
14139
  isValueValid = value !== undefined && value !== null && value !== '';
14131
14140
 
14132
14141
  if (!(isValueValid && isQuantityValid)) {
14133
- _context10.next = 5;
14142
+ _context10.next = 7;
14134
14143
  break;
14135
14144
  }
14136
14145
 
14137
14146
  return _context10.abrupt("return");
14138
14147
 
14139
- case 5:
14148
+ case 7:
14140
14149
  if (isValueValid) {
14141
- _context10.next = 7;
14150
+ _context10.next = 9;
14142
14151
  break;
14143
14152
  }
14144
14153
 
14145
14154
  return _context10.abrupt("return", callback('金额不能为空'));
14146
14155
 
14147
- case 7:
14156
+ case 9:
14148
14157
  if (isQuantityValid) {
14149
- _context10.next = 9;
14158
+ _context10.next = 11;
14150
14159
  break;
14151
14160
  }
14152
14161
 
14153
14162
  return _context10.abrupt("return", callback('数量不能为空'));
14154
14163
 
14155
- case 9:
14164
+ case 11:
14156
14165
  case "end":
14157
14166
  return _context10.stop();
14158
14167
  }
@@ -19874,12 +19883,72 @@ var clearCalculatingField$1 = /*#__PURE__*/function () {
19874
19883
  };
19875
19884
  }();
19876
19885
  /** 数量改变了 */
19886
+ // export const onChangeQuantity = lazyFn(
19887
+ // (controller: InvoiceController, form: WrappedFormUtils, record: IGood) => {
19888
+ // form.validateFields(async (err, values) => {
19889
+ // err = err || {};
19890
+ // if (!values.quantity && values.quantity !== 0) {
19891
+ // await controller.setEditGood({ quantity: undefined });
19892
+ // await clearCalculatingField(controller);
19893
+ // return;
19894
+ // }
19895
+ // if (err.quantity) {
19896
+ // await clearCalculatingField(controller);
19897
+ // return
19898
+ // };
19899
+ // const calculatingDigits = controller.state.calculatingDigits;
19900
+ // const quantity = format15(values.quantity, calculatingDigits);
19901
+ // await controller.setEditGood({ quantity });
19902
+ // form.setFieldsValue({ quantity });
19903
+ // // 是否含税
19904
+ // if (controller.state.goodsListState.isTaxIncluded) {
19905
+ // // 含税
19906
+ // if (!err.priceIncludeTax && values.priceIncludeTax) {
19907
+ // // 可以找到 单价(含税)
19908
+ // const priceIncludeTax = format15(values.priceIncludeTax, calculatingDigits);
19909
+ // const lineAmountIncludeTax = format2(evaluate(`${priceIncludeTax} * ${quantity}`));
19910
+ // form.setFieldsValue({ lineAmountIncludeTax });
19911
+ // await controller.setEditGood({ lineAmountIncludeTax });
19912
+ // } else if (!err.lineAmountIncludeTax && values.lineAmountIncludeTax) {
19913
+ // // 可以找到 金额(含税)
19914
+ // const lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
19915
+ // const priceIncludeTax = format15(
19916
+ // evaluate(`${lineAmountIncludeTax} / ${quantity}`),
19917
+ // calculatingDigits);
19918
+ // form.setFieldsValue({ priceIncludeTax });
19919
+ // await controller.setEditGood({ priceIncludeTax });
19920
+ // }
19921
+ // // 更新不含税
19922
+ // await updateUnitPriceExcludingTax(controller, form, record);
19923
+ // } else {
19924
+ // // 不含税
19925
+ // if (!err.priceExcludeTax && values.priceExcludeTax) {
19926
+ // // 可以找到 单价(不含税)
19927
+ // const priceExcludeTax = format15(values.priceExcludeTax, calculatingDigits);
19928
+ // const lineAmountExcludeTax = format2(evaluate(`${quantity} * ${priceExcludeTax}`));
19929
+ // form.setFieldsValue({ lineAmountExcludeTax });
19930
+ // await controller.setEditGood({ lineAmountExcludeTax, quantity });
19931
+ // } else if (!err.lineAmountExcludeTax && values.lineAmountExcludeTax) {
19932
+ // // 可以找到 金额(不含税)
19933
+ // const lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
19934
+ // const priceExcludeTax = format15(evaluate(`${lineAmountExcludeTax} / ${quantity}`), calculatingDigits);
19935
+ // form.setFieldsValue({ priceExcludeTax });
19936
+ // await controller.setEditGood({ priceExcludeTax, quantity });
19937
+ // }
19938
+ // // 更新含税
19939
+ // await updateUnitPriceTax(controller, form, record);
19940
+ // }
19941
+ // // 清楚 计算中启动字段
19942
+ // await clearCalculatingField(controller);
19943
+ // });
19944
+ // },
19945
+ // 1000,
19946
+ // );
19877
19947
 
19878
19948
  var onChangeQuantity$1 = lazyFn$1(function (controller, form, record) {
19879
19949
  form.validateFields( /*#__PURE__*/function () {
19880
19950
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(err, values) {
19881
- var calculatingDigits, quantity, priceIncludeTax, lineAmountIncludeTax, _lineAmountIncludeTax, _priceIncludeTax, priceExcludeTax, lineAmountExcludeTax, _lineAmountExcludeTax, _priceExcludeTax;
19882
-
19951
+ var calculatingDigits, quantity, lineAmountIncludeTax, priceIncludeTax, lineAmountExcludeTax, priceExcludeTax;
19883
19952
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
19884
19953
  while (1) {
19885
19954
  switch (_context3.prev = _context3.next) {
@@ -19918,115 +19987,69 @@ var onChangeQuantity$1 = lazyFn$1(function (controller, form, record) {
19918
19987
  case 11:
19919
19988
  calculatingDigits = controller.state.calculatingDigits;
19920
19989
  quantity = format15(values.quantity, calculatingDigits);
19921
- _context3.next = 16;
19990
+ _context3.next = 15;
19922
19991
  return controller.setEditGood({
19923
19992
  quantity: quantity
19924
19993
  });
19925
19994
 
19926
- case 16:
19995
+ case 15:
19927
19996
  form.setFieldsValue({
19928
19997
  quantity: quantity
19929
19998
  }); // 是否含税
19930
19999
 
19931
20000
  if (!controller.state.goodsListState.isTaxIncluded) {
19932
- _context3.next = 36;
19933
- break;
19934
- }
19935
-
19936
- if (!(!err.priceIncludeTax && values.priceIncludeTax)) {
19937
- _context3.next = 26;
20001
+ _context3.next = 27;
19938
20002
  break;
19939
20003
  }
19940
20004
 
19941
- // 可以找到 单价(含税)
19942
- priceIncludeTax = format15(values.priceIncludeTax, calculatingDigits);
19943
- lineAmountIncludeTax = format2(evaluate("".concat(priceIncludeTax, " * ").concat(quantity)));
19944
- form.setFieldsValue({
19945
- lineAmountIncludeTax: lineAmountIncludeTax
19946
- });
19947
- _context3.next = 24;
19948
- return controller.setEditGood({
19949
- lineAmountIncludeTax: lineAmountIncludeTax
19950
- });
19951
-
19952
- case 24:
19953
- _context3.next = 32;
19954
- break;
19955
-
19956
- case 26:
19957
20005
  if (!(!err.lineAmountIncludeTax && values.lineAmountIncludeTax)) {
19958
- _context3.next = 32;
20006
+ _context3.next = 23;
19959
20007
  break;
19960
20008
  }
19961
20009
 
19962
- // 可以找到 金额(含税)
19963
- _lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
19964
- _priceIncludeTax = format15(evaluate("".concat(_lineAmountIncludeTax, " / ").concat(quantity)), calculatingDigits);
20010
+ lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
20011
+ priceIncludeTax = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(quantity)), calculatingDigits);
19965
20012
  form.setFieldsValue({
19966
- priceIncludeTax: _priceIncludeTax
20013
+ priceIncludeTax: priceIncludeTax
19967
20014
  });
19968
- _context3.next = 32;
20015
+ _context3.next = 23;
19969
20016
  return controller.setEditGood({
19970
- priceIncludeTax: _priceIncludeTax
20017
+ priceIncludeTax: priceIncludeTax
19971
20018
  });
19972
20019
 
19973
- case 32:
19974
- _context3.next = 34;
20020
+ case 23:
20021
+ _context3.next = 25;
19975
20022
  return updateUnitPriceExcludingTax$1(controller, form, record);
19976
20023
 
19977
- case 34:
19978
- _context3.next = 52;
19979
- break;
19980
-
19981
- case 36:
19982
- if (!(!err.priceExcludeTax && values.priceExcludeTax)) {
19983
- _context3.next = 44;
19984
- break;
19985
- }
19986
-
19987
- // 可以找到 单价(不含税)
19988
- priceExcludeTax = format15(values.priceExcludeTax, calculatingDigits);
19989
- lineAmountExcludeTax = format2(evaluate("".concat(quantity, " * ").concat(priceExcludeTax)));
19990
- form.setFieldsValue({
19991
- lineAmountExcludeTax: lineAmountExcludeTax
19992
- });
19993
- _context3.next = 42;
19994
- return controller.setEditGood({
19995
- lineAmountExcludeTax: lineAmountExcludeTax,
19996
- quantity: quantity
19997
- });
19998
-
19999
- case 42:
20000
- _context3.next = 50;
20024
+ case 25:
20025
+ _context3.next = 35;
20001
20026
  break;
20002
20027
 
20003
- case 44:
20028
+ case 27:
20004
20029
  if (!(!err.lineAmountExcludeTax && values.lineAmountExcludeTax)) {
20005
- _context3.next = 50;
20030
+ _context3.next = 33;
20006
20031
  break;
20007
20032
  }
20008
20033
 
20009
- // 可以找到 金额(不含税)
20010
- _lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
20011
- _priceExcludeTax = format15(evaluate("".concat(_lineAmountExcludeTax, " / ").concat(quantity)), calculatingDigits);
20034
+ lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
20035
+ priceExcludeTax = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(quantity)), calculatingDigits);
20012
20036
  form.setFieldsValue({
20013
- priceExcludeTax: _priceExcludeTax
20037
+ priceExcludeTax: priceExcludeTax
20014
20038
  });
20015
- _context3.next = 50;
20039
+ _context3.next = 33;
20016
20040
  return controller.setEditGood({
20017
- priceExcludeTax: _priceExcludeTax,
20018
- quantity: quantity
20041
+ priceExcludeTax: priceExcludeTax
20019
20042
  });
20020
20043
 
20021
- case 50:
20022
- _context3.next = 52;
20044
+ case 33:
20045
+ _context3.next = 35;
20023
20046
  return updateUnitPriceTax$1(controller, form, record);
20024
20047
 
20025
- case 52:
20026
- _context3.next = 54;
20048
+ case 35:
20049
+ _context3.next = 37;
20027
20050
  return clearCalculatingField$1(controller);
20028
20051
 
20029
- case 54:
20052
+ case 37:
20030
20053
  case "end":
20031
20054
  return _context3.stop();
20032
20055
  }
@@ -20044,7 +20067,7 @@ var onChangeQuantity$1 = lazyFn$1(function (controller, form, record) {
20044
20067
  var onChangePriceIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20045
20068
  form.validateFields( /*#__PURE__*/function () {
20046
20069
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(err, values) {
20047
- var calculatingDigits, priceIncludeTax, quantity, lineAmountIncludeTax, _lineAmountIncludeTax2, _quantity;
20070
+ var calculatingDigits, priceIncludeTax, quantity, lineAmountIncludeTax, _lineAmountIncludeTax, _quantity;
20048
20071
 
20049
20072
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
20050
20073
  while (1) {
@@ -20120,8 +20143,8 @@ var onChangePriceIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20120
20143
  break;
20121
20144
  }
20122
20145
 
20123
- _lineAmountIncludeTax2 = format2(values.lineAmountIncludeTax);
20124
- _quantity = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(priceIncludeTax)), calculatingDigits);
20146
+ _lineAmountIncludeTax = format2(values.lineAmountIncludeTax);
20147
+ _quantity = format15(evaluate("".concat(_lineAmountIncludeTax, " / ").concat(priceIncludeTax)), calculatingDigits);
20125
20148
  form.setFieldsValue({
20126
20149
  quantity: _quantity
20127
20150
  });
@@ -20156,7 +20179,7 @@ var onChangePriceIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20156
20179
  var onChangePriceExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20157
20180
  form.validateFields( /*#__PURE__*/function () {
20158
20181
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(err, values) {
20159
- var calculatingDigits, priceExcludeTax, quantity, lineAmountExcludeTax, _lineAmountExcludeTax2, _quantity2;
20182
+ var calculatingDigits, priceExcludeTax, quantity, lineAmountExcludeTax, _lineAmountExcludeTax, _quantity2;
20160
20183
 
20161
20184
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
20162
20185
  while (1) {
@@ -20232,8 +20255,8 @@ var onChangePriceExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20232
20255
  break;
20233
20256
  }
20234
20257
 
20235
- _lineAmountExcludeTax2 = format2(values.lineAmountExcludeTax);
20236
- _quantity2 = format15(evaluate("".concat(_lineAmountExcludeTax2, " / ").concat(priceExcludeTax)), calculatingDigits);
20258
+ _lineAmountExcludeTax = format2(values.lineAmountExcludeTax);
20259
+ _quantity2 = format15(evaluate("".concat(_lineAmountExcludeTax, " / ").concat(priceExcludeTax)), calculatingDigits);
20237
20260
  form.setFieldsValue({
20238
20261
  quantity: _quantity2
20239
20262
  });
@@ -20268,7 +20291,7 @@ var onChangePriceExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20268
20291
  var onChangeLineAmountIncludeTax$1 = lazyFn$1(function (controller, form, record) {
20269
20292
  form.validateFields( /*#__PURE__*/function () {
20270
20293
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(err, values) {
20271
- var calculatingDigits, lineAmountIncludeTax, quantity, priceIncludeTax, _priceIncludeTax2, _quantity3;
20294
+ var calculatingDigits, lineAmountIncludeTax, quantity, priceIncludeTax, _priceIncludeTax, _quantity3;
20272
20295
 
20273
20296
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
20274
20297
  while (1) {
@@ -20336,8 +20359,8 @@ var onChangeLineAmountIncludeTax$1 = lazyFn$1(function (controller, form, record
20336
20359
  break;
20337
20360
  }
20338
20361
 
20339
- _priceIncludeTax2 = format15(values.priceIncludeTax, calculatingDigits);
20340
- _quantity3 = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(_priceIncludeTax2)), calculatingDigits);
20362
+ _priceIncludeTax = format15(values.priceIncludeTax, calculatingDigits);
20363
+ _quantity3 = format15(evaluate("".concat(lineAmountIncludeTax, " / ").concat(_priceIncludeTax)), calculatingDigits);
20341
20364
  form.setFieldsValue({
20342
20365
  quantity: _quantity3
20343
20366
  });
@@ -20372,7 +20395,7 @@ var onChangeLineAmountIncludeTax$1 = lazyFn$1(function (controller, form, record
20372
20395
  var onChangeLineAmountExcludeTax$1 = lazyFn$1(function (controller, form, record) {
20373
20396
  form.validateFields( /*#__PURE__*/function () {
20374
20397
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(err, values) {
20375
- var calculatingDigits, lineAmountExcludeTax, quantity, priceExcludeTax, _priceExcludeTax2, _quantity4;
20398
+ var calculatingDigits, lineAmountExcludeTax, quantity, priceExcludeTax, _priceExcludeTax, _quantity4;
20376
20399
 
20377
20400
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
20378
20401
  while (1) {
@@ -20440,8 +20463,8 @@ var onChangeLineAmountExcludeTax$1 = lazyFn$1(function (controller, form, record
20440
20463
  break;
20441
20464
  }
20442
20465
 
20443
- _priceExcludeTax2 = format15(values.priceExcludeTax, calculatingDigits);
20444
- _quantity4 = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(_priceExcludeTax2)), calculatingDigits);
20466
+ _priceExcludeTax = format15(values.priceExcludeTax, calculatingDigits);
20467
+ _quantity4 = format15(evaluate("".concat(lineAmountExcludeTax, " / ").concat(_priceExcludeTax)), calculatingDigits);
20445
20468
  form.setFieldsValue({
20446
20469
  quantity: _quantity4
20447
20470
  });
@@ -21061,21 +21084,21 @@ var onChangeSwitchTax$1 = /*#__PURE__*/function () {
21061
21084
 
21062
21085
  var _quantity5 = format15(sourceQuantity, calculatingDigits);
21063
21086
 
21064
- var _priceExcludeTax3 = format15(sourcePriceExcludeTax, calculatingDigits);
21087
+ var _priceExcludeTax2 = format15(sourcePriceExcludeTax, calculatingDigits);
21065
21088
 
21066
- var _lineAmountExcludeTax3 = format2(evaluate("".concat(_priceExcludeTax3, " * ").concat(_quantity5)));
21089
+ var _lineAmountExcludeTax2 = format2(evaluate("".concat(_priceExcludeTax2, " * ").concat(_quantity5)));
21067
21090
 
21068
- var _lineAmountIncludeTax3 = format2(evaluate("".concat(_lineAmountExcludeTax3, " * (1+(").concat(taxRate, "/100))")));
21091
+ var _lineAmountIncludeTax2 = format2(evaluate("".concat(_lineAmountExcludeTax2, " * (1+(").concat(taxRate, "/100))")));
21069
21092
 
21070
- var _priceIncludeTax3 = format15(evaluate("".concat(_lineAmountIncludeTax3, " / ").concat(_quantity5)), calculatingDigits);
21093
+ var _priceIncludeTax2 = format15(evaluate("".concat(_lineAmountIncludeTax2, " / ").concat(_quantity5)), calculatingDigits);
21071
21094
 
21072
- var _taxAmount = evaluate("".concat(_lineAmountIncludeTax3, " - ").concat(_lineAmountExcludeTax3));
21095
+ var _taxAmount = evaluate("".concat(_lineAmountIncludeTax2, " - ").concat(_lineAmountExcludeTax2));
21073
21096
 
21074
21097
  return _objectSpread2(_objectSpread2({}, good), {}, {
21075
- lineAmountExcludeTax: _lineAmountExcludeTax3,
21076
- lineAmountIncludeTax: _lineAmountIncludeTax3,
21098
+ lineAmountExcludeTax: _lineAmountExcludeTax2,
21099
+ lineAmountIncludeTax: _lineAmountIncludeTax2,
21077
21100
  taxAmount: _taxAmount,
21078
- priceIncludeTax: _priceIncludeTax3
21101
+ priceIncludeTax: _priceIncludeTax2
21079
21102
  });
21080
21103
  }
21081
21104
  });
@@ -22442,7 +22465,7 @@ var useColumns$1 = (function (form) {
22442
22465
  }, {
22443
22466
  validator: function () {
22444
22467
  var _validator3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(_, value, callback) {
22445
- var isQuantity, isvalue;
22468
+ var quantity, isQuantityValid, isValueValid;
22446
22469
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
22447
22470
  while (1) {
22448
22471
  switch (_context8.prev = _context8.next) {
@@ -22451,20 +22474,38 @@ var useColumns$1 = (function (form) {
22451
22474
  return controller.wait();
22452
22475
 
22453
22476
  case 2:
22454
- isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22455
- isvalue = !!value || value === 0;
22477
+ // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22478
+ // const isvalue = !!value || value === 0;
22479
+ // if (isvalue || isQuantity === isvalue) return;
22480
+ // callback('请输入单价');
22481
+ quantity = getFieldValue('quantity');
22482
+ isQuantityValid = quantity !== undefined && quantity !== null && quantity !== '';
22483
+ isValueValid = value !== undefined && value !== null && value !== '';
22456
22484
 
22457
- if (!(isvalue || isQuantity === isvalue)) {
22458
- _context8.next = 6;
22485
+ if (!(isValueValid && isQuantityValid)) {
22486
+ _context8.next = 7;
22459
22487
  break;
22460
22488
  }
22461
22489
 
22462
22490
  return _context8.abrupt("return");
22463
22491
 
22464
- case 6:
22465
- callback('请输入单价');
22466
-
22467
22492
  case 7:
22493
+ if (isValueValid) {
22494
+ _context8.next = 9;
22495
+ break;
22496
+ }
22497
+
22498
+ return _context8.abrupt("return", callback('金额不能为空'));
22499
+
22500
+ case 9:
22501
+ if (isQuantityValid) {
22502
+ _context8.next = 11;
22503
+ break;
22504
+ }
22505
+
22506
+ return _context8.abrupt("return", callback('数量不能为空'));
22507
+
22508
+ case 11:
22468
22509
  case "end":
22469
22510
  return _context8.stop();
22470
22511
  }
@@ -22517,7 +22558,7 @@ var useColumns$1 = (function (form) {
22517
22558
  }, {
22518
22559
  validator: function () {
22519
22560
  var _validator4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_, value, callback) {
22520
- var isQuantity, isvalue;
22561
+ var quantity, isQuantityValid, isValueValid;
22521
22562
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
22522
22563
  while (1) {
22523
22564
  switch (_context9.prev = _context9.next) {
@@ -22526,20 +22567,38 @@ var useColumns$1 = (function (form) {
22526
22567
  return controller.wait();
22527
22568
 
22528
22569
  case 2:
22529
- isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22530
- isvalue = !!value || value === 0;
22570
+ // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
22571
+ // const isvalue = !!value || value === 0;
22572
+ // if (isvalue || isQuantity === isvalue) return;
22573
+ // callback('请输入单价');
22574
+ quantity = getFieldValue('quantity');
22575
+ isQuantityValid = quantity !== undefined && quantity !== null && quantity !== '';
22576
+ isValueValid = value !== undefined && value !== null && value !== '';
22531
22577
 
22532
- if (!(isvalue || isQuantity === isvalue)) {
22533
- _context9.next = 6;
22578
+ if (!(isValueValid && isQuantityValid)) {
22579
+ _context9.next = 7;
22534
22580
  break;
22535
22581
  }
22536
22582
 
22537
22583
  return _context9.abrupt("return");
22538
22584
 
22539
- case 6:
22540
- callback('请输入单价');
22541
-
22542
22585
  case 7:
22586
+ if (isValueValid) {
22587
+ _context9.next = 9;
22588
+ break;
22589
+ }
22590
+
22591
+ return _context9.abrupt("return", callback('金额不能为空'));
22592
+
22593
+ case 9:
22594
+ if (isQuantityValid) {
22595
+ _context9.next = 11;
22596
+ break;
22597
+ }
22598
+
22599
+ return _context9.abrupt("return", callback('数量不能为空'));
22600
+
22601
+ case 11:
22543
22602
  case "end":
22544
22603
  return _context9.stop();
22545
22604
  }
@@ -26938,7 +26997,7 @@ var DrawerBody$1 = function DrawerBody() {
26938
26997
  onClick: function onClick() {
26939
26998
  controller.run( /*#__PURE__*/function () {
26940
26999
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
26941
- var _s$goodsListState$edi, _s$goodsListState$edi2, _s$goodsListState$edi3, _s$goodsListState$edi4, _s$goodsListState$edi5, _s$goodsListState$edi6, _s$goodsListState$edi7, _s$goodsListState$edi8, _s$goodsListState$edi9, _s$goodsListState$edi10, _s$goodsListState$edi11, _s$goodsListState$edi12, _s$goodsListState$edi13, _s$goodsListState$edi14;
27000
+ var _s$goodsListState$edi, _s$goodsListState$edi2, _s$goodsListState$edi3, _s$goodsListState$edi4, _s$goodsListState$edi5, _s$goodsListState$edi6, _s$goodsListState$edi7, _s$goodsListState$edi8, _s$goodsListState$edi9, _s$goodsListState$edi10, _s$goodsListState$edi11, _s$goodsListState$edi12, _s$goodsListState$edi13, _s$goodsListState$edi14, _s$goodsListState$edi15, _s$goodsListState$edi16;
26942
27001
 
26943
27002
  var between, editGood;
26944
27003
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -26977,7 +27036,7 @@ var DrawerBody$1 = function DrawerBody() {
26977
27036
  record.quantity = undefined;
26978
27037
  record.lineAmountExcludeTax = undefined;
26979
27038
  record.lineAmountIncludeTax = undefined;
26980
- console.log('s.goodsListState.editGood:', s.goodsListState.editGood); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
27039
+ console.log('s.goodsListState.editGood1:', s.goodsListState.editGood); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
26981
27040
  // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
26982
27041
  // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
26983
27042
  // 中间数据
@@ -26990,16 +27049,17 @@ var DrawerBody$1 = function DrawerBody() {
26990
27049
 
26991
27050
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between), {}, {
26992
27051
  itemModelName: (_s$goodsListState$edi = (_s$goodsListState$edi2 = s.goodsListState.editGood) === null || _s$goodsListState$edi2 === void 0 ? void 0 : _s$goodsListState$edi2.itemModelName) !== null && _s$goodsListState$edi !== void 0 ? _s$goodsListState$edi : between.itemModelName,
26993
- lineAmountExcludeTax: (_s$goodsListState$edi3 = (_s$goodsListState$edi4 = s.goodsListState.editGood) === null || _s$goodsListState$edi4 === void 0 ? void 0 : _s$goodsListState$edi4.lineAmountExcludeTax) !== null && _s$goodsListState$edi3 !== void 0 ? _s$goodsListState$edi3 : between.lineAmountExcludeTax,
26994
- lineAmountIncludeTax: (_s$goodsListState$edi5 = (_s$goodsListState$edi6 = s.goodsListState.editGood) === null || _s$goodsListState$edi6 === void 0 ? void 0 : _s$goodsListState$edi6.lineAmountIncludeTax) !== null && _s$goodsListState$edi5 !== void 0 ? _s$goodsListState$edi5 : between.lineAmountIncludeTax,
26995
- // lineAttribute:s.goodsListState.editGood?.lineAttribute,
26996
- priceExcludeTax: (_s$goodsListState$edi7 = (_s$goodsListState$edi8 = s.goodsListState.editGood) === null || _s$goodsListState$edi8 === void 0 ? void 0 : _s$goodsListState$edi8.priceExcludeTax) !== null && _s$goodsListState$edi7 !== void 0 ? _s$goodsListState$edi7 : between.priceExcludeTax,
26997
- priceIncludeTax: (_s$goodsListState$edi9 = (_s$goodsListState$edi10 = s.goodsListState.editGood) === null || _s$goodsListState$edi10 === void 0 ? void 0 : _s$goodsListState$edi10.priceIncludeTax) !== null && _s$goodsListState$edi9 !== void 0 ? _s$goodsListState$edi9 : between.priceIncludeTax,
26998
- quantity: (_s$goodsListState$edi11 = (_s$goodsListState$edi12 = s.goodsListState.editGood) === null || _s$goodsListState$edi12 === void 0 ? void 0 : _s$goodsListState$edi12.quantity) !== null && _s$goodsListState$edi11 !== void 0 ? _s$goodsListState$edi11 : between.quantity,
26999
- // serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27052
+ itemModelNameSelf: (_s$goodsListState$edi3 = (_s$goodsListState$edi4 = s.goodsListState.editGood) === null || _s$goodsListState$edi4 === void 0 ? void 0 : _s$goodsListState$edi4.itemModelNameSelf) !== null && _s$goodsListState$edi3 !== void 0 ? _s$goodsListState$edi3 : between.itemModelNameSelf,
27053
+ lineAmountExcludeTax: (_s$goodsListState$edi5 = (_s$goodsListState$edi6 = s.goodsListState.editGood) === null || _s$goodsListState$edi6 === void 0 ? void 0 : _s$goodsListState$edi6.lineAmountExcludeTax) !== null && _s$goodsListState$edi5 !== void 0 ? _s$goodsListState$edi5 : between.lineAmountExcludeTax,
27054
+ lineAmountIncludeTax: (_s$goodsListState$edi7 = (_s$goodsListState$edi8 = s.goodsListState.editGood) === null || _s$goodsListState$edi8 === void 0 ? void 0 : _s$goodsListState$edi8.lineAmountIncludeTax) !== null && _s$goodsListState$edi7 !== void 0 ? _s$goodsListState$edi7 : between.lineAmountIncludeTax,
27055
+ priceExcludeTax: (_s$goodsListState$edi9 = (_s$goodsListState$edi10 = s.goodsListState.editGood) === null || _s$goodsListState$edi10 === void 0 ? void 0 : _s$goodsListState$edi10.priceExcludeTax) !== null && _s$goodsListState$edi9 !== void 0 ? _s$goodsListState$edi9 : between.priceExcludeTax,
27056
+ priceIncludeTax: (_s$goodsListState$edi11 = (_s$goodsListState$edi12 = s.goodsListState.editGood) === null || _s$goodsListState$edi12 === void 0 ? void 0 : _s$goodsListState$edi12.priceIncludeTax) !== null && _s$goodsListState$edi11 !== void 0 ? _s$goodsListState$edi11 : between.priceIncludeTax,
27057
+ quantity: (_s$goodsListState$edi13 = (_s$goodsListState$edi14 = s.goodsListState.editGood) === null || _s$goodsListState$edi14 === void 0 ? void 0 : _s$goodsListState$edi14.quantity) !== null && _s$goodsListState$edi13 !== void 0 ? _s$goodsListState$edi13 : between.quantity,
27058
+ unit: (_s$goodsListState$edi15 = (_s$goodsListState$edi16 = s.goodsListState.editGood) === null || _s$goodsListState$edi16 === void 0 ? void 0 : _s$goodsListState$edi16.unit) !== null && _s$goodsListState$edi15 !== void 0 ? _s$goodsListState$edi15 : between.unit // serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27000
27059
  // taxAmount:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27001
27060
  // taxRate:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27002
- unit: (_s$goodsListState$edi13 = (_s$goodsListState$edi14 = s.goodsListState.editGood) === null || _s$goodsListState$edi14 === void 0 ? void 0 : _s$goodsListState$edi14.unit) !== null && _s$goodsListState$edi13 !== void 0 ? _s$goodsListState$edi13 : between.unit
27061
+ // lineAttribute:s.goodsListState.editGood?.lineAttribute,
27062
+
27003
27063
  });
27004
27064
 
27005
27065
  if (editGood.taxRate) {