Browse Source

修改出库查询

dev
caoyizhong 2 years ago
parent
commit
960720c23a
  1. 21
      src/components/jeecg/CEditableTable.vue
  2. 321
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue
  3. 1
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  4. 2
      src/views/merchandisenews/modules/ProcessMerchandiseNewsForm.vue

21
src/components/jeecg/CEditableTable.vue

@ -517,7 +517,7 @@
</template>
<!-- select多选 -end -->
<!-- select搜索 -begin -->
<!-- select搜索 -begin -->
<template v-else-if="col.type === formTypes.sel_search">
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
<a-select
@ -2718,11 +2718,18 @@
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
searchOption (input,pro,index){
// console.log("searchOption=========",input,pro,index);
console.log("searchOption=========",input,pro,index);
return new Promise(async (resolve, reject) => {
if(index == 3 && !input){
return;
}
let ue = sessionStorage.getItem('USER_INFORMATION')
let res = JSON.parse(ue)
let res = JSON.parse(ue);
let ib = false;
let patter = new RegExp("[\u4E00-\u9FA5]+");
if(patter.test(input) && index == 3){
ib = true;
}
let par = {
accountingAttributes: this.verifyType,
materialsNumber: input
@ -2752,7 +2759,7 @@
// getAction(this.url.descriptionRake,par).then((res)=>{
let a= [];
if(res.success){
// console.log("222222222222222===",res.result);
console.log("222222222222222===",res.result);
let pam = res.result.records||res.result;
@ -2770,12 +2777,12 @@
// })
// }
//
//
//merchandiseName
// })
a.push({
title : item.materialsNumber,
title : ib ? item.merchandiseName : item.materialsNumber,
value : item.merchandiseNewsId,
disabled: isb
})

321
src/views/activiti/form/ProcessMaterialsDeliveryForm.vue

@ -602,7 +602,7 @@
}
},
async onSelect(record) {
console.log(record,"wer234")
// console.log(record,"wer234")
let isMA = true;
if (!record.row.equipment && !!record.row.materialGroup && !!record.row.materialName
|| !record.row.materialName && !!record.row.materialGroup && !!record.row.equipment ) {
@ -623,7 +623,10 @@
}
}
]
this.processMaterialsDeliveryListTable.columns[3].options = []
console.log("select==清空数据",record.row);
this.$refs.processMaterialsDeliveryList.setValues(values);
isMA = false;
return;
}
@ -671,10 +674,10 @@
b = true;
}
}
console.log(this.bigIdMerchandiseNewsList.length,"长度");
// console.log(this.bigIdMerchandiseNewsList.length,"1");
// console.log("materialNumber",b,record.row.materialGroup , this.materialGroupId)
if (record.column.key == 'equipment' && isMA && record.row.equipment !== this.materialGroupId) {
if (record.column.key == 'equipment' && isMA && record.row.equipment !== this.materialGroupId ||
record.column.key == 'materialName' && isMA && record.row.equipment !== this.materialGroupId) {
if (!b) {
if (this.accountingAttributesVal === '1') {
//
@ -690,7 +693,8 @@
await this.$refs.processMaterialsDeliveryList.getValues((a, b, c) => {
// console.log("bbbbbbbbbbbbbb",b)
b.forEach(item => {
if (item.equipment === record.row.equipment && !!item.materialGroup && !record.row.materialGroup) {
if (item.equipment === record.row.equipment && !!item.materialGroup && !record.row.materialGroup
|| item.equipment === record.value && !!item.materialGroup && !record.row.materialGroup ) {
// console.log("bbbb====bbbbbb",item.equipment, record.row.equipment, item.materialGroup)
let values = [
{
@ -716,11 +720,12 @@
})
})
// console.log(this.bigIdMerchandiseNewsList.length,"2");
let materialName = {}
this.bigIdMerchandiseNewsList.forEach(item => {
if (item.merchandiseNewsId === record.row.equipment) {
if (item.merchandiseNewsId === record.row.equipment || record.value === item.merchandiseNewsId ) {
materialName = {
equipment : item.merchandiseNewsId,
name: item.merchandiseName,
unit: item.materialsUnit,
materialGroup: item.materialClassify,
@ -735,7 +740,7 @@
// console.log("materialName",materialName);
if (record.row.id !== undefined && Object.keys(materialName).length > 0) {
// console.log("materialName",materialName);
// console.log(this.bigIdMerchandiseNewsList.length,"3");
this.processMaterialsDeliveryListTable.columns[0].options.push({
title: materialName.materialGroup,
value: materialName.descriptionId
@ -745,7 +750,7 @@
{
rowKey: record.row.id,
values: {
'equipment': record.row.equipment,
'equipment': materialName.equipment,
'materialGroup': materialName.descriptionId,
'materialName': materialName.name,
'materialUnit': materialName.unit,
@ -772,7 +777,7 @@
}
this.materialGroupId = record.row.equipment
}
console.log("this.data.materialType",this.deliveryType);
// console.log("this.data.materialType",this.deliveryType);
//
if (record.column.key == 'pleaseSendNumber' && isMA || record.column.key == 'actualSendNumber' && isMA) {
@ -1056,291 +1061,7 @@
})
},
//table
// async onSelect(record) {
// // console.log(record)
// if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){
// // console.log("materialGroup")
// this.fetchMerchandiseNews(record.row.materialGroup,1);
// }
// if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.actualSendNumber === '' ){
// // console.log("materialNumber")
// let materialName = {}
// this.bigIdMerchandiseNewsList.forEach(item => {
// if (item.merchandiseNewsId === record.row.equipment) {
// materialName = {
// name: item.merchandiseName,
// unit: item.materialsUnit,
// supplierName: item.supplierName,
// price: item.price,
// batch: item.batch,
// MaterialsDeliveryId : item.id
// // residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber,
// }
// }
// })
// let values = [
// {
// rowKey: record.row.id,
// values: {
// 'equipment': record.row.equipment,
// 'materialGroup': record.row.materialGroup,
// 'materialName': materialName.name,
// 'materialUnit': materialName.unit,
// 'supplier': materialName.supplierName,
// 'materialPrice': materialName.price,
// 'batch' : materialName.batch,
// 'MaterialsDeliveryId': materialName.MaterialsDeliveryId
// // 'actualSendNumber': materialName.residueNumber,
// // 'materialAmount': materialName.price * materialName.residueNumber,
// },
// },
// ]
// this.$refs.processMaterialsDeliveryList.setValues(values);
// }
// let a = false;
// //
// if(record.row.pleaseSendNumber !== '' && record.row.pleaseSendNumber !== undefined){
// console.log("record.row",record.row);
// let numberStar = 0;
// let numberEnd = 0;
// // record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice;
// // id
// // let deleteIds = this.$refs.processMaterialsDeliveryList.getDeleteIds();
// //
// let batcher = false;
// let { error, values } = this.$refs.processMaterialsDeliveryList.getValuesSync({ })
// // console.log( values);
// values.forEach( item => {
// //
// if(item.id === record.row.id){
// let bat = record.row.batch.substring(0,record.row.batch.indexOf('/'));
// if(parseInt(bat) === 1){
// // console.log("");
// batcher = true;
// }
// }
// //
// if(item.id !== record.row.id && item.equipment === record.row.equipment ){
// //
// let cf = record.row.pleaseSendNumber - record.row.actualSendNumber;
// if(cf < 0 ){
// let ba = record.row.batch.substring(0,record.row.batch.indexOf('/'));
// if(parseInt(ba) === 1 ){
// record.row.actualSendNumber = record.row.pleaseSendNumber;
// //
// let values = [
// {
// rowKey: record.row.id,
// values: {
// 'equipment': record.row.equipment,
// 'materialGroup': record.row.materialGroup,
// 'materialName': record.row.materialName,
// 'materialUnit': record.row.materialUnit,
// 'supplier': record.row.supplier,
// 'materialPrice': record.row.price ,
// 'actualSendNumber': record.row.actualSendNumber,
// 'materialAmount': record.row.price * record.row.actualSendNumber,
// 'pleaseSendNumber' : record.row.pleaseSendNumber,
// 'batch' : record.row.batch,
// },
// },
// ]
// this.$refs.processMaterialsDeliveryList.setValues(values);
// this.$refs.processMaterialsDeliveryList.removeRows(item.id);
// }else {
//
// batcher =true;
// }
//
// }else{
// //
// this.$refs.processMaterialsDeliveryList.removeRows(item.id);
//
// }
// }
//
// })
// //
// if(batcher){
// // console.log("123")
// let num = 0;
// this.bigIdMerchandiseNewsList.forEach( item =>{
// // console.log("item",item);
// num = record.row.pleaseSendNumber - item.residueNumber; //
// if(num > 0){
// //
// record.row.pleaseSendNumber = item.residueNumber;
// record.row.actualSendNumber = record.row.pleaseSendNumber;
// record.row.MaterialsDeliveryId = item.id;
// //
// this.$refs.processMaterialsDeliveryList.handleClickAdd();
// this.jiy.push(this.addId);
// a =true;
// }else{
// record.row.actualSendNumber = record.row.pleaseSendNumber;
// record.row.MaterialsDeliveryId = item.id;
// // console.log("222" ,record.row.actualSendNumber);
// }
//
// });
// let drop = record.row.materialGroup;
// let values = [
// {
// rowKey: record.row.id,
// values: {
// 'equipment': record.row.equipment,
// 'materialGroup': record.row.materialGroup,
// 'materialName': record.row.materialName,
// 'materialUnit': record.row.materialUnit,
// 'supplier': record.row.supplier,
// 'materialPrice': record.row.materialPrice,
// 'actualSendNumber': record.row.actualSendNumber,
// 'materialAmount': record.row.actualSendNumber * record.row.materialPrice,
// 'pleaseSendNumber' : record.row.pleaseSendNumber,
// 'batch' : record.row.batch,
// 'MaterialsDeliveryId': record.row.MaterialsDeliveryId,
// },
// },
// ]
// this.$refs.processMaterialsDeliveryList.setValues(values);
// //
// if(a){
// let merchandiseNewser = {};
// let merchandiseNews = {};
// let is = false;
// let onIs= false;
// do{
// if(is){
// this.$refs.processMaterialsDeliveryList.handleClickAdd();
// merchandiseNewser =await this.fetchMerchandiseNews(drop,parseInt(numberStar));
// }else{
// merchandiseNewser =await this.fetchMerchandiseNews(drop,2);
// }
// merchandiseNewser.forEach( item => {
// merchandiseNews = item;
// });
// // console.log("numberStar",numberStar)
// numberStar = merchandiseNews.batch.substring(0,merchandiseNews.batch.indexOf("/"));
// numberEnd = merchandiseNews.batch.slice(numberStar.length+1);
// // console.log(merchandiseNews);
// let sum = num - merchandiseNews.residueNumber; //
// let isLose = parseInt(numberEnd) - parseInt(numberStar);
// // console.log("isLose",isLose);
// if(isLose === 0 ){
// onIs = true;
// }
// if( sum > 0 ){
// //
// is = true;
// numberStar = parseInt(numberStar)+1;
// sum = merchandiseNews.residueNumber;
// }else{
// sum = num;
// // console.log("sum=================>",sum);
// is = false;
//
// }
// let values = [
// {
// rowKey: this.addId,
// values: {
// 'equipment': record.row.equipment,
// 'materialGroup': record.row.materialGroup,
// 'materialName': record.row.materialName,
// 'materialUnit': record.row.materialUnit,
// 'supplier': record.row.supplier,
// 'materialPrice': merchandiseNews.price ? merchandiseNews.price : 0 ,
// 'actualSendNumber': sum ,
// 'materialAmount': sum * merchandiseNews.price ? sum * merchandiseNews.price : 0,
// 'pleaseSendNumber' : sum,
// 'batch' : merchandiseNews.batch,
// 'MaterialsDeliveryId': merchandiseNews.id,
// },
// },
// ]
// this.$refs.processMaterialsDeliveryList.setValues(values);
// //num
// num = num - merchandiseNews.residueNumber;
// if(onIs){
// //
//
// this.$message.warn('');
// is = false;
// return;
// }
// }while (is);
// }
//
// }
//
// }
//
// },
// fetchMerchandiseNews(value,batch){ //
// //
// return new Promise((resolve, reject) => {
// //
// let par = {
// delFlag: 0,
// descriptionId:value,
// batchNum: batch,
// }
// this.bigIdMerchandiseNews = [];
// this.bigIdMerchandiseNewsList = [];
// let qc = [];
// let numberList = [];
// if(this.processMaterialsDeliveryListTable.columns[1].options.length > 0){
// this.processMaterialsDeliveryListTable.columns[1].options = [];
// }
// this.$refs.processMaterialsDeliveryList.getValues((a,b,c)=>{
// // console.log(a,b,c)
// b.forEach(item =>{
// if(item.equipment !== '' && item.equipment !== undefined && item.equipment !== null){
// numberList.push(item.materialNumber);
// }
// });
// });
// getAction(this.url.merchandiseNewsList,par).then((res)=>{
// if(res.success){
// console.log(res.result);
// let newList = res.result;
// // console.log("12312312:"+numberList.length);
// if(numberList.length > 0){
// newList.forEach( item => {
// qc.push({
// title : item.materialsNumber,
// value : item.merchandiseNewsId,
// disabled : false
// })
// })
// numberList.forEach( num => {
// qc.forEach( i => {
// if(num === i.value){
// // console.log(num,i.value);
// i.disabled = true;
// }
// });
// })
// this.processMaterialsDeliveryListTable.columns[1].options = qc;
// }else{
// newList.forEach( item => {
// this.processMaterialsDeliveryListTable.columns[1].options.push({
// title : item.materialsNumber,
// value : item.merchandiseNewsId,
// disabled : false
// })
// })
// }
// // console.log(this.processUdgetPlanMaterialTable.columns[1].options);
// resolve(this.bigIdMerchandiseNewsList = res.result );
// // return
// }
// });
//
// });
//
// },
fetchData(value) { //
// console.log("this.data==============>",this.data) //id
@ -1574,14 +1295,15 @@
formData.processInstanceId = this.processData.id
}
if (formData.processMaterialsDeliveryListList.length > 0) {
let qing = false
let qing = false;
let quan = false;
formData.processMaterialsDeliveryListList.forEach(item => {
if (!!item.equipment) {
if (!item.pleaseSendNumber) {
qing = true
}
} else {
this.$message.warning('请填写数据!!!')
quan = true;
}
})
@ -1589,8 +1311,11 @@
this.$message.warning('请填写请发数!!!')
return
}
if (quan) {
this.$message.warning('请填写数据!!!');
return
}
}
// console.log('', method)
if (this.btndisabled === false) {
this.btndisabled = true

1
src/views/activiti/form/ProcessUdgetPlanForm.vue

@ -720,6 +720,7 @@
// console.log('')
this.isShifu = true
},
//
bumen() {
let bis= false;
this.$refs.processUdgetPlanMaterial.getValues((a, b, c) => {

2
src/views/merchandisenews/modules/ProcessMerchandiseNewsForm.vue

@ -22,7 +22,7 @@
</a-col>
<a-col :span="8">
<a-form-item label="第三方商品编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['partyNumber',validatorRules.partyNumber]" placeholder="请输入第三方商品编号" ></a-input>
<a-input v-decorator="['partyNumber']" placeholder="请输入第三方商品编号" ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">

Loading…
Cancel
Save