Commit 54d0411d by peii

部分产品

parent c0ba2b65
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/category.tsx * @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/category.tsx
* @Author: peii * @Author: peii
* @Date: 2021-07-15 14:56:10 * @Date: 2021-07-15 14:56:10
* @LastEditTime: 2021-07-15 18:09:17 * @LastEditTime: 2021-07-16 17:46:00
* @LastEditors: peii * @LastEditors: peii
* @Vision: 1.0 * @Vision: 1.0
* @Description: 产品分类 * @Description: 产品分类
...@@ -21,16 +21,39 @@ import styles from './index.styl' ...@@ -21,16 +21,39 @@ import styles from './index.styl'
type IProps = { type IProps = {
productionStore: { productionStore: {
categories: ICategory[] categories: ICategory[]
activeCatetory: ICategory
setActiveCategory: (category: ICategory) => {}
} }
} }
class Category extends Component<IProps> { class Category extends Component<IProps> {
constructor(props) {
super(props)
}
/**
* @description: 分类点击操作
* @param {ICategory} category
* @return {*}
*/
categoryClickHandler(category: ICategory) {
if (
R.compose(
R.equals(category.categoryCode),
R.propOr('', 'categoryCode'),
)(this.props.productionStore.activeCatetory)
) {
return
}
this.props.productionStore.setActiveCategory(category)
}
render() { render() {
const categories = this.props.productionStore.categories const { categories, activeCatetory } = this.props.productionStore
return ( return (
<View style={g(styles, 'category')}> <View style={g(styles, 'category')}>
<ScrollView style={g(styles, 'category-scroll')}> <ScrollView style={g(styles, 'category-scroll')} showsVerticalScrollIndicator={false}>
{categories && {categories &&
categories.map(category => { categories.map(category => {
const icon = isNotBlank(category.categoryIcon) const icon = isNotBlank(category.categoryIcon)
...@@ -38,11 +61,32 @@ class Category extends Component<IProps> { ...@@ -38,11 +61,32 @@ class Category extends Component<IProps> {
: isNotBlank(category.categoryImage) : isNotBlank(category.categoryImage)
? { uri: category.categoryImage } ? { uri: category.categoryImage }
: '' : ''
const active = R.compose(R.equals(category.categoryCode), R.propOr('', 'categoryCode'))(activeCatetory)
return ( return (
<TouchableOpacity style={g(styles, 'category-item')} key={category.categoryCode}> <TouchableOpacity
style={g(styles, {
'category-item': true,
'category-item__no-icon': isBlank(icon),
'category-item__active': active,
})}
key={category.categoryCode}
onPress={() => {
this.categoryClickHandler(category)
}}
activeOpacity={1}
>
{isNotBlank(icon) && <Image source={icon} style={g(styles, 'category-item__icon')} />} {isNotBlank(icon) && <Image source={icon} style={g(styles, 'category-item__icon')} />}
<Text>{category.categoryName}</Text> <Text
numberOfLines={3}
style={g(styles, {
'category-item__text': true,
'category-item__text-no-icon': isBlank(icon),
'category-item__text__active': active,
})}
>
{category.categoryName}
</Text>
</TouchableOpacity> </TouchableOpacity>
) )
})} })}
......
/*
* @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/common.tsx
* @Author: peii
* @Date: 2021-07-16 17:04:20
* @LastEditTime: 2021-07-16 17:53:15
* @LastEditors: peii
* @Vision: 1.0
* @Description: 一些产品的通用组件
*/
// @ts-nocheck
import React, { Component } from 'react'
import { View, Text, Image } from 'react-native'
import { ISupplier } from 'bonehouse'
import * as R from 'ramda'
import { g, isBlank, isNotBlank } from '../../../utils/utils'
import styles from './index.styl'
import { IMAGE_PREFIX } from './constant'
import container from '../../../inversify'
import { TYPES } from '../../../inversify/types'
const store = container.get(TYPES.Store)
type ITextImageProps = {
size: string
image?: string
text?: string
colorNumber: string
}
/**
* @description: 文字图片
* @return {*}
*/
export function TextImage({ size, image, text, colorNumber }: ITextImageProps) {
const numClass = isNotBlank(colorNumber) ? `text-icon-${colorNumber}` : ''
const style = isNotBlank(size) ? { width: size, height: size } : {}
text = R.take(4, text)
return (
<View style="text-image">
{isBlank(image) ? (
<View style={[g(styles, 'text-image__text-icon', numClass), style]}>
<Text style={g(styles, 'text-image__text-icon-text', `${numClass}__text`)}>{text}</Text>
</View>
) : (
<Image
source={{ uri: store.host + IMAGE_PREFIX + image }}
style={[g(styles, 'text-image__icon'), style]}
resizeMode="contain"
/>
)}
</View>
)
}
...@@ -13,40 +13,44 @@ colors = { ...@@ -13,40 +13,44 @@ colors = {
width 100% width 100%
height 64px height 64px
padding 0px 20px padding 0px 20px
padding-left 10px
background-color foundation_color background-color foundation_color
margin-bottom 5px margin-bottom 5px
&-item &-item
width iconWidth width: iconWidth + 20px
height: iconWidth + 20px height: iconWidth + 20px
margin-right 20px padding 10px
padding-top 10px justify-content center
align-items center
border-bottom-width 2px
border-bottom-color transparent
&__active &__active
border-bottom-width 2px
border-bottom-color primary_color border-bottom-color primary_color
&__icon .text-image
width iconWidth &__icon
height iconWidth width iconWidth
height iconWidth
&__text-icon &__text-icon
width iconWidth width iconWidth
height iconWidth height iconWidth
borderRadius 22px borderRadius 22px
justify-content center justify-content center
align-items center align-items center
borderWidth 2px borderWidth 2px
&-text &-text
font-size 16px font-size 14px
font-family font_family_semibold font-family font_family_semibold
for i in 1 .. 50 for i in 1 .. 50
.text-icon-{i} .text-icon-{i}
borderColor hsl(i * 50, 50%, 50%) borderColor hsl(i * 50, 50%, 50%)
.text-icon__text-{i} .text-icon-{i}__text
color hsl(i * 30, 50%, 50%) color hsl(i * 30, 50%, 50%)
.category .category
...@@ -55,5 +59,34 @@ for i in 1 .. 50 ...@@ -55,5 +59,34 @@ for i in 1 .. 50
&-item &-item
height 60px height 60px
justify-content center padding-left 5px
padding 0 10px border-bottom-width 1px
\ No newline at end of file border-bottom-color rgba(0, 0, 0, 0.1)
@extend .row
@extend .center
&__no-icon
padding-left 15px
padding-right 10px
&__active
background-color foundation_color
&__icon
width 12px
height @width
margin-right 2px
&__text
font-size third_text_size
padding-right 5px
color second_text_color
font-family font_family_semibold
font-weight 400
&-no-icon
text-align center
&__active
color first_text_color
font-weight 700
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/index.tsx * @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/index.tsx
* @Author: peii * @Author: peii
* @Date: 2021-07-14 17:54:04 * @Date: 2021-07-14 17:54:04
* @LastEditTime: 2021-07-15 17:03:56 * @LastEditTime: 2021-07-16 16:39:13
* @LastEditors: peii * @LastEditors: peii
* @Vision: 1.0 * @Vision: 1.0
* @Description: 自助下单选择产品页面 * @Description: 自助下单选择产品页面
...@@ -21,11 +21,16 @@ import { g, getFormItem, isBlank, isNotBlank, show, translateSysprofile } from ' ...@@ -21,11 +21,16 @@ import { g, getFormItem, isBlank, isNotBlank, show, translateSysprofile } from '
import styles from './index.styl' import styles from './index.styl'
type IProps = { type IProps = {
store: {
setNavigation: (any) => void
}
productionStore: { productionStore: {
getSuppliers: (orgCode: string) => {} getSuppliers: (orgCode: string) => void
setOrgCode: (orgCode: string) => {} setOrgCode: (orgCode: string) => void
suppliers: ISupplier[] suppliers: ISupplier[]
getCategory: (manufacturerCode: string) => {} setActiveSupplier: ISupplier
getCategory: (manufacturerCode: string) => void
setActiveSupplier: (supplier: ISupplier) => void
} }
} }
...@@ -39,7 +44,11 @@ class Productions extends Component<IProps, IState> { ...@@ -39,7 +44,11 @@ class Productions extends Component<IProps, IState> {
} }
componentDidMount() { componentDidMount() {
this.initDatas() // TODO: 开发时加上延时,不然没token
this.props.store.setNavigation(this.props.navigation)
setTimeout(() => {
this.initDatas()
}, 0)
} }
/** /**
...@@ -47,11 +56,18 @@ class Productions extends Component<IProps, IState> { ...@@ -47,11 +56,18 @@ class Productions extends Component<IProps, IState> {
* @param {*} * @param {*}
* @return {*} * @return {*}
*/ */
async initDatas() { initDatas() {
const orgCode = this.props.navigation.getParam('orgCode') // const orgCode = this.props.navigation.getParam('orgCode')
const orgCode = 'A01'
const { suppliers, activeSupplier } = this.props.productionStore
this.props.productionStore.setOrgCode(orgCode) this.props.productionStore.setOrgCode(orgCode)
// 供应商信息 if (isBlank(suppliers)) {
this.props.productionStore.getSuppliers(orgCode) // 供应商信息
this.props.productionStore.getSuppliers(orgCode)
} else if (isBlank(activeSupplier)) {
this.props.productionStore.setActiveSupplier(R.head(suppliers))
}
} }
render() { render() {
...@@ -62,14 +78,14 @@ class Productions extends Component<IProps, IState> { ...@@ -62,14 +78,14 @@ class Productions extends Component<IProps, IState> {
{/* 页面头 */} {/* 页面头 */}
<Header title="选择产品" backCallback={() => navigation.goBack()} /> <Header title="选择产品" backCallback={() => navigation.goBack()} />
{/* 供应商 */} {/* 头部供应商 */}
<Supplier /> <Supplier />
{/* 产品分类 */} {/* 左侧产品分类 */}
<Category /> <Category />
</View> </View>
) )
} }
} }
export default inject('orgStore', 'orderStore', 'productionStore')(observer(Productions)) export default inject('store', 'orgStore', 'orderStore', 'productionStore')(observer(Productions))
/*
* @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/production.tsx
* @Author: peii
* @Date: 2021-07-16 15:36:02
* @LastEditTime: 2021-07-16 17:43:16
* @LastEditors: peii
* @Vision: 1.0
* @Description: 右侧产品列表
*/
// @ts-nocheck
import React, { Component } from 'react'
import { View, Text, ScrollView } from 'react-native'
import { inject, observer } from 'mobx-react'
import { ISupplier } from 'bonehouse'
import * as R from 'ramda'
import { g, getFormItem, isBlank, isNotBlank, show, translateSysprofile } from '../../../utils/utils'
import styles from './index.styl'
type IProps = {
productionStore: {
}
}
type IState = {}
class Production extends Component<IProps, IState> {
render() {
return <View style={g(styles, 'pro')}>
</View>
}
}
export default inject('productionStore')(observer(Production))
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/supplier.tsx * @FilePath: /BoneHouse_Business_APP/src/pages/order/productions/supplier.tsx
* @Author: peii * @Author: peii
* @Date: 2021-07-15 12:07:24 * @Date: 2021-07-15 12:07:24
* @LastEditTime: 2021-07-15 17:47:20 * @LastEditTime: 2021-07-16 17:44:43
* @LastEditors: peii * @LastEditors: peii
* @Vision: 1.0 * @Vision: 1.0
* @Description: 供应商列表 * @Description: 供应商列表
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import { View, Text, ScrollView, Image, TouchableOpacity } from 'react-native' import { View, Text, ScrollView, Image, TouchableOpacity } from 'react-native'
import { inject, observer } from 'mobx-react' import { inject, observer } from 'mobx-react'
import { ISupplier } from 'bonehouse' import { ISupplier, ICategory } from 'bonehouse'
import * as R from 'ramda' import * as R from 'ramda'
import { g, getFormItem, isBlank, isNotBlank, show, translateSysprofile } from '../../../utils/utils' import { g, isBlank, isNotBlank } from '../../../utils/utils'
import { IMAGE_PREFIX } from './constant' import { TextImage } from './common'
import styles from './index.styl' import styles from './index.styl'
type IProps = { type IProps = {
...@@ -24,8 +25,10 @@ type IProps = { ...@@ -24,8 +25,10 @@ type IProps = {
} }
productionStore: { productionStore: {
suppliers: ISupplier[] suppliers: ISupplier[]
setActiveSupplier: (supplier: ISupplier) => {} setActiveSupplier: (supplier: ISupplier) => void
activeSupplier: ISupplier activeSupplier: ISupplier
categories: ICategory[]
getCategory: (supplierCode: string) => void
} }
} }
...@@ -49,7 +52,20 @@ class Supplier extends Component<IProps> { ...@@ -49,7 +52,20 @@ class Supplier extends Component<IProps> {
} }
} }
supplierClickHandler(supplier) { /**
* @description: 供应商点击处理
* @param {*} supplier
* @return {*}
*/
supplierClickHandler(supplier: ISupplier) {
if (
R.compose(
R.equals(supplier.supplierCode),
R.propOr('', 'supplierCode'),
)(this.props.productionStore.activeSupplier)
) {
return
}
this.props.productionStore.setActiveSupplier(supplier) this.props.productionStore.setActiveSupplier(supplier)
} }
...@@ -72,24 +88,12 @@ class Supplier extends Component<IProps> { ...@@ -72,24 +88,12 @@ class Supplier extends Component<IProps> {
)(activeSupplier), )(activeSupplier),
})} })}
key={supplier.supplierCode} key={supplier.supplierCode}
touchableOpacity={0.8} activeOpacity={0.8}
onPress={() => { onPress={() => {
this.supplierClickHandler(supplier) this.supplierClickHandler(supplier)
}} }}
> >
{isBlank(icon) ? ( <TextImage size={42} colorNumber={index + 1} image={icon} text={supplier.supplierShortName} />
<View style={g(styles, 'suppliers-item__text-icon', `text-icon-${index + 1}`)}>
<Text style={g(styles, 'suppliers-item__text-icon-text', `text-icon__text-${index + 1}`)}>
{supplier.supplierShortName}
</Text>
</View>
) : (
<Image
source={{ uri: this.props.store.host + IMAGE_PREFIX + icon }}
style={g(styles, 'suppliers-item__icon')}
resizeMode="contain"
/>
)}
</TouchableOpacity> </TouchableOpacity>
) )
})} })}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @FilePath: /BoneHouse_Business_APP/src/pages/order/self.tsx * @FilePath: /BoneHouse_Business_APP/src/pages/order/self.tsx
* @Author: peii * @Author: peii
* @Date: 2021-07-13 22:40:12 * @Date: 2021-07-13 22:40:12
* @LastEditTime: 2021-07-15 10:26:50 * @LastEditTime: 2021-07-16 16:59:48
* @LastEditors: peii * @LastEditors: peii
* @Vision: 1.0 * @Vision: 1.0
* @Description: 自助下单 * @Description: 自助下单
...@@ -62,6 +62,10 @@ type IProps = { ...@@ -62,6 +62,10 @@ type IProps = {
getInventories: Function getInventories: Function
submit: Function submit: Function
} }
productionStore: {
resetCategory: () => void
resetSupplier: () => void
}
} }
type IState = { type IState = {
...@@ -236,6 +240,11 @@ class SelfOrder extends Component<IProps, IState> { ...@@ -236,6 +240,11 @@ class SelfOrder extends Component<IProps, IState> {
this.setOptionsFormItems() this.setOptionsFormItems()
} }
componentWillUnmount() {
this.props.productionStore.resetSupplier()
this.props.productionStore.resetCategory()
}
/** /**
* @description: 设置配置性的表单字段(部门,业务经理,跟台员,送货员) * @description: 设置配置性的表单字段(部门,业务经理,跟台员,送货员)
*/ */
...@@ -551,4 +560,4 @@ class SelfOrder extends Component<IProps, IState> { ...@@ -551,4 +560,4 @@ class SelfOrder extends Component<IProps, IState> {
} }
} }
export default inject('sysStore', 'userStore', 'orgStore', 'orderStore')(observer(SelfOrder)) export default inject('sysStore', 'userStore', 'orgStore', 'orderStore', 'productionStore')(observer(SelfOrder))
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
import { request } from './request' import { request } from './request'
import { injectable } from 'inversify' import { injectable } from 'inversify'
import { IPackageType } from 'bonehouse'
const ctx = '/api/latest' const ctx = '/api/latest'
...@@ -155,11 +156,38 @@ export default class Service { ...@@ -155,11 +156,38 @@ export default class Service {
} }
/** /**
* @description: * @description: 请求产品分类
* @param {object} data * @param {object} data
* @return {*} * @return {*}
*/ */
getProductionCategories(data: { manufacturerCode: string }) { getProductionCategories(data: { manufacturerCode: string }) {
return request({ url: `${ctx}/order/item/search`, data }) return request({ url: `${ctx}/order/item/search`, data })
} }
/**
* @description: 请求容器(工具包或钉盒)
* @param {any} data
* @return {*}
*/
getItemPackage(data: { manufacturerCode: string; categoryCode: IPackageType }) {
return request({ url: `${ctx}/inventory/item_package_header/search`, data })
}
/**
* @description: 请求零散工具
* @param {object} data
* @return {*}
*/
getTools(data: { manufacturerCode: string }) {
return request({ url: `${ctx}/order/tool/search`, data })
}
/**
* @description: 请求产品耗材
* @param {any} data
* @return {*}
*/
getItemDetail(data: { categoryCode: string; manufacturerCode: string; orgCode: string }) {
return request({ url: `${ctx}/order/item_detail/search`, data })
}
} }
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
* @FilePath: /BoneHouse_Business_APP/src/stores/production.ts * @FilePath: /BoneHouse_Business_APP/src/stores/production.ts
* @Author: peii * @Author: peii
* @Date: 2021-07-15 10:49:02 * @Date: 2021-07-15 10:49:02
* @LastEditTime: 2021-07-15 18:02:56 * @LastEditTime: 2021-07-16 18:12:13
* @LastEditors: peii * @LastEditors: peii
* @Vision: 1.0 * @Vision: 1.0
* @Description: 产品store * @Description: 产品store
* @ts-nocheck
*/ */
// @ts-nocheck
import { observable, action, runInAction, toJS, flow, computed, ObservableMap } from 'mobx' import { observable, action, runInAction, toJS, flow, computed, ObservableMap } from 'mobx'
import { persist } from 'mobx-persist' import { persist } from 'mobx-persist'
import { injectable, inject } from 'inversify' import { injectable, inject } from 'inversify'
...@@ -46,6 +46,27 @@ export default class Production { ...@@ -46,6 +46,27 @@ export default class Production {
}, },
] ]
showFields = {
// 手术模板显示
SURGERY_TEMPLATE: [
{ field: 'templateName', label: '', type: 'title' },
{ field: 'customerName', label: '客户', style: 'production-item__text-big' },
{ field: 'doctorName', label: '手术医生' },
{ field: 'surgeryTypeName', label: '手术类型' },
{ field: 'templateDesc', label: '模板说明', style: 'production-item__text-small' },
],
package: [
{ field: 'templateName', label: '', type: 'title' },
{ field: 'customerName', label: '客户', style: 'production-item__text-big' },
{ field: 'doctorName', label: '手术医生' },
{ field: 'surgeryTypeName', label: '手术类型' },
],
}
imageFields = {
}
@observable orgCode: string = '' @observable orgCode: string = ''
@observable activeSupplier!: ISupplier @observable activeSupplier!: ISupplier
@observable activeCatetory!: ICategory @observable activeCatetory!: ICategory
...@@ -58,6 +79,10 @@ export default class Production { ...@@ -58,6 +79,10 @@ export default class Production {
@observable @observable
_categories: ObservableMap<string, ICategory[]> = new ObservableMap() _categories: ObservableMap<string, ICategory[]> = new ObservableMap()
@persist('map')
@observable
_productions: ObservableMap<string, any[]> = new ObservableMap()
@computed @computed
get suppliers() { get suppliers() {
return isNotBlank(this.orgCode) ? this._suppliers.get(this.orgCode) : [] return isNotBlank(this.orgCode) ? this._suppliers.get(this.orgCode) : []
...@@ -72,6 +97,11 @@ export default class Production { ...@@ -72,6 +97,11 @@ export default class Production {
} }
} }
@computed
get productions() {
return []
}
@action @action
setOrgCode(orgCode: string) { setOrgCode(orgCode: string) {
this.orgCode = orgCode this.orgCode = orgCode
...@@ -80,6 +110,39 @@ export default class Production { ...@@ -80,6 +110,39 @@ export default class Production {
@action @action
setActiveSupplier(supplier: ISupplier) { setActiveSupplier(supplier: ISupplier) {
this.activeSupplier = supplier this.activeSupplier = supplier
// 选择完供应商后,看当前有没有产品类别,没有就请求,有且没有已选择的类别,选第一个
if (isBlank(this.categories)) {
this.getCategory(supplier.supplierCode)
} else if (
isBlank(this.activeCatetory) ||
R.compose(
R.complement(R.includes)(this.activeCatetory.categoryCode),
R.pluck('categoryCode'),
)(this.defaultCategories)
) {
this.setActiveCategory(R.head(this.categories as any) as any)
}
}
@action
setActiveCategory(category: ICategory) {
this.activeCatetory = category
if (isBlank(this.productions)) {
this.getProductions()
}
}
@action
resetSupplier() {
this._suppliers = new ObservableMap()
this.activeSupplier = null
}
@action
resetCategory() {
this._categories = new ObservableMap()
this.activeCatetory = null
} }
/** /**
...@@ -102,7 +165,6 @@ export default class Production { ...@@ -102,7 +165,6 @@ export default class Production {
if (isNotBlank(suppliers)) { if (isNotBlank(suppliers)) {
this.setActiveSupplier(R.head(suppliers as any) as any) this.setActiveSupplier(R.head(suppliers as any) as any)
this.getCategory(this.activeSupplier.supplierCode)
} }
}) })
...@@ -121,5 +183,92 @@ export default class Production { ...@@ -121,5 +183,92 @@ export default class Production {
const categories = R.concat(R.clone(this.defaultCategories), res.data.item) const categories = R.concat(R.clone(this.defaultCategories), res.data.item)
this._categories.set(manufacturerCode, categories) this._categories.set(manufacturerCode, categories)
this.setActiveCategory(R.head(categories))
})
/**
* @description: 请求产品总入口方法
* @param {*}
* @return {*}
*/
getProductions() {
if (isBlank(this.orgCode) || isBlank(this.activeSupplier)) return
switch (this.activeCatetory.categoryCode) {
// 手术模板
case 'SURGERY_TEMPLATE':
this.getSurgeryTemplates()
break
// 手术模板
case '1301':
case '1302':
this.getPackages()
break
// 零散器械
case 'SCATTERED_EQUIPMENT':
this.getTools()
break
// 骨科耗材
default:
this.getItemDetail()
break
}
}
/**
* @description: 请求手术模板
* @param {*} function
* @return {*}
*/
getSurgeryTemplates = flow(function* (this: Production) {
const params = {
orgCode: this.orgCode,
manufacturerCode: this.activeSupplier.supplierCode,
}
const res = yield this.service.getSurgeryTemplates(params)
console.log(res)
})
/**
* @description: 请求工具包
* @return {*}
*/
getPackages = flow(function* (this: Production) {
const params = {
manufacturerCode: this.activeSupplier.supplierCode,
categoryCode: this.activeCatetory.categoryCode,
}
const res = yield this.service.getItemPackage(params)
console.log(res)
})
/**
* @description: 零散工具
* @return {*}
*/
getTools = flow(function* (this: Production) {
const params = {
manufacturerCode: this.activeSupplier.supplierCode,
}
const res = yield this.service.getTools(params)
console.log(res)
})
/**
* @description: 耗材
* @return {*}
*/
getItemDetail = flow(function* (this: Production) {
const params = {
orgCode: this.orgCode,
manufacturerCode: this.activeSupplier.supplierCode,
categoryCode: this.activeCatetory.categoryCode,
}
const res = yield this.service.getItemDetail(params)
console.log(res)
}) })
} }
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
declare module 'bonehouse' { declare module 'bonehouse' {
export type EnumType = { [s: string]: any } export type EnumType = { [s: string]: any }
export type IPackageType = '1301' | '1302'
export type IDepartment = { export type IDepartment = {
departmentCode: string departmentCode: string
departmentName: string departmentName: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment