|
@@ -231,8 +231,8 @@
|
|
|
<vxe-table-column title="操作" width="300">
|
|
|
<template v-slot="scope">
|
|
|
<el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'detail')">删除</el-button>
|
|
|
- <el-button size="mini" type="primary" @click="sss(scope.$rowIndex)">上传附件</el-button>
|
|
|
- <el-button size="mini" type="primary" v-if="method==='view'" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="sss2(scope.$rowIndex)">上传附件</el-button>
|
|
|
+ <el-button size="mini" type="primary" v-if="method==='view'" :disabled="false" @click="seeFileInfo2(scope.$rowIndex)">查看文件详情</el-button>
|
|
|
<!-- <el-button size="mini" v-if="formReadOnly" :disabled="false" type="primary" @click="seeFileInfo(scope.$rowIndex)">查看文件详情</el-button>-->
|
|
|
</template>
|
|
|
</vxe-table-column>
|
|
@@ -540,12 +540,24 @@
|
|
|
return footerData
|
|
|
},
|
|
|
seeFileInfo (index) {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
|
|
|
+ this.inputForm.detailInfos[index].fileInfoLost = []
|
|
|
+ }
|
|
|
+ this.$refs.materialManagementDialog.newUpload('view', this.inputForm.detailInfos[index].fileInfoLost, null, null, null, null, null, false, index)
|
|
|
+ },
|
|
|
+ sss (index) {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos[index].fileInfoLost)) {
|
|
|
+ this.inputForm.detailInfos[index].fileInfoLost = []
|
|
|
+ }
|
|
|
+ this.$refs.materialManagementDialog.newUpload(null, this.inputForm.wareHouse[index].fileInfoLost, null, null, null, null, null, false, index)
|
|
|
+ },
|
|
|
+ seeFileInfo2 (index) {
|
|
|
if (this.commonJS.isEmpty(this.inputForm.wareHouse[index].fileInfoLost)) {
|
|
|
this.inputForm.wareHouse[index].fileInfoLost = []
|
|
|
}
|
|
|
this.$refs.materialManagementDialog.newUpload('view', this.inputForm.wareHouse[index].fileInfoLost, null, null, null, null, null, false, index)
|
|
|
},
|
|
|
- sss (index) {
|
|
|
+ sss2 (index) {
|
|
|
if (this.commonJS.isEmpty(this.inputForm.wareHouse[index].fileInfoLost)) {
|
|
|
this.inputForm.wareHouse[index].fileInfoLost = []
|
|
|
}
|
|
@@ -569,26 +581,26 @@
|
|
|
this.loading = false
|
|
|
this.inputForm.files = []
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
|
|
|
- this.$message.error('至少填写一条采购详情信息')
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.wareHouse)) {
|
|
|
+ this.$message.error('至少填写一条入库详情信息')
|
|
|
this.loading = false
|
|
|
return
|
|
|
} else {
|
|
|
- let i = this.inputForm.detailInfos.length
|
|
|
+ let i = this.inputForm.wareHouse.length
|
|
|
for (let j = 0; j < i; j++) {
|
|
|
let k = j + 1
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].purchaser)) {
|
|
|
- this.$message.error('采购详情第' + k + '行请选择采购人')
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.wareHouse[j].purchaser)) {
|
|
|
+ this.$message.error('入库详情第' + k + '行请选择入库人')
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].procurementType)) {
|
|
|
- this.$message.error('采购详情第' + k + '行请选择采购类型')
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.wareHouse[j].procurementType)) {
|
|
|
+ this.$message.error('入库详情第' + k + '行请选择入库类型')
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
|
- this.$message.error('采购详情第' + k + '行请输入商品单价')
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.wareHouse[j].tradePrice)) {
|
|
|
+ this.$message.error('入库详情第' + k + '行请输入商品单价')
|
|
|
this.loading = false
|
|
|
return
|
|
|
}
|