|
@@ -87,7 +87,10 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <div>
|
|
|
+ <el-row>
|
|
|
+ <upload-component :title="'报价附件'" :display-star="false" :accept="'*'" :file-obj-list="fileList" @uploadSuccess="uploadSuccess"/>
|
|
|
+ </el-row>
|
|
|
+ <div style="margin-top: 20px">
|
|
|
<div class="title">BOM物料明细报价</div>
|
|
|
<el-row>
|
|
|
<el-table :data="productList" border style="width: 100%">
|
|
@@ -181,7 +184,7 @@
|
|
|
</el-table>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div style="margin-top: 20px">
|
|
|
<div class="title"><span style="color: red">* </span>任务工单派发</div>
|
|
|
<el-row>
|
|
|
<el-table :data="dataForm.workInfoList" border style="width: 100%">
|
|
@@ -341,9 +344,10 @@ import {
|
|
|
} from '@/utils/enums'
|
|
|
import WorderAddOrUpdateDialog from '../worder/add-or-update-dialog'
|
|
|
import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
+import UploadComponent from '@/views/modules/common/upload-component'
|
|
|
export default {
|
|
|
name: 'quoted-add-or-update',
|
|
|
- components: { WorderAddOrUpdateDialog, AttachDetailDialog },
|
|
|
+ components: { UploadComponent, WorderAddOrUpdateDialog, AttachDetailDialog },
|
|
|
props: {},
|
|
|
data () {
|
|
|
return {
|
|
@@ -363,6 +367,7 @@ export default {
|
|
|
quotedPriceProductParamsList: [], // 报价物料清单
|
|
|
workInfoList: []
|
|
|
},
|
|
|
+ fileList: [],
|
|
|
dataRule: {
|
|
|
coId: [
|
|
|
{ required: true, message: '请选择沟通信息', trigger: 'change' }
|
|
@@ -413,6 +418,16 @@ export default {
|
|
|
if (this.dataForm.productId) {
|
|
|
this.productIdChangeHandle(this.dataForm.productId)
|
|
|
}
|
|
|
+ // 附件
|
|
|
+ if (data.data.attachList) {
|
|
|
+ data.data.attachList.forEach((item) => {
|
|
|
+ this.fileList.push({
|
|
|
+ name: item.fileName,
|
|
|
+ url: item.url,
|
|
|
+ id: item.url
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -495,6 +510,9 @@ export default {
|
|
|
attachDetails (attachList) {
|
|
|
this.$refs.attachDetail.init(attachList)
|
|
|
},
|
|
|
+ uploadSuccess (fileList) {
|
|
|
+ this.fileList = fileList
|
|
|
+ },
|
|
|
dataFormSubmit () {
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -502,6 +520,17 @@ export default {
|
|
|
this.$message.error('请添加任务工单派发')
|
|
|
return
|
|
|
}
|
|
|
+ // 附件
|
|
|
+ let fList = this.fileList
|
|
|
+ if (fList.length > 0) {
|
|
|
+ this.dataForm.attachList = []
|
|
|
+ for (let i = 0; i < fList.length; i++) {
|
|
|
+ this.dataForm.attachList.push({
|
|
|
+ fileName: fList[i].name,
|
|
|
+ url: fList[i].url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
this.$http({
|
|
|
url: !this.id
|
|
|
? this.$http.adornUrl(`/biz-service/quoted/save`)
|