Commit 5651166a by huangqy

修修补补

parent 727109a0
......@@ -54,8 +54,9 @@ WHERE
* @param kfdm 库房代码
*/
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}' )`
return sql_val
const sql =
`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 {
@Link pzForm: PzFormClass
@State currentDw: string = ''
@State kfmc: string = ''
@State rkkfmc: string = ''
@ObjectLink wzcrk: WzClass
getDetail: (wzpm?: string) => void
scanInfoDialog: CustomDialogController = new CustomDialogController({
......@@ -125,6 +126,13 @@ export struct WzInfo {
}
}
handleSwitchChange(isOn) {
this.currentModel = isOn
this.pzForm.hwh = ''
this.pzForm.hjguid = ''
this.currentHwh = ''
}
// 页面初始化
aboutToAppear() {
this.pzxqGuild = this.wzcrk.guid
......@@ -154,8 +162,11 @@ export struct WzInfo {
const res1 = await gldwModel.queryByData({ dwdm: this.wzcrk.sfdw })
this.currentDw = res1[0].dwfh ?? ''
// 获取库房名称
const res = await kfModel.query({ guid: this.wzcrk.kfguid })
this.kfmc = res[0].kfmc ?? ''
const res = await kfModel.query({})
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 {
}
// }
this.pzForm.hwh = res.data[0].hwh
// @ts-ignore
this.pzForm.hjguid = res.data[0].hjguid
this.currentHwh = res.data[0].hwh
Prompt.showToast({
......@@ -253,7 +263,6 @@ export struct WzInfo {
}
// }
this.pzForm.hwh = res.data[0].hwh
// @ts-ignore
this.pzForm.hjguid = res.data[0].hjguid
this.currentHwh = res.data[0].hwh
Prompt.showToast({
......@@ -1072,7 +1081,7 @@ export struct WzInfo {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
DividerTitle({ title: "当前单位入库房:" })
Text(this.currentDw + this.kfmc)
Text(this.currentDw + this.rkkfmc)
.fontWeight(FontWeight.Medium)
.fontSize(21)
.fontColor($r("app.color.title_background"))
......@@ -1092,8 +1101,8 @@ export struct WzInfo {
.textAlign(TextAlign.Start)
.padding({ bottom: 20, top: 20 })
}.width("100%")
}
if (this.isHaveButton && (this.pageType == '倒库' || this.pageType == '调号' || this.pageType == '换位')) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
DividerTitle({ title: this.pageType + "模式" })
......@@ -1111,7 +1120,7 @@ export struct WzInfo {
.selectedColor('#007DFF')
.switchPointColor('#FFFFFF')
.onChange((isOn: boolean) => {
console.info('Component status:' + isOn)
this.handleSwitchChange(isOn)
})
if (this.pageType == "倒库") {
Text("倒出").margin({ left: 10, right: 10 })
......@@ -1137,6 +1146,11 @@ export struct WzInfo {
.width("100%")
Row() {
if (this.isAutomation) {
Column() {
Text("请扫描货位码").fontColor("#36a3c0").fontSize(24)
}.width("100%").height(480)
} else {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Search({ placeholder: '请输入品名名称', controller: this.searchcontroller })
.height(40)
......@@ -1159,6 +1173,7 @@ export struct WzInfo {
} })
})
}.width("100%")
}
}.padding({ top: 10, bottom: 10 }).width("100%")
Column() {
......
......@@ -330,6 +330,7 @@ export class PzFormClass {
swgldwdm: string;
zmlx: string;
hwh?: string;
hjguid?: string;
constructor(
data: {
......@@ -345,7 +346,8 @@ export class PzFormClass {
fwgldwdm: string,
swgldwdm: string,
zmlx: string,
hwh?: string
hwh?: string,
hjguid?: string
}
) {
this.guid = data.guid || '';
......@@ -361,6 +363,7 @@ export class PzFormClass {
this.swgldwdm = data.swgldwdm || '';
this.zmlx = data.zmlx || '';
this.hwh = data.hwh || '';
this.hjguid = data.hjguid
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论