代码优化 新需求修改

This commit is contained in:
BianLzhaoMin 2025-03-07 15:41:33 +08:00
parent c3846a6992
commit ec2dab7662
8 changed files with 675 additions and 1805 deletions

View File

@ -3,62 +3,51 @@ import request from '@/utils/request'
//机具退料入库
export function getReturnOfMaterialsInfoAll(query) {
return request({
url: '/material/returnOfMaterialsInfo/getReturnOfMaterialsInfoAll',
method: 'get',
params: query
url: '/material/returnOfMaterialsInfo/getReturnOfMaterialsInfoAll',
method: 'get',
params: query,
})
}
}
//机具退料入库--机具类型,规格型号下拉数据
export function getTypeList(query) {
return request({
url: '/material/returnOfMaterialsInfo/getTypeList',
method: 'get',
params: query
url: '/material/returnOfMaterialsInfo/getTypeList',
method: 'get',
params: query,
})
}
}
//机具退料入库--机具类型,规格型号下拉数据
export function getInfoListByTypeApi(query) {
return request({
url: '/material/returnOfMaterialsInfo/getInfoListByType',
method: 'get',
params: query,
})
}
//修试后入库--列表
export function getRepairedList(data) {
return request({
url: '/material/RepairTestInput/getRepairedList',
method: 'get',
params: data
url: '/material/RepairTestInput/getRepairedList',
method: 'get',
params: data,
})
}
}
//修试后入库--详情
export function getRepairedDetailList(data) {
return request({
url: '/material//RepairTestInput/getRepairedDetailList',
method: 'get',
params: data
url: '/material//RepairTestInput/getRepairedDetailList',
method: 'get',
params: data,
})
}
//修试后入库--审核
}
//修试后入库--审核
export function inputByType(data) {
return request({
url: '/material/RepairTestInput/inputByType',
method: 'post',
data: data
url: '/material/RepairTestInput/inputByType',
method: 'post',
data: data,
})
}
}

View File

@ -38,12 +38,7 @@
placeholder="请选择"
:disabled="isEdit"
>
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="领料工程" prop="proId">
@ -56,27 +51,17 @@
placeholder="请选择"
:disabled="isEdit"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input
maxlength="50"
v-model="queryParams.agreementCode"
disabled
style="width: 240px"
></el-input>
<el-input maxlength="50" v-model="queryParams.agreementCode" disabled style="width: 240px"></el-input>
</el-form-item>
<el-form-item label="抱杆设备" prop="agreementCode">
<el-form-item label="成套设备" prop="agreementCode">
<el-select
clearable
style="width: 240px"
placeholder="请选择抱杆设备"
placeholder="请选择成套设备"
@change="onChangeWholeTypeName"
v-model="queryParams.wholeTypeName"
>
@ -102,11 +87,6 @@
placeholder="请输入规格型号"
popper-class="popper-select"
:props="deviceTypeTreeProps"
:disabled="
(isEdit && !isView) ||
isCost ||
wholeTypeNameList.length > 0
"
></el-cascader>
</el-form-item>
<el-form-item label="预计领料时间" prop="estimateLeaseTime">
@ -150,12 +130,7 @@
placeholder="请选择费用承担方"
:disabled="isEdit"
>
<el-option
v-for="item in costBearingList"
:key="item"
:label="item"
:value="item"
></el-option>
<el-option v-for="item in costBearingList" :key="item" :label="item" :value="item"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="roleName">
@ -173,14 +148,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
plain
size="mini"
v-if="isView"
type="primary"
icon="el-icon-plus"
@click="handleAdd"
>
<el-button plain size="mini" v-if="isView" type="primary" icon="el-icon-plus" @click="handleAdd">
保存
</el-button>
</el-col>
@ -196,47 +164,21 @@
</el-col> -->
</el-row>
<el-table
v-show="wholeTypeNameList.length > 0"
:data="wholeTypeNameList"
>
<el-table v-show="wholeTypeNameList.length > 0" :data="wholeTypeNameList">
<el-table-column type="index" align="center" />
<el-table-column type="expand">
<template slot-scope="props">
<el-table :data="props.row.childrenList">
<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
align="center"
label="库存数量"
prop="num"
/>
<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 align="center" label="库存数量" prop="num" />
</el-table>
</template>
</el-table-column>
<el-table-column
prop="wholeTypeName"
align="center"
label="抱杆设备名称"
/>
<el-table-column prop="wholeTypeName" align="center" label="抱杆设备名称" />
<el-table-column align="center" label="抱杆设备数量" width="260">
<template slot-scope="scope">
<el-input-number
@ -249,12 +191,7 @@
</el-table-column>
<el-table-column align="center" label="操作" width="180">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
@click="onHandelDelete(scope.$index)"
>删除</el-button
>
<el-button size="mini" type="danger" @click="onHandelDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -267,16 +204,25 @@
>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" type="index" width="80" />
<el-table-column
label="机具名称"
prop="typeCn"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
prop="guigeCn"
:show-overflow-tooltip="true"
/>
<el-table-column type="expand">
<template slot-scope="props">
<el-table :data="props.row.childrenList">
<!-- <el-table-column align="center" prop="typeName" label="设备名称" /> -->
<el-table-column align="center" label="规格型号" prop="deviceType" />
<el-table-column prop="deviceType" align="center" label="是否管理库存">
<template slot-scope="{ row }">
<el-tag size="mini" type="primary" v-if="row.isStorage == 1"></el-tag>
<el-tag size="mini" type="warning" v-if="row.isStorage == 0"></el-tag>
</template>
</el-table-column>
<el-table-column label="预领数量" prop="deviceNum" align="center" />
<el-table-column align="center" label="库存数量" prop="num" />
</el-table>
</template>
</el-table-column>
<el-table-column prop="wholeTypeName" align="center" label="成套设备名称" />
<el-table-column label="机具名称" prop="typeCn" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" prop="guigeCn" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" prop="unitCn" />
<el-table-column label="库存数量" prop="num" />
<el-table-column label="预领数量" align="center">
@ -614,15 +560,10 @@ export default {
this.taskId = this.viewTaskId
if (this.taskId) {
Promise.all([
this.GetTaskDetail(this.taskId),
this.GetDeviceTypeTree(),
]).then(() => {
Promise.all([this.GetTaskDetail(this.taskId), this.GetDeviceTypeTree()]).then(() => {
let selectList = []
this.leaseApplyDetails.forEach((e) => {
selectList.push(
this.getParentsById(this.deviceTypeTree, e.typeId),
)
selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
})
this.$nextTick(() => {
this.deviceType = selectList
@ -655,7 +596,7 @@ export default {
this.GetAgreementInfoById()
},
async getLevelTwoUnitCbx() {
const res = await getLevelTwoUnitCbx({id: ''})
const res = await getLevelTwoUnitCbx({ id: '' })
console.log('🚀 ~ getLevelTwoUnitCbx ~ res:', res)
this.unitList = res.data
@ -709,9 +650,7 @@ export default {
console.log(res, '根据工程和单位获取协议id')
if (res.data.isSlt == 1) {
this.$message.error(
'当前协议下对应的工程已完成结算,不可重复领料!',
)
this.$message.error('当前协议下对应的工程已完成结算,不可重复领料!')
this.isCost = true
if (this.leaseApplyDetails.length > 0) {
@ -757,18 +696,15 @@ export default {
this.queryParams.unitId = data.unitId
this.queryParams.costBearingParty = data.costBearingParty
this.queryParams.proId = data.proId
this.queryParams.leaseApplyInfo.phone =
data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson =
data.leaseApplyInfoList[0].leasePerson
this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson
this.queryParams.agreementCode = data.agreementCode
this.queryParams.agreementId = data.agreementId
this.queryParams.estimateLeaseTime = data.estimateLeaseTime
// this.queryParams.leaseType = data.leaseType
this.$set(this.queryParams, 'leaseType', data.leaseType)
this.queryParams.leaseApplyInfo.remark =
data.leaseApplyInfoList[0].remark
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark
this.leaseApplyInfoList = data.leaseApplyInfoList
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
return this.handelEchoData(item)
@ -791,17 +727,14 @@ export default {
this.queryParams.unitId = data.unitId
this.queryParams.proId = data.proId
this.queryParams.costBearingParty = data.costBearingParty
this.queryParams.leaseApplyInfo.phone =
data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson =
data.leaseApplyInfoList[0].leasePerson
this.queryParams.leaseApplyInfo.phone = data.leaseApplyInfoList[0].phone
this.queryParams.leaseApplyInfo.leasePerson = data.leaseApplyInfoList[0].leasePerson
this.queryParams.agreementCode = data.agreementCode
this.queryParams.agreementId = data.agreementId
this.queryParams.estimateLeaseTime = data.estimateLeaseTime
// this.queryParams.leaseType = data.leaseType
this.$set(this.queryParams, 'leaseType', data.leaseType)
this.queryParams.leaseApplyInfo.remark =
data.leaseApplyInfoList[0].remark
this.queryParams.leaseApplyInfo.remark = data.leaseApplyInfoList[0].remark
this.leaseApplyInfoList = data.leaseApplyInfoList
this.leaseApplyDetails = data.leaseApplyDetails.map((item) => {
return this.handelEchoData(item)
@ -809,9 +742,7 @@ export default {
},
//
handelEchoData(item) {
const template = JSON.parse(
JSON.stringify(this.leaseApplyDetailsItem),
)
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
template.createBy = item.createBy
template.companyId = item.companyId
template.typeId = item.typeId
@ -885,57 +816,70 @@ export default {
if (!valid) {
return false
} else {
if (
this.leaseApplyDetails.length === 0 &&
this.wholeTypeNameList.length === 0
) {
if (this.leaseApplyDetails.length === 0 && this.wholeTypeNameList.length === 0) {
this.$message.error('请添加机具类型或成套设备')
return
}
let canSave = true
if (this.leaseApplyDetails.length > 0) {
this.queryParams.leaseApplyDetails =
this.leaseApplyDetails
this.queryParams.leaseApplyDetails = this.leaseApplyDetails
try {
this.queryParams.leaseApplyDetails.forEach(
(item) => {
if (item.num == 0) {
this.$message.error(
'机具类型库存量为零无法领料',
)
throw new Error()
}
if (item.preNum == '') {
this.$message.error('请填写预领数量')
throw new Error()
}
},
)
this.queryParams.leaseApplyDetails.forEach((item) => {
if (item.num == 0) {
this.$message.error('机具类型库存量为零无法领料')
throw new Error()
}
if (!item.childrenList && item.preNum == '') {
this.$message.error('请填写预领数量')
throw new Error()
}
})
} catch (e) {
throw e
}
}
if (this.wholeTypeNameList.length > 0) {
const wholeTypeList = []
this.wholeTypeNameList.forEach((i) => {
i.childrenList.forEach((e) => {
this.leaseApplyDetails.forEach((e) => {
if (e.childrenList && e.childrenList.length > 0) {
e.childrenList.forEach((j) => {
const items = {
companyId: '101',
guigeCn: e.deviceType,
preNum: e.deviceNum,
typeCn: e.typeName,
typeId: e.deviceTypeId,
wholeTypeName: i.wholeTypeName,
guigeCn: j.deviceType,
typeCn: j.typeName,
createBy: this.user.name,
typeId: j.deviceTypeId,
preNum: j.deviceNum,
num: j.num,
}
wholeTypeList.push(items)
this.queryParams.leaseApplyDetails.push(items)
})
})
}
})
this.queryParams.leaseApplyDetails = wholeTypeList
}
this.queryParams.leaseApplyDetails = this.queryParams.leaseApplyDetails.filter(
(e) => !e.childrenList,
)
// if (this.wholeTypeNameList.length > 0) {
// const wholeTypeList = []
// this.wholeTypeNameList.forEach((i) => {
// i.childrenList.forEach((e) => {
// const items = {
// companyId: '101',
// guigeCn: e.deviceType,
// preNum: e.deviceNum,
// typeCn: e.typeName,
// typeId: e.deviceTypeId,
// wholeTypeName: i.wholeTypeName,
// }
// wholeTypeList.push(items)
// })
// })
// this.queryParams.leaseApplyDetails = wholeTypeList
// }
if (!canSave) {
return false
@ -949,15 +893,8 @@ export default {
}
if (this.taskId) {
this.leaseApplyInfoList.forEach((v) => {
v = Object.assign(
v,
this.queryParams.leaseApplyInfo,
)
this.$set(
v,
'leaseApplyDetails',
this.queryParams.leaseApplyDetails,
)
v = Object.assign(v, this.queryParams.leaseApplyInfo)
this.$set(v, 'leaseApplyDetails', this.queryParams.leaseApplyDetails)
})
if (this.$route.query.isBack) {
this.queryParams.souceByRefuse = 1
@ -973,7 +910,7 @@ export default {
res = await editLeaseApply(params)
} else {
// console.log(this.queryParams)
console.log(this.queryParams, '参数---')
res = await submitLeaseApply(this.queryParams)
}
if (res.code == 200) {
@ -1022,8 +959,7 @@ export default {
},
///////
deviceTypeChange(val) {
const deviceTypeList =
this.$refs.deviceTypeCascader.getCheckedNodes()
const deviceTypeList = this.$refs.deviceTypeCascader.getCheckedNodes()
// if (val.length > 0) {
// for (let i in val) {
@ -1031,6 +967,9 @@ export default {
// }
// }
let tempList = []
// const isRepeat = this.tempList.some((e) => e.typeId == val[val.length - 1])
if (val.length > 0) {
const items = val.map((e) => {
return e[3]
@ -1038,40 +977,44 @@ export default {
for (let i in items) {
for (let z in deviceTypeList) {
if (deviceTypeList[z].data.id === items[i]) {
let { num, companyId, id, unitName } =
deviceTypeList[z].data
tempList.push({
createBy: this.user.name,
typeId: id,
num,
companyId,
unitCn: unitName,
typeCn: deviceTypeList[z].pathLabels[2],
guigeCn: deviceTypeList[z].pathLabels[3],
})
break
let { num, companyId, id, unitName } = deviceTypeList[z].data
const isRepeat = this.leaseApplyDetails.some((e) => e.typeId === id)
if (!isRepeat) {
this.leaseApplyDetails.push({
createBy: this.user.name,
typeId: id,
num,
companyId,
unitCn: unitName,
typeCn: deviceTypeList[z].pathLabels[2],
guigeCn: deviceTypeList[z].pathLabels[3],
})
// break
}
}
}
}
const newDataList = [...this.leaseApplyDetails, ...tempList]
const map = new Map()
for (let item of newDataList) {
if (!map.has(item.typeId)) {
map.set(item.typeId, item)
}
}
const newArray = [...map.values()]
// const newDataList = [...this.leaseApplyDetails, ...tempList]
// const map = new Map()
// for (let item of newDataList) {
// if (!map.has(item.typeId)) {
// map.set(item.typeId, item)
// }
// }
// const newArray = [...map.values()]
let newArray_array = []
items.forEach((e) => {
newArray.forEach((j) => {
if (e == j.typeId) {
newArray_array.push(j)
}
})
})
this.leaseApplyDetails = newArray_array
// let newArray_array = []
// items.forEach((e) => {
// newArray.forEach((j) => {
// if (e == j.typeId) {
// newArray_array.push(j)
// }
// })
// })
// this.leaseApplyDetails = newArray_array
} else {
this.leaseApplyDetails = []
}
@ -1112,9 +1055,7 @@ export default {
},
////
handelTableItemData(node) {
const template = JSON.parse(
JSON.stringify(this.leaseApplyDetailsItem),
)
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
template.createBy = this.user.name
console.log(node.data)
template.num = node.data.num
@ -1125,9 +1066,7 @@ export default {
template.guigeCn = node.pathLabels[3]
if (this.taskId) {
const index = this.leaseApplyInfoList.find(
(key) => key.companyId == node.data.companyId,
)
const index = this.leaseApplyInfoList.find((key) => key.companyId == node.data.companyId)
template.parenntId = index ? index.id : ''
}
@ -1174,25 +1113,21 @@ export default {
childrenList: [],
}
queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
wholeTypeNameData.childrenList = res.data
wholeTypeNameData.childrenList.forEach(
(e) => (e.initNum = e.deviceNum),
)
const isREpeat = this.wholeTypeNameList.find(
(e) => e.id === val,
)
if (!isREpeat) {
this.wholeTypeNameList.push(wholeTypeNameData)
} else {
this.$modal.msgError(
'当前抱杆成套设备已添加,不可重复添加!',
)
}
console.log(res, '996')
console.log(this.wholeTypeNameList, '处理后的数据---')
this.leaseApplyDetails.push({ wholeTypeName: selLable.wholeTypeName, childrenList: res.data })
// wholeTypeNameData.childrenList = res.data
// wholeTypeNameData.childrenList.forEach((e) => (e.initNum = e.deviceNum))
// const isREpeat = this.wholeTypeNameList.find((e) => e.id === val)
// if (!isREpeat) {
// this.wholeTypeNameList.push(wholeTypeNameData)
// } else {
// this.$modal.msgError('')
// }
// console.log(this.wholeTypeNameList, '---')
})
this.queryParams.wholeTypeName = ''
// this.queryParams.wholeTypeName = ''
},
/* 删除 */
@ -1202,9 +1137,7 @@ export default {
/* 更改数量 */
onChangeInput(val, v) {
this.wholeTypeNameList[v].childrenList.forEach(
(e) => (e.deviceNum = e.initNum * val),
)
this.wholeTypeNameList[v].childrenList.forEach((e) => (e.deviceNum = e.initNum * val))
},
},
}

View File

@ -19,11 +19,7 @@
/>
</el-form-item>
<el-form-item label="单位名称" prop="unitId">
<el-select
v-model="queryParams.unitId"
placeholder="请选择单位名称"
clearable
>
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
<el-option
v-for="item in unitList"
filterable
@ -34,26 +30,12 @@
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
<el-select
v-model="queryParams.proId"
filterable
clearable
placeholder="请选择工程名称"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="queryParams.proId" filterable clearable placeholder="请选择工程名称">
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="出库状态" prop="taskStatus">
<el-select
v-model="queryParams.taskStatus"
placeholder="请选择出库状态"
clearable
>
<el-select v-model="queryParams.taskStatus" placeholder="请选择出库状态" clearable>
<el-option
v-for="item in statusList"
filterable
@ -65,19 +47,8 @@
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -103,50 +74,20 @@
>推送到智慧工地</el-button
> -->
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="leaseList"
border
@selection-change="handleSelect"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="(row) => row.taskStatus == 35"
/>
<el-table v-loading="loading" :data="leaseList" border @selection-change="handleSelect">
<el-table-column type="selection" width="55" align="center" :selectable="(row) => row.taskStatus == 35" />
<el-table-column
align="center"
label="序号"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
/>
<el-table-column
label="领料单号"
align="center"
prop="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料申请单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料申请工程"
align="center"
prop="proName"
:show-overflow-tooltip="true"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column label="领料单号" align="center" prop="code" :show-overflow-tooltip="true" />
<el-table-column label="领料申请单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="领料申请工程" align="center" prop="proName" :show-overflow-tooltip="true" />
<el-table-column
label="申请数量"
align="center"
@ -197,17 +138,9 @@
</template>
</el-table-column> -->
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="150"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleView(scope.row)"
v-hasPermi="['picking:outbound:view']"
<el-button size="mini" @click="handleView(scope.row)" v-hasPermi="['picking:outbound:view']"
>查看</el-button
>
<el-button
@ -232,19 +165,8 @@
/>
<!-- 出库弹窗 -->
<el-dialog
:title="title"
:visible.sync="openLeaseDevices"
width="1200px"
append-to-body
>
<el-form
:model="dialogQuery"
ref="dialogQuery"
size="small"
:inline="true"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="openLeaseDevices" width="1200px" append-to-body>
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备负责人" prop="userName">
<el-input v-model="dialogQuery.userName" maxlength="20" />
</el-form-item>
@ -262,19 +184,10 @@
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleDialogQuery"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
>重置</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
</el-form-item>
</el-form>
@ -283,68 +196,26 @@
align="center"
label="序号"
type="index"
:index="
indexContinuation(
queryParams.pageNum,
queryParams.pageSize,
)
"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="待出库数量"
align="center"
prop="outNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="已出库数量"
align="center"
prop="alNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备负责人"
align="center"
prop="userName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
v-if="!isView"
>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="设备负责人" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!isView">
<template slot-scope="scope">
<el-button
size="mini"
@click="codeOut(scope.row)"
v-if="
scope.row.manageType == 0 &&
scope.row.status != 2
"
v-if="scope.row.manageType == 0 && scope.row.status != 2"
>
编码出库
</el-button>
<el-button
size="mini"
type="primary"
v-if="
(scope.row.manageType == 1 ||
scope.row.manageType == 2) &&
scope.row.status != 2
"
v-if="(scope.row.manageType == 1 || scope.row.manageType == 2) && scope.row.status != 2"
@click="numOut(scope.row)"
>
数量出库
@ -363,81 +234,37 @@
</el-dialog>
<!-- 编码出库 -->
<el-dialog
:title="title"
:visible.sync="openCode"
width="1200px"
append-to-body
>
<el-form
:model="codeOutForm"
ref="codeOutForm"
size="small"
:inline="true"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body>
<el-form :model="codeOutForm" ref="codeOutForm" size="small" :inline="true" label-width="100px">
<span style="margin-right: 50px">待出库数量{{ outNum }}</span>
<el-form-item label="请输入车牌号" prop="carCode">
<el-input v-model="codeOutForm.carCode" maxlength="20" />
</el-form-item>
<span style="margin-right: 50px; color: red"
>部分设备出库时需进行装车,需记录车牌号码</span
>
<span style="margin-right: 50px; color: red">部分设备出库时需进行装车,需记录车牌号码</span>
</el-form>
<el-form
:model="outQuery"
ref="outQuery"
size="small"
:inline="true"
label-width="100px"
>
<el-form :model="outQuery" ref="outQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备编码" prop="maCode">
<el-input v-model="outQuery.maCode" maxlength="20" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleOutQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetOutQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleOutQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetOutQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="saveCodeOut"
>出库</el-button
>
<el-button type="primary" size="mini" @click="saveCodeOut">出库</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="outCodeList"
height="500"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table v-loading="loading" :data="outCodeList" height="500" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column
label="序号"
align="center"
width="80"
type="index"
:index="
indexContinuation(outQuery.pageNum, outQuery.pageSize)
"
:index="indexContinuation(outQuery.pageNum, outQuery.pageSize)"
>
<!-- <template slot-scope="scope">
<span>{{
@ -445,30 +272,10 @@
}}</span>
</template> -->
</el-table-column>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备状态"
align="center"
prop="maStatus"
:show-overflow-tooltip="true"
/>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
<el-table-column label="设备状态" align="center" prop="maStatus" :show-overflow-tooltip="true" />
</el-table>
<pagination
@ -481,68 +288,28 @@
</el-dialog>
<!-- 数量出库 -->
<el-dialog
:title="title"
:visible.sync="openNum"
width="1200px"
append-to-body
>
<el-form
:model="numOutForm"
ref="numOutForm"
size="small"
:inline="true"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
<el-form :model="numOutForm" ref="numOutForm" size="small" :inline="true" label-width="100px">
<!-- <span style="margin-right: 50px;">
待出库数量{{outNum}}
</span>-->
<el-form-item label="请输入车牌号" prop="carCode">
<el-input v-model="numOutForm.carCode" maxlength="20" />
</el-form-item>
<span style="margin-right: 50px; color: red"
>部分设备出库时需进行装车,需记录车牌号码</span
>
<span style="margin-right: 50px; color: red">部分设备出库时需进行装车,需记录车牌号码</span>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="saveNumOut"
>出库</el-button
>
<el-button type="primary" size="mini" @click="saveNumOut">出库</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="outNumList" height="500">
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="设备类型"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="库存数量"
align="center"
prop="num"
:show-overflow-tooltip="true"
/>
<el-table-column
label="待出库数量"
align="center"
prop="outNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="已出库数量"
align="center"
prop="alNum"
:show-overflow-tooltip="true"
/>
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="库存数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="出库数量" align="center">
<template slot-scope="scope">
<el-input
@ -695,15 +462,10 @@ export default {
item.children.forEach((item2, index2) => {
if (item2.children && item2.children.length > 0) {
item2.children.forEach((item3) => {
if (
item3.children &&
item3.children.length > 0
) {
if (item3.children && item3.children.length > 0) {
item3.children.forEach((item4) => {
item4.machineTypeName =
item3.typeName
item4.specificationType =
item4.typeName
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
// this.$set(item4, 'purchasePrice', 0);
// this.$set(item4, 'purchaseNum', 1);
})

View File

@ -19,11 +19,7 @@
/>
</el-form-item>
<el-form-item label="单位名称" prop="unitId">
<el-select
v-model="queryParams.unitId"
placeholder="请选择单位名称"
clearable
>
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
<el-option
v-for="item in unitList"
filterable
@ -34,26 +30,12 @@
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
<el-select
v-model="queryParams.proId"
filterable
clearable
placeholder="请选择工程名称"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="queryParams.proId" filterable clearable placeholder="请选择工程名称">
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="出库状态" prop="taskStatus">
<el-select
v-model="queryParams.taskStatus"
placeholder="请选择出库状态"
clearable
>
<el-select v-model="queryParams.taskStatus" placeholder="请选择出库状态" clearable>
<el-option
v-for="item in statusList"
filterable
@ -65,19 +47,8 @@
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -93,10 +64,7 @@
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="leaseList" border>
@ -105,28 +73,11 @@
align="center"
label="序号"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
/>
<el-table-column
label="领料单号"
align="center"
prop="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料申请单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料申请工程"
align="center"
prop="proName"
:show-overflow-tooltip="true"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column label="领料单号" align="center" prop="code" :show-overflow-tooltip="true" />
<el-table-column label="领料申请单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="领料申请工程" align="center" prop="proName" :show-overflow-tooltip="true" />
<el-table-column
label="申请数量"
align="center"
@ -152,16 +103,9 @@
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleView(scope.row)"
v-hasPermi="['picking:outbound:view']"
<el-button size="mini" @click="handleView(scope.row)" v-hasPermi="['picking:outbound:view']"
>查看</el-button
>
<el-button
@ -186,19 +130,8 @@
/>
<!-- 出库弹窗 -->
<el-dialog
:title="title"
:visible.sync="openLeaseDevices"
width="80%"
append-to-body
>
<el-form
:model="dialogQuery"
ref="dialogQuery"
size="small"
:inline="true"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="openLeaseDevices" width="80%" append-to-body>
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备负责人" prop="userName">
<el-input v-model="dialogQuery.userName" maxlength="20" />
</el-form-item>
@ -216,19 +149,10 @@
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleDialogQuery"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
>重置</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
</el-form-item>
</el-form>
@ -237,82 +161,44 @@
align="center"
label="序号"
type="index"
:index="
indexContinuation(
queryParams.pageNum,
queryParams.pageSize,
)
"
/>
<el-table-column
label="机具名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="待出库数量"
align="center"
prop="outNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="已出库数量"
align="center"
prop="alNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备负责人"
align="center"
prop="userName"
:show-overflow-tooltip="true"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="设备负责人" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-table-column prop="deviceType" align="center" label="是否管理库存">
<template slot-scope="{ row }">
<el-tag size="mini" type="primary" v-if="row.isStorage == 1"></el-tag>
<el-tag size="mini" type="warning" v-if="row.isStorage == 0"></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" v-if="isView">
<template slot-scope="{ row }" v-if="row.alNum > 0">
<el-button type="text" @click="onPreviewRecord(row)"
>出库记录</el-button
>
<el-button type="text" @click="openLld(row)"
>出库单</el-button
>
<el-button type="text" @click="onPreviewRecord(row)">出库记录</el-button>
<el-button type="text" @click="openLld(row)">出库单</el-button>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
v-if="!isView"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="!isView">
<template slot-scope="scope">
<el-button
size="mini"
@click="codeOut(scope.row)"
v-if="
scope.row.manageType == 0 &&
scope.row.status != 2
"
v-if="scope.row.manageType == 0 && scope.row.status != 2 && scope.row.isStorage == 1"
>
编码出库
</el-button>
<el-button
size="mini"
type="primary"
v-if="
scope.row.manageType == 1 &&
scope.row.status != 2
"
v-if="scope.row.manageType == 1 && scope.row.status != 2 && scope.row.isStorage == 1"
@click="numOut(scope.row)"
>
数量出库
</el-button>
<el-button size="mini" type="primary" v-if="scope.row.isStorage == 0"> 查看附件 </el-button>
</template>
</el-table-column>
</el-table>
@ -325,12 +211,7 @@
@pagination="getDialogList"
/>
<el-dialog
title="出库记录"
:visible.sync="outRecordVisible"
width="70%"
append-to-body
>
<el-dialog title="出库记录" :visible.sync="outRecordVisible" width="70%" append-to-body>
<el-form inline>
<!-- 搜索表单 -->
<el-form-item label="时间">
@ -348,151 +229,62 @@
/>
</el-form-item>
<el-form-item>
<el-button
size="small"
type="primary"
@click="onHandleQuery"
>查询</el-button
>
<el-button
size="small"
type="primary"
@click="onHandleReset"
>重置</el-button
>
<el-button
size="small"
type="primary"
@click="onHandleExport"
>导出</el-button
>
<el-button size="small" type="primary" @click="onHandleQuery">查询</el-button>
<el-button size="small" type="primary" @click="onHandleReset">重置</el-button>
<el-button size="small" type="primary" @click="onHandleExport">导出</el-button>
</el-form-item>
</el-form>
<!-- 出库记录列表 -->
<el-table border :data="leaseOutDetailsList">
<el-table-column
align="center"
label="序号"
show-overflow-tooltip
type="index"
/>
<el-table-column
align="center"
label="机具名称"
prop="typeName"
show-overflow-tooltip
/>
<el-table-column
align="center"
label="规格型号"
prop="typeModelName"
show-overflow-tooltip
/>
<el-table-column
align="center"
label="出库时间"
prop="createTime"
show-overflow-tooltip
/>
<el-table-column
align="center"
label="本次出库数量"
prop="outNum"
show-overflow-tooltip
/>
<el-table-column
align="center"
label="出库人"
prop="userName"
show-overflow-tooltip
/>
<el-table-column align="center" label="序号" show-overflow-tooltip type="index" />
<el-table-column align="center" label="机具名称" prop="typeName" show-overflow-tooltip />
<el-table-column align="center" label="规格型号" prop="typeModelName" show-overflow-tooltip />
<el-table-column align="center" label="出库时间" prop="createTime" show-overflow-tooltip />
<el-table-column align="center" label="本次出库数量" prop="outNum" show-overflow-tooltip />
<el-table-column align="center" label="出库人" prop="userName" show-overflow-tooltip />
</el-table>
</el-dialog>
</el-dialog>
<!-- 编码出库 -->
<el-dialog
:title="title"
:visible.sync="openCode"
width="1200px"
append-to-body
>
<el-form
:model="codeOutForm"
ref="codeOutForm"
size="small"
:inline="true"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="openCode" width="1200px" append-to-body>
<el-form :model="codeOutForm" ref="codeOutForm" size="small" :inline="true" label-width="100px">
<span style="margin-right: 50px">待出库数量{{ outNum }}</span>
<br> <br>
<br />
<br />
<el-form-item label="请输入车牌号" prop="carCode">
<el-input v-model="codeOutForm.carCode" maxlength="20" />
</el-form-item>
<span style="margin-right: 50px; color: red"
>部分设备出库时需进行装车,需记录车牌号码</span
>
<br>
<span style="margin-right: 50px; color: red">部分设备出库时需进行装车,需记录车牌号码</span>
<br />
<el-form-item label="备注" prop="remark">
<el-input v-model="codeOutForm.remark" maxlength="50" />
<el-input v-model="codeOutForm.remark" maxlength="50" />
</el-form-item>
</el-form>
<el-form
:model="outQuery"
ref="outQuery"
size="small"
:inline="true"
label-width="100px"
>
<el-form :model="outQuery" ref="outQuery" size="small" :inline="true" label-width="100px">
<el-form-item label="设备编码" prop="maCode">
<el-input v-model="outQuery.maCode" maxlength="20" />
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleOutQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetOutQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleOutQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetOutQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="saveCodeOut"
>出库</el-button
>
<el-button type="primary" size="mini" @click="saveCodeOut">出库</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="outCodeList"
height="500"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table v-loading="loading" :data="outCodeList" height="500" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column
label="序号"
align="center"
width="80"
type="index"
:index="
indexContinuation(outQuery.pageNum, outQuery.pageSize)
"
:index="indexContinuation(outQuery.pageNum, outQuery.pageSize)"
>
<!-- <template slot-scope="scope">
<span>{{
@ -500,30 +292,10 @@
}}</span>
</template> -->
</el-table-column>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备状态"
align="center"
prop="maStatus"
:show-overflow-tooltip="true"
/>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
<el-table-column label="设备状态" align="center" prop="maStatus" :show-overflow-tooltip="true" />
<!-- <el-table-column label="备注" align="center" prop="remark">
<template slot-scope="scope">
<el-input
@ -547,73 +319,32 @@
</el-dialog>
<!-- 数量出库 -->
<el-dialog
:title="title"
:visible.sync="openNum"
width="1200px"
append-to-body
>
<el-form
:model="numOutForm"
ref="numOutForm"
size="small"
:inline="true"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="openNum" width="1200px" append-to-body>
<el-form :model="numOutForm" ref="numOutForm" size="small" :inline="true" label-width="100px">
<!-- <span style="margin-right: 50px;">
待出库数量{{outNum}}
</span>-->
<el-form-item label="请输入车牌号" prop="carCode">
<el-input v-model="numOutForm.carCode" maxlength="20" />
</el-form-item>
<span style="margin-right: 50px; color: red"
>部分设备出库时需进行装车,需记录车牌号码</span
>
<br>
<span style="margin-right: 50px; color: red">部分设备出库时需进行装车,需记录车牌号码</span>
<br />
<el-form-item label="备注" prop="remark">
<el-input v-model="numOutForm.remark" maxlength="50" />
<el-input v-model="numOutForm.remark" maxlength="50" />
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="saveNumOut"
>出库</el-button
>
<el-button type="primary" size="mini" @click="saveNumOut">出库</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="outNumList" height="500">
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="设备类型"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="库存数量"
align="center"
prop="num"
:show-overflow-tooltip="true"
/>
<el-table-column
label="待出库数量"
align="center"
prop="outNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="已出库数量"
align="center"
prop="alNum"
:show-overflow-tooltip="true"
/>
<el-table-column label="设备类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true" />
<el-table-column label="库存数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="待出库数量" align="center" prop="outNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="alNum" :show-overflow-tooltip="true" />
<el-table-column label="出库数量" align="center">
<template slot-scope="scope">
<el-input
@ -640,159 +371,73 @@
</el-table>
</el-dialog>
<!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="800px" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div
class="title"
style="
text-align: center;
font-weight: 600;
font-size: 16px;
"
>
出库单
</div>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>领料单位</span>{{ leaseOutData.unitName }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>工程名称</span>{{ leaseOutData.proName }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>时间</span>{{ leaseOutData.updateTime }}
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>编号</span>{{ leaseOutData.code }}
</div>
</div>
<el-table
:data="leaseOutDetailRecord"
class="table"
border
style="margin-top: 20px; padding: 1px"
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column
label="序号"
align="center"
type="index"
/>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
/>
<el-table-column
label="计量单位"
align="center"
prop="unitName"
/>
<el-table-column
label="出库数量"
align="center"
prop="outNum"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
/>
<el-table-column
label="备注"
align="center"
prop="remark"
/>
<el-table-column
label="出库方式"
align="center"
prop="manageTypeName"
/>
</el-table>
<!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="800px" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center; font-weight: 600; font-size: 16px"> 出库单 </div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>领料单位</span>{{ leaseOutData.unitName }}
</div>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>工程名称</span>{{ leaseOutData.proName }}
</div>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>时间</span>{{ leaseOutData.updateTime }}
</div>
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px">
<span>编号</span>{{ leaseOutData.code }}
</div>
</div>
<el-table :data="leaseOutDetailRecord" class="table" border style="margin-top: 20px; padding: 1px">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<el-table-column label="规格型号" align="center" prop="typeModelName" />
<el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="出库数量" align="center" prop="outNum" />
<el-table-column label="设备编码" align="center" prop="maCode" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="出库方式" align="center" prop="manageTypeName" />
</el-table>
<div
class="fillIn"
style="
margin-top: 30px;
display: flex;
justify-content: space-between;
"
>
<div class="item" style="width: 25%">
<span>审核</span>
</div>
<div class="item" style="width: 25%">
<span>领料</span>
</div>
<div class="item" style="width: 25%">
<span>仓库</span>
</div>
<div class="item" style="width: 25%">
<span>操作人</span>
</div>
<div class="fillIn" style="margin-top: 30px; display: flex; justify-content: space-between">
<div class="item" style="width: 25%">
<span>审核</span>
</div>
<div class="item" style="width: 25%">
<span>领料</span>
</div>
<div class="item" style="width: 25%">
<span>仓库</span>
</div>
<div class="item" style="width: 25%">
<span>操作人</span>
</div>
</div>
</vue-easy-print>
</div>
</vue-easy-print>
</div>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="print"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="print"> </el-button>
<el-button @click="open = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getUnitData,
getProData,
getLeaseAuditList,
getLeaseAuditListDetail,
getDetailsByTypeId,
submitOut,
submitNumOut,
getLeaseOutDetailRecordApi, getLeaseListAll, getLeaseOutOrder,
getUnitData,
getProData,
getLeaseAuditList,
getLeaseAuditListDetail,
getDetailsByTypeId,
submitOut,
submitNumOut,
getLeaseOutDetailRecordApi,
getLeaseListAll,
getLeaseOutOrder,
} from '@/api/claimAndRefund/receive.js'
import { getTypeList } from '@/api/store/warehousing'
import { equipmentTypeTree } from '@/api/store/tools'
@ -801,7 +446,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import vueEasyPrint from 'vue-easy-print'
export default {
name: 'receiveOut',
components: { Treeselect,vueEasyPrint },
components: { Treeselect, vueEasyPrint },
data() {
return {
//
@ -816,7 +461,7 @@ export default {
showSearch: true,
//
total: 0,
//
//
open: false,
//
leaseList: [],
@ -890,7 +535,7 @@ export default {
},
leaseOutDetailsList: [],
outTime: [],
//
//
leaseOutDetailRecord: [],
leaseOutData: {},
}
@ -930,15 +575,10 @@ export default {
item.children.forEach((item2, index2) => {
if (item2.children && item2.children.length > 0) {
item2.children.forEach((item3) => {
if (
item3.children &&
item3.children.length > 0
) {
if (item3.children && item3.children.length > 0) {
item3.children.forEach((item4) => {
item4.machineTypeName =
item3.typeName
item4.specificationType =
item4.typeName
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
// this.$set(item4, 'purchasePrice', 0);
// this.$set(item4, 'purchaseNum', 1);
})
@ -1142,26 +782,24 @@ export default {
this.outRecordVisible = true
})
},
/* 打开出库单 */
async openLld(row) {
this.open = true
/* 打开出库单 */
async openLld(row) {
this.open = true
const res = await getLeaseOutOrder({ parentId: row.parentId,typeId: row.typeId})
const res = await getLeaseOutOrder({ parentId: row.parentId, typeId: row.typeId })
this.leaseOutDetailRecord = res.data.leaseOutDetailRecord
this.leaseOutData = res.data
this.leaseOutDetailRecord = res.data.leaseOutDetailRecord
this.leaseOutData = res.data
console.log('this.leaseApplyData ============', this.leaseApplyData)
},
//
print() {
this.$refs.remarksPrintRef.print()
},
console.log('this.leaseApplyData ============', this.leaseApplyData)
},
//
print() {
this.$refs.remarksPrintRef.print()
},
async onHandleQuery() {
const res = await getLeaseOutDetailRecordApi(
this.leaseOutDetailParams,
)
const res = await getLeaseOutDetailRecordApi(this.leaseOutDetailParams)
this.leaseOutDetailsList = res.data
},
onHandleReset() {

View File

@ -13,28 +13,28 @@
>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
maxlength="50"
style="width: 240px"
placeholder="请输入关键字"
v-model="queryParams.keyWord"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备类型" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择设备类型"
clearable
filterable
style="width: 240px"
@change="selectDevice"
placeholder="请选择设备类型"
v-model="queryParams.typeId"
>
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
:label="typeItem.typeName"
v-for="typeItem in typeList"
/>
</el-select>
</el-form-item>
@ -67,42 +67,23 @@
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</div>
<el-row :gutter="10" class="mb8">
<!-- -->
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleBind"
:disabled="single"
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleBind" :disabled="single"
>绑定</el-button
>
</el-col>
<!-- :disabled="single" -->
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="createLabel"
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="createLabel"
>标签生成</el-button
>
</el-col>
@ -167,17 +148,10 @@
>导出</el-button>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="labelList"
@selection-change="handleSelectionChange"
>
<el-table v-loading="loading" :data="labelList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="序号" align="center" width="80" type="index">
<template scope="scope">
@ -188,68 +162,22 @@
align="center"
label="序号"
type="index"
:index="
indexContinuation(
queryParams.pageNum,
queryParams.pageSize,
)
"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
/>
<el-table-column
label="标签类型"
align="center"
prop="name"
:show-overflow-tooltip="true"
/>
<el-table-column
label="标签编号"
align="center"
prop="labelCode"
>
<el-table-column label="标签类型" align="center" prop="name" :show-overflow-tooltip="true" />
<el-table-column label="标签编号" align="center" prop="labelCode">
<template slot-scope="scope">
<span
style="color: blue; cursor: pointer"
@click="labelUploadCode(scope.row)"
>
<span style="color: blue; cursor: pointer" @click="labelUploadCode(scope.row)">
{{ scope.row.labelCode }}</span
>
</template>
</el-table-column>
<el-table-column
label="物品种类"
align="center"
prop="kindName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="物品名称"
align="center"
prop="modelName"
/>
<el-table-column
label="规格型号"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
width="180"
/>
<el-table-column
label="绑定人员"
align="center"
prop="userName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="绑定时间"
align="center"
prop="bindTime"
width="150"
/>
<el-table-column label="物品种类" align="center" prop="kindName" :show-overflow-tooltip="true" />
<el-table-column label="物品名称" align="center" prop="modelName" />
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="设备编码" align="center" prop="maCode" width="180" />
<el-table-column label="绑定人员" align="center" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="绑定时间" align="center" prop="bindTime" width="150" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
@ -270,12 +198,7 @@
</el-table-column>
<!-- 需求-隐藏解绑按钮 -->
<el-table-column
v-if="false"
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column v-if="false" label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button
size="mini"
@ -286,12 +209,7 @@
<!-- status 未绑定0 已绑定1 已解绑2 -->
<!-- isBind 不展示解绑0 展示解绑1 -->
<el-button
:disabled="
!(
scope.row.status === '1' &&
scope.row.isBind === '1'
)
"
:disabled="!(scope.row.status === '1' && scope.row.isBind === '1')"
size="mini"
type="danger"
icon="el-icon-delete"
@ -312,21 +230,10 @@
</div>
<!-- 标签绑定对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="500px"
append-to-body
:close-on-click-modal="false"
>
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="标签类型" prop="labelType">
<el-select
v-model="form.labelType"
placeholder="请选择标签类型"
style="width: 100%"
disabled
>
<el-select v-model="form.labelType" placeholder="请选择标签类型" style="width: 100%" disabled>
<el-option
v-for="item in labelTypeList"
:key="item.id"
@ -337,12 +244,7 @@
</el-select>
</el-form-item>
<el-form-item label="标签编号" prop="labelCode">
<el-select
v-model="form.labelCode"
placeholder="请选择标签编号"
style="width: 100%"
disabled
>
<el-select v-model="form.labelCode" placeholder="请选择标签编号" style="width: 100%" disabled>
<el-option
v-for="item in labelCodeList"
:key="item.labelCode"
@ -379,25 +281,10 @@
</el-dialog>
<!-- 标签生成对话框 -->
<el-dialog
:title="title"
:visible.sync="createOpen"
width="500px"
append-to-body
:close-on-click-modal="false"
>
<el-form
ref="cform"
:model="cform"
:rules="crules"
label-width="80px"
>
<el-dialog :title="title" :visible.sync="createOpen" width="500px" append-to-body :close-on-click-modal="false">
<el-form ref="cform" :model="cform" :rules="crules" label-width="80px">
<el-form-item label="标签类型" prop="labelType">
<el-select
v-model="cform.labelType"
placeholder="请选择标签类型"
style="width: 100%"
>
<el-select v-model="cform.labelType" placeholder="请选择标签类型" style="width: 100%">
<el-option
v-for="item in labelTypeList"
:key="item.id"
@ -420,21 +307,13 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitCreate"
> </el-button
>
<el-button type="primary" @click="submitCreate"> </el-button>
<el-button @click="cancelCreate"> </el-button>
</div>
</el-dialog>
<!-- 标签下载对话框 -->
<el-dialog
:title="title"
:visible.sync="uploadOpen"
width="450px"
append-to-body
:close-on-click-modal="false"
>
<el-dialog :title="title" :visible.sync="uploadOpen" width="450px" append-to-body :close-on-click-modal="false">
<div style="text-align: center" ref="codeBox">
<div class="uploadImg">
<div id="qrcode" class="qrcode" ref="codeItem"></div>
@ -443,9 +322,7 @@
<div class="maCode">设备编号{{ rowObj.maCode }}</div>
</div>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="downloadCode"
> </el-button
>
<el-button type="primary" @click="downloadCode"> </el-button>
</div>
</el-dialog>
<div style="background-color: transparent" ref="qrCodeAll">
@ -483,22 +360,11 @@ import {
supplierInfoList,
getListByMaType,
} from '@/api/store/tools'
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
import { listLabelBind, addLabelBind, delLabelBind } from '@/api/store/label'
import { getTypeList } from '@/api/store/warehousing'
import user from '../../../store/modules/user'
import {
unitTypeList,
getMaMachineLabelApi,
addMaMachineLabelApi,
} from '@/api/base/base'
import { unitTypeList, getMaMachineLabelApi, addMaMachineLabelApi } from '@/api/base/base'
import { v4 as uuidv4 } from 'uuid'
import html2canvas from 'html2canvas'
import QRCode from 'qrcodejs2'
@ -653,9 +519,7 @@ export default {
/** 查询字典类型列表 */
getList() {
this.loading = true
listLabelBind(
this.addDateRange(this.queryParams, this.dateRange),
).then((response) => {
listLabelBind(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
this.labelList = response.rows
this.total = response.total
this.loading = false
@ -743,9 +607,7 @@ export default {
})
}
} else {
this.$modal.msgError(
'当前类型无法生成标签,请选择设备类型-规格型号!',
)
this.$modal.msgError('当前类型无法生成标签,请选择设备类型-规格型号!')
}
}
})
@ -762,16 +624,7 @@ export default {
console.log(nMonth)
this.form.level = '4'
// let arr = this.form.arrivalTime.split('-')
this.$set(
this.form,
'maCode',
'NSJJ' +
val.code +
val.modelCode +
nYear[2] +
nYear[3] +
nMonth,
)
this.$set(this.form, 'maCode', 'NSJJ' + val.code + val.modelCode + nYear[2] + nYear[3] + nMonth)
} else {
this.form.level = ''
this.$set(this.form, 'maCode', '')
@ -856,8 +709,7 @@ export default {
height = shareContent.offsetHeight
const maCodeText = document.createElement('div')
maCodeText.innerHTML = '设备编码:' + element.maCode
maCodeText.style =
'font-size=18px; width:100%;text-align:center;margin:10px;'
maCodeText.style = 'font-size=18px; width:100%;text-align:center;margin:10px;'
shareContent.appendChild(maCodeText)
new QRCode(captureId[i], {
width: width,
@ -870,10 +722,8 @@ export default {
scale = 1
canvas.width = width * scale
canvas.height = height * scale
canvas.style.width =
(shareContent.clientWidth * scale) / 100 + 'rem'
canvas.style.height =
(shareContent.clientHeight * scale) / 100 + 'rem'
canvas.style.width = (shareContent.clientWidth * scale) / 100 + 'rem'
canvas.style.height = (shareContent.clientHeight * scale) / 100 + 'rem'
canvas.getContext('2d').scale(scale, scale)
let opts = {
scale: scale,
@ -885,10 +735,7 @@ export default {
}
await html2canvas(shareContent, opts)
.then(function (canvas) {
const qrContentImage = canvas.toDataURL(
'image/jpeg',
1.0,
)
const qrContentImage = canvas.toDataURL('image/jpeg', 1.0)
if (i <= that.checkboxModel.length - 1) {
that.qrcodeArr.push({
url: qrContentImage,
@ -1045,9 +892,7 @@ export default {
})
//
if (document.getElementById('qrcode').childNodes[0]) {
this.$refs.qrcode.removeChild(
document.getElementById('qrcode').childNodes[0],
)
this.$refs.qrcode.removeChild(document.getElementById('qrcode').childNodes[0])
}
this.$refs.qrcode.appendChild(this.qrcode)
})

View File

@ -10,69 +10,29 @@
label-width="100px"
@submit.native.prevent
>
<el-form-item label="成套设备名称" prop="wholeTypeName">
<el-form-item label="成套设备" prop="wholeTypeName">
<el-input
v-model="formData.wholeTypeName"
placeholder="请输入成套设备名称"
placeholder="请输入成套设备"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="主体设备" prop="keyWord">
<el-input
v-model="formData.keyWord"
placeholder="请输入关键字"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建日期" prop="keyWord">
<el-input
v-model="formData.keyWord"
placeholder="请输入关键字"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
/>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
</el-row>
<!-- 列表 -->
@ -82,32 +42,14 @@
align="center"
width="80"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
:index="indexContinuation(queryParams.pageNum, queryParams.pageSize)"
>
</el-table-column>
<el-table-column
prop="wholeTypeName"
label="成套设备名称"
align="center"
/>
<el-table-column
prop="typeModelName"
label="抱杆设备"
align="center"
/>
<el-table-column
prop="totalNum"
label="配套设备种类数量"
align="center"
/>
<el-table-column prop="wholeTypeName" label="成套设备" align="center" />
<!-- <el-table-column prop="typeModelName" label="抱杆设备" align="center" /> -->
<!-- <el-table-column prop="totalNum" label="配套设备种类数量" align="center" /> -->
<el-table-column prop="nickName" label="创建人" align="center" />
<el-table-column
prop="createTime"
label="创建日期"
align="center"
/>
<el-table-column prop="createTime" label="创建日期" align="center" />
<el-table-column label="操作" align="center">
<template v-slot="{ row }">
<!-- <el-button
@ -116,18 +58,9 @@
@click="handleDetail(row)"
>查看</el-button
> -->
<el-button
type="text"
icon="el-icon-edit"
@click="handleEdit(row)"
>编辑</el-button
>
<el-button
type="text"
icon="el-icon-delete"
@click="handleDeleteRow(row)"
>删除</el-button
>
<el-button type="text" icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
<el-button type="text" icon="el-icon-search" @click="onHandleView(row)">附属配件</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleDeleteRow(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -141,105 +74,89 @@
/>
<!-- 弹框 -->
<el-dialog
:title="title"
:visible.sync="open"
v-if="open"
width="80%"
:close-on-click-modal="false"
>
<el-form
ref="addFormRef"
:model="addCompleteForm"
:rules="addCompleteRules"
inline
label-width="120px"
>
<el-form-item label="成套名称" prop="completeSetName">
<el-input
placeholder="请输入成套名称"
v-model="addCompleteForm.completeSetName"
/>
</el-form-item>
<el-form-item
label="抱杆设备"
prop="mainDevice"
class="is-required"
>
<el-cascader
clearable
filterable
ref="mainDeviceRef"
@change="selMainDevice"
:show-all-levels="false"
placeholder="请选择抱杆设备"
:options="deviceTypeTreeNew"
:props="deviceTypeTreeProps"
:disabled="mainDeviceDisabled"
v-model="addCompleteForm.mainDevice"
/>
</el-form-item>
<el-form-item label="配套设备" prop="assortDevice">
<el-cascader
ref="assortDeviceRef"
placeholder="请选择配套设备"
:options="deviceTypeTreeNew"
:props="deviceTypeTreeProps"
v-model="addCompleteForm.assortDevice"
@change="selAssortDevice"
:show-all-levels="false"
filterable
clearable
/>
</el-form-item>
</el-form>
<el-row class="mb8">
<el-button type="primary" size="mini" @click="submitComplete"
> </el-button
>
</el-row>
<el-table :data="tempList" border max-height="400">
<el-table-column align="center" label="序号" type="index" />
<el-table-column
prop="typeName"
align="center"
label="设备名称"
/>
<el-table-column
prop="deviceType"
align="center"
label="设备型号"
/>
<el-table-column
prop="deviceAscription"
align="center"
label="设备所属"
/>
<el-table-column align="center" label="数量">
<template slot-scope="{ row }">
<el-input
v-model="row.deviceNum"
style="width: 180px"
placeholder="请输入数量"
@change="deviceNumChange"
maxlength="9"
<el-dialog :title="title" :visible.sync="open" v-if="open" width="80%" :close-on-click-modal="false">
<template v-if="title !== '附件详情'">
<el-form ref="addFormRef" :model="addCompleteForm" :rules="addCompleteRules" inline label-width="120px">
<el-form-item label="成套设备">
<el-cascader
clearable
filterable
ref="mainDeviceRef"
@change="selMainDevice"
:show-all-levels="false"
placeholder="请选择抱杆设备"
:options="deviceTypeTreeNew"
:props="deviceTypeTreeProps"
:disabled="mainDeviceDisabled"
v-model="addCompleteForm.mainDevice"
/>
</template>
</el-table-column>
<!-- 操作列 -->
<el-table-column align="center" label="操作">
<template slot-scope="{ row }">
<el-button
size="mini"
type="danger"
@click="handleDelete(row)"
> </el-button
</el-form-item>
<el-form-item label="规格型号">
<el-select
v-model="addCompleteForm.assortDevice"
@change="onChangeLastType"
clearable
filterable
>
</template>
</el-table-column>
</el-table>
<el-option
:key="type.typeId"
:value="type.typeId"
:label="type.typeName"
v-for="type in lastTypesList"
/>
</el-select>
</el-form-item>
</el-form>
<el-row class="mb8">
<el-button type="primary" size="mini" @click="submitComplete"> </el-button>
</el-row>
<el-table :data="tempList" border max-height="400">
<el-table-column align="center" label="序号" type="index" />
<el-table-column prop="typeName" align="center" label="成套设备" />
<el-table-column prop="deviceType" align="center" label="规格型号" />
<el-table-column align="center" label="数量">
<template slot-scope="{ row }">
<el-input
v-model="row.deviceNum"
style="width: 180px"
placeholder="请输入数量"
@change="deviceNumChange"
maxlength="9"
/>
</template>
</el-table-column>
<el-table-column prop="deviceType" align="center" label="是否管理库存">
<template slot-scope="{ row }">
<el-tag size="mini" type="primary" v-if="row.isStorage == 1"></el-tag>
<el-tag size="mini" type="warning" v-if="row.isStorage == 0"></el-tag>
</template>
</el-table-column>
<!-- 操作列 -->
<el-table-column align="center" label="操作">
<template slot-scope="{ row }">
<el-button size="mini" type="danger" @click="handleDelete(row)"> </el-button>
</template>
</el-table-column>
</el-table>
</template>
<template v-else>
<el-table :data="detailsList" border max-height="400">
<el-table-column align="center" label="序号" type="index" />
<el-table-column prop="typeName" align="center" label="成套设备" />
<el-table-column prop="deviceType" align="center" label="规格型号" />
<el-table-column align="center" label="数量" prop="deviceNum"> </el-table-column>
<el-table-column prop="deviceType" align="center" label="是否管理库存">
<template slot-scope="{ row }">
<el-tag size="mini" type="primary" v-if="row.isStorage == 1"></el-tag>
<el-tag size="mini" type="warning" v-if="row.isStorage == 0"></el-tag>
</template>
</el-table-column>
</el-table>
</template>
</el-dialog>
</div>
</template>
@ -255,6 +172,7 @@
// } from '@/api/store/poleConfig'
import { getDeviceTypeTree } from '@/api/claimAndRefund/receive'
import { getInfoListByTypeApi } from '@/api/store/warehousing'
import {
addCompleteSetToolsApi,
queryCompleteSetToolsApi,
@ -302,27 +220,20 @@ export default {
assortDevice: '',
},
addCompleteRules: {
completeSetName: [
mainDevice: [
{
required: true,
trigger: 'blur',
message: '请输入成套名称',
},
{
max: 40,
message: '长度不能超过40个字符',
trigger: 'change',
message: '请选择成套设备',
},
],
assortDevice: [
{
required: true,
trigger: 'change',
message: '请选择规格型号',
},
],
// mainDevice: [
// {
// required: true,
// },
// ],
// assortDevice: [
// {
// required: true,
// },
// ],
},
deviceTypeTreeProps: {
multiple: false,
@ -341,40 +252,24 @@ export default {
isEdit: false,
deviceName: '',
tableList: [],
typesList: [],
lastTypesList: [],
lastTypeId: '',
detailsList: [],
parentId: '',
}
},
created() {
this.getList()
//
this.getDeviceTypeTree()
// getDeviceTypeTree().then((res) => {
// // typeOptions
// const data = res.data
// // this.typeOptions = this.getTree(data)
// // this.mountingsOptions = this.getTree(data)
// this.typeOptions = this.mountingsOptions = this.getTree(data)
// })
// getDeviceTypeTree().then(res => {
// // mountingsOptions
// const data = res.data
// this.mountingsOptions = this.getTree(data)
// })
},
methods: {
//
async getList() {
const res = await getCompleteSetToolsApi(this.formData)
console.log(res, '成套列表')
this.tableList = res.rows
this.total = res.total
// this.houseList = []
// this.queryParams.pageNum = data.page || 1
// this.queryParams.pageSize = data.limit || 10
// this.queryParams.keyWord = this.formData.keyWord || ''
// const res = await searchSelectList({ ...this.queryParams })
// this.houseList = res.data.result
// this.total = res.data.totalCount || 0
},
//
handleQuery() {
@ -411,28 +306,22 @@ export default {
//
async handleEdit(row) {
this.title = '成套设备编辑'
this.addCompleteForm.completeSetName = row.wholeTypeName
this.addCompleteForm.mainDevice = row.deviceTypeId
this.addCompleteForm.mainDevice = [row.oneId, row.towId, row.id]
this.saveParams.id = row.id
this.parentId = row.id
this.saveParams.wholeTypeName = row.wholeTypeName
this.mainDeviceDisabled = true
this.isEdit = true
const result = await getInfoListByTypeApi({ level: '4', parentId: row.id + '' })
this.lastTypesList = result.data
const queryParams = {
id: row.id,
wholeTypeName: row.wholeTypeName,
// pageNum: 1,
// pageSize: 99999,
}
const { data: res } = await queryCompleteSetToolsApi(queryParams)
this.tempList = res
this.open = true
this.$nextTick(() => {
const mainDeviceRef = this.$refs.mainDeviceRef
const input = mainDeviceRef.$el.querySelector('input')
if (input) {
input.value = this.tempList[0].deviceType
}
})
},
//
@ -470,70 +359,38 @@ export default {
* 以下为弹框内操作代码逻辑
*/
//
selMainDevice(val) {
if (val.length < 4) {
this.$modal.msgError(
'请选择第四级规格型号的数据,如未添加可以添加后再操作!',
)
async selMainDevice(val) {
if (val.length < 3) {
this.$modal.msgError('请选择第三级设备类型,如未添加可以添加后再操作!')
this.addCompleteForm.mainDevice = []
return
}
this.$message.closeAll()
const checkNode = this.$refs['mainDeviceRef'].getCheckedNodes()
this.recursionGetDeviceName(
this.deviceTypeTreeNew,
val[val.length - 2],
)
if (checkNode.length < 1) return
const mainDeviceObj = {
deviceType: checkNode[0].label, //
deviceTypeId: val[val.length - 1], // Id
deviceNum: '', //
deviceAscription: '抱杆设备', //
ascriptionType: 1, // 1 2
typeName: this.deviceName,
}
if (this.tempList.length === 0) {
this.tempList.unshift(mainDeviceObj)
} else {
//
const isRepeat = this.tempList.some(
(e) => e.deviceTypeId === mainDeviceObj.deviceTypeId,
)
if (isRepeat) {
this.$message.error(
'该设备已选择作为配套设备,不可作为主体设备!',
)
return
} else {
this.tempList.unshift(mainDeviceObj)
}
}
this.mainDeviceDisabled = true
const label = checkNode[0].label
const value = checkNode[0].value
this.deviceName = label
this.parentId = value
const res = await getInfoListByTypeApi({ level: '4', parentId: value + '' })
this.lastTypesList = res.data
console.log(res, '第四级数据')
},
//
selAssortDevice(val) {
if (val.length < 4) {
this.$modal.msgError(
'请选择第四级规格型号的数据,如未添加可以添加后再操作!',
)
this.$modal.msgError('请选择第四级规格型号的数据,如未添加可以添加后再操作!')
this.addCompleteForm.assortDevice = []
return
}
this.$message.closeAll()
const checkNode = this.$refs['assortDeviceRef'].getCheckedNodes()
this.recursionGetDeviceName(
this.deviceTypeTreeNew,
val[val.length - 2],
)
this.recursionGetDeviceName(this.deviceTypeTreeNew, val[val.length - 2])
if (checkNode.length < 1) return
const assortDeviceObj = {
deviceType: checkNode[0].label, //
deviceType: checkNode[0].label, //
deviceTypeId: val[val.length - 1], // Id
deviceNum: '', //
deviceAscription: '配套设备', //
@ -542,20 +399,13 @@ export default {
}
//
if (
this.tempList.length > 0 &&
this.tempList[0].deviceTypeId === assortDeviceObj.deviceTypeId
) {
this.$message.error(
'所选设备已作为抱杆设备,不可再作为配套设备!',
)
if (this.tempList.length > 0 && this.tempList[0].deviceTypeId === assortDeviceObj.deviceTypeId) {
this.$message.error('所选设备已作为抱杆设备,不可再作为配套设备!')
return
}
//
const isRepeat = this.tempList.some(
(e) => e.deviceTypeId === assortDeviceObj.deviceTypeId,
)
const isRepeat = this.tempList.some((e) => e.deviceTypeId === assortDeviceObj.deviceTypeId)
if (isRepeat) {
this.$message.error('该设备已添加,不可重复添加!')
@ -566,9 +416,7 @@ export default {
},
//
handleDelete(row) {
this.tempList = this.tempList.filter(
(e) => e.deviceTypeId !== row.deviceTypeId,
)
this.tempList = this.tempList.filter((e) => e.deviceTypeId !== row.deviceTypeId)
//
if (row.ascriptionType === 1) {
this.mainDeviceDisabled = false
@ -586,23 +434,13 @@ export default {
this.$refs.addFormRef.validate(async (valid) => {
if (valid) {
let isNum = false
const isMainDevice = this.tempList.some(
(e) => e.ascriptionType === 1,
)
// const isMainDevice = this.tempList.some((e) => e.ascriptionType === 1)
if (!isMainDevice) {
this.$message.error('请添加抱杆设备!')
if (this.tempList.length === 0) {
this.$message.error('请添加设备!')
return
}
// const isAssortDevice = this.tempList.some(
// (e) => e.ascriptionType === 2,
// )
// if (!isAssortDevice) {
// this.$message.error('')
// return
// }
try {
this.tempList.forEach((e) => {
if (!parseInt(e.deviceNum)) {
@ -615,21 +453,14 @@ export default {
})
} catch (error) {}
if (isNum) return
this.saveParams.parentId = this.tempList[0].deviceTypeId
this.saveParams.wholeTypeName =
this.addCompleteForm.completeSetName
this.saveParams.wholeTypeName = this.deviceName
this.saveParams.parentId = this.parentId
this.saveParams.deviceInfo = this.tempList
const res = await addCompleteSetToolsApi(this.saveParams)
if (res.code == 200) {
this.$message.success(
!this.title === '成套设备新增'
? '新增成功!'
: '修改成功!',
)
this.$message.success(!this.title === '成套设备新增' ? '新增成功!' : '修改成功!')
this.open = false
this.tempList = []
this.getList()
@ -641,7 +472,7 @@ export default {
//
async getDeviceTypeTree() {
const params = {
level: 4,
level: 3,
}
const res = await getDeviceTypeTree(params)
this.deviceTypeTreeNew = res.data
@ -666,6 +497,45 @@ export default {
})
} catch (error) {}
},
// change
onChangeLastType(val) {
const typeLabel = this.lastTypesList.find((e) => e.typeId === val)
const { typeName, isStorage } = typeLabel
const assortDeviceObj = {
deviceType: typeName, //
deviceTypeId: val, // Id
deviceNum: '', //
deviceAscription: '配套设备', //
ascriptionType: 2, // 1 2
typeName: this.deviceName,
isStorage,
}
const isRepeat = this.tempList.some((e) => e.deviceTypeId === assortDeviceObj.deviceTypeId)
if (isRepeat) {
this.$message.error('该设备已添加,不可重复添加!')
return
} else {
this.tempList.push(assortDeviceObj)
}
},
//
async onHandleView(row) {
this.title = '附件详情'
this.saveParams.id = row.id
const queryParams = {
id: row.id,
wholeTypeName: row.wholeTypeName,
}
const { data: res } = await queryCompleteSetToolsApi(queryParams)
this.detailsList = res
this.open = true
},
},
}
</script>

View File

@ -34,19 +34,12 @@
@mousemove="onMousemove(data)"
@mouseleave="onMouseleave()"
>
<span
v-if="
isMousemoveId === data.id &&
node.label.length > 5
"
>{{ node.label.slice(0, 3) + '...' }}</span
>
<span v-if="isMousemoveId === data.id && node.label.length > 5">{{
node.label.slice(0, 3) + '...'
}}</span>
<span v-else>{{ node.label }}</span>
<span
class="btn-items"
v-if="isMousemoveId === data.id"
>
<span class="btn-items" v-if="isMousemoveId === data.id">
<el-button
type="text"
size="mini"
@ -98,19 +91,10 @@
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -136,30 +120,16 @@
>导出
</el-button>
</el-col>-->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="typeList"
border
@selection-change="handleSelectionChange"
>
<el-table v-loading="loading" :data="typeList" border @selection-change="handleSelectionChange">
<!-- <el-table-column
type="selection"
width="50"
align="center"
/> -->
<el-table-column
label="名称"
align="center"
key="typeName"
prop="typeName"
show-overflow-tooltip
/>
<el-table-column label="名称" align="center" key="typeName" prop="typeName" show-overflow-tooltip />
<el-table-column
label="计量单位"
align="center"
@ -175,13 +145,7 @@
show-overflow-tooltip
width="100"
/>
<el-table-column
label="原值"
align="center"
key="buyPrice"
prop="buyPrice"
show-overflow-tooltip
/>
<el-table-column label="原值" align="center" key="buyPrice" prop="buyPrice" show-overflow-tooltip />
<!-- <el-table-column-->
<!-- label="丢失赔偿"-->
<!-- align="center"-->
@ -196,23 +160,10 @@
prop="keeperUserName"
show-overflow-tooltip
/>
<el-table-column
label="管理模式"
align="center"
key="manageType"
prop="manageType"
>
<el-table-column label="管理模式" align="center" key="manageType" prop="manageType">
<template slot-scope="{ row }">
<el-tag size="mini" v-if="row.manageType == '0'">
编码管理
</el-tag>
<el-tag
size="mini"
type="success"
v-if="row.manageType == '1'"
>
数量管理
</el-tag>
<el-tag size="mini" v-if="row.manageType == '0'"> 编码管理 </el-tag>
<el-tag size="mini" type="success" v-if="row.manageType == '1'"> 数量管理 </el-tag>
<!-- <el-tag-->
<!-- size="mini"-->
<!-- type="warning"-->
@ -222,19 +173,11 @@
<!-- </el-tag>-->
</template>
</el-table-column>
<el-table-column
label="图片"
align="center"
key="photoName"
prop="photoName"
show-overflow-tooltip
>
<el-table-column label="图片" align="center" key="photoName" prop="photoName" show-overflow-tooltip>
<template slot-scope="scope">
<span
@click="openImg(scope.row.photoUrl)"
style="color: #02a7f0; cursor: pointer"
>{{ scope.row.photoName }}</span
>
<span @click="openImg(scope.row.photoUrl)" style="color: #02a7f0; cursor: pointer">{{
scope.row.photoName
}}</span>
</template>
</el-table-column>
<el-table-column
@ -268,19 +211,22 @@
prop="facModel"
show-overflow-tooltip
/>
<el-table-column
label="备注信息"
align="center"
key="remark"
prop="remark"
show-overflow-tooltip
/>
<el-table-column label="以大带小" align="center">
<template slot-scope="{ row }">
<el-tag size="mini" type="primary" v-if="row.isReplace == 1"></el-tag>
<el-tag size="mini" type="warning" v-if="row.isReplace == 0"></el-tag>
</template>
</el-table-column>
<el-table-column label="是否库存管理" align="center">
<template slot-scope="{ row }">
<el-tag size="mini" type="primary" v-if="row.isStorage == 1"></el-tag>
<el-tag size="mini" type="warning" v-if="row.isStorage == 0"></el-tag>
</template>
</el-table-column>
<el-table-column label="备注信息" align="center" key="remark" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" align="center" width="180">
<template
slot-scope="scope"
v-if="scope.row.typeId !== 1"
>
<template slot-scope="scope" v-if="scope.row.typeId !== 1">
<el-button
size="mini"
type="text"
@ -323,19 +269,8 @@
</el-row>
<!-- 添加或修改用户配置对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="850px"
append-to-body
:close-on-click-modal="false"
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="100px"
>
<el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="所属上级" prop="parentId">
@ -375,11 +310,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="名称" prop="typeName">
<el-input
v-model="form.typeName"
placeholder="请输入名称"
maxlength="30"
/>
<el-input v-model="form.typeName" placeholder="请输入名称" maxlength="30" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -390,12 +321,8 @@
placeholder="请选择管理模式"
style="width: 100%"
>
<el-option value="0" label="编码管理"
>编码管理</el-option
>
<el-option value="1" label="数量管理"
>数量管理</el-option
>
<el-option value="0" label="编码管理">编码管理</el-option>
<el-option value="1" label="数量管理">数量管理</el-option>
<!-- <el-option value="2" label="成套管理"-->
<!-- >成套管理</el-option-->
<!-- >-->
@ -417,12 +344,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="原值" prop="buyPrice">
<el-input
v-model="form.buyPrice"
type="number"
placeholder="请输入原值"
maxlength="30"
/>
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30" />
</el-form-item>
</el-col>
@ -441,11 +363,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="计量单位" prop="unitName">
<el-input
v-model="form.unitName"
placeholder="请输入计量单位"
maxlength="20"
/>
<el-input v-model="form.unitName" placeholder="请输入计量单位" maxlength="20" />
</el-form-item>
</el-col>
<el-col :span="12">
@ -514,19 +432,11 @@
action="#"
:limit="1"
accept=".docx"
:http-request="
(obj) => fileUpLoad(obj, 'fileUrl')
"
:http-request="(obj) => fileUpLoad(obj, 'fileUrl')"
:on-exceed="exceedFile"
>
<el-button
size="small"
type="primary"
icon="el-icon-upload"
>点击上传</el-button
><span style="color: red; margin-left: 10px"
>文件需小于20M</span
>
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button
><span style="color: red; margin-left: 10px">文件需小于20M</span>
</el-upload>
</el-form-item>
</el-col>
@ -535,9 +445,7 @@
<el-col :span="12">
<el-form-item label="图片" prop="photoName">
<el-upload
:http-request="
(obj) => imgUpLoad(obj, 'fileUrl')
"
:http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
action="#"
:file-list="fileList"
list-type="picture-card"
@ -554,50 +462,21 @@
style="width: 140px; height: 140px"
class="avatar"
/>
<i
v-else
class="el-icon-plus avatar-uploader-icon"
></i>
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="以大代小" prop="isReplace">
<el-select
v-model="form.isReplace"
clearable
placeholder="请选择"
style="width: 100%"
>
<el-option
label="是"
value="1"
key="1"
></el-option>
<el-option
label="否"
value="0"
key="0"
></el-option>
<el-select v-model="form.isReplace" clearable placeholder="请选择" style="width: 100%">
<el-option label="是" value="1" key="1"></el-option>
<el-option label="否" value="0" key="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否库存管理" prop="isStorage">
<el-select
v-model="form.isStorage"
clearable
placeholder="请选择"
style="width: 100%"
>
<el-option
label="是"
value="1"
key="1"
></el-option>
<el-option
label="否"
value="0"
key="0"
></el-option>
<el-select v-model="form.isStorage" clearable placeholder="请选择" style="width: 100%">
<el-option label="是" value="1" key="1"></el-option>
<el-option label="否" value="0" key="0"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -614,27 +493,12 @@
</el-dialog>
<!-- 配置弹窗 -->
<el-dialog
:title="title"
:visible.sync="configOpen"
width="650px"
append-to-body
:close-on-click-modal="false"
>
<el-form
ref="cform"
:model="cform"
:rules="crules"
label-width="110px"
>
<el-dialog :title="title" :visible.sync="configOpen" width="650px" append-to-body :close-on-click-modal="false">
<el-form ref="cform" :model="cform" :rules="crules" label-width="110px">
<el-row>
<el-col :span="24">
<el-form-item label="调整前价格">
<el-input
v-model="leasePrice"
placeholder="调整前价格"
disabled
></el-input>
<el-input v-model="leasePrice" placeholder="调整前价格" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
@ -666,9 +530,7 @@
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitConfig"
> </el-button
>
<el-button type="primary" @click="submitConfig"> </el-button>
<el-button @click="cancelConfig"> </el-button>
</div>
</el-dialog>
@ -682,40 +544,24 @@
append-to-body
:close-on-click-modal="false"
>
<el-form
label-width="80px"
:model="addFormParams"
:rules="addFormParamsRules"
ref="addFormParamsRef"
>
<el-form label-width="80px" :model="addFormParams" :rules="addFormParamsRules" ref="addFormParamsRef">
<el-row :gutter="24">
<el-col :span="12" v-if="addTitle === '新增'">
<el-form-item label="所属上级">
<el-input
style="width: 100%"
disabled
v-model="addFormParams.label"
/>
<el-input style="width: 100%" disabled v-model="addFormParams.label" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="名称" prop="typeName">
<el-input
style="width: 100%"
v-model="addFormParams.typeName"
/>
<el-input style="width: 100%" v-model="addFormParams.typeName" />
</el-form-item>
</el-col>
</el-row>
<el-row style="text-align: right">
<el-form-item>
<el-button size="small" type="primary" @click="onSubmit"
> </el-button
>
<el-button size="small" @click="onCancel"
> </el-button
>
<el-button size="small" type="primary" @click="onSubmit"> </el-button>
<el-button size="small" @click="onCancel"> </el-button>
</el-form-item>
</el-row>
</el-form>
@ -726,14 +572,7 @@
<script>
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import {
getListByMaType,
getMaTypeList,
getMaType,
addMaType,
updateMaType,
delMaType,
} from '@/api/store/tools'
import { getListByMaType, getMaTypeList, getMaType, addMaType, updateMaType, delMaType } from '@/api/store/tools'
import { getUserByRoleList, getMaUserList } from '@/api/system/user'
import { getProLists } from '@/api/base/base'
import { imgUpLoad, fileUpLoad } from '@/api/system/upload'
@ -1008,6 +847,8 @@ export default {
documentUrl: '',
documentName: '',
parentId: '',
isReplace: '0',
isStorage: '1',
}
this.imageUrl = ''
this.fileList = []
@ -1208,11 +1049,7 @@ export default {
})
},
exceedFile(files, fileList) {
this.$message.warning(
`只能选择 1 个文件导入,共选择了 ${
files.length + fileList.length
} 个文件`,
)
this.$message.warning(`只能选择 1 个文件导入,共选择了 ${files.length + fileList.length} 个文件`)
},
/** 导出按钮操作 */
@ -1351,9 +1188,7 @@ export default {
content: '\e783';
font-size: 16px;
}
::v-deep
.el-tree
.el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
::v-deep .el-tree .el-tree-node__expand-icon.expanded.el-icon-caret-right:before {
content: '\e781';
font-size: 16px;
color: #1890ff;
@ -1366,10 +1201,7 @@ export default {
color: transparent !important;
}
::v-deep
.el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
background-color: #8decf1;
}
</style>

View File

@ -37,7 +37,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://112.29.103.165:21626`, //线上环境-重庆
// target: `http://112.29.103.165:21624`,//线上环境-宁夏 打包前放开数据大屏的路由
target: `http://192.168.0.56:39080`, //测试环境
// target: `http://192.168.0.56:39080`, //测试环境
// target: `http://1.12.248.179:23028`,//线上环境-南网
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
@ -47,7 +47,8 @@ module.exports = {
// target: `http://192.168.2.74:49080`, //旭/
// target: `http://192.168.2.17:39080`, //帅
// target: `http://192.168.2.209:49080`, //福
target: `http://192.168.0.60:39080`, //福
// target: `http://192.168.0.96:39080`, //马
//******** 注意事项 ********* */
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址target;