|
@@ -173,6 +173,7 @@
|
|
|
v-model="document.documentNumber"
|
|
v-model="document.documentNumber"
|
|
|
placeholder="请选择通知书文号"
|
|
placeholder="请选择通知书文号"
|
|
|
style="width: 74%"
|
|
style="width: 74%"
|
|
|
|
|
+ disabled
|
|
|
></el-input>
|
|
></el-input>
|
|
|
<!-- disabled -->
|
|
<!-- disabled -->
|
|
|
<el-button
|
|
<el-button
|
|
@@ -192,6 +193,7 @@
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
clearable
|
|
clearable
|
|
|
:multiple="isMultipleMode"
|
|
:multiple="isMultipleMode"
|
|
|
|
|
+ @change="handleEnterpriseChange"
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in allUnits"
|
|
v-for="item in allUnits"
|
|
@@ -644,13 +646,13 @@
|
|
|
let data = this.documentData.documentTypes.find(
|
|
let data = this.documentData.documentTypes.find(
|
|
|
(item) => item.id === this.document.documentId
|
|
(item) => item.id === this.document.documentId
|
|
|
)
|
|
)
|
|
|
- console.log(data, 'data')
|
|
|
|
|
this.fileUrl = data.fileUrl
|
|
this.fileUrl = data.fileUrl
|
|
|
this.document.documentName = data.documentName
|
|
this.document.documentName = data.documentName
|
|
|
|
|
+ this.document.documentNumber = ''
|
|
|
|
|
+ this.document.documentWhId = ''
|
|
|
this.getDocumentData()
|
|
this.getDocumentData()
|
|
|
},
|
|
},
|
|
|
getDocumentData() {
|
|
getDocumentData() {
|
|
|
- console.log(this.document, 'this.document')
|
|
|
|
|
if (this.document.id === null || this.document.id === '') {
|
|
if (this.document.id === null || this.document.id === '') {
|
|
|
queryByDocumentIdandWhereValue({
|
|
queryByDocumentIdandWhereValue({
|
|
|
documentId: this.document.documentId,
|
|
documentId: this.document.documentId,
|
|
@@ -685,12 +687,48 @@
|
|
|
this.$message.error('请选择一个文号!')
|
|
this.$message.error('请选择一个文号!')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
|
|
+ // 获取选中的文号信息
|
|
|
|
|
+ const selectedDocument = this.selectDocumentWhSelection[0]
|
|
|
|
|
|
|
|
- this.document.documentNumber = this.selectDocumentWhSelection[0].whNo
|
|
|
|
|
- this.document.documentWhId = this.selectDocumentWhSelection[0].id // 假设这是正确的字段名
|
|
|
|
|
|
|
+ this.document.documentNumber = selectedDocument.whNo
|
|
|
|
|
+ this.document.documentWhId = selectedDocument.id
|
|
|
|
|
+ // 数据表格回显文号
|
|
|
|
|
+ this.costDocumentTemplateFiles.forEach((item) => {
|
|
|
|
|
+ if (
|
|
|
|
|
+ item.pinyin.includes('WenHao') ||
|
|
|
|
|
+ item.pinyin.includes('WenJianHao')
|
|
|
|
|
+ ) {
|
|
|
|
|
+ item.dataValue = selectedDocument.whNo
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.pinyin.includes('SongDaWenShuMingCheng')) {
|
|
|
|
|
+ item.dataValue = selectedDocument.whName
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
this.dialogVisible = false
|
|
this.dialogVisible = false
|
|
|
this.activeView = 'form'
|
|
this.activeView = 'form'
|
|
|
},
|
|
},
|
|
|
|
|
+ handleEnterpriseChange(val) {
|
|
|
|
|
+ if (this.document.enterpriseId) {
|
|
|
|
|
+ // BeiJianShenDanWei
|
|
|
|
|
+ let unit = this.allUnits.find(
|
|
|
|
|
+ (item) => item.unitId === this.document.enterpriseId
|
|
|
|
|
+ )
|
|
|
|
|
+ this.costDocumentTemplateFiles.forEach((item) => {
|
|
|
|
|
+ if (item.pinyin.includes('BeiJianShenDanWei')) {
|
|
|
|
|
+ item.dataValue = unit.unitName
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.pinyin.includes('ShouSongDaRen')) {
|
|
|
|
|
+ item.dataValue = unit.contactName
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.pinyin.includes('BeiJianShenDanWeiBanGongDiDian')) {
|
|
|
|
|
+ item.dataValue = unit.address
|
|
|
|
|
+ }
|
|
|
|
|
+ if (item.pinyin.includes('BeiJianShenDanWeiLianXiRenDianHua')) {
|
|
|
|
|
+ item.dataValue = unit.contactMobile
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 保存文档
|
|
// 保存文档
|
|
|
handleSaveDocument() {
|
|
handleSaveDocument() {
|
|
|
// 校验表单
|
|
// 校验表单
|