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

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
@@ -9911,7 +9911,22 @@ var importGoodsDrawer = /*#__PURE__*/(function () {
9911
9911
  between.lineAmountIncludeTax = record.lineAmountIncludeTax;
9912
9912
  between.lineAmountExcludeTax = record.lineAmountExcludeTax;
9913
9913
  between.taxRate = record.taxRate;
9914
- between.taxAmount = record.taxAmount; // 设置编辑货物
9914
+ between.taxAmount = record.taxAmount; // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
9915
+ // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
9916
+ // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
9917
+ // between.itemCode = record.itemCode;
9918
+ // between.shorthand = record.shorthand;
9919
+ // between.itemName = record.itemName;
9920
+ // between.itemNameOther = record.itemName;
9921
+ // between.itemModelName = s.goodsListState.editGood?.itemModelName ?? record.itemModelName;
9922
+ // between.unit = s.goodsListState.editGood?.itemModelName ?? record.unit;
9923
+ // between.quantity = s.goodsListState.editGood?.itemModelName ?? record.quantity;
9924
+ // between.priceIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.priceIncludeTax;
9925
+ // between.lineAmountIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountIncludeTax;
9926
+ // between.lineAmountExcludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountExcludeTax;
9927
+ // between.taxRate = s.goodsListState.editGood?.itemModelName ?? record.taxRate;
9928
+ // between.taxAmount = s.goodsListState.editGood?.itemModelName ?? record.taxAmount;
9929
+ // 设置编辑货物
9915
9930
 
9916
9931
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
9917
9932
 
@@ -14120,7 +14135,10 @@ var useColumns = (function (form) {
14120
14135
  while (1) {
14121
14136
  switch (_context10.prev = _context10.next) {
14122
14137
  case 0:
14123
- // await controller.wait();
14138
+ _context10.next = 2;
14139
+ return controller.wait();
14140
+
14141
+ case 2:
14124
14142
  // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
14125
14143
  // const isvalue = !!value || value === 0;
14126
14144
  // if (isvalue || isQuantity === isvalue) return;
@@ -14130,29 +14148,29 @@ var useColumns = (function (form) {
14130
14148
  isValueValid = value !== undefined && value !== null && value !== '';
14131
14149
 
14132
14150
  if (!(isValueValid && isQuantityValid)) {
14133
- _context10.next = 5;
14151
+ _context10.next = 7;
14134
14152
  break;
14135
14153
  }
14136
14154
 
14137
14155
  return _context10.abrupt("return");
14138
14156
 
14139
- case 5:
14157
+ case 7:
14140
14158
  if (isValueValid) {
14141
- _context10.next = 7;
14159
+ _context10.next = 9;
14142
14160
  break;
14143
14161
  }
14144
14162
 
14145
14163
  return _context10.abrupt("return", callback('金额不能为空'));
14146
14164
 
14147
- case 7:
14165
+ case 9:
14148
14166
  if (isQuantityValid) {
14149
- _context10.next = 9;
14167
+ _context10.next = 11;
14150
14168
  break;
14151
14169
  }
14152
14170
 
14153
14171
  return _context10.abrupt("return", callback('数量不能为空'));
14154
14172
 
14155
- case 9:
14173
+ case 11:
14156
14174
  case "end":
14157
14175
  return _context10.stop();
14158
14176
  }
@@ -26938,7 +26956,7 @@ var DrawerBody$1 = function DrawerBody() {
26938
26956
  onClick: function onClick() {
26939
26957
  controller.run( /*#__PURE__*/function () {
26940
26958
  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;
26959
+ 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
26960
 
26943
26961
  var between, editGood;
26944
26962
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -26976,30 +26994,31 @@ var DrawerBody$1 = function DrawerBody() {
26976
26994
  // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
26977
26995
  record.quantity = undefined;
26978
26996
  record.lineAmountExcludeTax = undefined;
26979
- record.lineAmountIncludeTax = undefined;
26980
- console.log('s.goodsListState.editGood:', s.goodsListState.editGood); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
26997
+ record.lineAmountIncludeTax = undefined; // console.log('s.goodsListState.editGood1:', s.goodsListState.editGood);
26998
+ // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
26981
26999
  // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
26982
27000
  // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
26983
27001
  // 中间数据
26984
27002
 
26985
- between = _objectSpread2({}, record);
26986
- console.log(':between:', between);
27003
+ between = _objectSpread2({}, record); // console.log(':between:', between);
27004
+
26987
27005
  between.itemName = getItemName(record, s.goodsListState.editGood);
26988
27006
  between.itemCode = getItemCode(record, s.goodsListState.editGood);
26989
27007
  between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood); // 设置编辑货物
26990
27008
 
26991
27009
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between), {}, {
26992
27010
  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,
27011
+ 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,
27012
+ 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,
27013
+ 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,
27014
+ 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,
27015
+ 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,
27016
+ 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,
27017
+ 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
27018
  // taxAmount:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27001
27019
  // 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
27020
+ // lineAttribute:s.goodsListState.editGood?.lineAttribute,
27021
+
27003
27022
  });
27004
27023
 
27005
27024
  if (editGood.taxRate) {
@@ -27033,22 +27052,22 @@ var DrawerBody$1 = function DrawerBody() {
27033
27052
  s.goodsListState.importGoods.isVisibleDrawer = false;
27034
27053
 
27035
27054
  if (!s.goodsListState.isTaxIncluded) {
27036
- _context2.next = 28;
27055
+ _context2.next = 26;
27037
27056
  break;
27038
27057
  }
27039
27058
 
27040
- _context2.next = 26;
27059
+ _context2.next = 24;
27041
27060
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
27042
27061
 
27043
- case 26:
27044
- _context2.next = 30;
27062
+ case 24:
27063
+ _context2.next = 28;
27045
27064
  break;
27046
27065
 
27047
- case 28:
27048
- _context2.next = 30;
27066
+ case 26:
27067
+ _context2.next = 28;
27049
27068
  return updateUnitPriceTax(controller, s.goodsListState.form, record);
27050
27069
 
27051
- case 30:
27070
+ case 28:
27052
27071
  case "end":
27053
27072
  return _context2.stop();
27054
27073
  }
package/dist/index.js CHANGED
@@ -9921,7 +9921,22 @@ var importGoodsDrawer = /*#__PURE__*/(function () {
9921
9921
  between.lineAmountIncludeTax = record.lineAmountIncludeTax;
9922
9922
  between.lineAmountExcludeTax = record.lineAmountExcludeTax;
9923
9923
  between.taxRate = record.taxRate;
9924
- between.taxAmount = record.taxAmount; // 设置编辑货物
9924
+ between.taxAmount = record.taxAmount; // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
9925
+ // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
9926
+ // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
9927
+ // between.itemCode = record.itemCode;
9928
+ // between.shorthand = record.shorthand;
9929
+ // between.itemName = record.itemName;
9930
+ // between.itemNameOther = record.itemName;
9931
+ // between.itemModelName = s.goodsListState.editGood?.itemModelName ?? record.itemModelName;
9932
+ // between.unit = s.goodsListState.editGood?.itemModelName ?? record.unit;
9933
+ // between.quantity = s.goodsListState.editGood?.itemModelName ?? record.quantity;
9934
+ // between.priceIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.priceIncludeTax;
9935
+ // between.lineAmountIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountIncludeTax;
9936
+ // between.lineAmountExcludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountExcludeTax;
9937
+ // between.taxRate = s.goodsListState.editGood?.itemModelName ?? record.taxRate;
9938
+ // between.taxAmount = s.goodsListState.editGood?.itemModelName ?? record.taxAmount;
9939
+ // 设置编辑货物
9925
9940
 
9926
9941
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between);
9927
9942
 
@@ -14130,7 +14145,10 @@ var useColumns = (function (form) {
14130
14145
  while (1) {
14131
14146
  switch (_context10.prev = _context10.next) {
14132
14147
  case 0:
14133
- // await controller.wait();
14148
+ _context10.next = 2;
14149
+ return controller.wait();
14150
+
14151
+ case 2:
14134
14152
  // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
14135
14153
  // const isvalue = !!value || value === 0;
14136
14154
  // if (isvalue || isQuantity === isvalue) return;
@@ -14140,29 +14158,29 @@ var useColumns = (function (form) {
14140
14158
  isValueValid = value !== undefined && value !== null && value !== '';
14141
14159
 
14142
14160
  if (!(isValueValid && isQuantityValid)) {
14143
- _context10.next = 5;
14161
+ _context10.next = 7;
14144
14162
  break;
14145
14163
  }
14146
14164
 
14147
14165
  return _context10.abrupt("return");
14148
14166
 
14149
- case 5:
14167
+ case 7:
14150
14168
  if (isValueValid) {
14151
- _context10.next = 7;
14169
+ _context10.next = 9;
14152
14170
  break;
14153
14171
  }
14154
14172
 
14155
14173
  return _context10.abrupt("return", callback('金额不能为空'));
14156
14174
 
14157
- case 7:
14175
+ case 9:
14158
14176
  if (isQuantityValid) {
14159
- _context10.next = 9;
14177
+ _context10.next = 11;
14160
14178
  break;
14161
14179
  }
14162
14180
 
14163
14181
  return _context10.abrupt("return", callback('数量不能为空'));
14164
14182
 
14165
- case 9:
14183
+ case 11:
14166
14184
  case "end":
14167
14185
  return _context10.stop();
14168
14186
  }
@@ -26948,7 +26966,7 @@ var DrawerBody$1 = function DrawerBody() {
26948
26966
  onClick: function onClick() {
26949
26967
  controller.run( /*#__PURE__*/function () {
26950
26968
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(s) {
26951
- 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;
26969
+ 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;
26952
26970
 
26953
26971
  var between, editGood;
26954
26972
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
@@ -26986,30 +27004,31 @@ var DrawerBody$1 = function DrawerBody() {
26986
27004
  // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
26987
27005
  record.quantity = undefined;
26988
27006
  record.lineAmountExcludeTax = undefined;
26989
- record.lineAmountIncludeTax = undefined;
26990
- console.log('s.goodsListState.editGood:', s.goodsListState.editGood); // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
27007
+ record.lineAmountIncludeTax = undefined; // console.log('s.goodsListState.editGood1:', s.goodsListState.editGood);
27008
+ // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
26991
27009
  // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
26992
27010
  // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
26993
27011
  // 中间数据
26994
27012
 
26995
- between = _objectSpread2({}, record);
26996
- console.log(':between:', between);
27013
+ between = _objectSpread2({}, record); // console.log(':between:', between);
27014
+
26997
27015
  between.itemName = getItemName(record, s.goodsListState.editGood);
26998
27016
  between.itemCode = getItemCode(record, s.goodsListState.editGood);
26999
27017
  between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood); // 设置编辑货物
27000
27018
 
27001
27019
  editGood = s.goodsListState.editGood = _objectSpread2(_objectSpread2(_objectSpread2({}, s.goodsListState.editGood), between), {}, {
27002
27020
  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,
27003
- 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,
27004
- 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,
27005
- // lineAttribute:s.goodsListState.editGood?.lineAttribute,
27006
- 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,
27007
- 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,
27008
- 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,
27009
- // serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27021
+ 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,
27022
+ 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,
27023
+ 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,
27024
+ 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,
27025
+ 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,
27026
+ 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,
27027
+ 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,
27010
27028
  // taxAmount:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27011
27029
  // taxRate:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
27012
- 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
27030
+ // lineAttribute:s.goodsListState.editGood?.lineAttribute,
27031
+
27013
27032
  });
27014
27033
 
27015
27034
  if (editGood.taxRate) {
@@ -27043,22 +27062,22 @@ var DrawerBody$1 = function DrawerBody() {
27043
27062
  s.goodsListState.importGoods.isVisibleDrawer = false;
27044
27063
 
27045
27064
  if (!s.goodsListState.isTaxIncluded) {
27046
- _context2.next = 28;
27065
+ _context2.next = 26;
27047
27066
  break;
27048
27067
  }
27049
27068
 
27050
- _context2.next = 26;
27069
+ _context2.next = 24;
27051
27070
  return updateUnitPriceExcludingTax(controller, s.goodsListState.form, record);
27052
27071
 
27053
- case 26:
27054
- _context2.next = 30;
27072
+ case 24:
27073
+ _context2.next = 28;
27055
27074
  break;
27056
27075
 
27057
- case 28:
27058
- _context2.next = 30;
27076
+ case 26:
27077
+ _context2.next = 28;
27059
27078
  return updateUnitPriceTax(controller, s.goodsListState.form, record);
27060
27079
 
27061
- case 30:
27080
+ case 28:
27062
27081
  case "end":
27063
27082
  return _context2.stop();
27064
27083
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kts-component-invoice-operate",
3
- "version": "3.2.181-7",
3
+ "version": "3.2.181-9",
4
4
  "scripts": {
5
5
  "dev": "dumi dev --max-old-space-size=6096",
6
6
  "start": "dumi dev",
@@ -10,8 +10,7 @@ export default async (s: InvoiceControllerState, record: any, controller:any) =>
10
10
  Object.keys(record).filter(e => !record[e] && record[e] !== 0).forEach(e => { delete record[e] });
11
11
 
12
12
  // 没用 被编辑的货物 和 form 就退出
13
- if (!s.goodsListState.editGood || !s.goodsListState.form) return;
14
-
13
+ if (!s.goodsListState.editGood || !s.goodsListState.form) return;
15
14
  // 导入时清空之前输入的值,使用导入的单价和税率(参考税局系统)
16
15
  record.quantity = undefined;
17
16
  record.lineAmountExcludeTax = undefined;
@@ -33,6 +32,23 @@ export default async (s: InvoiceControllerState, record: any, controller:any) =>
33
32
  between.taxRate = record.taxRate;
34
33
  between.taxAmount = record.taxAmount;
35
34
 
35
+ // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
36
+ // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
37
+ // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
38
+ // between.itemCode = record.itemCode;
39
+ // between.shorthand = record.shorthand;
40
+ // between.itemName = record.itemName;
41
+ // between.itemNameOther = record.itemName;
42
+
43
+ // between.itemModelName = s.goodsListState.editGood?.itemModelName ?? record.itemModelName;
44
+ // between.unit = s.goodsListState.editGood?.itemModelName ?? record.unit;
45
+ // between.quantity = s.goodsListState.editGood?.itemModelName ?? record.quantity;
46
+ // between.priceIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.priceIncludeTax;
47
+ // between.lineAmountIncludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountIncludeTax;
48
+ // between.lineAmountExcludeTax = s.goodsListState.editGood?.itemModelName ?? record.lineAmountExcludeTax;
49
+ // between.taxRate = s.goodsListState.editGood?.itemModelName ?? record.taxRate;
50
+ // between.taxAmount = s.goodsListState.editGood?.itemModelName ?? record.taxAmount;
51
+
36
52
  // 设置编辑货物
37
53
  const editGood: IGood = s.goodsListState.editGood = { ...s.goodsListState.editGood, ...between };
38
54
 
@@ -380,7 +380,7 @@ export default (form: WrappedFormUtils) => {
380
380
  { pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/, message: '单价必须为数字' },
381
381
  {
382
382
  validator: async (_, value, callback) => {
383
- // await controller.wait();
383
+ await controller.wait();
384
384
  // const isQuantity = !!getFieldValue('quantity') || getFieldValue('quantity') === 0;
385
385
  // const isvalue = !!value || value === 0;
386
386
  // if (isvalue || isQuantity === isvalue) return;
@@ -76,15 +76,14 @@ const DrawerBody = () => {
76
76
  record.lineAmountExcludeTax = undefined;
77
77
  record.lineAmountIncludeTax = undefined;
78
78
 
79
- console.log('s.goodsListState.editGood:', s.goodsListState.editGood);
80
- // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
81
-
79
+ // console.log('s.goodsListState.editGood1:', s.goodsListState.editGood);
80
+ // 光电定制化功能:无论是否有值都替换 itemCode, itemName, shorthand, taxCategoryCode, taxClassificationCode;
82
81
  // 如果其他输入框有值就不替换,没值就替换:itemModelName, lineAmountExcludeTax, lineAmountIncludeTax,lineAttribute,priceExcludeTax,
83
82
  // priceIncludeTax,quantity, serialNo, taxAmount, taxRate, unit
84
83
 
85
84
  // 中间数据
86
85
  const between = { ...record };
87
- console.log(':between:', between);
86
+ // console.log(':between:', between);
88
87
  between.itemName = getItemName(record, s.goodsListState.editGood);
89
88
  between.itemCode = getItemCode(record, s.goodsListState.editGood);
90
89
  between.itemNameOther = getItemNameOther(record, s.goodsListState.editGood);
@@ -95,16 +94,17 @@ const DrawerBody = () => {
95
94
  // itemModelNameSelf: undefined,
96
95
  ...between,
97
96
  itemModelName:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
97
+ itemModelNameSelf:s.goodsListState.editGood?.itemModelNameSelf ?? between.itemModelNameSelf,
98
98
  lineAmountExcludeTax:s.goodsListState.editGood?.lineAmountExcludeTax ?? between.lineAmountExcludeTax,
99
99
  lineAmountIncludeTax:s.goodsListState.editGood?.lineAmountIncludeTax ?? between.lineAmountIncludeTax,
100
- // lineAttribute:s.goodsListState.editGood?.lineAttribute,
101
100
  priceExcludeTax:s.goodsListState.editGood?.priceExcludeTax ?? between.priceExcludeTax,
102
101
  priceIncludeTax:s.goodsListState.editGood?.priceIncludeTax ?? between.priceIncludeTax,
103
102
  quantity:s.goodsListState.editGood?.quantity ?? between.quantity,
103
+ unit:s.goodsListState.editGood?.unit ?? between.unit,
104
104
  // serialNo:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
105
105
  // taxAmount:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
106
106
  // taxRate:s.goodsListState.editGood?.itemModelName ?? between.itemModelName,
107
- unit:s.goodsListState.editGood?.unit ?? between.unit,
107
+ // lineAttribute:s.goodsListState.editGood?.lineAttribute,
108
108
  };
109
109
 
110
110
  if (editGood.taxRate) {