bug修复
This commit is contained in:
parent
18d9b5c0b0
commit
92ef22e9d2
|
|
@ -210,6 +210,7 @@
|
||||||
min="1"
|
min="1"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
:disabled="scope.row.deviceAscription === '主体设备'"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ scope.row.preNum }}</span>
|
<span v-else>{{ scope.row.preNum }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -613,6 +613,7 @@ export default {
|
||||||
this.getData(taskData.taskId)
|
this.getData(taskData.taskId)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
this.$emit('goBackPage')
|
||||||
// 刷新页面
|
// 刷新页面
|
||||||
// window.location.reload()
|
// window.location.reload()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -357,11 +357,11 @@ export default {
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download(
|
this.download(
|
||||||
'material/base/backReceive/export',
|
'material/backApply/exportCt',
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
...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)"
|
:on-success="(res, file, fileList) => handleSuccess(res, file, fileList, scope.row)"
|
||||||
>
|
>
|
||||||
<el-button :disabled="isView" size="mini" type="text">点击上传</el-button>
|
<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>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,6 @@
|
||||||
<el-table-column label="状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" width="150">
|
<el-table-column label="状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.taskStatus == 3">待提交</span>
|
<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 == 1">已通过</span>
|
||||||
<span v-if="scope.row.taskStatus == 2">已驳回</span>
|
<span v-if="scope.row.taskStatus == 2">已驳回</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
:visible.sync="dialogShowFlag"
|
:visible.sync="dialogShowFlag"
|
||||||
append-to-body
|
append-to-body
|
||||||
width="600px"
|
width="600px"
|
||||||
|
center
|
||||||
>
|
>
|
||||||
<div class="form_box_one">
|
<div class="form_box_one">
|
||||||
<div style="font-size: 16px;">总金额(元):{{ totalPrice }}</div>
|
<div style="font-size: 16px;">总金额(元):{{ totalPrice }}</div>
|
||||||
|
|
@ -83,7 +84,7 @@
|
||||||
label="配件数量:"
|
label="配件数量:"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: false,
|
required: false,
|
||||||
validator: numberIntegerValidator,
|
validator: numberIntegerValidatorPart,
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
@ -333,7 +334,7 @@
|
||||||
label="配件数量:"
|
label="配件数量:"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: false,
|
required: false,
|
||||||
validator: numberIntegerValidator,
|
validator: numberIntegerValidatorPart,
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
@ -669,6 +670,20 @@ export default {
|
||||||
callback()
|
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() {
|
getTree() {
|
||||||
listPartType().then((response) => {
|
listPartType().then((response) => {
|
||||||
this.deptList = this.handleTree(response.data, 'paId')
|
this.deptList = this.handleTree(response.data, 'paId')
|
||||||
|
|
@ -733,6 +748,13 @@ export default {
|
||||||
this.dynamicValidateFormTwo.premiumListTwo = [];
|
this.dynamicValidateFormTwo.premiumListTwo = [];
|
||||||
},
|
},
|
||||||
addDomainOne() {
|
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
|
// 选择配件 partId
|
||||||
// 是否收费 partType
|
// 是否收费 partType
|
||||||
// 配件数量 partNum
|
// 配件数量 partNum
|
||||||
|
|
@ -753,7 +775,7 @@ export default {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
partChange: '',
|
partChange: '',
|
||||||
partChangeNum: '',
|
partChangeNum: '',
|
||||||
updateTime: new Date(),
|
updateTime: formatDate(new Date()),
|
||||||
};
|
};
|
||||||
this.dynamicValidateForm.premiumList.push(newDomain);
|
this.dynamicValidateForm.premiumList.push(newDomain);
|
||||||
},
|
},
|
||||||
|
|
@ -769,6 +791,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addDomainTwo() {
|
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 = {
|
const newDomain = {
|
||||||
selected: 'N',
|
selected: 'N',
|
||||||
// partId: '',
|
// partId: '',
|
||||||
|
|
@ -783,7 +811,7 @@ export default {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
partChange: '',
|
partChange: '',
|
||||||
partChangeNum: '',
|
partChangeNum: '',
|
||||||
updateTime: new Date(),
|
updateTime: formatDate(new Date()),
|
||||||
};
|
};
|
||||||
this.dynamicValidateFormTwo.premiumListTwo.push(newDomain);
|
this.dynamicValidateFormTwo.premiumListTwo.push(newDomain);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@
|
||||||
label="配件数量:"
|
label="配件数量:"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: false,
|
required: false,
|
||||||
// validator: numberIntegerValidator,
|
validator: numberIntegerValidatorPart,
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
@ -289,10 +289,11 @@
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
|
:prop="'premiumListTwo.' + index + '.partNum'"
|
||||||
label="配件数量:"
|
label="配件数量:"
|
||||||
:rules="{
|
:rules="{
|
||||||
required: false,
|
required: false,
|
||||||
validator: numberIntegerValidator,
|
validator: numberIntegerValidatorPart,
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
@ -513,6 +514,19 @@ export default {
|
||||||
callback(new Error('请输入大于0的并且小于维修总量的正整数'))
|
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() {
|
getTree() {
|
||||||
listPartType().then((response) => {
|
listPartType().then((response) => {
|
||||||
this.deptList = this.handleTree(response.data, 'paId')
|
this.deptList = this.handleTree(response.data, 'paId')
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@
|
||||||
<el-form-item label="成套设备" prop="mainDevice" class="is-required">
|
<el-form-item label="成套设备" prop="mainDevice" class="is-required">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
clearable
|
clearable
|
||||||
filterable
|
|
||||||
ref="mainDeviceRef"
|
ref="mainDeviceRef"
|
||||||
@change="selMainDevice"
|
@change="selMainDevice"
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
|
|
@ -143,6 +142,7 @@
|
||||||
placeholder="请输入数量"
|
placeholder="请输入数量"
|
||||||
@change="deviceNumChange(row)"
|
@change="deviceNumChange(row)"
|
||||||
maxlength="9"
|
maxlength="9"
|
||||||
|
:disabled="row.deviceAscription === '抱杆设备'"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -412,7 +412,7 @@ export default {
|
||||||
const mainDeviceObj = {
|
const mainDeviceObj = {
|
||||||
deviceType: checkNode[0].label, // 设备型号
|
deviceType: checkNode[0].label, // 设备型号
|
||||||
deviceTypeId: val[val.length - 1], // 设备Id
|
deviceTypeId: val[val.length - 1], // 设备Id
|
||||||
deviceNum: '', // 数量
|
deviceNum: 1, // 数量
|
||||||
deviceAscription: '抱杆设备', // 所属类型
|
deviceAscription: '抱杆设备', // 所属类型
|
||||||
ascriptionType: 1, // 所属类型 1 主体设备 2 配套设备
|
ascriptionType: 1, // 所属类型 1 主体设备 2 配套设备
|
||||||
typeName: this.deviceName,
|
typeName: this.deviceName,
|
||||||
|
|
@ -444,7 +444,6 @@ export default {
|
||||||
this.$message.closeAll()
|
this.$message.closeAll()
|
||||||
const checkNode = this.$refs['assortDeviceRef'].getCheckedNodes()
|
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
|
if (checkNode.length < 1) return
|
||||||
|
|
||||||
const assortDeviceObj = {
|
const assortDeviceObj = {
|
||||||
|
|
@ -456,6 +455,11 @@ export default {
|
||||||
typeName: this.deviceName,
|
typeName: this.deviceName,
|
||||||
isStorage: checkNode[0].data.isStorage,
|
isStorage: checkNode[0].data.isStorage,
|
||||||
}
|
}
|
||||||
|
// 判断设备是否关联库存
|
||||||
|
if (assortDeviceObj.isStorage == 1) {
|
||||||
|
this.$message.error('该设备因关联库存无法添加,请先修改该设备')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 先判断当前所选的配套设备是否已选择为主体设备
|
// 先判断当前所选的配套设备是否已选择为主体设备
|
||||||
if (this.tempList.length > 0 && this.tempList[0].deviceTypeId === assortDeviceObj.deviceTypeId) {
|
if (this.tempList.length > 0 && this.tempList[0].deviceTypeId === assortDeviceObj.deviceTypeId) {
|
||||||
|
|
|
||||||
|
|
@ -111,6 +111,7 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop="code"
|
prop="code"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="机具名称"
|
label="机具名称"
|
||||||
|
|
@ -123,6 +124,7 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop="typeModelName"
|
prop="typeModelName"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
|
width="180px"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="单位"
|
label="单位"
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@
|
||||||
<el-form ref="aform" :model="aform" label-width="120px">
|
<el-form ref="aform" :model="aform" label-width="120px">
|
||||||
<el-form-item label="附件图片" prop="fileListNew">
|
<el-form-item label="附件图片" prop="fileListNew">
|
||||||
<UploadImg
|
<UploadImg
|
||||||
:actionUrl="actionUrl"
|
:actionUrl="actionUrlPic"
|
||||||
:limit="5"
|
:limit="5"
|
||||||
:file-list="aform.fileListNew"
|
:file-list="aform.fileListNew"
|
||||||
@remove="onHandleRemoveNew"
|
@remove="onHandleRemoveNew"
|
||||||
|
|
@ -355,6 +355,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
actionUrlPic: process.env.VUE_APP_BASE_API + '/system/sys/file/upload',
|
||||||
actionUrl: process.env.VUE_APP_BASE_API + '/material/purchaseCheckInfo/importData',
|
actionUrl: process.env.VUE_APP_BASE_API + '/material/purchaseCheckInfo/importData',
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: 'Bearer ' + localStorage.getItem('token'),
|
Authorization: 'Bearer ' + localStorage.getItem('token'),
|
||||||
|
|
@ -889,10 +890,16 @@ export default {
|
||||||
fileUrl += e.fileUrl + ','
|
fileUrl += e.fileUrl + ','
|
||||||
fileName += e.fileName + ','
|
fileName += e.fileName + ','
|
||||||
})
|
})
|
||||||
this.equipmentList[this.currentIndex].checkUrl = fileUrl.substring(fileUrl.length - 1, ',')
|
// 去掉字符串末尾多余的逗号
|
||||||
this.equipmentList[this.currentIndex].fileList = this.aform.fileListNew
|
fileUrl = fileUrl.slice(0, -1)
|
||||||
this.equipmentList[this.currentIndex].checkUrlName = fileName.substring(fileName.length - 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
|
this.fileUploadDialog = false
|
||||||
|
console.log("xxxxxxxxxxxxxxxx",this.equipmentList[this.currentIndex].fileList)
|
||||||
},
|
},
|
||||||
onChangeSupplier(val) {
|
onChangeSupplier(val) {
|
||||||
this.equipmentList.forEach((item) => {
|
this.equipmentList.forEach((item) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue