试运行问题修复

This commit is contained in:
hongchao 2025-05-08 16:24:57 +08:00
parent 4f78066db4
commit 062a2c097b
12 changed files with 670 additions and 240 deletions

View File

@ -88,3 +88,10 @@ export function synchReport(data) {
data: data,
})
}
export function editAssetsCode(data) {
return request({
url: '/material/ma_machine/editAssetsCode',
method: 'post',
data: data,
})
}

View File

@ -27,7 +27,7 @@ export function bindKeeper(data) {
})
}
// 库管员管理--
// 库管员管理--
export function noBindKeeper(data) {
return request({
url: '/material/ma_type_keeper/unbind',

View File

@ -137,8 +137,20 @@
:value="item.typeId"
:data-key="item.typeId"
>
<!-- <el-tooltip
placement="right"
popper-class="type-tooltip"
:open-delay="300"
>
<div slot="content">
<img src="https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg" style="max-width: 200px; max-height: 150px;" loading="lazy"/>
<p >库存: {{ item.storageNum }}</p>
</div>
<span v-html="highlightText(item.fullPath, searchKeyword)"></span>
<span style="float: right; color: #8492a6; font-size: 13px">库存:{{ item.storageNum }}</span>
</el-tooltip> -->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">库存:{{ item.storageNum }}</span> -->
</el-option>
</el-select>
</el-col>
@ -1163,6 +1175,7 @@ export default {
// downloadFileData({ fileName: file.name,fileUrl:file.url })
}
},
//
highlightText(text, keyword) {
if (!keyword) return text
@ -1405,4 +1418,7 @@ export default {
color: #fff;
font-size: 20px;
}
.type-tooltip {
max-width: none !important;
}
</style>

View File

@ -4,13 +4,15 @@
<svg-icon :icon-class="iconType" class="icon-box" />
{{ cardTitle }}
</div>
<div class="f-count">{{ cardNum }}</div>
<div class="f-14">
<div class="f-count-wrapper">
<div class="f-count">{{ cardNum }}</div>
</div>
<!-- <div class="f-14">
较上月{{ isReduce ? '增高' : '降低' }}{{ ratio }}%
<svg-icon v-if="!isReduce" icon-class="down_arrow" />
<svg-icon v-else icon-class="up_arrow" />
</div>
</div> -->
</div>
</template>
@ -83,7 +85,7 @@ export default {
position: relative;
font-size: 14px;
letter-spacing: 1px;
width:100%;
.icon-box {
font-size: 18px;
position: absolute;
@ -91,12 +93,20 @@ export default {
}
}
.f-count-wrapper {
width: 100%;
display: flex;
justify-content: center; /* 水平居中 */
align-items: flex-end; /* 垂直靠下 */
}
.f-count {
margin: 4px 0;
font-size: 18px;
font-weight: bold;
letter-spacing: 2px;
}
}
.card-model:hover {

View File

@ -222,6 +222,14 @@ export default {
cardNum: 0,
ratio: 0
},
{
title: '修试待入库量',
theme: '#b8741a',
icon: 'repair_store',
isReduce: true,
cardNum: 0,
ratio: 0
},
{
title: '新购待入库量',
theme: '#bfbf00',
@ -230,14 +238,6 @@ export default {
cardNum: 0,
ratio: 0
},
{
title: '修试待入库量',
theme: '#b8741a',
icon: 'repair_store',
isReduce: true,
cardNum: 0,
ratio: 0
}
],
cardList_3: [
{
@ -299,26 +299,26 @@ export default {
const { data: res } = await getCardListApi(queryParams)
const {
demandNum,
demandIncrease,
// demandIncrease,
suppliedQuantityNum,
suppliedQuantityIncrease,
// suppliedQuantityIncrease,
suppliedToBeQuantityNum,
suppliedToBeQuantityIncrease,
// suppliedToBeQuantityIncrease,
projectNum,
suppliedQuantityAllNum,
suppliedQuantityPrice
} = res
this.cardList_1[0].cardNum = demandNum
this.cardList_1[0].ratio = Math.abs(demandIncrease)
demandIncrease > 0 ? (this.cardList_1[0].isReduce = true) : (this.cardList_1[0].isReduce = false)
// this.cardList_1[0].ratio = Math.abs(demandIncrease)
// demandIncrease > 0 ? (this.cardList_1[0].isReduce = true) : (this.cardList_1[0].isReduce = false)
this.cardList_1[1].cardNum = suppliedQuantityNum
this.cardList_1[1].ratio = Math.abs(suppliedQuantityIncrease)
suppliedQuantityIncrease > 0 ? (this.cardList_1[1].isReduce = true) : (this.cardList_1[1].isReduce = false)
// this.cardList_1[1].ratio = Math.abs(suppliedQuantityIncrease)
// suppliedQuantityIncrease > 0 ? (this.cardList_1[1].isReduce = true) : (this.cardList_1[1].isReduce = false)
this.cardList_1[2].cardNum = suppliedToBeQuantityNum
this.cardList_1[2].ratio = Math.abs(suppliedToBeQuantityIncrease)
suppliedToBeQuantityIncrease > 0
? (this.cardList_1[2].isReduce = true)
: (this.cardList_1[2].isReduce = false)
// this.cardList_1[2].ratio = Math.abs(suppliedToBeQuantityIncrease)
// suppliedToBeQuantityIncrease > 0
// ? (this.cardList_1[2].isReduce = true)
// : (this.cardList_1[2].isReduce = false)
this.cardList_3[0].cardNum = projectNum
this.cardList_3[1].cardNum = suppliedQuantityAllNum || 0
this.cardList_3[2].cardNum = suppliedQuantityPrice || 0
@ -327,32 +327,32 @@ export default {
const { data: result } = await getCardList_2Api(queryParams)
const {
inStockNum,
inStockIncrease,
// inStockIncrease,
inUseNum,
inUseIncrease,
// inUseIncrease,
inRepairNum,
inRepairIncrease,
// inRepairIncrease,
newPurchaseNum,
newPurchaseIncrease,
// newPurchaseIncrease,
newRepairNum,
newRepairIncrease
// newRepairIncrease
} = result
this.cardList_2[0].cardNum = inStockNum
this.cardList_2[0].ratio = Math.abs(inStockIncrease)
inStockIncrease > 0 ? (this.cardList_2[0].isReduce = true) : (this.cardList_2[0].isReduce = false)
// this.cardList_2[0].ratio = Math.abs(inStockIncrease)
// inStockIncrease > 0 ? (this.cardList_2[0].isReduce = true) : (this.cardList_2[0].isReduce = false)
this.cardList_2[1].cardNum = inUseNum
this.cardList_2[1].ratio = Math.abs(inUseIncrease)
inUseIncrease > 0 ? (this.cardList_2[1].isReduce = true) : (this.cardList_2[1].isReduce = false)
// this.cardList_2[1].ratio = Math.abs(inUseIncrease)
// inUseIncrease > 0 ? (this.cardList_2[1].isReduce = true) : (this.cardList_2[1].isReduce = false)
this.cardList_2[2].cardNum = inRepairNum
this.cardList_2[2].ratio = Math.abs(inRepairIncrease)
inRepairIncrease > 0 ? (this.cardList_2[2].isReduce = true) : (this.cardList_2[2].isReduce = false)
// this.cardList_2[2].ratio = Math.abs(inRepairIncrease)
// inRepairIncrease > 0 ? (this.cardList_2[2].isReduce = true) : (this.cardList_2[2].isReduce = false)
this.cardList_2[3].cardNum = newPurchaseNum
this.cardList_2[3].ratio = Math.abs(newPurchaseIncrease)
newPurchaseIncrease > 0 ? (this.cardList_2[3].isReduce = true) : (this.cardList_2[3].isReduce = false)
// this.cardList_2[3].ratio = Math.abs(newPurchaseIncrease)
// newPurchaseIncrease > 0 ? (this.cardList_2[3].isReduce = true) : (this.cardList_2[3].isReduce = false)
this.cardList_2[4].cardNum = newRepairNum
this.cardList_2[4].ratio = Math.abs(newRepairIncrease)
newRepairIncrease > 0 ? (this.cardList_2[4].isReduce = true) : (this.cardList_2[4].isReduce = false)
// this.cardList_2[4].ratio = Math.abs(newRepairIncrease)
// newRepairIncrease > 0 ? (this.cardList_2[4].isReduce = true) : (this.cardList_2[4].isReduce = false)
this.pie_2Data = [
{ value: inStockNum, name: '在库量', itemStyle: { color: '#26a8ff' } },
@ -383,7 +383,7 @@ export default {
const { data: pie1 } = await getPie_1DataApi(queryParams)
const { demandNum, suppliedQuantityNum, suppliedToBeQuantityNum } = pie1
this.pie_1Data = [
{ value: demandNum, name: '计划需求量', itemStyle: { color: '#65dfe0' } },
// { value: demandNum, name: '', itemStyle: { color: '#65dfe0' } },
{ value: suppliedQuantityNum, name: '已供应量', itemStyle: { color: '#ff8e9d' } },
{ value: suppliedToBeQuantityNum, name: '待供应量', itemStyle: { color: '#6ccaf6' } }
]

View File

@ -46,6 +46,7 @@
<el-table-column show-overflow-tooltip align="center" prop="scrapNum" label="(退库)报废数量" />
<!-- <el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />-->
<el-table-column show-overflow-tooltip align="center" prop="postStoreNum" label="操作后库存" />
<el-table-column show-overflow-tooltip align="center" prop="creator" label="操作人" />
<el-table-column show-overflow-tooltip align="center" prop="createTime" label="日期" />
<el-table-column align="center" label="状态">
<template slot-scope="{ row }">

View File

@ -58,7 +58,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="deviceList" ref="multipleTable" row-key="teamId">
<el-table v-loading="loading" :data="deviceList" ref="multipleTable" row-key="maId">
<!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true" /> -->
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
@ -70,7 +70,20 @@
<el-table-column label="规格型号" align="center" prop="materialModel" sortable show-overflow-tooltip/>
<el-table-column label="设备编号" align="center" prop="maCode" sortable show-overflow-tooltip/>
<el-table-column label="设备状态" align="center" prop="statusName" sortable show-overflow-tooltip/>
<el-table-column label="固定资产编号" align="center" prop="assetsCode" sortable show-overflow-tooltip/>
<el-table-column label="固定资产编号" align="center" prop="assetsCode" width="200px" sortable show-overflow-tooltip >
<template slot-scope="scope">
<div style="display: flex; align-items: center; justify-content: center;">
<el-input
v-model="scope.row.assetsCode"
placeholder="请输入"
size="small"
style="width: 80%; margin-right: 5px;"
/>
<el-button type="text" icon="el-icon-check" @click="handleAssetsCodeChange(scope.row)"></el-button>
</div>
</template>
</el-table-column>
<el-table-column label="设备原值" align="center" prop="buyPrice" sortable show-overflow-tooltip/>
<el-table-column label="购置批次" align="center" prop="buyTask" sortable show-overflow-tooltip>
<template slot-scope="{ row }">
@ -109,7 +122,7 @@
>
编辑
</el-button>
<el-button
<!-- <el-button
size="mini"
type="text"
icon="el-icon-delete"
@ -117,7 +130,7 @@
v-hasPermi="['ma:machine:remove']"
>
删除
</el-button>
</el-button> -->
</template>
</el-table-column>
</el-table>
@ -270,7 +283,7 @@
<el-option
v-for="keeper in KeeperOptions"
:key="keeper.userId+''"
:label="keeper.userName"
:label="keeper.nickName"
:value="keeper.userId+''"
></el-option>
</el-select>
@ -288,7 +301,7 @@
<el-option
v-for="keeper in repairerOptions"
:key="keeper.userId"
:label="keeper.userName"
:label="keeper.nickName"
:value="keeper.userId+''"
></el-option>
</el-select>
@ -358,7 +371,7 @@
</template>
<script>
import { getListDevice,getDeviceDetail,editDevice,addDevice,delDevice,getDeviceType,getZichanType,getSynchReportCode,synchReport } from "@/api/ma/device";
import { getListDevice,getDeviceDetail,editDevice,addDevice,delDevice,getDeviceType,getZichanType,getSynchReportCode,synchReport,editAssetsCode } from "@/api/ma/device";
import { getKeeperIds} from "@/api/ma/typeConfigKeeper";
import { getRepairIds } from "@/api/ma/typeConfigRepair";
import {
@ -448,6 +461,10 @@
//
form: {
qrCode: "",
keeperArr: [],
repairerArr: [],
keeperNameArr: [],
repairerNameArr: [],
},
//
rules: {
@ -460,8 +477,9 @@
qrCode:"",
qrcodeUrl: '',
KeeperOptions: [],
sortedKeeperOptions: [],
repairerOptions: [],
sortedRepairerOptions: [],
titleSynch: "", //
openSynch: false, //
@ -581,32 +599,67 @@
this.queryParams.pageNum = 1;
this.getList();
},
//
handleAssetsCodeChange(row) {
if (!row.assetsCode) {
this.$message.error('请输入资产编号');
}else{
editAssetsCode(row).then(response => {
this.$message.success('固定资产录入成功');
this.getList();
});
}
},
handleUpdate(row){
this.reset()
const maId = row.maId
getDeviceDetail(maId).then((response) => {
this.form = response.data;
if (response.data.keeperId) {
this.form.keeperArr = response.data.keeperId.split(',');
} else {
this.form.keeperArr = []; //
}
if (response.data.repairId) {
this.form.repairerArr = response.data.repairId.split(',');
} else {
this.form.repairerArr = []; //
}
if (this.form.qrCode) {
this.generateQRCode(this.form.qrCode);
// URL
} else {
this.qrcodeUrl = '';
}
this.showHouse = true
this.title = '修改'
})
},
handleUpdate(row){
this.reset()
const maId = row.maId
getDeviceDetail(maId).then((response) => {
this.form = response.data;
if (response.data.keeperId) {
const keeperIds = response.data.keeperId.split(',');
// keeperIds KeeperOptions keeper
const keepers = keeperIds.map((id) =>
this.KeeperOptions.find((keeper) => keeper.userId + '' === id)
).filter(Boolean); // keeper
// keeperName
keepers.sort((a, b) =>
a.nickName.localeCompare(b.nickName, 'zh-CN')
);
// keeperId
this.form.keeperArr = keepers.map((keeper) => keeper.userId + '');
} else {
this.form.keeperArr = []; //
}
if (response.data.repairId) {
const repairerIds = response.data.repairId.split(',');
// keeperIds KeeperOptions keeper
const repairers = repairerIds.map((id) =>
this.repairerOptions.find((repairer) => repairer.userId + '' === id)
).filter(Boolean); // keeper
// keeperName
repairers.sort((a, b) =>
a.nickName.localeCompare(b.nickName, 'zh-CN')
);
// keeperId
this.form.repairerArr = repairers.map((repairer) => repairer.userId + '');
} else {
this.form.repairerArr = []; //
}
if (this.form.qrCode) {
this.generateQRCode(this.form.qrCode);
// URL
} else {
this.qrcodeUrl = '';
}
this.showHouse = true
this.title = '修改'
})
},
handleView(row){
this.reset()
@ -614,12 +667,36 @@
getDeviceDetail(maId).then((response) => {
this.form = response.data;
if (response.data.keeperId) {
this.form.keeperArr = response.data.keeperId.split(',');
const keeperIds = response.data.keeperId.split(',');
// keeperIds KeeperOptions keeper
const keepers = keeperIds.map((id) =>
this.KeeperOptions.find((keeper) => keeper.userId + '' === id)
).filter(Boolean); // keeper
// keeperName
keepers.sort((a, b) =>
a.nickName.localeCompare(b.nickName, 'zh-CN')
);
// keeperId
this.form.keeperArr = keepers.map((keeper) => keeper.userId + '');
} else {
this.form.keeperArr = []; //
}
if (response.data.repairId) {
this.form.repairerArr = response.data.repairId.split(',');
const repairerIds = response.data.repairId.split(',');
// keeperIds KeeperOptions keeper
const repairers = repairerIds.map((id) =>
this.repairerOptions.find((repairer) => repairer.userId + '' === id)
).filter(Boolean); // keeper
// keeperName
repairers.sort((a, b) =>
a.nickName.localeCompare(b.nickName, 'zh-CN')
);
// keeperId
this.form.repairerArr = repairers.map((repairer) => repairer.userId + '');
} else {
this.form.repairerArr = []; //
}

View File

@ -176,7 +176,7 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="营业执照">
<!-- <el-form-item label="营业执照">
<el-upload
class = "upload-demo"
action="#"
@ -192,7 +192,7 @@
:on-remove="handleRemoveElectricianImgList"
>
<!-- 文件格式下载图片格式预览 -->
<div slot="file" slot-scope="{file}">
<img v-if="isImage(file)" class="el-upload-list__item-thumbnail" :src="file.url" alt="">
<div v-else class="picture-card-container" >
@ -214,7 +214,7 @@
<i class="el-icon-plus avatar-uploader-icon" ></i>
</el-upload>
</el-form-item>
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">

View File

@ -225,11 +225,11 @@
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
width="1300px"
append-to-body
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-row>
<el-col :span="12">
<el-form-item label="仓库信息">
@ -305,6 +305,23 @@
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="管理模式" prop="manageType">
<el-select
v-model="form.manageType"
filterable
placeholder="请选择"
style="width: 100%"
>
<el-option value="0" label="编码管理">编码管理</el-option>
<el-option value="1" label="数量管理">数量管理</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="计量单位" prop="unitName">
<el-input
@ -315,18 +332,6 @@
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="排序" prop="sortNum">
<el-input
v-model.number="form.sortNum"
type="number" :min="0" @input="(v)=>(form.sortNum=v.replace(/[^\d]/g,''))"
placeholder="请输入排序"
maxlength="10"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计量数值" prop="unitValue">
<el-select
@ -344,9 +349,22 @@
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="是否扣税" prop="isCharging">
<el-select
v-model="form.isCharging"
filterable
placeholder="请选择"
style="width: 100%"
>
<el-option value="0" label="扣税">扣税</el-option>
<el-option value="1" label="不扣税">不扣税</el-option>
</el-select>
</el-form-item>
</el-col> -->
</el-row>
<el-row>
<!-- <el-row>
<el-col :span="8">
<el-form-item label="总保有量" prop="name9">
<el-input
@ -416,40 +434,41 @@
/>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<el-row>
<el-col :span="6">
<el-col :span="12">
<el-form-item
label="购置价(元/含税)"
label="内部租赁价(元/天)"
prop="leasePrice"
label-width="140px"
>
<el-input
v-model="form.leasePrice"
placeholder="请输入"
maxlength="20"
type="number" :min="0"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="购置价(元/不含税)"
prop="buyPrice"
label-width="120px"
label-width="140px"
>
<el-input
v-model="form.buyPrice"
placeholder="请输入"
maxlength="20"
type="number" :min="0"
style="width: 170px"
maxlength="20"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="购置价(元/不含税)"
prop="name10"
label-width="130px"
>
<el-input
v-model="form.name10"
placeholder="请输入"
type="number" :min="0"
maxlength="20"
style="width: 160px"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item label="赔偿价(元)" prop="payPrice" label-width="120px">
<el-input
v-model="form.payPrice"
@ -459,44 +478,27 @@
style="width: 170px"
/>
</el-form-item>
</el-col>
<el-col :span="6">
</el-col> -->
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label="外部租赁价(元/天)"
prop="rentPrice"
label-width="120px"
label-width="140px"
>
<el-input
v-model="form.rentPrice"
placeholder="请输入"
maxlength="20"
type="number" :min="0"
style="width: 160px"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item
label="内部租赁价(元/天)"
prop="leasePrice"
label-width="120px"
>
<el-input
v-model="form.leasePrice"
placeholder="请输入"
maxlength="20"
type="number" :min="0"
style="width: 160px"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="是否试验" prop="isTest">
<el-select
v-model="form.isTest"
@ -509,38 +511,21 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="管理模式" prop="manageType">
<el-select
v-model="form.manageType"
filterable
placeholder="请选择"
style="width: 100%"
>
<el-option value="0" label="编码管理">编码管理</el-option>
<el-option value="1" label="数量管理">数量管理</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否扣税" prop="isCharging">
<el-select
v-model="form.isCharging"
filterable
placeholder="请选择"
style="width: 100%"
>
<el-option value="0" label="扣税">扣税</el-option>
<el-option value="1" label="不扣税">不扣税</el-option>
</el-select>
<el-col :span="12">
<el-form-item label="排序" prop="sortNum">
<el-input
v-model.number="form.sortNum"
type="number" :min="0" @input="(v)=>(form.sortNum=v.replace(/[^\d]/g,''))"
placeholder="请输入排序"
maxlength="10"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="检验周期(月)" prop="testCycle">
<el-input
v-model="form.testCycle"
@ -551,56 +536,58 @@
/>
</el-form-item>
</el-col>
<el-col :span="6">
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="抽检比例(%)" prop="samplingRatio">
<el-input
v-model="form.samplingRatio"
type="number" :min="0"
placeholder="请输入"
maxlength="20"
style="width: 170px"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="核定载荷(T/MPa)"
prop="ratedLoad"
>
<el-input
v-model="form.ratedLoad"
placeholder="请输入"
maxlength="20"
style="width: 100%"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item
label="核定载荷(T/MPa)"
prop="ratedLoad"
label-width="120px"
>
<el-input
v-model="form.ratedLoad"
placeholder="请输入"
maxlength="20"
style="width: 160px"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item
label="试验载荷(T/MPa)"
prop="testLoad"
label-width="130px"
>
<el-input
v-model="form.testLoad"
placeholder="请输入"
maxlength="20"
style="width: 160px"
style="width: 100%"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="12">
<el-form-item label="持荷时间(分)" prop="holdingTime">
<el-input
v-model="form.holdingTime"
type="number" :min="0"
placeholder="请输入"
maxlength="20"
style="width: 170px"
style="width: 100%"
/>
</el-form-item>
</el-col>
@ -818,6 +805,34 @@ export default {
trigger: "blur",
},
],
manageType: [
{
required: true,
message: "管理模式不能为空",
trigger: "change",
},
],
unitName: [
{
required: true,
message: "计量单位不能为空",
trigger: "change",
},
],
buyPrice: [
{
required: true,
message: "购置价不能为空",
trigger: "blur",
},
],
leasePrice: [
{
required: true,
message: "内部租赁价不能为空",
trigger: "blur",
},
]
},
companyId: undefined,
dialogImageUrl: "",
@ -1186,38 +1201,18 @@ export default {
this.levelTemp = data.level;
this.idTemp = data.id;
console.log("dataAdd", data);
console.log("idTemp", data);
if (data.level === 3) {
this.reset();
Object.assign(this.form, data);
//
if (this.treeOptions && this.treeOptions[0] && this.treeOptions[0].children) {
this.treeTemp = this.treeOptions[0].children;
//
this.level0TempName = '';
this.level1TempName = '';
this.level2TempName = '';
// 使undefined
this.treeTemp?.forEach((item) => {
item.children?.forEach((itemTemp) => {
if (itemTemp.level == 2 && itemTemp.id == data.parentId) {
this.level2Temp = itemTemp.id;
this.level2TempName = itemTemp.label;
this.level1Temp = itemTemp.parentId;
}
});
});
//
this.treeTemp?.forEach((item) => {
if (item.level == 1 && item.id == this.level1Temp) {
this.level1TempName = item.label;
}
});
this.treeTemp?.forEach((item) => {
if (item.level == 0 && item.id == data.houseId) {
this.level0TempName = item.label;
}
});
//
if (this.treeOptions && this.treeOptions.length > 0) {
this.findLevelInfo(this.treeOptions, data);
}
this.isLevel1Disabled = true;
@ -1238,6 +1233,39 @@ export default {
this.addTitleVisible = true;
}
},
//
findLevelInfo(nodes, targetData) {
for (const node of nodes) {
if (node.level === 0 && node.id === targetData.houseId) {
this.level0TempName = node.label;
}
if (node.level === 2 && node.id === targetData.parentId) {
this.level2TempName = node.label;
// level 1
if (node.parentId !== undefined) {
this.findLevel1Info(this.treeOptions, node.parentId);
}
}
if (node.children && node.children.length > 0) {
this.findLevelInfo(node.children, targetData);
}
}
},
// level 1
findLevel1Info(nodes, parentId) {
for (const node of nodes) {
if (node.level === 1 && node.id === parentId) {
this.level1TempName = node.label;
break;
}
if (node.children && node.children.length > 0) {
this.findLevel1Info(node.children, parentId);
}
}
},
/* 树节点删除 */
removeTreeNode(data) {
// this.$message.success('--')
@ -1386,7 +1414,7 @@ export default {
font-size: 14px;
color: #606266;
font-weight: 500;
line-height: 1.5;
// line-height: 1.5;
}
//

View File

@ -16,6 +16,7 @@
value-format="yyyy-MM-dd hh:mm:ss"
type="date"
placeholder="请选择到货日期"
@change="arrivalTimeChange"
></el-date-picker>
</el-form-item>
<el-form-item label="物资厂家" prop="supplierId">
@ -41,7 +42,8 @@
value-format="yyyy-MM-dd"
type="date"
placeholder="请选择出厂日期"
@change="productionTimeChange"
@change="productionTimeChange"
:picker-options="pickerOptionsForProduction"
></el-date-picker>
</el-form-item>
<el-form-item label="税率" prop="taxRate">
@ -210,7 +212,7 @@
></el-input-number>
</template>
</el-table-column>
<el-table-column label="租赁价(元/天)" prop="rentPrice"
<!-- <el-table-column label="租赁价(元/天)" prop="rentPrice"
align="center" width="150"
>
<template slot-scope="scope">
@ -221,7 +223,7 @@
:min="0" :step="1" :disabled="(scope.row.status!=1&&scope.row.status!=12)||scope.row.rentPriceDisabled"
></el-input-number>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column
label="是否为固定资产"
prop="fixCode"
@ -527,6 +529,20 @@ export default {
return time.getTime() < currentDate.getTime()
}
}
},
//
pickerOptionsForProduction() {
return {
disabledDate: (time) => {
if (this.maForm.arrivalTime) {
const standardFormat = this.maForm.arrivalTime.replace(/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/, '$1-$2-$3T$4:$5:$6')
const arrivalDate = new Date(standardFormat)
arrivalDate.setHours(23, 59, 59, 999)
return time.getTime() >= arrivalDate.getTime()
}
return false
}
}
}
},
watch: {},
@ -536,11 +552,23 @@ export default {
this.taskId = this.editTaskId
this.id = this.editId
this.getTaskInfo()
}else{
this.maForm.arrivalTime = this.formatDate(new Date());
}
this.supplierInfoList()
this.equipmentType()
},
methods: {
//
formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
const hours = String(date.getHours()).padStart(2, '0');
const minutes = String(date.getMinutes()).padStart(2, '0');
const seconds = String(date.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
//
taxRateChange(val){
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
@ -632,7 +660,7 @@ export default {
specificationType: node.typeName,
unitName: node.unitName,
unitValue: node.unitValue,
rentPrice: node.rentPrice,
// rentPrice: node.rentPrice,
})
}
@ -672,11 +700,11 @@ export default {
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected)
} else {
console.log(typeData,"typeData")
if(typeData.rentPrice>0){//;;
typeData.rentPriceDisabled=true
}else{
typeData.rentPriceDisabled=false
}
// if(typeData.rentPrice>0){//;;
// typeData.rentPriceDisabled=true
// }else{
// typeData.rentPriceDisabled=false
// }
//
this.equipmentList.unshift({
...typeData,
@ -749,11 +777,11 @@ export default {
obj.fixCode = '0'
obj.status=1
obj.bmFileInfos=[]
if(obj.rentPrice>0){//;;
obj.rentPriceDisabled=true
}else{
obj.rentPriceDisabled=false
}
// if(obj.rentPrice>0){//;;
// obj.rentPriceDisabled=true
// }else{
// obj.rentPriceDisabled=false
// }
tempList.push(obj)
break
}
@ -781,6 +809,16 @@ export default {
this.equipmentList = []
}
},
//
arrivalTimeChange(val){
this.maForm.productionTime = '';
//
this.equipmentList.forEach(item => {
if (item.status === 1 || item.status === 12) {
item.productionTime = '';
}
});
},
//
productionTimeChange(val){
this.equipmentList.forEach(item=>{
@ -824,13 +862,15 @@ export default {
if (valid) {
this.maForm.taskId = this.taskId
let index =this.equipmentList.findIndex(item=>item.purchaseNum==0)
let index1 =this.equipmentList.findIndex(item=>item.rentPrice==0)
// let index1 =this.equipmentList.findIndex(item=>item.rentPrice==0)
let index2 =this.equipmentList.findIndex(item=>item.purchaseTaxPrice==0)
if(index>-1){
this.$modal.msgError('采购数量不能为0')
}else if(index1>-1){
this.$modal.msgError('租赁价格不能为0')
}else if(index2>-1){
}
// else if(index1>-1){
// this.$modal.msgError('0')
// }
else if(index2>-1){
this.$modal.msgError('购置单价(含税)不能为0')
}else{
this.$modal.confirm('是否确认保存当前页面').then(function () {})

View File

@ -123,7 +123,7 @@
>
入库
</el-button>
<el-button size="mini" type="warning" @click="handlePrint(scope.row)">入库单</el-button>
<el-button size="mini" type="warning" v-if="scope.row.inputMaNumber!=0" @click="handlePrint(scope.row)">入库单</el-button>
</template>
</el-table-column>
</el-table>

View File

@ -49,9 +49,42 @@
</span>
</template>
</el-table-column>
<el-table-column label="验收合格数量" align="center" prop="passNum" :show-overflow-tooltip="true"/>
<el-table-column label="入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true"/>
<el-table-column label="待入库数量" align="center" prop="pendingInputNum" :show-overflow-tooltip="true"/>
<el-table-column label="验收合格数量" align="center" prop="passNum" :show-overflow-tooltip="true">
<template scope="scope">
<!-- manageType '编码' 使用可点击的 span -->
<span class="clickText" v-if="scope.row.manageType=='0'" @click="openAcceptRecords(scope.row)">
{{ scope.row.passNum }}
</span>
<!-- 否则直接显示数字 -->
<span v-else>
{{ scope.row.passNum }}
</span>
</template>
</el-table-column>
<el-table-column label="入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true">
<template scope="scope">
<!-- manageType '编码' 使用可点击的 span -->
<span class="clickText" v-if="scope.row.manageType=='0'" @click="openInBoundRecords(scope.row)">
{{ scope.row.inputNum }}
</span>
<!-- 否则直接显示数字 -->
<span v-else>
{{ scope.row.inputNum }}
</span>
</template>
</el-table-column>
<el-table-column label="待入库数量" align="center" prop="pendingInputNum" :show-overflow-tooltip="true">
<template scope="scope">
<!-- manageType '编码' 使用可点击的 span -->
<span class="clickText" v-if="scope.row.manageType=='0'" @click="openWaitRecords(scope.row)">
{{ scope.row.pendingInputNum }}
</span>
<!-- 否则直接显示数字 -->
<span v-else>
{{ scope.row.pendingInputNum }}
</span>
</template>
</el-table-column>
<el-table-column label="采购价格(含税)" align="center" prop="purchasePrice" :show-overflow-tooltip="true"/>
<el-table-column label="采购价格(不含税)" align="center" prop="purchasePriceNoTax" :show-overflow-tooltip="true"/>
<el-table-column label="物资厂家" align="center" prop="supplierName" :show-overflow-tooltip="true"/>
@ -70,7 +103,7 @@
@pagination="getList"
/>
<!-- 弹窗 -->
<!-- 采购数量弹窗 -->
<el-dialog :title="title" :visible.sync="openRecord" width="1200px" append-to-body>
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="80px">
<el-form-item label="关键字" prop="keyWord">
@ -120,6 +153,159 @@
@pagination="getDialogDataList"
/>
</el-dialog>
<!-- 验收合格数量弹窗 -->
<el-dialog :title="title" :visible.sync="openAcceptRecord" width="1200px" append-to-body>
<el-form :model="dialogAcceptQuery" ref="dialogAcceptQuery" size="small" :inline="true" label-width="80px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="dialogAcceptQuery.keyWord"
placeholder="请输入关键字"
clearable :maxlength="30"
style="width: 240px"/>
</el-form-item>
<el-form-item>
<el-button type="primary"
icon="el-icon-search" size="mini"
@click="handleDialogQuery"
>查询</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
>重置</el-button>
</el-form-item>
<el-form-item>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleDialogExport"
>导出</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dialogAcceptList" height="500px">
<el-table-column label="序号" align="center" width="80" type="index" :index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)">
</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="name1" :show-overflow-tooltip="true"/>
<el-table-column label="验收时间" align="center" prop="name2" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="dialogTotal > 0"
:total="dialogTotal"
:page.sync="dialogAcceptQuery.pageNum"
:limit.sync="dialogAcceptQuery.pageSize"
@pagination="getDialogAcceptDataList"
/>
</el-dialog>
<!-- 入库数量弹窗 -->
<el-dialog :title="title" :visible.sync="openInBoundRecord" width="1200px" append-to-body>
<el-form :model="dialogInBoundQuery" ref="dialogInBoundQuery" size="small" :inline="true" label-width="80px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="dialogInBoundQuery.keyWord"
placeholder="请输入关键字"
clearable :maxlength="30"
style="width: 240px"/>
</el-form-item>
<el-form-item>
<el-button type="primary"
icon="el-icon-search" size="mini"
@click="handleDialogQuery"
>查询</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
>重置</el-button>
</el-form-item>
<el-form-item>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleDialogExport"
>导出</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dialogInBoundList" height="500px">
<el-table-column label="序号" align="center" width="80" type="index" :index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)">
</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="name1" :show-overflow-tooltip="true"/>
<el-table-column label="入库时间" align="center" prop="name2" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="dialogTotal > 0"
:total="dialogTotal"
:page.sync="dialogInBoundQuery.pageNum"
:limit.sync="dialogInBoundQuery.pageSize"
@pagination="getDialogInBoundDataList"
/>
</el-dialog>
<!-- 待入库数量弹窗 -->
<el-dialog :title="title" :visible.sync="openWaitRecord" width="1200px" append-to-body>
<el-form :model="dialogWaitQuery" ref="dialogWaitQuery" size="small" :inline="true" label-width="80px">
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="dialogWaitQuery.keyWord"
placeholder="请输入关键字"
clearable :maxlength="30"
style="width: 240px"/>
</el-form-item>
<el-form-item>
<el-button type="primary"
icon="el-icon-search" size="mini"
@click="handleDialogQuery"
>查询</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
>重置</el-button>
</el-form-item>
<el-form-item>
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleDialogExport"
>导出</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dialogWaitList" height="500px">
<el-table-column label="序号" align="center" width="80" type="index" :index="indexContinuation(dialogQuery.pageNum, dialogQuery.pageSize)">
</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="purchasePrice" :show-overflow-tooltip="true"/>
<el-table-column label="采购价格(不含税)" align="center" prop="purchasePriceNoTax" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="dialogTotal > 0"
:total="dialogTotal"
:page.sync="dialogWaitQuery.pageNum"
:limit.sync="dialogWaitQuery.pageSize"
@pagination="getDialogWaitDataList"
/>
</el-dialog>
</div>
</template>
@ -154,12 +340,33 @@
title: "",
//
openRecord: false,
openAcceptRecord: false,
openInBoundRecord: false,
openWaitRecord: false,
dialogList: [], //
dialogAcceptList: [], //
dialogInBoundList: [], //
dialogWaitList: [], //
dialogQuery: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
},
dialogAcceptQuery: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
},
dialogInBoundQuery: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
},
dialogWaitQuery: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
},
dialogTotal: 0,
};
},
@ -248,13 +455,57 @@
this.dialogQuery.typeId = row.typeId;
this.getDialogDataList()
},
/** 查询弹框列表 */
//
openAcceptRecords(row) {
this.openAcceptRecord = true
this.dialogAcceptQuery.keyWord = ""
this.dialogAcceptQuery.taskId = row.taskId;
this.dialogAcceptQuery.typeId = row.typeId;
this.getDialogAcceptDataList()
},
//
openInBoundRecords(row) {
this.openInBoundRecord = true
this.dialogInBoundQuery.keyWord = ""
this.dialogInBoundQuery.taskId = row.taskId;
this.dialogInBoundQuery.typeId = row.typeId;
this.getDialogInBoundDataList()
},
//
openWaitRecords(row) {
this.openWaitRecord = true
this.dialogWaitQuery.keyWord = ""
this.dialogWaitQuery.taskId = row.taskId;
this.getDialogWaitDataList()
},
/** 查询采购数量弹框列表 */
getDialogDataList() {
getPurChaseReportDetailsListApi(this.dialogQuery).then((response) => {
this.dialogList = response.data.rows
this.dialogTotal = response.data.total
})
},
/** 查询验收合格数量弹框列表 */
getDialogAcceptDataList() {
getPurChaseReportDetailsListApi(this.dialogAcceptQuery).then((response) => {
this.dialogAcceptList = response.data.rows
this.dialogTotal = response.data.total
})
},
/** 查询入库数量弹框列表 */
getDialogInBoundDataList() {
getPurChaseReportDetailsListApi(this.dialogInBoundQuery).then((response) => {
this.dialogInBoundList = response.data.rows
this.dialogTotal = response.data.total
})
},
/** 查询待入库数量弹框列表 */
getDialogWaitDataList() {
getPurChaseReportDetailsListApi(this.dialogWaitQuery).then((response) => {
this.dialogWaitList = response.data.rows
this.dialogTotal = response.data.total
})
},
/** 弹框搜索操作 */
handleDialogQuery() {
this.dialogQuery.pageNum = 1