Browse Source

完善维修单

zhanglei
yunuo970428 3 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> <i class="add-btn-icon el-icon-plus" style="color: red;font-size:20px" @click="serviceAdd(scope.row)"></i>
</template> </template>
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="维修项目" align="center" width="200"> <el-table-column label="维修项目" align="center" width="200">
@ -472,6 +472,7 @@
name="file" name="file"
:action="updateAction" :action="updateAction"
:limit="10" :limit="10"
:on-preview="handlePreview"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-remove="handleRemove" :on-remove="handleRemove"
:headers="headers" :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) this.formobj.sitemVos.splice(index, 1)
}, },
serviceCurrentChange(value, row) { serviceCurrentChange(value, row) {
@ -1416,6 +1425,9 @@ export default {
}) })
} }
}, },
handlePreview(file, fileList) {
window.open(file.url, '_blank')
},
handleRemove(file, fileList) { handleRemove(file, fileList) {
if (this.formobj.fileName.length > 0) { if (this.formobj.fileName.length > 0) {
this.formobj.fileName.forEach((e, index) => { this.formobj.fileName.forEach((e, index) => {
@ -1671,6 +1683,7 @@ export default {
} }
this.serviceData = [] this.serviceData = []
this.subjoinData = [] this.subjoinData = []
this.fileList = []
this.activeNames = '1' this.activeNames = '1'
this.submitdisabled = false this.submitdisabled = false
this.$emit('doback') this.$emit('doback')

Loading…
Cancel
Save