Browse Source

完善维修单

master
yunuo970428 2 months ago
parent
commit
bd118b32eb
  1. 17
      yxt-as-ui/src/views/operation/repairbill/repairbillAdd.vue

17
yxt-as-ui/src/views/operation/repairbill/repairbillAdd.vue

@ -328,7 +328,7 @@
<i class="add-btn-icon el-icon-plus" style="color: red;font-size:20px" @click="serviceAdd(scope.row)"></i>
</template>
<template slot-scope="scope">
<i class="el-icon-delete" @click="serviceDelete(scope.$index)"></i>
<i class="el-icon-delete" @click="serviceDelete(scope.row.serviceItem, scope.$index)"></i>
</template>
</el-table-column>
<el-table-column label="维修项目" align="center" width="200">
@ -472,6 +472,7 @@
name="file"
:action="updateAction"
:limit="10"
:on-preview="handlePreview"
:on-success="handleSuccess"
:on-remove="handleRemove"
:headers="headers"
@ -1254,7 +1255,15 @@ export default {
}
})
},
serviceDelete(index) {
serviceDelete(value, index) {
if (this.formobj.goodsDetailsVos.length > 0) {
for (var i = 0; i < this.formobj.goodsDetailsVos.length; i++) {
if (this.formobj.goodsDetailsVos[i].serviceItem === value) {
this.$message({ showClose: true, type: 'error', message: '因维修用料表中包含该维修项目,无法删除' })
return
}
}
}
this.formobj.sitemVos.splice(index, 1)
},
serviceCurrentChange(value, row) {
@ -1416,6 +1425,9 @@ export default {
})
}
},
handlePreview(file, fileList) {
window.open(file.url, '_blank')
},
handleRemove(file, fileList) {
if (this.formobj.fileName.length > 0) {
this.formobj.fileName.forEach((e, index) => {
@ -1671,6 +1683,7 @@ export default {
}
this.serviceData = []
this.subjoinData = []
this.fileList = []
this.activeNames = '1'
this.submitdisabled = false
this.$emit('doback')

Loading…
Cancel
Save