Browse Source

修改顺序号

dev
caoyizhong 2 years ago
parent
commit
46d173e7ef
  1. 2
      src/views/activiti/form/ProcessMaterialsDeliveryForm.vue
  2. 109
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  3. 10
      src/views/dashboard/HomePage.vue
  4. 7
      src/views/dashboard/KeyApplications.vue

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

@ -690,7 +690,7 @@
}
//
if (record.column.key == 'pleaseSendNumber' && isMA) {
if (record.column.key == 'pleaseSendNumber' && isMA || record.column.key == 'actualSendNumber' && isMA ) {
// console.log("333333333333")
let res = record.row
let materialName = {}

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

@ -58,8 +58,8 @@
</a-col>
<a-col :span="8">
<a-form-item label="顺序号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['sort',validatorRules.sort]" placeholder="请输入序号"
style="width: 100%"/>
<a-input v-decorator="['sort']" placeholder="请输入序号"
style="width: 100%" disabled/>
</a-form-item>
</a-col>
<a-col :span="8" v-show="isPlanType">
@ -211,6 +211,7 @@
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import JEditor from '@/components/jeecg/JEditor'
import { queryDepartTreeList } from '@api/api'
// const columns = [
// {
@ -565,6 +566,7 @@
url: {
add: '/hy/processUdgetPlan/add',
edit: '/hy/processUdgetPlan/edit',
getSortOrder: '/hy/processUdgetPlan/querySortOrder',
addFromTableApply: '/hy/processUdgetPlan/addFromTableApply',
editFromTableApply: '/hy/processUdgetPlan/editFromTableApply',
queryById: '/hy/processUdgetPlan/queryById',
@ -890,7 +892,7 @@
// console.log("00000000",log);
let pas = await log.target.getValuesPromise(log.rowIds)
// console.log("111111111",log.rowIds);
console.log('222222222222', pas)
// console.log('222222222222', pas)
if (pas[log.index].materialNumber !== '' && pas[log.index].materialNumber !== null) {
this.historyBigId = []
//
@ -1410,6 +1412,97 @@
backTask() {
this.$emit('backTask')
},
//
async getSortNum(number){
let sortNum = "001";
await getAction(this.url.getSortOrder,{}).then(res =>{
// console.log(res.result.sort,"==s-fdhtsdfb");
if(!!res.result.sort){
let str = res.result.sort.split("-")
let i = str[str.length-1]
if(i < 10){
sortNum = "00"+parseInt(parseInt(i)+1);
}else if(i < 99){
sortNum = "0"+parseInt(parseInt(i)+1);
}else {
sortNum = parseInt(parseInt(i)+1);
}
// console.log(sortNum,"===========23542345")
}
}).catch(()=>{
this.$message.warning("请求异常")
});
// console.log(sortNum,"===========1111111111111111")
let title = null;
const timeOne = new Date();
const year = timeOne.getFullYear()
await queryDepartTreeList().then(res=>{
if(res.success){
let arr = [...res.result]
arr.forEach(item =>{
if(!!item.children){
item.children.forEach(it =>{
if(number === it.id){
// console.log("it.title",it.title);
switch (it.title) {
// case '':
// break;
case '射孔第一项目部':
title = year+"-"+"dk"+"-"+"1"+"-"+sortNum ;
break;
// case '':
// break;
case '测井第一项目部':
title = year+"-"+"cj"+"-"+"1"+"-"+sortNum ;
break;
case '测井第二项目部':
title = year+"-"+"cj"+"-"+"2"+"-"+sortNum ;
break;
case '维稳信访办公室':
title = year+"-"+"wx"+"-"+"1"+"-"+sortNum ;
break;
// case '':
// break;
case '射孔第二项目部':
title = year+"-"+"dk"+"-"+"2"+"-"+sortNum ;
break;
case '射孔第三项目部':
title = year+"-"+"dk"+"-"+"3"+"-"+sortNum ;
break;
case '测井研究所':
title = year+"-"+"yjs"+"-"+"1"+"-"+sortNum ;
break;
case '生产技术部':
title = year+"-"+"jsb"+"-"+"1"+"-"+sortNum ;
break;
case '生产服务站':
title = year+"-"+"fwz"+"-"+"1"+"-"+sortNum ;
break;
case '准东项目部':
title = year+"-"+"zd"+"-"+"1"+"-"+sortNum ;
break;
case '生产测井项目部':
title = year+"-"+"cj"+"-"+"1"+"-"+sortNum ;
break;
default :
title = year+"-"+"xj"+"-"+"1"+"-"+sortNum ;
}
};
})
}
});
}else{
title = year+"-"+"xj"+"-"+"1"+"-"+sortNum ;
}
})
this.form.setFieldsValue({
sort: title
})
},
/*提交申请*/
applySubmit(e) {
this.getAllTable().then(tables => {
@ -1607,17 +1700,21 @@
validateError(msg) {
this.$message.error(msg)
},
popupCallback(company, row) {
popupCallback(company, row) {
let res = JSON.parse(row)
// console.log("company",company,res);
let param = {}
param.createBy = res.username
param.company = company
param.departId = res.departIds
param.departId = res.departIds;
//
this.getSortNum(res.departIds);
param.createTime = getCurrentTime()
this.data = param
let fieldval = pick(this.data, 'createBy', 'company', 'departId', 'createTime')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
this.form.setFieldsValue(fieldval);
})
},
saveAndpassTask() {

10
src/views/dashboard/HomePage.vue

@ -232,7 +232,7 @@ export default {
methods: {
expandedRowKeys(row){
// console.log("=====",row);
console.log("=====",row);
this.selectRowKeys = row;
},
@ -394,7 +394,15 @@ export default {
this.keyChildren = [];
if(this.KeyApplicationsChildren.length > 0){
// console.log("=====")
let i = 0;
this.KeyApplicationsChildren.forEach( item =>{
// for (let i = 0; i < childrenMean.length; i++) {
// if(item.permissionId == childrenMean[i].id){
// i += 1;
// this.$set(childrenMean[i],'color',colorList[i%4].color)
// this.keyChildren.push(childrenMean[i]);
// }
// }
childrenMean.forEach(it =>{
if(item.permissionId == it.id){
this.keyChildren.push(it);

7
src/views/dashboard/KeyApplications.vue

@ -23,6 +23,7 @@
// import { mixinDevice } from '@/utils/mixin'
// import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { deleteAction } from '@api/manage'
import { colorList } from '@comp/tools/setting'
export default {
name: 'KeyApplications',
@ -103,7 +104,7 @@ export default {
this.data = [];
this.isData = true;
this.selectedRowKeys = [];
this.selectedRowKeys = [];
this.selectedRows = [];
// this.keyChildren = [];
// this.userChildren = [];
this.userChild();
@ -136,7 +137,7 @@ export default {
selectedRows.splice(index, 1)
selectedRowKeys.splice(index, 1)
}
// this.updateSelect(selectedRowKeys, selectedRows)
this.updateSelect(selectedRowKeys, selectedRows)
this.onSelectChanger(selectedRowKeys, selectedRows)
}
}
@ -162,7 +163,7 @@ export default {
let i = false;
this.keyChildren.forEach( item =>{
if(item.id == it.id){
// this.expandedRowKeys.push(it.id);
this.selectedRows.push(it);
i = true;
}
})

Loading…
Cancel
Save