kts-component-invoice-operate 1.2.1 → 1.2.2
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 +11 -2
- package/dist/index.js +11 -2
- package/docs/index.md +1 -1
- package/package.json +1 -1
- package/src/Invoice/ui/Buyer/index.tsx +11 -4
package/dist/index.esm.js
CHANGED
|
@@ -5309,6 +5309,11 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
5309
5309
|
var model = controller.useMemo(function (s) {
|
|
5310
5310
|
return s.model;
|
|
5311
5311
|
}, []);
|
|
5312
|
+
/** 自动填充 */
|
|
5313
|
+
|
|
5314
|
+
var autoContainer = controller.useMemo(function (s) {
|
|
5315
|
+
return s.buyerState.autoContainer;
|
|
5316
|
+
}, []);
|
|
5312
5317
|
var formItem = React.useMemo(function () {
|
|
5313
5318
|
if (props.formItem) {
|
|
5314
5319
|
return props.formItem;
|
|
@@ -5316,7 +5321,11 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
5316
5321
|
return [{
|
|
5317
5322
|
id: 'buyerName',
|
|
5318
5323
|
label: '购买方名称',
|
|
5319
|
-
node: /*#__PURE__*/React.createElement(
|
|
5324
|
+
node: /*#__PURE__*/React.createElement(Input, {
|
|
5325
|
+
size: "small",
|
|
5326
|
+
autoComplete: "off",
|
|
5327
|
+
readOnly: model === 'prefab'
|
|
5328
|
+
}),
|
|
5320
5329
|
options: {
|
|
5321
5330
|
rules: [{
|
|
5322
5331
|
required: true,
|
|
@@ -5403,7 +5412,7 @@ var Main$2 = decorator(Form.create())(function (props) {
|
|
|
5403
5412
|
return /*#__PURE__*/React.createElement(Descriptions.Item, {
|
|
5404
5413
|
key: i,
|
|
5405
5414
|
label: getlabel(item)
|
|
5406
|
-
}, /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator(item.id, item.options)(item.id === 'buyerName' ? /*#__PURE__*/React.createElement(BuyerNameInput, null) : item.node)));
|
|
5415
|
+
}, /*#__PURE__*/React.createElement(Form.Item, null, getFieldDecorator(item.id, item.options)(autoContainer ? item.id === 'buyerName' ? /*#__PURE__*/React.createElement(BuyerNameInput, null) : item.node : item.node)));
|
|
5407
5416
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
5408
5417
|
className: "kts-invoice-operate-buyer-password"
|
|
5409
5418
|
}, /*#__PURE__*/React.createElement("div", {
|
package/dist/index.js
CHANGED
|
@@ -5319,6 +5319,11 @@ var Main$2 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
5319
5319
|
var model = controller.useMemo(function (s) {
|
|
5320
5320
|
return s.model;
|
|
5321
5321
|
}, []);
|
|
5322
|
+
/** 自动填充 */
|
|
5323
|
+
|
|
5324
|
+
var autoContainer = controller.useMemo(function (s) {
|
|
5325
|
+
return s.buyerState.autoContainer;
|
|
5326
|
+
}, []);
|
|
5322
5327
|
var formItem = React__default['default'].useMemo(function () {
|
|
5323
5328
|
if (props.formItem) {
|
|
5324
5329
|
return props.formItem;
|
|
@@ -5326,7 +5331,11 @@ var Main$2 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
5326
5331
|
return [{
|
|
5327
5332
|
id: 'buyerName',
|
|
5328
5333
|
label: '购买方名称',
|
|
5329
|
-
node: /*#__PURE__*/React__default['default'].createElement(
|
|
5334
|
+
node: /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Input, {
|
|
5335
|
+
size: "small",
|
|
5336
|
+
autoComplete: "off",
|
|
5337
|
+
readOnly: model === 'prefab'
|
|
5338
|
+
}),
|
|
5330
5339
|
options: {
|
|
5331
5340
|
rules: [{
|
|
5332
5341
|
required: true,
|
|
@@ -5413,7 +5422,7 @@ var Main$2 = GreyReactBox.decorator(ktsComponentsAntdX3.Form.create())(function
|
|
|
5413
5422
|
return /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Descriptions.Item, {
|
|
5414
5423
|
key: i,
|
|
5415
5424
|
label: getlabel(item)
|
|
5416
|
-
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator(item.id, item.options)(item.id === 'buyerName' ? /*#__PURE__*/React__default['default'].createElement(BuyerNameInput, null) : item.node)));
|
|
5425
|
+
}, /*#__PURE__*/React__default['default'].createElement(ktsComponentsAntdX3.Form.Item, null, getFieldDecorator(item.id, item.options)(autoContainer ? item.id === 'buyerName' ? /*#__PURE__*/React__default['default'].createElement(BuyerNameInput, null) : item.node : item.node)));
|
|
5417
5426
|
}))), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
5418
5427
|
className: "kts-invoice-operate-buyer-password"
|
|
5419
5428
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
package/docs/index.md
CHANGED
package/package.json
CHANGED
|
@@ -29,20 +29,23 @@ const Main = decorator<IBuyerProps, IBuyerProps & FormComponentProps>(
|
|
|
29
29
|
const controller = Invoice.useInvoiceController();
|
|
30
30
|
|
|
31
31
|
/** 组件模式 */
|
|
32
|
-
const model = controller.useMemo(s => s.model, [])
|
|
32
|
+
const model = controller.useMemo(s => s.model, []);
|
|
33
|
+
|
|
34
|
+
/** 自动填充 */
|
|
35
|
+
const autoContainer = controller.useMemo(s => s.buyerState.autoContainer, []);
|
|
33
36
|
|
|
34
37
|
const formItem = React.useMemo(() => {
|
|
35
38
|
if (props.formItem) {
|
|
36
39
|
return props.formItem;
|
|
37
40
|
} else {
|
|
38
41
|
return [
|
|
39
|
-
{ id: 'buyerName', label: '购买方名称', node: <
|
|
42
|
+
{ id: 'buyerName', label: '购买方名称', node: <Input size="small" autoComplete="off" readOnly={model === 'prefab'} />, options: { rules: [{ required: true, message: '不能为空' }] } },
|
|
40
43
|
{ id: 'buyerNo', label: '购买方纳税人识别号', node: <Input size="small" autoComplete="off" readOnly={model === 'prefab'} />, options: { rules: [{ required: true, message: '不能为空' }] } },
|
|
41
44
|
{ id: 'buyerAddress', label: '购买方地址及电话', node: <Input size="small" autoComplete="off" readOnly={model === 'prefab'} />, options: { rules: [{ required: true, message: '不能为空' }] } },
|
|
42
45
|
{ id: 'buyerBank', label: '购买方开户行及账号', node: <Input size="small" autoComplete="off" readOnly={model === 'prefab'} />, options: { rules: [{ required: true, message: '不能为空' }] } },
|
|
43
46
|
]
|
|
44
47
|
}
|
|
45
|
-
}, [props.formItem, model])
|
|
48
|
+
}, [props.formItem, model]);
|
|
46
49
|
|
|
47
50
|
/** 注册 form */
|
|
48
51
|
controller.useForm('buyer', form);
|
|
@@ -86,7 +89,11 @@ const Main = decorator<IBuyerProps, IBuyerProps & FormComponentProps>(
|
|
|
86
89
|
return (
|
|
87
90
|
<Descriptions.Item key={i} label={getlabel(item)}>
|
|
88
91
|
<Form.Item>
|
|
89
|
-
{getFieldDecorator(item.id, item.options)(
|
|
92
|
+
{getFieldDecorator(item.id, item.options)(
|
|
93
|
+
autoContainer
|
|
94
|
+
? item.id === 'buyerName' ? <BuyerNameInput /> : item.node
|
|
95
|
+
: item.node
|
|
96
|
+
)}
|
|
90
97
|
</Form.Item>
|
|
91
98
|
</Descriptions.Item>
|
|
92
99
|
)
|