bug修复

This commit is contained in:
hongchao 2025-06-17 11:21:39 +08:00
parent 18d9b5c0b0
commit 92ef22e9d2
10 changed files with 79 additions and 16 deletions

View File

@ -210,6 +210,7 @@
min="1"
clearable
style="width: 100%"
:disabled="scope.row.deviceAscription === '主体设备'"
/>
<span v-else>{{ scope.row.preNum }}</span>
</template>

View File

@ -613,6 +613,7 @@ export default {
this.getData(taskData.taskId)
})
.finally(() => {
this.$emit('goBackPage')
//
// window.location.reload()
})

View File

@ -357,11 +357,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
'material/base/backReceive/export',
'material/backApply/exportCt',
{
...this.queryParams,
},
`退料接收_${new Date().getTime()}.xlsx`,
`成套设备退料接收_${new Date().getTime()}.xlsx`,
)
},
},

View File

@ -257,6 +257,13 @@
:on-success="(res, file, fileList) => handleSuccess(res, file, fileList, scope.row)"
>
<el-button :disabled="isView" size="mini" type="text">点击上传</el-button>
<template v-if="isView" #file="{ file }">
<div class="el-upload-list__item">
<a class="el-upload-list__item-name" @click="handlePreview(file)">
<i class="el-icon-document"></i>{{ file.name }}
</a>
</div>
</template>
</el-upload>
</template>
</el-table-column>

View File

@ -106,7 +106,6 @@
<el-table-column label="状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope">
<span v-if="scope.row.taskStatus == 3">待提交</span>
<span v-if="scope.row.taskStatus == 0">进行中</span>
<span v-if="scope.row.taskStatus == 1">已通过</span>
<span v-if="scope.row.taskStatus == 2">已驳回</span>
</template>

View File

@ -7,6 +7,7 @@
:visible.sync="dialogShowFlag"
append-to-body
width="600px"
center
>
<div class="form_box_one">
<div style="font-size: 16px;">总金额{{ totalPrice }}</div>
@ -83,7 +84,7 @@
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
validator: numberIntegerValidatorPart,
trigger: 'blur',
}"
>
@ -333,7 +334,7 @@
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
validator: numberIntegerValidatorPart,
trigger: 'blur',
}"
>
@ -669,6 +670,20 @@ export default {
callback()
}
},
numberIntegerValidatorPart(rule, value, callback) {
//
if (value === '') {
callback();
return;
}
const reg = /^(0|[1-9]\d*)$/; // 0
if (reg.test(value)) {
callback();
} else {
callback(new Error('请输入正整数或 0'));
}
},
getTree() {
listPartType().then((response) => {
this.deptList = this.handleTree(response.data, 'paId')
@ -733,6 +748,13 @@ export default {
this.dynamicValidateFormTwo.premiumListTwo = [];
},
addDomainOne() {
const formatDate = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
};
// partId
// partType
// partNum
@ -753,7 +775,7 @@ export default {
fileList: [],
partChange: '',
partChangeNum: '',
updateTime: new Date(),
updateTime: formatDate(new Date()),
};
this.dynamicValidateForm.premiumList.push(newDomain);
},
@ -769,6 +791,12 @@ export default {
}
},
addDomainTwo() {
const formatDate = (date) => {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
};
const newDomain = {
selected: 'N',
// partId: '',
@ -783,7 +811,7 @@ export default {
fileList: [],
partChange: '',
partChangeNum: '',
updateTime: new Date(),
updateTime: formatDate(new Date()),
};
this.dynamicValidateFormTwo.premiumListTwo.push(newDomain);
},

View File

@ -105,7 +105,7 @@
label="配件数量:"
:rules="{
required: false,
// validator: numberIntegerValidator,
validator: numberIntegerValidatorPart,
trigger: 'blur',
}"
>
@ -289,10 +289,11 @@
></el-input>
</el-form-item> -->
<el-form-item
:prop="'premiumListTwo.' + index + '.partNum'"
label="配件数量:"
:rules="{
required: false,
validator: numberIntegerValidator,
validator: numberIntegerValidatorPart,
trigger: 'blur',
}"
>
@ -513,6 +514,19 @@ export default {
callback(new Error('请输入大于0的并且小于维修总量的正整数'))
}
},
numberIntegerValidatorPart(rule, value, callback) {
//
if (value === '') {
callback();
return;
}
const reg = /^(0|[1-9]\d*)$/; // 0
if (reg.test(value)) {
callback();
} else {
callback(new Error('请输入正整数或 0'));
}
},
getTree() {
listPartType().then((response) => {
this.deptList = this.handleTree(response.data, 'paId')

View File

@ -100,7 +100,6 @@
<el-form-item label="成套设备" prop="mainDevice" class="is-required">
<el-cascader
clearable
filterable
ref="mainDeviceRef"
@change="selMainDevice"
:show-all-levels="false"
@ -143,6 +142,7 @@
placeholder="请输入数量"
@change="deviceNumChange(row)"
maxlength="9"
:disabled="row.deviceAscription === '抱杆设备'"
/>
</template>
</el-table-column>
@ -412,7 +412,7 @@ export default {
const mainDeviceObj = {
deviceType: checkNode[0].label, //
deviceTypeId: val[val.length - 1], // Id
deviceNum: '', //
deviceNum: 1, //
deviceAscription: '抱杆设备', //
ascriptionType: 1, // 1 2
typeName: this.deviceName,
@ -444,7 +444,6 @@ export default {
this.$message.closeAll()
const checkNode = this.$refs['assortDeviceRef'].getCheckedNodes()
this.recursionGetDeviceName(this.deviceTypeTreeNew, val[val.length - 2])
if (checkNode.length < 1) return
const assortDeviceObj = {
@ -456,6 +455,11 @@ export default {
typeName: this.deviceName,
isStorage: checkNode[0].data.isStorage,
}
//
if (assortDeviceObj.isStorage == 1) {
this.$message.error('该设备因关联库存无法添加,请先修改该设备')
return
}
//
if (this.tempList.length > 0 && this.tempList[0].deviceTypeId === assortDeviceObj.deviceTypeId) {

View File

@ -111,6 +111,7 @@
align="center"
prop="code"
:show-overflow-tooltip="true"
width="180px"
/>
<el-table-column
label="机具名称"
@ -123,6 +124,7 @@
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
width="180px"
/>
<el-table-column
label="单位"

View File

@ -282,7 +282,7 @@
<el-form ref="aform" :model="aform" label-width="120px">
<el-form-item label="附件图片" prop="fileListNew">
<UploadImg
:actionUrl="actionUrl"
:actionUrl="actionUrlPic"
:limit="5"
:file-list="aform.fileListNew"
@remove="onHandleRemoveNew"
@ -355,6 +355,7 @@ export default {
},
data() {
return {
actionUrlPic: process.env.VUE_APP_BASE_API + '/system/sys/file/upload',
actionUrl: process.env.VUE_APP_BASE_API + '/material/purchaseCheckInfo/importData',
headers: {
Authorization: 'Bearer ' + localStorage.getItem('token'),
@ -889,10 +890,16 @@ export default {
fileUrl += e.fileUrl + ','
fileName += e.fileName + ','
})
this.equipmentList[this.currentIndex].checkUrl = fileUrl.substring(fileUrl.length - 1, ',')
this.equipmentList[this.currentIndex].fileList = this.aform.fileListNew
this.equipmentList[this.currentIndex].checkUrlName = fileName.substring(fileName.length - 1, ',')
//
fileUrl = fileUrl.slice(0, -1)
fileName = fileName.slice(0, -1)
// 使 $set Vue
this.$set(this.equipmentList[this.currentIndex], 'checkUrl', fileUrl)
this.$set(this.equipmentList[this.currentIndex], 'fileList', this.aform.fileListNew)
this.$set(this.equipmentList[this.currentIndex], 'checkUrlName', fileName)
this.fileUploadDialog = false
console.log("xxxxxxxxxxxxxxxx",this.equipmentList[this.currentIndex].fileList)
},
onChangeSupplier(val) {
this.equipmentList.forEach((item) => {