功能优化
This commit is contained in:
parent
16a6e7897b
commit
4dd2027580
|
|
@ -373,6 +373,18 @@ export function getMaTypeDataById(data) {
|
|||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 根据二级id 查4级规格类型
|
||||
export function getMaTypeDataByIdTwo(data) {
|
||||
return request({
|
||||
url: '/material/select/getMaTypeDataByIdTwo',
|
||||
method: 'post',
|
||||
headers: {
|
||||
repeatSubmit: false,
|
||||
},
|
||||
data,
|
||||
})
|
||||
}
|
||||
export function getFourMaTypeList(data) {
|
||||
return request({
|
||||
url: '/material/select/getFourMaTypeList',
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
<el-cascader
|
||||
:key="propsKey"
|
||||
v-model="deviceType"
|
||||
:show-all-levels="false"
|
||||
:show-all-levels="true"
|
||||
:options="deviceTypeTree"
|
||||
:props="deviceTypeTreeProps"
|
||||
filterable
|
||||
|
|
@ -199,7 +199,20 @@
|
|||
<el-table-column align="center" prop="typeName" label="机具名称" />
|
||||
<el-table-column align="center" label="规格型号" prop="deviceType" />
|
||||
<el-table-column align="center" label="设备所属" prop="deviceAscription" />
|
||||
<el-table-column label="预领数量" prop="deviceNum" align="center" />
|
||||
<el-table-column label="预领数量" prop="preNum" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-if="isView"
|
||||
v-model.number="scope.row.preNum"
|
||||
placeholder="请输入预领数量"
|
||||
type="number"
|
||||
min="1"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
/>
|
||||
<span v-else>{{ scope.row.preNum }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="库存数量" prop="num" />
|
||||
<el-table-column align="center" label="是否管理库存">
|
||||
<template slot-scope="{ row }">
|
||||
|
|
@ -564,11 +577,11 @@ export default {
|
|||
// this.getList();
|
||||
if (this.$route.query.taskId && !this.$route.query.isBack) {
|
||||
console.log('查看')
|
||||
this.GetTaskDetail(this.$route.query.taskId)
|
||||
await this.GetTaskDetail(this.$route.query.taskId)
|
||||
}
|
||||
if (this.$route.query.taskId && this.$route.query.isBack) {
|
||||
console.log('驳回提交查看')
|
||||
this.GetTaskDetail2(this.$route.query.taskId)
|
||||
await this.GetTaskDetail2(this.$route.query.taskId)
|
||||
}
|
||||
// this.taskId = this.$route.query.taskId
|
||||
// this.isEdit = this.$route.query.isEdit
|
||||
|
|
@ -594,7 +607,7 @@ export default {
|
|||
})
|
||||
|
||||
} else {
|
||||
this.GetDeviceTypeTree()
|
||||
await this.GetDeviceTypeTree()
|
||||
}
|
||||
|
||||
// console.log(typeof(this.isEdit))
|
||||
|
|
@ -739,6 +752,7 @@ export default {
|
|||
})
|
||||
this.deviceType = selectList
|
||||
this.propsKey++
|
||||
await this.$nextTick();
|
||||
|
||||
if (data.ctLeaseApplyDetails) {
|
||||
this.getCtFileList(data.ctLeaseApplyDetails)
|
||||
|
|
@ -775,7 +789,16 @@ export default {
|
|||
return this.handelEchoData(item)
|
||||
})
|
||||
|
||||
let selectList = []
|
||||
this.leaseApplyDetails.forEach((e) => {
|
||||
selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
|
||||
})
|
||||
this.deviceType = selectList
|
||||
this.propsKey++
|
||||
await this.$nextTick();
|
||||
|
||||
if (data.ctLeaseApplyDetails) {
|
||||
this.
|
||||
this.getCtFileList(data.ctLeaseApplyDetails)
|
||||
}
|
||||
},
|
||||
|
|
@ -793,19 +816,34 @@ export default {
|
|||
}
|
||||
|
||||
ctList.forEach((e) => {
|
||||
queryCompleteSetToolsApi(e).then((res) => {
|
||||
e.childrenList = res.data.map((j) => {
|
||||
// queryCompleteSetToolsApi(e).then((res) => {
|
||||
// e.childrenList = res.data.map((j) => {
|
||||
// return {
|
||||
// ...j,
|
||||
// initNum: j.deviceNum,
|
||||
// preNum: j.preNum,
|
||||
// }
|
||||
// })
|
||||
|
||||
// e.childrenList.forEach((i) => {
|
||||
// i.deviceNum = i.initNum * e.wholeTypeNum
|
||||
// })
|
||||
// this.wholeTypeNameList.push(e)
|
||||
// })
|
||||
e.childrenList = ctData[e.wholeTypeName].map((j) => {
|
||||
console.log("pppppppp",j)
|
||||
return {
|
||||
...j,
|
||||
initNum: j.deviceNum,
|
||||
preNum: j.preNum,
|
||||
}
|
||||
})
|
||||
|
||||
e.childrenList.forEach((i) => {
|
||||
i.deviceNum = i.initNum * e.wholeTypeNum
|
||||
i.preNum = Number(i.preNum )
|
||||
})
|
||||
this.wholeTypeNameList.push(e)
|
||||
})
|
||||
console.log("hhhhhhhhhhhh",this.wholeTypeNameList)
|
||||
})
|
||||
},
|
||||
//生成回显数据
|
||||
|
|
@ -1184,6 +1222,7 @@ export default {
|
|||
wholeTypeNameData.childrenList = res.data.map((e) => {
|
||||
return {
|
||||
...e,
|
||||
preNum: e.deviceNum,
|
||||
initNum: e.deviceNum,
|
||||
}
|
||||
})
|
||||
|
|
@ -1205,7 +1244,10 @@ export default {
|
|||
|
||||
/* 更改数量 */
|
||||
onChangeInput(val, v) {
|
||||
this.wholeTypeNameList[v].childrenList.forEach((e) => (e.deviceNum = e.initNum * val))
|
||||
console.log("sssssssssss",this.wholeTypeNameList),
|
||||
this.wholeTypeNameList[v].childrenList.forEach((e) => (
|
||||
console.log("uuuuuuuuuu",e),
|
||||
e.deviceNum = e.deviceNum * val,e.preNum = e.preNum * val))
|
||||
},
|
||||
// 获取规格型号
|
||||
async getMaTypeDataByIdFun(val) {
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ import {
|
|||
getHoldingPoleSelListApi,
|
||||
getLevelTwoUnitCbx,
|
||||
getMaTypeDataById,
|
||||
getMaTypeDataByIdTwo,
|
||||
} from '@/api/claimAndRefund/receive'
|
||||
import { getInfo } from '@/api/login'
|
||||
export default {
|
||||
|
|
@ -726,7 +727,8 @@ export default {
|
|||
console.log('🚀 ~ 以大代小 ~ item:')
|
||||
// 是否以大代小
|
||||
if (item.isReplace == 1) {
|
||||
getMaTypeDataById({ id: item.maTypeId }).then((res) => {
|
||||
console.log("xxxxxxxxxxxx",item)
|
||||
getMaTypeDataByIdTwo({ id: item.levelTwoId }).then((res) => {
|
||||
console.log('🚀 ~ this.leaseApplyDetails.forEach ~ res:', res)
|
||||
this.$set(item, 'isReplaceOpt', res.data)
|
||||
})
|
||||
|
|
@ -826,6 +828,7 @@ export default {
|
|||
template.maTypeId = item.maTypeId
|
||||
template.replaceTypeId = item.replaceTypeId
|
||||
template.maModel = item.maModel
|
||||
template.levelTwoId = item.levelTwoId
|
||||
return template
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -289,6 +289,20 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="查看全量数据" prop="isView">
|
||||
<el-radio-group v-model="form.isView">
|
||||
<el-radio
|
||||
v-for="dict in viewStatus"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
@ -485,6 +499,13 @@ export default {
|
|||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
isView: [
|
||||
{
|
||||
required: true,
|
||||
message: '是否可查看全量数据为必填项',
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
// 新增公司弹框
|
||||
addCompanyVisible: false,
|
||||
|
|
@ -496,6 +517,10 @@ export default {
|
|||
enterpriseOwnershipCode: '',
|
||||
},
|
||||
],
|
||||
viewStatus: [
|
||||
{ label: '是', value: '0' },
|
||||
{ label: '否', value: '1' },
|
||||
],
|
||||
userId: sessionStorage.getItem('userId'),
|
||||
ENV: process.env.VUE_APP_ENV, // 获取当前运行环境 如是南网开发环境或线上环境 则显示新增公司按钮
|
||||
|
||||
|
|
@ -577,6 +602,7 @@ export default {
|
|||
phone: undefined,
|
||||
email: undefined,
|
||||
status: '0',
|
||||
isView: '0',
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue