cosmoim-852 fix 成本中心修改

master
guoshuang 3 years ago
parent 15091dc2c9
commit 25f3d9663b

@ -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', //数量

@ -35,8 +35,12 @@
<u-input :disabled="true" v-model="Some.aimWl" placeholder="" />
</u-form-item> -->
<!-- 成本中心 -->
<u-form-item :label="$t('message.product_costCenter')">
<!-- <u-form-item :label="$t('message.product_costCenter')">
<u-input :disabled="true" v-model="Some.costCenter" placeholder="" />
</u-form-item> -->
<!-- 新成本中心 -->
<u-form-item :required="true" :label="$t('message.product_costCenter')">
<jPicker sureColor="#ff0000" @bindpicker="centerConfirm" showKey="label" valKey="value" :val="centerlist.value" class="search" :options="newcenterlist" />
</u-form-item>
<!-- 文件号 -->
<u-form-item :label="$t('message.DocumentNumber')">
@ -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);

@ -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);

@ -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',

Loading…
Cancel
Save