Commit 2053bd7f by 陈桂东

提交代码

parent fef13132
...@@ -66,7 +66,6 @@ export struct AddWzin { ...@@ -66,7 +66,6 @@ export struct AddWzin {
options: [], options: [],
required: true required: true
}, },
{ title: "运单号", key: 'ydh', enabled: true, type: 'input' },
{ {
title: "发物管理单位", title: "发物管理单位",
key: 'fwgldwdm', key: 'fwgldwdm',
...@@ -91,6 +90,7 @@ export struct AddWzin { ...@@ -91,6 +90,7 @@ export struct AddWzin {
options: [], options: [],
required: true required: true
}, },
{ title: "运单号", key: 'ydh', enabled: true, type: 'input' },
{ title: "备注", key: 'dec', enabled: true, type: 'input' } { title: "备注", key: 'dec', enabled: true, type: 'input' }
] ]
...@@ -191,20 +191,24 @@ export struct AddWzin { ...@@ -191,20 +191,24 @@ export struct AddWzin {
ListItem() { ListItem() {
Column() { Column() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Row(){
if (item.required) { if (item.required) {
Text('*').fontColor('red').margin({ right: 5 }) Text('*').fontColor('red').margin({ right: 5 })
} }
Text(item.title) Text(item.title)
.fontSize(14) .fontSize(14)
.width("30%")
.height(40) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
}.width("35%")
if (item.type == 'select') { if (item.type == 'select') {
Select(item.options) Select(item.options)
.value(`请选择${item.title}`) .value(`请选择${item.title}`)
.width(230) .width(230)
.borderWidth(1) .borderWidth(1)
.borderRadius(5) .borderRadius(5)
.flexGrow(1)
.borderColor($r("app.color.rank_secondary_border")) .borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => { .onSelect((index: number, value?: string) => {
this.wzcrk[item.key] = item.options[index].id this.wzcrk[item.key] = item.options[index].id
...@@ -216,9 +220,9 @@ export struct AddWzin { ...@@ -216,9 +220,9 @@ export struct AddWzin {
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderColor("#454545") .borderColor("#454545")
.borderRadius(5) .borderRadius(5)
.width("70%")
.height(40) .height(40)
.padding(10) .padding(10)
.flexGrow(1)
.borderColor('#bcc5d7') .borderColor('#bcc5d7')
.borderWidth(1) .borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor") .backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
......
...@@ -84,7 +84,7 @@ export struct PzInfo { ...@@ -84,7 +84,7 @@ export struct PzInfo {
.width("30%") .width("30%")
.height(40) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
TextInput({ text: this.handleText(item.key) }) TextInput({ text: this.handleText(item.key),placeholder: `请输入${item.title}` })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderColor("#454545") .borderColor("#454545")
.borderRadius(5) .borderRadius(5)
......
...@@ -115,9 +115,11 @@ struct WzinDetail { ...@@ -115,9 +115,11 @@ struct WzinDetail {
Logger.info('保存的入库明细数据>>', JSON.stringify(this.wzmx)) Logger.info('保存的入库明细数据>>', JSON.stringify(this.wzmx))
if(this.isUpdate) { if(this.isUpdate) {
const crksl = this.wzmx.map(v => Number(v.crksl)).reduce((a, b) => a + b, 0)
await wzcrkModel.updateWcztByData(this.wzcrk.guid, { await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
dec: this.wzcrk.dec, dec: this.wzcrk.dec,
ydh: this.wzcrk.ydh, ydh: this.wzcrk.ydh,
crksl
}) })
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论