Commit 5651166a by huangqy

修修补补

parent 727109a0
...@@ -54,8 +54,9 @@ WHERE ...@@ -54,8 +54,9 @@ WHERE
* @param kfdm 库房代码 * @param kfdm 库房代码
*/ */
static getRecommendHwSql(pmguid, kfdm): string { static getRecommendHwSql(pmguid, kfdm): string {
let sql_val = `SELECT tjhw.*,hw.hwh from HW_PROJECT_TABLE tjhw left join tab_bzgl_knzy_app_hwb hw on tjhw.hwguid = hw.guid left join TAB_BZGL_KNZY_APP_HJB hj ON tjhw.hjguid=hj.guid left join TAB_BZGL_KNZY_APP_QYB qy on hj.qyguid=qy.guid where tjhw.pmguid='${pmguid}' and qy.kfguid in (select guid from TAB_BZGL_KNZY_APP_DWKF where kfdm = '${kfdm}' )` const sql =
return sql_val `SELECT tjhw.*,hw.hwh from HW_PROJECT_TABLE tjhw left join tab_bzgl_knzy_app_hwb hw on tjhw.hwguid = hw.guid left join TAB_BZGL_KNZY_APP_HJB hj ON tjhw.hjguid=hj.guid left join TAB_BZGL_KNZY_APP_QYB qy on hj.qyguid=qy.guid where tjhw.pmguid=${isEmpty(pmguid)} and qy.kfguid in (select guid from TAB_BZGL_KNZY_APP_DWKF where kfdm = ${isEmpty(kfdm)} )`
return sql
} }
/** /**
......
...@@ -42,6 +42,7 @@ export struct WzInfo { ...@@ -42,6 +42,7 @@ export struct WzInfo {
@Link pzForm: PzFormClass @Link pzForm: PzFormClass
@State currentDw: string = '' @State currentDw: string = ''
@State kfmc: string = '' @State kfmc: string = ''
@State rkkfmc: string = ''
@ObjectLink wzcrk: WzClass @ObjectLink wzcrk: WzClass
getDetail: (wzpm?: string) => void getDetail: (wzpm?: string) => void
scanInfoDialog: CustomDialogController = new CustomDialogController({ scanInfoDialog: CustomDialogController = new CustomDialogController({
...@@ -125,6 +126,13 @@ export struct WzInfo { ...@@ -125,6 +126,13 @@ export struct WzInfo {
} }
} }
handleSwitchChange(isOn) {
this.currentModel = isOn
this.pzForm.hwh = ''
this.pzForm.hjguid = ''
this.currentHwh = ''
}
// 页面初始化 // 页面初始化
aboutToAppear() { aboutToAppear() {
this.pzxqGuild = this.wzcrk.guid this.pzxqGuild = this.wzcrk.guid
...@@ -154,8 +162,11 @@ export struct WzInfo { ...@@ -154,8 +162,11 @@ export struct WzInfo {
const res1 = await gldwModel.queryByData({ dwdm: this.wzcrk.sfdw }) const res1 = await gldwModel.queryByData({ dwdm: this.wzcrk.sfdw })
this.currentDw = res1[0].dwfh ?? '' this.currentDw = res1[0].dwfh ?? ''
// 获取库房名称 // 获取库房名称
const res = await kfModel.query({ guid: this.wzcrk.kfguid }) const res = await kfModel.query({})
this.kfmc = res[0].kfmc ?? '' this.kfmc = res.find(i => i.kfdm == this.wzcrk.kfdm).kfmc || ''
if (this.wzcrk.rkkfdm) { /// 如果存在入库库房代码
this.rkkfmc = res.find(i => i.kfdm == this.wzcrk.rkkfdm).kfmc || ''
}
} }
/*** /***
...@@ -212,7 +223,6 @@ export struct WzInfo { ...@@ -212,7 +223,6 @@ export struct WzInfo {
} }
// } // }
this.pzForm.hwh = res.data[0].hwh this.pzForm.hwh = res.data[0].hwh
// @ts-ignore
this.pzForm.hjguid = res.data[0].hjguid this.pzForm.hjguid = res.data[0].hjguid
this.currentHwh = res.data[0].hwh this.currentHwh = res.data[0].hwh
Prompt.showToast({ Prompt.showToast({
...@@ -253,7 +263,6 @@ export struct WzInfo { ...@@ -253,7 +263,6 @@ export struct WzInfo {
} }
// } // }
this.pzForm.hwh = res.data[0].hwh this.pzForm.hwh = res.data[0].hwh
// @ts-ignore
this.pzForm.hjguid = res.data[0].hjguid this.pzForm.hjguid = res.data[0].hjguid
this.currentHwh = res.data[0].hwh this.currentHwh = res.data[0].hwh
Prompt.showToast({ Prompt.showToast({
...@@ -1072,7 +1081,7 @@ export struct WzInfo { ...@@ -1072,7 +1081,7 @@ export struct WzInfo {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
DividerTitle({ title: "当前单位入库房:" }) DividerTitle({ title: "当前单位入库房:" })
Text(this.currentDw + this.kfmc) Text(this.currentDw + this.rkkfmc)
.fontWeight(FontWeight.Medium) .fontWeight(FontWeight.Medium)
.fontSize(21) .fontSize(21)
.fontColor($r("app.color.title_background")) .fontColor($r("app.color.title_background"))
...@@ -1092,8 +1101,8 @@ export struct WzInfo { ...@@ -1092,8 +1101,8 @@ export struct WzInfo {
.textAlign(TextAlign.Start) .textAlign(TextAlign.Start)
.padding({ bottom: 20, top: 20 }) .padding({ bottom: 20, top: 20 })
}.width("100%") }.width("100%")
} }
if (this.isHaveButton && (this.pageType == '倒库' || this.pageType == '调号' || this.pageType == '换位')) { if (this.isHaveButton && (this.pageType == '倒库' || this.pageType == '调号' || this.pageType == '换位')) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
DividerTitle({ title: this.pageType + "模式" }) DividerTitle({ title: this.pageType + "模式" })
...@@ -1111,7 +1120,7 @@ export struct WzInfo { ...@@ -1111,7 +1120,7 @@ export struct WzInfo {
.selectedColor('#007DFF') .selectedColor('#007DFF')
.switchPointColor('#FFFFFF') .switchPointColor('#FFFFFF')
.onChange((isOn: boolean) => { .onChange((isOn: boolean) => {
console.info('Component status:' + isOn) this.handleSwitchChange(isOn)
}) })
if (this.pageType == "倒库") { if (this.pageType == "倒库") {
Text("倒出").margin({ left: 10, right: 10 }) Text("倒出").margin({ left: 10, right: 10 })
...@@ -1137,28 +1146,34 @@ export struct WzInfo { ...@@ -1137,28 +1146,34 @@ export struct WzInfo {
.width("100%") .width("100%")
Row() { Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) { if (this.isAutomation) {
Search({ placeholder: '请输入品名名称', controller: this.searchcontroller }) Column() {
.height(40) Text("请扫描货位码").fontColor("#36a3c0").fontSize(24)
.backgroundColor('#F5F5F5') }.width("100%").height(480)
.placeholderColor(Color.Grey) } else {
.textAlign(TextAlign.Center) Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
.placeholderFont({ size: 14, weight: 400 }) Search({ placeholder: '请输入品名名称', controller: this.searchcontroller })
.textFont({ size: 14, weight: 400 }) .height(40)
.width('75%') .backgroundColor('#F5F5F5')
.onSubmit((value: string) => { .placeholderColor(Color.Grey)
this.getDetail(value) .textAlign(TextAlign.Center)
}) .placeholderFont({ size: 14, weight: 400 })
.onChange((value: string) => { .textFont({ size: 14, weight: 400 })
.width('75%')
.onSubmit((value: string) => {
this.getDetail(value)
})
.onChange((value: string) => {
})
.margin({ left: 10 })
.borderRadius(5)
Button("查看状态").CommonButtonStyle().width("25%").margin({ left: 5, right: 5 }).onClick(() => {
router.pushUrl({ url: 'pages/metailmange/WzStatus', params: {
wzmx: this.historicalInformation
} })
}) })
.margin({ left: 10 }) }.width("100%")
.borderRadius(5) }
Button("查看状态").CommonButtonStyle().width("25%").margin({ left: 5, right: 5 }).onClick(() => {
router.pushUrl({ url: 'pages/metailmange/WzStatus', params: {
wzmx: this.historicalInformation
} })
})
}.width("100%")
}.padding({ top: 10, bottom: 10 }).width("100%") }.padding({ top: 10, bottom: 10 }).width("100%")
Column() { Column() {
......
...@@ -330,6 +330,7 @@ export class PzFormClass { ...@@ -330,6 +330,7 @@ export class PzFormClass {
swgldwdm: string; swgldwdm: string;
zmlx: string; zmlx: string;
hwh?: string; hwh?: string;
hjguid?: string;
constructor( constructor(
data: { data: {
...@@ -345,7 +346,8 @@ export class PzFormClass { ...@@ -345,7 +346,8 @@ export class PzFormClass {
fwgldwdm: string, fwgldwdm: string,
swgldwdm: string, swgldwdm: string,
zmlx: string, zmlx: string,
hwh?: string hwh?: string,
hjguid?: string
} }
) { ) {
this.guid = data.guid || ''; this.guid = data.guid || '';
...@@ -361,6 +363,7 @@ export class PzFormClass { ...@@ -361,6 +363,7 @@ export class PzFormClass {
this.swgldwdm = data.swgldwdm || ''; this.swgldwdm = data.swgldwdm || '';
this.zmlx = data.zmlx || ''; this.zmlx = data.zmlx || '';
this.hwh = data.hwh || ''; this.hwh = data.hwh || '';
this.hjguid = data.hjguid
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论