diff --git a/src/pages/raw/warehouse/RUS-rowScrap/config.ts b/src/pages/raw/warehouse/RUS-rowScrap/config.ts index f6bf800..8e926e0 100644 --- a/src/pages/raw/warehouse/RUS-rowScrap/config.ts +++ b/src/pages/raw/warehouse/RUS-rowScrap/config.ts @@ -1,3 +1,12 @@ +/* + * @Author: zhou lei + * @Date: 2022-11-22 13:43:48 + * @LastEditTime: 2022-12-20 16:05:33 + * @LastEditors: zhou lei + * @Description: 添加成本中心展示 + * @FilePath: \hgwms-factory-app\src\pages\raw\warehouse\RUS-rowScrap\config.ts + * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 + */ /** * 看单交接明细表格列 */ @@ -60,6 +69,11 @@ export const RUSdetailHeader = [ key: 'barCode', //物料描述 width: 400, }, + { + label: vm.$t('message.product_costCenter'), + key: 'dicName', //数量 + width: 400, + }, { label: vm.$t('message.dn_Number'), key: 'qty', //数量 diff --git a/src/pages/raw/warehouse/RUS-rowScrap/index.vue b/src/pages/raw/warehouse/RUS-rowScrap/index.vue index 836240b..d01f7b6 100644 --- a/src/pages/raw/warehouse/RUS-rowScrap/index.vue +++ b/src/pages/raw/warehouse/RUS-rowScrap/index.vue @@ -35,8 +35,12 @@ --> - + + + + @@ -120,6 +124,15 @@ export default class KanDanHandOver extends BasePage { Barcode: any = ''; isfocus = false; SomeIndex = 0; + aaa = [ + { lable: '123', value: 'abc' }, + { lable: '456', value: 'efg' }, + ]; + newcenterlist = []; + centerlist: any = []; + onLoad() { + this.querycenter(); + } async query() { if (this.order3 === '') { this.customToast(this.$t('message.Commission_tips1') as string); @@ -157,6 +170,35 @@ export default class KanDanHandOver extends BasePage { } }); } + async querycenter() { + // if (this.order3 === '') { + // this.customToast(this.$t('message.Warehouse_Tip') as string); + // return; + // } else { + await this.model.getcenter(); + if (model.code == '1') { + this.newcenterlist = []; + this.newcenterlist = model.centerList; + //this.centerlist = this.newcenterlist[0]; + // console.log('123',this.centerlist.dicCode); + // console.log('123',this.centerlist.dicName); + } + // } + } + centerConfirm(v: any) { + console.log('234', v); + this.centerlist = v.pickerName; + // this.centerlist.dicCode = model.centerList[v.pickerVal].dicCode; + // this.centerlist.dicName = model.centerList[v.pickerVal].dicName; + console.log('123', this.centerlist.dicCode); + console.log('123', this.centerlist.dicName); + // model.centerList.forEach((item: any, index: any) => { + // if (this.orderlist.productCode == item.productCode) { + // this.orderlist = item; + // this.orderlistIndex = index; + // } + // }); + } async searchBarcode() { if (this.order3 == '') { this.customToast(this.$t('message.Warehouse_Tip5') as string); @@ -253,8 +295,8 @@ export default class KanDanHandOver extends BasePage { this.SubmitOrderlist[this.SubmitOrderlist.length - 1].type = '1'; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].keepBy = session.loginName; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].orderType = '1'; - //this.SubmitOrderlist[this.SubmitOrderlist.length - 1].dockCode = this.dockCode; - //this.SubmitOrderlist[this.SubmitOrderlist.length - 1].dockName = this.dockName; + this.SubmitOrderlist[this.SubmitOrderlist.length - 1].dicCode = this.centerlist.dicCode; + this.SubmitOrderlist[this.SubmitOrderlist.length - 1].dicName = this.centerlist.dicName; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].qty = this.qty; this.SubmitOrderlist[this.SubmitOrderlist.length - 1].barCode = this.Container.barcode; this.model.orderInInfoList[this.SomeIndex].totalqty += parseFloat(this.qty); diff --git a/src/pages/raw/warehouse/RUS-rowScrap/model.ts b/src/pages/raw/warehouse/RUS-rowScrap/model.ts index 5646922..8e51115 100644 --- a/src/pages/raw/warehouse/RUS-rowScrap/model.ts +++ b/src/pages/raw/warehouse/RUS-rowScrap/model.ts @@ -1,3 +1,12 @@ +/* + * @Author: zhou lei + * @Date: 2022-09-28 10:26:36 + * @LastEditTime: 2022-12-20 18:05:04 + * @LastEditors: zhou lei + * @Description:原材料报废 + * @FilePath: \hgwms-factory-app\src\pages\raw\warehouse\RUS-rowScrap\model.ts + * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 + */ import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators'; import store from '@/store'; import http from '@/utils/request'; @@ -23,6 +32,7 @@ export class rowScrap extends VuexModule { poNo = ''; orderInInfo: OrderInInfo = new OrderInInfo(); orderInInfoList: OrderInInfo[] = []; + centerList: any = []; code: any = ''; ContainerCode: any = ''; /** @@ -50,7 +60,26 @@ export class rowScrap extends VuexModule { vm.customToast(vm.$t('message.Warehouse_Tip11') as any); } } - + //获取成本中心 + @MutationAction + async getcenter() { + try { + const records: any = await http.post(url.warehouse.rowTransfer.getCostCenter, { + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const code = records.code; + const orderInInfoList = records.data; + const centerList = orderInInfoList.map((item: any) => ({ + label: item.dicName, + value: item.dicCode, + ...item, + })); + return { centerList, code }; + } catch { + // vm.customToast(vm.$t('message.Warehouse_Tip11') as any); + } + } @MutationAction async onTakeoutConfirm(list: any) { const records: any = await http.post(url.warehouse.rowTransfer.russia, list); diff --git a/src/utils/url.ts b/src/utils/url.ts index 4ba61bf..014a531 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -258,6 +258,7 @@ export const url = { stoOutOrderDelivery: '/wmspda/fg/stoOutOrderDelivery/tha', findStoReceiveOrderInfo: '/wmspda/fg/findStoReceiveOrderInfo/tha', stoOutOrderReceive: '/wmspda/fg/stoOutOrderReceive/tha', + getCostCenter: '/wmspda/fg/getCostCenter', }, container: { getRawStorageSnNew: '/wmspda/material/getRawStorageSnNew',