|
|
@@ -6,28 +6,21 @@
|
|
|
<el-button type="warning" size="small" class="btn1" @click="save()">保存</el-button>
|
|
|
<div class="content" style="word-break:break-all">
|
|
|
<p>提报内容</p>
|
|
|
- <el-input
|
|
|
- type="textarea"
|
|
|
- :autosize="{ minRows: 2, maxRows: 4}"
|
|
|
- placeholder="请输入内容"
|
|
|
+ <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容"
|
|
|
v-model="param.content.content">
|
|
|
- </el-input>
|
|
|
+ </el-input>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="file-box">
|
|
|
<p>提报附件</p>
|
|
|
- <file-item
|
|
|
- :isDownLoad="false"
|
|
|
- :isDelete="true"
|
|
|
- :itemStyle="itemDrawerStyle"
|
|
|
- :fileData="upload_panl.attinfos"
|
|
|
+ <file-item :isDownLoad="false" :isDelete="true" :itemStyle="itemDrawerStyle" :fileData="upload_panl.attinfos"
|
|
|
@deleteSuccess="deleteSuccess"></file-item>
|
|
|
</div>
|
|
|
<upload target="submit" @onSuccess="onSuccess"></upload>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -43,19 +36,18 @@ export default {
|
|
|
"classname": "saletool.submitedit.submitedit",
|
|
|
"method": "insertorupdate",
|
|
|
"content": {
|
|
|
- "sat_submiteditmodelid":"",
|
|
|
- "content":"",
|
|
|
- "sat_submiteditid":"0"
|
|
|
+ "sat_submiteditmodelid": "",
|
|
|
+ "content": "",
|
|
|
+ "sat_submiteditid": "0"
|
|
|
}
|
|
|
},
|
|
|
- isFileInfoPanlShow:false,
|
|
|
+ isFileInfoPanlShow: false,
|
|
|
itemDrawerStyle: {
|
|
|
- itemWidth:460,
|
|
|
img: {
|
|
|
- width:53,
|
|
|
- height:64
|
|
|
+ width: 53,
|
|
|
+ height: 64
|
|
|
},
|
|
|
- title:16,
|
|
|
+ title: 16,
|
|
|
descript: 12
|
|
|
},
|
|
|
textarea2: '',
|
|
|
@@ -63,7 +55,7 @@ export default {
|
|
|
upload_panl: 0,
|
|
|
};
|
|
|
},
|
|
|
- props:['detailData','disabled'],
|
|
|
+ props: ['detailData', 'disabled', 'editData'],
|
|
|
components: {
|
|
|
FileItem,
|
|
|
upload
|
|
|
@@ -73,91 +65,124 @@ export default {
|
|
|
watch: {
|
|
|
//监听字段是否删除上传模板
|
|
|
isFileInfoPanlShow: {
|
|
|
- handler(val) {
|
|
|
- if(val == false && this.upload_panl.status == '未提报') {
|
|
|
+ handler (val) {
|
|
|
+ if (val == false && this.upload_panl.status == '未提报') {
|
|
|
this.deleteSubmit()
|
|
|
//删除附件
|
|
|
- if(this.upload_panl.attinfos.length != 0) removeFile.removeFileList(this.upload_panl.attinfos)
|
|
|
+ if (this.upload_panl.attinfos.length != 0) removeFile.removeFileList(this.upload_panl.attinfos)
|
|
|
}
|
|
|
+ },
|
|
|
+ },
|
|
|
+ editData: {
|
|
|
+ handler (val) {
|
|
|
+ this.upload_panl = val
|
|
|
+ this.param.content.content = val.content
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- actionSubmit() {
|
|
|
+ actionSubmit () {
|
|
|
this.isFileInfoPanlShow = true
|
|
|
this.getSubmitPanl()
|
|
|
},
|
|
|
//获取上传模板
|
|
|
- getSubmitPanl() {
|
|
|
+ getSubmitPanl () {
|
|
|
this.param.content.sat_submiteditmodelid = this.detailData.sat_submiteditmodelid
|
|
|
- this.$api.requested(this.param).then( res => {
|
|
|
+ this.$api.requested(this.param).then(res => {
|
|
|
this.upload_panl = res.data
|
|
|
})
|
|
|
},
|
|
|
//删除提报记录
|
|
|
- deleteSubmit() {
|
|
|
+ deleteSubmit () {
|
|
|
+ this.param.content.content = ''
|
|
|
+ this.upload_panl.attinfos = ''
|
|
|
let param = {
|
|
|
- "classname": "saletool.submitedit.submitedit",
|
|
|
- "method": "delete_submitdetailed",
|
|
|
- "content": {
|
|
|
- "sat_submiteditid":this.upload_panl.sat_submiteditid
|
|
|
- }
|
|
|
+ "classname": "saletool.submitedit.submitedit",
|
|
|
+ "method": "delete_submitdetailed",
|
|
|
+ "content": {
|
|
|
+ "sat_submiteditid": this.upload_panl.sat_submiteditid
|
|
|
+ }
|
|
|
}
|
|
|
- this.$api.requested(param).then( res =>{
|
|
|
- if(res.code != 1) {
|
|
|
+ this.$api.requested(param).then(res => {
|
|
|
+ if (res.code != 1) {
|
|
|
console.log('提报删除失败');
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
- save() {
|
|
|
+ save () {
|
|
|
//新增
|
|
|
- if(this.param.content.content == false) {
|
|
|
+ if (this.param.content.content == false) {
|
|
|
this.$notify({
|
|
|
- title:'提示',
|
|
|
- message:'请编辑内容',
|
|
|
- type:'warning'
|
|
|
+ title: '提示',
|
|
|
+ message: '请编辑内容',
|
|
|
+ type: 'warning'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.param.content.sat_submiteditmodelid = this.detailData.sat_submiteditmodelid
|
|
|
+ this.param.content.sat_submiteditmodelid = this.editData ? this.upload_panl.sat_submiteditmodelid : this.detailData.sat_submiteditmodelid
|
|
|
this.param.content.sat_submiteditid = this.upload_panl.sat_submiteditid
|
|
|
- this.$api.requested(this.param).then( res => {
|
|
|
- this.upload_panl.status = '发布'
|
|
|
- if(res.code == 1) {
|
|
|
- //提交提报明细
|
|
|
- let param2 = {
|
|
|
- "classname": "saletool.submitedit.submitedit",
|
|
|
- "method": "sub_submitdetailed",
|
|
|
- "content": {
|
|
|
- "onceonly":0,
|
|
|
- "sat_submiteditmodelid":this.detailData.sat_submiteditmodelid,
|
|
|
- "sat_submiteditid":this.upload_panl.sat_submiteditid
|
|
|
+ if (this.editData.attinfos) {
|
|
|
+ this.$api.requested(this.param).then(res => {
|
|
|
+ if(res.code == 1) {
|
|
|
+ this.$notify({
|
|
|
+ title:'提示',
|
|
|
+ message:'修改成功',
|
|
|
+ type:'success'
|
|
|
+ })
|
|
|
+ this.isFileInfoPanlShow = false
|
|
|
+ this.$parent.getDetailData()
|
|
|
+ this.upload_panl = ''
|
|
|
+ this.param.content.content = ''
|
|
|
+ this.param = {
|
|
|
+ "classname": "saletool.submitedit.submitedit",
|
|
|
+ "method": "insertorupdate",
|
|
|
+ "content": {
|
|
|
+ "sat_submiteditmodelid": "",
|
|
|
+ "content": "",
|
|
|
+ "sat_submiteditid": "0"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- this.$api.requested(param2).then( res => {
|
|
|
- if(res.code == 1) {
|
|
|
- this.upload_panl.status = '发布'
|
|
|
- this.upload_panl.attinfos = null
|
|
|
- this.param = {
|
|
|
- "classname": "saletool.submitedit.submitedit",
|
|
|
- "method": "insertorupdate",
|
|
|
- "content": {
|
|
|
- "sat_submiteditmodelid":"",
|
|
|
- "content":"",
|
|
|
- "sat_submiteditid":"0"
|
|
|
- }
|
|
|
- },
|
|
|
- this.isFileInfoPanlShow = false
|
|
|
- this.$parent.getDetailData()
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$api.requested(this.param).then(res => {
|
|
|
+ this.upload_panl.status = '发布'
|
|
|
+ if (res.code == 1) {
|
|
|
+ //提交提报明细
|
|
|
+ let param2 = {
|
|
|
+ "classname": "saletool.submitedit.submitedit",
|
|
|
+ "method": "sub_submitdetailed",
|
|
|
+ "content": {
|
|
|
+ "onceonly": 0,
|
|
|
+ "sat_submiteditmodelid": this.detailData.sat_submiteditmodelid,
|
|
|
+ "sat_submiteditid": this.upload_panl.sat_submiteditid
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$api.requested(param2).then(res => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.upload_panl.status = '发布'
|
|
|
+ this.upload_panl.attinfos = null
|
|
|
+ this.param = {
|
|
|
+ "classname": "saletool.submitedit.submitedit",
|
|
|
+ "method": "insertorupdate",
|
|
|
+ "content": {
|
|
|
+ "sat_submiteditmodelid": "",
|
|
|
+ "content": "",
|
|
|
+ "sat_submiteditid": "0"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ this.isFileInfoPanlShow = false
|
|
|
+ this.$parent.getDetailData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-
|
|
|
},
|
|
|
- onSuccess(id) {
|
|
|
+ onSuccess (id) {
|
|
|
this.fileId = id
|
|
|
let param = {
|
|
|
"classname": "system.attachment.Attachment",
|
|
|
@@ -179,64 +204,64 @@ export default {
|
|
|
type: 'error'
|
|
|
})
|
|
|
} else {
|
|
|
- this.upload_panl.attinfos = this.fileType.fileList(this.upload_panl.attinfos.concat(res.data[0]))
|
|
|
+ this.upload_panl.attinfos = this.fileType.fileList(this.upload_panl.attinfos.concat(res.data[0]))
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- deleteSuccess(data) {
|
|
|
- this.upload_panl.attinfos.splice(data,1)
|
|
|
+ deleteSuccess (data) {
|
|
|
+ this.upload_panl.attinfos.splice(data, 1)
|
|
|
}
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- * {
|
|
|
- box-sizing: border-box;
|
|
|
- }
|
|
|
- /deep/ .el-drawer__header {
|
|
|
- margin-bottom: 0;
|
|
|
- }
|
|
|
- /deep/ .el-drawer {
|
|
|
- width: 1052px !important;
|
|
|
- }
|
|
|
- .el-drawer__body .btn1 {
|
|
|
- margin: 20px 0 20px 20px;
|
|
|
- width: 88px;
|
|
|
- height: 36px;
|
|
|
- background: #FA8C16;
|
|
|
- }
|
|
|
- .el-drawer__body .content {
|
|
|
- border-bottom: 10px solid #FAFAFA;
|
|
|
- padding: 0 0 20px 20px;
|
|
|
- }
|
|
|
- .el-drawer__body .content p:first-child {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: bold;
|
|
|
- color: #333333;
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
- .el-drawer .file-box p {
|
|
|
- margin: 20px 0 20px 0;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: bold;
|
|
|
- color: #333333;
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
- .el-drawer .file-box .file {
|
|
|
- display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
- }
|
|
|
- .upload {
|
|
|
- display: flex;
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
- /deep/.upload .el-button {
|
|
|
- width: 100%;
|
|
|
- border: 1px solid #3874F6;
|
|
|
- color: #3874F6;
|
|
|
- }
|
|
|
- .bottom {
|
|
|
- padding: 0 20px;
|
|
|
- }
|
|
|
+* {
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+/deep/ .el-drawer__header {
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
+/deep/ .el-drawer {
|
|
|
+ width: 546px !important;
|
|
|
+}
|
|
|
+.el-drawer__body .btn1 {
|
|
|
+ margin: 20px 0 20px 20px;
|
|
|
+ width: 88px;
|
|
|
+ height: 36px;
|
|
|
+ background: #fa8c16;
|
|
|
+}
|
|
|
+.el-drawer__body .content {
|
|
|
+ border-bottom: 10px solid #fafafa;
|
|
|
+ padding: 0 0 20px 20px;
|
|
|
+}
|
|
|
+.el-drawer__body .content p:first-child {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+.el-drawer .file-box p {
|
|
|
+ margin: 20px 0 20px 0;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ margin-bottom: 20px;
|
|
|
+}
|
|
|
+.el-drawer .file-box .file {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+.upload {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+/deep/.upload .el-button {
|
|
|
+ width: 100%;
|
|
|
+ border: 1px solid #3874f6;
|
|
|
+ color: #3874f6;
|
|
|
+}
|
|
|
+.bottom {
|
|
|
+ padding: 0 20px;
|
|
|
+}
|
|
|
</style>
|