diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 19ff8c7..966d9a3 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -570,5 +570,8 @@ export default { supplierName: '供应商名称', PickingVn: '拣配-越南', HandoverVn: '交接-越南', + detail: '详情', + pcNo:'批次号', + stoPcPleaseInput: '请输入批次号', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 9015fea..27ab3a8 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -572,5 +572,9 @@ export default { supplierName: 'supplier', PickingVn: 'Picking-Vn', HandoverVn: 'Handover-Vn', + detail: 'Detail', + pcNo:'Batch No', + stoPcPleaseInput: 'Please input batch No', + }, }; diff --git a/src/i18n/lang/ru.ts b/src/i18n/lang/ru.ts index 75beaa9..623bd1a 100644 --- a/src/i18n/lang/ru.ts +++ b/src/i18n/lang/ru.ts @@ -567,5 +567,8 @@ export default { HeaderText: 'Примечания', supplierCode: 'Код поставщика', supplierName: 'Название поставщика', + detail: 'Detail', + pcNo:'Batch No', + stoPcPleaseInput: 'Please input batch No', }, }; diff --git a/src/pages.json b/src/pages.json index cf34096..983e14a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1338,6 +1338,14 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/product/stoOutbound/detail", + "style": { + "navigationBarTitleText": "成品STO出库",//成品sto出库(越南按照sto单号出库) + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/demo/index", "style": { diff --git a/src/pages/product/stoOutbound/config.ts b/src/pages/product/stoOutbound/config.ts new file mode 100644 index 0000000..49f33b4 --- /dev/null +++ b/src/pages/product/stoOutbound/config.ts @@ -0,0 +1,37 @@ +/** + * 扫描明细表格列 + */ +import vm from '@/main'; +export const headers = [ + { + label: vm.$t('message.product_BarCode'), + key: 'barcode', + width: 400, + }, + { + label: vm.$t('message.pcNo'), + key: 'pcNo', + width: 400, + }, + { + label: vm.$t('message.po_MaterielNo'), + key: 'matCode', + width: 300, + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'matDesc', + width: 400, + }, + { + label: vm.$t('message.stoOrderNo'), + key: 'stoNo', + width: 300, + }, + { + label: vm.$t('message.stoLine'), + key: 'stoItem', + width: 300, + }, +]; + diff --git a/src/pages/product/stoOutbound/detail.vue b/src/pages/product/stoOutbound/detail.vue new file mode 100644 index 0000000..7720d62 --- /dev/null +++ b/src/pages/product/stoOutbound/detail.vue @@ -0,0 +1,126 @@ + + + + diff --git a/src/pages/product/stoOutbound/index.vue b/src/pages/product/stoOutbound/index.vue index 6036f60..f61cdde 100644 --- a/src/pages/product/stoOutbound/index.vue +++ b/src/pages/product/stoOutbound/index.vue @@ -58,7 +58,7 @@ - + @@ -70,6 +70,17 @@ + + + + + + + + + + + - + + {{ $t('message.detail') }} + + {{ $t('message.confirm') }} - - {{ $t('message.po_Return') }} + + {{ $t('message.po_Return') }} + + + {{ $t('message.Cancel') }} @@ -124,8 +141,10 @@ export default class dnReceiptDom extends BasePage { ItemIndex: any = ''; carNo: any = ''; company: any = ''; + pcNo: any = ''; showVehicle = false; showMsg = false; + showCancel = false; title = 'Please Enter Msg'; async query() { @@ -133,6 +152,8 @@ export default class dnReceiptDom extends BasePage { this.company = ''; this.showVehicle = false; this.showMsg = false; + this.pcNo = ''; + this.showCancel = false; if (!this.stoNo) { this.customToast(this.$t('message.stoPleaseInput') as any); return; @@ -154,6 +175,9 @@ export default class dnReceiptDom extends BasePage { this.ItemIndex = index; } }); + } + async SelectPcLine(e: any) { + this.pcNo = e.pickerName; } //num: any = ''; //SunmitList: any = []; @@ -162,6 +186,7 @@ export default class dnReceiptDom extends BasePage { this.company = ''; this.showVehicle = false; this.showMsg = false; + this.showCancel = false; //如果为空,则进入 if (!this.stoNo) { this.customToast(this.$t('message.stoPleaseInput') as any); @@ -191,13 +216,32 @@ export default class dnReceiptDom extends BasePage { this.barcode = ''; } } - - //确认 +/** + * 详情 + */ + async Detail() { + const params = { + factoryCode: session.factoryCode, + loginName: session.loginName, + stoNo: this.stoNo, + }; + await this.model.QueryStoDetail(params); + uni.setStorageSync('factory', JSON.stringify(params) as any); + this.toPage(this.page.product.stoOutbound.datile); + } + //确认弹窗 async Confirm() { if (!this.stoNo) { this.customToast(this.$t('message.stoPleaseInput') as any); return; } + } + //确认 + async ConfirmDo() { + if (!this.stoNo) { + this.customToast(this.$t('message.stoPleaseInput') as any); + return; + } if (this.carNo == '' || this.company == '') { this.showVehicle = true; this.showMsg = true; @@ -227,6 +271,52 @@ export default class dnReceiptDom extends BasePage { this.emptyMsg(); } } + + //批次取消打开弹窗 + async Cancel() { + console.log("11111111"); + if (!this.stoNo) { + //this.customToast(this.$t('message.stoPleaseInput') as any); + return; + } + const SunmitList = { + loginName: session.loginName, + factoryCode: session.factoryCode, + stoNo: this.stoNo, + }; + await this.model.QueryPcList(SunmitList); + this.showCancel = true; + } + + //批次取消 + async CancelDo() { + if (!this.pcNo) { + this.customToast(this.$t('message.stoPcPleaseInput') as any); + return; + } + console.log("222222222"); + const SunmitList = { + loginName: session.loginName, + factoryCode: session.factoryCode, + stoNo: this.stoNo, + pcNo: this.pcNo, + }; + await this.model.stoCancel(SunmitList); + if (this.model.SubCode == 1) { + uni.showToast({ + title: this.$t('message.success') as string, + image: '/static/icons/icon-51.png', + }); + this.pcNo = ''; + //不生效 + this.empty(); + } else { + this.pcNo = ''; + //不生效 + this.emptyMsg(); + } + } + //过账 async Submit() { if (!this.stoNo) { @@ -260,6 +350,8 @@ export default class dnReceiptDom extends BasePage { this.company = ''; this.showVehicle = false; this.showMsg = false; + this.pcNo = ''; + this.showCancel=false; //this.SunmitList = []; this.model.stoNoList.length = 0; } @@ -267,6 +359,9 @@ export default class dnReceiptDom extends BasePage { this.carNo = ''; this.company = ''; this.showMsg = false; + this.pcNo = ''; + this.showCancel=false; + console.log("ccccccan"); } } diff --git a/src/pages/product/stoOutbound/model.ts b/src/pages/product/stoOutbound/model.ts index 8960eb0..9fac133 100644 --- a/src/pages/product/stoOutbound/model.ts +++ b/src/pages/product/stoOutbound/model.ts @@ -1,13 +1,4 @@ -/* - * @Author: zhou lei - * @Date: 2022-10-10 15:40:04 - * @LastEditTime: 2022-10-12 11:35:25 - * @LastEditors: zhou lei - * @Description: - * @FilePath: \hgwms-factory-app\src\pages\product\STO-Outbound\model.ts - * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 - */ -import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators'; +import { getModule,Action, Module, MutationAction, VuexModule } from 'vuex-module-decorators'; import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; @@ -22,6 +13,8 @@ export class ReceiptModule extends VuexModule { //越南 STO出库 扫描DN单号 stoNoList: any = []; stoItemList: any = []; + stoPcList: any = []; + stoBarcodeList: any = []; res: any = ''; @MutationAction async QuerySto(stoNo: any) { @@ -85,6 +78,42 @@ export class ReceiptModule extends VuexModule { const SubCode = res.code; return { SubCode }; } + + //查询sto未过账的批次集合 + @MutationAction + async QueryPcList(content: any) { + const res: any = await http.post(url.outbound.stoOutbound.pcListQuery, content); + const stoPcList = res.data; + return {stoPcList}; + } + + //越南 批次取消 + CancelCode: any = ''; + @MutationAction + async stoCancel(list: any) { + const res: any = await http.post(url.outbound.stoOutbound.stoCancel, list); + const CancelCode = res.code; + return { CancelCode }; + } + + //越南 条码删除 + DeleteCode: any = ''; + @MutationAction + async deleteBarcode(list: any) { + const res: any = await http.post(url.outbound.stoOutbound.stoDelete, list); + const DeleteCode = res.code; + return { DeleteCode }; + } + + //查询sto扫描条码明细 + @MutationAction + async QueryStoDetail(content: any) { + const res: any = await http.post(url.outbound.stoOutbound.stoDetailQuery, content); + const stoBarcodeList = res.data; + return {stoBarcodeList}; + } + + } export default getModule(ReceiptModule); diff --git a/src/utils/page.ts b/src/utils/page.ts index 4a092c2..2b72f62 100644 --- a/src/utils/page.ts +++ b/src/utils/page.ts @@ -34,6 +34,9 @@ export const page = { stoOutboundDetail: '/pages/product/outbound/stoOutbound/detail', stoBack: '/pages/product/STO-Outbound/Back', }, + stoOutbound:{ + datile:'/pages/product/stoOutbound/detail', + }, SpareDeliverGoods: { detail: '/pages/product/outbound/SpareDeliverGoods/detail', }, diff --git a/src/utils/url.ts b/src/utils/url.ts index 6a50271..ebcfa6d 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -186,6 +186,10 @@ export const url = { stoScan: '/wmspda/fg/stoOutbound/scan', stoConfirm: '/wmspda/fg/stoOutbound/confirm', stoPost: '/wmspda/fg/stoOutbound/post', + stoDetailQuery: '/wmspda/fg/stoOutbound/queryDetail', + pcListQuery: '/wmspda/fg/stoOutbound/queryPcNoList', + stoCancel: '/wmspda/fg/stoOutbound/cancel', + stoDelete: '/wmspda/fg/stoOutbound/delete', }, }, inbound: {