bug修复
This commit is contained in:
parent
18d9b5c0b0
commit
92ef22e9d2
|
|
@ -210,6 +210,7 @@
|
|||
min="1"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="scope.row.deviceAscription === '主体设备'"
|
||||
/>
|
||||
<span v-else>{{ scope.row.preNum }}</span>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -613,6 +613,7 @@ export default {
|
|||
this.getData(taskData.taskId)
|
||||
})
|
||||
.finally(() => {
|
||||
this.$emit('goBackPage')
|
||||
// 刷新页面
|
||||
// window.location.reload()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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="单位"
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue