退料申请退料人手机号码问题优化
This commit is contained in:
parent
7690b80b6b
commit
e908f0e2df
|
|
@ -12,7 +12,8 @@
|
||||||
<el-form-item label="退料单位" prop="unitId">
|
<el-form-item label="退料单位" prop="unitId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.unitId"
|
v-model="queryParams.unitId"
|
||||||
clearable filterable
|
clearable
|
||||||
|
filterable
|
||||||
@change="GetProData"
|
@change="GetProData"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
@ -29,7 +30,8 @@
|
||||||
<el-form-item label="退料工程" prop="proId">
|
<el-form-item label="退料工程" prop="proId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.proId"
|
v-model="queryParams.proId"
|
||||||
clearable filterable
|
clearable
|
||||||
|
filterable
|
||||||
@change="GetUnitData"
|
@change="GetUnitData"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
|
|
@ -44,7 +46,10 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="协议号" prop="agreementCode">
|
<el-form-item label="协议号" prop="agreementCode">
|
||||||
<el-input v-model="queryParams.agreementCode" disabled></el-input>
|
<el-input
|
||||||
|
v-model="queryParams.agreementCode"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物品类型" prop="status">
|
<el-form-item label="物品类型" prop="status">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
|
|
@ -136,7 +141,12 @@
|
||||||
:data="leaseApplyDetails"
|
:data="leaseApplyDetails"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" min-width="55" align="center" :selectable="selectable"/>
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
min-width="55"
|
||||||
|
align="center"
|
||||||
|
:selectable="selectable"
|
||||||
|
/>
|
||||||
<el-table-column label="序号" type="index" min-width="120" />
|
<el-table-column label="序号" type="index" min-width="120" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="类型名称"
|
label="类型名称"
|
||||||
|
|
@ -150,7 +160,11 @@
|
||||||
min-width="200"
|
min-width="200"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="计量单位" prop="unitNames" min-width="100" />
|
<el-table-column
|
||||||
|
label="计量单位"
|
||||||
|
prop="unitNames"
|
||||||
|
min-width="100"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="当前在用量"
|
label="当前在用量"
|
||||||
|
|
@ -171,7 +185,8 @@
|
||||||
placeholder="请输入退料数量"
|
placeholder="请输入退料数量"
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
clearable @input="checkNum(scope.row)"
|
clearable
|
||||||
|
@input="checkNum(scope.row)"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -211,7 +226,9 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete({ ...scope.row, index: scope.$index })"
|
@click="
|
||||||
|
handleDelete({ ...scope.row, index: scope.$index })
|
||||||
|
"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -221,8 +238,19 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
|
import {
|
||||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
getRole,
|
||||||
|
delRole,
|
||||||
|
addRole,
|
||||||
|
updateRole,
|
||||||
|
dataScope,
|
||||||
|
changeRoleStatus,
|
||||||
|
deptTreeSelect,
|
||||||
|
} from '@/api/system/role'
|
||||||
|
import {
|
||||||
|
treeselect as menuTreeselect,
|
||||||
|
roleMenuTreeselect,
|
||||||
|
} from '@/api/system/menu'
|
||||||
import {
|
import {
|
||||||
getProData,
|
getProData,
|
||||||
getUnitData,
|
getUnitData,
|
||||||
|
|
@ -230,25 +258,27 @@ import {
|
||||||
getAgreementInfoById,
|
getAgreementInfoById,
|
||||||
submitLeaseApply,
|
submitLeaseApply,
|
||||||
getUseTypeTreee,
|
getUseTypeTreee,
|
||||||
getUseNumByTypeId
|
getUseNumByTypeId,
|
||||||
} from '@/api/claimAndRefund/receive'
|
} from '@/api/claimAndRefund/receive'
|
||||||
import { submitBackApplyApi } from "@/api/claimAndRefund/return"
|
import { submitBackApplyApi } from '@/api/claimAndRefund/return'
|
||||||
import { submitBackApplyApiByCq,materialReturnNoteByApply,submitRefuseBackApply } from "@/api/claimAndRefund/return.js"
|
|
||||||
import { mapState } from 'vuex'
|
|
||||||
import {
|
import {
|
||||||
getInfo, h
|
submitBackApplyApiByCq,
|
||||||
} from "@/api/login";
|
materialReturnNoteByApply,
|
||||||
|
submitRefuseBackApply,
|
||||||
|
} from '@/api/claimAndRefund/return.js'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
import { getInfo, h } from '@/api/login'
|
||||||
export default {
|
export default {
|
||||||
name: "ReturnApplyAdd",
|
name: 'ReturnApplyAdd',
|
||||||
data() {
|
data() {
|
||||||
const validatePhone = (rule, value, callback) => {
|
const validatePhone = (rule, value, callback) => {
|
||||||
const reg = /^[1][3-9][0-9]{9}$/;
|
const reg = /^[1][3-9][0-9]{9}$/
|
||||||
if (!reg.test(value)) {
|
if (!reg.test(value)) {
|
||||||
this.queryParams.phone = ''
|
this.queryParams.phone = ''
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
@ -265,7 +295,7 @@ export default {
|
||||||
// 角色表格数据
|
// 角色表格数据
|
||||||
roleList: [],
|
roleList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 是否显示弹出层(数据权限)
|
// 是否显示弹出层(数据权限)
|
||||||
|
|
@ -279,25 +309,25 @@ export default {
|
||||||
// 数据范围选项
|
// 数据范围选项
|
||||||
dataScopeOptions: [
|
dataScopeOptions: [
|
||||||
{
|
{
|
||||||
value: "1",
|
value: '1',
|
||||||
label: "全部数据权限"
|
label: '全部数据权限',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "2",
|
value: '2',
|
||||||
label: "自定数据权限"
|
label: '自定数据权限',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "3",
|
value: '3',
|
||||||
label: "本部门数据权限"
|
label: '本部门数据权限',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "4",
|
value: '4',
|
||||||
label: "本部门及以下数据权限"
|
label: '本部门及以下数据权限',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "5",
|
value: '5',
|
||||||
label: "仅本人数据权限"
|
label: '仅本人数据权限',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
// 菜单列表
|
// 菜单列表
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
|
|
@ -305,7 +335,6 @@ export default {
|
||||||
deptOptions: [],
|
deptOptions: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
|
||||||
types: 2,
|
types: 2,
|
||||||
|
|
||||||
unitId: null,
|
unitId: null,
|
||||||
|
|
@ -316,15 +345,15 @@ export default {
|
||||||
createBy: '', //用户名
|
createBy: '', //用户名
|
||||||
taskType: 29,
|
taskType: 29,
|
||||||
taskStatus: 30,
|
taskStatus: 30,
|
||||||
backTime: '',//申请时间
|
backTime: '', //申请时间
|
||||||
//退料人信息
|
//退料人信息
|
||||||
leaseApplyInfo: {
|
leaseApplyInfo: {
|
||||||
backPerson: '',
|
backPerson: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
remark: ''
|
remark: '',
|
||||||
},
|
},
|
||||||
//退料详情集合
|
//退料详情集合
|
||||||
leaseApplyDetails: []
|
leaseApplyDetails: [],
|
||||||
},
|
},
|
||||||
leaseApplyDetails: [],
|
leaseApplyDetails: [],
|
||||||
//退料详情单条模板
|
//退料详情单条模板
|
||||||
|
|
@ -344,28 +373,50 @@ export default {
|
||||||
queryRules: {
|
queryRules: {
|
||||||
unitId: [
|
unitId: [
|
||||||
{
|
{
|
||||||
required: true, message: '请选择退料单位', trigger: 'change', type: 'number'
|
required: true,
|
||||||
}
|
message: '请选择退料单位',
|
||||||
|
trigger: 'change',
|
||||||
|
type: 'number',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
proId: [
|
proId: [
|
||||||
{
|
{
|
||||||
required: true, message: '请选择退料工程', trigger: 'change', type: 'number'
|
required: true,
|
||||||
}
|
message: '请选择退料工程',
|
||||||
|
trigger: 'change',
|
||||||
|
type: 'number',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
backPerson: [
|
backPerson: [
|
||||||
{
|
{
|
||||||
required: true, message: '请输入退料人', trigger: 'blur',
|
required: true,
|
||||||
}
|
message: '请输入退料人',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
backTime: [
|
backTime: [
|
||||||
{
|
{
|
||||||
required: true, message: '请选择退料时间', trigger: 'change',
|
required: true,
|
||||||
}
|
message: '请选择退料时间',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{ validator: validatePhone, trigger: "blur"},
|
{
|
||||||
{required: true, message: '请输入正确的手机号', trigger: 'change'},
|
required: true,
|
||||||
|
trigger: 'blur',
|
||||||
|
message: '请输入退料人的手机号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /^1[3456789]\d{9}$/,
|
||||||
|
message: '请输入正确的手机号码',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
// phone: [
|
||||||
|
// { validator: validatePhone, trigger: "blur"},
|
||||||
|
// {required: true, message: '请输入正确的手机号', trigger: 'change'},
|
||||||
|
// ],
|
||||||
},
|
},
|
||||||
unitList: [], //单位 集合
|
unitList: [], //单位 集合
|
||||||
proList: [], // 工程 集合
|
proList: [], // 工程 集合
|
||||||
|
|
@ -375,7 +426,7 @@ export default {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'typeName',
|
label: 'typeName',
|
||||||
// multiple: false,
|
// multiple: false,
|
||||||
value: 'typeId'
|
value: 'typeId',
|
||||||
},
|
},
|
||||||
// 选中的设备类型
|
// 选中的设备类型
|
||||||
deviceType: null,
|
deviceType: null,
|
||||||
|
|
@ -389,20 +440,32 @@ export default {
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
roleName: [
|
roleName: [
|
||||||
{ required: true, message: "角色名称不能为空", trigger: "blur" }
|
{
|
||||||
|
required: true,
|
||||||
|
message: '角色名称不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
roleKey: [
|
roleKey: [
|
||||||
{ required: true, message: "权限字符不能为空", trigger: "blur" }
|
{
|
||||||
|
required: true,
|
||||||
|
message: '权限字符不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
roleSort: [
|
roleSort: [
|
||||||
{ required: true, message: "角色顺序不能为空", trigger: "blur" }
|
{
|
||||||
]
|
required: true,
|
||||||
|
message: '角色顺序不能为空',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
companyId: '',
|
companyId: '',
|
||||||
createBy: '',
|
createBy: '',
|
||||||
isEdit:'true',
|
isEdit: 'true',
|
||||||
rowId:''
|
rowId: '',
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.GetUnitData()
|
this.GetUnitData()
|
||||||
|
|
@ -410,24 +473,24 @@ export default {
|
||||||
// this.GetDeviceTypeTreeFn()
|
// this.GetDeviceTypeTreeFn()
|
||||||
// this.getList();
|
// this.getList();
|
||||||
// console.log('this.$route.query.isEdit', this.$route.query.isEdit)
|
// console.log('this.$route.query.isEdit', this.$route.query.isEdit)
|
||||||
this.isEdit = this.$route.query.isEdit;
|
this.isEdit = this.$route.query.isEdit
|
||||||
if (this.$route.query.Id) {
|
if (this.$route.query.Id) {
|
||||||
this.rowId = this.$route.query.Id
|
this.rowId = this.$route.query.Id
|
||||||
this.GetViewByApply(this.$route.query.Id)
|
this.GetViewByApply(this.$route.query.Id)
|
||||||
}
|
}
|
||||||
getInfo().then(res => {
|
getInfo().then((res) => {
|
||||||
this.companyId = res.user.companyId
|
this.companyId = res.user.companyId
|
||||||
this.createBy = res.user.userName
|
this.createBy = res.user.userName
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user'])
|
...mapState(['user']),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取 来往单位 列表数据
|
// 获取 来往单位 列表数据
|
||||||
async GetUnitData() {
|
async GetUnitData() {
|
||||||
const params = {
|
const params = {
|
||||||
id: this.queryParams.proId/* */
|
id: this.queryParams.proId /* */,
|
||||||
}
|
}
|
||||||
const res = await getUnitData(params)
|
const res = await getUnitData(params)
|
||||||
this.unitList = res.data
|
this.unitList = res.data
|
||||||
|
|
@ -437,7 +500,7 @@ export default {
|
||||||
// 获取 工程名称 列表数据
|
// 获取 工程名称 列表数据
|
||||||
async GetProData() {
|
async GetProData() {
|
||||||
const params = {
|
const params = {
|
||||||
id: this.queryParams.unitId
|
id: this.queryParams.unitId,
|
||||||
}
|
}
|
||||||
const res = await getProData(params)
|
const res = await getProData(params)
|
||||||
this.proList = res.data
|
this.proList = res.data
|
||||||
|
|
@ -447,12 +510,12 @@ export default {
|
||||||
// 获取 设备树结构数据
|
// 获取 设备树结构数据
|
||||||
async GetDeviceTypeTreeFn(agreementId) {
|
async GetDeviceTypeTreeFn(agreementId) {
|
||||||
const params = {
|
const params = {
|
||||||
agreementId: agreementId
|
agreementId: agreementId,
|
||||||
// this.agreementId
|
// this.agreementId
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getUseTypeTreee(params)
|
const res = await getUseTypeTreee(params)
|
||||||
console.log("resgetUseTypeTreee==========", res)
|
console.log('resgetUseTypeTreee==========', res)
|
||||||
this.deviceTypeTree = res.data
|
this.deviceTypeTree = res.data
|
||||||
},
|
},
|
||||||
// 获取 协议id
|
// 获取 协议id
|
||||||
|
|
@ -460,11 +523,11 @@ export default {
|
||||||
if (this.queryParams.unitId && this.queryParams.proId) {
|
if (this.queryParams.unitId && this.queryParams.proId) {
|
||||||
const params = {
|
const params = {
|
||||||
unitId: this.queryParams.unitId,
|
unitId: this.queryParams.unitId,
|
||||||
projectId: this.queryParams.proId
|
projectId: this.queryParams.proId,
|
||||||
}
|
}
|
||||||
const res = await getAgreementInfoById(params)
|
const res = await getAgreementInfoById(params)
|
||||||
if (!(res.data && res.data.agreementId)) {
|
if (!(res.data && res.data.agreementId)) {
|
||||||
this.$message.error('当前单位和工程未上传');
|
this.$message.error('当前单位和工程未上传')
|
||||||
this.queryParams.unitId = null
|
this.queryParams.unitId = null
|
||||||
this.queryParams.proId = null
|
this.queryParams.proId = null
|
||||||
this.GetUnitData()
|
this.GetUnitData()
|
||||||
|
|
@ -473,20 +536,19 @@ export default {
|
||||||
this.queryParams.agreementId = res.data.agreementId
|
this.queryParams.agreementId = res.data.agreementId
|
||||||
this.queryParams.agreementCode = res.data.agreementCode
|
this.queryParams.agreementCode = res.data.agreementCode
|
||||||
this.GetDeviceTypeTreeFn(res.data.agreementId)
|
this.GetDeviceTypeTreeFn(res.data.agreementId)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取 任务详情数据
|
// 获取 任务详情数据
|
||||||
async GetViewByApply(Id) {
|
async GetViewByApply(Id) {
|
||||||
const res = await materialReturnNoteByApply({ id:Id })
|
const res = await materialReturnNoteByApply({ id: Id })
|
||||||
const data = res.data[0]
|
const data = res.data[0]
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
// this.queryParams.taskId = data.taskId
|
// this.queryParams.taskId = data.taskId
|
||||||
this.queryParams.unitId = data.unitId
|
this.queryParams.unitId = data.unitId
|
||||||
this.queryParams.proId = Number(data.proId)
|
this.queryParams.proId = Number(data.proId)
|
||||||
this.$set(this.queryParams,'phone',data.phone)
|
this.$set(this.queryParams, 'phone', data.phone)
|
||||||
this.queryParams.backPerson = data.backPerson
|
this.queryParams.backPerson = data.backPerson
|
||||||
this.queryParams.backTime = data.backTime
|
this.queryParams.backTime = data.backTime
|
||||||
this.queryParams.agreementCode = data.agreementCode
|
this.queryParams.agreementCode = data.agreementCode
|
||||||
|
|
@ -494,12 +556,13 @@ export default {
|
||||||
this.queryParams.remark = data.remark
|
this.queryParams.remark = data.remark
|
||||||
this.leaseApplyDetails = res.data
|
this.leaseApplyDetails = res.data
|
||||||
this.GetDeviceTypeTreeFn(data.agreementId)
|
this.GetDeviceTypeTreeFn(data.agreementId)
|
||||||
|
|
||||||
},
|
},
|
||||||
//生成回显数据
|
//生成回显数据
|
||||||
handelEchoData(item) {
|
handelEchoData(item) {
|
||||||
console.log('item======', item);
|
console.log('item======', item)
|
||||||
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
|
const template = JSON.parse(
|
||||||
|
JSON.stringify(this.leaseApplyDetailsItem),
|
||||||
|
)
|
||||||
template.createBy = item.createBy
|
template.createBy = item.createBy
|
||||||
template.parentId = item.data.parentId
|
template.parentId = item.data.parentId
|
||||||
template.typeId = item.data.typeId
|
template.typeId = item.data.typeId
|
||||||
|
|
@ -514,95 +577,91 @@ export default {
|
||||||
return template
|
return template
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/** 查询角色列表 */
|
/** 查询角色列表 */
|
||||||
async getList() {
|
async getList() {},
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
/** 查询菜单树结构 */
|
/** 查询菜单树结构 */
|
||||||
getMenuTreeselect() {
|
getMenuTreeselect() {
|
||||||
menuTreeselect().then(response => {
|
menuTreeselect().then((response) => {
|
||||||
this.menuOptions = response.data;
|
this.menuOptions = response.data
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 所有菜单节点数据
|
// 所有菜单节点数据
|
||||||
getMenuAllCheckedKeys() {
|
getMenuAllCheckedKeys() {
|
||||||
// 目前被选中的菜单节点
|
// 目前被选中的菜单节点
|
||||||
let checkedKeys = this.$refs.menu.getCheckedKeys();
|
let checkedKeys = this.$refs.menu.getCheckedKeys()
|
||||||
// 半选中的菜单节点
|
// 半选中的菜单节点
|
||||||
let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
|
let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys()
|
||||||
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
|
||||||
return checkedKeys;
|
return checkedKeys
|
||||||
},
|
},
|
||||||
// 所有部门节点数据
|
// 所有部门节点数据
|
||||||
getDeptAllCheckedKeys() {
|
getDeptAllCheckedKeys() {
|
||||||
// 目前被选中的部门节点
|
// 目前被选中的部门节点
|
||||||
let checkedKeys = this.$refs.dept.getCheckedKeys();
|
let checkedKeys = this.$refs.dept.getCheckedKeys()
|
||||||
// 半选中的部门节点
|
// 半选中的部门节点
|
||||||
let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys();
|
let halfCheckedKeys = this.$refs.dept.getHalfCheckedKeys()
|
||||||
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
|
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
|
||||||
return checkedKeys;
|
return checkedKeys
|
||||||
},
|
},
|
||||||
/** 根据角色ID查询菜单树结构 */
|
/** 根据角色ID查询菜单树结构 */
|
||||||
getRoleMenuTreeselect(roleId) {
|
getRoleMenuTreeselect(roleId) {
|
||||||
return roleMenuTreeselect(roleId).then(response => {
|
return roleMenuTreeselect(roleId).then((response) => {
|
||||||
this.menuOptions = response.menus;
|
this.menuOptions = response.menus
|
||||||
return response;
|
return response
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 根据角色ID查询部门树结构 */
|
/** 根据角色ID查询部门树结构 */
|
||||||
getDeptTree(roleId) {
|
getDeptTree(roleId) {
|
||||||
return deptTreeSelect(roleId).then(response => {
|
return deptTreeSelect(roleId).then((response) => {
|
||||||
this.deptOptions = response.depts;
|
this.deptOptions = response.depts
|
||||||
return response;
|
return response
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 角色状态修改
|
// 角色状态修改
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.reset();
|
this.reset()
|
||||||
},
|
},
|
||||||
// 取消按钮(数据权限)
|
// 取消按钮(数据权限)
|
||||||
cancelDataScope() {
|
cancelDataScope() {
|
||||||
this.openDataScope = false;
|
this.openDataScope = false
|
||||||
this.reset();
|
this.reset()
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
if (this.$refs.menu != undefined) {
|
if (this.$refs.menu != undefined) {
|
||||||
this.$refs.menu.setCheckedKeys([]);
|
this.$refs.menu.setCheckedKeys([])
|
||||||
}
|
}
|
||||||
this.menuExpand = false,
|
;(this.menuExpand = false),
|
||||||
this.menuNodeAll = false,
|
(this.menuNodeAll = false),
|
||||||
this.deptExpand = true,
|
(this.deptExpand = true),
|
||||||
this.deptNodeAll = false,
|
(this.deptNodeAll = false),
|
||||||
this.form = {
|
(this.form = {
|
||||||
roleId: undefined,
|
roleId: undefined,
|
||||||
roleName: undefined,
|
roleName: undefined,
|
||||||
roleKey: undefined,
|
roleKey: undefined,
|
||||||
roleSort: 0,
|
roleSort: 0,
|
||||||
status: "0",
|
status: '0',
|
||||||
menuIds: [],
|
menuIds: [],
|
||||||
deptIds: [],
|
deptIds: [],
|
||||||
menuCheckStrictly: true,
|
menuCheckStrictly: true,
|
||||||
deptCheckStrictly: true,
|
deptCheckStrictly: true,
|
||||||
remark: undefined
|
remark: undefined,
|
||||||
};
|
})
|
||||||
this.resetForm("form");
|
this.resetForm('form')
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = []
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm')
|
||||||
this.handleQuery();
|
this.handleQuery()
|
||||||
},
|
},
|
||||||
//是否可用勾选框
|
//是否可用勾选框
|
||||||
selectable(row) {
|
selectable(row) {
|
||||||
|
|
@ -620,14 +679,14 @@ export default {
|
||||||
// 更多操作触发
|
// 更多操作触发
|
||||||
handleCommand(command, row) {
|
handleCommand(command, row) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case "handleDataScope":
|
case 'handleDataScope':
|
||||||
this.handleDataScope(row);
|
this.handleDataScope(row)
|
||||||
break;
|
break
|
||||||
case "handleAuthUser":
|
case 'handleAuthUser':
|
||||||
this.handleAuthUser(row);
|
this.handleAuthUser(row)
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -639,21 +698,20 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
let backApplyInfo = []
|
let backApplyInfo = []
|
||||||
if (this.queryParams.leaseApplyDetails.length == 0) {
|
if (this.queryParams.leaseApplyDetails.length == 0) {
|
||||||
this.$message.error('请添加数据');
|
this.$message.error('请添加数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// const isRemark = this.queryParams.leaseApplyDetails.some(
|
// const isRemark = this.queryParams.leaseApplyDetails.some(
|
||||||
// (item) => item.remark == '' || item.remark == undefined
|
// (item) => item.remark == '' || item.remark == undefined
|
||||||
// );
|
// );
|
||||||
const isNum = this.queryParams.leaseApplyDetails.some(
|
const isNum = this.queryParams.leaseApplyDetails.some(
|
||||||
(item) => item.num == '' || item.num == undefined
|
(item) => item.num == '' || item.num == undefined,
|
||||||
);
|
)
|
||||||
if (isNum) {
|
if (isNum) {
|
||||||
this.$message.error('退料数量不能为空!');
|
this.$message.error('退料数量不能为空!')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.queryParams.createBy = this.user.name
|
this.queryParams.createBy = this.user.name
|
||||||
this.queryParams.companyId = this.companyId
|
this.queryParams.companyId = this.companyId
|
||||||
this.queryParams.backApplyInfo = {
|
this.queryParams.backApplyInfo = {
|
||||||
|
|
@ -663,90 +721,95 @@ export default {
|
||||||
backTime: this.queryParams.backTime,
|
backTime: this.queryParams.backTime,
|
||||||
companyId: this.companyId,
|
companyId: this.companyId,
|
||||||
}
|
}
|
||||||
if(this.rowId!=''){
|
if (this.rowId != '') {
|
||||||
let params = {
|
let params = {
|
||||||
companyId: this.companyId,
|
companyId: this.companyId,
|
||||||
createBy: this.createBy,
|
createBy: this.createBy,
|
||||||
id:this.rowId,
|
id: this.rowId,
|
||||||
agreementId: this.queryParams.agreementId,
|
agreementId: this.queryParams.agreementId,
|
||||||
backApplyInfo: this.queryParams.backApplyInfo,
|
backApplyInfo: this.queryParams.backApplyInfo,
|
||||||
backApplyDetails: this.queryParams.leaseApplyDetails,
|
backApplyDetails:
|
||||||
|
this.queryParams.leaseApplyDetails,
|
||||||
}
|
}
|
||||||
const res = await submitRefuseBackApply(params)
|
const res = await submitRefuseBackApply(params)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message({ type: 'success', message: res.msg})
|
this.$message({ type: 'success', message: res.msg })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.closeOpenPage({ path: "/claimAndRefund/return/returnApplyByCq"});
|
this.$tab.closeOpenPage({
|
||||||
|
path: '/claimAndRefund/return/returnApplyByCq',
|
||||||
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
let params = {
|
let params = {
|
||||||
companyId: this.companyId,
|
companyId: this.companyId,
|
||||||
createBy: this.createBy,
|
createBy: this.createBy,
|
||||||
agreementId: this.queryParams.agreementId,
|
agreementId: this.queryParams.agreementId,
|
||||||
backApplyInfo: this.queryParams.backApplyInfo,
|
backApplyInfo: this.queryParams.backApplyInfo,
|
||||||
backApplyDetails: this.queryParams.leaseApplyDetails,
|
backApplyDetails:
|
||||||
|
this.queryParams.leaseApplyDetails,
|
||||||
}
|
}
|
||||||
const res = await submitBackApplyApi(params)
|
const res = await submitBackApplyApi(params)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.$message({ type: 'success', message: res.msg})
|
this.$message({ type: 'success', message: res.msg })
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$tab.closeOpenPage({ path: "/claimAndRefund/return/returnApplyByCq"});
|
this.$tab.closeOpenPage({
|
||||||
|
path: '/claimAndRefund/return/returnApplyByCq',
|
||||||
|
})
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleBack(row) {
|
handleBack(row) {
|
||||||
this.$tab.closeOpenPage({ path: "/claimAndRefund/return/returnApplyByCq"});
|
this.$tab.closeOpenPage({
|
||||||
|
path: '/claimAndRefund/return/returnApplyByCq',
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 分配数据权限操作 */
|
/** 分配数据权限操作 */
|
||||||
handleDataScope(row) {
|
handleDataScope(row) {
|
||||||
this.reset();
|
this.reset()
|
||||||
const deptTreeSelect = this.getDeptTree(row.roleId);
|
const deptTreeSelect = this.getDeptTree(row.roleId)
|
||||||
getRole(row.roleId).then(response => {
|
getRole(row.roleId).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data
|
||||||
this.openDataScope = true;
|
this.openDataScope = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
deptTreeSelect.then(res => {
|
deptTreeSelect.then((res) => {
|
||||||
this.$refs.dept.setCheckedKeys(res.checkedKeys);
|
this.$refs.dept.setCheckedKeys(res.checkedKeys)
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
this.title = "分配数据权限";
|
this.title = '分配数据权限'
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 分配用户操作 */
|
/** 分配用户操作 */
|
||||||
handleAuthUser: function (row) {
|
handleAuthUser: function (row) {
|
||||||
const roleId = row.roleId;
|
const roleId = row.roleId
|
||||||
this.$router.push("/system/role-auth/user/" + roleId);
|
this.$router.push('/system/role-auth/user/' + roleId)
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.roleId != undefined) {
|
if (this.form.roleId != undefined) {
|
||||||
this.form.menuIds = this.getMenuAllCheckedKeys();
|
this.form.menuIds = this.getMenuAllCheckedKeys()
|
||||||
updateRole(this.form).then(response => {
|
updateRole(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功')
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
this.form.menuIds = this.getMenuAllCheckedKeys();
|
this.form.menuIds = this.getMenuAllCheckedKeys()
|
||||||
addRole(this.form).then(response => {
|
addRole(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功')
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
|
|
@ -755,33 +818,45 @@ export default {
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/role/export', {
|
this.download(
|
||||||
...this.queryParams
|
'system/role/export',
|
||||||
}, `role_${new Date().getTime()}.xlsx`)
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`role_${new Date().getTime()}.xlsx`,
|
||||||
|
)
|
||||||
},
|
},
|
||||||
|
|
||||||
checkNum(row){
|
checkNum(row) {
|
||||||
let maxNum = row.useNum
|
let maxNum = row.useNum
|
||||||
if(row.num<=1){
|
if (row.num <= 1) {
|
||||||
row.num = 1
|
row.num = 1
|
||||||
}else if(row.num>=maxNum){
|
} else if (row.num >= maxNum) {
|
||||||
row.num = maxNum
|
row.num = maxNum
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/////// 设备类型树 切换
|
/////// 设备类型树 切换
|
||||||
async deviceTypeChange(val) {
|
async deviceTypeChange(val) {
|
||||||
let nodes = null;
|
let nodes = null
|
||||||
console.log("vall1211221122", this.$refs.deviceTypeCascader.getCheckedNodes().length, this.$refs.deviceTypeCascader.getCheckedNodes(), [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)])
|
console.log(
|
||||||
nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]
|
'vall1211221122',
|
||||||
console.log("nodes", nodes)
|
this.$refs.deviceTypeCascader.getCheckedNodes().length,
|
||||||
|
this.$refs.deviceTypeCascader.getCheckedNodes(),
|
||||||
|
[this.$refs.deviceTypeCascader.panel.getNodeByValue(val)],
|
||||||
|
)
|
||||||
|
nodes =
|
||||||
|
this.$refs.deviceTypeCascader.getCheckedNodes().length > 0
|
||||||
|
? this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||||
|
: [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]
|
||||||
|
console.log('nodes', nodes)
|
||||||
// const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId })
|
// const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId })
|
||||||
nodes[0].data.useNum = nodes[0].data.num
|
nodes[0].data.useNum = nodes[0].data.num
|
||||||
if (nodes[0].level != 4) {
|
if (nodes[0].level != 4) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (nodes[0].data.useNum < 1) {
|
if (nodes[0].data.useNum < 1) {
|
||||||
this.$modal.msgError("所选机具类型当前无在用!");
|
this.$modal.msgError('所选机具类型当前无在用!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let i = 0; i < this.leaseApplyDetails.length; i++) {
|
for (let i = 0; i < this.leaseApplyDetails.length; i++) {
|
||||||
|
|
@ -790,9 +865,7 @@ export default {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.leaseApplyDetails.push(
|
this.leaseApplyDetails.push(this.handelTableItemData(nodes[0]))
|
||||||
this.handelTableItemData(nodes[0])
|
|
||||||
)
|
|
||||||
// this.$refs.cascader.$refs.panel.clearCheckedNodes()
|
// this.$refs.cascader.$refs.panel.clearCheckedNodes()
|
||||||
// // 设置为空可以让节点不高亮显示
|
// // 设置为空可以让节点不高亮显示
|
||||||
// this.$refs.cascader.$refs.panel.activePath = []
|
// this.$refs.cascader.$refs.panel.activePath = []
|
||||||
|
|
@ -800,7 +873,9 @@ export default {
|
||||||
},
|
},
|
||||||
//// 将数据处理成 表格中需要的数据
|
//// 将数据处理成 表格中需要的数据
|
||||||
handelTableItemData(node) {
|
handelTableItemData(node) {
|
||||||
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
|
const template = JSON.parse(
|
||||||
|
JSON.stringify(this.leaseApplyDetailsItem),
|
||||||
|
)
|
||||||
template.createBy = this.createBy
|
template.createBy = this.createBy
|
||||||
template.typeId = node.data.typeId
|
template.typeId = node.data.typeId
|
||||||
template.companyId = node.data.companyId
|
template.companyId = node.data.companyId
|
||||||
|
|
@ -812,7 +887,7 @@ export default {
|
||||||
template.num = node.data.num
|
template.num = node.data.num
|
||||||
template.useNum = node.data.useNum
|
template.useNum = node.data.useNum
|
||||||
return template
|
return template
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,10 @@ module.exports = {
|
||||||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||||
// target: `https://z.csgmall.com.cn`,
|
// target: `https://z.csgmall.com.cn`,
|
||||||
|
|
||||||
// target: `http://10.40.92.8:8080`, //超
|
target: `http://10.40.92.52:28080`, //超
|
||||||
// target: `http://10.40.92.81:8080`, //韩/
|
// target: `http://10.40.92.81:8080`, //韩/
|
||||||
// target: `http://10.40.92.74:8080`,//旭/
|
// target: `http://10.40.92.74:8080`,//旭/
|
||||||
target: `http://10.40.92.140:28080`, //帅
|
// target: `http://10.40.92.140:28080`, //帅
|
||||||
// target: `http://10.40.92.14:28080`, //福
|
// target: `http://10.40.92.14:28080`, //福
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue