Commit b4a9d83e authored by jingnan's avatar jingnan 👀

Merge branch 'online'

parents 94735721 ad50630d
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -50,7 +50,7 @@ export default {
position: relative;
overflow: hidden;
/* background: #E8EDEF; */
padding: 0px 4px 4px 4px;
/* padding: 0px 4px 4px 4px; */
box-sizing: border-box;
}
.fixed-header+.app-main {
......
......@@ -152,7 +152,7 @@
.sub-title{
color: $themeColor;
}
.el-table__body tr.current-row > td.el-table__cell{
.el-table__body tr.current-row > td:has(> .cell){
background: $themeTintColor;
}
.right-hidden-box, .left-hidden-box{
......@@ -388,9 +388,11 @@
}
}
.show-page-com{
.page-content-item{
.show-page-com {
margin-top: 0px!important;
.page-content-item {
.page-content-box{
border:0px!important;
.crumbs-title{
color:#2f2f2f;
font-size:15px;
......
......@@ -108,12 +108,13 @@ export default {
methods: {
async getUseRequestTypes() {
const user = localStorage.getItem('user')
// const userId = localStorage.getItem('userId')
const dicData = await this.$utils.getDicListByCode('UseRequestType')
// 当前登陆人为孙瑶雪 和dexadmin的时候下拉可以看到试验领用,其他人看不到
if (user === '孙瑶雪' || user === 'dexadmin') {
this.options = dicData.filter(item => item.label !== '无指令领用')
} else {
this.options = dicData.filter(item => item.label !== '试验领用' && item.label !== '无指令领用')
this.options = dicData.filter(item => item.label !== '试验领用' && item.label !== '无指令领用' && item.label !== '紧急领用')
}
},
dataChangeHandler(val) {
......
......@@ -381,7 +381,6 @@ export default {
},
submitEvent({ formData, addContinue }) {
const extMaterialIds = this.tableData.map(item => item.extMaterialId).includes(formData[0].extMaterialId)
if (extMaterialIds) return this.$utils.showMessageWarning('相同物料不能重复添加,请重新选择!')
if (this.basicData.useRequestType === 'swapUse') {
this.tableData.forEach((item, index) => {
if (item.extSupportingItemVO && item.extSupportingItemVO.id === formData[0].extSupportingItemVO.id) {
......@@ -389,6 +388,7 @@ export default {
}
})
} else {
if (extMaterialIds) return this.$utils.showMessageWarning('相同物料不能重复添加,请重新选择!')
this.tableData.push(...formData)
}
this.dialogShow = addContinue || false
......
<!--
* @Author: gjn
* @Date: 2023-08-23 17:52:16
* @Description:领用出库申请新建
-->
<template>
<div class="addOutStorageUseCom">
<div class="sub-title">领用类型</div>
<div class="useType">
<span class="typeName">领用类型:</span>
<el-select v-model="typeName" style="width: 200px;" :disabled="!!basicData.id || !!outStorageUseId" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<dee-as-com
v-if="typeName==='replaceUse'"
ref="basicInfoTable"
:form="bindForm"
style="border:none;"
model-name="OutStorageUse"
:lay-config="cmpOptions"
:basic-data="{...basicData,useRequestType:basicData.typeName||typeName}"
/>
<dee-as-com
v-else-if="typeName"
ref="basicInfoTable"
style="border:none;"
model-name="OutStorageUse"
:lay-config="cmpOptions"
:basic-data="{...basicData,useRequestType:basicData.typeName||typeName}"
/>
<!-- @on-cancelCreate="cancelHandler" -->
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
componentName: '紧急领用出库申请新建',
name: 'AddOutStorageUseCom',
components: {},
props: {
basicData: {
type: Object,
default: () => null
},
defaultData: {
type: Object,
default: () => null
},
isEdit: {
type: Boolean,
default: false
}
},
data() {
const that = this
return {
typeName: that.basicData.typeName || 'UrgentUse',
options: [
],
showCmp: true,
cmpOptions: {
typeName: 'OutStorageUse',
layKey: 'outStorageUseApplyAdd_UrgentUse'
},
bindForm: {},
outStorageUseId: ''
}
},
computed: {},
watch: {
typeName: {
immediate: true,
handler(val) {
this.bindForm = {}
if (!this.basicData.id) {
this.$set(this.cmpOptions, 'layKey', `outStorageUseApplyAdd_${val}`)
} else {
this.$set(this.cmpOptions, 'layKey', `outStorageUseApplyEdit_${val}`)
}
}
},
'bindForm.replaceDocNo': {
immediate: true,
handler(val) {
val && typeof (val) === 'number' && this.getReplaceOutInfo(val)
}
}
},
created() {
this.$bus.$on('getApplyId', (data) => {
this.outStorageUseId = data
})
this.$bus.$on('cancelAndRefresh', (data) => {
this.$emit('cancel')
})
},
mounted() {
this.getUseRequestTypes()
},
// 组件方法
methods: {
async getUseRequestTypes() {
const dicData = await this.$utils.getDicListByCode('UseRequestType')
this.options = dicData.filter(item => item.label === '紧急领用')
},
dataChangeHandler(val) {
if (val) {
this.formData = Object.assign({}, val)
this.formData.typeName = this.typeName
}
},
getReplaceOutInfo(id) {
this.bindForm = { replaceDocNo: this.bindForm.replaceDocNo }
post(`OutStorageRequest/createReplaceOutInfo?replaceDocId=${id}`).then(res => {
if (!res.items) return
this.bindForm = res.items
}).catch(err => {
console.log(err)
}).finally(() => {})
}
// cancelHandler(val) {
// this.$confirm('此操作将解除已占用的操作, 是否继续?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// post(`OutStorageRequest/outStorageOut/delete?applyIds=${this.outStorageUseId}`).then(res => {
// this.$message({
// type: 'success',
// message: '删除成功!'
// })
// this.$emit('cancel')
// }).catch((err) => {
// console.log(err)
// })
// }).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消删除'
// })
// })
// }
}
}
</script>
<style lang='scss'>
.addOutStorageUseCom{
.sub-title{
margin-left: 6px;
}
.useType{
.typeName{
width:100px;
margin-left:33px;
text-align: right;
vertical-align: middle;
font-size: 14px;
color: #606266;
line-height: 40px;
}
}
}
</style>
......@@ -237,7 +237,8 @@ export default {
parentId: null,
operateType: null,
parentRowId: '',
currStorageList: []
currStorageList: [],
rowData: {}
}
},
computed: {
......@@ -305,6 +306,20 @@ export default {
const targetArr = this.formFileds[0].data.filter(item => item.title === '税率' || item.title === '含税单价')
targetArr.forEach(item => (item.component.disabled = isVirtualFlag))
}
},
currStorageList: {
immediate: true,
deep: true,
handler(val) {
this.setStorageZoneName()
}
},
rowData: {
immediate: true,
deep: true,
handler(val) {
this.setStorageZoneName()
}
}
},
created() {
......@@ -315,38 +330,29 @@ export default {
// this.form.arrivalDate = this.basicData.arrivalDate || ''
},
methods: {
setStorageZoneName() {
if (!this.form.storageZoneName) {
if (this.currStorageList && this.currStorageList.find(el => Number(el.value) === Number(this.rowData.storageZoneId))) {
this.$set(this.form, 'storageZoneName', this.rowData.storageZone && this.rowData.storageZone.extname || '')
this.$set(this.form, 'storageZone', this.rowData.storageZoneId)
}
}
},
handleOpen(type, row) {
this.rowData = row
this.defaultStorage()
// this.basicData = basicData
this.form = { 'reqAmount': 1 }
// this.dialogVisibleDetails = true
if (!this.form.reqAmount) {
this.form = { 'reqAmount': 0 }
}
this.operateType = type
// if (type === 'NEW') {
// this.$set(this.form, 'operator', 'ADD')
// } else if (type === 'ADD') {
// this.parentId = row.id || null
// this.parentRowId = row.rowId ? row.rowId : row.id
// this.$set(this.form, 'operator', 'ADD')
// delete row.id
// this.form = JSON.parse(JSON.stringify(row))
// this.$set(this.form, 'supplier', row.extDxSipplierId)
// this.$set(this.form, 'withProductMaterial', Array.isArray(row.withProductMaterial) ? row.withProductMaterial : row.withProductMaterial && row.withProductMaterial.split(';') || [])
// this.resetMaterial(row.extMaterial ? row.extMaterial.resCode : '')
// this.changeMaterial(row.extMaterial ? row.extMaterial.resCode : '')
// this.$set(this.form, 'resCode', '')
// this.$set(this.form, 'resName', '')
// this.$set(this.form, 'reqUnit', '')
// this.$set(this.form, 'modelNo', '')
// } else if (type === 'MODIFY') {
this.dispalyData(row)
// }
this.resetForm()
},
// 回显数据
dispalyData(row) {
this.form = this.$utils.deepClone(row)
this.$set(this.form, 'operator', 'MODIFY')
row.billType === 'AirEquipment' && this.$set(this.form, 'reqAmount', 1)
row.billType === 'AirEquipment' && !this.form.reqAmount && this.$set(this.form, 'reqAmount', 1)
this.$set(this.form, 'resCode', row.extMaterial && row.extMaterial.resCode || row.resCode || '')
this.$set(this.form, 'resName', row.extMaterial && row.extMaterial.resName || row.resName || '')
this.$set(this.form, 'reqUnit', row.extMaterial && row.extMaterial.extUnit && row.extMaterial.extUnit.unitName || row.reqUnit || '')
......@@ -355,12 +361,12 @@ export default {
this.$set(this.form, 'supplier', row.extDxSipplier && row.extDxSipplier.supplierFullName || row.supplier || '')
this.$set(this.form, 'storageZoneName', '')
this.$set(this.form, 'storageZone', '')
setTimeout(() => {
if (this.currStorageList && this.currStorageList.find(el => Number(el.value) === Number(row.storageZoneId))) {
this.$set(this.form, 'storageZoneName', row.storageZone && row.storageZone.extname || '')
this.$set(this.form, 'storageZone', row.storageZoneId)
}
}, 500)
// setTimeout(() => {
// if (this.currStorageList && this.currStorageList.find(el => Number(el.value) === Number(row.storageZoneId))) {
// this.$set(this.form, 'storageZoneName', row.storageZone && row.storageZone.extname || '')
// this.$set(this.form, 'storageZone', row.storageZoneId)
// }
// }, 500)
this.$set(this.form, 'withProductMaterial', Array.isArray(row.withProductMaterial) ? row.withProductMaterial : row.withProductMaterial && row.withProductMaterial.split(';') || [])
this.resetMaterial(row.extMaterial ? row.extMaterial.resCode : row.resCode || '')
this.changeMaterial(row.extMaterial ? row.extMaterial.resCode : row.resCode || '')
......
......@@ -79,7 +79,8 @@ export default {
AssignCardItem: 'ShellacCardLacquer',
AssignCardAlodine: 'ShellacCardAlodine'
},
subTypeName: ''
subTypeName: '',
shellacDeployLists: []
}
},
computed: {
......@@ -394,8 +395,21 @@ export default {
}
]
}
await post(`/ShellacDeploy/queryModel?param=${key}`, params)
const requestUrl = key === 'baseModelNo' ? '/ShellacDeploy/search' : `/ShellacDeploy/queryModel?param=${key}`
await post(requestUrl, params)
.then(res => {
if (key === 'baseModelNo') {
if (res.items && res.items.content) {
this.shellacDeployLists = res.items.content
this.requestOp = res.items.content.map(item => {
return {
label: item.modelNo,
value: item.modelNo
}
})
this.form.baseModelNo && this.setDiluentModelNoOption(this.form.baseModelNo)
}
} else {
if (res.code === 0) {
this.requestOp = res.items.map(item => {
return {
......@@ -404,6 +418,7 @@ export default {
}
})
}
}
})
},
changeEvent(value) {
......@@ -422,6 +437,10 @@ export default {
} else if (this.itemObj.attrKey === 'baseModelNo') {
this.$set(this.form, 'certificateNo', '')
this.$set(this.form, 'lotNo', '')
this.setDiluentModelNoOption(value)
this.$set(this.form, 'diluentModelNo', '')
this.$set(this.form, 'certificateNum', '')
this.$set(this.form, 'diluentLotNo', '')
} else {
this.$set(this.form, this.itemObj.attrKey, value)
this.changeRequest()
......@@ -590,7 +609,7 @@ export default {
this.$set(this.form, 'storeUpTo', res.items.content[0].storeUpTo)
if (this.form.validityStart && this.form.freeTemperature) {
const date = new Date(this.form.validityStart)
const data = this.form.freeTemperature === '-24' ? (this.form.storeUp ? Number(this.form.storeUp) : 21) : (this.form.storeUp ? Number(this.form.storeUpTo) : 30)
const data = Number(this.form.freeTemperature) === -24 ? (!isNaN(this.form.storeUp) ? Number(this.form.storeUp) : 21) : (!isNaN(this.form.storeUpTo) ? Number(this.form.storeUpTo) : 30)
date.setDate(date.getDate() + data)
this.$set(this.form, 'validityEnd', this.$utils.dateFormat(date.toISOString()))
}
......@@ -756,6 +775,21 @@ export default {
this.setFormDataAttr(attrKey, 'options', this.requestOp)
}
})
},
setDiluentModelNoOption(value) {
const targetObj = this.shellacDeployLists.find(item => item.modelNo === value)
if (targetObj && targetObj.component) {
const diluentModelNoOption = this.splitByVerticalBar(targetObj.component).map(el => { return { value: el, label: el } })
this.setFormDataAttr('diluentModelNo', 'options', diluentModelNoOption || [])
}
},
splitByVerticalBar(str) {
// 正则表达式匹配中文竖线或英文竖线
const regex = /[\u3000\u007C\|]+/g
return str.split(regex).filter(function(item) {
// 去除空字符串
return item !== ''
})
}
}
}
......
......@@ -11,6 +11,13 @@ export default {
defaultValue: '',
name: 'el-input'
}
},
{
key: 'readOnly',
title: '只读',
component: {
name: 'el-checkbox'
}
}
]
}
......
......@@ -14,6 +14,7 @@
v-model="item.progressTime"
size="small"
type="date"
:disabled="itemObj.readOnly"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期"
/>
......@@ -28,10 +29,10 @@
<!-- :rules="[
{required: true, message: '该项必填', trigger: 'blur'},
]" -->
<el-input v-model="item.progressItem" autosize type="textarea" size="small" @change="changeVal" />
<el-input v-model="item.progressItem" :disabled="itemObj.readOnly" autosize type="textarea" size="small" @change="changeVal" />
</el-form-item>
</el-col>
<el-col :span="2">
<el-col v-if="!itemObj.readOnly" :span="2">
<el-form-item class="btn-box">
<span v-if="index+1 == resultFormData.length" class="btn-item" title="新增" @click="addItem" @change="changeVal">
<img src="/icons/c-add.png" alt="">
......
<template>
<div>
<dee-as-com
ref="applyTable"
class="list-table"
:basic-data="{ selectData,selectionRows }"
:lay-config="{ typeName: 'OutStorageUse', layKey: 'outStorageUrgentUseApplyList' }"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
title="发起领用申请"
:dialog-visible="dialogVisible"
>
<div style="margin-bottom: 20px;font-size: 14px;font-weight: bolder;">确认提交吗?</div>
<div style="text-align: center;">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button @click="cancle">取 消</el-button>
</div>
</dee-dialog>
<dee-dialog
title="选择审批领导:"
:dialog-visible="setPersonVisible"
>
<dee-form
ref="form"
label-width="100"
:form="form"
:form-data="formData"
:rules="rules"
>
<el-button type="primary" @click="setPersonConfirm">确 定</el-button>
<el-button @click="setPersonCancle">取 消</el-button>
</dee-form>
</dee-dialog>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
name: 'UrgentUseApply',
componentName: '紧急领用申请',
components: { },
props: {
selectData: {
type: Object,
default: () => {}
}
},
data() {
return {
dialogVisible: false,
setPersonVisible: false,
selectionRows: [],
form: {},
formData: [{
split: 1,
data: [
{
title: '设置审批领导',
key: 'userIds',
component: {
clearable: true,
name: 'el-select',
placeholder: '请选择',
multiple: true,
options: []
}
}]
}],
rules: {
userIds: [
{
required: true,
message: '请填写审批领导',
trigger: ['blur', 'change']
}
]
}
}
},
created() {
const httpParams = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'source.name',
'operator': 'IN',
'value': ['项目部审批人员']
}
],
'operator': 'AND'
},
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
},
{
'name': 'target',
'pageFrom': 1,
'pageSize': 9999
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/DxGroupMemberLink/search', httpParams).then(res => {
const arr = []
const ids = []
res.items.content.forEach(item => {
if (ids.indexOf(item.target.id) === -1) {
ids.push(item.target.id)
arr.push({
value: item.target.id,
label: item.target.name + '/' + item.target.number
})
}
})
this.formData[0].data.forEach(item => {
if (item.key === 'userIds') {
item.component.options = arr
}
/**
item.key === 'userIds' && (item.component.options = arr.map(row => {
return {
value: row.value,
label: row.label
}
}
))
*/
})
}).catch((err) => {
console.log(err)
})
},
methods: {
tableToolHandler(e) {
console.log(e.key.btnValue)
if (e.key.btnValue === 'UseApply') {
this.useApply()
}
},
useApply() {
this.dialogVisible = true
},
confirm() {
let isUrgentUse = 0
this.selectionRows.forEach(item => {
if (item.typeName !== 'UrgentUse') {
isUrgentUse++
}
})
if (isUrgentUse === 0) {
// 紧急领用选人
this.dialogVisible = false
this.setPersonVisible = true
} else if (isUrgentUse === this.selectionRows.length) {
post('/OutStorageRequest/outStorageOut/submit?applyIds=' + this.selectionRows.map(item => Number(item.id))).then(res => {
this.$utils.showMessageSuccess('提交成功')
this.$refs.applyTable.$refs.asCom.getData()
}).catch(() => {
this.$utils.showMessageWarning('出现异常,提交失败')
}).finally(() => {
this.dialogVisible = false
})
} else {
this.dialogVisible = false
this.$utils.showMessageWarning('紧急领用不能和其他领用类型一起提交')
}
},
cancle() {
this.dialogVisible = false
},
setPersonConfirm() {
const ids = []
if (this.selectionRows && this.selectionRows.length) {
this.selectionRows.forEach(item => ids.push(item.id))
}
if (this.form.userIds && this.form.userIds.length !== 0) {
post('/OutStorageRequest/creator/apply?userIds=' + this.form.userIds, ids).then(res => {
this.$utils.showMessageSuccess('提交成功')
setTimeout(() => {
this.$refs.applyTable.$refs.asCom.getData()
}, 1500)
}).catch(err => {
this.$utils.showMessageWarning('出现异常,提交失败')
console.log(err)
}).finally(() => {
this.dialogVisible = false
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
})
} else {
this.$utils.showMessageWarning('请选择审批领导')
}
},
setPersonCancle() {
this.setPersonVisible = false
this.$set(this.form, 'userIds', '')
},
selectionChange(val) {
this.selectionRows = val
}
}
}
</script>
<style></style>
......@@ -2537,11 +2537,13 @@ export default {
this.initSupervise()
this.onresize()
this.init()
document.getElementsByClassName('page-content-item')[0].style['padding'] = '0px'
},
beforeDestroy() {
// 销毁侦听器
const el = $('.assemble-kanban').parent()[0]
this.erd.uninstall(el)
document.getElementsByClassName('page-content-item')[0].style['padding'] = '4px'
},
methods: {
init() {
......@@ -2880,8 +2882,9 @@ export default {
},
backRouter() {
this.$router.push({
name: 'ProductionKanban',
path: '/page/c9eeeae4-c82e-4a63-87eb-2be11da40969',
query: {
title: '总装集成看板',
model: this.$route.query.model,
sorties: this.$route.query.sorties
}
......@@ -3043,7 +3046,8 @@ export default {
<style lang="scss" scoped>
.show-page-com .page-content-box .dee-as-com{
overflow: hidden;
padding:0px;
overflow: hidden;
}
/deep/{
.assemble-kanban {
......
......@@ -80,7 +80,7 @@
item.userName
}}</span>
<span :title="item.examine | userNameFormatter">{{
item.examine.length ? item.examine[0] : ""
item.examine&&item.examine.length ? item.examine[0] : ""
}}</span>
<span>{{ item.completion }}</span>
</li>
......@@ -2242,7 +2242,7 @@ export default {
barCategoryGap: 30,
label: {
show: true,
position: 'right',
position: 'insideRight',
color: '#728385',
textBorderColor: 'transparent'
},
......@@ -2490,12 +2490,14 @@ export default {
this.initSupervise()
this.initSuperviseTable()
this.init()
document.getElementsByClassName('page-content-item')[0].style['padding'] = '0px'
},
beforeDestroy() {
// 销毁侦听器
const el = $('.experiment-kanban').parent()[0]
this.erd.uninstall(el)
document.getElementsByClassName('page-content-item')[0].style['padding'] = '4px'
},
methods: {
init() {
......@@ -2917,9 +2919,11 @@ export default {
<style scoped lang="scss">
.show-page-com .page-content-box .dee-as-com{
overflow: hidden;
padding:0px;
overflow: hidden;
}
/deep/{.experiment-kanban {
/deep/{
.experiment-kanban {
width: 1920px;
height: 1080px;
transform-origin: left top;
......
......@@ -212,11 +212,13 @@ export default {
this.getMaterial()
this.onresize()
this.init()
document.getElementsByClassName('page-content-item')[0].style['padding'] = '0px'
},
beforeDestroy() {
// 销毁侦听器
const el = $('.production-kanban').parent()[0]
this.erd.uninstall(el)
document.getElementsByClassName('page-content-item')[0].style['padding'] = '4px'
},
methods: {
init() {
......@@ -467,7 +469,8 @@ export default {
<style scoped lang="scss">
.show-page-com .page-content-box .dee-as-com{
overflow: hidden;
padding:0px;
overflow: hidden;
}
/deep/{
.production-kanban {
......
......@@ -276,6 +276,7 @@ export default {
{ label: '机型', value: item.aircraftType || '' },
{ label: '验收单号', value: item.testNo || '' },
{ label: '保证保管期', value: item.guaranteePeriod || '' },
{ label: '移库数量', value: item.currOutsideAmount || '' },
{
label: '贮存期',
value:
......
......@@ -24,7 +24,7 @@
<i class="el-icon-loading" />
<span>数据加载中···</span>
</div>
<div :id="onlyUuid" :ref="onlyUuid" class="gannt" style="height: calc(100vh - 100px)" @mouseleave="hideTooltip" />
<div :id="onlyUuid" :ref="onlyUuid" class="gannt" style="height: calc(100vh - 152px)" @mouseleave="hideTooltip" />
</main>
</div>
</template>
......
......@@ -623,8 +623,8 @@ export default {
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
'fieldName': 'initials',
'sortOrder': 'asc'
}
],
'toValidateKeys': ''
......
......@@ -127,7 +127,7 @@ export default {
*/
getAddRecursion() {
this.sortiesLoading = true
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }] }
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] }
params.openProps = [{ name: 'aircraftType' }]
this.$api
.searchApi('AircraftSorties', params)
......
......@@ -194,6 +194,7 @@ export default {
isLeaf: true,
disabled: true,
level: 1,
modelName: this.froms.modelName,
children: res.items && res.items.content.map((t) => {
// quantity += t.completeCount
// total += t.carryCount
......@@ -201,7 +202,8 @@ export default {
serialNo: this.froms.sortieName,
title: t.serialNumber,
icon: 'c-backups3',
id: t.id
id: t.id,
modelName: this.froms.modelName
// quantity: t.completeCount,
// total: t.carryCount
}
......
......@@ -115,6 +115,29 @@
<i v-if="scope.row.countWorkHourLoading" class="el-icon-loading" />
</template>
</el-table-column>
<el-table-column
prop="workPackage"
align="center"
label="所属工作包"
:width="150"
>
<template slot="header">
<span>所属工作包</span>
<i v-if="loginUser=== '1'" class="el-icon-edit-outline" />
</template>
<template slot-scope="scope">
<el-select
v-if="scope.row.workPackageSelect"
v-model="scope.row.workPackage"
placeholder="请选择"
@change="saveWorkPackage(scope.row, true)"
@visible-change="visibleChange($event, scope.row)"
>
<el-option v-for="(item, i) in wpOptions" :key="i" :label="item.name" :value="item.id" />
</el-select>
<span v-else>{{ $utils.getParamsFromLists(wpDictionary, 'id', scope.row[scope.column.property], 'name') }}</span>
</template>
</el-table-column>
<el-table-column
prop="workHour"
align="center"
......@@ -283,6 +306,10 @@ export default {
total: 0,
pageSizes: [5, 10, 20, 50]
},
// 工作包数据(有效)
wpOptions: [],
// 工作包数据字典(包含有效和无效)
wpDictionary: [],
// 加载中
loading: false,
curRowId: null,
......@@ -326,6 +353,7 @@ export default {
this.level = level
this.tablePagination.currentPage = 1
this.getTableData(data, level)
this.getWPOptions(data)
})
})
this.getDicListByCode()
......@@ -338,6 +366,53 @@ export default {
async getDicListByCode() {
this.stateOption = await this.$utils.getDicListByCode('ObjStatus')
},
/**
* 工作包选项数据
*/
getWPOptions(data) {
this.wpOptions = []
this.wpDictionary = []
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [],
'items': [
{
'fieldName': 'sorties',
'operator': 'EQ',
'value': data.serialNo
}, {
'fieldName': 'planeType',
'operator': 'EQ',
'value': data.modelName
}
],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
]
}
post('/ExtWorkPackage/search', params).then(res => {
res.items.content.forEach(row => {
if (row.workState === 'Y') {
this.wpOptions.push({
name: row.name,
id: row.id
})
}
this.wpDictionary.push({
name: row.name,
id: row.id
})
})
})
},
/**
* 工具栏
*/
......@@ -584,7 +659,20 @@ export default {
]
},
openProps: [],
openProps: [
{
'name': 'extWorkPackageLinks',
'pageFrom': 1,
'pageSize': 9999,
'openProps': [
{
'name': 'source',
'pageFrom': 1,
'pageSize': 9999
}
]
}
],
sortItem: [
{
fieldName: 'serialNumber',
......@@ -625,7 +713,9 @@ export default {
userName: p.noteName,
createTime: p.createTime,
processTaskId: p.id,
note: p.note
note: p.note,
workPackageSelect: false,
workPackage: p.extWorkPackageLinks && p.extWorkPackageLinks[0].source.id
}
})
that.tableData.length &&
......@@ -796,6 +886,8 @@ export default {
} else if (column.property === 'countWorkHour') {
this.countWorkHour = row.countWorkHour
row.countWorkHourSelect = true
} else if (column.property === 'workPackage') {
row.workPackageSelect = true
} else {
return
}
......@@ -804,6 +896,8 @@ export default {
row.firstCheckFlagSelect = false
} else if (column.property === 'countWorkHour') {
row.countWorkHourSelect = false
} else if (column.property === 'workPackage') {
row.workPackageSelect = false
}
clearTimeout(this.timer)
that.timer = null
......@@ -816,6 +910,7 @@ export default {
} else {
row.firstCheckFlagSelect = false
row.countWorkHourSelect = false
row.workPackageSelect = false
}
},
visibleWorkProcedureChange(event, row) {
......@@ -851,6 +946,30 @@ export default {
that.workProcedureTimer = null
}, 2000)
},
saveWorkPackage(row, status) {
var that = this
const param = {
source: row.workPackage,
target: row.id
}
post('/ExtWorkPackageLink/saveLinks', param)
.then((res) => {
if (res.message.includes('成功')) {
that.$message({
showClose: true,
message: '保存成功',
type: 'success'
})
} else {
that.$message({
showClose: true,
message: '保存失败',
type: 'error'
})
}
})
.catch((err) => console.error(err))
},
deeTableBlur(row, status) {
var that = this
const param = {
......
......@@ -14,7 +14,7 @@
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-col :span="5">
<el-form-item label="班组:">
<el-select v-model="searchFormData.group" placeholder="班组" @change="changeGroup">
<el-option
......@@ -43,6 +43,11 @@
<el-input v-model="searchFormData.aoName" clearable placeholder="请输入AO(号/名称)" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工作包名称:">
<el-input v-model="searchFormData.wpName" clearable placeholder="请输入工作包名称" />
</el-form-item>
</el-col>
<el-col :span="2">
<el-button
type="primary"
......@@ -194,7 +199,8 @@ export default {
group: '',
postion: '',
aoName: '',
sorties: ''
sorties: '',
wpName: ''
},
groupList: [],
groupUserList: [],
......@@ -252,6 +258,7 @@ export default {
{ title: '机型', key: 'extProcessPlan.planeType', align: 'left' },
{ title: '架次', key: 'extProcessPlan.sorties', align: 'left' },
{ title: '站位', key: 'extProcessPlan.positionNumber', align: 'left' },
{ title: '工作包名称', key: 'extProcessPlan.extWorkPackageLinks[0].source.name', align: 'left' },
{ title: '工时定额', key: 'extProcessPlan.opHour', align: 'left' },
{ title: '工时', key: 'extProcessPlan.workHour', align: 'left' },
{ title: '计划员', key: 'planner.name', align: 'left' },
......@@ -603,7 +610,17 @@ export default {
},
'openProps': [
{
'name': 'extProcessPlan'
'name': 'extProcessPlan',
'openProps': [
{
'name': 'extWorkPackageLinks',
'openProps': [
{
'name': 'source'
}
]
}
]
},
{
'name': 'cooperatives'
......@@ -623,6 +640,15 @@ export default {
'value': this.searchFormData.sorties
})
}
if (this.searchFormData.wpName) {
params.searchItems.children[0].items.push(
{
'fieldName': 'extProcessPlan.extWorkPackageLinks.source.name',
'operator': 'LIKE',
'value': this.searchFormData.wpName
}
)
}
post('/JoExecutePlan/search', params).then(res => {
if (res.items && res.items.content) {
this.tableData = res.items.content
......@@ -681,8 +707,8 @@ export default {
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
'fieldName': 'initials',
'sortOrder': 'asc'
}
],
'toValidateKeys': ''
......
......@@ -150,9 +150,18 @@ export default {
}
],
'sortItem': [
{
'fieldName': 'isValid',
'sortOrder': 'desc'
},
{
'fieldName': 'modifyTime',
'fieldName': 'extStandPosition.extcode',
'sortOrder': 'desc'
},
{
'fieldName': 'sorted',
'sortOrder': 'asc'
}
],
'toValidateKeys': ''
......
......@@ -8,8 +8,15 @@
>
<template slot="paneL">
<div class="left-container">
<div class="search-box box">
<div class="title"><i class="search-icon" /><span>架次搜索</span></div>
<div class="search-box box" :style="{height:showSearchConditions?'150px':'40px'}">
<div class="title"><i class="search-icon" /><span>架次搜索</span>
<div class="search-condition-operation-item" @click="toggleSearchConditions"><img
class="search-condition-operation-icon"
:src="showSearchConditions?'icons/circle-fold.png':'icons/circle-collapse.png'"
>
</div>
</div>
<div v-if="showSearchConditions" class="search-conditions">
<div class="row">
<label>机型:</label>
<el-select v-model="form.model" size="mini" placeholder="请选择" :loading="modelLoading">
......@@ -26,7 +33,8 @@
<el-button size="mini" type="primary" @click="getTreeData">查询</el-button>
</div>
</div>
<div class="station-box box">
</div>
<div class="station-box box " :style="{height:showSearchConditions?'calc(100% - 190px)':'calc(100% - 80px)'}">
<!-- <el-input
v-model="filterText"
placeholder="输入关键字进行过滤"
......@@ -72,6 +80,7 @@
v-show="!isCooperate"
ref="detailCom"
:key="layConfig.layKey"
:basic-data="{requestUrl,sortiesName:form.sortiesName}"
table-height="calc(100vh - 100px)"
:lay-config="layConfig"
:form="searchFormData"
......@@ -130,7 +139,9 @@ export default {
skillType: '',
isCooperate: false,
currentNodekey: '',
filterText: ''
filterText: '',
requestUrl: '',
showSearchConditions: true // 控制搜索条件是否显示
}
},
watch: {
......@@ -541,6 +552,9 @@ export default {
}
}
})
},
toggleSearchConditions() {
this.showSearchConditions = !this.showSearchConditions
}
}
}
......@@ -557,10 +571,17 @@ export default {
.search-box {
height: 150px;
font-size: 14px;
position: relative; /* 允许内部元素使用绝对定位 */
.title {
margin-left: 10px;
text-align: left;
margin-top: 10px;
display: flex; /* 使用flex布局来更好地控制子元素 */
align-items: center; /* 垂直居中 */
/* 添加按钮的右外边距或定位,具体取决于您的布局需求 */
.search-condition-operation-item {
margin-left: auto; /* 将按钮推到右边 */
}
}
.search-icon {
display: inline-block;
......
......@@ -177,7 +177,7 @@ export default {
this.sortiesData = []
this.sorties = null
}
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }] }
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] }
params.openProps = [{ name: 'aircraftType' }]
this.$api
.searchApi('AircraftSorties', params)
......
......@@ -8,8 +8,15 @@
>
<template slot="paneL">
<div class="left-container">
<div class="search-box box">
<div class="title"><i class="search-icon" /><span>架次搜索</span></div>
<div class="search-box box" :style="{height:showSearchConditions?'150px':'40px'}">
<div class="title"><i class="search-icon" /><span>架次搜索</span>
<div class="search-condition-operation-item" @click="toggleSearchConditions"><img
class="search-condition-operation-icon"
:src="showSearchConditions?'icons/circle-fold.png':'icons/circle-collapse.png'"
>
</div>
</div>
<div v-if="showSearchConditions" class="search-conditions">
<div class="row">
<label>机型:</label>
<el-select v-model="form.model" size="mini" placeholder="请选择" :loading="modelLoading">
......@@ -26,7 +33,8 @@
<el-button size="mini" type="primary" @click="getTreeData">查询</el-button>
</div>
</div>
<div class="station-box box">
</div>
<div class="station-box box " :style="{height:showSearchConditions?'calc(100% - 190px)':'calc(100% - 80px)'}">
<div class="search-area">
<el-input v-model="keyword" placeholder="请输入关键字" class="search-input" clearable>
<!-- <el-button slot="append" icon="el-icon-search" @click="searchData" /> -->
......@@ -154,7 +162,10 @@ export default {
},
activeTab: '0',
activeNodeData: {},
currentNodekey: ''
currentNodekey: '',
areaUpdatingLists: {},
requestParams: [],
showSearchConditions: true // 控制搜索条件是否显示
}
},
watch: {
......@@ -578,6 +589,14 @@ export default {
},
rowClick(data) {
this.$emit('getMissData', data)
},
rowClickSpec(data) {
const tmpData = {}
tmpData.row = data.row.extSupporting
this.$emit('getMissData', tmpData)
},
toggleSearchConditions() {
this.showSearchConditions = !this.showSearchConditions
}
}
}
......@@ -595,10 +614,17 @@ export default {
.search-box {
height: 150px;
font-size: 14px;
position: relative; /* 允许内部元素使用绝对定位 */
.title {
margin-left: 10px;
text-align: left;
margin-top: 10px;
display: flex; /* 使用flex布局来更好地控制子元素 */
align-items: center; /* 垂直居中 */
/* 添加按钮的右外边距或定位,具体取决于您的布局需求 */
.search-condition-operation-item {
margin-left: auto; /* 将按钮推到右边 */
}
}
.search-icon {
display: inline-block;
......
......@@ -195,7 +195,7 @@
sortable
>
<template slot-scope="scope">
<span v-if="scope.row.weigthObj"> {{ scope.row.weigthObj.outsideAmount }}</span>
<span> {{ scope.row.actualAmount }}</span>
</template>
</el-table-column>
<el-table-column
......
......@@ -168,7 +168,7 @@ export default {
this.clickTask = item
setMsgStatus(item).then(res => {
this.$set(this.messageList[index], 'state', 1)
this.$emit('getMessageData', item || null)
this.$emit('getMessageData', { ...item, businessObjectTitle: res.items.businessObjectTitle } || null)
})
},
getMoreTaskData() {
......
......@@ -766,6 +766,7 @@ export default {
},
// 路由切换
routeSelect(val) {
this.clearApprovalFormValidateStatus()
this.getBizForm(val)
},
// 获取业务表单
......@@ -779,7 +780,8 @@ export default {
finishTask(flag, params, callback, errCallBack) {
this.$nextTick(function() {
const validateArray = []
// 审批对象表单
// 审批对象表单,路由选择驳回的情况下不校验审批对象表单
if (params.routerSelect !== 'reject') {
this.approvalObject.forEach(item => {
const refCom = this.$refs[item.refKey]
if (!refCom || !refCom[0]) return
......@@ -792,6 +794,7 @@ export default {
validateArray.push(vm.$refs.asCom.$refs.deeForm.validate())
}
})
}
// 任务处理
this.dynamicComponents.forEach(item => {
if (this.$refs.hasOwnProperty(item.configName)) {
......@@ -868,6 +871,21 @@ export default {
})
}
})
},
// 清理审批表单校验状态
clearApprovalFormValidateStatus() {
this.approvalObject.forEach(item => {
const refCom = this.$refs[item.refKey]
if (!refCom || !refCom[0]) return
const vm = refCom[0]
if (vm.hasOwnProperty('clearValidate')) {
vm.clearValidate()
} else if (vm.$refs.asCom && vm.$refs.asCom.hasOwnProperty('clearValidate')) {
vm.$refs.asCom.clearValidate()
} else if (vm.$refs.asCom && vm.$refs.asCom.$refs && vm.$refs.asCom.$refs.deeForm && vm.$refs.asCom.$refs.deeForm.hasOwnProperty('clearValidate')) {
vm.$refs.asCom.$refs.deeForm.clearValidate()
}
})
}
},
filter: {}
......
/** * @Description:物料缺件分析 * @author gjn * @date 2023/12/04 */
<template>
<div ref="pieDom" style="width: 100%; height: 10vh" />
</template>
<script>
export default {
props: {
item: {
type: Object,
default: () => {}
}
},
data() {
return {
pieEcharts: '',
pieOption: {},
datas: []
}
},
watch: {
item: {
deep: true,
immediate: true,
handler(val) {
this.datas = [
{
value: this.item.countCarry,
name: '已完工' // 已完工
},
{
value: this.item.countUndone,
name: '未开工' // 未完成
},
{
value: this.item.countNotOk,
name: '执行中' // 执行中
}
]
this.$nextTick(() => {
this.pieEcharts = this.$echarts.init(this.$refs.pieDom)
this.setPieOption()
this.setPieEvents()
})
}
}
},
mounted() {},
beforeDestroy() {
if (this.pieEcharts) {
this.pieEcharts.dispose() // 清理ECharts实例,避免内存泄漏
}
window.removeEventListener('resize', this.pieEcharts.resize)
},
methods: {
setPieOption() {
this.pieOption = {
color: ['#13b346', 'blue', '#f2743a'], // 环形的分段色值设置
title: {
text: this.item.name,
color: '#3F3F3F',
bottom: 0,
right: 'center',
textStyle: {
fontSize: 14
}
},
tooltip: {
trigger: 'item'
},
series: [
{
type: 'pie',
radius: ['50%', '70%'], // 内存 、外层
avoidLabelOverlap: false,
hoverAnimation: true,
hoverOffset: 2,
top: -18,
label: {
normal: {
show: false, // 中间的标签
position: 'center'
},
emphasis: {
show: true,
textStyle: {
fontSize: '12'
}
}
},
labelLine: {
normal: {
show: false
}
},
selectedOffset: 0,
itemStyle: {
emphasis: {}
},
data: this.datas
}
]
}
// 渲染图表
this.pieEcharts.setOption(this.pieOption)
window.addEventListener('resize', function() {
this.pieEcharts && this.pieEcharts.resize()
})
},
/**
* 设置图表的事件
*/
setPieEvents() {
/**
* 刷新时默认显示第一条
*/
this.pieEcharts.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: 0
})
/**
* 鼠标移入图表时,不为第一条时就取消第一条的高亮效果
*/
this.pieEcharts.on('mouseover', (v) => {
if (v.dataIndex !== 0) {
this.pieEcharts.dispatchAction({
type: 'downplay',
seriesIndex: 0,
dataIndex: 0
})
}
})
/**
* 鼠标图表时默认显示第一条
*/
this.pieEcharts.on('mouseout', (v) => {
this.pieEcharts.dispatchAction({
type: 'highlight',
seriesIndex: 0,
dataIndex: 0
})
})
// 监听窗口变化 - 只刷新最后一个图表
// window.onresize = () => {
// this.pieEcharts.resize()
// }
// 监听窗口变化 - 多个图表同时刷新
// window.addEventListener('resize', () => {
// this.pieEcharts.resize()
// })
}
}
}
</script>
<style scoped></style>
......@@ -47,15 +47,7 @@
<right-centerPane-top />
</div>
<div class="right-centerPane-bottom">
<el-card style="height:100%">
<div slot="header" class="clearfix">
<span>物料缺件分析</span>
</div>
<div class="chartsBox">
<right-centerPane-bottom v-for="(item,index) in materialLists" :key="index" :item="item" />
</div>
</el-card>
<right-centerPane-bottom />
</div>
</template>
<template slot="paneR">
......@@ -269,11 +261,6 @@ export default {
height: 100%;
padding: 10px;
}
.chartsBox{
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
}
}
}
</style>
......@@ -111,7 +111,7 @@ export default {
*/
getAddRecursion() {
this.sortiesLoading = true
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'modifyTime', sortOrder: 'asc' }] }
const params = { searchItems: { items: [{ fieldName: 'aircraftTypeId', operator: 'EQ', value: this.form.model }] }, sortItem: [{ fieldName: 'defCode', sortOrder: 'asc' }] }
params.openProps = [{ name: 'aircraftType' }]
this.$api
.searchApi('AircraftSorties', params)
......
......@@ -173,7 +173,7 @@ export default {
this.dialogVisible = false
this.setPersonVisible = true
} else if (isUrgentUse === this.selectionRows.length) {
post('/DxWorkflowTask/apply/batchPass?applyIds=' + this.selectionRows.map(item => ({ 'taskId': item.processTaskId, 'pboId': item.id }))).then(res => {
post('/DxWorkflowTask/apply/batchPass', this.selectionRows.map(item => ({ 'taskId': item.processTaskId, 'pboId': item.id }))).then(res => {
this.$utils.showMessageSuccess('提交成功')
this.$refs.applyTable.$refs.asCom.getData()
}).catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment